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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d00d7212ab93caf73ccb8416d5b4dd9574d42125
|
a969cad6bd19313831e9d6a7c1d42bc1f5c7274d
|
/java-design-pattern/src/main/java/com/coffee/baby/pattern/prototype/ConcretePrototypeA.java
|
4e2993d6eecc5e47c4b0e4e029b23ed1c19311d8
|
[
"Apache-2.0"
] |
permissive
|
smileszx/coffeebaby
|
e763f9f53b28f02b2a88db2a739d8d208d2a6ab6
|
ad97d4ef8ef646754bbb2cac8c4a1b863f43f892
|
refs/heads/master
| 2022-12-21T08:36:24.180180
| 2019-07-03T15:13:38
| 2019-07-03T15:13:38
| 166,063,592
| 0
| 0
|
Apache-2.0
| 2022-12-16T04:49:05
| 2019-01-16T15:30:45
|
Java
|
UTF-8
|
Java
| false
| false
| 569
|
java
|
package com.coffee.baby.pattern.prototype;
/**
* @Classname ConcretePrototypeA
* @Description TODO
* @Date 2019/1/18 10:39
* @Created by smile.szx
*/
public class ConcretePrototypeA extends Prototype {
private String attr;
@Override
public Prototype cloneObj() {
Prototype prototype = new ConcretePrototypeA();
prototype.setAttr(this.attr);
return prototype;
}
@Override
public String getAttr() {
return attr;
}
@Override
public void setAttr(String attr) {
this.attr = attr;
}
}
|
[
"smile.szx@outlook.com"
] |
smile.szx@outlook.com
|
02c906eaf910f9d01c50aa16645706c642410add
|
bbfde2704d36d47e43df97719446fac1b115e385
|
/ShiroProject/shiroproject/src/test/java/Person.java
|
fbc5350728ba26580c8335d1ff88c4fe1afa27f3
|
[] |
no_license
|
TitanicCode/BaseProject
|
6bc5acb997e71b5e9484c134684d786644a81bd1
|
c4647e4246e2015db75b469e03e04d2fe4c3e3a4
|
refs/heads/master
| 2020-03-22T23:33:37.652625
| 2018-08-08T12:11:56
| 2018-08-08T12:11:56
| 140,817,489
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 528
|
java
|
/**
* Created by jackiechan on 18-7-27/上午9:07
*/
public class Person {
public static void main(String[] args) {
Person person = new Person();
//person.setName("zhangsan");
person.abc();
}
private String name;
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void abc(){
Person person = new Person();
person.setName("lisi");
System.out.println(this.name);
}
}
|
[
"root@qq.com"
] |
root@qq.com
|
0874bbf46dda665092ce3181af44ccf62575251f
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/google/android/gms/iid/zzac.java
|
3fea281751132cfafb6366ecaa66607f0f4dccfc
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 554
|
java
|
package com.google.android.gms.iid;
import com.tencent.matrix.trace.core.AppMethodBeat;
final class zzac extends zzai
{
public final zzaj<Boolean> zzd(String paramString, boolean paramBoolean)
{
AppMethodBeat.i(57529);
paramString = new zzae(Boolean.TRUE, null);
AppMethodBeat.o(57529);
return paramString;
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar
* Qualified Name: com.google.android.gms.iid.zzac
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
dc60c83236f50d187215277bcc8cd749c9bad1a8
|
fcaebce8dc367dd201955da317e6221fb86e71b5
|
/java/server/tags/1_0_2_RC1/src/main/java/org/red5/server/statistics/XmlRpcScopeStatistics.java
|
ab36114522abceacf889f665cb37e57e0ccd50cd
|
[
"Apache-2.0"
] |
permissive
|
disword/red5
|
dd66af6c5be0edb94a6a1b5af2cf0978650f04ce
|
3b51d942dc9c4a1232f4a84a503dfb6cf748e049
|
refs/heads/master
| 2021-05-28T23:21:54.622799
| 2014-12-31T03:03:03
| 2014-12-31T03:03:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,367
|
java
|
/*
* RED5 Open Source Flash Server - http://code.google.com/p/red5/
*
* Copyright 2006-2013 by respective authors (see below). All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.red5.server.statistics;
import java.lang.reflect.Array;
import java.util.Collection;
import java.util.Date;
import java.util.Hashtable;
import java.util.Map;
import java.util.Set;
import java.util.Vector;
import org.red5.server.api.scope.IScope;
import org.red5.server.api.so.ISharedObject;
import org.red5.server.api.so.ISharedObjectService;
import org.red5.server.exception.ScopeNotFoundException;
import org.red5.server.util.ScopeUtils;
/**
* Public methods for XML-RPC scope statistics service.
*
* @author The Red5 Project
* @author Joachim Bauch (jojo@struktur.de)
*/
public class XmlRpcScopeStatistics {
/**
* Global scope
*/
private IScope globalScope;
/** Constructs a new XmlScopeStatistics. */
public XmlRpcScopeStatistics() {
}
/**
* Create new scope statistic.
*
* @param globalScope Global scope ref
*/
public XmlRpcScopeStatistics(IScope globalScope) {
this.globalScope = globalScope;
}
/**
* Setter for global scope.
*
* @param scope Value to set for property 'globalScope'.
*/
public void setGlobalScope(IScope scope) {
globalScope = scope;
}
/**
* Resolve path to scope.
*
* @param path Path to return scope for
* @return The scope for the given path
*
* @throws ScopeNotFoundException Thrown when scope with given path can't be resolved
*/
private IScope getScope(String path) throws ScopeNotFoundException {
IScope scope;
if (path != null && !path.equals("")) {
scope = ScopeUtils.resolveScope(globalScope, path);
} else {
scope = globalScope;
}
if (scope == null) {
throw new ScopeNotFoundException(globalScope, path);
}
return scope;
}
/**
* Return available applications.
*
* @return list of application names
*/
public String[] getScopes() {
return getScopes(null);
}
/**
* Return subscopes of another scope.
*
* @param path Path of scope to return subscopes of
* @return List of subscope names
*/
public String[] getScopes(String path) {
IScope scope = getScope(path);
Set<String> result = scope.getScopeNames();
return result.toArray(new String[result.size()]);
}
/**
* Return attributes of the global scope.
*
* @return The scope's attributes
*/
public Map<String, Object> getScopeAttributes() {
return getScopeAttributes(null);
}
/**
* Return an object that can be serialized through XML-RPC.
* Inspired by "Reflective XML-RPC" by "Stephan Maier".
*
* @param value
* @return
*/
private Object getXMLRPCValue(Object value) {
if (value == null) {
return "<null>";
}
Class<?> type = value.getClass();
if (type.equals(Integer.class) || type.equals(Double.class) || type.equals(Boolean.class) || type.equals(String.class) || type.equals(Date.class)) {
return value;
} else if (type.equals(Long.class)) {
// XXX: long values are not supported by XML-RPC, convert to string
// instead
return ((Long) value).toString();
} else if (type.isArray() && type.getComponentType().equals(byte.class)) {
return value;
} else if (type.isArray()) {
int length = Array.getLength(value);
Vector<Object> res = new Vector<Object>();
for (int i = 0; i < length; i++) {
res.add(getXMLRPCValue(Array.get(value, i)));
}
return res;
} else if (value instanceof Map<?, ?>) {
Hashtable<Object, Object> res = new Hashtable<Object, Object>();
for (Map.Entry<?, ?> entry : ((Map<?, ?>) value).entrySet()) {
res.put(entry.getKey(), getXMLRPCValue(entry.getValue()));
}
return res;
} else if (value instanceof Collection<?>) {
Collection<?> coll = (Collection<?>) value;
Vector<Object> result = new Vector<Object>(coll.size());
for (Object item : coll) {
result.add(getXMLRPCValue(item));
}
return result;
}
throw new RuntimeException("Don't know how to convert " + value);
}
/**
* Return attributes of a given scope.
*
* @param path Path of scope to return attributes of
* @return The scope's attributes
*/
public Map<String, Object> getScopeAttributes(String path) {
IScope scope = getScope(path);
Map<String, Object> result = new Hashtable<String, Object>();
for (String name : scope.getAttributeNames()) {
Object value = scope.getAttribute(name);
try {
result.put(name, getXMLRPCValue(value));
} catch (RuntimeException err) {
// Could not convert attribute for XML-RPC serialization.
}
}
return result;
}
/**
* Return informations about shared objects of a given scope.
*
* @param path Path of scope to return shared objects for
* @return A mapping containing the shared object name -> (persistent, data)
*/
public Map<String, Object> getSharedObjects(String path) {
IScope scope = getScope(path);
ISharedObjectService service = (ISharedObjectService) ScopeUtils.getScopeService(scope, ISharedObjectService.class, false);
if (service == null) {
return new Hashtable<String, Object>();
}
Map<String, Object> result = new Hashtable<String, Object>();
for (String name : service.getSharedObjectNames(scope)) {
ISharedObject so = service.getSharedObject(scope, name);
try {
result.put(name, new Object[] { so.isPersistent(), getXMLRPCValue(so.getData()) });
} catch (RuntimeException err) {
// Could not convert attribute for XML-RPC serialization.
result.put(name, "--- Error while serializing \"" + so.getData().toString() + "\" ---");
}
}
return result;
}
}
|
[
"mondain@gmail.com"
] |
mondain@gmail.com
|
23c3b86d9e7b00b722b61a45656fd191eab26155
|
17afcc3f70925b04e21ad214bdb1723adfb6405a
|
/LeetCodeOnlineJudge/PascalsTriangleII/Solution.java
|
ff1171bc85d899b2f1797c87ec7cc889afabeed2
|
[] |
no_license
|
wonderli/Solutions
|
a848eeda6ceb86e3be0c47ab34b426dea0282343
|
56e6b90cd1e7bca06ec5ee69a1a8d3257f99ed29
|
refs/heads/master
| 2022-11-06T17:03:29.667413
| 2022-10-24T18:18:47
| 2022-10-24T18:18:47
| 3,465,559
| 11
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,534
|
java
|
//Given numRows, generate the first numRows of Pascal's triangle.
//
//For example, given numRows = 5,
import java.util.*;
public class Solution{
public ArrayList<Integer> getRow(int rowIndex) {
if(rowIndex == 0) {
ArrayList<Integer> ret = new ArrayList<Integer>();
ret.add(1);
return ret;
}
ArrayList<Integer> a = new ArrayList<Integer>();
ArrayList<Integer> ret = helper(0, rowIndex, a);
return ret;
}
public ArrayList<Integer> helper(int curr, int level, ArrayList<Integer> last){
if(curr == level + 1) return last;
if(curr == 0 || curr == 1){
ArrayList<Integer> a = new ArrayList<Integer>();
a.add(1);
if(curr == 1){
a.add(1);
}
return helper(curr + 1, level, a);
}
int len = last.size();
ArrayList<Integer> a = new ArrayList<Integer>();
a.add(1);
for(int i = 1; i < len; i++){
int c = last.get(i-1);
int d = last.get(i);
int b = c + d;
a.add(b);
}
a.add(1);
return helper(curr+1, level, a);
}
public static void main(String args[]){
Solution sol = new Solution();
ArrayList<Integer> ret = new ArrayList<Integer>();
int numRows = 4;
ret = sol.getRow(numRows);
//ArrayList<Integer> a = new ArrayList<Integer>();
//sol.helper(0, numRows, a);
System.out.println(ret);
}
}
|
[
"lixinyu2268@gmail.com"
] |
lixinyu2268@gmail.com
|
881b5e51a505ed84c382aeceb979aac63f53ba05
|
ff543953847cecd5c9c6b5ddeb9367feda54a609
|
/zjmzxfzhl/zjmzxfzhl-common/zjmzxfzhl-common-redis/src/main/java/com/zjmzxfzhl/common/core/redis/RedisConfig.java
|
2cb57bf8de85b3b86c5ef61cafc4b50e67019a8c
|
[
"Apache-2.0"
] |
permissive
|
adulmyll/zjmzxfzhl
|
6eafd564715d8838cb865e53e8e5b430980a076c
|
d11e750060e34138611bcb234aea72fa4ecead45
|
refs/heads/master
| 2022-12-13T15:24:43.792026
| 2020-09-11T09:46:16
| 2020-09-11T09:46:16
| 295,737,304
| 1
| 0
|
Apache-2.0
| 2020-09-15T13:29:40
| 2020-09-15T13:29:40
| null |
UTF-8
|
Java
| false
| false
| 2,680
|
java
|
package com.zjmzxfzhl.common.core.redis;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import java.lang.reflect.Method;
/**
* @author 庄金明
* @date 2020年3月24日
*/
@Configuration
@EnableCaching
public class RedisConfig {
@Bean
public KeyGenerator keyGenerator() {
return new KeyGenerator() {
@Override
public Object generate(Object target, Method method, Object... params) {
StringBuilder sb = new StringBuilder();
sb.append(target.getClass().getName());
sb.append(method.getName());
for (Object obj : params) {
sb.append(obj.toString());
}
return sb.toString();
}
};
}
@Bean
public RedisTemplate<String, Object> redisTemplate(LettuceConnectionFactory lettuceConnectionFactory) {
// 设置序列化
Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer =
new Jackson2JsonRedisSerializer<Object>(Object.class);
ObjectMapper om = new ObjectMapper();
om.setVisibility(PropertyAccessor.ALL, Visibility.ANY);
om.enableDefaultTyping(DefaultTyping.NON_FINAL);
jackson2JsonRedisSerializer.setObjectMapper(om);
// 配置redisTemplate
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<String, Object>();
redisTemplate.setConnectionFactory(lettuceConnectionFactory);
RedisSerializer<?> stringSerializer = new StringRedisSerializer();
redisTemplate.setKeySerializer(stringSerializer);
redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);
redisTemplate.setHashKeySerializer(stringSerializer);
redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer);
redisTemplate.afterPropertiesSet();
return redisTemplate;
}
}
|
[
"zjm16@163.com"
] |
zjm16@163.com
|
dfc56b7e8c9508372dd67ff44a9d9cee4c5e3dfb
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/140/038/CWE477_Obsolete_Functions__DataInputStream_readLine_07.java
|
fd953c81bee627f180c62f7e163f7a9266716468
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 4,390
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE477_Obsolete_Functions__DataInputStream_readLine_07.java
Label Definition File: CWE477_Obsolete_Functions.label.xml
Template File: point-flaw-07.tmpl.java
*/
/*
* @description
* CWE: 477 Use of Obsolete Functions
* Sinks: DataInputStream_readLine
* GoodSink: Use of preferred BufferedReader.readLine() method
* BadSink : Use deprecated DataInputStream.readLine() method
* Flow Variant: 07 Control flow: if(privateFive==5) and if(privateFive!=5)
*
* */
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.DataInputStream;
public class CWE477_Obsolete_Functions__DataInputStream_readLine_07 extends AbstractTestCase
{
/* The variable below is not declared "final", but is never assigned
* any other value so a tool should be able to identify that reads of
* this will always give its initialized value.
*/
private int privateFive = 5;
public void bad() throws Throwable
{
if (privateFive == 5)
{
/* Read a line of user input from console with deprecated DataInputStream.readLine() method */
{
/* FLAW: Read input from the console using DataInputStream.readLine() */
DataInputStream streamDataInput = new DataInputStream(System.in);
String myString = streamDataInput.readLine();
IO.writeLine(myString); /* Use myString */
/* NOTE: Tools may report a flaw here because streamDataInput is not closed. Unfortunately, closing that will close System.in, which will cause any future attempts to read from the console to fail and throw an exception */
}
}
}
/* good1() changes privateFive==5 to privateFive!=5 */
private void good1() throws Throwable
{
if (privateFive != 5)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
IO.writeLine("Benign, fixed string");
}
else
{
/* Read a line of user input from console with preferred BufferedReader.readLine() method */
{
InputStreamReader readerInputStream = new InputStreamReader(System.in, "UTF-8");
BufferedReader readerBuffered = new BufferedReader(readerInputStream);
/* FIX: Read input from the console using preferred method BufferedReader.readLine() */
String myString = readerBuffered.readLine();
IO.writeLine(myString); /* Use myString */
/* NOTE: Tools may report a flaw here because readerBuffered and readerInputStream are not closed. Unfortunately, closing those will close System.in, which will cause any future attempts to read from the console to fail and throw an exception */
}
}
}
/* good2() reverses the bodies in the if statement */
private void good2() throws Throwable
{
if (privateFive == 5)
{
/* Read a line of user input from console with preferred BufferedReader.readLine() method */
{
InputStreamReader readerInputStream = new InputStreamReader(System.in, "UTF-8");
BufferedReader readerBuffered = new BufferedReader(readerInputStream);
/* FIX: Read input from the console using preferred method BufferedReader.readLine() */
String myString = readerBuffered.readLine();
IO.writeLine(myString); /* Use myString */
/* NOTE: Tools may report a flaw here because readerBuffered and readerInputStream are not closed. Unfortunately, closing those will close System.in, which will cause any future attempts to read from the console to fail and throw an exception */
}
}
}
public void good() throws Throwable
{
good1();
good2();
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
26bf7210bc7d0e4ca69945d707b8f01c43a2dac6
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/7/7_f3b5322c9ec9127659a30923b4eee561555a2a51/JFXTree/7_f3b5322c9ec9127659a30923b4eee561555a2a51_JFXTree_s.java
|
9e10a5fa4f69573b1ea8a5cfd61dc5cfc0deb608
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,289
|
java
|
/*
* Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
package com.sun.tools.javafx.tree;
import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.tree.JCTree.Visitor;
import com.sun.source.tree.TreeVisitor;
/**
* The base of the JavaFX AST
* well... except for things like statement which (at least for now) have to be subclassed
* off other parts of the JCTree.
*/
public abstract class JFXTree extends JCTree {
/** Initialize tree with given tag.
*/
protected JFXTree(int tag) {
super(tag);
}
public abstract void accept(JavafxVisitor v);
@Override
public void accept(Visitor v) {
if (v instanceof JavafxVisitor) {
this.accept((JavafxVisitor)v);
} else {
v.visitTree(this);
}
}
// stuff to ignore
@Override
public Kind getKind() {
throw new InternalError("not implemented");
}
@Override
public <R,D> R accept(TreeVisitor<R,D> v, D d) {
throw new InternalError("not implemented");
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
21247bb685f65687aac974d5cbcee7e877d73eaa
|
9560dc1b0a10fb8348f3ee584083da6eedeabb94
|
/Code/Service/src/com/valueBean/PhotoSingle.java
|
b1bccfad101e3dd635927f2682be993dfd00846b
|
[] |
no_license
|
Zurich1994/Fun-News
|
6f821e9c8eb47a40792695103a17f420238b750c
|
84c4e9ab015fd3babc04a0a5b97be0a92c20b621
|
refs/heads/master
| 2020-04-03T02:20:39.642194
| 2018-10-27T10:52:40
| 2018-10-27T10:52:40
| 154,953,591
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 972
|
java
|
package com.valueBean;
public class PhotoSingle {
private int photo_id;
private int user_id;
private String photoSrc;
private String photoInfo;
private String photoUptime;
public int getId() {
return photo_id;
}
public void setId(int user_id) {
this.user_id = user_id;
}
public int getPhotoWhoId() {
return user_id;
}
public void setPhotoWhoId(int user_id) {
this.user_id = user_id;
}
public String getPhotoSrc() {
return photoSrc;
}
public void setPhotoSrc(String photoSrc) {
this.photoSrc = photoSrc;
}
public String getPhotoInfo() {
return photoInfo;
}
public String getSubPhotoInfo() {
int len=9;
if(photoInfo.length()<=len)
return photoInfo;
else
return photoInfo.substring(0,len)+"...";
}
public void setPhotoInfo(String photoInfo) {
this.photoInfo = photoInfo;
}
public String getPhotoUptime() {
return photoUptime;
}
public void setPhotoUptime(String photoUptime) {
this.photoUptime = photoUptime;
}
}
|
[
"huanran.wang1994@foxmail.com"
] |
huanran.wang1994@foxmail.com
|
595b9c836af294510840a33389ef8f91e719dc8a
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2007-01-12/seasar2-2.4.8/s2-extension/src/main/java/org/seasar/extension/dxo/converter/impl/StringConverter.java
|
d3bbf8147fe3ff56342b06d9afc87f3276375502
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,164
|
java
|
/*
* Copyright 2004-2007 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.extension.dxo.converter.impl;
import java.text.DateFormat;
import java.util.Calendar;
import java.util.Date;
import org.seasar.extension.dxo.DxoConstants;
import org.seasar.extension.dxo.converter.ConversionContext;
/**
* @author Satoshi Kimura
* @author koichik
*/
public class StringConverter extends AbstractConverter {
public Class[] getSourceClasses() {
return new Class[] { Object.class };
}
public Class getDestClass() {
return String.class;
}
public Object convert(final Object source, final Class destClass,
final ConversionContext context) {
if (source == null) {
return null;
}
if (source instanceof String) {
return source;
}
if (source instanceof char[]) {
return new String((char[]) source);
}
if (source instanceof java.sql.Date) {
final DateFormat formatter = (DateFormat) context
.getContextInfo(DxoConstants.DATE_PATTERN);
if (formatter != null) {
return formatter.format((java.sql.Date) source);
}
}
if (source instanceof java.sql.Time) {
final DateFormat formatter = (DateFormat) context
.getContextInfo(DxoConstants.TIME_PATTERN);
if (formatter != null) {
return formatter.format((java.sql.Time) source);
}
}
if (source instanceof java.sql.Timestamp) {
final DateFormat formatter = (DateFormat) context
.getContextInfo(DxoConstants.TIMESTAMP_PATTERN);
if (formatter != null) {
return formatter.format((java.sql.Timestamp) source);
}
}
if (source instanceof Date) {
final DateFormat formatter = (DateFormat) context
.getContextInfo(DxoConstants.DATE_PATTERN);
if (formatter != null) {
return formatter.format((Date) source);
}
}
if (source instanceof Calendar) {
final DateFormat formatter = (DateFormat) context
.getContextInfo(DxoConstants.DATE_PATTERN);
if (formatter != null) {
return formatter.format(new Date(((Calendar) source)
.getTimeInMillis()));
}
}
return source.toString();
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
e3a41ec9cd5813c71d03a91f35453a932f74e387
|
8cd26bc2e6a8ee5bc37fd367154718614b5a0483
|
/echo/src/main/java/org/kaazing/nuklei/echo/internal/types/stream/DataFW.java
|
b92e3a8a0863864e328f4abba09f4de4290f8228
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
gitter-badger/nuklei
|
7dc5cdd82cb769dc6af46984c27778d7490b076b
|
128b219be68429d10f4fac26869a56b0c39ac18d
|
refs/heads/develop
| 2021-01-21T09:34:14.031868
| 2016-03-31T17:40:14
| 2016-03-31T17:40:14
| 56,720,060
| 0
| 0
| null | 2016-04-20T20:51:00
| 2016-04-20T20:51:00
| null |
UTF-8
|
Java
| false
| false
| 3,127
|
java
|
/**
* Copyright 2007-2015, Kaazing Corporation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kaazing.nuklei.echo.internal.types.stream;
import static org.kaazing.nuklei.echo.internal.types.stream.Types.TYPE_ID_DATA;
import org.kaazing.nuklei.echo.internal.types.Flyweight;
import uk.co.real_logic.agrona.BitUtil;
import uk.co.real_logic.agrona.DirectBuffer;
import uk.co.real_logic.agrona.MutableDirectBuffer;
public final class DataFW extends Flyweight
{
private static final int FIELD_OFFSET_STREAM_ID = 0;
private static final int FIELD_SIZE_STREAM_ID = BitUtil.SIZE_OF_LONG;
private static final int FIELD_OFFSET_PAYLOAD = FIELD_OFFSET_STREAM_ID + FIELD_SIZE_STREAM_ID;
private int limit;
@Override
public int limit()
{
return limit;
}
public DataFW wrap(DirectBuffer buffer, int offset, int actingLimit)
{
super.wrap(buffer, offset);
this.limit = actingLimit;
checkLimit(limit(), actingLimit);
return this;
}
public int typeId()
{
return TYPE_ID_DATA;
}
public long streamId()
{
return buffer().getLong(offset() + FIELD_OFFSET_STREAM_ID);
}
public int payloadOffset()
{
return offset() + FIELD_OFFSET_PAYLOAD;
}
public int payloadLength()
{
return limit() - payloadOffset();
}
@Override
public String toString()
{
return String.format("[streamId=%d,remaining=%d]", streamId(), length());
}
public static final class Builder extends Flyweight.Builder<DataFW>
{
public Builder()
{
super(new DataFW());
}
@Override
public Builder wrap(MutableDirectBuffer buffer, int offset, int maxLimit)
{
super.wrap(buffer, offset, maxLimit);
return this;
}
public Builder streamId(long streamId)
{
buffer().putLong(offset() + FIELD_OFFSET_STREAM_ID, streamId);
return this;
}
public int payloadOffset()
{
return offset() + FIELD_OFFSET_PAYLOAD;
}
public Builder payload(DirectBuffer buffer, int offset, int length)
{
buffer().putBytes(payloadOffset(), buffer, offset, length);
payloadLength(length);
return this;
}
public Builder payloadLength(int payloadLength)
{
assert (payloadLength >= 0);
maxLimit(offset() + FIELD_OFFSET_PAYLOAD + payloadLength);
return this;
}
}
}
|
[
"john.fallows@kaazing.com"
] |
john.fallows@kaazing.com
|
dee68db8e075dd53bde29141ac0a4baef800394e
|
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
|
/src/main/java/com/google/android/gms/internal/clearcut/zzee.java
|
bdb5a22dbb1a3045c268aa7970ef616dbed39733
|
[] |
no_license
|
redpicasso/fluffy-octo-robot
|
c9b98d2e8745805edc8ddb92e8afc1788ceadd08
|
b2b62d7344da65af7e35068f40d6aae0cd0835a6
|
refs/heads/master
| 2022-11-15T14:43:37.515136
| 2020-07-01T22:19:16
| 2020-07-01T22:19:16
| 276,492,708
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 938
|
java
|
package com.google.android.gms.internal.clearcut;
final class zzee {
private final String info;
private int position = 0;
zzee(String str) {
this.info = str;
}
final boolean hasNext() {
return this.position < this.info.length();
}
final int next() {
String str = this.info;
int i = this.position;
this.position = i + 1;
char charAt = str.charAt(i);
if (charAt < 55296) {
return charAt;
}
int i2 = charAt & 8191;
int i3 = 13;
while (true) {
String str2 = this.info;
int i4 = this.position;
this.position = i4 + 1;
char charAt2 = str2.charAt(i4);
if (charAt2 < 55296) {
return i2 | (charAt2 << i3);
}
i2 |= (charAt2 & 8191) << i3;
i3 += 13;
}
}
}
|
[
"aaron@goodreturn.org"
] |
aaron@goodreturn.org
|
73cfa9b031964b3a38c5ec209c9fefae1d60511e
|
18c70f2a4f73a9db9975280a545066c9e4d9898e
|
/rtz/mirror-rtz-indication/src/main/java/com/aspire/mirror/indication/realnational/actual/RtzWireLineUserHandler.java
|
20386b00052ca3fe492c71ffa4c102b328175a7b
|
[] |
no_license
|
iu28igvc9o0/cmdb_aspire
|
1fe5d8607fdacc436b8a733f0ea44446f431dfa8
|
793eb6344c4468fe4c61c230df51fc44f7d8357b
|
refs/heads/master
| 2023-08-11T03:54:45.820508
| 2021-09-18T01:47:25
| 2021-09-18T01:47:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,730
|
java
|
package com.aspire.mirror.indication.realnational.actual;
import com.aspire.mirror.util.IndicationConst;
import com.aspire.mirror.util.IndicationUtils;
import com.aspire.mirror.util.WSDLUtil;
import net.sf.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
/**
* 有线用户占比
*/
public class RtzWireLineUserHandler extends AbstractActualFactory<RtzWireLineUserHandler> {
@Override
public void callWsdl() {
List<String> dateList = new ArrayList<String>();
dateList.add(endTime.substring(0,8));
WSDLUtil wsdlUtil = new WSDLUtil();
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
super.SDK_RESULT_MAP = wsdlUtil.getWsdlServiceReturnMap(classLoader, wsdl, itemEntity.getMethod(),
dateList, null, null, null, null, IndicationConst.QUERY_MONGODB_TYPE_ALL);
}
@Override
public void executePrimaryItem() {
String calcDay = endTime.substring(0,8);
long lineUser = 0L, noLineUser = 0;
Double allUser = 0.0;
if (super.SDK_RESULT_MAP != null && super.SDK_RESULT_MAP.size() > 0) {
JSONObject jsonValue = JSONObject.fromObject(super.SDK_RESULT_MAP.get(calcDay));
noLineUser = IndicationUtils.getLong(jsonValue.get("programuser_0"));
lineUser = IndicationUtils.getLong(jsonValue.get("programuser_1"));
allUser = IndicationUtils.formatSum(noLineUser, lineUser);
}
Double rate = IndicationUtils.formatDivide(lineUser * 100, allUser);
super.addItemResult(super.endTime, IndicationConst.COUNTRY_PROVINCE_CODE, itemEntity.getMirrorColumn(), rate);
}
@Override
public void executeOtherItem() {
}
}
|
[
"jiangxuwen7515@163.com"
] |
jiangxuwen7515@163.com
|
2759870e5eaa936aa299d980d4615b42e4404b9c
|
53ec01fa57d9cdc7e7fd3364990713d211e1c414
|
/ABC174/e/Main.java
|
7c072166b6212047bf78314fb661dd9d7588577b
|
[] |
no_license
|
nekoTheShadow/atcoder-answers
|
4f2cae82ac2b24df4153c43381ce58084647704c
|
461e5a9b00718fd9a3b19dc6071da0fb3192f34e
|
refs/heads/master
| 2022-02-03T18:24:01.673661
| 2022-01-24T14:43:44
| 2022-01-24T14:43:44
| 165,072,722
| 0
| 0
| null | 2020-03-22T13:25:56
| 2019-01-10T14:19:52
|
Java
|
UTF-8
|
Java
| false
| false
| 4,722
|
java
|
package e;
import java.io.BufferedReader;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.UncheckedIOException;
import java.lang.reflect.Array;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Deque;
import java.util.Objects;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
public class Main {
public void exec() {
int n = stdin.nextInt();
int k = stdin.nextInt();
int[] a = stdin.nextIntArray(n);
int ng = 1 - 1;
int ok = 1000000000 + 1;
while (Math.abs(ok - ng) > 1) {
int mi = (ok + ng) / 2;
int c = 0;
for (int v : a) {
if (v % mi == 0) {
c += (v / mi) - 1;
} else {
c += (v / mi + 1) - 1;
}
}
if (c <= k) {
ok = mi;
} else {
ng = mi;
}
}
stdout.println(ok);
}
private static final Stdin stdin = new Stdin();
private static final Stdout stdout = new Stdout();
public static void main(String[] args) {
try {
new Main().exec();
} finally {
stdout.flush();
}
}
public static class Stdin {
private BufferedReader stdin;
private Deque<String> tokens;
private Pattern delim;
public Stdin() {
stdin = new BufferedReader(new InputStreamReader(System.in));
tokens = new ArrayDeque<>();
delim = Pattern.compile(" ");
}
public String nextString() {
try {
if (tokens.isEmpty()) {
String line = stdin.readLine();
if (line == null) {
throw new UncheckedIOException(new EOFException());
}
delim.splitAsStream(line).forEach(tokens::addLast);
}
return tokens.pollFirst();
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
public int nextInt() {
return Integer.parseInt(nextString());
}
public double nextDouble() {
return Double.parseDouble(nextString());
}
public long nextLong() {
return Long.parseLong(nextString());
}
public String[] nextStringArray(int n) {
String[] a = new String[n];
for (int i = 0; i < n; i++) a[i] = nextString();
return a;
}
public int[] nextIntArray(int n) {
int[] a = new int[n];
for (int i = 0; i < n; i++) a[i] = nextInt();
return a;
}
public double[] nextDoubleArray(int n) {
double[] a = new double[n];
for (int i = 0; i < n; i++) a[i] = nextDouble();
return a;
}
public long[] nextLongArray(int n) {
long[] a = new long[n];
for (int i = 0; i < n; i++) a[i] = nextLong();
return a;
}
}
public static class Stdout {
private PrintWriter stdout;
public Stdout() {
stdout = new PrintWriter(System.out, false);
}
public void printf(String format, Object ... args) {
String line = String.format(format, args);
if (line.endsWith(System.lineSeparator())) {
stdout.print(line);
} else {
stdout.println(line);
}
}
public void println(Object ... objs) {
String line = Arrays.stream(objs).map(Objects::toString).collect(Collectors.joining(" "));
stdout.println(line);
}
public void printDebug(Object ... objs) {
String line = Arrays.stream(objs).map(this::deepToString).collect(Collectors.joining(" "));
stdout.printf("DEBUG: %s%n", line);
stdout.flush();
}
private String deepToString(Object o) {
if (o == null) {
return "null";
}
// 配列の場合
if (o.getClass().isArray()) {
int len = Array.getLength(o);
String[] tokens = new String[len];
for (int i = 0; i < len; i++) {
tokens[i] = deepToString(Array.get(o, i));
}
return "{" + String.join(",", tokens) + "}";
}
return Objects.toString(o);
}
private void flush() {
stdout.flush();
}
}
}
|
[
"h.nakamura0903@gmail.com"
] |
h.nakamura0903@gmail.com
|
3ca8c32759024bf1508eb8a6483792da75781be6
|
62cc557b43fb928a16f70b01bd83f45429b1103c
|
/editor/plugins/org.fusesource.ide.launcher/src/org/fusesource/ide/launcher/debug/model/values/BaseCamelValue.java
|
81427a159e0c660e24017e3255f5c9df20c63b21
|
[] |
no_license
|
cominvent/fuseide
|
f40ab291aad7ec7f063659406e019bc4a1b17183
|
6fe7f077743db39a8c7b8e8c0ee1e3b8cac1edaa
|
refs/heads/master
| 2021-01-18T18:48:17.542452
| 2015-03-05T14:00:25
| 2015-03-05T14:04:25
| 31,892,473
| 0
| 1
| null | 2015-03-09T10:38:39
| 2015-03-09T10:38:39
| null |
UTF-8
|
Java
| false
| false
| 2,731
|
java
|
/*******************************************************************************
* Copyright (c) 2014 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.fusesource.ide.launcher.debug.model.values;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IValue;
import org.eclipse.debug.core.model.IVariable;
import org.fusesource.ide.launcher.debug.model.CamelDebugElement;
import org.fusesource.ide.launcher.debug.model.CamelDebugTarget;
import org.fusesource.ide.launcher.debug.model.variables.IVariableConstants;
/**
* Value of a Camel variable.
*
* @author lhein
*/
public class BaseCamelValue extends CamelDebugElement implements IValue, IVariableConstants {
private String fValue;
private Class fType;
/**
* creates a value
*
* @param target
* @param value
* @param type
*/
public BaseCamelValue(CamelDebugTarget target, String value, Class type) {
super(target);
this.fValue = value;
this.fType = type;
}
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IValue#getReferenceTypeName()
*/
public String getReferenceTypeName() throws DebugException {
return String.format("%s (id=%d)", getVariableDisplayString(), getVariableIDCode());
}
/**
* returns the value shown as ID in the variables view
*
* @return
* @throws DebugException
*/
protected int getVariableIDCode() throws DebugException {
return fValue.hashCode();
}
/**
* returns the string shown as variable name
*
* @return
*/
protected String getVariableDisplayString() {
return this.fType.getName();
}
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IValue#getValueString()
*/
public String getValueString() throws DebugException {
if (hasVariables()) {
// node with children / composite object
return getReferenceTypeName();
}
return this.fValue;
}
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IValue#isAllocated()
*/
public boolean isAllocated() throws DebugException {
return true;
}
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IValue#getVariables()
*/
public IVariable[] getVariables() throws DebugException {
return new IVariable[0];
}
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IValue#hasVariables()
*/
public boolean hasVariables() throws DebugException {
return false;
}
}
|
[
"lhein@apache.org"
] |
lhein@apache.org
|
d94cc4cb2403fa4137ef2f87a49f265e0caa3c19
|
31455637f007fd29304ee7c803045397a2812e11
|
/MerculetSDK/src/main/java/cn/magicwindow/uav/sdk/http/HttpFactory.java
|
ac1943b353f7fe26c3b1ec2f148b46ac3eaf9b07
|
[
"Apache-2.0"
] |
permissive
|
Merculet/UAVAndroidSDK
|
326bdc176215091ae52ff5e81c1db995f648ee47
|
4b2d4c67679fef3799800bef8aeb9befa225bdf7
|
refs/heads/master
| 2020-03-12T07:47:29.344629
| 2018-11-09T03:34:52
| 2018-11-09T03:34:52
| 130,513,694
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,218
|
java
|
package cn.magicwindow.uav.sdk.http;
import android.content.Context;
import android.graphics.Bitmap;
import cn.magicwindow.uav.sdk.MConfiguration;
import cn.magicwindow.uav.sdk.util.LruCache;
/**
* Created by aaron on 15/6/30.
*/
public class HttpFactory {
private static volatile HttpFactory defaultInstance;
private RequestQueue mRequestQueue;
private ImageLoader mImageLoader;
private HttpFactory(Context context) {
MConfiguration.get().initContext(context);
mRequestQueue = getRequestQueue();
}
/**
* Convenience singleton for apps using a process-wide HttpClient instance.
* 由于客户可能将MWImageView用在开启启动画面,而此时MWConfiguration有可能还未初始化,
* 此时需要从此处初始化context.getApplicationContext()。
* 所以必须要传context
*/
public static HttpFactory getInstance(Context context) {
if (defaultInstance == null) {
synchronized (HttpFactory.class) {
if (defaultInstance == null) {
defaultInstance = new HttpFactory(context.getApplicationContext());
}
}
}
return defaultInstance;
}
public RequestQueue getRequestQueue() {
if (mRequestQueue == null) {
mRequestQueue = MWHttp.newRequestQueue();
}
return mRequestQueue;
}
public void addToRequestQueue(Request req) {
getRequestQueue().addRequest(req);
}
public ImageLoader getImageLoader() {
if(mImageLoader ==null){
mImageLoader = new ImageLoader(mRequestQueue,
new ImageLoader.ImageCache() {
private final LruCache<String, Bitmap> cache = new LruCache<>(20);
@Override
public Bitmap getBitmap(String url) {
return cache.get(url);
}
@Override
public void putBitmap(String url, Bitmap bitmap) {
cache.put(url, bitmap);
}
});
}
return mImageLoader;
}
}
|
[
"fengzhizi715@126.com"
] |
fengzhizi715@126.com
|
39e8083ec652adeabc2cb7b9fd5b09b09c096cea
|
a0071a9c08916968d429f9db2ed8730cac42f2d7
|
/src/main/java/br/gov/caixa/arqrefservices/dominio/econsig/autorizarReserva/AutorizarReservaDadosRET.java
|
a69a02b227b67b31a9eeb2318a7b1b4877bb03b4
|
[] |
no_license
|
MaurilioDeveloper/arqref
|
a62ea7fe009941077d3778131f7cddc9d5162ea4
|
7f186fc3fc769e1b30d16e6339688f29b41d828a
|
refs/heads/master
| 2020-03-22T14:57:59.419703
| 2018-07-09T02:04:59
| 2018-07-09T02:04:59
| 140,218,663
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,179
|
java
|
package br.gov.caixa.arqrefservices.dominio.econsig.autorizarReserva;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import br.gov.caixa.arqrefservices.dominio.econsig.Boleto;
import br.gov.caixa.arqrefservices.dominio.econsig.Historico;
import br.gov.caixa.arqrefservices.dominio.econsig.Resumo;
@XmlRootElement(name="ns10:autorizarReservaResponse")
@XmlType(propOrder={"sucesso","codRetorno","mensagem","boleto","historicos","resumos"})
@XmlSeeAlso({Boleto.class,Historico.class,Resumo.class})
public class AutorizarReservaDadosRET implements Serializable {
private static final long serialVersionUID = -3694150633496701565L;
private Boleto boleto;
private Integer codRetorno;
private List<Historico> historicos;
private String mensagem;
private List<Resumo> resumos;
private Boolean sucesso;
@XmlAttribute(name = "xmlns:ns10")
private String xmlns_soapenv = "HostaHostService";
@XmlElement(name="ns1:boleto")
public Boleto getBoleto() {
return boleto;
}
@XmlElement(name="ns10:codRetorno")
public Integer getCodRetorno() {
return codRetorno;
}
@XmlElement(name="ns4:historicos")
public List<Historico> getHistoricos() {
return historicos;
}
@XmlElement(name="ns10:mensagem")
public String getMensagem() {
return mensagem;
}
@XmlElement(name="ns5:resumos")
public List<Resumo> getResumos() {
return resumos;
}
@XmlElement(name="ns10:sucesso")
public Boolean getSucesso() {
return sucesso;
}
public void setBoleto(Boleto boleto) {
this.boleto = boleto;
}
public void setCodRetorno(Integer codRetorno) {
this.codRetorno = codRetorno;
}
public void setHistoricos(List<Historico> historicos) {
this.historicos = historicos;
}
public void setMensagem(String mensagem) {
this.mensagem = mensagem;
}
public void setResumos(List<Resumo> resumos) {
this.resumos = resumos;
}
public void setSucesso(Boolean sucesso) {
this.sucesso = sucesso;
}
}
|
[
"marlonspinf@gmail.com"
] |
marlonspinf@gmail.com
|
e02425618a7897615263bcf63c256217a0192787
|
04fbd5fb9c22eb0ec5ac6b000ea0e4da3f5380f6
|
/JProgramming/src/lesson8/streams/IntToByte.java
|
747221b4cb98a25664a3edf81d48ad27d5eabcc8
|
[] |
no_license
|
PetroRulov/COURSE-JAVA-PROGRAMMER
|
56be01254d7112b1f915ddbaa681cafbbdbfd8e0
|
24260c12f052bfb543ef91dcf7e38b434113611d
|
refs/heads/master
| 2021-01-23T21:48:11.950605
| 2019-02-19T19:06:20
| 2019-02-19T19:06:20
| 56,302,822
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 240
|
java
|
package lesson8.streams;
/**
* Created by prulov on 30.06.2016.
*/
public class IntToByte {
public static void main(String[] args) {
for(int i = 0; i < 300; i++){
System.out.println((byte) i);
}
}
}
|
[
"prulov.pr@gmail.com"
] |
prulov.pr@gmail.com
|
7d59ed41817cd49e4926037dd8c77d7a1adba1ca
|
61c6164c22142c4369d525a0997b695875865e29
|
/middleware/src/main/java/com/spirit/facturacion/session/PersonalizacionLogoDisenioSessionService.java
|
55cc64fd09a3a1cecfc15b969908604d92401493
|
[] |
no_license
|
xruiz81/spirit-creacional
|
e5a6398df65ac8afa42be65886b283007d190eae
|
382ee7b1a6f63924b8eb895d4781576627dbb3e5
|
refs/heads/master
| 2016-09-05T14:19:24.440871
| 2014-11-10T17:12:34
| 2014-11-10T17:12:34
| 26,328,756
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 302
|
java
|
package com.spirit.facturacion.session;
import com.spirit.facturacion.session.generated._PersonalizacionLogoDisenioSessionService;
/**
*
* @author www.versality.com.ec
*
*/
public interface PersonalizacionLogoDisenioSessionService extends _PersonalizacionLogoDisenioSessionService{
}
|
[
"xruiz@creacional.com"
] |
xruiz@creacional.com
|
8ae769ae3b476f0227309b2efa2e7385e0417d1e
|
ec95ec759f3d3270967aa4e59dffddfec9f4a80f
|
/LeetCode_Dynamic_Programming/src/Le_303_Range_Sum_Query_Immutable.java
|
b70dc8a9845e3e4bbaa150b0cf180a1cc86039dd
|
[] |
no_license
|
guccio618/myLeetcode
|
3ccf037f0b917c13967e2bbbee7d04ff8dba68bc
|
a51c874144964435fca7752b83dcbcc52db37a4b
|
refs/heads/master
| 2021-01-13T14:59:31.182538
| 2017-01-26T04:47:40
| 2017-01-26T04:47:40
| 76,620,835
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,235
|
java
|
/****
*
Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.
Example:
Given nums = [-2, 0, 3, -5, 2, -1]
sumRange(0, 2) -> 1
sumRange(2, 5) -> -1
sumRange(0, 5) -> -3
Note:
You may assume that the array does not change.
There are many calls to sumRange function.
*
* */
public class Le_303_Range_Sum_Query_Immutable {
private int[] sum;
public Le_303_Range_Sum_Query_Immutable(int[] nums) {
sum = new int[nums.length];
for(int i = 0; i < nums.length; i++) {
sum[i] = (i == 0) ? nums[i] : sum[i-1] + nums[i];
}
}
public int sumRange(int i, int j) {
if(i < 0 || i >= sum.length || j < 0 || j >= sum.length || i > j) {
return -1;
}
return (i == 0) ? sum[j] : sum[j] - sum[i-1];
}
/***** main function ******/
public static void main(String[] args){
int[] nums = {-2, 0, 3, -5, 2, -1};
Le_303_Range_Sum_Query_Immutable t = new Le_303_Range_Sum_Query_Immutable(nums);
System.out.println(t.sumRange(0, 2));
System.out.println(t.sumRange(2, 5));
System.out.println(t.sumRange(0, 5));
}
}
|
[
"jackiechan618@hotmail.com"
] |
jackiechan618@hotmail.com
|
4846bfae1c4422a9ab97e2f97b361c8a4dec2c6f
|
5e4373d6d7f9505b6d813309b5c9fc22cab9ad3f
|
/Java_05/src/javaAWT/XOR.java
|
8ca1c9b40ff6be4c3ac784bcd202eda336010d9b
|
[] |
no_license
|
PavloShchur/Java_05
|
0096b1226406948bc06cf8e96227737d5ea2d61d
|
234254c5b413a6927acfa4b456565c7045cfbdf8
|
refs/heads/master
| 2021-01-20T06:07:39.159879
| 2018-06-27T20:03:46
| 2018-06-27T20:03:46
| 89,798,062
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,233
|
java
|
package javaAWT;
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
public class XOR extends Applet {
int chsX = 100, chsY = 100;
public XOR () {
addMouseMotionListener(new MouseMotionListener() {
@Override
public void mouseMoved(MouseEvent me) {
int x = me.getX();
int y = me.getY();
chsX = x - 10;
chsY = y - 10;
repaint();
}
@Override
public void mouseDragged(MouseEvent e) {
// TODO Auto-generated method stub
}
});
}
public void paint (Graphics g) {
g.drawLine(0, 0, 100, 100);
g.drawLine(0, 100, 100, 0);
g.setColor(Color.BLUE);
g.drawLine(40, 25, 250, 180);
g.drawLine(75, 90, 400, 400);
g.setColor(Color.GREEN);
g.drawRect(10, 10, 60, 50);
g.setColor(Color.RED);
g.drawRoundRect(190, 10, 60, 50, 15, 15);
g.fillRoundRect(70, 90, 140, 100, 30, 40);
g.setColor(Color.CYAN);
g.drawLine(5, 290, 80, 19);
g.setXORMode(Color.BLACK);
g.drawLine(chsX - 10, chsY, chsX + 10, chsY);
g.drawLine(chsY, chsY - 10, chsX, chsY + 10);
g.setPaintMode();
}
}
|
[
"pavloshchur@gmail.com"
] |
pavloshchur@gmail.com
|
9a0ee38e6f7d6dc9ef0c0c0c6ec6a6f00ba6ef48
|
9616a0b134151ff60d30a806c644136a57145587
|
/src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/ext/field/index/fulltext/FulltextIndexFieldExtension.java
|
bb01c71baf3004cccacb5330048e4500e2e96aa8
|
[
"MIT"
] |
permissive
|
rajendrag/guice-persist-orient
|
0967fe1c65d48a80e3aff1e08aeb8e7091c5e723
|
4ad81d19c8252651aa2f2f16026e91fa5b4b0830
|
refs/heads/master
| 2021-01-01T16:41:47.528995
| 2017-03-30T04:16:39
| 2017-03-30T04:16:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,759
|
java
|
package ru.vyarus.guice.persist.orient.db.scheme.initializer.ext.field.index.fulltext;
import com.google.common.base.MoreObjects;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.orientechnologies.orient.core.index.OIndex;
import com.orientechnologies.orient.core.metadata.schema.OClass;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.object.db.OObjectDatabaseTx;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.vyarus.guice.persist.orient.db.scheme.initializer.core.spi.SchemeDescriptor;
import ru.vyarus.guice.persist.orient.db.scheme.initializer.core.spi.field.FieldExtension;
import ru.vyarus.guice.persist.orient.db.scheme.initializer.ext.field.index.IndexValidationSupport;
import javax.inject.Singleton;
import java.lang.reflect.Field;
/**
* {@link FulltextIndex} scheme model field extension.
*
* @author Vyacheslav Rusakov
* @since 14.06.2015
*/
@Singleton
public class FulltextIndexFieldExtension implements FieldExtension<FulltextIndex> {
public static final String INDEX_RADIX = "indexRadix";
public static final String IGNORE_CHARS = "ignoreChars";
public static final String SEPARATOR_CHARS = "separatorChars";
public static final String MIN_WORD_LENGTH = "minWordLength";
public static final String STOP_WORDS = "stopWords";
private final Logger logger = LoggerFactory.getLogger(FulltextIndexFieldExtension.class);
@Override
public void beforeRegistration(final OObjectDatabaseTx db, final SchemeDescriptor descriptor,
final Field field, final FulltextIndex annotation) {
// not needed
}
@Override
public void afterRegistration(final OObjectDatabaseTx db, final SchemeDescriptor descriptor,
final Field field, final FulltextIndex annotation) {
final String property = field.getName();
final String model = descriptor.schemeClass;
final String name = MoreObjects.firstNonNull(
Strings.emptyToNull(annotation.name().trim()), model + '.' + property);
final OClass clazz = db.getMetadata().getSchema().getClass(model);
final OIndex<?> classIndex = clazz.getClassIndex(name);
final OClass.INDEX_TYPE type = annotation.useHashIndex()
? OClass.INDEX_TYPE.FULLTEXT_HASH_INDEX : OClass.INDEX_TYPE.FULLTEXT;
if (!descriptor.initialRegistration && classIndex != null) {
final IndexValidationSupport support = new IndexValidationSupport(classIndex, logger);
support.checkTypeCompatible(OClass.INDEX_TYPE.FULLTEXT, OClass.INDEX_TYPE.FULLTEXT_HASH_INDEX);
support.checkFieldsCompatible(property);
final boolean correct = isIndexCorrect(support, type, annotation);
if (!correct) {
support.dropIndex(db);
} else {
// index ok
return;
}
}
final ODocument metadata = createMetadata(annotation);
clazz.createIndex(name, type.name(), null, metadata, null, new String[]{property});
logger.info("Fulltext index '{}' ({} [{}]) {} created", name, model, property, type);
}
private boolean isIndexCorrect(final IndexValidationSupport support, final OClass.INDEX_TYPE type,
final FulltextIndex annotation) {
final OIndex classIndex = support.getIndex();
final ODocument metadata = classIndex.getConfiguration();
final Iterable<String> field = metadata.field(STOP_WORDS);
return support
.isIndexSigns(metadata.field(INDEX_RADIX),
metadata.field(IGNORE_CHARS),
metadata.field(SEPARATOR_CHARS),
metadata.field(MIN_WORD_LENGTH),
Sets.newHashSet(field))
.matchRequiredSigns(type, annotation.indexRadix(),
annotation.ignoreChars(),
annotation.separatorChars(),
annotation.minWordLength(),
Sets.newHashSet(annotation.stopWords()));
}
private ODocument createMetadata(final FulltextIndex annotation) {
final ODocument metadata = new ODocument();
metadata.field(INDEX_RADIX, annotation.indexRadix());
metadata.field(STOP_WORDS, Lists.newArrayList(annotation.stopWords()));
metadata.field(SEPARATOR_CHARS, annotation.separatorChars());
metadata.field(IGNORE_CHARS, annotation.ignoreChars());
metadata.field(MIN_WORD_LENGTH, annotation.minWordLength());
return metadata;
}
}
|
[
"vyarus@gmail.com"
] |
vyarus@gmail.com
|
bcadacd2705892b9536625f6b6fca719540a11f2
|
58f49465c0c4dba0e5fefee9bdbcae95a3c95c78
|
/boot-for-es/src/main/java/com/es/enums/SmsUidTypeEnum.java
|
9db98f51a77bd2cd188294335344d62696a59d15
|
[] |
no_license
|
CzyerChen/springboot-forall
|
58cbf258321f968cd504f5fd8ab482b4569194ea
|
9de94518f5a78bc7fd7d75b52c7b1e9d457442a5
|
refs/heads/master
| 2023-08-29T14:11:55.279927
| 2023-08-09T05:38:03
| 2023-08-09T05:38:03
| 173,884,467
| 3
| 4
| null | 2023-02-21T03:04:43
| 2019-03-05T06:02:10
|
Java
|
UTF-8
|
Java
| false
| false
| 1,251
|
java
|
/**
* Author: claire
* Date: 2022/8/8 - 10:24 上午
* Description:
* History:
* <author> <time> <version> <desc>
* claire 2022/8/8 - 10:24 上午 V1.0.0
*/
package com.es.enums;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
/**
* 功能简述
* 〈〉
*
* @author claire
* @date 2022/8/8 - 10:24 上午
* @since 1.0.0
*/
public enum SmsUidTypeEnum {
MOBILE(0, "手机号码"),
IMEI(11, "imei");
private final int value;
private final String name;
private static final Map<Integer, SmsUidTypeEnum> lookup;
SmsUidTypeEnum(int value, String name) {
this.value = value;
this.name = name;
}
static {
lookup = new HashMap<>();
for (SmsUidTypeEnum e : EnumSet.allOf(SmsUidTypeEnum.class)) {
lookup.put(Integer.valueOf(e.value), e);
}
}
public static SmsUidTypeEnum find(Integer value) {
if (value == null) {
return null;
}
SmsUidTypeEnum data = lookup.get(value);
return data;
}
public int getValue() {
return this.value;
}
public String getName() {
return this.name;
}
}
|
[
"clairelove.chen@gmail.com"
] |
clairelove.chen@gmail.com
|
187648d5c4fb81fc4430b0f24f2e14e42f28ccdb
|
9b60f3edae851ac61b2db4bce2932f425d39eeae
|
/src/main/java/lk/sonali_bookshop/asset/employee/service/EmployeeFilesService.java
|
f4b2e5e9d8ea9877e3ea2ff3d5570e10bce01a8c
|
[] |
no_license
|
LalithK90/sonaliBookshop
|
ded56b01e77de3a7c9d4cb2e3f8f49d213236ded
|
8ebed8abc93cd77f3e76f35f65236a30051eeefc
|
refs/heads/master
| 2021-05-18T03:20:14.615174
| 2021-05-01T06:04:32
| 2021-05-01T06:04:32
| 251,080,762
| 0
| 2
| null | 2021-04-24T14:43:21
| 2020-03-29T16:39:27
|
HTML
|
UTF-8
|
Java
| false
| false
| 2,630
|
java
|
package lk.sonali_bookshop.asset.employee.service;
import lk.sonali_bookshop.asset.common_asset.model.FileInfo;
import lk.sonali_bookshop.asset.employee.controller.EmployeeController;
import lk.sonali_bookshop.asset.employee.dao.EmployeeFilesDao;
import lk.sonali_bookshop.asset.employee.entity.Employee;
import lk.sonali_bookshop.asset.employee.entity.EmployeeFiles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.ExampleMatcher;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder;
import java.util.List;
@Service
@CacheConfig(cacheNames = "employeeFiles")
public class EmployeeFilesService {
private final EmployeeFilesDao employeeFilesDao;
@Autowired
public EmployeeFilesService(EmployeeFilesDao employeeFilesDao) {
this.employeeFilesDao = employeeFilesDao;
}
public EmployeeFiles findByName(String filename) {
return employeeFilesDao.findByName(filename);
}
public void persist(EmployeeFiles storedFile) {
employeeFilesDao.save(storedFile);
}
public List<EmployeeFiles> search(EmployeeFiles employeeFiles) {
ExampleMatcher matcher = ExampleMatcher
.matching()
.withIgnoreCase()
.withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING);
Example<EmployeeFiles> employeeFilesExample = Example.of(employeeFiles, matcher);
return employeeFilesDao.findAll(employeeFilesExample);
}
public EmployeeFiles findById(Integer id) {
return employeeFilesDao.getOne(id);
}
public EmployeeFiles findByNewID(String filename) {
return employeeFilesDao.findByNewId(filename);
}
@Cacheable
public FileInfo employeeFileDownloadLinks(Employee employee) {
EmployeeFiles employeeFiles = employeeFilesDao.findByEmployee(employee);
if (employeeFiles != null) {
String filename = employeeFiles.getName();
String url = MvcUriComponentsBuilder
.fromMethodName(EmployeeController.class, "downloadFile", employeeFiles.getNewId())
.build()
.toString();
return new FileInfo(filename, employeeFiles.getCreatedAt(), url);
}
return null;
}
public EmployeeFiles findByEmployee(Employee employee) {
return employeeFilesDao.findByEmployee(employee);
}
}
|
[
"asakahatapitiya@gmail.com"
] |
asakahatapitiya@gmail.com
|
b7af9c1bae9a6371dc967d1d47d1f82f5a027029
|
172a3aba369d70e568288909b5016d72f5a12387
|
/json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/Node.java
|
afa17646c7d1436a466a8a03d3a0be4f72948c2e
|
[
"Apache-2.0"
] |
permissive
|
technologycoder/JsonUnit
|
3b3eeb64793f6a2cdeaa120d47e96dd2ffe8615e
|
92930871c2660becbce17a9a818b8448df0c95a1
|
refs/heads/master
| 2020-03-09T14:07:59.927562
| 2018-03-04T17:47:25
| 2018-03-04T17:47:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,256
|
java
|
/**
* Copyright 2009-2017 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 net.javacrumbs.jsonunit.core.internal;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.Set;
import static java.util.Collections.unmodifiableCollection;
import static java.util.Collections.unmodifiableMap;
/**
* For internal use only!!! Abstract node representation.
*/
public interface Node {
enum NodeType implements ValueExtractor {
OBJECT("object") {
public Object getValue(Node node) {
// custom conversion to map. We want be consistent and native mapping may have different rules for
// serializing numbers, dates etc.
Map<String, Object> result = new LinkedHashMap<String, Object>();
Iterator<KeyValue> fields = node.fields();
while (fields.hasNext()) {
KeyValue keyValue = fields.next();
result.put(keyValue.getKey(), keyValue.getValue().getValue());
}
return unmodifiableMap(result);
}
},
ARRAY("array") {
public Object getValue(Node node) {
Iterator<Node> nodeIterator = node.arrayElements();
LinkedList<Object> result = new LinkedList<Object>();
while (nodeIterator.hasNext()) {
Node arrayNode = nodeIterator.next();
result.add(arrayNode.getValue());
}
return unmodifiableCollection(result);
}
},
STRING("string") {
public Object getValue(Node node) {
return node.asText();
}
},
NUMBER("number") {
public Object getValue(Node node) {
return node.decimalValue();
}
},
BOOLEAN("boolean") {
public Object getValue(Node node) {
return node.asBoolean();
}
},
NULL("null") {
public Object getValue(Node node) {
return null;
}
};
private final String description;
NodeType(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
}
Node element(int index);
Iterator<KeyValue> fields();
Node get(String key);
boolean isMissingNode();
boolean isNull();
Iterator<Node> arrayElements();
/**
* Array length
*/
int size();
String asText();
NodeType getNodeType();
BigDecimal decimalValue();
Boolean asBoolean();
Object getValue();
void ___do_not_implement_this_interface_seriously();
class KeyValue {
private final String key;
private final Node value;
public KeyValue(String key, Node value) {
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public Node getValue() {
return value;
}
}
Node MISSING_NODE = new Node() {
public boolean isArray() {
return false;
}
public Node element(int index) {
return MISSING_NODE;
}
public Iterator<KeyValue> fields() {
Set<KeyValue> emptySet = Collections.emptySet();
return emptySet.iterator();
}
public Node get(String key) {
return this;
}
public boolean isMissingNode() {
return true;
}
public boolean isNull() {
return false;
}
public Iterator<Node> arrayElements() {
Set<Node> emptySet = Collections.emptySet();
return emptySet.iterator();
}
public int size() {
return 0;
}
public String asText() {
throw new UnsupportedOperationException();
}
public NodeType getNodeType() {
throw new UnsupportedOperationException();
}
public BigDecimal decimalValue() {
throw new UnsupportedOperationException();
}
public Boolean asBoolean() {
throw new UnsupportedOperationException();
}
public Object getValue() {
throw new UnsupportedOperationException();
}
public void ___do_not_implement_this_interface_seriously() {}
};
interface ValueExtractor {
Object getValue(Node node);
}
}
|
[
"lukas@krecan.net"
] |
lukas@krecan.net
|
84c31d322007f1e5a56bcb446c4f989cb65a8ff2
|
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
|
/FantastleReboot/src/com/puttysoftware/fantastlereboot/objects/WeaponShop.java
|
dc02183bfbc91913dbdfa922ebae66a046800ef6
|
[
"Unlicense"
] |
permissive
|
retropipes/older-java-games
|
777574e222f30a1dffe7936ed08c8bfeb23a21ba
|
786b0c165d800c49ab9977a34ec17286797c4589
|
refs/heads/master
| 2023-04-12T14:28:25.525259
| 2021-05-15T13:03:54
| 2021-05-15T13:03:54
| 235,693,016
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 343
|
java
|
package com.puttysoftware.fantastlereboot.objects;
import com.puttysoftware.fantastlereboot.assets.ObjectImageIndex;
import com.puttysoftware.fantastlereboot.objectmodel.FantastleObject;
public final class WeaponShop extends FantastleObject {
public WeaponShop() {
super(11, "weapon_shop", ObjectImageIndex.WEAPON_SHOP);
}
}
|
[
"eric.ahnell@puttysoftware.com"
] |
eric.ahnell@puttysoftware.com
|
2ff116bea70941f5500008b6108c4fc774a7acc2
|
88483bbcd6b6b3038233d0a7ebda6c493e4ef589
|
/Java/QQClient/src/com/gs/qq/ui/listener/ChatFrameBtnListener.java
|
8fc76a58c7c6d96fbae4322253031f30cfdf0173
|
[] |
no_license
|
tjy1985001/Teaching
|
5760eab3cd3e6c4cd1332c80fcf8098c160a7deb
|
31e090c866493443b5a944c043fbfb2f1c90c372
|
refs/heads/master
| 2020-06-06T22:37:51.921889
| 2018-12-10T03:45:51
| 2018-12-10T03:45:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 965
|
java
|
package com.gs.qq.ui.listener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Calendar;
import javax.swing.JTextArea;
import com.gs.bean.Message;
import com.gs.qq.client.Client;
import com.gs.qq.ui.ChatFrame;
public class ChatFrameBtnListener implements ActionListener {
private ChatFrame chatFrame;
private Client client;
public ChatFrameBtnListener(Client client, ChatFrame chatFrame) {
this.client = client;
this.chatFrame = chatFrame;
}
@Override
public void actionPerformed(ActionEvent e) {
String action = e.getActionCommand();
if (action.equals("send")) {
String msg = chatFrame.getChatArea().getText();
Message m = new Message(Message.NORMAL_MSG, chatFrame.getAccount(), chatFrame.getToAccount(), Calendar.getInstance().getTime(), msg);
JTextArea area = chatFrame.getArea();
String text = area.getText() + "\n˵" + msg;
area.setText(text);
client.sendMessage(m);
}
}
}
|
[
"847315251@qq.com"
] |
847315251@qq.com
|
acdee77e9dc388498cb76c3a05f809281db9af46
|
4a6a9d22bb759dd56d44f7d592bd7bfaf696289f
|
/x_okr_assemble_control/src/main/java/com/x/okr/assemble/control/jaxrs/okrrolepermission/WrapOutOkrRolePermission.java
|
28b558b69d4005ac010f7d6ad8a7356fb20e4f25
|
[
"MIT"
] |
permissive
|
hq1980/o2oa
|
ff665c70621f035d0cd1110b71f2cd4f92686972
|
12bdca9149bbe8f377622ca0a5a861362999cde5
|
refs/heads/master
| 2021-01-22T09:10:29.309611
| 2017-02-14T07:17:03
| 2017-02-14T07:17:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 565
|
java
|
package com.x.okr.assemble.control.jaxrs.okrrolepermission;
import java.util.ArrayList;
import java.util.List;
import com.x.base.core.http.annotation.Wrap;
import com.x.okr.entity.OkrRolePermission;
@Wrap( OkrRolePermission.class)
public class WrapOutOkrRolePermission extends OkrRolePermission{
private static final long serialVersionUID = -5076990764713538973L;
public static List<String> Excludes = new ArrayList<String>();
private Long rank = 0L;
public Long getRank() {
return rank;
}
public void setRank(Long rank) {
this.rank = rank;
}
}
|
[
"caixiangyi2004@126.com"
] |
caixiangyi2004@126.com
|
c53a8235dd254bc287aaa2d266e7c70d7673151d
|
a1c395006b48e66704e8b1caf00a118f0d439908
|
/src/main/java/com/o2d/pkayjava/runtime/systems/render/logic/Drawable.java
|
e357d035018ad08bdf2b459dae2bce34691e5035
|
[
"Apache-2.0"
] |
permissive
|
PkayJava/overlap2d-dev
|
99e05451a61106a6355f84628332bdb09f4c57fc
|
6744a9e96542cbc0c3be9dba8130f430d92cebd8
|
refs/heads/master
| 2020-04-13T19:44:58.790634
| 2015-08-30T14:27:56
| 2015-08-30T14:27:56
| 39,417,245
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 227
|
java
|
package com.o2d.pkayjava.runtime.systems.render.logic;
import com.badlogic.ashley.core.Entity;
import com.badlogic.gdx.graphics.g2d.Batch;
public interface Drawable {
public abstract void draw(Batch batch, Entity entity);
}
|
[
"pkayjava@gmail.com"
] |
pkayjava@gmail.com
|
97d90c06147b08ae40e9100ca64b0af5f82a7ddc
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/protocal/protobuf/fug.java
|
9b9641bcfb5a9429924054d740a94fe29525793d
|
[] |
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
| 7,610
|
java
|
package com.tencent.mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
import i.a.a.b;
import java.util.LinkedList;
public final class fug
extends erp
{
public int IJG;
public String IMg;
public String IMh;
public gol NkQ;
public String YWC;
public fzc ZkE;
public fuf ZkG;
public final int op(int paramInt, Object... paramVarArgs)
{
AppMethodBeat.i(32487);
if (paramInt == 0)
{
paramVarArgs = (i.a.a.c.a)paramVarArgs[0];
if (this.ZkE == null)
{
paramVarArgs = new b("Not all required fields were included: VoiceAttr");
AppMethodBeat.o(32487);
throw paramVarArgs;
}
if (this.ZkG == null)
{
paramVarArgs = new b("Not all required fields were included: UploadCtx");
AppMethodBeat.o(32487);
throw paramVarArgs;
}
if (this.NkQ == null)
{
paramVarArgs = new b("Not all required fields were included: Data");
AppMethodBeat.o(32487);
throw paramVarArgs;
}
if (this.BaseRequest != null)
{
paramVarArgs.qD(1, this.BaseRequest.computeSize());
this.BaseRequest.writeFields(paramVarArgs);
}
if (this.YWC != null) {
paramVarArgs.g(2, this.YWC);
}
if (this.ZkE != null)
{
paramVarArgs.qD(3, this.ZkE.computeSize());
this.ZkE.writeFields(paramVarArgs);
}
if (this.ZkG != null)
{
paramVarArgs.qD(4, this.ZkG.computeSize());
this.ZkG.writeFields(paramVarArgs);
}
if (this.NkQ != null)
{
paramVarArgs.qD(5, this.NkQ.computeSize());
this.NkQ.writeFields(paramVarArgs);
}
paramVarArgs.bS(6, this.IJG);
if (this.IMh != null) {
paramVarArgs.g(7, this.IMh);
}
if (this.IMg != null) {
paramVarArgs.g(8, this.IMg);
}
AppMethodBeat.o(32487);
return 0;
}
if (paramInt == 1) {
if (this.BaseRequest == null) {
break label1076;
}
}
label1076:
for (int i = i.a.a.a.qC(1, this.BaseRequest.computeSize()) + 0;; i = 0)
{
paramInt = i;
if (this.YWC != null) {
paramInt = i + i.a.a.b.b.a.h(2, this.YWC);
}
i = paramInt;
if (this.ZkE != null) {
i = paramInt + i.a.a.a.qC(3, this.ZkE.computeSize());
}
paramInt = i;
if (this.ZkG != null) {
paramInt = i + i.a.a.a.qC(4, this.ZkG.computeSize());
}
i = paramInt;
if (this.NkQ != null) {
i = paramInt + i.a.a.a.qC(5, this.NkQ.computeSize());
}
i += i.a.a.b.b.a.cJ(6, this.IJG);
paramInt = i;
if (this.IMh != null) {
paramInt = i + i.a.a.b.b.a.h(7, this.IMh);
}
i = paramInt;
if (this.IMg != null) {
i = paramInt + i.a.a.b.b.a.h(8, this.IMg);
}
AppMethodBeat.o(32487);
return i;
if (paramInt == 2)
{
paramVarArgs = new i.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler);
for (paramInt = erp.getNextFieldNumber(paramVarArgs); paramInt > 0; paramInt = erp.getNextFieldNumber(paramVarArgs)) {
if (!super.populateBuilderWithField(paramVarArgs, this, paramInt)) {
paramVarArgs.kFT();
}
}
if (this.ZkE == null)
{
paramVarArgs = new b("Not all required fields were included: VoiceAttr");
AppMethodBeat.o(32487);
throw paramVarArgs;
}
if (this.ZkG == null)
{
paramVarArgs = new b("Not all required fields were included: UploadCtx");
AppMethodBeat.o(32487);
throw paramVarArgs;
}
if (this.NkQ == null)
{
paramVarArgs = new b("Not all required fields were included: Data");
AppMethodBeat.o(32487);
throw paramVarArgs;
}
AppMethodBeat.o(32487);
return 0;
}
if (paramInt == 3)
{
Object localObject1 = (i.a.a.a.a)paramVarArgs[0];
fug localfug = (fug)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
Object localObject2;
switch (paramInt)
{
default:
AppMethodBeat.o(32487);
return -1;
case 1:
paramVarArgs = ((i.a.a.a.a)localObject1).aMP(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject1 = (byte[])paramVarArgs.get(paramInt);
localObject2 = new kc();
if ((localObject1 != null) && (localObject1.length > 0)) {
((kc)localObject2).parseFrom((byte[])localObject1);
}
localfug.BaseRequest = ((kc)localObject2);
paramInt += 1;
}
AppMethodBeat.o(32487);
return 0;
case 2:
localfug.YWC = ((i.a.a.a.a)localObject1).ajGk.readString();
AppMethodBeat.o(32487);
return 0;
case 3:
paramVarArgs = ((i.a.a.a.a)localObject1).aMP(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject1 = (byte[])paramVarArgs.get(paramInt);
localObject2 = new fzc();
if ((localObject1 != null) && (localObject1.length > 0)) {
((fzc)localObject2).parseFrom((byte[])localObject1);
}
localfug.ZkE = ((fzc)localObject2);
paramInt += 1;
}
AppMethodBeat.o(32487);
return 0;
case 4:
paramVarArgs = ((i.a.a.a.a)localObject1).aMP(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject1 = (byte[])paramVarArgs.get(paramInt);
localObject2 = new fuf();
if ((localObject1 != null) && (localObject1.length > 0)) {
((fuf)localObject2).parseFrom((byte[])localObject1);
}
localfug.ZkG = ((fuf)localObject2);
paramInt += 1;
}
AppMethodBeat.o(32487);
return 0;
case 5:
paramVarArgs = ((i.a.a.a.a)localObject1).aMP(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject1 = (byte[])paramVarArgs.get(paramInt);
localObject2 = new gol();
if ((localObject1 != null) && (localObject1.length > 0)) {
((gol)localObject2).dg((byte[])localObject1);
}
localfug.NkQ = ((gol)localObject2);
paramInt += 1;
}
AppMethodBeat.o(32487);
return 0;
case 6:
localfug.IJG = ((i.a.a.a.a)localObject1).ajGk.aar();
AppMethodBeat.o(32487);
return 0;
case 7:
localfug.IMh = ((i.a.a.a.a)localObject1).ajGk.readString();
AppMethodBeat.o(32487);
return 0;
}
localfug.IMg = ((i.a.a.a.a)localObject1).ajGk.readString();
AppMethodBeat.o(32487);
return 0;
}
AppMethodBeat.o(32487);
return -1;
}
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes5.jar
* Qualified Name: com.tencent.mm.protocal.protobuf.fug
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
b411b4fc59aa4c81eb5c63af77b60a9ebe39de60
|
b35fadf8d375525e320751e25893f6f69a04e37d
|
/leimingtech-core/src/main/java/com/leimingtech/core/service/impl/thirdlogin/ThirdloginServiceImpl.java
|
b0841a9e4b92dd15caa4c17a233db1ced6b506de
|
[] |
no_license
|
dockercms/cms-4.0
|
8e41fca1142e121861a86006afaf378327f1917b
|
8f390cc00848124daeb997b8c09aefa0f465572c
|
refs/heads/master
| 2021-05-19T03:38:03.644558
| 2019-12-06T02:10:27
| 2019-12-06T02:10:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 437
|
java
|
package com.leimingtech.core.service.impl.thirdlogin;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.leimingtech.core.service.impl.CommonServiceImpl;
import com.leimingtech.core.service.thirdlogin.ThirdloginServiceI;
@Service("thirdloginService")
@Transactional
public class ThirdloginServiceImpl extends CommonServiceImpl implements ThirdloginServiceI {
}
|
[
"pixiaoyong@leimingtech.com"
] |
pixiaoyong@leimingtech.com
|
65addf0702728e00ca6d32f61327e4aeb7244f99
|
732a6fa36e14baf7f828ef19a62b515312f9a109
|
/playbook/old/src/test/java/com/mindalliance/channels/playbook/Start.java
|
391c709acca5793eb2b6d4c4ea82eb4ac69da6cf
|
[] |
no_license
|
gauravbvt/test
|
4e991ad3e7dd5ea670ab88f3a74fe8a42418ec20
|
04e48c87ff5c2209fc4bc703795be3f954909c3a
|
refs/heads/master
| 2020-11-24T02:43:32.565109
| 2014-10-07T23:47:39
| 2014-10-07T23:47:39
| 100,468,202
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,296
|
java
|
package com.mindalliance.channels.playbook;
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.bio.SocketConnector;
import org.mortbay.jetty.webapp.WebAppContext;
public class Start {
public static void main(String[] args) throws Exception {
Server server = new Server();
SocketConnector connector = new SocketConnector();
// Set some timeout options to make debugging easier.
connector.setMaxIdleTime(1000 * 60 * 60);
connector.setSoLingerTime(-1);
connector.setPort(8080);
server.setConnectors(new Connector[] { connector });
WebAppContext bb = new WebAppContext();
bb.setServer(server);
bb.setContextPath("/");
bb.setWar("src/main/webapp");
// START JMX SERVER
// MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
// MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
// server.getContainer().addEventListener(mBeanContainer);
// mBeanContainer.start();
server.addHandler(bb);
try {
System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP");
server.start();
while (System.in.available() == 0) {
Thread.sleep(5000);
}
server.stop();
server.join();
} catch (Exception e) {
e.printStackTrace();
System.exit(100);
}
}
}
|
[
"denis@baad322d-9929-0410-88f0-f92e8ff3e1bd"
] |
denis@baad322d-9929-0410-88f0-f92e8ff3e1bd
|
d24a2e325e8c0b6d9f60113535c7cc47ccae4507
|
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
|
/Crawler/data/DeptController.java
|
f1b313b25cf1c16ef1a435e4e5ad0d5b47e6fb9f
|
[] |
no_license
|
NayrozD/DD2476-Project
|
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
|
94dfb3c0a470527b069e2e0fd9ee375787ee5532
|
refs/heads/master
| 2023-03-18T04:04:59.111664
| 2021-03-10T15:03:07
| 2021-03-10T15:03:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,629
|
java
|
10
https://raw.githubusercontent.com/IzzyPrime/Admin/master/src/main/java/com/kalvin/kvf/modules/sys/controller/DeptController.java
package com.kalvin.kvf.modules.sys.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kalvin.kvf.common.controller.BaseController;
import com.kalvin.kvf.common.dto.R;
import com.kalvin.kvf.modules.sys.entity.Dept;
import com.kalvin.kvf.modules.sys.service.IDeptService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.util.List;
/**
* <p>
* 部门表 前端控制器
* </p>
*
* @author Kalvin
* @since 2019-04-29
*/
@RestController
@RequestMapping("sys/dept")
public class DeptController extends BaseController {
@Autowired
private IDeptService deptService;
@RequiresPermissions("sys:dept:index")
@GetMapping("index")
public ModelAndView index() {
return new ModelAndView("sys/dept");
}
@GetMapping(value = "edit")
public ModelAndView edit(Long id) {
ModelAndView mv = new ModelAndView("sys/dept_edit");
Dept dept;
if (id == null) {
dept = new Dept();
} else {
dept = deptService.getById(id);
}
mv.addObject("editInfo", dept);
return mv;
}
@GetMapping(value = "list/data")
public R listData(Dept dept) {
Page<Dept> page = deptService.listDeptPage(dept);
return R.ok(page);
}
@GetMapping(value = "list/tree")
public R listTree(Long parentId) {
return R.ok(deptService.listDeptByParentId(parentId));
}
@RequiresPermissions("sys:dept:add")
@PostMapping(value = "add")
public R add(Dept dept) {
deptService.save(dept);
return R.ok();
}
@RequiresPermissions("sys:dept:edit")
@PostMapping(value = "edit")
public R edit(Dept dept) {
deptService.updateById(dept);
return R.ok();
}
@RequiresPermissions("sys:dept:del")
@PostMapping(value = "remove/{id}")
public R remove(@PathVariable Long id) {
deptService.removeById(id);
return R.ok();
}
@RequiresPermissions("sys:dept:del")
@PostMapping(value = "removeBatch")
public R removeBatch(@RequestParam("ids") List<Long> ids) {
deptService.removeByIds(ids);
return R.ok();
}
@GetMapping(value = "get/{id}")
public R get(@PathVariable Long id) {
return R.ok(deptService.getById(id));
}
}
|
[
"veronika.cucorova@gmail.com"
] |
veronika.cucorova@gmail.com
|
4447c6ae8f14d8cf49d974fc4b572c913703db00
|
9ae5965121f143fa5a5781b413d686311b734a2c
|
/src/test/java/com/gargoylesoftware/htmlunit/LocationViaJSTest.java
|
716eaabc1e6fa8564508d5af4a4e06f6f87b6865
|
[
"EPL-2.0",
"MIT",
"EPL-1.0",
"LGPL-2.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"MPL-2.0",
"CDDL-1.1",
"Apache-2.0",
"BSD-3-Clause",
"BSD-2-Clause"
] |
permissive
|
andre-becker/XLT
|
41395ec5b673193412b26df35cc64e05ac55c9b4
|
174f9f467ab3094bcdbf80bcea818134a9d1180a
|
refs/heads/master
| 2022-04-21T09:20:03.443914
| 2020-03-12T09:48:41
| 2020-03-12T09:48:41
| 257,584,910
| 0
| 0
|
Apache-2.0
| 2020-04-21T12:14:39
| 2020-04-21T12:14:38
| null |
UTF-8
|
Java
| false
| false
| 2,515
|
java
|
package com.gargoylesoftware.htmlunit;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import org.apache.commons.io.IOUtils;
import org.apache.log4j.BasicConfigurator;
import org.junit.Test;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
/**
* Test the problem to get a new location with JS and a background thread. It seems that the context is missing for the
* browserversion.
*
* @author Rene Schwietzke
*/
public class LocationViaJSTest
{
protected String getContent(final String resourceName) throws IOException
{
InputStream in = null;
try
{
in = getClass().getClassLoader().getResourceAsStream("com/gargoylesoftware/htmlunit/" + resourceName);
return IOUtils.toString(in, StandardCharsets.UTF_8);
}
finally
{
in.close();
}
}
@Test
public void overwrite() throws Exception
{
BasicConfigurator.configure();
final String p1 = "<html>" + "<head>" + " <title>1</title>"
+ " <script src=\"prototype-1.6.0.2.js\" type=\"text/javascript\"></script>" + "</head>" + "<body>"
+ "<script>" + " setTimeout('finishCreateAccount()', 4000);" + " function finishCreateAccount() {"
+ " completionUrl = \"/2.html\";" + " document.location.replace(completionUrl);" + " }"
+ "</script>" + "" + "<div><a href=\"link.html\" id=\"test\"></div>" + "</body>" + "</html>";
final String p2 = "<html>" + "<head>" + " <title>2</title>"
+ " <script src=\"prototype-1.6.0.2.js\" type=\"text/javascript\"></script>" + "</head>" + "<body>"
+ "<div id=\"id2\">Page2</div>" + "</body>" + "</html>";
try (final WebClient wc = new WebClient(BrowserVersion.CHROME))
{
final MockWebConnection conn = new MockWebConnection();
wc.setWebConnection(conn);
conn.setResponse(new URL("http://myserver/1.html"), p1);
conn.setResponse(new URL("http://myserver/2.html"), p2);
conn.setResponse(new URL("http://myserver/prototype-1.6.0.2.js"), getContent("prototype-1.6.0.2.js"));
final HtmlPage initialPage = (HtmlPage) wc.getPage("http://myserver/1.html");
initialPage.getEnclosingWindow().getJobManager().waitForJobs(10000);
}
}
}
|
[
"4639399+jowerner@users.noreply.github.com"
] |
4639399+jowerner@users.noreply.github.com
|
066b67ebad5bba9f913968a0199a96a522418f9e
|
3c2e3ad95cd452947486a40cc6d83ad2499e1054
|
/lvf-common-dto/src/main/java/com/lvmama/lvf/common/dto/order/status/GenerateStatus.java
|
d857ba422a26ec746847e303a229ca3f311027a1
|
[] |
no_license
|
wang-shun/abcdef
|
7b7d077525c00b9274dd4e96c165cd0819b4d4b8
|
2a3897171880201237306a09a0a4c4267a2f4e29
|
refs/heads/master
| 2020-03-29T10:03:15.483000
| 2016-10-10T02:55:44
| 2016-10-10T02:55:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 369
|
java
|
package com.lvmama.lvf.common.dto.order.status;
/**
* 制单状态
*/
public enum GenerateStatus {
NOT_GENERATE("未制单"),
GENERATE_ING("制单中"),
GENERATE_SUCC("制单完成"),
GENERATE_FAIL("制单失败");
private String cnName;
public String getCnName() {
return cnName;
}
private GenerateStatus(String cnName) {
this.cnName = cnName;
}
}
|
[
"lishuiqing110@163.com"
] |
lishuiqing110@163.com
|
82ca716f875002a445699eb11cb4c77e41077218
|
498dd2daff74247c83a698135e4fe728de93585a
|
/clients/google-api-services-compute/beta/1.29.2/com/google/api/services/compute/model/DistributionPolicy.java
|
0f95f7609d0deb537f0bb73ef9c0dfb74c3dfdbf
|
[
"Apache-2.0"
] |
permissive
|
googleapis/google-api-java-client-services
|
0e2d474988d9b692c2404d444c248ea57b1f453d
|
eb359dd2ad555431c5bc7deaeafca11af08eee43
|
refs/heads/main
| 2023-08-23T00:17:30.601626
| 2023-08-20T02:16:12
| 2023-08-20T02:16:12
| 147,399,159
| 545
| 390
|
Apache-2.0
| 2023-09-14T02:14:14
| 2018-09-04T19:11:33
| null |
UTF-8
|
Java
| false
| false
| 2,338
|
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.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.compute.model;
/**
* Model definition for DistributionPolicy.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see:
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class DistributionPolicy extends com.google.api.client.json.GenericJson {
/**
* Zones where the regional managed instance group will create and manage instances.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<DistributionPolicyZoneConfiguration> zones;
/**
* Zones where the regional managed instance group will create and manage instances.
* @return value or {@code null} for none
*/
public java.util.List<DistributionPolicyZoneConfiguration> getZones() {
return zones;
}
/**
* Zones where the regional managed instance group will create and manage instances.
* @param zones zones or {@code null} for none
*/
public DistributionPolicy setZones(java.util.List<DistributionPolicyZoneConfiguration> zones) {
this.zones = zones;
return this;
}
@Override
public DistributionPolicy set(String fieldName, Object value) {
return (DistributionPolicy) super.set(fieldName, value);
}
@Override
public DistributionPolicy clone() {
return (DistributionPolicy) super.clone();
}
}
|
[
"chingor@google.com"
] |
chingor@google.com
|
0feeed8e19029976771ea513c9cf5cd69092265f
|
388f88df1f49b5414c22b97304ec295801f7f0f3
|
/classhidra_example/WebContent/WEB-INF/source/it/classhidra/core/tool/exception/bsTagEndRendering.java
|
5ffe426390db533daa13e367f0cc21cae3df01f8
|
[] |
no_license
|
surban1974/classhidra
|
c3f1dcb9546d7d13a235d431492985555fe7a4ac
|
f0937bed637265e42659c92d863c12c239f55166
|
refs/heads/master
| 2023-08-30T04:44:13.153369
| 2023-08-25T13:50:16
| 2023-08-25T13:50:16
| 5,340,773
| 0
| 0
| null | 2022-12-16T07:12:39
| 2012-08-08T11:25:37
|
Java
|
UTF-8
|
Java
| false
| false
| 325
|
java
|
package it.classhidra.core.tool.exception;
import javax.servlet.jsp.JspException;
public class bsTagEndRendering extends JspException {
private static final long serialVersionUID = 1L;
private String tagId;
public bsTagEndRendering(String id) {
super();
tagId=id;
}
public String getTagId() {
return tagId;
}
}
|
[
"svyatoslav.urbanovych@gmail.com"
] |
svyatoslav.urbanovych@gmail.com
|
03559c30d3c3250a7ea592c613230e404fd184bc
|
b77be0b0e6b3ea59e8208a5980601729a198f4d1
|
/app/src/main/java/com/google/android/gms/internal/ff.java
|
e5af629d6e9b2cb4f9208a31eec02b8edd523150
|
[] |
no_license
|
jotaxed/Final
|
72bece24fb2e59ee5d604b6aca5d90656d2a7170
|
f625eb81e99a23e959c9d0ec6b0419a3b795977a
|
refs/heads/master
| 2020-04-13T11:50:14.498334
| 2018-12-26T13:46:17
| 2018-12-26T13:46:17
| 163,185,048
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,896
|
java
|
package com.google.android.gms.internal;
import android.content.Context;
import android.os.Bundle;
import android.os.DeadObjectException;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks;
import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener;
@ey
public abstract class ff extends gf {
private final fh qh;
private final com.google.android.gms.internal.fe.a tI;
@ey
public static final class a extends ff {
private final Context mContext;
public a(Context context, fh fhVar, com.google.android.gms.internal.fe.a aVar) {
super(fhVar, aVar);
this.mContext = context;
}
public void cJ() {
}
public fl cK() {
Bundle bN = ga.bN();
return fq.a(this.mContext, new bm(bN.getString("gads:sdk_core_location"), bN.getString("gads:sdk_core_experiment_id"), bN.getString("gads:block_autoclicks_experiment_id"), bN.getString("gads:spam_app_context:experiment_id")), new co(), new fx());
}
}
@ey
public static final class b extends ff implements ConnectionCallbacks, OnConnectionFailedListener {
private final Object mH = new Object();
private final com.google.android.gms.internal.fe.a tI;
private final fg tJ;
public b(Context context, fh fhVar, com.google.android.gms.internal.fe.a aVar) {
super(fhVar, aVar);
this.tI = aVar;
this.tJ = new fg(context, this, this, fhVar.lO.wU);
this.tJ.connect();
}
public void cJ() {
synchronized (this.mH) {
if (this.tJ.isConnected() || this.tJ.isConnecting()) {
this.tJ.disconnect();
}
}
}
public fl cK() {
fl cL;
synchronized (this.mH) {
try {
cL = this.tJ.cL();
} catch (IllegalStateException e) {
cL = null;
return cL;
} catch (DeadObjectException e2) {
cL = null;
return cL;
}
}
return cL;
}
public void onConnected(Bundle connectionHint) {
start();
}
public void onConnectionFailed(ConnectionResult result) {
this.tI.a(new fj(0));
}
public void onConnectionSuspended(int cause) {
gr.S("Disconnected from remote ad request service.");
}
}
public ff(fh fhVar, com.google.android.gms.internal.fe.a aVar) {
this.qh = fhVar;
this.tI = aVar;
}
private static fj a(fl flVar, fh fhVar) {
fj fjVar = null;
try {
fjVar = flVar.b(fhVar);
} catch (Throwable e) {
gr.d("Could not fetch ad response from ad request service.", e);
} catch (Throwable e2) {
gr.d("Could not fetch ad response from ad request service due to an Exception.", e2);
} catch (Throwable e22) {
gr.d("Could not fetch ad response from ad request service due to an Exception.", e22);
} catch (Throwable e222) {
ga.e(e222);
}
return fjVar;
}
public abstract void cJ();
public abstract fl cK();
public final void cx() {
try {
fj fjVar;
fl cK = cK();
if (cK == null) {
fjVar = new fj(0);
} else {
fjVar = a(cK, this.qh);
if (fjVar == null) {
fjVar = new fj(0);
}
}
cJ();
this.tI.a(fjVar);
} catch (Throwable th) {
cJ();
}
}
public final void onStop() {
cJ();
}
}
|
[
"jotaxed@gmail.com"
] |
jotaxed@gmail.com
|
a35dbfea6c3328dac362f4699ac4291ba72d6097
|
2255f14624f426795e467465188d33f23868d045
|
/jobs/pacman-rule-engine-2.0/src/test/java/com/tmobile/pacman/util/AuditUtilsTest.java
|
8a176b558154fde90143057abb656957b661c79c
|
[
"Apache-2.0"
] |
permissive
|
sajeer-nooh/pacbot
|
078a5178e08ccdfbca6c3a5d94b2ef19d9b40944
|
aa9afde5072ed19fe37a04ab25b5f87342b3f5ae
|
refs/heads/master
| 2020-04-30T22:57:14.193272
| 2020-01-21T08:15:00
| 2020-01-21T08:15:00
| 177,132,203
| 1
| 1
|
Apache-2.0
| 2020-01-21T08:15:01
| 2019-03-22T11:59:19
|
Java
|
UTF-8
|
Java
| false
| false
| 4,322
|
java
|
/*******************************************************************************
* Copyright 2018 T Mobile, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. 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.
******************************************************************************/
/**
Copyright (C) 2017 T Mobile Inc - All Rights Reserve
Purpose:
Author :Nidhish
Modified Date: June 27, 2018
**/
package com.tmobile.pacman.util;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.anyMap;
import static org.mockito.Matchers.anyString;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.tmobile.pacman.common.PacmanSdkConstants;
import com.tmobile.pacman.commons.rule.Annotation;
// TODO: Auto-generated Javadoc
/**
* The Class AuditUtilsTest.
*/
@PowerMockIgnore("javax.net.ssl.*")
@RunWith(PowerMockRunner.class)
@PrepareForTest({CommonUtils.class, ESUtils.class})
public class AuditUtilsTest {
/**
* Post audit trail.
*
* @throws UnsupportedEncodingException the unsupported encoding exception
*/
@Test
public void postAuditTrail() throws UnsupportedEncodingException {
List<Annotation> annotations = Lists.newArrayList();
Annotation annotation = new Annotation();
annotation.put(PacmanSdkConstants.RULE_ID, "ruleId123");
annotation.put(PacmanSdkConstants.DOC_ID, "docId123");
annotation.put(PacmanSdkConstants.DATA_SOURCE_KEY, "sKey123");
annotation.put(PacmanSdkConstants.TARGET_TYPE, "target123");
annotations.add(annotation);
String status = "testStatus";
AuditUtils.postAuditTrail(annotations, status);
assertTrue(true);
}
/**
* Gets the resources from es test.
*
* @throws Exception the exception
*/
@Test
public void getResourcesFromEsTest() throws Exception {
//PowerMockito.mockStatic(CommonUtils.class);
//PowerMockito.mockStatic(ESUtils.class);
PowerMockito.mockStatic(ESUtils.class);
CloseableHttpResponse mockResponse = PowerMockito.mock(CloseableHttpResponse.class);
String responseBody = "{\"count\":\"123\", \"hits\":{\"total\":1000,\"max_score\":null,\"hits\":[{\"_index\":\"bank\",\"_type\":\"_doc\",\"_id\":\"0\",\"sort\":[0],\"_score\":null,\"_source\":{\"account_number\":0,\"balance\":16623,\"firstname\":\"Bradshaw\",\"lastname\":\"Mckenzie\",\"age\":29,\"gender\":\"F\",\"address\":\"244 Columbus Place\",\"employer\":\"Euron\",\"email\":\"john@doe.com\",\"city\":\"Hobucken\",\"state\":\"CO\"}}]}}";
//PowerMockito.when(CommonUtils.doHttpPost(anyString(), anyString())).thenReturn(responseBody);
PowerMockito.when(ESUtils.getEsUrl()).thenReturn("Test");
PowerMockito.mockStatic(CommonUtils.class);
PowerMockito.when(CommonUtils.doHttpPost(anyString(),anyString(),anyMap())).thenReturn(responseBody);
PowerMockito.when(CommonUtils.doHttpPost(anyString(),anyString())).thenReturn(responseBody);
String index = "index";
String targetType = "targetType";
Map<String, String> filter = Maps.newHashMap();
filter.put("testKey123", "testValue123");
List<String> fields = Lists.newArrayList();
fields.add("field123");
fields.add("field234");
fields.add("field345");
List<Map<String, String>> response = ESUtils.getResourcesFromEs(index, targetType, filter, fields);
assertEquals(response.size()>0, false);
}
}
|
[
"kumar.kamal@gmail.com"
] |
kumar.kamal@gmail.com
|
edcb08f26776f8d380aab57fe3316340a103cd4e
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/plugin/location/ui/impl/i$1.java
|
5e8483d4510d83d2e60f8984bd6bc0d05efa708d
|
[] |
no_license
|
jambestwick/HackWechat
|
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
|
6a34899c8bfd50d19e5a5ec36a58218598172a6b
|
refs/heads/master
| 2022-01-27T12:48:43.446804
| 2021-12-29T10:36:30
| 2021-12-29T10:36:30
| 249,366,791
| 0
| 0
| null | 2020-03-23T07:48:32
| 2020-03-23T07:48:32
| null |
UTF-8
|
Java
| false
| false
| 1,056
|
java
|
package com.tencent.mm.plugin.location.ui.impl;
import com.tencent.mm.R;
import com.tencent.mm.g.a.dh;
import com.tencent.mm.pluginsdk.model.app.g;
import com.tencent.mm.sdk.b.a;
import com.tencent.mm.sdk.b.b;
import com.tencent.mm.sdk.platformtools.ac;
import com.tencent.mm.ui.base.n;
import com.tencent.mm.ui.base.p.c;
class i$1 implements c {
final /* synthetic */ i nYD;
i$1(i iVar) {
this.nYD = iVar;
}
public final void a(n nVar) {
nVar.a(1, this.nYD.getString(R.l.dGF), 0);
if (this.nYD.type == 1) {
nVar.a(3, this.nYD.getString(R.l.eAd), 0);
} else if (this.nYD.type == 2 && this.nYD.activity.getIntent().getBooleanExtra("kFavCanDel", true)) {
nVar.a(5, this.nYD.getString(R.l.eeY), 0);
nVar.a(4, this.nYD.getString(R.l.dEw), 0);
}
b dhVar = new dh();
dhVar.frQ.fqm = this.nYD.fqm;
a.xef.m(dhVar);
if (dhVar.frR.frp || g.m(ac.getContext(), 4)) {
nVar.a(6, this.nYD.getString(R.l.dZe), 0);
}
}
}
|
[
"malin.myemail@163.com"
] |
malin.myemail@163.com
|
28319a33af6e1aa42677127fc646c25c4e3a81a2
|
f52981eb9dd91030872b2b99c694ca73fb2b46a8
|
/Source/Plugins/Core/com.equella.core/src/com/tle/core/security/convert/migration/v65/SecurityXmlMigration.java
|
231b8791da2d25fdc36856bd4f9819f960e63ce2
|
[
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LGPL-2.1-only",
"LicenseRef-scancode-jdom",
"GPL-1.0-or-later",
"ICU",
"CDDL-1.0",
"LGPL-3.0-only",
"LicenseRef-scancode-other-permissive",
"CPL-1.0",
"MIT",
"GPL-2.0-only",
"Apache-2.0",
"NetCDF",
"Apache-1.1",
"EPL-1.0",
"Classpath-exception-2.0",
"CDDL-1.1",
"LicenseRef-scancode-freemarker"
] |
permissive
|
phette23/Equella
|
baa41291b91d666bf169bf888ad7e9f0b0db9fdb
|
56c0d63cc1701a8a53434858a79d258605834e07
|
refs/heads/master
| 2020-04-19T20:55:13.609264
| 2019-01-29T03:27:40
| 2019-01-29T22:31:24
| 168,427,559
| 0
| 0
|
Apache-2.0
| 2019-01-30T22:49:08
| 2019-01-30T22:49:08
| null |
UTF-8
|
Java
| false
| false
| 2,057
|
java
|
/*
* Copyright 2017 Apereo
*
* 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.tle.core.security.convert.migration.v65;
import java.util.List;
import java.util.Map;
import javax.inject.Inject;
import javax.inject.Singleton;
import com.google.common.collect.Lists;
import com.tle.common.filesystem.handle.TemporaryFileHandle;
import com.tle.core.encryption.EncryptionService;
import com.tle.core.guice.Bind;
import com.tle.core.institution.convert.ConverterParams;
import com.tle.core.institution.convert.InstitutionInfo;
import com.tle.core.institution.convert.XmlMigrator;
@Bind
@Singleton
@SuppressWarnings({"nls", "unchecked"})
public class SecurityXmlMigration extends XmlMigrator
{
private static final List<String> PWD_KEYS = Lists.newArrayList("mail.password", "ldap.admin.password");
private static final String PROPERTIES_PATH = "properties/properties.xml";
@Inject
private EncryptionService encryptionService;
@Override
public void execute(TemporaryFileHandle staging, InstitutionInfo instInfo, ConverterParams params) throws Exception
{
if( !fileExists(staging, PROPERTIES_PATH) )
{
return;
}
// Get system settings
Map<String, String> sysProps = (Map<String, String>) xmlHelper.readXmlFile(staging, PROPERTIES_PATH);
for( String key : PWD_KEYS )
{
if( sysProps.containsKey(key) )
{
String encPwd = encryptionService.encrypt(sysProps.get(key));
sysProps.put(key, encPwd);
}
}
// Write system settings
xmlHelper.writeXmlFile(staging, PROPERTIES_PATH, sysProps);
}
}
|
[
"doolse@gmail.com"
] |
doolse@gmail.com
|
b154ee5db272c795a46ab1c5caf35998f3665b00
|
643ab004f98842a83cf1999ed30dd7df7a4ada60
|
/sparke-module-scan/src/main/java/cn/sparke/scan/modules/v1/codes/mapper/CodeMapper.java
|
f0256fd01f722a1d21b02912e13b6f3c43e348bd
|
[] |
no_license
|
JohnVeZh/spark-english-api-release-1.0.x
|
162130b1cedd90e09318077dc98a587fd03bccf3
|
f1659ffa072e6a79baa62b7636cbe1a17631ed26
|
refs/heads/master
| 2020-03-21T07:16:09.505836
| 2018-06-22T07:44:45
| 2018-06-22T07:44:45
| 138,270,184
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,696
|
java
|
package cn.sparke.scan.modules.v1.codes.mapper;
import cn.sparke.core.common.mybatis.base.BaseMapper;
import cn.sparke.scan.modules.v1.codes.bean.CodeBean;
import cn.sparke.scan.modules.v1.codes.bean.TbQrCode;
import cn.sparke.scan.modules.v1.codes.bean.easy.*;
import cn.sparke.scan.modules.v1.codes.bean.gift.GiftVideo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* Created by wanghaiguang on 2017/7/10.
*/
public interface CodeMapper extends BaseMapper<CodeBean> {
TbQrCode queryFullByQrCode(@Param("qrCode") String qrCode);
//根据二维码(qr_code),获取二维码类型
CodeBean queryByQrCode(String qrCode);
//根据二维码、学段,获取考场原音(String qrCode,Integer sectionCoe)
PaperCatalogeBean queryPaperCatalogByCode(Map<String,Object> map);
//根据二维码,获取碎片(String qrCode)
FragmentationBean queryFragmentByCode(String qrCode);
//根据二维码,获取简视频(String qrCode)
List<NetworkVideoBean> queryNetworkVideoByCode(String qrCode);
//根据二维码、学段,索取简写作(String qrCode,Integer sectionCoe)
List<FragmentationBean> queryWritingByCode(Map<String,Object> map);
//根据二维码,获取字幕听力(String qrCode)
CaptionListeningBean queryCaptionListeningByCode(String qrCode);
//根据二维码获取写作翻译类型(String qrCode)
List<StudyMaterialsWritingBean> queryWritingTranslationByCode(String qrCode);
//根据二维码获取大礼包视频
List<GiftVideo> queryGiftVideoByQrCode(String qrCode);
//判断大礼包是否激活
Integer giftIsActivated(Map<String,Object> map);
}
|
[
"530225288@qq.com"
] |
530225288@qq.com
|
721f254f336978abce1ceb86200ea5264faa4b8b
|
2fb3701022674680aee3c25a19b66e3e4175208a
|
/src/main/java/com/mns/emos/wx/db/pojo/TbFaceModel.java
|
00895834747d18709f3ebcecccb4720465bf0564
|
[] |
no_license
|
nuaamns/emos-wx-api
|
ccea64589c373306c6f9244264aa46f0fade60b9
|
b81491a82704f5886339f49436c94a5c8abc3d1a
|
refs/heads/master
| 2023-02-22T00:31:57.945494
| 2021-01-26T05:09:05
| 2021-01-26T05:09:05
| 331,870,371
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 529
|
java
|
package com.mns.emos.wx.db.pojo;
import java.io.Serializable;
import lombok.Data;
/**
* sys_config
* @author
*/
@Data
public class TbFaceModel implements Serializable {
/**
* 主键
*/
private Integer id;
/**
* 参数名
*/
private String paramKey;
/**
* 参数值
*/
private String paramValue;
/**
* 状态
*/
private Boolean status;
/**
* 备注
*/
private String remark;
private static final long serialVersionUID = 1L;
}
|
[
"l"
] |
l
|
e8ef09e01e0902d40ea456e1a0b0322a1659808b
|
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
|
/PROMISE/archives/ant/1.4/org/apache/tools/ant/taskdefs/optional/ide/VAJBuildInfo.java
|
8c65b7f014f5d7c9a0536c701f0b122fe4ae1791
|
[] |
no_license
|
hvdthong/DEFECT_PREDICTION
|
78b8e98c0be3db86ffaed432722b0b8c61523ab2
|
76a61c69be0e2082faa3f19efd76a99f56a32858
|
refs/heads/master
| 2021-01-20T05:19:00.927723
| 2018-07-10T03:38:14
| 2018-07-10T03:38:14
| 89,766,606
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,877
|
java
|
import java.util.Hashtable;
import java.util.Vector;
import java.util.Enumeration;
import org.apache.tools.ant.*;
import java.io.File;
/**
* This class wraps the Ant project information needed to
* start Ant from Visual Age.
* It serves the following purposes:
* - acts as model for AntMakeFrame
* - converts itself to/from String (to store the information
* as ToolData in the VA repository)
* - wraps Project functions for the GUI (get target list,
* execute target)
*
* @author Wolf Siberski, TUI Infotec GmbH
*/
public class VAJBuildInfo {
private String vajProjectName = "";
private String buildFileName = "";
private Vector projectTargets = new Vector();
private java.lang.String target = "";
private int outputMessageLevel = Project.MSG_INFO;
private transient Project project;
private transient boolean projectInitialized = false;
protected transient java.beans.PropertyChangeSupport propertyChange;
/**
* The addPropertyChangeListener method was generated to support the propertyChange field.
*/
public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener listener) {
getPropertyChange().addPropertyChangeListener(listener);
}
/**
* Returns the BuildInfo information as String. The BuildInfo can
* be rebuilt from that String by calling parse().
* @return java.lang.String
*/
public String asDataString() {
String result = getOutputMessageLevel() + "|" + getBuildFileName() + "|" + getTarget();
for ( Enumeration e = getProjectTargets().elements(); e.hasMoreElements(); ) {
result = result + "|" + e.nextElement();
}
return result;
}
/**
* Executes the target set by setTarget().
* @param listener BuildListener for the output of the build
*/
public void executeProject( BuildListener listener ) {
Throwable error = null;
try {
if (!isProjectInitialized()) {
project = new Project();
}
project.addBuildListener( listener );
if (!isProjectInitialized()) {
initProject();
}
project.executeTarget(target);
} catch (RuntimeException exc) {
error = exc;
throw exc;
} catch (Error err) {
error = err;
throw err;
} finally {
project.removeBuildListener( listener );
}
}
/**
* Search for the insert position to keep names a sorted list of Strings
* This method has been copied from org.apache.tools.ant.Main
*/
private static int findTargetPosition(Vector names, String name) {
int res = names.size();
for (int i=0; i<names.size() && res == names.size(); i++) {
if (name.compareTo((String)names.elementAt(i)) < 0) {
res = i;
}
}
return res;
}
/**
* The firePropertyChange method was generated to support the propertyChange field.
*/
public void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue) {
getPropertyChange().firePropertyChange(propertyName, oldValue, newValue);
}
/**
* Returns the build file name.
* @return build file name.
*/
public String getBuildFileName() {
return buildFileName;
}
/**
* Returns the log level
* @return log level.
*/
public int getOutputMessageLevel() {
return outputMessageLevel;
}
/**
* Returns the Ant project
* @return org.apache.tools.ant.Project
*/
private Project getProject() {
return project;
}
/**
* return a list of all targets in the current buildfile
*/
public Vector getProjectTargets() {
return projectTargets;
}
/**
* Accessor for the propertyChange field.
*/
protected java.beans.PropertyChangeSupport getPropertyChange() {
if (propertyChange == null) {
propertyChange = new java.beans.PropertyChangeSupport(this);
};
return propertyChange;
}
/**
* Insert the method's description here.
* Creation date: (07.11.2000 10:34:18)
* @return java.lang.String
*/
public java.lang.String getTarget() {
return target;
}
/**
* returns the VA project name
* @return The projectName property value.
*/
public String getVAJProjectName() {
return vajProjectName;
}
/**
* Initializes the Ant project. Assumes that the
* project attribute is already set.
*/
private void initProject() {
try {
project.init();
File buildFile = new File(getBuildFileName());
project.setUserProperty("ant.file", buildFile.getAbsolutePath());
ProjectHelper.configureProject(project, buildFile);
setProjectInitialized(true);
} catch (RuntimeException exc) {
setProjectInitialized(false);
throw exc;
} catch (Error err) {
setProjectInitialized(false);
throw err;
}
}
/**
* Returns true, if the Ant project is initialized
* (i.e. buildfile loaded)
*/
public boolean isProjectInitialized() {
return projectInitialized;
}
/**
* Creates a BuildInfo object from a String
* The String must be in the format
* outputMessageLevel'|'buildFileName'|'defaultTarget'|'(project target'|')*
*
* @return org.apache.tools.ant.taskdefs.optional.vaj.BuildInfo
* @param data java.lang.String
*/
public static VAJBuildInfo parse(String data) {
VAJBuildInfo result = new VAJBuildInfo();
try {
java.util.StringTokenizer tok = new java.util.StringTokenizer( data, "|" );
result.setOutputMessageLevel( tok.nextToken() );
result.setBuildFileName( tok.nextToken() );
result.setTarget( tok.nextToken() );
while( tok.hasMoreTokens() ) {
result.projectTargets.addElement( tok.nextToken() );
}
} catch ( Throwable t ) {
}
return result;
}
/**
* The removePropertyChangeListener method was generated to support the propertyChange field.
*/
public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener listener) {
getPropertyChange().removePropertyChangeListener(listener);
}
/**
* Sets the build file name
* @param buildFileName build file name
*/
public void setBuildFileName(String newBuildFileName) {
String oldValue = buildFileName;
buildFileName = newBuildFileName;
setProjectInitialized(false);
firePropertyChange("buildFileName", oldValue, buildFileName);
}
/**
* Sets the log level (value must be one of the constants in Project)
* @param outputMessageLevel log level.
*/
public void setOutputMessageLevel(int newOutputMessageLevel) {
int oldValue = outputMessageLevel;
outputMessageLevel = newOutputMessageLevel;
firePropertyChange("outputMessageLevel", new Integer(oldValue), new Integer(outputMessageLevel));
}
/**
* Sets the log level (value must be one of the constants in Project)
* @param outputMessageLevel log level as String.
*/
private void setOutputMessageLevel(String outputMessageLevel) {
int level = Integer.parseInt( outputMessageLevel );
setOutputMessageLevel( level );
}
/**
*/
private void setProjectInitialized(boolean initialized) {
Boolean oldValue = new Boolean(projectInitialized);
projectInitialized = initialized;
firePropertyChange("projectInitialized", oldValue, new Boolean(projectInitialized));
}
/**
* Sets the target to execute when executeBuild is called
* @param newTarget build target
*/
public void setTarget(String newTarget) {
String oldValue = target;
target = newTarget;
firePropertyChange("target", oldValue, target);
}
/**
* Sets the name of the Visual Age for Java project where
* this BuildInfo belongs to
* @param newProjectName VAJ project
*/
public void setVAJProjectName(String newVAJProjectName) {
String oldValue = vajProjectName;
vajProjectName = newVAJProjectName;
firePropertyChange("VAJProjectName", oldValue, vajProjectName);
}
/**
* reloads the build file and updates the target list
*/
public void updateTargetList() {
project = new Project();
initProject();
projectTargets.removeAllElements();
Enumeration ptargets = project.getTargets().elements();
while (ptargets.hasMoreElements()) {
Target currentTarget = (Target) ptargets.nextElement();
if ( currentTarget.getDescription() != null ) {
String targetName = currentTarget.getName();
int pos = findTargetPosition( projectTargets, targetName );
projectTargets.insertElementAt(targetName, pos);
}
}
}
}
|
[
"hvdthong@github.com"
] |
hvdthong@github.com
|
a63f7595cde30e0e34523735f17877ad7356d4a1
|
d05ac0e945576eb8e51cb38dcf7350296bacdba1
|
/jbossws-core/src/javax/xml/ws/soap/MTOM.java
|
a431ef18394fb27bc60c09c1f3dbd68a4331438e
|
[] |
no_license
|
Arckman/CBPM
|
9b6a125ea2bebe44749c09cfc37f89fdc15d69b7
|
10663b40abf151c90d0b20878f8f7f20c8077b30
|
refs/heads/master
| 2016-09-06T09:02:15.819806
| 2014-05-22T02:40:16
| 2014-05-22T02:40:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,430
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This 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 software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package javax.xml.ws.soap;
// $Id: MTOM.java 2897 2007-04-23 06:12:12Z thomas.diesler@jboss.com $
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.xml.ws.spi.WebServiceFeatureAnnotation;
/**
* This feature represents the use of MTOM with a
* web service.
*
* <p>
* The following describes the affects of this feature with respect
* to being enabled or disabled:
* <ul>
* <li> ENABLED: In this Mode, MTOM will be enabled.
* <li> DISABLED: In this Mode, MTOM will be disabled
* </ul>
* <p>
* The {@link #threshold} property can be used to set the threshold
* value used to determine when binary data should be XOP encoded.
*
* @since JAX-WS 2.1
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@WebServiceFeatureAnnotation(id=MTOMFeature.ID,bean=MTOMFeature.class)
public @interface MTOM {
/**
* Specifies if this feature is enabled or disabled.
*/
boolean enabled() default true;
/**
* Property for MTOM threshold value. When MTOM is enabled, binary data above this
* size in bytes will be XOP encoded or sent as attachment. The value of this property
* MUST always be >= 0. Default value is 0.
*/
int threshold() default 0;
}
|
[
"fengrj1989@gmail.com"
] |
fengrj1989@gmail.com
|
fa9dc7bbca78788b1a9b91dcad6718e4d62a1d2e
|
2da705ba188bb9e4a0888826818f1b25d04e90c8
|
/support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/flow/DelegatedAuthenticationWebflowConfigurer.java
|
11aa4b4d1d8c8471e3919715af451fa0ee5004f2
|
[
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
williamadmin/cas
|
9441fd730de81a5abaf173e2e831a19c9e417579
|
a4c49ab5137745146afa0f6d41791c2881a344a6
|
refs/heads/master
| 2021-05-25T19:05:01.862668
| 2020-04-07T05:15:53
| 2020-04-07T05:15:53
| 253,788,442
| 1
| 0
|
Apache-2.0
| 2020-04-07T12:37:38
| 2020-04-07T12:37:37
| null |
UTF-8
|
Java
| false
| false
| 4,721
|
java
|
package org.apereo.cas.web.flow;
import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.web.flow.configurer.AbstractCasWebflowConfigurer;
import org.apereo.cas.web.support.WebUtils;
import lombok.val;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.webflow.action.AbstractAction;
import org.springframework.webflow.definition.registry.FlowDefinitionRegistry;
import org.springframework.webflow.engine.Flow;
import org.springframework.webflow.engine.builder.support.FlowBuilderServices;
import org.springframework.webflow.execution.Event;
import org.springframework.webflow.execution.RequestContext;
/**
* The {@link DelegatedAuthenticationWebflowConfigurer} is responsible for
* adjusting the CAS webflow context for pac4j integration.
*
* @author Misagh Moayyed
* @since 4.2
*/
public class DelegatedAuthenticationWebflowConfigurer extends AbstractCasWebflowConfigurer {
private static final String DECISION_STATE_CHECK_DELEGATED_AUTHN_FAILURE = "checkDelegatedAuthnFailureDecision";
public DelegatedAuthenticationWebflowConfigurer(final FlowBuilderServices flowBuilderServices,
final FlowDefinitionRegistry loginFlowDefinitionRegistry,
final FlowDefinitionRegistry logoutFlowDefinitionRegistry,
final ConfigurableApplicationContext applicationContext,
final CasConfigurationProperties casProperties) {
super(flowBuilderServices, loginFlowDefinitionRegistry, applicationContext, casProperties);
setLogoutFlowDefinitionRegistry(logoutFlowDefinitionRegistry);
}
@Override
protected void doInitialize() {
val flow = getLoginFlow();
if (flow != null) {
createClientActionActionState(flow);
createStopWebflowViewState(flow);
createSaml2ClientLogoutAction();
}
}
protected void createSaml2ClientLogoutAction() {
val logoutFlow = getLogoutFlow();
val state = getState(logoutFlow, CasWebflowConstants.STATE_ID_TERMINATE_SESSION);
state.getEntryActionList().add(createEvaluateAction("delegatedAuthenticationClientLogoutAction"));
}
protected void createClientActionActionState(final Flow flow) {
val actionState = createActionState(flow, CasWebflowConstants.STATE_ID_DELEGATED_AUTHENTICATION,
createEvaluateAction(CasWebflowConstants.ACTION_ID_DELEGATED_AUTHENTICATION));
val transitionSet = actionState.getTransitionSet();
transitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.STATE_ID_CREATE_TICKET_GRANTING_TICKET));
val currentStartState = getStartState(flow).getId();
transitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_ERROR, currentStartState));
transitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_RESUME, CasWebflowConstants.STATE_ID_CREATE_TICKET_GRANTING_TICKET));
transitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_AUTHENTICATION_FAILURE, DECISION_STATE_CHECK_DELEGATED_AUTHN_FAILURE));
transitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_STOP, CasWebflowConstants.STATE_ID_STOP_WEBFLOW));
transitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_WARN, CasWebflowConstants.STATE_ID_WARN));
setStartState(flow, actionState);
}
protected void createStopWebflowViewState(final Flow flow) {
createDecisionState(flow, DECISION_STATE_CHECK_DELEGATED_AUTHN_FAILURE, "flowScope.unauthorizedRedirectUrl != null",
CasWebflowConstants.STATE_ID_SERVICE_UNAUTHZ_CHECK, CasWebflowConstants.STATE_ID_STOP_WEBFLOW);
val state = createViewState(flow, CasWebflowConstants.STATE_ID_STOP_WEBFLOW, CasWebflowConstants.VIEW_ID_PAC4J_STOP_WEBFLOW);
state.getEntryActionList().add(new AbstractAction() {
@Override
protected Event doExecute(final RequestContext requestContext) {
val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
val response = WebUtils.getHttpServletResponseFromExternalWebflowContext(requestContext);
val mv = DelegatedClientAuthenticationAction.hasDelegationRequestFailed(request, response.getStatus());
mv.ifPresent(modelAndView -> modelAndView.getModel().forEach((k, v) -> requestContext.getFlowScope().put(k, v)));
return null;
}
});
}
}
|
[
"mm1844@gmail.com"
] |
mm1844@gmail.com
|
67b5f6a58cb2f38c2b641ba068fe5f1cf3e381d1
|
7cab112a472df702c9b616c760b8940d50324550
|
/aionxemu-master/GameServer/src/gameserver/model/templates/stats/NpcRank.java
|
78df00551d8883f32ed8dddd78493a55c0787887
|
[] |
no_license
|
luckychenheng/server_demo
|
86d31c939fd895c7576156b643ce89354e102209
|
97bdcb1f6cd614fd360cfed800c479fbdb695cd3
|
refs/heads/master
| 2020-05-15T02:59:07.396818
| 2019-05-09T10:30:47
| 2019-05-09T10:30:47
| 182,059,222
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,010
|
java
|
/**
* This file is part of Aion X Emu <aionxemu.com>
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser Public License for more details.
*
* You should have received a copy of the GNU Lesser Public License
* along with this software. If not, see <http://www.gnu.org/licenses/>.
*/
package gameserver.model.templates.stats;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* @author ATracer
*/
@XmlType(name = "rank")
@XmlEnum
public enum NpcRank {
NORMAL,
ELITE,
JUNK,
HERO,
LEGENDARY
}
|
[
"seemac@seedeMacBook-Pro.local"
] |
seemac@seedeMacBook-Pro.local
|
228edaf55989cabbb9903dac1648f8b0464257c7
|
ee1fc12feef20f8ebe734911acdd02b1742e417c
|
/android_sourcecode_crm/app/src/main/java/com/akan/qf/mvp/fragment/statistics/PressurePresenter.java
|
1d3437ca8422234d1acb05f1af32d6c02c838280
|
[
"MIT"
] |
permissive
|
xiaozhangxin/test
|
aee7aae01478a06741978e7747614956508067ed
|
aeda4d6958f8bf7af54f87bc70ad33d81545c5b3
|
refs/heads/master
| 2021-07-15T21:52:28.171542
| 2020-03-09T14:30:45
| 2020-03-09T14:30:45
| 126,810,840
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,131
|
java
|
package com.akan.qf.mvp.fragment.statistics;
import com.akan.qf.App;
import com.akan.qf.http.HttpResult;
import com.akan.qf.mvp.base.BasePresenter;
import java.util.List;
import java.util.Map;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
/**
* Created by admin on 2018/11/23.
*/
public class PressurePresenter extends BasePresenter<IPressureView> {
public PressurePresenter(App app) {
super(app);
}
public void getTestPressureList(String token, Map<String, String> parmer) {
if (isViewAttached())
getView().showProgress();
getAppComponent().getAPIService()
.getTestPressureList(token, parmer)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<HttpResult<List<PressurePageBean>>>() {
@Override
public void onError(Throwable e) {
if (isViewAttached())
getView().onError(e);
}
@Override
public void onComplete() {
}
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(HttpResult<List<PressurePageBean>> userBeanHttpResult) {
if (userBeanHttpResult != null) {
if (isViewAttached()) {
getView().OnGetTestPressureList(userBeanHttpResult.getData(), userBeanHttpResult.getTotal());
}
}
}
});
}
public void queryDetail(String token, Map<String, String> parmer) {
if (isViewAttached())
getView().showProgress();
getAppComponent().getAPIService()
.queryPressureDetail(token, parmer)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<HttpResult<PressurePageBean>>() {
@Override
public void onError(Throwable e) {
if (isViewAttached())
getView().onError(e);
}
@Override
public void onComplete() {
}
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(HttpResult<PressurePageBean> userBeanHttpResult) {
if (userBeanHttpResult != null) {
if (isViewAttached()) {
getView().OnQueryDetail(userBeanHttpResult.getData());
}
}
}
});
}
}
|
[
"xiaozhangxin@shifuhelp.com"
] |
xiaozhangxin@shifuhelp.com
|
8cbd798b75e84abfca5e983de0d3babcdfb9fb57
|
070b9e745c5aad76fb310f5c9111ed77a1036291
|
/Drona-Package/com/facebook/imagepipeline/memory/MemoryChunkPool.java
|
f3a381791bdca53f107f8511a2df0864a7d24916
|
[] |
no_license
|
Drona-team/Drona
|
0f057e62e7f77babf112311734ee98c5824f166c
|
e33a9d92011ef7790c7547cc5a5380083f0dbcd7
|
refs/heads/master
| 2022-11-18T06:38:57.404528
| 2020-07-18T09:35:57
| 2020-07-18T09:35:57
| 280,390,561
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,960
|
java
|
package com.facebook.imagepipeline.memory;
import android.util.SparseIntArray;
import com.facebook.common.internal.Preconditions;
import com.facebook.common.memory.MemoryTrimmableRegistry;
import javax.annotation.concurrent.ThreadSafe;
@ThreadSafe
public abstract class MemoryChunkPool
extends BasePool<MemoryChunk>
{
private final int[] mBucketSizes;
MemoryChunkPool(MemoryTrimmableRegistry paramMemoryTrimmableRegistry, PoolParams paramPoolParams, PoolStatsTracker paramPoolStatsTracker)
{
super(paramMemoryTrimmableRegistry, paramPoolParams, paramPoolStatsTracker);
paramMemoryTrimmableRegistry = bucketSizes;
mBucketSizes = new int[paramMemoryTrimmableRegistry.size()];
int i = 0;
while (i < mBucketSizes.length)
{
mBucketSizes[i] = paramMemoryTrimmableRegistry.keyAt(i);
i += 1;
}
initialize();
}
protected abstract MemoryChunk alloc(int paramInt);
protected void free(MemoryChunk paramMemoryChunk)
{
Preconditions.checkNotNull(paramMemoryChunk);
paramMemoryChunk.close();
}
protected int getBucketedSize(int paramInt)
{
if (paramInt > 0)
{
int[] arrayOfInt = mBucketSizes;
int j = arrayOfInt.length;
int i = 0;
while (i < j)
{
int k = arrayOfInt[i];
if (k >= paramInt) {
return k;
}
i += 1;
}
return paramInt;
}
throw new BasePool.InvalidSizeException(Integer.valueOf(paramInt));
}
protected int getBucketedSizeForValue(MemoryChunk paramMemoryChunk)
{
Preconditions.checkNotNull(paramMemoryChunk);
return paramMemoryChunk.getSize();
}
int getMinBufferSize()
{
return mBucketSizes[0];
}
protected int getSizeInBytes(int paramInt)
{
return paramInt;
}
protected boolean isReusable(MemoryChunk paramMemoryChunk)
{
Preconditions.checkNotNull(paramMemoryChunk);
return paramMemoryChunk.isClosed() ^ true;
}
}
|
[
"samridh6759@gmail.com"
] |
samridh6759@gmail.com
|
9d4e0cc67609293ccac6ba9f1c177bcaff9477f2
|
bab0a52607da1bae663eebe52b90368a1e2e0827
|
/latke/src/main/java/org/b3log/latke/repository/AbstractRepository.java
|
3eb91a120f97378124be0f9223f7e89108a30047
|
[
"Apache-2.0"
] |
permissive
|
wylyeak/b3log-latke
|
9c0eebdc31a82c917131724ee8816c5a1877cbd6
|
816e0023fe7fc03509d8334d9243e7d8c2b58e59
|
refs/heads/master
| 2021-01-18T05:13:35.866678
| 2013-12-05T13:12:27
| 2013-12-05T13:12:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,578
|
java
|
/*
* Copyright (c) 2009, 2010, 2011, 2012, 2013, B3log Team
*
* 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.b3log.latke.repository;
import java.lang.reflect.Constructor;
import java.util.List;
import java.util.Map;
import org.b3log.latke.Keys;
import org.b3log.latke.Latkes;
import org.b3log.latke.RuntimeDatabase;
import org.b3log.latke.RuntimeEnv;
import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger;
import org.b3log.latke.model.Pagination;
import org.b3log.latke.repository.jdbc.JDBCRepositoryException;
import org.b3log.latke.util.Callstacks;
import org.json.JSONArray;
import org.json.JSONObject;
/**
* Abstract repository.
*
* <p>
* This is a base adapter for wrapped {@link #repository repository}, the underlying repository will be instantiated in the
* {@link #AbstractRepository(java.lang.String) constructor} with {@link Latkes#getRuntimeEnv() the current runtime environment}.
* </p>
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.1.6, Dec 2, 2013
*/
public abstract class AbstractRepository implements Repository {
/**
* Logger.
*/
private static final Logger LOGGER = Logger.getLogger(AbstractRepository.class.getName());
/**
* Repository.
*/
private Repository repository;
/**
* Constructs a repository with the specified name.
*
* @param name the specified name
*/
@SuppressWarnings("unchecked")
public AbstractRepository(final String name) {
final RuntimeEnv runtimeEnv = Latkes.getRuntimeEnv();
try {
Class<Repository> repositoryClass = null;
switch (runtimeEnv) {
case BAE:
case LOCAL:
final RuntimeDatabase runtimeDatabase = Latkes.getRuntimeDatabase();
switch (runtimeDatabase) {
case MYSQL:
repositoryClass = (Class<Repository>) Class.forName("org.b3log.latke.repository.jdbc.JdbcRepository");
break;
case H2:
repositoryClass = (Class<Repository>) Class.forName("org.b3log.latke.repository.jdbc.JdbcRepository");
break;
case NONE:
repositoryClass = (Class<Repository>) Class.forName("org.b3log.latke.repository.NoneRepository");
break;
default:
throw new RuntimeException("The runtime database [" + runtimeDatabase + "] is not support NOW!");
}
break;
case GAE:
repositoryClass = (Class<Repository>) Class.forName("org.b3log.latke.repository.gae.GAERepository");
break;
default:
throw new RuntimeException("Latke runs in the hell.... Please set the enviornment correctly");
}
final Constructor<Repository> constructor = repositoryClass.getConstructor(String.class);
repository = constructor.newInstance(name);
} catch (final Exception e) {
throw new RuntimeException("Can not initialize repository!", e);
}
Repositories.addRepository(repository);
LOGGER.log(Level.INFO, "Constructed repository[name={0}]", name);
}
@Override
public String add(final JSONObject jsonObject) throws RepositoryException {
if (!isWritable() && !isInternalCall()) {
throw new RepositoryException("The repository[name=" + getName() + "] is not writable at present");
}
Repositories.check(getName(), jsonObject, Keys.OBJECT_ID);
return repository.add(jsonObject);
}
@Override
public void update(final String id, final JSONObject jsonObject) throws RepositoryException {
if (!isWritable() && !isInternalCall()) {
throw new RepositoryException("The repository[name=" + getName() + "] is not writable at present");
}
Repositories.check(getName(), jsonObject, Keys.OBJECT_ID);
repository.update(id, jsonObject);
}
@Override
public void remove(final String id) throws RepositoryException {
if (!isWritable() && !isInternalCall()) {
throw new RepositoryException("The repository[name=" + getName() + "] is not writable at present");
}
repository.remove(id);
}
@Override
public JSONObject get(final String id) throws RepositoryException {
try {
return repository.get(id);
} catch (final JDBCRepositoryException e) {
LOGGER.log(Level.WARN, "SQL exception[msg={0}]", e.getMessage());
return null;
}
}
@Override
public Map<String, JSONObject> get(final Iterable<String> ids) throws RepositoryException {
return repository.get(ids);
}
@Override
public boolean has(final String id) throws RepositoryException {
return repository.has(id);
}
@Override
public JSONObject get(final Query query) throws RepositoryException {
try {
return repository.get(query);
} catch (final JDBCRepositoryException e) {
LOGGER.log(Level.WARN, "SQL exception[msg={0}, repository={1}, query={2}]", e.getMessage(), repository.getName(),
query.toString());
// XXX: Results.defaultPagination?
final JSONObject ret = new JSONObject();
final JSONObject pagination = new JSONObject();
ret.put(Pagination.PAGINATION, pagination);
pagination.put(Pagination.PAGINATION_PAGE_COUNT, 0);
final JSONArray results = new JSONArray();
ret.put(Keys.RESULTS, results);
return ret;
}
}
@Override
public List<JSONObject> getRandomly(final int fetchSize) throws RepositoryException {
return repository.getRandomly(fetchSize);
}
@Override
public long count() throws RepositoryException {
return repository.count();
}
@Override
public Transaction beginTransaction() {
return repository.beginTransaction();
}
@Override
public boolean hasTransactionBegun() {
return repository.hasTransactionBegun();
}
@Override
public String getName() {
return repository.getName();
}
@Override
public boolean isWritable() {
return repository.isWritable();
}
@Override
public void setWritable(final boolean writable) {
repository.setWritable(writable);
}
/**
* Gets the underlying repository.
*
* @return underlying repository
*/
protected Repository getUnderlyingRepository() {
return repository;
}
/**
* Checks the current method is whether invoked as internal call.
*
* @return {@code true} if the current method is invoked as internal call, return {@code false} otherwise
*/
private static boolean isInternalCall() {
return Callstacks.isCaller("org.b3log.latke.remote.RepositoryAccessor", "*");
}
}
|
[
"DL88250@gmail.com"
] |
DL88250@gmail.com
|
47b773381ef640566339698d0579dbb6b384ce05
|
07e32dfab9e305b865446811ed954b01d11058ec
|
/src/day45_OOP_Inheritance/employeeTask/Driver.java
|
dd00d32d820902b9e6bdf43419db767d998e81f0
|
[] |
no_license
|
Sabirindev/JavaProgramming_B23
|
0eba2ae6257d2a890a7c0cece9467411434325ed
|
5f956f08e26fc10a79a203591b0946111ae1017a
|
refs/heads/master
| 2023-08-27T18:11:07.482812
| 2021-10-14T18:39:20
| 2021-10-14T18:39:20
| 387,595,286
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 324
|
java
|
package day45_OOP_Inheritance.employeeTask;
public class Driver extends Employee{
public Driver(String name, char gender, int age, long id, String jobTitle, double salary) {
super(name, gender, age, id, jobTitle, salary);
}
public void drive(){
System.out.println(name+" is driving");
}
}
|
[
"sdetinscrum@gmail.com"
] |
sdetinscrum@gmail.com
|
3878bd9f32bb719e6e9630f3356f73c09eea6066
|
fe3dacf4a3a0e9abb9b0b960712afda4e34b88bd
|
/src/main/java/com/tuapartamento/app/config/CloudDatabaseConfiguration.java
|
bf16d7236871d58c697caee7ab2c3bc30a8374cf
|
[] |
no_license
|
cbglobant/TuApartamentoApp
|
ee4f7d84c3bb3c6b72ef3cee05f30ec841d0addd
|
ee81bd0e26170a839c2fdf05ef3b0545eebddf70
|
refs/heads/master
| 2020-05-07T14:46:53.738868
| 2019-04-10T15:17:44
| 2019-04-10T15:17:44
| 180,608,793
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 938
|
java
|
package com.tuapartamento.app.config;
import io.github.jhipster.config.JHipsterConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.config.java.AbstractCloudConfig;
import org.springframework.context.annotation.*;
import javax.sql.DataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
@Configuration
@Profile(JHipsterConstants.SPRING_PROFILE_CLOUD)
public class CloudDatabaseConfiguration extends AbstractCloudConfig {
private final Logger log = LoggerFactory.getLogger(CloudDatabaseConfiguration.class);
private static final String CLOUD_CONFIGURATION_HIKARI_PREFIX = "spring.datasource.hikari";
@Bean
@ConfigurationProperties(CLOUD_CONFIGURATION_HIKARI_PREFIX)
public DataSource dataSource() {
log.info("Configuring JDBC datasource from a cloud provider");
return connectionFactory().dataSource();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
8fa1a73d709a8e134c3bd89f03ad8a2d501bd723
|
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
|
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam/Nicad_t1_beam898.java
|
9fb7d94b60725bb77be19488c3a3be68c4411ae8
|
[] |
no_license
|
ryosuke-ku/TestCodeSeacherPlus
|
cfd03a2858b67a05ecf17194213b7c02c5f2caff
|
d002a52251f5461598c7af73925b85a05cea85c6
|
refs/heads/master
| 2020-05-24T01:25:27.000821
| 2019-08-17T06:23:42
| 2019-08-17T06:23:42
| 187,005,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 518
|
java
|
// clone pairs:3698:70%
// 4881:beam/runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/ReferenceCountingFlinkExecutableStageContextFactory.java
public class Nicad_t1_beam898
{
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WrappedContext that = (WrappedContext) o;
return Objects.equals(jobInfo.jobId(), that.jobInfo.jobId());
}
}
|
[
"naist1020@gmail.com"
] |
naist1020@gmail.com
|
161838b4b1917510c68a51997445955abfb24b5b
|
1df3fe64674cee847d552ee70cec148152e733c2
|
/.history/src/test/java/IO/GraphFileReaderSpec_20200524154847.java
|
c8d69d5bcb7db2dfee3bf9cfa9cbe78b52bd5744
|
[] |
no_license
|
z-cchang/MyAlgorithms
|
a8aea56cefb2a899c7baa31c80c1a07ae2ab1935
|
88df167c461967bc7edf1e05896406791a46d3f0
|
refs/heads/master
| 2022-10-06T10:12:46.878855
| 2020-06-08T04:34:50
| 2020-06-08T04:34:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,488
|
java
|
package IO;
import Algorithms.Graph.Network.Edge;
import Algorithms.Graph.Network.EdgeHasSet;
import Algorithms.Graph.Utils.HNodeList;
import Algorithms.Graph.Network.AdjList;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.regex.Pattern;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.*;
@DisplayName("SIFFileReader is")
class GraphFileReaderSpec {
GraphFileReader reader;
@DisplayName("able to use pattern to split. ")
@Test
// The first character cannot be space.-> test whether each element for it's length > 0
void PatternTest() {
String test = "TMA STD BBQ";
String test2 = " TMA STD BBQ";
Pattern splitter = Pattern.compile("\\s+");
String[] tokens = splitter.split(test);
String[] tokens_2 = splitter.split(test2);
ArrayList<String> tokens_3 = new ArrayList<>();
for (String str:tokens_2
) {
if(str.length()!=0){
tokens_3.add(str);
}
}
assertEquals(Arrays.toString(new String[]{"TMA", "STD", "BBQ"}), Arrays.toString(tokens));
assertNotEquals(Arrays.toString(new String[]{"TMA", "STD", "BBQ"}), Arrays.toString(tokens_2));
assertEquals(Arrays.toString(new String[]{"TMA", "STD", "BBQ"}), tokens_3.toString());
}
@DisplayName("able to read a graph to EdgeList from the specific well-formatting file. ")
@Test
void ReadTest(){
try {
GraphFileReader reader = new GraphFileReader();
EdgeHasSet graph = reader.readToEL("src/test/java/resources/IOTest/simpleGraph_1.txt");
// the EdgeList graph is not a self-update graph (automatic replace edges with higher values)
assertThat(graph).contains(new Edge("A","B",0.2),new Edge("A","C",0.6),new Edge("A","C",0.3),
new Edge("A","D",0.4),new Edge("C","B",0.7));
} catch (IOException e) {
e.printStackTrace();
}
try {
GraphFileReader reader = new GraphFileReader();
EdgeHasSet graph = reader.readToEL("src/test/java/resources/IOTest/wrongForTest_1.txt");
} catch (IOException e) {
assertEquals("The file input format is not correct. Plus: some name-value pairs are incorrect!", e.getMessage());
}
}
@DisplayName("able to read a graph to ArrayList from the specific well-formatting file. ")
@Test
void ReadToArrayListTest(){
try {
// homoGeneMap is a self-update graph
GraphFileReader reader = new GraphFileReader();
AdjList graph = reader.readToAdjL("src/test/java/resources/IOTest/simpleGraph_1.txt");
HNodeList forTestA = new HNodeList("A");
HNodeList forTestB = new HNodeList("C");
forTestA.add("B",0.2);
forTestA.add("C",0.3);
forTestA.add("D",0.4);
forTestB.add("A",0.6);
forTestB.add("B",0.7);
assertThat(graph).contains(forTestA,forTestB);
} catch (IOException e) {
e.printStackTrace();
}
}
@DisplayName("able to read a medium-level graph")
@Test
void ReadMediumGraph() throws IOException {
GraphFileReader reader = new GraphFileReader();
AdjList graph = reader.readToAdjL("src/test/java/resources/IOTest/mediumGraph.txt");
assertEquals(0.986,graph.getValByName("RPS9A","RPS9"));
assertEquals(0.756,graph.getValByName("YRF1-4","EIF4A3"));
}
@DisplayName("able to get a HashSet.")
@Test
void getHashSet() throws IOException {
GraphFileReader reader = new GraphFileReader();
AdjList graph = reader.readToAdjL("src/test/java/resources/IOTest/mediumGraph.txt");
HashSet<String> graph1 = reader.getHeadSet();
}
@DisplayName("TSV test")
@Test
void readTSV() throws IOException {
GraphFileReader reader = new GraphFileReader();
AdjList graph = reader.readToAdjL("C:\\Users\\Haotian Bai\\Desktop\\cov19\\A1.tsv");
}
// ---------------------------
// below are some base test class utility methods to validate if the outcome is consistent with your expectation.
void assertNodeNumber(int expected, int original, String message){
assertEqual
}
}
|
[
"43661768+164140757@users.noreply.github.com"
] |
43661768+164140757@users.noreply.github.com
|
bbcdc3415bcf851ef0cb9d46bd7dbf9440c39f7c
|
5b2c309c903625b14991568c442eb3a889762c71
|
/classes/com/snowballfinance/messageplatform/data/Menu.java
|
bd9a707eeee4dce39d720328958f8055db033561
|
[] |
no_license
|
iidioter/xueqiu
|
c71eb4bcc53480770b9abe20c180da693b2d7946
|
a7d8d7dfbaf9e603f72890cf861ed494099f5a80
|
refs/heads/master
| 2020-12-14T23:55:07.246659
| 2016-10-08T08:56:27
| 2016-10-08T08:56:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,510
|
java
|
package com.snowballfinance.messageplatform.data;
import com.snowballfinance.messageplatform.b.d;
import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
public class Menu
implements Serializable
{
private static final long serialVersionUID = 1283397130808226499L;
private Long id;
private List<MenuItem> menuItems;
private Long ts;
private MenuType type;
private Long userId;
private void updateMenuItemsDefaultValues(List<MenuItem> paramList)
{
if ((paramList != null) && (paramList.size() > 0))
{
paramList = paramList.iterator();
while (paramList.hasNext())
{
MenuItem localMenuItem = (MenuItem)paramList.next();
if ((localMenuItem.getId() != null) && (localMenuItem.getType() == null)) {
localMenuItem.setType(MenuItemType.CLICK);
}
if ((localMenuItem.getUrl() != null) && (localMenuItem.getType() == null)) {
localMenuItem.setType(MenuItemType.VIEW);
}
updateMenuItemsDefaultValues(localMenuItem.getSubItems());
}
}
}
public String description()
{
StringBuilder localStringBuilder = new StringBuilder("user=").append(this.userId).append("|type=").append(this.type).append("|ts=").append(this.ts).append("|items=");
if (this.menuItems == null) {}
for (Object localObject = null;; localObject = d.a(this.menuItems)) {
return (String)localObject;
}
}
public Long getId()
{
return this.id;
}
public List<MenuItem> getMenuItems()
{
return this.menuItems;
}
public Long getTs()
{
return this.ts;
}
public MenuType getType()
{
return this.type;
}
public Long getUserId()
{
return this.userId;
}
public void setId(Long paramLong)
{
this.id = paramLong;
}
public void setMenuItems(List<MenuItem> paramList)
{
this.menuItems = paramList;
}
public void setTs(Long paramLong)
{
this.ts = paramLong;
}
public void setType(MenuType paramMenuType)
{
this.type = paramMenuType;
}
public void setUserId(Long paramLong)
{
this.userId = paramLong;
}
public void updateDefaultValues()
{
if (this.type == null) {
this.type = MenuType.HYBRID_MENU;
}
updateMenuItemsDefaultValues(this.menuItems);
}
}
/* Location: E:\apk\xueqiu2\classes-dex2jar.jar!\com\snowballfinance\messageplatform\data\Menu.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
7e32360ef38c53b48610508f98dfdb77620b6fe1
|
6a2f63d971fd5ce988c10cdc2401aae3ba5e0fee
|
/net/minecraft/util/MessageDeserializer.java
|
9395420725c9f681a647cb79a49d57b1c66b2dab
|
[
"MIT"
] |
permissive
|
MikeWuang/hawk-client
|
22d0d723b70826f74d91f0928384513a419592c1
|
7f62687c62709c595e2945d71678984ba1b832ea
|
refs/heads/main
| 2023-04-05T19:50:35.459096
| 2021-04-28T00:52:19
| 2021-04-28T00:52:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,454
|
java
|
package net.minecraft.util;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import java.io.IOException;
import java.util.List;
import net.minecraft.network.EnumConnectionState;
import net.minecraft.network.EnumPacketDirection;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.PacketBuffer;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager;
public class MessageDeserializer extends ByteToMessageDecoder {
private final EnumPacketDirection direction;
private static final String __OBFID = "CL_00001252";
private static final Logger logger = LogManager.getLogger();
private static final Marker RECEIVED_PACKET_MARKER;
static {
RECEIVED_PACKET_MARKER = MarkerManager.getMarker("PACKET_RECEIVED", NetworkManager.logMarkerPackets);
}
protected void decode(ChannelHandlerContext var1, ByteBuf var2, List var3) throws IllegalAccessException, InstantiationException, IOException {
if (var2.readableBytes() != 0) {
PacketBuffer var4 = new PacketBuffer(var2);
int var5 = var4.readVarIntFromBuffer();
Packet var6 = ((EnumConnectionState)var1.channel().attr(NetworkManager.attrKeyConnectionState).get()).getPacket(this.direction, var5);
if (var6 == null) {
throw new IOException(String.valueOf((new StringBuilder("Bad packet id ")).append(var5)));
}
var6.readPacketData(var4);
if (var4.readableBytes() > 0) {
throw new IOException(String.valueOf((new StringBuilder("Packet ")).append(((EnumConnectionState)var1.channel().attr(NetworkManager.attrKeyConnectionState).get()).getId()).append("/").append(var5).append(" (").append(var6.getClass().getSimpleName()).append(") was larger than I expected, found ").append(var4.readableBytes()).append(" bytes extra whilst reading packet ").append(var5)));
}
var3.add(var6);
if (logger.isDebugEnabled()) {
logger.debug(RECEIVED_PACKET_MARKER, " IN: [{}:{}] {}", new Object[]{var1.channel().attr(NetworkManager.attrKeyConnectionState).get(), var5, var6.getClass().getName()});
}
}
}
public MessageDeserializer(EnumPacketDirection var1) {
this.direction = var1;
}
}
|
[
"omadude420@gmail.com"
] |
omadude420@gmail.com
|
b2c345c12b76679c002c9fcdc6f9931c7cb0ab4f
|
eac0b43bd7bf55f9c59c6867cc52706f5a8b9c1c
|
/eshop-v3/eshop-commodity/src/main/java/com/zhss/eshop/commodity/domain/GoodsDetailDO.java
|
cdad9c4685b6d11defdf1ee16e2c9aa048637066
|
[] |
no_license
|
fengqing90/Learn
|
b017fa9d40cb0592ee63f77f620a8a8f39f046b9
|
396f48eddb5b78a4fdb880d46ea1f2b109b707e4
|
refs/heads/master
| 2022-11-22T01:44:05.803929
| 2021-08-04T03:57:26
| 2021-08-04T03:57:26
| 144,801,377
| 0
| 3
| null | 2022-11-16T06:59:58
| 2018-08-15T03:29:15
|
Java
|
UTF-8
|
Java
| false
| false
| 2,841
|
java
|
package com.zhss.eshop.commodity.domain;
import java.util.Date;
import com.zhss.eshop.common.util.AbstractObject;
/**
* 商品详情
* @author zhonghuashishan
*
*/
public class GoodsDetailDO extends AbstractObject {
/**
* id
*/
private Long id;
/**
* 商品id
*/
private Long goodsId;
/**
* 商品详情的内容
*/
private String detailContent;
/**
* 创建时间
*/
private Date gmtCreate;
/**
* 修改时间
*/
private Date gmtModified;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getGoodsId() {
return goodsId;
}
public void setGoodsId(Long goodsId) {
this.goodsId = goodsId;
}
public String getDetailContent() {
return detailContent;
}
public void setDetailContent(String detailContent) {
this.detailContent = detailContent;
}
public Date getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Date getGmtModified() {
return gmtModified;
}
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((detailContent == null) ? 0 : detailContent.hashCode());
result = prime * result + ((gmtCreate == null) ? 0 : gmtCreate.hashCode());
result = prime * result + ((gmtModified == null) ? 0 : gmtModified.hashCode());
result = prime * result + ((goodsId == null) ? 0 : goodsId.hashCode());
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
GoodsDetailDO other = (GoodsDetailDO) obj;
if (detailContent == null) {
if (other.detailContent != null) {
return false;
}
} else if (!detailContent.equals(other.detailContent)) {
return false;
}
if (gmtCreate == null) {
if (other.gmtCreate != null) {
return false;
}
} else if (!gmtCreate.equals(other.gmtCreate)) {
return false;
}
if (gmtModified == null) {
if (other.gmtModified != null) {
return false;
}
} else if (!gmtModified.equals(other.gmtModified)) {
return false;
}
if (goodsId == null) {
if (other.goodsId != null) {
return false;
}
} else if (!goodsId.equals(other.goodsId)) {
return false;
}
if (id == null) {
if (other.id != null) {
return false;
}
} else if (!id.equals(other.id)) {
return false;
}
return true;
}
@Override
public String toString() {
return "GoodsDetailDO [id=" + id + ", goodsId=" + goodsId + ", detailContent=" + detailContent + ", gmtCreate="
+ gmtCreate + ", gmtModified=" + gmtModified + "]";
}
}
|
[
"fengqing@youxin.com"
] |
fengqing@youxin.com
|
5cabb7abce01613c2dcf7b8a3755fce7074413df
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MOCKITO-16b-4-18-SPEA2-WeightedSum:TestLen:CallDiversity/org/mockito/Mockito_ESTest.java
|
35f9e6fd436de6e16ffdd8dce41dd050a7d0d837
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 696
|
java
|
/*
* This file was automatically generated by EvoSuite
* Mon Apr 06 17:05:09 UTC 2020
*/
package org.mockito;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class Mockito_ESTest extends Mockito_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
Integer integer0 = new Integer(2424);
// Undeclared exception!
Mockito.when(integer0);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
4415bdb71ad10c2af0db883d5401a305d1a2bf33
|
c647325f10fdf5177fdd595b8911f025945250da
|
/src/main/lesson170828/teacherworkinclass/ThreadExample2.java
|
7418f6d96bb0307df33a75405578cc82091a0fa5
|
[] |
no_license
|
alexeyltd/MyWorkInClassEpam2017
|
4dc0311987550f9106abb8b78a5b83c39d658930
|
8e7be05a3ab51d913fc2d846493150c6b56019f7
|
refs/heads/master
| 2021-01-21T14:28:35.630616
| 2017-09-15T17:23:32
| 2017-09-15T17:23:32
| 95,287,120
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 370
|
java
|
package main.lesson170828.teacherworkinclass;
public class ThreadExample2 {
public static void main(String[] args) {
Thread thread = new Thread(() -> {
int count = 0;
while (true) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println(count++);
}
});
thread.start();
}
}
|
[
"sk.alexey.pavlenko@gmail.com"
] |
sk.alexey.pavlenko@gmail.com
|
82db71bd1ac4caecd6049d829b0c840903de4e89
|
ac82c09fd704b2288cef8342bde6d66f200eeb0d
|
/projects/OG-Analytics/src/test/java/com/opengamma/analytics/financial/timeseries/util/TimeSeriesOperatorTest.java
|
70c439e82c1af22a6926d954fa958beef0cad583
|
[
"Apache-2.0"
] |
permissive
|
cobaltblueocean/OG-Platform
|
88f1a6a94f76d7f589fb8fbacb3f26502835d7bb
|
9b78891139503d8c6aecdeadc4d583b23a0cc0f2
|
refs/heads/master
| 2021-08-26T00:44:27.315546
| 2018-02-23T20:12:08
| 2018-02-23T20:12:08
| 241,467,299
| 0
| 2
|
Apache-2.0
| 2021-08-02T17:20:41
| 2020-02-18T21:05:35
|
Java
|
UTF-8
|
Java
| false
| false
| 2,743
|
java
|
/**
* Copyright (C) 2013 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.analytics.financial.timeseries.util;
import org.testng.annotations.Test;
import org.threeten.bp.LocalDate;
import com.opengamma.timeseries.date.DateDoubleTimeSeries;
import com.opengamma.timeseries.date.localdate.ImmutableLocalDateDoubleTimeSeries;
import com.opengamma.util.test.TestGroup;
/**
* Test.
*/
@Test(groups = TestGroup.UNIT)
public class TimeSeriesOperatorTest {
@Test
public void testWeightedVol() {
DateDoubleTimeSeries<?> priceSeries = getTestPriceSeries();
TimeSeriesWeightedVolatilityOperator weightedVolOperator = TimeSeriesWeightedVolatilityOperator.relative(0.94);
DateDoubleTimeSeries<?> weightedVolSeries = weightedVolOperator.evaluate(priceSeries);
DateDoubleTimeSeries<?> expectedWeightedVolSeries = ImmutableLocalDateDoubleTimeSeries.of(new LocalDate[] {ld(2), ld(3), ld(4), ld(5), ld(6), ld(7), ld(8), ld(9), ld(10)}, new double[] {0.010840108, 0.012469726, 0.012089848, 0.011794118, 0.011732656, 0.012375053, 0.013438035, 0.013028659, 0.013433833});
TimeSeriesDataTestUtils.testCloseEquals(expectedWeightedVolSeries, weightedVolSeries, 0.000000001);
}
@Test
public void testRelativeVolatilityWeighting() {
DateDoubleTimeSeries<?> priceSeries = getTestPriceSeries();
TimeSeriesWeightedVolatilityOperator weightedVolOperator = TimeSeriesWeightedVolatilityOperator.relative(0.94);
DateDoubleTimeSeries<?> weightedVolSeries = weightedVolOperator.evaluate(priceSeries);
TimeSeriesRelativeWeightedDifferenceOperator relativeWeightedDifferenceOperator = new TimeSeriesRelativeWeightedDifferenceOperator();
DateDoubleTimeSeries<?> relativeWeightedDifferenceSeries = relativeWeightedDifferenceOperator.evaluate(priceSeries, weightedVolSeries);
DateDoubleTimeSeries<?> expectedRelativeWeightedDifferenceSeries = ImmutableLocalDateDoubleTimeSeries.of(new LocalDate[] {ld(2), ld(3), ld(4), ld(5), ld(6), ld(7), ld(8), ld(9), ld(10)}, new double[] {-9.914168489, 21.546315757, 0, -4.556112623, 9.159959999, 16.283363544, -18.994057616, 0, 14});
TimeSeriesDataTestUtils.testCloseEquals(expectedRelativeWeightedDifferenceSeries, relativeWeightedDifferenceSeries, 0.000000001);
}
private static DateDoubleTimeSeries<?> getTestPriceSeries() {
DateDoubleTimeSeries<?> returnSeries = ImmutableLocalDateDoubleTimeSeries.of(new LocalDate[] {ld(1), ld(2), ld(3), ld(4), ld(5), ld(6), ld(7), ld(8), ld(9), ld(10)}, new double[] {738, 730, 750, 750, 746, 754, 769, 750, 750, 764});
return returnSeries;
}
private static LocalDate ld(long day) {
return LocalDate.ofEpochDay(day);
}
}
|
[
"cobaltblue.ocean@gmail.com"
] |
cobaltblue.ocean@gmail.com
|
c654062164ae68c6d106647d4e0fe5a1d4b63fae
|
97b361864cf3a44ec62dcc893c456ccdb6fa55a9
|
/src/com/yufan/common/bean/PropertyFilter.java
|
f089d1031ad73fed2742e0dae59e998e23fe564f
|
[] |
no_license
|
lirf2018/rs_store_manage
|
63d1aa30ebc11260f34c0408c24c8970bdc5933c
|
8b0f0e6618df4ce692450e25a7e693c6c53e05fe
|
refs/heads/master
| 2020-06-24T23:36:16.069642
| 2019-07-09T02:37:54
| 2019-07-09T02:38:26
| 195,915,502
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,744
|
java
|
package com.yufan.common.bean;
/**
* @author wt
*/
public class PropertyFilter {
private static final String prefix = "filter_";
public enum MatchType {
EQ, NOTEQ, LIKE, LT, GT, LE, GE;
}
private String fieldName;
private String filterName;
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
public String getFilterName() {
return filterName;
}
public void setFilterName(String filterName) {
this.filterName = filterName;
}
/*
* eg. filter_EQ_name
*/
public PropertyFilter(final String property) {
if (property == null || property.indexOf(prefix) < 0) {
this.fieldName = property;
this.filterName = "=";
} else {
String unprefixed = property.substring(prefix.length());
String matchTypeCode = unprefixed.substring(0, unprefixed.indexOf("_"));
try {
MatchType matchType = Enum.valueOf(MatchType.class, matchTypeCode);
String name = unprefixed.substring(unprefixed.indexOf("_") + 1);
switch (matchType) {
case EQ:
this.fieldName = name;
this.filterName = "=";
break;
case NOTEQ:
this.fieldName = name;
this.filterName = "<>";
break;
case LIKE:
this.fieldName = name;
this.filterName = "like";
break;
case LT:
this.fieldName = name;
this.filterName = ">=";
break;
case GT:
this.fieldName = name;
this.filterName = "<=";
break;
case LE:
this.fieldName = name;
this.filterName = ">";
break;
case GE:
this.fieldName = name;
this.filterName = "<";
break;
}
} catch (RuntimeException e) {
throw new IllegalArgumentException("filter名称" + unprefixed + "没有按规则编写,无法得到属性比较类型.", e);
}
}
}
public static void main(String[] args) {
PropertyFilter filter = new PropertyFilter("filter_EQ_username");
System.out.println(filter.fieldName + ":" + filter.filterName);
}
}
|
[
"512164882@qq.com"
] |
512164882@qq.com
|
1c4cf12960528843c4c717a298f4d484dccdb85c
|
3a92d98ba2ac492c1cb2bbafeff92a85e0c3e5d1
|
/src/main/java/lsieun/bytecode/gen/opcode/ICONST_0.java
|
7547bcb2b260368d83873557e0655f3f4729327b
|
[
"MIT"
] |
permissive
|
lsieun/lsieun-bytecode-gen
|
7379f3ad57ed2d452f195aef2454ad10f4920055
|
16c5e2e361ebca4a076741402cd9f19f7e13b82d
|
refs/heads/master
| 2021-07-08T00:39:31.019071
| 2019-08-18T02:20:46
| 2019-08-18T02:20:46
| 201,840,405
| 0
| 0
|
MIT
| 2020-10-13T15:24:06
| 2019-08-12T02:05:49
|
Java
|
UTF-8
|
Java
| false
| false
| 384
|
java
|
package lsieun.bytecode.gen.opcode;
import java.io.DataOutputStream;
import java.io.IOException;
import lsieun.bytecode.core.cst.OpcodeConst;
public final class ICONST_0 extends Instruction {
public ICONST_0() {
super(OpcodeConst.ICONST_0, 1);
}
@Override
public void dump(DataOutputStream out) throws IOException {
out.writeByte(opcode);
}
}
|
[
"331505785@qq.com"
] |
331505785@qq.com
|
947a933d35b5c407ed63d4e050a51106ee1c7b13
|
17e8438486cb3e3073966ca2c14956d3ba9209ea
|
/dso/branches/3.4/code/base/dso-statistics/src/com/tc/statistics/cli/commands/CommandStartup.java
|
68b61f8874cce396670b8a80d57814659af2d923
|
[] |
no_license
|
sirinath/Terracotta
|
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
|
00a7662b9cf530dfdb43f2dd821fa559e998c892
|
refs/heads/master
| 2021-01-23T05:41:52.414211
| 2015-07-02T15:21:54
| 2015-07-02T15:21:54
| 38,613,711
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,319
|
java
|
/*
* All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright
* notice. All rights reserved.
*/
package com.tc.statistics.cli.commands;
import com.tc.statistics.beans.StatisticsLocalGathererMBean;
import com.tc.statistics.cli.GathererConnection;
import com.tc.statistics.gatherer.exceptions.StatisticsGathererAlreadyConnectedException;
import javax.management.RuntimeMBeanException;
public class CommandStartup extends AbstractCliCommand {
public String[] getArgumentNames() {
return NO_ARGUMENTS;
}
public void execute(final GathererConnection connection, final String[] arguments) {
try {
StatisticsLocalGathererMBean gatherer = connection.getGatherer();
gatherer.setUsername(connection.getUsername());
gatherer.setPassword(connection.getPassword());
gatherer.startup();
System.out.println("> Started up.");
} catch (RuntimeMBeanException e) {
Throwable cause1 = e.getCause();
if (cause1 != null && cause1 instanceof RuntimeException) {
Throwable cause2 = cause1.getCause();
if (cause2 != null && cause2 instanceof StatisticsGathererAlreadyConnectedException) {
System.out.println("> Already started up.");
return;
}
}
throw e;
}
}
}
|
[
"jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864"
] |
jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864
|
7c7b8fd4e530900b80da6b527f492ba57e177370
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/LANG-9b-1-17-MOEAD-WeightedSum:TestLen:CallDiversity/org/apache/commons/lang3/time/FastDateParser_ESTest_scaffolding.java
|
f380100a6f818bf53a6a7f1e0165738795ab3845
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 448
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Jan 19 14:38:35 UTC 2020
*/
package org.apache.commons.lang3.time;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class FastDateParser_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
953166583e1a13d2cac20a3ffc9c511e566dfbcb
|
1ebd71e2179be8a2baec90ff3f326a3f19b03a54
|
/hybris/bin/modules/configurator-complex-products/ysapproductconfigaddon/src/de/hybris/platform/sap/productconfig/frontend/jalo/ProductConfigOverviewPage.java
|
84de9d65065098a5c3d0fe2fa1d11374365228c2
|
[] |
no_license
|
shaikshakeeb785/hybrisNew
|
c753ac45c6ae264373e8224842dfc2c40a397eb9
|
228100b58d788d6f3203333058fd4e358621aba1
|
refs/heads/master
| 2023-08-15T06:31:59.469432
| 2021-09-03T09:02:04
| 2021-09-03T09:02:04
| 402,680,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 602
|
java
|
/*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("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 SAP.
*/
package de.hybris.platform.sap.productconfig.frontend.jalo;
/**
* Component providing an overview of an runtime configuration.
*/
public class ProductConfigOverviewPage extends GeneratedProductConfigOverviewPage
{
//no implementation yet
}
|
[
"sauravkr82711@gmail.com"
] |
sauravkr82711@gmail.com
|
144eb4116e40c43cfc0060043b13ee506b860830
|
34182a13cd6291fc4657546e196c6447553b5eb0
|
/corejava/pattern/src/main/java/com/xubh01/builder/Client.java
|
84acec82b0bf1884ca8d8aa20cbfc2e4fb009050
|
[] |
no_license
|
786991884/sxnd-study
|
9bf3d417879680f94b012867ef71ba880a19e4fc
|
8c1f8e8823c077f095dc4be0c89522b6f0eb1457
|
refs/heads/master
| 2021-01-12T08:49:59.493518
| 2018-04-03T09:17:54
| 2018-04-03T09:17:54
| 76,701,131
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 299
|
java
|
package com.xubh01.builder;
public class Client {
public static void main(String[] args) {
AirShipDirector director = new SxtAirshipDirector(new SxtAirShipBuilder());
AirShip ship = director.directAirShip();
System.out.println(ship.getEngine().getName());
ship.launch();
}
}
|
[
"786991884@qq.com"
] |
786991884@qq.com
|
d81b4dec41cba15844f0a7e81062b173339f6f74
|
b474398887fd3f2fbebd29ccc580c5fb293e252d
|
/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java
|
5923ff0751bd18a0563f94886ec8263650fec674
|
[
"MIT"
] |
permissive
|
AndyChenIT/JDKSourceCode1.8
|
65a27e356debdcedc15642849602174c6ea286aa
|
4aa406b5b52e19ef8a323f9f829ea1852105d18b
|
refs/heads/master
| 2023-09-02T15:14:37.857475
| 2021-11-19T10:13:31
| 2021-11-19T10:13:31
| 428,856,994
| 0
| 0
|
MIT
| 2021-11-17T00:26:30
| 2021-11-17T00:26:29
| null |
UTF-8
|
Java
| false
| false
| 3,802
|
java
|
/*
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: ConcatCall.java,v 1.2.4.1 2005/09/01 12:07:31 pvedula Exp $
*/
package com.sun.org.apache.xalan.internal.xsltc.compiler;
import java.util.Vector;
import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
import com.sun.org.apache.bcel.internal.generic.Instruction;
import com.sun.org.apache.bcel.internal.generic.InstructionList;
import com.sun.org.apache.bcel.internal.generic.NEW;
import com.sun.org.apache.bcel.internal.generic.PUSH;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
*/
final class ConcatCall extends FunctionCall {
public ConcatCall(QName fname, Vector arguments) {
super(fname, arguments);
}
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
for (int i = 0; i < argumentCount(); i++) {
final Expression exp = argument(i);
if (!exp.typeCheck(stable).identicalTo(Type.String)) {
setArgument(i, new CastExpr(exp, Type.String));
}
}
return _type = Type.String;
}
/** translate leaves a String on the stack */
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
final int nArgs = argumentCount();
switch (nArgs) {
case 0:
il.append(new PUSH(cpg, EMPTYSTRING));
break;
case 1:
argument().translate(classGen, methodGen);
break;
default:
final int initBuffer = cpg.addMethodref(STRING_BUFFER_CLASS,
"<init>", "()V");
final Instruction append =
new INVOKEVIRTUAL(cpg.addMethodref(STRING_BUFFER_CLASS,
"append",
"("+STRING_SIG+")"
+STRING_BUFFER_SIG));
final int toString = cpg.addMethodref(STRING_BUFFER_CLASS,
"toString",
"()"+STRING_SIG);
il.append(new NEW(cpg.addClass(STRING_BUFFER_CLASS)));
il.append(DUP);
il.append(new INVOKESPECIAL(initBuffer));
for (int i = 0; i < nArgs; i++) {
argument(i).translate(classGen, methodGen);
il.append(append);
}
il.append(new INVOKEVIRTUAL(toString));
}
}
}
|
[
"wupx@glodon.com"
] |
wupx@glodon.com
|
13a173c0e656ea871ac48974330ac58bdec554cf
|
c21c967d7a7f6df4eade4c96492b5df988e4d536
|
/app/src/main/java/dimfcompany/com/salesideas/Fragments/frag_my_accaunt.java
|
cbe8833a3e41156b43bf369a95d15e03df4af959
|
[] |
no_license
|
bios90/salesIdeas
|
3b485f48277f50fcdebc1cba5a14fabdbde3ab21
|
1758dcc963940fd619c394467fe6d340182619da
|
refs/heads/master
| 2020-04-05T19:30:15.469114
| 2019-01-30T13:43:46
| 2019-01-30T13:43:46
| 157,137,375
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,794
|
java
|
package dimfcompany.com.salesideas.Fragments;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.vk.sdk.VKAccessToken;
import com.vk.sdk.VKCallback;
import com.vk.sdk.VKScope;
import com.vk.sdk.VKSdk;
import com.vk.sdk.VKServiceActivity;
import com.vk.sdk.api.VKApi;
import com.vk.sdk.api.VKApiConst;
import com.vk.sdk.api.VKError;
import com.vk.sdk.api.VKParameters;
import com.vk.sdk.api.VKRequest;
import com.vk.sdk.api.VKResponse;
import com.vk.sdk.api.model.VKApiUser;
import com.vk.sdk.api.model.VKList;
import net.cachapa.expandablelayout.ExpandableLayout;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import dimfcompany.com.salesideas.Helpers.GlobalHelper;
import dimfcompany.com.salesideas.Helpers.MySqlHelper;
import dimfcompany.com.salesideas.Models.Model_Interest;
import dimfcompany.com.salesideas.R;
import dimfcompany.com.salesideas.act_main;
import static android.content.Context.MODE_PRIVATE;
public class frag_my_accaunt extends Fragment
{
private static final String TAG = "frag_my_accaunt";
act_main parentActMain;
GlobalHelper gh;
View thisFragmentRootView;
MySqlHelper mySqlHelper;
frag_my_profile parentFrag;
Button btnAddVK;
TextView tvAdminName,tvAdminEmail,tvVkName;
Map<String,Object> adminInfo;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
{
return inflater.inflate(R.layout.frag_my_accaunt,container,false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState)
{
super.onViewCreated(view, savedInstanceState);
thisFragmentRootView = view;
init();
}
private void init()
{
parentActMain = (act_main)getActivity();
gh = (GlobalHelper)parentActMain.getApplicationContext();
parentFrag = (frag_my_profile)frag_my_accaunt.this.getParentFragment();
tvAdminName = thisFragmentRootView.findViewById(R.id.tvAdminName);
tvAdminEmail = thisFragmentRootView.findViewById(R.id.tvAdminEmail);
tvVkName = thisFragmentRootView.findViewById(R.id.tvVkName);
btnAddVK = thisFragmentRootView.findViewById(R.id.btnVkAdd);
adminInfo = gh.getAdminInfo();
tvAdminName.setText((String)adminInfo.get(GlobalHelper.SQL_COL_NAME));
tvAdminEmail.setText((String)adminInfo.get(GlobalHelper.SQL_COL_EMAIL));
String vkName = (String)adminInfo.get(GlobalHelper.SQL_COL_VK_NAME);
String vkId = (String)adminInfo.get(GlobalHelper.SQL_COL_VK_ID);
if(vkName == null || vkId == null)
{
btnAddVK.setVisibility(View.VISIBLE);
tvVkName.setVisibility(View.GONE);
}
else
{
tvVkName.setVisibility(View.VISIBLE);
tvVkName.setText(vkName);
btnAddVK.setVisibility(View.GONE);
}
btnAddVK.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view)
{
addVkProfile();
}
});
}
private void addVkProfile()
{
Intent intent = new Intent(getActivity(), VKServiceActivity.class);
intent.putExtra("arg1", "Authorization");
ArrayList scopes = new ArrayList<>();
scopes.add(VKScope.OFFLINE);
scopes.add(VKScope.FRIENDS);
scopes.add(VKScope.PHOTOS);
intent.putStringArrayListExtra("arg2", scopes);
intent.putExtra("arg4", VKSdk.isCustomInitialize());
startActivityForResult(intent, VKServiceActivity.VKServiceType.Authorization.getOuterCode());
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data)
{
if (!VKSdk.onActivityResult(requestCode, resultCode, data, new VKCallback<VKAccessToken>()
{
@Override
public void onResult(VKAccessToken res)
{
GlobalHelper.setVkApiToken(res.accessToken);
SharedPreferences.Editor editor = parentActMain.getSharedPreferences(GlobalHelper.ADMIN_INFO_PREFS, MODE_PRIVATE).edit();
editor.putString(GlobalHelper.SQL_COL_VK_API_TOKEN, res.accessToken);
editor.apply();
editor.commit();
makeAdminInfoUpdate();
}
@Override
public void onError(VKError error)
{
}
}))
{
super.onActivityResult(requestCode, resultCode, data);
}
}
private void makeAdminInfoUpdate()
{
String token = GlobalHelper.getVkApiToken();
VKParameters parameters = VKParameters.from(VKApiConst.ACCESS_TOKEN, token);
VKRequest request = new VKRequest("users.get", parameters);
request.executeWithListener(new VKRequest.VKRequestListener()
{
@Override
public void onComplete(VKResponse response)
{
super.onComplete(response);
Log.e(TAG, "VK RESPONSE "+response.responseString );
try
{
JSONArray jsonArray = response.json.getJSONArray("response");
JSONObject userObject = jsonArray.getJSONObject(0);
String first_name = userObject.getString("first_name");
String last_name = userObject.getString("last_name");
String id = String.valueOf(userObject.getInt("id"));
SharedPreferences.Editor editor = parentActMain.getSharedPreferences(GlobalHelper.ADMIN_INFO_PREFS, MODE_PRIVATE).edit();
editor.putString(GlobalHelper.SQL_COL_VK_NAME, first_name+" "+last_name);
editor.putString(GlobalHelper.SQL_COL_VK_ID, id);
editor.apply();
editor.commit();
parentFrag.resetMyAccaunt();
} catch (JSONException e)
{
Log.e(TAG, "onComplete: "+e.getMessage() );;
}
}
@Override
public void onError(VKError error)
{
super.onError(error);
Log.e(TAG, "onError: "+error.toString() );
}
});
// request.executeWithListener(new VKRequestListener(MainActivity.this)
// {
// @Override
// public void onComplete(VKResponse response) {
// super.onComplete(response);
//
// String status = "";
//
// try {
//
// JSONObject jsonObject = response.json.getJSONObject("response");
//
// String first_name = jsonObject.getString("first_name");
// String last_name = jsonObject.getString("last_name");
// String screen_name = jsonObject.getString("screen_name");
// status = jsonObject.getString("status");
// } catch (JSONException e) {
// e.printStackTrace();
// }
//
// }
// });
}
}
|
[
"bios90@mail.ru"
] |
bios90@mail.ru
|
aba1c7b5e88e21a76e7a0e078244416519e2624f
|
5e50672a808ba590eae726c681ff275c289bd407
|
/plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/expression/RewriteLogicalExpression.java
|
2d1ea801ea035a35a148b933341c41848e15c6e0
|
[
"Apache-2.0"
] |
permissive
|
beinan/prestosql
|
3c6ab884e0938e36abe82928a5c3c11538215a78
|
9703bf6b8995754ec1d9e8ef637a61eefe38b5fe
|
refs/heads/master
| 2023-08-31T01:12:46.079996
| 2022-08-09T04:11:01
| 2022-08-10T19:51:43
| 176,814,240
| 0
| 4
|
Apache-2.0
| 2023-05-31T08:16:04
| 2019-03-20T20:45:56
|
Java
|
UTF-8
|
Java
| false
| false
| 2,796
|
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 io.trino.plugin.jdbc.expression;
import io.trino.matching.Captures;
import io.trino.matching.Pattern;
import io.trino.plugin.base.expression.ConnectorExpressionRule;
import io.trino.spi.expression.Call;
import io.trino.spi.expression.ConnectorExpression;
import io.trino.spi.expression.FunctionName;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import static com.google.common.base.Verify.verify;
import static io.trino.plugin.base.expression.ConnectorExpressionPatterns.call;
import static io.trino.plugin.base.expression.ConnectorExpressionPatterns.functionName;
import static io.trino.plugin.base.expression.ConnectorExpressionPatterns.type;
import static io.trino.spi.type.BooleanType.BOOLEAN;
import static java.util.Objects.requireNonNull;
class RewriteLogicalExpression
implements ConnectorExpressionRule<Call, String>
{
private final Pattern<Call> pattern;
private final String operator;
RewriteLogicalExpression(FunctionName functionName, String operator)
{
this.pattern = call()
.with(functionName().equalTo(requireNonNull(functionName, "functionName is null")))
.with(type().equalTo(BOOLEAN));
this.operator = requireNonNull(operator, "operator is null");
}
@Override
public Pattern<Call> getPattern()
{
return pattern;
}
@Override
public Optional<String> rewrite(Call call, Captures captures, RewriteContext<String> context)
{
List<ConnectorExpression> arguments = call.getArguments();
verify(!arguments.isEmpty(), "no arguments");
List<String> terms = new ArrayList<>(arguments.size());
for (ConnectorExpression argument : arguments) {
verify(argument.getType() == BOOLEAN, "Unexpected type of argument: %s", argument.getType());
Optional<String> rewritten = context.defaultRewrite(argument);
if (rewritten.isEmpty()) {
return Optional.empty();
}
terms.add(rewritten.get());
}
return Optional.of(terms.stream()
.collect(Collectors.joining(") " + operator + " (", "(", ")")));
}
}
|
[
"piotr.findeisen@gmail.com"
] |
piotr.findeisen@gmail.com
|
fc94e9e446d6bc2015b7ee9c57ffc2e73a61a2c9
|
ac82c09fd704b2288cef8342bde6d66f200eeb0d
|
/projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/interestrate/SwaptionSurfaceSensitivityNodeCalculator.java
|
b35350956180f11d42f9e1e0e56c059b8cb34ff5
|
[
"Apache-2.0"
] |
permissive
|
cobaltblueocean/OG-Platform
|
88f1a6a94f76d7f589fb8fbacb3f26502835d7bb
|
9b78891139503d8c6aecdeadc4d583b23a0cc0f2
|
refs/heads/master
| 2021-08-26T00:44:27.315546
| 2018-02-23T20:12:08
| 2018-02-23T20:12:08
| 241,467,299
| 0
| 2
|
Apache-2.0
| 2021-08-02T17:20:41
| 2020-02-18T21:05:35
|
Java
|
UTF-8
|
Java
| false
| false
| 3,021
|
java
|
/**
* Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.analytics.financial.interestrate;
import java.util.Map;
import java.util.Map.Entry;
import com.opengamma.analytics.financial.interestrate.sensitivity.PresentValueSwaptionSurfaceSensitivity;
import com.opengamma.analytics.financial.provider.description.interestrate.SwaptionSurfaceProvider;
import com.opengamma.analytics.math.interpolation.Interpolator2D;
import com.opengamma.analytics.math.interpolation.data.Interpolator1DDataBundle;
import com.opengamma.analytics.math.surface.InterpolatedDoublesSurface;
import com.opengamma.analytics.util.amount.SurfaceValue;
import com.opengamma.util.ArgumentChecker;
import com.opengamma.util.tuple.DoublesPair;
/**
* For a set of surface swaption sensitivities, computes the sensitivities with respect to the node points of a
* given set of parameters interpolated surface.
*/
public class SwaptionSurfaceSensitivityNodeCalculator {
/**
* Computes the sensitivity to the nodes of the parameter surface from sensitivities to intermediary points
* and the parameter surface description.
* @param sensitivities The sensitivity to intermediary points.
* @param parameters The surface parameters. The underlying volatility surface should be of type InterpolatedDoublesSurface.
* @return The sensitivity to the nodes.
*/
public PresentValueSwaptionSurfaceSensitivity calculateNodeSensitivities(
final PresentValueSwaptionSurfaceSensitivity sensitivities, final SwaptionSurfaceProvider parameters) {
ArgumentChecker.notNull(sensitivities, "Black swaption sensitivities");
ArgumentChecker.notNull(parameters, "Black swaption parameters");
ArgumentChecker.isTrue(parameters.getGeneratorSwap().equals(sensitivities.getGeneratorSwap()),
"Sensitivities and parameters should refer to the same swap generator");
ArgumentChecker.isTrue(parameters.getParameterSurface() instanceof InterpolatedDoublesSurface,
"Can only calculate node sensitivities for interpolated double surfaces");
InterpolatedDoublesSurface interpolatedSurface = (InterpolatedDoublesSurface) parameters.getParameterSurface();
Map<Double, Interpolator1DDataBundle> volatilityData =
(Map<Double, Interpolator1DDataBundle>) interpolatedSurface.getInterpolatorData();
Interpolator2D interpolator = interpolatedSurface.getInterpolator();
SurfaceValue sensitivityNode = new SurfaceValue();
for (final Entry<DoublesPair, Double> entry : sensitivities.getSensitivity().getMap().entrySet()) {
final Map<DoublesPair, Double> weight = interpolator.getNodeSensitivitiesForValue(volatilityData, entry.getKey());
sensitivityNode = SurfaceValue.plus(sensitivityNode,
SurfaceValue.multiplyBy(SurfaceValue.from(weight), entry.getValue()));
}
return new PresentValueSwaptionSurfaceSensitivity(sensitivityNode, parameters.getGeneratorSwap());
}
}
|
[
"cobaltblue.ocean@gmail.com"
] |
cobaltblue.ocean@gmail.com
|
053194927b45f3d9ee8c0f17ab2ac22b7a406eba
|
fff9f577e91b9f776976a944e513b6c846ce90b6
|
/backend/liliyun/flow/src/main/java/cn/com/liliyun/flow/mapper/FlowTemplateMapper.java
|
422832c80392004d86a27f060d2aaeb827668387
|
[] |
no_license
|
lucifax301/clouddrive
|
509adf99fbe65b2f3d009c06833e42bcb3a95167
|
3b2a58d10a2bef00526b03fd88278352ccb92b8c
|
refs/heads/master
| 2021-09-14T13:57:25.739400
| 2018-05-14T15:37:26
| 2018-05-14T15:37:26
| 118,482,156
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 456
|
java
|
package cn.com.liliyun.flow.mapper;
import java.util.List;
import cn.com.liliyun.flow.model.FlowTemplate;
public interface FlowTemplateMapper {
public void add(FlowTemplate template);
public FlowTemplate get(FlowTemplate template);
public FlowTemplate getByBusiness(FlowTemplate template);
public List<FlowTemplate> list(FlowTemplate template);
public void delete(FlowTemplate template);
public void update(FlowTemplate template);
}
|
[
"232120641@qq.com"
] |
232120641@qq.com
|
7b4d925605281d2bbc992c2bafbf6a8963ccfb74
|
f2488e535c7ae345e9f49e33433a6ebf567a8ba4
|
/Code/17/168/Project/2048Game/app/src/main/java/com/mingrisoft/a2048game/AnimationCell.java
|
51ee4739d8b647d6338b3812bdb9903abcfe2e1b
|
[] |
no_license
|
stytooldex/Test
|
d4f0241a0a35100219ba8c0b21b76200f16914b8
|
993080d7ec0032230b26563f01a1554ff7f8fe3d
|
refs/heads/master
| 2022-03-15T01:01:08.465767
| 2019-12-03T05:36:58
| 2019-12-03T05:36:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 973
|
java
|
package com.mingrisoft.a2048game;
public class AnimationCell extends Cell {
private int animationType;
private long timeElapsed;
private long animationTime;
private long delayTime;
public int[] extras;
public AnimationCell (int x, int y, int animationType, long length, long delay, int[] extras) {
super(x, y);
this.animationType = animationType;
animationTime = length;
delayTime = delay;
this.extras = extras;
}
public int getAnimationType() {
return animationType;
}
public void tick(long timeElapsed) {
this.timeElapsed = this.timeElapsed + timeElapsed;
}
public boolean animationDone() {
return animationTime + delayTime < timeElapsed;
}
public double getPercentageDone() {
return Math.max(0, 1.0 * (timeElapsed - delayTime) / animationTime);
}
public boolean isActive() {
return (timeElapsed >= delayTime);
}
}
|
[
"1581184882@qq.com"
] |
1581184882@qq.com
|
949236715b93e0478b3bfad92499190edbb761e5
|
8e94005abdd35f998929b74c19a86b7203c3dbbc
|
/src/facebook/bfs/WallsAndGates.java
|
ba29048112dfa3443497eef922fa9e929e30c889
|
[] |
no_license
|
tinapgaara/leetcode
|
d1ced120da9ca74bfc1712c4f0c5541ec12cf980
|
8a93346e7476183ecc96065062da8585018b5a5b
|
refs/heads/master
| 2020-12-11T09:41:39.468895
| 2018-04-24T07:15:27
| 2018-04-24T07:15:27
| 43,688,533
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,144
|
java
|
package facebook.bfs;
/**
* Created by yingtan on 12/21/17.
*
* 286. Walls and Gates
DescriptionHintsSubmissionsDiscussSolution
DiscussPick One
You are given a m x n 2D grid initialized with these three possible values.
-1 - A wall or an obstacle.
0 - A gate.
INF - Infinity means an empty room. We use the value 231 - 1 = 2147483647 to represent INF as you may assume that the distance to a gate is less than 2147483647.
Fill each empty room with the distance to its nearest gate. If it is impossible to reach a gate, it should be filled with INF.
For example, given the 2D grid:
INF -1 0 INF
INF INF INF -1
INF -1 INF -1
0 -1 INF INF
After running your function, the 2D grid should be:
3 -1 0 1
2 2 1 -1
1 -1 2 -1
0 -1 3 4
*/
import java.util.*;
public class WallsAndGates {
public void wallsAndGates(int[][] rooms) {
if (rooms == null || rooms.length == 0) return;
Queue<int[]> queue = new LinkedList<>();
for (int i = 0 ; i < rooms.length; i ++) {
for (int j = 0 ; j < rooms[0].length; j ++) {
if (rooms[i][j] == 0) {
// gate
queue.offer(new int[]{i, j});
}
}
}
bfs(queue, rooms);
}
public void bfs(Queue<int[]> queue, int[][] rooms) {
while(! queue.isEmpty()) {
int[] point = queue.poll();
int x = point[0];
int y = point[1];
int[][] dirs = {{0,1}, {0, -1}, {-1,0}, {1, 0}};
for (int[] dir : dirs) {
int nextx = x + dir[0];
int nexty = y + dir[1];
if (nextx >= 0 && nextx < rooms.length && nexty >= 0 && nexty < rooms[0].length) {
if (rooms[nextx][nexty] == Integer.MAX_VALUE) {
// this cell has not been visited, and this is the first time been discovered, must be the min distance
rooms[nextx][nexty] = rooms[x][y] + 1;
queue.offer(new int[]{nextx, nexty});
}
}
}
}
}
}
|
[
"ying.tan@oracle.com"
] |
ying.tan@oracle.com
|
92cd7a0b9621baad0b0b30c3966be02d872b1d99
|
54b44662ea3db38363a890f94259995374fec7ee
|
/APP Common/hr/adriacomsoftware/app/common/pranjenovca/crnalista/dto/CrnaListaOsobaVo.java
|
ef6f7e3f573e4cc2734a982061956b3bcdbaee0b
|
[] |
no_license
|
zrosko/COMPONENTS-COMMON
|
e9a534a130c7764d774bae9cd3fda52dc131cdc2
|
5859a6947ae3459bc5d3a38fd5cdb8ab30101ee8
|
refs/heads/master
| 2021-01-10T20:05:23.108044
| 2015-03-11T15:01:41
| 2015-03-11T15:01:41
| 31,539,371
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,336
|
java
|
package hr.adriacomsoftware.app.common.pranjenovca.crnalista.dto;
import hr.as2.inf.common.data.AS2RecordList;
import hr.as2.inf.common.data.AS2Record;
import java.util.Calendar;
public class CrnaListaOsobaVo extends AS2Record {
private static final long serialVersionUID = 1L;
/* </ Attribute names */
public static final String UID = "id_osobe";
public static final String LASTNAME = "prezime";
public static final String FIRSTNAME = "ime";
public static final String TITLE = "titula";
public static final String SNDTYPE = "vrsta";
public static final String REMARKS = "primjedba";
// EU lista ispod
public static final String ENTITY_ID = "id_osobe";
public static final String NAME = "prezime";
public static final String NAME_TYPE = "vrsta_imena";
public static final String CATEGORY = "vrsta";
// EU lista iznad
public static String PRN_CRNA_LISTA_OSOBA__ID = "id";
public static String PRN_CRNA_LISTA_OSOBA__ID_LISTE = "id_liste";
public static String PRN_CRNA_LISTA_OSOBA__JMBG_MB = "jmbg_mb";
public static String PRN_CRNA_LISTA_OSOBA__OIB = "oib";
public static String PRN_CRNA_LISTA_OSOBA__ALIAS = "alias";
public static String PRN_CRNA_LISTA_OSOBA__VRIJEDI_OD = "vrijedi_od";
public static String PRN_CRNA_LISTA_OSOBA__VRSTA1 = "vrsta1";
// zbog radiobutton-a i vassel vrste koju moramo ignorirati
/* Attributes names /> */
/* </ Constructors */
public CrnaListaOsobaVo() {
super();
}
public CrnaListaOsobaVo(AS2Record value) {
super(value);
}
/* Constructors /> */
/* </ Getters */
public String getPrezime() {
return get(LASTNAME);
}
public String getIme() {
return get(FIRSTNAME);
}
public String getVrsta() {
return get(SNDTYPE);
}
public String getTitula() {
return get(TITLE);
}
public String getPrimjedba() {
return get(REMARKS);
}
public String getIdOsobe() {
return get(UID);
}
public String getValue(String name) {
String value = "";
if (name.equalsIgnoreCase("uid"))
value = get(UID);
else if (name.equalsIgnoreCase("lastName"))
value = get(LASTNAME);
else if (name.equalsIgnoreCase("firstName"))
value = get(FIRSTNAME);
else if (name.equalsIgnoreCase("title"))
value = get(TITLE);
else if (name.equalsIgnoreCase("sdnType"))
value = get(SNDTYPE);
else if (name.equalsIgnoreCase("remarks"))
value = get(REMARKS);
// EU
else if (name.equalsIgnoreCase("ENTITY_ID"))
value = get(ENTITY_ID);
else if (name.equalsIgnoreCase("NAME"))
value = get(NAME);
else if (name.equalsIgnoreCase("NAME_TYPE"))
value = get(NAME_TYPE);
else if (name.equalsIgnoreCase("CATEGORY"))
value = get(CATEGORY);
return value;
}
public AS2RecordList getAdrese() {
AS2RecordList rs;
if (getProperty("@@adrese") == null) {
rs = new AS2RecordList();
} else {
rs = (AS2RecordList) getProperty("@@adrese");
}
return rs;
}
public AS2RecordList getDokumente() {
AS2RecordList rs;
if (getProperty("@@dokumenti") == null) {
rs = new AS2RecordList();
} else {
rs = (AS2RecordList) getProperty("@@dokumenti");
}
return rs;
}
public AS2RecordList getAliase() {
AS2RecordList rs;
if (getProperty("@@aliasi") == null) {
rs = new AS2RecordList();
} else {
rs = (AS2RecordList) getProperty("@@aliasi");
}
return rs;
}
/* Getters /> */
/* </ Setters */
public void setPrezime(String value) {
set(LASTNAME, value);
}
public void setIme(String value) {
set(FIRSTNAME, value);
}
public void setVrsta(String value) {
set(SNDTYPE, value);
}
public void setTitula(String value) {
set(TITLE, value);
}
public void setPrimjedba(String value) {
set(REMARKS, value);
}
public void setIdOsobe(String value) {
set(UID, value);
}
public void setValue(String name, String value) {
if (name.equalsIgnoreCase("uid") || name.equalsIgnoreCase("DATAID"))
set(UID, value);
else if (name.equalsIgnoreCase("lastName")
|| name.equalsIgnoreCase("SECOND_NAME")
|| name.equalsIgnoreCase("THIRD_NAME")
|| name.equalsIgnoreCase("FOURTH_NAME")) {
StringBuffer temp = new StringBuffer();
temp.append(get(LASTNAME));
temp.append(" ");
temp.append(value);
set(LASTNAME, temp.toString());
} else if (name.equalsIgnoreCase("firstName")
|| name.equalsIgnoreCase("FIRST_NAME"))
set(FIRSTNAME, value);
else if (name.equalsIgnoreCase("title"))
set(TITLE, value);
else if (name.equalsIgnoreCase("sdnType"))
set(SNDTYPE, value);
else if (name.equalsIgnoreCase("remarks")
|| name.equalsIgnoreCase("COMMENTS1"))
set(REMARKS, value);
else if (name.equalsIgnoreCase("ENTITY_ID"))
set(ENTITY_ID, value);
else if (name.equalsIgnoreCase("NAME"))
set(NAME, value);
else if (name.equalsIgnoreCase("NAME_TYPE"))
set(NAME_TYPE, value);
else if (name.equalsIgnoreCase("CATEGORY"))
set(CATEGORY, value);
}
public void setDokument(CrnaListaDokumentOsobeVo value) {
AS2RecordList rs;
if (getProperty("@@dokumenti") == null) {
rs = new AS2RecordList();
rs.addRow(value);
set("@@dokumenti", rs);
} else {
rs = (AS2RecordList) getProperty("@@dokumenti");
rs.addRow(value);
}
}
public void setAlias(CrnaListaOsobaAliasVo value) {
AS2RecordList rs;
if (getProperty("@@aliasi") == null) {
rs = new AS2RecordList();
rs.addRow(value);
set("@@aliasi", rs);
} else {
rs = (AS2RecordList) getProperty("@@aliasi");
rs.addRow(value);
}
}
public void setAdresa(CrnaListaAdresaOsobeVo value) {
AS2RecordList rs;
if (getProperty("@@adrese") == null) {
rs = new AS2RecordList();
rs.addRow(value);
set("@@adrese", rs);
} else {
rs = (AS2RecordList) getProperty("@@adrese");
rs.addRow(value);
}
}
/*
* public String toString(){ return
* this.toString();//+getAdrese()+getDokumente(); }
*/
/* Setters /> */
public String getId() {
return getAsStringOrEmpty(PRN_CRNA_LISTA_OSOBA__ID);
}
public String getIdListe() {
return getAsStringOrEmpty(PRN_CRNA_LISTA_OSOBA__ID_LISTE);
}
public String getJmbgMb() {
return getAsStringOrEmpty(PRN_CRNA_LISTA_OSOBA__JMBG_MB);
}
public String getOib() {
return getAsStringOrEmpty(PRN_CRNA_LISTA_OSOBA__OIB);
}
public String getAlias() {
return getAsStringOrEmpty(PRN_CRNA_LISTA_OSOBA__ALIAS);
}
public Calendar getVrijediOd() {
return getAsCalendar(PRN_CRNA_LISTA_OSOBA__VRIJEDI_OD);
}
public String getVrsta1() {
return getAsStringOrEmpty(PRN_CRNA_LISTA_OSOBA__VRSTA1);
}
public void setId(String value) {
set(PRN_CRNA_LISTA_OSOBA__ID, value);
}
public void setIdListe(String value) {
set(PRN_CRNA_LISTA_OSOBA__ID_LISTE, value);
}
public void setJmbgMb(String value) {
set(PRN_CRNA_LISTA_OSOBA__JMBG_MB, value);
}
public void setOib(String value) {
set(PRN_CRNA_LISTA_OSOBA__OIB, value);
}
public void setAlias(String value) {
set(PRN_CRNA_LISTA_OSOBA__ALIAS, value);
}
public void setVrijediOd(Calendar value) {
setCalendarAsDateString(value, PRN_CRNA_LISTA_OSOBA__VRIJEDI_OD);
}
public void setVrsta1(String value) {
set(PRN_CRNA_LISTA_OSOBA__VRSTA1, value);
}
}
|
[
"zrosko@gmail.com"
] |
zrosko@gmail.com
|
c7322eb0a123d2aa29b7de62ef68953b444415c1
|
b4a459a993c25841780bcbb6268f71a12377c9b7
|
/src/main/java/net/socialhub/service/mastodon/MastodonAuth.java
|
9268d6d83e825b25c33ee6dfe84cd00cb1638585
|
[
"MIT"
] |
permissive
|
toliner/SocialHub
|
3a5b8cb904886939f6a616ede50c663512dcdb7e
|
4bb0204eafac3f1b417d179f3b946dfc3a466a9c
|
refs/heads/master
| 2021-01-14T19:29:30.098593
| 2020-02-27T19:14:04
| 2020-02-27T19:14:04
| 242,730,761
| 0
| 0
|
MIT
| 2020-02-24T12:28:34
| 2020-02-24T12:28:33
| null |
UTF-8
|
Java
| false
| false
| 4,285
|
java
|
package net.socialhub.service.mastodon;
import mastodon4j.Mastodon;
import mastodon4j.MastodonFactory;
import mastodon4j.entity.AccessToken;
import mastodon4j.entity.Application;
import mastodon4j.entity.ClientCredential;
import mastodon4j.entity.share.Response;
import net.socialhub.define.ServiceType;
import net.socialhub.logger.Logger;
import net.socialhub.model.Account;
import net.socialhub.model.service.Service;
import net.socialhub.service.ServiceAuth;
/**
* Mastodon Authorization Functions
*/
public class MastodonAuth implements ServiceAuth<Mastodon> {
/** Show token on Mastodon WebUI */
public static final String REDIRECT_NONE = "urn:ietf:wg:oauth:2.0:oob";
private static Logger logger = Logger.getLogger(MastodonAuth.class);
private String host;
private String clientId;
private String clientSecret;
private String accessToken;
public MastodonAuth(String host) {
this.host = host;
}
/**
* Get Request Token for Mastodon
* Mastodon のリクエストトークンの取得
*/
@Override
public Mastodon getAccessor() {
return MastodonFactory.getInstance( //
this.host, this.accessToken);
}
/**
* Authentication with AccessToken
* アクセストークンから生成
*/
public Account getAccountWithAccessToken(String accessToken) {
this.accessToken = accessToken;
Account account = new Account();
ServiceType type = ServiceType.Mastodon;
Service service = new Service(type, account);
account.setAction(new MastodonAction(account, this));
account.setService(service);
return account;
}
/**
* Set Client Info
* 申請済みクライアント情報を設定
*/
public void setClientInfo( //
String clientId, //
String clientSecret) {
this.clientId = clientId;
this.clientSecret = clientSecret;
}
/**
* Request Client Application
* クライアント情報を申請して設定
*/
public void requestClientApplication( //
String appName, //
String website, //
String redirectUris, //
String scopes) {
Application application = new Application();
application.setName(appName);
application.setWebsite(website);
Mastodon mastodon = MastodonFactory.getInstance(this.host, null);
Response<ClientCredential> credential = mastodon.apps() //
.registerApplication(application, redirectUris, scopes);
this.clientId = credential.get().getClientId();
this.clientSecret = credential.get().getClientSecret();
}
/**
* Get Authorization URL
* Mastodon の認証ページの URL を取得
*/
public String getAuthorizationURL( //
String redirectUri, //
String scopes) {
Mastodon mastodon = MastodonFactory.getInstance(this.host, null);
return mastodon.getAuthorizationUrl(this.clientId, redirectUri, scopes);
}
/**
* Authentication with Code
* 認証コードよりアカウントモデルを生成
*/
public Account getAccountWithCode( //
String redirectUri, //
String code) {
Response<AccessToken> accessToken = //
MastodonFactory.getInstance(this.host, null).oauth() //
.issueAccessToken(this.clientId, this.clientSecret, redirectUri, code);
return getAccountWithAccessToken(accessToken.get().getAccessToken());
}
//region // Getter&Setter
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getClientSecret() {
return clientSecret;
}
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
public String getAccessToken() {
return accessToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
//endregion
}
|
[
"a.urusihara@gmail.com"
] |
a.urusihara@gmail.com
|
b72348fb41ea838ed24f3194310f5cedd2930adb
|
323c723bdbdc9bdf5053dd27a11b1976603609f5
|
/nssicc/nssicc_dao/src/main/java/biz/belcorp/ssicc/dao/spusicc/inc/MantenimientoINCPremiosElectivosDAO.java
|
e60c418e5e1267b2a58293c38f2cd0f080453f6e
|
[] |
no_license
|
cbazalar/PROYECTOS_PROPIOS
|
adb0d579639fb72ec7871334163d3fef00123a1c
|
3ba232d1f775afd07b13c8246d0a8ac892e93167
|
refs/heads/master
| 2021-01-11T03:38:06.084970
| 2016-10-24T01:33:00
| 2016-10-24T01:33:00
| 71,429,267
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,954
|
java
|
package biz.belcorp.ssicc.dao.spusicc.inc;
import java.util.List;
import java.util.Map;
import biz.belcorp.ssicc.dao.framework.DAO;
/**
* @author <a href="mailto:sbuchelli@csigcomt.com">Sergio Buchelli</a>
*
*/
public interface MantenimientoINCPremiosElectivosDAO extends DAO {
/**
* Retorna la lista de concursos electivos Activos
* @return
*/
List getListParametrosConcursosElectivos();
/**
* Ejecuta Validaciones , si es conrrecta las validacion retorna
* los datos de la cabecera quese mostararn en patalla asi mismo consolida
* la lista de elegidos y seleccionables
* @param map
*/
void executeValidacionesPremiosElectivos(Map map);
/**
* Retorna la lista de premios electivos ya consolidados
* @return
*/
List getPremiosElectivos();
/**
* inserta el premio en funcion al numero de unidades
* @param map
*/
void insertPremioElectivo(Map map);
/**
* Elimina los niveles de la consultora para el concurso
* @param map
*/
void deletePremiosElectivos(Map map);
/**
* Devuelve lista de codigo ventas ficiticio
* @param map
* @return
*/
List<Map> getListCodigoVentas(Map<String, String> map);
/**
* Retorna longitud codigo de venta ficiticio
* @param codigoPais
* @return
*/
String getLongitudCodVentaFicticio(String codigoPais);
/**
* inserta el premio invalidos
* @param map
*/
void insertPremioElectivoInvalido(Map map);
/**
* Retorna la lista de concursos electivos Activos y Diferidos
* @return
*/
List getListParametrosConcursosElectivosDiferido();
/**
* Elimina informacion de la carga de Premios electivos
*
* @param map
*/
public void deleteCargaPremiosElectivos(Map map);
/**
* Inserta un registro de Premios electivos
*
* @param map
*/
public void insertCargaPremiosElectivos(Map map);
/**
* Realiza la carga de los Premios electivos
*
* @param map
*/
public void executeCargaPremiosElectivos(Map map);
}
|
[
"cbazalarlarosa@gmail.com"
] |
cbazalarlarosa@gmail.com
|
25942acd46e42c073205e6901ecaaff37462c0de
|
7f20b1bddf9f48108a43a9922433b141fac66a6d
|
/csplugins/trunk/ucsd/mes/api/src/main/java/org/cytoscape/event/CyEvent.java
|
feb48dd5bfedb4fde3fa819d044b671849e369d9
|
[] |
no_license
|
ahdahddl/cytoscape
|
bf783d44cddda313a5b3563ea746b07f38173022
|
a3df8f63dba4ec49942027c91ecac6efa920c195
|
refs/heads/master
| 2020-06-26T16:48:19.791722
| 2013-08-28T04:08:31
| 2013-08-28T04:08:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,908
|
java
|
/*
Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
The Cytoscape Consortium is:
- Institute for Systems Biology
- University of California San Diego
- Memorial Sloan-Kettering Cancer Center
- Institut Pasteur
- Agilent Technologies
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
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. The software and
documentation provided hereunder is on an "as is" basis, and the
Institute for Systems Biology and the Whitehead Institute
have no obligations to provide maintenance, support,
updates, enhancements or modifications. In no event shall the
Institute for Systems Biology and the Whitehead Institute
be liable to any party for direct, indirect, special,
incidental or consequential damages, including lost profits, arising
out of the use of this software and its documentation, even if the
Institute for Systems Biology and the Whitehead Institute
have been advised of the possibility of such damage. See
the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
package org.cytoscape.event;
/**
* All Cytoscape events should extend this interface. The events
* should add additional methods to provide access to the information
* relevant to the event.
*/
public interface CyEvent<T> {
/**
*
DOCUMENT ME!
*
* @return The object that fired the event.
*/
T getSource();
}
|
[
"mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] |
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
|
7ad03900528e4fd130be65c55d0626cb480fc989
|
eb34ce1d2ec9766fa7d40d1e28aaf5519b56e090
|
/src/test/java/com/mycompany/myapp/web/rest/errors/ExceptionTranslatorIT.java
|
b526bdceaac812659303535444dcde71751d7cc9
|
[] |
no_license
|
fodie95/jhipster-sample-application
|
ea8c8c15626c313c5bb78f2a17209aee765ef359
|
d63b7b02015acc9f5a72803fd82c144864a44e21
|
refs/heads/master
| 2022-12-01T02:29:40.513751
| 2020-08-18T13:35:40
| 2020-08-18T13:35:40
| 288,465,463
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,420
|
java
|
package com.mycompany.myapp.web.rest.errors;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import com.mycompany.myapp.TestJHipsterApp;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.servlet.MockMvc;
/**
* Integration tests {@link ExceptionTranslator} controller advice.
*/
@WithMockUser
@AutoConfigureMockMvc
@SpringBootTest(classes = TestJHipsterApp.class)
public class ExceptionTranslatorIT {
@Autowired
private MockMvc mockMvc;
@Test
public void testConcurrencyFailure() throws Exception {
mockMvc
.perform(get("/api/exception-translator-test/concurrency-failure"))
.andExpect(status().isConflict())
.andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON))
.andExpect(jsonPath("$.message").value(ErrorConstants.ERR_CONCURRENCY_FAILURE));
}
@Test
public void testMethodArgumentNotValid() throws Exception {
mockMvc
.perform(post("/api/exception-translator-test/method-argument").content("{}").contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isBadRequest())
.andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON))
.andExpect(jsonPath("$.message").value(ErrorConstants.ERR_VALIDATION))
.andExpect(jsonPath("$.fieldErrors.[0].objectName").value("test"))
.andExpect(jsonPath("$.fieldErrors.[0].field").value("test"))
.andExpect(jsonPath("$.fieldErrors.[0].message").value("NotNull"));
}
@Test
public void testMissingServletRequestPartException() throws Exception {
mockMvc
.perform(get("/api/exception-translator-test/missing-servlet-request-part"))
.andExpect(status().isBadRequest())
.andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON))
.andExpect(jsonPath("$.message").value("error.http.400"));
}
@Test
public void testMissingServletRequestParameterException() throws Exception {
mockMvc
.perform(get("/api/exception-translator-test/missing-servlet-request-parameter"))
.andExpect(status().isBadRequest())
.andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON))
.andExpect(jsonPath("$.message").value("error.http.400"));
}
@Test
public void testAccessDenied() throws Exception {
mockMvc
.perform(get("/api/exception-translator-test/access-denied"))
.andExpect(status().isForbidden())
.andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON))
.andExpect(jsonPath("$.message").value("error.http.403"))
.andExpect(jsonPath("$.detail").value("test access denied!"));
}
@Test
public void testUnauthorized() throws Exception {
mockMvc
.perform(get("/api/exception-translator-test/unauthorized"))
.andExpect(status().isUnauthorized())
.andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON))
.andExpect(jsonPath("$.message").value("error.http.401"))
.andExpect(jsonPath("$.path").value("/api/exception-translator-test/unauthorized"))
.andExpect(jsonPath("$.detail").value("test authentication failed!"));
}
@Test
public void testMethodNotSupported() throws Exception {
mockMvc
.perform(post("/api/exception-translator-test/access-denied"))
.andExpect(status().isMethodNotAllowed())
.andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON))
.andExpect(jsonPath("$.message").value("error.http.405"))
.andExpect(jsonPath("$.detail").value("Request method 'POST' not supported"));
}
@Test
public void testExceptionWithResponseStatus() throws Exception {
mockMvc
.perform(get("/api/exception-translator-test/response-status"))
.andExpect(status().isBadRequest())
.andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON))
.andExpect(jsonPath("$.message").value("error.http.400"))
.andExpect(jsonPath("$.title").value("test response status"));
}
@Test
public void testInternalServerError() throws Exception {
mockMvc
.perform(get("/api/exception-translator-test/internal-server-error"))
.andExpect(status().isInternalServerError())
.andExpect(content().contentType(MediaType.APPLICATION_PROBLEM_JSON))
.andExpect(jsonPath("$.message").value("error.http.500"))
.andExpect(jsonPath("$.title").value("Internal Server Error"));
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
cb37d40dec76dd080093c18dea658316c1746404
|
15448fc168098b8adc44c5905bd861adfd1832b7
|
/ejbca/modules/ejbca-ejb-cli/src/org/ejbca/ui/cli/config/scep/UploadFileCommand.java
|
f38517dea7997f68825162c2ea0064941e1be5eb
|
[] |
no_license
|
gangware72/Ejbca-Sample
|
d9ff359d0c3a675ca7e487bb181f4cdb101c123b
|
821d126072f38225ae321ec45011a5d72750e97a
|
refs/heads/main
| 2023-07-19T22:35:36.414622
| 2021-08-19T23:17:28
| 2021-08-19T23:17:28
| 398,092,842
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,320
|
java
|
/*************************************************************************
* *
* EJBCA Community: The OpenSource Certificate Authority *
* *
* This software 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 any later version. *
* *
* See terms of license at gnu.org. *
* *
*************************************************************************/
package org.ejbca.ui.cli.config.scep;
import java.io.File;
import java.util.Iterator;
import java.util.Set;
import org.apache.commons.configuration.CompositeConfiguration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.cesecore.authorization.AuthorizationDeniedException;
import org.ejbca.config.ScepConfiguration;
import org.ejbca.ui.cli.infrastructure.command.CommandResult;
import org.ejbca.ui.cli.infrastructure.parameter.Parameter;
import org.ejbca.ui.cli.infrastructure.parameter.ParameterContainer;
import org.ejbca.ui.cli.infrastructure.parameter.enums.MandatoryMode;
import org.ejbca.ui.cli.infrastructure.parameter.enums.ParameterMode;
import org.ejbca.ui.cli.infrastructure.parameter.enums.StandaloneMode;
/**
* @version $Id$
*
*/
public class UploadFileCommand extends BaseScepConfigCommand {
private static final String ALIAS_KEY = "--alias";
private static final String FILE_KEY = "--file";
private static final Logger log = Logger.getLogger(UploadFileCommand.class);
{
registerParameter(new Parameter(ALIAS_KEY, "Alias", MandatoryMode.MANDATORY, StandaloneMode.ALLOW, ParameterMode.ARGUMENT,
"The alias to read to."));
registerParameter(new Parameter(FILE_KEY, "File", MandatoryMode.MANDATORY, StandaloneMode.ALLOW, ParameterMode.ARGUMENT,
"The file to upload."));
}
@Override
public String getMainCommand() {
return "uploadfile";
}
@Override
public CommandResult execute(ParameterContainer parameters) {
String filename = parameters.get(FILE_KEY);
String alias = parameters.get(ALIAS_KEY);
CompositeConfiguration config = null;
File f = null;
try {
f = new File(filename);
final PropertiesConfiguration pc = new PropertiesConfiguration(f);
pc.setReloadingStrategy(new FileChangedReloadingStrategy());
config = new CompositeConfiguration();
config.addConfiguration(pc);
log.info("Reading SCEP configuration from file: " + f.getAbsolutePath());
} catch (ConfigurationException e) {
log.error("Failed to load configuration from file " + f.getAbsolutePath());
return CommandResult.FUNCTIONAL_FAILURE;
}
readConfigurations(config, alias);
return CommandResult.SUCCESS;
}
@Override
public String getCommandDescription() {
return "Reads SCEP configuration from a file.";
}
@Override
public String getFullHelpText() {
StringBuilder sb = new StringBuilder();
sb.append(getCommandDescription() + "\n");
sb.append("\n");
sb.append("Each line that has the format 'ALIAS.key=VALUE' will be read.\n");
sb.append("\n");
sb.append(
"Only one alias will be read. If one file contains configurations of several aliases, you have to repeat the command with a "
+ "different alias each time to have all configurations of all aliases read.\n");
sb.append("\n");
//sb.append(
// "Note that the alias 'scep' is the default alias used when sending the SCEP request through the URL " +
// "'http://HOST:PORT/ejbca/publicweb/apply/scep/pkiclient.exe'. \n");
//sb.append("Note also that the alias 'scep' does not exist per default and should be created before using this URL\n");
sb.append("The following keys (if present) will be read from the file:" + "\n");
Set<String> keys = ScepConfiguration.getAllAliasKeys("<ALIAS>");
Iterator<String> itr = keys.iterator();
while (itr.hasNext()) {
sb.append(" " + itr.next() + "\n");
}
sb.append("\n");
sb.append("Note that if you have an old SCEP properties file containing the key 'scep.ra.createOrEditUser', " +
"this key will automatically be read and stored as 'scep.operationmode'. A 'true' value will be intepreted as 'ra' " +
"and a 'false' value will be interpreted as 'ca'.");
return sb.toString();
}
private void readConfigurations(CompositeConfiguration config, String alias) {
ScepConfiguration scepConfig = getScepConfiguration();
// if the alias does not already exist, create it.
scepConfig.addAlias(alias);
// Reading all relevant configurations from file.
boolean populated = false;
Set<String> keys = ScepConfiguration.getAllAliasKeys(alias);
@SuppressWarnings("unchecked")
Iterator<String> itr = config.getKeys();
while (itr.hasNext()) {
String key = itr.next();
String value = config.getString(key);
if(StringUtils.contains(key, ScepConfiguration.SCEP_RAMODE_OLD)) {
value = StringUtils.equalsIgnoreCase(config.getString(key), "true") ? "ra" : "ca";
key = alias + "." + ScepConfiguration.SCEP_OPERATIONMODE;
}
if (keys.contains(key)) {
populated = true;
scepConfig.setValue(key, value, alias);
log.info("Setting value: " + key + "=" + value);
}
}
// Save the new configurations.
if (populated) {
try {
getGlobalConfigurationSession().saveConfiguration(getAuthenticationToken(), scepConfig);
log.info("\nNew configurations saved successfully.");
log.info("If there are any issues with the configurations, check them in the AdminGUI and click 'Save'");
getGlobalConfigurationSession().flushConfigurationCache(ScepConfiguration.SCEP_CONFIGURATION_ID);
} catch (AuthorizationDeniedException e) {
log.error("Failed to save configuration from file: " + e.getLocalizedMessage());
}
} else {
scepConfig.removeAlias(alias);
log.info("No relevent CMP configurations found with alias '" + alias + "' in the file.");
}
}
@Override
protected Logger getLogger() {
return log;
}
}
|
[
"edgar.gangware@cradlepoint.com"
] |
edgar.gangware@cradlepoint.com
|
a692ed21fe50ee2b0f5d3a3991231964df98ab0a
|
5e933e35df0998d51584b84341cdded343bd8f70
|
/AndEngine/src/org/andengine/util/adt/cache/concurrent/SynchronizedIntLRUCache.java
|
539ddbb10cfc6504ca1e8e918e6373f350969ce2
|
[] |
no_license
|
nullpoin7er/Funky-Domino
|
4b783b7da0dbe96bf50e47d240f55b46215bf44d
|
870f010f787f19814c3be11974253764292fb497
|
refs/heads/master
| 2021-01-17T12:41:30.133134
| 2012-02-26T12:33:36
| 2012-02-26T12:33:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,045
|
java
|
package org.andengine.util.adt.cache.concurrent;
import org.andengine.util.adt.cache.IntLRUCache;
/**
* (c) Zynga 2012
*
* @param <V>
* @author Nicolas Gramlich <ngramlich@zynga.com>
* @since 18:26:47 - 16.01.2012
*/
public class SynchronizedIntLRUCache<V> extends IntLRUCache<V> {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
// ===========================================================
// Constructors
// ===========================================================
/**
*
* @param pCapacity
*/
public SynchronizedIntLRUCache(final int pCapacity) {
super(pCapacity);
}
// ===========================================================
// Getter & Setter
// ===========================================================
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
/**
*
* @return
*/
@Override
public synchronized int getSize() {
return super.getSize();
}
@Override
public synchronized boolean isEmpty() {
return super.isEmpty();
}
@Override
public synchronized V put(final int pKey, final V pValue) {
return super.put(pKey, pValue);
}
/**
*
* @param pKey
* @return
*/
@Override
public synchronized V get(final int pKey) {
return super.get(pKey);
}
@Override
public synchronized void clear() {
super.clear();
}
// ===========================================================
// Methods
// ===========================================================
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}
|
[
"guillaumepoiriermorency@gmail.com"
] |
guillaumepoiriermorency@gmail.com
|
3af3ebe3bed43ae64c9dd291682738f3cc940b9f
|
e21d17cdcd99c5d53300a7295ebb41e0f876bbcb
|
/22_Chapters_Edition/src/main/resources/ExampleCodes/interfaces/music5/Music5.java
|
945daa0d5043e62f48a2e70d5bb738b4a8bdcf4b
|
[] |
no_license
|
lypgod/Thinking_In_Java_4th_Edition
|
dc42a377de28ae51de2c4000a860cd3bc93d0620
|
5dae477f1a44b15b9aa4944ecae2175bd5d8c10e
|
refs/heads/master
| 2020-04-05T17:39:55.720961
| 2018-11-11T12:07:56
| 2018-11-11T12:08:26
| 157,070,646
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,818
|
java
|
//: interfaces/music5/Music5.java
// Interfaces.
package ExampleCodes.interfaces.music5;
import polymorphism.music.Note;
import static net.mindview.util.Print.*;
interface Instrument {
// Compile-time constant:
int VALUE = 5; // static & final
// Cannot have method definitions:
void play(Note n); // Automatically public
void adjust();
}
class Wind implements Instrument {
public void play(Note n) {
print(this + ".play() " + n);
}
public String toString() { return "Wind"; }
public void adjust() { print(this + ".adjust()"); }
}
class Percussion implements Instrument {
public void play(Note n) {
print(this + ".play() " + n);
}
public String toString() { return "Percussion"; }
public void adjust() { print(this + ".adjust()"); }
}
class Stringed implements Instrument {
public void play(Note n) {
print(this + ".play() " + n);
}
public String toString() { return "Stringed"; }
public void adjust() { print(this + ".adjust()"); }
}
class Brass extends Wind {
public String toString() { return "Brass"; }
}
class Woodwind extends Wind {
public String toString() { return "Woodwind"; }
}
public class Music5 {
// Doesn't care about type, so new types
// added to the system still work right:
static void tune(Instrument i) {
// ...
i.play(Note.MIDDLE_C);
}
static void tuneAll(Instrument[] e) {
for(Instrument i : e)
tune(i);
}
public static void main(String[] args) {
// Upcasting during addition to the array:
Instrument[] orchestra = {
new Wind(),
new Percussion(),
new Stringed(),
new Brass(),
new Woodwind()
};
tuneAll(orchestra);
}
} /* Output:
Wind.play() MIDDLE_C
Percussion.play() MIDDLE_C
Stringed.play() MIDDLE_C
Brass.play() MIDDLE_C
Woodwind.play() MIDDLE_C
*///:~
|
[
"lypgod@hotmail.com"
] |
lypgod@hotmail.com
|
1663f3c289001099664c9c0527383759da2fb5d5
|
52dd205230ba5ddbe46fa16e8ca6a869ede52096
|
/oracle/com-jy-platform-tuomin/src/main/java/com/jy/platform/tuomin/tmworker/MobileNumberTMWorker.java
|
7323ac9cad36e805d81ae135d6edd882dbebde88
|
[] |
no_license
|
wangshuaibo123/BI
|
f5bfca6bcc0d3d0d1bec973ae5864e1bca697ac3
|
a44f8621a208cfb02e4ab5dc1e576056d62ff37c
|
refs/heads/master
| 2021-05-04T16:20:22.382751
| 2018-01-29T11:02:05
| 2018-01-29T11:02:05
| 120,247,955
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 633
|
java
|
package com.jy.platform.tuomin.tmworker;
/**
* 手机号,脱敏后四位——采用和固话号码相同的规则
*
* @author dell
*
*/
public class MobileNumberTMWorker {
public static String getNewValue(String oldValue) {
return PhoneNumberTMWorker.getNewValue(oldValue);
}
public static void main(String[] args) {
System.out.println("123=" + getNewValue("123"));
System.out.println("1234=" + getNewValue("1234"));
System.out.println("12345=" + getNewValue("12345"));
System.out.println("13812345678=" + getNewValue("13812345678"));
System.out.println("13812345678=" + getNewValue("13812345678"));
}
}
|
[
"gangchen1@jieyuechina.com"
] |
gangchen1@jieyuechina.com
|
fe7f5297ec1cd138e6feb77662610240055e8c74
|
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
|
/ast_results/AnySoftKeyboard_AnySoftKeyboard/app/src/main/java/com/anysoftkeyboard/dictionaries/AutoText.java
|
89a5a2b8acdeaac8d8efa6e3a0d83b3e9f8b53f7
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
|
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
|
0564143d92f8024ff5fa6b659c2baebf827582b1
|
refs/heads/master
| 2020-07-13T13:53:40.297493
| 2019-01-11T11:51:18
| 2019-01-11T11:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 146
|
java
|
// isComment
package com.anysoftkeyboard.dictionaries;
public interface isClassOrIsInterface {
String isMethod(CharSequence isParameter);
}
|
[
"matheus@melsolucoes.net"
] |
matheus@melsolucoes.net
|
a83622ee99d06633c1c9198393f0179a8afafd8b
|
ee99c44457879e56bdfdb9004072bd088aa85b15
|
/live-domain/src/main/java/cn/idongjia/live/restructure/dto/LivePureDTO.java
|
cd9c54a27a7c6bdf7b5c14fdb9bd667a9ac789a6
|
[] |
no_license
|
maikezhang/maike_live
|
b91328b8694877f3a2a8132dcdd43c130b66e632
|
a16be995e4e3f8627a6168d348f8fefd1a205cb3
|
refs/heads/master
| 2020-04-07T15:10:52.210492
| 2018-11-21T03:21:18
| 2018-11-21T03:21:18
| 158,475,020
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,676
|
java
|
package cn.idongjia.live.restructure.dto;
import cn.idongjia.live.db.mybatis.po.LivePurePO;
import cn.idongjia.live.pojo.purelive.PureLiveDO;
import cn.idongjia.outcry.pojo.AuctionLiveDetail;
/**
* @author lc
* @create at 2018/6/8.
*/
public class LivePureDTO extends BaseDTO<LivePurePO> {
public LivePureDTO(LivePurePO entity) {
super(entity);
}
public String getPic() {
return entity.getPic();
}
public Integer getWeight() {
return entity.getWeight();
}
public String getDesc() {
return entity.getDesc();
}
public Integer getStatus() {
return entity.getStatus();
}
public Long getTimeStrategy() {
return entity.getTimeStrategy();
}
public Long getDuration() {
return entity.getDuration();
}
public Integer getExemption() {
return entity.getExemption();
}
public Long getId() {
return entity.getId();
}
public PureLiveDO assemblePureLiveDO() {
PureLiveDO pureLiveDO = new PureLiveDO();
pureLiveDO.setDesc(entity.getDesc());
pureLiveDO.setDuration(entity.getDuration());
pureLiveDO.setExemption(entity.getExemption());
pureLiveDO.setPic(entity.getPic());
pureLiveDO.setStatus(entity.getStatus());
pureLiveDO.setTimeStrategy(entity.getTimeStrategy());
pureLiveDO.setWeight(entity.getWeight());
return pureLiveDO;
}
public void setId(Long id) {
entity.setId(id);
}
public void setPic(String pic) {
entity.setPic(pic);
}
public void setStatus(int status) {
entity.setStatus(status);
}
}
|
[
"zhangyingjie@idongjia.cn"
] |
zhangyingjie@idongjia.cn
|
e19b6675e1db2d526bc246eaf01bb1206b18f93c
|
f216afc2e3747f44b83b641af5993fe439f32eaa
|
/src/hashing/ContiguousArray.java
|
5da3e09ac67413ba11fdff6919aad1d82ade2798
|
[] |
no_license
|
ShawyerPeng/LeetCode-Solutions
|
b80c03a69994cfda1f6001e1c1e6e5d6fb03b7d1
|
a05a42aefa79741fde8591a40364f9e0e14566d5
|
refs/heads/master
| 2021-09-11T19:10:30.357330
| 2018-04-11T08:02:40
| 2018-04-11T08:02:40
| 103,022,878
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,120
|
java
|
package hashing;
import java.util.HashMap;
import java.util.Map;
/**
* https://leetcode.com/problems/contiguous-array
* 问题:给定一个二进制的数组,让我们找邻近的子数组使其 0 和 1 的个数相等
* 思路:
*/
public class ContiguousArray {
public static int findMaxLength(int[] nums) {
int maxLength = 0;
int sum = 0;
Map<Integer, Integer> map = new HashMap<>();
map.put(0, -1);
for (int i = 0; i < nums.length; i++) {
sum += (nums[i] == 1) ? 1 : -1;
if (map.containsKey(sum)) {
maxLength = Math.max(maxLength, i - map.get(sum));
} else {
map.put(sum, i);
}
}
return maxLength;
}
public static void main(String[] args) {
System.out.println(findMaxLength(new int[]{0, 1}));
System.out.println(findMaxLength(new int[]{0, 1, 0}));
}
}
// https://kingsfish.github.io/2017/07/13/Leetcode-525-Contiguous-Array/
// http://www.cnblogs.com/grandyang/p/6529857.html
// http://blog.csdn.net/liuchonge/article/details/60351645
|
[
"patrickyateschn@gmail.com"
] |
patrickyateschn@gmail.com
|
f7594397fca579f857648d8ee4e5e2a58a703147
|
aa8bfeb580b9048ca17f0a57fc6478a3e456629a
|
/src/main/java/org/omg/IOP/IORHolder.java
|
54cb9c4a4ec930504f5cb8bd97ae5a8929d229c0
|
[] |
no_license
|
KunkkaCoco/java7-source
|
619f87ab0eca49cbeba09280e4d89e165dfc4ed2
|
1d59690d3f1f7c792b5de4f8a3941ad0326434f9
|
refs/heads/master
| 2016-09-05T12:03:58.162623
| 2014-07-17T04:31:23
| 2014-07-17T04:31:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 836
|
java
|
package org.omg.IOP;
/**
* org/omg/IOP/IORHolder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/org/omg/PortableInterceptor/IOP.idl
* Wednesday, December 18, 2013 6:35:32 PM PST
*/
public final class IORHolder implements org.omg.CORBA.portable.Streamable
{
public org.omg.IOP.IOR value = null;
public IORHolder ()
{
}
public IORHolder (org.omg.IOP.IOR initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = org.omg.IOP.IORHelper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
org.omg.IOP.IORHelper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return org.omg.IOP.IORHelper.type ();
}
}
|
[
"chenweichao@news.cn"
] |
chenweichao@news.cn
|
0c09834e3593db642b5ad98af8c733c3ab6b47eb
|
b8de362119bc7e7fa93e846b442a0772918d28d5
|
/src/main/java/protocolsupport/protocol/packet/middleimpl/clientbound/play/v_1_8/SetHealth.java
|
77e27a790b73a31b7216d7dd447f4bdab412bf69
|
[
"Unlicense"
] |
permissive
|
PlanetacraftBR/CHProtocol
|
e61875b4b4af84f46d741393fd824207d6486e88
|
a5ced44d774b60348ea84231bcd7ef746a29ec01
|
refs/heads/master
| 2020-03-19T18:49:15.339766
| 2018-09-30T02:00:04
| 2018-09-30T02:00:04
| 136,826,639
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 922
|
java
|
package protocolsupport.protocol.packet.middleimpl.clientbound.play.v_1_8;
import java.io.IOException;
import protocolsupport.api.ProtocolVersion;
import protocolsupport.protocol.packet.ClientBoundPacket;
import protocolsupport.protocol.packet.middle.clientbound.play.MiddleSetHealth;
import protocolsupport.protocol.packet.middleimpl.PacketData;
import protocolsupport.utils.recyclable.RecyclableCollection;
import protocolsupport.utils.recyclable.RecyclableSingletonList;
public class SetHealth extends MiddleSetHealth<RecyclableCollection<PacketData>> {
@Override
public RecyclableCollection<PacketData> toData(ProtocolVersion version) throws IOException {
PacketData serializer = PacketData.create(ClientBoundPacket.PLAY_UPDATE_HEALTH_ID, version);
serializer.writeFloat(health);
serializer.writeVarInt(food);
serializer.writeFloat(saturation);
return RecyclableSingletonList.create(serializer);
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
7fcb87f77366990d8a525f3e39bb4becbc790c64
|
ea8013860ed0b905c64f449c8bce9e0c34a23f7b
|
/SystemUIGoogle/sources/kotlinx/atomicfu/InterceptorKt.java
|
55615ccb176e78035c558e5f5dddeb04e67c5fe9
|
[] |
no_license
|
TheScarastic/redfin_b5
|
5efe0dc0d40b09a1a102dfb98bcde09bac4956db
|
6d85efe92477576c4901cce62e1202e31c30cbd2
|
refs/heads/master
| 2023-08-13T22:05:30.321241
| 2021-09-28T12:33:20
| 2021-09-28T12:33:20
| 411,210,644
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 453
|
java
|
package kotlinx.atomicfu;
import java.util.concurrent.locks.ReentrantLock;
/* compiled from: Interceptor.kt */
/* loaded from: classes2.dex */
public final class InterceptorKt {
private static AtomicOperationInterceptor interceptor = DefaultInterceptor.INSTANCE;
private static final ReentrantLock interceptorLock = new ReentrantLock();
public static final AtomicOperationInterceptor getInterceptor() {
return interceptor;
}
}
|
[
"warabhishek@gmail.com"
] |
warabhishek@gmail.com
|
a8c5039405141b33ef9754ac602c643dd4548dca
|
583f294ceaa05aa216f3ad773bb126af29e76c9c
|
/websocket/src/main/java/net/skhu/controller/HomeController.java
|
70b4123dc1cd529ee0ad76fefbbffeccf6c1cb96
|
[] |
no_license
|
KimJye/spring_practice
|
da271c485a8c793092b90e703f925dbcd40f11b6
|
4289d3483c3002289bc88eec50b139dda52c4ce2
|
refs/heads/master
| 2022-12-22T06:30:01.437846
| 2020-01-13T07:36:27
| 2020-01-13T07:36:27
| 134,680,895
| 0
| 0
| null | 2022-12-16T08:57:40
| 2018-05-24T07:52:27
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 372
|
java
|
package net.skhu.controller;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Controller;
import net.skhu.model.Message;
@Controller
public class HomeController {
@MessageMapping("/chat")
@SendTo("/topic/")
public Message message() {
}
}
|
[
"eoeogudgud@naver.com"
] |
eoeogudgud@naver.com
|
85091d61d6581592104084c87033f36609316a19
|
abbe7b5ff07fc51573abb8cb9e03c04fd11d2e9a
|
/Moderate/src/ticTacToe/ComplicatedBoard.java
|
d066ee9da455d63f47bc19136eaf65c92f098690
|
[] |
no_license
|
LeikaiMa/LGCHASER
|
0a184298a433d673c6d284a3581e5455c5a99476
|
a9409f64ddedd49cdc57fa9a7fa596d75d433230
|
refs/heads/master
| 2020-12-25T19:14:45.960514
| 2014-02-04T04:23:44
| 2014-02-04T04:23:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,472
|
java
|
package ticTacToe;
// 如果是棋盘比较大,就需要用循环来check, 这时候同样是先看这个是否为空,如果不空可以从1开始测,这样可以将它和前一个进行比较。这样都比较完毕。
// 中间如果不行就直接break
// break 出来之后就要进行比较,如果比较完之后是N 就说明是正确的,如果不是就说明是中间break 出来的。
public class ComplicatedBoard {
Piece hasWon(Piece[][] board) {
int N = board.length;
int row = 0;
int col = 0;
for (row = 0; row < N; row++) {
if (board[row][0] != Piece.Empty) {
for (col = 1; col < N; col++) {
if (board[row][col] != board[row][col - 1]) {
break;
}
}
if (col == N) {
return board[row][0];
}
}
}
for (col = 0; col < N; col++) {
if (board[0][col] != Piece.Empty) {
for (row = 1; row < N; row++) {
if (board[row][col] != board[row - 1][col]) {
break;
}
}
if (row == N) {
return board[0][col];
}
}
}
if (board[0][0] != Piece.Empty) {
for (row = 1; row < N; row++) {
if (board[row][row] != board[row - 1][row - 1]) {
break;
}
}
if (row == N) {
return board[0][0];
}
}
if (board[N - 1][0] != Piece.Empty) {
for (row = 1; row < N; row++) {
if (board[N - row - 1][row] != board[N - row][row - 1]) {
break;
}
}
if (row == N) {
return board[N - 1][0];
}
}
return Piece.Empty;
}
}
|
[
"leikai.ma@gmail.com"
] |
leikai.ma@gmail.com
|
2214a6ae2e9d8cf7d4f5eefb462d20f5261f6685
|
a5a81138a252f33c4f18012ccdaf8b08f22c4d5f
|
/mugen-beanmodule/src/java/com/arexis/mugen/model/modelmanager/UserCommsDTO.java
|
2c2467f90e415d6cb45f841da023cccc47cdd939
|
[] |
no_license
|
bioit/mugen
|
ce97e540d05af07f5b03df0e6ce411c8d828e332
|
8d96871be007d9ed79f1d61a6ea21d093375e780
|
refs/heads/master
| 2021-01-17T11:55:05.738117
| 2011-01-21T21:07:58
| 2011-01-21T21:07:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,247
|
java
|
package com.arexis.mugen.model.modelmanager;
import com.arexis.mugen.model.availability.AvailabilityRemote;
import com.arexis.mugen.simplelog.SimpleLogRemote;
import com.arexis.mugen.model.usercomments.UserCommsRemote;
import java.io.Serializable;
public class UserCommsDTO implements Serializable {
private int commid, userid;
private String comm, username, ts;
public UserCommsDTO(UserCommsRemote usrcomm) {
try{
this.commid = usrcomm.getCommid();
this.userid = usrcomm.getUserid();
this.username = usrcomm.getUsername();
this.comm = usrcomm.getComm();
this.ts = usrcomm.getTs().toString();
} catch (Exception e) {
e.printStackTrace();
}
}
public int getCommid(){
return commid;
}
public int getUserid(){
return userid;
}
public String getUsername(){
if(username.compareTo("Public")==0){
username = "Visitor";
}
return username;
}
public String getComm(){
return comm;
}
public java.lang.String getTs(){
return ts;
}
}
|
[
"discounix@Disco-Unixs-iMac.local"
] |
discounix@Disco-Unixs-iMac.local
|
fe50a8a84e8740ddb5c54e10764743da289fca57
|
929557608e958cf7628b9e0bad8ac937c1ba7cd8
|
/src/main/java/hudson/plugins/analysis/tokens/AbstractResultTokenMacro.java
|
a70dfa7bd46664d812e1530fb46dca52f0553d5f
|
[
"MIT"
] |
permissive
|
loelala/analysis-core-plugin
|
2d56d3ac2bfc65f6d93bbfe259ac4e78ea741557
|
13edc435dae4ac8a8ee274011fc7216a1e51c88c
|
refs/heads/master
| 2021-04-15T19:00:54.583925
| 2018-03-12T09:55:29
| 2018-03-12T09:55:29
| 126,339,983
| 0
| 0
|
MIT
| 2018-04-23T09:43:59
| 2018-03-22T13:32:40
|
Java
|
UTF-8
|
Java
| false
| false
| 878
|
java
|
package hudson.plugins.analysis.tokens;
import hudson.plugins.analysis.core.BuildResult;
import hudson.plugins.analysis.core.ResultAction;
/**
* Provides a token that evaluates to the plug-in build result.
*
* @author Ulli Hafner
*/
public class AbstractResultTokenMacro extends AbstractTokenMacro {
/**
* Creates a new instance of {@link AbstractResultTokenMacro}.
* @param tokenName
* the name of the token
* @param resultActions
* associated actions containing the build result
*/
public AbstractResultTokenMacro(final String tokenName,
final Class<? extends ResultAction<? extends BuildResult>>... resultActions) {
super(tokenName, resultActions);
}
@Override
protected String evaluate(final BuildResult result) {
return result.getPluginResult().toString();
}
}
|
[
"ullrich.hafner@gmail.com"
] |
ullrich.hafner@gmail.com
|
4770722650f301ad5b7bfefd590f5944dced8922
|
bf744ba24a594529fc2e6729afe19a20b70d6fde
|
/Proj-supergenius-XO/.svn/pristine/47/4770722650f301ad5b7bfefd590f5944dced8922.svn-base
|
624e261772aaed293ff240d7308d12d365c7c7d0
|
[] |
no_license
|
greatgy/Code
|
4e3fc647999d0ff94933c0ff85bf08228de62a1f
|
e198b7cf90a40e531235fa9e88df211e1978e177
|
refs/heads/master
| 2021-10-27T16:27:19.551730
| 2019-04-18T09:43:07
| 2019-04-18T09:43:07
| 182,007,387
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,044
|
package com.supergenius.xo.gupage.dao;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.util.HashMap;
import java.util.Map;
import org.joda.time.DateTime;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.genius.model.base.enums.EStatus;
import com.supergenius.xo.common.constants.MapperDict;
import com.supergenius.xo.gupage.entity.Patent;
import com.supergenius.xo.mock.testconstants.TestConst;
/**
* 专利测试类
*
* @author loupengyu
* @date 2018年1月10日12:13:02
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath*:**/applicationContext**.xml" })
public class PatentDaoTest {
@Autowired
private PatentDao dao;
private Patent entity;
@Before
public void before() {
entity = new Patent();
entity.setUid(TestConst.uid);
entity.setAdminuid(TestConst.uid1);
entity.setFilepath("a/b/c");
entity.setImgbig("a/b/c");
entity.setCreatetime(new DateTime());
entity.setImglittle("/imglittle");
entity.setImgmedium("/Imgmedium");
entity.setImgbig("/Imgbig");
entity.setImgoriginal("/Imgoriginal");
entity.setStatus(EStatus.enable);
entity.setCreatetime(new DateTime());
boolean result = dao.insert(entity);
assertTrue(result);
}
@After
public void after() {
entity = null;
boolean result = dao.delete(TestConst.uid);
assertTrue(result);
}
/**
* Test Get()
*/
@Test
public void testGet() {
entity = dao.get(TestConst.uid);
assertNotNull(entity);
assertEquals(TestConst.uid, entity.getUid());
}
/**
* Test GetOne()
*/
@Test
public void testGetOne() {
Map<String, Object> map = new HashMap<String, Object>();
map.put(MapperDict.uid, TestConst.uid);
assertNotNull(dao.getOne(map));
}
/**
* Test GetCount()
*/
@Test
public void testCount() {
assertTrue(dao.getCount(null) >= 1);
}
/**
* Test GetList()
*/
@Test
public void testGetList() {
Map<String, Object> map = new HashMap<String, Object>();
assertTrue(dao.getList(map).size() > 0);
}
/**
* Test Update()
*/
@Test
public void testUpdate() {
entity = new Patent();
entity.setUid(TestConst.uid2);
entity.setAdminuid(TestConst.uid1);
entity.setFilepath("a/b/c");
entity.setImgbig("a/b/c");
entity.setCreatetime(new DateTime());
entity.setImglittle("/imglittle");
entity.setImgmedium("/Imgmedium");
entity.setImgbig("/Imgbig");
entity.setImgoriginal("/Imgoriginal");
entity.setStatus(EStatus.enable);
entity.setCreatetime(new DateTime());
dao.insert(entity);
String uid = entity.getUid();
assertNotNull(dao.get(uid));
assertTrue(dao.update(entity));
dao.delete(uid);
assertNull(dao.get(uid));
}
}
|
[
"18519764453@163.com"
] |
18519764453@163.com
|
|
18250963879f23d489014027f7f0fb4ff8487c31
|
2c648cf0a8bfe349728907850c9eabb39790a13c
|
/trunk/zk_sample_db/src/de/forsthaus/backend/model/SecRolegroup.java
|
f801aa9c984333f71f847bba6c9464bfdc49646c
|
[] |
no_license
|
BGCX261/zk-sample-db-svn-to-git
|
fe825ad15fc6f33d526ecfcca230b6c8496e9911
|
60b5fe9496017ca1173ef483f8968373ad318146
|
refs/heads/master
| 2016-09-06T13:19:23.923558
| 2015-08-25T15:43:48
| 2015-08-25T15:43:48
| 42,322,272
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,725
|
java
|
package de.forsthaus.backend.model;
// Generated 02.02.2009 14:17:37 by Hibernate Tools 3.2.2.GA
/**
* SecRolegroup generated by hbm2java
*/
public class SecRolegroup implements java.io.Serializable {
private static final long serialVersionUID = -8173065939240678650L;
private long rlgId = Long.MIN_VALUE;
private int version;
private SecRole secRole;
private SecGroup secGroup;
public boolean isNew() {
return (getRlgId() == Long.MIN_VALUE);
}
public SecRolegroup() {
}
public SecRolegroup(long rlgId) {
this.rlgId = rlgId;
}
public SecRolegroup(long rlgId, SecRole secRole, SecGroup secGroup) {
this.rlgId = rlgId;
this.secRole = secRole;
this.secGroup = secGroup;
}
public long getRlgId() {
return this.rlgId;
}
public void setRlgId(long rlgId) {
this.rlgId = rlgId;
}
public int getVersion() {
return this.version;
}
public void setVersion(int version) {
this.version = version;
}
public SecRole getSecRole() {
return this.secRole;
}
public void setSecRole(SecRole secRole) {
this.secRole = secRole;
}
public SecGroup getSecGroup() {
return this.secGroup;
}
public void setSecGroup(SecGroup secGroup) {
this.secGroup = secGroup;
}
@Override
public int hashCode() {
return Long.valueOf(getRlgId()).hashCode();
}
public boolean equals(SecRolegroup secRolegroup) {
return getRlgId() == secRolegroup.getRlgId();
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof SecRolegroup) {
SecRolegroup secRolegroup = (SecRolegroup) obj;
return equals(secRolegroup);
}
return false;
}
}
|
[
"you@example.com"
] |
you@example.com
|
2610adca3357f087d90c4fd6a8b4f4959a09e9b0
|
b7693e7a6ba1c217c17b257f56367a6c826193f2
|
/plugins/org.ifc4emf.metamodel.express/src/org/ifc4emf/metamodel/express/parser/ASTinteger_type.java
|
65e4b6acc44fd786adda4494eec9960476eed59c
|
[] |
no_license
|
patins1/ifc4emf
|
6941967114f87965ea124c36b95aaedc5ef01349
|
ad65df3fce500e5691625d4e0906041c8c0db284
|
refs/heads/master
| 2021-01-19T10:40:16.758125
| 2017-09-11T02:25:57
| 2017-09-11T02:25:57
| 87,891,492
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 758
|
java
|
/* Generated By:JJTree: Do not edit this line. ASTinteger_type.java Version 4.3 */
/* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package org.ifc4emf.metamodel.express.parser;
public
@SuppressWarnings("all")
class ASTinteger_type extends SimpleNode {
public ASTinteger_type(int id) {
super(id);
}
public ASTinteger_type(ExpressParser p, int id) {
super(p, id);
}
/** Accept the visitor. **/
public Object jjtAccept(ExpressParserVisitor visitor, Object data) {
return visitor.visit(this, data);
}
}
/* JavaCC - OriginalChecksum=3dc9ee15a638a7693b0fc85aec2e5dd1 (do not edit this line) */
|
[
"patins@4fe55a55-8cb9-4820-ac24-0eeacf389520"
] |
patins@4fe55a55-8cb9-4820-ac24-0eeacf389520
|
44002f11cd8b318f3ad8b0f2fbbb536fb8ca10ea
|
1c1d07ed116d27139031af210f94787cfa5a3434
|
/mytoolslibrary/src/main/java/com/ltf/mytoolslibrary/viewbase/utils/KeyboardChangeListener.java
|
d9e8465d5496ce320d5329b3f611e58d6c2cf798
|
[] |
no_license
|
jiangfanyang/mytoolslibrary
|
c20bca438b56816809efe382dfb61f0e14cf28e3
|
5a75743ee5be97f292f1039eeac9b1695bafa250
|
refs/heads/master
| 2020-05-25T03:22:08.405468
| 2017-02-27T01:26:25
| 2017-02-27T01:26:25
| 84,905,887
| 2
| 1
| null | 2017-04-01T07:13:04
| 2017-03-14T04:35:38
|
Java
|
UTF-8
|
Java
| false
| false
| 5,353
|
java
|
package com.ltf.mytoolslibrary.viewbase.utils;
import android.app.Activity;
import android.content.Context;
import android.graphics.Rect;
import android.os.Build;
import android.util.Log;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.EditText;
/**
* 作者:${李堂飞} on 2016/11/12 0012 11:05
* 邮箱:1195063924@qq.com
* 注解: 监听软键盘弹出收起
*
* 实例:如果使用EditText 那么1. 在EditText的父控件加上android:focusable="true"
android:focusableInTouchMode="true"
如果不使用如果使用EditText 则将KeyboardChangeListener(Activity contextObj,EditText editText)中EditText editText传入空值(null)
*/
public class KeyboardChangeListener implements ViewTreeObserver.OnGlobalLayoutListener{
private static final String TAG = "ListenerHandler";
private View mContentView;
private int mOriginHeight;
private int mPreHeight;
private KeyBoardListener mKeyBoardListen;
public interface KeyBoardListener {
/**
* call back
* @param isShow true is show else hidden
* @param keyboardHeight keyboard height
*/
void onKeyboardChange(boolean isShow, int keyboardHeight);
}
public void setKeyBoardListener(KeyBoardListener keyBoardListen) {
this.mKeyBoardListen = keyBoardListen;
}
private EditText mEditText;
private Activity contextObj;
public KeyboardChangeListener(Activity contextObj,EditText editText) {
this.mEditText = editText;
this.contextObj = contextObj;
if (contextObj == null) {
Log.i(TAG, "contextObj is null");
return;
}
mContentView = findContentView(contextObj);
if (mContentView != null) {
addContentTreeObserver();
}else{
Log.e(TAG, "----------->"+mContentView+"=null");
}
}
private View findContentView(Activity contextObj) {
return contextObj.findViewById(android.R.id.content);
}
private boolean init = false;
private void addContentTreeObserver() {
mContentView.getViewTreeObserver().addOnGlobalLayoutListener(this);
if(mEditText != null){
mEditText.setOnFocusChangeListener(new View.OnFocusChangeListener()
{
public void onFocusChange(View v, boolean hasFocus)
{
if (hasFocus)
{
init = true;
}else{
init = false;
}
}
});
}
}
@Override
public void onGlobalLayout() {
if(mEditText != null){
boolean isShow = false;
if (init)
{
if (isKeyboardShown(mEditText.getRootView()))
{
isShow = true;
// Do something when keyboard is shown
}
else
{
isShow = false;
// Do something when keyboard is hidden
}
}
if (mKeyBoardListen != null) {
mKeyBoardListen.onKeyboardChange(isShow, 0);
}
}else{
int currHeight = mContentView.getHeight();
if (currHeight == 0) {
Log.i(TAG, "currHeight is 0");
return;
}
boolean hasChange = false;
if (mPreHeight == 0) {
mPreHeight = currHeight;
mOriginHeight = currHeight;
} else {
if (mPreHeight != currHeight) {
hasChange = true;
mPreHeight = currHeight;
} else {
hasChange = false;
}
if (hasChange) {
boolean isShow;
int keyboardHeight = 0;
if (mOriginHeight == currHeight) {
//hidden
isShow = false;
} else {
//show
keyboardHeight = mOriginHeight - currHeight;
isShow = true;
}
if (mKeyBoardListen != null) {
mKeyBoardListen.onKeyboardChange(isShow, keyboardHeight);
}
}
}
}
}
private boolean isKeyboardShown(View rootView)
{
final int SOFT_KEYBOARD_HEIGHT_DP_THRESHOLD = 128;
Rect r = new Rect();
rootView.getWindowVisibleDisplayFrame(r);
int heightDiff = rootView.getBottom() - r.bottom;
return heightDiff > dip2px(contextObj,SOFT_KEYBOARD_HEIGHT_DP_THRESHOLD);
}
/**
* 根据手机的分辨率从 dp 的单位 转成为 px(像素)
*/
public static int dip2px(Context context, float dpValue) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dpValue * scale + 0.5f);
}
public void destroy() {
if (mContentView != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
mContentView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
}
}
}
|
[
"123456"
] |
123456
|
4a31cd7e090d31f9980dac966a1fdcdd6811d71f
|
94d91903819947c4fb2598af40cf53344304dbac
|
/wssmall_1.2.0/order_server/src/main/java/com/ztesoft/net/mall/core/model/mapper/CartItemMapper.java
|
28842ab53710989f61310475da6d318101b6cbdf
|
[] |
no_license
|
lichao20000/Union
|
28175725ad19733aa92134ccbfb8c30570f4795a
|
a298de70065c5193c98982dacc7c2b3e2d4b5d86
|
refs/heads/master
| 2023-03-07T16:24:58.933965
| 2021-02-22T12:34:05
| 2021-02-22T12:34:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,798
|
java
|
package com.ztesoft.net.mall.core.model.mapper;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import net.sf.json.JSONArray;
import org.springframework.jdbc.core.RowMapper;
import com.ztesoft.net.eop.sdk.utils.UploadUtil;
import com.ztesoft.net.framework.util.StringUtil;
import com.ztesoft.net.mall.core.model.support.CartItem;
public class CartItemMapper implements RowMapper {
@Override
@SuppressWarnings("unchecked")
public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
CartItem cartItem = new CartItem();
cartItem.setId(rs.getString("cart_id"));
cartItem.setProduct_id(rs.getString("product_id"));
cartItem.setGoods_id(rs.getString("goods_id"));
cartItem.setName(rs.getString("name"));
cartItem.setMktprice(rs.getDouble("mktprice"));
cartItem.setPrice(rs.getDouble("price"));
cartItem.setCoupPrice(rs.getDouble("price"));
// cartItem.setCatid(rs.getInt("catid"));
cartItem.setMember_lv_id(rs.getString("member_lv_id"));
String image_default = rs.getString("image_default");
if(image_default==null)
image_default = rs.getString("image_file");
if(image_default!=null ){
image_default =UploadUtil.replacePath(image_default);
}
cartItem.setImage_default(image_default);
cartItem.setNum(rs.getInt("num"));
cartItem.setPoint(rs.getInt("point"));
if(!StringUtil.isEmpty(rs.getString("spec_id")))
cartItem.setSpec_id(rs.getString("spec_id"));
cartItem.setItemtype(rs.getInt("itemtype"));
if( cartItem.getItemtype().intValue() == 0){
cartItem.setAddon(rs.getString("addon"));
}
//赠品设置其限购数量
if( cartItem.getItemtype().intValue() == 2){
cartItem.setLimitnum(rs.getInt("limitnum"));
}
/*if( cartItem.getItemtype().intValue() == 1){
cartItem.setSn(rs.getString("sn"));
}*/
try{
cartItem.setSn(rs.getString("sn"));
}catch(Exception ex){
//ex.printStackTrace();
}
try{
cartItem.setCtn(rs.getInt("ctn"));
}catch(Exception ex){
//ex.printStackTrace();
}
try{
cartItem.setUnit(rs.getString("unit"));
}catch(Exception ex){
//ex.printStackTrace();
}
if( cartItem.getItemtype().intValue() == 0){
String specs = rs.getString("specs");
cartItem.setSpecs(specs);
if(StringUtil.isEmpty(specs))
cartItem.setName( cartItem.getName() );
else
cartItem.setName( cartItem.getName() +"("+ specs +")" );
}
try {
cartItem.setIs_checked(rs.getString("is_checked"));
} catch (Exception e) {
// TODO: handle exception
cartItem.setIs_checked("1");
}
try {
cartItem.setStaff_no(rs.getString("staff_no")==null?"":rs.getString("staff_no"));
} catch (Exception e) {
// TODO: handle exception
cartItem.setStaff_no("");
}
try {
cartItem.setAgent_name(rs.getString("agent_name")==null?"":rs.getString("agent_name"));
} catch (Exception e) {
// TODO: handle exception
cartItem.setAgent_name("");
}
if(!StringUtil.isEmpty(cartItem.getAddon())){
JSONArray jsonArray = JSONArray.fromObject(cartItem.getAddon());
List<HashMap> lists = (List) JSONArray.toCollection(jsonArray,HashMap.class);
cartItem.setAddonList(lists);
}
//设置配件列表
return cartItem;
}
}
|
[
"hxl971230.outlook.com"
] |
hxl971230.outlook.com
|
0f62d22238195e4c62ba16c60d671bf91e46e063
|
7735ab0e6e66964313ee04ff85ab9caffa4aecfd
|
/src/main/java/chapter5/StringSort.java
|
e6e08e72ce10cc77dad50cd32cd735fd97a0c6ce
|
[] |
no_license
|
whl6785968/DaliyAlgoPractice
|
6d988ff9048fae68ca2cc0c0edfd5b851eb83ff6
|
105660f0247c6a9ef0ec775b5b54d807e0e0c781
|
refs/heads/master
| 2022-05-31T10:05:09.231023
| 2019-11-25T13:29:12
| 2019-11-25T13:29:12
| 195,416,460
| 0
| 0
| null | 2022-05-24T20:54:06
| 2019-07-05T13:45:07
|
Java
|
UTF-8
|
Java
| false
| false
| 1,038
|
java
|
package chapter5;
import java.io.*;
public class StringSort {
public void keyIndexSort(String[] a,int W){
int N = a.length;
int R = 256;
String[] aux = new String[N];
for(int d=W-1;d>0;d--){
int[] count = new int[R+1];
for(int i=0;i<N;i++){
count[a[i].charAt(d)+1]++;
}
for(int r=0;r<R;r++){
count[r+1] += count[r];
}
for(int i=0;i<N;i++){
aux[count[a[i].charAt(d)]++] = a[i];
}
for(int i=0;i<N;i++){
a[i] = aux[i];
}
}
}
public static void main(String[] args) throws IOException {
String[] a = {"4pGC938","2IYE230","3CIO720"};
File file = new File("E:\\out.txt");
FileWriter fileWriter = new FileWriter(file);
for(int i=0;i<a.length;i++){
System.out.println(a[i]);
fileWriter.write(a[i] + "\n");
fileWriter.flush();
}
}
}
|
[
"806403789@qq.com"
] |
806403789@qq.com
|
5a406ef62685cb4366295e7bb96294c25d3cf9f6
|
79e2e3347aaaac76f771beebdf4a50bcb9804e9f
|
/app/src/main/java/com/windmillsteward/jukutech/activity/mine/fragment/MyPublishView.java
|
d75199eeb08cf0967923723e8dbda07ff8b258fa
|
[] |
no_license
|
inyuo/shunfengche
|
2b3d5ecda7703c8414ad483326a8c05998b4201d
|
a8c2668f43db962b9b0def531c3fe87cc1f0119d
|
refs/heads/master
| 2020-07-13T13:26:44.196536
| 2019-08-06T07:43:38
| 2019-08-06T07:43:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 731
|
java
|
package com.windmillsteward.jukutech.activity.mine.fragment;
import com.windmillsteward.jukutech.base.BaseViewModel;
import com.windmillsteward.jukutech.bean.MyPublishBean;
/**
* 描述:
* 时间:2018/2/20/020
* 作者:xjh
*/
public interface MyPublishView extends BaseViewModel {
/**
* 初始化数据成功
* @param bean
*/
void initDataSuccess(MyPublishBean bean);
/**
* 刷新数据
* @param bean
*/
void refreshDataSuccess(MyPublishBean bean);
void refreshDataFailure();
/**
* 加载下一页
* @param bean
*/
void loadNextDataSuccess(MyPublishBean bean);
/**
* 加载下一页失败
*/
void loadNextDataFailure();
}
|
[
"mxnzp_life@163.com"
] |
mxnzp_life@163.com
|
beeed151f382a175dc5026246eb473bf7752c467
|
d611234422354667d0f76056e481bd6390708fbb
|
/Algorithms/1177. Can Make Palindrome from Substring.java
|
c300633f59edc38121689f397732a6a254605010
|
[] |
no_license
|
hellcy/leetcode
|
979b05e5fc37b05a268e50230a39afda0ca01a1b
|
a952005e45cdabc829f46f3abb22517d448a880c
|
refs/heads/master
| 2022-02-14T02:12:03.600820
| 2022-02-06T13:11:44
| 2022-02-06T13:11:44
| 204,588,041
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,418
|
java
|
class Solution {
public List<Boolean> canMakePaliQueries(String s, int[][] queries) {
/*
Algorithm explained:
we know there are only 26 characters in the English alphabet,
which means if k is equal to or greater than 13, we can definately make it to palindrome
otherwise, we keep track of the number of appearance of each character,
and add character to the set only if the appearance time is odd.
if distinctive character is more than 2 * k, return false
*/
int n = queries.length;
List<Boolean> array = new ArrayList<>();
for (int i = 0; i < n; ++i) {
if (queries[i][2] >= 13) {
array.add(true);
continue;
}
String substring = s.substring(queries[i][0], queries[i][1] + 1);
array.add(check(substring, queries[i][2]));
}
return array;
}
private boolean check(String s, int k) {
char[] array = s.toCharArray();
Set<Character> set = new HashSet<>();
for (int i = 0; i < array.length; ++i) {
if (set.contains(array[i])) {
set.remove(array[i]);
} else {
set.add(array[i]);
}
}
return set.size() / 2 <= k;
}
}
|
[
"chengyuan82281681@hotmail.com"
] |
chengyuan82281681@hotmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.