blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
ade90e38e4d9fc53726f31816a183d56c51b66fb
35fbffa9af4e6ff552a5b89c99f1e2b06fe9c7af
/src/main/java/com/hadoop/matrix/step1/MR1.java
715eed11bce1354be70d82354cd8d60581696ef4
[]
no_license
wangzy0327/mapreduceTest
81970d9f49714cbf331fed682815c3b6ac3161bd
5bc60d0aa63c0a3820fe3562eb051d2966d087b4
refs/heads/master
2021-08-30T12:50:57.440835
2017-12-18T02:12:35
2017-12-18T02:12:35
113,956,293
0
0
null
null
null
null
UTF-8
Java
false
false
2,775
java
package com.hadoop.matrix.step1; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import java.io.IOException; public class MR1 { //输入文件相对路径 //private static String inPath = "/user/wzy/matrix/step1_input/matrix2.txt"; private static String inPath = "matrix/step1_input/matrix2.txt"; //输出文件相对路径 //private static String outPath = "/user/wzy/matrix/step1_output"; private static String outPath = "matrix/step1_output"; //hdfs文件地址 private static String hdfs = "hdfs://localhost:9000"; public int run() { try { //创建job作业的配置 Configuration conf = new Configuration(); //设置hdfs地址 conf.set("fs.defaultFS", hdfs); //创建一个Job实例 Job job = Job.getInstance(conf, "step1"); //设置job的主类 job.setJarByClass(MR1.class); //设置Map,Reduce的类型 job.setMapperClass(Mapper1.class); job.setReducerClass(Reducer1.class); //设置Map输出key,value类型 job.setMapOutputKeyClass(Text.class); job.setMapOutputValueClass(Text.class); //设置Reduce输出key,value类型 job.setOutputKeyClass(Text.class); job.setOutputValueClass(Text.class); FileSystem fs = FileSystem.get(conf); //设置输入输出路径 Path inputPath = new Path(inPath); if (fs.exists(inputPath)) { //将输入路径添加到job中 FileInputFormat.addInputPath(job, inputPath); } Path outputPath = new Path(outPath); //如果路径存在则删除,否则不删除 fs.delete(outputPath, true); //将输出路径添加到job中 FileOutputFormat.setOutputPath(job, outputPath); return job.waitForCompletion(true) ? 1 : -1; } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } return -1; } public static void main(String[] args) { int result = -1; result = new MR1().run(); if (result == 1) { System.out.println("step1执行成功!"); } else { System.out.println("step1执行失败!"); } } }
[ "wangzy0327@qq.com" ]
wangzy0327@qq.com
b9cf751bfe504cc462555377116f9df8742463fb
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE89_SQL_Injection/CWE89_SQL_Injection__console_readLine_executeUpdate_53b.java
641a593ef1e0f26ca6aaf0eb4993025d30c015bb
[]
no_license
glopezGitHub/Android23
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
refs/heads/master
2023-03-07T15:14:59.447795
2023-02-06T13:59:49
2023-02-06T13:59:49
6,856,387
0
3
null
2023-02-06T18:38:17
2012-11-25T22:04:23
Java
UTF-8
Java
false
false
1,587
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE89_SQL_Injection__console_readLine_executeUpdate_53b.java Label Definition File: CWE89_SQL_Injection.label.xml Template File: sources-sinks-53b.tmpl.java */ /* * @description * CWE: 89 SQL Injection * BadSource: console_readLine Read data from the console using readLine() * GoodSource: A hardcoded string * Sinks: executeUpdate * GoodSink: Use prepared statement and executeUpdate (properly) * BadSink : data concatenated into SQL statment used in executeUpdate(), which could result in SQL Injection * Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package * * */ package testcases.CWE89_SQL_Injection; import testcasesupport.*; import java.sql.*; import javax.servlet.http.*; import java.util.logging.Level; import java.util.logging.Logger; public class CWE89_SQL_Injection__console_readLine_executeUpdate_53b { public void bad_sink(String data ) throws Throwable { (new CWE89_SQL_Injection__console_readLine_executeUpdate_53c()).bad_sink(data ); } /* goodG2B() - use goodsource and badsink */ public void goodG2B_sink(String data ) throws Throwable { (new CWE89_SQL_Injection__console_readLine_executeUpdate_53c()).goodG2B_sink(data ); } /* goodB2G() - use badsource and goodsink */ public void goodB2G_sink(String data ) throws Throwable { (new CWE89_SQL_Injection__console_readLine_executeUpdate_53c()).goodB2G_sink(data ); } }
[ "guillermo.pando@gmail.com" ]
guillermo.pando@gmail.com
c38af3a9e89aafe9e2f3d39528c31ebf9e9de89a
13516f81274e767d2bcece79dca22752461471e1
/maven-java-02-algorithm_and_data_structures/src/main/java/com/zzt/algorithm/leet_code_2/Solution02.java
c5cdd4b3fc11cfdc9b3dec462b523ec0e6f76530
[]
no_license
zhouzhitong/maven-java-learning_route
899d7aa2d8546c7fc6e2af371a704b462bfccb02
776ef9cbe5d46d5930fee5b9703c83a7da791115
refs/heads/master
2023-02-20T17:32:33.595828
2020-10-22T13:22:16
2020-10-22T13:22:16
296,757,433
0
1
null
null
null
null
UTF-8
Java
false
false
1,801
java
package com.zzt.algorithm.leet_code_2; /** * 描述:<br> * </> * * @author 周志通 * @version 1.0.0 * @date 2020/9/23 19:00 **/ public class Solution02 { public boolean check(char[][] cs, String word) { char[] target = word.toCharArray(); for (int i = 0; i < cs.length; i++) { for (int j = 0; j < cs[i].length; j++) { if (checkWay(cs, i, j, target, 0)) { return true; } } } return false; } private boolean checkWay(char[][] cs, int i, int j, char[] target, int k) { if (k == target.length) { return true; } else { char temp; if (cs[i][j] == target[k]) { temp = cs[i][j]; cs[i][j] = '1'; int a; k = k + 1; if ((a = i + 1) < cs.length && checkWay(cs, a, j, target, k)) { return true; } else if ((a = j - 1) >= 0 && checkWay(cs, i, a, target, k)) { return true; } else if ((a = i - 1) >= 0 && checkWay(cs, a, j, target, k)) { return true; } else if ((a = j + 1) < cs[i].length && checkWay(cs, i, a, target, k)) { return true; } cs[i][j] = temp; } } return false; } public static void main(String[] args) { Solution02 solution02 = new Solution02(); char[][] cs = {{'A', 'B', 'C', 'E'} , {'S', 'F', 'C', 'S'} , {'A', 'D', 'E', 'E'}}; // String word = "ABCCED"; String word = "ABCB"; boolean check = solution02.check(cs, word); System.out.println(check); } }
[ "528382226@qq.com" ]
528382226@qq.com
0a8d0f4a19260e31907573454b73c281470248b3
f61891e610071d9a049ae1f59f315738f1d93500
/JGDMS/extra/src/main/java/org/apache/river/extra/selfhealing/ServiceWrapper.java
73853682d5de64296602a680d8ca5d0889e438e6
[ "BSD-3-Clause", "Apache-2.0", "MIT", "CC-BY-SA-3.0" ]
permissive
pfirmstone/JGDMS
fd145a0f0fbcc848d0635a3ce78fae23fca5b0be
9d0d693e225286803a72d67ee750089f546b9956
refs/heads/trunk
2023-07-11T20:54:39.788096
2023-06-25T10:51:31
2023-06-25T10:51:31
49,324,039
26
4
Apache-2.0
2023-05-03T01:55:24
2016-01-09T12:47:11
HTML
UTF-8
Java
false
false
6,526
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.river.extra.selfhealing; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.rmi.RemoteException; import java.util.logging.Level; import java.util.logging.Logger; import net.jini.admin.Administrable; import net.jini.core.lookup.ServiceTemplate; import org.apache.river.extra.discovery.ServiceFinder; /** * Simple implementation of a self-healing proxy. Instead of standard River * service discovery, this <code>ServiceWrapper</code> is used alongside the * <code>SelfHealingServiceFactory</code>. Then, when a method is called on a * (wrapped) service, should that service call fail the wrapper will * automatically to find a replacement service and re-make the same method call * to the newly discovered service. * * This leaves the remainder of the application to only have to deal with the * occurance of when no service can be found in the djinn at all, rather than * having to deal with generic service failures, relookups and retries. * * This suite of classes is intended to be a reference implementation and * alternative strategies for service lookup and re-invokation can be easily * implemented. * * @see SelfHealingServiceFactory */ public class ServiceWrapper implements InvocationHandler, Administrable { private static final Logger logger = Logger.getLogger(ServiceWrapper.class.getSimpleName()); private ServiceFinder finder; private ServiceTemplate template; private Object proxy; /** * Ideally, this cntr would be invoked from the <code>SelfHealingServiceFactory</code> * but there is no reason why this should be enforced. * * It simply creates the <code>ServiceWrapper</code> with a lazy-located * service proxy based on the input template. * * @param finder - The specific method for locating services in the djinn * @param template - The template used for finding replacement services */ ServiceWrapper(final ServiceFinder finder, final ServiceTemplate template) { setServiceFinder(finder); setServiceTemplate(template); } /** * This method attempts the invoke the specified method call on the service. * If that method call fails then an attempt it made to find a replacement * service and the method call is re-executed against the new service. * Assuming one is found. * * If the second method invokation fails then the exception is thrown back * to the caller. * * Inherited from <code>InvocationHandler</code>, this forms the basis of * our reflection based wrapper. Usually the input object is the one to * have the method invoked on it, since we are looking up and using our * own services proxies, this argument is ignored. * */ public Object invoke(final Object ignored, final Method method, final Object[] args) throws Throwable { initServiceProxy(); Object response = null; boolean serviceCallFailed = false; try { response = execute(method, args); } catch (RemoteException re) { logger.log(Level.WARNING, "Service invocation failed: "+re.getMessage(), re); serviceCallFailed = true; } catch (Throwable t) { logger.log(Level.WARNING, "Service invocation failed: "+t.getMessage(), t); serviceCallFailed = true; } //attempt to find a replacement service and reissue the call if(serviceCallFailed) { logger.info("Service call failed. Looking for replacement service"); initServiceProxy(); response = execute(method, args); } return response; } /** * Convenience method to return the <code>Administrable</code> object from * the service proxy. It assumes that the service proxy implements this * interface, and if it does not the <code>ClassCastException</code> is * thrown to the caller. * * NOTE: Not personally convinced that this is necessary... */ public Object getAdmin() throws RemoteException { if(null == this.proxy) { throw new RemoteException("No service proxy"); } return ((Administrable)this.proxy).getAdmin(); } private Object execute(final Method method, final Object[] args) throws RemoteException { try { logger.finest("Invoking method ["+method+"] on "+this.proxy); return method.invoke(this.proxy, args); } catch (IllegalAccessException iae) { throw new RemoteException("Cannot execute method because "+iae.getMessage(), iae); } catch (IllegalArgumentException iae) { throw new RemoteException("Cannot execute method because "+iae.getMessage(), iae); } catch (InvocationTargetException ite) { throw new RemoteException("Cannot execute method because "+ite.getMessage(), ite); } } private void initServiceProxy() throws RemoteException { if(null == this.proxy) { logger.finer("Looking for a service proxy"); this.proxy = this.finder.findNewService(this.template); } } private void setServiceFinder(final ServiceFinder finder) { if(null == finder) { throw new IllegalArgumentException("ServiceFinder cannot be null"); } this.finder = finder; } private void setServiceTemplate(final ServiceTemplate template) { if(null == template) { throw new IllegalArgumentException("ServiceTemplate cannot be null"); } this.template = template; } }
[ "jini@zeus.net.au" ]
jini@zeus.net.au
6df1a256ae34a79958c9a22d89021c7b7b49eaa6
d523206fce46708a6fe7b2fa90e81377ab7b6024
/com/google/android/gms/vision/barcode/zzh.java
fbcd48a1829d6312712ff764ef8c5a5c78ef840a
[]
no_license
BlitzModder/BlitzJava
0ee94cc069dc4b7371d1399ff5575471bdc88aac
6c6d71d2847dfd5f9f4f7c716cd820aeb7e45f2c
refs/heads/master
2021-06-11T15:04:05.571324
2017-02-04T16:04:55
2017-02-04T16:04:55
77,459,517
1
2
null
null
null
null
UTF-8
Java
false
false
1,721
java
package com.google.android.gms.vision.barcode; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.zza; import com.google.android.gms.common.internal.safeparcel.zza.zza; import com.google.android.gms.common.internal.safeparcel.zzb; public class zzh implements Parcelable.Creator<Barcode.GeoPoint> { static void zza(Barcode.GeoPoint paramGeoPoint, Parcel paramParcel, int paramInt) { paramInt = zzb.zzav(paramParcel); zzb.zzc(paramParcel, 1, paramGeoPoint.versionCode); zzb.zza(paramParcel, 2, paramGeoPoint.lat); zzb.zza(paramParcel, 3, paramGeoPoint.lng); zzb.zzI(paramParcel, paramInt); } public Barcode.GeoPoint zzgQ(Parcel paramParcel) { double d1 = 0.0D; int j = zza.zzau(paramParcel); int i = 0; double d2 = 0.0D; while (paramParcel.dataPosition() < j) { int k = zza.zzat(paramParcel); switch (zza.zzcc(k)) { default: zza.zzb(paramParcel, k); break; case 1: i = zza.zzg(paramParcel, k); break; case 2: d2 = zza.zzn(paramParcel, k); break; case 3: d1 = zza.zzn(paramParcel, k); } } if (paramParcel.dataPosition() != j) { throw new zza.zza("Overread allowed size end=" + j, paramParcel); } return new Barcode.GeoPoint(i, d2, d1); } public Barcode.GeoPoint[] zzkj(int paramInt) { return new Barcode.GeoPoint[paramInt]; } } /* Location: /Users/subdiox/Downloads/dex2jar-2.0/net.wargaming.wot.blitz-dex2jar.jar!/com/google/android/gms/vision/barcode/zzh.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "subdiox@gmail.com" ]
subdiox@gmail.com
4c63103df760e441e3bfe1e2f5c820beaa62d6cb
83bc62933c7824efc149830d01f0779f0a1d2a49
/ms.commons.security/src/main/java/com/ms/commons/security/HMacMD5.java
9ae104c9414b52755aeaf42b030ee44a53c9b905
[]
no_license
ylsn19821104/com.ms.commons
44830133e4b961b280f9e4faa5629d5ab40209f0
02b9a6b69a2aa13d90b735e8cba7d047596483eb
refs/heads/master
2021-01-15T11:28:28.098307
2014-11-04T08:01:32
2014-11-04T08:01:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,643
java
/* * Copyright 2011-2016 ZXC.com All right reserved. This software is the confidential and proprietary information of * ZXC.com ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into with ZXC.com. */ package com.ms.commons.security; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; /** * @author zxc Apr 12, 2013 5:26:54 PM */ public class HMacMD5 { private static byte[] md5(byte[] str) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(str); return md.digest(); } public static byte[] getHmacMd5Bytes(byte[] key, byte[] data) throws NoSuchAlgorithmException { int length = 64; byte[] ipad = new byte[length]; byte[] opad = new byte[length]; for (int i = 0; i < 64; i++) { ipad[i] = 0x36; opad[i] = 0x5C; } byte[] actualKey = key; // Actual key. byte[] keyArr = new byte[length]; // Key bytes of 64 bytes length if (key.length > length) { actualKey = md5(key); } for (int i = 0; i < actualKey.length; i++) { keyArr[i] = actualKey[i]; } if (actualKey.length < length) { for (int i = actualKey.length; i < keyArr.length; i++) keyArr[i] = 0x00; } byte[] kIpadXorResult = new byte[length]; for (int i = 0; i < length; i++) { kIpadXorResult[i] = (byte) (keyArr[i] ^ ipad[i]); } byte[] firstAppendResult = new byte[kIpadXorResult.length + data.length]; for (int i = 0; i < kIpadXorResult.length; i++) { firstAppendResult[i] = kIpadXorResult[i]; } for (int i = 0; i < data.length; i++) { firstAppendResult[i + keyArr.length] = data[i]; } byte[] firstHashResult = md5(firstAppendResult); byte[] kOpadXorResult = new byte[length]; for (int i = 0; i < length; i++) { kOpadXorResult[i] = (byte) (keyArr[i] ^ opad[i]); } byte[] secondAppendResult = new byte[kOpadXorResult.length + firstHashResult.length]; for (int i = 0; i < kOpadXorResult.length; i++) { secondAppendResult[i] = kOpadXorResult[i]; } for (int i = 0; i < firstHashResult.length; i++) { secondAppendResult[i + keyArr.length] = firstHashResult[i]; } byte[] hmacMd5Bytes = md5(secondAppendResult); return hmacMd5Bytes; } }
[ "zhangxiongcai337@gmail.com" ]
zhangxiongcai337@gmail.com
69ee870658531af8646f4ec1913a8523b5b779ee
e94283089810516f048bd58590036c88588112cb
/src/S0133CloneGraph.java
7c40920dfde3b67056dc87310598d338b7fba48d
[]
no_license
camelcc/leetcode
e0839e6267ebda5eef57da065d4adaefecb4b557
d982b9e71bc475a599df45d66cf2b78cf017594d
refs/heads/master
2022-07-19T06:24:49.148849
2022-07-10T07:00:34
2022-07-10T07:00:34
135,386,923
5
1
null
null
null
null
UTF-8
Java
false
false
1,917
java
import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class S0133CloneGraph { class UndirectedGraphNode { int label; List<UndirectedGraphNode> neighbors; UndirectedGraphNode(int x) { label = x; neighbors = new ArrayList<UndirectedGraphNode>(); } } public UndirectedGraphNode cloneGraph(UndirectedGraphNode node) { if (node == null) { return null; } HashMap<Integer, UndirectedGraphNode> graph = new HashMap<>(); UndirectedGraphNode res = new UndirectedGraphNode(node.label); graph.put(node.label, res); List<UndirectedGraphNode> nodes = new ArrayList<>(); nodes.add(node); List<UndirectedGraphNode> visited = new ArrayList<>(); while (!nodes.isEmpty()) { UndirectedGraphNode originNode = nodes.remove(0); UndirectedGraphNode newNode = graph.get(originNode.label); assert newNode != null; for (UndirectedGraphNode originalNeighbor : originNode.neighbors) { UndirectedGraphNode newNeighbor = graph.get(originalNeighbor.label); if (newNeighbor == null) { newNeighbor = new UndirectedGraphNode(originalNeighbor.label); graph.put(originalNeighbor.label, newNeighbor); } if (originalNeighbor != originNode) { newNode.neighbors.add(newNeighbor); if (!visited.contains(newNeighbor)) { if (!nodes.contains(originalNeighbor)) { nodes.add(originalNeighbor); } } } else { newNode.neighbors.add(newNeighbor); } } visited.add(newNode); } return res; } }
[ "camel.young@gmail.com" ]
camel.young@gmail.com
e70520a85a00f1220e65fceb8278c85cc7239f63
64e3f2b8d6abff582d8dff2f200e0dfc708a5f4b
/Templates/Akka/PersonImpl.java
9b88e42c877c22038744f1682232acd509c83ce0
[]
no_license
tedneward/Demos
a65df9d5a0390e3fdfd100c33bbc756c83d4899e
28fff1c224e1f6e28feb807a05383d7dc1361cc5
refs/heads/master
2023-01-11T02:36:24.465319
2019-11-30T09:03:45
2019-11-30T09:03:45
239,251,479
0
0
null
2023-01-07T14:38:21
2020-02-09T05:21:15
Java
UTF-8
Java
false
false
677
java
import akka.actor.*; //import akka.dispatch.*; //import com.eaio.uuid.UUID; //import scala.*; public class PersonImpl extends TypedActor implements Person { public String getFirstName() { return first; } public String getLastName() { return last; } public int getAge() { return a; } public void setFirstName(String value) { first = value; } public void setLastName(String value) { last = value; } public void setAge(int value) { a = value; } public String toString() { return "[PersonImpl: " + first + "]"; } private String first; private String last; private int a; }
[ "ted@tedneward.com" ]
ted@tedneward.com
ec3907edb53ea2c1638a530a462dc101c7b6aeaf
412b83ce798ffd455ede73227e70da274adaf3fd
/springBoot/readlinglistwithcustomize/src/main/java/com/coldjune/readinglist/model/AmazonProperties.java
8fc8426c4c7a6166e00d430382ee2345a2096205
[]
no_license
coldJune/spring
3e0e5bf2cefcd1b61525f532d208fa2816728804
5426840c1eb514f9149ea91ebb85aa8dd2342b55
refs/heads/master
2022-12-25T18:43:02.764208
2021-03-03T07:47:59
2021-03-03T07:47:59
222,680,471
0
1
null
2022-12-16T03:55:10
2019-11-19T11:29:05
Java
UTF-8
Java
false
false
458
java
package com.coldjune.readinglist.model; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; @Component @ConfigurationProperties("amazon") public class AmazonProperties { private String associatedId; public String getAssociatedId() { return associatedId; } public void setAssociatedId(String associatedId) { this.associatedId = associatedId; } }
[ "785691557@qq.com" ]
785691557@qq.com
57f14fc5a1135326d490ff5efa24f2bfc6d791cf
2a2b90935544050a1ab3a15fab89526eb3360d57
/app/src/main/java/com/danlai/nidepuzi/adapter/ShareHistoryAdapter.java
b2eb6707ea13756bb2c16eaad97c867e947b4559
[]
no_license
nidepuzi/nidepuzi-android
a32721948dc3d2283266099525936bd0c85771f4
96406b34bebfd9fa2cd5b1dbd058771052b24a46
refs/heads/master
2020-05-27T22:35:43.208360
2019-05-27T08:57:17
2019-05-27T08:58:51
188,806,522
0
0
null
null
null
null
UTF-8
Java
false
false
1,405
java
package com.danlai.nidepuzi.adapter; import com.danlai.nidepuzi.R; import com.danlai.nidepuzi.base.BaseActivity; import com.danlai.nidepuzi.base.BaseRecyclerViewAdapter; import com.danlai.nidepuzi.base.BaseViewHolder; import com.danlai.nidepuzi.databinding.ItemShareHistoryBinding; import com.danlai.nidepuzi.entity.FansBean.ResultsBean; /** * @author wisdom * @date 2017年05月26日 下午2:31 */ public class ShareHistoryAdapter extends BaseRecyclerViewAdapter<ItemShareHistoryBinding, ResultsBean> { public ShareHistoryAdapter(BaseActivity activity) { super(activity); } @Override protected int getLayoutId() { return R.layout.item_share_history; } @Override public void onBindViewHolder(BaseViewHolder<ItemShareHistoryBinding> holder, int position) { ResultsBean bean = data.get(position); ItemShareHistoryBinding b = holder.b; b.tvMobile.setText(bean.getInvitee_mobile()); b.tvName.setText(bean.getNick()); b.tvDate.setText(bean.getCharge_time().replace("T", " ").substring(0, 10)); if (bean.getReferal_type() == 365 && "effect".equals(bean.getInvitee_status())) { b.tvStatus.setText("已支付"); } else if ("effect".equals(bean.getInvitee_status())) { b.tvStatus.setText("未支付"); } else { b.tvStatus.setText("已冻结"); } } }
[ "1131027649@qq.com" ]
1131027649@qq.com
f4112260331a82c797f37add08d74df212ddf876
86930ce4706f59ac1bb0c4b076106917d877fd99
/src/main/java/com/hanyun/scm/api/domain/result/ExcelResult.java
be6e82b398725dbd4245e02b1666b7759efc459e
[]
no_license
fengqingyuns/erp
61efe476e8926f2df8324fc7af66b16d80716785
bc6c654afe76fed0ba8eb515cc7ddd7acc577060
refs/heads/master
2022-07-13T11:18:10.661271
2019-12-05T14:21:30
2019-12-05T14:21:30
226,119,652
0
0
null
2022-06-29T17:49:35
2019-12-05T14:23:18
Java
UTF-8
Java
false
false
1,998
java
package com.hanyun.scm.api.domain.result; /** * * @ClassName: ExcelResult * @Description: 导出excel封装类 * @author 王超群 * @date 2016年12月9日 下午3:52:50 * */ public class ExcelResult { private String supplierName;//供应商名字 private Long total_price;//采购总价 private Long total_number;//采购数量 private Double avg_price;//采购平均价 private String orderRatio;//采购占比 private Long total_stock_price;//退货总价 private Long total_stock_number;//退货数 private String stockRatio;//退货占比 private String returnRate;//退货率 public String getSupplierName() { return supplierName; } public void setSupplierName(String supplierName) { this.supplierName = supplierName; } public Long getTotal_price() { return total_price; } public void setTotal_price(Long total_price) { this.total_price = total_price; } public Long getTotal_number() { return total_number; } public void setTotal_number(Long total_number) { this.total_number = total_number; } public Double getAvg_price() { return avg_price; } public void setAvg_price(Double avg_price) { this.avg_price = avg_price; } public Long getTotal_stock_price() { return total_stock_price; } public void setTotal_stock_price(Long total_stock_price) { this.total_stock_price = total_stock_price; } public Long getTotal_stock_number() { return total_stock_number; } public void setTotal_stock_number(Long total_stock_number) { this.total_stock_number = total_stock_number; } public String getOrderRatio() { return orderRatio; } public void setOrderRatio(String orderRatio) { this.orderRatio = orderRatio; } public String getStockRatio() { return stockRatio; } public void setStockRatio(String stockRatio) { this.stockRatio = stockRatio; } public String getReturnRate() { return returnRate; } public void setReturnRate(String returnRate) { this.returnRate = returnRate; } }
[ "litao@winshang.com" ]
litao@winshang.com
6e73918bc02951be126ea50a28fce04eb6947007
23a758183e0b2fb68411bb9ebef34d2fd0f813c0
/JavaPrj_13/源码/JavaPrj_13/src/HibernateDao/InventorytagDAO.java
1a554acef21fcaf7b723e420c272ce27c7d0ed77
[]
no_license
582496630/Project-20
9e46726f9038a271d01aa5cb71993fc617122196
a39ade4cf17087152840a2bb5ae791cffffc07d8
refs/heads/master
2020-04-05T11:45:29.771596
2017-07-10T07:55:07
2017-07-10T07:55:07
81,189,379
1
1
null
null
null
null
UTF-8
Java
false
false
3,860
java
package HibernateDao; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.LockMode; import org.hibernate.Query; import org.hibernate.criterion.Example; /** * Data access object (DAO) for domain model class Inventorytag. * * @see HibernateDao.Inventorytag * @author MyEclipse Persistence Tools */ public class InventorytagDAO extends BaseHibernateDAO { private static final Log log = LogFactory.getLog(InventorytagDAO.class); // property constants public static final String INC_ZERO = "incZero"; public static final String INC_NEGA = "incNega"; public void save(Inventorytag transientInstance) { log.debug("saving Inventorytag instance"); try { getSession().save(transientInstance); log.debug("save successful"); } catch (RuntimeException re) { log.error("save failed", re); throw re; } } public void delete(Inventorytag persistentInstance) { log.debug("deleting Inventorytag instance"); try { getSession().delete(persistentInstance); log.debug("delete successful"); } catch (RuntimeException re) { log.error("delete failed", re); throw re; } } public Inventorytag findById(java.lang.Integer id) { log.debug("getting Inventorytag instance with id: " + id); try { Inventorytag instance = (Inventorytag) getSession().get( "HibernateDao.Inventorytag", id); return instance; } catch (RuntimeException re) { log.error("get failed", re); throw re; } } public List findByExample(Inventorytag instance) { log.debug("finding Inventorytag instance by example"); try { List results = getSession().createCriteria( "HibernateDao.Inventorytag").add(Example.create(instance)) .list(); log.debug("find by example successful, result size: " + results.size()); return results; } catch (RuntimeException re) { log.error("find by example failed", re); throw re; } } public List findByProperty(String propertyName, Object value) { log.debug("finding Inventorytag instance with property: " + propertyName + ", value: " + value); try { String queryString = "from Inventorytag as model where model." + propertyName + "= ?"; Query queryObject = getSession().createQuery(queryString); queryObject.setParameter(0, value); return queryObject.list(); } catch (RuntimeException re) { log.error("find by property name failed", re); throw re; } } public List findByIncZero(Object incZero) { return findByProperty(INC_ZERO, incZero); } public List findByIncNega(Object incNega) { return findByProperty(INC_NEGA, incNega); } public List findAll() { log.debug("finding all Inventorytag instances"); try { String queryString = "from Inventorytag"; Query queryObject = getSession().createQuery(queryString); return queryObject.list(); } catch (RuntimeException re) { log.error("find all failed", re); throw re; } } public Inventorytag merge(Inventorytag detachedInstance) { log.debug("merging Inventorytag instance"); try { Inventorytag result = (Inventorytag) getSession().merge( detachedInstance); log.debug("merge successful"); return result; } catch (RuntimeException re) { log.error("merge failed", re); throw re; } } public void attachDirty(Inventorytag instance) { log.debug("attaching dirty Inventorytag instance"); try { getSession().saveOrUpdate(instance); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } public void attachClean(Inventorytag instance) { log.debug("attaching clean Inventorytag instance"); try { getSession().lock(instance, LockMode.NONE); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } }
[ "582496630@qq.com" ]
582496630@qq.com
b4f19c35d0e26a88f82f9ff51f9aa67a075d0ec3
821ed0666d39420d2da9362d090d67915d469cc5
/providers/snmp/alarm/src/test/java/org/onosproject/provider/snmp/alarm/impl/Bti7000SnmpAlarmProviderTest.java
a7968af0652bf2a78272c0e14c20d0149b35c8ab
[ "Apache-2.0" ]
permissive
LenkayHuang/Onos-PNC-for-PCEP
03b67dcdd280565169f2543029279750da0c6540
bd7d201aba89a713f5ba6ffb473aacff85e4d38c
refs/heads/master
2021-01-01T05:19:31.547809
2016-04-12T07:25:13
2016-04-12T07:25:13
56,041,394
1
0
null
null
null
null
UTF-8
Java
false
false
4,744
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.onosproject.provider.snmp.alarm.impl; import com.btisystems.mibbler.mibs.bti7000.bti7000_13_2_0.btisystems.btiproducts.bti7000.objects.conditions.ActAlarmTable; import com.btisystems.mibbler.mibs.bti7000.interfaces.btisystems.btiproducts.bti7000.objects.conditions.actalarmtable.IActAlarmEntry; import com.btisystems.pronx.ems.core.model.NetworkDevice; import com.btisystems.pronx.ems.core.snmp.ISnmpSession; import java.io.IOException; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Arrays; import java.util.Collection; import org.easymock.Capture; import static org.easymock.EasyMock.capture; import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.eq; import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.isA; import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.verify; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; import org.onosproject.incubator.net.faultmanagement.alarm.Alarm; import org.onosproject.net.DeviceId; import org.snmp4j.smi.OID; public class Bti7000SnmpAlarmProviderTest { private Bti7000SnmpAlarmProvider alarmProvider; private ISnmpSession mockSession; private ActAlarmTable alarmsTable; public Bti7000SnmpAlarmProviderTest() { } @Before public void setUp() { mockSession = createMock(ISnmpSession.class); alarmProvider = new Bti7000SnmpAlarmProvider(); } @Test public void shouldWalkDevice() throws UnknownHostException, IOException { expect(mockSession.getAddress()).andReturn(InetAddress.getLoopbackAddress()); expect(mockSession.walkDevice(isA(NetworkDevice.class), eq(Arrays.asList(new OID[]{ Bti7000SnmpAlarmProvider.CLASS_REGISTRY.getClassToOidMap().get(ActAlarmTable.class)})))) .andReturn(null); replay(mockSession); assertNotNull(alarmProvider.getAlarms(mockSession, DeviceId.deviceId("snmp:1.1.1.1"))); verify(mockSession); } @Test public void shouldFindAlarms() throws UnknownHostException, IOException { alarmsTable = new ActAlarmTable(); alarmsTable.createEntry("14.1.3.6.1.4.1.18070.2.2.2.2.20.0.1.13.1.3.6.1.4.1." + "18070.2.2.1.4.14.1.7.49.46.55.46.50.46.53"); IActAlarmEntry entry = alarmsTable.getEntries().values().iterator().next(); entry.setActAlarmDescription("XFP Missing."); entry.setActAlarmDateAndTime("07:df:0c:01:03:0d:30:00"); entry.setActAlarmSeverity(1); Capture<NetworkDevice> networkDeviceCapture = new Capture<>(); expect(mockSession.getAddress()).andReturn(InetAddress.getLoopbackAddress()); expect(mockSession.walkDevice(capture(networkDeviceCapture), eq(Arrays.asList(new OID[]{ Bti7000SnmpAlarmProvider.CLASS_REGISTRY.getClassToOidMap().get(ActAlarmTable.class)})))) .andAnswer(() -> { networkDeviceCapture.getValue().getRootObject().setObject(alarmsTable); return null; }); replay(mockSession); Collection<Alarm> alarms = alarmProvider.getAlarms(mockSession, DeviceId.deviceId("snmp:1.1.1.1")); assertEquals(1, alarms.size()); assertEquals("XFP Missing.", alarms.iterator().next().description()); verify(mockSession); } @Test public void shouldHandleException() throws UnknownHostException, IOException { expect(mockSession.getAddress()).andReturn(InetAddress.getLoopbackAddress()); expect(mockSession.walkDevice(isA(NetworkDevice.class), eq(Arrays.asList(new OID[]{ Bti7000SnmpAlarmProvider.CLASS_REGISTRY.getClassToOidMap().get(ActAlarmTable.class)})))) .andThrow(new IOException()); replay(mockSession); assertNotNull(alarmProvider.getAlarms(mockSession, DeviceId.deviceId("snmp:1.1.1.1"))); verify(mockSession); } }
[ "826080529@qq.com" ]
826080529@qq.com
774c50a6b61bafdf60f80126b1699e4f2873935d
8fdd1ed7a7580368ef39f1bfa4d66afdb0798f43
/dida_demo/src/main/java/com/dida/first/minepingou/presenter/MinePingouPresenterImpl.java
99c6eed1ac5f4c53ed4660ccac84422f5287c94b
[]
no_license
KingJA/DidaDemoAS
a0980785700d7299631c9a71f1483e195d93f645
d68311723a96869acfdcc50e2b3ce27c42c9235c
refs/heads/master
2021-01-10T16:43:44.882381
2016-04-04T09:12:02
2016-04-04T09:12:02
55,398,031
1
0
null
null
null
null
UTF-8
Java
false
false
1,130
java
package com.dida.first.minepingou.presenter; import com.dida.first.entity.BeanMinePingou; import com.dida.first.minepingou.model.MinePingouModelImpl; import com.dida.first.minepingou.view.MinePinGouView; /** * Created by KingJA on 2016-1-27. */ public class MinePingouPresenterImpl implements MinePinGouPresenter ,OnLoadNetListener<BeanMinePingou>{ private MinePinGouView minePinGouView; private final MinePingouModelImpl minePingouModel; public MinePingouPresenterImpl(MinePinGouView minePinGouView) { this.minePinGouView = minePinGouView; minePingouModel = new MinePingouModelImpl(); } @Override public void loadNet(String userId, int page, String type, String status) { minePinGouView.showProgress(); minePingouModel.loadNet(userId, page, type, status,this); } @Override public void onLoadNetSuccess(BeanMinePingou data) { minePinGouView.hideProgress(); minePinGouView.setData(data); } @Override public void onLoadNetErr(Exception e) { minePinGouView.hideProgress(); minePinGouView.showError(); } }
[ "kingjavip@gmail.com" ]
kingjavip@gmail.com
d14b7affb923dd2f841698c87c4d8aacf61de23a
cfc692f308148017d3ec5b555d2c78cd4755d080
/src/main/java/com/diwayou/acm/uva/Friends.java
6f9be20be8e34c01280df34ff642a486c1696888
[]
no_license
P79N6A/acm
be34c5676233b1fa45c68bb26df93be6cbee0368
400423dee951ae4dc5123499ad595b3ccd7bb749
refs/heads/master
2020-05-17T23:55:43.483758
2019-04-29T10:02:56
2019-04-29T10:02:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,616
java
package com.diwayou.acm.uva;// There is a town with N citizens. It is known that some pairs of people are friends. According to the // famous saying that “The friends of my friends are my friends, too” it follows that if A and B are friends // and B and C are friends then A and C are friends, too. // Your task is to count how many people there are in the largest group of friends. // Input // Input consists of several datasets. The first line of the input consists of a line with the number of test // cases to follow. // The first line of each dataset contains tho numbers N and M, where N is the number of town’s // citizens (1 ≤ N ≤ 30000) and M is the number of pairs of people (0 ≤ M ≤ 500000), which are known // to be friends. Each of the following M lines consists of two integers A and B (1 ≤ A ≤ N, 1 ≤ B ≤ N, // A ̸= B) which describe that A and B are friends. There could be repetitions among the given pairs // Output // The output for each test case should contain (on a line by itself) one number denoting how many people // there are in the largest group of friends on a line by itself. // Sample Input // 2 // 3 2 // 1 2 // 2 3 // 10 12 // 1 2 // 3 1 // 3 4 // 5 4 // 3 5 // 4 6 // 5 2 // 2 1 // 7 1 // 1 2 // 9 10 // 8 9 // Sample Output // 3 // 7 import java.io.BufferedReader; import java.io.InputStreamReader; /** * Created by kdn251 on 2/15/17. */ public class Friends { //initialize globals to track each individual person and their relationships public static int[] people = new int[30001]; public static int[] relationships = new int[50001]; public static void main(String args[]) throws Exception { //initialize buffered reader BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); //store number of test cases int testCases = Integer.parseInt(line); for (int i = 0; i < testCases; i++) { //determine number of people and pairs of people (N and M) String[] info = br.readLine().split(" "); int numberOfPeople = Integer.parseInt(info[0]); int numberOfRelationship = Integer.parseInt(info[1]); startUnion(numberOfPeople, people, relationships); //iterate through all relationships for (int j = 0; j < numberOfRelationship; j++) { //split current line to determine person and friend String[] currentLine = br.readLine().split(" "); int person = Integer.parseInt(currentLine[0]); int friend = Integer.parseInt(currentLine[1]); union(person, friend); } //initialize maxGroup to one because each group has one person initially int maxGroup = 1; //iterate through relationships to find the largest group for (int j = 0; j <= numberOfPeople; j++) { //update max as needed maxGroup = relationships[j] > maxGroup ? relationships[j] : maxGroup; } //print result System.out.println(maxGroup); } } public static void startUnion(int numberOfPeople, int[] people, int[] relationships) { for (int i = 0; i <= numberOfPeople; i++) { //initialize each individual person people[i] = i; //each person initially has a group of one (themselves) relationships[i] = 1; } } public static void union(int person, int friend) { //find parents in tree person = find(person); friend = find(friend); if (person != friend) { //add connection between person and friend join(person, friend); } } public static int find(int person) { //traverse parents of tree if possible if (people[person] != person) { people[person] = find(people[person]); } return people[person]; } public static void join(int person, int friend) { //find larger group of the two and make sure both person and friend point to it if (relationships[person] > relationships[friend]) { relationships[person] += relationships[friend]; people[friend] = person; } else { relationships[friend] += relationships[person]; people[person] = friend; } } } //source: https://github.com/morris821028/UVa/blob/master/volume106/10608%20-%20Friends.cpp#L27
[ "diwayou@qq.com" ]
diwayou@qq.com
4f3f30a00a411cd39e3db9d829964745eb48a458
7d76d30fe37b1de11bf0ecaac730c7256069c5a6
/osmosis-set/src/main/java/org/openstreetmap/osmosis/set/v0_6/ChangeSimplifierFactory.java
afc7b262f7f0ba96f8ba340a5f6a72f5e1e4a6b8
[]
no_license
openstreetmap/osmosis
51c0f4993f8b4a16b06f9f13d680889a9702ac73
81b00273635eb89e20f0f251d9a3db4804bda657
refs/heads/main
2023-08-31T00:01:20.475308
2023-08-26T06:26:56
2023-08-26T06:26:56
2,564,522
522
203
null
2023-09-02T00:57:45
2011-10-12T18:48:02
Java
UTF-8
Java
false
false
835
java
// This software is released into the Public Domain. See copying.txt for details. package org.openstreetmap.osmosis.set.v0_6; import org.openstreetmap.osmosis.core.pipeline.common.TaskConfiguration; import org.openstreetmap.osmosis.core.pipeline.common.TaskManager; import org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactory; import org.openstreetmap.osmosis.core.pipeline.v0_6.ChangeSinkChangeSourceManager; /** * The task manager factory for a change simplifier. * * @author Brett Henderson */ public class ChangeSimplifierFactory extends TaskManagerFactory { /** * {@inheritDoc} */ @Override protected TaskManager createTaskManagerImpl(TaskConfiguration taskConfig) { return new ChangeSinkChangeSourceManager( taskConfig.getId(), new ChangeSimplifier(), taskConfig.getPipeArgs() ); } }
[ "brett@bretth.com" ]
brett@bretth.com
d97313ae79f4ea52bdb456fd8caa8d960561d0b9
67249ea888f86ba5e133018a17d1c35993eeb1d2
/src/main/java/com/ziyu/jvm/ch07/instructions/math/LXor.java
dec4207790ab90646986e0c23f64c94e8afdd1b6
[]
no_license
ZheBigFish/myjvm
7515a3db5653a3771707df9949707ff1a583c118
13105d7da590118d133b97c806d83a518793444c
refs/heads/master
2022-12-22T04:56:54.224858
2020-05-16T08:10:29
2020-05-16T08:10:29
231,883,089
1
0
null
2022-12-16T05:06:36
2020-01-05T07:28:34
Java
UTF-8
Java
false
false
486
java
package com.ziyu.jvm.ch07.instructions.math; import com.ziyu.jvm.ch07.instructions.base.NoOperandsInstruction; import com.ziyu.jvm.ch07.rtda.Frame; /** * @ClassName pop * @Date * @Author * @Description TODO **/ public class LXor extends NoOperandsInstruction { @Override public void execute(Frame frame) { long i2 = frame.getOperandStack().popLong(); long i1 = frame.getOperandStack().popLong(); frame.getOperandStack().pushLong(i1 ^ i2); } }
[ "762349436@qq.com" ]
762349436@qq.com
64fb6db7ea84df7fb5858c18a477f41ea46e98df
15c33eb2ad75385ae16e5d4309f49665b2cce0fa
/Java/iRadar.Portal/C通用模块/M7拓扑中心/nms/org/springframework/mock/web/MockHttpSession.java
d6f709174b897faa27fd4a1768bfeee9f3e7daed
[]
no_license
caocaodl/zabbix_with_java
588cb13ebce707bec79611981149582cb6712ed2
41d1e8b5bb417b5010678ffc9dff795e5d218c75
refs/heads/master
2021-01-21T23:16:51.657808
2017-06-26T11:12:51
2017-06-26T11:12:51
95,219,984
4
4
null
null
null
null
UTF-8
Java
false
false
7,860
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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.mock.web; import java.io.Serializable; import java.util.Collections; import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; import javax.servlet.ServletContext; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSessionBindingEvent; import javax.servlet.http.HttpSessionBindingListener; import javax.servlet.http.HttpSessionContext; import org.springframework.util.Assert; /** * Mock implementation of the {@link javax.servlet.http.HttpSession} interface. * * <p>Compatible with Servlet 2.5 as well as Servlet 3.0. * * <p>Used for testing the web framework; also useful for testing application * controllers. * * @author Juergen Hoeller * @author Rod Johnson * @author Mark Fisher * @author Sam Brannen * @since 1.0.2 */ @SuppressWarnings("deprecation") public class MockHttpSession implements HttpSession { public static final String SESSION_COOKIE_NAME = "JSESSION"; private static int nextId = 1; private final String id; private final long creationTime = System.currentTimeMillis(); private int maxInactiveInterval; private long lastAccessedTime = System.currentTimeMillis(); private final ServletContext servletContext; private final Map<String, Object> attributes = new LinkedHashMap<String, Object>(); private boolean invalid = false; private boolean isNew = true; /** * Create a new MockHttpSession with a default {@link MockServletContext}. * * @see MockServletContext */ public MockHttpSession() { this(null); } /** * Create a new MockHttpSession. * * @param servletContext the ServletContext that the session runs in */ public MockHttpSession(ServletContext servletContext) { this(servletContext, null); } /** * Create a new MockHttpSession. * * @param servletContext the ServletContext that the session runs in * @param id a unique identifier for this session */ public MockHttpSession(ServletContext servletContext, String id) { this.servletContext = (servletContext != null ? servletContext : null);//new MockServletContext()); this.id = (id != null ? id : Integer.toString(nextId++)); } @Override public long getCreationTime() { assertIsValid(); return this.creationTime; } @Override public String getId() { return this.id; } public void access() { this.lastAccessedTime = System.currentTimeMillis(); this.isNew = false; } @Override public long getLastAccessedTime() { assertIsValid(); return this.lastAccessedTime; } @Override public ServletContext getServletContext() { return this.servletContext; } @Override public void setMaxInactiveInterval(int interval) { this.maxInactiveInterval = interval; } @Override public int getMaxInactiveInterval() { return this.maxInactiveInterval; } @Override public HttpSessionContext getSessionContext() { throw new UnsupportedOperationException("getSessionContext"); } @Override public Object getAttribute(String name) { assertIsValid(); Assert.notNull(name, "Attribute name must not be null"); return this.attributes.get(name); } @Override public Object getValue(String name) { return getAttribute(name); } @Override public Enumeration<String> getAttributeNames() { assertIsValid(); return Collections.enumeration(new LinkedHashSet<String>(this.attributes.keySet())); } @Override public String[] getValueNames() { assertIsValid(); return this.attributes.keySet().toArray(new String[this.attributes.size()]); } @Override public void setAttribute(String name, Object value) { assertIsValid(); Assert.notNull(name, "Attribute name must not be null"); if (value != null) { this.attributes.put(name, value); if (value instanceof HttpSessionBindingListener) { ((HttpSessionBindingListener) value).valueBound(new HttpSessionBindingEvent(this, name, value)); } } else { removeAttribute(name); } } @Override public void putValue(String name, Object value) { setAttribute(name, value); } @Override public void removeAttribute(String name) { assertIsValid(); Assert.notNull(name, "Attribute name must not be null"); Object value = this.attributes.remove(name); if (value instanceof HttpSessionBindingListener) { ((HttpSessionBindingListener) value).valueUnbound(new HttpSessionBindingEvent(this, name, value)); } } @Override public void removeValue(String name) { removeAttribute(name); } /** * Clear all of this session's attributes. */ public void clearAttributes() { for (Iterator<Map.Entry<String, Object>> it = this.attributes.entrySet().iterator(); it.hasNext();) { Map.Entry<String, Object> entry = it.next(); String name = entry.getKey(); Object value = entry.getValue(); it.remove(); if (value instanceof HttpSessionBindingListener) { ((HttpSessionBindingListener) value).valueUnbound(new HttpSessionBindingEvent(this, name, value)); } } } /** * Invalidates this session then unbinds any objects bound to it. * * @throws IllegalStateException if this method is called on an already invalidated session */ @Override public void invalidate() { assertIsValid(); this.invalid = true; clearAttributes(); } public boolean isInvalid() { return this.invalid; } /** * Convenience method for asserting that this session has not been * {@linkplain #invalidate() invalidated}. * * @throws IllegalStateException if this session has been invalidated */ private void assertIsValid() { if (isInvalid()) { throw new IllegalStateException("The session has already been invalidated"); } } public void setNew(boolean value) { this.isNew = value; } @Override public boolean isNew() { assertIsValid(); return this.isNew; } /** * Serialize the attributes of this session into an object that can be * turned into a byte array with standard Java serialization. * * @return a representation of this session's serialized state */ public Serializable serializeState() { HashMap<String, Serializable> state = new HashMap<String, Serializable>(); for (Iterator<Map.Entry<String, Object>> it = this.attributes.entrySet().iterator(); it.hasNext();) { Map.Entry<String, Object> entry = it.next(); String name = entry.getKey(); Object value = entry.getValue(); it.remove(); if (value instanceof Serializable) { state.put(name, (Serializable) value); } else { // Not serializable... Servlet containers usually automatically // unbind the attribute in this case. if (value instanceof HttpSessionBindingListener) { ((HttpSessionBindingListener) value).valueUnbound(new HttpSessionBindingEvent(this, name, value)); } } } return state; } /** * Deserialize the attributes of this session from a state object created by * {@link #serializeState()}. * * @param state a representation of this session's serialized state */ @SuppressWarnings("unchecked") public void deserializeState(Serializable state) { Assert.isTrue(state instanceof Map, "Serialized state needs to be of type [java.util.Map]"); this.attributes.putAll((Map<String, Object>) state); } }
[ "wlx0710@gmail.com" ]
wlx0710@gmail.com
1e67bbba42dbf6ceb37295ef90d06b2d12ec7c8d
c5a67e2aeabbde81c93a329ae2e9c7ccc3631246
/src/main/java/com/vnw/data/jooq/tables/pojos/TblresumeSchool.java
44e75ba3ad2fdf3221d454fe81a7d66be6e2ca18
[]
no_license
phuonghuynh/dtools
319d773d01c32093fd17d128948ef89c81f3f4bf
883d15ef19da259396a7bc16ac9df590e8add015
refs/heads/master
2016-09-14T03:46:53.463230
2016-05-25T04:04:32
2016-05-25T04:04:32
59,534,869
1
0
null
null
null
null
UTF-8
Java
false
false
1,791
java
/** * This class is generated by jOOQ */ package com.vnw.data.jooq.tables.pojos; import java.io.Serializable; import javax.annotation.Generated; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.8.0" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TblresumeSchool implements Serializable { private static final long serialVersionUID = 244397801; private Integer entryid; private Integer resumeid; private Short schoolid; public TblresumeSchool() {} public TblresumeSchool(TblresumeSchool value) { this.entryid = value.entryid; this.resumeid = value.resumeid; this.schoolid = value.schoolid; } public TblresumeSchool( Integer entryid, Integer resumeid, Short schoolid ) { this.entryid = entryid; this.resumeid = resumeid; this.schoolid = schoolid; } public Integer getEntryid() { return this.entryid; } public void setEntryid(Integer entryid) { this.entryid = entryid; } public Integer getResumeid() { return this.resumeid; } public void setResumeid(Integer resumeid) { this.resumeid = resumeid; } public Short getSchoolid() { return this.schoolid; } public void setSchoolid(Short schoolid) { this.schoolid = schoolid; } @Override public String toString() { StringBuilder sb = new StringBuilder("TblresumeSchool ("); sb.append(entryid); sb.append(", ").append(resumeid); sb.append(", ").append(schoolid); sb.append(")"); return sb.toString(); } }
[ "phuonghqh@gmail.com" ]
phuonghqh@gmail.com
38fbf620f1527dcd2b594413410a362dcd062121
cec0c2fa585c3f788fc8becf24365e56bce94368
/io/netty/bootstrap/ServerBootstrapConfig.java
d1df4c028b9a07b41f6d2005317c22ee4a388841
[]
no_license
maksym-pasichnyk/Server-1.16.3-Remapped
358f3c4816cbf41e137947329389edf24e9c6910
4d992e2d9d4ada3ecf7cecc039c4aa0083bc461e
refs/heads/master
2022-12-15T08:54:21.236174
2020-09-19T16:13:43
2020-09-19T16:13:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,278
java
/* */ package io.netty.bootstrap; /* */ /* */ import io.netty.channel.ChannelHandler; /* */ import io.netty.channel.ChannelOption; /* */ import io.netty.channel.EventLoopGroup; /* */ import io.netty.channel.ServerChannel; /* */ import io.netty.util.AttributeKey; /* */ import io.netty.util.internal.StringUtil; /* */ import java.util.Map; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public final class ServerBootstrapConfig /* */ extends AbstractBootstrapConfig<ServerBootstrap, ServerChannel> /* */ { /* */ ServerBootstrapConfig(ServerBootstrap bootstrap) { /* 33 */ super(bootstrap); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ public EventLoopGroup childGroup() { /* 42 */ return this.bootstrap.childGroup(); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public ChannelHandler childHandler() { /* 50 */ return this.bootstrap.childHandler(); /* */ } /* */ /* */ /* */ /* */ /* */ public Map<ChannelOption<?>, Object> childOptions() { /* 57 */ return this.bootstrap.childOptions(); /* */ } /* */ /* */ /* */ /* */ /* */ public Map<AttributeKey<?>, Object> childAttrs() { /* 64 */ return this.bootstrap.childAttrs(); /* */ } /* */ /* */ /* */ public String toString() { /* 69 */ StringBuilder buf = new StringBuilder(super.toString()); /* 70 */ buf.setLength(buf.length() - 1); /* 71 */ buf.append(", "); /* 72 */ EventLoopGroup childGroup = childGroup(); /* 73 */ if (childGroup != null) { /* 74 */ buf.append("childGroup: "); /* 75 */ buf.append(StringUtil.simpleClassName(childGroup)); /* 76 */ buf.append(", "); /* */ } /* 78 */ Map<ChannelOption<?>, Object> childOptions = childOptions(); /* 79 */ if (!childOptions.isEmpty()) { /* 80 */ buf.append("childOptions: "); /* 81 */ buf.append(childOptions); /* 82 */ buf.append(", "); /* */ } /* 84 */ Map<AttributeKey<?>, Object> childAttrs = childAttrs(); /* 85 */ if (!childAttrs.isEmpty()) { /* 86 */ buf.append("childAttrs: "); /* 87 */ buf.append(childAttrs); /* 88 */ buf.append(", "); /* */ } /* 90 */ ChannelHandler childHandler = childHandler(); /* 91 */ if (childHandler != null) { /* 92 */ buf.append("childHandler: "); /* 93 */ buf.append(childHandler); /* 94 */ buf.append(", "); /* */ } /* 96 */ if (buf.charAt(buf.length() - 1) == '(') { /* 97 */ buf.append(')'); /* */ } else { /* 99 */ buf.setCharAt(buf.length() - 2, ')'); /* 100 */ buf.setLength(buf.length() - 1); /* */ } /* */ /* 103 */ return buf.toString(); /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\deobfuscated.jar!\io\netty\bootstrap\ServerBootstrapConfig.class * Java compiler version: 6 (50.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
f0a152762359e02104d764d132d633adcc8f2c59
8b5c955989280412e2e7fca4453722d090c3b347
/Think in Algorithms PDF/Chapter 4 - LinkedList/Linked Data Structure/MyLinkedList.java
9d53f583581d2b30c0de85c19ac03e8ee8a93f48
[]
no_license
david2999999/Java-Algorithm
a8962629819df73a9b9c733e5f8be91952747554
8e235826b2e7e864f1fd991dbaa2dbb44caaab8c
refs/heads/master
2021-06-03T23:09:13.092268
2020-03-22T18:42:21
2020-03-22T18:42:21
146,636,630
3
0
null
null
null
null
UTF-8
Java
false
false
1,583
java
public class MyLinkedList<E> implements List<E> { private int size; // keeps track of the number of elements private Node head; // reference to the first node private class Node { public E data; public Node next; public Node(E data, Node next) { this.data = data; this.next = next; } } public MyLinkedList() { head = null; size = 0; } public int indexOf(Object target) { Node node = head; for (int i=0; i<size; i++) { if (equals(target, node.data)) { return i; } node = node.next; } return -1; } public void add(int index, E element) { if (index == 0) { head = new Node(element, head); } else { Node node = getNode(index-1); node.next = new Node(element, node.next); } size++; } private Node getNode(int index) { if (index < 0 || index >= size) { throw new IndexOutOfBoundsException(); } Node node = head; for (int i=0; i<index; i++) { node = node.next; } return node; } public boolean add(E element) { if (head == null) { head = new Node(element); } else { Node node = head; // loop until the last node for ( ; node.next != null; node = node.next) {} node.next = new Node(element); } size++; return true; } }
[ "djiang86@binghamton.edu" ]
djiang86@binghamton.edu
8fed239a78db7e0e82fbe527be192630469a744e
738e0d93d9d9dab4348d812acd98e4f15d7dbfd2
/HuBei/src/main/java/com/szboanda/epsm/common/base/BaseBusinessDAO.java
0076d3f7d49d268f8790117efc0776f42478e6be
[]
no_license
chiclau/powerdata
4ab92c29f9ebe1e67c310027e0c8e76c5f07bef0
bce8cdc9f71b78763d2468e7ad42402ba952ce92
refs/heads/master
2020-03-11T09:56:52.342577
2018-04-17T15:43:54
2018-04-17T15:43:54
129,927,341
1
0
null
null
null
null
UTF-8
Java
false
false
1,120
java
/****************************************************************************** * Copyright (C) ShenZhen Powerdata Information Technology Co.,Ltd All Rights * Reserved. 本软件为深圳市博安达信息技术股份有限公司开发研制。未经本公司正式书面同意,其他任何个人、团体不得使用、 复制、修改或发布本软件. *****************************************************************************/ package com.szboanda.epsm.common.base; import com.szboanda.platform.common.annotation.AutoLoadDAO; import com.szboanda.platform.common.base.BaseDAO; /** * @title: 业务处理DAO * @fileName: BaseBusinessDAO.java * @description: 该【业务处理DAO】继承 平台部门的DAO,具体项目的DAO需要全部集继承这个业务处理DAO * @copyright: PowerData Software Co.,Ltd. Rights Reserved. * @company: 深圳市博安达信息技术股份有限公司 * @author: 唐肖肖 * @date: 2016年12月6日 * @version: V1.0 */ @AutoLoadDAO public interface BaseBusinessDAO extends BaseDAO { }
[ "857390555@qq.com" ]
857390555@qq.com
c19e26727e17aab0111f39d06810d6446c2480a3
1e7a4b87edc7e9e6a870b15acf177edf9233932d
/entity-view/api/src/main/java/com/blazebit/persistence/view/FlushMode.java
f6731a7cc04cf9f226f4619d62da45aea44ef53e
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
vincentDAO/blaze-persistence
4b98c168024371a62e0d2e7756c20ec7ef9081c2
9d30ff5c96cc320d3b8d68492f7dc677a64dd172
refs/heads/master
2020-03-26T23:19:04.190101
2018-08-17T13:36:41
2018-08-19T20:28:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,189
java
/* * Copyright 2014 - 2018 Blazebit. * * 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.blazebit.persistence.view; /** * The flush mode for an updatable entity view. * * @author Christian Beikov * @since 1.2.0 */ public enum FlushMode { /** * Only dirty attributes are flushed. */ PARTIAL, /** * If a dirty attribute is encountered will behave like {@link #FULL}, otherwise will only trigger cascades. */ LAZY, /** * All updatable attributes are flushed. Note that by choosing this mode, dirty tracking is disabled. * This has the effect that dirty state access will not work properly. */ FULL; }
[ "christian.beikov@gmail.com" ]
christian.beikov@gmail.com
ce5049b38a644c7d3b6229257dabe9ba224668c5
dc829b6ec2fca1df862226712d5f2906d6ddc623
/Allassignments/src/com/covalense/javaapp/assignmentseight/Student.java
836ec7b9b651bd71eab98f57e7796667bfd1d089
[]
no_license
manoj-git-eng/ELF-06June19-Covalense-ManojKumarBehera
eb214118f58b0d3ed5062c4d0da97b6b71724705
5ea6f4a2833a6fd9c6a74c981bbb95af8c528967
refs/heads/master
2023-01-11T22:19:04.480271
2019-08-24T12:13:11
2019-08-24T12:13:11
192,527,009
0
0
null
null
null
null
UTF-8
Java
false
false
488
java
package com.covalense.javaapp.assignmentseight; import java.util.logging.Logger; public class Student { private static final Logger log=Logger.getLogger("bhavani"); String name; int id; double marks; void set(String name, int id, double marks) { this.name = name; this.id = id; this.marks = marks; } @Override public String toString() { return "name= "+ name+" id= "+id+" marks= "+marks; } void get() { log.info("name= "+name+"id= "+id+"marks= "+marks); } }
[ "mkbehera.mail@gmail.com" ]
mkbehera.mail@gmail.com
092b53a8ab84fd5f682556fa550cb4fe61f236ba
d5fc1ea13e181ed4d1dd358c93733572762e9bcb
/1. JavaSyntax/src/level_03/task0314.java
357cfdb13ee34f8178d313a9fd57ddb9b0bfaa2a
[]
no_license
SviatoslavExpert/JavaRush.ru_Tasks
64cacb13fdfed4971cbb770d184695b927d59497
887c351f72e792413b4ed744b5b4cdc3166bc2cf
refs/heads/master
2021-04-29T00:29:04.396540
2018-03-03T16:25:21
2018-03-03T16:25:21
121,830,630
0
0
null
null
null
null
UTF-8
Java
false
false
495
java
/* Таблица умножения Выведи на экран таблицу умножения 10 на 10 в следующем виде: 1 2 3 … 2 4 6 … 3 6 9 … … */ package level_03; public class task0314 { public static void main(String[] args) { int count = 11; for (int j = 1; j < count; j++) { for (int i = 1; i < count; i++) { System.out.print(i * j + " "); } System.out.println(); } } }
[ "s.granovskiy@gmail.com" ]
s.granovskiy@gmail.com
31efae17d81c7abe2d617785c62dac625e425464
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_7329544795a2be1ff8d66058462c4d6e1fc12d90/CommandLineTest/2_7329544795a2be1ff8d66058462c4d6e1fc12d90_CommandLineTest_t.java
794d2fa1651b947d80b0a23dbd449f2956c0934c
[]
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
1,149
java
package com.bigvisible.kanbansimulator; import java.io.ByteArrayOutputStream; import org.junit.Test; import com.bigvisible.kanbansimulator.CommandLine; import static org.junit.Assert.*; import static org.hamcrest.Matchers.*; public class CommandLineTest { @Test public void when_passed_proper_set_of_parameters_then_simulator_runs_successfully() { String args[] = new String[] { "88", "13", "12", "12", "10", "11", "0" }; ByteArrayOutputStream rawOuput = new ByteArrayOutputStream(); CommandLine.redirectOutputTo(rawOuput); CommandLine.main(args); String output = rawOuput.toString(); assertThat(output, containsString("1, 11, 13, 11, 0, 12, 11, 0, 12, 11, 0, 10, 10, 1, 10")); } @Test public void when_not_given_any_parameters_displays_a_help_message() throws Exception { String args[] = new String[] {}; ByteArrayOutputStream rawOuput = new ByteArrayOutputStream(); CommandLine.redirectOutputTo(rawOuput); CommandLine.main(args); String output = rawOuput.toString(); assertTrue(output.contains("Usage:")); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
30b1b9bb4793e2f2f087890d65608c49c4ba8347
2a802b71c99a8e89885edef09a6539a38e808c2b
/cas-server-core-authentication/src/main/java/org/jasig/cas/authentication/AllAuthenticationPolicy.java
907e829062b2bbe15633420dd8e2ab9652e998ff
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
permanz/cas
649bd90491e78d3641c49c13c5da760e462ad696
ece1fc2652ea1ba0bc91d2911e3d3607135242c3
refs/heads/master
2021-01-18T20:47:57.665139
2016-05-01T18:55:17
2016-05-01T18:55:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
614
java
package org.jasig.cas.authentication; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.stereotype.Component; /** * Authentication security policy that is satisfied iff all given credentials are successfully authenticated. * * @author Marvin S. Addison * @since 4.0.0 */ @RefreshScope @Component("allAuthenticationPolicy") public class AllAuthenticationPolicy implements AuthenticationPolicy { @Override public boolean isSatisfiedBy(final Authentication authn) { return authn.getSuccesses().size() == authn.getCredentials().size(); } }
[ "mmoayyed@unicon.net" ]
mmoayyed@unicon.net
aa6e79f03451902a25c85dbec8b999ddb631f5db
1b33bb4e143b18de302ccd5f107e3490ea8b31aa
/learn.java/src/main/java/oc/p/_8/_2_PatternsAndPrinciples/workingWithDesignPatterns/applyingTheSingletonPattern/lazyIntanstiation/LazyInstantiation.java
72c23758bff0b2d6bd910bead1b73e746c23759b
[]
no_license
cip-git/learn
db2e4eb297e36db475c734a89d18e98819bdd07f
b6d97f529ed39f25e17b602c00ebad01d7bc2d38
refs/heads/master
2022-12-23T16:39:56.977803
2022-12-18T13:57:37
2022-12-18T13:57:37
97,759,022
0
1
null
2020-10-13T17:06:36
2017-07-19T20:37:29
Java
UTF-8
Java
false
false
1,303
java
package oc.p._8._2_PatternsAndPrinciples.workingWithDesignPatterns.applyingTheSingletonPattern.lazyIntanstiation; class LazyInstantiation { private static LazyInstantiation instance; // the variable is not final private LazyInstantiation() { } /** * The implementation of V, as shown, is not considered thread‐safe in * that two threads could call getInstance() at the same time, resulting in two objects * being created. After both threads finish executing, only one object will be set and used by * other threads going forward, but the object that the two initial threads received may not * be the same. */ public static LazyInstantiation getInstance() { if (instance == null) { instance = new LazyInstantiation(); } return instance; } /** * The getInstance() method is now synchronized, which means only one thread will be * allowed in the method at a time, ensuring that only one object is created. * * The disadvantage of this is that every single call to this method requires synchronization, * which in practice can be very costly. Solution: Singletons with double checking locking */ synchronized public static LazyInstantiation getInstance2() { if (instance == null) { instance = new LazyInstantiation(); } return instance; } }
[ "ciprian.dorin.tanase@ibm.com" ]
ciprian.dorin.tanase@ibm.com
0ebaa3c89d34395bae7f425d2e4ab602b2f84790
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.5.0/sources/org/telegram/tgnet/TLRPC$TL_payments_paymentVerficationNeeded.java
fd993a4f8bf843b0c00d27901ad50f5c0b8bc05f
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
525
java
package org.telegram.tgnet; public class TLRPC$TL_payments_paymentVerficationNeeded extends TLRPC$payments_PaymentResult { public static int constructor = 1800845601; public void readParams(AbstractSerializedData abstractSerializedData, boolean z) { this.url = abstractSerializedData.readString(z); } public void serializeToStream(AbstractSerializedData abstractSerializedData) { abstractSerializedData.writeInt32(constructor); abstractSerializedData.writeString(this.url); } }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
8791a2f4cda15daf39618e9648c53de0d517419f
176094e484a99795384cfd02b41f9d22dec32216
/src/main/java/com/chrisnewland/demofx/effect/fake3d/Sheet.java
3867a077e3ce4a7b6becfac9888783559ac1b402
[ "BSD-2-Clause-Views" ]
permissive
chriswhocodes/DemoFX
e70141f67ecc79a1d157f09c79977418c141d743
4bb476d25a8474b33441116b8d2fbe9ca882d965
refs/heads/master
2021-06-26T07:34:43.033469
2020-12-09T23:11:26
2020-12-09T23:11:26
31,340,538
82
12
NOASSERTION
2020-12-08T21:50:55
2015-02-25T23:04:56
Java
UTF-8
Java
false
false
6,823
java
/* * Copyright (c) 2015-2016 Chris Newland. * Licensed under https://github.com/chriswhocodes/demofx/blob/master/LICENSE-BSD */ package com.chrisnewland.demofx.effect.fake3d; import com.chrisnewland.demofx.DemoConfig; import com.chrisnewland.demofx.effect.AbstractEffect; import com.chrisnewland.demofx.util.ImageUtil; import javafx.scene.image.Image; import javafx.scene.image.PixelReader; import javafx.scene.paint.Color; public class Sheet extends AbstractEffect { private double[] pointX; private double[] pointY; private double[] pointZ; private int square; private double stretch; private double baseDepth; private double angleInc; private double waveDepth; private int rows; private int cols; private double angle = 0; private Color[] imageData; public enum SheetMode { FLAG, SHEET, SPRITE } private SheetMode mode = SheetMode.FLAG; public Sheet(DemoConfig config) { super(config); init(); } public Sheet(DemoConfig config, SheetMode mode, String filename) { super(config); this.mode = mode; switch (mode) { case SPRITE: { Image loaded = ImageUtil.loadImageFromResources(filename); int imageWidth = (int) loaded.getWidth(); int imageHeight = (int) loaded.getHeight(); rows = imageWidth; cols = imageHeight; int pixelCount = imageWidth * imageHeight; PixelReader reader = loaded.getPixelReader(); int pixel = 0; imageData = new Color[pixelCount]; for (int y = 0; y < imageHeight; y++) { for (int x = 0; x < imageWidth; x++) { imageData[pixel++] = reader.getColor(x, y); } } square = 16; stretch = 1; baseDepth = 1.8; angleInc = 4; waveDepth = 8; } break; case FLAG: { square = 8; stretch = 0.5; baseDepth = 1.8; angleInc = 3; waveDepth = 0.6; } break; case SHEET: { square = 8; stretch = 0.5; baseDepth = 1.2; angleInc = 4; waveDepth = 4.6; } break; } init(); } private void init() { if (mode != SheetMode.SPRITE) { rows = intHeight / square; cols = intWidth / square; } itemCount = rows * cols; buildSheet(); } private void buildSheet() { pointX = new double[itemCount]; pointY = new double[itemCount]; pointZ = new double[itemCount]; int pos = 0; for (int row = 0; row < rows; row++) { for (int col = 0; col < cols; col++) { pointX[pos] = -cols * square / 2 + col * square; pointY[pos] = -rows * square / 2 + row * square; pointZ[pos] = baseDepth; pos++; } } } @Override public void renderForeground() { gc.setStroke(Color.WHITE); angle += angleInc; if (angle >= 360) { angle -= 360; } switch (mode) { case SPRITE: renderSprite(); break; case SHEET: renderSheet(); break; case FLAG: renderFlag(); break; } } private void renderSheet() { int pos = 0; int deformPos = (rows / 2 * cols) + cols / 2; for (int row = 0; row < rows; row++) { for (int col = 0; col < cols; col++) { fishEye(pos, deformPos); pos++; } } pos = 0; for (int row = 0; row < rows; row++) { for (int col = 0; col < cols; col++) { plotGridSheet(pos, col); pos++; } } } private void renderFlag() { int pos = 0; int deformPos = (rows / 2 * cols) + cols / 2; for (int row = 0; row < rows; row++) { for (int col = 0; col < cols; col++) { waveBoth(pos, deformPos); pos++; } } pos = 0; for (int row = 0; row < rows; row++) { for (int col = 0; col < cols; col++) { plotGridSheet(pos, col); pos++; } } } private void renderSprite() { int pos = 0; int deformPos = (rows / 2 * cols) + cols / 2; for (int row = 0; row < rows; row++) { for (int col = 0; col < cols; col++) { fishEye(pos, deformPos); pos++; } } pos = 0; for (int row = 0; row < rows; row++) { for (int col = 0; col < cols; col++) { plotSpriteSheet(pos, col); pos++; } } } private final void fishEye(int pos, int deformPos) { double x1 = pointX[pos]; double y1 = pointY[pos]; double x2 = pointX[deformPos]; double y2 = pointY[deformPos]; double dx = Math.abs(x1 - x2); double dy = Math.abs(y1 - y2); double dist = Math.sqrt(dx * dx + dy * dy); dist = 1 - dist / halfWidth; pointZ[pos] = baseDepth + (dist * stretch * precalc.sin(angle)); } private final void waveVertical(int pos, int deformPos) { double y = pointY[pos]; double dist = waveDepth * precalc.sin(y + angle); pointZ[pos] = baseDepth + dist; } private final void waveHorizontal(int pos, int deformPos) { double x = pointX[pos]; double dist = waveDepth * precalc.sin(x + angle); pointZ[pos] = baseDepth + dist; } private final void waveBoth(int pos, int deformPos) { double x = pointX[pos]; double y = pointY[pos]; double dist = waveDepth * precalc.sin(x + y + angle); pointZ[pos] = baseDepth + dist; } private double translateX(int i) { return pointX[i] / pointZ[i]; } private double translateY(int i) { return pointY[i] / pointZ[i]; } private final void plotGridSheet(int i, int col) { double x1 = halfWidth + translateX(i); double y1 = halfHeight + translateY(i); double depth = pointZ[i]; depth -= stretch; depth /= baseDepth; // 0..1 depth = 1 - depth; Color colour = Color.gray(precalc.clampDouble(depth, 0.3, 1)); gc.setStroke(colour); if (col != cols - 1) { int right = i + 1; if (right < itemCount) { double x2 = halfWidth + translateX(right); double y2 = halfHeight + translateY(right); gc.strokeLine(x1, y1, x2, y2); } } int down = i + cols; if (down < itemCount) { double x3 = halfWidth + translateX(down); double y3 = halfHeight + translateY(down); gc.strokeLine(x1, y1, x3, y3); } } private final void plotSpriteSheet(int tl, int col) { Color colour = imageData[tl]; if (Color.TRANSPARENT.equals(colour)) { return; } if (col != cols - 1) { int tr = tl + 1; if (tr < itemCount) { int bl = tl + cols; if (bl < itemCount) { int br = tr + cols; double x1 = halfWidth + translateX(tl); double y1 = halfHeight + translateY(tl); double x2 = halfWidth + translateX(tr); double y2 = halfHeight + translateY(tr); double x3 = halfWidth + translateX(br); double y3 = halfHeight + translateY(br); double x4 = halfWidth + translateX(bl); double y4 = halfHeight + translateY(bl); double[] x = new double[] { (int) x1 - 1, (int) x2 + 1, (int) x3 + 1, (int) x4 - 1 }; double[] y = new double[] { (int) y1 - 1, (int) y2 - 1, (int) y3 + 1, (int) y4 + 1 }; gc.setFill(colour); gc.fillPolygon(x, y, 4); } } } } }
[ "chris@chrisnewland.com" ]
chris@chrisnewland.com
50db52671ad6ca64daa4f9cb2468dc65bc1992a1
0155a81fad07b7eca509187b7cd3afd4aa4b35df
/src/ch/jmildner/aufgaben/a1farm/Farm.java
b46abbddd51754be1bb1a7ed2197f938ce1245de
[]
no_license
java-akademie/se-kurs1
a592704880e1e529cc6053278d38d6571b258f75
af190c2d6f8cf9db6c21c05489381aa5e5489111
refs/heads/master
2023-04-06T09:46:54.561459
2021-03-25T17:44:43
2021-03-25T17:44:43
350,618,239
0
0
null
null
null
null
UTF-8
Java
false
false
1,008
java
package ch.jmildner.aufgaben.a1farm; import ch.jmildner.tools.MyTools; public class Farm { public static void main(String[] args) throws Exception { MyTools.h1("Farm"); int heads = MyTools.getInteger("please enter heads > ", 0, 1000000); String prompt = String.format( "please enter legs between %d and %d > ", heads * 2, heads * 4); int legs; while (true) { legs = MyTools.getInteger(prompt, heads * 2, heads * 4); if (!(legs % 2 == 0)) { System.out.print( "number of legs must be even ... "); } else break; } int hens = 0; int pigs = heads; while (!(hens * 2 + pigs * 4 == legs)) { hens++; pigs--; } System.out.printf("the farmer has %d hens and %d pigs.%n", hens, pigs); } }
[ "johann.mildner@balcab.ch" ]
johann.mildner@balcab.ch
2ea1fe236a5b4f2f5f64733fcb40ca928b3e69cb
91f81b762ae3de2d203b3a6eff1a1514a58e0d23
/app/src/main/java/com/example/baliofvfx/phonestatus/NetworkStatus.java
b0a31ef512add1f1b1a4154e0dfc22c7e9ecfe90
[]
no_license
BalioFVFX/Phone-Status
ae71c7fe3f028bb4e360af4c9b4c59207e118a31
d7b036071f5e246dcbf9faa2af3c2d0bc57275ad
refs/heads/master
2021-10-08T14:51:07.923613
2018-12-13T17:43:50
2018-12-13T17:43:50
115,198,857
0
0
null
null
null
null
UTF-8
Java
false
false
2,839
java
package com.example.baliofvfx.phonestatus; import android.app.Service; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.ConnectivityManager; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.os.IBinder; import android.support.annotation.Nullable; import android.telephony.TelephonyManager; import android.widget.TextView; import android.widget.Toast; import com.google.firebase.auth.FirebaseAuth; /** * Created by BalioFVFX on 12/28/2017. */ public class NetworkStatus extends Service { public void showWiFiName(Context context, TextView wifiTextView){ WifiManager wifiMgr = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInfo = wifiMgr.getConnectionInfo(); String name = wifiInfo.getSSID(); if(name == "<unknown ssid>" || name == "0x"){ wifiTextView.setText("Wi-Fi: Not connected"); } else{ wifiTextView.setText("Wi-Fi: " + name); } } private final BroadcastReceiver WiFiReceiver = new BroadcastReceiver(){ @Override public void onReceive(Context context, Intent intent) { WifiManager wifiMgr = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInfo = wifiMgr.getConnectionInfo(); final String wifiName = wifiInfo.getSSID(); new java.util.Timer().schedule( new java.util.TimerTask() { @Override public void run() { RequestManager.sendWiFi(wifiName, FirebaseAuth.getInstance().getUid()); } }, 9000 ); } }; @Override public int onStartCommand(Intent intent, int flags, int startId) { IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); registerReceiver(WiFiReceiver, intentFilter); return super.onStartCommand(intent, flags, startId); } public void showNetworkInfo(Context context, TextView networkTextView){ TelephonyManager manager = (TelephonyManager)context.getSystemService(context.TELEPHONY_SERVICE); String networkName = manager.getNetworkOperatorName(); int networkType = manager.getDataState(); if(networkName == ""){ networkTextView.setText("Network: Not found"); } else{ networkTextView.setText("Network: " + networkName); } } @Nullable @Override public IBinder onBind(Intent intent) { return null; } }
[ "vfxbaliof@gmail.com" ]
vfxbaliof@gmail.com
ad55b4f691c2b126b3ef22aec8878baae53d30cd
a9afa2a62dbfddba6057cda6972a34134ec81273
/src/main/java/lv/ctco/battleship/controller/EndOfGameServlet.java
edf187d35b257317c522c31bd449e50c2db6d8c8
[]
no_license
zenonwch/Battleship
3052a7a62390bad52fe63e409381e3ce2c015b24
79238ae5bffcd16efb4eb3d57e6b537869d134ce
refs/heads/master
2021-07-14T11:42:26.090656
2017-10-17T19:40:53
2017-10-17T19:40:53
105,796,892
0
0
null
null
null
null
UTF-8
Java
false
false
1,420
java
package lv.ctco.battleship.controller; import lv.ctco.battleship.model.Game; import lv.ctco.battleship.model.Player; import lv.ctco.battleship.model.PlayerManager; import javax.inject.Inject; 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; @WebServlet(name = "EndOfGameServlet", urlPatterns = "/eog") @SuppressWarnings("MethodDoesntCallSuperMethod") public class EndOfGameServlet extends HttpServlet { @Inject private PlayerManager playerManager; @Override protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { final Game game = playerManager.getGame(); final Player currentPlayer = playerManager.getPlayer(); final Player winner = game.getWinner(); if (winner == null) { request.getRequestDispatcher("/WEB-INF/fire.jsp").include(request, response); } else //noinspection ObjectEquality if (winner == currentPlayer) { request.getRequestDispatcher("/WEB-INF/winner.jsp").include(request, response); } else { request.getRequestDispatcher("/WEB-INF/lose.jsp").include(request, response); } } }
[ "andrey.veshtard@ctco.lv" ]
andrey.veshtard@ctco.lv
566ee11264706dd51fe4ca580d2f94351b5ffd1c
5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab
/app/src/main/wechat6.5.3/com/tencent/mm/modelvoice/l.java
068f865bddca419aa2bb8c9c4b89ac20d1bb3e0a
[]
no_license
newtonker/wechat6.5.3
8af53a870a752bb9e3c92ec92a63c1252cb81c10
637a69732afa3a936afc9f4679994b79a9222680
refs/heads/master
2020-04-16T03:32:32.230996
2017-06-15T09:54:10
2017-06-15T09:54:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,500
java
package com.tencent.mm.modelvoice; import com.tencent.mm.sdk.platformtools.v; import com.tencent.mmdb.database.SQLiteDatabase; import java.io.IOException; import java.io.RandomAccessFile; import junit.framework.Assert; public final class l implements b { private String aST = SQLiteDatabase.KeyEmpty; private RandomAccessFile diw = null; public l(String str) { this.aST = str; } public final void Lr() { if (this.diw != null) { try { this.diw.close(); this.diw = null; v.d("MicroMsg.SpxFileOperator", "Close :" + this.aST); } catch (IOException e) { } } } private boolean lv(String str) { boolean z; Assert.assertTrue(this.aST.length() >= 0); if (this.diw == null) { z = true; } else { z = false; } Assert.assertTrue(z); if (str.equals("r") || str.equals("rw")) { z = true; } else { z = false; } Assert.assertTrue(z); v.d("MicroMsg.SpxFileOperator", "Open file:" + this.diw + " mode:" + str); try { this.diw = new RandomAccessFile(this.aST, str); return true; } catch (Exception e) { v.e("MicroMsg.SpxFileOperator", "ERR: OpenFile[" + this.aST + "] failed:[" + e.getMessage() + "]"); this.diw = null; return false; } } public final g aU(int i, int i2) { g gVar = new g(); if (i < 0 || i2 <= 0) { gVar.ret = -3; } else if (this.diw != null || lv("r")) { gVar.buf = new byte[i2]; try { long length = this.diw.length(); this.diw.seek((long) i); int read = this.diw.read(gVar.buf, 0, i2); v.d("MicroMsg.SpxFileOperator", "DBG: ReadFile[" + this.aST + "] readOffset:" + i + " readRet:" + read + " fileNow:" + this.diw.getFilePointer() + " fileSize:" + length); if (read < 0) { read = 0; } gVar.aUT = read; gVar.dik = read + i; gVar.ret = 0; } catch (Exception e) { v.e("MicroMsg.SpxFileOperator", "ERR: ReadFile[" + this.aST + "] Offset:" + i + " failed:[" + e.getMessage() + "] "); Lr(); gVar.ret = -1; } } else { gVar.ret = -2; } return gVar; } public final int write(byte[] bArr, int i, int i2) { boolean z = true; boolean z2 = bArr.length > 0 && i > 0; Assert.assertTrue(z2); if (this.diw == null && !lv("rw")) { return -1; } try { this.diw.seek((long) i2); this.diw.write(bArr, 0, i); int i3 = i2 + i; if (((int) this.diw.getFilePointer()) == i3) { z2 = true; } else { z2 = false; } Assert.assertTrue(z2); if (i3 < 0) { z = false; } Assert.assertTrue(z); return i3; } catch (Exception e) { v.e("MicroMsg.SpxFileOperator", "ERR: WriteFile[" + this.aST + "] Offset:" + i2 + " failed:[" + e.getMessage() + "]"); Lr(); return -3; } } public final int getFormat() { return 1; } }
[ "zhangxhbeta@gmail.com" ]
zhangxhbeta@gmail.com
a1f04caa9c74af45d559733dfe97c992f9824a59
5b8c2dd9fcd176f5c77b959c8357402e7ce0474d
/lambda-workflow-core/src/main/java/com/yatop/lambda/workflow/core/framework/chartype/CharTyeClazzBaseClazz.java
9ac9a09925d01853e4b2fd270e9d92d68f0895f9
[]
no_license
ruhengChen/lambda-mls
6cbfc5804193f68bbc98a5900d7e3fa91cf6ef00
2450c25c25c91bb3af1946fbf21206a6636d71d0
refs/heads/master
2020-04-20T05:45:30.853959
2019-02-13T02:36:57
2019-02-13T02:36:57
168,664,310
1
0
null
null
null
null
UTF-8
Java
false
false
777
java
package com.yatop.lambda.workflow.core.framework.chartype; import com.yatop.lambda.workflow.core.utils.CollectionUtil; import java.util.HashMap; public abstract class CharTyeClazzBaseClazz implements ICharTypeClazz { //<class-path, bean-object> private static final HashMap<String, ICharTypeClazz> CLAZZ_BEANS = new HashMap<String, ICharTypeClazz>(); public static ICharTypeClazz getClazzBean(String clazzPath) { return CollectionUtil.get(CLAZZ_BEANS, clazzPath); } private static void putClazzBean(String clazzPath, ICharTypeClazz charTypeBean) { CollectionUtil.put(CLAZZ_BEANS, clazzPath, charTypeBean); } public CharTyeClazzBaseClazz() { CharTyeClazzBaseClazz.putClazzBean(this.getClass().getName(), this); } }
[ "tomlee714@126.com" ]
tomlee714@126.com
7870cfb0ba5694d0e9e836323a9fbd9fe9e899ea
c8eb5fc37993d00ea1e7ed9d19cd1fdfc07c7cea
/rest/src/main/java/org/acme/entities/Entity800.java
9cde9d7313f3342eb44394e5a679b4dc891eead8
[]
no_license
goblinbr/quarkus-multimodule-test
76ef284ecae73df0bde6a6aaae52a7c64b878167
bc9a9aaa54d3dc3d3f051ec3f847322483e14370
refs/heads/master
2020-05-21T08:28:23.897539
2019-05-17T21:00:25
2019-05-17T21:00:25
185,981,408
0
1
null
null
null
null
UTF-8
Java
false
false
1,662
java
package org.acme.entities; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import javax.validation.constraints.Size; import java.util.Objects; @Entity @Table(name = "ENTITY_800") public class Entity800 { @Id @Max(99999999999L) @Min(1) @Column(name = "ID") private Long id; @Size(max = 15) @Column(name = "COLUMN_1") private String column1; @Column(name = "COLUMN_2") private Boolean column2; public Entity800() { this.id = 0L; this.column1 = ""; this.column2 = false; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getColumn1() { return column1; } public void setColumn1(String column1) { this.column1 = column1; } public Boolean getColumn2() { return column2; } public void setColumn2(Boolean column2) { this.column2 = column2; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Entity800)) return false; Entity800 other = (Entity800) o; return Objects.equals(id, other.id); } @Override public int hashCode() { return Objects.hash(id); } @Override public String toString() { return "Entity800{" + "id=" + id + ", column1='" + column1 + '\'' + ", column2=" + column2 + '}'; } }
[ "rodrigo.goblin@gmail.com" ]
rodrigo.goblin@gmail.com
7077cfa8951ccd174805673837442380401e8201
a9843027711ff2ac36bda9bb87c28a0bd06ee10e
/common/src/java/org/jppf/ga/AbstractChromosome.java
be0f85b2bb63b34657fe82e4318b7d5bdb54ccc5
[ "Apache-2.0" ]
permissive
jppf-grid/JPPF
1da761712173029b138f273f965acb8bb295580b
f7d0ddfb2f4f333cecdf62d6752d650175ca9f35
refs/heads/master
2022-06-10T16:24:05.882178
2021-11-26T06:35:21
2021-11-26T06:35:21
129,232,623
54
15
Apache-2.0
2021-11-20T07:25:47
2018-04-12T10:13:36
Java
UTF-8
Java
false
false
1,973
java
/* * JPPF. * Copyright (C) 2005-2019 JPPF Team. * http://www.jppf.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jppf.ga; import java.util.Random; /** * Common abstract super class for chromosme implementations. * @author Laurent Cohen */ public abstract class AbstractChromosome implements Chromosome { /** * Explicit serialVersionUID. */ private static final long serialVersionUID = 1L; /** * The fitness of this chromosme. */ protected double fitness; /** * The genes of this chromosome. */ protected Gene[] genes; /** * The size (number of genes) of this chromosome. */ protected int size; /** * A random number generator. */ protected Random random = new Random(System.nanoTime()); @Override public double getFitness() { return fitness; } @Override public void setFitness(final double fitness) { this.fitness = fitness; } @Override public Gene[] getGenes() { return genes; } /** * Set the genes of this chromosome. * @param genes the array of genes to set. */ public void setGenes(final Gene[] genes) { this.genes = genes; } @Override public int getSize() { return size; } @Override public int compareTo(final Chromosome other) { if (fitness > other.getFitness()) return 1; if (fitness < other.getFitness()) return -1; return 0; } @Override public boolean isValid() { return true; } }
[ "laurent.cohen@jppf.org" ]
laurent.cohen@jppf.org
dcee7e36b5ec97f44b8e1585a6fec965cfaa96ff
11babced1f48d7a4d9353da64f278b25384d5acd
/CSEIII/CSEIII-Server/src/PO/HoldPO.java
2f1de65feb1b42d1cfcf0f70308b8e8e19d3cc26
[]
no_license
Apocalpyse/NJU-SE3
08daf05f9f98569b892fa41cd706f7445eb9baf2
27ae6915830a4087d2eb9350257fb5513c6d8692
refs/heads/master
2020-03-11T02:04:58.892123
2018-04-16T08:43:37
2018-04-16T08:43:37
129,316,413
0
0
null
null
null
null
UTF-8
Java
false
false
1,110
java
package PO; import java.util.ArrayList; /** * Created by chenjin on 2017/5/6. */ public class HoldPO { private String account; private ArrayList<String> holdCode; private ArrayList<String> holdMoney; private ArrayList<String> holdCopies; public HoldPO() { } public HoldPO(String account, ArrayList<String> holdCode, ArrayList<String> holdMoney, ArrayList<String> holdCopies) { this.account = account; this.holdCode = holdCode; this.holdMoney = holdMoney; this.holdCopies = holdCopies; } public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } public ArrayList<String> getHoldCode() { return holdCode; } public void setHoldCode(ArrayList<String> holdCode) { this.holdCode = holdCode; } public ArrayList<String> getHoldMoney() { return holdMoney; } public void setHoldMoney(ArrayList<String> holdMoney) { this.holdMoney = holdMoney; } public ArrayList<String> getHoldCopies() { return holdCopies; } public void setHoldCopies(ArrayList<String> holdCopies) { this.holdCopies = holdCopies; } }
[ "2578931175@qq.com" ]
2578931175@qq.com
c5a1bfe4369c4bc7bfe9f38f381671dc7fd8a66b
4a6a60443952e133e310b97a9c13b0d688518aa4
/core/src/test/java/io/github/mmm/bean/BeanTestHelper.java
1e996bb7d3b8efb23317e656b304bd372ff66543
[ "Apache-2.0" ]
permissive
m-m-m/bean
40b414a691021a053865587153fcd53d757681a9
a1deedf1882e829d477fc1e1c1f0013c06ee77dd
refs/heads/master
2023-06-23T16:50:41.830762
2023-06-10T15:32:12
2023-06-10T15:32:12
107,152,418
2
0
Apache-2.0
2020-10-09T19:45:16
2017-10-16T16:14:59
Java
UTF-8
Java
false
false
744
java
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ package io.github.mmm.bean; import java.util.HashSet; import java.util.Set; import io.github.mmm.property.ReadableProperty; /** * Helper class for {@link io.github.mmm.bean.Bean}s. */ public class BeanTestHelper { /** * @param bean the {@link ReadableBean}. * @return the {@link Set} with the names of the {@link ReadableBean#getProperties() properties}. */ public static Set<String> getPropertyNames(ReadableBean bean) { Set<String> names = new HashSet<>(); for (ReadableProperty<?> property : bean.getProperties()) { names.add(property.getName()); } return names; } }
[ "hohwille@users.sourceforge.net" ]
hohwille@users.sourceforge.net
98cb8d5664946f38f7fb84ccbea85f750916cd29
17ec9b3677c275682176d2728f3b9f7fa88ecf65
/src/org/benf/cfr/reader/bytecode/analysis/parse/statement/AbstractStatement.java
0f5d4a4e43b552f83d707fd6d47f360ffd95b91f
[ "MIT" ]
permissive
Kodeumeister/cfr
985399e1d13fc413dc161604a3ab3cf6e02b43ae
daf9352894767543ec267d9717a8b5c501fd1b0e
refs/heads/master
2020-09-26T11:42:47.236275
2019-12-05T07:34:32
2019-12-05T07:34:32
226,248,189
1
0
MIT
2019-12-06T04:51:13
2019-12-06T04:51:12
null
UTF-8
Java
false
false
2,611
java
package org.benf.cfr.reader.bytecode.analysis.parse.statement; import org.benf.cfr.reader.bytecode.analysis.parse.Expression; import org.benf.cfr.reader.bytecode.analysis.parse.LValue; import org.benf.cfr.reader.bytecode.analysis.parse.Statement; import org.benf.cfr.reader.bytecode.analysis.parse.StatementContainer; import org.benf.cfr.reader.bytecode.analysis.parse.utils.*; import org.benf.cfr.reader.entities.exceptions.ExceptionCheck; import org.benf.cfr.reader.util.ConfusedCFRException; import org.benf.cfr.reader.util.output.Dumper; import org.benf.cfr.reader.util.output.ToStringDumper; import java.util.List; public abstract class AbstractStatement implements Statement { private StatementContainer<Statement> container; @Override public void setContainer(StatementContainer<Statement> container) { if (container == null) throw new ConfusedCFRException("Trying to setContainer null!"); this.container = container; } @Override public LValue getCreatedLValue() { return null; } @Override public void collectLValueAssignments(LValueAssignmentCollector<Statement> lValueAssigmentCollector) { } @Override public boolean doesBlackListLValueReplacement(LValue lValue, Expression expression) { return false; } @Override public void collectObjectCreation(CreationCollector creationCollector) { } @Override public SSAIdentifiers<LValue> collectLocallyMutatedVariables(SSAIdentifierFactory<LValue, ?> ssaIdentifierFactory) { return new SSAIdentifiers<LValue>(); } @Override public StatementContainer<Statement> getContainer() { // if (container == null) { // throw new ConfusedCFRException("Null container!"); // } return container; } @Override public Expression getRValue() { return null; } protected Statement getTargetStatement(int idx) { return container.getTargetStatement(idx); } @Override public boolean isCompound() { return false; } @Override public List<Statement> getCompoundParts() { throw new ConfusedCFRException("Should not be calling getCompoundParts on this statement"); } @Override public final String toString() { Dumper d = new ToStringDumper(); d.print(getClass().getSimpleName()).print(": ").dump(this); return d.toString(); } @Override public boolean fallsToNext() { return true; } @Override public boolean canThrow(ExceptionCheck caught) { return true; } }
[ "lee@benf.org" ]
lee@benf.org
4ffb4d2023aa494d79e4fb0e420090efc9c53ad0
fc4003bb933c618ece329d14ca8d3fe3afb25d04
/src/main/java/com/example/domain/Customer.java
ef9d8a0ad46d668c7a1d2f49d814d0c75f777ecd
[]
no_license
kimyongyeon/springboot-my-project
a9ec9d38e88b6588e5bbebfec5079278a4e247c7
45e71b33136eaf555902f7b9f87546c63bde358c
refs/heads/master
2020-12-31T05:09:21.426268
2016-04-29T06:38:43
2016-04-29T06:38:43
57,354,141
0
0
null
null
null
null
UTF-8
Java
false
false
1,146
java
package com.example.domain; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; /** * Created by kimyongyeon on 2016-04-25. */ @Entity public class Customer { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; private String firstName; public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public long getId() { return id; } public void setId(long id) { this.id = id; } private String lastName; protected Customer() {} public Customer(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } @Override public String toString(){ return String.format("Customer[id=%d, firstName='%s', lastName='%s']", id, firstName, lastName); } }
[ "toyongyeon@gmail.com" ]
toyongyeon@gmail.com
4e21bd38d2323d9bd06bec79289852e301f4cb53
da62f2ca68ea688d45611bb745a86ae76b409348
/components/pool/impl/src/test/java/org/apache/avalon/excalibur/pool/test/ResourceLimitingPoolMultithreadMaxTestCase.java
5f8b878c43787eb93017f0c7a4f3b91a01c790eb
[ "Apache-2.0" ]
permissive
eva-xuyen/excalibur
34dbf26dbd6e615dd9f04ced77580e5751a45401
4b5bcb6c21d998ddea41b0e3ebdbb2c1f8662c54
refs/heads/master
2021-01-23T03:04:14.441013
2015-03-26T02:45:49
2015-03-26T02:45:49
32,907,024
1
2
null
null
null
null
UTF-8
Java
false
false
4,877
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.avalon.excalibur.pool.test; import junit.extensions.TestSetup; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.apache.avalon.excalibur.pool.Poolable; import org.apache.avalon.excalibur.pool.ResourceLimitingPool; import com.clarkware.junitperf.ConstantTimer; import com.clarkware.junitperf.LoadTest; import com.clarkware.junitperf.TimedTest; import com.clarkware.junitperf.Timer; /** * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a> * @version CVS $Revision: 1.7 $ $Date: 2004/03/29 16:50:37 $ * @since 4.1 */ public final class ResourceLimitingPoolMultithreadMaxTestCase extends TestCase { private static BufferedLogger m_logger; private static ClassInstanceObjectFactory m_factory; private static ResourceLimitingPool m_pool; /*--------------------------------------------------------------- * Constructors *-------------------------------------------------------------*/ public ResourceLimitingPoolMultithreadMaxTestCase() { this( "ResourceLimitingPool Multithreaded Max Size Test Case" ); } public ResourceLimitingPoolMultithreadMaxTestCase( final String name ) { super( name ); } /*--------------------------------------------------------------- * Suite *-------------------------------------------------------------*/ public static Test suite() { TestSuite suite = new TestSuite(); Timer timer = new ConstantTimer( 100 ); int maxUsers = 50; int iterations = 10; long maxElapsedTime = 20000; Test testCase = new ResourceLimitingPoolMultithreadMaxTestCase( "testGetPut" ); Test loadTest = new LoadTest( testCase, maxUsers, iterations, timer ); Test timedTest = new TimedTest( loadTest, maxElapsedTime ); suite.addTest( timedTest ); TestSetup wrapper = new TestSetup( suite ) { public void setUp() { oneTimeSetUp(); } public void tearDown() throws Exception { oneTimeTearDown(); } }; return wrapper; } public static void oneTimeSetUp() { m_logger = new BufferedLogger(); m_factory = new ClassInstanceObjectFactory( PoolableTestObject.class, m_logger ); m_pool = new ResourceLimitingPool( m_factory, 3, false, false, 0, 0 ); m_pool.enableLogging( m_logger ); } public static void oneTimeTearDown() throws Exception { // The timing of this test makes it so the pool should grow to 4 elements assertEquals( "1) Pool Ready Size", 3, m_pool.getReadySize() ); assertEquals( "1) Pool Size", 3, m_pool.getSize() ); // Make sure that each of the objects are uniqe by checking them all back out. Poolable p1 = m_pool.get(); Poolable p2 = m_pool.get(); Poolable p3 = m_pool.get(); assertEquals( "2) Pool Ready Size", 0, m_pool.getReadySize() ); assertEquals( "2) Pool Size", 3, m_pool.getSize() ); assertTrue( "p1 != p2", p1 != p2 ); assertTrue( "p1 != p3", p1 != p3 ); assertTrue( "p2 != p3", p2 != p3 ); m_pool.put( p1 ); m_pool.put( p2 ); m_pool.put( p3 ); assertEquals( "3) Pool Ready Size", 3, m_pool.getReadySize() ); assertEquals( "3) Pool Size", 3, m_pool.getSize() ); m_pool.dispose(); assertEquals( "4) Pool Ready Size", 0, m_pool.getReadySize() ); assertEquals( "4) Pool Size", 0, m_pool.getSize() ); } /*--------------------------------------------------------------- * TestCases *-------------------------------------------------------------*/ public void testGetPut() throws Exception { Poolable p = m_pool.get(); try { Thread.sleep( 33 ); } catch( InterruptedException e ) { } m_pool.put( p ); } }
[ "root@mycompany.com" ]
root@mycompany.com
494aa15694328537f0f1c94088ead0a51d0a8616
07be9fac780e8d43f52527f4fff79289d354b1e5
/workspace/TP3_Rest_Security_Tests/src/main/java/org/formation/model/Document.java
cc896fc9b4f266485e3a6cf989693fcbabba7a3d
[]
no_license
dthibau/springboot
55b68d88b0b2ab5009359150a5f7074729db6969
f8445dadf74cbb2e210b30690844f0cfc90e4072
refs/heads/master
2021-08-01T18:37:46.865532
2021-07-28T16:43:05
2021-07-28T16:43:05
249,222,902
0
1
null
null
null
null
UTF-8
Java
false
false
1,283
java
package org.formation.model; import java.io.Serializable; import java.util.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Lob; import javax.persistence.Temporal; import javax.persistence.TemporalType; @Entity public class Document implements Serializable { /** * */ private static final long serialVersionUID = 6590486482810196501L; @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private long id; private String name,contentType; @Lob private byte[] data; @Temporal(TemporalType.TIMESTAMP) private Date uploadedDate; public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getContentType() { return contentType; } public void setContentType(String contentType) { this.contentType = contentType; } public byte[] getData() { return data; } public void setData(byte[] data) { this.data = data; } public Date getUploadedDate() { return uploadedDate; } public void setUploadedDate(Date uploadedDate) { this.uploadedDate = uploadedDate; } }
[ "david.thibau@gmail.com" ]
david.thibau@gmail.com
4a0ab616a0f762c2d0671c1d745170aca9374fbc
ac7b5056615fe0b29cf811d8e9ed90affd22b354
/2020_09_17/src/Main1.java
2190c5395be35d596fa626704dce3c21041bf6bb
[]
no_license
Yunshuaiwei/JavaBit
d074a3e7dbd635681e34c2782f5e652ca2d13d67
b7fdbd2f5cf9ba094363bb999fc12d682de74d3d
refs/heads/master
2021-08-07T05:33:52.662884
2020-09-24T09:14:25
2020-09-24T09:14:25
217,806,725
0
0
null
null
null
null
UTF-8
Java
false
false
1,547
java
import java.util.Scanner; /** * @Description: TODO * @Author YunShuaiWei * @Date 2020/9/17 20:39 * @Version **/ public class Main1 { public static void main(String[] args) { Scanner input = new Scanner(System.in); int T = input.nextInt(); for (int i = 0; i < T; i++) { int n = input.nextInt(); int m = input.nextInt(); char[][] map = new char[n][m]; for (int j = 0; j < n; j++) { map[j] = input.next().toCharArray(); } for (int j = 0; j < n; j++) { for (int k = 0; k < m; k++) { char c = map[j][k]; if (c == 'S') { boolean[][] flag = new boolean[n][m]; boolean e = dfs(map, j, k, 'E', flag); if (e) { System.out.println("YES"); } else { System.out.println("NO"); } } } } } } private static boolean dfs(char[][] map, int i, int j, char c, boolean[][] flag) { if (i < 0 || i >= map.length || j < 0 || j >= map[0].length || map[i][j] == '#') { return false; } if (map[i][j] == c) { return true; } return dfs(map, i + 1, j, c, flag) || dfs(map, i - 1, j, c, flag) || dfs(map, i, j + 1, c, flag) || dfs(map, i, j - 1, c, flag); } }
[ "1779001867@qq.com" ]
1779001867@qq.com
2caa63b7a083bd4d4186f299650524c68c4ce53f
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-14263-2-12-Single_Objective_GGA-WeightedSum/org/xwiki/security/authorization/DefaultAuthorizationManager_ESTest.java
bb3c126b5ec1233c566de4427ac1e18f53ad107c
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
593
java
/* * This file was automatically generated by EvoSuite * Wed Apr 01 05:34:37 UTC 2020 */ package org.xwiki.security.authorization; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class DefaultAuthorizationManager_ESTest extends DefaultAuthorizationManager_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
fe5d1bc3152396c27a378b24186c856e59c4ba8f
8d8fb4dfd7be299076651e02d26eba6cd879428c
/newrelic-agent/src/main/java/com/newrelic/agent/application/SameOrHigherPriorityApplicationNamingPolicy.java
cbff6d9905db66122f83c830c013c73d1e970cc1
[ "Apache-2.0" ]
permissive
newrelic/newrelic-java-agent
db6dd20f6ba3f43909b004ce4a058f589dd4b017
eb298ecd8d31f93622388aa12d3ba1e68a58f912
refs/heads/main
2023-08-31T05:14:44.428903
2023-08-29T10:37:35
2023-08-30T18:08:38
275,016,355
177
150
Apache-2.0
2023-09-11T14:50:06
2020-06-25T21:13:42
Java
UTF-8
Java
false
false
930
java
/* * * * Copyright 2020 New Relic Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * */ package com.newrelic.agent.application; import com.newrelic.agent.Transaction; import com.newrelic.api.agent.ApplicationNamePriority; public class SameOrHigherPriorityApplicationNamingPolicy extends AbstractApplicationNamingPolicy { private static final SameOrHigherPriorityApplicationNamingPolicy INSTANCE = new SameOrHigherPriorityApplicationNamingPolicy(); private SameOrHigherPriorityApplicationNamingPolicy() { } @Override public boolean canSetApplicationName(Transaction transaction, ApplicationNamePriority priority) { PriorityApplicationName pan = transaction.getPriorityApplicationName(); return priority.compareTo(pan.getPriority()) >= 0; } public static SameOrHigherPriorityApplicationNamingPolicy getInstance() { return INSTANCE; } }
[ "49817386+jeffalder@users.noreply.github.com" ]
49817386+jeffalder@users.noreply.github.com
71aab10ea02c152329055cefae376af336781247
a3d049b6c0ebdf7c22d5be0de57c47d3cfe2bccb
/docroot/WEB-INF/service/org/opencps/servicemgt/service/persistence/ServiceFileTemplatePK.java
a23f7867084398f8abfd3253de06f8eaf8bc6275
[]
no_license
HieuNT1990/tutorial
b21bbfd04f906a2ef96ad52aa752dca769fdcd15
4edada7993ff6cde126435268470e9b564cbb54d
refs/heads/master
2021-01-20T20:24:30.375662
2016-07-26T07:37:52
2016-07-26T07:37:52
63,405,491
0
1
null
null
null
null
UTF-8
Java
false
false
2,948
java
/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package org.opencps.servicemgt.service.persistence; import com.liferay.portal.kernel.util.StringBundler; import com.liferay.portal.kernel.util.StringPool; import java.io.Serializable; /** * @author khoavd * @generated */ public class ServiceFileTemplatePK implements Comparable<ServiceFileTemplatePK>, Serializable { public long serviceinfoId; public long templatefileId; public ServiceFileTemplatePK() { } public ServiceFileTemplatePK(long serviceinfoId, long templatefileId) { this.serviceinfoId = serviceinfoId; this.templatefileId = templatefileId; } public long getServiceinfoId() { return serviceinfoId; } public void setServiceinfoId(long serviceinfoId) { this.serviceinfoId = serviceinfoId; } public long getTemplatefileId() { return templatefileId; } public void setTemplatefileId(long templatefileId) { this.templatefileId = templatefileId; } @Override public int compareTo(ServiceFileTemplatePK pk) { if (pk == null) { return -1; } int value = 0; if (serviceinfoId < pk.serviceinfoId) { value = -1; } else if (serviceinfoId > pk.serviceinfoId) { value = 1; } else { value = 0; } if (value != 0) { return value; } if (templatefileId < pk.templatefileId) { value = -1; } else if (templatefileId > pk.templatefileId) { value = 1; } else { value = 0; } if (value != 0) { return value; } return 0; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof ServiceFileTemplatePK)) { return false; } ServiceFileTemplatePK pk = (ServiceFileTemplatePK)obj; if ((serviceinfoId == pk.serviceinfoId) && (templatefileId == pk.templatefileId)) { return true; } else { return false; } } @Override public int hashCode() { return (String.valueOf(serviceinfoId) + String.valueOf(templatefileId)).hashCode(); } @Override public String toString() { StringBundler sb = new StringBundler(10); sb.append(StringPool.OPEN_CURLY_BRACE); sb.append("serviceinfoId"); sb.append(StringPool.EQUAL); sb.append(serviceinfoId); sb.append(StringPool.COMMA); sb.append(StringPool.SPACE); sb.append("templatefileId"); sb.append(StringPool.EQUAL); sb.append(templatefileId); sb.append(StringPool.CLOSE_CURLY_BRACE); return sb.toString(); } }
[ "hieunt000@gmail.com" ]
hieunt000@gmail.com
754eadd365fbbfcbdc24bf5dc42e84700381769c
e0ef104d8336d99d0631a2ec8a8d5d13e96cebf9
/express_user/src/main/java/com/xxx/user/form/RegisterUserForm.java
7987fc003763250d0ac738361e3db0642e1c70fa
[]
no_license
disvenk/express
66f517401fa02c3e1c4196f9cc115c09f7af8d75
e590f746ae5d6328bd5307b1d067b03b121cc69e
refs/heads/master
2022-12-21T14:21:13.699745
2019-10-22T05:31:00
2019-10-22T05:31:00
216,696,956
0
0
null
2022-12-16T07:46:57
2019-10-22T01:23:37
JavaScript
UTF-8
Java
false
false
269
java
package com.xxx.user.form; import java.io.Serializable; public class RegisterUserForm implements Serializable { public String userCode; public String phoneNumber; public String verificationCode; public String password; public Integer loginType; }
[ "disvenk@163.com" ]
disvenk@163.com
cd2c44339a126d2d1852963bcf20bdbdb47eff2e
93249ac332c0f24bf7642caa21f27058ba99189b
/applications/plugins/org.csstudio.diag.pvmanager.probe/src/org/csstudio/diag/pvmanager/probe/ShowHideForGridLayout.java
ef54df5906e7e254f7980a7db38d8ea12e9f0f03
[]
no_license
crispd/cs-studio
0678abd0db40f024fbae4420eeda87983f109382
32dd49d1eb744329dc1083b4ba30b65155000ffd
refs/heads/master
2021-01-17T23:59:55.878433
2014-06-20T17:55:02
2014-06-20T17:55:02
21,135,201
1
0
null
null
null
null
UTF-8
Java
false
false
1,582
java
package org.csstudio.diag.pvmanager.probe; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; public class ShowHideForGridLayout { public static boolean setShow(Composite section, boolean show) { if (show) { return show(section); } else { return hide(section); } } public static boolean hide(Composite section) { GridData data = (GridData) section.getLayoutData(); if (data.exclude == false || data.heightHint != 0 || section.getVisible()) { data.heightHint = 0; data.exclude = true; section.setVisible(false); return true; } return false; } public static boolean show(Composite section) { GridData data = (GridData) section.getLayoutData(); if (data.exclude == true || data.heightHint != -1 || !section.getVisible()) { data.heightHint = -1; data.exclude = false; section.setVisible(true); return true; } return false; } public static MenuItem createShowHideMenuItem(Menu menu, final Composite composite) { final MenuItem menuItem = new MenuItem(menu, SWT.CHECK); menuItem.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (menuItem.getSelection()) { show(composite); } else { hide(composite); } composite.layout(); composite.getParent().layout(); } }); return menuItem; } }
[ "gabriele.carcassi@gmail.com" ]
gabriele.carcassi@gmail.com
3cb24000a22bb4eaf1929e96a434467fbad45bf1
67cbc9c5125df76324d78624e2281cb1fefc8a12
/application/src/main/java/org/mifos/security/rolesandpermission/business/ActivityEntity.java
8b50dfd6e10ee5ed8b80b1bba5552f7a1761215a
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
mifos/1.5.x
86e785c062cb14be4597b33d15c38670c176120e
5734370912c47973de3889db21debb3ff7f0f6db
refs/heads/master
2023-08-28T09:48:46.266018
2010-07-12T04:43:46
2010-07-12T04:43:46
2,946,757
2
2
null
null
null
null
UTF-8
Java
false
false
2,811
java
/* * Copyright (c) 2005-2010 Grameen Foundation USA * 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. * * See also http://www.apache.org/licenses/LICENSE-2.0.html for an * explanation of the license and how it is applied. */ package org.mifos.security.rolesandpermission.business; import java.util.HashSet; import java.util.Set; import org.mifos.application.master.MessageLookup; import org.mifos.application.master.business.LookUpValueEntity; import org.mifos.framework.business.PersistentObject; public class ActivityEntity extends PersistentObject { private final Short id; private ActivityEntity parent; private final LookUpValueEntity activityNameLookupValues; private final LookUpValueEntity descriptionLookupValues; private final Set<RoleActivityEntity> roles = new HashSet<RoleActivityEntity>(); protected ActivityEntity() { this.id = null; this.parent = null; this.activityNameLookupValues = null; this.descriptionLookupValues = null; } ActivityEntity(int id) { this.id = (short) id; this.parent = null; this.activityNameLookupValues = null; this.descriptionLookupValues = null; } public ActivityEntity(short id, ActivityEntity parentActivityEntity, LookUpValueEntity lookUpValueEntity) { this.id = id; this.parent = parentActivityEntity; this.activityNameLookupValues = lookUpValueEntity; this.descriptionLookupValues = this.activityNameLookupValues; } public Short getId() { return id; } public ActivityEntity getParent() { return parent; } public LookUpValueEntity getActivityNameLookupValues() { return activityNameLookupValues; } public LookUpValueEntity getDescriptionLookupValues() { return descriptionLookupValues; } public String getDescription() { return MessageLookup.getInstance().lookup(getActivityNameLookupValues()); } public String getActivityName() { return MessageLookup.getInstance().lookup(getActivityNameLookupValues()); } public void setParent(ActivityEntity parent) { this.parent = parent; } public Set<RoleActivityEntity> getRoles() { return roles; } }
[ "meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4" ]
meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4
2e147b74d15ca4ce3c8a0d4ec56d04c493c248df
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
/sources/com/airbnb/android/cityregistration/adapters/CityRegistrationDocReviewAdapter$$Lambda$2.java
bca5771a6a02ae6a119655d9b92098039a24ec8b
[]
no_license
jasonnth/AirCode
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
d37db1baa493fca56f390c4205faf5c9bbe36604
refs/heads/master
2020-07-03T08:35:24.902940
2019-08-12T03:34:56
2019-08-12T03:34:56
201,842,970
0
2
null
null
null
null
UTF-8
Java
false
false
1,020
java
package com.airbnb.android.cityregistration.adapters; import android.view.View; import android.view.View.OnClickListener; import com.airbnb.android.cityregistration.adapters.CityRegistrationDocReviewAdapter.Listener; import com.airbnb.android.core.models.ListingRegistrationQuestion; final /* synthetic */ class CityRegistrationDocReviewAdapter$$Lambda$2 implements OnClickListener { private final Listener arg$1; private final ListingRegistrationQuestion arg$2; private CityRegistrationDocReviewAdapter$$Lambda$2(Listener listener, ListingRegistrationQuestion listingRegistrationQuestion) { this.arg$1 = listener; this.arg$2 = listingRegistrationQuestion; } public static OnClickListener lambdaFactory$(Listener listener, ListingRegistrationQuestion listingRegistrationQuestion) { return new CityRegistrationDocReviewAdapter$$Lambda$2(listener, listingRegistrationQuestion); } public void onClick(View view) { this.arg$1.getDocPhoto(this.arg$2); } }
[ "thanhhuu2apc@gmail.com" ]
thanhhuu2apc@gmail.com
bd04b6bafdbadc6f89b9f5851eea1574d249857d
2b6e3a34ec277f72a5da125afecfe3f4a61419f5
/Ruyicai_91/v2.6/v2.6/src/com/ruyicai/activity/account/Accoutdialog.java
9022ac924560beca2b8464f011859f190be78e3f
[]
no_license
surport/Android
03d538fe8484b0ff0a83b8b0b2499ad14592c64b
afc2668728379caeb504c9b769011f2ba1e27d25
refs/heads/master
2020-04-02T10:29:40.438348
2013-12-18T09:55:42
2013-12-18T09:55:42
15,285,717
3
5
null
null
null
null
WINDOWS-1252
Java
false
false
917
java
package com.ruyicai.activity.account; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.content.Context; import android.content.DialogInterface; import com.palmdream.RuyicaiAndroid91.R; public class Accoutdialog { private static Accoutdialog instance = null; private Accoutdialog(){ } public synchronized static Accoutdialog getInstance() { if (instance == null ) { instance = new Accoutdialog(); } return instance; } public void createAccoutdialog(final Context context,String msg){ Builder dialog = new AlertDialog.Builder(context).setTitle("³äÖµÌáʾ").setMessage(msg).setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); dialog.show(); } }
[ "zxflimit@gmail.com" ]
zxflimit@gmail.com
129596ed7e862461080adf271b4b46122e4b8a3b
caaffff72d43cc31a5de6746429d32c989685c7c
/net.jplugin.core.das/src/net/jplugin/core/das/api/stat/WhereBasedStatement.java
f3632e3b07b645bb8708374d9f72eda5fad674da
[]
no_license
iamlibo/jplugin
8c0ebf3328bdb90d7db80606d46453778c25f4f4
4f8b65dd285f986a3c54b701a25fabca3bba5ed9
refs/heads/master
2021-01-12T02:10:35.903062
2016-12-08T12:42:33
2016-12-08T12:42:33
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,240
java
package net.jplugin.core.das.api.stat; import java.util.ArrayList; import java.util.List; import net.jplugin.core.das.impl.stat.IWhereSegment; import net.jplugin.core.das.impl.stat.StringWhereSegment; import net.jplugin.core.das.impl.stat.SubQueryWhereSegment; public class WhereBasedStatement { protected List<IWhereSegment> whereSegments; public void addWhere(String where, Object... para) { if (this.whereSegments==null){ this.whereSegments = new ArrayList<IWhereSegment>(); } this.whereSegments.add(new StringWhereSegment(where, para)); } public void addSubQryWhere(SelectStatement ss) { if (this.whereSegments==null){ this.whereSegments = new ArrayList<IWhereSegment>(); } this.whereSegments.add(new SubQueryWhereSegment(ss)); } protected void addWhereClause(StringBuffer sb) { //×é×°where if (whereSegments!=null && !whereSegments.isEmpty()){ sb.append(" WHERE "); for (IWhereSegment wi:whereSegments){ sb.append(wi.getString()).append(" "); } } sb.append(" "); } protected void addWhereParas(List<Object> list) { if (whereSegments!=null){ for (IWhereSegment ws:whereSegments){ ws.addToBindList(list); } } } }
[ "liuhang.163@163.com" ]
liuhang.163@163.com
e7413d73720faefdf0213b97f7ae8f4cb68355fe
c6f63cf4524567f12d4226b9cdcbfee9c5c3d95c
/gen/main/java/org/hl7/fhir/DataElementContact.java
ec75386ceb4a7bacd2567f696f8aa07fbdcfe2f4
[]
no_license
usnistgov/fhir.emf
83852f9388619fa7b76c05dd725c311c96e733e6
affea7e1fc2b53cb67e706f47264b408909b2253
refs/heads/master
2021-01-11T02:40:21.282622
2016-10-21T18:51:25
2016-10-21T18:51:25
70,912,620
1
0
null
null
null
null
UTF-8
Java
false
false
2,428
java
/** */ package org.hl7.fhir; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Data Element Contact</b></em>'. * <!-- end-user-doc --> * * <!-- begin-model-doc --> * The formal description of a single piece of information that can be gathered and reported. * <!-- end-model-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link org.hl7.fhir.DataElementContact#getName <em>Name</em>}</li> * <li>{@link org.hl7.fhir.DataElementContact#getTelecom <em>Telecom</em>}</li> * </ul> * * @see org.hl7.fhir.FhirPackage#getDataElementContact() * @model extendedMetaData="name='DataElement.Contact' kind='elementOnly'" * @generated */ public interface DataElementContact extends BackboneElement { /** * Returns the value of the '<em><b>Name</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * The name of an individual to contact regarding the data element. * <!-- end-model-doc --> * @return the value of the '<em>Name</em>' containment reference. * @see #setName(org.hl7.fhir.String) * @see org.hl7.fhir.FhirPackage#getDataElementContact_Name() * @model containment="true" * extendedMetaData="kind='element' name='name' namespace='##targetNamespace'" * @generated */ org.hl7.fhir.String getName(); /** * Sets the value of the '{@link org.hl7.fhir.DataElementContact#getName <em>Name</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Name</em>' containment reference. * @see #getName() * @generated */ void setName(org.hl7.fhir.String value); /** * Returns the value of the '<em><b>Telecom</b></em>' containment reference list. * The list contents are of type {@link org.hl7.fhir.ContactPoint}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Contact details for individual (if a name was provided) or the publisher. * <!-- end-model-doc --> * @return the value of the '<em>Telecom</em>' containment reference list. * @see org.hl7.fhir.FhirPackage#getDataElementContact_Telecom() * @model containment="true" * extendedMetaData="kind='element' name='telecom' namespace='##targetNamespace'" * @generated */ EList<ContactPoint> getTelecom(); } // DataElementContact
[ "geoffry.roberts@nist.gov" ]
geoffry.roberts@nist.gov
e92c4f963d4d7c5d6b53bf9b19156f3aebd0d088
4a524e15ccc782ce0df1281e4c95c0715e764358
/src/cn/jsprun/vo/FieldVO.java
219809a21d1aaae21601975ab3423bf047ed6494
[]
no_license
yhpdev/jsprun
fd3566c2497d00ee2453a29064224d7d19af5aac
477a43a6facb3cf49fc8cc200af34f11ec6f28b9
refs/heads/master
2021-01-19T16:03:27.471179
2016-09-02T04:51:25
2016-09-02T04:51:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
946
java
package cn.jsprun.vo; public class FieldVO { private String field; private String type; private String allowNull; private String key; private String defaultValue; private String extra; public String getAllowNull() { return allowNull; } public void setAllowNull(String allowNull) { this.allowNull = allowNull; } public String getDefaultValue() { return defaultValue; } public void setDefaultValue(String defaultValue) { this.defaultValue = defaultValue; } public String getExtra() { return extra; } public void setExtra(String extra) { this.extra = extra; } public String getField() { return field; } public void setField(String field) { this.field = field; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getType() { return type; } public void setType(String type) { this.type = type; } }
[ "maywide@qq.com" ]
maywide@qq.com
5839f88af2183830c60c246d8217254518468787
9c727e79f1579833ddbbb430f7d761c75c1c03bb
/first_spring_boot/learn-spring-boot-chap02-re/src/test/java/com/arahansa/learnspringbootchap02/chap03/miscellaneous/SpringJunitCompareSpringBootTest2.java
8a75a35b131311cf0fa7f54355791919edc182ed
[]
no_license
arahansa/learn_spring_2019
fa9afc82b23860e289d450e6a2d4b0719ffb7f1e
bf5139d9ce6475f221dcdd612d4d089cfd956471
refs/heads/master
2020-09-22T02:46:20.608440
2019-12-01T12:33:46
2019-12-01T12:33:46
225,022,466
0
0
null
null
null
null
UTF-8
Java
false
false
773
java
package com.arahansa.learnspringbootchap02.chap03.miscellaneous; import com.arahansa.learnspringbootchap02.config.AppContext; import com.arahansa.learnspringbootchap02.service.HelloService; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.ApplicationContext; import static org.assertj.core.api.Assertions.assertThat; @SpringBootTest public class SpringJunitCompareSpringBootTest2 { @Autowired ApplicationContext applicationContext; @Autowired HelloService helloService; @Test void name() { assertThat(applicationContext).isNotNull(); assertThat(helloService).isNotNull(); } }
[ "arahansa@naver.com" ]
arahansa@naver.com
aefc94fef355c6469fe56de576f2e64858bdeaec
a9d297e8807df9c8281d18181b394069cc85c7ab
/src/test/java/walkingkooka/text/pretty/CharSequenceBiFunctionTrimRightTest.java
6958a6d8829bf1f57c4babf7107f5d8d5b208879
[ "Apache-2.0" ]
permissive
mP1/walkingkooka-text-pretty
ea5ab1a28b071716682e363518d7815455ebb59d
ba107fb5015698fcf475d2d2d66603ca860e4efb
refs/heads/master
2023-02-04T19:53:44.228408
2023-02-04T03:55:51
2023-02-04T03:55:51
216,320,685
0
0
Apache-2.0
2023-02-04T03:55:52
2019-10-20T06:57:14
Java
UTF-8
Java
false
false
1,744
java
/* * Copyright 2019 Miroslav Pokorny (github.com/mP1) * * 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 walkingkooka.text.pretty; import org.junit.jupiter.api.Test; public class CharSequenceBiFunctionTrimRightTest extends CharSequenceBiFunctionTrimTestCase<CharSequenceBiFunctionTrimRight> { @Test public void testWithLeadingWhitespace() { this.applyAndCheck2(" abc123", 10); } @Test public void testWithLeadingWhitespace2() { this.applyAndCheck2(" abc123", 10); } @Test public void testWithTrailingWhitespace1() { this.applyAndCheck2("abc123 ", 10, "abc123"); } @Test public void testWithTrailingWhitespace2() { this.applyAndCheck2("abc123 ", 10, "abc123"); } @Test public void testWithTrailingWhitespaceFullWidth() { this.applyAndCheck2("abc123 ", 10, "abc123"); } @Override public CharSequenceBiFunctionTrimRight createBiFunction() { return CharSequenceBiFunctionTrimRight.INSTANCE; } @Override public Class<CharSequenceBiFunctionTrimRight> type() { return CharSequenceBiFunctionTrimRight.class; } @Override String trim() { return "Right"; } }
[ "miroslav.pokorny@gmail.com" ]
miroslav.pokorny@gmail.com
f4af669a562f084842256b20252e0860e6765b06
808b985690efbca4cd4db5b135bb377fe9c65b88
/tbs_core_45016_20191122114850_nolog_fs_obfs/assets/webkit/unZipCode/miniqb_dex.src/org/chromium/ui/UiUtils.java
47342eb38d8397cf1c0f1f112dc53c116f1c653d
[]
no_license
polarrwl/WebviewCoreAnalysis
183e12b76df3920c5afc65255fd30128bb96246b
e21a294bf640578e973b3fac604b56e017a94060
refs/heads/master
2022-03-16T17:34:15.625623
2019-12-17T03:16:51
2019-12-17T03:16:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,415
java
package org.chromium.ui; import android.annotation.SuppressLint; import android.content.Context; import android.content.res.Resources; import android.graphics.Rect; import android.os.Build.VERSION; import android.util.DisplayMetrics; import android.view.View; import android.view.View.MeasureSpec; import android.view.WindowInsets; import android.view.inputmethod.InputMethodManager; import android.widget.AbsListView.LayoutParams; import android.widget.ListAdapter; import java.util.List; public class UiUtils { private static KeyboardShowingDelegate a; public static int a(ListAdapter paramListAdapter) { int i = 0; int k = View.MeasureSpec.makeMeasureSpec(0, 0); int m = View.MeasureSpec.makeMeasureSpec(0, 0); AbsListView.LayoutParams localLayoutParams = new AbsListView.LayoutParams(-2, -2); View[] arrayOfView = new View[paramListAdapter.getViewTypeCount()]; int j = 0; while (i < paramListAdapter.getCount()) { int n = paramListAdapter.getItemViewType(i); View localView; if (n < 0) { localView = paramListAdapter.getView(i, null, null); } else { arrayOfView[n] = paramListAdapter.getView(i, arrayOfView[n], null); localView = arrayOfView[n]; } localView.setLayoutParams(localLayoutParams); localView.measure(k, m); j = Math.max(j, localView.getMeasuredWidth()); i += 1; } return j; } @SuppressLint({"NewApi"}) public static boolean a(Context paramContext, View paramView) { Object localObject = a; boolean bool = false; if ((localObject != null) && (((KeyboardShowingDelegate)localObject).disableKeyboardCheck(paramContext, paramView))) { return false; } paramView = paramView.getRootView(); if (paramView == null) { return false; } localObject = new Rect(); paramView.getWindowVisibleDisplayFrame((Rect)localObject); int i = ((Rect)localObject).top; int k = paramView.getHeight() - (((Rect)localObject).height() + i); if (k <= 0) { return false; } int j; if (((Rect)localObject).width() != paramView.getWidth()) { j = 1; } else { j = 0; } i = k; if (j == 0) { if (Build.VERSION.SDK_INT >= 23) { i = k - paramView.getRootWindowInsets().getStableInsetBottom(); } else { float f = paramContext.getResources().getDisplayMetrics().density; i = (int)(k - f * 100.0F); } } if (i > 0) { bool = true; } return bool; } public static boolean a(View paramView) { return ((InputMethodManager)paramView.getContext().getSystemService("input_method")).hideSoftInputFromWindow(paramView.getWindowToken(), 0); } public static abstract interface KeyboardShowingDelegate { public abstract boolean disableKeyboardCheck(Context paramContext, View paramView); } public static abstract interface PhotoPickerDelegate { public abstract void onPhotoPickerDismissed(); public abstract void showPhotoPicker(Context paramContext, PhotoPickerListener paramPhotoPickerListener, boolean paramBoolean, List<String> paramList); } } /* Location: C:\Users\Administrator\Desktop\学习资料\dex2jar\dex2jar-2.0\classes-dex2jar.jar!\org\chromium\ui\UiUtils.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1542951820@qq.com" ]
1542951820@qq.com
720aef088b554ba1371b0dbf50eaecf6d28b75ae
d0bfc9d12bf822bb2f93e5e1ec38fffe69353253
/benefits/benefits-moudle/benefits-service/src/main/java/com/lx/benefits/service/jdPrice/impl/JdPriceStrategyServiceImpl.java
39917a5e00d69d4f505995156f58250189a68e50
[]
no_license
wuyizhong/SpringFramework.wangmeng.definition
11f3f2958079baad8e4f39a7b6953a87c29fde5f
dd346624d89150836f4a26f1be21192602376b13
refs/heads/master
2020-07-23T23:15:23.948727
2019-09-09T02:51:36
2019-09-09T02:51:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,134
java
package com.lx.benefits.service.jdPrice.impl; import com.alibaba.fastjson.JSONObject; import com.lx.benefits.bean.dto.jdPrice.JdPriceStrategyDto; import com.lx.benefits.bean.dto.jdPrice.JdPriceStrategyLineDto; import com.lx.benefits.bean.dto.jdPrice.JdPriceStrategyReq; import com.lx.benefits.bean.entity.jdPrice.JdPriceStrategy; import com.lx.benefits.bean.entity.jdPrice.JdPriceStrategyLine; import com.lx.benefits.bean.util.BeansUtils; import com.lx.benefits.bean.util.Response; import com.lx.benefits.mapper.jdPrice.JdPriceStrategyLineMapper; import com.lx.benefits.mapper.jdPrice.JdPriceStrategyMapper; import com.lx.benefits.service.jdPrice.JdPriceStrategyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Date; import java.util.List; /** * User: fan * Date: 2019/03/04 * Time: 23:35 */ @Service public class JdPriceStrategyServiceImpl implements JdPriceStrategyService { @Autowired JdPriceStrategyMapper strategyMapper; @Autowired JdPriceStrategyLineMapper strategyLineMapper; @Override public JSONObject delete(Long id) { if (strategyMapper.getStrategyById(id) == null) { return Response.fail("调价策略不存在"); } if (strategyMapper.delete(id) > 0) { return Response.succ(); } return Response.fail("删除失败"); } @Override public JSONObject insert(JdPriceStrategyDto record, String userName) { record.setId(null); JdPriceStrategy strategy = BeansUtils.copyProperties(record, JdPriceStrategy.class); try { strategy.setCreateUser(userName); strategy.setUpdateUser(userName); strategy.setCreateTime(new Date()); strategy.setUpdateTime(new Date()); int row = 0; if (strategyMapper.insert(strategy) > 0) { for (JdPriceStrategyLineDto lineDto : record.getStrategy()) { JdPriceStrategyLine line = BeansUtils.copyProperties(lineDto, JdPriceStrategyLine.class); line.setStrategyId(strategy.getId()); line.setUpdateTime(new Date()); line.setCreateTime(new Date()); row = row +strategyLineMapper.insert(line); } if (row == record.getStrategy().size()) { return Response.succ(); } } } catch (Exception e) { e.printStackTrace(); } strategyMapper.delete(strategy.getId()); strategyLineMapper.deletes(strategy.getId()); return Response.fail("操作失败"); } @Override public JSONObject getStrategyById(Long id) { JdPriceStrategy strategy = strategyMapper.getStrategyById(id); JdPriceStrategyDto dto = BeansUtils.copyProperties(strategy, JdPriceStrategyDto.class); if (dto == null) { Response.succ(); } List<JdPriceStrategyLine> lines = strategyLineMapper.getStrategyLine(strategy.getId()); List<JdPriceStrategyLineDto> lineDtos = BeansUtils.copyArrayProperties(lines, JdPriceStrategyLineDto.class); dto.setStrategy(lineDtos); return Response.succ(dto); } @Override public JSONObject getStrategyList(JdPriceStrategyReq record) { JSONObject jsonObject = new JSONObject(); record.setPage(record.getPage() > 0 ? (record.getPage() - 1) * record.getPageSize() : 0); List<JdPriceStrategy> list = strategyMapper.getStrategyList(record); List<JdPriceStrategyDto> dtoList = BeansUtils.copyArrayProperties(list, JdPriceStrategyDto.class); for (JdPriceStrategyDto dto : dtoList) { List<JdPriceStrategyLine> lines = strategyLineMapper.getStrategyLine(dto.getId()); List<JdPriceStrategyLineDto> lineDtos = BeansUtils.copyArrayProperties(lines, JdPriceStrategyLineDto.class); dto.setStrategy(lineDtos); } Integer row = strategyMapper.getStrategyListCount(record); jsonObject.put("list", dtoList); jsonObject.put("count", row); return jsonObject; } @Override public JSONObject update(JdPriceStrategyDto record, String userName) { if (strategyMapper.getStrategyById(record.getId()) == null) { return Response.fail("调价策略不存在"); } record.setUpdateTime(new Date()); JdPriceStrategy strategy = BeansUtils.copyProperties(record, JdPriceStrategy.class); strategy.setUpdateUser(userName); if (strategyMapper.update(strategy) < 1) { return Response.fail("操作失 败"); } strategyLineMapper.deletes(record.getId()); for (JdPriceStrategyLineDto lineDto : record.getStrategy()) { JdPriceStrategyLine line = BeansUtils.copyProperties(lineDto, JdPriceStrategyLine.class); line.setStrategyId(record.getId()); line.setUpdateTime(new Date()); strategyLineMapper.insert(line); } return Response.succ(); } }
[ "15070083409@163.com" ]
15070083409@163.com
61145df1e5a2ca5c7a0b28d2d63ac385902e923f
77e1b0b3f87d317736329c69d0bffe349167edd4
/spring-framework-5.1.x/spring-web/src/main/java/org/springframework/web/server/session/CookieWebSessionIdResolver.java
21b89fc8d2decb264c42371c9602cb451a306dc2
[ "Apache-2.0" ]
permissive
MayZhou/Java-Learn
2da5bfc0b4211949cb4e1ba3acd1a31bc1b1352e
485eccffe15e41cbd5356fd73d1d2ede12431c8e
refs/heads/master
2021-07-05T13:54:02.731321
2019-07-31T10:54:48
2019-07-31T10:54:48
193,471,320
0
0
Apache-2.0
2020-10-13T14:10:28
2019-06-24T09:05:01
Java
UTF-8
Java
false
false
4,244
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.server.session; import java.time.Duration; import java.util.Collections; import java.util.List; import java.util.function.Consumer; import java.util.stream.Collectors; import org.springframework.http.HttpCookie; import org.springframework.http.ResponseCookie; import org.springframework.lang.Nullable; import org.springframework.util.Assert; import org.springframework.util.MultiValueMap; import org.springframework.web.server.ServerWebExchange; /** * Cookie-based {@link WebSessionIdResolver}. * * @author Rossen Stoyanchev * @author Brian Clozel * @since 5.0 */ public class CookieWebSessionIdResolver implements WebSessionIdResolver { private String cookieName = "SESSION"; private Duration cookieMaxAge = Duration.ofSeconds(-1); @Nullable private Consumer<ResponseCookie.ResponseCookieBuilder> cookieInitializer = null; /** * Set the name of the cookie to use for the session id. * <p>By default set to "SESSION". * @param cookieName the cookie name */ public void setCookieName(String cookieName) { Assert.hasText(cookieName, "'cookieName' must not be empty"); this.cookieName = cookieName; } /** * Return the configured cookie name. */ public String getCookieName() { return this.cookieName; } /** * Set the value for the "Max-Age" attribute of the cookie that holds the * session id. For the range of values see {@link ResponseCookie#getMaxAge()}. * <p>By default set to -1. * @param maxAge the maxAge duration value */ public void setCookieMaxAge(Duration maxAge) { this.cookieMaxAge = maxAge; } /** * Return the configured "Max-Age" attribute value for the session cookie. */ public Duration getCookieMaxAge() { return this.cookieMaxAge; } /** * Add a {@link Consumer} for a {@code ResponseCookieBuilder} that will be invoked * for each cookie being built, just before the call to {@code builder()}. * @param initializer consumer for a cookie builder * @since 5.1 */ public void addCookieInitializer(Consumer<ResponseCookie.ResponseCookieBuilder> initializer) { this.cookieInitializer = this.cookieInitializer != null ? this.cookieInitializer.andThen(initializer) : initializer; } @Override public List<String> resolveSessionIds(ServerWebExchange exchange) { MultiValueMap<String, HttpCookie> cookieMap = exchange.getRequest().getCookies(); List<HttpCookie> cookies = cookieMap.get(getCookieName()); if (cookies == null) { return Collections.emptyList(); } return cookies.stream().map(HttpCookie::getValue).collect(Collectors.toList()); } @Override public void setSessionId(ServerWebExchange exchange, String id) { Assert.notNull(id, "'id' is required"); ResponseCookie cookie = initSessionCookie(exchange, id, getCookieMaxAge()); exchange.getResponse().getCookies().set(this.cookieName, cookie); } @Override public void expireSession(ServerWebExchange exchange) { ResponseCookie cookie = initSessionCookie(exchange, "", Duration.ZERO); exchange.getResponse().getCookies().set(this.cookieName, cookie); } private ResponseCookie initSessionCookie( ServerWebExchange exchange, String id, Duration maxAge) { ResponseCookie.ResponseCookieBuilder cookieBuilder = ResponseCookie.from(this.cookieName, id) .path(exchange.getRequest().getPath().contextPath().value() + "/") .maxAge(maxAge) .httpOnly(true) .secure("https".equalsIgnoreCase(exchange.getRequest().getURI().getScheme())) .sameSite("Lax"); if (this.cookieInitializer != null) { this.cookieInitializer.accept(cookieBuilder); } return cookieBuilder.build(); } }
[ "1252090579@qq.com" ]
1252090579@qq.com
1a0656256961a8f532623a373eeaa15a987a8d48
9711d10700b2a566274d2038bcf741e9f397f1f6
/src/main/java/com/musn/spstore/action/HealthAction.java
fd05fdfc4b1e5e81898f1988b53d0def9342898c
[ "Apache-2.0" ]
permissive
MSUNorg/FileStore
3e6287680e4792c64da1b6096ffbbb2b3e849da0
2d263f00e6f7528a82b6bdee2779bb66dde6ede1
refs/heads/master
2021-01-21T06:47:06.243839
2017-02-27T08:35:47
2017-02-27T08:35:47
83,285,221
0
0
null
null
null
null
UTF-8
Java
false
false
718
java
/* * Copyright 2015-2020 msun.com All right reserved. */ package com.musn.spstore.action; import com.lamfire.json.JSON; import com.lamfire.utils.DateFormatUtils; import com.lamfire.warden.Action; import com.lamfire.warden.ActionContext; import com.lamfire.warden.anno.ACTION; /** * @author zxc Jul 28, 2016 5:34:23 PM */ @ACTION(path = "/health") public class HealthAction implements Action { @Override public void execute(ActionContext context) { JSON json = new JSON(); json.put("status", 200); json.put("time", DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss:SSS")); context.writeResponse(json.toJSONString()); } }
[ "zhangxiongcai337@163.com" ]
zhangxiongcai337@163.com
7d990554a364ef793e42a4b8d9a7ac6c3a066cf7
27511a2f9b0abe76e3fcef6d70e66647dd15da96
/src/com/instagram/android/j/ek.java
797060fd15c808d04a7f38aef08d3186d4a2f430
[]
no_license
biaolv/com.instagram.android
7edde43d5a909ae2563cf104acfc6891f2a39ebe
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
refs/heads/master
2022-05-09T15:05:05.412227
2016-07-21T03:48:36
2016-07-21T03:48:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
290
java
package com.instagram.android.j; import com.instagram.share.a.n; import java.util.Comparator; final class ek implements Comparator<n> { ek(el paramel) {} } /* Location: * Qualified Name: com.instagram.android.j.ek * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
01e7b187bb37e1be082aa79016dac72a768bbd5c
6b27fec257cacb44308eb314529372a2aff6df4c
/java/spring/spring-orm-demo/src/main/java/com/revature/spring_orm/models/Student.java
d0848967f8898454ffd003f6ced7a0bb45120ac0
[]
no_license
210426-java-react-enterprise/demos
4c14f06d5de967f7bc204690779b475cba69d2ae
d80c10a254d41ab7e897d8dfc8664b37287a942a
refs/heads/main
2023-06-03T23:46:13.068920
2021-06-22T20:41:13
2021-06-22T20:41:13
362,165,109
0
1
null
2021-06-23T03:05:57
2021-04-27T15:39:22
Java
UTF-8
Java
false
false
1,545
java
package com.revature.spring_orm.models; import javax.persistence.*; @Entity @Table(name = "students") public class Student { @Id @Column(name = "student_id") @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; @Column(name = "first_name", nullable = false) private String firstName; @Column(name = "last_name", nullable = false) private String lastName; @Column(unique = true, nullable = false) private String email; public Student() { super(); } public Student(String firstName, String lastName, String email) { this.firstName = firstName; this.lastName = lastName; this.email = email; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } @Override public String toString() { return "Student{" + "id=" + id + ", firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + ", email='" + email + '\'' + '}'; } }
[ "wezley.singleton@gmail.com" ]
wezley.singleton@gmail.com
31fbdcb506bf635f590c347430a86c6355a487be
0bcaf44860273c56720a12648e1c8e2374fbd8fc
/src/core/keyChain/ActivationEvent.java
5e85e68a6b55599391c7addd2b7f6443f2854f56
[ "Apache-2.0" ]
permissive
ToThangGTVT/Repeat
7f8935803b81fe43e9459e55ecdb6d887cdb060c
4ca8ed83e6860d31999259abf462728e5cead0dd
refs/heads/master
2023-05-10T09:48:40.760441
2020-12-14T01:53:54
2020-12-14T01:53:54
323,235,983
0
0
Apache-2.0
2021-05-28T03:11:49
2020-12-21T05:06:27
null
UTF-8
Java
false
false
1,397
java
package core.keyChain; import core.userDefinedTask.internals.SharedVariablesEvent; public class ActivationEvent { public static enum EventType { UNKNOWN("unknown"), KEY_STROKE("key_stroke"), SHARED_VARIABLE("shared_variable"); private String value; private EventType(String value) { this.value = value; } @Override public String toString() { return value; } } private EventType type; private KeyStroke keyStroke; private SharedVariablesEvent variable; private ActivationEvent(KeyStroke keyStroke) { this.type = EventType.KEY_STROKE; this.keyStroke = keyStroke; } private ActivationEvent(SharedVariablesEvent variable) { this.type = EventType.SHARED_VARIABLE; this.variable = variable; } public static ActivationEvent of(KeyStroke keyStroke) { return new ActivationEvent(keyStroke); } public static ActivationEvent of(SharedVariablesEvent variable) { return new ActivationEvent(variable); } public EventType getType() { return type; } public KeyStroke getKeyStroke() { if (type != EventType.KEY_STROKE) { throw new IllegalStateException("Even is not key stroke but is type " + type + "."); } return keyStroke; } public SharedVariablesEvent getVariable() { if (type != EventType.SHARED_VARIABLE) { throw new IllegalStateException("Even is not shared variable but is type " + type + "."); } return variable; } }
[ "hptruong93@gmail.com" ]
hptruong93@gmail.com
19c186773970864b3753a89418a7e2ad088f7c44
3f3620a5542b0c51b69a26bb36934af256e9392e
/src/main/java/com/LeetCode/code/q824/NumberofLinesToWriteString/Solution.java
c1eac94283fb2473712016ccfc723e4317af5371
[]
no_license
dengxiny/LeetCode
f4b2122ba61076fa664dbb4a04de824a7be21bfd
66a8e937e57f9fa817e9bf5c5b0a2187851b0ab0
refs/heads/master
2022-06-24T01:40:27.339596
2019-09-24T07:19:41
2019-09-24T07:19:41
210,536,818
0
0
null
2020-10-13T16:15:41
2019-09-24T07:15:33
Java
UTF-8
Java
false
false
1,967
java
package com.LeetCode.code.q824.NumberofLinesToWriteString; /** * @QuestionId : 824 * @difficulty : Easy * @Title : Number of Lines To Write String * @TranslatedTitle:写字符串需要的行数 * @url : https://leetcode-cn.com/problems/number-of-lines-to-write-string/ * @TranslatedContent:我们要把给定的字符串 S 从左到右写到每一行上,每一行的最大宽度为100个单位,如果我们在写某个字母的时候会使这行超过了100 个单位,那么我们应该把这个字母写到下一行。我们给定了一个数组 widths ,这个数组 widths[0] 代表 &#39;a&#39; 需要的单位, widths[1] 代表 &#39;b&#39; 需要的单位,..., widths[25] 代表 &#39;z&#39; 需要的单位。 现在回答两个问题:至少多少行能放下S,以及最后一行使用的宽度是多少个单位?将你的答案作为长度为2的整数列表返回。 示例 1: 输入: widths = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10] S = "abcdefghijklmnopqrstuvwxyz" 输出: [3, 60] 解释: 所有的字符拥有相同的占用单位10。所以书写所有的26个字母, 我们需要2个整行和占用60个单位的一行。 示例 2: 输入: widths = [4,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10] S = "bbbcccdddaaa" 输出: [2, 4] 解释: 除去字母&#39;a&#39;所有的字符都是相同的单位10,并且字符串 "bbbcccdddaa" 将会覆盖 9 * 10 + 2 * 4 = 98 个单位. 最后一个字母 &#39;a&#39; 将会被写到第二行,因为第一行只剩下2个单位了。 所以,这个答案是2行,第二行有4个单位宽度。 注: 字符串 S 的长度在 [1, 1000] 的范围。 S 只包含小写字母。 widths 是长度为 26的数组。 widths[i] 值的范围在 [2, 10]。 */ class Solution { public int[] numberOfLines(int[] widths, String S) { } }
[ "dengxy@YFB-DENGXY.sumpay.local" ]
dengxy@YFB-DENGXY.sumpay.local
ee44f65b3de730af2b6848359115bdd15a787c03
3a6dd945a7d2a6923e37d671122a6edb491ac0f5
/src/util/UConexao.java
2223fa70834bc268499de381c3fbe335a4dc1eb6
[]
no_license
pedroLucasalves/SistemaComercial
d20b17bac3ff45a6a7cc0a77acba675c939bf06c
d0d1db681062ed7512df0387c7ec97b869366715
refs/heads/master
2021-08-22T18:15:43.520898
2017-11-30T21:32:39
2017-11-30T21:32:39
110,448,934
0
0
null
null
null
null
UTF-8
Java
false
false
1,398
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package util; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; /** * * @author Pedro */ public class UConexao { private static Connection conexao = null; private UConexao() { } public static synchronized Connection getConexao() throws IOException, ClassNotFoundException, Exception { try { if (conexao == null || conexao.isClosed()) { conexao = conectar(); } } catch (SQLException e) { System.out.println(e.getMessage()); e.printStackTrace(); } return conexao; } private static Connection conectar() throws IOException, ClassNotFoundException, Exception { try { Class.forName("oracle.jdbc.OracleDriver"); return DriverManager.getConnection("jdbc:oracle:thin:@" + UPropriedades.getProp("db.host") + ":1521:xe", UPropriedades.getProp("db.user"), UPropriedades.getProp("db.password")); } catch (Exception e) { throw e; } } }
[ "you@example.com" ]
you@example.com
cc080b2e548a8c4b4a832c0ba2b012409de40876
875d88ee9cf7b40c9712178d1ee48f0080fa0f8a
/geronimo-javamail_1.6_spec/src/main/java/javax/mail/search/MessageIDTerm.java
e8265025ebcecf49819e12be31c83b650a81c09d
[ "Apache-2.0", "W3C", "W3C-19980720" ]
permissive
jgallimore/geronimo-specs
b152164488692a7e824c73a9ba53e6fb72c6a7a3
09c09bcfc1050d60dcb4656029e957837f851857
refs/heads/trunk
2022-12-15T14:02:09.338370
2020-09-14T18:21:46
2020-09-14T18:21:46
284,994,475
0
1
Apache-2.0
2020-09-14T18:21:47
2020-08-04T13:51:47
Java
UTF-8
Java
false
false
1,869
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 javax.mail.search; import javax.mail.Message; import javax.mail.MessagingException; /** * @version $Rev$ $Date$ */ public final class MessageIDTerm extends StringTerm { private static final long serialVersionUID = -2121096296454691963L; public MessageIDTerm(final String id) { super(id); } @Override public boolean match(final Message message) { try { final String values[] = message.getHeader("Message-ID"); if (values != null) { for (int i = 0; i < values.length; i++) { final String value = values[i]; if (match(value)) { return true; } } } return false; } catch (final MessagingException e) { return false; } } @Override public boolean equals(final Object other) { if (!(other instanceof MessageIDTerm)) { return false; } return super.equals(other); } }
[ "jon@jrg.me.uk" ]
jon@jrg.me.uk
3dba0884e48c408f7d0ebb2b2de14015902688bf
90e0fd9a5986918db132b75e167d1e2c03940ad7
/src/main/java/me/rui/io/usage/BufferInputFile.java
0fbc03485ee26ab7b7a4061be59fdd68c1529e00
[]
no_license
ruicao93/deep-in-java
7f172b3f7918c147cf7e67279219e6f488586c04
74547a0b479ca561334ed11e38cc4f42fb7c216f
refs/heads/master
2021-06-17T03:45:32.453263
2017-06-16T12:54:00
2017-06-16T12:54:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,738
java
package me.rui.io.usage; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.Arrays; /** * Created by caorui on 2017/6/4. */ public class BufferInputFile { public static String read(String fileName) throws IOException { BufferedReader reader = new BufferedReader(new FileReader(fileName)); String str; StringBuilder sb = new StringBuilder(); while((str = reader.readLine()) != null){ sb.append(str); sb.append("\r\n"); } return sb.toString(); } public static void main(String[] args) throws IOException{ String path = System.getenv("PATH"); System.out.println("Env.PATH:" + path); String classPathEnv = System.getenv("CLASSPATH"); System.out.println("Env.CLASSPATH:" + classPathEnv); String usrDir = System.getProperty("user.dir"); System.out.println("User dir: " + usrDir); File file = new File("."); String[] fileList = file.list(); System.out.println(Arrays.asList(fileList));Thread.currentThread().getId(); ClassLoader classLoader = BufferInputFile.class.getClassLoader(); String classRootPath = classLoader.getResource("").getPath(); System.out.println("Class root path:" + classRootPath); String curClassPath = BufferInputFile.class.getResource("").getPath(); System.out.println("Current class path:" + curClassPath); String fileName = classLoader.getResource("io/usage/BufferInputFile.txt").getPath(); System.out.println("File absolutely path:" + fileName); System.out.println(read(fileName)); } }
[ "704645806@qq.com" ]
704645806@qq.com
72fe5cf3ed9acaf5f7d7aab60b8df2e97b5ab5ae
d6fcbf4c5fd3adac8702f5e57530329e7144efd7
/corejava/Lang Pack/langpac/src/p695/Lab695.java
45c0439320c65226b7e2d96d216364c6e981160b
[]
no_license
prabhatsingh2408/jlc
6d46c5556a999c9a83aec869a6381bf723ee867a
213bf35bb25cff69bc03bb4f488723678ccfd784
refs/heads/master
2021-01-20T18:58:06.596400
2016-07-04T09:04:13
2016-07-04T09:04:13
62,547,129
0
0
null
null
null
null
UTF-8
Java
false
false
434
java
package p695; public class Lab695 { public static void main(String[] args) { Runtime rt=null; //rt=new Runtime(); System.out.println(Runtime.getRuntime()); System.out.println(Runtime.getRuntime()); rt=Runtime.getRuntime(); System.out.println("A P :" + rt.availableProcessors()); System.out.println("M M :" + rt.maxMemory()); System.out.println("T M :" + rt.totalMemory()); System.out.println("F M :" + rt.freeMemory()); } }
[ "prabhatsingh2408@gmail.com" ]
prabhatsingh2408@gmail.com
936de5362d14f3682ef978598cf34500eb4a41a8
16f282c2166176326f44d6f234cc3378c3ad7d7c
/HibernateSpringBootPessimisticLocks/src/main/java/com/bookstore/service/BookstoreService.java
0dc1d51f2fa8e036bf936de9939c2e78bad41ce4
[ "Apache-2.0" ]
permissive
rzbrth/Hibernate-SpringBoot
78ad0b764764aff74ad95a7c0dd1aa6b611fea1b
e91e1e0b2c8f2129fa0b9559701ac94ca68206af
refs/heads/master
2020-12-13T05:59:51.024153
2020-01-15T16:38:39
2020-01-15T16:38:39
234,330,053
1
0
Apache-2.0
2020-01-16T13:47:45
2020-01-16T13:47:44
null
UTF-8
Java
false
false
2,181
java
package com.bookstore.service; import com.bookstore.entity.Author; import com.bookstore.repository.AuthorRepository; import java.util.logging.Logger; import org.springframework.stereotype.Service; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.support.TransactionCallbackWithoutResult; import org.springframework.transaction.support.TransactionTemplate; @Service public class BookstoreService { private static final Logger log = Logger.getLogger(BookstoreService.class.getName()); private final TransactionTemplate template; private final AuthorRepository authorRepository; public BookstoreService(AuthorRepository authorRepository, TransactionTemplate template) { this.authorRepository = authorRepository; this.template = template; } public void pessimisticReadWrite() { template.setPropagationBehavior( TransactionDefinition.PROPAGATION_REQUIRES_NEW); template.setTimeout(3); // 3 seconds template.execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult( TransactionStatus status) { log.info("Starting first transaction ..."); Author author = authorRepository.findById(1L).orElseThrow(); template.execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult( TransactionStatus status) { log.info("Starting second transaction ..."); Author author = authorRepository.findById(1L).orElseThrow(); author.setGenre("Horror"); log.info("Commit second transaction ..."); } }); log.info("Resuming first transaction ..."); log.info("Commit first transaction ..."); } }); log.info("Done!"); } }
[ "leoprivacy@yahoo.com" ]
leoprivacy@yahoo.com
407a22dd61467790424d09b72da2ab912529dbaf
8f322f02a54dd5e012f901874a4e34c5a70f5775
/src/main/java/PTUCharacterCreator/Moves/Grasswhistle.java
2a17b6dce6892985b72266bb53cc5d315e530dc3
[]
no_license
BMorgan460/PTUCharacterCreator
3514a4040eb264dec69aee90d95614cb83cb53d8
e55f159587f2cb8d6d7b456e706f910ba5707b14
refs/heads/main
2023-05-05T08:26:04.277356
2021-05-13T22:11:25
2021-05-13T22:11:25
348,419,608
0
0
null
null
null
null
UTF-8
Java
false
false
351
java
package PTUCharacterCreator.Moves; import PTUCharacterCreator.Move; public class Grasswhistle extends Move { { name = "Grasswhistle"; effect = "The target falls Asleep."; damageBase = 0; mDamageBase = 0; AC = 6; frequency = "Scene x2"; range = "6, 1 Target, Sonic"; type = "Grass"; category = "Status"; } public Grasswhistle(){} }
[ "alaskablake460@gmail.com" ]
alaskablake460@gmail.com
c29cb0d7e1a3a8c1b80dffe00f429c7be342e958
f140d489a1d5bb0e5221b7ef72b1b8d1441c7834
/thrift/compiler/test/fixtures/basic-annotations/gen-swift/test/fixtures/basicannotations/MyServicePrioChildClientImpl.java
b614d55956343ee3ffa0d76b25f80995f7ade869
[ "Apache-2.0" ]
permissive
terrorizer1980/fbthrift
aa9ebacfb97de312fc05a903d75dfe36fb48a6a3
9fe9e1ed327e9480e5aeb63d84cb5e00adf97b21
refs/heads/master
2023-04-10T19:11:13.606785
2020-08-16T05:10:56
2020-08-17T03:22:12
288,077,464
0
0
Apache-2.0
2023-04-04T00:05:10
2020-08-17T03:46:11
null
UTF-8
Java
false
false
668
java
/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package test.fixtures.basicannotations; import com.facebook.swift.codec.*; import com.facebook.swift.service.*; import java.io.*; import java.util.*; @SwiftGenerated public class MyServicePrioChildClientImpl extends test.fixtures.basicannotations.MyServicePrioParentClientImpl implements MyServicePrioChild { @Override public void close() { throw new RuntimeException("No implemented"); } @Override public void pang() throws org.apache.thrift.TException { throw new UnsupportedOperationException(); } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
cacf42c4b66de348083bfdd73450ee1889cd2cd1
cf0f34937b476ecde5ebcca7e2119bcbb27cfbf2
/src/com/huateng/po/CstSysParamPK.java
7c97c12c462ac7a0abb93025a8746a52fb28d948
[]
no_license
Deron84/xxxTest
b5f38cc2dfe3fe28b01634b58b1236b7ec5b4854
302b807f394e31ac7350c5c006cb8dc334fc967f
refs/heads/master
2022-02-01T03:32:54.689996
2019-07-23T11:04:09
2019-07-23T11:04:09
198,212,201
0
0
null
null
null
null
UTF-8
Java
false
false
2,105
java
package com.huateng.po; import java.io.Serializable; public class CstSysParamPK implements Serializable { private static final long serialVersionUID = 1L; protected int hashCode = Integer.MIN_VALUE; private java.lang.String owner; private java.lang.String key; /** * @param owner2 * @param key2 */ public CstSysParamPK(String owner, String key) { this.owner = owner; this.key = key; } /** * */ public CstSysParamPK() {} /** * Return the value associated with the column: OWNER */ public java.lang.String getOwner () { return owner; } /** * Set the value related to the column: OWNER * @param owner the OWNER value */ public void setOwner (java.lang.String owner) { this.owner = owner; } /** * Return the value associated with the column: OWNER_KEY */ public java.lang.String getKey () { return key; } /** * Set the value related to the column: OWNER_KEY * @param key the OWNER_KEY value */ public void setKey (java.lang.String key) { this.key = key; } public boolean equals (Object obj) { if (null == obj) return false; if (!(obj instanceof com.huateng.po.CstSysParamPK)) return false; else { com.huateng.po.CstSysParamPK mObj = (com.huateng.po.CstSysParamPK) obj; if (null != this.getOwner() && null != mObj.getOwner()) { if (!this.getOwner().equals(mObj.getOwner())) { return false; } } else { return false; } if (null != this.getKey() && null != mObj.getKey()) { if (!this.getKey().equals(mObj.getKey())) { return false; } } else { return false; } return true; } } public int hashCode () { if (Integer.MIN_VALUE == this.hashCode) { StringBuilder sb = new StringBuilder(); if (null != this.getOwner()) { sb.append(this.getOwner().hashCode()); sb.append(":"); } else { return super.hashCode(); } if (null != this.getKey()) { sb.append(this.getKey().hashCode()); sb.append(":"); } else { return super.hashCode(); } this.hashCode = sb.toString().hashCode(); } return this.hashCode; } }
[ "weijx@inspur.com" ]
weijx@inspur.com
e9d17c897f8d84b9f0ebd12f675976d262af24d3
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/29/29_705deea88683670e29532bfb19ad9dc187305b12/StatisicActivity/29_705deea88683670e29532bfb19ad9dc187305b12_StatisicActivity_t.java
04330367d8560e2f72cbae4ec8c02414ea21acb1
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
7,554
java
package com.example.tomatroid; import java.util.ArrayList; import org.joda.time.DateMidnight; import org.joda.time.DateTime; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import com.example.tomatroid.digram.BarChart; import com.example.tomatroid.digram.LineChart; import com.example.tomatroid.digram.PieChart; import com.example.tomatroid.sql.SQHelper; import com.example.tomatroid.util.NavigationBarManager; import com.example.tomatroid.util.StoredAnimation; import android.os.Bundle; import android.app.Activity; import android.content.Context; import android.database.Cursor; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; import android.widget.ArrayAdapter; import android.widget.CursorAdapter; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.TableLayout; import android.widget.TextView; import android.widget.ViewFlipper; public class StatisicActivity extends Activity { final int ACTIVITYNUMBER = 1; LinearLayout overview; ViewFlipper statistic_flipper; ImageButton prev; LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); LayoutParams barParams = new TableLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1f); SQHelper sqHelper = new SQHelper(this); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_statictic); NavigationBarManager navi = new NavigationBarManager(this, ACTIVITYNUMBER); overview = (LinearLayout) findViewById(R.id.statistic_overview); statistic_flipper = (ViewFlipper) findViewById(R.id.statistic_flipper); statistic_flipper.setAnimateFirstView(false); prev = (ImageButton) findViewById(R.id.statistic_prev); prev.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { statistic_flipper.setAnimation(StoredAnimation .inFromRightAnimation(1)); statistic_flipper.showPrevious(); Log.e("Image Button", "clicked"); } }); // Pomodoro Overview int[] pomodoroInfoArray = sqHelper.getTotalCountTimeDays( new int[] { SQHelper.TYPE_POMODORO }, new int[] {}); TextView pomodoroCount = (TextView) findViewById(R.id.statistic_pomodoroCount); pomodoroCount.setText("" + pomodoroInfoArray[0]); TextView pomodoroInfo = (TextView) findViewById(R.id.statistic_pomodoroInfo); pomodoroInfo.setText(prepareInfoText(pomodoroInfoArray)); // Long Break Overview int[] breakInfoArray = sqHelper.getTotalCountTimeDays(new int[] { SQHelper.TYPE_LONGBREAK, SQHelper.TYPE_SHORTBREAK }, new int[] {}); TextView breakCount = (TextView) findViewById(R.id.statistic_breakCount); breakCount.setText("" + breakInfoArray[0]); TextView breakInfo = (TextView) findViewById(R.id.statistic_breakInfo); breakInfo.setText(prepareInfoText(breakInfoArray)); // Sleep Overview int[] sleepInfoArray = sqHelper.getTotalCountTimeDays( new int[] { SQHelper.TYPE_SLEEPING }, new int[] {}); TextView sleepCount = (TextView) findViewById(R.id.statistic_sleepCount); sleepCount.setText("" + sleepInfoArray[0]); TextView sleepInfo = (TextView) findViewById(R.id.statistic_sleepInfo); sleepInfo.setText(prepareInfoText(sleepInfoArray)); // Theme List Overview ArrayList<String> valueList = new ArrayList<String>(); Cursor c = sqHelper.getThemeCursor(); if (c.moveToFirst()) { do { valueList.add(c.getString(c.getColumnIndex(SQHelper.KEY_NAME))); } while (c.moveToNext()); } c.close(); ListView themelist = (ListView) findViewById(R.id.statistic_themelist); themelist.setAdapter(new ThemeListAdapter(getApplicationContext(), R.layout.theme_statistic_list_row, R.id.themeText, valueList)); int[] barValues = new int[] { 3, 10, 4, 5, 6, 7, 8 }; BarChart multiBar = new BarChart(this, barValues); statistic_flipper.addView(multiBar); int[][] barValues1 = new int[][] { new int[] { 3, 10, 4, 5, 6, 7, 8 }, new int[] { 3, 3, 3, 3, 3, 3, 3 }, new int[] { 1, 1, 1, 1, 1, 1, 1 }, }; String[] axisLables = new String[]{ "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"}; String[] lineNames = new String[]{ "Pomodoro", "Breaks", "Sleep"}; LineChart multiline = new LineChart(this, barValues1, axisLables, lineNames); statistic_flipper.addView(multiline); // float values[] = { 3456, 5734, 5735, 5477, 9345, 3477 }; // PieChart pie = new PieChart(this, values); // overview.addView(pie, 0, barParams); // themelist.addView(pie); // // TextView t1 = new TextView(this); // t1.setText("Total Pomodoro"); // overview.addView(t1, params); } @Override protected void onResume() { super.onResume(); getActionBar().setSelectedNavigationItem(ACTIVITYNUMBER); } public String prepareInfoText(int[] array) { if (array[2] != 0) { return array[1] + " mins\n" + array[0] / array[2] + " per Day\n(over " + array[2] + " days)"; } else { return "Keine Informationen"; } } class ThemeListAdapter extends ArrayAdapter<String> { ArrayList<String> values; public ThemeListAdapter(Context context, int layoutViewResourceId, int textViewResourceId, ArrayList<String> values) { super(context, layoutViewResourceId, textViewResourceId, values); this.values = values; } int rank = 1; @Override public View getView(int position, View v, ViewGroup parent) { LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.theme_statistic_list_row, null); // Log.e("Statistic Theme Adapter", "getCalled"); // Log.e("Statistic Theme Adapter", "position " +position); // Log.e("Statistic Theme Adapter", "value " +values.get(position)); int themeId = sqHelper.getTheme(values.get(position)); TextView rankText = (TextView) v.findViewById(R.id.rankText); rankText.setText("" + rank); rankText.append(". "); int[] themeInfo = sqHelper.getTotalCountTimeDays(new int[] {}, new int[] { themeId }); TextView infoText = (TextView) v.findViewById(R.id.infoText); infoText.setText(prepareInfoText(themeInfo)); // getTotalCountTimeDays(int[] types, int[] themes, int[] date) // int[] barValues = new int[] { 3, 10, 4, 5, 6, 7, 8 }; DateMidnight dm = new DateMidnight(); dm = dm.minusDays(7); int[] barValues = new int[7]; for(int i=0; i<7;i++){ dm = dm.plusDays(1); int[] date = new int[3]; date[0] = dm.getDayOfMonth(); date[1] = dm.getMonthOfYear(); date[2] = dm.getYear(); int[] answer = sqHelper.getTotalCountTimeDays(new int[]{}, new int[]{themeId}, date); barValues[i] = answer[1]; // Log.e("Statistic Theme Adapter", "theme " +themeId+ " barvalue " +answer[1]); } BarChart bars = new BarChart(getContext(), barValues); // LinearLayout ll = (LinearLayout) v.findViewById(R.id.infoLayout); // ll.addView(bars, 100, 100); BarChart bars2 = (BarChart) v.findViewById(R.id.barChart); bars2.setValues(barValues); rank++; return super.getView(position, v, parent); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7da9468429a88f9e9fa60d767c9dd578e94091fc
7caa3c92020e6fa0546fe6909f3c607df5243306
/net/minecraft/client/gui/inventory/GuiScreenHorseInventory.java
689b549eab5bdb505bb6c3c1f6c0ae046b1cd2e9
[]
no_license
mengdexiu/mcp
47f70170b9b27aa23c2ef3d0bfbca5e9378f9cc5
17928367a180368edb46995830c7cb12c4822e9c
refs/heads/master
2021-06-05T15:00:49.835191
2016-06-19T12:42:55
2016-06-19T12:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,051
java
package net.minecraft.client.gui.inventory; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.inventory.ContainerHorseInventory; import net.minecraft.inventory.IInventory; import net.minecraft.util.ResourceLocation; public class GuiScreenHorseInventory extends GuiContainer { private static final ResourceLocation HORSE_GUI_TEXTURES = new ResourceLocation("textures/gui/container/horse.png"); /** The player inventory bound to this GUI. */ private IInventory playerInventory; /** The horse inventory bound to this GUI. */ private IInventory horseInventory; /** The EntityHorse whose inventory is currently being accessed. */ private EntityHorse horseEntity; /** The mouse x-position recorded during the last rendered frame. */ private float mousePosx; /** The mouse y-position recorded during the last renderered frame. */ private float mousePosY; public GuiScreenHorseInventory(IInventory playerInv, IInventory horseInv, EntityHorse horse) { super(new ContainerHorseInventory(playerInv, horseInv, horse, Minecraft.getMinecraft().thePlayer)); this.playerInventory = playerInv; this.horseInventory = horseInv; this.horseEntity = horse; this.allowUserInput = false; } /** * Draw the foreground layer for the GuiContainer (everything in front of the items) */ protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { this.fontRendererObj.drawString(this.horseInventory.getDisplayName().getUnformattedText(), 8, 6, 4210752); this.fontRendererObj.drawString(this.playerInventory.getDisplayName().getUnformattedText(), 8, this.ySize - 96 + 2, 4210752); } /** * Draws the background layer of this container (behind the items). */ protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(HORSE_GUI_TEXTURES); int i = (this.width - this.xSize) / 2; int j = (this.height - this.ySize) / 2; this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize); if (this.horseEntity.isChested()) { this.drawTexturedModalRect(i + 79, j + 17, 0, this.ySize, 90, 54); } if (this.horseEntity.getType().isHorse()) { this.drawTexturedModalRect(i + 7, j + 35, 0, this.ySize + 54, 18, 18); } GuiInventory.drawEntityOnScreen(i + 51, j + 60, 17, (float)(i + 51) - this.mousePosx, (float)(j + 75 - 50) - this.mousePosY, this.horseEntity); } /** * Draws the screen and all the components in it. */ public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.mousePosx = (float)mouseX; this.mousePosY = (float)mouseY; super.drawScreen(mouseX, mouseY, partialTicks); } }
[ "bourguematthieu@gmail.com" ]
bourguematthieu@gmail.com
ede5c06c71211634f0de1a25464fdfc4a86ea5e8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_07f2bcc0f34f3406b05fbb4322535753c9e09723/FIXTransportListener/5_07f2bcc0f34f3406b05fbb4322535753c9e09723_FIXTransportListener_s.java
95897a1533b2532ff9fb8c3873bce1b2bf27f0c3
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,029
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.synapse.transport.fix; import org.apache.axis2.AxisFault; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.description.AxisService; import org.apache.axis2.description.TransportInDescription; import org.apache.axis2.transport.base.AbstractTransportListener; /** * The FIX transport listener implementation. A FIX Transport Listner will hold * a FIX session factory, which would be created at initialization * time. This implementation supports the creation of FIX sessions at runtime * as and when required. This FIX Listener registers with Axis to be notified * of service deployment/undeployment/start/stop, and enables or disables * listening for FIX messages on the destinations as appropriate. * <p/> * Service must state where the FIX configuration file is located so * that the required FIX sessions can be initialized for the service. * FIX configuration file should be a valid Quickfix/J session * configuration file. A URL to the file should be provided. * <p/> * <parameter name="transport.fix.AcceptorConfigURL"> * http://www.mycompany.org/fixconfig/file.cfg</parameter> */ public class FIXTransportListener extends AbstractTransportListener { /** * The FIXSessionFactory takes care of creating and managing all the * FIX sessions. */ private FIXSessionFactory fixSessionFactory; /** * This is the TransportListener initialization method invoked by Axis2 * * @param cfgCtx the Axis configuration context * @param trpInDesc the TransportIn description */ public void init(ConfigurationContext cfgCtx, TransportInDescription trpInDesc) throws AxisFault { super.init(cfgCtx, trpInDesc); //initialize the FIXSessionFactory fixSessionFactory = new FIXSessionFactory( new FIXApplicationFactory(this.cfgCtx, this.workerPool)); FIXTransportSender sender = (FIXTransportSender) cfgCtx. getAxisConfiguration().getTransportOut(FIXConstants.TRANSPORT_NAME).getSender(); if (sender != null) { sender.setSessionFactory(fixSessionFactory); } log.info("FIX transport listener initialized..."); } /** * Prepare to listen for FIX messages on behalf of the given service * by first creating and starting a FIX session * * @param service the service for which to listen for messages */ protected void startListeningForService(AxisService service) { try { fixSessionFactory.createFIXAcceptor(service); fixSessionFactory.createFIXInitiator(service); } catch (AxisFault axisFault) { disableTransportForService(service); } } /** * Stops listening for messages for the service thats undeployed or stopped * by stopping and disposing the appropriate FIX session * * @param service the service that was undeployed or stopped */ protected void stopListeningForService(AxisService service) { fixSessionFactory.disposeFIXAcceptor(service); } /** * Returns EPRs for the given service and IP over the FIX transport * * @param serviceName service name * @param ip ignored * @return the EPR for the service * @throws AxisFault */ public EndpointReference[] getEPRsForService(String serviceName, String ip) throws AxisFault { //Try to get the list of EPRs from the FIXSessionFactory String[] serviceEPRStrings = fixSessionFactory.getServiceEPRs(serviceName, ip); if (serviceEPRStrings != null) { EndpointReference[] serviceEPRs = new EndpointReference[serviceEPRStrings.length]; for (int i = 0; i < serviceEPRStrings.length; i++) { serviceEPRs[i] = new EndpointReference(serviceEPRStrings[i]); } return serviceEPRs; } throw new AxisFault("Unable to get EPRs for the service " + serviceName); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
100516d919556f838588b1fa21741784e518174f
329cb0a92db016e4815168e490d43a9e7dd7bbed
/xs-rongly-framework-build/xs-rongly-framework-dependencies/xs-rongly-framework-staters/xs-rongly-framework-stater-security/src/main/java/com/xs/rongly/framework/stater/security/spring/security/core/code/ValidateCodeSecurityConfig.java
d7531653812091fe84fd1fb7039851b4dbb04bff
[]
no_license
angiely1115/rongly-framework
50bf524637cc3a803d0cd7eff5e6dcd045d5d10b
3e9be9c366dfbd311bdd937ec2013610de8b5a5b
refs/heads/master
2022-12-25T00:22:19.687148
2019-11-13T08:40:14
2019-11-13T08:40:14
160,496,386
1
0
null
2022-12-15T23:23:54
2018-12-05T09:50:19
Java
UTF-8
Java
false
false
1,016
java
/** * */ package com.xs.rongly.framework.stater.security.spring.security.core.code; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.config.annotation.SecurityConfigurerAdapter; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.web.DefaultSecurityFilterChain; import org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter; import org.springframework.stereotype.Component; import javax.servlet.Filter; /** * 校验码相关安全配置 * * @author zhailiang * */ //@Component("validateCodeSecurityConfig") public class ValidateCodeSecurityConfig extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity> { @Autowired private Filter validateCodeFilter; @Override public void configure(HttpSecurity http) throws Exception { http.addFilterBefore(validateCodeFilter, AbstractPreAuthenticatedProcessingFilter.class); } }
[ "lvrongzhuan@cnhnkj.com" ]
lvrongzhuan@cnhnkj.com
f13265f989b7e9eea14d1c4974ee8984cc5b5283
a36dce4b6042356475ae2e0f05475bd6aed4391b
/2005/common/com/hps/july/config/model/ReportConfig2AttrVO.java
a62c0d293c6381ea0140d371df6a4a6747bae063
[]
no_license
ildar66/WSAD_NRI
b21dbee82de5d119b0a507654d269832f19378bb
2a352f164c513967acf04d5e74f36167e836054f
refs/heads/master
2020-12-02T23:59:09.795209
2017-07-01T09:25:27
2017-07-01T09:25:27
95,954,234
0
1
null
null
null
null
UTF-8
Java
false
false
592
java
package com.hps.july.config.model; import java.io.Serializable; import java.math.BigDecimal; public class ReportConfig2AttrVO implements Serializable { private String attribute; private String value; public ReportConfig2AttrVO() { super(); } /** * @return */ public String getAttribute() { return attribute; } /** * @return */ public String getValue() { return value; } /** * @param string */ public void setAttribute(String string) { attribute = string; } /** * @param string */ public void setValue(String string) { value = string; } }
[ "ildar66@inbox.ru" ]
ildar66@inbox.ru
c545a234c45affd3d2b747438860adc4c5fd6253
da15d8dedb4c80d148c0cc85387ca4a9665cfed4
/chrome/browser/feed/android/junit/src/org/chromium/chrome/browser/feed/followmanagement/FollowManagementMediatorTest.java
2cca981162ed02c61be068993d33316308bf4853
[ "BSD-3-Clause" ]
permissive
stella2021g/chromium
97c167a20c4310bff0b7248cededff34bcbea143
ab84a9137146741cf19a8df887eb68b6ab37757a
refs/heads/master
2023-05-06T23:09:12.746471
2021-06-17T16:14:34
2021-06-17T16:14:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,492
java
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.feed.followmanagement; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.notNull; import static org.mockito.Mockito.verify; import android.app.Activity; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.robolectric.Robolectric; import org.chromium.base.test.util.JniMocker; import org.chromium.chrome.browser.feed.webfeed.WebFeedBridge; import org.chromium.chrome.browser.feed.webfeed.WebFeedBridgeJni; import org.chromium.components.favicon.LargeIconBridge; import org.chromium.testing.local.LocalRobolectricTestRunner; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.SimpleRecyclerViewAdapter; /** * Tests {@link FollowManagementMediator}. */ @RunWith(LocalRobolectricTestRunner.class) public class FollowManagementMediatorTest { private Activity mActivity; private ModelList mModelList; private FollowManagementMediator mFollowManagementMediator; private LargeIconBridge mLargeIconBridge; @Rule public JniMocker mocker = new JniMocker(); @Mock WebFeedBridge.Natives mWebFeedBridgeJni; @Mock SimpleRecyclerViewAdapter mAdapter; // Stub LargeIconBridge that always returns false. private class TestLargeIconBridge extends LargeIconBridge { @Override public boolean getLargeIconForStringUrl( final String pageUrl, int desiredSizePx, final LargeIconCallback callback) { return false; } } @Before public void setUpTest() { mActivity = Robolectric.setupActivity(Activity.class); MockitoAnnotations.initMocks(this); mLargeIconBridge = new TestLargeIconBridge(); mocker.mock(WebFeedBridgeJni.TEST_HOOKS, mWebFeedBridgeJni); mFollowManagementMediator = new FollowManagementMediator(mActivity, mModelList, mAdapter, mLargeIconBridge); // WebFeedBridge.refreshFollowedWebFeeds() gets called once with non-null pointer to a // callback. verify(mWebFeedBridgeJni).refreshSubscriptions(notNull()); } @Test public void testConstruction() { assertTrue(true); } }
[ "chromium-scoped@luci-project-accounts.iam.gserviceaccount.com" ]
chromium-scoped@luci-project-accounts.iam.gserviceaccount.com
339435fef7f78f81f3eba49dcb0fc14b0971f55e
4fc6ffad8193b9509194386da6d5a787f1e6e934
/atcrowdfunding-portal-boot/src/main/java/com/atguigu/atcrowdfunding/service/impl/SendVerificationCodeImpl.java
40a98546fda88d0d3826dfd9345fe5b25c380a86
[]
no_license
yang123456/atcrowdfunding
10e55bcfa547d58ebebf3c4d0e78c060a1761642
24fac4bc929e578cae56729532b173780084c6dd
refs/heads/master
2022-12-25T04:05:05.093207
2020-06-08T08:46:12
2020-06-08T08:46:12
194,290,499
0
0
null
2022-12-16T07:25:58
2019-06-28T14:51:31
JavaScript
UTF-8
Java
false
false
1,714
java
package com.atguigu.atcrowdfunding.service.impl; import org.springframework.stereotype.Service; import com.atguigu.atcrowdfunding.cache.CodeCache; import com.atguigu.atcrowdfunding.service.SendVerificationCode; @Service public class SendVerificationCodeImpl implements SendVerificationCode{ /** * 保存验证码进缓存 备注:验证码的缓存是设置了过期时间的(1min), * 若“该手机号首次进入”或“该手机号对应的缓存已经过期”,此时调用“cache.get(key)”方法会抛出异常, * 此时需要保存手机号,验证码进缓存,返回true; * 若不抛出异常,则说明该缓存正处于有效期,用户在1min内重复请求发送验证码,无需保存进缓存,返回false * * @param phone 手机号 * @param verificationCode 验证码 * @return 是否成功保存手机号、验证码进缓存 */ @Override public boolean saveVerificationCode(String phone, String verificationCode) { CodeCache codeCache = CodeCache.getInstance(); try { codeCache.getValue(phone); // 若不报异常,说明已存在该缓存,且未过期,说明在1min内重复请求了 return false; } catch (Exception e) { // 当缓存过期或没有时,取值会报异常,说明此时可将验证码存入缓存 codeCache.put(phone, verificationCode); return true; } } @Override public String queryVerificationCode(String phone) { CodeCache codeCache = CodeCache.getInstance(); String value = null; // value = (String) codeCache.getValue(phone); value = (String) codeCache.getValueOfDefault(phone, "没有对应的code"); return value; } }
[ "763216917@qq.com" ]
763216917@qq.com
e55ed9d9c2f700e8d24af62d3f1677d3634aeff2
647eef4da03aaaac9872c8b210e4fc24485e49dc
/TestMemory/admobapk/src/main/java/nu.java
42569ab3a019d820eab9879f7b06c9b098fa53ba
[]
no_license
AlbertSnow/git_workspace
f2d3c68a7b6e62f41c1edcd7744f110e2bf7f021
a0b2cd83cfa6576182f440a44d957a9b9a6bda2e
refs/heads/master
2021-01-22T17:57:16.169136
2016-12-05T15:59:46
2016-12-05T15:59:46
28,154,580
1
1
null
null
null
null
UTF-8
Java
false
false
158
java
public final class nu { } /* Location: C:\Program Files\APK反编译\classes_dex2jar.jar * Qualified Name: nu * JD-Core Version: 0.6.0 */
[ "zhaojialiang@conew.com" ]
zhaojialiang@conew.com
fcb90964756668b8dc495e99c8a473af633899d7
22c06ce39649e70f5eee3b77a2f355f064a51c74
/core/src/main/java/org/keycloak/jose/jws/JWSInputException.java
500bcfe8cdb8a6aceea93caa2357e51e60fa7cb2
[ "Apache-2.0" ]
permissive
keycloak/keycloak
fa71d8b0712c388faeb89ade03ea5f1073ffb837
a317f78e65c1ee63eb166c61767f34f72be0a891
refs/heads/main
2023-09-01T20:04:48.392597
2023-09-01T17:12:35
2023-09-01T17:12:35
11,125,589
17,920
7,045
Apache-2.0
2023-09-14T19:48:31
2013-07-02T13:38:51
Java
UTF-8
Java
false
false
1,029
java
/* * Copyright 2016 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.keycloak.jose.jws; /** * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> */ public class JWSInputException extends Exception { public JWSInputException(String s) { super(s); } public JWSInputException() { } public JWSInputException(Throwable throwable) { super(throwable); } }
[ "stianst@gmail.com" ]
stianst@gmail.com
13033b156b30cb46d782d445979bcfcbe6cebc71
baba7ae4f32f0e680f084effcd658890183e7710
/MutationFramework/muJava/muJavaMutantStructure/Persistence/BankAccount/Account/boolean_update(int)/ODL_5/Account.java
96dc27b84b09caf735d8944422bf2accf1f7f797
[ "Apache-2.0" ]
permissive
TUBS-ISF/MutationAnalysisForDBC-FormaliSE21
75972c823c3c358494d2a2e9ec12e0a00e26d771
de825bc9e743db851f5ec1c5133dca3f04d20bad
refs/heads/main
2023-04-22T21:29:28.165271
2021-05-17T07:43:22
2021-05-17T07:43:22
368,096,901
0
0
null
null
null
null
UTF-8
Java
false
false
1,444
java
// This is a mutant program. // Author : ysma package BankAccount; public class Account { final int OVERDRAFT_LIMIT = -5000; /*@ invariant balance >= OVERDRAFT_LIMIT; @*/ int balance = 0; Account() { } /*@ ensures (!\result ==> balance == \old(balance)) && (\result ==> balance == \old(balance) + x); assignable balance; @*/ boolean update( int x ) { int newBalance = balance + x; if (OVERDRAFT_LIMIT) { return false; } balance = newBalance; return true; } /*@ ensures (!\result ==> balance == \old(balance)) && (\result ==> balance == \old(balance) - x); assignable balance; @*/ boolean undoUpdate( int x ) { int newBalance = balance - x; if (newBalance < OVERDRAFT_LIMIT) { return false; } balance = newBalance; return true; } /*@ requires amount >= 0; ensures balance >= amount <==> \result; assignable \nothing; @*/ boolean credit( int amount ) { return balance >= amount; } private boolean lock = false; /*@ ensures this.lock; assignable lock; @*/ void lock() { lock = true; } /*@ ensures !this.lock; assignable lock; @*/ void unLock() { lock = false; } /*@ ensures \result == this. lock; assignable \nothing; @*/ boolean isLocked() { return lock; } }
[ "a.knueppel@tu-bs.de" ]
a.knueppel@tu-bs.de
8e586594f4cbdf3ba58565da486e4626cea95247
8bd4489aaba65973917eb576fc80009377eaaee1
/aliyun-java-sdk-green/src/main/java/com/aliyuncs/green/model/v20160525/ImageFeedbackResponse.java
c2da9644f3e7cef5fb3da12c740056e23c7c2f41
[ "Apache-2.0" ]
permissive
akemlee/aliyun-openapi-java-sdk
fb9164dd1106d8bfe4f9b747ecb4108e1301c6ae
8c4ae5b41c6362d2cec5974605ad87c1b2fca45d
refs/heads/master
2021-01-19T22:49:31.046039
2016-07-25T03:10:39
2016-07-25T03:10:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,543
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.aliyuncs.green.model.v20160525; import com.aliyuncs.AcsResponse; import com.aliyuncs.green.transform.v20160525.ImageFeedbackResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class ImageFeedbackResponse extends AcsResponse { private String code; private String msg; public String getCode() { return this.code; } public void setCode(String code) { this.code = code; } public String getMsg() { return this.msg; } public void setMsg(String msg) { this.msg = msg; } @Override public ImageFeedbackResponse getInstance(UnmarshallerContext context) { return ImageFeedbackResponseUnmarshaller.unmarshall(this, context); } }
[ "346340936@qq.com" ]
346340936@qq.com
1d88fd46c54cf859383ec292c54c1893b77527b3
6a7a3c200dd7a0fecd8690287b18fa96bde4994e
/src/main/java/com/fury/game/npc/familiar/impl/SpiritVulatrice.java
3114d7cb662c5c1e95382acc63e39426d62e1c61
[]
no_license
GregHib/fury
5d6c39a08bd05148076feb809ff26401e4d0d330
24fd71ebd515219d4d7ceca4bd2d5c6a96042cc1
refs/heads/master
2023-01-27T19:29:44.829658
2020-12-03T09:54:17
2020-12-03T09:54:17
318,140,865
1
0
null
null
null
null
UTF-8
Java
false
false
2,090
java
package com.fury.game.npc.familiar.impl; import com.fury.core.model.node.entity.actor.figure.Figure; import com.fury.core.model.node.entity.actor.figure.Projectile; import com.fury.core.model.node.entity.actor.figure.player.Player; import com.fury.game.content.skill.Skill; import com.fury.game.content.skill.member.summoning.impl.Summoning; import com.fury.game.entity.character.combat.CombatIcon; import com.fury.game.entity.character.combat.Hit; import com.fury.core.model.item.Item; import com.fury.game.node.entity.actor.figure.ProjectileManager; import com.fury.game.npc.familiar.Familiar; import com.fury.game.world.GameWorld; import com.fury.game.world.map.Position; import com.fury.game.world.update.flag.block.HitMask; import com.fury.util.Misc; public class SpiritVulatrice extends Familiar { private int egg; public SpiritVulatrice(Player owner, Summoning.Pouches pouch, Position tile) { super(owner, pouch, tile); } @Override public void processNpc() { super.processNpc(); egg++; if (egg == 500) addEgg(); } private void addEgg() { getBeastOfBurden().add(new Item(12109, 1)); egg = 0; } @Override public String getSpecialName() { return "Petrifying Gaze"; } @Override public String getSpecialDescription() { return "Inflicts damage and drains a combat stat, which varies according to the type of cockatrice."; } @Override public int getStoreSize() { return 30; } @Override public int getSpecialAttackEnergy() { return 5; } @Override public SpecialAttack getSpecialAttack() { return SpecialAttack.ENTITY; } @Override public boolean submitSpecial(Object object) { final Figure target = (Figure) object; getOwner().graphic(1316); getOwner().animate(7660); animate(7766); graphic(1467); ProjectileManager.send(new Projectile(this, target, 1468, 34, 16, 30, 35, 16, 0)); if (target.isPlayer()) { ((Player) target).getSkills().drain(Skill.MAGIC, 3); } GameWorld.schedule(2, () -> target.getCombat().applyHit(new Hit(getOwner(), Misc.random(100), HitMask.RED, CombatIcon.MELEE))); return true; } }
[ "greghib@users.noreply.github.com" ]
greghib@users.noreply.github.com
1c78105b01edc35cdc5afed07aaf1763cc44fd10
e42806940443267dbe154fba82d405a34800d5b6
/src/googlejam/SquareTiles.java
837dfcf496c393c807eef48bef71e0def44722a6
[]
no_license
allegea/GCJ
e0f296e3e2098cbe0a412fba8401fea43798cc31
d598dbdd7f9d58033114395fbaa1cf6c0f883cff
refs/heads/master
2021-01-10T13:45:30.955502
2016-04-09T01:47:14
2016-04-09T01:47:14
55,818,610
0
0
null
null
null
null
UTF-8
Java
false
false
3,042
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package googlejam; import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.Scanner; /** * * @author Allegea */ public class SquareTiles { public static void main(String[] args) throws FileNotFoundException, IOException { //Scanner in = new Scanner(new File("A-small-practice.in")); //FileWriter archivo = new FileWriter("A-small-practice.out"); Scanner in = new Scanner(new File("AAA.in")); //Scanner in = new Scanner(System.in); FileWriter archivo = new FileWriter("AAA.out"); PrintWriter out = new PrintWriter(archivo); out.flush(); int cases = in.nextInt(); char aa='\\'; System.out.println(aa); for(int c=1;c<=cases;c++) { int rows = in.nextInt(); int colums = in.nextInt(); String[] picture = new String[rows]; boolean salida = true; for(int i=0;i<rows;i++) { picture[i]=in.next(); } for(int i=0;i<rows;i++) { for(int j=0;j<picture[i].length()-1;j++) { String aux=picture[i].substring(j,j+1); if(aux.equals("#")) { if(i==(rows-1)) { salida=false; break; } if(j==(picture[i].length()-2)) { salida=false; break; } if(picture[i].substring(j+1,j+2).equals("#") && picture[i+1].substring(j,j+1).equals("#") && picture[i+1].substring(j+1,j+2).equals("#")) { picture[i]=picture[i].replaceFirst("#", "/"); picture[i]=picture[i].replaceFirst("#", String.valueOf(aa)); System.out.println(picture[i]); picture[i+1]=picture[i+1].replaceFirst("#", "'\\'"); picture[i+1]=picture[i+1].replaceFirst("#", "/"); picture[i]. } else { salida=false; break; } } } } System.out.println("Case #"+c+":"); out.println("Case #" + c + ":"); if(salida==false) { System.out.println("Impossible"); out.println("Impossible"); } else{ for(int i=0;i<rows;i++) { System.out.println(picture[i]); out.println(picture[i]); } } } out.close(); } }
[ "allegea@gmail.com" ]
allegea@gmail.com
0f84c4bda20fa93a32b92faef70b4aa7b8fbb491
e58a67e35dc304bc2f12b29fc30a6f2232c22fb2
/guvnor-ng/guvnor-editors/guvnor-guided-dtable-editor/guvnor-guided-dtable-editor-client/src/main/java/org/kie/guvnor/guided/dtable/client/widget/ActionDragHandler.java
b5442765dacd94d2a214f47cb2a1b11da6761e69
[ "Apache-2.0" ]
permissive
jsvitak/guvnor
5dae69f5775ba4c2946e38ad8ce41c86f89a63a0
56f6d6fb0c970d27f1179e2a4923569d6134e7c6
refs/heads/master
2021-01-16T22:49:47.978385
2013-02-21T16:05:56
2013-02-21T16:06:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,037
java
/* * Copyright 2011 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.kie.guvnor.guided.dtable.client.widget; import com.allen_sauer.gwt.dnd.client.DragEndEvent; import com.allen_sauer.gwt.dnd.client.DragHandler; import com.allen_sauer.gwt.dnd.client.DragStartEvent; import com.allen_sauer.gwt.dnd.client.VetoDragException; import com.google.gwt.user.client.ui.VerticalPanel; import org.kie.guvnor.guided.dtable.client.widget.table.AbstractDecisionTableWidget; import org.kie.guvnor.guided.dtable.model.ActionCol52; import org.kie.guvnor.guided.dtable.model.GuidedDecisionTable52; /** * A Drag Handler for Actions in the Configuration section of the Guided * Decision Table screen that acts as a Mediator between drag operations and the * Decision Table Widget */ public class ActionDragHandler implements DragHandler { //Index of Action at the start of a drag operation private int startIndex = -1; //Index of Action at the end of a drag operation private int endIndex = -1; private VerticalPanel actionsPanel; private GuidedDecisionTable52 dtableModel; private AbstractDecisionTableWidget dtableWidget; /** * Constructor to mediate drag operations between the Actions configuration * section of the Guided Decision Table screen and the Decision Table Widget * @param actionsPanel * @param dtableModel * @param dtableWidget */ public ActionDragHandler( VerticalPanel actionsPanel, GuidedDecisionTable52 dtableModel, AbstractDecisionTableWidget dtableWidget ) { this.actionsPanel = actionsPanel; this.dtableModel = dtableModel; this.dtableWidget = dtableWidget; } public void onDragStart( DragStartEvent event ) { startIndex = actionsPanel.getWidgetIndex( event.getContext().draggable ); } public void onDragEnd( DragEndEvent event ) { endIndex = actionsPanel.getWidgetIndex( event.getContext().draggable ); if ( endIndex == startIndex ) { return; } ActionCol52 actionBeingMoved = dtableModel.getActionCols().get( startIndex ); dtableWidget.moveAction( actionBeingMoved, endIndex ); } public void onPreviewDragEnd( DragEndEvent event ) throws VetoDragException { //Do nothing } public void onPreviewDragStart( DragStartEvent event ) throws VetoDragException { //Do nothing } }
[ "michael.anstis@gmail.com" ]
michael.anstis@gmail.com
2e9c5fc2ecb999d4b98d1bcd890c30d147dd74c6
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/pluginsdk/cmd/RecoveryConsoleUI.java
8392ab7d7bebb9e14f17e2dc8812a24caefe066e
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
3,040
java
package com.tencent.mm.pluginsdk.cmd; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ListView; import android.widget.SimpleAdapter; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.plugin.comm.c.f; import com.tencent.mm.ui.MMActivity; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; public class RecoveryConsoleUI extends MMActivity implements AdapterView.OnItemClickListener { List<b.a> XOc; SimpleAdapter XOd; ListView bEw; List<Map<String, String>> xGG; public int getLayoutId() { return c.f.mm_preference_list_content; } public void onCreate(Bundle paramBundle) { AppMethodBeat.i(151618); super.onCreate(paramBundle); setTitle("Recovery Console"); this.XOc = b.iGM(); this.xGG = new ArrayList(this.XOc.size()); paramBundle = this.XOc.iterator(); while (paramBundle.hasNext()) { b.a locala = (b.a)paramBundle.next(); HashMap localHashMap = new HashMap(); localHashMap.put("title", getString(locala.tIF)); this.xGG.add(localHashMap); } this.XOd = new SimpleAdapter(this, this.xGG, c.f.mm_preference, new String[] { "title" }, new int[] { 16908310 }); this.bEw = ((ListView)findViewById(16908298)); this.bEw.setAdapter(this.XOd); this.bEw.setOnItemClickListener(this); AppMethodBeat.o(151618); } public void onItemClick(AdapterView<?> paramAdapterView, View paramView, int paramInt, long paramLong) { AppMethodBeat.i(151619); com.tencent.mm.hellhoundlib.b.b localb = new com.tencent.mm.hellhoundlib.b.b(); localb.cH(paramAdapterView); localb.cH(paramView); localb.sc(paramInt); localb.hB(paramLong); com.tencent.mm.hellhoundlib.a.a.c("com/tencent/mm/pluginsdk/cmd/RecoveryConsoleUI", "android/widget/AdapterView$OnItemClickListener", "onItemClick", "(Landroid/widget/AdapterView;Landroid/view/View;IJ)V", this, localb.aYj()); paramAdapterView = (b.a)this.XOc.get(paramInt); if (paramAdapterView.XOh != null) { paramAdapterView.XOh.a(this, paramAdapterView.iin.split(" +"), ""); } for (;;) { com.tencent.mm.hellhoundlib.a.a.a(this, "com/tencent/mm/pluginsdk/cmd/RecoveryConsoleUI", "android/widget/AdapterView$OnItemClickListener", "onItemClick", "(Landroid/widget/AdapterView;Landroid/view/View;IJ)V"); AppMethodBeat.o(151619); return; b.ac(this, paramAdapterView.iin, ""); } } public void onWindowFocusChanged(boolean paramBoolean) { super.onWindowFocusChanged(paramBoolean); AppMethodBeat.at(this, paramBoolean); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar * Qualified Name: com.tencent.mm.pluginsdk.cmd.RecoveryConsoleUI * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
05f5b281485863bb68b9043f98b148c37402d412
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-400-Files/boiler-To-Generate-400-Files/syncregions-400Files/TemperatureController221.java
d26b961336dff4e6a581da8465e9fdaeeac6a052
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
364
java
package syncregions; public class TemperatureController221 { public execute(int temperature221, int targetTemperature221) { //sync _bfpnFUbFEeqXnfGWlV2221, behaviour 1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
89326b211d30b5fda7600c3d80a6ca16937d9947
ffb9487850d4dc44fef11b43b0d98346742f8473
/src/main/java/com/art1985/orderList/web/controller/user/UserController.java
304402e38c7cda7d763699a98edb1e9a189fc8c9
[]
no_license
Art1985ss/orderList
33a4fd75f304344281bd13f3a90d63cb45a4cb1a
1e3913a48f28017dcf842bba1c53b0719085d994
refs/heads/master
2021-08-28T14:37:27.867879
2021-08-19T16:51:44
2021-08-19T16:51:44
242,995,483
0
0
null
2020-05-23T11:47:52
2020-02-25T12:34:14
Java
UTF-8
Java
false
false
2,760
java
package com.art1985.orderList.web.controller.user; import com.art1985.orderList.entities.User; import com.art1985.orderList.service.user.UserService; import com.art1985.orderList.web.controller.IController; import com.art1985.orderList.web.dto.DtoConverter; import com.art1985.orderList.web.dto.DtoUser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import java.net.URI; import java.util.List; import java.util.stream.Collectors; @RestController @RequestMapping("/api/v1/users") public class UserController implements IController<DtoUser> { private UserService userService; @Autowired public UserController(UserService userService) { this.userService = userService; } @Override public ResponseEntity<Void> create(DtoUser dtoUser) { User user = DtoConverter.fromDto(dtoUser); Long id = userService.create(user).getId(); URI location = ServletUriComponentsBuilder.fromCurrentRequest() .path("/{id}") .buildAndExpand(id) .toUri(); return ResponseEntity.status(HttpStatus.CREATED).location(location).build(); } @Override public ResponseEntity<List<DtoUser>> getAll() { List<User> users = userService.findAll(); List<DtoUser> dtoUserList = users.stream().map(DtoConverter::toDto).collect(Collectors.toList()); return ResponseEntity.ok(dtoUserList); } @Override public ResponseEntity<DtoUser> findById(Long id) { User user = userService.findById(id); DtoUser dtoUser = DtoConverter.toDto(user); return ResponseEntity.ok(dtoUser); } @Override public ResponseEntity<DtoUser> findByName(String name) { User user = userService.findByName(name); DtoUser dtoUser = DtoConverter.toDto(user); return ResponseEntity.ok(dtoUser); } @Override public ResponseEntity<Void> deleteById(Long id) { userService.deleteById(id); return ResponseEntity.status(HttpStatus.NO_CONTENT).build(); } @Override public ResponseEntity<Void> deleteById(String name) { userService.deleteByName(name); return ResponseEntity.status(HttpStatus.NO_CONTENT).build(); } @Override public ResponseEntity<Void> update(DtoUser dtoUser) { User user = DtoConverter.fromDto(dtoUser); userService.update(user); return ResponseEntity.status(HttpStatus.ACCEPTED).build(); } }
[ "art_1985@inbox.lv" ]
art_1985@inbox.lv
d9c0a0c1206c9aba3842b34f5708dac487efd38b
32ad3940730796c715e26ced0e841d884c63cdb1
/algorithms/java/src/test/java/org/jessenpan/leetcode/dsu/S684RedundantConnectionTest.java
1ef591d1b49659f0e4f10d599aab01b089013639
[ "Apache-2.0" ]
permissive
JessenPan/leetcode
34ea3f40e52bbe0e22112b67cecdb4be2b1f9691
4d00f175f1886cb68543fb160d29015039494a29
refs/heads/master
2022-09-13T01:34:53.815096
2022-09-03T03:28:53
2022-09-03T03:28:53
172,355,216
7
2
Apache-2.0
2020-10-13T12:12:07
2019-02-24T15:34:45
Java
UTF-8
Java
false
false
972
java
package org.jessenpan.leetcode.dsu; import org.junit.Assert; import org.junit.Test; /** * @author jessenpan */ public class S684RedundantConnectionTest { private S684RedundantConnection redundantConnection = new S684RedundantConnection(); @Test public void test1() { int[] connection = redundantConnection.findRedundantConnection(new int[][] { { 1, 2 }, { 1, 3 }, { 2, 3 } }); Assert.assertArrayEquals(new int[] { 2, 3 }, connection); } @Test public void test2() { int[] connection = redundantConnection.findRedundantConnection(new int[][] { { 1, 2 }, { 2, 3 }, { 3, 4 }, { 1, 4 }, { 1, 5 } }); Assert.assertArrayEquals(new int[] { 1, 4 }, connection); } @Test public void test3() { int[] connection = redundantConnection.findRedundantConnection(new int[][] { { 1, 3 }, { 3, 4 }, { 1, 5 }, { 3, 5 }, { 2, 3 } }); Assert.assertArrayEquals(new int[] { 3, 5 }, connection); } }
[ "jessenpan@qq.com" ]
jessenpan@qq.com
1951688b6a2aaa46de594d58d170c45769dfba86
ba5a5fcf9ab6dcef656b9e07afab8c91dbec4fca
/chapter002-mybatis-quick-start/src/test/java/com/ithinksky/dao/UserMapperTest.java
b50ab08159309db16c6842036115b31fb1884b30
[]
no_license
ithinksky/mybatis-study
706124595c5ee99374253ddef1d9fd72c3820b10
97b1471534bf4bbeffa9070a449288e6a63438a4
refs/heads/master
2021-07-21T14:32:49.599912
2019-06-05T16:29:20
2019-06-05T16:29:20
175,405,169
0
0
null
null
null
null
UTF-8
Java
false
false
1,236
java
package com.ithinksky.dao; import com.ithinksky.entity.UserEntity; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; import org.junit.Before; import org.junit.Test; import java.io.IOException; import java.io.InputStream; /** * @author tengpeng.gao */ public class UserMapperTest { private SqlSessionFactory sqlSessionFactory; @Before public void init() throws IOException { String resource = "mybatis-config.xml"; InputStream inputStream = Resources.getResourceAsStream(resource); // 1.读取mybatis配置文件创SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream); inputStream.close(); } @Test public void selectByPrimaryKey() { // 1.获取sqlSession SqlSession sqlSession = sqlSessionFactory.openSession(); // 2.获取对应mapper UserMapper mapper = sqlSession.getMapper(UserMapper.class); // 3.执行查询语句并返回结果 UserEntity user = mapper.selectByPrimaryKey(1); System.out.println(user.toString()); } }
[ "tengpeng.gao@gmail.com" ]
tengpeng.gao@gmail.com
4871145ced3409c09e57359aca83ab0e9f079d95
5483eb988acf28a9b3d3ead2b3fd1464b212b5fc
/src/service/com/vriche/adrm/service/security/acegi/taglib/.svn/text-base/AuthorizeTag.java.svn-base
070c1f949bea45268440617c9eda08a7c2d09b48
[]
no_license
vriche/adrm
0bcce806716bdc7aa1adc12c20d590e9c37356df
c5e83dc91b831d430962a7079e9a54b7e82b7fa8
refs/heads/master
2020-04-06T23:42:19.947104
2016-07-14T01:31:31
2017-04-01T03:58:15
24,831,175
0
0
null
null
null
null
UTF-8
Java
false
false
3,548
/**************************************************************************** * Created on 2007-4-28 * * * * @author <a href="mailto:hongxilin@yahoo.com.cn">hongxi</a> * * Updated by hongxi (hongxilin@yahoo.com.cn) * * * * @version Vision:1.0 * * * ***************************************************************************/ package com.vriche.adrm.service.security.acegi.taglib; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import javax.servlet.ServletContext; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; import javax.servlet.jsp.tagext.TagSupport; import org.acegisecurity.Authentication; import org.acegisecurity.context.SecurityContextHolder; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; import org.springframework.web.util.ExpressionEvaluationUtils; import com.vriche.adrm.service.security.acegi.cache.AcegiCacheManager; import com.vriche.adrm.service.security.acegi.resource.ResourceDetails; /** * 对用户授权进行认证的Tag, 如果用户没相应授权,则Tag中的Html代码全部不显示 * @author cac */ public class AuthorizeTag extends TagSupport { private static final long serialVersionUID = 0L; private String res = ""; // ~ Methods // ======================================================================================================== public int doStartTag() throws JspException { ServletContext sc = pageContext.getServletContext(); WebApplicationContext webAppCtx = WebApplicationContextUtils .getRequiredWebApplicationContext(sc); AcegiCacheManager acegiCacheManager = (AcegiCacheManager) webAppCtx .getBean("acegiCacheManager"); //取出 tag 的名称 final String tag = ExpressionEvaluationUtils.evaluateString("res", res, pageContext); //找出相应的资源 ResourceDetails rd = acegiCacheManager.getResourceFromCache(tag); Collection required; if (rd == null) { return Tag.SKIP_BODY; } required = Arrays.asList(rd.getAuthorities()); final Collection granted = getPrincipalAuthorities(); Collection grantedCopy = copy(granted); //判断权限 if ((null != tag) && !"".equals(tag)) { grantedCopy.retainAll(required); if (grantedCopy.isEmpty()) { return Tag.SKIP_BODY; } } return Tag.EVAL_BODY_INCLUDE; } /** * 获取当前用户授权 * @return */ private Collection getPrincipalAuthorities() { Authentication currentUser = SecurityContextHolder.getContext() .getAuthentication(); if (null == currentUser) { return Collections.EMPTY_LIST; } if ((null == currentUser.getAuthorities()) || (currentUser.getAuthorities().length < 1)) { return Collections.EMPTY_LIST; } return Arrays.asList(currentUser.getAuthorities()); } private Set copy(Collection c) { Set target = new HashSet(); for (Iterator iterator = c.iterator(); iterator.hasNext();) { target.add(iterator.next()); } return target; } public void setRes(String res) { this.res = res; } }
[ "46430212@qq.com" ]
46430212@qq.com
08adb80f97d2e907268ee942dded40c8e8a64114
94facc14358736d62fb17839db70b9931a1d71b5
/editor/src/com/kotcrab/vis/editor/ui/scene/entityproperties/specifictable/SpecificUITable.java
47240d4a1dfb54a3db90d0be240170b0046f5814
[ "Apache-2.0" ]
permissive
jpsgamboa/vis-editor
add63d1a940925141b335db11cc1a2408cd49772
4a58cd364d9cf8131145ad8e394f05063fffa05f
refs/heads/master
2021-01-22T05:57:28.575058
2016-03-23T22:41:14
2016-03-23T22:41:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,902
java
/* * Copyright 2014-2016 See AUTHORS file. * * 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.kotcrab.vis.editor.ui.scene.entityproperties.specifictable; import com.kotcrab.vis.editor.proxy.EntityProxy; import com.kotcrab.vis.editor.ui.scene.entityproperties.ComponentTable; import com.kotcrab.vis.editor.ui.scene.entityproperties.EntityProperties; import com.kotcrab.vis.runtime.util.annotation.DeprecatedOn; import com.kotcrab.vis.ui.widget.VisTable; /** * Specific objects tables allow to add custom widgets for {@link EntityProperties} dialog. * @author Kotcrab * @see ComponentTable * @deprecated SpecificUITable are kept for backward compatibility, and are intended to be replaced by {@link ComponentTable} */ @Deprecated @DeprecatedOn(versionCode = 10) public abstract class SpecificUITable extends VisTable { protected EntityProperties properties; public SpecificUITable () { this(true); } public SpecificUITable (boolean useVisDefaults) { super(useVisDefaults); } protected abstract void init (); public void setProperties (EntityProperties properties) { if (this.properties != null) throw new IllegalArgumentException("Properties already assigned!"); this.properties = properties; init(); } public abstract boolean isSupported (EntityProxy entity); public abstract void updateUIValues (); public abstract void setValuesToEntities (); }
[ "kotcrab@gmail.com" ]
kotcrab@gmail.com
de7769d9b2cac6fc2c11ae2f04274e026c3e6f59
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdasApi21_ReducedClassCount/applicationModule/src/main/java/applicationModulepackageJava6/Foo12.java
67ad77fdc54479ef9891f0c36bd1012e0b1d1734
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
504
java
package applicationModulepackageJava6; public class Foo12 { public void foo0() { new applicationModulepackageJava6.Foo11().foo9(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } public void foo7() { foo6(); } public void foo8() { foo7(); } public void foo9() { foo8(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
6169137f00293332d4f4c7037ab5b0b5e24af22f
c98ded3f6de5a1bb91c7930cd090208fbee0081f
/skWeiChatBaidu/src/main/java/com/sk/weichat/socket/msg/JoinGroupMessage.java
14cd199a54a49d32aa911cdd7d062c5d5fd5cc5a
[]
no_license
GJF19981210/IM_Android
e628190bb504b52ec04e8beaf5449bd847904c84
7743586eac5ca07d1a7e9a2d4b2cc24d68a082ac
refs/heads/master
2023-01-01T11:15:42.085782
2020-10-19T07:10:43
2020-10-19T07:10:43
305,293,872
2
0
null
null
null
null
UTF-8
Java
false
false
657
java
package com.sk.weichat.socket.msg; import com.alibaba.fastjson.JSON; /** * @author lidaye */ public class JoinGroupMessage extends AbstractMessage { /** * 群组 jid */ private String jid; /** * 接受多少秒时间内的消息 */ private long seconds; public String getJid() { return jid; } public void setJid(String jid) { this.jid = jid; } public long getSeconds() { return seconds; } public void setSeconds(long seconds) { this.seconds = seconds; } @Override public String toString() { return JSON.toJSONString(this); } }
[ "2937717941@qq.com" ]
2937717941@qq.com
a93a0c8bcb2ae9859d4156e9d98c439408e2fbbf
1c5e8605c1a4821bc2a759da670add762d0a94a2
/easrc/equipment/operate/EquLeaseE1Info.java
e781d41f70d8caf54af7ce5e21cf66aaad4b2bfd
[]
no_license
shxr/NJG
8195cfebfbda1e000c30081399c5fbafc61bb7be
1b60a4a7458da48991de4c2d04407c26ccf2f277
refs/heads/master
2020-12-24T06:51:18.392426
2016-04-25T03:09:27
2016-04-25T03:09:27
19,804,797
0
3
null
null
null
null
UTF-8
Java
false
false
318
java
package com.kingdee.eas.port.equipment.operate; import java.io.Serializable; public class EquLeaseE1Info extends AbstractEquLeaseE1Info implements Serializable { public EquLeaseE1Info() { super(); } protected EquLeaseE1Info(String pkField) { super(pkField); } }
[ "shxr_code@126.com" ]
shxr_code@126.com
03511dee6e8cf42ab668e8d838b980fc920bfcec
432cfc9e00872a82fac298ff92a0b528c9f909a9
/cms-duty/src/main/java/com/scsvision/cms/duty/controller/DutyController.java
bea80b89353b28f907aef207f9decff1b18d9799
[]
no_license
maninyellow/cms20
31f30da1bb148820d0f51931fe830bb0dc68531a
ba29e7b29c967dcce3ab8a5cf4d1d373fe9ca013
refs/heads/master
2021-01-10T07:51:26.808640
2016-03-29T01:38:23
2016-03-29T01:38:23
50,329,768
0
1
null
null
null
null
UTF-8
Java
false
false
7,035
java
package com.scsvision.cms.duty.controller; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import javax.ejb.EJB; import javax.ejb.Stateless; import javax.interceptor.Interceptors; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.json.JSONArray; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.scsvision.cms.constant.Header; import com.scsvision.cms.duty.dto.DutyUserDTO; import com.scsvision.cms.duty.manager.DutyRecordManager; import com.scsvision.cms.duty.manager.DutyUserManager; import com.scsvision.cms.exception.BusinessException; import com.scsvision.cms.exception.ErrorCode; import com.scsvision.cms.response.BaseDTO; import com.scsvision.cms.util.annotation.Logon; import com.scsvision.cms.util.interceptor.SessionCheckInterceptor; import com.scsvision.cms.util.request.RequestReader; import com.scsvision.cms.util.request.SimpleRequestReader; import com.scsvision.cms.util.string.MyStringUtil; import com.scsvision.cms.util.xml.XmlUtil; import com.scsvision.database.entity.DutyRecord; import com.scsvision.database.entity.DutyUser; import com.scsvision.database.manager.OrganManager; /** * DutyController * * @author MIKE * <p /> * Create at 2015 上午9:30:30 */ @Stateless @Interceptors(SessionCheckInterceptor.class) public class DutyController { @EJB(beanName = "DutyRecordManagerImpl") private DutyRecordManager dutyRecordManager; @EJB(beanName = "DutyUserManagerImpl") private DutyUserManager dutyUserManager; @EJB(beanName = "OrganManagerImpl") private OrganManager organManager; private final Logger logger = LoggerFactory.getLogger(DutyController.class); public Object dutyLoginJson(HttpServletRequest request) { SimpleRequestReader reader = new SimpleRequestReader(request); Short action = reader.getShort("action", false); Long dutyUserId = reader.getLong("dutyUserId", false); DutyUser dutyUser = dutyUserManager.getDutyUser(dutyUserId); if (null == dutyUser) { throw new BusinessException(ErrorCode.RESOURCE_NOT_FOUND, "DutyUser id[" + dutyUserId + "] not found !"); } dutyUserManager.dutyLogin(dutyUser, action); BaseDTO dto = new BaseDTO(); dto.setMethod(request.getHeader(Header.METHOD)); return dto; } public Object createDutyUserJson(HttpServletRequest request) { SimpleRequestReader reader = new SimpleRequestReader(request); String loginName = reader.getString("loginName", true); String password = reader.getString("password", true); String name = reader.getString("name", false); Short status = reader.getShort("status", false); String phone = reader.getString("phone", true); Long organId = reader.getLong("organId", false); DutyUser dutyUser = new DutyUser(); dutyUser.setLoginName(loginName); dutyUser.setStatus(status); dutyUser.setPhone(phone); dutyUser.setName(name); dutyUser.setPassword(password); dutyUser.setOrganId(organId); Long id = dutyUserManager.createDutyUser(dutyUser); BaseDTO dto = new BaseDTO(); dto.setMethod(request.getHeader(Header.METHOD)); dto.setMessage(id + ""); return dto; } public Object updateDutyUserJson(HttpServletRequest request) { SimpleRequestReader reader = new SimpleRequestReader(request); Long id = reader.getLong("id", false); String loginName = reader.getString("loginName", true); String password = reader.getString("password", true); String name = reader.getString("name", true); Short status = reader.getShort("status", true); String phone = reader.getString("phone", true); Long organId = reader.getLong("organId", true); DutyUser dutyUser = dutyUserManager.getDutyUser(id); if (StringUtils.isNotBlank(loginName)) { dutyUser.setLoginName(loginName); } if (null != status) { dutyUser.setStatus(status); } if (StringUtils.isNotBlank(name)) { dutyUser.setName(name); } if (StringUtils.isNotBlank(password)) { dutyUser.setPassword(password); } if (StringUtils.isNotBlank(phone)) { dutyUser.setPhone(phone); } if (null != organId) { dutyUser.setOrganId(organId); } dutyUserManager.updateDutyUser(dutyUser); BaseDTO dto = new BaseDTO(); dto.setMethod(request.getHeader(Header.METHOD)); return dto; } public Object deleteDutyUserJson(HttpServletRequest request) { SimpleRequestReader reader = new SimpleRequestReader(request); String json = reader.getString("json", false); JSONObject object = new JSONObject(json); JSONArray ids = object.getJSONArray("ids"); for (int i = 0; i < ids.length(); i++) { dutyUserManager.deleteDutyUser(ids.getLong(i)); } BaseDTO dto = new BaseDTO(); dto.setMethod(request.getHeader(Header.METHOD)); return dto; } public Object dutyUserList(HttpServletRequest request) { SimpleRequestReader reader = new SimpleRequestReader(request); Long organId = reader.getLong("organId", true); Integer start = reader.getInteger("start", true); if (null == start) { start = 0; } Integer limit = reader.getInteger("limit", true); if (null == limit) { limit = 20; } List<DutyUser> list = dutyUserManager.dutyUserList(organId, start, limit); Integer count = dutyUserManager.dutyUserCount(organId); DutyUserDTO dto = new DutyUserDTO(); dto.setMethod(request.getHeader(Header.METHOD)); dto.setMessage(count + ""); List<DutyUserDTO.DutyUser> dutyUserlist = new ArrayList<DutyUserDTO.DutyUser>(); for (DutyUser entity : list) { DutyUserDTO.DutyUser dutyUser = dto.new DutyUser(); dutyUser.setId(entity.getId()); dutyUser.setName(entity.getName()); dutyUser.setPhone(entity.getPhone()); dutyUser.setStatus(entity.getStatus()); dutyUser.setOrganId(entity.getOrganId()); dutyUser.setLoginName(entity.getLoginName()); dutyUser.setPassword(entity.getPassword()); dutyUserlist.add(dutyUser); } dto.setList(dutyUserlist); return dto; } @Logon public Object listDutyUserJson(HttpServletRequest request) { SimpleRequestReader reader = new SimpleRequestReader(request); Long userId = reader.getUserId(); List<DutyUser> list = dutyUserManager.listDutyUser(userId); DutyUserDTO dto = new DutyUserDTO(); dto.setMethod(request.getHeader(Header.METHOD)); List<DutyUserDTO.DutyUser> dutyUserlist = new ArrayList<DutyUserDTO.DutyUser>(); for (DutyUser entity : list) { DutyUserDTO.DutyUser dutyUser = dto.new DutyUser(); dutyUser.setId(entity.getId()); dutyUser.setName(entity.getName()); dutyUser.setPhone(entity.getPhone()); dutyUser.setStatus(entity.getStatus()); dutyUser.setOrganId(entity.getOrganId()); dutyUser.setOrganName(organManager.getOrganById(entity.getOrganId()) != null ? organManager .getOrganById(entity.getOrganId()).getName() : ""); dutyUserlist.add(dutyUser); } dto.setList(dutyUserlist); return dto; } }
[ "hbj@scsvision.com" ]
hbj@scsvision.com
f0ca36cccb998163c7f73460366ed15e2034bf7b
fb108c57da333fc3eca30dc5a4395ff7ef2b3243
/src/arrays/Task_25.java
c65fb1748ed37da9f039ebfdf1a8b068a39b9b78
[]
no_license
aimi-valerija-andertona/Homework_Fundamentals
6cc61b060f4aadbadfa7e64774779ba8f638d173
1ba86e87db9c7af87a18252790f7f57acc91646a
refs/heads/master
2023-08-04T18:12:30.152201
2021-02-14T20:32:25
2021-02-14T20:32:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
300
java
package arrays; public class Task_25 { public static void main(String[] args) { String text = "avaJ"; String reverse = ""; for (int i = text.length()-1; i >= 0; i--){ reverse = reverse + text.charAt(i); } System.out.println(reverse); } }
[ "email@gmail.com" ]
email@gmail.com
4c0566797415f46b00e0dc08fd567603441f236a
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/fc/acct/ds/FC_ACCT_6130_MDataSet.java
6af863eaf7daf19ca716ca7f5fedc70359971dbb
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
3,607
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 독자우대-구독신청 * 작성일자 : 2007-05-22 * 작성자 : 김대섭 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.fc.acct.ds; import java.sql.*; import java.util.*; import somo.framework.db.*; import somo.framework.util.*; import chosun.ciis.fc.acct.dm.*; import chosun.ciis.fc.acct.rec.*; /** * */ public class FC_ACCT_6130_MDataSet extends somo.framework.db.BaseDataSet implements java.io.Serializable{ public ArrayList curlist = new ArrayList(); public String errcode; public String errmsg; public FC_ACCT_6130_MDataSet(){} public FC_ACCT_6130_MDataSet(String errcode, String errmsg){ this.errcode = errcode; this.errmsg = errmsg; } public void setErrcode(String errcode){ this.errcode = errcode; } public void setErrmsg(String errmsg){ this.errmsg = errmsg; } public String getErrcode(){ return this.errcode; } public String getErrmsg(){ return this.errmsg; } public void getValues(CallableStatement cstmt) throws SQLException{ this.errcode = Util.checkString(cstmt.getString(1)); this.errmsg = Util.checkString(cstmt.getString(2)); if(!"".equals(this.errcode)){ return; } ResultSet rset0 = (ResultSet) cstmt.getObject(4); while(rset0.next()){ FC_ACCT_6130_MCURLISTRecord rec = new FC_ACCT_6130_MCURLISTRecord(); rec.cd = Util.checkString(rset0.getString("cd")); rec.cdnm = Util.checkString(rset0.getString("cdnm")); rec.cd_abrv_nm = Util.checkString(rset0.getString("cd_abrv_nm")); rec.cdnm_cd = Util.checkString(rset0.getString("cdnm_cd")); rec.cdabrvnm_cd = Util.checkString(rset0.getString("cdabrvnm_cd")); this.curlist.add(rec); } } }/*---------------------------------------------------------------------------------------------------- Web Tier에서 DataSet 객체 관련 코드 작성시 사용하십시오. <% FC_ACCT_6130_MDataSet ds = (FC_ACCT_6130_MDataSet)request.getAttribute("ds"); %> Web Tier에서 Record 객체 관련 코드 작성시 사용하십시오. <% for(int i=0; i<ds.curlist.size(); i++){ FC_ACCT_6130_MCURLISTRecord curlistRec = (FC_ACCT_6130_MCURLISTRecord)ds.curlist.get(i);%> HTML 코드들.... <%}%> ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 DataSet 객체의 <%= %> 작성시 사용하십시오. <%= ds.getErrcode()%> <%= ds.getErrmsg()%> <%= ds.getCurlist()%> ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 Record 객체의 <%= %> 작성시 사용하십시오. <%= curlistRec.cd%> <%= curlistRec.cdnm%> <%= curlistRec.cd_abrv_nm%> <%= curlistRec.cdnm_cd%> <%= curlistRec.cdabrvnm_cd%> ----------------------------------------------------------------------------------------------------*/ /* 작성시간 : Tue Sep 15 17:55:23 KST 2009 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11