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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
719ab6cbbc9771014773169e1e46c19e27057370
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.token/classes.jar/com/tencent/jni/Face.java
|
614836653ff905c83413392797a22054000277e8
|
[] |
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
| 192
|
java
|
// INTERNAL ERROR //
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.token\classes.jar
* Qualified Name: com.tencent.jni.Face
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
a056901caa3655c03ca03d85c16a15793253badf
|
53a55c6682e0ffa1370bac37f71744ae842e6632
|
/ProteusParser/src/com/infoscient/proteus/shortClassResolver.java
|
33a21459f38479d0aa669b4e95a759f2216ea136
|
[] |
no_license
|
samzys/proteus
|
a82fd453aac6a5d8720d7c354e61cce62f70af2c
|
3923c07619e5fd75a4ed250de7d7795139c76f3b
|
refs/heads/master
| 2020-04-29T10:38:02.862662
| 2019-03-17T07:37:07
| 2019-03-17T07:37:07
| 176,068,286
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,566
|
java
|
package com.infoscient.proteus;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import com.infoscient.proteus.modelica.ClassDef;
public class shortClassResolver {
private static Map<String, String> primitiveMap = new HashMap<String, String>();
// Above section are modified by Sam 21 Nov, 2010
// Add primitive types
public static final Set<String> primitiveSet = new HashSet<String>();
static {
primitiveSet.add("Real");
primitiveSet.add("Integer");
primitiveSet.add("Boolean");
primitiveSet.add("String");
}
public shortClassResolver() {
// TODO Auto-generated constructor stub
}
public void resolvingType(ClassDef [] cds){
for (ClassDef cd : cds) {
//check only restriction type first
System.err.println(cd.type);
if(cd.restriction.equals(Constants.TYPE_TYPE)){
if(cd.refName!=null){
put(cd.type, cd.refName);
}
}
}
}
private void put(String type, String otherClass) {
if(primitiveSet.contains(otherClass)){
primitiveMap.put(type, otherClass);
System.out.println(otherClass+", "+type);
}else{
String key = primitiveMap.get(otherClass);
if(key!=null) put(type, key);
}
}
public static void resolveShortClasses(String type, String otherClassString ) {
if (primitiveSet.contains(otherClassString)) {
System.out.println(type+": "+otherClassString);
primitiveMap.put(type, otherClassString);
}else{
if(otherClassString!=null){ String s1 = primitiveMap.get(otherClassString);
resolveShortClasses(type, s1);}
}
}
}
|
[
"sam.zyshan@gmail.com"
] |
sam.zyshan@gmail.com
|
dea63c8aed743931d65e3c68a0d17b6fb2f390b5
|
e254f5c03d582d2e69393f36abac1156e5814dfb
|
/AndroidCodeAccumulate/IPCDemo/app/src/main/java/com/ytempest/ipcdemo/binderpool/service/BinderPool.java
|
5071f5676181ab4a4f59e572b76bfc37f77ed06f
|
[] |
no_license
|
ytempest/AndroidRepository
|
e3259955f62f19bfe210bd0ba2bddaa74cfbc581
|
d40ee0fd03a4e3b8f654b58b03d22127fa4f68f1
|
refs/heads/master
| 2021-05-11T00:14:45.163586
| 2019-05-09T01:57:50
| 2019-05-09T01:57:50
| 118,298,199
| 6
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,993
|
java
|
package com.ytempest.ipcdemo.binderpool.service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import com.ytempest.ipcdemo.binderpool.IBinderPool;
import java.util.concurrent.CountDownLatch;
/**
* @author ytempest
* Description:BinderPool 对所有的远程服务提供的Binder进行管理,通过BinderPool才能从
* 远程服务中获取到相应的 Binder
*/
public class BinderPool {
private static final String TAG = "BinderPool";
private static final int BINDER_NONE = -1;
public static final int BINDER_COMPUTE = 1;
public static final int BINDER_SECURITY_CENTER = 2;
private Context mContext;
/**
* 远程服务的Binder,这个Binder充当连接池的作用
*/
private IBinderPool mBinderPool;
private static volatile BinderPool sInstance;
/**
* 通过这个对象实现从Binder连接池中获取Binder这个一个操作变成一个同步操作
*/
private CountDownLatch mConnectBinderPoolCountDownLatch;
private ServiceConnection mBinderPoolConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
Log.e(TAG, "onServiceConnected: start");
mBinderPool = IBinderPool.Stub.asInterface(service);
try {
// 为连接到远程服务的Binder设置死亡代理
mBinderPool.asBinder().linkToDeath(mBinderPoolDeathRecipient, 0);
} catch (RemoteException e) {
e.printStackTrace();
}
// 将锁存器的数量减一
mConnectBinderPoolCountDownLatch.countDown();
Log.e(TAG, "onServiceConnected: end");
}
@Override
public void onServiceDisconnected(ComponentName name) {
// ignore
}
};
private IBinder.DeathRecipient mBinderPoolDeathRecipient = new IBinder.DeathRecipient() {
/**
* 当Binder绑定断开的时候会调用该方法
*/
@Override
public void binderDied() {
Log.e(TAG, "binder dead.");
// 移除Binder死亡代理
mBinderPool.asBinder().unlinkToDeath(mBinderPoolDeathRecipient, 0);
// 下面重新连接远程服务
mBinderPool = null;
connectBinderPoolService();
}
};
private BinderPool(Context context) {
mContext = context.getApplicationContext();
connectBinderPoolService();
}
public static BinderPool getInstance(Context context) {
if (sInstance == null) {
synchronized (BinderPool.class) {
if (sInstance == null) {
sInstance = new BinderPool(context);
}
}
}
return sInstance;
}
public IBinder queryBinder(int binderCode) {
IBinder binder = null;
try {
// 如果成功连接到了远程服务
if (mBinderPool != null) {
// 调用远程服务的方法获取相应的Binder
binder = mBinderPool.queryBinder(binderCode);
}
} catch (RemoteException e) {
e.printStackTrace();
}
return binder;
}
private synchronized void connectBinderPoolService() {
// 创建一个数目为1的锁存器
mConnectBinderPoolCountDownLatch = new CountDownLatch(1);
Intent service = new Intent(mContext, BinderPoolService.class);
mContext.bindService(service, mBinderPoolConnection, Context.BIND_AUTO_CREATE);
try {
// 使当前线程在锁存器倒计数至零之前一直等待,除非线程被中断。
mConnectBinderPoolCountDownLatch.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
/**
* Description:BinderPoolImpl 才是远程服务返回的Binder
*/
public static class BinderPoolImpl extends IBinderPool.Stub {
public BinderPoolImpl() {
super();
}
@Override
public IBinder queryBinder(int binderCode) throws RemoteException {
IBinder binder = null;
switch (binderCode) {
case BINDER_SECURITY_CENTER: {
binder = new SecurityCenterImpl();
break;
}
case BINDER_COMPUTE: {
binder = new ComputeImpl();
break;
}
default:
break;
}
return binder;
}
}
}
|
[
"787491096@qq.com"
] |
787491096@qq.com
|
5658427d36f9de4a4864d28b4cf0c6bad8e7889e
|
68463bc6692ecd2602c0b946ea91d15072e3931e
|
/src/main/java/org/terasology/polyworld/elevation/DefaultElevationModel.java
|
acd9d4099e85fd820d0ea9be31bff1245a6d8697
|
[
"Apache-2.0"
] |
permissive
|
Qwertygiy/PolyWorld
|
ac450fcd785b3b4038df4a45de36516df9515411
|
4a0aa85657f45a9a6c2798f53803ed7dfeb12aa7
|
refs/heads/master
| 2020-08-03T08:42:07.545249
| 2019-09-29T17:47:16
| 2019-09-29T17:47:16
| 211,688,375
| 0
| 0
| null | 2019-09-29T16:01:52
| 2019-09-29T16:01:51
| null |
UTF-8
|
Java
| false
| false
| 5,809
|
java
|
/*
* Copyright 2014 MovingBlocks
*
* 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.terasology.polyworld.elevation;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.terasology.polyworld.graph.Corner;
import org.terasology.polyworld.graph.Graph;
import org.terasology.polyworld.water.WaterModel;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
/**
* TODO Type description
*/
public class DefaultElevationModel extends AbstractElevationModel {
private Graph graph;
private final Map<Corner, Float> elevations = Maps.newHashMap();
private final WaterModel waterModel;
/**
* @param graph the polygon graph
* @param waterModel the water model that defines ocean regions
* @param scale a non-linear scale factor to adjust the height distribution in [0..1]
*/
public DefaultElevationModel(Graph graph, WaterModel waterModel, float scale) {
this.graph = graph;
this.waterModel = waterModel;
List<Corner> landCorners = Lists.newArrayList();
for (Corner c : graph.getCorners()) {
if (!waterModel.isOcean(c) && !waterModel.isCoast(c)) {
landCorners.add(c);
}
}
assignCornerElevations();
redistributeElevationsInverse(landCorners, scale);
for (Corner c : graph.getCorners()) {
if (waterModel.isCoast(c)) {
elevations.put(c, 0.0f);
}
// some of ocean corners that are part of a bay are elevated
// this is more of a workaround rather than a required operation
if (waterModel.isOcean(c)) {
elevations.put(c, -1f);
}
}
}
private void assignCornerElevations() {
Deque<Corner> queue = new LinkedList<>();
for (Corner c : graph.getCorners()) {
if (c.isBorder()) {
elevations.put(c, -1.0f);
queue.add(c);
} else {
elevations.put(c, Float.POSITIVE_INFINITY);
}
}
while (!queue.isEmpty()) {
iterateCorners(queue, queue);
}
}
private void iterateCorners(Deque<Corner> input, Deque<Corner> output) {
while (!input.isEmpty()) {
Corner c = input.pop();
for (Corner a : c.getAdjacent()) {
// adding the extra 0.01f is necessary to make the steepest
// descent towards the ocean. I can't really tell why.
float newElevation = elevations.get(c) + 0.01f;
if (!waterModel.isWater(c) && !waterModel.isWater(a)) {
newElevation += 1;
}
Float prevElevation = elevations.get(a);
if (newElevation < prevElevation) {
elevations.put(a, newElevation);
output.add(a);
}
}
}
}
private void redistributeElevationsLinear(List<Corner> landCorners, float scale) {
if (landCorners.isEmpty()) {
return;
}
// sort land corners by elevation
Corner peak = Collections.max(landCorners, new Comparator<Corner>() {
@Override
public int compare(Corner o1, Corner o2) {
Float e1 = elevations.get(o1);
Float e2 = elevations.get(o2);
return e1.compareTo(e2);
}
});
float maxHeight = elevations.get(peak);
for (int i = 0; i < landCorners.size(); i++) {
Corner corner = landCorners.get(i);
elevations.put(corner, elevations.get(corner) / maxHeight * scale);
}
}
private void redistributeElevationsInverse(List<Corner> landCorners, float scale) {
// sort land corners by elevation
Collections.sort(landCorners, new Comparator<Corner>() {
@Override
public int compare(Corner o1, Corner o2) {
Float e1 = elevations.get(o1);
Float e2 = elevations.get(o2);
return e1.compareTo(e2);
}
});
// reset the elevation x of each to match the inverse of the desired cumulative distribution:
// y(x) = 1 - (1-x)^2
// --> solve for x
// x = 1 - sqrt(1 - y)
int count = landCorners.size();
final float scaleFactor = 1.1f;
for (int i = 0; i < count; i++) {
// y is the relative position in the sorted list
// special case with only one land corner on the island: avoid division by zero explicitly
float y = (count == 1) ? 1 : (float) i / (count - 1);
// x is the desired elevation
float x = scale * (float) (Math.sqrt(scaleFactor) - Math.sqrt(scaleFactor * (1 - y)));
// clamp to max 1
x = Math.min(x, 1);
// this preserves ordering so that elevations always increase from the coast to the mountains.
elevations.put(landCorners.get(i), x);
}
}
@Override
public float getElevation(Corner corner) {
return elevations.get(corner);
}
}
|
[
"git@martin-steiger.de"
] |
git@martin-steiger.de
|
69c7280a3e7d503ba0fa7cd5f7c400b59a85073e
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/redisson--redisson/2019283a2edeb607d4010c77a5f84a0c9dcdb165/after/CommandData.java
|
996296e1f5b0793a54fa3a798d246429511b1e1c
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,504
|
java
|
/**
* Copyright 2014 Nikita Koksharov, Nickolay Borbit
*
* 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.redisson.client.protocol;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import org.redisson.client.protocol.decoder.MultiDecoder;
import io.netty.util.concurrent.Promise;
public class CommandData<T, R> implements QueueCommand {
final Promise<R> promise;
final RedisCommand<T> command;
final Object[] params;
final Codec codec;
final MultiDecoder<Object> messageDecoder;
public CommandData(Promise<R> promise, Codec codec, RedisCommand<T> command, Object[] params) {
this(promise, null, codec, command, params);
}
public CommandData(Promise<R> promise, MultiDecoder<Object> messageDecoder, Codec codec, RedisCommand<T> command, Object[] params) {
this.promise = promise;
this.command = command;
this.params = params;
this.codec = codec;
this.messageDecoder = messageDecoder;
}
public RedisCommand<T> getCommand() {
return command;
}
public Object[] getParams() {
return params;
}
public MultiDecoder<Object> getMessageDecoder() {
return messageDecoder;
}
public Promise<R> getPromise() {
return promise;
}
public Codec getCodec() {
return codec;
}
@Override
public String toString() {
return "CommandData [promise=" + promise + ", command=" + command + ", params="
+ Arrays.toString(params) + ", codec=" + codec + "]";
}
@Override
public List<CommandData<Object, Object>> getPubSubOperations() {
if (Arrays.asList("PSUBSCRIBE", "SUBSCRIBE", "PUNSUBSCRIBE", "UNSUBSCRIBE")
.contains(getCommand().getName())) {
return Collections.singletonList((CommandData<Object, Object>)this);
}
return Collections.emptyList();
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
f473901cb37868543c3a95ab89dc169eccdbfeb8
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/shardingjdbc--sharding-jdbc/43572a6b74e0937616bea61c0be0df0a43b55186/after/MySQLInsertParser.java
|
1fecb9526097a34e968332a59fdc656400d0c628
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,991
|
java
|
/*
* Copyright 1999-2015 dangdang.com.
* <p>
* 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.
* </p>
*/
package com.dangdang.ddframe.rdb.sharding.parser.sql.dialect.mysql.parser;
import com.dangdang.ddframe.rdb.sharding.api.rule.ShardingRule;
import com.dangdang.ddframe.rdb.sharding.parser.result.router.Condition;
import com.dangdang.ddframe.rdb.sharding.parser.sql.dialect.mysql.lexer.MySQLKeyword;
import com.dangdang.ddframe.rdb.sharding.parser.sql.expr.SQLCharExpr;
import com.dangdang.ddframe.rdb.sharding.parser.sql.expr.SQLExpr;
import com.dangdang.ddframe.rdb.sharding.parser.sql.expr.SQLIgnoreExpr;
import com.dangdang.ddframe.rdb.sharding.parser.sql.expr.SQLNumberExpr;
import com.dangdang.ddframe.rdb.sharding.parser.sql.expr.SQLPlaceholderExpr;
import com.dangdang.ddframe.rdb.sharding.parser.sql.lexer.Assist;
import com.dangdang.ddframe.rdb.sharding.parser.sql.lexer.DefaultKeyword;
import com.dangdang.ddframe.rdb.sharding.parser.sql.lexer.Keyword;
import com.dangdang.ddframe.rdb.sharding.parser.sql.lexer.Literals;
import com.dangdang.ddframe.rdb.sharding.parser.sql.lexer.Symbol;
import com.dangdang.ddframe.rdb.sharding.parser.sql.parser.AbstractInsertParser;
import com.dangdang.ddframe.rdb.sharding.parser.sql.parser.SQLExprParser;
import com.dangdang.ddframe.rdb.sharding.parser.visitor.ParseContext;
import com.google.common.collect.Sets;
import java.util.Collection;
import java.util.List;
import java.util.Set;
/**
* MySQL Insert语句解析器.
*
* @author zhangliang
*/
public final class MySQLInsertParser extends AbstractInsertParser {
public MySQLInsertParser(final ShardingRule shardingRule, final List<Object> parameters, final SQLExprParser exprParser) {
super(shardingRule, parameters, exprParser);
}
@Override
protected void parseCustomizedInsert() {
parseInsertSet();
}
private void parseInsertSet() {
ParseContext parseContext = getParseContext();
Collection<String> autoIncrementColumns = getShardingRule().getAutoIncrementColumns(getSqlContext().getTables().get(0).getName());
do {
getExprParser().getLexer().nextToken();
Condition.Column column = getColumn(autoIncrementColumns);
getExprParser().getLexer().nextToken();
getExprParser().getLexer().accept(Symbol.EQ);
SQLExpr sqlExpr;
if (getExprParser().getLexer().equal(Literals.INT)) {
sqlExpr = new SQLNumberExpr(Integer.parseInt(getExprParser().getLexer().getToken().getLiterals()));
} else if (getExprParser().getLexer().equal(Literals.FLOAT)) {
sqlExpr = new SQLNumberExpr(Double.parseDouble(getExprParser().getLexer().getToken().getLiterals()));
} else if (getExprParser().getLexer().equal(Literals.CHARS)) {
sqlExpr = new SQLCharExpr(getExprParser().getLexer().getToken().getLiterals());
} else if (getExprParser().getLexer().equal(DefaultKeyword.NULL)) {
sqlExpr = new SQLIgnoreExpr();
} else if (getExprParser().getLexer().equal(Symbol.QUESTION)) {
sqlExpr = new SQLPlaceholderExpr(getExprParser().getParametersIndex(), getExprParser().getParameters().get(getExprParser().getParametersIndex()));
getExprParser().setParametersIndex(getExprParser().getParametersIndex() + 1);
} else {
throw new UnsupportedOperationException("");
}
getExprParser().getLexer().nextToken();
if (getExprParser().getLexer().equal(Symbol.COMMA, DefaultKeyword.ON, Assist.EOF)) {
parseContext.addCondition(column.getColumnName(), column.getTableName(), Condition.BinaryOperator.EQUAL, sqlExpr);
} else {
getExprParser().getLexer().skipUntil(Symbol.COMMA, DefaultKeyword.ON);
}
} while (getExprParser().getLexer().equal(Symbol.COMMA));
getSqlContext().getConditionContexts().add(parseContext.getCurrentConditionContext());
}
@Override
protected Set<Keyword> getSkippedTokensBetweenTableAndValues() {
return Sets.<Keyword>newHashSet(MySQLKeyword.PARTITION);
}
@Override
protected Set<Keyword> getValuesKeywords() {
return Sets.<Keyword>newHashSet(DefaultKeyword.VALUES, MySQLKeyword.VALUE);
}
@Override
protected Set<Keyword> getCustomizedInsertTokens() {
return Sets.<Keyword>newHashSet(DefaultKeyword.SET);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
a836e03f700aab611b1f970d3081e36ded9aee96
|
5db11b0c9098351480c57de617336ab7dff483e1
|
/data/scripts/system/handlers/quest/beluslan/_2052AnUndeadOccupation.java
|
8fbd29db6dfd1aeab33e12fe12d6afca717a2fe4
|
[] |
no_license
|
VictorManKBO/aion_gserver_4_0
|
d7c6383a005f1a716fcee5e4bd0c33df30a0e0c5
|
ed24bf40c9fcff34cd0c64243b10ab44e60bb258
|
refs/heads/master
| 2022-11-15T19:52:47.654179
| 2020-07-13T10:16:04
| 2020-07-13T10:16:04
| 277,644,635
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,691
|
java
|
/*
* This file is part of aion-unique <aion-unique.org>.
*
* aion-unique is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* aion-unique is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with aion-unique. If not, see <http://www.gnu.org/licenses/>.
*/
package quest.beluslan;
import com.aionemu.gameserver.model.gameobjects.Item;
import com.aionemu.gameserver.model.gameobjects.Npc;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.network.aion.serverpackets.SM_DIALOG_WINDOW;
import com.aionemu.gameserver.questEngine.handlers.HandlerResult;
import com.aionemu.gameserver.questEngine.handlers.QuestHandler;
import com.aionemu.gameserver.model.DialogAction;
import com.aionemu.gameserver.questEngine.model.QuestEnv;
import com.aionemu.gameserver.questEngine.model.QuestState;
import com.aionemu.gameserver.questEngine.model.QuestStatus;
import com.aionemu.gameserver.services.QuestService;
import com.aionemu.gameserver.utils.PacketSendUtility;
/**
* @author Rhys2002
*/
public class _2052AnUndeadOccupation extends QuestHandler {
private final static int questId = 2052;
private final static int[] npc_ids = { 204715, 204801, 204805 };// 182204303 184000022 152000553 182204304
public _2052AnUndeadOccupation() {
super(questId);
}
@Override
public void register() {
qe.registerOnEnterZoneMissionEnd(questId);
qe.registerOnLevelUp(questId);
qe.registerQuestItem(182204304, questId);
qe.registerQuestNpc(213044).addOnKillEvent(questId);
for (int npc_id : npc_ids)
qe.registerQuestNpc(npc_id).addOnTalkEvent(questId);
}
@Override
public boolean onZoneMissionEndEvent(QuestEnv env) {
return defaultOnZoneMissionEndEvent(env);
}
@Override
public boolean onLvlUpEvent(QuestEnv env) {
return defaultOnLvlUpEvent(env, 2500, true);
}
@Override
public boolean onDialogEvent(QuestEnv env) {
final Player player = env.getPlayer();
final QuestState qs = player.getQuestStateList().getQuestState(questId);
if (qs == null)
return false;
int var = qs.getQuestVarById(0);
int targetId = 0;
if (env.getVisibleObject() instanceof Npc)
targetId = ((Npc) env.getVisibleObject()).getNpcId();
if (qs.getStatus() == QuestStatus.REWARD) {
if (targetId == 204715) {
if (env.getDialog() == DialogAction.USE_OBJECT)
return sendQuestDialog(env, 10002);
else if (env.getDialogId() == DialogAction.SELECT_QUEST_REWARD.id())
return sendQuestDialog(env, 5);
else
return sendQuestEndDialog(env);
}
return false;
}
else if (qs.getStatus() != QuestStatus.START) {
return false;
}
if (targetId == 204715) {
switch (env.getDialog()) {
case QUEST_SELECT:
if (var == 0)
return sendQuestDialog(env, 1011);
case SETPRO1:
if (var == 0) {
qs.setQuestVarById(0, var + 1);
updateQuestStatus(env);
PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(env.getVisibleObject().getObjectId(), 10));
return true;
}
}
}
else if (targetId == 204801) {
switch (env.getDialog()) {
case QUEST_SELECT:
if (var == 1)
return sendQuestDialog(env, 1352);
else if (var == 12)
return sendQuestDialog(env, 1693);
case SETPRO2:
if (var == 1) {
qs.setQuestVarById(0, var + 1);
updateQuestStatus(env);
PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(env.getVisibleObject().getObjectId(), 10));
return true;
}
case SETPRO3:
if (var == 12) {
qs.setQuestVarById(0, var + 1);
updateQuestStatus(env);
PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(env.getVisibleObject().getObjectId(), 10));
return true;
}
}
}
else if (targetId == 204805) {
switch (env.getDialog()) {
case QUEST_SELECT:
if (var == 13)
return sendQuestDialog(env, 2034);
if (var == 14)
return sendQuestDialog(env, 2375);
case CHECK_USER_HAS_QUEST_ITEM:
if (QuestService.collectItemCheck(env, true)) {
if (!giveQuestItem(env, 182204304, 1))
return true;
qs.setQuestVarById(0, var + 1);
updateQuestStatus(env);
return sendQuestDialog(env, 10000);
}
else
return sendQuestDialog(env, 10001);
case SETPRO4:
if (var == 13) {
qs.setQuestVarById(0, var + 1);
updateQuestStatus(env);
PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(env.getVisibleObject().getObjectId(), 10));
return true;
}
}
}
return false;
}
@Override
public boolean onKillEvent(QuestEnv env) {
final Player player = env.getPlayer();
QuestState qs = player.getQuestStateList().getQuestState(questId);
if (qs == null || qs.getStatus() != QuestStatus.START)
return false;
int targetId = 0;
if (env.getVisibleObject() instanceof Npc)
targetId = ((Npc) env.getVisibleObject()).getNpcId();
if (targetId == 213044 && qs.getQuestVarById(0) > 1 && qs.getQuestVarById(0) < 12) {
qs.setQuestVarById(0, qs.getQuestVarById(0) + 1);
updateQuestStatus(env);
return true;
}
return false;
}
@Override
public HandlerResult onItemUseEvent(final QuestEnv env, Item item) {
return HandlerResult.fromBoolean(useQuestItem(env, item, 15, 15, true, 234));
}
}
|
[
"Vitek.agl@yandex.ru"
] |
Vitek.agl@yandex.ru
|
8bef56fbf3e3867596f6bc5216b61de0f30baad8
|
1961761e23b10286c9a7fd7921d236be675cd70b
|
/server/src/java/org/jppf/server/peer/PeerConnectionPool.java
|
8997b0e99320c4c03eed0d594d9b75897454f22f
|
[
"Apache-2.0"
] |
permissive
|
hancj-dev/JPPF
|
1eba3cb264585345148ff001e1bde8e6f037f1db
|
8199968a2432f87b3079a5a13d08fe5383b6dc75
|
refs/heads/master
| 2023-03-22T14:43:06.654049
| 2021-03-21T09:29:21
| 2021-03-21T09:29:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,138
|
java
|
/*
* JPPF.
* Copyright (C) 2005-2019 JPPF Team.
* http://www.jppf.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jppf.server.peer;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import org.jppf.comm.discovery.JPPFConnectionInformation;
import org.jppf.comm.recovery.*;
import org.jppf.server.JPPFDriver;
import org.jppf.utils.JPPFIdentifiers;
import org.jppf.utils.concurrent.ThreadUtils;
import org.slf4j.*;
/**
*
* @author Laurent Cohen
*/
public class PeerConnectionPool implements HeartbeatConnectionListener {
/**
* Logger for this class.
*/
private static final Logger log = LoggerFactory.getLogger(PeerConnectionPool.class);
/**
* Determines whether the debug level is enabled in the log configuration, without the cost of a method call.
*/
private static final boolean debugEnabled = log.isDebugEnabled();
/**
* Name of the peer in the configuration file.
*/
private final String peerName;
/**
* Peer connection information.
*/
private final JPPFConnectionInformation connectionInfo;
/**
* Determines whether communication with remote peer servers should be secure.
*/
private final boolean secure;
/**
* Whether this connection and its pool were created by the discovery mechanism.
*/
private final boolean fromDiscovery;
/**
* The size of this pool.
*/
private int size;
/**
* Sequence number for connection numbers in this pool.
*/
private final AtomicInteger connectionSequence = new AtomicInteger(0);
/**
* Holds all the peer connections in this pool.
*/
private final List<JPPFPeerInitializer> initializers = new ArrayList<>();
/**
* Connection to the recovery server.
*/
private HeartbeatConnection recoveryConnection;
/**
* Reference to the driver.
*/
private final JPPFDriver driver;
/**
* Initialize this connection pool.
* @param driver reference to the JPPF driver.
* @param size the size of this pool.
* @param peerName name of the peer in the configuration file.
* @param connectionInfo the peer connection information.
* @param secure determines whether communication with remote peer servers should be secure.
* @param fromDiscovery whether this connection and its pool were created by the discovery mechanism.
*/
public PeerConnectionPool(final JPPFDriver driver, final String peerName, final int size, final JPPFConnectionInformation connectionInfo, final boolean secure, final boolean fromDiscovery) {
this.driver = driver;
this.peerName = peerName;
this.size = size < 1 ? 1 : size;
this.connectionInfo = connectionInfo;
this.secure = secure;
this.fromDiscovery = fromDiscovery;
init();
}
/**
* @return the name of the peer in the configuration file.
*/
public String getPeerName() {
return peerName;
}
/**
* @return the peer connection information.
*/
public JPPFConnectionInformation getConnectionInfo() {
return connectionInfo;
}
/**
* @return whether communication with remote peer servers should be secure.
*/
public boolean isSecure() {
return secure;
}
/**
* @return whether this connection and its pool were created by the discovery mechanism.
*/
public boolean isFromDiscovery() {
return fromDiscovery;
}
/**
* @return the size of this pool.
*/
public int getSize() {
return size;
}
/**
* Set the size of this pool.
* @param size the pool size to set.
*/
public void setSize(final int size) {
this.size = size;
}
/**
* Initialize this pool by starting all connections up to the specified pool size.
*/
private void init() {
connectionSequence.set(0);
for (int i=1; i<=size; i++) {
final String name = String.format("%s-%d", peerName, connectionSequence.incrementAndGet());
final JPPFPeerInitializer initializer = new JPPFPeerInitializer(driver, name, connectionInfo, secure, fromDiscovery);
initializers.add(initializer);
initializer.start();
}
if (connectionInfo.recoveryEnabled) initHeartbeat();
}
/**
* Initialize the heartbeat meachanism if needed.
*/
void initHeartbeat() {
if (recoveryConnection == null) {
if (debugEnabled) log.debug("Initializing recovery");
recoveryConnection = new HeartbeatConnection(JPPFIdentifiers.NODE_HEARTBEAT_CHANNEL, driver.getUuid(), connectionInfo.host, connectionInfo.getValidPort(secure), secure);
recoveryConnection.addClientConnectionListener(this);
ThreadUtils.startThread(recoveryConnection, getPeerName() + "-Heartbeat");
}
}
/**
*
*/
public void close() {
if (debugEnabled) log.debug("Closing peer connection {}", this);
if (recoveryConnection != null) {
recoveryConnection.close();
recoveryConnection = null;
}
for (JPPFPeerInitializer initializer: initializers) initializer.close();
initializers.clear();
}
/**
* @return the connection to the recovery server.
*/
public HeartbeatConnection getRecoveryConnection() {
return recoveryConnection;
}
@Override
public void heartbeatConnectionFailed(final HeartbeatConnectionEvent event) {
close();
init();
}
@Override
public String toString() {
return new StringBuilder().append(getClass().getSimpleName()).append('[')
.append("name=").append(peerName)
.append(", size=").append(size)
.append(", secure=").append(secure)
.append(", connectionInfo=").append(connectionInfo)
.append(", fromDiscovery=").append(fromDiscovery)
.append(']').toString();
}
}
|
[
"laurent.cohen@jppf.org"
] |
laurent.cohen@jppf.org
|
babaee3f7f1f10bd88bffd137d4562399166ad2e
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XCOMMONS-928-4-19-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/extension/job/internal/AbstractExtensionJob_ESTest_scaffolding.java
|
f91643cf0afdfb2c069eb96a02b14ad771f9c544
|
[] |
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
| 457
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Wed Apr 01 11:20:32 UTC 2020
*/
package org.xwiki.extension.job.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class AbstractExtensionJob_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
45aad4ae72ba551991e5c1c29714a17d114157c9
|
56acf5344adf6aa2f637d5efbcc7b150c6bb9117
|
/service-imp/src/main/java/com/wang/serviceimp/model/permission/PermissionOrgModel.java
|
9c035dcc8742a340ff5fb6eaa29ddb9f956a4136
|
[] |
no_license
|
hejiawang/service-parent
|
105f7329f279e232ddfabb6f425efc9a7e741fa0
|
e76ca207599826c01c82b77b5490042423a490bf
|
refs/heads/master
| 2020-04-05T22:57:03.093779
| 2017-03-05T07:40:30
| 2017-03-05T07:40:30
| 68,166,589
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,601
|
java
|
package com.wang.serviceimp.model.permission;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
import com.wang.core.exception.BusinessException;
import com.wang.core.util.WebConstants;
import com.wang.service.param.permission.PermissionOrgParam;
import com.wang.serviceimp.dao.permission.read.PermissionOrgReadDao;
import com.wang.serviceimp.dao.permission.write.PermissionOrgWriteDao;
/**
* 机构 model
*
* @author HeJiawang
* @date 2016.10.10
*/
@Service
public class PermissionOrgModel {
/**
* log
*/
private final Logger logger = LoggerFactory.getLogger(PermissionOrgModel.class);
/**
* permissionOrgReadDao
*/
@Autowired
private PermissionOrgReadDao permissionOrgReadDao;
/**
* permissionOrgWriteDao
*/
@Autowired
private PermissionOrgWriteDao permissionOrgWriteDao;
/**
* 获取分页机构
* @param org 机构参数
* @return 机构集合及分页信息
* @author HeJiawang
* @date 2016.10.10
*/
public Map<String, Object> pageOrg(PermissionOrgParam org) {
Assert.notNull(permissionOrgReadDao, "Property 'permissionOrgReadDao' is required.");
if( org.getPageStart() == null || org.getPageEnd() == null || org.getDraw() == null )
throw new BusinessException("分页信息不能为空");
//初始页面取跟节点
if(org.getOrgID() == null){
org.setOrgID(WebConstants.OrgRootID);
}
Map<String,Object> map = new HashMap<String,Object>();
List<Map<String,Object>> pageLsit = permissionOrgReadDao.getPageList(org);
Integer recordsTotal = permissionOrgReadDao.getPageTotal(org);
map.put("draw", org.getDraw());
map.put("data", pageLsit);
map.put("recordsTotal", recordsTotal);
map.put("recordsFiltered", recordsTotal);
return map;
}
/**
* 根据机构ID获取机构信息
* @param orgID 机构ID
* @return 机构信息
* @author HeJiawang
* @date 2016.10.10
*/
public Map<String, Object> getOrgByID(Integer orgID) {
Assert.notNull(permissionOrgReadDao, "Property 'permissionOrgReadDao' is required.");
if( orgID == null ) throw new BusinessException("机构ID不能为空");
return permissionOrgReadDao.getOrgByID(orgID);
}
/**
* 删除机构</br>
* 根机构不可删除——orgID:1001
* @param orgID 机构ID
* @return 是否删除成功: true--删除成功
* @author HeJiawang
* @date 2016.10.11
*/
public Boolean deleteOrgByID(Integer orgID) {
Assert.notNull(permissionOrgWriteDao, "Property 'permissionOrgWriteDao' is required.");
if( orgID == null ) throw new BusinessException("机构ID不能为空");
if( orgID == 1001 ) throw new BusinessException("跟机构不可删除");
Integer deleteResult = permissionOrgWriteDao.deleteOrgByID(orgID);
if( deleteResult >= 1 ){
return true;
} else {
return false;
}
}
/**
* 检查机构是否被引用
* @param orgID 机构ID
* @return 是否被引用: true--引用
* @author HeJiawang
* @date 2016.10.11
*/
public Boolean checkOrgByID(Integer orgID) {
Assert.notNull(permissionOrgReadDao, "Property 'permissionOrgReadDao' is required.");
if( orgID == null ) throw new BusinessException("机构ID不能为空");
Integer checkResult = permissionOrgReadDao.checkOrgFromParentOrg(orgID); //检查是否被当做父机构引用
Integer checkUserResult = permissionOrgReadDao.checkOrgFromUserOrg(orgID); //检查在用户机构关联表中是否被引用
if( (checkResult >= 1) || (checkUserResult >= 1) ){
return true;
} else {
return false;
}
}
/**
* 新增机构
* @param org 机构信息
* @author HeJiawang
* @date 2016.10.11
*/
public void addOrg(PermissionOrgParam org) {
Assert.notNull(permissionOrgWriteDao, "Property 'permissionOrgWriteDao' is required.");
if( org == null ) throw new BusinessException("机构不能为空");
permissionOrgWriteDao.addOrg(org);
}
/**
* 修改机构
* @param org 机构信息
* @return ServiceResult
* @author HeJiawang
* @date 2016.10.11
*/
public Boolean updateOrg(PermissionOrgParam org) {
Assert.notNull(permissionOrgWriteDao, "Property 'permissionOrgWriteDao' is required.");
if( org == null ) throw new BusinessException("机构不能为空");
if( org.getOrgID() == 1001 ) throw new BusinessException("跟机构不可修改");
Integer updateResult = permissionOrgWriteDao.updateOrg(org);
if( updateResult >= 1 ){
return true;
} else {
return false;
}
}
/**
* 在同一父机构下,检查机构名称是否重复
* @param org 机构
* @return 机构名称是否重复——true:重复
* @author HeJiawang
* @date 2016.10.11
*/
public Boolean checkExistOrgName(PermissionOrgParam org) {
Assert.notNull(permissionOrgReadDao, "Property 'permissionOrgReadDao' is required.");
if( org == null ) throw new BusinessException("机构不能为空");
if( org.getParentOrgID() == null ) throw new BusinessException("机构父ID不能为空");
Integer checkResult = permissionOrgReadDao.checkExistOrgName(org);
if( checkResult >= 1 ){
return true;
} else {
return false;
}
}
/**
* 在同一父机构下,检查机构编码是否重复
* @param org 机构
* @return 机构编码是否重复——true:重复
* @author HeJiawang
* @date 2016.10.11
*/
public Boolean checkExistOrgCode(PermissionOrgParam org) {
Assert.notNull(permissionOrgReadDao, "Property 'permissionOrgReadDao' is required.");
if( org == null ) throw new BusinessException("机构不能为空");
if( org.getParentOrgID() == null ) throw new BusinessException("机构父ID不能为空");
Integer checkResult = permissionOrgReadDao.checkExistOrgCode(org);
if( checkResult >= 1 ){
return true;
} else {
return false;
}
}
/**
* 根据父机构ID获取机构树
* @param id 父机构ID
* @return 机构树
* @author HeJiawang
* @date 2016.10.11
*/
public List<PermissionOrgParam> findOrgForTree(Integer parentOrgID) {
Assert.notNull(permissionOrgReadDao, "Property 'permissionOrgReadDao' is required.");
if( parentOrgID == null ) throw new BusinessException("机构父ID不能为空");
return permissionOrgReadDao.findOrgForTree(parentOrgID);
}
/**
* 根据机构ID获取该机构信息,以及其子孙机构信息
* @param orgID 机构ID
* @return 机构信息
* @author HeJiawang
* @date 2016.11.03
*/
public List<PermissionOrgParam> getChildrenOrgByOrgID(Integer orgID) {
Assert.notNull(permissionOrgReadDao, "Property 'permissionOrgReadDao' is required.");
if( orgID == null ) throw new BusinessException("机构ID不能为空");
List<PermissionOrgParam> orgList = new ArrayList<PermissionOrgParam>();
PermissionOrgParam orgParent = permissionOrgReadDao.getOrgParamByID(orgID);
orgList.add(orgParent);
for( int i=0; i<orgList.size(); i++ ){
if( orgList.get(i).getIsParent() > 0 ){
Integer orgParentID = orgList.get(i).getOrgID();
List<PermissionOrgParam> orgChildrenList = permissionOrgReadDao.getChildrenOrgByOrgID(orgParentID);
orgList.addAll(orgChildrenList);
}
}
return orgList;
}
}
|
[
"952327407@qq.com"
] |
952327407@qq.com
|
c69cb3eaecfc8cb846275701476e7f0da90701d8
|
06d76ab89e6cd8cc7d9281b65e0c92bfa3c32af5
|
/mapsdk/src/main/java/com/sfmap/api/mapcore/SensorEventHelperDecode.java
|
d0d3cde2d3b322ccb82dceeb57e876db920b0c58
|
[] |
no_license
|
onlie08/SFLocationDemo
|
f7042c598fdb1bd4fe5eeba791df6ae6f779d73e
|
7c15f13b1d6335a6dbf20b6ee7cce62bd20c1ca9
|
refs/heads/master
| 2022-12-15T20:09:31.577510
| 2020-08-25T02:38:57
| 2020-08-25T02:38:57
| 217,438,626
| 1
| 0
| null | 2020-09-17T05:55:44
| 2019-10-25T02:54:37
|
Java
|
UTF-8
|
Java
| false
| false
| 2,726
|
java
|
package com.sfmap.api.mapcore;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.RemoteException;
import android.view.Display;
import android.view.Surface;
import android.view.WindowManager;
import com.sfmap.api.maps.model.Marker;
public class SensorEventHelperDecode
implements SensorEventListener
{
private SensorManager sensorManager;
private Sensor sensor;
private long c = 0L;
private final int d = 100;
private float e;
private Context context;
private IMapDelegate map;
private Marker marker;
public SensorEventHelperDecode(Context context, IMapDelegate mapDelegate)
{
this.context = context;
this.map = mapDelegate;
this.sensorManager = ((SensorManager)context.getSystemService(Context.SENSOR_SERVICE));
this.sensor = this.sensorManager.getDefaultSensor(3);
}
public void a()
{
this.sensorManager.registerListener(this, this.sensor, 3);
}
public void b()
{
this.sensorManager.unregisterListener(this, this.sensor);
}
public void a(Marker paramMarker)
{
this.marker = paramMarker;
}
public void onAccuracyChanged(Sensor paramSensor, int paramInt) {}
public void onSensorChanged(SensorEvent paramSensorEvent)
{
if (System.currentTimeMillis() - this.c < 100L) {
return;
}
if (!this.map.S().isFinished()) {
return;
}
switch (paramSensorEvent.sensor.getType())
{
case 3:
float f1 = paramSensorEvent.values[0];
f1 += a(this.context);
f1 %= 360.0F;
if (f1 > 180.0F) {
f1 -= 360.0F;
} else if (f1 < -180.0F) {
f1 += 360.0F;
}
if (Math.abs(this.e - f1) >= 3.0F)
{
this.e = (Float.isNaN(f1) ? 0.0F : f1);
if (this.marker != null) {
try
{
this.map.moveCamera(
CameraUpdateFactoryDelegate.changeBearing(this.e));
this.marker.setRotateAngle(-this.e);
}
catch (RemoteException localRemoteException)
{
localRemoteException.printStackTrace();
}
}
this.c = System.currentTimeMillis();
}
break;
}
}
public static int a(Context context)
{
Display display = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
switch (display.getRotation())
{
case Surface.ROTATION_0:
return 0;
case Surface.ROTATION_90:
return 90;
case Surface.ROTATION_180:
return 180;
case Surface.ROTATION_270:
return -90;
}
return 0;
}
}
|
[
"conggong@sfmail.sf-express.com"
] |
conggong@sfmail.sf-express.com
|
e91673296ce25a4c1284a36fb9b1157ed3956a41
|
eb330cdbb8f7e10fa900529e5079080447a73461
|
/cascading-core/src/test/java/cascading/flow/stream/StreamTest.java
|
58643ff16b9a76d5e4c1ea75697a4cfcc6b5ebc7
|
[
"Apache-2.0"
] |
permissive
|
cwensel/cascading
|
20cdf1259db5b3cd8d7f7cb524ba0eba29cad5fb
|
f2785118ce7be0abd4fe102e94a0f20fb97aa4f0
|
refs/heads/4.5
| 2023-08-23T23:51:22.326915
| 2023-07-31T02:47:07
| 2023-07-31T02:47:07
| 121,672
| 165
| 71
|
NOASSERTION
| 2023-07-20T22:43:13
| 2009-02-04T17:52:06
|
Java
|
UTF-8
|
Java
| false
| false
| 6,736
|
java
|
/*
* Copyright (c) 2007-2022 The Cascading Authors. All Rights Reserved.
*
* Project and contact information: https://cascading.wensel.net/
*
* This file is part of the Cascading project.
*
* 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 cascading.flow.stream;
import java.util.ArrayList;
import java.util.List;
import cascading.flow.stream.duct.Gate;
import cascading.flow.stream.graph.StreamGraph;
import junit.framework.TestCase;
/**
*
*/
public class StreamTest extends TestCase
{
public StreamTest()
{
}
public void testStageStream()
{
List<String> values = new ArrayList<String>();
for( int i = 0; i < 10; i++ )
values.add( "value" );
TestSourceStage source = new TestSourceStage<String>( values );
CountingItemStage lhsStage1 = new CountingItemStage<String, String>();
CountingItemStage lhsStage2 = new CountingItemStage<String, String>();
CountingItemStage rhsStage1 = new CountingItemStage<String, String>();
CountingItemStage rhsStage2 = new CountingItemStage<String, String>();
CountingItemStage mergeStage = new CountingItemStage<String, String>();
TestSinkStage lhsSink = new TestSinkStage<String>();
TestSinkStage rhsSink = new TestSinkStage<String>();
StreamGraph graph = new StreamGraph();
graph.addHead( source );
graph.addPath( source, lhsStage1 );
graph.addPath( lhsStage1, mergeStage );
graph.addPath( mergeStage, lhsStage2 );
graph.addPath( lhsStage2, lhsSink );
graph.addTail( lhsSink );
graph.addPath( source, rhsStage1 );
graph.addPath( rhsStage1, mergeStage );
graph.addPath( mergeStage, rhsStage2 );
graph.addPath( rhsStage2, rhsSink );
graph.addTail( rhsSink );
graph.bind();
graph.prepare();
source.receiveFirst( null );
graph.cleanup();
assertPrepareCleanup( lhsStage1 );
assertPrepareCleanup( rhsStage1 );
assertEquals( values.size(), lhsStage1.getReceiveCount() );
assertEquals( values.size(), rhsStage1.getReceiveCount() );
assertEquals( values.size() * 2, lhsStage2.getReceiveCount() );
assertEquals( values.size() * 2, rhsStage2.getReceiveCount() );
assertEquals( values.size() * 2, lhsSink.getResults().size() );
assertEquals( values.size() * 2, rhsSink.getResults().size() );
}
public void testGateStageStream()
{
List<String> values = new ArrayList<String>();
for( int i = 0; i < 10; i++ )
values.add( "value" );
TestSourceStage source = new TestSourceStage<String>( values );
Gate gate = new TestGate();
CountingItemStage stage = new CountingItemStage<String, String>();
TestSinkStage sink = new TestSinkStage<String>();
StreamGraph graph = new StreamGraph();
graph.addHead( source );
graph.addPath( source, gate );
graph.addPath( gate, stage );
graph.addPath( stage, sink );
graph.addTail( sink );
graph.bind();
graph.prepare();
source.receiveFirst( null );
graph.cleanup();
assertPrepareCleanup( stage );
assertEquals( values.size(), stage.getReceiveCount() );
assertEquals( values.size(), sink.getResults().size() );
}
public void testGateGroupStream()
{
List<String> values = new ArrayList<String>();
for( int i = 0; i < 10; i++ )
values.add( "value" );
TestSourceStage source = new TestSourceStage<String>( values );
Gate<String, String> gate = new TestGate<String, String>();
CountingCollectStage stage1 = new CountingCollectStage<String, String>();
CountingCollectStage stage2 = new CountingCollectStage<String, String>();
TestSinkStage sink = new TestSinkStage<String>();
StreamGraph graph = new StreamGraph();
graph.addHead( source );
graph.addPath( source, gate );
graph.addPath( gate, stage1 );
graph.addPath( stage1, stage2 );
graph.addPath( stage2, sink );
graph.addTail( sink );
graph.bind();
graph.prepare();
source.receiveFirst( null );
graph.cleanup();
assertPrepareCleanup( stage1 );
assertEquals( values.size(), stage1.getReceiveCount() );
assertEquals( 1, stage1.getStartCount() );
assertEquals( 1, stage1.getCompleteCount() );
assertEquals( values.size(), stage2.getReceiveCount() );
assertEquals( 1, stage2.getStartCount() );
assertEquals( 1, stage2.getCompleteCount() );
assertEquals( 1, sink.getResults().size() );
}
public void testMergeGateGroupStream()
{
List<String> values = new ArrayList<String>();
for( int i = 0; i < 10; i++ )
values.add( "value" );
TestSourceStage source1 = new TestSourceStage<String>( values );
TestSourceStage source2 = new TestSourceStage<String>( values );
Gate<String, String> gate = new TestGate<String, String>();
CountingCollectStage stage1 = new CountingCollectStage<String, String>();
CountingCollectStage stage2 = new CountingCollectStage<String, String>();
TestSinkStage sink = new TestSinkStage<String>();
StreamGraph graph = new StreamGraph();
graph.addHead( source1 );
graph.addHead( source2 );
graph.addPath( source1, 0, gate );
graph.addPath( source2, 1, gate );
graph.addPath( gate, stage1 );
graph.addPath( stage1, stage2 );
graph.addPath( stage2, sink );
graph.addTail( sink );
graph.bind();
graph.prepare();
source1.receiveFirst( null );
source2.receiveFirst( null );
graph.cleanup();
assertPrepareCleanup( stage1 );
assertEquals( values.size() * 2, stage1.getReceiveCount() );
assertEquals( 1, stage1.getStartCount() );
assertEquals( 1, stage1.getCompleteCount() );
assertEquals( values.size() * 2, stage2.getReceiveCount() );
assertEquals( 1, stage2.getStartCount() );
assertEquals( 1, stage2.getCompleteCount() );
assertEquals( 1, sink.getResults().size() );
}
private void assertPrepareCleanup( CountingItemStage stage )
{
assertEquals( 1, stage.getPrepareCount() );
assertEquals( 1, stage.getCleanupCount() );
}
private void assertPrepareCleanup( CountingCollectStage stage )
{
assertEquals( 1, stage.getPrepareCount() );
assertEquals( 1, stage.getCleanupCount() );
}
}
|
[
"chris@wensel.net"
] |
chris@wensel.net
|
b7c34c1df7ea1a4fa36851b2b9c7e6995f7bdd4e
|
693995978adb623590dfc215fa166961af70fe8f
|
/kafka/src/main/java/com/shanjin/kafka/ProducerInterface.java
|
16933245ca7ee18fc4239b050147c17fe11133c6
|
[] |
no_license
|
yxxcrtd/omeng.cc
|
13ea163bee5cd89bd5a50388e7aae81da3355ca0
|
dffea0dbc666272712e82ef4ce25e427f97d05a1
|
refs/heads/master
| 2022-12-24T07:36:07.662048
| 2019-06-05T07:38:14
| 2019-06-05T07:38:14
| 190,348,103
| 1
| 1
| null | 2022-12-16T07:52:01
| 2019-06-05T07:35:46
|
Java
|
UTF-8
|
Java
| false
| false
| 1,134
|
java
|
package com.shanjin.kafka;
public interface ProducerInterface {
/**
* 异步发送普通消息, 适合于日志类,对于精确度要求不高的场景。 不等待消息服务器应答。
* 消息分区数为默认值3
*
* @param topic 主题
* @param content 消息内容
*/
public void sendMsg(String topic, String content);
/**
* 异步发送普通消息, 适合于日志类,对于精确度要求不高的场景。 不等待消息服务器应答。
* 消息分区数为默认值3
*
* @param topic 主题
* @param key 消息键
* @param content 消息内容
*/
public void sendMsg(String topic, String key, String content);
/**
* 分区数不是默认值3的,手工命令行创建分区; 分区数一定要和partition 返回的数字一致。
* @param topic
* @param partition
*/
public void setPartition(String topic,Partition partition);
/**
* 刷新发送缓存区的消息
*/
public void flush();
/**
* 关闭消息发送者,并释放资源。
*/
public void close();
}
|
[
"yxxcrtd@gmail.com"
] |
yxxcrtd@gmail.com
|
ab3a1bd3473c0a65606bb53cfc7a28b2360949b3
|
c9377759758b2075d4005a933e6107713404073d
|
/jdk-1.6-parent/serializer-kryo2/src/test/java/org/wicketstuff/pageserializer/kryo2/inspecting/analyze/TestObjectTreeTracker.java
|
ac4c50521954293cdb5b829ff9a6fb12a620ecfb
|
[] |
no_license
|
pmaingi/core
|
771f9837ff605f7ad5378bde45499d5a9b738bff
|
c23f46dd241754e2c23324cf201a81501db2805f
|
refs/heads/master
| 2021-01-17T22:35:03.837182
| 2012-11-21T10:32:01
| 2012-11-21T10:32:01
| 6,855,292
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,879
|
java
|
/**
* Copyright (C)
* 2008 Jeremy Thomerson <jeremy@thomersonfamily.com>
* 2012 Michael Mosmann <michael@mosmann.de>
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.wicketstuff.pageserializer.kryo2.inspecting.analyze;
import junit.framework.Assert;
import org.junit.Test;
import org.wicketstuff.pageserializer.kryo2.inspecting.analyze.IObjectLabelizer;
import org.wicketstuff.pageserializer.kryo2.inspecting.analyze.ISerializedObjectTree;
import org.wicketstuff.pageserializer.kryo2.inspecting.analyze.ObjectTreeTracker;
public class TestObjectTreeTracker
{
@Test
public void testSizes()
{
Object a = "HA";
Object b = 1;
IObjectLabelizer labelizer = new IObjectLabelizer()
{
@Override
public String labelFor(Object object)
{
return null;
}
};
ObjectTreeTracker tracker = new ObjectTreeTracker(labelizer, a);
tracker.newItem(0, a);
tracker.newItem(12, b);
tracker.closeItem(14, b);
tracker.closeItem(24, a);
ISerializedObjectTree tree = tracker.end(a);
Assert.assertEquals("size", 22, tree.size());
Assert.assertEquals("size", 2, tree.childSize());
}
}
|
[
"michael@mosmann.de"
] |
michael@mosmann.de
|
d483552c56e4f0e16d6eadbbc2bdcdb232475ca3
|
154261dadf12b23772622f653f856a20f1b7eecb
|
/src/com/facebook/buck/infer/InferDistFromTargetProvider.java
|
079c28b5022017fb61419e69341b6e2a6d18a736
|
[
"Apache-2.0"
] |
permissive
|
xmfan/buck
|
db91b5f8376f113d3cb713cac8b7584e2c9ec262
|
1e755494263bfa4b68e62fd61d86a711b9febc3a
|
refs/heads/master
| 2020-09-16T08:57:10.480410
| 2019-11-23T02:23:40
| 2019-11-23T03:39:30
| 223,717,003
| 0
| 0
|
Apache-2.0
| 2019-11-24T08:57:38
| 2019-11-24T08:57:37
| null |
UTF-8
|
Java
| false
| false
| 2,244
|
java
|
/*
* Copyright 2019-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.facebook.buck.infer;
import com.facebook.buck.core.exceptions.HumanReadableException;
import com.facebook.buck.core.model.BuildTarget;
import com.facebook.buck.core.model.TargetConfiguration;
import com.facebook.buck.core.model.UnconfiguredBuildTargetView;
import com.facebook.buck.core.rules.BuildRule;
import com.facebook.buck.core.rules.BuildRuleResolver;
import com.facebook.buck.core.toolchain.tool.Tool;
import com.facebook.buck.core.toolchain.toolprovider.ToolProvider;
import com.google.common.collect.ImmutableList;
import java.util.Optional;
/**
* A {@link ToolProvider} which provides {@link InferDistTool} referenced by a given {@link
* BuildTarget}.
*/
public class InferDistFromTargetProvider implements ToolProvider {
private final UnconfiguredBuildTargetView target;
private final String binary;
private final String source;
public InferDistFromTargetProvider(
UnconfiguredBuildTargetView target, String binary, String source) {
this.target = target;
this.binary = binary;
this.source = source;
}
@Override
public Tool resolve(BuildRuleResolver resolver, TargetConfiguration targetConfiguration) {
Optional<BuildRule> rule = resolver.getRuleOptional(target.configure(targetConfiguration));
if (!rule.isPresent()) {
throw new HumanReadableException("%s: no rule found for %s", source, target);
}
return new InferDistTool(rule.get().getSourcePathToOutput(), binary);
}
@Override
public Iterable<BuildTarget> getParseTimeDeps(TargetConfiguration targetConfiguration) {
return ImmutableList.of(target.configure(targetConfiguration));
}
}
|
[
"facebook-github-bot@users.noreply.github.com"
] |
facebook-github-bot@users.noreply.github.com
|
2cb356e74aed80028af44fbba626912a0f7b4c8b
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/66/org/apache/commons/math/linear/AbstractRealVector_next_916.java
|
e29188bfda8724e1345f25044557226e4e32fc1d
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,220
|
java
|
org apach common math linear
basic implement method
link real vector realvector
version revis date
abstract real vector abstractrealvector real vector realvector
inherit doc inheritdoc
entri
index index getindex
index
element except nosuchelementexcept
current set index setindex index
advanc
current
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
5c2442738aa485e15bcaf0280a9933ab6f703114
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/22/22_c687a160a5e35d4131b4eb69db19b1f60dbc0925/MetaModels/22_c687a160a5e35d4131b4eb69db19b1f60dbc0925_MetaModels_s.java
|
c72bbbb0709f1d2d9ce270015d21654028fd8255
|
[] |
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
| 3,871
|
java
|
/*
Copyright 2009-2010 Igor Polevoy
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.javalite.activejdbc;
import org.javalite.activejdbc.associations.Many2ManyAssociation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
/**
* @author Igor Polevoy
*/
public class MetaModels {
private final static Logger logger = LoggerFactory.getLogger(MetaModels.class);
Map<String, MetaModel> metaModelsByTableName = new HashMap<String, MetaModel>();
Map<Class<? extends Model>, MetaModel> metaModelsByClass = new HashMap<Class<? extends Model>, MetaModel>();
Map<String, MetaModel> metaModelsByClassName = new HashMap<String, MetaModel>();
void addMetaModel(MetaModel mm, String tableName, Class<? extends Model> modelClass) {
Object o = metaModelsByClass.put(modelClass, mm);
if (o != null) {
logger.warn("Double-register: " + modelClass + ": " + o);
}
o = metaModelsByTableName.put(tableName, mm);
if (o != null) {
logger.warn("Double-register: " + tableName + ": " + o);
}
metaModelsByClassName.put(modelClass.getName(), mm);
}
MetaModel getMetaModelByClassName(String className) {
return metaModelsByClassName.get(className);
}
MetaModel getMetaModel(Class<? extends Model> modelClass) {
return metaModelsByClass.get(modelClass);
}
MetaModel getMetaModel(String tableName) {
MetaModel mm = metaModelsByTableName.get(tableName.toLowerCase());
return mm != null? mm : metaModelsByTableName.get(tableName.toUpperCase());
}
String[] getTableNames(String dbName) {
ArrayList<String> tableNames = new ArrayList<String>();
for (MetaModel metaModel : metaModelsByTableName.values()) {
if (metaModel.getDbName().equals(dbName))
tableNames.add(metaModel.getTableName());
}
return tableNames.toArray(new String[]{});
}
Class getModelClass(String tableName) {
return metaModelsByTableName.get(tableName).getModelClass();
}
String getTableName(Class<? extends Model> modelClass) {
MetaModel mm = metaModelsByClass.get(modelClass);
return mm == null ? null : mm.getTableName();
}
public void setColumnMetadata(String table, Map<String, ColumnMetadata> metaParams) {
metaModelsByTableName.get(table).setColumnMetadata(metaParams);
}
//these are all many to many associations across all models.
private List<Many2ManyAssociation> many2ManyAssociations = new ArrayList<Many2ManyAssociation>();
protected List<String> getEdges(String join) {
List<String> results = new ArrayList<String>();
if (many2ManyAssociations.size() == 0) {
for (String table : metaModelsByTableName.keySet()) {
MetaModel mm = metaModelsByTableName.get(table);
many2ManyAssociations.addAll(mm.getManyToManyAssociations());
}
}
for(Many2ManyAssociation ass: many2ManyAssociations){
if(ass.getJoin().equalsIgnoreCase(join)){
results.add(ass.getSource());
results.add(ass.getTarget());
}
}
return results;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
cb42313b5a3bbeb380f4c8f082723c11f2b10657
|
dbb61cf3e9111788729f4779829bb1aef408562a
|
/kie-wb-common-screens/kie-wb-common-datasource-mgmt/kie-wb-common-datasource-mgmt-client/src/main/java/org/kie/workbench/common/screens/datasource/management/client/explorer/common/DefItem.java
|
10c7af4ab9aceb3edbcc21c7b011b528edd2a4e3
|
[
"Apache-2.0"
] |
permissive
|
bbrodt/kie-wb-common
|
313c3b3b52fae29dd58596a5a2241beef3170bc2
|
c7d08518d9d06981f97b09343ec17292fd718664
|
refs/heads/master
| 2021-01-13T04:29:05.930751
| 2017-01-24T10:16:38
| 2017-01-24T10:16:38
| 79,925,906
| 1
| 0
| null | 2017-01-24T15:47:42
| 2017-01-24T15:47:42
| null |
UTF-8
|
Java
| false
| false
| 1,745
|
java
|
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kie.workbench.common.screens.datasource.management.client.explorer.common;
import javax.enterprise.context.Dependent;
import javax.inject.Inject;
import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.Widget;
@Dependent
public class DefItem
implements IsWidget,
DefItemView.Presenter {
private DefItemView view;
private DefItemView.ItemHandler itemHandler;
private static int itemIds = 0;
private String itemId = "item_"+ itemIds++;
@Inject
public DefItem( DefItemView view ) {
this.view = view;
view.init( this );
}
public void setName( String name ) {
view.setName( name );
}
@Override
public Widget asWidget() {
return view.asWidget();
}
@Override
public void onClick() {
if ( itemHandler != null ) {
itemHandler.onClick( getId() );
}
}
@Override
public void addItemHandler( DefItemView.ItemHandler itemHandler ) {
this.itemHandler = itemHandler;
}
public String getId() {
return itemId;
}
}
|
[
"manstis@users.noreply.github.com"
] |
manstis@users.noreply.github.com
|
1979768ab5fd4820ab567ffe7a747a668caa903c
|
8eb034f18ae206630d30937188265a89d6590d54
|
/app/src/main/java/com/example/ankur/githubintegration/MainActivity.java
|
e37696dda1a44ef9c3c8e2d8779bcf9eb6b49d6b
|
[] |
no_license
|
ankurshukla1993/GithubIntegration
|
0918baf1736cbe35d4610a144cdceb34c6ccd8b3
|
8721e1e92f488486678dc7869ff11e5f33e199c7
|
refs/heads/master
| 2021-01-22T17:33:25.517740
| 2016-07-13T21:49:29
| 2016-07-13T21:49:29
| 63,179,811
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,577
|
java
|
package com.example.ankur.githubintegration;
import android.app.ProgressDialog;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.VolleyLog;
import com.android.volley.toolbox.JsonArrayRequest;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
public class MainActivity extends AppCompatActivity implements ConnectivityReceiver.ConnectivityReceiverListener {
@Override
public void onNetworkConnectionChanged(boolean isConnected) {
if(!isConnected)
Toast.makeText(MainActivity.this, "No Internet Connection....", Toast.LENGTH_LONG).show();
else
prepareCommitData();
}
private List<Commit> commitList = new ArrayList<>();
private RecyclerView recyclerView;
private CommitAdapter cAdapter ;
ProgressDialog pDialog ;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
/*Commit c = new Commit() ;
c.setAuthor("Ankur Shukla");
c.setNumber("qwerty");
c.setMessage("First Entity in recycler view");
commitList.add(c) ;*/
cAdapter = new CommitAdapter(commitList);
recyclerView.setHasFixedSize(true);
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
recyclerView.setLayoutManager(mLayoutManager);
recyclerView.addItemDecoration(new DividerItemDecoration(this, LinearLayoutManager.VERTICAL));
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.setAdapter(cAdapter);
pDialog = new ProgressDialog(this);
pDialog.setMessage("Please wait...");
pDialog.setCancelable(false);
if(checkConnection())
prepareCommitData();
}
private boolean checkConnection() {
boolean isConnected = ConnectivityReceiver.isConnected();
if(!isConnected)
Toast.makeText(MainActivity.this, "No Internet Connection !!", Toast.LENGTH_SHORT).show();
return isConnected ;
}
@Override
protected void onResume() {
super.onResume();
// register connection status listener
AppController.getInstance().setConnectivityListener(this);
}
private void showpDialog() {
if (!pDialog.isShowing())
pDialog.show();
}
private void hidepDialog() {
if (pDialog.isShowing())
pDialog.dismiss();
}
private void prepareCommitData() {
String url ="https://api.github.com/repos/rails/rails/commits";
final String TAG = getApplication().getClass().getName() ;
showpDialog();
JsonArrayRequest req = new JsonArrayRequest(url,
new Response.Listener<JSONArray>() {
@Override
public void onResponse(JSONArray response) {
Log.d(TAG, response.toString());
try {
// Parsing json array response
// loop through each json object
for (int i = 0; i < 25 ; i++) {
JSONObject person = (JSONObject) response
.get(i);
JSONObject obj = person.getJSONObject("commit") ;
String name = obj.getJSONObject("author").getString("name") ;
String sha = person.getString("sha") ;
String message = obj.getString("message") ;
Commit c = new Commit() ;
c.setAuthor("Author : " + name);
c.setNumber("Commit sha : " + sha);
c.setMessage("\nCommit message : " +message);
commitList.add(c) ;
cAdapter.notifyDataSetChanged();
//Toast.makeText(MainActivity.this, c.getAuthor() + " " + c.getNumber() + " " + c.getMessage(), Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
Toast.makeText(getApplicationContext(),
"Error: " + e.getMessage(),
Toast.LENGTH_LONG).show();
}
hidepDialog();
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
VolleyLog.d(TAG, "Error: " + error.getMessage());
Toast.makeText(getApplicationContext(),
error.getMessage(), Toast.LENGTH_SHORT).show();
hidepDialog();
}
});
// Adding request to request queue
AppController.getInstance().addToRequestQueue(req);
}
public interface ClickListener {
void onClick(View view, int position);
void onLongClick(View view, int position);
}
public static class RecyclerTouchListener implements RecyclerView.OnItemTouchListener {
private GestureDetector gestureDetector;
private MainActivity.ClickListener clickListener;
public RecyclerTouchListener(Context context, final RecyclerView recyclerView, final MainActivity.ClickListener clickListener) {
this.clickListener = clickListener;
gestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() {
@Override
public boolean onSingleTapUp(MotionEvent e) {
return true;
}
@Override
public void onLongPress(MotionEvent e) {
View child = recyclerView.findChildViewUnder(e.getX(), e.getY());
if (child != null && clickListener != null) {
clickListener.onLongClick(child, recyclerView.getChildPosition(child));
}
}
});
}
@Override
public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
View child = rv.findChildViewUnder(e.getX(), e.getY());
if (child != null && clickListener != null && gestureDetector.onTouchEvent(e)) {
clickListener.onClick(child, rv.getChildPosition(child));
}
return false;
}
@Override
public void onTouchEvent(RecyclerView rv, MotionEvent e) {
}
@Override
public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {
}
}
}
|
[
"xxx"
] |
xxx
|
e20319768281e133db23a0e141452af09fdef71b
|
94311ca7dc6c28c4212b2a7e41782409ee4b96cb
|
/vs-log/src/com/liquidlabs/log/fields/FieldSetAssember.java
|
3c918ff5bc8087a0b3ed64c4ee96c2651d79a954
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
logscape/Logscape
|
5856f3bf55fb1723b57ec9fce7f7546ee4cd27f1
|
fde9133797b8f1d03f824c65e26e352ae5677063
|
refs/heads/master
| 2021-09-01T08:47:12.323845
| 2021-04-01T07:58:15
| 2021-04-01T07:58:15
| 89,608,168
| 28
| 10
|
NOASSERTION
| 2021-08-02T17:19:32
| 2017-04-27T14:43:31
|
Java
|
UTF-8
|
Java
| false
| false
| 1,533
|
java
|
package com.liquidlabs.log.fields;
import org.apache.log4j.Logger;
import org.joda.time.DateTimeUtils;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
public class FieldSetAssember {
static final Logger LOGGER = Logger.getLogger(FieldSetAssember.class);
public FieldSet determineFieldSet(String fullFilePath, List<FieldSet> fieldSets, List<String> lines, boolean sortFieldSets, String tags) throws Exception {
try {
// LOGGER.info(">> CHECKING:" + fullFilePath + " FSets:" + fieldSets.size());
if (sortFieldSets) sortFieldSets(fieldSets);
for (FieldSet fieldSet : fieldSets) {
try {
if (FieldSetUtil.validate(fieldSet, fullFilePath, lines, tags)) {
return fieldSet;
}
} catch (Throwable t) {
LOGGER.warn("FieldSet validate Failed:" + fieldSet.id + " ex:" + t);
}
fieldSet.getKVStore().commit();
}
return FieldSets.getBasicFieldSet();
} catch (Throwable t) {
LOGGER.error("Failed to find fieldSet for:" + fullFilePath, t);
return FieldSets.getBasicFieldSet();
} finally {
long end = DateTimeUtils.currentTimeMillis();
//LOGGER.info("<< CHECKING:" + fullFilePath + " e:" + (end - start));
}
}
private void sortFieldSets(List<FieldSet> fieldSets) {
// sort according to precendence
Collections.sort(fieldSets, new Comparator<FieldSet>(){
public int compare(FieldSet o1, FieldSet o2) {
return Integer.valueOf(o2.priority).compareTo(o1.priority);
}
});
}
}
|
[
"support@logscape.com"
] |
support@logscape.com
|
593d1150012e7eab11d6ce35c2b7878e2ca4f38d
|
26a837b93cf73e6c372830f9a7a316c01081a4ea
|
/processor/src/test/fixtures/bad_input/com/example/component_dependency/CascadeDisposeAndFieldDependency.java
|
84476aecaaed03e8601db14f47b6a804b55e880e
|
[
"Apache-2.0"
] |
permissive
|
arez/arez
|
033b27f529b527c747b2a93f3c2c553c41c32acd
|
df68d72a69d3af1123e7d7c424f77b74f13f8052
|
refs/heads/master
| 2023-06-08T00:09:56.319223
| 2023-06-05T02:12:14
| 2023-06-05T02:12:14
| 96,367,327
| 13
| 4
|
Apache-2.0
| 2022-12-10T20:29:35
| 2017-07-05T22:50:24
|
Java
|
UTF-8
|
Java
| false
| false
| 867
|
java
|
package com.example.component_dependency;
import arez.Disposable;
import arez.SafeProcedure;
import arez.annotations.ArezComponent;
import arez.annotations.CascadeDispose;
import arez.annotations.ComponentDependency;
import arez.component.DisposeNotifier;
import javax.annotation.Nonnull;
@ArezComponent
public abstract class CascadeDisposeAndFieldDependency
{
static class Element
implements DisposeNotifier, Disposable
{
@Override
public void dispose()
{
}
@Override
public boolean isDisposed()
{
return false;
}
@Override
public void addOnDisposeListener( @Nonnull final Object key, @Nonnull final SafeProcedure action )
{
}
@Override
public void removeOnDisposeListener( @Nonnull final Object key )
{
}
}
@CascadeDispose
@ComponentDependency
final Element time = null;
}
|
[
"peter@realityforge.org"
] |
peter@realityforge.org
|
44f2441e1d56813e0f9041467643d51ed382b966
|
5aa586fb3c6d1c5350af10e857f31a3daed9b970
|
/AC-Game/data/scripts/system/handlers/quest/inggison/_11147CuteBeadyEyes.java
|
7f860313c3ba53425129f1a40e8af20f8ff25484
|
[] |
no_license
|
JohannesPfau/aion48
|
c1b77a46b6f98759e3704507fd48a47c5da48021
|
ebed1fc243fa85ee56a2af49d84a6d6dcca6c027
|
refs/heads/master
| 2020-03-18T01:15:05.566820
| 2018-05-16T20:40:16
| 2018-05-16T20:40:16
| 134,134,369
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,866
|
java
|
/**
* This file is part of Aion-Lightning <aion-lightning.org>.
*
* Aion-Lightning is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Aion-Lightning is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. *
*
* You should have received a copy of the GNU General Public License
* along with Aion-Lightning.
* If not, see <http://www.gnu.org/licenses/>.
*
*
* Credits goes to all Open Source Core Developer Groups listed below
* Please do not change here something, ragarding the developer credits, except the "developed by XXXX".
* Even if you edit a lot of files in this source, you still have no rights to call it as "your Core".
* Everybody knows that this Emulator Core was developed by Aion Lightning
* @-Aion-Unique-
* @-Aion-Lightning
* @Aion-Engine
* @Aion-Extreme
* @Aion-NextGen
* @Aion-Core Dev.
*/
package quest.inggison;
import com.aionemu.gameserver.model.DialogAction;
import com.aionemu.gameserver.model.gameobjects.Npc;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.questEngine.handlers.QuestHandler;
import com.aionemu.gameserver.questEngine.model.QuestEnv;
import com.aionemu.gameserver.questEngine.model.QuestState;
import com.aionemu.gameserver.questEngine.model.QuestStatus;
import com.aionemu.gameserver.services.QuestService;
import com.aionemu.gameserver.world.zone.ZoneName;
/**
* @author Cheatkiller
*/
public class _11147CuteBeadyEyes extends QuestHandler {
private final static int questId = 11147;
public _11147CuteBeadyEyes() {
super(questId);
}
public void register() {
qe.registerQuestNpc(798997).addOnQuestStart(questId);
qe.registerQuestNpc(798997).addOnTalkEvent(questId);
qe.registerQuestNpc(799079).addOnTalkEvent(questId);
qe.registerQuestNpc(799081).addOnTalkEvent(questId);
qe.registerOnEnterZone(ZoneName.get("KLAWNICKTS_CAVE_210050000"), questId);
}
@Override
public boolean onDialogEvent(QuestEnv env) {
Player player = env.getPlayer();
QuestState qs = player.getQuestStateList().getQuestState(questId);
DialogAction dialog = env.getDialog();
int targetId = env.getTargetId();
if (qs == null || qs.getStatus() == QuestStatus.NONE) {
if (targetId == 798997) {
if (dialog == DialogAction.QUEST_SELECT) {
return sendQuestDialog(env, 4762);
} else {
return sendQuestStartDialog(env);
}
}
} else if (qs.getStatus() == QuestStatus.START) {
if (targetId == 798997) {
if (dialog == DialogAction.QUEST_SELECT) {
if (qs.getQuestVarById(0) == 0) {
return sendQuestDialog(env, 1011);
} else if (qs.getQuestVarById(0) == 1) {
return sendQuestDialog(env, 1352);
}
} else if (dialog == DialogAction.SETPRO1) {
QuestService.addNewSpawn(player.getWorldId(), player.getInstanceId(), 799079, player.getX(), player.getY(), player.getZ(),
(byte) 0);
QuestService.addNewSpawn(player.getWorldId(), player.getInstanceId(), 799081, player.getX() - 1, player.getY() + 2, player.getZ(),
(byte) 0);
return defaultCloseDialog(env, 0, 1);
} else if (dialog == DialogAction.SETPRO2) {
return defaultCloseDialog(env, 1, 2);
}
} else if (targetId == 799079) {
if (dialog == DialogAction.QUEST_SELECT) {
return sendQuestDialog(env, 1693);
} else if (dialog == DialogAction.SETPRO3) {
Npc npc = (Npc) env.getVisibleObject();
npc.getController().onDelete();
return defaultCloseDialog(env, 2, 3);
}
} else if (targetId == 799081) {
if (dialog == DialogAction.QUEST_SELECT) {
return sendQuestDialog(env, 2034);
} else if (dialog == DialogAction.SETPRO4) {
Npc npc = (Npc) env.getVisibleObject();
npc.getController().onDelete();
return defaultCloseDialog(env, 3, 4);
}
}
} else if (qs.getStatus() == QuestStatus.REWARD) {
if (targetId == 798997) {
switch (dialog) {
case USE_OBJECT: {
return sendQuestDialog(env, 10002);
}
default: {
return sendQuestEndDialog(env);
}
}
}
}
return false;
}
@Override
public boolean onEnterZoneEvent(QuestEnv env, ZoneName zoneName) {
if (zoneName == ZoneName.get("KLAWNICKTS_CAVE_210050000")) {
Player player = env.getPlayer();
if (player == null) {
return false;
}
QuestState qs = player.getQuestStateList().getQuestState(questId);
if (qs != null && qs.getStatus() == QuestStatus.START) {
int var = qs.getQuestVarById(0);
if (var == 4) {
changeQuestStep(env, 4, 4, true);
return true;
}
}
}
return false;
}
}
|
[
"aion@gmx-topmail.de"
] |
aion@gmx-topmail.de
|
88cbfc384d936c3e03a8aa27a57d6e0b758519eb
|
1fa4a5d707e4f85161d686777dadae6e17a37218
|
/odata-client-runtime/src/main/java/com/github/davidmoten/odata/client/internal/InputStreamWithCloseable.java
|
0fc8b612ce2eeb978d9db0eb4090e6f3f556cf6c
|
[
"Apache-2.0"
] |
permissive
|
davidmoten/odata-client
|
82cc32071339014b93946c24e5b4a46338184993
|
d5a2c1501cd1ddad5761df1c08b0cd03b45b06c7
|
refs/heads/master
| 2023-09-04T10:51:07.082963
| 2023-08-29T08:59:37
| 2023-08-29T09:08:03
| 147,444,174
| 31
| 9
|
Apache-2.0
| 2023-09-08T01:13:39
| 2018-09-05T01:50:53
|
Java
|
UTF-8
|
Java
| false
| false
| 1,377
|
java
|
package com.github.davidmoten.odata.client.internal;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
final class InputStreamWithCloseable extends InputStream {
private final InputStream in;
private final Closeable closeable;
InputStreamWithCloseable(InputStream in, Closeable closeable) {
this.in = in;
this.closeable = closeable;
}
@Override
public int read() throws IOException {
return in.read();
}
@Override
public int read(byte[] b) throws IOException {
return in.read(b);
}
@Override
public int read(byte[] b, int off, int len) throws IOException {
return in.read(b, off, len);
}
@Override
public long skip(long n) throws IOException {
return in.skip(n);
}
@Override
public int available() throws IOException {
return in.available();
}
@Override
public void close() throws IOException {
try {
in.close();
} finally {
closeable.close();
}
}
@Override
public synchronized void mark(int readlimit) {
in.mark(readlimit);
}
@Override
public synchronized void reset() throws IOException {
in.reset();
}
@Override
public boolean markSupported() {
return in.markSupported();
}
}
|
[
"davidmoten@gmail.com"
] |
davidmoten@gmail.com
|
9fb50bd7d17ba2b3c0429d65b434372acd56aa09
|
01b9e8ce776593eeaeae0f2317bb495ace2d9a6f
|
/src/ddt/melnorme/utilbox/misc/MiscUtil.java
|
a8e998f7d0971ecb2de9b36a08c43faffadd4acf
|
[] |
no_license
|
cmeury/DLanguage
|
3d6e15157e00c6a21d3bb4bde4771ffb3ece102b
|
c8e47a6ab7b5786b9a372676aadff7f6562048e5
|
refs/heads/master
| 2021-01-16T22:03:06.314831
| 2015-10-07T19:10:44
| 2015-10-07T19:10:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,877
|
java
|
/*******************************************************************************
* Copyright (c) 2007, 2014 Bruno Medeiros and other Contributors.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Bruno Medeiros - initial implementation
*******************************************************************************/
package ddt.melnorme.utilbox.misc;
import static ddt.melnorme.utilbox.core.Assert.AssertNamespace.assertFail;
import static ddt.melnorme.utilbox.core.Assert.AssertNamespace.assertNotNull;
import static ddt.melnorme.utilbox.core.Assert.AssertNamespace.assertTrue;
import static ddt.melnorme.utilbox.misc.StreamUtil.readAllBytesFromStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collection;
import ddt.melnorme.utilbox.core.fntypes.Predicate;
import ddt.melnorme.utilbox.ownership.IDisposable;
public class MiscUtil extends PathUtil {
public static final String OS_NAME = StringUtil.nullAsEmpty(System.getProperty("os.name"));
public static final boolean OS_IS_WINDOWS = OS_NAME.startsWith("Windows");
public static final boolean OS_IS_LINUX = OS_NAME.startsWith("Linux") || OS_NAME.startsWith("LINUX");
public static final boolean OS_IS_MAC = OS_NAME.startsWith("Mac");
public static <T> Predicate<T> getNotNullPredicate() {
return new NotNullPredicate<T>();
}
public static final class NotNullPredicate<T> implements Predicate<T> {
@Override
public boolean evaluate(T obj) {
return obj != null;
}
}
public static <T> Predicate<T> getIsNullPredicate() {
return new IsNullPredicate<T>();
}
public static final class IsNullPredicate<T> implements Predicate<T> {
@Override
public boolean evaluate(T obj) {
return obj == null;
}
}
/** Loads given klass. */
public static void loadClass(Class<?> klass) {
try {
// We use klass.getClassLoader(), in case klass cannot be loaded in the default (caller) classloader
// that could happen in OSGi runtimes for example
Class.forName(klass.getName(), true, klass.getClassLoader());
} catch (ClassNotFoundException e) {
assertFail();
}
}
/** Combines two hash codes to make a new one. */
public static int combineHashCodes(int hashCode1, int hashCode2) {
return HashcodeUtil.combineHashCodes(hashCode1, hashCode2);
}
/** Returns the first element of objs array that is not null.
* At least one element must be non-null. */
@SafeVarargs
public static <T> T firstNonNull(T... objs) {
for (int i = 0; i < objs.length; i++) {
if(objs[i] != null)
return objs[i];
}
assertFail();
return null;
}
/** Convenience method for extracting the element of a single element collection . */
public static <T> T getSingleElement(Collection<T> singletonDefunits) {
assertTrue(singletonDefunits.size() == 1);
return singletonDefunits.iterator().next();
}
/** Synchronizes on the given collection, and returns a copy suitable for iteration. */
public static <T> Iterable<T> synchronizedCreateIterable(Collection<T> collection) {
Iterable<T> iterable;
synchronized (collection) {
iterable = new ArrayList<T>(collection);
}
return iterable;
}
/** Sleeps current thread for given millis amount.
* If interrupted throws an unchecked exception. */
public static void sleepUnchecked(long millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
throw ddt.melnorme.utilbox.core.ExceptionAdapter.unchecked(e);
}
}
public static <T> T nullToOther(T object, T altValue) {
return object == null ? altValue : object;
}
/** @return true if given throwable is a Java unchecked throwable, false otherwise. */
public static boolean isUncheckedException(Throwable throwable) {
return throwable instanceof RuntimeException || throwable instanceof Error;
}
public static String getClassResourceAsString(Class<?> klass, String resourceName) {
return getClassResourceAsString(klass, resourceName, StringUtil.UTF8);
}
public static String getClassResourceAsString(Class<?> klass, String resourceName, Charset charset) {
try {
InputStream resourceStream = klass.getResourceAsStream(resourceName);
assertNotNull(resourceStream);
return readAllBytesFromStream(resourceStream).toString(charset);
} catch (IOException e) {
throw ddt.melnorme.utilbox.core.ExceptionAdapter.unchecked(e);
}
}
public static void dispose(IDisposable disposable) {
if (disposable != null) {
disposable.dispose();
}
}
}
|
[
"kingsleyhendrickse@me.com"
] |
kingsleyhendrickse@me.com
|
1b9210a4a0d3614f5d094c06dbd449cb1528db06
|
380fde152a2a7bb88969ed1ce09203245a28f9fe
|
/web_ejem7/src/main/java/es/urjc/code/daw/Usuario.java
|
37fa8abd99c5e5f2eac0d403b56f8817a0a5488a
|
[
"Apache-2.0"
] |
permissive
|
denysnovoascmspain/Spring-T1-Web
|
14ce4b82e862b98e6efb28656ebfad1fe1213d84
|
147c07b02af0f4130665f850437513180b3d4a6e
|
refs/heads/master
| 2020-12-30T18:38:58.513980
| 2016-06-23T08:37:43
| 2016-06-23T08:37:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 539
|
java
|
package es.urjc.code.daw;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Component;
import org.springframework.web.context.WebApplicationContext;
@Component
@Scope(value = WebApplicationContext.SCOPE_SESSION,
proxyMode = ScopedProxyMode.TARGET_CLASS)
public class Usuario {
private String info;
public void setInfo(String info) {
this.info = info;
}
public String getInfo() {
return info;
}
}
|
[
"micael.gallego@gmail.com"
] |
micael.gallego@gmail.com
|
365b9752206e41dd818ff1c424b701f8e8017f30
|
22163af8d7cec67429843e4a3c1854952ebc4496
|
/toro-mopub/src/androidTest/java/im/ene/toro/mopub/ExampleInstrumentedTest.java
|
5798e4785c9d5cbe838a9f17fe74e99005d1244a
|
[
"Apache-2.0"
] |
permissive
|
MerveGencer/toro
|
289b39395fd7c27516df76f7a0f3c28f62882ba0
|
117f4542d487a62c88131cf0f9f9d3cd61fca889
|
refs/heads/master
| 2021-05-03T11:52:07.450310
| 2018-01-01T13:17:58
| 2018-01-01T13:17:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,334
|
java
|
/*
* Copyright (c) 2017 Nam Nguyen, nam@ene.im
*
* 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 im.ene.toro.mopub;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest {
@Test public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("im.ene.toro.mopub.test", appContext.getPackageName());
}
}
|
[
"mr.nguyenhoainam@gmail.com"
] |
mr.nguyenhoainam@gmail.com
|
cb9e3519e6637fa85622e77342634a781367016a
|
50aaec6a57f4b2e399f6909a976b31c1b9facb31
|
/core/src/com/fruit/controllers/composite/SimpleComboCalc.java
|
e0cdb86dfdcd37f311a4a0922c607787c920b441
|
[] |
no_license
|
ecraftagency/fishot
|
a543f4f85081050381498f18d53acada18013db4
|
ed2ddfa7f645432a42057bd51ccea053f60708d7
|
refs/heads/master
| 2022-06-21T18:53:36.370042
| 2020-05-09T10:22:21
| 2020-05-09T10:22:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,995
|
java
|
package com.fruit.controllers.composite;
import com.badlogic.gdx.utils.Array;
import com.fruit.controllers.ThrowEngine;
import java.util.HashMap;
import static com.fruit.Const.*;
import static com.fruit.controllers.ThrowEngine.*;
public class SimpleComboCalc implements ComboLogic {
private float acc;
private HashMap<Integer, Array<Float>> hitHistory;
private ThrowEngine engine;
private float lastHitTime;
public SimpleComboCalc(ThrowEngine engine) {
hitHistory = new HashMap<>();
this.engine = engine;
}
@Override
public void step(float dt) {
acc += dt;
if (acc - lastHitTime >= Combo.COMBO_THRESHOLD) {
if (hitHistory.size() >= 1 && hitHistory.entrySet().iterator().hasNext()) {
Array<Float> hitTimes = hitHistory.entrySet().iterator().next().getValue();
if (hitTimes.size >= Combo.MIN_COMBO_COUNT)
engine.signalCombo(hitTimes.size);
hitHistory.clear();
}
}
}
@Override
public void onHit(int swipeId) {
float currentHitTime = acc;
lastHitTime = currentHitTime;
if (hitHistory.size() == 0) { //very first onHit
Array<Float> hitTimes = new Array<>();
hitTimes.add(currentHitTime);
hitHistory.put(swipeId, hitTimes);
}
else { //later hits
if (hitHistory.containsKey(swipeId)) { //same swipe type
Array<Float> hitTimes = hitHistory.get(swipeId);
if (hitTimes.size >= 1) {
float lastHitTime = hitTimes.get(hitTimes.size - 1);
if (currentHitTime - lastHitTime < Combo.COMBO_THRESHOLD) {
hitTimes.add(currentHitTime);
}
}
}
else { //different swipe type
hitHistory.clear();
Array<Float> hitTimes = new Array<>();
hitTimes.add(currentHitTime);
hitHistory.put(swipeId, hitTimes);
}
}
}
}
|
[
"ecraft.eventagency@gmail.com"
] |
ecraft.eventagency@gmail.com
|
67254e708963c1e0b8d6a605b744af6577945a24
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/spring-projects--spring-framework/d9de19d7b31c684fe65f51233a70ada6ecc15221/after/AnnotatedClassCacheableService.java
|
40e6ef9610052287ba6c225d024109cc79dc1434
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,232
|
java
|
/*
* Copyright 2010-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cache.config;
import java.util.concurrent.atomic.AtomicLong;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
/**
* @author Costin Leau
*/
@Cacheable("default")
public class AnnotatedClassCacheableService implements CacheableService {
private final AtomicLong counter = new AtomicLong();
public static final AtomicLong nullInvocations = new AtomicLong();
public Object cache(Object arg1) {
return counter.getAndIncrement();
}
public Object conditional(int field) {
return null;
}
@CacheEvict("default")
public void invalidate(Object arg1) {
}
@CacheEvict(value = "default", key = "#p0")
public void evict(Object arg1, Object arg2) {
}
@Cacheable(value = "default", key = "#p0")
public Object key(Object arg1, Object arg2) {
return counter.getAndIncrement();
}
@Cacheable(value = "default", key = "#root.methodName + #root.caches[0].name")
public Object name(Object arg1) {
return counter.getAndIncrement();
}
@Cacheable(value = "default", key = "#root.methodName + #root.method.name + #root.targetClass + #root.target")
public Object rootVars(Object arg1) {
return counter.getAndIncrement();
}
public Object nullValue(Object arg1) {
nullInvocations.incrementAndGet();
return null;
}
public Number nullInvocations() {
return nullInvocations.get();
}
public Long throwChecked(Object arg1) throws Exception {
throw new UnsupportedOperationException(arg1.toString());
}
public Long throwUnchecked(Object arg1) {
throw new UnsupportedOperationException();
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
b9f27f7abd191416c4dccd9dced14cd60986dc9b
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/org/webrtc/CameraVideoCapturer.java
|
9b6e93fd41c91d726d7be315a4e64e3eb4b12cb0
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,560
|
java
|
package org.webrtc;
import android.media.MediaRecorder;
import com.facebook.ads.AdError;
import com.taobao.android.dexposed.ClassUtils;
import org.webrtc.CameraEnumerationAndroid.CaptureFormat.FramerateRange;
public interface CameraVideoCapturer extends VideoCapturer {
public interface CameraEventsHandler {
void onCameraClosed();
void onCameraConfig(int i, int i2, FramerateRange framerateRange);
void onCameraDisconnected();
void onCameraError(String str);
void onCameraFreezed(String str);
void onCameraOpening(String str);
void onFirstFrameAvailable();
}
public static class CameraStatistics {
private final Runnable cameraObserver = new Runnable() {
public void run() {
int round = Math.round((((float) CameraStatistics.this.frameCount) * 1000.0f) / 2000.0f);
StringBuilder sb = new StringBuilder("Camera fps: ");
sb.append(round);
sb.append(ClassUtils.PACKAGE_SEPARATOR);
Logging.m150047d("CameraStatistics", sb.toString());
if (CameraStatistics.this.frameCount == 0) {
CameraStatistics.this.freezePeriodCount++;
if (CameraStatistics.this.freezePeriodCount * AdError.SERVER_ERROR_CODE >= 4000 && CameraStatistics.this.eventsHandler != null) {
Logging.m150048e("CameraStatistics", "Camera freezed.");
if (CameraStatistics.this.surfaceTextureHelper.isTextureInUse()) {
CameraStatistics.this.eventsHandler.onCameraFreezed("Camera failure. Client must return video buffers.");
return;
} else {
CameraStatistics.this.eventsHandler.onCameraFreezed("Camera failure.");
return;
}
}
} else {
CameraStatistics.this.freezePeriodCount = 0;
}
CameraStatistics.this.frameCount = 0;
CameraStatistics.this.surfaceTextureHelper.getHandler().postDelayed(this, 2000);
}
};
public final CameraEventsHandler eventsHandler;
public int frameCount;
public int freezePeriodCount;
public final SurfaceTextureHelper surfaceTextureHelper;
public void addFrame() {
checkThread();
this.frameCount++;
}
public void release() {
this.surfaceTextureHelper.getHandler().removeCallbacks(this.cameraObserver);
}
private void checkThread() {
if (Thread.currentThread() != this.surfaceTextureHelper.getHandler().getLooper().getThread()) {
throw new IllegalStateException("Wrong thread");
}
}
public CameraStatistics(SurfaceTextureHelper surfaceTextureHelper2, CameraEventsHandler cameraEventsHandler) {
if (surfaceTextureHelper2 != null) {
this.surfaceTextureHelper = surfaceTextureHelper2;
this.eventsHandler = cameraEventsHandler;
this.frameCount = 0;
this.freezePeriodCount = 0;
surfaceTextureHelper2.getHandler().postDelayed(this.cameraObserver, 2000);
return;
}
throw new IllegalArgumentException("SurfaceTextureHelper is null");
}
}
public interface CameraSwitchHandler {
void onCameraSwitchDone(boolean z);
void onCameraSwitchError(String str);
}
public interface MediaRecorderHandler {
void onMediaRecorderError(String str);
void onMediaRecorderSuccess();
}
public enum ORIENTATION_MODE {
ORIENTATION_MODE_ADAPTIVE(0),
ORIENTATION_MODE_FIXED_LANDSCAPE(1),
ORIENTATION_MODE_FIXED_PORTRAIT(2);
private int value;
public final int getValue() {
return this.value;
}
public static ORIENTATION_MODE convertFromInt(int i) {
return values()[i];
}
private ORIENTATION_MODE(int i) {
this.value = i;
}
}
void addMediaRecorderToCamera(MediaRecorder mediaRecorder, MediaRecorderHandler mediaRecorderHandler);
void removeMediaRecorderFromCamera(MediaRecorderHandler mediaRecorderHandler);
void setOrientationMode(ORIENTATION_MODE orientation_mode);
void switchCamera(CameraSwitchHandler cameraSwitchHandler);
}
|
[
"65450641+Xyzdesk@users.noreply.github.com"
] |
65450641+Xyzdesk@users.noreply.github.com
|
4cbdba9c7dad97fd7a8c884a3fa55b215735a976
|
1b24fbd55014fa89153f8b2a6dbde4a39510d36f
|
/moco-core/src/main/java/com/github/dreamhead/moco/resource/reader/Variable.java
|
a993e8890449b806d562b505e3976f4b0bf03dd8
|
[
"MIT"
] |
permissive
|
ZhangTommy/moco
|
5eab625a3377b352f3bdb913c1b68cf95e2f1293
|
a99ba18bc9f3376e714b5ddf3319c08c479dbd64
|
refs/heads/master
| 2021-09-05T09:21:34.545909
| 2018-01-26T01:46:30
| 2018-01-26T01:46:30
| 119,787,245
| 1
| 0
| null | 2018-02-01T05:27:19
| 2018-02-01T05:27:19
| null |
UTF-8
|
Java
| false
| false
| 179
|
java
|
package com.github.dreamhead.moco.resource.reader;
import com.github.dreamhead.moco.Request;
public interface Variable {
Object toTemplateVariable(final Request request);
}
|
[
"dreamhead.cn@gmail.com"
] |
dreamhead.cn@gmail.com
|
902575033da1dd769a5af381bba4246589f22cff
|
eeb50e718d07116f4f0c8b6a6f79a5649bc896ca
|
/qidao-api-service-model/src/main/java/com/qidao/application/model/pay/AliPayConfig.java
|
c0f3ba6c72a412a1930c685778237c4682cb5a08
|
[] |
no_license
|
tzbgithub/keqidao2
|
b161c3f7edc578bc9d70dd74a69785d150e048b1
|
6d3bc986a81b732b55d30e961773fd87b7dead14
|
refs/heads/master
| 2023-04-22T09:19:43.860468
| 2021-05-10T05:12:02
| 2021-05-10T05:12:02
| 365,924,451
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 506
|
java
|
package com.qidao.application.model.pay;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Component
@ConfigurationProperties(prefix = "pay.ali")
@Data
public class AliPayConfig {
private String protocol;
private String gatewayHost;
private String signType;
private String appId;
private String merchantPrivateKeyPath;
private String aliPublicKeyPath;
private String notifyUrl;
}
|
[
"564858834@qq.com"
] |
564858834@qq.com
|
f8893e9a180743511ed9b633686c1dd6c50bf43a
|
c8417895a7b071e7b2cc07a6791357c5bffc7889
|
/com/google/android/gms/internal/hv.java
|
4d032bee1b73613343b6737b6a6af5c84f307b7d
|
[] |
no_license
|
HansaTharuka/Explore
|
70a610cac38469cddf2dc87c9f67dcd9a94f8d1a
|
b71eb84c57fb28b687ce6df4a69e14a3dcaf8458
|
refs/heads/master
| 2021-01-24T11:27:25.524180
| 2018-02-27T06:33:37
| 2018-02-27T06:33:37
| 123,083,071
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,376
|
java
|
package com.google.android.gms.internal;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.ParcelFileDescriptor;
import android.os.Parcelable.Creator;
import android.os.RemoteException;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.api.StatusCreator;
public abstract interface hv extends IInterface
{
public abstract void a(Status paramStatus)
throws RemoteException;
public abstract void a(Status paramStatus, ParcelFileDescriptor paramParcelFileDescriptor)
throws RemoteException;
public abstract void a(Status paramStatus, boolean paramBoolean)
throws RemoteException;
public abstract void a(hl.b paramb)
throws RemoteException;
public static abstract class a extends Binder
implements hv
{
public a()
{
attachInterface(this, "com.google.android.gms.appdatasearch.internal.ILightweightAppDataSearchCallbacks");
}
public static hv F(IBinder paramIBinder)
{
if (paramIBinder == null)
return null;
IInterface localIInterface = paramIBinder.queryLocalInterface("com.google.android.gms.appdatasearch.internal.ILightweightAppDataSearchCallbacks");
if ((localIInterface != null) && ((localIInterface instanceof hv)))
return (hv)localIInterface;
return new a(paramIBinder);
}
public IBinder asBinder()
{
return this;
}
public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2)
throws RemoteException
{
switch (paramInt1)
{
default:
return super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2);
case 1598968902:
paramParcel2.writeString("com.google.android.gms.appdatasearch.internal.ILightweightAppDataSearchCallbacks");
return true;
case 1:
paramParcel1.enforceInterface("com.google.android.gms.appdatasearch.internal.ILightweightAppDataSearchCallbacks");
int m = paramParcel1.readInt();
Status localStatus3 = null;
if (m != 0)
localStatus3 = Status.CREATOR.createFromParcel(paramParcel1);
a(localStatus3);
return true;
case 2:
paramParcel1.enforceInterface("com.google.android.gms.appdatasearch.internal.ILightweightAppDataSearchCallbacks");
if (paramParcel1.readInt() != 0);
for (Status localStatus2 = Status.CREATOR.createFromParcel(paramParcel1); ; localStatus2 = null)
{
int k = paramParcel1.readInt();
ParcelFileDescriptor localParcelFileDescriptor = null;
if (k != 0)
localParcelFileDescriptor = (ParcelFileDescriptor)ParcelFileDescriptor.CREATOR.createFromParcel(paramParcel1);
a(localStatus2, localParcelFileDescriptor);
return true;
}
case 3:
paramParcel1.enforceInterface("com.google.android.gms.appdatasearch.internal.ILightweightAppDataSearchCallbacks");
int j = paramParcel1.readInt();
Status localStatus1 = null;
if (j != 0)
localStatus1 = Status.CREATOR.createFromParcel(paramParcel1);
if (paramParcel1.readInt() != 0);
for (boolean bool = true; ; bool = false)
{
a(localStatus1, bool);
return true;
}
case 4:
}
paramParcel1.enforceInterface("com.google.android.gms.appdatasearch.internal.ILightweightAppDataSearchCallbacks");
int i = paramParcel1.readInt();
hl.b localb = null;
if (i != 0)
localb = hl.b.CREATOR.q(paramParcel1);
a(localb);
return true;
}
private static class a
implements hv
{
private IBinder le;
a(IBinder paramIBinder)
{
this.le = paramIBinder;
}
public void a(Status paramStatus)
throws RemoteException
{
Parcel localParcel = Parcel.obtain();
try
{
localParcel.writeInterfaceToken("com.google.android.gms.appdatasearch.internal.ILightweightAppDataSearchCallbacks");
if (paramStatus != null)
{
localParcel.writeInt(1);
paramStatus.writeToParcel(localParcel, 0);
}
while (true)
{
this.le.transact(1, localParcel, null, 1);
return;
localParcel.writeInt(0);
}
}
finally
{
localParcel.recycle();
}
throw localObject;
}
public void a(Status paramStatus, ParcelFileDescriptor paramParcelFileDescriptor)
throws RemoteException
{
Parcel localParcel = Parcel.obtain();
while (true)
{
try
{
localParcel.writeInterfaceToken("com.google.android.gms.appdatasearch.internal.ILightweightAppDataSearchCallbacks");
if (paramStatus == null)
continue;
localParcel.writeInt(1);
paramStatus.writeToParcel(localParcel, 0);
if (paramParcelFileDescriptor != null)
{
localParcel.writeInt(1);
paramParcelFileDescriptor.writeToParcel(localParcel, 0);
this.le.transact(2, localParcel, null, 1);
return;
localParcel.writeInt(0);
continue;
}
}
finally
{
localParcel.recycle();
}
localParcel.writeInt(0);
}
}
public void a(Status paramStatus, boolean paramBoolean)
throws RemoteException
{
int i = 1;
Parcel localParcel = Parcel.obtain();
while (true)
{
try
{
localParcel.writeInterfaceToken("com.google.android.gms.appdatasearch.internal.ILightweightAppDataSearchCallbacks");
if (paramStatus == null)
continue;
localParcel.writeInt(1);
paramStatus.writeToParcel(localParcel, 0);
break label85;
localParcel.writeInt(i);
this.le.transact(3, localParcel, null, 1);
return;
localParcel.writeInt(0);
}
finally
{
localParcel.recycle();
}
label85:
do
{
i = 0;
break;
}
while (!paramBoolean);
}
}
public void a(hl.b paramb)
throws RemoteException
{
Parcel localParcel = Parcel.obtain();
try
{
localParcel.writeInterfaceToken("com.google.android.gms.appdatasearch.internal.ILightweightAppDataSearchCallbacks");
if (paramb != null)
{
localParcel.writeInt(1);
paramb.writeToParcel(localParcel, 0);
}
while (true)
{
this.le.transact(4, localParcel, null, 1);
return;
localParcel.writeInt(0);
}
}
finally
{
localParcel.recycle();
}
throw localObject;
}
public IBinder asBinder()
{
return this.le;
}
}
}
}
/* Location: D:\Testing\hacking\dex2jar-0.0.9.15\dex2jar-0.0.9.15\classes_dex2jar.jar
* Qualified Name: com.google.android.gms.internal.hv
* JD-Core Version: 0.6.0
*/
|
[
"hansatharukarcg3@gmail.com"
] |
hansatharukarcg3@gmail.com
|
748cf01bf417a13c59cf721800baba0677558ffb
|
805b2a791ec842e5afdd33bb47ac677b67741f78
|
/Mage.Sets/src/mage/sets/magic2015/NecrogenScudder.java
|
8547ed4700d950eb0763f1da6ed3d575a5a55048
|
[] |
no_license
|
klayhamn/mage
|
0d2d3e33f909b4052b0dfa58ce857fbe2fad680a
|
5444b2a53beca160db2dfdda0fad50e03a7f5b12
|
refs/heads/master
| 2021-01-12T19:19:48.247505
| 2015-08-04T20:25:16
| 2015-08-04T20:25:16
| 39,703,242
| 2
| 0
| null | 2015-07-25T21:17:43
| 2015-07-25T21:17:42
| null |
UTF-8
|
Java
| false
| false
| 2,198
|
java
|
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.magic2015;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public class NecrogenScudder extends mage.sets.scarsofmirrodin.NecrogenScudder {
public NecrogenScudder(UUID ownerId) {
super(ownerId);
this.cardNumber = 106;
this.expansionSetCode = "M15";
}
public NecrogenScudder(final NecrogenScudder card) {
super(card);
}
@Override
public NecrogenScudder copy() {
return new NecrogenScudder(this);
}
}
|
[
"ludwig.hirth@online.de"
] |
ludwig.hirth@online.de
|
a5601e6dcb3c1a130d36878d0edc5df7158a19c5
|
9c66f726a3f346fe383c5656046a2dbeea1caa82
|
/myrobotlab/src/org/myrobotlab/opencv/OpenCVFilterPyramidUp.java
|
d5c10170732c1fec48be5e580b08a17955363a95
|
[
"Apache-2.0"
] |
permissive
|
Navi-nk/Bernard-InMoov
|
c6c9e9ba22a13aa5cbe812b4c1bf5f9f9b03dd21
|
686fa377141589a38d4c9bed54de8ddd128e2bca
|
refs/heads/master
| 2021-01-21T10:29:28.949744
| 2017-05-23T05:39:28
| 2017-05-23T05:39:28
| 91,690,887
| 0
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,072
|
java
|
/**
*
* @author greg (at) myrobotlab.org
*
* This file is part of MyRobotLab (http://myrobotlab.org).
*
* MyRobotLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version (subject to the "Classpath" exception
* as provided in the LICENSE.txt file that accompanied this code).
*
* MyRobotLab is distributed in the hope that it will be useful or fun,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* All libraries in thirdParty bundle are subject to their own license
* requirements - please refer to http://myrobotlab.org/libraries for
* details.
*
* Enjoy !
*
* */
package org.myrobotlab.opencv;
import static org.bytedeco.javacpp.opencv_core.cvCreateImage;
import static org.bytedeco.javacpp.opencv_core.cvSize;
import static org.bytedeco.javacpp.opencv_imgproc.cvPyrUp;
import org.bytedeco.javacpp.opencv_core.IplImage;
import org.myrobotlab.logging.LoggerFactory;
import org.slf4j.Logger;
public class OpenCVFilterPyramidUp extends OpenCVFilter {
private static final long serialVersionUID = 1L;
public final static Logger log = LoggerFactory.getLogger(OpenCVFilterPyramidUp.class.getCanonicalName());
transient IplImage dst = null;
int filter = 7;
public OpenCVFilterPyramidUp() {
super();
}
public OpenCVFilterPyramidUp(String name) {
super(name);
}
@Override
public void imageChanged(IplImage image) {
// TODO Auto-generated method stub
}
@Override
public IplImage process(IplImage image, OpenCVData data) {
if (image == null) {
log.error("image is null");
}
if (dst == null) {
dst = cvCreateImage(cvSize(2 * image.width(), 2 * image.height()), 8, image.nChannels());
}
cvPyrUp(image, dst, filter);
return dst;
}
}
|
[
"naval.kumar99@gmail.com"
] |
naval.kumar99@gmail.com
|
9b1898a033c674ed4fa96a8016ba22ee80d56211
|
8f590a7019c72bef0dbd29d26fff138624016d71
|
/src/main/java/com/gb/bullyelection/NodeUpdater.java
|
5188fa0b394a7e0a5cd3812cb3db429ddc78176d
|
[
"Apache-2.0"
] |
permissive
|
gopalbala/bully-leader-election
|
06e0c3116fd870f7017dcfe3922a3cea08085804
|
a618588176b03cd0e0096b7299d4b4b4727588eb
|
refs/heads/master
| 2022-12-09T14:22:21.646334
| 2020-09-14T16:55:06
| 2020-09-14T16:55:06
| 290,279,113
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 184
|
java
|
package com.gb.bullyelection;
import java.io.IOException;
public interface NodeUpdater {
void nodeAdded(Member member) throws IOException;
void nodeRemoved(Member member);
}
|
[
"balasubramaniangopalakrishnan@gmail.com"
] |
balasubramaniangopalakrishnan@gmail.com
|
1fdc30cf14c8403e972c9ba52ed499acb177c1cd
|
eb2e3de02e7fc8846bc3c0ec70bf442a46ea0dbb
|
/testbili/app/src/main/java/bili2/bl/ksh$1.java
|
b3d9bc68d3883aa84e3db4e2e2b56320d6408b51
|
[] |
no_license
|
aheadlcx/myapp
|
54ded518fa703145bb7093f110b36e457ce77fa3
|
53b4090e961bc50877a9447e7da367527f6c1ff7
|
refs/heads/master
| 2020-03-17T18:22:37.666462
| 2018-06-12T12:19:27
| 2018-06-12T12:19:27
| 133,820,582
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,331
|
java
|
package bili2.bl;
import android.annotation.SuppressLint;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import java.util.concurrent.Callable;
/* compiled from: BL */
class ksh$1 implements Callable<Void> {
final /* synthetic */ String a;
ksh$1(String str) {
this.a = str;
}
@SuppressLint({"ApplySharedPref"})
public /* synthetic */ Object call() throws Exception {
return a();
}
@SuppressLint({"ApplySharedPref"})
public Void a() throws Exception {
SharedPreferences a = blh.a(blg.a()).a();
if (!a.getBoolean(hae.a(new byte[]{(byte) 103, (byte) 112, (byte) 107, (byte) 97, (byte) 105, (byte) 96, (byte) 90, (byte) 112, (byte) 117, (byte) 97, (byte) 100, (byte) 113, (byte) 96, (byte) 90, (byte) 99, (byte) 100, (byte) 108, (byte) 105, (byte) 90}) + this.a, false)) {
synchronized (ksh.class) {
Editor edit = a.edit();
edit.putBoolean(hae.a(new byte[]{(byte) 103, (byte) 112, (byte) 107, (byte) 97, (byte) 105, (byte) 96, (byte) 90, (byte) 112, (byte) 117, (byte) 97, (byte) 100, (byte) 113, (byte) 96, (byte) 90, (byte) 99, (byte) 100, (byte) 108, (byte) 105, (byte) 90}) + this.a, true);
edit.commit();
}
}
return null;
}
}
|
[
"ahead2008@gmail.com"
] |
ahead2008@gmail.com
|
e12d7710bb9409c8ce710d122f6c6374cc7c0d8d
|
5ecd15baa833422572480fad3946e0e16a389000
|
/framework/Synergetics-Open/subsystems/metadata/main/impl/java/com/volantis/shared/metadata/impl/value/jibx/MutableFloat.java
|
b20434aa134120ffd3c8b5de48802906bebe18d8
|
[] |
no_license
|
jabley/volmobserverce
|
4c5db36ef72c3bb7ef20fb81855e18e9b53823b9
|
6d760f27ac5917533eca6708f389ed9347c7016d
|
refs/heads/master
| 2021-01-01T05:31:21.902535
| 2009-02-04T02:29:06
| 2009-02-04T02:29:06
| 38,675,289
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,644
|
java
|
/*
This file is part of Volantis Mobility Server.
Volantis Mobility Server is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Volantis Mobility Server is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Volantis Mobility Server. If not, see <http://www.gnu.org/licenses/>.
*/
/* ----------------------------------------------------------------------------
* (c) Volantis Systems Ltd 2007.
* ----------------------------------------------------------------------------
*/
package com.volantis.shared.metadata.impl.value.jibx;
/**
* Mutable float implementation.
*/
public class MutableFloat extends MutableNumber {
private float value;
/**
* Creates a mutable float with value set to 0.0f.
*/
public MutableFloat() {
value = 0.0f;
}
/**
* Creates a mutable float value.
*
* @param value the initial value
*/
public MutableFloat(final float value) {
this.value = value;
}
/**
* Sets the new value.
*
* @param value the value
*/
public void setValue(final float value) {
this.value = value;
}
// javadoc inherited
public Number getNumber() {
return new Float(value);
}
}
|
[
"iwilloug@b642a0b7-b348-0410-9912-e4a34d632523"
] |
iwilloug@b642a0b7-b348-0410-9912-e4a34d632523
|
713be2399a94d0b9d3411774fbbb14ac02518526
|
dcb60a62bd3b081f83f04ff1529699883e961b6e
|
/CareLogic/src/com/fq/halcyon/logic/practice/UpLoadChatImageLogic.java
|
ff7d65df2f8feedeff4c7dcaa7c52fc538edf602
|
[] |
no_license
|
ThePowerOfSwift/Care
|
4915d1c77ee4e1407dfb2d6beedb67f239790876
|
7391e10be7be6c532de06b34c656c00e6d3d3b66
|
refs/heads/master
| 2020-09-15T16:15:16.633005
| 2016-06-13T05:36:45
| 2016-06-13T05:36:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,547
|
java
|
package com.fq.halcyon.logic.practice;
import com.fq.halcyon.HalcyonHttpResponseHandle;
import com.fq.http.async.ParamsWrapper.FQProcessInterface;
import com.fq.lib.HttpHelper;
import com.fq.lib.json.JSONObject;
import com.fq.lib.tools.UriConstants;
import com.google.j2objc.annotations.Weak;
public class UpLoadChatImageLogic implements FQProcessInterface{
public interface UpLoadChatImageCallBack{
public void onUpLoadChatImageSuccess(int imageId);
public void onUpLoadChatImageFailed(int errorCode,String msg);
public void onProcess(float process);
}
@Weak
public UpLoadChatImageCallBack mInterface;
public void upLoadImage(UpLoadChatImageCallBack mIn,String path){
mInterface = mIn;
HttpHelper.upLoadImage(UriConstants.Conn.URL_PUB + "/pub/upload_images.do", path, new HalcyonHttpResponseHandle() {
@Override
public void onError(int code, Throwable e) {
if (mInterface != null) {
mInterface.onUpLoadChatImageFailed(code, "上传失败" + e.toString());
}
}
@Override
public void handle(int responseCode, String msg, int type, Object results) {
if (mInterface != null) {
if(responseCode ==0 && type == 1){
JSONObject json = (JSONObject)results;
int imageId = json.optInt("image_id");
if(imageId == 0){
imageId = json.optInt("id");
}
mInterface.onUpLoadChatImageSuccess(imageId);
}
}
}
},this);
}
@Override
public void setProcess(float process) {
if (mInterface != null) {
mInterface.onProcess(process);
}
}
}
|
[
"reason@reason.local"
] |
reason@reason.local
|
bf3ae6762813dd80ac5358b7fbbfa3eccd653b76
|
9080b2a5d41860f2929c4f7b566c861d98c54eaf
|
/CitySellerWeb/CitySellerRepository/src/main/java/com/cityseller/repository/domain/CityArea.java
|
a1c3de53068edfb93c69fe594cc12edd431e9cf7
|
[] |
no_license
|
pjr2015/localbuzz
|
13383c985cddd1f4ad57ea2294795dd9346947ed
|
371ed3052241aa05d686b90f932bbdd7e22650a7
|
refs/heads/master
| 2021-01-19T13:32:06.141498
| 2015-06-18T14:22:25
| 2015-06-18T14:22:25
| 37,522,040
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,574
|
java
|
/**
*
*/
package com.cityseller.repository.domain;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
/**
* @author pavan.gupta
*
*/
@Entity
@Table(name="city_area")
public class CityArea {
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "CityArea [cityAreaId=" + cityAreaId + ", areaName=" + areaName
+ ", zipCode=" + zipCode + "]";
}
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
@Column(name = "CITY_AREA_ID", updatable = true, nullable = false, insertable = true)
private Long cityAreaId;
@Column(name = "AREA_NAME", updatable = true, insertable = true)
private String areaName;
@Column(name = "ZIPCODE", updatable = true, insertable = true)
private Long zipCode;
@ManyToOne(cascade=CascadeType.DETACH,fetch=FetchType.LAZY)
@JoinColumn(name="CITY_ID")
private City city;
@ManyToMany(mappedBy="cityAreas")
private List<Vendor> vendors = new ArrayList<Vendor>();
/**
* @return the vendors
*/
public List<Vendor> getVendors() {
return vendors;
}
/**
* @param vendors the vendors to set
*/
public void setVendors(List<Vendor> vendors) {
this.vendors = vendors;
}
/**
* @return the cityAreaId
*/
public Long getCityAreaId() {
return cityAreaId;
}
/**
* @param cityAreaId the cityAreaId to set
*/
public void setCityAreaId(Long cityAreaId) {
this.cityAreaId = cityAreaId;
}
/**
* @return the areaName
*/
public String getAreaName() {
return areaName;
}
/**
* @param areaName the areaName to set
*/
public void setAreaName(String areaName) {
this.areaName = areaName;
}
/**
* @return the zipCode
*/
public Long getZipCode() {
return zipCode;
}
/**
* @param zipCode the zipCode to set
*/
public void setZipCode(Long zipCode) {
this.zipCode = zipCode;
}
/**
* @return the city
*/
public City getCity() {
return city;
}
/**
* @param city the city to set
*/
public void setCity(City city) {
this.city = city;
}
}
|
[
"test@test.com"
] |
test@test.com
|
c185f6395a1a881198375bce5097c3e5fd654ad4
|
2221cc76af6d26b9dcc49c0722a4a577601692e3
|
/Egbert/AlgorithmTesting/src/DFST/MaximumSubtree.java
|
df55eca24169d8e22961348483153c977b6f6cf0
|
[] |
no_license
|
hanrick2000/A-Record-of-My-Problem-Solving-Journey
|
f8cca769ce08f0b1cd9ab36abcb4f7c8b91ba591
|
1b9326adcf61eacf0649bc4724b11d8259a79621
|
refs/heads/master
| 2022-02-24T03:09:54.644809
| 2019-09-24T18:32:53
| 2019-09-24T18:32:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 892
|
java
|
package DFST;
/**
* @lintcode https://www.lintcode.com/problem/maximum-subtree/description?_from=ladder&&fromId=14
* @Time N
* @Space height
*/
public class MaximumSubtree {
TreeNode maxNode;
/**
* @param root: the root of binary tree
* @return: the maximum weight node
*/
public TreeNode findSubtree(TreeNode root) {
int[] max = new int[] {Integer.MIN_VALUE};
getMaxSum(root, max);
return maxNode;
}
private int getMaxSum(TreeNode root, int[] max) {
if (root == null) {
return 0;
}
int leftSub = getMaxSum(root.left, max);
int rightSub = getMaxSum(root.right, max);
if (maxNode == null || leftSub + rightSub + root.val > max[0]) {
maxNode = root;
max[0] = leftSub + rightSub + root.val;
}
return leftSub + rightSub + root.val;
}
}
|
[
"egbert1121@gmail.com"
] |
egbert1121@gmail.com
|
dae89696ebaab2f96856c596fd0ebcec37e0a226
|
5892669af220bc3f4a0363d75e550079be6e2d1d
|
/parallelgit-commands/src/main/java/com/beijunyi/parallelgit/commands/cache/UpdateEntry.java
|
cf5479db6a28391f0b6243492800f1ac805b9f8e
|
[
"Apache-2.0"
] |
permissive
|
cybernetics/ParallelGit
|
11658ffaf64220c6fa771fe223cc779bdb6306cf
|
3c93757830e0be437f61cb10901c978377d7e9fc
|
refs/heads/master
| 2021-01-19T07:16:44.644652
| 2015-11-04T17:57:09
| 2015-11-04T17:57:09
| 45,714,900
| 1
| 0
| null | 2015-11-07T00:03:38
| 2015-11-07T00:03:38
| null |
UTF-8
|
Java
| false
| false
| 955
|
java
|
package com.beijunyi.parallelgit.commands.cache;
import java.io.IOException;
import javax.annotation.Nonnull;
import com.beijunyi.parallelgit.utils.CacheUtils;
import com.beijunyi.parallelgit.utils.io.CacheEntryUpdate;
import org.eclipse.jgit.lib.AnyObjectId;
import org.eclipse.jgit.lib.FileMode;
public class UpdateEntry extends CacheEditor {
private AnyObjectId blobId;
private FileMode mode;
public UpdateEntry(@Nonnull String path) {
super(path);
}
public void setBlobId(@Nonnull AnyObjectId blobId) {
this.blobId = blobId;
}
public void setMode(@Nonnull FileMode mode) {
this.mode = mode;
}
@Override
public void edit(@Nonnull CacheStateProvider provider) throws IOException {
CacheEntryUpdate update = new CacheEntryUpdate(path);
if(blobId != null)
update.setNewBlob(blobId);
if(mode != null)
update.setNewFileMode(mode);
CacheUtils.updateFile(update, provider.getEditor());
}
}
|
[
"beijunyi@gmail.com"
] |
beijunyi@gmail.com
|
4d7fc96dc04513f2ddcfeb2752afca171bc468d6
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2012-05-19/seasar2-2.4.46/seasar2/s2-framework/src/test/java/org/seasar/framework/aop/javassist/AbstGeneratorTest.java
|
8bfb29ac0fb9859e861cb09121689cf133e25c67
|
[
"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
| 4,276
|
java
|
/*
* Copyright 2004-2012 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.framework.aop.javassist;
import junit.framework.TestCase;
/**
* @author koichik
*/
public class AbstGeneratorTest extends TestCase {
/**
* @throws Exception
*/
public void testFromObject() throws Exception {
assertEquals("1", "var", AbstractGenerator
.fromObject(void.class, "var"));
assertEquals("2", "((java.lang.Boolean) var).booleanValue()",
AbstractGenerator.fromObject(boolean.class, "var"));
assertEquals("3", "((java.lang.Character) var).charValue()",
AbstractGenerator.fromObject(char.class, "var"));
assertEquals("4", "((java.lang.Number) var).byteValue()",
AbstractGenerator.fromObject(byte.class, "var"));
assertEquals("5", "((java.lang.Number) var).shortValue()",
AbstractGenerator.fromObject(short.class, "var"));
assertEquals("6", "((java.lang.Number) var).intValue()",
AbstractGenerator.fromObject(int.class, "var"));
assertEquals("7", "((java.lang.Number) var).longValue()",
AbstractGenerator.fromObject(long.class, "var"));
assertEquals("8", "((java.lang.Number) var).floatValue()",
AbstractGenerator.fromObject(float.class, "var"));
assertEquals("9", "((java.lang.Number) var).doubleValue()",
AbstractGenerator.fromObject(double.class, "var"));
assertEquals("10", "(int[]) var", AbstractGenerator.fromObject(
int[].class, "var"));
assertEquals("11", "var", AbstractGenerator.fromObject(Object.class,
"var"));
assertEquals("12", "(java.lang.Object[]) var", AbstractGenerator
.fromObject(Object[].class, "var"));
assertEquals("13", "(java.lang.String) var", AbstractGenerator
.fromObject(String.class, "var"));
assertEquals("14", "(java.lang.String[]) var", AbstractGenerator
.fromObject(String[].class, "var"));
}
/**
* @throws Exception
*/
public void testToObject() throws Exception {
assertEquals("1", "new java.lang.Boolean(var)", AbstractGenerator
.toObject(boolean.class, "var"));
assertEquals("1", "new java.lang.Character(var)", AbstractGenerator
.toObject(char.class, "var"));
assertEquals("1", "new java.lang.Byte(var)", AbstractGenerator
.toObject(byte.class, "var"));
assertEquals("1", "new java.lang.Short(var)", AbstractGenerator
.toObject(short.class, "var"));
assertEquals("1", "new java.lang.Integer(var)", AbstractGenerator
.toObject(int.class, "var"));
assertEquals("1", "new java.lang.Long(var)", AbstractGenerator
.toObject(long.class, "var"));
assertEquals("1", "new java.lang.Float(var)", AbstractGenerator
.toObject(float.class, "var"));
assertEquals("1", "new java.lang.Double(var)", AbstractGenerator
.toObject(double.class, "var"));
assertEquals("2", "var", AbstractGenerator.toObject(int[].class, "var"));
assertEquals("3", "var", AbstractGenerator
.toObject(Object.class, "var"));
assertEquals("4", "var", AbstractGenerator.toObject(Object[].class,
"var"));
assertEquals("5", "var", AbstractGenerator
.toObject(String.class, "var"));
assertEquals("6", "var", AbstractGenerator.toObject(String[].class,
"var"));
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
faee988331f6af91865dc4c27a6a9cfb8e41f3fd
|
381325a109e35a67425dedfc9973da4a6b83959c
|
/yunhai-sdk-core/.svn/pristine/78/785a6f236db954ae9bb1ba3c926ed03a3c5ff6cf.svn-base
|
533f3460889fccadab1d996ff9a3fcab97261d04
|
[] |
no_license
|
ShangfengDing/IaaS
|
213287571e2ba3c06814565fbb229ef9c964a91a
|
89d7120ceac53d22520e353325f193c7cdf3a6ff
|
refs/heads/master
| 2022-12-22T21:01:06.596557
| 2019-11-07T13:12:14
| 2019-11-07T13:12:14
| 220,217,355
| 0
| 1
| null | 2022-12-16T04:01:46
| 2019-11-07T11:07:33
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 232
|
package appcloud.core.sdk.reader;
import java.util.Map;
import appcloud.core.sdk.exceptions.ClientException;
public interface Reader {
public Map<String, String> read(String response, String endpoint) throws ClientException;
}
|
[
"747879583@qq.com"
] |
747879583@qq.com
|
|
9ab933f051d726553dafa0cb3c86dd0d7e52d0a7
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/trademark-20180724/src/main/java/com/aliyun/trademark20180724/models/ListNotaryInfosResponseBody.java
|
e7d9786420458a7878ef095f8d0a97e26fb8f324
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 6,991
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.trademark20180724.models;
import com.aliyun.tea.*;
public class ListNotaryInfosResponseBody extends TeaModel {
@NameInMap("CurrentPageNum")
public Integer currentPageNum;
@NameInMap("Data")
public ListNotaryInfosResponseBodyData data;
@NameInMap("ErrorCode")
public String errorCode;
@NameInMap("ErrorMsg")
public String errorMsg;
@NameInMap("NextPage")
public Boolean nextPage;
@NameInMap("PageSize")
public Integer pageSize;
@NameInMap("PrePage")
public Boolean prePage;
@NameInMap("RequestId")
public String requestId;
@NameInMap("Success")
public Boolean success;
@NameInMap("TotalItemNum")
public Integer totalItemNum;
@NameInMap("TotalPageNum")
public Integer totalPageNum;
public static ListNotaryInfosResponseBody build(java.util.Map<String, ?> map) throws Exception {
ListNotaryInfosResponseBody self = new ListNotaryInfosResponseBody();
return TeaModel.build(map, self);
}
public ListNotaryInfosResponseBody setCurrentPageNum(Integer currentPageNum) {
this.currentPageNum = currentPageNum;
return this;
}
public Integer getCurrentPageNum() {
return this.currentPageNum;
}
public ListNotaryInfosResponseBody setData(ListNotaryInfosResponseBodyData data) {
this.data = data;
return this;
}
public ListNotaryInfosResponseBodyData getData() {
return this.data;
}
public ListNotaryInfosResponseBody setErrorCode(String errorCode) {
this.errorCode = errorCode;
return this;
}
public String getErrorCode() {
return this.errorCode;
}
public ListNotaryInfosResponseBody setErrorMsg(String errorMsg) {
this.errorMsg = errorMsg;
return this;
}
public String getErrorMsg() {
return this.errorMsg;
}
public ListNotaryInfosResponseBody setNextPage(Boolean nextPage) {
this.nextPage = nextPage;
return this;
}
public Boolean getNextPage() {
return this.nextPage;
}
public ListNotaryInfosResponseBody setPageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
public Integer getPageSize() {
return this.pageSize;
}
public ListNotaryInfosResponseBody setPrePage(Boolean prePage) {
this.prePage = prePage;
return this;
}
public Boolean getPrePage() {
return this.prePage;
}
public ListNotaryInfosResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public ListNotaryInfosResponseBody setSuccess(Boolean success) {
this.success = success;
return this;
}
public Boolean getSuccess() {
return this.success;
}
public ListNotaryInfosResponseBody setTotalItemNum(Integer totalItemNum) {
this.totalItemNum = totalItemNum;
return this;
}
public Integer getTotalItemNum() {
return this.totalItemNum;
}
public ListNotaryInfosResponseBody setTotalPageNum(Integer totalPageNum) {
this.totalPageNum = totalPageNum;
return this;
}
public Integer getTotalPageNum() {
return this.totalPageNum;
}
public static class ListNotaryInfosResponseBodyDataNotaryInfo extends TeaModel {
@NameInMap("BizOrderNo")
public String bizOrderNo;
@NameInMap("GmtModified")
public Long gmtModified;
@NameInMap("NotaryFailedReason")
public String notaryFailedReason;
@NameInMap("NotaryStatus")
public Integer notaryStatus;
@NameInMap("TmClassification")
public String tmClassification;
@NameInMap("TmRegisterNo")
public String tmRegisterNo;
@NameInMap("Token")
public String token;
public static ListNotaryInfosResponseBodyDataNotaryInfo build(java.util.Map<String, ?> map) throws Exception {
ListNotaryInfosResponseBodyDataNotaryInfo self = new ListNotaryInfosResponseBodyDataNotaryInfo();
return TeaModel.build(map, self);
}
public ListNotaryInfosResponseBodyDataNotaryInfo setBizOrderNo(String bizOrderNo) {
this.bizOrderNo = bizOrderNo;
return this;
}
public String getBizOrderNo() {
return this.bizOrderNo;
}
public ListNotaryInfosResponseBodyDataNotaryInfo setGmtModified(Long gmtModified) {
this.gmtModified = gmtModified;
return this;
}
public Long getGmtModified() {
return this.gmtModified;
}
public ListNotaryInfosResponseBodyDataNotaryInfo setNotaryFailedReason(String notaryFailedReason) {
this.notaryFailedReason = notaryFailedReason;
return this;
}
public String getNotaryFailedReason() {
return this.notaryFailedReason;
}
public ListNotaryInfosResponseBodyDataNotaryInfo setNotaryStatus(Integer notaryStatus) {
this.notaryStatus = notaryStatus;
return this;
}
public Integer getNotaryStatus() {
return this.notaryStatus;
}
public ListNotaryInfosResponseBodyDataNotaryInfo setTmClassification(String tmClassification) {
this.tmClassification = tmClassification;
return this;
}
public String getTmClassification() {
return this.tmClassification;
}
public ListNotaryInfosResponseBodyDataNotaryInfo setTmRegisterNo(String tmRegisterNo) {
this.tmRegisterNo = tmRegisterNo;
return this;
}
public String getTmRegisterNo() {
return this.tmRegisterNo;
}
public ListNotaryInfosResponseBodyDataNotaryInfo setToken(String token) {
this.token = token;
return this;
}
public String getToken() {
return this.token;
}
}
public static class ListNotaryInfosResponseBodyData extends TeaModel {
@NameInMap("NotaryInfo")
public java.util.List<ListNotaryInfosResponseBodyDataNotaryInfo> notaryInfo;
public static ListNotaryInfosResponseBodyData build(java.util.Map<String, ?> map) throws Exception {
ListNotaryInfosResponseBodyData self = new ListNotaryInfosResponseBodyData();
return TeaModel.build(map, self);
}
public ListNotaryInfosResponseBodyData setNotaryInfo(java.util.List<ListNotaryInfosResponseBodyDataNotaryInfo> notaryInfo) {
this.notaryInfo = notaryInfo;
return this;
}
public java.util.List<ListNotaryInfosResponseBodyDataNotaryInfo> getNotaryInfo() {
return this.notaryInfo;
}
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
6495ffe71a8eb574e93daf4eaa0072a13904c71a
|
84e5be2bbacfb7de0364a9badd7d0c9a69d381c1
|
/junior_001/src/main/java/ru/job4j/list/hascycle/Node.java
|
29812e1b678e6b9aaf8db1ccf9e05cb010d5fb9b
|
[
"Apache-2.0"
] |
permissive
|
RomanMorozov88/job4j
|
48b0c068c4ff7c8a012f42c1d9cc1e21e7e470b0
|
915584a57a0a0cfd6315589ab5739747e3305cab
|
refs/heads/master
| 2022-12-27T00:06:12.972273
| 2020-05-25T09:04:36
| 2020-07-09T12:23:21
| 137,212,032
| 0
| 0
|
Apache-2.0
| 2022-12-16T15:33:52
| 2018-06-13T12:24:04
|
Java
|
UTF-8
|
Java
| false
| false
| 164
|
java
|
package ru.job4j.list.hascycle;
public class Node<T> {
public T value;
public Node<T> next;
public Node(T value) {
this.value = value;
}
}
|
[
"MorozovRoman.88@mail.ru"
] |
MorozovRoman.88@mail.ru
|
fd4038543f893e629584e47f7257fd3204b63e63
|
cf52b3064d536af626339ddd30b28c0b8e15aaee
|
/geodriver/src/main/java/org/l2junity/geodriver/blocks/MultilayerBlock.java
|
e46710bbda35e4f73b8bc22610ce1e04dfd7527e
|
[] |
no_license
|
LegacyofAden/emu-ungp
|
7aaa7d9fd60698cb784d8c2c1eaaa20ef0a8d59b
|
b76dc91157e43d67f886b6926afd11b110ed5dce
|
refs/heads/master
| 2021-01-01T18:21:03.529671
| 2017-04-08T23:08:37
| 2017-04-08T23:08:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,787
|
java
|
/*
* Copyright (C) 2004-2015 L2J Unity
*
* This file is part of L2J Unity.
*
* L2J Unity is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Unity is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.l2junity.geodriver.blocks;
import org.l2junity.geodriver.IBlock;
import java.nio.ByteBuffer;
/**
* @author FBIagent
*/
public class MultilayerBlock implements IBlock {
private final byte[] _data;
/**
* Initializes a new instance of this block reading the specified buffer.
*
* @param bb the buffer
*/
public MultilayerBlock(ByteBuffer bb) {
int start = bb.position();
for (int blockCellOffset = 0; blockCellOffset < IBlock.BLOCK_CELLS; blockCellOffset++) {
byte nLayers = bb.get();
if ((nLayers <= 0) || (nLayers > 125)) {
throw new RuntimeException("L2JGeoDriver: Geo file corrupted! Invalid layers count!");
}
bb.position(bb.position() + (nLayers * 2));
}
_data = new byte[bb.position() - start];
bb.position(start);
bb.get(_data);
}
private short _getNearestLayer(int geoX, int geoY, int worldZ) {
int startOffset = _getCellDataOffset(geoX, geoY);
byte nLayers = _data[startOffset];
int endOffset = startOffset + 1 + (nLayers * 2);
// 1 layer at least was required on loading so this is set at least once on the loop below
int nearestDZ = 0;
short nearestData = 0;
for (int offset = startOffset + 1; offset < endOffset; offset += 2) {
short layerData = _extractLayerData(offset);
int layerZ = _extractLayerHeight(layerData);
if (layerZ == worldZ) {
// exact z
return layerData;
}
int layerDZ = Math.abs(layerZ - worldZ);
if ((offset == (startOffset + 1)) || (layerDZ < nearestDZ)) {
nearestDZ = layerDZ;
nearestData = layerData;
}
}
return nearestData;
}
private int _getCellDataOffset(int geoX, int geoY) {
int cellLocalOffset = ((geoX % IBlock.BLOCK_CELLS_X) * IBlock.BLOCK_CELLS_Y) + (geoY % IBlock.BLOCK_CELLS_Y);
int cellDataOffset = 0;
// move index to cell, we need to parse on each request, OR we parse on creation and save indexes
for (int i = 0; i < cellLocalOffset; i++) {
cellDataOffset += 1 + (_data[cellDataOffset] * 2);
}
// now the index points to the cell we need
return cellDataOffset;
}
private short _extractLayerData(int dataOffset) {
return (short) ((_data[dataOffset] & 0xFF) | (_data[dataOffset + 1] << 8));
}
private int _getNearestNSWE(int geoX, int geoY, int worldZ) {
return _extractLayerNswe(_getNearestLayer(geoX, geoY, worldZ));
}
private int _extractLayerNswe(short layer) {
return (byte) (layer & 0x000F);
}
private int _extractLayerHeight(short layer) {
layer = (short) (layer & 0x0fff0);
return layer >> 1;
}
@Override
public boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe) {
return (_getNearestNSWE(geoX, geoY, worldZ) & nswe) == nswe;
}
@Override
public int getNearestZ(int geoX, int geoY, int worldZ) {
return _extractLayerHeight(_getNearestLayer(geoX, geoY, worldZ));
}
@Override
public int getNextLowerZ(int geoX, int geoY, int worldZ) {
int startOffset = _getCellDataOffset(geoX, geoY);
byte nLayers = _data[startOffset];
int endOffset = startOffset + 1 + (nLayers * 2);
int lowerZ = Integer.MIN_VALUE;
for (int offset = startOffset + 1; offset < endOffset; offset += 2) {
short layerData = _extractLayerData(offset);
int layerZ = _extractLayerHeight(layerData);
if (layerZ == worldZ) {
// exact z
return layerZ;
}
if ((layerZ < worldZ) && (layerZ > lowerZ)) {
lowerZ = layerZ;
}
}
return lowerZ == Integer.MIN_VALUE ? worldZ : lowerZ;
}
@Override
public int getNextHigherZ(int geoX, int geoY, int worldZ) {
int startOffset = _getCellDataOffset(geoX, geoY);
byte nLayers = _data[startOffset];
int endOffset = startOffset + 1 + (nLayers * 2);
int higherZ = Integer.MAX_VALUE;
for (int offset = startOffset + 1; offset < endOffset; offset += 2) {
short layerData = _extractLayerData(offset);
int layerZ = _extractLayerHeight(layerData);
if (layerZ == worldZ) {
// exact z
return layerZ;
}
if ((layerZ > worldZ) && (layerZ < higherZ)) {
higherZ = layerZ;
}
}
return higherZ == Integer.MAX_VALUE ? worldZ : higherZ;
}
}
|
[
"RaaaGEE@users.noreply.github.com"
] |
RaaaGEE@users.noreply.github.com
|
230c66b37021a883994c9ec8b8fe615a1a1b9eff
|
fc25a0c09fcb2d3f7e140dd95189af1933fa2ec9
|
/src/esutdal/javanotes/cache/map/LIFOMap.java
|
caa852e8da48611c417fa2b96b59083122f3aa9c
|
[] |
no_license
|
javanotes/elastic-cache
|
2e70b5e4555390ee948e84631d60b47d8e22c162
|
bb621f301e173b7bc54b53a9e328069622d9fd64
|
refs/heads/master
| 2021-01-25T10:39:17.550553
| 2015-08-04T08:12:19
| 2015-08-04T08:12:19
| 40,169,205
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,364
|
java
|
package esutdal.javanotes.cache.map;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import esutdal.javanotes.cache.VirtualMemCache;
import esutdal.javanotes.cache.core.CacheItem;
public class LIFOMap<K,V> extends LinkedHashMap<K, CacheItem<V>> {
private final VirtualMemCache<K,V>.MapEntryModificationCallback callback;
private final int maxOnHeap;
private final long ttlSecs;
public LIFOMap(int maxOnHeap, long ttlSecs, VirtualMemCache<K,V>.MapEntryModificationCallback callback)
{
super(16, 0.75f);
this.maxOnHeap = maxOnHeap;
this.ttlSecs = ttlSecs;
this.callback = callback;
}
private void markForRemoval()
{
if (size() == maxOnHeap) {
Iterator<java.util.Map.Entry<K, CacheItem<V>>> iter;
java.util.Map.Entry<K, CacheItem<V>> lastEntry = null;
for (iter = entrySet().iterator(); iter.hasNext();) {
lastEntry = iter.next();
}
if (lastEntry != null) {
callback.removeItem(lastEntry.getKey(), ttlSecs);
}
}
}
/**
*
*/
private static final long serialVersionUID = -8373893384940183648L;
@Override
public CacheItem<V> put(K key, CacheItem<V> value) {
markForRemoval();
CacheItem<V> item = super.put(key, value);
return item;
}
@Override
public void putAll(Map<? extends K, ? extends CacheItem<V>> m) {
markForRemoval();
super.putAll(m);
}
}
|
[
"sutanu.dalui@ericsson.com"
] |
sutanu.dalui@ericsson.com
|
d1d7bfadf73b43e8974b82dc19fa59afbf8cc599
|
5728f50a394b62394587b0b255a57dcf4d13d20d
|
/src/java/org/jsimpledb/change/MapFieldChange.java
|
71201bc39fe999ffe1f862f0a1b2e3710e1eb276
|
[
"Apache-2.0"
] |
permissive
|
mayoricodevault/jsimpledb
|
3d905744c7a5e55c1fe530dd6d91c99c4c730f1e
|
9ee8301a6cda92a2d85ec1b0d94cfde6a78e5e38
|
refs/heads/master
| 2021-06-13T06:30:51.209136
| 2015-05-08T15:56:55
| 2015-05-08T15:56:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 841
|
java
|
/*
* Copyright (C) 2014 Archie L. Cobbs. All rights reserved.
*
* $Id$
*/
package org.jsimpledb.change;
/**
* Notification object that gets passed to {@link org.jsimpledb.annotation.OnChange @OnChange}-annotated methods
* when a map field changes.
*
* @param <T> the type of the object containing the changed field
*/
public abstract class MapFieldChange<T> extends FieldChange<T> {
/**
* Constructor.
*
* @param jobj Java object containing the map field that changed
* @param storageId the storage ID of the affected field
* @param fieldName the name of the field that changed
* @throws IllegalArgumentException if {@code jobj} or {@code fieldName} is null
*/
protected MapFieldChange(T jobj, int storageId, String fieldName) {
super(jobj, storageId, fieldName);
}
}
|
[
"archie.cobbs@3d3da37c-52f5-b908-f4a3-ab77ce6ea90f"
] |
archie.cobbs@3d3da37c-52f5-b908-f4a3-ab77ce6ea90f
|
a9bef8e7a73c3c3e90467738057eb6ebf1ff9280
|
96670d2b28a3fb75d2f8258f31fc23d370af8a03
|
/reverse_engineered/sources/com/google/android/gms/common/util/zza.java
|
8e6f5f37a9929da6373a53fe01d23724e2ba9224
|
[] |
no_license
|
P79N6A/speedx
|
81a25b63e4f98948e7de2e4254390cab5612dcbd
|
800b6158c7494b03f5c477a8cf2234139889578b
|
refs/heads/master
| 2020-05-30T18:43:52.613448
| 2019-06-02T07:57:10
| 2019-06-02T08:15:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,431
|
java
|
package com.google.android.gms.common.util;
import android.support.v4.util.ArrayMap;
import java.util.AbstractSet;
import java.util.Collection;
import java.util.Iterator;
public class zza<E> extends AbstractSet<E> {
private final ArrayMap<E, E> AJ;
public zza() {
this.AJ = new ArrayMap();
}
public zza(int i) {
this.AJ = new ArrayMap(i);
}
public zza(Collection<E> collection) {
this(collection.size());
addAll(collection);
}
public boolean add(E e) {
if (this.AJ.containsKey(e)) {
return false;
}
this.AJ.put(e, e);
return true;
}
public boolean addAll(Collection<? extends E> collection) {
return collection instanceof zza ? zza((zza) collection) : super.addAll(collection);
}
public void clear() {
this.AJ.clear();
}
public boolean contains(Object obj) {
return this.AJ.containsKey(obj);
}
public Iterator<E> iterator() {
return this.AJ.keySet().iterator();
}
public boolean remove(Object obj) {
if (!this.AJ.containsKey(obj)) {
return false;
}
this.AJ.remove(obj);
return true;
}
public int size() {
return this.AJ.size();
}
public boolean zza(zza<? extends E> zza) {
int size = size();
this.AJ.putAll(zza.AJ);
return size() > size;
}
}
|
[
"Gith1974"
] |
Gith1974
|
f55168b6b2c5163800a5d5f64c9c05fab0ea0403
|
7cf0f3983be3f98300128ee9aa927d4ef530eca6
|
/src/main/java/br/com/swconsultoria/cte/schema_400/retInutCTe/SignatureType.java
|
8d42741c717e4f1e8ebd545e6a9ba567010504bb
|
[
"MIT"
] |
permissive
|
Samuel-Oliveira/Java_CTe
|
9394ed7692c9f504aa891265831da29f2e643735
|
51e95b15a94d0796457f1a0620f37b167096bb76
|
refs/heads/master
| 2023-09-04T12:35:59.598280
| 2023-08-29T20:28:00
| 2023-08-29T20:28:00
| 82,298,784
| 64
| 42
|
MIT
| 2023-08-29T20:24:14
| 2017-02-17T13:13:34
|
Java
|
UTF-8
|
Java
| false
| false
| 4,112
|
java
|
package br.com.swconsultoria.cte.schema_400.retInutCTe;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Classe Java de SignatureType complex type.
*
* <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe.
*
* <pre>
* <complexType name="SignatureType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="SignedInfo" type="{http://www.w3.org/2000/09/xmldsig#}SignedInfoType"/>
* <element name="SignatureValue" type="{http://www.w3.org/2000/09/xmldsig#}SignatureValueType"/>
* <element name="KeyInfo" type="{http://www.w3.org/2000/09/xmldsig#}KeyInfoType"/>
* </sequence>
* <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SignatureType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = {
"signedInfo",
"signatureValue",
"keyInfo"
})
public class SignatureType {
@XmlElement(name = "SignedInfo", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true)
protected SignedInfoType signedInfo;
@XmlElement(name = "SignatureValue", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true)
protected SignatureValueType signatureValue;
@XmlElement(name = "KeyInfo", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true)
protected KeyInfoType keyInfo;
@XmlAttribute(name = "Id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
/**
* Obtém o valor da propriedade signedInfo.
*
* @return
* possible object is
* {@link SignedInfoType }
*
*/
public SignedInfoType getSignedInfo() {
return signedInfo;
}
/**
* Define o valor da propriedade signedInfo.
*
* @param value
* allowed object is
* {@link SignedInfoType }
*
*/
public void setSignedInfo(SignedInfoType value) {
this.signedInfo = value;
}
/**
* Obtém o valor da propriedade signatureValue.
*
* @return
* possible object is
* {@link SignatureValueType }
*
*/
public SignatureValueType getSignatureValue() {
return signatureValue;
}
/**
* Define o valor da propriedade signatureValue.
*
* @param value
* allowed object is
* {@link SignatureValueType }
*
*/
public void setSignatureValue(SignatureValueType value) {
this.signatureValue = value;
}
/**
* Obtém o valor da propriedade keyInfo.
*
* @return
* possible object is
* {@link KeyInfoType }
*
*/
public KeyInfoType getKeyInfo() {
return keyInfo;
}
/**
* Define o valor da propriedade keyInfo.
*
* @param value
* allowed object is
* {@link KeyInfoType }
*
*/
public void setKeyInfo(KeyInfoType value) {
this.keyInfo = value;
}
/**
* Obtém o valor da propriedade id.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Define o valor da propriedade id.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
}
|
[
"samuk.exe@hotmail.com"
] |
samuk.exe@hotmail.com
|
104ece00eb7456f9e9dea37c8d2bb57226ef4c91
|
11f60262a3cb72653d20e07e18d2b03d65fc4670
|
/dlt-server/src/main/java/com/travel/hotel/dlt/response/dto/ChangeChannelOrderCodeRequestDTO.java
|
1b7644b3592ea0e9cc9c2849b555d091e529aedd
|
[
"Apache-2.0"
] |
permissive
|
GSIL-Monitor/hotel-1
|
59812e7c3983a9b6db31f7818f93d7b3a6ac683c
|
4d170c01a86a23ebf3378d906cac4641ba1aefa9
|
refs/heads/master
| 2020-04-12T18:29:14.914311
| 2018-12-21T07:03:37
| 2018-12-21T07:03:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 595
|
java
|
package com.travel.hotel.dlt.response.dto;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @author : zhanwang
* @date : 2018/5/22
*/
@Data
public class ChangeChannelOrderCodeRequestDTO extends BaseDTO implements Serializable {
private static final long serialVersionUID = -5549356102446168478L;
/**
* 订单ID
*/
@NotNull
private Integer orderId;
/**
* 客户订单号
*/
private String customerOrderCode;
/**
* 渠道订单状态
*/
private String channelOrderStatus;
}
|
[
"961346704@qq.com"
] |
961346704@qq.com
|
b0380589cd0c33614a490213968e33a69db61f9f
|
ac9661913dfd2c646d3ff5866267b33e2ec58e03
|
/beangle-base-expand/src/main/java/org/beangle/website/expand/utils/DictDataUtils.java
|
c4f14d573b314b2717f21b98131336805d44ff41
|
[] |
no_license
|
ERIC0402/beangle-expand
|
dae385cfe48b6c54dd062f755bfa275a6e98608c
|
a281dc1303e3fa5d971319d636be5fb563392166
|
refs/heads/master
| 2021-06-16T02:55:09.250724
| 2017-05-11T03:48:18
| 2017-05-11T03:48:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 219
|
java
|
package org.beangle.website.expand.utils;
public class DictDataUtils {
public static final Long TYPE_RCAP_1 = Long.valueOf(4720L);// 会议
public static final Long TYPE_RCAP_2 = Long.valueOf(4721L);// 周表
}
|
[
"805494859@qq.com"
] |
805494859@qq.com
|
d45c0157aec72f1649f4ef945ef4fa9d642a95fa
|
f15889af407de46a94fd05f6226c66182c6085d0
|
/kgauge/trunk/src/test/java/com/oreon/kgauge/service/ExamCreatorDaoTest.java
|
55641e07ee07e4483eb97cc8e03ee4ea89094ca0
|
[] |
no_license
|
oreon/sfcode-full
|
231149f07c5b0b9b77982d26096fc88116759e5b
|
bea6dba23b7824de871d2b45d2a51036b88d4720
|
refs/heads/master
| 2021-01-10T06:03:27.674236
| 2015-04-27T10:23:10
| 2015-04-27T10:23:10
| 55,370,912
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,602
|
java
|
package com.oreon.kgauge.service;
import com.oreon.kgauge.domain.ExamCreator;
import org.springframework.test.jpa.AbstractJpaTests;
import java.util.List;
import org.witchcraft.model.support.testing.TestDataFactory;
import org.witchcraft.model.support.springbeanhelpers.BeanHelper;
import java.text.SimpleDateFormat;
import javax.persistence.PersistenceException;
import org.hibernate.PropertyValueException;
import java.util.Date;
public class ExamCreatorDaoTest extends AbstractJpaTests {
protected ExamCreator examCreatorInstance = new ExamCreator();
protected ExamCreatorService examCreatorService;
protected boolean bTest = true;
private static SimpleDateFormat dateFormat = new SimpleDateFormat(
"yyyy.MM.dd HH:mm:ss z");
public void setExamCreatorService(ExamCreatorService examCreatorService) {
this.examCreatorService = examCreatorService;
}
protected TestDataFactory examCreatorTestDataFactory = (TestDataFactory) BeanHelper
.getBean("examCreatorTestDataFactory");
@Override
protected String[] getConfigLocations() {
return new String[]{"classpath:/applicationContext.xml",
"classpath:/testDataFactories.xml"};
}
@Override
protected void runTest() throws Throwable {
if (!bTest)
return;
super.runTest();
}
/**
* Do the setup before the test in this method
**/
protected void onSetUpInTransaction() throws Exception {
try {
examCreatorInstance.setFirstName("Malissa");
examCreatorInstance.setLastName("Wilson");
examCreatorInstance.setDateOfBirth(dateFormat
.parse("2009.01.05 12:26:18 EST"));
examCreatorInstance.getUser().setUsername("Malissa74316");
examCreatorInstance.getUser().setPassword("epsilon");
examCreatorInstance.getUser().setEnabled(false);
examCreatorInstance.getContactDetails().setStreetAddress("gamma");
examCreatorInstance.getContactDetails().setCity("beta");
examCreatorInstance.getContactDetails().setState("theta");
examCreatorInstance.getContactDetails().setCountry("beta");
examCreatorInstance.getContactDetails().setZip("gamma");
examCreatorInstance.getContactDetails().setPhone("zeta");
examCreatorInstance.getContactDetails().setEmail("Lavendar12456");
examCreatorService.save(examCreatorInstance);
} catch (PersistenceException pe) {
//if this instance can't be created due to back references e.g an orderItem needs an Order -
// - we will simply skip generated tests.
if (pe.getCause() instanceof PropertyValueException
&& pe.getMessage().contains("Backref")) {
bTest = false;
}
} catch (Exception e) {
fail(e.getMessage());
}
}
//test saving a new record and updating an existing record;
public void testSave() {
try {
ExamCreator examCreator = new ExamCreator();
try {
examCreator.setFirstName("zeta");
examCreator.setLastName("Eric");
examCreator.setDateOfBirth(dateFormat
.parse("2008.12.05 14:52:58 EST"));
examCreator.getUser().setUsername("Mark12391");
examCreator.getUser().setPassword("Mark");
examCreator.getUser().setEnabled(true);
examCreator.getContactDetails().setStreetAddress("Wilson");
examCreator.getContactDetails().setCity("delta");
examCreator.getContactDetails().setState("zeta");
examCreator.getContactDetails().setCountry("pi");
examCreator.getContactDetails().setZip("gamma");
examCreator.getContactDetails().setPhone("delta");
examCreator.getContactDetails().setEmail("pi43065");
} catch (Exception ex) {
ex.printStackTrace();
}
examCreatorService.save(examCreator);
assertNotNull(examCreator.getId());
} catch (Exception e) {
fail(e.getMessage());
}
}
public void testEdit() {
try {
//test saving a new record and updating an existing record;
ExamCreator examCreator = (ExamCreator) examCreatorTestDataFactory
.loadOneRecord();
examCreator.setFirstName("Lavendar");
examCreator.setLastName("gamma");
examCreator.setDateOfBirth(dateFormat
.parse("2008.12.03 06:04:36 EST"));
examCreator.getUser().setUsername("Mark37792");
examCreator.getUser().setPassword("Eric");
examCreator.getUser().setEnabled(false);
examCreator.getContactDetails().setStreetAddress("theta");
examCreator.getContactDetails().setCity("Mark");
examCreator.getContactDetails().setState("Wilson");
examCreator.getContactDetails().setCountry("Lavendar");
examCreator.getContactDetails().setZip("epsilon");
examCreator.getContactDetails().setPhone("alpha");
examCreator.getContactDetails().setEmail("theta31447");
examCreatorService.save(examCreator);
} catch (Exception e) {
fail(e.getMessage());
}
}
public void testCount() {
assertTrue(examCreatorService.getCount() > 0);
}
//count the number of records - add one delete it - check count is same after delete
/*
public void testDelete() {
try{
long count,newCount,diff=0;
count=examCreatorService.getCount();
ExamCreator examCreator = (ExamCreator)examCreatorTestDataFactory.loadOneRecord();
examCreatorService.delete(examCreator);
newCount=examCreatorService.getCount();
diff=count - newCount;
assertEquals(diff, 1);
}catch(Exception e){
fail(e.getMessage());
}
}*/
public void testLoad() {
try {
ExamCreator examCreator = examCreatorService
.load(examCreatorInstance.getId());
assertNotNull(examCreator.getId());
} catch (Exception e) {
fail(e.getMessage());
}
}
public void testFindByUsername() {
if (!bTest)
return;
assertNotNull("Couldn't find a ExamCreator with username ",
examCreatorService.findByUsername(examCreatorInstance.getUser()
.getUsername()));
//assertNull("Found a ExamCreator with username YYY", examCreatorService.findByUsername("YYY"));
}
public void testFindByEmail() {
if (!bTest)
return;
assertNotNull("Couldn't find a ExamCreator with email ",
examCreatorService.findByEmail(examCreatorInstance
.getContactDetails().getEmail()));
//assertNull("Found a ExamCreator with email YYY", examCreatorService.findByEmail("YYY"));
}
public void testSearchByExample() {
try {
List<ExamCreator> examCreators = examCreatorService
.searchByExample(examCreatorInstance);
assertTrue(!examCreators.isEmpty());
} catch (Exception e) {
fail(e.getMessage());
}
}
/////////////////// Queries //////////////////////////////////
}
|
[
"singhj@38423737-2f20-0410-893e-9c0ab9ae497d"
] |
singhj@38423737-2f20-0410-893e-9c0ab9ae497d
|
03803cd5a0fff4cc8215cd5586afcdf20338af0c
|
a7a9be8275300e407ca114bbb5a27b39c945f91d
|
/project/src/main/java/com/lagou/rabbit/demo/service/OrderService.java
|
e462391a6d6e599d809c903b60eb36816a417842
|
[] |
no_license
|
langkemaoxin/Rabbitmq-Learning
|
76715fb638dd7d4981a9f186a45db7f97926dbf7
|
ccef2bf9dd65e5f36218543f6dcf8bfdbac503c1
|
refs/heads/main
| 2023-07-17T16:59:27.905793
| 2021-08-20T23:11:10
| 2021-08-20T23:11:10
| 387,827,299
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 360
|
java
|
package com.lagou.rabbit.demo.service;
import com.lagou.rabbit.demo.po.Order;
import java.io.UnsupportedEncodingException;
import java.util.List;
public interface OrderService {
boolean saveOrder(Order order) throws UnsupportedEncodingException;
boolean payOrder(Order order);
boolean cancelOrder(Order order);
List<Order> listOrder();
}
|
[
"2363613998@qq.com"
] |
2363613998@qq.com
|
7459a9c44ef8b5bbab5d41d1a4b149f1a0605d9f
|
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
|
/ast_results/liato_android-bankdroid/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java
|
e9f099495ee51c4a31e5dfb9ed87eb15c993d55b
|
[] |
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
| 5,764
|
java
|
// isComment
package com.liato.bankdroid.banking.banks;
import com.liato.bankdroid.Helpers;
import com.liato.bankdroid.banking.Account;
import com.liato.bankdroid.banking.Bank;
import com.liato.bankdroid.banking.Transaction;
import com.liato.bankdroid.banking.exceptions.BankChoiceException;
import com.liato.bankdroid.banking.exceptions.BankException;
import com.liato.bankdroid.banking.exceptions.LoginException;
import com.liato.bankdroid.legacy.R;
import com.liato.bankdroid.provider.IBankTypes;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import android.content.Context;
import android.text.Html;
import android.text.InputType;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import eu.nullbyte.android.urllib.CertificateReader;
import eu.nullbyte.android.urllib.Urllib;
public class isClassOrIsInterface extends Bank {
private static final String isVariable = "isStringConstant";
private static final String isVariable = "isStringConstant";
private static final int isVariable = isNameExpr.isFieldAccessExpr;
private static final int isVariable = isNameExpr.isFieldAccessExpr;
private static final String isVariable = "isStringConstant";
private Pattern isVariable = isNameExpr.isMethod("isStringConstant", isNameExpr.isFieldAccessExpr);
private Pattern isVariable = isNameExpr.isMethod("isStringConstant", isNameExpr.isFieldAccessExpr);
private String isVariable = null;
public isConstructor(Context isParameter) {
super(isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr);
super.isFieldAccessExpr = isNameExpr;
super.isFieldAccessExpr = isNameExpr;
super.isFieldAccessExpr = isNameExpr;
}
@Override
public int isMethod() {
return isNameExpr;
}
@Override
public String isMethod() {
return isNameExpr;
}
public isConstructor(String isParameter, String isParameter, Context isParameter) throws BankException, LoginException, BankChoiceException, IOException {
this(isNameExpr);
this.isMethod(isNameExpr, isNameExpr);
}
@Override
protected LoginPackage isMethod() throws BankException, IOException {
isNameExpr = new Urllib(isNameExpr, isNameExpr.isMethod(isNameExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr));
isNameExpr = isNameExpr.isMethod("isStringConstant");
List<NameValuePair> isVariable = new ArrayList<NameValuePair>();
isNameExpr.isMethod(new BasicNameValuePair("isStringConstant", "isStringConstant"));
isNameExpr.isMethod(new BasicNameValuePair("isStringConstant", "isStringConstant"));
isNameExpr.isMethod(new BasicNameValuePair("isStringConstant", isMethod()));
isNameExpr.isMethod(new BasicNameValuePair("isStringConstant", isMethod()));
return new LoginPackage(isNameExpr, isNameExpr, null, "isStringConstant");
}
@Override
public Urllib isMethod() throws LoginException, BankException, IOException {
LoginPackage isVariable = isMethod();
isNameExpr = isNameExpr.isMethod(isNameExpr.isMethod(), isNameExpr.isMethod());
if (isNameExpr.isMethod("isStringConstant")) {
throw new LoginException(isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr).isMethod());
}
return isNameExpr;
}
@Override
public void isMethod() throws BankException, LoginException, BankChoiceException, IOException {
super.isMethod();
if (isMethod().isMethod() || isMethod().isMethod()) {
throw new LoginException(isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr).isMethod());
}
isNameExpr = isMethod();
isNameExpr = isNameExpr.isMethod("isStringConstant");
Matcher isVariable = isNameExpr.isMethod(isNameExpr);
while (isNameExpr.isMethod()) {
/*isComment*/
isNameExpr.isMethod(new Account(isNameExpr.isMethod(isNameExpr.isMethod(isIntegerConstant)).isMethod().isMethod(), isNameExpr.isMethod(isNameExpr.isMethod(isIntegerConstant)), isNameExpr.isMethod(isIntegerConstant).isMethod()));
isNameExpr = isNameExpr.isMethod(isNameExpr.isMethod(isNameExpr.isMethod(isIntegerConstant)));
}
if (isNameExpr.isMethod()) {
throw new BankException(isNameExpr.isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr).isMethod());
}
super.isMethod();
}
@Override
public void isMethod(Account isParameter, Urllib isParameter) throws LoginException, BankException, IOException {
super.isMethod(isNameExpr, isNameExpr);
isNameExpr = isNameExpr.isMethod("isStringConstant" + isNameExpr.isMethod());
Matcher isVariable = isNameExpr.isMethod(isNameExpr);
ArrayList<Transaction> isVariable = new ArrayList<Transaction>();
while (isNameExpr.isMethod()) {
/*isComment*/
String isVariable = isNameExpr.isMethod(isNameExpr.isMethod(isIntegerConstant)).isMethod().isMethod();
isNameExpr = "isStringConstant" + isNameExpr.isMethod(isIntegerConstant) + isNameExpr.isMethod(isIntegerConstant) + "isStringConstant" + isNameExpr.isMethod(isIntegerConstant) + isNameExpr.isMethod(isIntegerConstant) + "isStringConstant" + isNameExpr.isMethod(isIntegerConstant) + isNameExpr.isMethod(isIntegerConstant);
isNameExpr.isMethod(new Transaction(isNameExpr, isNameExpr.isMethod(isNameExpr.isMethod(isIntegerConstant)).isMethod().isMethod(), isNameExpr.isMethod(isNameExpr.isMethod(isIntegerConstant)).isMethod()));
}
isNameExpr.isMethod(isNameExpr);
}
}
|
[
"matheus@melsolucoes.net"
] |
matheus@melsolucoes.net
|
4ba09cce3dcaf90a3b5ac63c056f3501bed6cbba
|
505e12b4cd7eba0591e64d0f4e6f7b2e6f48042f
|
/riposte-microservice-template-core-code/src/test/java/com/myorg/ripostemicroservicetemplate/componenttest/VerifyBasicAuthIsConfiguredCorrectlyComponentTest.java
|
d29f0f0f9425543f49d9b400a270550b1fe9034a
|
[
"Apache-2.0"
] |
permissive
|
Nike-Inc/riposte-microservice-template
|
d0b9e99ed82e8a6c78cb969de09106bd5abbd363
|
73cfcff5334912810f2187339289f0e945bb2fa7
|
refs/heads/main
| 2022-07-01T13:00:16.245045
| 2022-06-03T17:10:59
| 2022-06-03T17:10:59
| 72,868,257
| 62
| 62
|
Apache-2.0
| 2022-06-03T17:10:59
| 2016-11-04T17:03:35
|
Java
|
UTF-8
|
Java
| false
| false
| 3,830
|
java
|
package com.myorg.ripostemicroservicetemplate.componenttest;
import com.nike.backstopper.apierror.sample.SampleCoreApiError;
import com.nike.internal.util.Pair;
import com.nike.riposte.server.Server;
import com.myorg.ripostemicroservicetemplate.endpoints.ExampleBasicAuthProtectedEndpoint;
import com.myorg.ripostemicroservicetemplate.testutils.TestUtils;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import java.util.Base64;
import io.netty.util.CharsetUtil;
import io.restassured.response.ExtractableResponse;
import static com.myorg.ripostemicroservicetemplate.testutils.TestUtils.verifyExpectedError;
import static io.netty.handler.codec.http.HttpHeaderNames.AUTHORIZATION;
import static io.restassured.RestAssured.given;
/**
* Component test that verifies the basic auth security is configured correctly on the server.
*
* <p>TODO: EXAMPLE CLEANUP - If your app does not use any security validation (e.g. basic auth for the examples) then
* you can delete this class entirely. If you do use security validation then you'll want to adjust these tests
* to tests your real endpoint security rather than the example stuff.
*/
public class VerifyBasicAuthIsConfiguredCorrectlyComponentTest {
private static Server realRunningServer;
private static TestUtils.AppServerConfigForTesting serverConfig;
private static String basicAuthHeaderValueRequired;
@BeforeAll
public static void setup() throws Exception {
Pair<Server, TestUtils.AppServerConfigForTesting> serverAndConfigPair = TestUtils.createServerForTesting();
serverConfig = serverAndConfigPair.getRight();
realRunningServer = serverAndConfigPair.getLeft();
realRunningServer.startup();
String basicAuthUsername = serverConfig.getTestingAppConfig().getString("exampleBasicAuth.username");
String basicAuthPassword = serverConfig.getTestingAppConfig().getString("exampleBasicAuth.password");
basicAuthHeaderValueRequired = "Basic " + Base64.getEncoder().encodeToString(
(basicAuthUsername + ":" + basicAuthPassword).getBytes(CharsetUtil.UTF_8)
);
}
@AfterAll
public static void teardown() throws Exception {
realRunningServer.shutdown();
}
@Test
public void endpoint_call_should_work_with_valid_basic_auth_header() {
given()
.baseUri("http://localhost")
.port(serverConfig.endpointsPort())
.header(AUTHORIZATION.toString(), basicAuthHeaderValueRequired)
.log().all()
.when()
.basePath(ExampleBasicAuthProtectedEndpoint.MATCHING_PATH)
.post()
.then()
.log().all()
.statusCode(201);
}
@Test
public void endpoint_call_should_fail_with_invalid_basic_auth_header() {
ExtractableResponse<?> response =
given()
.baseUri("http://localhost")
.port(serverConfig.endpointsPort())
.header(AUTHORIZATION.toString(), "foo" + basicAuthHeaderValueRequired)
.log().all()
.when()
.basePath(ExampleBasicAuthProtectedEndpoint.MATCHING_PATH)
.post()
.then()
.log().all()
.extract();
verifyExpectedError(response, SampleCoreApiError.UNAUTHORIZED);
}
@Test
public void healthcheck_call_should_not_require_basic_auth() {
given()
.baseUri("http://localhost")
.port(serverConfig.endpointsPort())
.log().all()
.when()
.basePath("/healthcheck")
.get()
.then()
.log().all()
.statusCode(200)
.extract().asString();
}
}
|
[
"nic.munroe@gmail.com"
] |
nic.munroe@gmail.com
|
5a6786df217bc9ab1148c2fbbc4f8e1137947b31
|
092c76fcc6c411ee77deef508e725c1b8277a2fe
|
/hybris/bin/ext-template/ychinaacceleratorstorefront/web/src/de/hybris/platform/ychinaaccelerator/storefront/filters/btg/ProductVisitedBtgFilter.java
|
db999dfe35a6aa3418e7dbc78729fc870633e2d5
|
[
"MIT"
] |
permissive
|
BaggaShivanshu2/hybris-bookstore-tutorial
|
4de5d667bae82851fe4743025d9cf0a4f03c5e65
|
699ab7fd8514ac56792cb911ee9c1578d58fc0e3
|
refs/heads/master
| 2022-11-28T12:15:32.049256
| 2020-08-05T11:29:14
| 2020-08-05T11:29:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 963
|
java
|
/*
*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("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 hybris.
*
*/
package de.hybris.platform.ychinaaccelerator.storefront.filters.btg;
import de.hybris.platform.btg.events.AbstractBTGRuleDataEvent;
import de.hybris.platform.btg.events.ProductVisitedBTGRuleDataEvent;
/**
* FilterBean to produce the BTG event {@link ProductVisitedBTGRuleDataEvent}
* This is a spring configured filter that is executed by the PlatformFilterChain.
*/
public class ProductVisitedBtgFilter extends AbstractPkResolvingBtgFilter
{
@Override
protected AbstractBTGRuleDataEvent internalGetEvent(final String pk)
{
return new ProductVisitedBTGRuleDataEvent(pk);
}
}
|
[
"xelilim@hotmail.com"
] |
xelilim@hotmail.com
|
5d5381d99296526330e7d28c8dda99839d3a0fbe
|
9e8acf446e5f78645e07acd2f41a616a132b4ba2
|
/ITSCaseDownloadingModule/src/main/java/its/medhub/itscasedownloadingmodule/App.java
|
4bd61f0e8d4adb7df8ef370b38928a86b06c7c06
|
[] |
no_license
|
avincze73/its-medhub-server
|
42e0d09b410cc2d38e924a9d66e804dba70fffe5
|
46c534b05dbaad4cba912eb990af4cfa6c92c693
|
refs/heads/master
| 2021-01-22T12:07:59.896818
| 2014-04-29T12:51:57
| 2014-04-29T12:51:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 211
|
java
|
package its.medhub.itscasedownloadingmodule;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
|
[
"vincze.attila@192.168.2.10"
] |
vincze.attila@192.168.2.10
|
7d8bd3c1087ee8caf5228805aef88956f86a0fc6
|
a46efce7a625c1ef49bbcb49615f456c7fa0aae1
|
/lib/Soot/src/soot/toolkits/graph/BlockGraphConverter.java
|
774cc1b4fcdb593fe3ec5b1d77ad436a18844d0f
|
[] |
no_license
|
HistoricalValue/spawncamping-octo-ninja
|
e2acaf21d1c1d194430c22d5c14515de9d4c588e
|
ecf9772df4116e7013d883b94421159857e87d60
|
refs/heads/master
| 2016-09-10T22:11:20.553861
| 2014-11-23T23:22:55
| 2014-11-23T23:22:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,123
|
java
|
/* Soot - a J*va Optimization Framework
* Copyright (C) 2003 Navindra Umanee <navindra@cs.mcgill.ca>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* 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 soot.toolkits.graph;
import soot.*;
import soot.util.*;
import java.util.*;
/**
* This utility class can convert any BlockGraph to a single-headed
* and single-tailed graph by inserting appropriate Start or Stop
* nodes. It can also fully reverse the graph, something that might
* be useful e.g. when computing control dependences with a dominators
* algorithm.
*
* <p>
* Note: This class may be retracted in a future release when a suitable
* replacement becomes available.
* </p>
*
* @author Navindra Umanee
**/
public class BlockGraphConverter
{
/**
* Transforms a multi-headed and/or multi-tailed BlockGraph to a
* single-headed singled-tailed BlockGraph by inserting a dummy
* start and stop nodes.
**/
public static void addStartStopNodesTo(BlockGraph graph)
{
ADDSTART:
{
List heads = graph.getHeads();
if(heads.size() == 0)
break ADDSTART;
if((heads.size() == 1) && (heads.get(0) instanceof DummyBlock))
break ADDSTART;
List blocks = graph.getBlocks();
DummyBlock head = new DummyBlock(graph.getBody(), 0);
head.makeHeadBlock(heads);
graph.mHeads = new SingletonList(head);
{
Iterator blocksIt = blocks.iterator();
while(blocksIt.hasNext()){
Block block = (Block) blocksIt.next();
block.setIndexInMethod(block.getIndexInMethod() + 1);
}
}
List newBlocks = new ArrayList();
newBlocks.add(head);
newBlocks.addAll(blocks);
graph.mBlocks = newBlocks;
}
ADDSTOP:
{
List tails = graph.getTails();
if(tails.size() == 0)
break ADDSTOP;
if((tails.size() == 1) && (tails.get(0) instanceof DummyBlock))
break ADDSTOP;
List blocks = graph.getBlocks();
DummyBlock tail = new DummyBlock(graph.getBody(), blocks.size());
tail.makeTailBlock(tails);
graph.mTails = new SingletonList(tail);
blocks.add(tail);
}
}
/**
* Reverses a BlockGraph by making the heads tails, the tails
* heads and reversing the edges. It does not change the ordering
* of Units in individual blocks, nor does it change the Block
* labels. This utility could be useful when calculating control
* dependences with a dominators algorithm.
**/
public static void reverse(BlockGraph graph)
{
// Issue: Do we change indexInMethod? No...
// Issue: Do we reverse the Units list in the Block?
// Issue: Do we need to implement an equals method in Block?
// When are two Blocks from two different BlockGraphs
// equal?
for(Iterator blocksIt = graph.getBlocks().iterator(); blocksIt.hasNext();){
Block block = (Block) blocksIt.next();
List succs = block.getSuccs();
List preds = block.getPreds();
block.setSuccs(preds);
block.setPreds(succs);
}
List heads = graph.getHeads();
List tails = graph.getTails();
graph.mHeads = new ArrayList(tails);
graph.mTails = new ArrayList(heads);
}
public static void main(String[] args)
{
// assumes 2 args: Class + Method
Scene.v().loadClassAndSupport(args[0]);
SootClass sc = Scene.v().getSootClass(args[0]);
SootMethod sm = sc.getMethod(args[1]);
Body b = sm.retrieveActiveBody();
CompleteBlockGraph cfg = new CompleteBlockGraph(b);
System.out.println(cfg);
BlockGraphConverter.addStartStopNodesTo(cfg);
System.out.println(cfg);
BlockGraphConverter.reverse(cfg);
System.out.println(cfg);
}
}
/**
* Represents Start or Stop node in the graph.
*
* @author Navindra Umanee
**/
class DummyBlock extends Block
{
DummyBlock(Body body, int indexInMethod)
{
super(null, null, body, indexInMethod, 0, null);
}
void makeHeadBlock(List oldHeads)
{
setPreds(new ArrayList());
setSuccs(new ArrayList(oldHeads));
Iterator headsIt = oldHeads.iterator();
while(headsIt.hasNext()){
Block oldHead = (Block) headsIt.next();
List newPreds = new ArrayList();
newPreds.add(this);
List oldPreds = oldHead.getPreds();
if(oldPreds != null)
newPreds.addAll(oldPreds);
oldHead.setPreds(newPreds);
}
}
void makeTailBlock(List oldTails)
{
setSuccs(new ArrayList());
setPreds(new ArrayList(oldTails));
Iterator tailsIt = oldTails.iterator();
while(tailsIt.hasNext()){
Block oldTail = (Block) tailsIt.next();
List newSuccs = new ArrayList();
newSuccs.add(this);
List oldSuccs = oldTail.getSuccs();
if(oldSuccs != null)
newSuccs.addAll(oldSuccs);
oldTail.setSuccs(newSuccs);
}
}
public Iterator iterator()
{
return Collections.EMPTY_LIST.iterator();
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
b0eff3db63f4f53af76f3e8f68a9d525270d6292
|
7b4d385e73dd155c6c441b7f9ef1a7b95d78500d
|
/trunk/src/org/jdownloader/extensions/shutdown/ShutdownConfig.java
|
af01bf9e7e21bbab1343b251fb24ff32117d2983
|
[] |
no_license
|
Youvirajnikesh/jdownloader
|
fa05f2ef8110de13aaa453fddbcc82458acebe7c
|
50ff22ada109f0fb08fb511a0340e74154061fa5
|
refs/heads/master
| 2021-01-18T15:45:04.903289
| 2013-09-16T04:19:16
| 2013-09-16T04:19:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 168
|
java
|
package org.jdownloader.extensions.shutdown;
import jd.plugins.ExtensionConfigInterface;
public interface ShutdownConfig extends ExtensionConfigInterface {
}
|
[
"coalado@ebf7c1c2-ba36-0410-9fe8-c592906822b4"
] |
coalado@ebf7c1c2-ba36-0410-9fe8-c592906822b4
|
cd396a2ab902ffd9f31c35fbc07e630555be1e84
|
52f27921148d69e8ef235ac6b05e010e50cd04fb
|
/business/business-school/src/main/java/com/example/springdemo/businessSchool/service/ClassService.java
|
e3cd609f4aabd4f8e115465c6df5e0e0bc7b01a5
|
[] |
no_license
|
guleidamu/springdemo2
|
7d049950ffb66c7bc456913c6b097954ed4d9c56
|
d081197a9f6b7641f234e66d024240cb4e3a23d4
|
refs/heads/master
| 2022-06-23T09:43:52.595139
| 2020-07-17T06:43:02
| 2020-07-17T06:43:02
| 208,819,193
| 0
| 0
| null | 2022-06-17T03:29:14
| 2019-09-16T14:22:30
|
Java
|
UTF-8
|
Java
| false
| false
| 362
|
java
|
package com.example.springdemo.businessSchool.service;
import com.example.springdemo.businessSchool.data.dto.ClassDTO;
import com.example.springdemo.businessSchool.data.vo.ClassVO;
import java.util.ArrayList;
import java.util.List;
public interface ClassService {
ArrayList<ClassVO> queryClassByMasterName(ClassDTO classDTO);
void addClassList();
}
|
[
"364632363@qq.com"
] |
364632363@qq.com
|
cda6f1054dd1093271a49676df5151a74e976fc5
|
b280a34244a58fddd7e76bddb13bc25c83215010
|
/scmv6/web-mobile/src/test/java/com/smate/web/psn/action/mobile/psnlist/APPPsnListViewActionTest.java
|
46d8f48703a1d2d292b127ffe9d37e899aec3524
|
[] |
no_license
|
hzr958/myProjects
|
910d7b7473c33ef2754d79e67ced0245e987f522
|
d2e8f61b7b99a92ffe19209fcda3c2db37315422
|
refs/heads/master
| 2022-12-24T16:43:21.527071
| 2019-08-16T01:46:18
| 2019-08-16T01:46:18
| 202,512,072
| 2
| 3
| null | 2022-12-16T05:31:05
| 2019-08-15T09:21:04
|
Java
|
UTF-8
|
Java
| false
| false
| 3,721
|
java
|
package com.smate.web.psn.action.mobile.psnlist;
import static org.junit.Assert.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import com.smate.core.base.utils.security.Des3Utils;
import com.smate.test.utils.JunitPropertiesUtils;
import com.smate.web.psn.action.mobile.influence.AppMobilePsnInfluenceActionTest;
public class APPPsnListViewActionTest {
protected static final Logger logger = LoggerFactory.getLogger(AppMobilePsnInfluenceActionTest.class);
protected static Map<String, String> proMap;
private RestTemplate restTemplate = new RestTemplate();
static String domainscm;
static String token;
static String psnId;
Map<String, Object> resultMap = new HashMap<String, Object>();
@BeforeAll
public static void loadProperties() throws IOException {
String runEnv = System.getenv("RUN_ENV");
try {
proMap = JunitPropertiesUtils.loadProperties("src/test/java/com/smate/web/psn/action/mobile/psnlist/properties/"
+ runEnv + "_test_APPPsnListViewActionTest.properties");
} catch (Exception e) {
logger.error("文件读取失败", e);
}
domainscm = proMap.get("junit_domainMobile");
token = proMap.get("token");
psnId = proMap.get("psnId");
}
@ParameterizedTest
@DisplayName("进入人员列表页面")
@CsvSource({"kwIdentific,12993,502"})
public void testGetKeywordIdentifyPsnList(String serviceType, String discId, String scienceAreaId) {
String commentUrl = domainscm + "/app/psnweb/outside/mobile/identifypsn";
MultiValueMap<String, Object> param = new LinkedMultiValueMap<>();
param.add("serviceType", serviceType);
param.add("discId", discId);
param.add("scienceAreaId", scienceAreaId);
param.add("des3PsnId", Des3Utils.encodeToDes3(psnId));
resultMap = this.postUrl(param, commentUrl);
assertTrue("200".equals(resultMap.get("status")));
}
@SuppressWarnings({"unchecked", "rawtypes"})
private Map<String, Object> postUrl(MultiValueMap param, String url) {
HttpEntity<MultiValueMap> httpEntity = this.getEntity(param);// 创建头部信息
return restTemplate.postForObject(url, httpEntity, Map.class);
}
@SuppressWarnings("rawtypes")
private HttpEntity getEntity(MultiValueMap param) {
HttpHeaders headers = new HttpHeaders();
headers.add("token", token);
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
HttpEntity<MultiValueMap> HttpEntity = new HttpEntity<MultiValueMap>(param, headers);
return HttpEntity;
}
public void checkResult(Map<String, Object> map) {
assertNotEquals(null, map);
logger.info("results=" + map.get("results"));
logger.info("msg=" + map.get("msg"));
logger.info("map=" + map);
assertTrue("200".equals(map.get("status")));
}
public void checkErrorResult(Map<String, Object> map, String mesge) {
assertNotEquals(null, map);
logger.info("results=" + map.get("results"));
logger.info("msg=" + map.get("msg"));
logger.info("map=" + map);
assertTrue("500".equals(map.get("status")));
assertTrue(mesge.equals(map.get("msg")));
}
}
|
[
"zhiranhe@irissz.com"
] |
zhiranhe@irissz.com
|
62d44662f5b78efc6fddd8eed975417fec7680e8
|
488367d911299d061b3b7cc3617d162eaa533f0b
|
/ymateplatform/src/main/java/net/ymate/platform/mvc/MVC.java
|
942882dc64fc37a31a9516ef559cdcadbc68a351
|
[
"Apache-2.0"
] |
permissive
|
lilRain/ymateplatform
|
063b907e21997fb497e03eee7f985ce4ee59cd3a
|
f2c88d3af21fdec22d1e00948312eaf1ff057074
|
refs/heads/master
| 2020-12-30T18:57:58.385619
| 2014-07-15T18:02:12
| 2014-07-15T18:02:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,975
|
java
|
/*
* Copyright 2007-2107 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.ymate.platform.mvc;
import java.util.Locale;
import net.ymate.platform.base.YMP;
import net.ymate.platform.commons.i18n.I18N;
import net.ymate.platform.mvc.context.IRequestContext;
import net.ymate.platform.mvc.impl.DefaultRequestProcessor;
import net.ymate.platform.mvc.support.RequestExecutor;
import net.ymate.platform.plugin.IPluginFactory;
import net.ymate.platform.plugin.Plugins;
import net.ymate.platform.plugin.impl.DefaultPluginConfig;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* <p>
* MVC
* </p>
* <p>
* MVC框架核心管理器;
* </p>
*
* @author 刘镇(suninformation@163.com)
* @version 0.0.0
* <table style="border:1px solid gray;">
* <tr>
* <th width="100px">版本号</th><th width="100px">动作</th><th
* width="100px">修改人</th><th width="100px">修改时间</th>
* </tr>
* <!-- 以 Table 方式书写修改历史 -->
* <tr>
* <td>0.0.0</td>
* <td>创建类</td>
* <td>刘镇</td>
* <td>2012-12-7下午10:55:58</td>
* </tr>
* </table>
*/
public abstract class MVC {
private static final Log _LOG = LogFactory.getLog(MVC.class);
/**
* 当前MVC框架初始化配置对象
*/
private static IMvcConfig __MVC_CONFIG;
private static IPluginFactory __PLUGIN_FACTORY;
private static IRequestProcessor __META_PROCESSOR;
private static boolean __IS_INITED;
/**
* 初始化WebMVC管理器
*
* @param config MVC框架初始化配置对象
* @param processor MVC控制器请求处理器对象
*/
protected static void __doInitialize(IMvcConfig config, IRequestProcessor processor) {
if (!__IS_INITED) {
_LOG.info(I18N.formatMessage(YMP.__LSTRING_FILE, null, null, "ymp.mvc.module_init"));
__MVC_CONFIG = config;
__META_PROCESSOR = processor == null ? new DefaultRequestProcessor() : processor;
__META_PROCESSOR.initialize();
//
__PLUGIN_FACTORY = Plugins.createPluginFactory(new DefaultPluginConfig(__MVC_CONFIG.getPluginExtraParser(),
__MVC_CONFIG.getPluginHome(),
MVC.getConfig().getExtendParams().get("optional.plugins_manifest_file"), true, true));
__IS_INITED = true;
if (__MVC_CONFIG.isI18n()) {
// 初始化国际化资源管理器
I18N.initialize(__MVC_CONFIG.getLocale());
}
// 回调MVC框架事件处理器接口, 触发onInitialized事件
if (__MVC_CONFIG.getEventHandlerClassImpl() != null) {
__MVC_CONFIG.getEventHandlerClassImpl().onInitialized();
}
_LOG.info(I18N.formatMessage(YMP.__LSTRING_FILE, null, null, "ymp.mvc.module_init_final"));
}
}
protected static void __doDestroy() {
if (__IS_INITED) {
// 回调MVC框架事件处理器接口, 触发onDestroyed事件
if (__MVC_CONFIG.getEventHandlerClassImpl() != null) {
__MVC_CONFIG.getEventHandlerClassImpl().onDestroyed();
}
//
__PLUGIN_FACTORY.destroy();
__META_PROCESSOR.destroy();
__IS_INITED = false;
if (__MVC_CONFIG.isI18n()) {
I18N.destroy();
}
}
}
/**
* @return 获取当前配置体系框架初始化配置对象
*/
public static IMvcConfig getConfig() {
return __MVC_CONFIG;
}
/**
* @return 判断是否已初始化完成
*/
public static boolean isInited() {
return __IS_INITED;
}
/**
* @return 返回当前插件工厂对象
*/
public static IPluginFactory getPluginFactory() {
return __PLUGIN_FACTORY;
}
/**
* 注册控制器类
*
* @param clazz 目标控制器类
*/
public static void registerController(Class<?> clazz) {
__META_PROCESSOR.addController(clazz);
}
/**
* @param context 请求上下文对象
* @return 绑定请求执行器,返回对象可能为空
*/
public static RequestExecutor processRequestMapping(IRequestContext context) {
return __META_PROCESSOR.bindRequestExecutor(context);
}
/**
* Builds a {@link java.util.Locale} from a String of the form en_US_foo into a Locale with language "en", country "US" and variant "foo". This will parse the output of {@link java.util.Locale#toString()}.
*
* @param localeStr The locale String to parse.
* @param defaultLocale The locale to use if localeStr is <tt>null</tt>.
* @return requested Locale
*/
public static Locale localeFromStr(String localeStr, Locale defaultLocale) {
if (StringUtils.isBlank(localeStr)) {
return defaultLocale != null ? defaultLocale : Locale.getDefault();
}
int index = localeStr.indexOf('_');
if (index < 0) {
return new Locale(localeStr);
}
String language = localeStr.substring(0, index);
if (index == localeStr.length()) {
return new Locale(language);
}
localeStr = localeStr.substring(index + 1);
index = localeStr.indexOf('_');
if (index < 0) {
return new Locale(language, localeStr);
}
String country = localeStr.substring(0, index);
if (index == localeStr.length()) {
return new Locale(language, country);
}
localeStr = localeStr.substring(index + 1);
return new Locale(language, country, localeStr);
}
}
|
[
"suninformation@163.com"
] |
suninformation@163.com
|
9487f35808a60ce2ecbb48b669091a04f0b7c40a
|
e4178cd5b13e31e35d07667658a7e7cc5e7a884d
|
/src/lbs/goodplace/com/obj/Commentsituation.java
|
6b8e594797c3feedf6939f8d1e99cf80e0692c6d
|
[] |
no_license
|
itman83/ShopMall-Android
|
7285d14b6215a0f53bdf4fafc57f7e5b20bf0adf
|
ee52fdab6a24379180bc762ae1fbf6199c7cb897
|
refs/heads/master
| 2020-12-31T06:22:54.926454
| 2014-01-23T12:09:57
| 2014-01-23T12:10:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 388
|
java
|
package lbs.goodplace.com.obj;
import java.io.Serializable;
/**
* 用户对商家的点评情况
* @author Administrator
*
*/
public class Commentsituation implements Serializable{
public int total;
public String curuser;
public int star;
public String curcomment; //最后评论内容
public long time; //最新点评时间(自1970年1月1日起的秒数)
}
|
[
"Kingsleyyau@gmail.com"
] |
Kingsleyyau@gmail.com
|
99c83d7bef4650d0ebb00bd002a614b5827cc627
|
34d9d1dbd41b2781f5d1839367942728ee199c2c
|
/MTSA/MTSAClient/src/ac/ic/doc/mtsa/MTSA.java
|
21f953852e6bace91a1501b7216ec77aa6cc1bff
|
[] |
no_license
|
Intrinsarc/intrinsarc-evolve
|
4808c0698776252ac07bfb5ed2afddbc087d5e21
|
4492433668893500ebc78045b6be24f8b3725feb
|
refs/heads/master
| 2020-05-23T08:14:14.532184
| 2015-09-08T23:07:35
| 2015-09-08T23:07:35
| 70,294,516
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,333
|
java
|
package ac.ic.doc.mtsa;
import java.util.*;
import ac.ic.doc.mtstools.facade.*;
import ac.ic.doc.mtstools.model.*;
import ac.ic.doc.mtstools.model.impl.*;
import ac.ic.doc.mtstools.model.operations.impl.*;
public class MTSA {
public MTS<Long, String> compile(String sourceString, String modelName)
throws Exception {
return MTSCompiler.getInstance().compileMTS(sourceString, modelName);
}
// refinement
public <State, Action> boolean isRefinement(MTS<State, Action> refined,
MTS<State, Action> refines, Set<Action> silentActions) {
return new WeakSemantics(silentActions).isARefinement(refined, refines);
}
// merge
public <State, Action> MTS<Object, Action> merge(MTS<State, Action> mtsA,
MTS<State, Action> mtsB, Set<Action> silentActions) {
return new WeakAlphabetMergeBuilder(silentActions).merge(mtsA, mtsB);
}
// optimistic
/**
* Returns the optimistic version of the model <code>mts</code>.
*
*/
public static MTS<Long, String> getOptimisticModel(MTS<Long, String> mts) {
return MTSAFacade.getOptimisticModel(mts);
}
// pessimistic
/**
* Returns the pessimistic version of the model <code>mts</code>.
*/
public static MTS<Long, String> getPesimisticModel(MTS<Long, String> mts) {
return MTSAFacade.getPesimisticModel(mts);
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
10c47bf7d0d5ab03a8e1d0abab8e33a6d980221b
|
ed28460c5d24053259ab189978f97f34411dfc89
|
/Software Engineering/Java Fundamentals/Java OOP Basics/01. Defining Classes/Exercise/src/Problem10FamilyTree/FamilyTree.java
|
5cc03c58f2d095751ab096d72da81c8dda3dc8f1
|
[] |
no_license
|
Dimulski/SoftUni
|
6410fa10ba770c237bac617205c86ce25c5ec8f4
|
7954b842cfe0d6f915b42702997c0b4b60ddecbc
|
refs/heads/master
| 2023-01-24T20:42:12.017296
| 2020-01-05T08:40:14
| 2020-01-05T08:40:14
| 48,689,592
| 2
| 1
| null | 2023-01-12T07:09:45
| 2015-12-28T11:33:32
|
Java
|
UTF-8
|
Java
| false
| false
| 4,880
|
java
|
package Problem10FamilyTree;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
public class FamilyTree { // #firstTry
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
LinkedHashMap<String, Person> people = new LinkedHashMap<>();
Person targetPerson = new Person();
boolean hasBirthday = false;
String[] firstLine = reader.readLine().split(" ");
if (firstLine.length == 1) {
targetPerson.birthday = firstLine[0];
hasBirthday = true;
} else {
targetPerson.firstName = firstLine[0];
targetPerson.lastName = firstLine[1];
}
LinkedList<String> personInfo = new LinkedList<>();
LinkedList<String> relation = new LinkedList<>();
String line;
while (!(line = reader.readLine()).equals("End")) {
if (line.contains(" - ")) {
relation.add(line);
} else {
personInfo.add(line);
}
}
for (String info : personInfo) {
String[] infoParams = info.split(" ");
Person person = new Person(infoParams[0], infoParams[1], infoParams[2]);
people.put(infoParams[2], person);
}
Person fullPerson = null;
if (hasBirthday) {
fullPerson = people.get(targetPerson.birthday);
} else {
for (Person person : people.values()) {
if (person.firstName.equals(targetPerson.firstName) && person.lastName.equals(targetPerson.lastName)) {
fullPerson = person;
}
}
}
String fullName = String.format("%s %s", fullPerson.firstName, fullPerson.lastName);
StringBuilder result = new StringBuilder();
result.append(String.format("%s%s", fullPerson, System.lineSeparator()));
for (String relationInfo : relation) {
String[] infoParams = relationInfo.split(" - ");
if (infoParams[0].equals(fullName) || infoParams[0].equals(fullPerson.birthday)) {
// We found a child
String[] childParams = infoParams[1].split(" ");
if (childParams.length == 1) {
fullPerson.children.add(people.get(childParams[0]));
} else if (childParams.length == 2) {
for (Person person : people.values()) {
if (person.firstName.equals(childParams[0]) && person.lastName.equals(childParams[1])) {
fullPerson.children.add(person);
}
}
}
} else if (infoParams[1].equals(fullName) || infoParams[1].equals(fullPerson.birthday)) {
// We found a parent
String[] parentParams = infoParams[0].split(" ");
if (parentParams.length == 1) {
fullPerson.parents.add(people.get(parentParams[0]));
} else if (parentParams.length == 2) {
for (Person person : people.values()) {
if (person.firstName.equals(parentParams[0]) && person.lastName.equals(parentParams[1])) {
fullPerson.parents.add(person);
}
}
}
}
}
result.append(String.format("Parents:%s", System.lineSeparator()));
for (Person parent : fullPerson.parents) {
result.append(String.format("%s%s", parent, System.lineSeparator()));
}
result.append(String.format("Children:%s", System.lineSeparator()));
for (Person child : fullPerson.children) {
result.append(String.format("%s%s", child, System.lineSeparator()));
}
System.out.println(result);
}
static class Person {
String firstName;
String lastName;
String birthday;
List<Person> parents;
List<Person> children;
Person(String firstName, String lastName, String birthday) {
this.firstName = firstName;
this.lastName = lastName;
this.birthday = birthday;
this.parents = new LinkedList<>();
this.children = new LinkedList<>();
}
Person(String firstName, String lastName) {
this(firstName, lastName, null);
}
Person(String birthday) {
this(null, null, birthday);
}
Person() {
this(null, null, null);
}
public String toString() {
return String.format("%s %s %s", firstName, lastName, birthday);
}
}
}
|
[
"george.dimulski@gmail.com"
] |
george.dimulski@gmail.com
|
224a19375f23bb6ab24034389e1c33d1de366e8a
|
1f080543b9783e4a03b99927e03a2eadace572a7
|
/EbayClientSpringRmi/src/main/java/ua.artcode/view/ConsoleMenu.java
|
4323b3ad758f42747091ba15d94186ad5fda3df1
|
[] |
no_license
|
shamanovskyi/ACP7-1
|
aeef483a217c80d62cb890f7c260e263843c8529
|
6daee39566edff91856bb8749f36a1b487c2c769
|
refs/heads/master
| 2021-05-31T11:05:57.553981
| 2015-10-23T19:47:38
| 2015-10-23T19:47:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,994
|
java
|
package ua.artcode.view;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import ua.artcode.exception.ValidationException;
import ua.artcode.exception.WrongUserCredentialException;
import ua.artcode.model.Product;
import ua.artcode.model.User;
import ua.artcode.service.ProductService;
import ua.artcode.service.UserService;
import java.util.List;
import java.util.Scanner;
@Component
public class ConsoleMenu {
@Autowired
private UserService userService;
private ProductService productService;
private Scanner input = new Scanner(System.in);
private String sessionToken;
public ConsoleMenu() {
}
public ConsoleMenu(UserService userService, ProductService productService) {
this.productService = productService;
this.userService = userService;
}
public void setProductService(ProductService productService) {
this.productService = productService;
}
public void setUserService(UserService userService) {
this.userService = userService;
}
public void showMainMenu() {
System.out.println("1.Login");
System.out.println("2.Register");
System.out.println("3.Add product");
System.out.println("4.All products");
System.out.println("5.Show MyProducts");
System.out.println("6.Logout");
System.out.println("7.Exit");
}
public void start() {
int choice = 0;
while (true) {
showMainMenu();
choice = input.nextInt();
dispatchChoice(choice);
}
}
private void dispatchChoice(int choice) {
switch (choice) {
case 1: {
showLoginMenu();
break;
}
case 2: {
showRegisterMenu();
break;
}
case 3: {
showAddProductMenu();
break;
}
case 4: {
showAllProductsMenu();
break;
}
}
}
private void showAllProductsMenu() {
List<Product> productList = productService.getAll();
for (Product product : productList) {
System.out.println("\t" + product);
}
}
private void showAddProductMenu() {
if (sessionToken == null) {
System.out.println("Please login first!!!");
return;
}
System.out.println("Input title");
String title = input.next();
System.out.println("Input description");
String desc = input.next();
System.out.println("Input price");
double price = input.nextDouble();
productService.addNewProduct(sessionToken, title,desc,price);
System.out.println("Product added!!");
}
private void showRegisterMenu() {
System.out.println("Input fullname");
String fullname = input.next();
System.out.println("Input phone");
String phone = input.next();
System.out.println("Input Email");
String email = input.next();
System.out.println("Input pass");
String pass = input.next();
try {
User user = userService.register(fullname, phone, email, pass);
System.out.println(user);
} catch (ValidationException e) {
System.err.println(e.getMessage());
System.out.println("Try Again");
}
}
private void showLoginMenu() {
System.out.println("Input Email");
String email = input.next();
System.out.println("Input pass");
String pass = input.next();
try {
sessionToken = userService.login(email, pass);
System.out.println("You are in the system!");
} catch (WrongUserCredentialException e) {
System.err.println(e.getMessage());
System.out.println("Try Again");
}
}
}
|
[
"presly808@gmail.com"
] |
presly808@gmail.com
|
5856e1b68bc6a56a18b6ec74ce5197ea4a1d7094
|
5598faaaaa6b3d1d8502cbdaca903f9037d99600
|
/code_changes/Apache_projects/MAPREDUCE-8/a471864b960d7660dafc820e09eb10eb061c0e2e/TestSetupWorkDir.java
|
84d48690dc05968f3906fbfc89d2d8cb953e1872
|
[] |
no_license
|
SPEAR-SE/LogInBugReportsEmpirical_Data
|
94d1178346b4624ebe90cf515702fac86f8e2672
|
ab9603c66899b48b0b86bdf63ae7f7a604212b29
|
refs/heads/master
| 2022-12-18T02:07:18.084659
| 2020-09-09T16:49:34
| 2020-09-09T16:49:34
| 286,338,252
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,981
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.mapred;
import java.io.DataOutputStream;
import java.io.File;
import java.io.IOException;
import junit.framework.TestCase;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
/**
* Validates if TaskRunner.deleteDirContents() is properly cleaning up the
* contents of workDir.
*/
public class TestSetupWorkDir extends TestCase {
private static int NUM_SUB_DIRS = 3;
/**
* Creates subdirectories under given dir and files under those subdirs.
* Creates dir/subDir1, dir/subDir1/file, dir/subDir2, dir/subDir2/file, etc.
*/
static void createSubDirs(JobConf jobConf, Path dir)
throws IOException {
for (int i = 1; i <= NUM_SUB_DIRS; i++) {
Path subDir = new Path(dir, "subDir" + i);
FileSystem fs = FileSystem.getLocal(jobConf);
fs.mkdirs(subDir);
Path p = new Path(subDir, "file");
DataOutputStream out = fs.create(p);
out.writeBytes("dummy input");
out.close();
}
}
/**
* Validates if TaskRunner.deleteDirContents() is properly cleaning up the
* contents of workDir.
*/
public void testSetupWorkDir() throws IOException {
Path rootDir = new Path(System.getProperty("test.build.data", "/tmp"),
"testSetupWorkDir");
Path myWorkDir = new Path(rootDir, "./work");
JobConf jConf = new JobConf();
FileSystem fs = FileSystem.getLocal(jConf);
if (fs.exists(myWorkDir)) {
fs.delete(myWorkDir, true);
}
if (!fs.mkdirs(myWorkDir)) {
throw new IOException("Unable to create workDir " + myWorkDir);
}
// create subDirs under work dir
createSubDirs(jConf, myWorkDir);
assertTrue("createDirAndSubDirs() did not create subdirs under "
+ myWorkDir, fs.listStatus(myWorkDir).length == NUM_SUB_DIRS);
TaskRunner.deleteDirContents(jConf, new File(myWorkDir.toUri().getPath()));
assertTrue("Contents of " + myWorkDir + " are not cleaned up properly.",
fs.listStatus(myWorkDir).length == 0);
// cleanup
fs.delete(rootDir, true);
}
}
|
[
"archen94@gmail.com"
] |
archen94@gmail.com
|
8b17899e55cbdef14cd5e901e88b7df92b04c2db
|
45ee32435c345790cae1f10111e37f860395f1ea
|
/art-extension/opttests/src/OptimizationTests/AUR/BoundsCheck_03/Main.java
|
9d7a3293e41d9276ac63993b5151d386777a9ed4
|
[
"Apache-2.0",
"NCSA",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
android-art-intel/Nougat
|
b93eb0bc947088ba55d03e62324af88d332c5e93
|
ea41b6bfe5c6b62a3163437438b21568cc783a24
|
refs/heads/master
| 2020-07-05T18:53:19.370466
| 2016-12-16T04:23:40
| 2016-12-16T04:23:40
| 73,984,816
| 9
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,285
|
java
|
/*
* Copyright (C) 2016 Intel Corporation
*
* 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 OptimizationTests.AUR.BoundsCheck_03;
import OptimizationTests.AUR.shared.*;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.*;
public class Main {
public int field = 5;
private int getSum(int arg) {
return arg + 20;
}
// simple AUR example for BoundsCheck,
// same as BoundsCheck_01, but ArrayGet will not be removed because it is used later
public int runTest (int[] xx, int n, Main other) {
int sum = xx[n - 5];
return other.field + sum;
}
// wrapper method for runTest
public int test(int n) {
int[] xx = new int[n];
for (int i = 0; i < n; i++) {
xx[i] = n;
}
Main other = new Main();
return runTest(xx, n, other);
}
// wrapper method for runTest with GC stress threads running
public String testWithGCStress(int n) {
String res = "";
Thread t = new Thread(new Runnable(){
public void run() {
new StressGC().stressGC();
}
});
t.start();
try {
res += test(n);
} catch (Throwable e) {
res += e;
}
try {
t.join();
} catch (InterruptedException ie) {
}
return res;
}
public void runTests() {
Class c = new Main().getClass();
Method[] methods = c.getDeclaredMethods();
Method tempMethod;
for (int i = 1; i < methods.length; i++) {
int j = i;
while (j > 0 && methods[j-1].getName().compareTo(methods[j].getName()) > 0) {
tempMethod = methods[j];
methods[j] = methods[j-1];
methods[j-1] = tempMethod;
j = j - 1;
}
}
Object[] arr = {null};
for (Method m: methods){
if (m.getName().startsWith("test")){
try {
String names[] = c.getPackage().getName().split("\\.");
String testName = names[names.length-1];
System.out.println("Test "+testName+"; Subtest "+m.getName()+"; Result: "+ m.invoke(this, 10));
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
System.out.println(e.getCause());
}
}
}
}
public static void main(String[] args)
{
new Main().runTests();
}
}
|
[
"aleksey.v.ignatenko@intel.com"
] |
aleksey.v.ignatenko@intel.com
|
7b4a0a3f15ef88dbe0ff1d1a0cb1a7db27e83121
|
b3ed8be89a0e6668a7e76f71960cccf25342f038
|
/com-cg-todo-list/multi-module/todo-view-service/src/main/java/com/cg/todolist/queryside/backend/TodoViewBackendConfiguration.java
|
5132b65c9b8f6f1a077674e34ae0b68180cb56a8
|
[
"Apache-2.0"
] |
permissive
|
pparaska/com-cg-todo-list
|
bf16d39f6807b13ea774fa8c2e7b96378bcead1d
|
2325e69701174bc9fc5a622ed27db3b0fd0b2785
|
refs/heads/master
| 2020-05-25T22:50:08.472011
| 2019-05-22T11:21:53
| 2019-05-22T11:21:53
| 188,022,598
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,375
|
java
|
package com.cg.todolist.queryside.backend;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import com.cg.todolist.TodoRepository;
import io.eventuate.javaclient.spring.EnableEventHandlers;
@Configuration
@EntityScan("net.chrisrichardson.eventstore.examples.todolist")
@EnableJpaRepositories("net.chrisrichardson.eventstore.examples.todolist")
@EnableEventHandlers
public class TodoViewBackendConfiguration {
@Bean
public TodoViewEventSubscriber todoViewEventSubscriber(TodoUpdateServiceImpl queryService) {
return new TodoViewEventSubscriber(queryService);
}
@Bean
public TodoUpdateServiceImpl queryService(TodoRepository repository) {
return new TodoUpdateServiceImpl(repository);
}
@Bean
public HttpMessageConverters customConverters() {
HttpMessageConverter<?> additional = new MappingJackson2HttpMessageConverter();
return new HttpMessageConverters(additional);
}
}
|
[
"poonam.paraskar@capgemini.com"
] |
poonam.paraskar@capgemini.com
|
7fdd07c5766b19e4755a46fcebcc4c6372b9cbbc
|
341ed102cd8c2e7ab9e07af58daed3c28253c1c9
|
/SistemaFat/SistemaFaturamento/src/gcom/gui/cobranca/ExibirMotivoNaoGeracaoDocumentoTipoComandoAction.java
|
db2a441b347835fa03121b8b4d090bdbd13f4cfe
|
[] |
no_license
|
Relesi/Stream
|
a2a6772c4775a66a753d5cc830c92f1098329270
|
15710d5a2bfb5e32ff8563b6f2e318079bcf99d5
|
refs/heads/master
| 2021-01-01T17:40:52.530660
| 2017-08-21T22:57:02
| 2017-08-21T22:57:02
| 98,132,060
| 2
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 4,331
|
java
|
/*
* Copyright (C) 2007-2007 the GSAN - Sistema Integrado de Gestão de Serviços de Saneamento
*
* This file is part of GSAN, an integrated service management system for Sanitation
*
* GSAN is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
*
* GSAN is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
/*
* GSAN - Sistema Integrado de Gestão de Serviços de Saneamento
* Copyright (C) <2007>
* Adriano Britto Siqueira
* Alexandre Santos Cabral
* Ana Carolina Alves Breda
* Ana Maria Andrade Cavalcante
* Aryed Lins de Araújo
* Bruno Leonardo Rodrigues Barros
* Carlos Elmano Rodrigues Ferreira
* Cláudio de Andrade Lira
* Denys Guimarães Guenes Tavares
* Eduardo Breckenfeld da Rosa Borges
* Fabíola Gomes de Araújo
* Flávio Leonardo Cavalcanti Cordeiro
* Francisco do Nascimento Júnior
* Homero Sampaio Cavalcanti
* Ivan Sérgio da Silva Júnior
* José Edmar de Siqueira
* José Thiago Tenório Lopes
* Kássia Regina Silvestre de Albuquerque
* Leonardo Luiz Vieira da Silva
* Márcio Roberto Batista da Silva
* Maria de Fátima Sampaio Leite
* Micaela Maria Coelho de Araújo
* Nelson Mendonça de Carvalho
* Newton Morais e Silva
* Pedro Alexandre Santos da Silva Filho
* Rafael Corrêa Lima e Silva
* Rafael Francisco Pinto
* Rafael Koury Monteiro
* Rafael Palermo de Araújo
* Raphael Veras Rossiter
* Roberto Sobreira Barbalho
* Rodrigo Avellar Silveira
* Rosana Carvalho Barbosa
* Sávio Luiz de Andrade Cavalcante
* Tai Mu Shih
* Thiago Augusto Souza do Nascimento
* Tiago Moreno Rodrigues
* Vivianne Barbosa Sousa
* Anderson Italo Felinto de Lima
*
* Este programa é software livre; você pode redistribuí-lo e/ou
* modificá-lo sob os termos de Licença Pública Geral GNU, conforme
* publicada pela Free Software Foundation; versão 2 da
* Licença.
* Este programa é distribuído na expectativa de ser útil, mas SEM
* QUALQUER GARANTIA; sem mesmo a garantia implícita de
* COMERCIALIZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM
* PARTICULAR. Consulte a Licença Pública Geral GNU para obter mais
* detalhes.
* Você deve ter recebido uma cópia da Licença Pública Geral GNU
* junto com este programa; se não, escreva para Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307, USA.
*/
package gcom.gui.cobranca;
import gcom.gui.GcomAction;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
/**
* @author Anderson Italo
* @date 20/11/2009
* Pre-Processamento do UC9999 Consultar Motivo da não Geração de Documento de Cobrança
*/
public class ExibirMotivoNaoGeracaoDocumentoTipoComandoAction extends GcomAction {
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm, HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
ActionForward retorno = actionMapping
.findForward("motivoNaoGeracaoDocumentoTipoComando");
MotivoNaoGeracaoDocumentoActionForm form = (MotivoNaoGeracaoDocumentoActionForm) actionForm;
limparForm(form);
return retorno;
}
public void limparForm(MotivoNaoGeracaoDocumentoActionForm form){
form.setIndicadorTipoPesquisa(null);
form.setIndicadorTipoRelatorio(null);
form.setIdCobrancaAcaoAtividadeComando("");
form.setAnoMesReferencia("");
form.setIdCobrancaGrupo("");
form.setIdCobrancaAcao("");
form.setIdCobrancaAtividade("");
form.setGerenciaRegional("");
form.setIdLocalidade("");
form.setDescricaoLocalidade("");
form.setIdSetorComercial("");
form.setDescricaoSetorComercial("");
form.setIdQuadra("");
form.setDescricaoQuadra("");
form.setMatriculaImovel("");
form.setDescricaoMotivo("");
}
}
|
[
"renatolessa.2011@hotmail.com"
] |
renatolessa.2011@hotmail.com
|
512778e4946cd93722f882ef1d52348f7a3fe091
|
ddbb70f9e2caa272c05a8fa54c5358e2aeb507ad
|
/rimfile/src/main/java/com/rimdev/rimfile/Repo/GroupStatusRepo.java
|
759c9f3a547336b10171581f61d36d21f01b22e9
|
[] |
no_license
|
ahmedhamed105/rimdev
|
1e1aad2c4266dd20e402c566836b9db1f75d4643
|
c5737a7463f0b80b49896a52f93acbb1e1823509
|
refs/heads/master
| 2023-02-05T15:18:20.829487
| 2021-04-04T08:10:19
| 2021-04-04T08:10:19
| 228,478,954
| 1
| 0
| null | 2023-01-11T19:57:52
| 2019-12-16T21:27:44
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 228
|
java
|
package com.rimdev.rimfile.Repo;
import org.springframework.data.repository.CrudRepository;
import com.rimdev.rimfile.entities.GroupStatus;
public interface GroupStatusRepo extends CrudRepository<GroupStatus, Integer>{
}
|
[
"ahmed.elemam@its.ws"
] |
ahmed.elemam@its.ws
|
72fb6077b834fd588cf94ebcb5b63894cd51f065
|
8d6e0c2eabcfc83b31d936f0a091b612bfba2b22
|
/QuickFramework/cn/js/fan/test/TestWord2BASE64.java
|
52cee2beafd0ee94800447d9ae6950d956958943
|
[] |
no_license
|
503324754/ywoa
|
0ed986949ceed0c0b1da0ed5126ea506dcaa325a
|
c9ffc5a73197ff3c5dad0dd59c72dbf0e72cf91f
|
refs/heads/master
| 2023-05-30T19:42:12.478887
| 2021-06-15T12:00:56
| 2021-06-15T12:00:56
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 7,287
|
java
|
package cn.js.fan.test;
import java.io.File;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import cn.js.fan.security.SecurityUtil;
import cn.js.fan.util.file.FileUtil;
import java.io.FileNotFoundException;
import java.io.BufferedReader;
import java.io.FileReader;
import sun.misc.BASE64Encoder;
import sun.misc.BASE64Decoder;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2005</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class TestWord2BASE64 {
public TestWord2BASE64() {
}
public boolean Hex2WordFile(String filePathSrc, String filePathDes) {
String hexString = "";
SecurityUtil su = new SecurityUtil();
boolean re = false;
BufferedReader file = null;
FileOutputStream output = null;
String strline = "";
try {
file = new BufferedReader(new FileReader(filePathSrc));
output = new FileOutputStream(filePathDes);
// 读取一行数据并保存到currentRecord变量中
strline = file.readLine();
while (strline!=null) {
byte[] bytes = su.hexstr2byte(strline);
output.write(bytes, 0, bytes.length);
strline = file.readLine();
}
re = true;
} catch (IOException e) { //错误处理
System.out.println("读取数据错误.");
}
finally {
try {
output.flush();
output.close();
file.close();
}
catch (Exception e) {
System.out.println(e.getMessage());
}
}
return re;
}
public String Word2HexString(String filePathSrc, String filePathDes) {
String hexString = "";
SecurityUtil su = new SecurityUtil();
boolean re = false;
File fSrc = new File(filePathSrc);
if (!fSrc.exists())
return "";
try {
if (fSrc.isFile()) {
FileInputStream input = new FileInputStream(fSrc);
byte[] b = new byte[1024 * 5];
int len;
while ((len = input.read(b)) != -1) {
hexString += su.byte2hex(b);
}
input.close();
} else
System.out.print("debug:" + filePathSrc + "已不存在!");
} catch (IOException e) {
System.out.print(e.getMessage());
}
return hexString;
}
public boolean Word2HexFile(String filePathSrc, String filePathDes) {
String hexString = "";
SecurityUtil su = new SecurityUtil();
boolean re = false;
File fSrc = new File(filePathSrc);
if (!fSrc.exists())
return re;
try {
if (fSrc.isFile()) {
FileInputStream input = new FileInputStream(fSrc);
byte[] b = new byte[1024 * 5];
int len;
while ((len = input.read(b)) != -1) {
hexString += su.byte2hex(b);
}
input.close();
re = true;
} else
System.out.print("debug:" + filePathSrc + "已不存在!");
} catch (IOException e) {
System.out.print(e.getMessage());
}
try {
FileUtil fut = new FileUtil();
fut.WriteFile(filePathDes, hexString);
}
catch (FileNotFoundException e) {
System.out.println(e.getMessage());
}
return re;
}
public boolean Word2BASE64File(String filePathSrc, String filePathDes) {
String hexString = Word2BASE64String(filePathSrc);
boolean re = true;
try {
FileUtil fut = new FileUtil();
fut.WriteFile(filePathDes, hexString);
}
catch (FileNotFoundException e) {
System.out.println(e.getMessage());
}
return re;
}
public String Word2BASE64String(String filePathSrc) {
String str = "";
SecurityUtil su = new SecurityUtil();
boolean re = false;
File fSrc = new File(filePathSrc);
if (!fSrc.exists())
return "";
try {
if (fSrc.isFile()) {
FileInputStream input = new FileInputStream(fSrc);
byte[] b = new byte[1024 * 5];
int len;
while ((len = input.read(b)) != -1) {
str += new BASE64Encoder().encode(b);
}
input.close();
} else
System.out.print("debug:Word2BASE64String" + filePathSrc + "已不存在!");
} catch (IOException e) {
System.out.print(e.getMessage());
}
return str;
}
public boolean BASE642WordFile(String filePathSrc, String filePathDes) {
String hexString = "";
SecurityUtil su = new SecurityUtil();
boolean re = false;
BufferedReader file = null;
FileOutputStream output = null;
String strline = "";
try {
file = new BufferedReader(new FileReader(filePathSrc));
output = new FileOutputStream(filePathDes);
// 读取一行数据并保存到currentRecord变量中
strline = file.readLine();
while (strline!=null) {
byte[] bytes = new BASE64Decoder().decodeBuffer(strline);
output.write(bytes, 0, bytes.length);
strline = file.readLine();
}
re = true;
} catch (IOException e) { //错误处理
System.out.println("读取数据错误.");
}
finally {
try {
output.flush();
output.close();
file.close();
}
catch (Exception e) {
System.out.println(e.getMessage());
}
}
return re;
}
public boolean BASE64String2WordFile(String base64Str, String filePathDes) {
boolean re = false;
FileOutputStream output = null;
try {
output = new FileOutputStream(filePathDes);
byte[] bytes = new BASE64Decoder().decodeBuffer(base64Str);
output.write(bytes, 0, bytes.length);
re = true;
} catch (IOException e) { //错误处理
System.out.println("读取数据错误.");
} finally {
try {
output.flush();
output.close();
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
return re;
}
public static void main(String[] args) throws Exception {
TestWord2BASE64 twb = new TestWord2BASE64();
// twb.Word2HexFile("c:/doc1.doc", "c:/dochex.txt");
// twb.Hex2WordFile("c:/dochex.txt", "c:/doc1_tran.doc");
// twb.Word2BASE64File("c:/aaa.doc", "c:/aaa.txt");
// twb.BASE642WordFile("c:/aaa.txt", "c:/555.doc");
String str = twb.Word2BASE64String("c:/aaa.doc");
twb.BASE64String2WordFile(str, "c:/666.doc");
}
}
|
[
"bestfeng@163.com"
] |
bestfeng@163.com
|
cff87d4ca6fece3a0bcdd52a44f20562dbfc9c41
|
a7b446d5a64e2e642f019242ca1d81ffd9493650
|
/src/java/de/tbsol/iptablesjava/iptc/structs/in_addr.java
|
68ebfb95614907e8da3b54be2b7309382e7fe0ed
|
[] |
no_license
|
gholdzhang/bsms
|
534027e0d23dd33a3061865abcd72e37af2743fa
|
a4a43f956c3b0937bfe8caf8ded18f743074d831
|
refs/heads/master
| 2023-03-21T08:02:27.470756
| 2019-02-13T09:19:40
| 2019-02-13T09:19:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 906
|
java
|
/**
* Copyright 2011-2011 by Torsten Boob
*
* This file is part of iptables-java project.
*
* iptables-java is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* iptables-java is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this software. If not, see http://www.gnu.org/licenses/.
*
*/
package de.tbsol.iptablesjava.iptc.structs;
import com.sun.jna.Structure;
public class in_addr extends Structure {
public byte[] s_addr = new byte[4];
}
|
[
"465805947@QQ.com"
] |
465805947@QQ.com
|
480f495d0000611d3bc7bccc5be98dd5ea215881
|
8553367f97586cfb9e878fcaffe7a11b912dbc96
|
/jdk-source/jdk1.8/src/main/java/org/omg/DynamicAny/NameValuePair.java
|
8bfb81af69b7dfc16190c345b661aa58c19e16e6
|
[] |
no_license
|
GoldWater16/GoldWater
|
92abb6b4f2e448469408771d8aad96a9b412aa0a
|
8180d5689c8059c0fe9fbbe2770e8f6947d35c73
|
refs/heads/master
| 2023-07-20T12:30:06.481550
| 2022-05-21T15:27:09
| 2022-05-21T15:27:09
| 174,562,633
| 2
| 3
| null | 2023-07-13T17:02:44
| 2019-03-08T15:36:04
|
Java
|
UTF-8
|
Java
| false
| false
| 772
|
java
|
package org.omg.DynamicAny;
/**
* org/omg/DynamicAny/NameValuePair.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u60/4407/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl
* Tuesday, August 4, 2015 11:07:52 AM PDT
*/
public final class NameValuePair implements org.omg.CORBA.portable.IDLEntity
{
/**
* The name associated with the Any.
*/
public String id = null;
/**
* The Any value associated with the name.
*/
public org.omg.CORBA.Any value = null;
public NameValuePair ()
{
} // ctor
public NameValuePair (String _id, org.omg.CORBA.Any _value)
{
id = _id;
value = _value;
} // ctor
} // class NameValuePair
|
[
"huzewu@lecloudpay.com"
] |
huzewu@lecloudpay.com
|
5b78172e7cead32a8150bb23fd8eeea272f7971c
|
781e2692049e87a4256320c76e82a19be257a05d
|
/all_data/cs61bl/lab03/cs61bl-iv/Debug.java
|
f538b600d396dd4b99d68acf299bc3ac59c3605a
|
[] |
no_license
|
itsolutionscorp/AutoStyle-Clustering
|
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
|
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
|
refs/heads/master
| 2020-12-11T07:27:19.291038
| 2016-03-16T03:18:00
| 2016-03-16T03:18:42
| 59,454,921
| 4
| 0
| null | 2016-05-23T05:40:56
| 2016-05-23T05:40:56
| null |
UTF-8
|
Java
| false
| false
| 1,430
|
java
|
public class Debug {
String myString;
public Debug(String s) {
myString = s;
}
/**
* Return true when myString is the result of inserting exactly one
* character into s, and return false otherwise.
*/
public boolean contains1MoreThan(String s) {
if (myString.length() == 0) {
return false;
} else if (s.length() == 0) {
return myString.length() == 1;
} else if (myString.charAt(0) == s.charAt(0)) {
Debug remainder = new Debug(myString.substring(1));
return remainder.contains1MoreThan(s.substring(1));
} else {
return myString.substring(1).equals(s);
//return myString.substring(1) == s;
}
}
public static void main(String[] args) {
check("abc", "def"); // should be false
check("abc2", "abc"); // should be true
check("abc22", "abc"); // should be false
check("2a", "a"); // should be true
check("a2bc", "abc"); // true
//check(1,0); //crash
check("banana", "bananas" ); //should be false
check("bananas", "banana" ); //should be true
check("1","2"); //false
check("1", ""); //true
check("", "1"); //true
check("", ""); //false
}
public static void check(String s1, String s2) {
Debug d = new Debug(s1);
if (d.contains1MoreThan(s2)) {
System.out.println(s1
+ " is the result of adding a single character to " + s2);
} else {
System.out.println(s1
+ " is not the result of adding a single character to "
+ s2);
}
}
}
|
[
"moghadam.joseph@gmail.com"
] |
moghadam.joseph@gmail.com
|
fd385c0667dbce32f2e8d1b28811617974954152
|
f91fe1065c172a24299146f685811db426ed732e
|
/spring-master/src/test/java/org/mybatis/spring/sample/SampleJavaConfigTest.java
|
8533735d0c95dbfea6123a44f78c77a9271b23ef
|
[
"Apache-2.0"
] |
permissive
|
xiaokukuo/soundcode-springmybatis
|
649c8c93141fd070a51c63543cd3d21b2b5e9338
|
87e1c24639b37b813ba41b1b6ad05387d1ea768f
|
refs/heads/master
| 2020-03-12T04:11:53.043180
| 2018-08-18T06:06:04
| 2018-08-18T06:06:04
| 130,440,014
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,694
|
java
|
/**
* Copyright 2010-2018 the original author or authors.
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.
* <p>
* MyBatis @Configuration style sample
*/
/**
* MyBatis @Configuration style sample
*/
package org.mybatis.spring.sample;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
import org.mybatis.spring.sample.config.SampleConfig;
import org.mybatis.spring.sample.domain.User;
import org.mybatis.spring.sample.service.FooService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
@SpringJUnitConfig(classes = SampleConfig.class)
public class SampleJavaConfigTest {
@Autowired
private FooService fooService;
@Autowired
private FooService fooServiceWithMapperFactoryBean;
@Test
void test() {
User user = fooService.doSomeBusinessStuff("u1");
assertThat(user.getName()).isEqualTo("Pocoyo");
}
@Test
void testWithMapperFactoryBean() {
User user = fooServiceWithMapperFactoryBean.doSomeBusinessStuff("u1");
assertThat(user.getName()).isEqualTo("Pocoyo");
}
}
|
[
"976886537@qq.com"
] |
976886537@qq.com
|
00a735199c170dcb57b2310bdd07dd0532009cd4
|
1f3beaa052725c1ba296d4ca64ada2c0cb68c4fa
|
/app/src/main/java/com/xyd/susong/commissionorder/CommissionOrderActivity.java
|
6e3a4fdf818732f7accd69c0fa7ac7ea4f5bf077
|
[] |
no_license
|
zhengyiheng123/susong_special
|
adad056047f1b6d3a13d14c4c246aa4480648cb4
|
fc9095d984f6903a6d574d0ce52ba039dc65d924
|
refs/heads/master
| 2021-05-05T20:37:21.070922
| 2018-01-05T03:53:43
| 2018-01-05T03:53:43
| 114,829,843
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,455
|
java
|
package com.xyd.susong.commissionorder;
import android.graphics.Color;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xyd.susong.R;
import com.xyd.susong.api.OrderApi;
import com.xyd.susong.base.BaseActivity;
import com.xyd.susong.base.BaseApi;
import com.xyd.susong.base.BaseModel;
import com.xyd.susong.base.BaseObserver;
import com.xyd.susong.base.RxSchedulers;
import java.util.ArrayList;
import java.util.List;
import butterknife.Bind;
/**
* @author: zhaoxiaolei
* @date: 2017/7/13
* @time: 15:03
* @description: 提成订单
*/
public class CommissionOrderActivity extends BaseActivity implements SwipeRefreshLayout.OnRefreshListener, BaseQuickAdapter.RequestLoadMoreListener {
@Bind(R.id.base_title_back)
TextView baseTitleBack;
@Bind(R.id.base_title_title)
TextView baseTitleTitle;
@Bind(R.id.base_title_menu)
ImageView baseTitleMenu;
@Bind(R.id.commission_rv)
RecyclerView commissionRv;
@Bind(R.id.commission_srl)
SwipeRefreshLayout commissionSrl;
private CommissionOrderAdapter adapter;
private List<CommissionOrderModel.DeductBean> list;
private TextView money;
private int page = 1, num = 10;
@Override
protected int getLayoutId() {
return R.layout.activity_commission_order;
}
@Override
protected void initView() {
baseTitleTitle.setText("我的提成订单");
baseTitleMenu.setVisibility(View.INVISIBLE);
commissionSrl.setColorSchemeColors(getResources().getColor(R.color.theme_color));
commissionSrl.setOnRefreshListener(this);
commissionRv.setLayoutManager(new LinearLayoutManager(this));
initAdapter();
addHeadView();
getData();
}
private void getData() {
BaseApi.getRetrofit()
.create(OrderApi.class)
.deduct_order(page, num)
.compose(RxSchedulers.<BaseModel<CommissionOrderModel>>compose())
.subscribe(new BaseObserver<CommissionOrderModel>() {
@Override
protected void onHandleSuccess(CommissionOrderModel commissionOrderModel, String msg, int code) {
commissionSrl.setRefreshing(false);
adapter.loadMoreComplete();
money.setText(commissionOrderModel.getTotal_revenue()+"元");
if (page == 1) {
adapter.setNewData(commissionOrderModel.getDeduct());
}else if (commissionOrderModel.getDeduct().size()>0){
adapter.addData(commissionOrderModel.getDeduct());
}else {
adapter.loadMoreEnd();
}
}
@Override
protected void onHandleError(String msg) {
commissionSrl.setRefreshing(false);
adapter.loadMoreComplete();
showToast(msg);
}
});
}
private void addHeadView() {
View headView = LayoutInflater.from(this).inflate(R.layout.payments_head, (ViewGroup) commissionRv.getParent(), false);
money = (TextView) headView.findViewById(R.id.payments_tv_price);
adapter.addHeaderView(headView);
}
private void initAdapter() {
list = new ArrayList<>();
adapter = new CommissionOrderAdapter(list, this);
adapter.setOnLoadMoreListener(this, commissionRv);
// adapter.openLoadAnimation(BaseQuickAdapter.SLIDEIN_LEFT);
commissionRv.setAdapter(adapter);
}
@Override
protected void initEvent() {
baseTitleBack.setOnClickListener(this);
}
@Override
public void widgetClick(View v) {
switch (v.getId()) {
case R.id.base_title_back:
finish();
break;
}
}
@Override
public void onRefresh() {
page=1;
getData();
}
@Override
public void onLoadMoreRequested() {
page++;
getData();
}
}
|
[
"15621599930@163.com"
] |
15621599930@163.com
|
7729e5d622dc4752115da43df12b6cd09448948c
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava17/Foo354Test.java
|
435612278946908db530e9fbdb31116ff0223f73
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 482
|
java
|
package applicationModulepackageJava17;
import org.junit.Test;
public class Foo354Test {
@Test
public void testFoo0() {
new Foo354().foo0();
}
@Test
public void testFoo1() {
new Foo354().foo1();
}
@Test
public void testFoo2() {
new Foo354().foo2();
}
@Test
public void testFoo3() {
new Foo354().foo3();
}
@Test
public void testFoo4() {
new Foo354().foo4();
}
@Test
public void testFoo5() {
new Foo354().foo5();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
08c4646d6cd52978218d61c62e11a52041ada4d8
|
7b82d70ba5fef677d83879dfeab859d17f4809aa
|
/f/db_cms/Open1111/src/main/java/com/open1111/entity/Article.java
|
dde0dc69b79d0d4691244d1161afd5399831c0fb
|
[] |
no_license
|
apollowesley/jun_test
|
fb962a28b6384c4097c7a8087a53878188db2ebc
|
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
|
refs/heads/main
| 2022-12-30T20:47:36.637165
| 2020-10-13T18:10:46
| 2020-10-13T18:10:46
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,171
|
java
|
package com.open1111.entity;
import java.util.Date;
/**
* 帖子实体类
* @author user
*
*/
public class Article {
private Integer id; // 编号
private String title; // 标题
private Date publishDate; // 发布日期
private String content; // 内容
private String summary; // 摘要
private String titleColor; // 标题颜色 默认黑色
private Integer click=0; // 阅读次数
private Integer isRecommend=0; // 是否推荐帖子 1 是 0 否
private Integer isSlide=0; // 是否是幻灯帖子 1 是 0 否
private ArcType arcType; // 帖子类型
private String keyWords; // 关键字
private String slideImage; // 幻灯图片
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Date getPublishDate() {
return publishDate;
}
public void setPublishDate(Date publishDate) {
this.publishDate = publishDate;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getTitleColor() {
return titleColor;
}
public void setTitleColor(String titleColor) {
this.titleColor = titleColor;
}
public Integer getClick() {
return click;
}
public void setClick(Integer click) {
this.click = click;
}
public Integer getIsRecommend() {
return isRecommend;
}
public void setIsRecommend(Integer isRecommend) {
this.isRecommend = isRecommend;
}
public Integer getIsSlide() {
return isSlide;
}
public void setIsSlide(Integer isSlide) {
this.isSlide = isSlide;
}
public ArcType getArcType() {
return arcType;
}
public void setArcType(ArcType arcType) {
this.arcType = arcType;
}
public String getKeyWords() {
return keyWords;
}
public void setKeyWords(String keyWords) {
this.keyWords = keyWords;
}
public String getSlideImage() {
return slideImage;
}
public void setSlideImage(String slideImage) {
this.slideImage = slideImage;
}
}
|
[
"wujun728@hotmail.com"
] |
wujun728@hotmail.com
|
0b1d69aa021cd87283fcc3821237415ae46d5663
|
9c4c1c5bebd24a4085e4da83224e2795b17e7ab5
|
/crmd-cas-intf/crmd-cas-intf-api/src/main/java/com/ffcs/crmd/cas/intf/api/dto/ISaleAcctItemInDTO.java
|
92432cf382bc5a7f46331b734723ebdd7af03fd9
|
[] |
no_license
|
myloveyuvip/cas
|
465ab0e5dde150e33c833a5bff8fad7250692460
|
3899eae2953111f5c4de396f3940cec9b92ba53a
|
refs/heads/master
| 2020-12-26T03:55:49.280946
| 2016-06-21T03:13:12
| 2016-06-21T03:13:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,295
|
java
|
/*
* This class was automatically generated with
* <a href="http://www.castor.org">Castor 1.3.3</a>, using an XML
* Schema.
* $Id$
*/
package com.ffcs.crmd.cas.intf.api.dto;
/**
* 集团费用项
*
* @version $Revision$ $Date$
*/
@SuppressWarnings("serial")
public class ISaleAcctItemInDTO implements java.io.Serializable {
/**
* 集团费用项ID
*/
private long isaleAcctItemId;
/**
* P单号
*/
private String saleSerial;
/**
* 账目项类型
*/
private String extAcctItemCd;
/**
* 账目项流水
*/
private String realAmount;
private Long extAcctItemId;
public ISaleAcctItemInDTO() {
super();
}
public Long getExtAcctItemId() {
return this.extAcctItemId;
}
public void setExtAcctItemId(Long extAcctItemId) {
this.extAcctItemId = extAcctItemId;
}
/**
* Returns the value of field 'extAcctItemCd'. The field
* 'extAcctItemCd' has the following description: 账目项类型
*
* @return the value of field 'ExtAcctItemCd'.
*/
public String getExtAcctItemCd() {
return this.extAcctItemCd;
}
/**
* Returns the value of field 'isaleAcctItemId'. The field
* 'isaleAcctItemId' has the following description: 集团费用项ID
*
* @return the value of field 'IsaleAcctItemId'.
*/
public long getIsaleAcctItemId() {
return this.isaleAcctItemId;
}
/**
* Returns the value of field 'realAmount'. The field
* 'realAmount' has the following description: 账目项流水
*
* @return the value of field 'RealAmount'.
*/
public String getRealAmount() {
return this.realAmount;
}
/**
* Returns the value of field 'saleSerial'. The field
* 'saleSerial' has the following description: P单号
*
* @return the value of field 'SaleSerial'.
*/
public String getSaleSerial() {
return this.saleSerial;
}
/**
* Sets the value of field 'extAcctItemCd'. The field
* 'extAcctItemCd' has the following description: 账目项类型
*
* @param extAcctItemCd the value of field 'extAcctItemCd'.
*/
public void setExtAcctItemCd(final String extAcctItemCd) {
this.extAcctItemCd = extAcctItemCd;
}
/**
* Sets the value of field 'isaleAcctItemId'. The field
* 'isaleAcctItemId' has the following description: 集团费用项ID
*
* @param isaleAcctItemId the value of field 'isaleAcctItemId'.
*/
public void setIsaleAcctItemId(final long isaleAcctItemId) {
this.isaleAcctItemId = isaleAcctItemId;
}
/**
* Sets the value of field 'realAmount'. The field 'realAmount'
* has the following description: 账目项流水
*
* @param realAmount the value of field 'realAmount'.
*/
public void setRealAmount(final String realAmount) {
this.realAmount = realAmount;
}
/**
* Sets the value of field 'saleSerial'. The field 'saleSerial'
* has the following description: P单号
*
* @param saleSerial the value of field 'saleSerial'.
*/
public void setSaleSerial(final String saleSerial) {
this.saleSerial = saleSerial;
}
}
|
[
"qn_guo@sina.com"
] |
qn_guo@sina.com
|
266f331733399359e291da03eee613c51d925c73
|
433eae1806c7c4a0b2ddbc16bb59d296df2482ea
|
/WMb2b-service/src/main/java/com/wangmeng/sys/legacy/impl/PowerServiceImpl.java
|
b2e181dc390454b0739694909eb0263880794f4a
|
[] |
no_license
|
tomdev2008/zxzshop-parent
|
23dbb7dadcf2d342abb8685f8970312a73199d81
|
c08568df051b8e592ac35f7ca13e0d4940780a72
|
refs/heads/master
| 2021-01-12T01:03:25.156508
| 2017-01-06T05:39:40
| 2017-01-06T05:39:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,369
|
java
|
package com.wangmeng.sys.legacy.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.wangmeng.common.pagination.IPageView;
import com.wangmeng.common.pagination.PageView;
import com.wangmeng.contants.Constant;
import com.wangmeng.filter.XClause;
import com.wangmeng.filter.XCriterion;
import com.wangmeng.mybatis.CriterionHelper;
import com.wangmeng.sys.legacy.api.IPowerService;
import com.wangmeng.sys.legacy.constants.SysConstant;
import com.wangmeng.sys.legacy.domain.SysPower;
import com.wangmeng.sys.legacy.domain.SysRolePower;
import com.wangmeng.sys.legacy.filter.SysPowerExample;
import com.wangmeng.sys.legacy.filter.SysRolePowerExample;
import com.wangmeng.sys.legacy.mapping.SysPowerMapper;
import com.wangmeng.sys.legacy.mapping.SysRolePowerMapper;
import com.wangmeng.sys.legacy.model.SysPowerModel;
import com.wangmeng.sys.legacy.model.SysPowerModelExt;
/**
* @author yikuide
*
*/
public class PowerServiceImpl implements IPowerService {
//用户权限服务
@Autowired
private SysPowerMapper sysPowerMapper;
//角色权限服务
@Autowired
private SysRolePowerMapper sysRolePowerMapper;
/**
* 分页查询
* @param pageSize
* @param pageNo
* @param criterion
* @return
*/
public IPageView<SysPower> getPage(int pageSize, int pageNo, XCriterion criterion){
IPageView<SysPower> pageSchema = null;
SysPowerExample example = new SysPowerExample();
if(criterion != null && criterion.getClauseSeqs()!=null && criterion.getClauseSeqs().size()>0){
List<XClause> clist = criterion.getClauseSeqs();
for(XClause clause : clist){
if(clause != null ){
CriterionHelper.push(example.getScalarExistedCriteria(), clause);
}
}
}
int total = sysPowerMapper.countByExample(example);
if(total>0){
pageSchema = new PageView<SysPower>();
pageSchema.push(pageSize, pageNo, total);
if(pageNo>0 && pageNo<=pageSchema.getTotalPage()) {
example.setPageSchema(pageSchema);
List<SysPower> listPower = sysPowerMapper.selectByExample(example);
List<SysPower> listPowerModel = new ArrayList<SysPower>();
for(SysPower sp:listPower){
SysPowerModelExt spm = new SysPowerModelExt();
BeanUtils.copyProperties(sp, spm);
if(!StringUtils.equals(sp.getSuperid(), SysConstant.POWER_SUPERID_NOT_DEFINED)){
SysPower childrenSp = sysPowerMapper.selectByPrimaryKey(Long.valueOf(sp.getSuperid()));
spm.setSysPower(childrenSp);
}
listPowerModel.add(spm);
}
pageSchema.setDataList(listPowerModel);
}
}
return pageSchema;
}
/**
* 获取选中的权限信息
* @param roleId
* @return
*/
public Map<String,List<SysPowerModel>> findPowerMapListByRoleId(String roleId){
SysRolePowerExample rolePowerEx = new SysRolePowerExample();
rolePowerEx.or().andRoleidEqualTo(Long.valueOf(roleId));
List<SysRolePower> listRolePower = sysRolePowerMapper.selectByExample(rolePowerEx);
return powerMapList(listRolePower);
}
/**
* 获取所有的权限
* @return
*/
public Map<String,List<SysPowerModel>> powerMapList(List<SysRolePower> listRolePower) {
HashMap<String,List<SysPowerModel>> map=new HashMap<String, List<SysPowerModel>>();
//父级权限信息
SysPowerExample powerExample = new SysPowerExample();
powerExample.or().andSuperidEqualTo(SysConstant.POWER_SUPERID_NOT_DEFINED);
List<SysPower> listPower = selectByExample(powerExample);
for(SysPower rootPower:listPower){
List<SysPowerModel> listRootPower = new ArrayList<SysPowerModel>();
SysPowerModel rootPowerModel = new SysPowerModel();
BeanUtils.copyProperties(rootPower, rootPowerModel);
for(SysRolePower srp:listRolePower){
if(StringUtils.equals(String.valueOf(srp.getPowerid()), String.valueOf(rootPower.getId()))){
//根权限代表选中
rootPowerModel.setChecked(Constant.DATA_ENABLED);
}
}
listRootPower.add(rootPowerModel);
//查询子级权限信息
SysPowerExample childrenPowerExample = new SysPowerExample();
childrenPowerExample.or().andSuperidEqualTo(String.valueOf(rootPower.getId()));
List<SysPower> childrenListPower = selectByExample(childrenPowerExample);
if(childrenListPower!=null&&!childrenListPower.isEmpty()){
List<SysPowerModel> listPowerModel = new ArrayList<SysPowerModel>();
for(SysPower sp:childrenListPower){
SysPowerModel childrenPowerModel = new SysPowerModel();
BeanUtils.copyProperties(sp, childrenPowerModel);
for(SysRolePower srp:listRolePower){
if(StringUtils.equals(String.valueOf(srp.getPowerid()), String.valueOf(sp.getId()))){
//子权限代表选中
childrenPowerModel.setChecked(Constant.DATA_ENABLED);
}
}
listPowerModel.add(childrenPowerModel);
}
listRootPower.addAll(listPowerModel);
}
if(listRootPower.size()>=1){
map.put(rootPower.getPowerName(), listRootPower);
}
}
return map;
}
/**
* 获取所有的权限
* @return
*/
public Map<String,List<SysPower>> findAllPower() {
HashMap<String,List<SysPower>> map=new HashMap<String, List<SysPower>>();
//父级权限信息
SysPowerExample powerExample = new SysPowerExample();
powerExample.or().andSuperidEqualTo(SysConstant.POWER_SUPERID_NOT_DEFINED);
List<SysPower> listPower = selectByExample(powerExample);
for(SysPower rootPower:listPower){
List<SysPower> listRootPower = new ArrayList<SysPower>();
listRootPower.add(rootPower);
//查询子级权限信息
SysPowerExample childrenPowerExample = new SysPowerExample();
childrenPowerExample.or().andSuperidEqualTo(String.valueOf(rootPower.getId()));
List<SysPower> childrenListPower = selectByExample(childrenPowerExample);
if(childrenListPower!=null&&!childrenListPower.isEmpty()){
listRootPower.addAll(childrenListPower);
}
if(listRootPower.size()>=1){
map.put(rootPower.getPowerName(), listRootPower);
}
}
return map;
}
public List<SysPower> selectByExample(SysPowerExample example) {
return sysPowerMapper.selectByExample(example);
}
public int addSysPower(SysPower sysPower) {
return sysPowerMapper.insert(sysPower);
}
public SysPower getSysPowerById(String id){
if(!StringUtils.isEmpty(id)){
return sysPowerMapper.selectByPrimaryKey(Long.valueOf(id));
}
return null;
}
public boolean updateSysPower(SysPower sysPower){
SysPower entityR = sysPowerMapper.selectByPrimaryKey(sysPower.getId());
entityR.setDisplay(sysPower.getDisplay());
entityR.setPowerName(sysPower.getPowerName());
entityR.setRedirectUrl(sysPower.getRedirectUrl());
if(sysPower.getSta()!=null){
entityR.setSta(sysPower.getSta());
}
entityR.setSuperid(sysPower.getSuperid());
entityR.setSourceType(sysPower.getSourceType());
entityR.setOwner(sysPower.getOwner());
entityR.setModifyTime(sysPower.getModifyTime());
int i = sysPowerMapper.updateByPrimaryKey(entityR);
if(i>0){
return true;
}
return false;
}
public boolean deleteSysPower(String id){
int i =0;
if(!StringUtils.isEmpty(id)){
i = sysPowerMapper.deleteByPrimaryKey(Long.valueOf(id));
if(i>=0){
return true;
}
}
return false;
}
}
|
[
"admin"
] |
admin
|
4b49234064018766529c1e64de7b308ae9c3fa0f
|
6763a82f74a894287a1c0407b727232fac8f239a
|
/trunk/src/com/mycms/common/security/rememberme/RememberMeAuthenticationException.java
|
9f1bc2432bcfbe0b73408c9e43efd317d89ab1df
|
[] |
no_license
|
BGCX262/zyzweb-svn-to-git
|
6df8115aa373b3bde4ea31d9a438789475f9032d
|
87d05607d72c449fe8a730dc2a50f120b09c5dff
|
refs/heads/master
| 2016-09-02T01:14:38.145479
| 2015-08-23T06:47:43
| 2015-08-23T06:47:43
| 41,244,893
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 353
|
java
|
package com.mycms.common.security.rememberme;
import com.mycms.common.security.AuthenticationException;
@SuppressWarnings("serial")
public class RememberMeAuthenticationException extends AuthenticationException {
public RememberMeAuthenticationException() {
}
public RememberMeAuthenticationException(String msg) {
super(msg);
}
}
|
[
"you@example.com"
] |
you@example.com
|
31c83f878d3d8e2743b4a872f714466c4a2c4122
|
b61a8ce87a27a325dba024f3d0fc67fb596fd291
|
/0522/Homework/Mini.java
|
159b152e92ff7ef2dfd655f5a9a5eb6acd691988
|
[] |
no_license
|
sagek23/Java-Training
|
df8b7003b2d791f99c195433f61685a3ded3988a
|
015e3dfffb10e3665960a71203cfcf37783048df
|
refs/heads/master
| 2022-07-12T06:42:13.632644
| 2019-10-31T00:36:09
| 2019-10-31T00:36:09
| 218,571,922
| 0
| 0
| null | 2022-06-22T20:06:54
| 2019-10-30T16:24:33
|
Java
|
UHC
|
Java
| false
| false
| 604
|
java
|
/*사용자로부터 3개의 정수를 입력받아 if-else문을 사용하여 가장 작은 값을 결정하는
프로그램을 작성*/
import java.util.*;
class Mini
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.print("첫번째 수==> ");
int a = sc.nextInt();
System.out.print("두번째 수==> ");
int b = sc.nextInt();
System.out.print("세번째 수==> ");
int c = sc.nextInt();
int min;
if (a<b)
if(a<c)
min = a;
else
min = c;
else
if(b<c)
min = b;
else
min = c;
System.out.println(min);
}
}
|
[
"ksjsjk123@gmail.com"
] |
ksjsjk123@gmail.com
|
4ea183cdb097089d9a11a8d963d11d1b02b662e0
|
511909dece65ca69e44d89e7cb30013afe599b71
|
/rockermq-demo/src/main/java/com/lxf/rocketdemo/delay/Consumer.java
|
f1956a2d07b303531161395d2be824ae51623c76
|
[] |
no_license
|
liangxifeng833/java
|
b0b84eb7cb719ebf588e6856ab7d8441573213ae
|
fe9fe02a91671df789ad45664752ffa1f9da7821
|
refs/heads/master
| 2023-05-25T21:02:32.522297
| 2023-05-12T03:37:33
| 2023-05-12T03:37:33
| 253,181,449
| 0
| 0
| null | 2022-12-16T15:27:56
| 2020-04-05T07:44:02
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,914
|
java
|
package com.lxf.rocketdemo.delay;
import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer;
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext;
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus;
import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.common.protocol.heartbeat.MessageModel;
import java.util.List;
/**
* 消费者消费消息
*/
public class Consumer {
public static void main(String[] args) throws Exception {
//1.创建消费者Consumer, 指定消费者组名
DefaultMQPushConsumer consumer = new DefaultMQPushConsumer("group1");
//2.指定Nameserver地址
consumer.setNamesrvAddr("192.168.2.103:9876;192.168.2.103:9877;");
//3.订阅主题Topic和Tag
consumer.subscribe("Delay-msg", "*");
consumer.setVipChannelEnabled(false);
//消费模式分为:广播和负载均衡模式,默认负载均衡模式MessageModel.CLUSTERING,广播模式设置为:MessageModel.BROADCASTING
consumer.setMessageModel(MessageModel.BROADCASTING);
//4.设置回调函数,处理消息
consumer.registerMessageListener(new MessageListenerConcurrently(){
//接收消息内容
public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> msgs, ConsumeConcurrentlyContext context) {
for (MessageExt msg : msgs) {
System.out.println("延迟消费,消费id=:"+msg.getMsgId()+",延迟时间=" + (System.currentTimeMillis()-msg.getStoreTimestamp() ));
}
return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
}
});
//启动消费者consumer
consumer.start();
System.out.println("延迟消费开始");
}
}
|
[
"liangxifeng833@163.com"
] |
liangxifeng833@163.com
|
146d97225dcaa1ca05a63d26b79e3ad6844dc8f7
|
3c178b1dbb44237afe8d435336a265a73f4d66ea
|
/com/google/wireless/gdata2/client/ResourceNotFoundException.java
|
766abd6d766e98b22770c9031fca5613ff92d070
|
[] |
no_license
|
AndroidSDKSources/android-sdk-sources-for-api-level-5
|
b7806884853389ff288b3adbdaf28f14893549a0
|
baef9e37c1298f278f4fc212b9910810bf262a0b
|
refs/heads/master
| 2021-01-15T15:05:15.383833
| 2015-06-13T15:27:01
| 2015-06-13T15:27:01
| 37,376,449
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 949
|
java
|
// Copyright 2009 The Android Open Source Project.
package com.google.wireless.gdata2.client;
import com.google.wireless.gdata2.GDataException;
/**
* Exception thrown when a specified resource does not exist
*/
public class ResourceNotFoundException extends GDataException {
/**
* Creates a new ResourceNotFoundException.
*/
public ResourceNotFoundException() {
}
/**
* Creates a new ResourceNotFoundException with a supplied message.
* @param message The message for the exception.
*/
public ResourceNotFoundException(String message) {
super(message);
}
/**
* Creates a new ResourceNotFoundException with a supplied message and
* underlying cause.
*
* @param message The message for the exception.
* @param cause Another throwable that was caught and wrapped in this
* exception.
*/
public ResourceNotFoundException(String message, Throwable cause) {
super(message, cause);
}
}
|
[
"root@ifeegoo.com"
] |
root@ifeegoo.com
|
1cc006c1b924a4f53730e0d0f06258ba6ec5f42e
|
1ba27fc930ba20782e9ef703e0dc7b69391e191b
|
/Src/UserMgmt/src/main/java/com/compuware/caqs/security/auth/SessionManager.java
|
131d305b242eb7e8ee51c0fb90eeb55eeb815bf0
|
[] |
no_license
|
LO-RAN/codeQualityPortal
|
b0d81c76968bdcfce659959d0122e398c647b09f
|
a7c26209a616d74910f88ce0d60a6dc148dda272
|
refs/heads/master
| 2023-07-11T18:39:04.819034
| 2022-03-31T15:37:56
| 2022-03-31T15:37:56
| 37,261,337
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 4,769
|
java
|
package com.compuware.caqs.security.auth;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.apache.log4j.Logger;
import com.compuware.caqs.security.auth.exception.TooManyUserException;
import com.compuware.caqs.security.auth.exception.UserAlreadyConnectedException;
import com.compuware.caqs.security.license.License;
import com.compuware.caqs.security.license.LicenseManager;
import com.compuware.caqs.security.license.exception.InvalidMacAddressException;
import com.compuware.caqs.security.license.exception.LicenseExpiredException;
import com.compuware.caqs.security.stats.ConnectionStats;
public class SessionManager {
// déclaration du logger
static protected Logger mLog = Logger.getLogger("Security");
private final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock();
private final Lock r = rwl.readLock();
private final Lock w = rwl.writeLock();
private Map<String, UserData> userMap = new HashMap<String, UserData>();
private int maxAllowedNbUser = 0;
private ConnectionStats stats = ConnectionStats.getInstance();
private static SessionManager singleton = new SessionManager();
public static SessionManager getInstance() {
return SessionManager.singleton;
}
private SessionManager() {
maxAllowedNbUser = getMaxAllowedNbUser();
}
public void removeUser(String cookie) {
UserData usrData = null;
w.lock();
try {
usrData = userMap.get(cookie);
if (usrData != null) {
userMap.remove(cookie);
usrData.cleanSessions();
mLog.info("Disconnecting user:" + usrData.getId());
mLog.info("Total users:" + getTotalUser());
stats.decUser();
}
} finally {
w.unlock();
}
}
public boolean isUserStillConnected(String userId) {
boolean retour = false;
if (userId != null && !"".equals(userId)) {
for (Map.Entry<String, UserData> entry : this.userMap.entrySet()) {
UserData user = entry.getValue();
if (userId.equals(user.getId())) {
retour = true;
break;
}
}
}
return retour;
}
public int getTotalUser() {
int result = 0;
r.lock();
try {
result = userMap.size();
} finally {
r.unlock();
}
return result;
}
public List<UserData> getUserList() {
List<UserData> result = new ArrayList<UserData>();
r.lock();
try {
result.addAll(userMap.values());
} finally {
r.unlock();
}
return result;
}
public boolean addUser(UserData user) throws TooManyUserException, UserAlreadyConnectedException, InvalidMacAddressException, LicenseExpiredException {
boolean result = false;
LicenseManager.getInstance().checkLicense();
w.lock();
try {
if (userMap.containsKey(user.getCookie())) {
UserData existingUser = userMap.get(user.getCookie());
result = true;
stats.incUser(true);
existingUser.addSessions(user.getSessionMap());
} else if (userMap.size() < maxAllowedNbUser) {
userMap.put(user.getCookie(), user);
stats.incUser(false);
result = true;
} else {
throw new TooManyUserException();
}
} finally {
w.unlock();
}
if (result) {
mLog.info("Connecting user: " + user.getId() + ", cookie="
+ user.getCookie());
mLog.info("Total users:" + getTotalUser());
}
return result;
}
public void updateUserActivity(String cookie) {
w.lock();
try {
if (userMap.containsKey(cookie)) {
UserData existingUser = userMap.get(cookie);
existingUser.setLastAccessDate(new Date());
}
} finally {
w.unlock();
}
}
private int getMaxAllowedNbUser() {
int result = 0;
LicenseManager lm = LicenseManager.getInstance();
License lic = lm.getLicense();
if (lic != null) {
result = lic.getMaxConcurrentUsers();
}
return result;
}
}
|
[
"laurent.izac@gmail.com"
] |
laurent.izac@gmail.com
|
77d84ecdfaa294e19c35d317dcfedc021465efeb
|
c41ddba2df7081afa8772e38edf2fd4331affe35
|
/src/main/java/sonar/calculator/mod/client/gui/generators/GuiExtractor.java
|
2141aaa3ec6da0fc379207636207d9a2f31ed26f
|
[] |
no_license
|
Searge-DP/Calculator
|
5422b9cea8d129e67df97d5cc7af8de27cc37470
|
6a268453ef6fb265d6222ec868e66761d2a925bd
|
refs/heads/master
| 2020-12-26T04:15:52.500675
| 2016-02-28T00:36:09
| 2016-02-28T00:36:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,934
|
java
|
package sonar.calculator.mod.client.gui.generators;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import sonar.calculator.mod.common.containers.ContainerExtractor;
import sonar.calculator.mod.common.tileentity.generators.TileEntityGenerator;
import sonar.core.utils.helpers.FontHelper;
public abstract class GuiExtractor extends GuiContainer {
public TileEntityGenerator entity;
public GuiExtractor(InventoryPlayer inventoryPlayer, TileEntityGenerator entity) {
super(new ContainerExtractor(inventoryPlayer, entity));
this.entity = entity;
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y) {
FontHelper.textCentre(FontHelper.translate(entity.getInventoryName()), xSize, 6, 0);
FontHelper.textCentre(FontHelper.formatStorage(entity.storage.getEnergyStored()), this.xSize, 64, 2);
}
public abstract ResourceLocation getResource();
@Override
protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Minecraft.getMinecraft().getTextureManager().bindTexture(getResource());
drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
int k = this.entity.storage.getEnergyStored() * 160 / 1000000;
drawTexturedModalRect(this.guiLeft + 8, this.guiTop + 63, 0, 186, k, 10);
int k2 = this.entity.itemLevel * 138 / 5000;
drawTexturedModalRect(this.guiLeft + 30, this.guiTop + 17, 0, 166, k2, 10);
if (this.entity.maxBurnTime > 0) {
int k3 = this.entity.burnTime * 138 / this.entity.maxBurnTime;
drawTexturedModalRect(this.guiLeft + 30, this.guiTop + 41, 0, 176, k3, 10);
}
}
public static class Starch extends GuiExtractor {
public static final ResourceLocation starch = new ResourceLocation("Calculator:textures/gui/starchgenerator.png");
public Starch(InventoryPlayer inventoryPlayer, TileEntityGenerator entity) {
super(inventoryPlayer, entity);
}
@Override
public ResourceLocation getResource() {
return starch;
}
}
public static class Redstone extends GuiExtractor {
public static final ResourceLocation redstone = new ResourceLocation("Calculator:textures/gui/redstonegenerator.png");
public Redstone(InventoryPlayer inventoryPlayer, TileEntityGenerator entity) {
super(inventoryPlayer, entity);
}
@Override
public ResourceLocation getResource() {
return redstone;
}
}
public static class Glowstone extends GuiExtractor {
public static final ResourceLocation glowstone = new ResourceLocation("Calculator:textures/gui/glowstonegenerator.png");
public Glowstone(InventoryPlayer inventoryPlayer, TileEntityGenerator entity) {
super(inventoryPlayer, entity);
}
@Override
public ResourceLocation getResource() {
return glowstone;
}
}
}
|
[
"ollielansdell@hotmail.co.uk"
] |
ollielansdell@hotmail.co.uk
|
ccd375b9890dfc137ea5fd6e53642d0ed6e443d5
|
7cf543fab3b3629034a899ef17effca580abd1e2
|
/src/main/java/Utilities/Driver.java
|
1db3a0853057fecc8733fbfb5d38d01dd32f50c7
|
[] |
no_license
|
ZafCode/CucumberSetup
|
512b6de3fd4e59c497b98fba5e80999acb0dee79
|
f34e7c7624c8c9becf794596d943cd6cf3eeeed5
|
refs/heads/master
| 2022-12-30T14:54:42.430582
| 2019-12-11T15:44:20
| 2019-12-11T15:44:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,748
|
java
|
package Utilities;
import io.github.bonigarcia.wdm.WebDriverManager;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.safari.SafariDriver;
public class Driver {
private static WebDriver driver;
public static WebDriver get() {
if (driver == null) {
String browser = ConfigurationReader.get("browser");
switch (browser) {
case "chrome":
WebDriverManager.chromedriver().setup();
driver = new ChromeDriver();
break;
case "chrome-headless":
WebDriverManager.chromedriver().setup();
driver = new ChromeDriver(new ChromeOptions().setHeadless(true));
break;
case "firefox":
WebDriverManager.firefoxdriver().setup();
driver = new FirefoxDriver();
break;
case "firefox-headless":
WebDriverManager.firefoxdriver().setup();
driver = new FirefoxDriver(new FirefoxOptions().setHeadless(true));
break;
case "ie":
if (!System.getProperty("os.name").toLowerCase().contains("windows"))
throw new WebDriverException("Your OS doesn't support Internet Explorer");
WebDriverManager.iedriver().setup();
driver = new InternetExplorerDriver();
break;
case "edge":
if (!System.getProperty("os.name").toLowerCase().contains("windows"))
throw new WebDriverException("Your OS doesn't support Edge");
WebDriverManager.edgedriver().setup();
driver = new EdgeDriver();
break;
case "safari":
if (!System.getProperty("os.name").toLowerCase().contains("mac"))
throw new WebDriverException("Your OS doesn't support Safari");
WebDriverManager.getInstance(SafariDriver.class).setup();
driver = new SafariDriver();
break;
}
}
return driver;
}
public static void closeDriver() {
if (driver != null) {
driver.quit();
driver = null;
}
}
}
|
[
"yusuf@kucukvatan.com"
] |
yusuf@kucukvatan.com
|
fafc062d6343eda4e787e01608a381c27dcd29fb
|
6d3a379068deccf0cb338ace333370100f0c79ed
|
/medium/256. Paint House .java
|
60e2d8817511f2867444d1f5ca1a74a1bf83050e
|
[] |
no_license
|
JamesJi9277/Algorithm
|
939a4de318d9fb18ebdb1bb5fc9efe3b7c912215
|
b5c941aa6cdc50af67b7b696e01facfa0061c403
|
refs/heads/master
| 2021-01-24T17:47:40.313126
| 2019-01-02T04:30:53
| 2019-01-02T04:30:53
| 116,856,059
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 693
|
java
|
class Solution {
public int minCost(int[][] costs) {
if (costs == null || costs.length == 0 || costs[0].length == 0) {
return 0;
}
int preRed = costs[0][0];
int preBlue = costs[0][1];
int preGreen = costs[0][2];
for (int i = 1; i < costs.length; i++) {
int curRed = costs[i][0] + Math.min(preBlue, preGreen);
int curBlue = costs[i][1] + Math.min(preRed, preGreen);
int curGreen = costs[i][2] + Math.min(preRed, preBlue);
preRed = curRed;
preBlue = curBlue;
preGreen = curGreen;
}
return Math.min(preRed, Math.min(preGreen, preBlue));
}
}
|
[
"jiqi@gwu.edu"
] |
jiqi@gwu.edu
|
93e27ff6db2815d4beea8b71682e81c9f0e217c3
|
82ce797dcb91dc849a87ec50684811e06cb9a091
|
/app/src/main/java/com/coahr/thoughtrui/Utils/Permission/RuntimeRationale.java
|
e6c424aa499a609d25a9bc95f84efca29f03bb3f
|
[] |
no_license
|
LEEHOR/ThoughtRui
|
f0864f8f8ee01eeab8931267bb33020cecdf03e4
|
684c424c7ac4850d3d058863c08e6a819e5845d2
|
refs/heads/master
| 2020-04-07T01:31:47.073843
| 2019-08-15T01:23:36
| 2019-08-15T01:23:36
| 157,943,972
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,153
|
java
|
/*
* Copyright © Yan Zhenjie
*
* 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.coahr.thoughtrui.Utils.Permission;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.text.TextUtils;
import com.coahr.thoughtrui.R;
import com.yanzhenjie.permission.Permission;
import com.yanzhenjie.permission.Rationale;
import com.yanzhenjie.permission.RequestExecutor;
import java.util.List;
/**
*
*/
public final class RuntimeRationale implements Rationale<List<String>> {
@Override
public void showRationale(Context context, List<String> permissions, final RequestExecutor executor) {
List<String> permissionNames = Permission.transformText(context, permissions);
String message = context.getString(R.string.message_permission_rationale, TextUtils.join("\n", permissionNames));
new AlertDialog.Builder(context)
.setCancelable(false)
.setTitle(R.string.title_dialog)
.setMessage(message)
.setPositiveButton(R.string.resume, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
executor.execute();
}
})
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
executor.cancel();
}
})
.show();
}
}
|
[
"1622293788@qq.com"
] |
1622293788@qq.com
|
cde6e91da74f2d19242ba2ad07c19558ee7c3d8a
|
9f8304a649e04670403f5dc1cb049f81266ba685
|
/common/src/main/java/com/cmcc/vrp/boss/gansu/model/GSAuthRequest.java
|
305ccc813ec81dff3b71276e5d935753538ef017
|
[] |
no_license
|
hasone/pdata
|
632d2d0df9ddd9e8c79aca61a87f52fc4aa35840
|
0a9cfd988e8a414f3bdbf82ae96b82b61d8cccc2
|
refs/heads/master
| 2020-03-25T04:28:17.354582
| 2018-04-09T00:13:55
| 2018-04-09T00:13:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,648
|
java
|
/**
*
*/
package com.cmcc.vrp.boss.gansu.model;
/**
* <p>Description: </p>
*
* @author xj
* @date 2016年6月2日
*/
public class GSAuthRequest {
private String version;
private int testFlag;
private String appId;
private String dynamicToken;
private String userPhoneNumber;
private GSChargeRequestTransInfo transInfo;
private GSChargeRequestAuthorization authorization;
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public int getTestFlag() {
return testFlag;
}
public void setTestFlag(int testFlag) {
this.testFlag = testFlag;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getDynamicToken() {
return dynamicToken;
}
public void setDynamicToken(String dynamicToken) {
this.dynamicToken = dynamicToken;
}
public String getUserPhoneNumber() {
return userPhoneNumber;
}
public void setUserPhoneNumber(String userPhoneNumber) {
this.userPhoneNumber = userPhoneNumber;
}
public GSChargeRequestTransInfo getTransInfo() {
return transInfo;
}
public void setTransInfo(GSChargeRequestTransInfo transInfo) {
this.transInfo = transInfo;
}
public GSChargeRequestAuthorization getAuthorization() {
return authorization;
}
public void setAuthorization(GSChargeRequestAuthorization authorization) {
this.authorization = authorization;
}
}
|
[
"fromluozuwu@qq.com"
] |
fromluozuwu@qq.com
|
c3a0674d07dbb9c23652857d06c523397a5c66ae
|
28fd25e63ff7e60ee23d19448445360f01f8e64d
|
/blaze-core/src/main/java/com/fizzed/blaze/util/ByteArray.java
|
d320c20b02d8912538526bbf34e47021868102e2
|
[] |
no_license
|
fizzed/blaze
|
b7bb1ea1f7fd3d4d3d4203aea8ef48f8e9c96baa
|
d70f2df24a9639094e78c7b041cf446b6997daac
|
refs/heads/master
| 2023-08-25T16:38:15.722995
| 2023-01-09T02:33:46
| 2023-01-09T02:33:46
| 29,281,445
| 111
| 16
| null | 2023-08-21T20:52:15
| 2015-01-15T04:54:28
|
Java
|
UTF-8
|
Java
| false
| false
| 2,497
|
java
|
/*
* Copyright 2015 Fizzed, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.fizzed.blaze.util;
import java.nio.charset.Charset;
public class ByteArray {
static private final int DEFAULT_SIZE = 16384;
static private final int INFINITE_MAX_SIZE = -1;
private final int maxSize;
private byte[] buffer;
private int length;
public ByteArray() {
this(new byte[DEFAULT_SIZE], INFINITE_MAX_SIZE);
}
public ByteArray(int initialSize, int maxSize) {
this(new byte[initialSize], maxSize);
}
public ByteArray(byte[] buffer, int maxSize) {
if (maxSize != INFINITE_MAX_SIZE && buffer.length > maxSize) {
throw new IllegalArgumentException("maxSize exceeded initialSize");
}
this.maxSize = maxSize;
this.buffer = buffer;
this.length = 0;
}
public byte[] backingArray() {
return this.buffer;
}
public byte get(int index) {
return this.buffer[index];
}
public boolean isInfinite() {
return this.maxSize == INFINITE_MAX_SIZE;
}
public int remaining() {
return this.buffer.length - this.length;
}
public int length() {
return this.length;
}
public void reset() {
this.length = 0;
}
public void ensureSize(int size) {
int delta = size - this.remaining();
if (delta > 0) {
byte[] newBuffer = new byte[size];
System.arraycopy(this.buffer, 0, newBuffer, 0, this.length);
this.buffer = newBuffer;
}
}
public void append(byte[] buffer, int offset, int length) {
ensureSize(this.length + length);
System.arraycopy(buffer, offset, this.buffer, this.length, length);
this.length += length;
}
public String toString(Charset charset) {
return new String(this.buffer, 0, this.length, charset);
}
}
|
[
"joe@lauer.bz"
] |
joe@lauer.bz
|
00ebf72e387d9a1fb90d9ad2a929ef8d427e05d6
|
becfc02168247c141747ef5a52ce10dc581ab0bc
|
/playwd-root/playwd-service/src/main/java/cn/gyyx/playwd/agent/GameModuleAgent.java
|
1dbda190c6828e3134a1df6b9dbffc6eeff7155d
|
[] |
no_license
|
wangqingxian/springBoot
|
629d71200f2f62466ac6590924d49bd490601276
|
0efcd6ed29816c31f2843a24d9d6dc5d1c7f98d2
|
refs/heads/master
| 2020-04-22T02:42:01.757523
| 2017-06-08T10:56:51
| 2017-06-08T10:56:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,970
|
java
|
package cn.gyyx.playwd.agent;
import java.text.MessageFormat;
import org.slf4j.Logger;
import org.springframework.stereotype.Component;
import cn.gyyx.core.DataFormat;
import cn.gyyx.core.security.MD5;
import cn.gyyx.log.sdk.GYYXLoggerFactory;
import cn.gyyx.playwd.beans.agent.GameModuleServerInfoResultBean;
import cn.gyyx.playwd.utils.HttpTools;
/**
* 版 权:光宇游戏
* 作 者:ChengLong
* 创建时间:2016年9月14日 下午1:26:27
* 描 述:调用game.module.gyyx.cn的接口
*/
@Component
public class GameModuleAgent {
Logger logger = GYYXLoggerFactory.getLogger(getClass());
private static final String DOMAIN = "game.module.gyyx.cn";
private static final String SERVER_URL = "http" + "://" + DOMAIN;
private static final String KEY = "123456";
//获取服务器信息
private static final String requestUrl_01 = "/game/wendao/server/{0}";
/**
* 获取服务器信息
* @param classification
* @return
* @throws Exception
*/
public GameModuleServerInfoResultBean getWdServerInfo(int serverId){
try {
long timestamp = System.currentTimeMillis() / 1000L;
String url = MessageFormat.format(requestUrl_01, serverId) + "?timestamp=" + timestamp;
String md5 = MD5.encode(url + KEY);
String signUrl = SERVER_URL+ url + "&sign_type=MD5"+ "&sign=" + md5;
logger.info("调用接口发送请求开始["+DOMAIN+"]:getWdServerInfo,请求链接:"+signUrl,"请求方式:get");
String response = HttpTools.get(signUrl);
logger.info("调用接口发送请求结束["+DOMAIN+"]:getWdServerInfo,返回值:"+response);
GameModuleServerInfoResultBean result = DataFormat.jsonToObj(response, GameModuleServerInfoResultBean.class);
return result;
} catch (Exception e) {
GameModuleServerInfoResultBean s = new GameModuleServerInfoResultBean();
s.setErrorMessage(e.getMessage());
logger.error("请求接口:["+DOMAIN+"]sendGiftToGame接口异常",e);
}
return null;
}
}
|
[
"lihu@gyyx.cn"
] |
lihu@gyyx.cn
|
b23ba863f384b1ba4354fe91ff7cc706eb364149
|
fb30da709348230b8846eaa9e42b889a7bd4c4e1
|
/app/src/main/java/com/heitugs/xiannongexpress/ui/activity/activity/BannerWebView.java
|
4c071aa6b99342a1c67cb71bb851e312014c452b
|
[] |
no_license
|
forhaodream/XianJianExpress
|
54cc47390aa8604c769fe31bac5d607258336d46
|
c197216de6f2a84ffb7589d32e8fe1c2fc002d03
|
refs/heads/master
| 2020-04-28T02:46:20.647337
| 2019-03-11T02:41:28
| 2019-03-11T02:41:28
| 174,911,112
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 660
|
java
|
package com.heitugs.xiannongexpress.ui.activity.activity;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.webkit.WebView;
import com.heitugs.xiannongexpress.R;
/**
* Created by Administrator on 2016/9/13 0013.
*/
public class BannerWebView extends Activity {
private WebView webView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webview_banner);
webView = (WebView) findViewById(R.id.banner_webview);
webView.loadUrl("http://app.heitugs.com/html/2016-08/1376.html");
}
}
|
[
"ch00209@163.com"
] |
ch00209@163.com
|
eb233dc9d64b17481ac82624f47b289ffa5756fb
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/18/18_e919d51093be08da2eef8e4612901d21375d8eba/PrimeFactorsTest/18_e919d51093be08da2eef8e4612901d21375d8eba_PrimeFactorsTest_s.java
|
08d2efbdbcb6ece1b77d78b94237f5e3570b323e
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,132
|
java
|
package net.joseraya.primefactors;
import java.util.List;
import org.fest.util.Collections;
import org.junit.Test;
import static net.joseraya.primefactors.PrimeFactors.*;
import static org.junit.Assert.*;
public class PrimeFactorsTest {
List<Integer> result;
@Test(expected=IllegalArgumentException.class)
public void should_reject_zero() {
result = generate(0);
}
@Test(expected=IllegalArgumentException.class)
public void should_reject_one() {
result = generate(1);
}
@Test
public void a_prime_should_return_itself() {
Integer number = 2;
List<Integer> expected = Collections.list(2);
result = generate(number);
assertEquals(expected, result);
}
@Test
public void a_decomposable_number_should_be_decomposed() {
Integer number = 6;
List<Integer> expected = Collections.list(2,3);
result = generate(number);
assertEquals(expected, result);
}
@Test
public void primes_should_be_repeated_if_needed() {
Integer number = 36;
List<Integer> expected = Collections.list(2,2,3,3);
result = generate(number);
assertEquals(expected, result);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
23ec771891d32f0d4b2ca39f8c5d025228783ecd
|
063f3b313356c366f7c12dd73eb988a73130f9c9
|
/erp_ejb/src_nomina/com/bydan/erp/nomina/business/dataaccess/HobbyDataAccessAdditional.java
|
232365c613d6a4a17d3c750b2abe09eb5993fda9
|
[
"Apache-2.0"
] |
permissive
|
bydan/pre
|
0c6cdfe987b964e6744ae546360785e44508045f
|
54674f4dcffcac5dbf458cdf57a4c69fde5c55ff
|
refs/heads/master
| 2020-12-25T14:58:12.316759
| 2016-09-01T03:29:06
| 2016-09-01T03:29:06
| 67,094,354
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,633
|
java
|
/*
* ============================================================================
* GNU Lesser General Public License
* ============================================================================
*
* BYDAN - Free Java BYDAN library.
* Copyright (C) 2008
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* 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.
*
* BYDAN Corporation
*/
package com.bydan.erp.nomina.business.dataaccess;
import java.util.List;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;
import java.util.ArrayList;
import java.io.Serializable;
import java.util.Date;
import com.bydan.framework.erp.business.entity.DatoGeneral;
import com.bydan.framework.erp.business.dataaccess.*;//DataAccessHelper;
import com.bydan.erp.nomina.business.entity.*;
@SuppressWarnings("unused")
public class HobbyDataAccessAdditional extends DataAccessHelper<Hobby> {
public HobbyDataAccessAdditional () {
}
}
|
[
"byrondanilo10@hotmail.com"
] |
byrondanilo10@hotmail.com
|
79eb319a5204d22a6cbaab2e688d3050dc38a090
|
47b7aab1d865bc36b5727fb61fd6c6fa84fe6365
|
/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass7.java
|
9e1ead3e8f8f3a001d29df95dde6903a7f95a2e9
|
[
"Apache-2.0"
] |
permissive
|
wso2/wso2-axis2
|
a4150ad2acc0d5d26dae69983ca6b6ea80dc22ab
|
8492fe63852762f51643d7520481198434aff236
|
refs/heads/master
| 2023-09-05T02:40:36.069413
| 2023-08-23T03:19:35
| 2023-08-23T03:19:35
| 16,400,174
| 40
| 215
|
Apache-2.0
| 2023-08-23T02:48:14
| 2014-01-31T05:15:02
|
Java
|
UTF-8
|
Java
| false
| false
| 1,244
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.axis2.rmi.databind.dto;
public class TestClass7 {
private TestClass4[] param1;
private TestClass3 param2;
public TestClass4[] getParam1() {
return param1;
}
public void setParam1(TestClass4[] param1) {
this.param1 = param1;
}
public TestClass3 getParam2() {
return param2;
}
public void setParam2(TestClass3 param2) {
this.param2 = param2;
}
}
|
[
"eranda@wso2.com"
] |
eranda@wso2.com
|
e48c9c80cd8ed1bd6951d2ac7d270df1b9d6eedd
|
5956d7bf50b1294c43ff82ee6507a9df315eb5ca
|
/mall-mvc/src/test/java/com/qinyuan15/mall/controller/admin/AdminControllerTest.java
|
9707aa84baca3ea24270cdb31c3c5ac0e12162bf
|
[] |
no_license
|
qinyuan/mall
|
d0b217d3b6b72e430d86da5f27e2ed60461a86a5
|
542966cdfae9b9f5331c901716b4e91b4ee6f4df
|
refs/heads/master
| 2021-01-16T20:58:48.439408
| 2015-08-01T12:08:37
| 2015-08-01T12:08:37
| 36,270,121
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 766
|
java
|
package com.qinyuan15.mall.controller.admin;
import com.qinyuan15.mall.controller.ControllerTestUtils;
import org.junit.Test;
import org.springframework.ui.ModelMap;
import java.util.List;
/**
* Test AdminController
* Created by qinyuan on 15-2-24.
*/
public class AdminControllerTest {
@Test
public void testIndex() throws Exception {
AdminController controller = new AdminController();
ControllerTestUtils.injectRequest(controller);
ControllerTestUtils.injectImageDownloader(controller);
ModelMap modelMap = ControllerTestUtils.mockModelMap();
controller.index(modelMap, null, null, null);
List commodities = (List) modelMap.get("commodities");
System.out.println(commodities.size());
}
}
|
[
"qinyuan15@sina.com"
] |
qinyuan15@sina.com
|
bad604b807db8d92f13a2320f0458630c627e112
|
5f5675ee0429b504eaaa1d4f8a5451e36c434850
|
/plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/jdbc/exec/JDBCResultSetMetaDataImpl.java
|
d788d5c7df4d69bdc34af5612fa5e93433a32587
|
[
"Apache-2.0",
"EPL-2.0"
] |
permissive
|
tianguanghui/dbeaver
|
6f09f16bd752a3581008f9e674fc7bf70ca53e2e
|
24538a0a327ff94895b5b8091f7a29031ec394bc
|
refs/heads/devel
| 2022-11-13T17:04:10.795431
| 2020-06-28T14:05:02
| 2020-06-28T14:05:02
| 275,745,610
| 1
| 0
|
Apache-2.0
| 2020-06-29T06:08:55
| 2020-06-29T06:08:54
| null |
UTF-8
|
Java
| false
| false
| 6,534
|
java
|
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 DBeaver Corp and 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.jkiss.dbeaver.model.impl.jdbc.exec;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.model.DBUtils;
import org.jkiss.dbeaver.model.exec.DBCAttributeMetaData;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSetMetaData;
import org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils;
import org.jkiss.utils.CommonUtils;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* JDBCResultSetMetaDataImpl
*/
public class JDBCResultSetMetaDataImpl implements JDBCResultSetMetaData
{
protected JDBCResultSet resultSet;
protected ResultSetMetaData original;
protected List<DBCAttributeMetaData> columns = new ArrayList<>();
protected Map<String, JDBCTableMetaData> tables = new HashMap<>();
public JDBCResultSetMetaDataImpl(JDBCResultSet resultSet)
throws SQLException
{
this.resultSet = resultSet;
this.original = resultSet.getOriginal().getMetaData();
int count = original.getColumnCount();
for (int i = 0; i < count; i++) {
columns.add(createColumnMetaDataImpl(i));
}
}
protected JDBCColumnMetaData createColumnMetaDataImpl(int index) throws SQLException
{
return new JDBCColumnMetaData(this, index);
}
public JDBCResultSet getResultSet()
{
return resultSet;
}
public ResultSetMetaData getOriginal()
{
return original;
}
@Override
public List<DBCAttributeMetaData> getAttributes()
{
return columns;
}
@Nullable
public JDBCTableMetaData getTableMetaData(String catalogName, String schemaName, String tableName)
{
if (CommonUtils.isEmpty(tableName)) {
// some constant instead of table name
return null;
}
String fullQualifiedName = DBUtils.getSimpleQualifiedName(catalogName, schemaName, tableName);
JDBCTableMetaData tableMetaData = tables.get(fullQualifiedName);
if (tableMetaData == null) {
tableMetaData = new JDBCTableMetaData(this, catalogName, schemaName, tableName);
tables.put(fullQualifiedName, tableMetaData);
}
return tableMetaData;
}
@Override
public int getColumnCount()
throws SQLException
{
return original.getColumnCount();
}
@Override
public boolean isAutoIncrement(int column)
throws SQLException
{
return original.isAutoIncrement(column);
}
@Override
public boolean isCaseSensitive(int column)
throws SQLException
{
return original.isCaseSensitive(column);
}
@Override
public boolean isSearchable(int column)
throws SQLException
{
return original.isSearchable(column);
}
@Override
public boolean isCurrency(int column)
throws SQLException
{
return original.isCurrency(column);
}
@Override
public int isNullable(int column)
throws SQLException
{
return original.isNullable(column);
}
@Override
public boolean isSigned(int column)
throws SQLException
{
return original.isSigned(column);
}
@Override
public int getColumnDisplaySize(int column)
throws SQLException
{
return original.getColumnDisplaySize(column);
}
@Override
public String getColumnLabel(int column)
throws SQLException
{
return JDBCUtils.normalizeIdentifier(original.getColumnLabel(column));
}
@Override
public String getColumnName(int column)
throws SQLException
{
return JDBCUtils.normalizeIdentifier(original.getColumnName(column));
}
@Override
public String getSchemaName(int column)
throws SQLException
{
return JDBCUtils.normalizeIdentifier(original.getSchemaName(column));
}
@Override
public int getPrecision(int column)
throws SQLException
{
return original.getPrecision(column);
}
@Override
public int getScale(int column)
throws SQLException
{
return original.getScale(column);
}
@Override
public String getTableName(int column)
throws SQLException
{
return JDBCUtils.normalizeIdentifier(original.getTableName(column));
}
@Override
public String getCatalogName(int column)
throws SQLException
{
return JDBCUtils.normalizeIdentifier(original.getCatalogName(column));
}
@Override
public int getColumnType(int column)
throws SQLException
{
return original.getColumnType(column);
}
@Override
public String getColumnTypeName(int column)
throws SQLException
{
return JDBCUtils.normalizeIdentifier(original.getColumnTypeName(column));
}
@Override
public boolean isReadOnly(int column)
throws SQLException
{
return original.isReadOnly(column);
}
@Override
public boolean isWritable(int column)
throws SQLException
{
return original.isWritable(column);
}
@Override
public boolean isDefinitelyWritable(int column)
throws SQLException
{
return original.isDefinitelyWritable(column);
}
@Override
public String getColumnClassName(int column)
throws SQLException
{
return JDBCUtils.normalizeIdentifier(original.getColumnClassName(column));
}
@Override
public <T> T unwrap(Class<T> iface)
throws SQLException
{
return original.unwrap(iface);
}
@Override
public boolean isWrapperFor(Class<?> iface)
throws SQLException
{
return original.isWrapperFor(iface);
}
}
|
[
"serge@jkiss.org"
] |
serge@jkiss.org
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.