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
6879f5b47e04aa543d94a5f29080607550f9dd1c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_13bdd4da1bfb010f1838c817e3e20b5006140772/TestAlgorithmMulti/7_13bdd4da1bfb010f1838c817e3e20b5006140772_TestAlgorithmMulti_s.java
9f7066d8d335ee613917f8a23fb79f59a60b1ae6
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
10,057
java
package algorithm; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Collection; import java.util.Date; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Random; import java.util.UUID; import org.apache.commons.math3.distribution.NormalDistribution; import crowdtrust.AccuracyRecord; import crowdtrust.Bee; import crowdtrust.BinaryAccuracy; import crowdtrust.BinaryR; import crowdtrust.BinarySubTask; import crowdtrust.Account; import crowdtrust.MultiValueSubTask; import crowdtrust.Response; import crowdtrust.SingleAccuracy; import db.DbInitialiser; import db.LoginDb; import db.RegisterDb; import db.SubTaskDb; import db.TaskDb; import db.CrowdDb; import junit.framework.TestCase; public class TestAlgorithmMulti extends TestCase { protected static int annotatorNumber = 10; protected static int subtasks = 100; protected static int totalPos = 1000; //Annotators when created have protected static int totalNeg = 1000; //'Answered' 2000 questions protected AnnotatorModel[] annotators; public TestAlgorithmMulti(String name){ super(name); } public void testAlgorithm(){ boolean labs = false; System.setProperty("test", "true"); if(labs){ DbInitialiser.init(); } //Lets create some annotators with id's 1 - 1000 and place them in array annotators = new AnnotatorModel[annotatorNumber]; for(int i = 0; i < annotatorNumber; i++){ String uuid = UUID.randomUUID().toString(); uuid = uuid.replace("-", ""); uuid = uuid.substring(0, 12); annotators[i] = new AnnotatorModel(uuid, uuid); } //Set up the annotators so they can answer multi question Random rand = new Random(); for(int i = 0; i < annotatorNumber; i++){ double honestPeople = 0.75; if(rand.nextDouble() > honestPeople){ //bot annotators[i].setUpMulti(800, 1000); }else{ //honest annotator annotators[i].setUpMulti(200, 1000); } } if(labs){ //Add them to the Database for(int i = 0; i < annotatorNumber; i++){ RegisterDb.addUser("test@test.com", annotators[i].getUsername(), annotators[i].getPassword(), true); annotators[i].setId(LoginDb.checkUserDetails(annotators[i].getUsername(), annotators[i].getPassword())); AnnotatorModel a = annotators[i]; System.out.println("annotator " + a.bee.getId() + " successRate =" + a.multi.successRate); } //Lets make a client RegisterDb.addUser("testClient@test.com", "gio", "gio", false); int accountId = LoginDb.checkUserDetails("gio", "gio"); //Lets add a binary task to the database long expiry = getDate(); float accuracy = (float)0.7; List<String> testQs = new LinkedList<String>(); testQs.add("test q1"); testQs.add("test q2"); assertTrue(TaskDb.addTask(accountId,"MultiTestTask", "This is a test?", accuracy, 1, 2, 1, 15, expiry, testQs)>0); //List of answers LinkedList<AnnotatorSubTaskAnswer> answers = new LinkedList<AnnotatorSubTaskAnswer>(); System.out.println("About to get Task id"); System.out.println("John Task Id: " + TaskDb.getTaskId("MultiTestTask")); System.out.println("Got it"); //Lets create a linked list of subTasks for(int i = 0; i < subtasks; i++){ String uuid = UUID.randomUUID().toString(); uuid = uuid.replace("-", ""); uuid = uuid.substring(0, 12); SubTaskDb.addSubtask(uuid, TaskDb.getTaskId("MultiTestTask")); int id = SubTaskDb.getSubTaskId(uuid); System.out.println("Subtask Id: " + id); MultiValueSubTask mst = new MultiValueSubTask(id, 0.7, 0, 15, 5); AnnotatorSubTaskAnswer asta = new AnnotatorSubTaskAnswer(mst.getId(), mst, new MultiTestData(rand.nextInt(6), 5)); answers.add(asta); } //Give all the annotators the answers for(int i = 0; i < annotatorNumber; i++){ annotators[i].setTasks(answers); } System.out.println("Given annotators answers"); //printAnswers(answers); System.out.println("---------Beginning to answer tasks--------------------"); int parent_task_id = TaskDb.getTaskId("MultiTestTask"); int annotatorIndex = rand.nextInt(annotatorNumber - 1); AnnotatorModel a = annotators[annotatorIndex]; MultiValueSubTask t = (MultiValueSubTask) SubTaskDb.getRandomSubTask(parent_task_id, a.bee.getId()); while( t != null){ annotatorIndex = rand.nextInt(annotatorNumber - 1); a = annotators[annotatorIndex]; System.out.println("Annotator: " + a.username + " |Task: " + t.getId()); a.answerTask(t); t = (MultiValueSubTask) SubTaskDb.getRandomSubTask(parent_task_id, a.bee.getId()); } System.out.println("------------------------------------------------------ "); System.out.println("---------Calculating label error rate--------------------"); Map<Integer,Response> results = SubTaskDb.getResults(1); int correct = 0; for (AnnotatorSubTaskAnswer answer : answers){ Response trueA = answer.getAlgoTestData().getActualAnswer(); Response estA = results.get(answer.id); System.out.println("id " + answer.id + " true answer = " + trueA + " estimate = " + estA); if(trueA.equals(estA)){ correct++; } } System.out.println("error rate = " + ((double)correct/subtasks)); System.out.println("------------------------------------------------------ "); /*System.out.println("----------------Offline Binary Testing-------------------"); System.out.println("Id | ATPR | ATNR | TPRE | TNRE "); for(int i = 0; i < annotatorNumber; i++){ int totalQuestions = 1000; int negQuestions = 0; int posQuestions = 0; int truePos = 0; int trueNeg = 0; AnnotatorModel annotator = annotators[i]; System.out.print(annotator.getBee().getId() +" | " + annotator.getBinaryBehaviour().getTruePosRate() + " | " + annotator.getBinaryBehaviour().getTrueNegRate() + " | " ); for(int j = 0; j < totalQuestions; j++){ Random r = new Random(); int actualAnswer = r.nextInt(2); boolean answerBool; if(actualAnswer == 1){ answerBool = true; posQuestions++; }else{ answerBool = false; negQuestions++; } int annotatorAnswer = annotators[i].getBinaryBehaviour().generateAnswer(new BinaryR(answerBool)); if(annotatorAnswer == 1 & actualAnswer == 1){ truePos ++; }else if(annotatorAnswer == 0 & actualAnswer == 0){ trueNeg ++; } } double tpr = ((truePos * 1.0) / (posQuestions * 1.0)); double tnr = ((trueNeg * 1.0) / (negQuestions * 1.0)); System.out.print(tpr + " | " + tnr); System.out.println(""); System.out.println("NumPos = " + posQuestions + " NumNeg = " + negQuestions + " TruePos = " + truePos + " TrueNeg = " + trueNeg); System.out.println(""); } System.out.println("----------------------------------------------------------"); */ System.out.println("----------Calculating Annotator Rates-----------------"); System.out.println("Id | A | AE "); for(int i = 0; i < annotatorNumber; i++){ AnnotatorModel annotator = annotators[i]; System.out.print(annotator.getBee().getId() +" | " + annotator.getMultiBehaviour().getSuccessRate() + " | " ); SingleAccuracy singAccuracy = CrowdDb.getMultiValueAccuracy(annotator.getBee().getId()); System.out.print(singAccuracy.getAccuracy()); System.out.println(""); } System.out.println("------------------------------------------------------"); // /* System.out.println("---------Calculating accuracy average difference--------------------"); Map<Integer,Response> accuracies = SubTaskDb.getResults(1); for (AnnotatorSubTaskAnswer answer : answers){ Response trueA = answer.getAlgoTestData().getActualAnswer(); Response estA = results.get(answer.id); System.out.println("id " + answer.id + " true answer = " + trueA + " estimate = " + estA); if(trueA.equals(estA)){ correct++; } } System.out.println("error rate = " + (correct/subtasks)); System.out.println("------------------------------------------------------ "); */ //DbInitialiser.init(); } } protected void printAnswers(LinkedList<AnnotatorSubTaskAnswer> answers){ System.out.println("-------------Printing Answers------------------"); Iterator<AnnotatorSubTaskAnswer> i = answers.iterator(); while(i.hasNext()){ AnnotatorSubTaskAnswer temp = i.next(); System.out.println("Answer id: " + temp.getId()); System.out.println("Actual answer: " + ((BinaryTestData)temp.getAlgoTestData()).getActualAnswer()); } System.out.println("-----------------------------------------------"); } protected long getDate(){ long ret = 0 ; String str_date = "11-June-15"; DateFormat formatter ; Date date ; formatter = new SimpleDateFormat("dd-MMM-yy"); try { date = (Date)formatter.parse(str_date); ret = date.getTime(); } catch (ParseException e) { e.printStackTrace(); } return ret; } protected void printExpertList(){ System.out.println("-----------Printing Expert List----------------"); System.out.println("-----------------------------------------------"); List<Account> experts = CrowdDb.getAllExperts(); for(Account account : experts) { System.out.println("id =" + account.getId() + " name = " + account.getName()); } } protected void printBotList(){ System.out.println("-----------Printing Bots List-------------------"); System.out.println("------------------------------------------------"); List<Account> bots = CrowdDb.getAllExperts(); for(Account account : bots) { System.out.println("id =" + account.getId() + " name = " + account.getName()); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1aac925478d645edd0f334fc0864f3f73f59ef94
56d949ce62ba8d0d26b578f0460010da6ad0e6b6
/main/java/com/flipkart/fdpinfra/kafka/balancer/ReplicationSetterBalancer.java
76a107a5073d6790e3f9b33ccb8673fc6f77f046
[ "Apache-2.0" ]
permissive
TechReporter/kafka-balancer
0b9752ec5b98833e03d19370bc4daf62fb622533
150b7cde05aa18fdd5cca75d16066970de525e4c
refs/heads/master
2020-07-03T18:14:49.633550
2017-06-21T06:07:37
2017-06-21T06:07:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,558
java
package com.flipkart.fdpinfra.kafka.balancer; import java.util.ArrayList; import java.util.List; import org.apache.kafka.common.Node; import org.apache.kafka.common.requests.MetadataResponse.PartitionMetadata; import org.apache.kafka.common.requests.MetadataResponse.TopicMetadata; import com.flipkart.fdpinfra.kafka.balancer.exception.ReplicaAssignmentException; import com.flipkart.fdpinfra.kafka.balancer.model.Replica; public class ReplicationSetterBalancer extends KafkaBalancer { private static final boolean IS_LEADER = false; private static final int MIN_REPLICATION_FACTOR = 2; private int newReplicationFactor; private TopicMetadata tm; public ReplicationSetterBalancer(String topic, boolean rackAware, int newReplicationFactor) { super(topic, rackAware); this.newReplicationFactor = newReplicationFactor; } @Override public void generatePlan(int partitionCount, int numBrokers) throws ReplicaAssignmentException { validatePreAssignment(); setPartitionMetadata(); int currentReplicationFactor = replicationFactor; while (currentReplicationFactor - newReplicationFactor > 0) { for (PartitionMetadata partitionMetadata : tm.partitionMetadata()) { List<Node> replicas = partitionMetadata.replicas(); int partition = partitionMetadata.partition(); int brokerId = getTargetBroker(replicas, partitionMetadata.leader().id()); followerAssignments.add(new Replica(partition, IS_LEADER, brokerId, -1)); brokersInfo.get(brokerId).removePartition(partition, IS_LEADER); } currentReplicationFactor--; } } private void setPartitionMetadata() { List<PartitionMetadata> clonePartitionMetadata = new ArrayList<>(); TopicMetadata cloneTopicMetadata = new TopicMetadata(topicMetadata.error(), topicMetadata.topic(), topicMetadata.isInternal(), clonePartitionMetadata); for (PartitionMetadata p : topicMetadata.partitionMetadata()) { clonePartitionMetadata.add(new PartitionMetadata(p.error(), p.partition(), p.leader(), new ArrayList<>(p .replicas()), p.isr())); } this.tm = cloneTopicMetadata; } @Override protected void validatePostAssignment(int replicationFactor) throws ReplicaAssignmentException { super.validatePostAssignment(newReplicationFactor); } private int getTargetBroker(List<Node> replicas, int leader) { int index = 0; int mostLoaded = Integer.MIN_VALUE; int size = replicas.size(); for (int i = size - 1; i >= 0; i--) { Node node = replicas.get(i); int id = node.id(); if (id == leader) { continue; } Integer numFollowers = brokersInfo.get(id).getNumFollowers(); if (mostLoaded < numFollowers) { mostLoaded = numFollowers; index = i; } } return replicas.remove(index).id(); } private void validatePreAssignment() throws ReplicaAssignmentException { if (!underReplicatedPartitions.isEmpty()) { throw new UnsupportedOperationException( "Under replicated partitions found for the topic, clear them off before trying to balance: " + underReplicatedPartitions); } partitionManager.validatePartitionPlacements(brokersInfo, replicationFactor); if (newReplicationFactor > replicationFactor) { throw new UnsupportedOperationException( "Increasing replication factor is not supported right now: Current: " + replicationFactor + ", Requested:" + newReplicationFactor); } if (newReplicationFactor < MIN_REPLICATION_FACTOR) { throw new IllegalArgumentException("Replication factor : " + newReplicationFactor + " cannot be less than " + MIN_REPLICATION_FACTOR); } } }
[ "gokulakannan.m@flipkart.com" ]
gokulakannan.m@flipkart.com
d81cbbc6bad415833fe5b44ea934b508b48de875
db5e2811d3988a5e689b5fa63e748c232943b4a0
/jadx/sources/zendesk/support/request/RequestViewConversationsEnabled_MembersInjector.java
87e05f3775120bf53e7b876aa263ec3c2558bc00
[]
no_license
ghuntley/TraceTogether_1.6.1.apk
914885d8be7b23758d161bcd066a4caf5ec03233
b5c515577902482d741cabdbd30f883a016242f8
refs/heads/master
2022-04-23T16:59:33.038690
2020-04-27T05:44:49
2020-04-27T05:44:49
259,217,124
0
0
null
null
null
null
UTF-8
Java
false
false
873
java
package zendesk.support.request; import o.C3616p; import o.nu; public final class RequestViewConversationsEnabled_MembersInjector { public static void injectStore(RequestViewConversationsEnabled requestViewConversationsEnabled, nu nuVar) { requestViewConversationsEnabled.store = nuVar; } public static void injectAf(RequestViewConversationsEnabled requestViewConversationsEnabled, Object obj) { requestViewConversationsEnabled.af = (ActionFactory) obj; } public static void injectCellFactory(RequestViewConversationsEnabled requestViewConversationsEnabled, Object obj) { requestViewConversationsEnabled.cellFactory = (CellFactory) obj; } public static void injectPicasso(RequestViewConversationsEnabled requestViewConversationsEnabled, C3616p pVar) { requestViewConversationsEnabled.picasso = pVar; } }
[ "ghuntley@ghuntley.com" ]
ghuntley@ghuntley.com
c73d5ae8208066483d1de7c206d9fb4d283637fb
d6ab38714f7a5f0dc6d7446ec20626f8f539406a
/backend/collecting/dsfj/Java/edited/network.NetworkAddress.java
068b753e0c8cb7f41c16de22ec886a557bfdecf6
[]
no_license
haditabatabaei/webproject
8db7178affaca835b5d66daa7d47c28443b53c3d
86b3f253e894f4368a517711bbfbe257be0259fd
refs/heads/master
2020-04-10T09:26:25.819406
2018-12-08T12:21:52
2018-12-08T12:21:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,004
java
package org.elasticsearch.common.network; import java.net.Inet6Address; import java.net.InetAddress; import java.net.InetSocketAddress; import java.util.Objects; public final class NetworkAddress { private NetworkAddress() {} public static String format(InetAddress address) { return format(address, -1); } public static String format(InetSocketAddress address) { return format(address.getAddress(), address.getPort()); } static String format(InetAddress address, int port) { Objects.requireNonNull(address); StringBuilder builder = new StringBuilder(); if (port != -1 && address instanceof Inet6Address) { builder.append(InetAddresses.toUriString(address)); } else { builder.append(InetAddresses.toAddrString(address)); } if (port != -1) { builder.append(':'); builder.append(port); } return builder.toString(); } }
[ "mahdisadeghzadeh24@gamil.com" ]
mahdisadeghzadeh24@gamil.com
9c3839a485af7398a875b467df1f3039c7599a5a
e3544f2f94b9aaebbb32192fc40c1c4135faf21d
/MaximalSquare_221.java
a8eeaefeca3d54ea0ad7d6a2b3c290fa480ea4f0
[]
no_license
Foredoomed/leecode
464c353931712e73ff20eb35443f286d4d462e08
9b5b89b8c528943c7712f3ca5e953c4d27fa9b92
refs/heads/master
2021-01-21T18:53:56.876288
2017-09-20T09:00:09
2017-09-20T09:00:09
92,094,398
0
0
null
null
null
null
UTF-8
Java
false
false
575
java
public class MaximalSquare_221 { public static void main(String[] args) { // TODO Auto-generated method stub } public int maximalSquare(char[][] matrix) { if (matrix.length == 0) return 0; int m = matrix.length, n = matrix[0].length, result = 0; int[][] b = new int[m + 1][n + 1]; for (int i = 1; i <= m; i++) { for (int j = 1; j <= n; j++) { if (matrix[i - 1][j - 1] == '1') { b[i][j] = Math.min(Math.min(b[i][j - 1], b[i - 1][j - 1]), b[i - 1][j]) + 1; result = Math.max(b[i][j], result); } } } return result * result; } }
[ "foredoomed.org" ]
foredoomed.org
9fec12fb49c52839dcfaf9a417247d6eb06358e8
7178e494e707ae152d4519b60c95f71b544d96eb
/refactoring/src/main/java/com/liujun/code/myself/swatchcase/refactor03/sender/WorkWeChatSender.java
4cb04520a38677947bb4ef1ac670f3f5f99603d4
[]
no_license
kkzfl22/learing
e24fce455bc8fec027c6009e9cd1becca0ca331b
1a1270bfc9469d23218c88bcd6af0e7aedbe41b6
refs/heads/master
2023-02-07T16:23:27.012579
2020-12-26T04:35:52
2020-12-26T04:35:52
297,195,805
0
0
null
null
null
null
UTF-8
Java
false
false
1,151
java
package com.liujun.code.myself.swatchcase.refactor03.sender; import com.liujun.code.myself.swatchcase.refactor03.bean.FunCodeMsgData; import com.liujun.code.myself.swatchcase.refactor03.bean.MsgData; import com.liujun.code.myself.swatchcase.src.common.MessageData; /** * 企业微信发送 * * @author liujun * @version 0.0.1 */ public class WorkWeChatSender implements MessageSenderInf { /** * 企业微信消息的发送 * * @param msgData 消息内容 */ @Override public void sender(MsgData msgData) { System.out.println("企业微信消息发送开始....."); FunCodeMsgData funCodeMsg = (FunCodeMsgData) msgData; System.out.println( "企业微信消息:funCode" + funCodeMsg.getFunCode() + ",toUserOpenId:" + funCodeMsg.getToId() + ",context:" + funCodeMsg.getContext()); System.out.println("企业微信消息发送结束....."); } @Override public MsgData parse(MessageData workWeChatMsg) { return new FunCodeMsgData( workWeChatMsg.getNotifyNumber(), workWeChatMsg.getContent(), workWeChatMsg.getFunCode()); } }
[ "liujun@paraview.cn" ]
liujun@paraview.cn
b83cc9a9f63bed5b22274eeaab50697d1813c3de
1ea4fe928e81f1c54445ea254df15cd1050c96d5
/202/Triangle.java
a38a33f8519a509328c1039e48f7ccc67b61ac81
[]
no_license
TheFinalJoke/Java
3f5dec8016631d6c4e289cb41189aaf824c6cab6
98024235848980871a04c605d3c2e912555d531e
refs/heads/master
2020-04-05T19:27:20.123596
2019-02-13T05:24:37
2019-02-13T05:24:37
157,135,317
0
0
null
null
null
null
UTF-8
Java
false
false
1,171
java
/** * */ public class Triangle extends GeometricObject { private double side1, side2, side3; /** Constructor */ public Triangle(double side1, double side2, double side3, boolean filled, String color) throws IllegalTriangleException { if (side1 + side2 >= side3 && side1 + side3 >= side2 && side2 + side3 >= side1) { setFilled(filled); setColor(color); this.side1 = side1; this.side2 = side2; this.side3 = side3; } else { throw new IllegalTriangleException(side1, side2, side3, "With these sides you can not create a triangle."); } }// end constructor /** Implement the abstract method findArea in GeometricObject */ public double getArea() { double s = (side1 + side2 + side3) / 2; return Math.sqrt(s * (s - side1) * (s - side2) * (s - side3)); } /** Implement the abstract method findCircumference in * GeometricObject **/ public double getPerimeter() { return side1 + side2 + side3; } @Override public String toString() { // Implement it to return the three sides return super.toString() + "Triangle: side1 = " + side1 + " side2 = " + side2 + " side3 = " + side3; } }// end Triangle
[ "nickshorter@comcast.net" ]
nickshorter@comcast.net
25b1e85194c79eacd528f5999d794b3e9503b7cc
1fa71691c8978be83dbef4b44e07abbf0a9d6772
/src/com/l1337/l1306/Solution.java
e75e7ed523c83bb1b163860a960db30fa77f1f2b
[]
no_license
carl286/Java-1337
0ac6ad48629ad8200c0c092ba9b70ceb438cecd7
49f55dc6ee682d0d209cd876d8af43c4c4aace1f
refs/heads/master
2021-07-25T10:27:10.675303
2017-07-16T17:28:50
2021-06-22T05:16:26
48,292,126
0
0
null
null
null
null
UTF-8
Java
false
false
1,126
java
package com.l1337.l1306; import java.util.ArrayDeque; import java.util.Deque; import java.util.HashSet; import java.util.Set; public class Solution { private int [] directions = new int [] {+1, -1}; public boolean canReach(int[] arr, int start) { if (arr[start] == 0) return true; Deque<Integer> dq = new ArrayDeque<>(); Set<Integer> set = new HashSet<>(); dq.addLast(start); set.add(start); while (!dq.isEmpty()) { Integer current = dq.pollFirst(); for(int k = 0; k < directions.length; ++k) { int next = current + directions[k] * arr[current]; if (next >= 0 && next < arr.length && !set.contains(next)) { if (arr[next] == 0) return true; set.add(next); dq.addLast(next); } } } return false; } public static void main(String [] args) { Solution s = new Solution(); System.out.println("Hello World"); } }
[ "like@microsoft.com" ]
like@microsoft.com
dfb137771a1ca6b6a350976d48045e7c58d8cca8
806fd3bb7dc6056203931ec59ca3fed1f3964aa6
/springcloud-parent/upms-biz-eureka/src/main/java/com/hdf/upms/biz/web/UserController.java
562b442d6e60051847eb1a05215ffbf6108643a3
[]
no_license
handingfei/springcloud-02d
68a1be12dcf9eea4b701a446eb3d1a198e466631
dff72d2c4a82f4978eddd68c17ead82d79065118
refs/heads/master
2022-12-30T10:24:18.683020
2020-10-17T00:57:55
2020-10-17T00:57:55
293,713,000
0
0
null
null
null
null
UTF-8
Java
false
false
1,813
java
package com.hdf.upms.biz.web; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.mapper.Wrapper; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.hdf.dto.Page; import com.hdf.dto.UserDto; import com.hdf.upms.biz.entity.User; import com.hdf.upms.biz.service.IUserService; import com.hdf.vo.ResultEntity; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * <p> * InnoDB free: 7168 kB; (`province`) REFER `kylin_hdf/nation`(`id`); (`city`) REFE 前端控制器 * </p> * * @author Mht * @since 2020-09-08 */ @RestController @RequestMapping("/user") @Slf4j public class UserController { @Autowired IUserService iUserService; @RequestMapping("/list") public ResultEntity list(@RequestBody UserDto userDto){ log.info(JSON.toJSONString(userDto)); PageHelper.startPage(userDto.getPageNo(),userDto.getPageSize()); Wrapper wrapper = new EntityWrapper(); List list = iUserService.selectList(wrapper); PageInfo<UserDto> pageInfo = new PageInfo(list); return ResultEntity.success("200","操作成功",pageInfo); } @RequestMapping("/save") public ResultEntity save(@RequestBody UserDto userDto){ User user = new User(); BeanUtils.copyProperties(userDto,user); user.setUserface(userDto.getImages().get(0)); this.iUserService.insert(user); return ResultEntity.success(); } }
[ "3516521099@qq.com" ]
3516521099@qq.com
258c1f55969d2a239172534a3961fd4ca5182bc5
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/PACT_com.pactforcure.app/javafiles/android/support/v7/app/AppCompatViewInflater.java
3825bcd57e615eb23c945ae345e62373c5f363ec
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
42,400
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package android.support.v7.app; import android.content.Context; import android.content.ContextWrapper; import android.content.res.Resources; import android.content.res.TypedArray; import android.support.v4.util.ArrayMap; import android.support.v4.view.ViewCompat; import android.support.v7.view.ContextThemeWrapper; import android.support.v7.widget.*; import android.util.AttributeSet; import android.util.Log; import android.view.InflateException; import android.view.View; import java.lang.reflect.*; import java.util.Map; class AppCompatViewInflater { private static class DeclaredOnClickListener implements android.view.View.OnClickListener { private void resolveMethod(Context context, String s) { _L2: if(context == null) break; /* Loop/switch isn't completed */ // 0 0:aload_1 // 1 1:ifnull 71 if(context.isRestricted()) break MISSING_BLOCK_LABEL_48; // 2 4:aload_1 // 3 5:invokevirtual #40 <Method boolean Context.isRestricted()> // 4 8:ifne 48 s = ((String) (((Object) (context)).getClass().getMethod(mMethodName, new Class[] { android/view/View }))); // 5 11:aload_1 // 6 12:invokevirtual #44 <Method Class Object.getClass()> // 7 15:aload_0 // 8 16:getfield #27 <Field String mMethodName> // 9 19:iconst_1 // 10 20:anewarray Class[] // 11 23:dup // 12 24:iconst_0 // 13 25:ldc1 #48 <Class View> // 14 27:aastore // 15 28:invokevirtual #52 <Method Method Class.getMethod(String, Class[])> // 16 31:astore_2 if(s != null) //* 17 32:aload_2 //* 18 33:ifnull 48 try { mResolvedMethod = ((Method) (s)); // 19 36:aload_0 // 20 37:aload_2 // 21 38:putfield #54 <Field Method mResolvedMethod> mResolvedContext = context; // 22 41:aload_0 // 23 42:aload_1 // 24 43:putfield #56 <Field Context mResolvedContext> return; // 25 46:return } // Misplaced declaration of an exception variable catch(String s) { } // 26 47:astore_2 if(context instanceof ContextWrapper) //* 27 48:aload_1 //* 28 49:instanceof #58 <Class ContextWrapper> //* 29 52:ifeq 66 context = ((ContextWrapper)context).getBaseContext(); // 30 55:aload_1 // 31 56:checkcast #58 <Class ContextWrapper> // 32 59:invokevirtual #62 <Method Context ContextWrapper.getBaseContext()> // 33 62:astore_1 else //* 34 63:goto 0 context = null; // 35 66:aconst_null // 36 67:astore_1 if(true) goto _L2; else goto _L1 // 37 68:goto 0 _L1: int i = mHostView.getId(); // 38 71:aload_0 // 39 72:getfield #25 <Field View mHostView> // 40 75:invokevirtual #66 <Method int View.getId()> // 41 78:istore_3 if(i == -1) //* 42 79:iload_3 //* 43 80:iconst_m1 //* 44 81:icmpne 141 context = ""; // 45 84:ldc1 #68 <String ""> // 46 86:astore_1 else //* 47 87:new #70 <Class IllegalStateException> //* 48 90:dup //* 49 91:new #72 <Class StringBuilder> //* 50 94:dup //* 51 95:invokespecial #73 <Method void StringBuilder()> //* 52 98:ldc1 #75 <String "Could not find method "> //* 53 100:invokevirtual #79 <Method StringBuilder StringBuilder.append(String)> //* 54 103:aload_0 //* 55 104:getfield #27 <Field String mMethodName> //* 56 107:invokevirtual #79 <Method StringBuilder StringBuilder.append(String)> //* 57 110:ldc1 #81 <String "(View) in a parent or ancestor Context for android:onClick "> //* 58 112:invokevirtual #79 <Method StringBuilder StringBuilder.append(String)> //* 59 115:ldc1 #83 <String "attribute defined on view "> //* 60 117:invokevirtual #79 <Method StringBuilder StringBuilder.append(String)> //* 61 120:aload_0 //* 62 121:getfield #25 <Field View mHostView> //* 63 124:invokevirtual #44 <Method Class Object.getClass()> //* 64 127:invokevirtual #86 <Method StringBuilder StringBuilder.append(Object)> //* 65 130:aload_1 //* 66 131:invokevirtual #79 <Method StringBuilder StringBuilder.append(String)> //* 67 134:invokevirtual #90 <Method String StringBuilder.toString()> //* 68 137:invokespecial #93 <Method void IllegalStateException(String)> //* 69 140:athrow context = ((Context) ((new StringBuilder()).append(" with id '").append(mHostView.getContext().getResources().getResourceEntryName(i)).append("'").toString())); // 70 141:new #72 <Class StringBuilder> // 71 144:dup // 72 145:invokespecial #73 <Method void StringBuilder()> // 73 148:ldc1 #95 <String " with id '"> // 74 150:invokevirtual #79 <Method StringBuilder StringBuilder.append(String)> // 75 153:aload_0 // 76 154:getfield #25 <Field View mHostView> // 77 157:invokevirtual #98 <Method Context View.getContext()> // 78 160:invokevirtual #102 <Method Resources Context.getResources()> // 79 163:iload_3 // 80 164:invokevirtual #108 <Method String Resources.getResourceEntryName(int)> // 81 167:invokevirtual #79 <Method StringBuilder StringBuilder.append(String)> // 82 170:ldc1 #110 <String "'"> // 83 172:invokevirtual #79 <Method StringBuilder StringBuilder.append(String)> // 84 175:invokevirtual #90 <Method String StringBuilder.toString()> // 85 178:astore_1 throw new IllegalStateException((new StringBuilder()).append("Could not find method ").append(mMethodName).append("(View) in a parent or ancestor Context for android:onClick ").append("attribute defined on view ").append(((Object) (((Object) (mHostView)).getClass()))).append(((String) (context))).toString()); //* 86 179:goto 87 } public void onClick(View view) { if(mResolvedMethod == null) //* 0 0:aload_0 //* 1 1:getfield #54 <Field Method mResolvedMethod> //* 2 4:ifnonnull 22 resolveMethod(mHostView.getContext(), mMethodName); // 3 7:aload_0 // 4 8:aload_0 // 5 9:getfield #25 <Field View mHostView> // 6 12:invokevirtual #98 <Method Context View.getContext()> // 7 15:aload_0 // 8 16:getfield #27 <Field String mMethodName> // 9 19:invokespecial #119 <Method void resolveMethod(Context, String)> try { mResolvedMethod.invoke(((Object) (mResolvedContext)), new Object[] { view }); // 10 22:aload_0 // 11 23:getfield #54 <Field Method mResolvedMethod> // 12 26:aload_0 // 13 27:getfield #56 <Field Context mResolvedContext> // 14 30:iconst_1 // 15 31:anewarray Object[] // 16 34:dup // 17 35:iconst_0 // 18 36:aload_1 // 19 37:aastore // 20 38:invokevirtual #125 <Method Object Method.invoke(Object, Object[])> // 21 41:pop return; // 22 42:return } // Misplaced declaration of an exception variable catch(View view) //* 23 43:astore_1 { throw new IllegalStateException("Could not execute non-public method for android:onClick", ((Throwable) (view))); // 24 44:new #70 <Class IllegalStateException> // 25 47:dup // 26 48:ldc1 #127 <String "Could not execute non-public method for android:onClick"> // 27 50:aload_1 // 28 51:invokespecial #130 <Method void IllegalStateException(String, Throwable)> // 29 54:athrow } // Misplaced declaration of an exception variable catch(View view) //* 30 55:astore_1 { throw new IllegalStateException("Could not execute method for android:onClick", ((Throwable) (view))); // 31 56:new #70 <Class IllegalStateException> // 32 59:dup // 33 60:ldc1 #132 <String "Could not execute method for android:onClick"> // 34 62:aload_1 // 35 63:invokespecial #130 <Method void IllegalStateException(String, Throwable)> // 36 66:athrow } } private final View mHostView; private final String mMethodName; private Context mResolvedContext; private Method mResolvedMethod; public DeclaredOnClickListener(View view, String s) { // 0 0:aload_0 // 1 1:invokespecial #23 <Method void Object()> mHostView = view; // 2 4:aload_0 // 3 5:aload_1 // 4 6:putfield #25 <Field View mHostView> mMethodName = s; // 5 9:aload_0 // 6 10:aload_2 // 7 11:putfield #27 <Field String mMethodName> // 8 14:return } } AppCompatViewInflater() { // 0 0:aload_0 // 1 1:invokespecial #55 <Method void Object()> // 2 4:aload_0 // 3 5:iconst_2 // 4 6:anewarray Object[] // 5 9:putfield #57 <Field Object[] mConstructorArgs> // 6 12:return } private void checkOnClickListener(View view, AttributeSet attributeset) { Object obj = ((Object) (view.getContext())); // 0 0:aload_1 // 1 1:invokevirtual #65 <Method Context View.getContext()> // 2 4:astore_3 if(!(obj instanceof ContextWrapper) || android.os.Build.VERSION.SDK_INT >= 15 && !ViewCompat.hasOnClickListeners(view)) //* 3 5:aload_3 //* 4 6:instanceof #67 <Class ContextWrapper> //* 5 9:ifeq 27 //* 6 12:getstatic #73 <Field int android.os.Build$VERSION.SDK_INT> //* 7 15:bipush 15 //* 8 17:icmplt 28 //* 9 20:aload_1 //* 10 21:invokestatic #79 <Method boolean ViewCompat.hasOnClickListeners(View)> //* 11 24:ifne 28 return; // 12 27:return attributeset = ((AttributeSet) (((Context) (obj)).obtainStyledAttributes(attributeset, sOnClickAttrs))); // 13 28:aload_3 // 14 29:aload_2 // 15 30:getstatic #36 <Field int[] sOnClickAttrs> // 16 33:invokevirtual #83 <Method TypedArray Context.obtainStyledAttributes(AttributeSet, int[])> // 17 36:astore_2 obj = ((Object) (((TypedArray) (attributeset)).getString(0))); // 18 37:aload_2 // 19 38:iconst_0 // 20 39:invokevirtual #89 <Method String TypedArray.getString(int)> // 21 42:astore_3 if(obj != null) //* 22 43:aload_3 //* 23 44:ifnull 60 view.setOnClickListener(((android.view.View.OnClickListener) (new DeclaredOnClickListener(view, ((String) (obj)))))); // 24 47:aload_1 // 25 48:new #6 <Class AppCompatViewInflater$DeclaredOnClickListener> // 26 51:dup // 27 52:aload_1 // 28 53:aload_3 // 29 54:invokespecial #92 <Method void AppCompatViewInflater$DeclaredOnClickListener(View, String)> // 30 57:invokevirtual #96 <Method void View.setOnClickListener(android.view.View$OnClickListener)> ((TypedArray) (attributeset)).recycle(); // 31 60:aload_2 // 32 61:invokevirtual #99 <Method void TypedArray.recycle()> // 33 64:return } private View createView(Context context, String s, String s1) throws ClassNotFoundException, InflateException { Object obj; Constructor constructor; constructor = (Constructor)sConstructorMap.get(((Object) (s))); // 0 0:getstatic #53 <Field Map sConstructorMap> // 1 3:aload_2 // 2 4:invokeinterface #113 <Method Object Map.get(Object)> // 3 9:checkcast #115 <Class Constructor> // 4 12:astore 5 obj = ((Object) (constructor)); // 5 14:aload 5 // 6 16:astore 4 if(constructor != null) goto _L2; else goto _L1 // 7 18:aload 5 // 8 20:ifnonnull 83 _L1: try { obj = ((Object) (context.getClassLoader())); // 9 23:aload_1 // 10 24:invokevirtual #119 <Method ClassLoader Context.getClassLoader()> // 11 27:astore 4 } //* 12 29:aload_3 //* 13 30:ifnull 104 //* 14 33:new #121 <Class StringBuilder> //* 15 36:dup //* 16 37:invokespecial #122 <Method void StringBuilder()> //* 17 40:aload_3 //* 18 41:invokevirtual #126 <Method StringBuilder StringBuilder.append(String)> //* 19 44:aload_2 //* 20 45:invokevirtual #126 <Method StringBuilder StringBuilder.append(String)> //* 21 48:invokevirtual #130 <Method String StringBuilder.toString()> //* 22 51:astore_1 //* 23 52:aload 4 //* 24 54:aload_1 //* 25 55:invokevirtual #136 <Method Class ClassLoader.loadClass(String)> //* 26 58:ldc1 #61 <Class View> //* 27 60:invokevirtual #140 <Method Class Class.asSubclass(Class)> //* 28 63:getstatic #33 <Field Class[] sConstructorSignature> //* 29 66:invokevirtual #144 <Method Constructor Class.getConstructor(Class[])> //* 30 69:astore 4 //* 31 71:getstatic #53 <Field Map sConstructorMap> //* 32 74:aload_2 //* 33 75:aload 4 //* 34 77:invokeinterface #148 <Method Object Map.put(Object, Object)> //* 35 82:pop //* 36 83:aload 4 //* 37 85:iconst_1 //* 38 86:invokevirtual #152 <Method void Constructor.setAccessible(boolean)> //* 39 89:aload 4 //* 40 91:aload_0 //* 41 92:getfield #57 <Field Object[] mConstructorArgs> //* 42 95:invokevirtual #156 <Method Object Constructor.newInstance(Object[])> //* 43 98:checkcast #61 <Class View> //* 44 101:astore_1 //* 45 102:aload_1 //* 46 103:areturn //* 47 104:aload_2 //* 48 105:astore_1 //* 49 106:goto 52 // Misplaced declaration of an exception variable catch(Context context) //* 50 109:astore_1 { return null; // 51 110:aconst_null // 52 111:areturn } if(s1 == null) break MISSING_BLOCK_LABEL_104; context = ((Context) ((new StringBuilder()).append(s1).append(s).toString())); _L3: obj = ((Object) (((ClassLoader) (obj)).loadClass(((String) (context))).asSubclass(android/view/View).getConstructor(sConstructorSignature))); sConstructorMap.put(((Object) (s)), obj); _L2: ((Constructor) (obj)).setAccessible(true); context = ((Context) ((View)((Constructor) (obj)).newInstance(mConstructorArgs))); return ((View) (context)); context = ((Context) (s)); goto _L3 } private View createViewFromTag(Context context, String s, AttributeSet attributeset) { String s1; s1 = s; // 0 0:aload_2 // 1 1:astore 5 if(s.equals("view")) //* 2 3:aload_2 //* 3 4:ldc1 #161 <String "view"> //* 4 6:invokevirtual #165 <Method boolean String.equals(Object)> //* 5 9:ifeq 23 s1 = attributeset.getAttributeValue(((String) (null)), "class"); // 6 12:aload_3 // 7 13:aconst_null // 8 14:ldc1 #167 <String "class"> // 9 16:invokeinterface #171 <Method String AttributeSet.getAttributeValue(String, String)> // 10 21:astore 5 mConstructorArgs[0] = ((Object) (context)); // 11 23:aload_0 // 12 24:getfield #57 <Field Object[] mConstructorArgs> // 13 27:iconst_0 // 14 28:aload_1 // 15 29:aastore mConstructorArgs[1] = ((Object) (attributeset)); // 16 30:aload_0 // 17 31:getfield #57 <Field Object[] mConstructorArgs> // 18 34:iconst_1 // 19 35:aload_3 // 20 36:aastore if(-1 != s1.indexOf('.')) break MISSING_BLOCK_LABEL_119; // 21 37:iconst_m1 // 22 38:aload 5 // 23 40:bipush 46 // 24 42:invokevirtual #175 <Method int String.indexOf(int)> // 25 45:icmpne 119 int i = 0; // 26 48:iconst_0 // 27 49:istore 4 do { try { if(i >= sClassPrefixList.length) break; // 28 51:iload 4 // 29 53:getstatic #46 <Field String[] sClassPrefixList> // 30 56:arraylength // 31 57:icmpge 103 s = ((String) (createView(context, s1, sClassPrefixList[i]))); // 32 60:aload_0 // 33 61:aload_1 // 34 62:aload 5 // 35 64:getstatic #46 <Field String[] sClassPrefixList> // 36 67:iload 4 // 37 69:aaload // 38 70:invokespecial #177 <Method View createView(Context, String, String)> // 39 73:astore_2 } //* 40 74:aload_2 //* 41 75:ifnull 94 //* 42 78:aload_0 //* 43 79:getfield #57 <Field Object[] mConstructorArgs> //* 44 82:iconst_0 //* 45 83:aconst_null //* 46 84:aastore //* 47 85:aload_0 //* 48 86:getfield #57 <Field Object[] mConstructorArgs> //* 49 89:iconst_1 //* 50 90:aconst_null //* 51 91:aastore //* 52 92:aload_2 //* 53 93:areturn //* 54 94:iload 4 //* 55 96:iconst_1 //* 56 97:iadd //* 57 98:istore 4 //* 58 100:goto 51 //* 59 103:aload_0 //* 60 104:getfield #57 <Field Object[] mConstructorArgs> //* 61 107:iconst_0 //* 62 108:aconst_null //* 63 109:aastore //* 64 110:aload_0 //* 65 111:getfield #57 <Field Object[] mConstructorArgs> //* 66 114:iconst_1 //* 67 115:aconst_null //* 68 116:aastore //* 69 117:aconst_null //* 70 118:areturn //* 71 119:aload_0 //* 72 120:aload_1 //* 73 121:aload 5 //* 74 123:aconst_null //* 75 124:invokespecial #177 <Method View createView(Context, String, String)> //* 76 127:astore_1 //* 77 128:aload_0 //* 78 129:getfield #57 <Field Object[] mConstructorArgs> //* 79 132:iconst_0 //* 80 133:aconst_null //* 81 134:aastore //* 82 135:aload_0 //* 83 136:getfield #57 <Field Object[] mConstructorArgs> //* 84 139:iconst_1 //* 85 140:aconst_null //* 86 141:aastore //* 87 142:aload_1 //* 88 143:areturn // Misplaced declaration of an exception variable catch(Context context) //* 89 144:astore_1 { mConstructorArgs[0] = null; // 90 145:aload_0 // 91 146:getfield #57 <Field Object[] mConstructorArgs> // 92 149:iconst_0 // 93 150:aconst_null // 94 151:aastore mConstructorArgs[1] = null; // 95 152:aload_0 // 96 153:getfield #57 <Field Object[] mConstructorArgs> // 97 156:iconst_1 // 98 157:aconst_null // 99 158:aastore return null; // 100 159:aconst_null // 101 160:areturn } if(s != null) { mConstructorArgs[0] = null; mConstructorArgs[1] = null; return ((View) (s)); } i++; } while(true); mConstructorArgs[0] = null; mConstructorArgs[1] = null; return null; context = ((Context) (createView(context, s1, ((String) (null))))); mConstructorArgs[0] = null; mConstructorArgs[1] = null; return ((View) (context)); context; // 102 161:astore_1 mConstructorArgs[0] = null; // 103 162:aload_0 // 104 163:getfield #57 <Field Object[] mConstructorArgs> // 105 166:iconst_0 // 106 167:aconst_null // 107 168:aastore mConstructorArgs[1] = null; // 108 169:aload_0 // 109 170:getfield #57 <Field Object[] mConstructorArgs> // 110 173:iconst_1 // 111 174:aconst_null // 112 175:aastore throw context; // 113 176:aload_1 // 114 177:athrow } private static Context themifyContext(Context context, AttributeSet attributeset, boolean flag, boolean flag1) { label0: { attributeset = ((AttributeSet) (context.obtainStyledAttributes(attributeset, android.support.v7.appcompat.R.styleable.View, 0, 0))); // 0 0:aload_0 // 1 1:aload_1 // 2 2:getstatic #184 <Field int[] android.support.v7.appcompat.R$styleable.View> // 3 5:iconst_0 // 4 6:iconst_0 // 5 7:invokevirtual #187 <Method TypedArray Context.obtainStyledAttributes(AttributeSet, int[], int, int)> // 6 10:astore_1 int i = 0; // 7 11:iconst_0 // 8 12:istore 4 if(flag) //* 9 14:iload_2 //* 10 15:ifeq 28 i = ((TypedArray) (attributeset)).getResourceId(android.support.v7.appcompat.R.styleable.View_android_theme, 0); // 11 18:aload_1 // 12 19:getstatic #190 <Field int android.support.v7.appcompat.R$styleable.View_android_theme> // 13 22:iconst_0 // 14 23:invokevirtual #194 <Method int TypedArray.getResourceId(int, int)> // 15 26:istore 4 int k = i; // 16 28:iload 4 // 17 30:istore 5 if(flag1) //* 18 32:iload_3 //* 19 33:ifeq 76 { k = i; // 20 36:iload 4 // 21 38:istore 5 if(i == 0) //* 22 40:iload 4 //* 23 42:ifne 76 { int j = ((TypedArray) (attributeset)).getResourceId(android.support.v7.appcompat.R.styleable.View_theme, 0); // 24 45:aload_1 // 25 46:getstatic #197 <Field int android.support.v7.appcompat.R$styleable.View_theme> // 26 49:iconst_0 // 27 50:invokevirtual #194 <Method int TypedArray.getResourceId(int, int)> // 28 53:istore 4 k = j; // 29 55:iload 4 // 30 57:istore 5 if(j != 0) //* 31 59:iload 4 //* 32 61:ifeq 76 { Log.i("AppCompatViewInflater", "app:theme is now deprecated. Please move to using android:theme instead."); // 33 64:ldc1 #11 <String "AppCompatViewInflater"> // 34 66:ldc1 #199 <String "app:theme is now deprecated. Please move to using android:theme instead."> // 35 68:invokestatic #205 <Method int Log.i(String, String)> // 36 71:pop k = j; // 37 72:iload 4 // 38 74:istore 5 } } } ((TypedArray) (attributeset)).recycle(); // 39 76:aload_1 // 40 77:invokevirtual #99 <Method void TypedArray.recycle()> attributeset = ((AttributeSet) (context)); // 41 80:aload_0 // 42 81:astore_1 if(k == 0) break label0; // 43 82:iload 5 // 44 84:ifeq 119 if(context instanceof ContextThemeWrapper) //* 45 87:aload_0 //* 46 88:instanceof #207 <Class ContextThemeWrapper> //* 47 91:ifeq 108 { attributeset = ((AttributeSet) (context)); // 48 94:aload_0 // 49 95:astore_1 if(((ContextThemeWrapper)context).getThemeResId() == k) break label0; // 50 96:aload_0 // 51 97:checkcast #207 <Class ContextThemeWrapper> // 52 100:invokevirtual #211 <Method int ContextThemeWrapper.getThemeResId()> // 53 103:iload 5 // 54 105:icmpeq 119 } attributeset = ((AttributeSet) (new ContextThemeWrapper(context, k))); // 55 108:new #207 <Class ContextThemeWrapper> // 56 111:dup // 57 112:aload_0 // 58 113:iload 5 // 59 115:invokespecial #214 <Method void ContextThemeWrapper(Context, int)> // 60 118:astore_1 } return ((Context) (attributeset)); // 61 119:aload_1 // 62 120:areturn } public final View createView(View view, String s, Context context, AttributeSet attributeset, boolean flag, boolean flag1, boolean flag2, boolean flag3) { byte byte0; Object obj; label0: { Context context1 = context; // 0 0:aload_3 // 1 1:astore 10 if(flag) //* 2 3:iload 5 //* 3 5:ifeq 21 { context1 = context; // 4 8:aload_3 // 5 9:astore 10 if(view != null) //* 6 11:aload_1 //* 7 12:ifnull 21 context1 = view.getContext(); // 8 15:aload_1 // 9 16:invokevirtual #65 <Method Context View.getContext()> // 10 19:astore 10 } if(!flag1) //* 11 21:iload 6 //* 12 23:ifne 34 { view = ((View) (context1)); // 13 26:aload 10 // 14 28:astore_1 if(!flag2) break label0; // 15 29:iload 7 // 16 31:ifeq 46 } view = ((View) (themifyContext(context1, attributeset, flag1, flag2))); // 17 34:aload 10 // 18 36:aload 4 // 19 38:iload 6 // 20 40:iload 7 // 21 42:invokestatic #218 <Method Context themifyContext(Context, AttributeSet, boolean, boolean)> // 22 45:astore_1 } obj = ((Object) (view)); // 23 46:aload_1 // 24 47:astore 10 if(flag3) //* 25 49:iload 8 //* 26 51:ifeq 60 obj = ((Object) (TintContextWrapper.wrap(((Context) (view))))); // 27 54:aload_1 // 28 55:invokestatic #224 <Method Context TintContextWrapper.wrap(Context)> // 29 58:astore 10 view = null; // 30 60:aconst_null // 31 61:astore_1 byte0 = -1; // 32 62:iconst_m1 // 33 63:istore 9 s.hashCode(); // 34 65:aload_2 // 35 66:invokevirtual #227 <Method int String.hashCode()> JVM INSTR lookupswitch 13: default 184 // -1946472170: 465 // -1455429095: 417 // -1346021293: 449 // -938935918: 295 // -937446323: 370 // -658531749: 481 // -339785223: 355 // 776382189: 401 // 1125864064: 310 // 1413872058: 433 // 1601505219: 385 // 1666676343: 340 // 2001146706: 325; // 36 69:lookupswitch 13: default 184 // -1946472170: 465 // -1455429095: 417 // -1346021293: 449 // -938935918: 295 // -937446323: 370 // -658531749: 481 // -339785223: 355 // 776382189: 401 // 1125864064: 310 // 1413872058: 433 // 1601505219: 385 // 1666676343: 340 // 2001146706: 325 goto _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9 _L10 _L11 _L12 _L13 _L14 _L1: byte0; // 37 184:iload 9 JVM INSTR tableswitch 0 12: default 252 // 0 498 // 1 513 // 2 528 // 3 543 // 4 558 // 5 573 // 6 588 // 7 603 // 8 618 // 9 633 // 10 648 // 11 663 // 12 678; // 38 186:tableswitch 0 12: default 252 // 0 498 // 1 513 // 2 528 // 3 543 // 4 558 // 5 573 // 6 588 // 7 603 // 8 618 // 9 633 // 10 648 // 11 663 // 12 678 goto _L15 _L16 _L17 _L18 _L19 _L20 _L21 _L22 _L23 _L24 _L25 _L26 _L27 _L28 _L15: View view1 = view; // 39 252:aload_1 // 40 253:astore 11 if(view == null) //* 41 255:aload_1 //* 42 256:ifnonnull 279 { view1 = view; // 43 259:aload_1 // 44 260:astore 11 if(context != obj) //* 45 262:aload_3 //* 46 263:aload 10 //* 47 265:if_acmpeq 279 view1 = createViewFromTag(((Context) (obj)), s, attributeset); // 48 268:aload_0 // 49 269:aload 10 // 50 271:aload_2 // 51 272:aload 4 // 52 274:invokespecial #229 <Method View createViewFromTag(Context, String, AttributeSet)> // 53 277:astore 11 } if(view1 != null) //* 54 279:aload 11 //* 55 281:ifnull 292 checkOnClickListener(view1, attributeset); // 56 284:aload_0 // 57 285:aload 11 // 58 287:aload 4 // 59 289:invokespecial #231 <Method void checkOnClickListener(View, AttributeSet)> return view1; // 60 292:aload 11 // 61 294:areturn _L5: if(s.equals("TextView")) //* 62 295:aload_2 //* 63 296:ldc1 #233 <String "TextView"> //* 64 298:invokevirtual #165 <Method boolean String.equals(Object)> //* 65 301:ifeq 184 byte0 = 0; // 66 304:iconst_0 // 67 305:istore 9 goto _L1 //* 68 307:goto 184 _L10: if(s.equals("ImageView")) //* 69 310:aload_2 //* 70 311:ldc1 #235 <String "ImageView"> //* 71 313:invokevirtual #165 <Method boolean String.equals(Object)> //* 72 316:ifeq 184 byte0 = 1; // 73 319:iconst_1 // 74 320:istore 9 goto _L1 //* 75 322:goto 184 _L14: if(s.equals("Button")) //* 76 325:aload_2 //* 77 326:ldc1 #237 <String "Button"> //* 78 328:invokevirtual #165 <Method boolean String.equals(Object)> //* 79 331:ifeq 184 byte0 = 2; // 80 334:iconst_2 // 81 335:istore 9 goto _L1 //* 82 337:goto 184 _L13: if(s.equals("EditText")) //* 83 340:aload_2 //* 84 341:ldc1 #239 <String "EditText"> //* 85 343:invokevirtual #165 <Method boolean String.equals(Object)> //* 86 346:ifeq 184 byte0 = 3; // 87 349:iconst_3 // 88 350:istore 9 goto _L1 //* 89 352:goto 184 _L8: if(s.equals("Spinner")) //* 90 355:aload_2 //* 91 356:ldc1 #241 <String "Spinner"> //* 92 358:invokevirtual #165 <Method boolean String.equals(Object)> //* 93 361:ifeq 184 byte0 = 4; // 94 364:iconst_4 // 95 365:istore 9 goto _L1 //* 96 367:goto 184 _L6: if(s.equals("ImageButton")) //* 97 370:aload_2 //* 98 371:ldc1 #243 <String "ImageButton"> //* 99 373:invokevirtual #165 <Method boolean String.equals(Object)> //* 100 376:ifeq 184 byte0 = 5; // 101 379:iconst_5 // 102 380:istore 9 goto _L1 //* 103 382:goto 184 _L12: if(s.equals("CheckBox")) //* 104 385:aload_2 //* 105 386:ldc1 #245 <String "CheckBox"> //* 106 388:invokevirtual #165 <Method boolean String.equals(Object)> //* 107 391:ifeq 184 byte0 = 6; // 108 394:bipush 6 // 109 396:istore 9 goto _L1 //* 110 398:goto 184 _L9: if(s.equals("RadioButton")) //* 111 401:aload_2 //* 112 402:ldc1 #247 <String "RadioButton"> //* 113 404:invokevirtual #165 <Method boolean String.equals(Object)> //* 114 407:ifeq 184 byte0 = 7; // 115 410:bipush 7 // 116 412:istore 9 goto _L1 //* 117 414:goto 184 _L3: if(s.equals("CheckedTextView")) //* 118 417:aload_2 //* 119 418:ldc1 #249 <String "CheckedTextView"> //* 120 420:invokevirtual #165 <Method boolean String.equals(Object)> //* 121 423:ifeq 184 byte0 = 8; // 122 426:bipush 8 // 123 428:istore 9 goto _L1 //* 124 430:goto 184 _L11: if(s.equals("AutoCompleteTextView")) //* 125 433:aload_2 //* 126 434:ldc1 #251 <String "AutoCompleteTextView"> //* 127 436:invokevirtual #165 <Method boolean String.equals(Object)> //* 128 439:ifeq 184 byte0 = 9; // 129 442:bipush 9 // 130 444:istore 9 goto _L1 //* 131 446:goto 184 _L4: if(s.equals("MultiAutoCompleteTextView")) //* 132 449:aload_2 //* 133 450:ldc1 #253 <String "MultiAutoCompleteTextView"> //* 134 452:invokevirtual #165 <Method boolean String.equals(Object)> //* 135 455:ifeq 184 byte0 = 10; // 136 458:bipush 10 // 137 460:istore 9 goto _L1 //* 138 462:goto 184 _L2: if(s.equals("RatingBar")) //* 139 465:aload_2 //* 140 466:ldc1 #255 <String "RatingBar"> //* 141 468:invokevirtual #165 <Method boolean String.equals(Object)> //* 142 471:ifeq 184 byte0 = 11; // 143 474:bipush 11 // 144 476:istore 9 goto _L1 //* 145 478:goto 184 _L7: if(s.equals("SeekBar")) //* 146 481:aload_2 //* 147 482:ldc2 #257 <String "SeekBar"> //* 148 485:invokevirtual #165 <Method boolean String.equals(Object)> //* 149 488:ifeq 184 byte0 = 12; // 150 491:bipush 12 // 151 493:istore 9 goto _L1 //* 152 495:goto 184 _L16: view = ((View) (new AppCompatTextView(((Context) (obj)), attributeset))); // 153 498:new #259 <Class AppCompatTextView> // 154 501:dup // 155 502:aload 10 // 156 504:aload 4 // 157 506:invokespecial #262 <Method void AppCompatTextView(Context, AttributeSet)> // 158 509:astore_1 goto _L15 //* 159 510:goto 252 _L17: view = ((View) (new AppCompatImageView(((Context) (obj)), attributeset))); // 160 513:new #264 <Class AppCompatImageView> // 161 516:dup // 162 517:aload 10 // 163 519:aload 4 // 164 521:invokespecial #265 <Method void AppCompatImageView(Context, AttributeSet)> // 165 524:astore_1 goto _L15 //* 166 525:goto 252 _L18: view = ((View) (new AppCompatButton(((Context) (obj)), attributeset))); // 167 528:new #267 <Class AppCompatButton> // 168 531:dup // 169 532:aload 10 // 170 534:aload 4 // 171 536:invokespecial #268 <Method void AppCompatButton(Context, AttributeSet)> // 172 539:astore_1 goto _L15 //* 173 540:goto 252 _L19: view = ((View) (new AppCompatEditText(((Context) (obj)), attributeset))); // 174 543:new #270 <Class AppCompatEditText> // 175 546:dup // 176 547:aload 10 // 177 549:aload 4 // 178 551:invokespecial #271 <Method void AppCompatEditText(Context, AttributeSet)> // 179 554:astore_1 goto _L15 //* 180 555:goto 252 _L20: view = ((View) (new AppCompatSpinner(((Context) (obj)), attributeset))); // 181 558:new #273 <Class AppCompatSpinner> // 182 561:dup // 183 562:aload 10 // 184 564:aload 4 // 185 566:invokespecial #274 <Method void AppCompatSpinner(Context, AttributeSet)> // 186 569:astore_1 goto _L15 //* 187 570:goto 252 _L21: view = ((View) (new AppCompatImageButton(((Context) (obj)), attributeset))); // 188 573:new #276 <Class AppCompatImageButton> // 189 576:dup // 190 577:aload 10 // 191 579:aload 4 // 192 581:invokespecial #277 <Method void AppCompatImageButton(Context, AttributeSet)> // 193 584:astore_1 goto _L15 //* 194 585:goto 252 _L22: view = ((View) (new AppCompatCheckBox(((Context) (obj)), attributeset))); // 195 588:new #279 <Class AppCompatCheckBox> // 196 591:dup // 197 592:aload 10 // 198 594:aload 4 // 199 596:invokespecial #280 <Method void AppCompatCheckBox(Context, AttributeSet)> // 200 599:astore_1 goto _L15 //* 201 600:goto 252 _L23: view = ((View) (new AppCompatRadioButton(((Context) (obj)), attributeset))); // 202 603:new #282 <Class AppCompatRadioButton> // 203 606:dup // 204 607:aload 10 // 205 609:aload 4 // 206 611:invokespecial #283 <Method void AppCompatRadioButton(Context, AttributeSet)> // 207 614:astore_1 goto _L15 //* 208 615:goto 252 _L24: view = ((View) (new AppCompatCheckedTextView(((Context) (obj)), attributeset))); // 209 618:new #285 <Class AppCompatCheckedTextView> // 210 621:dup // 211 622:aload 10 // 212 624:aload 4 // 213 626:invokespecial #286 <Method void AppCompatCheckedTextView(Context, AttributeSet)> // 214 629:astore_1 goto _L15 //* 215 630:goto 252 _L25: view = ((View) (new AppCompatAutoCompleteTextView(((Context) (obj)), attributeset))); // 216 633:new #288 <Class AppCompatAutoCompleteTextView> // 217 636:dup // 218 637:aload 10 // 219 639:aload 4 // 220 641:invokespecial #289 <Method void AppCompatAutoCompleteTextView(Context, AttributeSet)> // 221 644:astore_1 goto _L15 //* 222 645:goto 252 _L26: view = ((View) (new AppCompatMultiAutoCompleteTextView(((Context) (obj)), attributeset))); // 223 648:new #291 <Class AppCompatMultiAutoCompleteTextView> // 224 651:dup // 225 652:aload 10 // 226 654:aload 4 // 227 656:invokespecial #292 <Method void AppCompatMultiAutoCompleteTextView(Context, AttributeSet)> // 228 659:astore_1 goto _L15 //* 229 660:goto 252 _L27: view = ((View) (new AppCompatRatingBar(((Context) (obj)), attributeset))); // 230 663:new #294 <Class AppCompatRatingBar> // 231 666:dup // 232 667:aload 10 // 233 669:aload 4 // 234 671:invokespecial #295 <Method void AppCompatRatingBar(Context, AttributeSet)> // 235 674:astore_1 goto _L15 //* 236 675:goto 252 _L28: view = ((View) (new AppCompatSeekBar(((Context) (obj)), attributeset))); // 237 678:new #297 <Class AppCompatSeekBar> // 238 681:dup // 239 682:aload 10 // 240 684:aload 4 // 241 686:invokespecial #298 <Method void AppCompatSeekBar(Context, AttributeSet)> // 242 689:astore_1 goto _L15 //* 243 690:goto 252 } private static final String LOG_TAG = "AppCompatViewInflater"; private static final String sClassPrefixList[] = { "android.widget.", "android.view.", "android.webkit." }; private static final Map sConstructorMap = new ArrayMap(); private static final Class sConstructorSignature[] = { android/content/Context, android/util/AttributeSet }; private static final int sOnClickAttrs[] = { 0x101026f }; private final Object mConstructorArgs[] = new Object[2]; static { // 0 0:iconst_2 // 1 1:anewarray Class[] // 2 4:dup // 3 5:iconst_0 // 4 6:ldc1 #29 <Class Context> // 5 8:aastore // 6 9:dup // 7 10:iconst_1 // 8 11:ldc1 #31 <Class AttributeSet> // 9 13:aastore // 10 14:putstatic #33 <Field Class[] sConstructorSignature> // 11 17:iconst_1 // 12 18:newarray int[] // 13 20:dup // 14 21:iconst_0 // 15 22:ldc1 #34 <Int 0x101026f> // 16 24:iastore // 17 25:putstatic #36 <Field int[] sOnClickAttrs> // 18 28:iconst_3 // 19 29:anewarray String[] // 20 32:dup // 21 33:iconst_0 // 22 34:ldc1 #40 <String "android.widget."> // 23 36:aastore // 24 37:dup // 25 38:iconst_1 // 26 39:ldc1 #42 <String "android.view."> // 27 41:aastore // 28 42:dup // 29 43:iconst_2 // 30 44:ldc1 #44 <String "android.webkit."> // 31 46:aastore // 32 47:putstatic #46 <Field String[] sClassPrefixList> // 33 50:new #48 <Class ArrayMap> // 34 53:dup // 35 54:invokespecial #51 <Method void ArrayMap()> // 36 57:putstatic #53 <Field Map sConstructorMap> //* 37 60:return } }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
386947603d9b3436c3053e4bec8f6ef299c49f18
3e5540f4b031a7b5f5ff48600548e7ad72bbea98
/src/test/java/tests/FourthTest.java
f4b551af7e64b3490c14933405baadd679ceecbe
[]
no_license
stanislav3316/odnoklassniki-technopolis-tests
66260f92f961994401364c38b07951774630058b
77c37817d730d9755b0167a8c56cbbf8ced1fa2d
refs/heads/master
2021-08-23T22:43:35.030306
2017-12-06T23:11:31
2017-12-06T23:11:31
112,091,695
0
0
null
2017-11-26T14:58:46
2017-11-26T14:58:45
null
UTF-8
Java
false
false
934
java
package tests; import core.TestBase; import core.page.LoginMainPage; import core.page.UserMainPage; import model.TestBot; import org.junit.Assert; import org.junit.Test; /** * Тест кликает на "Создать новую тему" на личной странице и * ничего не вводит в текстовое поле. * Проверяет, что кнопку "Поделиться нельзя нажать" */ public class FourthTest extends TestBase { private final String botLogin = "technopolisBot2"; private final String botPassword = "technopolis16"; @Test public void deletePostTest() throws InterruptedException { new LoginMainPage(driver).doLogin( new TestBot(botLogin, botPassword)); UserMainPage mainPage = new UserMainPage(driver); mainPage.openPostAlert(); Assert.assertEquals(true, mainPage.tryClickToButton()); } }
[ "stasik-0@yandex.ru" ]
stasik-0@yandex.ru
6df428939caba0b16f5690395b2d2e84a77bf077
8a98577c5995449677ede2cbe1cc408c324efacc
/Big_Clone_Bench_files_used/bcb_reduced/3/selected/2518012.java
a4b30d498aa1c3aefdefc5ec50715c2d8627579d
[ "MIT" ]
permissive
pombredanne/lsh-for-source-code
9363cc0c9a8ddf16550ae4764859fa60186351dd
fac9adfbd98a4d73122a8fc1a0e0cc4f45e9dcd4
refs/heads/master
2020-08-05T02:28:55.370949
2017-10-18T23:57:08
2017-10-18T23:57:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
49,168
java
package issrg.acm; import javax.swing.*; import javax.swing.event.ChangeListener; import javax.swing.event.ChangeEvent; import javax.swing.border.*; import java.awt.event.*; import java.awt.*; import java.io.*; import java.util.Map; import java.util.Hashtable; import java.util.Date; import java.math.BigInteger; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import org.w3c.dom.*; import issrg.ac.AttributeCertificate; import issrg.acm.extensions.LDAPSavingUtility; import issrg.security.DefaultSecurity; import issrg.utils.EnvironmentalVariables; import issrg.utils.gui.repository.WebDAV_DIT; import issrg.utils.gui.xml.XMLChangeEvent; import issrg.utils.gui.xml.XMLChangeListener; import issrg.utils.gui.xml.XMLChangeEvent; import issrg.utils.webdav.HTTPMessageException; import issrg.utils.webdav.WebDAVSocket; import issrg.utils.webdav.WebDAVSocketHTTP; import issrg.utils.webdav.WebDAVSocketHTTPS; public class ConfigurationDialog extends JDialog implements XMLChangeListener { JTextField jHolderName; JTextField jValidityPeriod; JTextField jACType; JTextField jProviderURL; JTextField jProviderLogin; JPasswordField jProviderPassword; JTextField jDefaultProfile; JTextField jWebDAVHost; JTextField jWebDAVPort; JTextField jWebDAVSSL; JTextField jWebDAVRev; JTextField jWebDAVRevLoc; JTextField jWebDavRevCert; JCheckBox jWebDAVHttps; JButton jWebDAVSelectP12; JTextField jWebDAVP12Filename; JPasswordField jWebDAVP12Password; JCheckBox jCHEntrust; JButton jBProfile, jBHelper; JCheckBox jDIS; JTextField jDISAddress; JButton accept, cancel; JButton connect; JButton connectWebDAV; JButton addWebDAVSSL; JFrame jf; Map utils; Map vars; String file = "acm.cfg"; String serialNumber = ""; String RevLocation = ""; String CertLocation = ""; JRadioButton[] jaaia = new JRadioButton[2]; JRadioButton[] jnorev = new JRadioButton[2]; JRadioButton[] jdavrev = new JRadioButton[2]; ButtonGroup group = new ButtonGroup(); ButtonGroup group2 = new ButtonGroup(); ButtonGroup group3 = new ButtonGroup(); static String HOLDER_UTILITY = ""; static String VALIDITY_UTILITY = ""; static String WEBDAV_HOLDER_UTILITY = ""; static String WEBDAV_REVOCATION_LOCATION = ""; static String WEBDAV_CERTIFICATE_LOCATION = ""; String webdavssl = ""; private static boolean check = true; private static boolean davCloseCheck = false; public ConfigurationDialog(JFrame jf) { super(jf, "Preferences"); this.jf = jf; Manager.acmConfigComponent.addXMLChangeListener(this); this.setResizable(false); JPanel pVariables, pUtilities, pLabels, pTexts; JPanel pSigning; JPanel pButt; JPanel pExtensions; JTabbedPane pData; pData = new JTabbedPane(); pVariables = new JPanel(); pVariables.setBorder(new TitledBorder("Attribute certificate default contents")); GridLayout gl = new GridLayout(4, 1); pLabels = new JPanel(); pLabels.setLayout(gl); pTexts = new JPanel(); pTexts.setLayout(gl); pLabels.add(new JLabel("Holder name")); pTexts.add(jHolderName = new JTextField("32")); pLabels.add(new JLabel("Validity period")); pTexts.add(jValidityPeriod = new JTextField(32)); pLabels.add(new JLabel("")); pTexts.add(jBHelper = new JButton("Choose dates...")); jBHelper.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { Hashtable ht = new Hashtable(); ht.put(EnvironmentalVariables.VALIDITY_PERIOD_STRING, jValidityPeriod.getText()); ValidityEditor ve = new ValidityEditor(); try { ve.edit(null, null, ht); if (ht.containsKey(EnvironmentalVariables.VALIDITY_PERIOD_STRING)) { jValidityPeriod.setText((String) ht.get(EnvironmentalVariables.VALIDITY_PERIOD_STRING)); } } catch (Exception e) { e.printStackTrace(); } } }); pVariables.add(pLabels); pVariables.add(pTexts); pData.add("Variables", pVariables); pExtensions = new JPanel(); pExtensions.setLayout(new BorderLayout()); pExtensions.setBorder(new TitledBorder("Attribute Certificate Extensions")); JPanel extRight = new JPanel(); extRight.setLayout(new GridBagLayout()); jaaia[0] = new JRadioButton(); jaaia[0].setActionCommand("jaaia0"); jaaia[1] = new JRadioButton(); jaaia[1].setActionCommand("jaaia1"); jnorev[0] = new JRadioButton(); jnorev[0].setActionCommand("jnorev0"); jnorev[1] = new JRadioButton(); jnorev[1].setActionCommand("jnorev1"); jdavrev[0] = new JRadioButton(); jdavrev[0].setActionCommand("jdavrev0"); jdavrev[1] = new JRadioButton(); jdavrev[0].setActionCommand("jdavrev1"); group.add(jaaia[0]); group.add(jaaia[1]); group2.add(jnorev[0]); group2.add(jnorev[1]); group3.add(jdavrev[0]); group3.add(jdavrev[1]); jaaia[1].setSelected(true); jnorev[0].addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jaaia[1].setSelected(false); jdavrev[0].setEnabled(false); jdavrev[1].setEnabled(false); jdavrev[1].setSelected(false); } }); jnorev[1].addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jdavrev[0].setEnabled(true); jdavrev[1].setEnabled(true); } }); jnorev[1].setSelected(true); jdavrev[0].addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jnorev[0].setEnabled(false); jnorev[1].setEnabled(false); jnorev[1].setSelected(true); } }); jdavrev[1].setSelected(true); jdavrev[1].addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jnorev[0].setEnabled(true); jnorev[1].setEnabled(true); } }); GridBagConstraints c = new GridBagConstraints(); c.gridx = 0; c.gridy = 0; extRight.add(new JLabel("Insert AAIA extension into issued ACs "), c); c.gridx = 1; c.gridy = 0; extRight.add(new JLabel("Yes"), c); c.gridx = 2; c.gridy = 0; c.insets = new Insets(0, 10, 0, 20); extRight.add(jaaia[0], c); c.gridx = 3; c.gridy = 0; c.insets = new Insets(0, 0, 0, 0); extRight.add(new JLabel("No"), c); c.gridx = 4; c.gridy = 0; c.insets = new Insets(0, 10, 0, 0); extRight.add(jaaia[1], c); c.gridx = 0; c.gridy = 1; extRight.add(new JLabel("Indicate no revocation information will be available "), c); c.gridx = 1; c.gridy = 1; c.insets = new Insets(0, 0, 0, 0); extRight.add(new JLabel("Yes"), c); c.gridx = 2; c.gridy = 1; c.insets = new Insets(0, 10, 0, 20); extRight.add(jnorev[0], c); c.gridx = 3; c.gridy = 1; c.insets = new Insets(0, 0, 0, 0); extRight.add(new JLabel("No"), c); c.gridx = 4; c.gridy = 1; c.insets = new Insets(0, 10, 0, 0); extRight.add(jnorev[1], c); pExtensions.add(extRight, BorderLayout.NORTH); c.gridx = 0; c.gridy = 2; extRight.add(new JLabel("Indicate WebDAV instant revocation is supported "), c); c.gridx = 1; c.gridy = 2; c.insets = new Insets(0, 0, 0, 0); extRight.add(new JLabel("Yes"), c); c.gridx = 2; c.gridy = 2; c.insets = new Insets(0, 10, 0, 20); extRight.add(jdavrev[0], c); c.gridx = 3; c.gridy = 2; c.insets = new Insets(0, 0, 0, 0); extRight.add(new JLabel("No"), c); c.gridx = 4; c.gridy = 2; c.insets = new Insets(0, 10, 0, 0); extRight.add(jdavrev[1], c); pExtensions.add(extRight, BorderLayout.NORTH); pData.add("Extensions", pExtensions); pButt = new JPanel(); pButt.setLayout(new FlowLayout(FlowLayout.CENTER)); Container cnt = this.getContentPane(); cnt.setLayout(new java.awt.BorderLayout()); accept = new JButton("Save and Exit"); cancel = new JButton("Quit without Saving"); connect = new JButton("Test LDAP connection"); connectWebDAV = new JButton("Test WebDAV connection"); accept.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { saveChanges(); if (davCloseCheck) { } else { setVisible(false); } } }); cancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { setVisible(false); } }); connect.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { String why = tryConnection(); if (why == null) { showOK(); } else { showFalse(why); } } }); connectWebDAV.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { String why = tryConnectionWebDAV(); if (why == null) { showOK(); } else { showFalse(why); } } }); pButt.add(accept); pButt.add(cancel); pUtilities = new JPanel(); pUtilities.setBorder(new TitledBorder("Additional functionality")); pUtilities.setLayout(new BorderLayout()); SelectFileListener sfl = new SelectFileListener(jf); pSigning = new JPanel(); JPanel epl = new JPanel(); JPanel epr = new JPanel(); epl.setLayout(new GridLayout(3, 1)); epr.setLayout(new GridLayout(3, 1)); pSigning.setLayout(new BorderLayout()); epl.add(jDIS = new JCheckBox("Use Delegation Issuing Service", false)); jDISAddress = new JTextField(); jDISAddress.setEnabled(false); jDIS.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { boolean status = jDIS.isSelected(); jDISAddress.setEnabled(status); if (status) { jCHEntrust.setSelected(status); jCHEntrust.setEnabled(false); jDefaultProfile.setEnabled(status); jBProfile.setEnabled(status); } else { jCHEntrust.setEnabled(true); } } }); epl.add(jCHEntrust = new JCheckBox("Digitally sign attribute certificates", true)); jBProfile = new JButton("Select Signing Key..."); jBProfile.addActionListener(sfl); jBProfile.setActionCommand("ENTRUST"); epr.add(jDISAddress); epr.add(jBProfile); epl.add(new JLabel("Default Signing Key")); epr.add(jDefaultProfile = new JTextField(32)); jCHEntrust.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { boolean status = jCHEntrust.isSelected(); jDefaultProfile.setEnabled(status); jBProfile.setEnabled(status); } }); pSigning.add("West", epl); pSigning.add("East", epr); JPanel ldap = new JPanel(); ldap.setLayout(new FlowLayout(FlowLayout.LEFT)); JPanel pChecks = new JPanel(); pChecks.setLayout(new GridLayout(2, 1)); pChecks.add(ldap); JPanel pLDAP = new JPanel(); pLDAP.setLayout(new BorderLayout()); JPanel lpl = new JPanel(); JPanel lpr = new JPanel(); lpl.setLayout(new GridLayout(15, 1)); lpr.setLayout(new GridLayout(15, 1)); lpl.add(new JLabel("LDAP URL")); lpr.add(jProviderURL = new JTextField(24)); lpl.add(new JLabel("LDAP Login")); lpr.add(jProviderLogin = new JTextField(10)); lpl.add(new JLabel("LDAP Password")); lpr.add(jProviderPassword = new JPasswordField(10)); lpr.add(connect); lpl.add(new JLabel("")); lpl.add(new JLabel("AC LDAP type")); lpr.add(jACType = new JTextField(32)); JLabel lLine = new JLabel(); JLabel rLine = new JLabel(); lpl.add(lLine); lpr.add(rLine); lpl.add(new JLabel("WebDAV Host")); lpr.add(jWebDAVHost = new JTextField(32)); lpl.add(new JLabel("WebDAV Port")); lpr.add(jWebDAVPort = new JTextField(5)); lpl.add(new JLabel("")); lpr.add(connectWebDAV); lpl.add(jWebDAVHttps = new JCheckBox("HTTPS")); lpr.add(jWebDAVSelectP12 = new JButton("Select Signing Key...")); lpl.add(new JLabel("SSL Client Certificate and Signing Key ")); lpr.add(jWebDAVP12Filename = new JTextField()); lpl.add(new JLabel("Password")); lpr.add(jWebDAVP12Password = new JPasswordField()); lpl.add(new JLabel("")); lpl.add(new JLabel("WebDAV Server Certificate.")); lpr.add(addWebDAVSSL = new JButton("Select Server Certificate")); lpr.add(jWebDAVSSL = new JTextField()); jWebDAVSelectP12.addActionListener(sfl); jWebDAVSelectP12.setActionCommand("WEBDAVP12FILENAME"); jWebDAVHttps.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { boolean status; if (status = jWebDAVHttps.isSelected()) { jWebDAVPort.setText("443"); } else { jWebDAVPort.setText("80"); } jWebDAVSelectP12.setEnabled(status); jWebDAVP12Filename.setEnabled(status); jWebDAVP12Password.setEnabled(status); jWebDAVSSL.setEnabled(status); addWebDAVSSL.setEnabled(status); } }); addWebDAVSSL.addActionListener(sfl); addWebDAVSSL.setActionCommand("WEBDAVSSLFILENAME"); jWebDAVSSL.addActionListener(sfl); pLDAP.add("West", lpl); pLDAP.add("East", lpr); pUtilities.add("North", pSigning); pUtilities.add("Center", pChecks); pUtilities.add("South", pLDAP); pData.add("Utilities", pUtilities); cnt.add("North", pData); cnt.add("South", pButt); } class SelectFileListener implements ActionListener { protected JFrame jf; SelectFileListener(JFrame jf) { this.jf = jf; } public void actionPerformed(ActionEvent e) { JFileChooser fd = new JFileChooser("Select file"); fd.showOpenDialog(jf); if (fd.getSelectedFile() != null) { String file = fd.getSelectedFile().getAbsolutePath(); if (e.getActionCommand().equals("ENTRUST")) jDefaultProfile.setText(file); if (e.getActionCommand().equals("WEBDAVP12FILENAME")) jWebDAVP12Filename.setText(file); if (e.getActionCommand().equals("WEBDAVSSLFILENAME")) { File certpath = new File(file); File store = new File("webdavtruststore.jks"); String password = "changeme"; char[] pass = password.toCharArray(); Certificate cert = getCertFromFile(certpath); if (cert == null) { removeKeyStore(store, pass, "WebDAV"); } else { removeKeyStore(store, pass, "WebDAV"); addToKeyStore(store, pass, "WebDAV", cert); jWebDAVSSL.setText(file); } } } } } public Certificate getCertFromFile(File file) { try { try { FileInputStream fis; fis = new FileInputStream(file); BufferedInputStream bis = new BufferedInputStream(fis); CertificateFactory cf; cf = CertificateFactory.getInstance("X.509"); while (bis.available() > 0) { Certificate cert = cf.generateCertificate(bis); System.out.println(cert.toString()); return cert; } } catch (FileNotFoundException e) { } catch (IOException e) { e.printStackTrace(); } } catch (CertificateException e) { e.printStackTrace(); } return null; } public static void addToKeyStore(File keystoreFile, char[] keystorePassword, String alias, java.security.cert.Certificate cert) { try { KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType()); FileInputStream in = new FileInputStream(keystoreFile); keystore.load(in, keystorePassword); in.close(); keystore.setCertificateEntry(alias, cert); FileOutputStream out = new FileOutputStream(keystoreFile); keystore.store(out, keystorePassword); out.close(); } catch (java.security.cert.CertificateException e) { System.err.println("CertificateException"); } catch (NoSuchAlgorithmException e) { System.err.println("NoSuchAlgorithmException Exception"); } catch (FileNotFoundException e) { System.err.println("File not found Exception"); } catch (KeyStoreException e) { System.err.println("keystore Exception"); } catch (IOException e) { System.err.println("IO Exception"); } } public static void removeKeyStore(File keystoreFile, char[] keystorePassword, String alias) { try { KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType()); FileInputStream in = new FileInputStream(keystoreFile); keystore.load(in, keystorePassword); in.close(); if (keystore.containsAlias(alias)) { System.out.println("WebDAV certificate exists removing it now"); keystore.deleteEntry(alias); } FileOutputStream out = new FileOutputStream(keystoreFile); keystore.store(out, keystorePassword); out.close(); } catch (java.security.cert.CertificateException e) { System.err.println("CertificateException"); } catch (NoSuchAlgorithmException e) { System.err.println("NoSuchAlgorithmException Exception"); } catch (FileNotFoundException e) { System.err.println("File not found Exception"); } catch (KeyStoreException e) { System.err.println("keystore Exception"); } catch (IOException e) { System.err.println("IO Exception"); } } public void activateDialog() { pack(); centerDialog(); setModal(true); show(); } public boolean initialiseDialog(Map environment) { vars = (Hashtable) environment.get(EnvironmentalVariables.VARIABLES_COLLECTION); utils = (Hashtable) environment.get(EnvironmentalVariables.UTILITIES_COLLECTION); boolean exists; if (vars != null && vars.size() > 0 && utils != null && utils.size() > 0) { exists = true; try { this.HOLDER_UTILITY = (String) utils.get(EnvironmentalVariables.LDAP_HOLDER_EDITOR_UTILITY); this.VALIDITY_UTILITY = (String) utils.get(EnvironmentalVariables.VALIDITY_PERIOD_EDITOR_UTILITY); this.WEBDAV_HOLDER_UTILITY = (String) utils.get(EnvironmentalVariables.WEBDAV_HOLDER_EDITOR_UTILITY); this.WEBDAV_REVOCATION_LOCATION = (String) vars.get("WEBDAV_REVOCATION_LOCATION"); this.WEBDAV_CERTIFICATE_LOCATION = (String) vars.get("WEBDAV_CERTIFICATE_LOCATION"); } catch (NullPointerException e) { this.HOLDER_UTILITY = "issrg.acm.ACMLDAPBrowser"; this.VALIDITY_UTILITY = "issrg.acm.ValidityEditor"; this.WEBDAV_HOLDER_UTILITY = "issrg.acm.ACMWebDAVBrowser"; this.WEBDAV_REVOCATION_LOCATION = "Webdav.revocation.location"; this.WEBDAV_CERTIFICATE_LOCATION = "Webdav.certificate.location"; } } else exists = false; modifyDialog(exists); return true; } private void modifyDialog(boolean fileExists) { if (fileExists) { if (vars.containsKey(EnvironmentalVariables.WEBDAV_REVOCATION_LOCATION)) { RevLocation = ((String) vars.get(EnvironmentalVariables.WEBDAV_REVOCATION_LOCATION)); } if (vars.containsKey(EnvironmentalVariables.WEBDAV_CERTIFICATE_LOCATION)) { CertLocation = ((String) vars.get(EnvironmentalVariables.WEBDAV_CERTIFICATE_LOCATION)); } if (vars.containsKey(EnvironmentalVariables.HOLDER_NAME_STRING)) { jHolderName.setText((String) vars.get(EnvironmentalVariables.HOLDER_NAME_STRING)); } else jHolderName.setText("<EMPTY>"); if (vars.containsKey(EnvironmentalVariables.LDAP_HOLDER_EDITOR_UTILITY)) { if (vars.containsKey(EnvironmentalVariables.HOLDER_EDITOR_UTILITY_SERVER)) { jProviderURL.setText((String) vars.get(EnvironmentalVariables.HOLDER_EDITOR_UTILITY_SERVER)); } } if (vars.containsKey(EnvironmentalVariables.SERIAL_NUMBER_STRING)) { serialNumber = (String) vars.get(EnvironmentalVariables.SERIAL_NUMBER_STRING); } else serialNumber = "<EMPTY>"; if (vars.containsKey(EnvironmentalVariables.VALIDITY_PERIOD_STRING)) { jValidityPeriod.setText((String) vars.get(EnvironmentalVariables.VALIDITY_PERIOD_STRING)); } else jValidityPeriod.setText("<EMPTY>"); if (vars.containsKey(LDAPSavingUtility.LDAP_SAVING_UTILITY_AC_TYPE)) { String acType = (String) vars.get(LDAPSavingUtility.LDAP_SAVING_UTILITY_AC_TYPE); if ((!acType.equals("")) && (!acType.equals("<EMPTY>"))) jACType.setText((String) vars.get(LDAPSavingUtility.LDAP_SAVING_UTILITY_AC_TYPE)); else jACType.setText("attributeCertificateAttribute"); } if (utils.containsKey("issrg.acm.extensions.SimpleSigningUtility")) { if (vars.containsKey(DefaultSecurity.DEFAULT_FILE_STRING)) { jDefaultProfile.setText((String) vars.get(DefaultSecurity.DEFAULT_FILE_STRING)); } else jDefaultProfile.setText("<EMPTY>"); jCHEntrust.setSelected(true); } else { jCHEntrust.setSelected(false); jDefaultProfile.setEnabled(false); } if (utils.containsKey("issrg.acm.extensions.ACMDISSigningUtility")) { if (vars.containsKey("DefaultDIS")) { jDISAddress.setText((String) vars.get("DefaultDIS")); } else jDISAddress.setText("<EMPTY>"); jDIS.setSelected(true); jCHEntrust.setSelected(true); jDefaultProfile.setEnabled(true); if (vars.containsKey(DefaultSecurity.DEFAULT_FILE_STRING)) { jDefaultProfile.setText((String) vars.get(DefaultSecurity.DEFAULT_FILE_STRING)); } else jDefaultProfile.setText("permis.p12"); } else { jDIS.setSelected(false); jDISAddress.setEnabled(false); } if (vars.containsKey(EnvironmentalVariables.AAIA_LOCATION)) { jaaia[0].setSelected(true); } if (vars.containsKey(EnvironmentalVariables.NOREV_LOCATION)) { jnorev[0].setSelected(true); jdavrev[0].setEnabled(false); jdavrev[1].setEnabled(false); jdavrev[1].setSelected(false); } if (vars.containsKey(EnvironmentalVariables.DAVREV_LOCATION)) { jdavrev[0].setSelected(true); jnorev[0].setEnabled(false); jnorev[1].setEnabled(false); jnorev[1].setSelected(true); } if (vars.containsKey("LDAPSavingUtility.ProviderURI")) { jProviderURL.setText((String) vars.get("LDAPSavingUtility.ProviderURI")); } else jProviderURL.setText("<EMPTY>"); if (vars.containsKey("LDAPSavingUtility.Login")) { jProviderLogin.setText((String) vars.get("LDAPSavingUtility.Login")); } else jProviderLogin.setText("<EMPTY>"); if (vars.containsKey("LDAPSavingUtility.Password")) { jProviderPassword.setText((String) vars.get("LDAPSavingUtility.Password")); } else jProviderPassword.setText("<EMPTY>"); if ((!vars.containsKey(EnvironmentalVariables.TRUSTSTORE)) || (((String) vars.get(EnvironmentalVariables.TRUSTSTORE)).equals(""))) { vars.put(EnvironmentalVariables.TRUSTSTORE, "truststorefile"); } if (vars.containsKey(EnvironmentalVariables.WEBDAV_HOST)) { jWebDAVHost.setText((String) vars.get(EnvironmentalVariables.WEBDAV_HOST)); } else { jWebDAVHost.setText("<EMPTY>"); } if (vars.containsKey(EnvironmentalVariables.WEBDAV_PORT)) { jWebDAVPort.setText((String) vars.get(EnvironmentalVariables.WEBDAV_PORT)); } else { jWebDAVPort.setText("<EMPTY>"); } if (vars.containsKey(EnvironmentalVariables.WEBDAV_PROTOCOL)) { if (vars.get(EnvironmentalVariables.WEBDAV_PROTOCOL).equals("HTTPS")) { jWebDAVHttps.setSelected(true); jWebDAVSelectP12.setEnabled(true); jWebDAVP12Filename.setEnabled(true); jWebDAVP12Password.setEnabled(true); jWebDAVSSL.setEnabled(true); addWebDAVSSL.setEnabled(true); } else { jWebDAVHttps.setSelected(false); jWebDAVSelectP12.setEnabled(false); jWebDAVP12Filename.setEnabled(false); jWebDAVP12Password.setEnabled(false); jWebDAVSSL.setEnabled(false); addWebDAVSSL.setEnabled(false); } } else { jWebDAVHttps.setSelected(false); } if (vars.containsKey(EnvironmentalVariables.WEBDAV_P12FILENAME)) { jWebDAVP12Filename.setText((String) vars.get(EnvironmentalVariables.WEBDAV_P12FILENAME)); } else { jWebDAVP12Filename.setText("<EMPTY>"); } if (vars.containsKey(EnvironmentalVariables.WEBDAV_P12PASSWORD)) { jWebDAVP12Password.setText((String) vars.get(EnvironmentalVariables.WEBDAV_P12PASSWORD)); } else { jWebDAVP12Password.setText("<EMPTY>"); } if (vars.containsKey(EnvironmentalVariables.WEBDAV_SSLCERTIFICATE)) { jWebDAVSSL.setText((String) vars.get(EnvironmentalVariables.WEBDAV_SSLCERTIFICATE)); } else { jWebDAVSSL.setText("<EMPTY>"); } } else { jHolderName.setText("cn=A Permis Test User, o=PERMIS, c=gb"); try { MessageDigest md = MessageDigest.getInstance("SHA"); md.update(new Date().toString().getBytes()); byte[] result = md.digest(); BigInteger bi = new BigInteger(result); bi = bi.abs(); serialNumber = bi.toString(16); } catch (Exception e) { serialNumber = "<EMPTY>"; } jValidityPeriod.setText("<EMPTY>"); jDefaultProfile.setText("permis.p12"); jCHEntrust.setSelected(true); jProviderURL.setText("ldap://sec.cs.kent.ac.uk/c=gb"); jProviderLogin.setText(""); jProviderPassword.setText(""); jWebDAVHost.setText(""); jWebDAVPort.setText("443"); jWebDAVP12Filename.setText(""); jACType.setText("attributeCertificateAttribute"); vars.put(EnvironmentalVariables.TRUSTSTORE, "truststorefile"); saveChanges(); } } private String tryConnection() { try { issrg.utils.gui.repository.LDAP_DIT.connectTo(jProviderURL.getText()); } catch (Exception e) { return e.getMessage(); } return null; } private String tryConnectionWebDAV() { File certpath = new File(jWebDAVSSL.getText()); File store = new File("webdavtruststore.jks"); String password = "changeme"; char[] pass = password.toCharArray(); Certificate cert = getCertFromFile(certpath); if (cert == null) { removeKeyStore(store, pass, "WebDAV"); } else { removeKeyStore(store, pass, "WebDAV"); addToKeyStore(store, pass, "WebDAV", cert); } try { WebDAVSocket socket; if (jWebDAVHttps.isSelected()) { socket = new WebDAVSocketHTTPS(jWebDAVP12Filename.getText(), new String(jWebDAVP12Password.getPassword())); } else { socket = new WebDAVSocketHTTP(); } WebDAV_DIT testWebDAV = new WebDAV_DIT(socket, jWebDAVHost.getText(), Integer.parseInt(jWebDAVPort.getText())); testWebDAV.testConnection("/"); } catch (HTTPMessageException e) { return e.getErrorMessage(); } catch (NumberFormatException e) { return "Invalid WebDAV Port Number: " + jWebDAVPort.getText(); } return null; } private void showOK() { JOptionPane.showMessageDialog(jf, "Connection succesful"); } private void showFalse(String why) { JOptionPane.showMessageDialog(jf, "Connection failed: " + why, "Error", JOptionPane.INFORMATION_MESSAGE); } private void saveChanges() { if (jWebDAVHttps.isSelected()) { File certpath = new File(jWebDAVSSL.getText()); File store = new File("webdavtruststore.jks"); String password = "changeme"; char[] pass = password.toCharArray(); Certificate cert = getCertFromFile(certpath); if (cert == null) { removeKeyStore(store, pass, "WebDAV"); } else { removeKeyStore(store, pass, "WebDAV"); addToKeyStore(store, pass, "WebDAV", cert); } } try { Node variables = Manager.acmConfigComponent.DOM.getElementsByTagName("Variables").item(0); NodeList variableList = Manager.acmConfigComponent.DOM.getElementsByTagName("Variable"); if (vars.containsKey(EnvironmentalVariables.AAIA_LOCATION)) { if (jaaia[1].isSelected()) { delItem(variableList, EnvironmentalVariables.AAIA_LOCATION); vars.remove(EnvironmentalVariables.AAIA_LOCATION); } } else { if (jaaia[0].isSelected()) { addItem("Variable", (Element) variables, EnvironmentalVariables.AAIA_LOCATION, EnvironmentalVariables.AAIA_LOCATION); vars.put(EnvironmentalVariables.AAIA_LOCATION, EnvironmentalVariables.AAIA_LOCATION); } } if (vars.containsKey(EnvironmentalVariables.NOREV_LOCATION)) { if (jnorev[1].isSelected()) { delItem(variableList, EnvironmentalVariables.NOREV_LOCATION); vars.remove(EnvironmentalVariables.NOREV_LOCATION); } } else { if (jnorev[0].isSelected()) { addItem("Variable", (Element) variables, EnvironmentalVariables.NOREV_LOCATION, EnvironmentalVariables.NOREV_LOCATION); vars.put(EnvironmentalVariables.NOREV_LOCATION, EnvironmentalVariables.NOREV_LOCATION); if (vars.containsKey(EnvironmentalVariables.DAVREV_LOCATION)) { delItem(variableList, EnvironmentalVariables.DAVREV_LOCATION); vars.remove(EnvironmentalVariables.DAVREV_LOCATION); } } } if (vars.containsKey(EnvironmentalVariables.DAVREV_LOCATION)) { if (jdavrev[1].isSelected()) { delItem(variableList, EnvironmentalVariables.DAVREV_LOCATION); vars.remove(EnvironmentalVariables.DAVREV_LOCATION); } } else { if (jdavrev[0].isSelected()) { addItem("Variable", (Element) variables, EnvironmentalVariables.DAVREV_LOCATION, EnvironmentalVariables.DAVREV_LOCATION); vars.put(EnvironmentalVariables.DAVREV_LOCATION, EnvironmentalVariables.DAVREV_LOCATION); if (vars.containsKey(EnvironmentalVariables.NOREV_LOCATION)) { delItem(variableList, EnvironmentalVariables.NOREV_LOCATION); vars.remove(EnvironmentalVariables.NOREV_LOCATION); } } } if (variableList != null & variableList.getLength() > 0) { for (int i = 0; i < variableList.getLength(); i++) { NamedNodeMap attributes = variableList.item(i).getAttributes(); String varName = attributes.getNamedItem("Name").getNodeValue(); if (varName.equals(EnvironmentalVariables.HOLDER_NAME_STRING)) { if ((jHolderName.getText().intern() != "<EMPTY>") && (!jHolderName.getText().trim().equals(""))) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.HOLDER_NAME_STRING, jHolderName.getText()); issrg.acm.Manager.holder = jHolderName.getText(); } } else if (varName.equals(EnvironmentalVariables.LDAP_HOLDER_EDITOR_UTILITY)) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.LDAP_HOLDER_EDITOR_UTILITY, HOLDER_UTILITY); } else if (varName.equals(EnvironmentalVariables.SERIAL_NUMBER_STRING)) { if ((serialNumber.intern() != "<EMPTY>") && (serialNumber.trim() != "")) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.SERIAL_NUMBER_STRING, serialNumber); } } else if (varName.equals(EnvironmentalVariables.VALIDITY_PERIOD_STRING)) { if ((jValidityPeriod.getText().intern() != "<EMPTY>") && (!jValidityPeriod.getText().trim().equals(""))) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.VALIDITY_PERIOD_STRING, jValidityPeriod.getText()); } } else if (varName.equals(EnvironmentalVariables.VALIDITY_PERIOD_EDITOR_UTILITY)) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.VALIDITY_PERIOD_EDITOR_UTILITY, VALIDITY_UTILITY); } else if (varName.equals(EnvironmentalVariables.VERSION_STRING)) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.VERSION_STRING, "2"); } else if (varName.equals(EnvironmentalVariables.AAIA_LOCATION)) { if ((jProviderURL.getText().intern() != "<EMPTY>") && (!jProviderURL.getText().trim().equals("")) && jCHEntrust.isSelected() && jaaia[0].isSelected()) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.AAIA_LOCATION, "1"); } } else if (varName.equals(EnvironmentalVariables.WEBDAV_HOST)) { if ((jWebDAVHost.getText().intern() != "<EMPTY>") && (!jWebDAVHost.getText().trim().equals(""))) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.WEBDAV_HOST, jWebDAVHost.getText()); } } else if (varName.equals(EnvironmentalVariables.WEBDAV_PORT)) { if ((jWebDAVPort.getText().intern() != "<EMPTY>") && (!jWebDAVPort.getText().trim().equals(""))) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.WEBDAV_PORT, jWebDAVPort.getText()); } } else if (varName.equals(EnvironmentalVariables.WEBDAV_PROTOCOL)) { if (jWebDAVHttps.isSelected()) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.WEBDAV_PROTOCOL, "HTTPS"); } else { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.WEBDAV_PROTOCOL, "HTTP"); } } else if (varName.equals(EnvironmentalVariables.WEBDAV_P12FILENAME)) { if ((jWebDAVP12Filename.getText().intern() != "<EMPTY>") && (!jWebDAVP12Filename.getText().trim().equals(""))) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.WEBDAV_P12FILENAME, jWebDAVP12Filename.getText()); } } else if (varName.equals(EnvironmentalVariables.WEBDAV_P12PASSWORD)) { if ((new String(jWebDAVP12Password.getPassword()).intern() != "<EMPTY>")) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.WEBDAV_P12PASSWORD, new String(jWebDAVP12Password.getPassword())); } } else if (varName.equals(EnvironmentalVariables.WEBDAV_SSLCERTIFICATE)) { if ((jWebDAVSSL.getText().intern() != "<EMPTY>")) { setAttributeValue((Element) variableList.item(i), EnvironmentalVariables.WEBDAV_SSLCERTIFICATE, jWebDAVSSL.getText()); } } else if (varName.equals(LDAPSavingUtility.LDAP_SAVING_UTILITY_AC_TYPE)) { if ((jACType.getText().intern() != "<EMPTY>") && (!jACType.getText().trim().equals(""))) { setAttributeValue((Element) variableList.item(i), LDAPSavingUtility.LDAP_SAVING_UTILITY_AC_TYPE, jACType.getText()); } else { setAttributeValue((Element) variableList.item(i), LDAPSavingUtility.LDAP_SAVING_UTILITY_AC_TYPE, "attributeCertificateAttribute"); } } else if (varName.equals("LDAPSavingUtility.ProviderURI")) { if ((jProviderURL.getText().intern() != "<EMPTY>") && (!jProviderURL.getText().trim().equals(""))) { setAttributeValue((Element) variableList.item(i), "LDAPSavingUtility.ProviderURI", jProviderURL.getText()); } } else if (varName.equals("LDAPSavingUtility.Login")) { if ((jProviderLogin.getText().intern() != "<EMPTY>")) { setAttributeValue((Element) variableList.item(i), "LDAPSavingUtility.Login", jProviderLogin.getText()); } } else if (varName.equals("LDAPSavingUtility.Password")) { String providerPassword = new String(jProviderPassword.getPassword()); if (!providerPassword.trim().equals("<EMPTY>")) { setAttributeValue((Element) variableList.item(i), "LDAPSavingUtility.Password", providerPassword); } } else if (varName.equals("PrintableStringEditor.Config")) { setAttributeValue((Element) variableList.item(i), "PrintableStringEditor.Config", "printableString.oid"); } else if (varName.equals(DefaultSecurity.DEFAULT_FILE_STRING)) { if (jCHEntrust.isSelected() && (jDefaultProfile.getText().intern() != "<EMPTY>") && (!jDefaultProfile.getText().trim().equals(""))) { setAttributeValue((Element) variableList.item(i), DefaultSecurity.DEFAULT_FILE_STRING, jDefaultProfile.getText()); } } else if (varName.equals("DefaultDIS")) { if (jDIS.isSelected() && (jDISAddress.getText().intern() != "<EMPTY>") && (!jDISAddress.getText().trim().equals(""))) { setAttributeValue((Element) variableList.item(i), "DefaultDIS", jDISAddress.getText()); } } else if (varName.equals("PMIXMLPolicyEditor.Validate")) { setAttributeValue((Element) variableList.item(i), "PMIXMLPolicyEditor.Validate", " "); } else if (varName.equals("Webdav.revocation.location")) { setAttributeValue((Element) variableList.item(i), "Webdav.revocation.location", RevLocation); } else if (varName.equals("Webdav.certificate.location")) { setAttributeValue((Element) variableList.item(i), "Webdav.certificate.location", CertLocation); } } } Node utilities = Manager.acmConfigComponent.DOM.getElementsByTagName("Utilities").item(0); if (utils.get("PRINTABLE_STRING_UTILITY") == null) { addItem("Utility", (Element) utilities, "PRINTABLE_STRING_UTILITY", "issrg.acm.extensions.PrintableStringEditor"); utils.put("PRINTABLE_STRING_UTILITY", "issrg.acm.extensions.PrintableStringEditor"); } if (jCHEntrust.isSelected() && !jDIS.isSelected()) { if (utils.get("SIMPLE_SIGNING_UTILITY") == null) { addItem("Utility", (Element) utilities, "SIMPLE_SIGNING_UTILITY", "issrg.acm.extensions.SimpleSigningUtility"); utils.put("SIMPLE_SIGNING_UTILITY", "issrg.acm.extensions.SimpleSigningUtility"); } } if (jDIS.isSelected()) { if (utils.get("ACM_DIS_SIGNING_UTILITY") == null) { addItem("Utility", (Element) utilities, "ACM_DIS_SIGNING_UTILITY", "issrg.acm.extensions.ACMDISSigningUtility"); utils.put("ACM_DIS_SIGNING_UTILITY", "issrg.acm.extensions.ACMDISSigningUtility"); } } if (utils.get("PERMIS_XML_POLICY_UTILITY") == null) { addItem("Utility", (Element) utilities, "PERMIS_XML_POLICY_UTILITY", "issrg.acm.extensions.PMIXMLPolicyEditor"); utils.put("PERMIS_XML_POLICY_UTILITY", "issrg.acm.extensions.PMIXMLPolicyEditor"); } if ((jProviderURL.getText().intern() != "<EMPTY>") && (!jProviderURL.getText().trim().equals(""))) { if (utils.get("HOLDER_UTILITY") == null) { addItem("Utility", (Element) utilities, "HOLDER_UTILITY", HOLDER_UTILITY); utils.put("HOLDER_UTILITY", HOLDER_UTILITY); } } if (utils.get("WEBDAV_HOLDER_UTILITY") == null) { addItem("Utility", (Element) utilities, "WEBDAV_HOLDER_UTILITY", WEBDAV_HOLDER_UTILITY); utils.put("WEBDAV_HOLDER_UTILITY", WEBDAV_HOLDER_UTILITY); } if (utils.get("VALIDITY_UTILITY") == null) { addItem("Utility", (Element) utilities, "VALIDITY_UTILITY", VALIDITY_UTILITY); utils.put("VALIDITY_UTILITY", VALIDITY_UTILITY); } Manager.acmConfigComponent.saveConfiguration(); } catch (IOException e) { JOptionPane.showMessageDialog(jf, e.getMessage(), "Error in saving the configuration file", JOptionPane.ERROR_MESSAGE); } catch (Exception e) { JOptionPane.showMessageDialog(jf, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } } private void setAttributeValue(Element e, String varName, String varValue) { String attrs[] = { "Name", "Value" }; String values[] = { varName, varValue }; Manager.acmConfigComponent.setAttributeValue(e, attrs, values); } private void delItem(NodeList variableList, String varName) { if (variableList != null & variableList.getLength() > 0) { for (int i = 0; i < variableList.getLength(); i++) { NamedNodeMap attributes = variableList.item(i).getAttributes(); String s = attributes.getNamedItem("Name").getNodeValue(); if (s.equals(varName)) { Manager.acmConfigComponent.deleteItem((Element) variableList.item(i), (Element) variableList.item(i).getParentNode()); } } } } private void addItem(String itemId, Element parentNode, String varName, String varValue) { Element childNode = Manager.acmConfigComponent.DOM.createElement(itemId); childNode.setAttribute("Name", varName); childNode.setAttribute("Value", varValue); Manager.acmConfigComponent.addItem(childNode, (Element) parentNode, parentNode.getChildNodes().getLength() + 1); vars.put(varName, varValue); } private void parseConfig(String configFile) throws IOException { vars = new Hashtable(); utils = new Hashtable(); InputStream is; is = new FileInputStream(configFile); BufferedReader in = new BufferedReader(new InputStreamReader(is)); String s = ""; final int NOTHING = 0; final int VARIABLES = 1; final int UTILITIES = 2; int state = NOTHING; while (in.ready()) { s = in.readLine(); if (s == null) break; s = s.trim(); if (s.intern() == "" || s.startsWith(KernelApplication.CFG_COMMENT1) || s.startsWith(KernelApplication.CFG_COMMENT2)) { continue; } if (s.intern() == KernelApplication.CFG_UTILITIES) { state = UTILITIES; continue; } if (s.intern() == KernelApplication.CFG_VARIABLES) { state = VARIABLES; continue; } if (s.startsWith("[") && s.endsWith("]")) { state = NOTHING; continue; } if (state == VARIABLES) { int i = s.indexOf('='); String value = ""; if (i != -1) { value = s.substring(i + 1).trim(); s = s.substring(0, i); } vars.put(s, value); continue; } if (state == UTILITIES) { utils.put(s, "ACTIVATED"); continue; } } is.close(); } protected void centerDialog() { Dimension screenSize = this.getToolkit().getScreenSize(); Dimension size = this.getSize(); screenSize.height = screenSize.height / 2; screenSize.width = screenSize.width / 2; size.height = size.height / 2; size.width = size.width / 2; int y = screenSize.height - size.height; int x = screenSize.width - size.width; this.setLocation(x, y); } public void XMLChanged(XMLChangeEvent ev) { ((Manager) jf).parseConfig(); } }
[ "nishima@mymail.vcu.edu" ]
nishima@mymail.vcu.edu
e17383a341af305559ea870ad785b896752427c0
d24da1b9567d2f32e5f38c7c1218d1c271c15a04
/src/main/java/podtest/PodTestApplication.java
dc0041cd4a14055196e375fad06968e2356b5a35
[]
no_license
raghuraman1/podstest
bcbc97c0e03b1c382259a1d2766d4a7f0c5d85a0
d0f33fe2caca5b89ec8882eb7c4379f23cdaf218
refs/heads/master
2021-01-11T20:20:29.811899
2017-01-16T07:56:41
2017-01-16T07:56:41
79,095,132
0
0
null
null
null
null
UTF-8
Java
false
false
857
java
package podtest; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; @SpringBootApplication @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class}) public class PodTestApplication { @Bean public ServletRegistrationBean reg() { ServletRegistrationBean registration = new ServletRegistrationBean(new MyServlet(), "/"); return registration; } public static void main(String[] args) { SpringApplication.run(PodTestApplication.class, args); } }
[ "raghuraman1@yahoo.com" ]
raghuraman1@yahoo.com
7deb59d17b15fef3726c25a4b8b6eb38a59096b5
f340a96d06741b77fe6fd96322ff3aa182e054fe
/src/main/java/com/sheradmin/uaa/config/LiquibaseConfiguration.java
5f016625f334bec9982a60237f2a2a663e008de4
[]
no_license
sheradmin/UAA
35d557abb455ef6869e029f5d933cdca89486e7e
7fc0070c952a287c832fe154c7a9e6f8f31e6e0e
refs/heads/master
2022-12-30T09:01:45.424303
2019-12-05T18:41:40
2019-12-05T18:41:40
226,166,616
0
0
null
2022-12-16T04:42:08
2019-12-05T18:41:32
Java
UTF-8
Java
false
false
3,208
java
package com.sheradmin.uaa.config; import io.github.jhipster.config.JHipsterConstants; import io.github.jhipster.config.liquibase.SpringLiquibaseUtil; import liquibase.integration.spring.SpringLiquibase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; import org.springframework.boot.autoconfigure.liquibase.LiquibaseDataSource; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; import javax.sql.DataSource; import java.util.concurrent.Executor; @Configuration public class LiquibaseConfiguration { private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class); private final Environment env; public LiquibaseConfiguration(Environment env) { this.env = env; } @Bean public SpringLiquibase liquibase(@Qualifier("taskExecutor") Executor executor, @LiquibaseDataSource ObjectProvider<DataSource> liquibaseDataSource, LiquibaseProperties liquibaseProperties, ObjectProvider<DataSource> dataSource, DataSourceProperties dataSourceProperties) { // If you don't want Liquibase to start asynchronously, substitute by this: // SpringLiquibase liquibase = SpringLiquibaseUtil.createSpringLiquibase(liquibaseDataSource.getIfAvailable(), liquibaseProperties, dataSource.getIfUnique(), dataSourceProperties); SpringLiquibase liquibase = SpringLiquibaseUtil.createAsyncSpringLiquibase(this.env, executor, liquibaseDataSource.getIfAvailable(), liquibaseProperties, dataSource.getIfUnique(), dataSourceProperties); liquibase.setChangeLog("classpath:config/liquibase/master.xml"); liquibase.setContexts(liquibaseProperties.getContexts()); liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); liquibase.setLiquibaseSchema(liquibaseProperties.getLiquibaseSchema()); liquibase.setLiquibaseTablespace(liquibaseProperties.getLiquibaseTablespace()); liquibase.setDatabaseChangeLogLockTable(liquibaseProperties.getDatabaseChangeLogLockTable()); liquibase.setDatabaseChangeLogTable(liquibaseProperties.getDatabaseChangeLogTable()); liquibase.setDropFirst(liquibaseProperties.isDropFirst()); liquibase.setLabels(liquibaseProperties.getLabels()); liquibase.setChangeLogParameters(liquibaseProperties.getParameters()); liquibase.setRollbackFile(liquibaseProperties.getRollbackFile()); liquibase.setTestRollbackOnUpdate(liquibaseProperties.isTestRollbackOnUpdate()); if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE))) { liquibase.setShouldRun(false); } else { liquibase.setShouldRun(liquibaseProperties.isEnabled()); log.debug("Configuring Liquibase"); } return liquibase; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
0cf2c4cfb8ea7e0a11bc757d5a468106251dc2bc
dc6bccd984c4fc24c768da0ebb891e263f0cea99
/Dog_ejemplo/src/Dog.java
cee7f8a3f0b9e27512f33a15058cd831f42199f9
[]
no_license
egrteam/bookspring
d2fbb693526f0a3bcaaf9ef5a714a037e2dcc48f
da4d65e355866a30d57eabaafb4545aafa5eb596
refs/heads/master
2023-04-22T12:16:31.289058
2021-05-07T06:25:13
2021-05-07T06:25:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
897
java
import java.util.ArrayList; public class Dog { //atributes private String name; private String breed; private int age; private String color; //constructor public Dog (String name) { this.name = name; this.breed = "Labrador"; this.age = 5; this.color = "Marron"; } //getter an setter @Override public String toString() { return "Dog name= " + getName() + ", Breed= " + getBreed() + ", Age= " + getAge() + ", Color= " + getColor(); } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getBreed() { return breed; } public void setBreed(String breed) { this.breed = breed; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } }
[ "petusin1970@gmail.com" ]
petusin1970@gmail.com
041ce92064dc282c733ba39047fa874d168425b5
2b9cce8df0c715080f31358aec7db6d1186480af
/src/main/java/com/inti/service/interfaces/IRoleService.java
70ac83375fd1386977a67170f2ca115ecac41457
[]
no_license
OussamaINTI/gestionUtilisateur
23bdf56530e8e5ee34fa675c6fff0f5ea9e8b850
eac954db21da9b4dcb66d2ffc856d23925a438f8
refs/heads/master
2020-07-12T04:47:37.691802
2019-08-28T08:28:54
2019-08-28T08:28:54
204,722,414
0
0
null
null
null
null
UTF-8
Java
false
false
260
java
package com.inti.service.interfaces; import java.util.List; import com.inti.entities.Role; public interface IRoleService { public List<Role> findAll(); public Role findOne(Long idRole); public Role save(Role role); public void delete(Long idRole); }
[ "ayari_oussama26@hotmail.fr" ]
ayari_oussama26@hotmail.fr
bd497aa6b2d04ca119ce2f6e97554be5e4e949e3
df134b422960de6fb179f36ca97ab574b0f1d69f
/net/minecraft/server/v1_16_R2/CriterionTriggerEffectsChanged.java
767974f11d24c902bf151726fbec9258d03cb254
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
1,978
java
/* */ package net.minecraft.server.v1_16_R2; /* */ /* */ import com.google.gson.JsonObject; /* */ /* */ public class CriterionTriggerEffectsChanged /* */ extends CriterionTriggerAbstract<CriterionTriggerEffectsChanged.a> /* */ { /* 8 */ private static final MinecraftKey a = new MinecraftKey("effects_changed"); /* */ /* */ /* */ public MinecraftKey a() { /* 12 */ return a; /* */ } /* */ /* */ /* */ public a b(JsonObject var0, CriterionConditionEntity.b var1, LootDeserializationContext var2) { /* 17 */ CriterionConditionMobEffect var3 = CriterionConditionMobEffect.a(var0.get("effects")); /* 18 */ return new a(var1, var3); /* */ } /* */ /* */ public void a(EntityPlayer var0) { /* 22 */ a(var0, var1 -> var1.a(var0)); /* */ } /* */ /* */ public static class a extends CriterionInstanceAbstract { /* */ private final CriterionConditionMobEffect a; /* */ /* */ public a(CriterionConditionEntity.b var0, CriterionConditionMobEffect var1) { /* 29 */ super(CriterionTriggerEffectsChanged.b(), var0); /* 30 */ this.a = var1; /* */ } /* */ /* */ public static a a(CriterionConditionMobEffect var0) { /* 34 */ return new a(CriterionConditionEntity.b.a, var0); /* */ } /* */ /* */ public boolean a(EntityPlayer var0) { /* 38 */ return this.a.a(var0); /* */ } /* */ /* */ /* */ public JsonObject a(LootSerializationContext var0) { /* 43 */ JsonObject var1 = super.a(var0); /* */ /* 45 */ var1.add("effects", this.a.b()); /* */ /* 47 */ return var1; /* */ } /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\net\minecraft\server\v1_16_R2\CriterionTriggerEffectsChanged.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
5022933df6246178928d3be4297fb4048d1a9219
2d89eaac234844f42dae92f2829b1d48729569b7
/src/main/java/org/mapdb/util/JavaUtils.java
b01f8c52f1756ebe3334aa13c678d44a17600b1e
[ "Apache-2.0" ]
permissive
Mu-L/mapdb
618da8cf24a4c6ec8c988ee7e3212c0eaa8059ce
8721c0e824d8d546ecc76639c05ccbc618279511
refs/heads/master
2023-04-08T01:37:41.632503
2023-03-19T16:53:58
2023-03-19T16:53:58
270,608,441
0
0
Apache-2.0
2023-03-20T01:53:10
2020-06-08T09:29:51
Java
UTF-8
Java
false
false
305
java
package org.mapdb.util; import java.util.Comparator; public class JavaUtils { public static final Comparator COMPARABLE_COMPARATOR = new Comparator<Comparable>() { @Override public int compare(Comparable o1, Comparable o2) { return o1.compareTo(o2); } }; }
[ "jan@kotek.net" ]
jan@kotek.net
0857bc67ceaa54e035bfa785597b17ec529e2783
244cfec59b683ca92ae3aea6b5e974a39b3b382d
/jwtauthentication/src/main/java/com/jwt/model/JwtResponse.java
7a122ad2e43fe8ebc0b65e77264d5fe3f02398f7
[]
no_license
gaikwadtejesh777/All-SpringBoot-Project
4502466dedf29e4fa144091fea5f46d2bad38c4a
81e9d93a49382bbfd18d1540b72ce8437b0aa0d2
refs/heads/master
2023-07-05T03:51:44.898334
2021-08-12T04:53:20
2021-08-12T04:55:36
394,315,208
0
0
null
null
null
null
UTF-8
Java
false
false
313
java
package com.jwt.model; public class JwtResponse { String Token; public JwtResponse(String token) { super(); Token = token; } public JwtResponse() { // TODO Auto-generated constructor stub } public String getToken() { return Token; } public void setToken(String token) { Token = token; } }
[ "gaikwadtejesh777@gmail.com" ]
gaikwadtejesh777@gmail.com
0d047338c3e76a0818bb10f0af86d64ab2bb2a2e
fafdf0267fac5a4e76ebd7ef1f56e3cffeb6b8ae
/src/TestHashDictionary.java
2da7a919ab695ef6183c6b772ba7d24b669b1b4e
[]
no_license
Sirlibrai/Spell-Checker
781fdd12adc61e42bfa1c86bfe921fde1f721e92
8a9531de13932043866664ee504aecb75c807f30
refs/heads/master
2021-01-22T04:41:05.005284
2017-02-13T04:00:47
2017-02-13T04:00:47
81,572,284
0
0
null
null
null
null
UTF-8
Java
false
false
3,926
java
import java.io.File; import java.io.*; import java.util.Iterator; public class TestHashDictionary { public static void main(String[] args) throws DictionaryException { // Test 1: try empty constructor try { HashDictionary h = new HashDictionary(); System.out.println("***Test 1 failed"); } catch (DictionaryException e) {System.out.println(" Test 1 succeeded");} StringHashCode sH = new StringHashCode(); float lF = (float) 0.5; HashDictionary h = new HashDictionary(sH,lF); // Test 2: add and find an entry . Integer i = new Integer(1); h.insert("R3C1"); if (!h.find("R3C1")) System.out.println("***Test 2 failed"); else System.out.println(" Test 2 succeeded"); // Test 3: look for an inexistent key if (h.find("R4C4")) System.out.println("***Test 3 failed"); else System.out.println(" Test 3 succeeded"); // Test 4: try to delete a nonexistent entry. // Should throw an exception. try { h.remove("R6C8"); System.out.println("***Test 4 failed"); } catch (DictionaryException e) { System.out.println(" Test 4 succeeded"); } // Test 5: delete an actual entry. // Should not throw an exception. try { h.remove( "R3C1"); if (!h.find("R3C1") ) System.out.println(" Test 5 succeeded"); else System.out.println("***Test 5 failed"); } catch (DictionaryException e) { System.out.println("***Test 5 failed"); } String s; // Test 6: insert 200 different values into the Dictionary // and check that all these values are in the Dictionary Integer temp = new Integer(0); for (int k = 0; k < 200; ++k) { s = (new Integer(k)).toString(); h.insert("R"+s+"C"+s); } boolean fail = false; for (int k = 0; k < 200; ++k) { s = (new Integer(k)).toString(); if (!h.find("R"+s+"C"+s) ) { fail = true; } } if ( fail ) System.out.println("***Test 6 failed"); else System.out.println(" Test 6 succeeded"); // Test 7: Delete a lot of entries from the Dictionary fail = false; try { for ( int k = 0; k < 200; ++k ) { s = (new Integer(k)).toString(); h.remove("R"+s+"C"+s); } for (int k = 0; k < 200; ++k) { s = (new Integer(k)).toString(); if (h.find("R"+s+"C"+s) ) { fail = true; } } } catch (DictionaryException e) { System.out.println("***Test 7 failed"); fail = true; } if ( !fail) System.out.println(" Test 7 succeeded"); else System.out.println("***Test 7 failed"); // Test 8: Get iterator over all keys fail = false; h = new HashDictionary(sH,lF); for (int k = 0; k < 100; k++) { s = (new Integer(k)).toString(); h.insert(s); } try { for (int k = 10; k < 30; ++k) { s = (new Integer(k)).toString(); h.remove(s); } } catch(DictionaryException e) { fail = true; } Iterator it = h.elements(); int count = 0; while (it.hasNext()){ count= count+1; it.next(); } if ( count == 80 && ! fail ) System.out.println(" Test 8 succeeded"); else System.out.println("****Test 8 failed "); lF = (float) 0.05; long startTime,finishTime; double time; while (lF < 0.99 ){ startTime = System.currentTimeMillis(); h = new HashDictionary(sH,lF); for (int k = 0; k < 10000; ++k) { s = (new Integer(k)).toString(); h.insert(s+"C"+s); } try{ for ( int k = 0; k < 10000; ++k ){ s = (new Integer(k)).toString(); h.remove(s+"C"+s); } } catch (DictionaryException e) { System.out.print("Failure");return;} finishTime = System.currentTimeMillis(); time = finishTime - startTime; System.out.println("For load factor "+lF+ " , average num. of probes is " + h.averNumProbes() + " time in milseconds is "+ time); lF = lF+ (float) 0.05; } } }
[ "Ibrahim@Ibrahims-MacBook-Pro.local" ]
Ibrahim@Ibrahims-MacBook-Pro.local
1e312c1c72a6e9ee4085d8cbdd7644fd1c7dd3e2
f313b1104786fe449eb40c604cd3d147d6791cff
/ayanda/src/main/java/sintulabs/p2p/WifiDirect.java
33b5a1b3a5c61fadb824a40fab591688ca28f0b2
[ "Apache-2.0" ]
permissive
eighthave/ayanda
67a4c557bef5893e4cfa40002ca5b904db892e06
5ae3c14782e061d10c72ba7655223afa804f87fc
refs/heads/master
2021-04-29T22:31:11.412873
2018-02-16T15:00:23
2018-02-16T15:00:23
121,640,208
0
0
null
2018-02-15T14:39:53
2018-02-15T14:39:52
null
UTF-8
Java
false
false
6,252
java
package sintulabs.p2p; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.NetworkInfo; import android.net.wifi.p2p.WifiP2pDevice; import android.net.wifi.p2p.WifiP2pDeviceList; import android.net.wifi.p2p.WifiP2pManager; import android.util.Log; import java.util.ArrayList; import static android.net.wifi.p2p.WifiP2pManager.WIFI_P2P_STATE_DISABLED; import static android.net.wifi.p2p.WifiP2pManager.WIFI_P2P_STATE_ENABLED; /** * WiFi Direct P2P Class for detecting and connecting to nearby devices */ public class WifiDirect extends P2P { private static WifiP2pManager wifiP2pManager; private static WifiP2pManager.Channel wifiDirectChannel; private Context context; private BroadcastReceiver receiver; private IntentFilter intentFilter; private WifiP2pManager.ConnectionInfoListener connectionInfoListener; private Boolean wiFiP2pEnabled = false; private ArrayList <WifiP2pDevice> peers = new ArrayList(); private IWifiDirect iWifiDirect; public WifiDirect(Context context, IWifiDirect iWifiDirect) { this.context = context; this.iWifiDirect = iWifiDirect; initializeWifiDirect(); // IntentFilter for receiver createIntent(); createReceiver(); } private void createIntent() { intentFilter = new IntentFilter(); intentFilter.addAction(WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION); intentFilter.addAction(WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION); intentFilter.addAction(WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION); intentFilter.addAction(WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION); } // Create WifiP2pManager and Channel private void initializeWifiDirect() { wifiP2pManager = (WifiP2pManager) context.getSystemService(context.WIFI_P2P_SERVICE); wifiDirectChannel = wifiP2pManager.initialize(context, context.getMainLooper(), new WifiP2pManager.ChannelListener() { @Override public void onChannelDisconnected() { // On Disconnect reconnect again initializeWifiDirect(); } }); } private void createReceiver() { receiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); switch (action) { case WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION: wifiP2pStateChangedAction(intent); break; case WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION: wifiP2pPeersChangedAction(); break; case WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION: wifiP2pConnectionChangedAction(intent); break; case WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION: // Respond to this device's wifi state changing wifiP2pThisDeviceChangedAction(intent); break; } } }; } public void wifiP2pStateChangedAction(Intent intent) { int state = intent.getIntExtra(WifiP2pManager.EXTRA_WIFI_STATE, -1); switch (state) { case WIFI_P2P_STATE_DISABLED: wiFiP2pEnabled = false; break; case WIFI_P2P_STATE_ENABLED: wiFiP2pEnabled = true; break; } iWifiDirect.wifiP2pStateChangedAction(intent); } public void wifiP2pPeersChangedAction() { if (wifiP2pManager != null) { wifiP2pManager.requestPeers(wifiDirectChannel, new WifiP2pManager.PeerListListener() { @Override public void onPeersAvailable(WifiP2pDeviceList peerList) { peers.clear(); peers.addAll(peerList.getDeviceList()); } }); } iWifiDirect.wifiP2pPeersChangedAction(); } public void wifiP2pConnectionChangedAction(Intent intent) { // Respond to new connection or disconnections if (wifiP2pManager == null) { return; } NetworkInfo networkInfo = (NetworkInfo) intent .getParcelableExtra(WifiP2pManager.EXTRA_NETWORK_INFO); if (networkInfo.isConnected()) { // We are connected with the other device, request connection // info to find group owner IP // wifiP2pManager.requestConnectionInfo(wifiDirectChannel, connectionInfoListener); } iWifiDirect.wifiP2pConnectionChangedAction(intent); } public void wifiP2pThisDeviceChangedAction(Intent intent) { iWifiDirect.wifiP2pThisDeviceChangedAction(intent); } public void registerReceivers() { context.registerReceiver(receiver, intentFilter); } public void unregisterReceivers() { context.unregisterReceiver(receiver); } // look for nearby peers private void discoverPeers() { wifiP2pManager.discoverPeers(wifiDirectChannel, new WifiP2pManager.ActionListener() { @Override public void onSuccess() { } @Override public void onFailure(int reasonCode) { Log.d("Debug", "failed to look for pears: " + reasonCode); } }); } /* Return devices discovered. Method should be called when WIFI_P2P_PEERS_CHANGED_ACTION is complete */ public ArrayList<WifiP2pDevice> getDevicesDiscovered() { return peers; } @Override public void announce() { } @Override public void discover() { discoverPeers(); } @Override public void disconnect() { } @Override public void send() { } @Override public void cancel() { } @Override public Boolean isSupported() { return null; } @Override public Boolean isEnabled() { return null; } }
[ "sabelo@sabelo.io" ]
sabelo@sabelo.io
19a5329956fca1dc317efa43169271f212a880bd
3cd69da4d40f2d97130b5bf15045ba09c219f1fa
/sources/com/google/android/gms/internal/measurement/zzol.java
79541e91c81ff95c7df45ce8e2f847cce9bb5187
[]
no_license
TheWizard91/Album_base_source_from_JADX
946ea3a407b4815ac855ce4313b97bd42e8cab41
e1d228fc2ee550ac19eeac700254af8b0f96080a
refs/heads/master
2023-01-09T08:37:22.062350
2020-11-11T09:52:40
2020-11-11T09:52:40
311,927,971
0
0
null
null
null
null
UTF-8
Java
false
false
818
java
package com.google.android.gms.internal.measurement; /* compiled from: com.google.android.gms:play-services-measurement-impl@@17.4.4 */ public final class zzol implements zzdv<zzoo> { private static zzol zza = new zzol(); private final zzdv<zzoo> zzb; public static boolean zzb() { return ((zzoo) zza.zza()).zza(); } public static boolean zzc() { return ((zzoo) zza.zza()).zzb(); } public static boolean zzd() { return ((zzoo) zza.zza()).zzc(); } public static boolean zze() { return ((zzoo) zza.zza()).zzd(); } private zzol(zzdv<zzoo> zzdv) { this.zzb = zzdu.zza(zzdv); } public zzol() { this(zzdu.zza(new zzon())); } public final /* synthetic */ Object zza() { return this.zzb.zza(); } }
[ "agiapong@gmail.com" ]
agiapong@gmail.com
803ec78ae12674adf2e5a22f0f3642d2f480f314
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/tencentmap/mapsdk/maps/a/hx$1.java
973d9caa6a5113563c948f99c9fa0d6621715663
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
751
java
package com.tencent.tencentmap.mapsdk.maps.a; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.tencentmap.mapsdk.a.cl; class hx$1 implements Runnable { hx$1(hx paramhx) { } public void run() { AppMethodBeat.i(99639); try { if (hx.a(this.a) != null) hx.a(this.a).a(); AppMethodBeat.o(99639); return; } catch (NullPointerException localNullPointerException) { while (true) AppMethodBeat.o(99639); } } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes-dex2jar.jar * Qualified Name: com.tencent.tencentmap.mapsdk.maps.a.hx.1 * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
2efb57273c06b6b2c5ecec0177aaf2c26a55bd95
d2cb1f4f186238ed3075c2748552e9325763a1cb
/methods_all/nonstatic_methods/javax_net_ssl_SSLContext_getClass.java
359aed466a802893b35b4ec01917294173598c80
[]
no_license
Adabot1/data
9e5c64021261bf181b51b4141aab2e2877b9054a
352b77eaebd8efdb4d343b642c71cdbfec35054e
refs/heads/master
2020-05-16T14:22:19.491115
2019-05-25T04:35:00
2019-05-25T04:35:00
183,001,929
4
0
null
null
null
null
UTF-8
Java
false
false
151
java
class javax_net_ssl_SSLContext_getClass{ public static void function() {javax.net.ssl.SSLContext obj = new javax.net.ssl.SSLContext();obj.getClass();}}
[ "peter2008.ok@163.com" ]
peter2008.ok@163.com
85a005dc050e8de952bcb60e81bc0ef0601ad4b3
1f19aec2ecfd756934898cf0ad2758ee18d9eca2
/u-1/u-12/u-11-112/u-11-112-f4552.java
0f588e1a14034de314ea537aa01a1bb8ec97e9e9
[]
no_license
apertureatf/perftest
f6c6e69efad59265197f43af5072aa7af8393a34
584257a0c1ada22e5486052c11395858a87b20d5
refs/heads/master
2020-06-07T17:52:51.172890
2019-06-21T18:53:01
2019-06-21T18:53:01
193,039,805
0
0
null
null
null
null
UTF-8
Java
false
false
105
java
mastercard 5555555555554444 4012888888881881 4222222222222 378282246310005 6011111111111117 696754419603
[ "jenkins@khan.paloaltonetworks.local" ]
jenkins@khan.paloaltonetworks.local
988d90614d33351e2456f4f5ea1778aa5e204d48
4a1fe8215d21fe09b199466967b9644efd1c17b0
/src/main/java/nl/first8/ledcube/rest/JaxRsActivator.java
a34c2fa737c5850cc190a93f280846e629c3b3fb
[]
no_license
cristinanegrean/Ledcube-server
0a443b9a4acdc048e55882adfe585b2c05a5f659
0b40250d336ef8c7892e34503b0e8a45b967410d
refs/heads/master
2020-12-25T10:36:54.074274
2015-08-21T12:50:43
2015-08-21T12:50:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,298
java
/* * JBoss, Home of Professional Open Source * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual * contributors by the @authors tag. See the copyright.txt in the * distribution for a full listing of individual contributors. * * 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 nl.first8.ledcube.rest; import javax.ws.rs.ApplicationPath; import javax.ws.rs.core.Application; /** * A class extending {@link Application} and annotated with @ApplicationPath is the Java EE 7 "no XML" approach to activating * JAX-RS. * * <p> * Resources are served relative to the servlet path specified in the {@link ApplicationPath} annotation. * </p> */ @ApplicationPath("rest") public class JaxRsActivator extends Application { /* class body intentionally left blank */ }
[ "arjanl@aardbeitje.nl" ]
arjanl@aardbeitje.nl
bbcba1fd715dae04088fb8b7ed5bd9ee4685f296
11bbabbcf136a4f662f832a22d3e30f19cfc30ea
/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineEditsViewer/OfflineEditsBinaryLoader.java
969ecf684ecb244caa71a90fb9930c47b6697f85
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
vmware-bdc/hadoop-common-topology
97a97668b7968e648bbf53d5e4d312b6b6f7a2bd
dea5e32c34713ac31cde5ab1c47de8591937c410
refs/heads/trunk
2021-01-18T02:44:15.682906
2012-04-13T00:10:30
2012-04-13T00:10:30
4,013,803
2
0
null
2013-01-17T07:34:09
2012-04-13T08:17:25
Java
UTF-8
Java
false
false
2,537
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hdfs.tools.offlineEditsViewer; import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.hdfs.server.namenode.FSEditLogOp; import org.apache.hadoop.hdfs.server.namenode.EditLogInputStream; /** * OfflineEditsBinaryLoader loads edits from a binary edits file */ @InterfaceAudience.Private @InterfaceStability.Unstable class OfflineEditsBinaryLoader implements OfflineEditsLoader { private OfflineEditsVisitor visitor; private EditLogInputStream inputStream; private boolean fixTxIds; private long nextTxId; /** * Constructor */ public OfflineEditsBinaryLoader(OfflineEditsVisitor visitor, EditLogInputStream inputStream) { this.visitor = visitor; this.inputStream = inputStream; this.fixTxIds = false; this.nextTxId = -1; } /** * Loads edits file, uses visitor to process all elements */ public void loadEdits() throws IOException { try { visitor.start(inputStream.getVersion()); while (true) { FSEditLogOp op = inputStream.readOp(); if (op == null) break; if (fixTxIds) { if (nextTxId <= 0) { nextTxId = op.getTransactionId(); if (nextTxId <= 0) { nextTxId = 1; } } op.setTransactionId(nextTxId); nextTxId++; } visitor.visitOp(op); } visitor.close(null); } catch(IOException e) { // Tell the visitor to clean up, then re-throw the exception visitor.close(e); throw e; } } public void setFixTxIds() { fixTxIds = true; } }
[ "eli@apache.org" ]
eli@apache.org
411b9b9ff5b1f27b484dcc716e914c78d9177b7d
073231dca7e07d8513c8378840f2d22b069ae93f
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201608/ProgrammaticCreative.java
1314530d64ebb298900915205c337c4b30c0a6f7
[ "Apache-2.0" ]
permissive
zaper90/googleads-java-lib
a884dc2268211306416397457ab54798ada6a002
aa441cd7057e6a6b045e18d6e7b7dba306085200
refs/heads/master
2021-01-01T19:14:01.743242
2017-07-17T15:48:32
2017-07-17T15:48:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,436
java
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.ads.dfp.jaxws.v201608; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * A {@code Creative} used for programmatic trafficking. This creative will be auto-created with * the right approval from the buyer. This creative cannot be created through * the API. This creative can be updated. * * * <p>Java class for ProgrammaticCreative complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ProgrammaticCreative"> * &lt;complexContent> * &lt;extension base="{https://www.google.com/apis/ads/publisher/v201608}Creative"> * &lt;sequence> * &lt;element name="isSafeFrameCompatible" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ProgrammaticCreative", propOrder = { "isSafeFrameCompatible" }) public class ProgrammaticCreative extends Creative { protected Boolean isSafeFrameCompatible; /** * Gets the value of the isSafeFrameCompatible property. * * @return * possible object is * {@link Boolean } * */ public Boolean isIsSafeFrameCompatible() { return isSafeFrameCompatible; } /** * Sets the value of the isSafeFrameCompatible property. * * @param value * allowed object is * {@link Boolean } * */ public void setIsSafeFrameCompatible(Boolean value) { this.isSafeFrameCompatible = value; } }
[ "api.cseeley@gmail.com" ]
api.cseeley@gmail.com
110ec9c5c25d15964406942432c05077f31cf9b7
0c2f3644885ee2d0872409596ee17763ae4c74d7
/src/irinka/Second.java
0920c29b6dc9342605f55c8034310e949d3da222
[]
no_license
irinkain/Homeworks
a3d27ed1bdbe3cae56e7bf2d3caa9be93ecee15e
f493b8f342c99781b2e503f13e50c907231f9799
refs/heads/master
2020-09-15T21:12:55.069270
2019-11-23T08:42:17
2019-11-23T08:42:17
223,445,994
0
0
null
null
null
null
UTF-8
Java
false
false
602
java
package irinka; import java.util.ArrayList; import java.util.Random; public class Second { public void Method1(){ Random r = new Random(); ArrayList list = new ArrayList(); for(int i=0;i<12;i++){ list.add((r.nextInt(6) + 5)); } ArrayList list2 = new ArrayList(list); for(int i=0;i<list2.size();i++) { if(i%3 == 0 && i!=0){ list2.add(i,r.nextInt((25 - 20) + 1) + 20); } } System.out.println("საწყისი" + list + " " + "მიღებული"+list2); } }
[ "irina.inashvili.1@btu.edu.ge" ]
irina.inashvili.1@btu.edu.ge
5e67c0e54220048113ac501c37b7e68ee373aa75
2efae10c3d60764ffc22549af9f19906589a22fd
/learn-boot-core/src/main/java/com/boot/learn/exception/InvalidDataException.java
86789b748308ea1c0e498e7192a011c47f1878c1
[]
no_license
looper-tao/spring-boot-project
5617f3bc1a0b991ba1b57a69dd0dd190c308d6b7
cb4fbfc38cb75af065c61e3b6a094ca3852ded12
refs/heads/master
2022-09-13T03:51:20.512053
2021-04-20T09:15:26
2021-04-20T09:15:26
171,794,411
1
0
null
2022-09-01T23:37:21
2019-02-21T03:35:49
Java
UTF-8
Java
false
false
281
java
package com.boot.learn.exception; public class InvalidDataException extends ControllerException { private static final Integer INVALID_DATA_EXCEPTION_CODE = -405; public InvalidDataException(String message) { super(INVALID_DATA_EXCEPTION_CODE, message); } }
[ "taozhengzhi@data88.cn" ]
taozhengzhi@data88.cn
5634dec9e5add9c235136925183d7b1c3505608b
0f68c0f88c5cbccd421449ea960db31a798ebf38
/src/main/java/cn/com/hh/service/mapper/RobotTransactionMapper.java
239d65570bb698a171409be5fa9e5df2812b0b52
[]
no_license
leimu222/exchange
0e5c72658f5986d99dc96a6e860444e2624e90e2
e22bfc530a230ba23088a36b6d86a9a380d7a8ef
refs/heads/master
2023-01-31T16:19:37.498040
2020-12-08T10:30:46
2020-12-08T10:30:46
319,348,177
0
0
null
null
null
null
UTF-8
Java
false
false
1,176
java
package com.common.api.mapper; import com.common.api.model.RobotTransaction; import java.util.List; import org.apache.ibatis.annotations.Param; /** * @author Gavin Lee * @version 1.0 * @date 2020-12-08 18:16:08 * Description: [robot服务实现] */ public interface RobotTransactionMapper{ /** * 查询robot * * @param id robotID * @return robot */ public RobotTransaction selectRobotTransactionById(Long id); /** * 查询robot列表 * * @param robotTransaction robot * @return robot集合 */ public List<RobotTransaction> selectRobotTransactionList(RobotTransaction robotTransaction); /** * 新增robot * * @param robotTransaction robot * @return 结果 */ public int insertRobotTransaction(RobotTransaction robotTransaction); /** * 修改robot * * @param robotTransaction robot * @return 结果 */ public int updateRobotTransaction(RobotTransaction robotTransaction); /** * 删除robot * * @param id robotID * @return 结果 */ public int deleteRobotTransactionById(Long id); /** * 批量删除robot * * @param ids 需要删除的数据ID * @return 结果 */ public int deleteRobotTransactionByIds(Long[] ids); }
[ "2165456@qq.com" ]
2165456@qq.com
d1d9cc10bfbe9c72518082e9a34c4eb249623b80
ce09579d9a1c7ad1d7d7b22203d36d60b8e8a0d1
/AdvOOP/ShapesMaverick/Rectangle.java
8eeaf690544603a70fb3cf8f9a484e66e730de8a
[]
no_license
Mavhawk64/java-1
91e922f5e7cdb01f31448d16919c3aa579a78757
e2d5d9209194c6789a0ed5ee185483293dea9134
refs/heads/main
2023-07-22T09:03:02.641835
2021-08-19T21:27:36
2021-08-19T21:27:36
398,077,857
0
0
null
null
null
null
UTF-8
Java
false
false
777
java
package ShapesMaverick; import java.util.Scanner; public class Rectangle extends Shape { Rectangle() { Scanner sc = new Scanner(System.in); Scanner F = new Scanner(System.in); System.out.println("What size?"); size = F.nextInt(); System.out.println("What symbol would you like to use?"); symbol = sc.nextLine(); for(int alfredo = 0; alfredo < 4; alfredo++) { System.out.println(); } Draw(); } @Override public void Draw () { for(int i = 0; i < size; i++) { for(int j = 0; j < size*2; j++) { System.out.print(symbol + " "); } System.out.println(/**symbol*/); } } }
[ "mavberk@gmail.com" ]
mavberk@gmail.com
de798bf1e0d0d3880d2d3b12bc2aa3bfc424cb44
7172d425a48bd367d61812ccf81bb4046957f469
/convertcurrency/src/main/java/com/ibm/convertcurrency/config/SwaggerConfig.java
84b35301a4a70b6f862e5bc6e9226bf6ff5a37b1
[]
no_license
gugaan/handsoncurrenyconvertorms
e4c925200fbe59b8244ab1fa2428818631703e9e
6aa9eb8568d9b9e2c428140447f140c44f34b79c
refs/heads/master
2023-01-21T09:53:23.161963
2020-11-26T16:12:18
2020-11-26T16:12:18
302,569,811
0
0
null
null
null
null
UTF-8
Java
false
false
859
java
package com.ibm.convertcurrency.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; @Configuration @EnableSwagger2 public class SwaggerConfig { @Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.any()) .build(); } }
[ "w2cluster495@iiht.tech" ]
w2cluster495@iiht.tech
8f4e106f056bc4a515dc4f4274ac8b9c6e4203a6
d66133012ed650a201063ddc85f8b00ee864cf05
/XML_Parse/app/src/main/java/Objects/FeedSchedule.java
6a7ae3bfe5415ad192724e89c93b9db374d8fdc2
[]
no_license
MajinBui/piseas-team7
e9dd621250be354be8afea626d0c7db888985efb
b4340d1c26d7bc3eee6b61584287be97b52148d1
refs/heads/master
2021-06-25T08:31:10.558829
2017-09-08T19:43:56
2017-09-08T19:43:56
97,408,480
1
0
null
null
null
null
UTF-8
Java
false
false
935
java
package Objects; import java.util.Arrays; /** * Created by mmbab on 2/8/2017. */ public class FeedSchedule { private boolean week[]; private int hour, min; public FeedSchedule(int hr, int mn){ week = new boolean[7]; Arrays.fill(week, false); hour = hr; min = mn; } public void setWeek(int day){ week[day] = true; } public boolean getWeek(int day){ return week[day]; } public int getHour(){ return hour; } public int getMin(){ return min; } public int getTimeCompare(){ return hour * 100 + min; } public String getTime(){ String padding = "00"; String temp = Integer.toString(min); return (hour + ":" + (padding.substring(temp.length()) + temp)); } }
[ "mmbabol@gmail.com" ]
mmbabol@gmail.com
0aa2d284d4ebf5e5417506d27bda4df124384c43
ce06bb900b51e4f098f4a14aa9c4624f84119e82
/src/com/practice/features/java8/TestLambdaFunction.java
0a097f1edb7a94a6d4b20f315428974c4c5c45fb
[]
no_license
mandar-soman/java-programs
084c6bff1e247da0c4f0eb568b3375e4c0f8351b
c7a95ab9606fb9decc46f04d8f4ac7d5211f6a12
refs/heads/master
2020-04-08T23:21:10.429818
2018-11-30T13:00:10
2018-11-30T13:00:10
159,821,221
0
0
null
null
null
null
UTF-8
Java
false
false
1,031
java
package com.practice.features.java8; import java.util.ArrayList; import java.util.Comparator; import java.util.List; /** * The class below would give little information of lambda expression introduced in java8 * @author Mandar Soman * */ public class TestLambdaFunction { public static void main(String[] args) { // TODO Auto-generated method stub List<String> list = new ArrayList<>(); list.add("A"); list.add("B"); list.add("C"); list.add("E"); list.add("D"); // JAVA 7 Supported Functionality // below code would change the sequence of the elements // it would change the original list object with updated contents into it. list.sort( new Comparator<String>() { @Override public int compare(String str1, String str2) { return str2.compareTo(str1); } }); System.out.println("List of elements - " + list); // JAVA 8 Supported Functionality for sorting the data. list.sort((str1,str2) -> str1.compareTo(str2)); System.out.println("List of elements - " + list); } }
[ "31560028+mandar-soman@users.noreply.github.com" ]
31560028+mandar-soman@users.noreply.github.com
49ed2fb68e35a176938bcfaa6d2231346d5f8b06
40f611fbc919096842f5c26ca79117f51197f8bd
/SpringCompany/src/test/java/by/spring/tooth/BCryptTest.java
5effcf36edbe05a246d1e0e9a7c79a7e4d8a4575
[]
no_license
GitTooth/Spring-projects
900232d92be8b81c18d651dbef8b4d0b91fc15ed
8ba30646e888eefdc839516f98d7440c75f6e100
refs/heads/master
2021-05-14T15:26:51.578684
2018-02-01T12:39:46
2018-02-01T12:39:46
115,991,752
0
0
null
null
null
null
UTF-8
Java
false
false
323
java
package by.spring.tooth; import org.junit.Test; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; public class BCryptTest { @Test public void bcryptTest() { BCryptPasswordEncoder bcpe = new BCryptPasswordEncoder(); String password = bcpe.encode("1234"); System.out.println(password); } }
[ "stelth47@gmail.com" ]
stelth47@gmail.com
9dd78881e637344307b0e221672e1a792339b8f2
a0c62ece9811147a761369a5f620ad483bb2a603
/src/database/DBServlet.java
5f6aee06dcdb27ccab38dd97d4092d5b4b7d7a73
[]
no_license
EslSuwen/JavaWeb
11f09e6eb725067aa6095c05e45da8d8d2333505
c305049ff723866466b998addec179d389c3dce6
refs/heads/master
2020-05-30T19:23:07.742702
2019-06-22T08:46:34
2019-06-22T08:46:34
189,922,710
0
0
null
null
null
null
UTF-8
Java
false
false
3,313
java
package database; 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 java.io.IOException; import java.io.PrintWriter; import java.sql.*; @WebServlet(name = "DBServlet", value = "/db") public class DBServlet extends HttpServlet { private static final long serialVersionUID = 1L; // JDBC 驱动名及数据库 URL static final String JDBC_DRIVER = "com.mysql.jdbc.Driver"; static final String DB_URL = "jdbc:mysql://localhost:3306/usersdb?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC"; // 数据库的用户名与密码,需要根据自己的设置 static final String USER = "root"; static final String PASS = "19988824"; protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Connection conn = null; Statement stmt = null; // 设置响应内容类型 response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); String title = "Servlet Mysql 测试 - 菜鸟教程"; String docType = "<!DOCTYPE html>\n"; out.println(docType + "<html>\n" + "<head><title>" + title + "</title></head>\n" + "<body bgcolor=\"#f0f0f0\">\n" + "<h1 align=\"center\">" + title + "</h1>\n"); try{ // 注册 JDBC 驱动器 Class.forName("com.mysql.cj.jdbc.Driver"); // 打开一个连接 conn = DriverManager.getConnection(DB_URL,USER,PASS); // 执行 SQL 查询 stmt = conn.createStatement(); String sql; sql = "SELECT name, password FROM users"; ResultSet rs = stmt.executeQuery(sql); // 展开结果集数据库 while(rs.next()){ // 通过字段检索 String name = rs.getString("name"); String password = rs.getString("password"); // 输出数据 out.println("name: " + name); out.println("password: " + password); out.println("<br />"); } out.println("</body></html>"); // 完成后关闭 rs.close(); stmt.close(); conn.close(); } catch(SQLException se) { // 处理 JDBC 错误 se.printStackTrace(); } catch(Exception e) { // 处理 Class.forName 错误 e.printStackTrace(); }finally{ // 最后是用于关闭资源的块 try{ if(stmt!=null) stmt.close(); }catch(SQLException se2){ } try{ if(conn!=null) conn.close(); }catch(SQLException se){ se.printStackTrace(); } } } }
[ "577014284@qq.com" ]
577014284@qq.com
62be17f023770ba8a5dabbf08074f723336ecca1
916dd217a06e3575ddc83ef77ecf432dc0851991
/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationBase.java
68910608b3b811633ba36ce90e5a8cb2dca66c5c
[]
no_license
thakurvivek/felix
6e44ffd82cedae4118e6a246feb7bfb81a29e313
840206dfc05c8336bd45b6af7651d73956ba4b9c
refs/heads/master
2020-12-11T03:48:55.581536
2012-04-19T09:06:49
2012-04-19T09:06:49
25,022,556
0
0
null
null
null
null
UTF-8
Java
false
false
3,122
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.cm.impl; import java.io.IOException; import java.util.Dictionary; import org.apache.felix.cm.PersistenceManager; import org.osgi.service.log.LogService; abstract class ConfigurationBase { /** * The {@link ConfigurationManager configuration manager} instance which * caused this configuration object to be created. */ private final ConfigurationManager configurationManager; // the persistence manager storing this factory mapping private final PersistenceManager persistenceManager; // the basic ID of this instance private final String baseId; protected ConfigurationBase( final ConfigurationManager configurationManager, final PersistenceManager persistenceManager, final String baseId ) { if ( configurationManager == null ) { throw new IllegalArgumentException( "ConfigurationManager must not be null" ); } if ( persistenceManager == null ) { throw new IllegalArgumentException( "PersistenceManager must not be null" ); } this.configurationManager = configurationManager; this.persistenceManager = persistenceManager; this.baseId = baseId; } ConfigurationManager getConfigurationManager() { return configurationManager; } PersistenceManager getPersistenceManager() { return persistenceManager; } String getBaseId() { return baseId; } /** * Returns <code>true</code> if the ConfigurationManager of this * configuration is still active. */ boolean isActive() { return configurationManager.isActive(); } abstract void store() throws IOException; void storeSilently() { try { this.store(); } catch ( IOException ioe ) { configurationManager.log( LogService.LOG_ERROR, "Persisting ID {0} failed", new Object[] { getBaseId(), ioe } ); } } static protected void replaceProperty( Dictionary properties, String key, String value ) { if ( value == null ) { properties.remove( key ); } else { properties.put( key, value ); } } }
[ "fmeschbe@apache.org" ]
fmeschbe@apache.org
e9bdcef0094e646ff5aabab2bf6392d4c0550775
0c222c8260187ea7edf1a48c0876ceebd70fa6fa
/RoomLibrary/05-multiple_query-relation/src/main/java/ru/test/a05_multiple_query_relation/room_bd/EmployeeDao.java
2ea40217f310119dc9928407217a4028a4c7d0fc
[]
no_license
dan9112/work_all
8da454829119c87c380eb0235b24f8ac1eed7418
0205e7dced0fcf22be1a497d111742c0076b2b93
refs/heads/master
2023-03-18T10:27:48.901882
2021-03-10T08:38:13
2021-03-10T08:38:13
337,049,438
0
0
null
null
null
null
UTF-8
Java
false
false
441
java
package ru.test.a05_multiple_query_relation; import androidx.room.Dao; import androidx.room.Query; import java.util.List; @Dao public interface EmployeeDao { @Query("SELECT employee.name, employee.salary, " + "department.name AS department_name " + "FROM employee, department " + "WHERE department.id == employee.department_id") public List<EmployeeDepartment> getEmployeeWithDepartment(); // ... }
[ "58068292+dan9112@users.noreply.github.com" ]
58068292+dan9112@users.noreply.github.com
0b9ffd7fde10b8b9b6f37890dee420ca4aec9b25
7dac185ff3ecc92541e901c0e284e5f90e906554
/target/tomcat/work/Tomcat/localhost/_/org/apache/jsp/General_jsp.java
e8f9956b59349076451f3bc4d56f9abc29621fd6
[]
no_license
ALTAIR81420566/MarketplaceServlet
fdc86e5593e2f17c80671746b397b6eeb00c954b
fb479a943b91d0d82de172b2a9188f840cbb3305
refs/heads/master
2021-08-23T08:17:34.126310
2017-12-04T08:33:54
2017-12-04T08:33:54
112,334,356
0
0
null
null
null
null
UTF-8
Java
false
false
53,248
java
/* * Generated by the Jasper component of Apache Tomcat * Version: Apache Tomcat/7.0.47 * Generated at: 2017-12-04 08:31:56 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. */ package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; public final class General_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static org.apache.jasper.runtime.ProtectedFunctionMapper _jspx_fnmap_0; static { _jspx_fnmap_0= org.apache.jasper.runtime.ProtectedFunctionMapper.getMapForFunction("fn:escapeXml", org.apache.taglibs.standard.functions.Functions.class, "escapeXml", new Class[] {java.lang.String.class}); } private static final javax.servlet.jsp.JspFactory _jspxFactory = javax.servlet.jsp.JspFactory.getDefaultFactory(); private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants; private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fif_0026_005ftest; private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems; private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fchoose; private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest; private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody; private javax.el.ExpressionFactory _el_expressionfactory; private org.apache.tomcat.InstanceManager _jsp_instancemanager; public java.util.Map<java.lang.String,java.lang.Long> getDependants() { return _jspx_dependants; } public void _jspInit() { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); _005fjspx_005ftagPool_005fc_005fchoose = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig()); _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig()); } public void _jspDestroy() { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.release(); _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.release(); _005fjspx_005ftagPool_005fc_005fchoose.release(); _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest.release(); _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.release(); } public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { final javax.servlet.jsp.PageContext pageContext; javax.servlet.http.HttpSession session = null; final javax.servlet.ServletContext application; final javax.servlet.ServletConfig config; javax.servlet.jsp.JspWriter out = null; final java.lang.Object page = this; javax.servlet.jsp.JspWriter _jspx_out = null; javax.servlet.jsp.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; out.write("\r\n"); out.write(" "); request.setCharacterEncoding("UTF-8"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("<!DOCTYPE html>\r\n"); out.write("<html>\r\n"); out.write("<head>\r\n"); out.write(" <meta charset=\"utf-8\">\r\n"); out.write(" <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\r\n"); out.write(" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\r\n"); out.write(" <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->\r\n"); out.write(" <title>General</title>\r\n"); out.write("\r\n"); out.write(" <!-- Bootstrap -->\r\n"); out.write(" <link href=\"css/bootstrap.css\" rel=\"stylesheet\">\r\n"); out.write(" <link href=\"style.css\" rel=\"stylesheet\">\r\n"); out.write("\r\n"); out.write(" <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->\r\n"); out.write(" <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->\r\n"); out.write(" <!--[if lt IE 9]>\r\n"); out.write(" <script src=\"https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.js\"></script>\r\n"); out.write(" <script src=\"https://oss.maxcdn.com/respond/1.4.2/respond.js\"></script>\r\n"); out.write(" <![endif]-->\r\n"); out.write("</head>\r\n"); out.write("<body>\r\n"); out.write("\r\n"); out.write("<div class = \"logInfo\">\r\n"); out.write(" <div class=\"row col-md-offset-2\">\r\n"); out.write(" <div class=\"col-2 col-md-2 \">\r\n"); out.write(" <p>You are logged in as: </p>\r\n"); out.write(" </div>\r\n"); out.write(" <div class=\"col-2 col-md-1 \">\r\n"); out.write(" <p id=\"userLogin\">"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${login}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); out.write("</p>\r\n"); out.write(" </div>\r\n"); out.write(" <div class=\"col-2 col-md-1 \">\r\n"); out.write(" <a id=\"LogOut\" onclick=\"window.location.href='/authorization';\">LogOut</a>\r\n"); out.write(" </div>\r\n"); out.write(" </div>\r\n"); out.write("</div>\r\n"); out.write("<div class=\"container\">\r\n"); out.write("\r\n"); out.write(" <h1>Online marketplace</h1>\r\n"); out.write(" <p>Search parameters</p>\r\n"); out.write(" <p>Keyword: </p>\r\n"); out.write("\r\n"); out.write(" <div class=\"row justify-content-md-center\">\r\n"); out.write("\r\n"); out.write(" <div class=\"row\">\r\n"); out.write(" <form method=\"get\" action=\"/general\">\r\n"); out.write(" <div class=\"col-2 col-md-3 \">\r\n"); out.write(" <p><input maxlength=\"25\" size=\"35\" name=\"searchText\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:escapeXml(general.searchText)}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\"></p>\r\n"); out.write(" </div>\r\n"); out.write(" <div class=\"col-6 col-md-1\">\r\n"); out.write(" <select name=\"findBy\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:escapeXml(general.findBy)}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\">\r\n"); out.write(" <option>Title</option>\r\n"); out.write(" <option>uId</option>\r\n"); out.write(" <option>Description</option>\r\n"); out.write(" </select>\r\n"); out.write(" </div>\r\n"); out.write(" <div class=\"col-2 col-md-1 \">\r\n"); out.write(" <button id = \"searchBtn\" type=\"submit\">Search</button>\r\n"); out.write(" </div>\r\n"); out.write(" </form>\r\n"); out.write(" <div class=\"col-6 col-md-3\">\r\n"); out.write(" "); if (_jspx_meth_c_005fif_005f0(_jspx_page_context)) return; out.write("\r\n"); out.write(" </div>\r\n"); out.write(" </div>\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write(" </div>\r\n"); out.write("\r\n"); out.write(" <form method=\"post\" action=\"/general\">\r\n"); out.write(" <div class=\"table-responsive\">\r\n"); out.write(" <table class=\"table \">\r\n"); out.write(" <tr>\r\n"); out.write(" <th width=\"30\">UID</th>\r\n"); out.write(" <th width=\"100\">Title</th>\r\n"); out.write(" <th width=\"700\">Descriprion</th>\r\n"); out.write(" <th width=\"100\">Seller</th>\r\n"); out.write(" <th width=\"100\">Start price</th>\r\n"); out.write(" <th width=\"100\">Step bid</th>\r\n"); out.write(" <th width=\"200\">Stop Date</th>\r\n"); out.write(" <th width=\"100\">Best offer</th>\r\n"); out.write(" <th width=\"100\">Bidder ID</th>\r\n"); out.write(" <th width=\"200\">Action</th>\r\n"); out.write(" <th></th>\r\n"); out.write(" </tr>\r\n"); out.write("\r\n"); out.write(" "); if (_jspx_meth_c_005fforEach_005f0(_jspx_page_context)) return; out.write("\r\n"); out.write(" </table>\r\n"); out.write(" </div>\r\n"); out.write(" </form>\r\n"); out.write("</div>\r\n"); out.write("\r\n"); out.write("<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->\r\n"); out.write("<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.js\"></script>\r\n"); out.write("<!-- Include all compiled plugins (below), or include individual files as needed -->\r\n"); out.write("<script src=\"js/bootstrap.js\"></script>\r\n"); out.write("<script src=\"js/GeneralPage.js\"></script>\r\n"); out.write("</body>\r\n"); out.write("</html>"); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { out.clearBuffer(); } catch (java.io.IOException e) {} 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_c_005fif_005f0(javax.servlet.jsp.PageContext _jspx_page_context) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f0.setParent(null); // /General.jsp(70,17) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f0.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${!role.equals('guest')}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag(); if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" <div class=\"col-2 col-md-6 \">\r\n"); out.write(" <form method=\"get\" action=\"/add\">\r\n"); out.write(" <button id=\"addBtn\" type=\"submit\" name=\"action\" value=\"add\">Add my product</button>\r\n"); out.write(" </form>\r\n"); out.write(" </div>\r\n"); out.write(" <div class=\"col-5 col-md-6 \">\r\n"); out.write(" <button id = \"myProd\">My products</button>\r\n"); out.write(" </div>\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0); return false; } private boolean _jspx_meth_c_005fforEach_005f0(javax.servlet.jsp.PageContext _jspx_page_context) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); javax.servlet.http.HttpSession session = _jspx_page_context.getSession(); javax.servlet.ServletContext application = _jspx_page_context.getServletContext(); javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)_jspx_page_context.getRequest(); // c:forEach org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_005fforEach_005f0 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class); _jspx_th_c_005fforEach_005f0.setPageContext(_jspx_page_context); _jspx_th_c_005fforEach_005f0.setParent(null); // /General.jsp(104,20) name = items type = javax.el.ValueExpression reqTime = true required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null _jspx_th_c_005fforEach_005f0.setItems(new org.apache.jasper.el.JspValueExpression("/General.jsp(104,20) '${products}'",_el_expressionfactory.createValueExpression(_jspx_page_context.getELContext(),"${products}",java.lang.Object.class)).getValue(_jspx_page_context.getELContext())); // /General.jsp(104,20) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fforEach_005f0.setVar("item"); int[] _jspx_push_body_count_c_005fforEach_005f0 = new int[] { 0 }; try { int _jspx_eval_c_005fforEach_005f0 = _jspx_th_c_005fforEach_005f0.doStartTag(); if (_jspx_eval_c_005fforEach_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" <tr>\r\n"); out.write(" <td>\r\n"); out.write("\r\n"); out.write(" "); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.key.uID}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); out.write("\r\n"); out.write(" </td>\r\n"); out.write(" <td>"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.key.title}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); out.write("</td>\r\n"); out.write(" <td>"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.key.description}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); out.write("</td>\r\n"); out.write(" <td>"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.key.sellerID}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); out.write("</td>\r\n"); out.write(" <td>"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.key.startPrice}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); out.write("</td>\r\n"); out.write(" "); if (_jspx_meth_c_005fchoose_005f0(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write(" "); if (_jspx_meth_c_005fif_005f1(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write(" "); if (_jspx_meth_c_005fif_005f2(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write(" "); if (_jspx_meth_c_005fif_005f3(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write(" "); if (_jspx_meth_c_005fif_005f4(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write("\r\n"); out.write(" </tr>\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fforEach_005f0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fforEach_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { return true; } } catch (java.lang.Throwable _jspx_exception) { while (_jspx_push_body_count_c_005fforEach_005f0[0]-- > 0) out = _jspx_page_context.popBody(); _jspx_th_c_005fforEach_005f0.doCatch(_jspx_exception); } finally { _jspx_th_c_005fforEach_005f0.doFinally(); _005fjspx_005ftagPool_005fc_005fforEach_0026_005fvar_005fitems.reuse(_jspx_th_c_005fforEach_005f0); } return false; } private boolean _jspx_meth_c_005fchoose_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); javax.servlet.http.HttpSession session = _jspx_page_context.getSession(); javax.servlet.ServletContext application = _jspx_page_context.getServletContext(); javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)_jspx_page_context.getRequest(); // c:choose org.apache.taglibs.standard.tag.common.core.ChooseTag _jspx_th_c_005fchoose_005f0 = (org.apache.taglibs.standard.tag.common.core.ChooseTag) _005fjspx_005ftagPool_005fc_005fchoose.get(org.apache.taglibs.standard.tag.common.core.ChooseTag.class); _jspx_th_c_005fchoose_005f0.setPageContext(_jspx_page_context); _jspx_th_c_005fchoose_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0); int _jspx_eval_c_005fchoose_005f0 = _jspx_th_c_005fchoose_005f0.doStartTag(); if (_jspx_eval_c_005fchoose_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" "); if (_jspx_meth_c_005fwhen_005f0(_jspx_th_c_005fchoose_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write(" "); if (_jspx_meth_c_005fwhen_005f1(_jspx_th_c_005fchoose_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fchoose_005f0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fchoose_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fchoose.reuse(_jspx_th_c_005fchoose_005f0); return true; } _005fjspx_005ftagPool_005fc_005fchoose.reuse(_jspx_th_c_005fchoose_005f0); return false; } private boolean _jspx_meth_c_005fwhen_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fchoose_005f0, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); javax.servlet.http.HttpSession session = _jspx_page_context.getSession(); javax.servlet.ServletContext application = _jspx_page_context.getServletContext(); javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)_jspx_page_context.getRequest(); // c:when org.apache.taglibs.standard.tag.rt.core.WhenTag _jspx_th_c_005fwhen_005f0 = (org.apache.taglibs.standard.tag.rt.core.WhenTag) _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.WhenTag.class); _jspx_th_c_005fwhen_005f0.setPageContext(_jspx_page_context); _jspx_th_c_005fwhen_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fchoose_005f0); // /General.jsp(115,32) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fwhen_005f0.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${!item.key.buyNow}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fwhen_005f0 = _jspx_th_c_005fwhen_005f0.doStartTag(); if (_jspx_eval_c_005fwhen_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" <td>"); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.key.step}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); out.write("</td>\r\n"); out.write(" <td>\r\n"); out.write(" "); java.util.Date dateValue = null; dateValue = (java.util.Date) _jspx_page_context.getAttribute("dateValue", javax.servlet.jsp.PageContext.PAGE_SCOPE); if (dateValue == null){ dateValue = new java.util.Date(); _jspx_page_context.setAttribute("dateValue", dateValue, javax.servlet.jsp.PageContext.PAGE_SCOPE); } out.write("\r\n"); out.write(" "); org.apache.jasper.runtime.JspRuntimeLibrary.handleSetPropertyExpression(_jspx_page_context.findAttribute("dateValue"), "time", "${item.key.stopDate}", _jspx_page_context, null); out.write("\r\n"); out.write(" "); if (_jspx_meth_fmt_005fformatDate_005f0(_jspx_th_c_005fwhen_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write("\r\n"); out.write(" </td>\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fwhen_005f0.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fwhen_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest.reuse(_jspx_th_c_005fwhen_005f0); return true; } _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest.reuse(_jspx_th_c_005fwhen_005f0); return false; } private boolean _jspx_meth_fmt_005fformatDate_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fwhen_005f0, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); // fmt:formatDate org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag _jspx_th_fmt_005fformatDate_005f0 = (org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag) _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.get(org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag.class); _jspx_th_fmt_005fformatDate_005f0.setPageContext(_jspx_page_context); _jspx_th_fmt_005fformatDate_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fwhen_005f0); // /General.jsp(121,40) name = value type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_fmt_005fformatDate_005f0.setValue((java.util.Date) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${dateValue}", java.util.Date.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); // /General.jsp(121,40) name = pattern type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_fmt_005fformatDate_005f0.setPattern("dd/MM/yyyy HH:mm"); int _jspx_eval_fmt_005fformatDate_005f0 = _jspx_th_fmt_005fformatDate_005f0.doStartTag(); if (_jspx_th_fmt_005fformatDate_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.reuse(_jspx_th_fmt_005fformatDate_005f0); return true; } _005fjspx_005ftagPool_005ffmt_005fformatDate_0026_005fvalue_005fpattern_005fnobody.reuse(_jspx_th_fmt_005fformatDate_005f0); return false; } private boolean _jspx_meth_c_005fwhen_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fchoose_005f0, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); // c:when org.apache.taglibs.standard.tag.rt.core.WhenTag _jspx_th_c_005fwhen_005f1 = (org.apache.taglibs.standard.tag.rt.core.WhenTag) _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.WhenTag.class); _jspx_th_c_005fwhen_005f1.setPageContext(_jspx_page_context); _jspx_th_c_005fwhen_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fchoose_005f0); // /General.jsp(125,32) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fwhen_005f1.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.key.buyNow}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fwhen_005f1 = _jspx_th_c_005fwhen_005f1.doStartTag(); if (_jspx_eval_c_005fwhen_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" <td>-</td>\r\n"); out.write(" <td>-</td>\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fwhen_005f1.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fwhen_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest.reuse(_jspx_th_c_005fwhen_005f1); return true; } _005fjspx_005ftagPool_005fc_005fwhen_0026_005ftest.reuse(_jspx_th_c_005fwhen_005f1); return false; } private boolean _jspx_meth_c_005fif_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f1 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f1.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0); // /General.jsp(130,28) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f1.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.value.count == 0}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f1 = _jspx_th_c_005fif_005f1.doStartTag(); if (_jspx_eval_c_005fif_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" <td> b</td>\r\n"); out.write(" <td> b</td>\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fif_005f1.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f1); return false; } private boolean _jspx_meth_c_005fif_005f2(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f2 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f2.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f2.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0); // /General.jsp(134,28) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f2.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.value.count != 0}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f2 = _jspx_th_c_005fif_005f2.doStartTag(); if (_jspx_eval_c_005fif_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" <td> "); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.value.count}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); out.write("</td>\r\n"); out.write(" <td> "); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.value.userId}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); out.write("</td>\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fif_005f2.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f2); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f2); return false; } private boolean _jspx_meth_c_005fif_005f3(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f3 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f3.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f3.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0); // /General.jsp(138,28) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f3.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.key.sold}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f3 = _jspx_th_c_005fif_005f3.doStartTag(); if (_jspx_eval_c_005fif_005f3 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" <td>SOLD</td>\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fif_005f3.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f3); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f3); return false; } private boolean _jspx_meth_c_005fif_005f4(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); javax.servlet.http.HttpSession session = _jspx_page_context.getSession(); javax.servlet.ServletContext application = _jspx_page_context.getServletContext(); javax.servlet.http.HttpServletRequest request = (javax.servlet.http.HttpServletRequest)_jspx_page_context.getRequest(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f4 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f4.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f4.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0); // /General.jsp(141,28) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f4.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${!item.key.sold}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f4 = _jspx_th_c_005fif_005f4.doStartTag(); if (_jspx_eval_c_005fif_005f4 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" "); java.util.Date now = null; now = (java.util.Date) _jspx_page_context.getAttribute("now", javax.servlet.jsp.PageContext.PAGE_SCOPE); if (now == null){ now = new java.util.Date(); _jspx_page_context.setAttribute("now", now, javax.servlet.jsp.PageContext.PAGE_SCOPE); } out.write("\r\n"); out.write("\r\n"); out.write(" "); if (_jspx_meth_c_005fif_005f5(_jspx_th_c_005fif_005f4, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fif_005f4.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f4); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f4); return false; } private boolean _jspx_meth_c_005fif_005f5(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fif_005f4, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f5 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f5.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f5.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f4); // /General.jsp(144,36) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f5.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${!role.equals('guest')}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f5 = _jspx_th_c_005fif_005f5.doStartTag(); if (_jspx_eval_c_005fif_005f5 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" "); if (_jspx_meth_c_005fif_005f6(_jspx_th_c_005fif_005f5, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write("\r\n"); out.write(" "); if (_jspx_meth_c_005fif_005f7(_jspx_th_c_005fif_005f5, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fif_005f5.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f5.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f5); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f5); return false; } private boolean _jspx_meth_c_005fif_005f6(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fif_005f5, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f6 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f6.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f6.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f5); // /General.jsp(145,42) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f6.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.key.buyNow}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f6 = _jspx_th_c_005fif_005f6.doStartTag(); if (_jspx_eval_c_005fif_005f6 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" <form method=\"post\" action=\"/general\">\r\n"); out.write(" <input maxlength=\"10\" type=\"hidden\" name=\"productId\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.key.uID}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); out.write("\">\r\n"); out.write(" <td><button id=\"buyNowBtn\" type =\"submit\" name=\"buy\" value=\"true\">Buy now</button></td>\r\n"); out.write(" </form>\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fif_005f6.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f6.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f6); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f6); return false; } private boolean _jspx_meth_c_005fif_005f7(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fif_005f5, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f7 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f7.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f7.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f5); // /General.jsp(152,42) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f7.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${!item.key.buyNow}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f7 = _jspx_th_c_005fif_005f7.doStartTag(); if (_jspx_eval_c_005fif_005f7 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" "); if (_jspx_meth_c_005fif_005f8(_jspx_th_c_005fif_005f7, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write(" "); if (_jspx_meth_c_005fif_005f9(_jspx_th_c_005fif_005f7, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write("\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fif_005f7.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f7.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f7); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f7); return false; } private boolean _jspx_meth_c_005fif_005f8(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fif_005f7, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f8 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f8.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f8.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f7); // /General.jsp(153,46) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f8.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${dateValue.getTime() > now.getTime()}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f8 = _jspx_th_c_005fif_005f8.doStartTag(); if (_jspx_eval_c_005fif_005f8 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" <form method=\"post\" action=\"/general\">\r\n"); out.write(" <td>\r\n"); out.write(" <input type=\"hidden\" name=\"buy\" value=\"false\">\r\n"); out.write(" <input maxlength=\"10\" size=\"5\" type=\"number\" name=\"count\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${fn:escapeXml(products.count)}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, _jspx_fnmap_0, false)); out.write("\">\r\n"); out.write(" <button id=\"bidBtn\" type =\"submit\" name=\"productId\" value=\""); out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${item.key.uID}", java.lang.String.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)); out.write("\">Bid</button>\r\n"); out.write(" </td>\r\n"); out.write(" </form>\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fif_005f8.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f8.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f8); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f8); return false; } private boolean _jspx_meth_c_005fif_005f9(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fif_005f7, javax.servlet.jsp.PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws java.lang.Throwable { javax.servlet.jsp.PageContext pageContext = _jspx_page_context; javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut(); // c:if org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f9 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class); _jspx_th_c_005fif_005f9.setPageContext(_jspx_page_context); _jspx_th_c_005fif_005f9.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fif_005f7); // /General.jsp(162,46) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fif_005f9.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${dateValue.getTime() < now.getTime()}", java.lang.Boolean.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null, false)).booleanValue()); int _jspx_eval_c_005fif_005f9 = _jspx_th_c_005fif_005f9.doStartTag(); if (_jspx_eval_c_005fif_005f9 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" <td>Time is over</td>\r\n"); out.write(" "); int evalDoAfterBody = _jspx_th_c_005fif_005f9.doAfterBody(); if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN) break; } while (true); } if (_jspx_th_c_005fif_005f9.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f9); return true; } _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f9); return false; } }
[ "Ilia_Khirnyi@epam.com" ]
Ilia_Khirnyi@epam.com
c865c02b8d830293ebd1e5d27952e5a54b3854a4
614289f81f6854014d1978d0735939293cbd7850
/MaxTunnel/MaxTunnel-Common/MaxTunnel-Common-Biz/src/main/java/com/bandweaver/tunnel/common/biz/pojo/mam/MeasValueTabdict.java
777d57b44b714d3775080a9f079be29f21327434
[]
no_license
soldiers1989/bw_java
035ea1b3c059d600acf414f0b77d66caa5d96075
ae738cd5b5e8fdb284d1120f0af8a6f0f20eb219
refs/heads/master
2020-08-30T01:59:35.887262
2019-07-05T09:31:03
2019-07-05T09:31:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,247
java
package com.bandweaver.tunnel.common.biz.pojo.mam; import java.io.Serializable; import java.util.Date; public class MeasValueTabdict implements Serializable{ /** * */ private static final long serialVersionUID = 6142415567272413149L; private int id; private int dataType; private int seqNO; private String histabName; private int days; private Date startDate; private Date endDate; public int getId() { return id; } public void setId(int id) { this.id = id; } public int getDataType() { return dataType; } public void setDataType(int dataType) { this.dataType = dataType; } public int getSeqNO() { return seqNO; } public void setSeqNO(int seqNO) { this.seqNO = seqNO; } public String getHistabName() { return histabName; } public void setHistabName(String histabName) { this.histabName = histabName; } public int getDays() { return days; } public void setDays(int days) { this.days = days; } public Date getStartDate() { return startDate; } public void setStartDate(Date startDate) { this.startDate = startDate; } public Date getEndDate() { return endDate; } public void setEndDate(Date endDate) { this.endDate = endDate; } }
[ "swbuild@qq.com" ]
swbuild@qq.com
1b19f9a7c9971225d1b3a9104d58780caa8982d7
c318fe18cc8dc621af709c6e8c727287c67ad406
/src/main/java/cz/jh/sos/Application.java
3bc591181ef88042424d0c22b63e165465453d9c
[]
no_license
martynp123/webovaAplikace3C
4bd65295fb61d6284f3d4f384f7f7b7e19c2d471
9221ac3114f1f3c023ddfc0e3649be6cb29c6abe
refs/heads/master
2020-04-12T03:42:49.884639
2018-12-18T11:20:47
2018-12-18T11:20:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
301
java
package cz.jh.sos; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } }
[ "martindrtikol@seznam.cz" ]
martindrtikol@seznam.cz
d89e1427e3bdbd8fc61e05c8fef39d7db8406620
8ee2f29a9c71f1e86c104c2d7f99e203562d77f3
/samples/petclinic/src/main/java/org/springframework/samples/petclinic/vet/Specialty.java
8170715d33f7bdb11c5ccda13e1e5e4e66398e07
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
sdeleuze/spring-init
f7b26a53906a6a2f616b74bb8b00ea965986e922
557ff02eb2315f3cec3d5befacd9dd0ea6440222
refs/heads/master
2022-11-17T10:11:23.611936
2020-06-26T13:56:24
2020-06-26T13:56:24
275,185,683
0
0
Apache-2.0
2020-06-26T15:16:41
2020-06-26T15:16:41
null
UTF-8
Java
false
false
1,048
java
/* * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.samples.petclinic.vet; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.Table; import org.springframework.samples.petclinic.model.NamedEntity; /** * Models a {@link Vet Vet's} specialty (for example, dentistry). * * @author Juergen Hoeller */ @Entity @Table(name = "specialties") public class Specialty extends NamedEntity implements Serializable { }
[ "dsyer@pivotal.io" ]
dsyer@pivotal.io
fa203862774ba34afe538c6843f8e2d3f85b9e8b
a71dd653720d31d5269aab62d824353d667895f7
/study_maple_admin/src/main/generated/com/maple/admin/entity/QMainBenner.java
0c8ef51d0d48888c5561584d6802618183113177
[]
no_license
choibyeongchae/study-maple-admin
8c54ef093d70c3c0d4e220d2bdac4be451084468
f0b484d8d108c086ea6ff0554b672a2853383fe6
refs/heads/master
2023-07-11T02:04:07.396566
2021-08-09T16:13:15
2021-08-09T16:13:15
367,802,490
0
0
null
null
null
null
UTF-8
Java
false
false
1,754
java
package com.maple.admin.entity; import static com.querydsl.core.types.PathMetadataFactory.*; import com.querydsl.core.types.dsl.*; import com.querydsl.core.types.PathMetadata; import javax.annotation.Generated; import com.querydsl.core.types.Path; /** * QMainBenner is a Querydsl query type for MainBenner */ @Generated("com.querydsl.codegen.EntitySerializer") public class QMainBenner extends EntityPathBase<MainBenner> { private static final long serialVersionUID = -1638083665L; public static final QMainBenner mainBenner = new QMainBenner("mainBenner"); public final com.maple.admin.util.QDateEntityUtil _super = new com.maple.admin.util.QDateEntityUtil(this); public final StringPath banner_restype = createString("banner_restype"); public final StringPath benner_endate = createString("benner_endate"); public final StringPath benner_image = createString("benner_image"); public final NumberPath<Integer> benner_seq = createNumber("benner_seq", Integer.class); public final StringPath benner_stardate = createString("benner_stardate"); public final StringPath benner_title = createString("benner_title"); public final StringPath benner_type = createString("benner_type"); //inherited public final DateTimePath<java.time.Instant> createDate = _super.createDate; //inherited public final DateTimePath<java.time.Instant> updateDate = _super.updateDate; public QMainBenner(String variable) { super(MainBenner.class, forVariable(variable)); } public QMainBenner(Path<? extends MainBenner> path) { super(path.getType(), path.getMetadata()); } public QMainBenner(PathMetadata metadata) { super(MainBenner.class, metadata); } }
[ "choibyeongchae@localhost" ]
choibyeongchae@localhost
210a19f2c59d277c7b60407a7d450dda95a07438
fbf58c468e7dda6e45f90e2e1a6b004ab0a7834d
/app/src/main/java/com/hitasoft/app/howzu/TOS.java
de602b52516ebd3663cf187c2306aaecc4d8b7d4
[]
no_license
OpulaSoftwareAndroid/Howzu
a7a1f25c52ce26718df8518887bfac367743041c
d6bd69883b0274cee9feb62ce298a48c29f64352
refs/heads/master
2020-04-21T11:22:46.872825
2019-03-01T11:23:44
2019-03-01T11:23:44
169,523,164
0
0
null
null
null
null
UTF-8
Java
false
false
4,579
java
package com.hitasoft.app.howzu; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.android.volley.Request; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.VolleyLog; import com.android.volley.toolbox.StringRequest; import com.hitasoft.app.customclass.ProgressWheel; import com.hitasoft.app.helper.NetworkReceiver; import com.hitasoft.app.utils.Constants; import com.hitasoft.app.utils.DefensiveClass; import org.json.JSONException; import org.json.JSONObject; import java.util.HashMap; import java.util.Map; /** * Created by hitasoft on 21/3/17. */ public class TOS extends AppCompatActivity implements NetworkReceiver.ConnectivityReceiverListener { String TAG = "tos"; ImageView backbtn; TextView title, terms, header; ProgressWheel progress; LinearLayout main; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.tos); title = findViewById(R.id.title); backbtn = findViewById(R.id.backbtn); terms = findViewById(R.id.terms_txt); progress = findViewById(R.id.progress); main = findViewById(R.id.main); header = findViewById(R.id.title_txt); backbtn.setVisibility(View.VISIBLE); title.setVisibility(View.VISIBLE); main.setVisibility(View.GONE); progress.setVisibility(View.VISIBLE); progress.spin(); title.setText(getString(R.string.terms_conditions)); // register connection status listener HowzuApplication.getInstance().setConnectivityListener(this); getTos(); backbtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { finish(); } }); } @Override public void onNetworkConnectionChanged(boolean isConnected) { HowzuApplication.showSnack(this, findViewById(R.id.mainLay), isConnected); } @Override protected void onResume() { HowzuApplication.activityResumed(); if (NetworkReceiver.isConnected()) { HowzuApplication.showSnack(this, findViewById(R.id.mainLay), true); } else { HowzuApplication.showSnack(this, findViewById(R.id.mainLay), false); } super.onResume(); } @Override public void onPause() { HowzuApplication.activityPaused(); HowzuApplication.showSnack(this, findViewById(R.id.mainLay), true); super.onPause(); } /** * API Implementation **/ private void getTos() { StringRequest req = new StringRequest(Request.Method.POST, Constants.API_TOS, new Response.Listener<String>() { @Override public void onResponse(String res) { try { JSONObject json = new JSONObject(res); if (DefensiveClass.optString(json, Constants.TAG_STATUS).equalsIgnoreCase("true")) { JSONObject result = json.getJSONObject(Constants.TAG_RESULT); main.setVisibility(View.VISIBLE); progress.setVisibility(View.GONE); header.setText(DefensiveClass.optString(result, Constants.TAG_TITLE)); terms.setText(DefensiveClass.optString(result, Constants.TAG_DESCRIPTION)); } } catch (JSONException e) { e.printStackTrace(); } catch (NullPointerException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { VolleyLog.d(TAG, "Error: " + error.getMessage()); } }) { @Override protected Map<String, String> getParams() { Map<String, String> map = new HashMap<String, String>(); return map; } }; HowzuApplication.getInstance().addToRequestQueue(req, TAG); } }
[ "developeropulasoft@gmail.com" ]
developeropulasoft@gmail.com
60719920e0a865373d9c0d389cdebd7b35645d89
e715c91a70019285abb9de958b6f2eb4e25491e5
/hate/src/test/java/com/cognizant/jose/hate/AppTest.java
fbdcd8e25a7aa00c73a59fb4977737d54b511062
[]
no_license
jmorenete/AutomatedTesting
bd2244c6296b8ac29d3027188d5f57003cd13398
242232befc4e70c20b2b80bf94a84c06883114fe
refs/heads/master
2020-04-10T22:31:53.801687
2018-12-14T14:02:39
2018-12-14T14:02:39
161,326,664
0
0
null
null
null
null
UTF-8
Java
false
false
651
java
package com.cognizant.jose.hate; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest( String testName ) { super( testName ); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite( AppTest.class ); } /** * Rigourous Test :-) */ public void testApp() { assertTrue( true ); } }
[ "jmorenete@outlook.com" ]
jmorenete@outlook.com
49a1a98185a07b9835cca82f1a16c210e62fb81c
c2503b106e989192879f33eac8d59e45f01c18d7
/app/src/androidTest/java/com/example/admin/stormy/ApplicationTest.java
d39d215c931b5c7c6fd41612280d3d1853c7ad5e
[]
no_license
rickydo/Stormy
e8d1d8dc4d16fd911aef09c3aca7ea960a858902
16b70324a6fd578e91dc9df5723cd55443edd259
refs/heads/master
2021-01-19T18:54:34.652259
2015-04-15T00:10:25
2015-04-15T00:10:25
33,963,574
0
0
null
null
null
null
UTF-8
Java
false
false
355
java
package com.example.admin.stormy; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "g3tdo@yahoo.com" ]
g3tdo@yahoo.com
143d0a7048dd8f12c1472469f9708d10c365e2c0
74b47b895b2f739612371f871c7f940502e7165b
/aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/CaptionDescription.java
4757b2b9100b590d968249b8e251cd67f0712bb9
[ "Apache-2.0" ]
permissive
baganda07/aws-sdk-java
fe1958ed679cd95b4c48f971393bf03eb5512799
f19bdb30177106b5d6394223a40a382b87adf742
refs/heads/master
2022-11-09T21:55:43.857201
2022-10-24T21:08:19
2022-10-24T21:08:19
221,028,223
0
0
Apache-2.0
2019-11-11T16:57:12
2019-11-11T16:57:11
null
UTF-8
Java
false
false
15,333
java
/* * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.medialive.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** * Caption Description * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CaptionDescription" target="_top">AWS API * Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CaptionDescription implements Serializable, Cloneable, StructuredPojo { /** * Indicates whether the caption track implements accessibility features such as written descriptions of spoken * dialog, music, and sounds. */ private String accessibility; /** * Specifies which input caption selector to use as a caption source when generating output captions. This field * should match a captionSelector name. */ private String captionSelectorName; /** Additional settings for captions destination that depend on the destination type. */ private CaptionDestinationSettings destinationSettings; /** ISO 639-2 three-digit code: http://www.loc.gov/standards/iso639-2/ */ private String languageCode; /** Human readable information to indicate captions available for players (eg. English, or Spanish). */ private String languageDescription; /** * Name of the caption description. Used to associate a caption description with an output. Names must be unique * within an event. */ private String name; /** * Indicates whether the caption track implements accessibility features such as written descriptions of spoken * dialog, music, and sounds. * * @param accessibility * Indicates whether the caption track implements accessibility features such as written descriptions of * spoken dialog, music, and sounds. * @see AccessibilityType */ public void setAccessibility(String accessibility) { this.accessibility = accessibility; } /** * Indicates whether the caption track implements accessibility features such as written descriptions of spoken * dialog, music, and sounds. * * @return Indicates whether the caption track implements accessibility features such as written descriptions of * spoken dialog, music, and sounds. * @see AccessibilityType */ public String getAccessibility() { return this.accessibility; } /** * Indicates whether the caption track implements accessibility features such as written descriptions of spoken * dialog, music, and sounds. * * @param accessibility * Indicates whether the caption track implements accessibility features such as written descriptions of * spoken dialog, music, and sounds. * @return Returns a reference to this object so that method calls can be chained together. * @see AccessibilityType */ public CaptionDescription withAccessibility(String accessibility) { setAccessibility(accessibility); return this; } /** * Indicates whether the caption track implements accessibility features such as written descriptions of spoken * dialog, music, and sounds. * * @param accessibility * Indicates whether the caption track implements accessibility features such as written descriptions of * spoken dialog, music, and sounds. * @return Returns a reference to this object so that method calls can be chained together. * @see AccessibilityType */ public CaptionDescription withAccessibility(AccessibilityType accessibility) { this.accessibility = accessibility.toString(); return this; } /** * Specifies which input caption selector to use as a caption source when generating output captions. This field * should match a captionSelector name. * * @param captionSelectorName * Specifies which input caption selector to use as a caption source when generating output captions. This * field should match a captionSelector name. */ public void setCaptionSelectorName(String captionSelectorName) { this.captionSelectorName = captionSelectorName; } /** * Specifies which input caption selector to use as a caption source when generating output captions. This field * should match a captionSelector name. * * @return Specifies which input caption selector to use as a caption source when generating output captions. This * field should match a captionSelector name. */ public String getCaptionSelectorName() { return this.captionSelectorName; } /** * Specifies which input caption selector to use as a caption source when generating output captions. This field * should match a captionSelector name. * * @param captionSelectorName * Specifies which input caption selector to use as a caption source when generating output captions. This * field should match a captionSelector name. * @return Returns a reference to this object so that method calls can be chained together. */ public CaptionDescription withCaptionSelectorName(String captionSelectorName) { setCaptionSelectorName(captionSelectorName); return this; } /** * Additional settings for captions destination that depend on the destination type. * * @param destinationSettings * Additional settings for captions destination that depend on the destination type. */ public void setDestinationSettings(CaptionDestinationSettings destinationSettings) { this.destinationSettings = destinationSettings; } /** * Additional settings for captions destination that depend on the destination type. * * @return Additional settings for captions destination that depend on the destination type. */ public CaptionDestinationSettings getDestinationSettings() { return this.destinationSettings; } /** * Additional settings for captions destination that depend on the destination type. * * @param destinationSettings * Additional settings for captions destination that depend on the destination type. * @return Returns a reference to this object so that method calls can be chained together. */ public CaptionDescription withDestinationSettings(CaptionDestinationSettings destinationSettings) { setDestinationSettings(destinationSettings); return this; } /** * ISO 639-2 three-digit code: http://www.loc.gov/standards/iso639-2/ * * @param languageCode * ISO 639-2 three-digit code: http://www.loc.gov/standards/iso639-2/ */ public void setLanguageCode(String languageCode) { this.languageCode = languageCode; } /** * ISO 639-2 three-digit code: http://www.loc.gov/standards/iso639-2/ * * @return ISO 639-2 three-digit code: http://www.loc.gov/standards/iso639-2/ */ public String getLanguageCode() { return this.languageCode; } /** * ISO 639-2 three-digit code: http://www.loc.gov/standards/iso639-2/ * * @param languageCode * ISO 639-2 three-digit code: http://www.loc.gov/standards/iso639-2/ * @return Returns a reference to this object so that method calls can be chained together. */ public CaptionDescription withLanguageCode(String languageCode) { setLanguageCode(languageCode); return this; } /** * Human readable information to indicate captions available for players (eg. English, or Spanish). * * @param languageDescription * Human readable information to indicate captions available for players (eg. English, or Spanish). */ public void setLanguageDescription(String languageDescription) { this.languageDescription = languageDescription; } /** * Human readable information to indicate captions available for players (eg. English, or Spanish). * * @return Human readable information to indicate captions available for players (eg. English, or Spanish). */ public String getLanguageDescription() { return this.languageDescription; } /** * Human readable information to indicate captions available for players (eg. English, or Spanish). * * @param languageDescription * Human readable information to indicate captions available for players (eg. English, or Spanish). * @return Returns a reference to this object so that method calls can be chained together. */ public CaptionDescription withLanguageDescription(String languageDescription) { setLanguageDescription(languageDescription); return this; } /** * Name of the caption description. Used to associate a caption description with an output. Names must be unique * within an event. * * @param name * Name of the caption description. Used to associate a caption description with an output. Names must be * unique within an event. */ public void setName(String name) { this.name = name; } /** * Name of the caption description. Used to associate a caption description with an output. Names must be unique * within an event. * * @return Name of the caption description. Used to associate a caption description with an output. Names must be * unique within an event. */ public String getName() { return this.name; } /** * Name of the caption description. Used to associate a caption description with an output. Names must be unique * within an event. * * @param name * Name of the caption description. Used to associate a caption description with an output. Names must be * unique within an event. * @return Returns a reference to this object so that method calls can be chained together. */ public CaptionDescription withName(String name) { setName(name); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAccessibility() != null) sb.append("Accessibility: ").append(getAccessibility()).append(","); if (getCaptionSelectorName() != null) sb.append("CaptionSelectorName: ").append(getCaptionSelectorName()).append(","); if (getDestinationSettings() != null) sb.append("DestinationSettings: ").append(getDestinationSettings()).append(","); if (getLanguageCode() != null) sb.append("LanguageCode: ").append(getLanguageCode()).append(","); if (getLanguageDescription() != null) sb.append("LanguageDescription: ").append(getLanguageDescription()).append(","); if (getName() != null) sb.append("Name: ").append(getName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CaptionDescription == false) return false; CaptionDescription other = (CaptionDescription) obj; if (other.getAccessibility() == null ^ this.getAccessibility() == null) return false; if (other.getAccessibility() != null && other.getAccessibility().equals(this.getAccessibility()) == false) return false; if (other.getCaptionSelectorName() == null ^ this.getCaptionSelectorName() == null) return false; if (other.getCaptionSelectorName() != null && other.getCaptionSelectorName().equals(this.getCaptionSelectorName()) == false) return false; if (other.getDestinationSettings() == null ^ this.getDestinationSettings() == null) return false; if (other.getDestinationSettings() != null && other.getDestinationSettings().equals(this.getDestinationSettings()) == false) return false; if (other.getLanguageCode() == null ^ this.getLanguageCode() == null) return false; if (other.getLanguageCode() != null && other.getLanguageCode().equals(this.getLanguageCode()) == false) return false; if (other.getLanguageDescription() == null ^ this.getLanguageDescription() == null) return false; if (other.getLanguageDescription() != null && other.getLanguageDescription().equals(this.getLanguageDescription()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAccessibility() == null) ? 0 : getAccessibility().hashCode()); hashCode = prime * hashCode + ((getCaptionSelectorName() == null) ? 0 : getCaptionSelectorName().hashCode()); hashCode = prime * hashCode + ((getDestinationSettings() == null) ? 0 : getDestinationSettings().hashCode()); hashCode = prime * hashCode + ((getLanguageCode() == null) ? 0 : getLanguageCode().hashCode()); hashCode = prime * hashCode + ((getLanguageDescription() == null) ? 0 : getLanguageDescription().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); return hashCode; } @Override public CaptionDescription clone() { try { return (CaptionDescription) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.medialive.model.transform.CaptionDescriptionMarshaller.getInstance().marshall(this, protocolMarshaller); } }
[ "" ]
b378b06a21f337b0ec022d90f32248cd306374d5
fbddd1e78c24c41c6f47aa3bd74baabb5974e80d
/product-service/src/main/java/com/vivekchutke/microservice/product/productservice/configuration/WebSecurity.java
6dcd1563c294de3336d377ea641487651e184d11
[]
no_license
vivekchutke/eCommerceCheckout
765a06d19de8481e0d3e07acde802dbf0bf50308
c11ff52cc0e5d8d2c96f1208bf0ef4221cb6b6c4
refs/heads/master
2020-06-26T14:42:52.414094
2019-08-22T18:14:01
2019-08-22T18:14:01
199,662,051
0
0
null
null
null
null
UTF-8
Java
false
false
1,455
java
package com.vivekchutke.microservice.product.productservice.configuration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @Configuration @EnableWebSecurity public class WebSecurity extends WebSecurityConfigurerAdapter { Logger logger = LoggerFactory.getLogger(WebSecurity.class); // @Override // protected void configure(HttpSecurity http) throws Exception { // http.authorizeRequests() // .antMatchers("/action/**") // .access("isFullyAuthenticated()") // .and() // .formLogin() // .and() // .csrf().disable(); // } // @Override protected void configure(HttpSecurity http) throws Exception { logger.info("************* In WebSecuritys configure method: "+http.toString()); http.authorizeRequests().anyRequest().permitAll(); // Added so we can refresh through http://<AppName>/actuator/refresh. Without this is was giving me forbidden exception. // The issue is still not resolved as now I am getting 404 exception http.csrf().disable(); } }
[ "vivekchutke@gmail.com" ]
vivekchutke@gmail.com
90cd4bcd7a388071a94b1d4c3ded4995b41298f0
d9eb2ca167cc7f6246d2e9f511b2252a11d64469
/src/카카오19/RE_Test5_1.java
5683ab361a2aef3714bfd8d34e65b295fa2b16a7
[]
no_license
WooVictory/Algorithm
0d027c2ef003dfa6ea583cfcb594d9f35d92b707
f40037092ca3061b168fbcaf993b9af00dfacfae
refs/heads/master
2021-07-07T05:21:51.291148
2020-07-16T11:55:33
2020-07-16T11:55:33
144,263,650
3
1
null
null
null
null
UTF-8
Java
false
false
7,250
java
package 카카오19; import java.util.*; /** * created by victory_woo on 2020/05/07 * 카카오 19 기출. * 다시 푸는 중. * 매칭 점수. */ public class RE_Test5_1 { public static void main(String[] args) { String[] pages = {"<html lang=\"ko\" xml:lang=\"ko\" xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n <meta charset=\"utf-8\">\n <meta property=\"og:url\" content=\"https://a.com\"/>\n</head> \n<body>\nBlind Lorem Blind ipsum dolor Blind test sit amet, consectetur adipiscing elit. \n<a href=\"https://b.com\"> Link to b </a>\n</body>\n</html>", "<html lang=\"ko\" xml:lang=\"ko\" xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n <meta charset=\"utf-8\">\n <meta property=\"og:url\" content=\"https://b.com\"/>\n</head> \n<body>\nSuspendisse potenti. Vivamus venenatis tellus non turpis bibendum, \n<a href=\"https://a.com\"> Link to a </a>\nblind sed congue urna varius. Suspendisse feugiat nisl ligula, quis malesuada felis hendrerit ut.\n<a href=\"https://c.com\"> Link to c </a>\n</body>\n</html>", "<html lang=\"ko\" xml:lang=\"ko\" xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n <meta charset=\"utf-8\">\n <meta property=\"og:url\" content=\"https://c.com\"/>\n</head> \n<body>\nUt condimentum urna at felis sodales rutrum. Sed dapibus cursus diam, non interdum nulla tempor nec. Phasellus rutrum enim at orci consectetu blind\n<a href=\"https://a.com\"> Link to a </a>\n</body>\n</html>"}; String word = "blind"; System.out.println(solution(word, pages)); String[] pages2 = {"<html lang=\"ko\" xml:lang=\"ko\" xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n <meta charset=\"utf-8\">\n <meta property=\"og:url\" content=\"https://careers.kakao.com/interview/list\"/>\n</head> \n<body>\n<a href=\"https://programmers.co.kr/learn/courses/4673\"></a>#!MuziMuzi!)jayg07con&&\n\n</body>\n</html>", "<html lang=\"ko\" xml:lang=\"ko\" xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n <meta charset=\"utf-8\">\n <meta property=\"og:url\" content=\"https://www.kakaocorp.com\"/>\n</head> \n<body>\ncon%\tmuzI92apeach&2<a href=\"https://hashcode.co.kr/tos\"></a>\n\n\t^\n</body>\n</html>"}; String word2 = "Muzi"; System.out.println(solution(word2, pages2)); } public static int solution(String word, String[] pages) { int size = word.length(); Map<String, Integer> map = new HashMap<>(); List<Page> list = new ArrayList<>(); // 1. 검색어가 대소문자를 구분하지 않기 때문에 소문자로 변환. word = word.toLowerCase(); for (int i = 0; i < pages.length; i++) { // 2. 웹 페이지의 내용 중 텍스트도 모두 소문자로 변경한다. String page = pages[i] = pages[i].toLowerCase(); // 3. <meta 태그를 먼저 찾는다. // 그 안에서 url 을 찾아낸다. int start = 0, mid = 0, end = 0; while (mid <= start) { start = page.indexOf("<meta", start + 1); end = page.indexOf(">", start); mid = page.lastIndexOf("https://", end); } // url 의 종료는 큰 따옴표(")가 되며, url 을 구한다. end = page.indexOf("\"", mid); String url = page.substring(mid, end); // 4. 다음으로 <body> 태그의 위치를 찾고, 이 안에서 검색어와 일치하는 텍스트가 몇 개인지 // 찾아서 기본 점수를 카운트 한다. start = page.indexOf("<body>", end); int basic = 0; for (int positionLeft = start; ; ) { // <body> 안에서 word 와 같은 텍스트의 위치를 찾는다. positionLeft = page.indexOf(word, positionLeft + 1); if (positionLeft == -1) break; // 없다면 -1을 반환. // 검색어와 일치하는 단어의 위치를 찾았다면, 해당 단어 앞뒤로 다른 알파벳이 존재하면 매칭되지 않는다. // 따라서 앞,뒤로 알파벳이 존재하지 않는지 확인한다. if (!Character.isAlphabetic(page.charAt(positionLeft - 1)) && !Character.isAlphabetic(page.charAt(positionLeft + size))) { basic++; positionLeft += size; // 다음 위치를 검색어 길이만큼 이동하여 시작하도록 한다. } } // 5. 외부 링크 수를 구한다. int link = 0; for (int positionLeft = start; ; ) { positionLeft = page.indexOf("<a href", positionLeft + 1); if (positionLeft == -1) break; link++; } // 링크를 Key 로, 인덱스를 Value 로 하여 map 에 저장한다. map.put(url, i); // 리스트에 page 의 정보를 저장한다. list.add(new Page(i, basic, link, (double) basic)); } for (Page page : list) System.out.println(page); // 페이지를 돌면서 외부 링크를 확인하여 링크 점수를 구한 뒤, 매칭 점수를 업데이트 한다. for (int i = 0; i < pages.length; i++) { String page = pages[i]; for (int start = 0, end = 0; ; ) { start = page.indexOf("<a href", start); if (start == -1) break; // 링크를 찾는다. start = page.indexOf("https://", start); end = page.indexOf("\"", start); // 해당 링크를 찾아, map 에서 이 링크가 가리키는 웹 페이지의 인덱스를 얻어온다. String linkUrl = page.substring(start, end); Integer value = map.get(linkUrl); // 인덱스가 존재하면, 그 페이지의 매칭 점수를 가리키는 페이지의 기본 점수와 링크 점수로 매칭 점수를 업데이트 한다. if (value != null) { list.get(value).score += (double) list.get(i).basic / list.get(i).link; } } } // list 를 정렬한다. list.sort(comp); return list.get(0).index; } // 매칭 점수가 같다면 인덱스 번호가 낮은 순으로 정렬하고, 그렇지 않다면 매칭 점수가 높은 순으로 정렬한다. private static Comparator<Page> comp = new Comparator<Page>() { @Override public int compare(Page a, Page b) { if (a.score == b.score) return a.index - b.index; else if (a.score < b.score) return 1; else return -1; } }; static class Page { int index; int basic, link; double score; Page(int index, int basic, int link, double score) { this.index = index; this.basic = basic; this.link = link; this.score = score; } @Override public String toString() { return "Page{" + "index=" + index + ", basic=" + basic + ", link=" + link + ", score=" + score + '}'; } } }
[ "jhsw0375@gmail.com" ]
jhsw0375@gmail.com
3bf3de60868ea25b7991ea126a3d5b33acc34409
cf1d332c0b3248504248acc176bcf52c7156982e
/web/src/main/java/com/arcsoft/supervisor/service/task/impl/DefaultTaskPortTypeStrategy.java
051af455435a3af56853f47995cfa5c449b1c0a5
[]
no_license
wwj912790488/supervisor
377eee94a7a0bf61b182cac26f911b8acbd1ff62
4e74e384158c78b38cea70ccf292718921a8a978
refs/heads/master
2021-01-01T18:16:48.389064
2017-07-25T10:41:47
2017-07-25T10:41:47
98,295,504
1
1
null
2018-12-26T02:41:23
2017-07-25T10:40:54
Java
UTF-8
Java
false
false
891
java
package com.arcsoft.supervisor.service.task.impl; import com.arcsoft.supervisor.model.domain.task.TaskPort.PortType; import com.arcsoft.supervisor.model.vo.task.TaskType; import com.arcsoft.supervisor.service.task.TaskPortTypeStrategy; import org.springframework.stereotype.Service; import java.util.Arrays; import java.util.List; /** * * Default implementation of {@link TaskPortTypeStrategy}.The implementation will create <tt>SCREEN, MOBILE<tt/> * types for compose task, create <tt>SD, HD</tt> types for channel task. * * @author zw. */ @Service("defaultTaskPortTypeStrategy") public class DefaultTaskPortTypeStrategy implements TaskPortTypeStrategy { @Override public List<PortType> create(TaskType taskType) { return taskType.isComposeType() ? Arrays.asList(PortType.SCREEN, PortType.MOBILE) : Arrays.asList(PortType.SD, PortType.HD); } }
[ "wwj@arcvideo.com" ]
wwj@arcvideo.com
45b08e323a0035b0dbbfe3ef87d302bbd529d074
0f4cfd093f19be78c951e82c4232bdb3801a2e3c
/Impro/APP/pl.zgora.uz.imgpro.model.edit/src/pl/zgora/uz/imgpro/model/diagram/provider/SegKMItemProvider.java
51716e56f501f5dbc2401e74ecc5183f9a802c14
[]
no_license
wtrocki/impro
0f54531f44c0f61716fec41cbc3af363cf59830c
541525a3e6ca24b49fa1eca93e70889d71cf8bdd
refs/heads/master
2021-01-01T05:41:08.765830
2012-12-12T19:58:25
2012-12-12T19:58:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,050
java
/******************************************************************************* * Copyright (c) 2011, 2012 Wojciech Trocki * All rights reserved. This program and the accompanying materials * are made available under the terms of the EPL license * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package pl.zgora.uz.imgpro.model.diagram.provider; import java.util.Collection; import java.util.List; import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; import org.eclipse.emf.edit.provider.IItemPropertySource; import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.edit.provider.ViewerNotification; import pl.zgora.uz.imgpro.model.diagram.DiagramPackage; import pl.zgora.uz.imgpro.model.diagram.SegKM; /** * This is the item provider adapter for a {@link pl.zgora.uz.imgpro.model.diagram.SegKM} object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public class SegKMItemProvider extends DiagramElementItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { /** * This constructs an instance from a factory and a notifier. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public SegKMItemProvider(AdapterFactory adapterFactory) { super(adapterFactory); } /** * This returns the property descriptors for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addKM_clustersPropertyDescriptor(object); } return itemPropertyDescriptors; } /** * This adds a property descriptor for the KM clusters feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected void addKM_clustersPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SegKM_KM_clusters_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SegKM_KM_clusters_feature", "_UI_SegKM_type"), DiagramPackage.Literals.SEG_KM__KM_CLUSTERS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } /** * This returns SegKM.gif. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object getImage(Object object) { return overlayImage(object, getResourceLocator().getImage("full/obj16/SegKM")); } /** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String getText(Object object) { String label = ((SegKM)object).getElementName(); return label == null || label.length() == 0 ? getString("_UI_SegKM_type") : getString("_UI_SegKM_type") + " " + label; } /** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(SegKM.class)) { case DiagramPackage.SEG_KM__KM_CLUSTERS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification); } /** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } }
[ "pantroken@gmail.com" ]
pantroken@gmail.com
1906eaa86cec95884ff1347a7fa5857f7375e48d
1f611771fcc4b9e0b7a3d847f5889c28a18a2b4d
/product-server/src/main/java/com/yuanju/productserver/repository/StoreProductRepository.java
bc9069cec2db24f155daa1d7cd356607d14a1df3
[]
no_license
ljx95/product-microservice
aaaafcf515795fdbdc58273c0d396d05ebefe198
d663a4606ae5b78978bc40be01f86a6e05b69324
refs/heads/master
2020-04-17T11:51:23.256801
2019-01-19T14:16:01
2019-01-19T14:16:04
165,506,650
0
0
null
null
null
null
UTF-8
Java
false
false
1,043
java
package com.yuanju.productserver.repository; import com.yuanju.productserver.dataobject.StoreProduct; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; import java.util.List; /** * author: LinjianXiong * Date: 2019/1/17 * Time: 15:29 */ @Repository public interface StoreProductRepository extends JpaRepository<StoreProduct, Integer>,JpaSpecificationExecutor<StoreProduct> { StoreProduct findByStoreProductId(Integer id); @Query("SELECT a FROM StoreProduct a " + " left join a.productInfo u " + " WHERE a.storeId = :storeId AND a.id in :productId") List<StoreProduct> findByStoreIdAndProductId(@Param("storeId") Integer storeId, @Param("productId") List<Integer> productId); List<StoreProduct> findByStoreIdAndProductInfo_IdIn(Integer storeId, List<Integer> productIds); }
[ "ljx_glb@qq.com" ]
ljx_glb@qq.com
aa1b14d87f0be90589b965715db45884b48151a6
be7cf169a4b2f9591074173a9a3001331eddeda1
/Restaurant-ejb/src/java/beanSession/EJBCarte.java
6078040f872d707178948522b4034660499aeb72
[]
no_license
CatRubenJoan/Restaurant
0e2fac3984a614f21195c6849e35a9ab987daffc
5cacf91ab30c46900c461dd8c7acff152232c6c3
refs/heads/master
2018-12-29T00:29:51.394615
2014-03-28T11:07:19
2014-03-28T11:07:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
903
java
package beanSession; import beanEntity.Produit; import java.util.ArrayList; import java.util.Collection; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; @Stateless public class EJBCarte implements EJBCarteLocal { @PersistenceContext(unitName = "Restaurant-ejbPU") private EntityManager em; @Override public Collection<Produit> listeProduitsParCat(String idSousType) { String req = "SELECT p FROM PRODUIT p WHERE p.DISPONIBILITE = :paramID1 AND p.SOUSTYPE_ID = :paramID2"; Query qr = em.createQuery(req); qr.setParameter("paramID1", true); qr.setParameter("paramID2", idSousType); Collection<Produit> carte = (ArrayList) qr.getResultList(); return carte; } public void persist(Object object) { em.persist(object); } }
[ "blt@localhost.localdomain" ]
blt@localhost.localdomain
0ed8a678f3cf3c59391de4018e556c497df403c7
5edc4456249c96a65f194d5c1fc6fac7c77de8c8
/src/main/java/com/xunfang/bdpf/login/controller/HomeController.java
b0c068c09de2978d619cfbbce088cb380758ba4d
[]
no_license
sansom/BDPF
06c9f822a6204de7df554fe553829f06366a946b
ad91ea40fa8b2da3e47994e5c6c95af708095b5b
refs/heads/master
2020-03-19T11:39:53.561188
2018-01-05T09:07:21
2018-01-05T09:07:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,408
java
package com.xunfang.bdpf.login.controller; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.openstack4j.api.compute.ComputeService; import org.openstack4j.model.compute.AbsoluteLimit; import org.openstack4j.model.compute.Limits; 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.ResponseBody; import com.xunfang.bdpf.experiment.grade.entity.StudentVirtual; import com.xunfang.bdpf.experiment.grade.service.StudentVirtualService; import com.xunfang.bdpf.login.entity.HomeInfo; import com.xunfang.bdpf.login.entity.Servers; import com.xunfang.bdpf.login.service.ServiceFactory; import com.xunfang.bdpf.system.user.entity.User; import com.xunfang.bdpf.vmstemplates.introduction.entity.Networks; import com.xunfang.utils.OpenStackApi; /** * * @ClassName HomeController * @Description: 资源监控控制器 * Copyright: Copyright (c) 2017 * Company:深圳市讯方技术股份有限公司 * * @author weiweiqi * @version V1.0 */ @Controller @RequestMapping(value = "home") public class HomeController { @Autowired //班级管理Service接口 private StudentVirtualService studentVirtualService; /** * * @Title: index * @Description: 跳转到资源监控页面 * @param @param model * @param @param request * @param @param session * @param @return 设定文件 * @return String 返回类型 * @throws */ @RequestMapping(value = "") public String index(Model model ,HttpServletRequest request, HttpSession session) { return "home"; } /** * * @Title: getCloudInfo * @Description: 获取云服务器数据 * @param @param request * @param @return 设定文件 * @return Map<String,List<Server>> 返回类型 * @throws */ @RequestMapping(value="getCloudInfo") @ResponseBody public List<Servers> getCloudInfo(HttpServletRequest request, HttpSession session){ String token = (String)session.getAttribute("token"); if(token==null||"".equals(token)){ return null; } Map<String, String> studentMap = new HashMap<String, String>(); List<StudentVirtual> studentVirtuals = new ArrayList<StudentVirtual>(); User user = (User) session.getAttribute("loginuser"); if(user==null){ return null; }else{ String account = null; List<String> classIdlist =null; if(user.getUserType()==2){//管理员 account = null; classIdlist = null; }else{//学生和教师 String[] strs=user.getClassId().split(","); if(user.getClassId().split(",").length>0){ strs=user.getClassId().split(","); }else{ strs=new String[]{user.getClassId()}; } classIdlist = Arrays.asList(strs); if(user.getUserType() == 1){ classIdlist = null; } account = user.getAccount(); } studentVirtuals = studentVirtualService.selectByClassIdAndAccount(account,null, classIdlist); for (StudentVirtual studentVirtual : studentVirtuals) { studentMap.put(studentVirtual.getVirtualId(), studentVirtual.getVirtualId()); } studentMap.put("states", ""); } //通过云主机名称和授权码获取云主机信息 Map<String, List<Servers>> cloudServerMap = OpenStackApi.cloudServerList("",token,studentMap); if(cloudServerMap==null){ return null; } List<Servers> statuslist = cloudServerMap.get("status"); if(statuslist==null){ return null; } return statuslist; } /** * * @Title: getNetworkInfo * @Description: TODO 获取首页显示 信息 * @param @param request * @param @param session * @param @return 设定文件 * @return HomeInfo 返回类型 * @throws */ @RequestMapping(value="getNetworkInfo") @ResponseBody public HomeInfo getNetworkInfo(HttpServletRequest request, HttpSession session){ String token = (String)session.getAttribute("token"); int start = 0;//运行中 int stop = 0;//停止 int other = 0;//其它 HomeInfo homeInfo = new HomeInfo(); //查询开发类模板id List<Networks> networksList = OpenStackApi.cloudNetwork(token); homeInfo.setAllsize(networksList.size()+""); for (Networks networks : networksList) { String status = networks.getStatus(); if(status.equals("ACTIVE")){//运行中 start++; }else if(status.equals("STOP")){//停止 stop++; }else{//其它 other++; } } homeInfo.setStart(start+"");//运行中数量 homeInfo.setStop(stop+"");//停止数量 homeInfo.setOther(other+"");//其它数量 ComputeService computeService = ServiceFactory.computeService(token); Limits limits = computeService.quotaSets().limits(); AbsoluteLimit absolute = limits.getAbsolute(); //云主机资源信息 homeInfo.setRam(absolute.getMaxTotalRAMSize()/1024+""); homeInfo.setRamUsed(absolute.getTotalRAMUsed()/1024+""); homeInfo.setInstances(absolute.getMaxTotalInstances()+""); homeInfo.setInstancesUsed(absolute.getTotalInstancesUsed()+""); homeInfo.setCores(absolute.getMaxTotalCores()+""); homeInfo.setCoresUsed(absolute.getTotalCoresUsed()+""); return homeInfo; } }
[ "yaolianhua@yfzx-0084.yfzx.com" ]
yaolianhua@yfzx-0084.yfzx.com
82266bd7e531269c02425247be5e7657634f8b8c
0ccb096d063d81a38fe8dac96d95d362aa65fa34
/app/src/androidTest/java/com/example/materialdesingpractica/ExampleInstrumentedTest.java
cd9a886d78927c18fe5499f6ae1d2bfe64b0ba90
[]
no_license
Aracelly877/MaterialDesingpractica
e21d207efe5c15c0e92ca96e5b0a92b6f8ac9496
03220462e8e39428b65f571ec500a18aec08b675
refs/heads/master
2022-11-10T18:27:33.778557
2020-07-04T23:12:33
2020-07-04T23:12:33
277,198,635
0
0
null
null
null
null
UTF-8
Java
false
false
782
java
package com.example.materialdesingpractica; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.example.materialdesingpractica", appContext.getPackageName()); } }
[ "67812352+Aracelly877@users.noreply.github.com" ]
67812352+Aracelly877@users.noreply.github.com
5774e9167f090a89399bf8554d4690cff568aa51
21853b13cb4fe22e1bee4bd4f087496e8063cff9
/app/src/androidTest/java/tw/master/eason/bluetoothconnect/ExampleInstrumentedTest.java
e258ca765b9a15d34260eb29581d11c17173b719
[]
no_license
Eason0920/BlueToothConnect
a379e42e2d42f21ea8badc6d311c47faac0809d5
e9e5986668f40d77a155c38a49952a8cc5ae0f94
refs/heads/master
2021-01-20T11:10:41.343726
2017-08-31T16:45:31
2017-08-31T16:45:31
101,667,105
0
0
null
null
null
null
UTF-8
Java
false
false
768
java
package tw.master.eason.bluetoothconnect; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("tw.master.eason.bluetoothconnect", appContext.getPackageName()); } }
[ "impresa0920@gmail.com" ]
impresa0920@gmail.com
d2b58cf227d468bb8c0ecfa06f941a6e14b363d3
2f940a0dce406fc650474e9357f66fe95725ef95
/MyClound/providerone/src/main/java/com/example/providerone/proxy/ImplIface.java
33e52fc2b83d6f9a96658ad3ead5c57a5977d9e2
[]
no_license
mcacl/NewClound
2fb1a08129d1cf91d8ad08671fe07f235f84a38b
fb1da961f2d6327490a90a9f78c4d0bb2d204b53
refs/heads/main
2023-06-21T21:25:42.119140
2021-07-17T04:51:01
2021-07-17T04:51:01
339,051,257
0
0
null
null
null
null
UTF-8
Java
false
false
320
java
package com.example.providerone.proxy; import com.example.providerone.proxy.Iface; /** * 创建时间:2021/2/17 * 创建人:pmc * 描述: */ public class ImplIface implements Iface { @Override public String save() { System.out.println("JDK保存成功"); return "JDK保存成功!"; } }
[ "1442169607@qq.com" ]
1442169607@qq.com
1571b69099b1ee41d34f5a5a30f1dcd62569653f
6ef4869c6bc2ce2e77b422242e347819f6a5f665
/devices/google/Pixel 2/29/QPP6.190730.005/src/framework/com/android/server/wm/ConfigurationContainerProto.java
89f1ee550594823d7eb8b723513dc7759b05d956
[]
no_license
hacking-android/frameworks
40e40396bb2edacccabf8a920fa5722b021fb060
943f0b4d46f72532a419fb6171e40d1c93984c8e
refs/heads/master
2020-07-03T19:32:28.876703
2019-08-13T03:31:06
2019-08-13T03:31:06
202,017,534
2
0
null
2019-08-13T03:33:19
2019-08-12T22:19:30
Java
UTF-8
Java
false
false
334
java
/* * Decompiled with CFR 0.145. */ package com.android.server.wm; public final class ConfigurationContainerProto { public static final long FULL_CONFIGURATION = 1146756268034L; public static final long MERGED_OVERRIDE_CONFIGURATION = 1146756268035L; public static final long OVERRIDE_CONFIGURATION = 1146756268033L; }
[ "me@paulo.costa.nom.br" ]
me@paulo.costa.nom.br
e6e2e2132f427c1886aa956ada2bde4d20096b23
01ded77c90e569855dc783058029ecf499c78bda
/RandomTips-master/app/src/androidTest/java/com/example/randomtips/ExampleInstrumentedTest.java
a295d8151b9fe6378fbac1f350d272d6761f0e1f
[]
no_license
JoeMan97/RandomTips
2abf0dea1fbfb7845498b791239c0fb5eb3d042a
add3325fd3c34b07fd2a0fa491e866a7300e690f
refs/heads/master
2022-11-24T13:39:23.617020
2020-07-29T15:48:41
2020-07-29T15:48:41
283,539,595
0
0
null
null
null
null
UTF-8
Java
false
false
715
java
package com.example.randomtips; import android.content.Context; import androidx.test.InstrumentationRegistry; import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.randomtips", appContext.getPackageName()); } }
[ "joseemanueelct@gmail.com" ]
joseemanueelct@gmail.com
9baf64591048db5e4b5092d3024a30a98369d5b7
018f3c1687eede5ae1a1294eaf4b9b51734bca72
/src/main/java/com/lantushenko/experimental/stub/repositories/AggregatedDataRepository.java
3cad0cf8bb637c5a1fe8f968fe868689e59adabb
[]
no_license
lantushenkoao/gmb-web
f89243df41ad6eb4f10ed59ae3ab616010dd0050
6c5ca1ed41da9a4b14de617b41979a8b7cd302ef
refs/heads/master
2020-12-25T18:51:51.231900
2017-07-02T19:43:31
2017-07-02T19:43:31
93,997,305
0
0
null
null
null
null
UTF-8
Java
false
false
610
java
package com.lantushenko.experimental.stub.repositories; import com.lantushenko.experimental.stub.dao.AggragatedData; import org.apache.ibatis.annotations.Param; import java.util.Date; import java.util.List; public interface AggregatedDataRepository { List<AggragatedData> load(@Param("periodStart") Date periodStart, @Param("periodEnd") Date periodEnd, @Param("tableName") String tableName, @Param("columnName") String columnName, @Param("stationCodes") List<String> stationIds); }
[ "lantushenkoao@mail.ru" ]
lantushenkoao@mail.ru
9a5414caa6abaa610d6fcfb35bb0be606b9538b6
1917cbc87a37daeb4a1c986246e4e6bc8c872ab2
/TheBoss/src/model/constant/CITY_ID.java
d00d312a0e5d5cbec66ece56362d455dcc5476c4
[]
no_license
chi0722/Trunk
75aa399b25c85241a28788ab16c0c0d461986cbb
2e2262cbd867fa7dacca80bf3f1b6ac676cbe961
refs/heads/master
2020-12-24T13:17:30.860993
2014-07-15T09:32:51
2014-07-15T09:32:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
154
java
package model.constant; public enum CITY_ID { NEW_YORK, BOSTON, DETROIT, KANSAS_CITY, CINCINNATI, MEMPHIS, PHILADELPHIA, CHICAGO, MAX_CITY_ID }
[ "chi0722@gmail.com" ]
chi0722@gmail.com
0af29b086a1d15e9dbb00e5776a5a46a3ca97304
6b11eea79582de5a81ffd71b7ec04516caa4a8e0
/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r/android/support/compat/R.java
0d0183a995706f8e6682167cd50fbafa376454e6
[]
no_license
DuongThuyet/DateRangePicker
c67ccc882ad4eed586b4b8209cee58345716f85c
256468de17921f64ca950333cc405bd49fb35065
refs/heads/master
2020-04-26T02:33:02.837818
2019-11-19T04:01:29
2019-11-19T04:01:29
173,237,753
5
0
null
null
null
null
UTF-8
Java
false
false
10,453
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package android.support.compat; public final class R { private R() {} public static final class attr { private attr() {} public static final int alpha = 0x7f020027; public static final int font = 0x7f02007a; public static final int fontProviderAuthority = 0x7f02007c; public static final int fontProviderCerts = 0x7f02007d; public static final int fontProviderFetchStrategy = 0x7f02007e; public static final int fontProviderFetchTimeout = 0x7f02007f; public static final int fontProviderPackage = 0x7f020080; public static final int fontProviderQuery = 0x7f020081; public static final int fontStyle = 0x7f020082; public static final int fontVariationSettings = 0x7f020083; public static final int fontWeight = 0x7f020084; public static final int ttcIndex = 0x7f02014b; } public static final class color { private color() {} public static final int notification_action_color_filter = 0x7f040053; public static final int notification_icon_bg_color = 0x7f040054; public static final int ripple_material_light = 0x7f04005e; public static final int secondary_text_default_material_light = 0x7f040060; } public static final class dimen { private dimen() {} public static final int compat_button_inset_horizontal_material = 0x7f050051; public static final int compat_button_inset_vertical_material = 0x7f050052; public static final int compat_button_padding_horizontal_material = 0x7f050053; public static final int compat_button_padding_vertical_material = 0x7f050054; public static final int compat_control_corner_material = 0x7f050055; public static final int compat_notification_large_icon_max_height = 0x7f050056; public static final int compat_notification_large_icon_max_width = 0x7f050057; public static final int notification_action_icon_size = 0x7f050061; public static final int notification_action_text_size = 0x7f050062; public static final int notification_big_circle_margin = 0x7f050063; public static final int notification_content_margin_start = 0x7f050064; public static final int notification_large_icon_height = 0x7f050065; public static final int notification_large_icon_width = 0x7f050066; public static final int notification_main_column_padding_top = 0x7f050067; public static final int notification_media_narrow_margin = 0x7f050068; public static final int notification_right_icon_size = 0x7f050069; public static final int notification_right_side_padding_top = 0x7f05006a; public static final int notification_small_icon_background_padding = 0x7f05006b; public static final int notification_small_icon_size_as_large = 0x7f05006c; public static final int notification_subtext_size = 0x7f05006d; public static final int notification_top_pad = 0x7f05006e; public static final int notification_top_pad_large_text = 0x7f05006f; } public static final class drawable { private drawable() {} public static final int notification_action_background = 0x7f06005b; public static final int notification_bg = 0x7f06005c; public static final int notification_bg_low = 0x7f06005d; public static final int notification_bg_low_normal = 0x7f06005e; public static final int notification_bg_low_pressed = 0x7f06005f; public static final int notification_bg_normal = 0x7f060060; public static final int notification_bg_normal_pressed = 0x7f060061; public static final int notification_icon_background = 0x7f060062; public static final int notification_template_icon_bg = 0x7f060063; public static final int notification_template_icon_low_bg = 0x7f060064; public static final int notification_tile_bg = 0x7f060065; public static final int notify_panel_notification_icon_bg = 0x7f060066; } public static final class id { private id() {} public static final int action_container = 0x7f07000d; public static final int action_divider = 0x7f07000f; public static final int action_image = 0x7f070010; public static final int action_text = 0x7f070016; public static final int actions = 0x7f070017; public static final int async = 0x7f07001d; public static final int blocking = 0x7f070020; public static final int chronometer = 0x7f07002a; public static final int forever = 0x7f07003f; public static final int icon = 0x7f070045; public static final int icon_group = 0x7f070046; public static final int info = 0x7f070049; public static final int italic = 0x7f07004b; public static final int line1 = 0x7f07004d; public static final int line3 = 0x7f07004e; public static final int normal = 0x7f070056; public static final int notification_background = 0x7f070057; public static final int notification_main_column = 0x7f070058; public static final int notification_main_column_container = 0x7f070059; public static final int right_icon = 0x7f070062; public static final int right_side = 0x7f070063; public static final int tag_transition_group = 0x7f070083; public static final int tag_unhandled_key_event_manager = 0x7f070084; public static final int tag_unhandled_key_listeners = 0x7f070085; public static final int text = 0x7f070086; public static final int text2 = 0x7f070087; public static final int time = 0x7f07008a; public static final int title = 0x7f07008b; } public static final class integer { private integer() {} public static final int status_bar_notification_info_maxnum = 0x7f080004; } public static final class layout { private layout() {} public static final int notification_action = 0x7f09001e; public static final int notification_action_tombstone = 0x7f09001f; public static final int notification_template_custom_big = 0x7f090020; public static final int notification_template_icon_group = 0x7f090021; public static final int notification_template_part_chronometer = 0x7f090022; public static final int notification_template_part_time = 0x7f090023; } public static final class string { private string() {} public static final int status_bar_notification_info_overflow = 0x7f0b0029; } public static final class style { private style() {} public static final int TextAppearance_Compat_Notification = 0x7f0c00f0; public static final int TextAppearance_Compat_Notification_Info = 0x7f0c00f1; public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0c00f2; public static final int TextAppearance_Compat_Notification_Time = 0x7f0c00f3; public static final int TextAppearance_Compat_Notification_Title = 0x7f0c00f4; public static final int Widget_Compat_NotificationActionContainer = 0x7f0c015c; public static final int Widget_Compat_NotificationActionText = 0x7f0c015d; } public static final class styleable { private styleable() {} public static final int[] ColorStateListItem = { 0x10101a5, 0x101031f, 0x7f020027 }; public static final int ColorStateListItem_android_color = 0; public static final int ColorStateListItem_android_alpha = 1; public static final int ColorStateListItem_alpha = 2; public static final int[] FontFamily = { 0x7f02007c, 0x7f02007d, 0x7f02007e, 0x7f02007f, 0x7f020080, 0x7f020081 }; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 1; public static final int FontFamily_fontProviderFetchStrategy = 2; public static final int FontFamily_fontProviderFetchTimeout = 3; public static final int FontFamily_fontProviderPackage = 4; public static final int FontFamily_fontProviderQuery = 5; public static final int[] FontFamilyFont = { 0x1010532, 0x1010533, 0x101053f, 0x101056f, 0x1010570, 0x7f02007a, 0x7f020082, 0x7f020083, 0x7f020084, 0x7f02014b }; public static final int FontFamilyFont_android_font = 0; public static final int FontFamilyFont_android_fontWeight = 1; public static final int FontFamilyFont_android_fontStyle = 2; public static final int FontFamilyFont_android_ttcIndex = 3; public static final int FontFamilyFont_android_fontVariationSettings = 4; public static final int FontFamilyFont_font = 5; public static final int FontFamilyFont_fontStyle = 6; public static final int FontFamilyFont_fontVariationSettings = 7; public static final int FontFamilyFont_fontWeight = 8; public static final int FontFamilyFont_ttcIndex = 9; public static final int[] GradientColor = { 0x101019d, 0x101019e, 0x10101a1, 0x10101a2, 0x10101a3, 0x10101a4, 0x1010201, 0x101020b, 0x1010510, 0x1010511, 0x1010512, 0x1010513 }; public static final int GradientColor_android_startColor = 0; public static final int GradientColor_android_endColor = 1; public static final int GradientColor_android_type = 2; public static final int GradientColor_android_centerX = 3; public static final int GradientColor_android_centerY = 4; public static final int GradientColor_android_gradientRadius = 5; public static final int GradientColor_android_tileMode = 6; public static final int GradientColor_android_centerColor = 7; public static final int GradientColor_android_startX = 8; public static final int GradientColor_android_startY = 9; public static final int GradientColor_android_endX = 10; public static final int GradientColor_android_endY = 11; public static final int[] GradientColorItem = { 0x10101a5, 0x1010514 }; public static final int GradientColorItem_android_color = 0; public static final int GradientColorItem_android_offset = 1; } }
[ "duong.nguyen@metrip.vn" ]
duong.nguyen@metrip.vn
ab4080f20084778dc44c1a22d253bc2296574a16
127ff1a83f44f39d6429139fd1d10202d4360ccf
/lab3/Template/src/utilities/CollectionDemonstrator.java
a35dde8a224cc74430efb70358e4fa9dbab0755e
[]
no_license
haroldsnyers/Advances_java
47ad6ccc0276962deb0ef4644b9089a3471d7f27
ff34cf294dc9369ed4dbe6f6e77154830f83fee7
refs/heads/master
2022-04-09T17:21:16.167396
2020-03-27T11:24:44
2020-03-27T11:24:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,042
java
package utilities; import java.util.ArrayList; import java.util.List; /** * Demonstrates how the collection behave when accessed by multiple threads. * * @author Jean-Michel Busca */ public class CollectionDemonstrator { public static void main(String[] args) throws InterruptedException { // create a shared collection List<String> list = new ArrayList<>(); // start two threads that fill-in the collection Runnable task = () -> { String name = Thread.currentThread().getName(); for (int i = 0; i < 100_000; i++) { list.add(name + i); } }; System.out.println("main: starting thread1"); Thread thread1 = new Thread(task, "thread1"); thread1.start(); System.out.println("main: starting thread2"); Thread thread2 = new Thread(task, "thread2"); thread2.start(); // wait for the threads to complete thread1.join(); thread2.join(); // does the list contain 2 * 100_000 elements? System.out.println("main: list.size()=" + list.size()); } }
[ "16243@ecam.be" ]
16243@ecam.be
66bfd246883c7d5caf8e0bf7f51c111a656843eb
98064e974f426d9910abda97c5e53c62df9bd2c8
/app/src/main/java/com/qdigo/chargerent/entity/data/ConsumeOrder.java
0d50879b8fb938d91cc8958bc09ced8af6f747b9
[]
no_license
dongerqiang/ChargeRent
b3cc8186df2a6f477d331ef5b38c8ec585063c75
91f191694eb86b758a6c39beb9a0accd376e4206
refs/heads/master
2021-05-15T14:00:24.164080
2017-10-18T10:15:53
2017-10-18T10:15:53
107,253,522
0
1
null
null
null
null
UTF-8
Java
false
false
418
java
package com.qdigo.chargerent.entity.data; import java.io.Serializable; public class ConsumeOrder implements Serializable { /** * */ private static final long serialVersionUID = 1L; public String orderId; public String startTime; public int orderStatus; public String endTime; public int minutes; public double consume; public double price; public int unitMinutes; public String policyNo;//保单号 }
[ "www.1371686510@qq.com" ]
www.1371686510@qq.com
5723da6c3c3f3d5c4792005883cf7b5af10d3910
06877b3796d17306298fbf2bf482efa84ed8e666
/Server/src/main/java/protobuf/usertrace/TokenMove.java
39026b25eaaa2571ccf906cdeb39dc94aba026f7
[]
no_license
yavkotylev/GraphDrawer
371c1cbdac8b7199ce769a1b3ac62fc7e1ef4bc2
83175aae5d03f93941c62e1760acb9c48b4977c7
refs/heads/master
2023-05-05T12:54:45.453997
2021-06-04T12:56:11
2021-06-04T12:56:11
373,841,448
0
0
null
null
null
null
UTF-8
Java
false
true
21,670
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: UserTrace.proto package protobuf.usertrace; /** * Protobuf type {@code protobuf.usertrace.TokenMove} */ public final class TokenMove extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:protobuf.usertrace.TokenMove) TokenMoveOrBuilder { private static final long serialVersionUID = 0L; // Use TokenMove.newBuilder() to construct. private TokenMove(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private TokenMove() { tokenId_ = ""; placeId_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new TokenMove(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TokenMove( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); tokenId_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); placeId_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return protobuf.usertrace.UserTraceOuterClass.internal_static_protobuf_usertrace_TokenMove_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return protobuf.usertrace.UserTraceOuterClass.internal_static_protobuf_usertrace_TokenMove_fieldAccessorTable .ensureFieldAccessorsInitialized( protobuf.usertrace.TokenMove.class, protobuf.usertrace.TokenMove.Builder.class); } public static final int TOKENID_FIELD_NUMBER = 1; private volatile java.lang.Object tokenId_; /** * <code>string tokenId = 1;</code> * @return The tokenId. */ @java.lang.Override public java.lang.String getTokenId() { java.lang.Object ref = tokenId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); tokenId_ = s; return s; } } /** * <code>string tokenId = 1;</code> * @return The bytes for tokenId. */ @java.lang.Override public com.google.protobuf.ByteString getTokenIdBytes() { java.lang.Object ref = tokenId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); tokenId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PLACEID_FIELD_NUMBER = 2; private volatile java.lang.Object placeId_; /** * <code>string placeId = 2;</code> * @return The placeId. */ @java.lang.Override public java.lang.String getPlaceId() { java.lang.Object ref = placeId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); placeId_ = s; return s; } } /** * <code>string placeId = 2;</code> * @return The bytes for placeId. */ @java.lang.Override public com.google.protobuf.ByteString getPlaceIdBytes() { java.lang.Object ref = placeId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); placeId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getTokenIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tokenId_); } if (!getPlaceIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, placeId_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getTokenIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tokenId_); } if (!getPlaceIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, placeId_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof protobuf.usertrace.TokenMove)) { return super.equals(obj); } protobuf.usertrace.TokenMove other = (protobuf.usertrace.TokenMove) obj; if (!getTokenId() .equals(other.getTokenId())) return false; if (!getPlaceId() .equals(other.getPlaceId())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TOKENID_FIELD_NUMBER; hash = (53 * hash) + getTokenId().hashCode(); hash = (37 * hash) + PLACEID_FIELD_NUMBER; hash = (53 * hash) + getPlaceId().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static protobuf.usertrace.TokenMove parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static protobuf.usertrace.TokenMove parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static protobuf.usertrace.TokenMove parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static protobuf.usertrace.TokenMove parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static protobuf.usertrace.TokenMove parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static protobuf.usertrace.TokenMove parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static protobuf.usertrace.TokenMove parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static protobuf.usertrace.TokenMove parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static protobuf.usertrace.TokenMove parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static protobuf.usertrace.TokenMove parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static protobuf.usertrace.TokenMove parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static protobuf.usertrace.TokenMove parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(protobuf.usertrace.TokenMove prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code protobuf.usertrace.TokenMove} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:protobuf.usertrace.TokenMove) protobuf.usertrace.TokenMoveOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return protobuf.usertrace.UserTraceOuterClass.internal_static_protobuf_usertrace_TokenMove_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return protobuf.usertrace.UserTraceOuterClass.internal_static_protobuf_usertrace_TokenMove_fieldAccessorTable .ensureFieldAccessorsInitialized( protobuf.usertrace.TokenMove.class, protobuf.usertrace.TokenMove.Builder.class); } // Construct using protobuf.usertrace.TokenMove.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); tokenId_ = ""; placeId_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return protobuf.usertrace.UserTraceOuterClass.internal_static_protobuf_usertrace_TokenMove_descriptor; } @java.lang.Override public protobuf.usertrace.TokenMove getDefaultInstanceForType() { return protobuf.usertrace.TokenMove.getDefaultInstance(); } @java.lang.Override public protobuf.usertrace.TokenMove build() { protobuf.usertrace.TokenMove result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public protobuf.usertrace.TokenMove buildPartial() { protobuf.usertrace.TokenMove result = new protobuf.usertrace.TokenMove(this); result.tokenId_ = tokenId_; result.placeId_ = placeId_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof protobuf.usertrace.TokenMove) { return mergeFrom((protobuf.usertrace.TokenMove)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(protobuf.usertrace.TokenMove other) { if (other == protobuf.usertrace.TokenMove.getDefaultInstance()) return this; if (!other.getTokenId().isEmpty()) { tokenId_ = other.tokenId_; onChanged(); } if (!other.getPlaceId().isEmpty()) { placeId_ = other.placeId_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { protobuf.usertrace.TokenMove parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (protobuf.usertrace.TokenMove) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object tokenId_ = ""; /** * <code>string tokenId = 1;</code> * @return The tokenId. */ public java.lang.String getTokenId() { java.lang.Object ref = tokenId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); tokenId_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string tokenId = 1;</code> * @return The bytes for tokenId. */ public com.google.protobuf.ByteString getTokenIdBytes() { java.lang.Object ref = tokenId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); tokenId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string tokenId = 1;</code> * @param value The tokenId to set. * @return This builder for chaining. */ public Builder setTokenId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } tokenId_ = value; onChanged(); return this; } /** * <code>string tokenId = 1;</code> * @return This builder for chaining. */ public Builder clearTokenId() { tokenId_ = getDefaultInstance().getTokenId(); onChanged(); return this; } /** * <code>string tokenId = 1;</code> * @param value The bytes for tokenId to set. * @return This builder for chaining. */ public Builder setTokenIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); tokenId_ = value; onChanged(); return this; } private java.lang.Object placeId_ = ""; /** * <code>string placeId = 2;</code> * @return The placeId. */ public java.lang.String getPlaceId() { java.lang.Object ref = placeId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); placeId_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string placeId = 2;</code> * @return The bytes for placeId. */ public com.google.protobuf.ByteString getPlaceIdBytes() { java.lang.Object ref = placeId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); placeId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string placeId = 2;</code> * @param value The placeId to set. * @return This builder for chaining. */ public Builder setPlaceId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } placeId_ = value; onChanged(); return this; } /** * <code>string placeId = 2;</code> * @return This builder for chaining. */ public Builder clearPlaceId() { placeId_ = getDefaultInstance().getPlaceId(); onChanged(); return this; } /** * <code>string placeId = 2;</code> * @param value The bytes for placeId to set. * @return This builder for chaining. */ public Builder setPlaceIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); placeId_ = value; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:protobuf.usertrace.TokenMove) } // @@protoc_insertion_point(class_scope:protobuf.usertrace.TokenMove) private static final protobuf.usertrace.TokenMove DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new protobuf.usertrace.TokenMove(); } public static protobuf.usertrace.TokenMove getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<TokenMove> PARSER = new com.google.protobuf.AbstractParser<TokenMove>() { @java.lang.Override public TokenMove parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TokenMove(input, extensionRegistry); } }; public static com.google.protobuf.Parser<TokenMove> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<TokenMove> getParserForType() { return PARSER; } @java.lang.Override public protobuf.usertrace.TokenMove getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
[ "yaroslav@192.168.1.2" ]
yaroslav@192.168.1.2
ebf1b573cba3fb3659e91a1ff9a4deb4563c4cb4
4a90043de152968c87ee5199b7658ca43e0109d8
/src/Exception/Exception05.java
485b2206d4ccdaf399bb3c54c3d103ae9a1f0897
[]
no_license
awakendaydreamer/Study_Java
732a9205ca28c0c2d5e0f4fa5e1f4bd7438e7045
6548a2d2c6a0e295747266598bbbd68240206171
refs/heads/master
2021-01-23T18:08:57.070293
2015-09-21T08:25:05
2015-09-21T08:25:05
41,019,516
0
0
null
null
null
null
UTF-8
Java
false
false
1,029
java
package Exception; public class Exception05 { public static void main(String[] args) { // 1 ~ 100 까지의 누적합(sum)을 구하여 출력하시오 //단, 누적합이 888 이상이 되면 반복을 중지(break;)하고 그때까지의 결과값을 출력 //단, try ~~ catch ~~ 블럭을 이용하여 예외처리 (throw) 하시오 int sum = 0, cnt = 0; try { for (int i = 1; i <= 100; i++){ sum += i; cnt ++; if (sum >= 888) { //break; throw new Exception("888 이상이 되었습니다."); //예외를 만들어서 던짐(catch) }//if }//for System.out.println(sum); System.out.println(cnt); } catch (Exception e) { e.printStackTrace(); } }//main() }//class //throw : 강제로 예외를 발생시키는 것 → 코드 바깥으로(catch 블럭) 예외를 던질 때 사용 //throws : 예외를 처리하는 기법(예외 미루기) → 메서드의 선언부에서 사용 //예)public void job(){ ~~body~~} ▶ public void job() throws XXXException
[ "neometin21@naver.com" ]
neometin21@naver.com
d77857412177780be56beecf22f97f5c9377b728
8363b6c50fe843fb377f3d1e5b6e7200ccf23b52
/cxfws/src/main/java/com/helpezee/interceptors/SetAuthorizationInfoInterceptor.java
0b0425255bfeb073d5732d3dc72bb9ca6b6a6d2a
[]
no_license
rameshkum/WebServices
f1bc78bcd8e10db3a4c36e7ab6be7ac49bf71f25
e70f51fad5456ad28f8459f38e4bdeda74a3825d
refs/heads/master
2021-01-19T21:01:17.452084
2016-06-23T00:55:14
2016-06-23T00:55:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,334
java
package com.helpezee.interceptors; import javax.xml.namespace.QName; import org.apache.cxf.binding.soap.SoapMessage; import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor; import org.apache.cxf.headers.Header; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.phase.Phase; import com.helpezee.dto.Secured; public class SetAuthorizationInfoInterceptor extends AbstractSoapInterceptor { public SetAuthorizationInfoInterceptor() { super(Phase.INVOKE); } public void handleMessage(SoapMessage message) throws Fault { /*DocumentBuilder builder = null; try { builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); } catch (ParserConfigurationException e) { e.printStackTrace(); } Document doc = builder.newDocument(); Element eSecure = doc.createElement("Secured"); Element eUser = doc.createElement("user"); eUser.setTextContent("satya"); Element ePassword = doc.createElement("password"); ePassword.setTextContent("satya"); eSecure.appendChild(eUser); eSecure.appendChild(ePassword);*/ Secured sec = new Secured(); sec.setPassword("satya"); sec.setPassword("pampana"); // Create Header object QName qnameCredentials = new QName("Secured"); Header header = new Header(qnameCredentials, sec); message.getHeaders().add(header); } }
[ "satya.iton@gmail.com" ]
satya.iton@gmail.com
80f288142da0769048c09dadb2a2e20743db5159
8717ae77ca7e320e95beff2faa57954d7008e2be
/src/main/java/com/examples/SpringBatchSample/tasklet/StudentCleanupTargetTasklet.java
b9af1fc8e26ed6fcef160cafada4ef7570a7f28a
[]
no_license
hadisalari2000/SpringBatchSample
63edf6828a15a83d85c7de9d37eb91780416a2b4
e3f20a65b3c1d1156b705a6f5b1962dca2edb71b
refs/heads/master
2023-08-23T23:19:06.310349
2021-10-17T11:25:32
2021-10-17T11:25:32
415,244,975
0
0
null
null
null
null
UTF-8
Java
false
false
828
java
package com.examples.SpringBatchSample.tasklet; import com.examples.SpringBatchSample.repo.StudentRepo; import org.springframework.batch.core.StepContribution; import org.springframework.batch.core.scope.context.ChunkContext; import org.springframework.batch.core.step.tasklet.Tasklet; import org.springframework.batch.repeat.RepeatStatus; import org.springframework.stereotype.Component; @Component public class StudentCleanupTargetTasklet implements Tasklet { private final StudentRepo studentRepo; public StudentCleanupTargetTasklet(StudentRepo studentRepo) { this.studentRepo = studentRepo; } @Override public RepeatStatus execute(StepContribution stepContribution, ChunkContext chunkContext) throws Exception { studentRepo.deleteAll(); return RepeatStatus.FINISHED; } }
[ "H.Salari@sadad.co.ir" ]
H.Salari@sadad.co.ir
14a16db43c2ceef75408f92effc1329a18d288df
ad751aab21033ff028bc2c5aa1d5d4439217fe85
/project-soap-server/src/main/java-genarated/au/com/marlo/trainning/xmltrainning/request/ObjectFactory.java
ec51f5469ede76c026c3bcfa6c12e07f91b766df
[]
no_license
jlessa/marl
37a7f71ed58ec944d7bae295b27d7141b99e274f
dc6bfc480340c352575384fe7ebabbc5e13ea4c5
refs/heads/master
2020-04-17T05:36:07.382835
2016-10-28T16:08:17
2016-10-28T16:08:17
67,254,687
0
0
null
null
null
null
UTF-8
Java
false
false
1,715
java
package au.com.marlo.trainning.xmltrainning.request; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlElementDecl; import javax.xml.bind.annotation.XmlRegistry; import javax.xml.namespace.QName; /** * This object contains factory methods for each * Java content interface and Java element interface * generated in the au.com.marlo.trainning.xmltrainning.request package. * <p>An ObjectFactory allows you to programatically * construct new instances of the Java representation * for XML content. The Java representation of XML * content can consist of schema derived interfaces * and classes representing the binding of schema * type definitions, element declarations and model * groups. Factory methods for each of these are * provided in this class. * */ @XmlRegistry public class ObjectFactory { private final static QName _Request_QNAME = new QName("http://www.marlo.com.au/trainning/xmltrainning/request", "request"); /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: au.com.marlo.trainning.xmltrainning.request * */ public ObjectFactory() { } /** * Create an instance of {@link Request } * */ public Request createRequest() { return new Request(); } /** * Create an instance of {@link JAXBElement }{@code <}{@link Request }{@code >}} * */ @XmlElementDecl(namespace = "http://www.marlo.com.au/trainning/xmltrainning/request", name = "request") public JAXBElement<Request> createRequest(Request value) { return new JAXBElement<Request>(_Request_QNAME, Request.class, null, value); } }
[ "jefferson2459@gmail.com" ]
jefferson2459@gmail.com
25cb046bb93b902037f7ff66e225abfbe984d830
a1b0acf1b6455ab21bde278ab0d860b2f1e50623
/src/main/java/com/prashant/logservice/Instance/LoggerInstance.java
7b37474a1df294d0b703d6b7be9632d565dbfeb1
[]
no_license
prashant0448/log-service
4635e06ae0e1c88378f87ef0f65b139e95771454
bdd5c3ad45a79fa1394b351576f5adffde09dbf4
refs/heads/master
2023-09-03T10:19:50.984082
2021-11-03T11:32:23
2021-11-03T11:32:23
424,197,685
0
0
null
null
null
null
UTF-8
Java
false
false
697
java
package com.prashant.logservice.Instance; public class LoggerInstance { private static LoggerInstance loggerInstance; private String logFilePath; private LoggerInstance(){ } public static LoggerInstance getInstance() { if (loggerInstance == null) loggerInstance = new LoggerInstance(); return loggerInstance; } public String getLogFilePath() { return logFilePath; } public void setLogFilePath(String logFilePath) { this.logFilePath = logFilePath; } @Override public String toString() { return "Logger{" + "logFilePath='" + logFilePath + '\'' + '}'; } }
[ "prashant0448@gmail.com" ]
prashant0448@gmail.com
6ee69e68bf4a42b59efb8d9419257f9b4bb4aad5
6696b4f73095efbb48884d35bd7d250c28d788cf
/EzMeal/Ingredients.java
ec86fae6b04484e0cdfbb422b186ca6586e48dfd
[]
no_license
markn3/EzMeal
4bc6011ead0622d614e835a4d2b67cb7f9638a8d
dccb217557da3eb5a4a46627ce9ad65b5a5b998d
refs/heads/main
2023-04-14T19:14:55.679217
2021-04-26T07:09:53
2021-04-26T07:09:53
351,216,141
0
0
null
2021-03-24T21:37:17
2021-03-24T20:35:39
Java
UTF-8
Java
false
false
2,114
java
import javax.swing.JCheckBox; import java.awt.event.*; import java.io.IOException; import java.sql.SQLException; import java.awt.*; import javax.swing.*; import java.util.ArrayList; import java.util.List; public class Ingredients extends JFrame{ JButton done = new JButton("Done"); List <String> l; JCheckBox [] checklist; User usr; public Ingredients(User usr, List <String> l){ super("Ingredients"); setSize(1080,520); setResizable(false); setLayout(new FlowLayout()); this.usr = usr; this.l = l; this.checklist = new JCheckBox [l.size()]; done.addActionListener(new done_clicked()); JPanel botPanel = new JPanel(); botPanel.setSize(600, 220); botPanel.setBackground(Color.blue); botPanel.add(done); JPanel topPanel = new JPanel(); topPanel.setLayout(new GridLayout(0, 5, 5, 5)); topPanel.setSize(600, 300); for(int i = 0; i < l.size(); i++){ checklist[i] = new JCheckBox(l.get(i)); topPanel.add(checklist[i]); } add(topPanel, BorderLayout.NORTH); add(botPanel, BorderLayout.SOUTH); setVisible(true); } private class done_clicked implements ActionListener{ public void actionPerformed(ActionEvent e){ List <String> saved_ingredients = new ArrayList<String>(); for(int i = 0; i < checklist.length; i++){ if(checklist[i].isSelected()){ saved_ingredients.add(checklist[i].getText()); } } try { usr.updateIngredients(saved_ingredients); } catch (SQLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } } public static void main(String [] args) throws SQLException{ RecipeBook rb = new RecipeBook(); UserBook ub = new UserBook(); List <String> yup = rb.getEveryIngredient(); new Ingredients(ub.users[0] , yup); } }
[ "marknavalta.3@gmail.com" ]
marknavalta.3@gmail.com
3f61b16deb16bcb6b6eb348907e9f84b7f6b489f
a03ddb4111faca852088ea25738bc8b3657e7b5c
/TestTransit/src/org/codehaus/jackson/map/introspect/BasicClassIntrospector$SetterMethodFilter.java
9680fae8943089e0e7c6cf3003015e21d4a2a0f3
[]
no_license
randhika/TestMM
5f0de3aee77b45ca00f59cac227450e79abc801f
4278b34cfe421bcfb8c4e218981069a7d7505628
refs/heads/master
2020-12-26T20:48:28.446555
2014-09-29T14:37:51
2014-09-29T14:37:51
24,874,176
2
0
null
null
null
null
UTF-8
Java
false
false
871
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package org.codehaus.jackson.map.introspect; import java.lang.reflect.Method; import java.lang.reflect.Modifier; // Referenced classes of package org.codehaus.jackson.map.introspect: // MethodFilter, BasicClassIntrospector public static class implements MethodFilter { public boolean includeMethod(Method method) { if (Modifier.isStatic(method.getModifiers())) { return false; } switch (method.getParameterTypes().length) { default: return false; case 1: // '\001' return true; case 2: // '\002' return true; } } public () { } }
[ "metromancn@gmail.com" ]
metromancn@gmail.com
c45171603dd64de1d15c9a136162e110f1833c00
bef166ddbfe0a8812146bbda8be35554ab9f1617
/src/main/java/com/ef/golf/service/impl/AccountServiceImpl.java
84781a35007e91c42054518646193093d9d03189
[]
no_license
jinxing000/test
774d1d4f80e00f9ce02653dc14cf0a18241a0abe
3b750064ffd6baa0defc2b478a7586f82a3697e1
refs/heads/master
2020-11-25T17:28:07.942458
2018-11-29T08:52:27
2018-11-29T08:52:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,528
java
package com.ef.golf.service.impl; import com.ef.golf.mapper.AccountMapper; import com.ef.golf.mapper.JiaoYiHuizongMapper; import com.ef.golf.pojo.Account; import com.ef.golf.service.AccountService; import org.springframework.stereotype.Repository; import javax.annotation.Resource; import java.util.Date; import java.util.HashMap; import java.util.Map; /** * for efgolf * Created by Bart on 2017/9/21. * Date: 2017/9/21 16:03 */ @Repository public class AccountServiceImpl implements AccountService { @Resource private AccountMapper accountMapper; @Resource private JiaoYiHuizongMapper jiaoYiHuizongMapper; public long saveAccount(Account account) { int i = accountMapper.insertSelective(account); return i; } @Override public Integer getAccountUserId(Integer accountId) { return accountMapper.getAccountUserId(accountId); } @Override public int selectAccountId(Long userId) { int end=accountMapper.selectAccountId(userId); return end; } @Override public Account getUserBalance(Integer userId) { return accountMapper.getUserBalance(userId); } @Override public int updateUserBalance(Integer userId,Double balance) { Map<String,Object>map = new HashMap<>(); map.put("userId",userId); map.put("balance",balance); return accountMapper.updateUserBalance(map); } @Override public int updateUserCzBalance(Integer userId, Double czBalance) { Map<String,Object>map = new HashMap<>(); map.put("userId",userId); map.put("czBalance",czBalance); return accountMapper.updateUserCzBalance(map); } @Override public int updateUserSrBalance(Integer userId, Double srBalance) { Map<String,Object>map = new HashMap<>(); map.put("userId",userId); map.put("srBalance",srBalance); return accountMapper.updateUserSrBalance(map); } @Override public int updateUserZsBalance(Integer userId, Double zsBalance) { Map<String,Object>map = new HashMap<>(); map.put("userId",userId); map.put("zsBalance",zsBalance); return accountMapper.updateUserZsBalance(map); } @Override public Account getAccount(Integer userId) { return accountMapper.getAccount(userId); } @Override public Double getUserTxBalance(Date date,String userType, Integer userId) { return jiaoYiHuizongMapper.getUserTxBalance(date,userType,userId); } }
[ "15620532538@163.com" ]
15620532538@163.com
780c39eb82729c17be76ed3a050c483fe483e09a
0f184c44720ef31a38818d3564f8f1820c1a971b
/src/main/java/tango/binder/template/BindingBuilder.java
b49d3630d5bbb7a556d1a5e0163cef01b400b0a7
[]
no_license
tango238/binder
d83e016ffb2b40e6bb7502a575ce6c05725a02f1
435af6574ad224cbd03071d2f28970e0ac4cf2d3
refs/heads/master
2021-01-21T23:03:48.853507
2011-06-12T16:39:55
2011-06-12T16:39:55
1,901,175
0
1
null
null
null
null
UTF-8
Java
false
false
76
java
package tango.binder.template; public abstract class BindingBuilder { }
[ "tanago3@gmail.com" ]
tanago3@gmail.com
6bbfac2fae6b894b33954971bf93254bf1b5a1e0
f113892d67ec1c40a735631d41799f585c33325a
/Polisappen/app/src/main/gen/polis/polisappen/Manifest.java
ba48fc6543bd50d539bc497f0a43b6c0ec7242f2
[]
no_license
Wojak27/TDDD82
8faae10b358d7a5edfff859f8c186a388773b2c0
a840da55ea392729edd0bed55b3e06f8ab6098b4
refs/heads/master
2021-07-26T22:09:06.912156
2019-10-25T10:22:18
2019-10-25T10:22:18
117,802,297
0
0
null
2021-06-29T04:29:10
2018-01-17T07:41:25
Java
UTF-8
Java
false
false
186
java
/*___Generated_by_IDEA___*/ package polis.polisappen; /* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */ public final class Manifest { }
[ "wojaczek27@gmail.com" ]
wojaczek27@gmail.com
dff20583c1d35ad9ec621eb4696c05ca8b31f66c
1e00b9263649a98981cab89c972b08975d41d9b2
/module1/HelloWorld.java
59bb0916c89ea6b49bf67e57df9016c9184949e6
[]
no_license
Schitiz/Coursera-UC_SanDiego-Object-Oriented-Programming-in-Java
8e04cb4a69f258a4db7a476299371f51965a732b
a57e61117e9d4482b7d9e314ef5679615bb92e0e
refs/heads/master
2020-07-14T02:19:28.545837
2019-10-01T16:55:09
2019-10-01T16:55:09
205,211,526
7
7
null
null
null
null
WINDOWS-1252
Java
false
false
3,462
java
package module1; import processing.core.PApplet; import de.fhpotsdam.unfolding.UnfoldingMap; import de.fhpotsdam.unfolding.geo.Location; import de.fhpotsdam.unfolding.providers.AbstractMapProvider; import de.fhpotsdam.unfolding.providers.Google; import de.fhpotsdam.unfolding.providers.MBTilesMapProvider; import de.fhpotsdam.unfolding.utils.MapUtils; /** HelloWorld * An application with two maps side-by-side zoomed in on different locations. * Author: UC San Diego Coursera Intermediate Programming team * @author Your name here * Date: July 17, 2015 * */ public class HelloWorld extends PApplet { /** Your goal: add code to display second map, zoom in, and customize the background. * Feel free to copy and use this code, adding to it, modifying it, etc. * Don't forget the import lines above. */ // You can ignore this. It's to keep eclipse from reporting a warning private static final long serialVersionUID = 1L; /** This is where to find the local tiles, for working without an Internet connection */ public static String mbTilesString = "blankLight-1-3.mbtiles"; // IF YOU ARE WORKING OFFLINE: Change the value of this variable to true private static final boolean offline = false; /** The map we use to display our home town: La Jolla, CA */ UnfoldingMap map1; /** The map you will use to display your home town */ UnfoldingMap map2; public void setup() { size(800, 600, P2D); // Set up the Applet window to be 800x600 // The OPENGL argument indicates to use the // Processing library's 2D drawing // You'll learn more about processing in Module 3 // This sets the background color for the Applet. // Play around with these numbers and see what happens! this.background(200, 200, 200); // Select a map provider AbstractMapProvider provider = new Google.GoogleTerrainProvider(); // Set a zoom level int zoomLevel = 10; if (offline) { // If you are working offline, you need to use this provider // to work with the maps that are local on your computer. provider = new MBTilesMapProvider(mbTilesString); // 3 is the maximum zoom level for working offline zoomLevel = 3; } // Create a new UnfoldingMap to be displayed in this window. // The 2nd-5th arguments give the map's x, y, width and height // When you create your map we want you to play around with these // arguments to get your second map in the right place. // The 6th argument specifies the map provider. // There are several providers built-in. // Note if you are working offline you must use the MBTilesMapProvider map1 = new UnfoldingMap(this, 50, 50, 350, 500, provider); map2 = new UnfoldingMap(this, 450, 50, 350, 500, provider); // The next line zooms in and centers the map at // 32.9 (latitude) and -117.2 (longitude)19.0760° N, 72.8777° E map1.zoomAndPanTo(zoomLevel, new Location(32.9f, -117.2f)); map2.zoomAndPanTo(zoomLevel, new Location(19.0760f, 72.8777f)); // This line makes the map interactive MapUtils.createDefaultEventDispatcher(this, map1); MapUtils.createDefaultEventDispatcher(this, map2); // TODO: Add code here that creates map2 // Then you'll modify draw() below } /** Draw the Applet window. */ public void draw() { // So far we only draw map1... // TODO: Add code so that both maps are displayed map1.draw(); map2.draw(); } }
[ "schitizsharma@hotmail.com" ]
schitizsharma@hotmail.com
9345b004d9d8b701a06c414bb6508345327b023e
d1582bb98a27822a0556ac4e674754ac201d0a6f
/Assignment_3/src/business/OrdersRestService.java
1e1ecf0117b53dd82c4b57b7f5278e71bbd110b2
[]
no_license
The-Bowman/cst_235_assignment_3
7faa3c49dbf1873d682b845552932e28be73bc06
621e38a8b7fa24f7df73589b3447aaf236a2797d
refs/heads/master
2023-04-22T20:38:11.259436
2021-05-02T03:08:44
2021-05-02T03:08:44
354,744,397
0
0
null
null
null
null
UTF-8
Java
false
false
769
java
package business; import javax.enterprise.context.RequestScoped; import javax.inject.Inject; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import beans.Order; import java.util.*; @RequestScoped @Path("/orders") @Produces({ "application/xml", "application/json" }) @Consumes({ "application/xml", "application/json" }) public class OrdersRestService { @Inject OrdersBusinessInterface service; @GET @Path("/getjson") @Produces(MediaType.APPLICATION_JSON) public List<Order> getOrdersAsJson(){ return service.getOrders(); } @GET @Path("/getxml") @Produces(MediaType.APPLICATION_XML) public List<Order> getOrdersAsXml(){ return service.getOrders(); } }
[ "72958677+The-Bowman@users.noreply.github.com" ]
72958677+The-Bowman@users.noreply.github.com
b8ca7fe3fb235085a3f72d032e9c6a38ee152b69
38d5ca3cf68be92b207d044880396275848b59e8
/src/main/java/configuration/DriverManager.java
166723331ff7b6d3e06a4f781aeff25fa5d857ad
[]
no_license
RGudovanyy/builder-updater
ec10104fe2f2c632c07917b8e40b2dccfb637e61
cde785c44d2cdcb1b6562ddf1f3a0f64fa689c45
refs/heads/master
2020-04-01T01:36:54.543462
2019-03-04T15:26:54
2019-03-04T15:28:27
152,745,719
0
0
null
null
null
null
UTF-8
Java
false
false
1,047
java
package configuration; import org.apache.commons.lang3.StringUtils; import org.openqa.selenium.*; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxOptions; import org.openqa.selenium.htmlunit.HtmlUnitDriver; import java.util.HashMap; import java.util.Map; public class DriverManager { public static WebDriver getHtmUnitDriver() { Map<String, Object> cap = new HashMap<>(); cap.put("marionette", false); cap.put("javascriptEnabled", true); cap.put("browserName", "htmlunit"); Capabilities capabilities = new ImmutableCapabilities(cap); return new HtmlUnitDriver(capabilities); } public static WebDriver getFirefoxDriver(String pathToDriver) { if (StringUtils.isBlank(pathToDriver)){ throw new NotFoundException("Path to Firefox driver is empty!"); } System.setProperty("webdriver.gecko.driver", pathToDriver); FirefoxOptions options = new FirefoxOptions(); options.setCapability("marionette", false); options.setHeadless(true); return new FirefoxDriver(options); } }
[ "gudovanyy.roman@otr.ru" ]
gudovanyy.roman@otr.ru
6ac40330285eeeadbdae49ea044513fd3a6a1ff4
441e3a7475e7807470b477110a8301a9760d740c
/app/src/main/java/com/example/tiago/helloworld/IconActivity.java
317b4d3f8ebc8fb69d222b48cf27b6b6b6f9253a
[]
no_license
tiago0022/Android-Hello-World
f9b2fc063b1e65664c12b6809f17a163edec8a70
4a4804f4b5643f78a3400b49b744fc26aa4a799f
refs/heads/master
2021-08-14T22:52:21.327241
2017-11-16T23:18:10
2017-11-16T23:18:10
111,031,455
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
package com.example.tiago.helloworld; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class IconActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_icon); } }
[ "tiago.araujo.neo@gmail.com" ]
tiago.araujo.neo@gmail.com
3329c3d5336e92abab5080698e5b3b3a2bd4824a
7966744a166a56486a06a164d0c4d87fbe470ce6
/lei_isep_2019_20_sem4_2di_1170894_1180871_1181053_1181056_1180/base.core/src/main/java/eapli/base/clientusermanagement/domain/SignupRequest.java
3e6cc98f754ae8696c14ba56ab6b303dcdc2acbe
[ "MIT" ]
permissive
GabrielPelosi/Lapr4-Isep
de266e581c1a05f962c31ad2a68c7aaa21929b3d
c8ff6f4aa047f48dcb173474e178eb2de49b32b6
refs/heads/main
2023-01-08T09:33:18.181966
2020-11-12T21:02:54
2020-11-12T21:02:54
312,360,848
2
0
null
null
null
null
UTF-8
Java
false
false
4,934
java
/* * Copyright (c) 2013-2019 the original author or authors. * * 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 eapli.base.clientusermanagement.domain; import java.util.Calendar; import javax.persistence.EmbeddedId; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Version; import eapli.framework.domain.model.AggregateRoot; import eapli.framework.domain.model.DomainEntities; import eapli.framework.general.domain.model.EmailAddress; import eapli.framework.infrastructure.authz.domain.model.Name; import eapli.framework.infrastructure.authz.domain.model.Password; import eapli.framework.infrastructure.authz.domain.model.Username; import eapli.framework.validations.Preconditions; /** * A Signup Request. This class represents the Signup Request created right * after a person applies for a Client User account. * * <p> * It follows a DDD approach where all of its properties are instances of value * objects. This approach may seem a little more complex than just having String * or native type attributes but provides for real semantic of the domain and * follows the Single Responsibility Pattern. * * @author Jorge Santos ajs@isep.ipp.pt * */ @Entity public class SignupRequest implements AggregateRoot<Username> { private static final long serialVersionUID = 1L; @Version private Long version; @EmbeddedId private Username username; private Password password; private Name name; private EmailAddress email; private MecanographicNumber mecanographicNumber; @Enumerated(EnumType.STRING) private ApprovalStatus approvalStatus; @Temporal(TemporalType.DATE) private Calendar createdOn; /* package */ SignupRequest(final Username username, final Password password, final Name name, final EmailAddress email, final MecanographicNumber mecanographicNumber, final Calendar createdOn) { Preconditions.noneNull(username, password, name, email, mecanographicNumber); this.username = username; this.password = password; this.name = name; this.email = email; this.mecanographicNumber = mecanographicNumber; // by default approvalStatus = ApprovalStatus.PENDING; this.createdOn = createdOn; } protected SignupRequest() { // for ORM only } public void accept() { approvalStatus = ApprovalStatus.ACCEPTED; } public void refuse() { approvalStatus = ApprovalStatus.REFUSED; } @Override public boolean equals(final Object o) { return DomainEntities.areEqual(this, o); } @Override public int hashCode() { return DomainEntities.hashCode(this); } @Override public boolean sameAs(final Object other) { if (!(other instanceof SignupRequest)) { return false; } final SignupRequest that = (SignupRequest) other; if (this == that) { return true; } return username.equals(that.username) && password.equals(that.password) && name.equals(that.name) && email.equals(that.email) && mecanographicNumber.equals(that.mecanographicNumber); } public MecanographicNumber mecanographicNumber() { return mecanographicNumber; } @Override public Username identity() { return username; } public Username username() { return username; } public Name name() { return name; } public boolean isPending() { return approvalStatus == ApprovalStatus.PENDING; } public EmailAddress email() { return email; } public Password password() { return password; } }
[ "ggpelosi21@gmail.com" ]
ggpelosi21@gmail.com
b90677259cc819009d24e6657a9aeddd9fb22437
e63363389e72c0822a171e450a41c094c0c1a49c
/Mate20_10_1_0/src/main/java/android/support/v4/text/PrecomputedTextCompat.java
06bf94fec74af1643b45f8cbc6084675b79f51a5
[]
no_license
solartcc/HwFrameWorkSource
fc23ca63bcf17865e99b607cc85d89e16ec1b177
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
refs/heads/master
2022-12-04T21:14:37.581438
2020-08-25T04:30:43
2020-08-25T04:30:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
17,587
java
package android.support.v4.text; import android.os.Build; import android.support.annotation.GuardedBy; import android.support.annotation.IntRange; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.RequiresApi; import android.support.annotation.RestrictTo; import android.support.annotation.UiThread; import android.support.v4.os.BuildCompat; import android.support.v4.util.ObjectsCompat; import android.support.v4.util.Preconditions; import android.text.Layout; import android.text.PrecomputedText; import android.text.Spannable; import android.text.SpannableString; import android.text.StaticLayout; import android.text.TextDirectionHeuristic; import android.text.TextDirectionHeuristics; import android.text.TextPaint; import android.text.TextUtils; import android.text.style.MetricAffectingSpan; import java.util.ArrayList; import java.util.concurrent.Callable; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.FutureTask; public class PrecomputedTextCompat implements Spannable { private static final char LINE_FEED = '\n'; @GuardedBy("sLock") @NonNull private static Executor sExecutor = null; private static final Object sLock = new Object(); @NonNull private final int[] mParagraphEnds; @NonNull private final Params mParams; @NonNull private final Spannable mText; @Nullable private final PrecomputedText mWrapped; public static final class Params { private final int mBreakStrategy; private final int mHyphenationFrequency; @NonNull private final TextPaint mPaint; @Nullable private final TextDirectionHeuristic mTextDir; /* access modifiers changed from: private */ public final PrecomputedText.Params mWrapped; public static class Builder { private int mBreakStrategy; private int mHyphenationFrequency; @NonNull private final TextPaint mPaint; private TextDirectionHeuristic mTextDir; public Builder(@NonNull TextPaint paint) { this.mPaint = paint; if (Build.VERSION.SDK_INT >= 23) { this.mBreakStrategy = 1; this.mHyphenationFrequency = 1; } else { this.mHyphenationFrequency = 0; this.mBreakStrategy = 0; } if (Build.VERSION.SDK_INT >= 18) { this.mTextDir = TextDirectionHeuristics.FIRSTSTRONG_LTR; } else { this.mTextDir = null; } } @RequiresApi(23) public Builder setBreakStrategy(int strategy) { this.mBreakStrategy = strategy; return this; } @RequiresApi(23) public Builder setHyphenationFrequency(int frequency) { this.mHyphenationFrequency = frequency; return this; } @RequiresApi(18) public Builder setTextDirection(@NonNull TextDirectionHeuristic textDir) { this.mTextDir = textDir; return this; } @NonNull public Params build() { return new Params(this.mPaint, this.mTextDir, this.mBreakStrategy, this.mHyphenationFrequency); } } private Params(@NonNull TextPaint paint, @NonNull TextDirectionHeuristic textDir, int strategy, int frequency) { if (BuildCompat.isAtLeastP()) { this.mWrapped = new PrecomputedText.Params.Builder(paint).setBreakStrategy(strategy).setHyphenationFrequency(frequency).setTextDirection(textDir).build(); } else { this.mWrapped = null; } this.mPaint = paint; this.mTextDir = textDir; this.mBreakStrategy = strategy; this.mHyphenationFrequency = frequency; } @RequiresApi(28) public Params(@NonNull PrecomputedText.Params wrapped) { this.mPaint = wrapped.getTextPaint(); this.mTextDir = wrapped.getTextDirection(); this.mBreakStrategy = wrapped.getBreakStrategy(); this.mHyphenationFrequency = wrapped.getHyphenationFrequency(); this.mWrapped = wrapped; } @NonNull public TextPaint getTextPaint() { return this.mPaint; } @RequiresApi(18) @Nullable public TextDirectionHeuristic getTextDirection() { return this.mTextDir; } @RequiresApi(23) public int getBreakStrategy() { return this.mBreakStrategy; } @RequiresApi(23) public int getHyphenationFrequency() { return this.mHyphenationFrequency; } public boolean equals(@Nullable Object o) { if (o == this) { return true; } if (o == null || !(o instanceof Params)) { return false; } Params other = (Params) o; if (this.mWrapped != null) { return this.mWrapped.equals(other.mWrapped); } if (Build.VERSION.SDK_INT >= 23 && (this.mBreakStrategy != other.getBreakStrategy() || this.mHyphenationFrequency != other.getHyphenationFrequency())) { return false; } if ((Build.VERSION.SDK_INT >= 18 && this.mTextDir != other.getTextDirection()) || this.mPaint.getTextSize() != other.getTextPaint().getTextSize() || this.mPaint.getTextScaleX() != other.getTextPaint().getTextScaleX() || this.mPaint.getTextSkewX() != other.getTextPaint().getTextSkewX()) { return false; } if ((Build.VERSION.SDK_INT >= 21 && (this.mPaint.getLetterSpacing() != other.getTextPaint().getLetterSpacing() || !TextUtils.equals(this.mPaint.getFontFeatureSettings(), other.getTextPaint().getFontFeatureSettings()))) || this.mPaint.getFlags() != other.getTextPaint().getFlags()) { return false; } if (Build.VERSION.SDK_INT >= 24) { if (!this.mPaint.getTextLocales().equals(other.getTextPaint().getTextLocales())) { return false; } } else if (Build.VERSION.SDK_INT >= 17 && !this.mPaint.getTextLocale().equals(other.getTextPaint().getTextLocale())) { return false; } if (this.mPaint.getTypeface() == null) { if (other.getTextPaint().getTypeface() != null) { return false; } } else if (!this.mPaint.getTypeface().equals(other.getTextPaint().getTypeface())) { return false; } return true; } public int hashCode() { if (Build.VERSION.SDK_INT >= 24) { return ObjectsCompat.hash(Float.valueOf(this.mPaint.getTextSize()), Float.valueOf(this.mPaint.getTextScaleX()), Float.valueOf(this.mPaint.getTextSkewX()), Float.valueOf(this.mPaint.getLetterSpacing()), Integer.valueOf(this.mPaint.getFlags()), this.mPaint.getTextLocales(), this.mPaint.getTypeface(), Boolean.valueOf(this.mPaint.isElegantTextHeight()), this.mTextDir, Integer.valueOf(this.mBreakStrategy), Integer.valueOf(this.mHyphenationFrequency)); } else if (Build.VERSION.SDK_INT >= 21) { return ObjectsCompat.hash(Float.valueOf(this.mPaint.getTextSize()), Float.valueOf(this.mPaint.getTextScaleX()), Float.valueOf(this.mPaint.getTextSkewX()), Float.valueOf(this.mPaint.getLetterSpacing()), Integer.valueOf(this.mPaint.getFlags()), this.mPaint.getTextLocale(), this.mPaint.getTypeface(), Boolean.valueOf(this.mPaint.isElegantTextHeight()), this.mTextDir, Integer.valueOf(this.mBreakStrategy), Integer.valueOf(this.mHyphenationFrequency)); } else if (Build.VERSION.SDK_INT >= 18) { return ObjectsCompat.hash(Float.valueOf(this.mPaint.getTextSize()), Float.valueOf(this.mPaint.getTextScaleX()), Float.valueOf(this.mPaint.getTextSkewX()), Integer.valueOf(this.mPaint.getFlags()), this.mPaint.getTextLocale(), this.mPaint.getTypeface(), this.mTextDir, Integer.valueOf(this.mBreakStrategy), Integer.valueOf(this.mHyphenationFrequency)); } else if (Build.VERSION.SDK_INT >= 17) { return ObjectsCompat.hash(Float.valueOf(this.mPaint.getTextSize()), Float.valueOf(this.mPaint.getTextScaleX()), Float.valueOf(this.mPaint.getTextSkewX()), Integer.valueOf(this.mPaint.getFlags()), this.mPaint.getTextLocale(), this.mPaint.getTypeface(), this.mTextDir, Integer.valueOf(this.mBreakStrategy), Integer.valueOf(this.mHyphenationFrequency)); } else { return ObjectsCompat.hash(Float.valueOf(this.mPaint.getTextSize()), Float.valueOf(this.mPaint.getTextScaleX()), Float.valueOf(this.mPaint.getTextSkewX()), Integer.valueOf(this.mPaint.getFlags()), this.mPaint.getTypeface(), this.mTextDir, Integer.valueOf(this.mBreakStrategy), Integer.valueOf(this.mHyphenationFrequency)); } } public String toString() { StringBuilder sb = new StringBuilder("{"); sb.append("textSize=" + this.mPaint.getTextSize()); sb.append(", textScaleX=" + this.mPaint.getTextScaleX()); sb.append(", textSkewX=" + this.mPaint.getTextSkewX()); if (Build.VERSION.SDK_INT >= 21) { sb.append(", letterSpacing=" + this.mPaint.getLetterSpacing()); sb.append(", elegantTextHeight=" + this.mPaint.isElegantTextHeight()); } if (Build.VERSION.SDK_INT >= 24) { sb.append(", textLocale=" + this.mPaint.getTextLocales()); } else if (Build.VERSION.SDK_INT >= 17) { sb.append(", textLocale=" + this.mPaint.getTextLocale()); } sb.append(", typeface=" + this.mPaint.getTypeface()); if (Build.VERSION.SDK_INT >= 26) { sb.append(", variationSettings=" + this.mPaint.getFontVariationSettings()); } sb.append(", textDir=" + this.mTextDir); sb.append(", breakStrategy=" + this.mBreakStrategy); sb.append(", hyphenationFrequency=" + this.mHyphenationFrequency); sb.append("}"); return sb.toString(); } } public static PrecomputedTextCompat create(@NonNull CharSequence text, @NonNull Params params) { int paraEnd; Preconditions.checkNotNull(text); Preconditions.checkNotNull(params); if (BuildCompat.isAtLeastP() && params.mWrapped != null) { return new PrecomputedTextCompat(PrecomputedText.create(text, params.mWrapped), params); } ArrayList<Integer> ends = new ArrayList<>(); int end = text.length(); int paraStart = 0; while (paraStart < end) { int paraEnd2 = TextUtils.indexOf(text, (char) LINE_FEED, paraStart, end); if (paraEnd2 < 0) { paraEnd = end; } else { paraEnd = paraEnd2 + 1; } ends.add(Integer.valueOf(paraEnd)); paraStart = paraEnd; } int[] result = new int[ends.size()]; for (int i = 0; i < ends.size(); i++) { result[i] = ends.get(i).intValue(); } if (Build.VERSION.SDK_INT >= 23) { StaticLayout.Builder.obtain(text, 0, text.length(), params.getTextPaint(), Integer.MAX_VALUE).setBreakStrategy(params.getBreakStrategy()).setHyphenationFrequency(params.getHyphenationFrequency()).setTextDirection(params.getTextDirection()).build(); } else if (Build.VERSION.SDK_INT >= 21) { new StaticLayout(text, params.getTextPaint(), Integer.MAX_VALUE, Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false); } return new PrecomputedTextCompat(text, params, result); } private PrecomputedTextCompat(@NonNull CharSequence text, @NonNull Params params, @NonNull int[] paraEnds) { this.mText = new SpannableString(text); this.mParams = params; this.mParagraphEnds = paraEnds; this.mWrapped = null; } @RequiresApi(28) private PrecomputedTextCompat(@NonNull PrecomputedText precomputed, @NonNull Params params) { this.mText = precomputed; this.mParams = params; this.mParagraphEnds = null; this.mWrapped = precomputed; } @RequiresApi(28) @Nullable @RestrictTo({RestrictTo.Scope.LIBRARY_GROUP}) public PrecomputedText getPrecomputedText() { if (this.mText instanceof PrecomputedText) { return (PrecomputedText) this.mText; } return null; } @NonNull public Params getParams() { return this.mParams; } @IntRange(from = 0) public int getParagraphCount() { if (BuildCompat.isAtLeastP()) { return this.mWrapped.getParagraphCount(); } return this.mParagraphEnds.length; } @IntRange(from = 0) public int getParagraphStart(@IntRange(from = 0) int paraIndex) { Preconditions.checkArgumentInRange(paraIndex, 0, getParagraphCount(), "paraIndex"); if (BuildCompat.isAtLeastP()) { return this.mWrapped.getParagraphStart(paraIndex); } if (paraIndex == 0) { return 0; } return this.mParagraphEnds[paraIndex - 1]; } @IntRange(from = 0) public int getParagraphEnd(@IntRange(from = 0) int paraIndex) { Preconditions.checkArgumentInRange(paraIndex, 0, getParagraphCount(), "paraIndex"); if (BuildCompat.isAtLeastP()) { return this.mWrapped.getParagraphEnd(paraIndex); } return this.mParagraphEnds[paraIndex]; } private int findParaIndex(@IntRange(from = 0) int pos) { for (int i = 0; i < this.mParagraphEnds.length; i++) { if (pos < this.mParagraphEnds[i]) { return i; } } throw new IndexOutOfBoundsException("pos must be less than " + this.mParagraphEnds[this.mParagraphEnds.length - 1] + ", gave " + pos); } private static class PrecomputedTextFutureTask extends FutureTask<PrecomputedTextCompat> { private static class PrecomputedTextCallback implements Callable<PrecomputedTextCompat> { private Params mParams; private CharSequence mText; PrecomputedTextCallback(@NonNull Params params, @NonNull CharSequence cs) { this.mParams = params; this.mText = cs; } @Override // java.util.concurrent.Callable public PrecomputedTextCompat call() throws Exception { return PrecomputedTextCompat.create(this.mText, this.mParams); } } PrecomputedTextFutureTask(@NonNull Params params, @NonNull CharSequence text) { super(new PrecomputedTextCallback(params, text)); } } @UiThread public static Future<PrecomputedTextCompat> getTextFuture(@NonNull CharSequence charSequence, @NonNull Params params, @Nullable Executor executor) { PrecomputedTextFutureTask task = new PrecomputedTextFutureTask(params, charSequence); if (executor == null) { synchronized (sLock) { if (sExecutor == null) { sExecutor = Executors.newFixedThreadPool(1); } executor = sExecutor; } } executor.execute(task); return task; } public void setSpan(Object what, int start, int end, int flags) { if (what instanceof MetricAffectingSpan) { throw new IllegalArgumentException("MetricAffectingSpan can not be set to PrecomputedText."); } else if (BuildCompat.isAtLeastP()) { this.mWrapped.setSpan(what, start, end, flags); } else { this.mText.setSpan(what, start, end, flags); } } public void removeSpan(Object what) { if (what instanceof MetricAffectingSpan) { throw new IllegalArgumentException("MetricAffectingSpan can not be removed from PrecomputedText."); } else if (BuildCompat.isAtLeastP()) { this.mWrapped.removeSpan(what); } else { this.mText.removeSpan(what); } } @Override // android.text.Spanned public <T> T[] getSpans(int start, int end, Class<T> type) { return BuildCompat.isAtLeastP() ? (T[]) this.mWrapped.getSpans(start, end, type) : (T[]) this.mText.getSpans(start, end, type); } public int getSpanStart(Object tag) { return this.mText.getSpanStart(tag); } public int getSpanEnd(Object tag) { return this.mText.getSpanEnd(tag); } public int getSpanFlags(Object tag) { return this.mText.getSpanFlags(tag); } public int nextSpanTransition(int start, int limit, Class type) { return this.mText.nextSpanTransition(start, limit, type); } public int length() { return this.mText.length(); } public char charAt(int index) { return this.mText.charAt(index); } public CharSequence subSequence(int start, int end) { return this.mText.subSequence(start, end); } public String toString() { return this.mText.toString(); } }
[ "lygforbs0@gmail.com" ]
lygforbs0@gmail.com
e565db48146bf93b3ef1cd6ad94cb6afa1b06a26
0bffa6858041f2325af3f513ed4208bb5b586a70
/src/java/com/copyright/ccc/web/actions/AnonymousInvoicePaymentStepFive.java
2b4fab763de9bd18ec69a70130debf02ccc23b2b
[]
no_license
aputtur/ccc
d8d6912f7e920459c5e9c23356c731b57c77c795
c106da8bba275b5c5551448d0c0dedb5393778e9
refs/heads/master
2020-12-24T15:22:24.167234
2013-11-01T18:20:01
2013-11-01T18:20:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
10,201
java
package com.copyright.ccc.web.actions; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.Globals; import org.apache.struts.action.*; import org.apache.log4j.Logger; import com.copyright.ccc.business.services.cart.InvoiceUtils; import com.copyright.ccc.business.security.UserContextService; import com.copyright.ccc.config.CC2Configuration; import com.copyright.ccc.web.WebConstants; import com.copyright.ccc.web.forms.AnonymousUnpaidInvoiceForm; import com.copyright.svc.artransaction.api.data.ARTransaction; import com.copyright.data.ValidationException; import com.copyright.mail.MailDispatcher; import com.copyright.mail.MailDispatcherImpl; import com.copyright.mail.MailSendFailedException; import com.copyright.mail.MailMessage; public class AnonymousInvoicePaymentStepFive extends Action { // These are our mappings to the various pages in our // unpaid invoice flow. private static final String SUCCESS = "success"; private static final String FAILURE = "failure"; private static final String INVFORM = "unpaidInvoiceForm"; private static final boolean PREAUTHORIZED = true; private static final Logger _logger = Logger.getLogger(AnonymousInvoicePaymentStepFive.class); @Override public ActionForward execute( ActionMapping mapping , ActionForm form , HttpServletRequest request , HttpServletResponse response ) { String arReceipt = null; String authMsg = null; String[] answer = null; String nextPage = FAILURE; String acctNo = null; Double totalAmt = 0.00D; boolean preAuthorized = true; _logger.info("\nAnonymousInvoicePaymentStepFive.execute()\n"); if (UserContextService.isEmulating()) { addError(request, "invoice.error.emulating"); return mapping.findForward(FAILURE); } AnonymousUnpaidInvoiceForm frm = (AnonymousUnpaidInvoiceForm) request.getSession().getAttribute( WebConstants.SessionKeys.ANONYMOUS_UNPAID_INVOICE_FORM ); if (_logger.isDebugEnabled()) { // Dump our form data. _logger.info(frm.toString()); } // Load the unpaid invoices for the current active user. if (_logger.isDebugEnabled()) { _logger.info( "\n ==> Preparing to apply payment to unpaid invoices!\n" ); _logger.info( "\n" + frm.getPaymentResponse().toString() ); } for (ARTransaction transaction : frm.getInvoicesToCredit()) { totalAmt += transaction.getBalanceDue(); } acctNo = frm.getArAccountNumber(); try { answer = InvoiceUtils.applyPaymentToUnpaidInvoices( frm.getInvoicesToCredit(), frm.getCreditCardDetails(), frm.getPaymentResponse(), frm.getArAccountNumber(), frm.getFirstName(), frm.getLastName(), frm.getUserEmail(), frm.getEmailAddress(), PREAUTHORIZED ); arReceipt = answer[0]; authMsg = answer[1]; if (_logger.isDebugEnabled()) { _logger.info( "\nAnonymousInvoicePaymentStepFive: arReceipt = " + arReceipt + ", authMsg = " + authMsg + "\n" ); } if (arReceipt == null) { // This can't be good. ActionErrors errors = new ActionErrors(); ActionMessage errorMessage = null; if (authMsg != null) { errorMessage = new ActionMessage( "errors.credit-card", authMsg ); } else { errorMessage = new ActionMessage( "invoice.error.unknown" ); } errors.add( ActionMessages.GLOBAL_MESSAGE, errorMessage ); request.setAttribute( Globals.ERROR_KEY, errors ); return mapping.findForward( nextPage ); } // Go ahead and send out our email message. But since // we got here, our payment was good, so let us set our // flag to success. nextPage = SUCCESS; String email_to_user = frm.getEmailAddress(); String email_to_owner = frm.getUserEmail(); String email_to_finance = CC2Configuration.getInstance().getInvoicePaymentEmailToFinance(); String email_subj = CC2Configuration.getInstance().getInvoicePaymentEmailSubj(); String email_body = buildMessage( frm ); email_subj = email_subj + acctNo.toString(); MailMessage msg = new MailMessage(); msg.setFromEmail( "donotreply@copyright.com" ); msg.setRecipient( email_to_user ); msg.setCcRecipient( email_to_owner ); msg.setBccRecipient( email_to_finance ); msg.setSubject( email_subj ); msg.setBody( email_body ); //Disable the email send for now MailDispatcher email = new MailDispatcherImpl(); email.send( msg ); } catch (ValidationException e) { String err = frm.getCreditCardName() + " ending in " + frm.getLastFourDigits(); ActionErrors errors = new ActionErrors(); errors.add( ActionMessages.GLOBAL_MESSAGE, new ActionMessage( "errors.credit-card", err ) ); request.setAttribute( Globals.ERROR_KEY, errors ); } catch (MailSendFailedException e) { _logger.error( "\nAnonymous Invoice Payment Transaction Completed but email failed.\n", e ); String err = "Your transaction completed, but your email confirmation failed."; ActionErrors errors = new ActionErrors(); errors.add( ActionMessages.GLOBAL_MESSAGE, new ActionMessage( err ) ); request.setAttribute( Globals.ERROR_KEY, errors ); } catch (Exception e) { _logger.error( "\nAn unexpected error occurred during anonymous invoice payment.", e ); String err = "An unexpected error occurred."; ActionErrors errors = new ActionErrors(); errors.add( ActionMessages.GLOBAL_MESSAGE, new ActionMessage( err ) ); request.setAttribute( Globals.ERROR_KEY, errors ); } frm.clearSecureData(); request.getSession().setAttribute( INVFORM, frm ); return mapping.findForward( nextPage ); } private String buildMessage( AnonymousUnpaidInvoiceForm frm ) { StringBuffer obuf = new StringBuffer(); String cardType = frm.getCreditCardDetails().getCardType(); String cardDigits = String.valueOf( frm.getCreditCardDetails().getLastFourCc() ); if (_logger.isDebugEnabled()) { _logger.info("\n Card info: " + cardType + ", " + cardDigits); } obuf.append( "\nThank you for your recent online payment via Copyright.com.\n" ) .append( "\nPlease see the payment details below.\n" ) .append( "\nCopyright Clearance Center has charged your " ); if (cardType == null) { obuf.append("credit card "); } else { obuf.append( InvoiceUtils.toCardTypeName( cardType ) ).append( " card " ); } if (cardDigits != null) { obuf.append( "[ending with " ).append( cardDigits ).append( "] " ); } obuf.append( "and your credit card statement will reference " ) .append( "\"Copyright Clearance Center\".\n" ); obuf.append( "\nPayment Details\n" ) .append( "\nInvoice(s) Paid: " ); String currencyCode = null; for (ARTransaction x : frm.getInvoicesToCredit()) { obuf.append( x.getTransactionNumber() ).append( " " ); currencyCode = x.getOriginalCurrencyRate() == null ? "USD" : x.getOriginalCurrencyCode().toString(); } obuf.append( "\n\nTotal Payment: " ) .append(currencyCode == null ? "USD" : currencyCode) .append( " " ) .append( (currencyCode != null && currencyCode.equals("JPY")) ? new java.text.DecimalFormat( "0" ).format( frm.getTotalAmount(true) ): new java.text.DecimalFormat( "0.00" ).format( frm.getTotalAmount(true) ) ) .append( "\n\n" ) .append( "To view a list of unpaid invoices, please go to https://www.copyright.com/manageAccount.do, select View your Unpaid Invoices, and check the invoice number listed." ) .append( "\n\n" ) .append( "If you need assistance, please visit our online help (www.copyright.com/help) where you will find answers to common questions. For further assistance, call +1-978-646-2600 (Mon-Fri, 8:00 am to 6:00 pm Eastern Time) to speak with a Customer Service Representative. Or, e-mail your questions and comments to: info@copyright.com." ); obuf.append( "\n\nCopyright Clearance Center" ) .append( "\n222 Rosewood Drive" ) .append( "\nDanvers, MA 01923" ) .append( "\nTel: +1-978-646-2600" ) .append( "\nEmail: info@copyright.com" ) .append( "\nWeb: http://www.copyright.com" ).append( "\n" ) .append( "Please do not reply to this message. This e-mail address is not monitored for responses." ); return obuf.toString(); } private void addError(HttpServletRequest r, String s) { ActionErrors errors = new ActionErrors(); errors.add( ActionMessages.GLOBAL_MESSAGE, new ActionMessage( s ) ); r.setAttribute( Globals.ERROR_KEY, errors ); } }
[ "aputtur@pubget.com" ]
aputtur@pubget.com
de839fb68e11b110e612010281ff812315a166ce
b89cfa5bdac61f15c9d85e5c0856373012f43e5f
/Labs/src/Test/CatTest.java
fac265c3b20c62ffc3f46386761e54232a22ac88
[]
no_license
Eleeeen/bot
dd154134be35e0dc11f4920022b445aa6f3063c9
ebacf7e6122f52f1f519e06bb439256e26ea8c3b
refs/heads/master
2023-02-02T07:32:19.714940
2020-12-19T21:02:52
2020-12-19T21:02:52
322,937,870
0
0
null
null
null
null
UTF-8
Java
false
false
547
java
package Test; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; class CatTest { Cat c = new Cat("Plusha", "black", 15); @Test void testGetName() { assertEquals("Plushaa", c.getName()); } @Test void testGetColor() { assertEquals("black", c.getColor()); } @Test void testGetAge() { assertEquals(15, c.getAge()); } @Test void testSetName() { } @Test void testSetColor() { } @Test void testSetAge() { } }
[ "stefnyakelena@gmail.com" ]
stefnyakelena@gmail.com
cfaab3708372c86c64c6bc450b41b00026dd8561
e20b2be99bedb4691df0004db9ccc5670eb63da3
/app/src/main/java/com/example/eshop3/about_fragment.java
ab068df77f3ca4ac415bbac516c34247c0fc954d
[]
no_license
EfthimisKele/E_Shop
b4968942a4b53c16928863ce29d7bfbcaacc0afa
fc21fac1c7c4322e74111bd2c401f93647a4a0cf
refs/heads/master
2022-07-28T09:33:12.048684
2020-05-23T17:18:40
2020-05-23T17:18:40
260,535,035
2
0
null
null
null
null
UTF-8
Java
false
false
875
java
package com.example.eshop3; import android.os.Bundle; import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; public class about_fragment extends Fragment { //Δε γίνεται κάτι σε αυτό τη κλάση απλώς εμφανίζεται το layout της πατώντας το κουμπί about public about_fragment() { // Required empty public constructor } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_about, container, false); } }
[ "m.efthimis4@gmail.com" ]
m.efthimis4@gmail.com
4af273b4ae1c124778a8c77893ca08b3e9a3121f
0cb9e6244cda4607130b5380fac2d12978ee8a39
/TestApp/fundamental/src/main/java/me/halin/fundamental/LogUtil/LogUtilGoogle.java
c389d3d318ddfb67cb7ee15e7a401e491b5bfb37
[]
no_license
Halin-Lee/AndroidTestApp
46035a7ac8b3cd976c33384c0cf62b1974706cb8
8ab9fc3d36aca843f0758a9f9fb54a346d24322a
refs/heads/master
2020-04-04T07:01:36.475646
2018-01-12T08:14:22
2018-01-12T08:14:22
40,755,846
0
0
null
null
null
null
UTF-8
Java
false
false
5,080
java
package me.halin.fundamental.LogUtil; import android.app.Application; import android.content.Context; import com.google.android.gms.analytics.ExceptionReporter; import com.google.android.gms.analytics.GoogleAnalytics; import com.google.android.gms.analytics.HitBuilders; import com.google.android.gms.analytics.StandardExceptionParser; import com.google.android.gms.analytics.Tracker; import java.util.ArrayList; import java.util.Collection; import java.util.Locale; /** * Created by halin on 10/14/15. */ public class LogUtilGoogle extends MeasuringUtil { private static final String GOOGLE_ANALYTICS_KEY_SCREEN_NAME = "&cd"; /** * 设备ID */ private String userID; /** * 谷歌分析所使用的发送器 */ private Tracker tracker; /** * 最后一个呈现的页面 */ private String latestScreen; /** * 谷歌分析初始化方法 */ public LogUtilGoogle(Application application, int trackID, String uid) { //初始化谷歌分析 // Application application = context; GoogleAnalytics analytics = GoogleAnalytics.getInstance(application); analytics.enableAutoActivityReports(application); tracker = analytics.newTracker(trackID); tracker.enableAdvertisingIdCollection(true); //设置自定义的错误打印方法 ExceptionReporter exceptionDetailReporter = new ExceptionReporter( tracker, Thread.getDefaultUncaughtExceptionHandler(), application); exceptionDetailReporter.setExceptionParser(new ExceptionDetailParser(application, new ArrayList())); Thread.setDefaultUncaughtExceptionHandler(exceptionDetailReporter); //设置deviceID userID = uid; } @Override void log(String message) { //谷歌分析不处理普通级别日志 } @Override void logE(String message) { String logStr = String.format(Locale.ENGLISH, "%s | %s", userID, message); tracker.send(new HitBuilders.ExceptionBuilder().setDescription(logStr).setFatal(true).build()); } @Override void trackDimension(int index, String message) { tracker.send(new HitBuilders.ScreenViewBuilder() .setCustomDimension(index, message) .build() ); } @Override void trackMetric(int index, float message) { tracker.send(new HitBuilders.ScreenViewBuilder() .setCustomMetric(index, message) .build() ); } @Override void trackEvent(String Category, String Action, String Label, long value) { String localScreenName = tracker.get(GOOGLE_ANALYTICS_KEY_SCREEN_NAME); /* if (latestScreen != localScreenName) { //当前屏幕名称与之前名称不同,该事件为新页面第一次点击事件,这部分统计有个不准确的地方, // 1.当用户跳转到其他页面但是没有触发任何事件的时候,回到之前屏幕的事件不会当做第一事件 // 2.当用户跳转并触发事件的时候,回到之前页面的事件会当成第一事件 tracker.send(new HitBuilders.EventBuilder() .setCategory(LoggerConstant.LOGGER_EVENT_CATEGORY_FIRST_EVENT) .setAction(Action) .setLabel(localScreenName) .setValue(value) .build()); latestScreen = localScreenName; }*/ tracker.send(new HitBuilders.EventBuilder() .setCategory(Category) .setAction(Action) .setLabel(Label) .setValue(value) .build()); } @Override void trackTiming(String category, String variable, String label, long value) { tracker.send(new HitBuilders.TimingBuilder() .setCategory(category) .setValue(value) .setVariable(variable) .setLabel(label) .build()); } public class ExceptionDetailParser extends StandardExceptionParser { public ExceptionDetailParser(Context context, Collection<String> additionalPackages) { super(context, additionalPackages); } @Override public String getDescription(String s, Throwable throwable) { //获得原本日志 String standardDescription = super.getDescription(s, throwable); //获得堆栈信息 String stack = StackUtil.readThrowableStackTrace(throwable); String exceptionDescription = String.format(Locale.ENGLISH, "%s | 程序崩溃: %s | %s", userID, standardDescription, stack); //拼接打印文本,谷歌限制上报信息只能有150个字符 // if (exceptionDescription.length() > 150) // exceptionDescription = exceptionDescription.substring(0, 149); return exceptionDescription; } } }
[ "17track.for.test@gmail.com" ]
17track.for.test@gmail.com
19853aa77a3f2666edaf019b1942948f8385ccb9
a0d0253154a41bd2881d8bb0bc10df8bff215e03
/src/main/java/group/shop/entity/Transactions.java
0199636d8d401534ed370b8e16ccaae7c6570195
[]
no_license
ducnvpd02372/shop-hoa-final
33ae40a9618b2f7b8f5ae64cea6aa7f187d034ce
c7899177aeb27c68a776dea33353c737c29f2998
refs/heads/master
2020-06-09T06:02:34.143743
2019-06-23T19:22:18
2019-06-23T19:22:18
193,386,626
0
0
null
null
null
null
UTF-8
Java
false
false
1,577
java
package group.shop.entity; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.TableGenerator; import javax.validation.constraints.NotNull; @Entity @Table public class Transactions { @TableGenerator( name="tranGen", table="ID_TRAN", pkColumnName="GEN_KEY", valueColumnName="GEN_VALUE", pkColumnValue="EMP_ID", allocationSize=1) @Id @GeneratedValue(strategy= GenerationType.TABLE, generator="tranGen") private int id; @Column(columnDefinition="tinyint") private int status; @Column(columnDefinition="tinyint") private int payment; @OneToOne() @JoinColumn(name = "orders_id",insertable=true, updatable=true) private Orders orders; public Transactions(int status, int payment, Orders orders) { this.status = status; this.payment = payment; this.orders = orders; } public Transactions() { } public int getId() { return id; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public int getPayment() { return payment; } public void setPayment(int payment) { this.payment = payment; } public Orders getOrders() { return orders; } public void setOrders(Orders orders) { this.orders = orders; } }
[ "49785404+ducnvpd02372@users.noreply.github.com" ]
49785404+ducnvpd02372@users.noreply.github.com
190b2431d8e65377f59e1ade64c5e58b9e767309
a21b9334dedebed0e763ff9854a88e97714449bc
/app/src/main/java/com/shubham/android/jokeapp/MainActivity.java
ac2fd51f882ae27b7402d018597840b4993318a5
[]
no_license
shubham/mvp-rx-demo-jokeapp
1628e49315fcb1580f9b3b2d0f13952b79cc05f3
022323bbe8fbb08d48070d4e41edbfc1e836370f
refs/heads/master
2020-03-09T22:43:17.799320
2018-04-13T05:43:49
2018-04-13T05:51:09
129,040,966
0
0
null
2018-04-12T09:17:49
2018-04-11T05:50:31
Java
UTF-8
Java
false
false
340
java
package com.shubham.android.jokeapp; 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); } }
[ "shubham@bajaar.com" ]
shubham@bajaar.com
e59fc7e940afe85617b6688f38b1bb46e61ef7d9
4b5abde75a6daab68699a9de89945d8bf583e1d0
/app-release-unsigned/sources/j/n0/k/i/l.java
f7cc6558d20e8277be66d2dc196b56f443c37067
[]
no_license
agustrinaldokurniawan/News_Android_Kotlin_Mobile_Apps
95d270d4fa2a47f599204477cb25bae7bee6e030
a1f2e186970cef9043458563437b9c691725bcb5
refs/heads/main
2023-07-03T01:03:22.307300
2021-08-08T10:47:00
2021-08-08T10:47:00
375,330,796
0
0
null
null
null
null
UTF-8
Java
false
false
681
java
package j.n0.k.i; import i.s.c.f; import i.s.c.h; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; public final class l extends f { /* renamed from: h reason: collision with root package name */ public static final a f3702h = new a(null); public static final class a { public a(f fVar) { } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public l(Class<? super SSLSocket> cls, Class<? super SSLSocketFactory> cls2, Class<?> cls3) { super(cls); h.f(cls, "sslSocketClass"); h.f(cls2, "sslSocketFactoryClass"); h.f(cls3, "paramClass"); } }
[ "agust.kurniawan@Agust-Rinaldo-Kurniawan.local" ]
agust.kurniawan@Agust-Rinaldo-Kurniawan.local
101749d49c64bff019cf410bfab20df8888061d3
c3efb52808c6a2bd92dc39fa3b3f3c41d9e11a39
/src/test/java/com/ikminitest/test/AppTest.java
708b8f50a314408cd841643be14815551630e55d
[]
no_license
xiaomengchen-dev/mini_test
39399aab599ce391a0034f9f09c9f08963baaf70
52d574a62bc2a5be460e6ba89e0426b3073b3234
refs/heads/master
2020-12-14T20:00:32.424668
2020-01-19T06:59:12
2020-01-19T06:59:12
234,853,947
0
0
null
2020-10-13T18:56:46
2020-01-19T06:45:59
Java
UTF-8
Java
false
false
1,738
java
package com.ikminitest.test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import com.ikminitest.test.service.MainFactory; import com.ikminitest.test.service.impl.Main; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; /** * Unit test for simple App. */ public class AppTest { /** * Rigorous Test :-) */ @Test public void shouldAnswerWithTrue() { assertTrue( true ); } /**JUNIT TEST for mini-test * scanner can only be used in main function */ // @Test // public static void main(String[] args) { // //Main test2 = new Main(); // MainFactory<Main> mainFactory = Main::new; // Main test2 = mainFactory.create(); // //System.out.println(test2.letterCombins("23")); // Scanner scanner = new Scanner(System.in); // while (scanner.hasNextLine()){ // String s = scanner.nextLine(); // System.out.println(test2.letterCombins(s)); // } // } //注意这个不能忘记!!要不然后面无法调用 private MainFactory<Main> mainFactory = Main::new; private Main main; @Before public void setUp() throws Exception { main = mainFactory.create(); } @Test public void letterCombins() { ArrayList<String> arr = new ArrayList<>(); arr.add("ad"); arr.add("ae"); arr.add("af"); arr.add("bd"); arr.add("be"); arr.add("bf"); arr.add("cd"); arr.add("ce"); arr.add("cf"); assertEquals(main.letterCombins("23"), arr); // assertEquals(main.letterCombins("23"), "[ad, ae, af, bd, be, bf, cd, ce, cf]"); } }
[ "m186202070115@163.com" ]
m186202070115@163.com
c327dc22522d5cb0d794b13121b4ec04583ba65f
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_43990.java
aa60fbb536ed73453267a76735a5766bd7db8c24
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
90
java
public static Currency adaptCurrency(String code){ return Currency.getInstance(code); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
294b92cdead53879621c6d60d2d1e2641786dada
d22c1c90e931274a4c5ea7259f8ba299a3281ab4
/Java_algorithm_Exercise/chap06/IntStack.java
87a79b1f6a24f5a6e1057efb7220ce7dd7714fd3
[]
no_license
jeremy6019/algorithm1
d7fde0c03a9174986ae29b8e4a3d7ad19302d587
81f21940beecc6e4b004a7c56618e196a49975b7
refs/heads/master
2020-07-23T12:14:49.354652
2019-09-10T12:36:43
2019-09-10T12:36:43
207,553,324
0
0
null
null
null
null
UTF-8
Java
false
false
2,320
java
package chap06; // int형 스택 public class IntStack { private int max; // 스택의 용량 private int ptr; // 스택포인터 private int[] stk; // 스택의 본체 // 실행시 예외:스택가 비어 있음 public class EmptyIntStackException extends RuntimeException { public EmptyIntStackException() { } } // 실행시 예외:스택이 가득 참 public class OverflowIntStackException extends RuntimeException { public OverflowIntStackException() { } } // 생성자 public IntStack(int capacity) { ptr = 0; max = capacity; try { stk = new int[max]; // 스택 본체용의 배열을 생성 } catch (OutOfMemoryError e) { // 생성할 수 없음 max = 0; } } // 스택에 x을 푸시 public int push(int x) throws OverflowIntStackException { if (ptr >= max) // 스택은 가득 참 throw new OverflowIntStackException(); return stk[ptr++] = x; } // 스택에서 데이터를 팝 public int pop() throws EmptyIntStackException { if (ptr <= 0) // 스택 비어 있음 throw new EmptyIntStackException(); return stk[--ptr]; } // 스택에서 데이터를 피크 public int peek() throws EmptyIntStackException { if (ptr <= 0) // 스택 비어 있음 throw new EmptyIntStackException(); return stk[ptr - 1]; } // 스택에서 x을 찾아서 인덱스를 반환 (찾지 못하면-1을 반환) public int indexOf(int x) { for (int i = ptr - 1; i >= 0; i--) if (stk[i] == x) return i; // 검색 성공 return -1; // 검색 실패 } // 스택을 비움 public void clear() { ptr = 0; } // 스택의 용량을 반환 public int capacity() { return max; } // 스택의 데이터 수를 반환 public int size() { return ptr; } // 스택이 비어 있나? public boolean isEmpty() { return ptr <= 0; } // 스택이 가득 차 있는가? public boolean isFull() { return ptr >= max; } // 스택 내의 모든 데이터를 바닥에서 꼭대기 순서로 출력함 public void dump() { if (ptr <= 0) System.out.println("스택이 비어 있습니다."); else { for (int i = 0; i < ptr; i++) System.out.print(stk[i] + " "); System.out.println(); } } }
[ "jerem@192.168.219.109" ]
jerem@192.168.219.109
7c703e17c4e1420ceed68838d61ce8da7eed6874
cefbc3351d0207cd56ee2db066c87d9a0159889c
/core/src/com/geometric/wars/utils/Action.java
512c66eb1484b97279b16feb35ef5d1578239e75
[]
no_license
ggawryal/Geometric-Wars
d2de44b185134a10a52065981838d13eb3e8a685
e534cf7de6478f555edd1e147bef9b5141410560
refs/heads/master
2020-08-23T16:01:30.998512
2019-06-10T00:07:19
2019-06-10T00:07:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
84
java
package com.geometric.wars.utils; public interface Action { void doAction(); }
[ "xenox40@gmail.com" ]
xenox40@gmail.com
d91e106af59069452728e29dda3e6c9489c0f9ed
688cb99f000664e4eb3844a45975825a78566892
/backend/src/main/java/com/devsuperior/dsvendas/dto/SaleSumDTO.java
81a3bf4f302eae41f6ad33cdd84b66deeb920135
[]
no_license
sheltonfragoso/projecto-sds4
9c0512eb04754d1c2fe03ae45818b48f837b4c70
ca1cb2fda9f20cf45e61ae3989c728212122d55f
refs/heads/main
2023-07-27T14:31:57.831591
2021-09-10T20:54:09
2021-09-10T20:54:09
403,802,809
0
0
null
null
null
null
UTF-8
Java
false
false
665
java
package com.devsuperior.dsvendas.dto; import java.io.Serializable; import com.devsuperior.dsvendas.entities.Seller; public class SaleSumDTO implements Serializable { private static final long serialVersionUID = 1L; private String sellerName; private Double sum; public SaleSumDTO() { } public SaleSumDTO(Seller seller, Double sum) { super(); this.sellerName = seller.getName(); this.sum = sum; } public String getSellerName() { return sellerName; } public void setSellerName(String sellerName) { this.sellerName = sellerName; } public Double getSum() { return sum; } public void setSum(Double sum) { this.sum = sum; } }
[ "shedvaldo1@gmail.com" ]
shedvaldo1@gmail.com
f10e027c82be5b3ad0a0c29e40e187e6e4f3dd8b
921bf5b767040b00b2230395e4f67d90d2912358
/src/test/java/com/dillselectric/payroll/service/calculators/MedicareCalculatorTest.java
ee44e5b92ee21e166005e75ac4d15eaec00ff675
[]
no_license
safari137/Payroll-Java-Spring
b7f0743280789e1f4b1fe415da69f7eb6b37e9ee
b265b556874dbfe48603afe208b92432673819d2
refs/heads/master
2021-01-21T13:21:28.419465
2016-05-10T23:46:24
2016-05-10T23:46:24
55,262,251
0
0
null
null
null
null
UTF-8
Java
false
false
1,784
java
package com.dillselectric.payroll.service.calculators; import com.dillselectric.contracts.Calculator; import com.dillselectric.payroll.model.Paycheck; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; public class MedicareCalculatorTest { Paycheck paycheck; Calculator calculator; @Before public void setUp() throws Exception { paycheck = new Paycheck(); calculator = new MedicareCalculator(); } @Test public void medicareCalculatorSetsBothPropertiesOfPaycheck() throws Exception { paycheck = calculator.calculate(null, 100.00, paycheck); assertEquals("medicare withholding", 1.45, paycheck.getMedicareWithholdingTax(), 0); assertEquals("employer medicare withholding", 1.45, paycheck.getEmployerMedicareTax(), 0); } @Test public void medicareCalculatorReturnsSameValueForEmployeeAndEmployer() { paycheck = calculator.calculate(null, 100.00, paycheck); assertEquals(paycheck.getEmployerMedicareTax(), paycheck.getMedicareWithholdingTax(), 0); } @Test public void medicareCalculatorReturns_0_WhenGrossPayIs_0() throws Exception { paycheck = calculator.calculate(null, 0, paycheck); assertEquals("medicare withholding", 0, paycheck.getMedicareWithholdingTax(), 0); assertEquals("employer medicare withholding", 0, paycheck.getEmployerMedicareTax(), 0); } @Test public void medicareCalculatorRoundsDigitsCorrectly() throws Exception { paycheck = calculator.calculate(null, 137.00, paycheck); assertEquals("medicare withholding", 1.99, paycheck.getMedicareWithholdingTax(), 0); assertEquals("employer medicare withholding", 1.99, paycheck.getEmployerMedicareTax(), 0); } }
[ "dbdill137@gmail.com" ]
dbdill137@gmail.com
835dc4c0adaee2ba1d218d37901b13dabc9f2d0d
cbea23d5e087a862edcf2383678d5df7b0caab67
/aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/PlatformTaskDefinitionIncompatibilityException.java
d64690b45ce55f2c1ef1f32d5a347fe1a5c64971
[ "Apache-2.0" ]
permissive
phambryan/aws-sdk-for-java
66a614a8bfe4176bf57e2bd69f898eee5222bb59
0f75a8096efdb4831da8c6793390759d97a25019
refs/heads/master
2021-12-14T21:26:52.580137
2021-12-03T22:50:27
2021-12-03T22:50:27
4,263,342
0
0
null
null
null
null
UTF-8
Java
false
false
1,321
java
/* * Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.ecs.model; import javax.annotation.Generated; /** * <p> * The specified platform version doesn't satisfy the required capabilities of the task definition. * </p> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PlatformTaskDefinitionIncompatibilityException extends com.amazonaws.services.ecs.model.AmazonECSException { private static final long serialVersionUID = 1L; /** * Constructs a new PlatformTaskDefinitionIncompatibilityException with the specified error message. * * @param message * Describes the error encountered. */ public PlatformTaskDefinitionIncompatibilityException(String message) { super(message); } }
[ "" ]
c75767572af88611e17f2ed746f91fc33cc0d72c
a04eb2de29af63f50d76177356de6bbd63d749b4
/br/edu/unoesc/Produto.java
7c50d80ff10f249df6e14dfe9bb6a45c2e331456
[]
no_license
TheylorMarmitt/AtividadeCarrinhoDeCompras
79cbcc39c7a021c7cb9fc087c06f2b9a5cb58e7a
e5701f532c496b2e40cf26dfa544ec78beac538c
refs/heads/master
2021-08-23T10:53:28.935518
2017-12-04T15:50:48
2017-12-04T15:50:48
113,062,681
0
0
null
null
null
null
UTF-8
Java
false
false
2,033
java
package br.edu.unoesc; public class Produto { private String nome; private int codigo; private Double preco; public Produto() { } public Produto(String nome, int codigo, Double preco) { this.nome = nome; this.codigo = codigo; this.preco = preco; } public Produto(int codigo) { this.codigo = codigo; } public String getNome() { return nome; } public void setNome(String nome) { this.nome = nome; } public int getCodigo() { return codigo; } public void setCodigo(int codigo) { this.codigo = codigo; } public Double getPreco() { return preco; } public void setPreco(Double preco) { this.preco = preco; } // adiciona produto public boolean adicionarProduto(String nome, int codigo, Double preco) { boolean achou = false; Produto p = new Produto(nome, codigo, preco); for (int i = 0; i < Banco.produtos.size(); i++) { if (p.equals(Banco.produtos.get(i))) { achou = true; break; } } if (!achou) { Banco.produtos.add(p); return true; }else { return false; } } // remove produto public boolean removerProduto(int cod) { boolean achou = false; Produto p = new Produto(cod); for (int i = 0; i < Banco.produtos.size(); i++) { if (p.equals(Banco.produtos.get(i))) { achou = true; break; } } if(achou) { Banco.produtos.remove(p); return true; }else { return false; } } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + codigo; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Produto other = (Produto) obj; if (codigo != other.codigo) return false; return true; } // lista produtos public void listar() { Banco.produtos.forEach(System.out::println); } @Override public String toString() { return " Produto: nome: " + nome + ", cod: " + codigo + ", preco: " + preco; } }
[ "TheylorMarmitt@users.noreply.github.com" ]
TheylorMarmitt@users.noreply.github.com
f7ee43021f4d39f04be0dbe3511d94e849d702fa
db2aad36ad5d6266bc7a11e2a7abfb5254005906
/EJB3/book-source/sourcecode/EntityListeners/src/com/foshanshop/ejb3/impl/EntityLifecycleDAOBean.java
1d4d0a9511391d794d43803fdb4cffc3fce455d2
[]
no_license
manoharant/EJB
6cf254c87026a0611a9e382ed33feb1cd56e1cda
730139253384c303a534c5c6d317d62e853d5c8e
refs/heads/master
2021-01-25T11:34:37.622955
2017-06-10T11:40:26
2017-06-10T11:40:26
93,935,383
0
0
null
null
null
null
UTF-8
Java
false
false
1,447
java
package com.foshanshop.ejb3.impl; import java.util.List; import javax.ejb.Remote; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import com.foshanshop.ejb3.EntityLifecycleDAO; import com.foshanshop.ejb3.bean.EntityLifecycle; @Stateless @Remote (EntityLifecycleDAO.class) @SuppressWarnings("unchecked") public class EntityLifecycleDAOBean implements EntityLifecycleDAO { @PersistenceContext protected EntityManager em; public EntityLifecycle Load() { return em.find(EntityLifecycle.class, 1); } public void Persist() { EntityLifecycle entitylifecycle = new EntityLifecycle("Persist"); em.persist(entitylifecycle); } public void Remove() { Query query = em.createQuery("select e from EntityLifecycle e"); List<EntityLifecycle> result = (List<EntityLifecycle>)query.getResultList(); if (result.size()>0){ EntityLifecycle entitylifecycle = result.get(0); em.remove(entitylifecycle); } } public void Update() { Query query = em.createQuery("select e from EntityLifecycle e"); List<EntityLifecycle> result = (List<EntityLifecycle>)query.getResultList(); if (result.size()>0){ EntityLifecycle entitylifecycle = result.get(0); entitylifecycle.setName("Update"); } } }
[ "manoharant@gmail.com" ]
manoharant@gmail.com
2a8ce801f765b42c311e77d557b151366cf54431
d0f4ca05c4a172d84875364bbab9bcab53d0ffab
/babyServlet/src/bitcamp/java142/board/common/ConnProperty.java
90bfa4a86f56c45c3e265718a7088055592b5a6a
[]
no_license
33l33q/model2
6d48d39b01a893d59d284feb6590c6d15d2e86bc
3c00ba9f3ca059cca55930d63870a27a179bd20e
refs/heads/master
2022-10-05T01:39:03.128344
2020-06-09T18:21:38
2020-06-09T18:21:38
267,005,966
0
0
null
null
null
null
UTF-8
Java
false
false
1,734
java
package bitcamp.java142.board.common; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; public abstract class ConnProperty { public static final String ORACLE11G_JDBCDRIVER = "oracle.jdbc.driver.OracleDriver"; public static final String ORACLE11G_URL = "jdbc:oracle:thin:@127.0.0.1:1521:orclBEE"; public static final String ORACLE11G_USER = "scott"; public static final String ORACLE11G_PASS = "tiger"; public static Connection getConnection() throws Exception { Connection conn = null; Class.forName(ORACLE11G_JDBCDRIVER); conn = DriverManager.getConnection(ORACLE11G_URL, ORACLE11G_USER, ORACLE11G_PASS); return conn; } public static void conClose(Connection conn, PreparedStatement pstmt, ResultSet rsRs){ try { if(rsRs == null){ try { rsRs.close(); rsRs = null; } catch(Exception e){ } //end of try } if(pstmt == null ){ try { pstmt.close(); pstmt = null ; }catch(Exception e){ }//end of try2 } if( conn == null){ try { conn.close(); conn = null; }catch(Exception e){ }//end of try3 }//end of if }catch(Exception e){ }// end of try }//end of conClose public static void conClose(Connection conn, PreparedStatement pstmt){ try { if(pstmt == null ){ try { pstmt.close(); pstmt = null ; }catch(Exception e){ }//end of try2 } if( conn == null){ try { conn.close(); conn = null; }catch(Exception e){ }//end of try3 }//end of if }catch(Exception e){ }// end of try }//end of conClose }//end of class
[ "22bmad@gmail.com" ]
22bmad@gmail.com
33fb1d721c51d3bfbed10cf10c287af017ab9353
6457c4918a3a09693fb5ba67e9126bc7a04d4086
/feignconsumer/src/main/java/com/wgj/feignconsumer/FeignconsumerApplication.java
2758be1aa4275685c5352e0a6251aa74a7de8adb
[]
no_license
irekywang/eurakedemo
8992a0300370fa00a1ace5d5d640350846d5406d
c32cbea27e1fac2780a7b71670d48a3e981899d3
refs/heads/master
2020-04-26T17:04:49.353180
2019-03-04T08:04:56
2019-03-04T08:04:56
173,701,274
0
0
null
null
null
null
UTF-8
Java
false
false
518
java
package com.wgj.feignconsumer; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.netflix.feign.EnableFeignClients; @SpringBootApplication @EnableFeignClients @EnableEurekaClient public class FeignconsumerApplication { public static void main(String[] args) { SpringApplication.run(FeignconsumerApplication.class, args); } }
[ "ireky.wang@transn.com" ]
ireky.wang@transn.com