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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1bc124ea703f961138336b431c79845e0ff46b6a
|
e8daf057c8637d4b2bf03958ba29350c87610347
|
/src/com/interface_java/ConflittoDueInterfacceConcrete.java
|
2e6ef9d83de67ea92a341c83724581266c4ef696
|
[] |
no_license
|
sabaja/JavaSE-9
|
6eeed07c3d5e7619fbabe9c1eff073acc5e37eb9
|
5dbb38052579db013d58fcfd0efa0376e09943e5
|
refs/heads/master
| 2020-03-31T21:09:45.929847
| 2018-10-11T10:02:33
| 2018-10-11T10:02:33
| 152,570,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 792
|
java
|
package com.interface_java;
/**
* Caso che si eredita da 2 interfacce concrete
* @author sabaja
*
*/
public class ConflittoDueInterfacceConcrete implements Concrete_1, Concrete_2 {
public static void main(String[] args) {
ConflittoDueInterfacceConcrete exe = new ConflittoDueInterfacceConcrete();
exe.print();
}
// Override obbligatorio
@Override
public void print() {
// Opzione 1 Override metodo
System.out.println("Override");
// Opzione 2 richiamare il metodo della superclasse all'interno
// dell'override
Concrete_1.super.print();
Concrete_2.super.print();
}
}
interface Concrete_1 {
public default void print() {
System.out.println("concrete_1");
}
}
interface Concrete_2 {
public default void print() {
System.out.println("concrete_2");
}
}
|
[
"jacoposabatini76@gmail.com"
] |
jacoposabatini76@gmail.com
|
ea76909bff2d44ba4bf2d8f0caf5d2d3114abc92
|
d6b6abe73a0c82656b04875135b4888c644d2557
|
/sources/com/google/android/gms/internal/ads/aqx.java
|
0a0fc4a378b2256179fce9b05b077846dbd65d86
|
[] |
no_license
|
chanyaz/and_unimed
|
4344d1a8ce8cb13b6880ca86199de674d770304b
|
fb74c460f8c536c16cca4900da561c78c7035972
|
refs/heads/master
| 2020-03-29T09:07:09.224595
| 2018-08-30T06:29:32
| 2018-08-30T06:29:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 222
|
java
|
package com.google.android.gms.internal.ads;
final class aqx implements zzts {
aqx(aqt aqt) {
}
public final void zzb(arr arr) {
if (arr.a != null) {
arr.a.onAdLoaded();
}
}
}
|
[
"khairilirfanlbs@gmail.com"
] |
khairilirfanlbs@gmail.com
|
68bab728f02e9b7268643fb89229084acce14edd
|
64e4ca3c48b0f24910f8e59335d7d3458dcf3d64
|
/app/src/main/java/osrs/StructComposition.java
|
2e90795d42c9aa433ba6a8b56d1c5ced974d8657
|
[] |
no_license
|
Rune-Status/zeruth-openosrs-android
|
3c9aed37c5c65ff1d68f8b88cf459c03845b0b25
|
7e77ea6bc9df68f9b7b1a159a825aee940b3cd04
|
refs/heads/master
| 2022-09-11T05:09:09.885707
| 2022-09-04T06:53:55
| 2022-09-04T06:53:55
| 228,475,881
| 0
| 0
| null | 2022-09-04T10:05:09
| 2019-12-16T21:06:23
|
Java
|
UTF-8
|
Java
| false
| false
| 4,485
|
java
|
package osrs;
import net.runelite.mapping.Export;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
@ObfuscatedName("gm")
@Implements("StructComposition")
public class StructComposition extends DualNode {
@ObfuscatedName("s")
@ObfuscatedSignature(
descriptor = "Lls;"
)
@Export("StructDefinition_archive")
public static AbstractArchive StructDefinition_archive;
@ObfuscatedName("h")
@ObfuscatedSignature(
descriptor = "Liz;"
)
@Export("StructDefinition_cached")
static EvictingDualNodeHashTable StructDefinition_cached;
@ObfuscatedName("bb")
@ObfuscatedSignature(
descriptor = "Lpl;"
)
@Export("loginType")
static LoginType loginType;
@ObfuscatedName("w")
@ObfuscatedSignature(
descriptor = "Lpm;"
)
@Export("params")
IterableNodeHashTable params;
static {
StructDefinition_cached = new EvictingDualNodeHashTable(64);
}
StructComposition() {
}
@ObfuscatedName("h")
@ObfuscatedSignature(
garbageValue = "-1826362534",
descriptor = "(I)V"
)
@Export("postDecode")
void postDecode() {
}
@ObfuscatedName("w")
@ObfuscatedSignature(
garbageValue = "-141643144",
descriptor = "(Lqr;I)V"
)
@Export("decode")
void decode(Buffer var1) {
while (true) {
int var2 = var1.readUnsignedByte();
if (var2 == 0) {
return;
}
this.decodeNext(var1, var2);
}
}
@ObfuscatedName("v")
@ObfuscatedSignature(
garbageValue = "-1580441618",
descriptor = "(Lqr;II)V"
)
@Export("decodeNext")
void decodeNext(Buffer var1, int var2) {
if (var2 == 249) {
this.params = World.readStringIntParameters(var1, this.params);
}
}
@ObfuscatedName("c")
@ObfuscatedSignature(
garbageValue = "-1093251626",
descriptor = "(III)I"
)
@Export("getIntParam")
public int getIntParam(int var1, int var2) {
return ScriptFrame.method1035(this.params, var1, var2);
}
@ObfuscatedName("q")
@ObfuscatedSignature(
garbageValue = "24965",
descriptor = "(ILjava/lang/String;S)Ljava/lang/String;"
)
@Export("getStringParam")
public String getStringParam(int var1, String var2) {
return class132.method2772(this.params, var1, var2);
}
@ObfuscatedName("m")
@ObfuscatedSignature(
garbageValue = "1712536122",
descriptor = "(Lhp;IIII)Z"
)
static final boolean method3479(Model var0, int var1, int var2, int var3) {
boolean var4 = ViewportMouse.ViewportMouse_isInViewport;
if (!var4) {
return false;
} else {
Tile.method3871();
int var5 = var0.xMid + var1;
int var6 = var2 + var0.yMid;
int var7 = var3 + var0.zMid;
int var8 = var0.xMidOffset;
int var9 = var0.yMidOffset;
int var10 = var0.zMidOffset;
int var11 = class141.field1634 - var5;
int var12 = ViewportMouse.field2593 - var6;
int var13 = class143.field1639 - var7;
if (Math.abs(var11) > var8 + UrlRequest.field1355) {
return false;
} else if (Math.abs(var12) > var9 + class123.field1517) {
return false;
} else if (Math.abs(var13) > var10 + class150.field1677) {
return false;
} else if (Math.abs(var13 * WorldMapCacheName.field2870 - var12 * ViewportMouse.field2599) > var10 * class123.field1517 + var9 * class150.field1677) {
return false;
} else if (Math.abs(var11 * ViewportMouse.field2599 - var13 * SoundCache.field322) > var10 * UrlRequest.field1355 + var8 * class150.field1677) {
return false;
} else {
return Math.abs(var12 * SoundCache.field322 - var11 * WorldMapCacheName.field2870) <= var8 * class123.field1517 + var9 * UrlRequest.field1355;
}
}
}
@ObfuscatedName("z")
@ObfuscatedSignature(
garbageValue = "1",
descriptor = "(IB)Ldk;"
)
public static class122 method3478(int var0) {
class122 var1 = (class122)SequenceDefinition.SequenceDefinition_cachedModel.get((long)var0);
if (var1 != null) {
return var1;
} else {
var1 = class271.method5102(SequenceDefinition.SequenceDefinition_animationsArchive, GZipDecompressor.SequenceDefinition_skeletonsArchive, var0, false);
if (var1 != null) {
SequenceDefinition.SequenceDefinition_cachedModel.put(var1, (long)var0);
}
return var1;
}
}
@ObfuscatedName("y")
@ObfuscatedSignature(
garbageValue = "116",
descriptor = "(IIB)I"
)
static final int method3466(int var0, int var1) {
if (var0 == -1) {
return 12345678;
} else {
var1 = (var0 & 127) * var1 / 128;
if (var1 < 2) {
var1 = 2;
} else if (var1 > 126) {
var1 = 126;
}
return (var0 & 65408) + var1;
}
}
}
|
[
"therealnull@gmail.com"
] |
therealnull@gmail.com
|
886826839d30b35c2e58b2d5b85029914467915b
|
bdde5733f006ab5d417c023d222525a599478cdd
|
/geocode-ws/src/main/java/org/gbif/geocode/ws/persistence/HStoreHigherLevelsMapTypeHandler.java
|
715e76c9a269f072cc102bf96554b9df2195a96d
|
[
"Apache-2.0"
] |
permissive
|
gbif/geocode
|
301fbc65568428bba262cbc1855a9210ebd48491
|
322d99523a6561eec27ca4aeb3f8197279fe6d3e
|
refs/heads/master
| 2023-06-27T10:20:13.535956
| 2023-06-09T12:46:30
| 2023-06-09T12:46:30
| 16,833,146
| 5
| 3
|
NOASSERTION
| 2021-04-22T17:38:12
| 2014-02-14T09:41:12
|
Java
|
UTF-8
|
Java
| false
| false
| 1,988
|
java
|
package org.gbif.geocode.ws.persistence;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Comparator;
import java.util.Map;
import java.util.TreeMap;
import java.util.function.Function;
import com.google.common.base.Strings;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.postgresql.util.HStoreConverter;
/**
* Collect an Hstore value in a map sorted by the key length, assuming that higher levels has shorter ids.
*/
public class HStoreHigherLevelsMapTypeHandler extends BaseTypeHandler<Map<String, String>> {
@Override
public void setNonNullParameter(PreparedStatement ps, int i, Map<String, String> parameter, JdbcType jdbcType)
throws SQLException {
ps.setString(i, HStoreConverter.toString(parameter));
}
@Override
public Map<String, String> getNullableResult(ResultSet rs, String columnName) throws SQLException {
return fromString(rs.getString(columnName));
}
@Override
public Map<String, String> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
return fromString(rs.getString(columnIndex));
}
@Override
public Map<String, String> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
return fromString(cs.getString(columnIndex));
}
private Map<String, String> fromString(String hstring) {
Map<String, String> higherLevels = new TreeMap<>(
Comparator.comparingInt(String::length)
.thenComparing(Function.identity()));
if (!Strings.isNullOrEmpty(hstring)) {
Map<String, String> rawMap = HStoreConverter.fromString(hstring);
for (Map.Entry<String, String> entry : rawMap.entrySet()) {
try {
higherLevels.put(entry.getKey(), entry.getValue());
} catch (IllegalArgumentException e) {
// ignore this entry
}
}
}
return higherLevels;
}
}
|
[
"federicomh@gmail.com"
] |
federicomh@gmail.com
|
d1c125e05568c0219c65a2f0daae929c9d3bd6c6
|
5174c6b39033bd1ef7954caea405f71a450c9278
|
/src/main/java/com/lothrazar/cyclic/item/ender/EnderPearlMount.java
|
732d42b6ffca01ac459a819272d5d6b74b946a56
|
[
"MIT"
] |
permissive
|
Lothrazar/Cyclic
|
f6401866005e323e6650348203dda9dc093b030e
|
67bfe7fe4e16e6b6642c6cacf495dc11c4313020
|
refs/heads/trunk/1.20
| 2023-08-14T08:24:17.868147
| 2023-08-12T13:50:49
| 2023-08-12T13:50:49
| 47,934,804
| 137
| 131
|
MIT
| 2023-07-24T16:16:30
| 2015-12-13T20:19:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,091
|
java
|
package com.lothrazar.cyclic.item.ender;
import com.lothrazar.cyclic.item.ItemBaseCyclic;
import com.lothrazar.library.util.ItemStackUtil;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.projectile.ThrownEnderpearl;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
public class EnderPearlMount extends ItemBaseCyclic {
public EnderPearlMount(Properties properties) {
super(properties.durability(256));
}
@Override
public InteractionResultHolder<ItemStack> use(Level worldIn, Player playerIn, InteractionHand handIn) {
ItemStack stack = playerIn.getItemInHand(handIn);
ThrownEnderpearl ent = new ThrownEnderpearl(worldIn, playerIn);
shootMe(worldIn, playerIn, ent, 0, ItemBaseCyclic.VELOCITY_MAX);
playerIn.startRiding(ent, true);
playerIn.getCooldowns().addCooldown(stack.getItem(), 10);
ItemStackUtil.damageItem(playerIn, stack);
return super.use(worldIn, playerIn, handIn);
}
}
|
[
"samson.bassett@gmail.com"
] |
samson.bassett@gmail.com
|
5981568d25a741bad44b1cdaf6f1422568630a35
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/boot/svg/code/drawable/pause_video_icon.java
|
c1251eb2346ef036894a6e41bc8d24033847dafc
|
[] |
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
| 4,284
|
java
|
package com.tencent.mm.boot.svg.code.drawable;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Join;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.os.Looper;
import com.tencent.mm.svg.c;
public class pause_video_icon
extends c
{
private final int height = 10;
private final int width = 9;
public int doCommand(int paramInt, Object... paramVarArgs)
{
switch (paramInt)
{
}
for (;;)
{
return 0;
return 9;
return 10;
Canvas localCanvas = (Canvas)paramVarArgs[0];
paramVarArgs = (Looper)paramVarArgs[1];
Object localObject1 = c.instanceMatrix(paramVarArgs);
Object localObject3 = c.instanceMatrixArray(paramVarArgs);
Object localObject2 = c.instancePaint(paramVarArgs);
((Paint)localObject2).setFlags(385);
((Paint)localObject2).setStyle(Paint.Style.FILL);
Paint localPaint = c.instancePaint(paramVarArgs);
localPaint.setFlags(385);
localPaint.setStyle(Paint.Style.STROKE);
((Paint)localObject2).setColor(-16777216);
localPaint.setStrokeWidth(1.0F);
localPaint.setStrokeCap(Paint.Cap.BUTT);
localPaint.setStrokeJoin(Paint.Join.MITER);
localPaint.setStrokeMiter(4.0F);
localPaint.setPathEffect(null);
c.instancePaint(localPaint, paramVarArgs).setStrokeWidth(1.0F);
localCanvas.save();
localObject2 = c.instancePaint((Paint)localObject2, paramVarArgs);
((Paint)localObject2).setColor(-1);
localObject3 = c.setMatrixFloatArray((float[])localObject3, 1.0F, 0.0F, -162.0F, 0.0F, 1.0F, -172.0F, 0.0F, 0.0F, 1.0F);
((Matrix)localObject1).reset();
((Matrix)localObject1).setValues((float[])localObject3);
localCanvas.concat((Matrix)localObject1);
localCanvas.save();
localObject3 = c.setMatrixFloatArray((float[])localObject3, 1.0F, 0.0F, 162.0F, 0.0F, 1.0F, 172.0F, 0.0F, 0.0F, 1.0F);
((Matrix)localObject1).reset();
((Matrix)localObject1).setValues((float[])localObject3);
localCanvas.concat((Matrix)localObject1);
localCanvas.save();
localObject1 = c.instancePaint((Paint)localObject2, paramVarArgs);
localObject3 = c.instancePath(paramVarArgs);
((Path)localObject3).moveTo(0.0F, 1.0F);
((Path)localObject3).cubicTo(0.0F, 0.4477152F, 0.4477152F, 0.0F, 1.0F, 0.0F);
((Path)localObject3).lineTo(2.0F, 0.0F);
((Path)localObject3).cubicTo(2.552285F, 0.0F, 3.0F, 0.4477152F, 3.0F, 1.0F);
((Path)localObject3).lineTo(3.0F, 9.0F);
((Path)localObject3).cubicTo(3.0F, 9.552285F, 2.552285F, 10.0F, 2.0F, 10.0F);
((Path)localObject3).lineTo(1.0F, 10.0F);
((Path)localObject3).cubicTo(0.4477152F, 10.0F, 0.0F, 9.552285F, 0.0F, 9.0F);
((Path)localObject3).lineTo(0.0F, 1.0F);
((Path)localObject3).close();
localCanvas.drawPath((Path)localObject3, (Paint)localObject1);
localCanvas.restore();
localCanvas.save();
localObject1 = c.instancePaint((Paint)localObject2, paramVarArgs);
localObject2 = c.instancePath(paramVarArgs);
((Path)localObject2).moveTo(6.0F, 1.0F);
((Path)localObject2).cubicTo(6.0F, 0.4477152F, 6.447715F, 0.0F, 7.0F, 0.0F);
((Path)localObject2).lineTo(8.0F, 0.0F);
((Path)localObject2).cubicTo(8.552285F, 0.0F, 9.0F, 0.4477152F, 9.0F, 1.0F);
((Path)localObject2).lineTo(9.0F, 9.0F);
((Path)localObject2).cubicTo(9.0F, 9.552285F, 8.552285F, 10.0F, 8.0F, 10.0F);
((Path)localObject2).lineTo(7.0F, 10.0F);
((Path)localObject2).cubicTo(6.447715F, 10.0F, 6.0F, 9.552285F, 6.0F, 9.0F);
((Path)localObject2).lineTo(6.0F, 1.0F);
((Path)localObject2).close();
localCanvas.drawPath((Path)localObject2, (Paint)localObject1);
localCanvas.restore();
localCanvas.restore();
localCanvas.restore();
c.done(paramVarArgs);
}
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes12.jar
* Qualified Name: com.tencent.mm.boot.svg.code.drawable.pause_video_icon
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
057868c8f9a8cb1552c8024d214beb36267c3c0c
|
46a62c499faaa64fe3cce2356c8b229e9c4c9c49
|
/taobao-sdk-java-q/taobao-sdk-java-auto_1346207610518-20120923-source/com/taobao/api/response/TaobaokeItemsConvertResponse.java
|
73c233c7cead6994df83aba587252873a99bb0ca
|
[] |
no_license
|
xjwangliang/learning-python
|
4ed40ff741051b28774585ef476ed59963eee579
|
da74bd7e466cd67565416b28429ed4c42e6a298f
|
refs/heads/master
| 2021-01-01T15:41:22.572679
| 2015-04-27T14:09:50
| 2015-04-27T14:09:50
| 5,881,815
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,121
|
java
|
package com.taobao.api.response;
import java.util.List;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.internal.mapping.ApiListField;
import com.taobao.api.domain.TaobaokeItem;
import com.taobao.api.TaobaoResponse;
/**
* TOP API: taobao.taobaoke.items.convert response.
*
* @author auto create
* @since 1.0, null
*/
public class TaobaokeItemsConvertResponse extends TaobaoResponse {
private static final long serialVersionUID = 8161963388887472444L;
/**
* 淘宝客商品对象列表
*/
@ApiListField("taobaoke_items")
@ApiField("taobaoke_item")
private List<TaobaokeItem> taobaokeItems;
/**
* 返回的结果总数
*/
@ApiField("total_results")
private Long totalResults;
public void setTaobaokeItems(List<TaobaokeItem> taobaokeItems) {
this.taobaokeItems = taobaokeItems;
}
public List<TaobaokeItem> getTaobaokeItems( ) {
return this.taobaokeItems;
}
public void setTotalResults(Long totalResults) {
this.totalResults = totalResults;
}
public Long getTotalResults( ) {
return this.totalResults;
}
}
|
[
"shigushuyuan@gmail.com"
] |
shigushuyuan@gmail.com
|
3333e70d9a29c8f1ac903b30835574217e1fea69
|
ec2bd4ec310a4f9fbf0b61e427ef50b6686b18b5
|
/guanglian/gl-core/src/main/java/com/kekeinfo/core/business/auditrule/dao/AuditRuleDaoImpl.java
|
dc8996f8e62adbeb1c176e8a7ca97a60455d1134
|
[] |
no_license
|
kingc0000/privatefirst
|
58d0089a91f2fb26e615bf00f5c072d9036c8ab3
|
72b37f40d0f16b69466127b60434fbccfc5a6b50
|
refs/heads/master
| 2020-03-15T21:22:08.487027
| 2018-05-16T15:41:56
| 2018-05-16T15:41:56
| 132,353,516
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 371
|
java
|
package com.kekeinfo.core.business.auditrule.dao;
import org.springframework.stereotype.Repository;
import com.kekeinfo.core.business.dreport.model.AuditRule;
import com.kekeinfo.core.business.generic.dao.KekeinfoEntityDaoImpl;
@Repository("auditRuleDataDao")
public class AuditRuleDaoImpl extends KekeinfoEntityDaoImpl<Long, AuditRule> implements AuditRuleDao {
}
|
[
"v_xubiao@baidu.com"
] |
v_xubiao@baidu.com
|
02ffe32eb7bbe0d8b13a230914612335766b3daa
|
e0532d36d933f76c1a3ccf90dcb78489ee01501e
|
/middlegroudInterfaceTest/src/main/java/com/duoweidu/cases/hsq/merchant/trade_statementlist_test.java
|
676c3fdf42219a4e4323155306a7c951e0c33c28
|
[] |
no_license
|
wuhaiyanwhy/jiekouzidonghua_dwd
|
ff7bdbbcc21683d2d592ea48624b476dd9ff027f
|
1627453a5ad678b5438ad424ca1f23e0de2b3aa0
|
refs/heads/master
| 2022-07-15T16:40:14.545287
| 2019-10-25T08:32:34
| 2019-10-25T08:32:34
| 217,483,394
| 1
| 0
| null | 2022-06-29T17:44:05
| 2019-10-25T08:03:53
|
HTML
|
UTF-8
|
Java
| false
| false
| 398
|
java
|
package com.duoweidu.cases.hsq.merchant;
import com.duoweidu.cases.interfaces.HsqMerchantInterfaceTest;
import org.testng.annotations.Test;
public class trade_statementlist_test extends HsqMerchantInterfaceTest {
@Test(groups = "loginTrue",description = "对账明细列表")
public void trade_statementlist_true() {
setUrl("trade.statementlist.uri");
process();
}
}
|
[
"1174837652@qq.com"
] |
1174837652@qq.com
|
f4786b9453668e5a1a0928fb31bcc544a5db7309
|
3bb056958709def9dd5594dadae7bb45729ed0b8
|
/springboot-demo/springboot-1.x/springcloud-1.x-demo/1.x-admin-client/src/main/java/cn/cjf/AdminClientApplication.java
|
0247c02124f9f3b39ff1b52c459424a357fdf56a
|
[] |
no_license
|
c19t043/study-demo
|
e0691cda091eb14224ac9bb3fe4e3c0177a60457
|
bda26327832414965447a3b41a7be6fe917bafb3
|
refs/heads/master
| 2020-04-01T19:43:44.349811
| 2019-05-22T00:06:22
| 2019-05-22T00:06:22
| 153,569,090
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,159
|
java
|
package cn.cjf;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@SpringBootApplication
@EnableEurekaClient
@EnableHystrix
@EnableHystrixDashboard
public class AdminClientApplication {
public static void main(String[] args) {
SpringApplication.run(AdminClientApplication.class, args);
}
@Configuration
public static class SecurityPermitAllConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().permitAll()
.and().csrf().disable();
}
}
}
|
[
"176158750@qq.com"
] |
176158750@qq.com
|
2a1ce4831c37696061ea3c6de4c33bcd5c500a22
|
5947cfe58348f6cdf30588b8e411ebf55ec50e05
|
/anjbo-credit3-provider-data/src/main/java/com/anjbo/service/ProductService.java
|
4f7a09a03b23fb4e9db0ddce8a2f0eaccee38b68
|
[] |
no_license
|
superJack2222/work-credit
|
197de8c94df3691f0d1e249ea431c526ca6f3867
|
4d6dfdabe92d8fee2b49de96fc08e281763a31ba
|
refs/heads/master
| 2023-04-28T05:09:40.511601
| 2020-07-21T00:43:07
| 2020-07-21T00:43:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 470
|
java
|
/*
*Project: ANJBO Generator
****************************************************************
* 版权所有@2018 ANJBO.COM 保留所有权利.
***************************************************************/
package com.anjbo.service;
import com.anjbo.bean.ProductDto;
import com.anjbo.service.BaseService;
/**
*
* @Author ANJBO Generator
* @Date 2018-05-03 09:49:33
* @version 1.0
*/
public interface ProductService extends BaseService<ProductDto>{
}
|
[
"395859675@qq.com"
] |
395859675@qq.com
|
2215856462e31e9d333d52354a9a2a7ed445da64
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/29/29_03ed93c4322b186e077ba395dd4ebdc96fbc5206/Server/29_03ed93c4322b186e077ba395dd4ebdc96fbc5206_Server_t.java
|
fe83a9ea9041c5454adedddbbd836373c42c9069
|
[] |
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,533
|
java
|
package pt.go2.application;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import pt.go2.fileio.Configuration;
import pt.go2.fileio.Statistics;
import com.sun.net.httpserver.BasicAuthenticator;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;
class Server {
private static final Logger LOG = LogManager.getLogger(Server.class);
/**
* Process initial method
*/
public static void main(final String[] args) {
final Configuration config = new Configuration();
LOG.trace("Starting server...");
// log server version
LOG.trace("Preparing to run " + config.VERSION + ".");
LOG.trace("Resuming DB from folder: " + config.DATABASE_FOLDER);
// create listener
LOG.trace("Creating listener.");
final HttpServer listener;
try {
listener = HttpServer.create(config.HOST, config.BACKLOG);
} catch (IOException e) {
LOG.fatal("Could not create listener.");
return;
}
LOG.trace("Appending to access log.");
LOG.trace("Starting virtual file system.");
// Generate VFS
final Resources vfs = new Resources();
if (!vfs.start(config)) {
return;
}
final Statistics statistics;
try {
statistics = new Statistics(config);
} catch (IOException e1) {
LOG.fatal("Can't collect statistics.");
return;
}
BufferedWriter accessLog = null;
try {
// start access log
try {
final FileWriter file = new FileWriter(config.ACCESS_LOG, true);
accessLog = new BufferedWriter(file);
} catch (IOException e) {
System.out.println("Access log redirected to console.");
}
// RequestHandler
final BasicAuthenticator ba = new BasicAuthenticator("Statistics") {
@Override
public boolean checkCredentials(final String user,
final String pass) {
LOG.info("login: [" + user + "] | [" + pass + "]");
LOG.info("required: [" + config.STATISTICS_USERNAME
+ "] | [" + config.STATISTICS_PASSWORD
+ "]");
return user.equals(config.STATISTICS_USERNAME)
&& pass.equals(config.STATISTICS_PASSWORD
.trim());
}
};
final HttpHandler root = new StaticPages(config, vfs, statistics,
accessLog);
final HttpHandler novo = new UrlHashing(config, vfs, accessLog);
final HttpHandler stats = new Analytics(config, vfs, statistics,
accessLog);
final HttpHandler browse = new View(config, vfs, accessLog);
listener.createContext("/", root);
listener.createContext("/new", novo);
listener.createContext("/stats", stats).setAuthenticator(ba);
listener.createContext("/browse", browse).setAuthenticator(ba);
listener.setExecutor(null);
// start server
listener.start();
LOG.trace("Listener is Started.");
System.out.println("Server Running. Press [k] to kill listener.");
boolean running = true;
do {
try {
running = System.in.read() == 'k';
} catch (IOException e) {
}
} while (running);
LOG.trace("Server stopping.");
listener.stop(1);
} finally {
try {
if (accessLog != null) {
accessLog.close();
}
} catch (IOException e) {
}
LOG.trace("Server stopped.");
}
}
/**
* Private c'tor to forbid instantiation of utility class
*/
private Server() {
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a6a1fe60af420e0a928c844ea55d65f3de580627
|
072a48f4a19458d491b8685acd3fcc7a316e9631
|
/sysmodelmgr/com.symbian.smt.gui/src/com/symbian/smt/gui/Logger.java
|
5e24d0b2fc79be780a1bc71735f40efac1c0375c
|
[] |
no_license
|
fedor4ever/sysmodeltools
|
80f27b5329ab4f3dc3ec74ab1c3d3a81e152a61d
|
e5182dd331f703687e219d192ba0aef84ea15888
|
refs/heads/master
| 2021-01-10T22:07:52.533705
| 2015-04-12T11:55:36
| 2015-04-12T11:55:36
| 33,689,302
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,278
|
java
|
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//
package com.symbian.smt.gui;
import org.eclipse.core.runtime.Status;
public class Logger {
static Activator theActivator = new Activator();
/**
* Logs an entry in the Eclipse error log
*
* @param String
* Text to appear in the Message field of the Error Log
* @return void
*/
public static void log(String msg) {
log(msg, null);
}
/**
* Logs an entry in the Eclipse error log
*
* @param String
* Text to appear in the Message field of the Error Log
* @param Exception
* The exception to log
* @return void
*/
public static void log(String msg, Exception e) {
theActivator.getLog()
.log(
new Status(Status.ERROR, Activator.PLUGIN_ID,
Status.OK, msg, e));
}
private Logger() {
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
d7dbce14c0d6669040a9fac378e2721cdbabf5a0
|
624042d9c60129afd0f939e5931a6a6ee07f5534
|
/prjWebStocks/src/com/sanguine/webclub/model/clsWebClubCurrencyDetailsMasterModel_ID.java
|
331ce0fb511032c4ac4e3633bb38d5aee368a185
|
[] |
no_license
|
SanguineSoftwareSolutions/prjWebStocks
|
2c5890b73240e68c76b0c9a3cd166603e1ee5acc
|
52cac0350aa5ec66add108892bd35586e884ebae
|
refs/heads/master
| 2021-05-14T15:08:47.605536
| 2018-01-02T07:30:31
| 2018-01-02T07:43:44
| 115,986,934
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 950
|
java
|
package com.sanguine.webclub.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;
@Embeddable
@SuppressWarnings("serial")
public class clsWebClubCurrencyDetailsMasterModel_ID implements Serializable{
@Column(name="strCurrCode")
private String strCurrCode;
@Column(name="strClientCode")
private String strClientCode;
public clsWebClubCurrencyDetailsMasterModel_ID(){}
public clsWebClubCurrencyDetailsMasterModel_ID(String strCurrCode,String strClientCode){
this.strCurrCode=strCurrCode;
this.strClientCode=strClientCode;
}
public String getStrCurrCode() {
return strCurrCode;
}
public void setStrCurrCode(String strCurrCode) {
this.strCurrCode = strCurrCode;
}
public String getStrClientCode() {
return strClientCode;
}
public void setStrClientCode(String strClientCode) {
this.strClientCode = strClientCode;
}
}
|
[
"jai chandra@jaichandra-PC"
] |
jai chandra@jaichandra-PC
|
5061ecb16d6e7217f408ceb15389748b3774e381
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a027/A027274Test.java
|
518a17c76476d410503c59b39518bc7b9c0d912e
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a027;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A027274Test extends AbstractSequenceTest {
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
208277b439eb64864c0cfd63b02bad2252fbc189
|
fe94bb01bbaf452ab1752cb3c1d1e4ecf297b9be
|
/src/test/java/com/opencart/dao/TestModelExtensionPaymentSagePayDirectDaoImpl.java
|
0046027a1bef02a2d29c0ee3d12dde567bf003cf
|
[] |
no_license
|
gmai2006/opencart
|
9d3b037f09294973112bafbadd22d5edd8457de5
|
dba44adabf4b8eab3bdb07062c887ba0a2a5405f
|
refs/heads/master
| 2020-12-31T06:13:33.113098
| 2018-01-24T07:35:45
| 2018-01-24T07:35:45
| 80,637,392
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,709
|
java
|
package com.opencart.dao;
import static org.junit.Assert.*;
import java.util.List;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Every.everyItem;
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsNull.*;
import com.google.inject.AbstractModule;
import com.google.inject.Inject;
import com.google.inject.Module;
import com.opencart.GoogleGuiceTest;
import com.opencart.entity.*;
import com.opencart.util.JsonUtils;
import com.opencart.extension.payment.*;
import com.opencart.entity.*;
import com.opencart.entity.dao.*;
public class TestModelExtensionPaymentSagePayDirectDaoImpl extends GoogleGuiceTest {
@Inject
ModelExtensionPaymentSagePayDirectDaoImpl dao;
@Override
protected Module getTestModule() {
return new AbstractModule() {
@Override
protected void configure() {
bind(ModelExtensionPaymentSagePayDirectDaoImpl.class);
}
};
}
/* *
* SELECT a FROM oc_zone_to_geo_zone a WHERE geo_zone_id = 'param0' AND country_id = 'param1' AND( zone_id = 'param2' OR zone_id = '0' )
*/
@Test
public void testgetMethod() throws Exception {
Integer geo_zone_id = 4;
Integer country_id = 222;
List<OcZoneToGeoZone> result = dao.getMethod(geo_zone_id, country_id);
assertThat("getMethod", result, notNullValue());
}
/* *
* SELECT a FROM oc_order_recurring a WHERE order_recurring_id = param0
*/
@Test
public void testgetProfile() throws Exception {
Integer order_recurring_id = 1;
List<OcOrderRecurring> result = dao.getProfile(order_recurring_id);
assertThat("getProfile", result, notNullValue());
}
}
|
[
"gmai2006@gmail.com"
] |
gmai2006@gmail.com
|
40822649e69aa4f4c496c68562ddc5e8058b5af7
|
b2d4f5b9ed1ad6e079c5422767fce584bd906367
|
/src/main/java/com/pepper/project/system/post/controller/PostController.java
|
2fadaa0964d4f6fef9ddd943c1c36b8e56d9b9f4
|
[
"MIT"
] |
permissive
|
hanjietao/ops-pro
|
6683494ab56c5c0c3432dbd1df09c223a552f28e
|
a31f37e322da2e5fe3dc0977f2b70332a90c8706
|
refs/heads/master
| 2022-09-26T06:48:33.506079
| 2020-04-09T03:42:34
| 2020-04-09T03:42:34
| 237,716,491
| 0
| 0
|
MIT
| 2022-09-01T23:21:26
| 2020-02-02T04:09:49
|
TSQL
|
UTF-8
|
Java
| false
| false
| 4,900
|
java
|
package com.pepper.project.system.post.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.pepper.common.constant.UserConstants;
import com.pepper.common.utils.poi.ExcelUtil;
import com.pepper.framework.aspectj.lang.annotation.Log;
import com.pepper.framework.aspectj.lang.enums.BusinessType;
import com.pepper.framework.web.controller.BaseController;
import com.pepper.framework.web.domain.AjaxResult;
import com.pepper.framework.web.page.TableDataInfo;
import com.pepper.project.system.post.domain.Post;
import com.pepper.project.system.post.service.IPostService;
/**
* 岗位信息操作处理
*
* @author pepper
*/
@Controller
@RequestMapping("/system/post")
public class PostController extends BaseController
{
private String prefix = "system/post";
@Autowired
private IPostService postService;
@RequiresPermissions("system:post:view")
@GetMapping()
public String operlog()
{
return prefix + "/post";
}
@RequiresPermissions("system:post:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(Post post)
{
startPage();
List<Post> list = postService.selectPostList(post);
return getDataTable(list);
}
@Log(title = "岗位管理", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:post:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(Post post)
{
List<Post> list = postService.selectPostList(post);
ExcelUtil<Post> util = new ExcelUtil<Post>(Post.class);
return util.exportExcel(list, "岗位数据");
}
@RequiresPermissions("system:post:remove")
@Log(title = "岗位管理", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
try
{
return toAjax(postService.deletePostByIds(ids));
}
catch (Exception e)
{
return error(e.getMessage());
}
}
/**
* 新增岗位
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存岗位
*/
@RequiresPermissions("system:post:add")
@Log(title = "岗位管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(@Validated Post post)
{
if (UserConstants.POST_NAME_NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
{
return error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
}
else if (UserConstants.POST_CODE_NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
{
return error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
}
return toAjax(postService.insertPost(post));
}
/**
* 修改岗位
*/
@GetMapping("/edit/{postId}")
public String edit(@PathVariable("postId") Long postId, ModelMap mmap)
{
mmap.put("post", postService.selectPostById(postId));
return prefix + "/edit";
}
/**
* 修改保存岗位
*/
@RequiresPermissions("system:post:edit")
@Log(title = "岗位管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(@Validated Post post)
{
if (UserConstants.POST_NAME_NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
{
return error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
}
else if (UserConstants.POST_CODE_NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
{
return error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
}
return toAjax(postService.updatePost(post));
}
/**
* 校验岗位名称
*/
@PostMapping("/checkPostNameUnique")
@ResponseBody
public String checkPostNameUnique(Post post)
{
return postService.checkPostNameUnique(post);
}
/**
* 校验岗位编码
*/
@PostMapping("/checkPostCodeUnique")
@ResponseBody
public String checkPostCodeUnique(Post post)
{
return postService.checkPostCodeUnique(post);
}
}
|
[
"hjtxyr@163.com"
] |
hjtxyr@163.com
|
5b00d1b681166db49cd9a762c27b6999f34122d9
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/ecd-20210602/src/main/java/com/aliyun/ecd20210602/models/AppInstallEventResponseBody.java
|
456f740adeb2a6b3bbfdc938ba97863c4d9e919d
|
[
"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
| 1,153
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.ecd20210602.models;
import com.aliyun.tea.*;
public class AppInstallEventResponseBody extends TeaModel {
@NameInMap("Code")
public String code;
@NameInMap("Message")
public String message;
@NameInMap("RequestId")
public String requestId;
public static AppInstallEventResponseBody build(java.util.Map<String, ?> map) throws Exception {
AppInstallEventResponseBody self = new AppInstallEventResponseBody();
return TeaModel.build(map, self);
}
public AppInstallEventResponseBody setCode(String code) {
this.code = code;
return this;
}
public String getCode() {
return this.code;
}
public AppInstallEventResponseBody setMessage(String message) {
this.message = message;
return this;
}
public String getMessage() {
return this.message;
}
public AppInstallEventResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
8412c926052f5cc859d891995177e30fa038ec56
|
a047e7725bab3c5b1c814cdd6042eea2894f4223
|
/src/main/java/com/taobao/api/response/TaohuaItemsSearchResponse.java
|
7656f53c4ffbed610c319846a400e1517b1a56cc
|
[] |
no_license
|
yangdd1205/taobao-sdk-java
|
8a2d8604f1634d62c2ffbcbddf4d8516c9f83dbb
|
50582240cb3c14de3c67b753a82428256bd93c72
|
refs/heads/master
| 2020-12-25T12:17:48.330795
| 2012-04-06T04:04:36
| 2012-04-06T04:04:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 749
|
java
|
package com.taobao.api.response;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.domain.TaohuaSearchItems;
import com.taobao.api.TaobaoResponse;
/**
* TOP API: taobao.taohua.items.search response.
*
* @author auto create
* @since 1.0, null
*/
public class TaohuaItemsSearchResponse extends TaobaoResponse {
private static final long serialVersionUID = 3544374995272464338L;
/**
* 商品搜索列表数据结构
*/
@ApiField("search_items_result")
private TaohuaSearchItems searchItemsResult;
public void setSearchItemsResult(TaohuaSearchItems searchItemsResult) {
this.searchItemsResult = searchItemsResult;
}
public TaohuaSearchItems getSearchItemsResult( ) {
return this.searchItemsResult;
}
}
|
[
"ggd543@gmail.com"
] |
ggd543@gmail.com
|
e80caf88e4f5674f8ef19730ae358206bfa8ca66
|
96f8d42c474f8dd42ecc6811b6e555363f168d3e
|
/budejie/sources/com/tencent/stat/a.java
|
a5c2a28ab4667ccdef753d9cc9d8b0c6ee500d16
|
[] |
no_license
|
aheadlcx/analyzeApk
|
050b261595cecc85790558a02d79739a789ae3a3
|
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
|
refs/heads/master
| 2020-03-10T10:24:49.773318
| 2018-04-13T09:44:45
| 2018-04-13T09:44:45
| 129,332,351
| 6
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,627
|
java
|
package com.tencent.stat;
import android.content.Context;
import android.os.Environment;
import android.provider.Settings.System;
import com.tencent.stat.common.StatLogger;
import com.tencent.stat.common.d;
import com.tencent.stat.common.k;
import com.tencent.stat.common.p;
import com.umeng.update.UpdateConfig;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
public class a {
private static a b = null;
private StatLogger a = k.b();
private boolean c = false;
private boolean d = false;
private boolean e = false;
private Context f = null;
private a(Context context) {
this.f = context.getApplicationContext();
this.c = b(context);
this.d = d(context);
this.e = c(context);
}
public static synchronized a a(Context context) {
a aVar;
synchronized (a.class) {
if (b == null) {
b = new a(context);
}
aVar = b;
}
return aVar;
}
private boolean b(Context context) {
if (k.a(context, UpdateConfig.f)) {
return true;
}
this.a.e((Object) "Check permission failed: android.permission.WRITE_EXTERNAL_STORAGE");
return false;
}
private boolean c(Context context) {
if (k.a(context, "android.permission.WRITE_SETTINGS")) {
return true;
}
this.a.e((Object) "Check permission failed: android.permission.WRITE_SETTINGS");
return false;
}
private boolean d(Context context) {
return k.d() < 14 ? b(context) : true;
}
public boolean a(String str, String str2) {
p.b(this.f, str, str2);
return true;
}
public String b(String str, String str2) {
return p.a(this.f, str, str2);
}
public boolean c(String str, String str2) {
if (!this.c) {
return false;
}
try {
d.a(Environment.getExternalStorageDirectory() + "/" + "Tencent/mta");
File file = new File(Environment.getExternalStorageDirectory(), "Tencent/mta/.mid.txt");
if (file != null) {
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file));
bufferedWriter.write(str + "," + str2);
bufferedWriter.write("\n");
bufferedWriter.close();
}
return true;
} catch (Throwable th) {
this.a.w(th);
return false;
}
}
public String d(String str, String str2) {
if (!this.c) {
return null;
}
try {
File file = new File(Environment.getExternalStorageDirectory(), "Tencent/mta/.mid.txt");
if (file != null) {
for (String split : d.a(file)) {
String[] split2 = split.split(",");
if (split2.length == 2 && split2[0].equals(str)) {
return split2[1];
}
}
}
} catch (FileNotFoundException e) {
this.a.w("Tencent/mta/.mid.txt not found.");
} catch (Throwable th) {
this.a.w(th);
}
return null;
}
public boolean e(String str, String str2) {
if (!this.e) {
return false;
}
System.putString(this.f.getContentResolver(), str, str2);
return true;
}
public String f(String str, String str2) {
return !this.e ? str2 : System.getString(this.f.getContentResolver(), str);
}
}
|
[
"aheadlcxzhang@gmail.com"
] |
aheadlcxzhang@gmail.com
|
5ede1e2d14c83f9f1f2b50905992eb53853f41ad
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/LANG-47b-1-19-Single_Objective_GGA-WeightedSum/org/apache/commons/lang/text/StrBuilder_ESTest_scaffolding.java
|
3fdc2e6f973ead0bdcf6e36fcd8c70740bf7aa6e
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,229
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Jan 17 20:37:41 UTC 2020
*/
package org.apache.commons.lang.text;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class StrBuilder_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.lang.text.StrBuilder";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(StrBuilder_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.lang.text.StrBuilder",
"org.apache.commons.lang.text.StrBuilder$StrBuilderTokenizer",
"org.apache.commons.lang.text.StrTokenizer",
"org.apache.commons.lang.text.StrBuilder$StrBuilderReader",
"org.apache.commons.lang.text.StrBuilder$StrBuilderWriter",
"org.apache.commons.lang.text.StrMatcher"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
d06fe64f9eed2b1080a8291d30a89f632f655871
|
327d615dbf9e4dd902193b5cd7684dfd789a76b1
|
/base_source_from_JADX/sources/com/google/android/gms/internal/ads/zzdzy.java
|
ce70731a60ada6920474038630492af5c57f340f
|
[] |
no_license
|
dnosauro/singcie
|
e53ce4c124cfb311e0ffafd55b58c840d462e96f
|
34d09c2e2b3497dd452246b76646b3571a18a100
|
refs/heads/main
| 2023-01-13T23:17:49.094499
| 2020-11-20T10:46:19
| 2020-11-20T10:46:19
| 314,513,307
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,680
|
java
|
package com.google.android.gms.internal.ads;
final /* synthetic */ class zzdzy {
static final /* synthetic */ int[] zzhyg = new int[zzegd.values().length];
/* JADX WARNING: Can't wrap try/catch for region: R(10:0|1|2|3|4|5|6|7|8|10) */
/* JADX WARNING: Can't wrap try/catch for region: R(8:0|1|2|3|4|5|6|(3:7|8|10)) */
/* JADX WARNING: Failed to process nested try/catch */
/* JADX WARNING: Missing exception handler attribute for start block: B:3:0x0014 */
/* JADX WARNING: Missing exception handler attribute for start block: B:5:0x001f */
/* JADX WARNING: Missing exception handler attribute for start block: B:7:0x002a */
static {
/*
com.google.android.gms.internal.ads.zzegd[] r0 = com.google.android.gms.internal.ads.zzegd.values()
int r0 = r0.length
int[] r0 = new int[r0]
zzhyg = r0
int[] r0 = zzhyg // Catch:{ NoSuchFieldError -> 0x0014 }
com.google.android.gms.internal.ads.zzegd r1 = com.google.android.gms.internal.ads.zzegd.LEGACY // Catch:{ NoSuchFieldError -> 0x0014 }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x0014 }
r2 = 1
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x0014 }
L_0x0014:
int[] r0 = zzhyg // Catch:{ NoSuchFieldError -> 0x001f }
com.google.android.gms.internal.ads.zzegd r1 = com.google.android.gms.internal.ads.zzegd.CRUNCHY // Catch:{ NoSuchFieldError -> 0x001f }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x001f }
r2 = 2
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x001f }
L_0x001f:
int[] r0 = zzhyg // Catch:{ NoSuchFieldError -> 0x002a }
com.google.android.gms.internal.ads.zzegd r1 = com.google.android.gms.internal.ads.zzegd.TINK // Catch:{ NoSuchFieldError -> 0x002a }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x002a }
r2 = 3
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x002a }
L_0x002a:
int[] r0 = zzhyg // Catch:{ NoSuchFieldError -> 0x0035 }
com.google.android.gms.internal.ads.zzegd r1 = com.google.android.gms.internal.ads.zzegd.RAW // Catch:{ NoSuchFieldError -> 0x0035 }
int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x0035 }
r2 = 4
r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x0035 }
L_0x0035:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.ads.zzdzy.<clinit>():void");
}
}
|
[
"dno_sauro@yahoo.it"
] |
dno_sauro@yahoo.it
|
a728256f6b7d9cfb97a050ddff23784a115951d1
|
e87829daeb4a42670d313254b11ae3a67b43c292
|
/src/main/java/vazkii/psi/common/spell/trick/entity/PieceTrickIgnite.java
|
0f02e6ca59029c5a3005f00900f1826bfb8740a9
|
[] |
no_license
|
ShieLian/Psi
|
87f6fe3fe2e300e89dffb2fcee590a8bad47339c
|
7fb1f5804bd890422c93b396e603ebade6604a35
|
refs/heads/master
| 2021-01-21T00:36:54.872229
| 2017-01-18T05:04:26
| 2017-01-18T05:04:26
| 51,513,316
| 1
| 1
| null | 2016-02-11T12:32:31
| 2016-02-11T12:32:31
| null |
UTF-8
|
Java
| false
| false
| 2,037
|
java
|
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Psi Mod. Get the Source Code in github:
* https://github.com/Vazkii/Psi
*
* Psi is Open Source and distributed under the
* Psi License: http://psi.vazkii.us/license.php
*
* File Created @ [08/02/2016, 22:57:55 (GMT)]
*/
package vazkii.psi.common.spell.trick.entity;
import net.minecraft.entity.Entity;
import vazkii.psi.api.spell.EnumSpellStat;
import vazkii.psi.api.spell.Spell;
import vazkii.psi.api.spell.SpellCompilationException;
import vazkii.psi.api.spell.SpellContext;
import vazkii.psi.api.spell.SpellMetadata;
import vazkii.psi.api.spell.SpellParam;
import vazkii.psi.api.spell.SpellRuntimeException;
import vazkii.psi.api.spell.param.ParamEntity;
import vazkii.psi.api.spell.param.ParamNumber;
import vazkii.psi.api.spell.piece.PieceTrick;
public class PieceTrickIgnite extends PieceTrick {
SpellParam target;
SpellParam time;
public PieceTrickIgnite(Spell spell) {
super(spell);
}
@Override
public void initParams() {
addParam(target = new ParamEntity(SpellParam.GENERIC_NAME_TARGET, SpellParam.YELLOW, false, false));
addParam(time = new ParamNumber(SpellParam.GENERIC_NAME_TIME, SpellParam.RED, false, true));
}
@Override
public void addToMetadata(SpellMetadata meta) throws SpellCompilationException {
super.addToMetadata(meta);
Double timeVal = this.<Double>getParamEvaluation(time);
if(timeVal == null || timeVal <= 0 || timeVal.doubleValue() != timeVal.intValue())
throw new SpellCompilationException(SpellCompilationException.NON_POSITIVE_INTEGER, x, y);
meta.addStat(EnumSpellStat.POTENCY, timeVal.intValue() * 40);
meta.addStat(EnumSpellStat.COST, timeVal.intValue() * 65);
}
@Override
public Object execute(SpellContext context) throws SpellRuntimeException {
Entity targetVal = this.<Entity>getParamValue(context, target);
Double timeVal = this.<Double>getParamValue(context, time);
context.verifyEntity(targetVal);
targetVal.setFire(timeVal.intValue());
return null;
}
}
|
[
"vazkii@hotmail.com"
] |
vazkii@hotmail.com
|
f47ba38541a9ff3ddbc83cbf0c7efc0e94f55a52
|
de4292910ca4cb23381ed08fe26e1c0810bf98dc
|
/molgenis-core/src/main/java/org/molgenis/meta/types/MrefField.java
|
9ae5ed3b2bcaae40a914e5df13be28f95cdd0563
|
[] |
no_license
|
mswertz/molgenis-experimental
|
accc7de0af5e91ce926464d0d9c6396a29061866
|
3492c4fd4e1bce12a4290662f2e8e362ebadc956
|
refs/heads/master
| 2016-09-06T14:13:06.646409
| 2013-07-21T00:46:02
| 2013-07-21T00:46:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,946
|
java
|
package org.molgenis.meta.types;
import java.text.ParseException;
import org.molgenis.meta.MetaDataException;
import org.molgenis.meta.FieldMetaData;
/**
* Many to many reference.
*
* Example MOLGENIS DSL,
*
* <pre>
* <field name="myfield" type="mref" xref_entity="OtherEntity" xref_field="id" xref_label="name"/>
* </pre>
*
* This example would in the UI show a seletion box with 'name' elements.
*/
public class MrefField extends FieldType
{
@Override
public String getJavaAssignment(String value)
{
return "NOT IMPLEMENTED";
}
@Override
public String getJavaPropertyType() throws MetaDataException
{
return String.format("java.util.List<%s.%s>", f.getXrefEntity().getNamespace(), f.getXrefEntity().getName());
}
@Override
public String getJavaPropertyDefault() throws MetaDataException
{
return String.format("new java.util.ArrayList<%s.%s>()", f.getXrefEntity().getNamespace(), f.getXrefEntity()
.getName());
}
@Override
public String getJavaSetterType() throws MetaDataException
{
// Entity e_ref = f.getXrefEntity();
FieldMetaData f_ref = f.getXrefField();
return "new java.util.ArrayList<" + getFieldType(f_ref).getJavaSetterType() + ">()";
}
public String getJavaGetterType()
{
return "List";
}
@Override
public String getMysqlType() throws MetaDataException
{
// FIXME this function should be never called???
return getFieldType(f.getXrefField()).getMysqlType();
}
@Override
public String getOracleType() throws MetaDataException
{
// FIXME this function should be never called???
return getFieldType(f.getXrefField()).getOracleType();
}
@Override
public String getHsqlType() throws MetaDataException
{
return getFieldType(f.getXrefField()).getHsqlType();
}
@Override
public String getXsdType() throws MetaDataException
{
return getFieldType(f.getXrefField()).getXsdType();
}
@Override
public String getFormatString()
{
return "";
}
// @Override
// public HtmlInput<?> createInput(String name, Class<? extends Entity>
// xrefEntityClassName) throws HtmlInputException
// {
// return new MrefInput(name, xrefEntityClassName);
// }
@Override
public String getCppPropertyType() throws MetaDataException
{
FieldMetaData f_ref = f.getXrefField();
return "vector<" + getFieldType(f_ref).getCppPropertyType() + ">";
}
@Override
public String getCppJavaPropertyType() throws MetaDataException
{
return "Ljava/util/List;";
}
public Class<?> getJavaType()
{
return java.util.List.class;
}
@Override
public Object getTypedValue(String value) throws ParseException
{
throw new UnsupportedOperationException("Conversion of MRef not supported.");
}
public String getName()
{
return "mref";
}
public String toString(Object value)
{
throw new UnsupportedOperationException();
}
}
|
[
"m.a.swertz@rug.nl"
] |
m.a.swertz@rug.nl
|
44ce6b3fec7eff36de6896c795c7c36cb478f0f1
|
96d71f73821cfbf3653f148d8a261eceedeac882
|
/external/decompiled/android/WhatsApp-2.8.4278_dex2jar.src.meta/com/whatsapp/fz.java
|
cc3015144ad5aa791e1b1abc1046faab03e5e4d8
|
[] |
no_license
|
JaapSuter/Niets
|
9a9ec53f448df9b866a8c15162a5690b6bcca818
|
3cc42f8c2cefd9c3193711cbf15b5304566e08cb
|
refs/heads/master
| 2020-04-09T19:09:40.667155
| 2012-09-28T18:11:33
| 2012-09-28T18:11:33
| 5,751,595
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 688
|
java
|
package com.whatsapp;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
class fz
implements Runnable
{
final ProfileInfoActivity a;
fz(ProfileInfoActivity paramProfileInfoActivity)
{
}
public void run()
{
if ((ProfileInfoActivity.b(this.a).p == 0) && (ProfileInfoActivity.b(this.a).o == 0))
{
ProfileInfoActivity.c(this.a).setVisibility(4);
ProfileInfoActivity.d(this.a).setVisibility(0);
ProfileInfoActivity.e(this.a).setVisibility(4);
}
}
}
/* Location: C:\Users\Jaap\Downloads\Code\WhatsApp-2.8.4278_dex2jar.jar
* Qualified Name: com.whatsapp.fz
* JD-Core Version: 0.6.1
*/
|
[
"git@jaapsuter.com"
] |
git@jaapsuter.com
|
c3667c96a455c099ead73a7e0d505f3714074caf
|
05948ca1cd3c0d2bcd65056d691c4d1b2e795318
|
/classes2/dagger/a.java
|
ea60de67f52600321eb502a9d21a918c74f276cb
|
[] |
no_license
|
waterwitness/xiaoenai
|
356a1163f422c882cabe57c0cd3427e0600ff136
|
d24c4d457d6ea9281a8a789bc3a29905b06002c6
|
refs/heads/master
| 2021-01-10T22:14:17.059983
| 2016-10-08T08:39:11
| 2016-10-08T08:39:11
| 70,317,042
| 0
| 8
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 240
|
java
|
package dagger;
public abstract interface a<T>
{
public abstract void a(T paramT);
}
/* Location: E:\apk\xiaoenai2\classes2-dex2jar.jar!\dagger\a.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
82b0b761a85cda5ecaaef4b456a0804ff5ed19fb
|
6e62b58f4e877eb9d2db1e9e113a73954ccdf346
|
/opensaml3/src/main/java/se/litsec/opensaml/saml2/common/assertion/AbstractAttributeStatementValidator.java
|
72ce57bfb33fc043fcbde61789bf656945f77fa1
|
[
"Apache-2.0"
] |
permissive
|
zhiqinghuang/opensaml-ext
|
f4a83d269460a4bc0eadfcc1362570ce7d336a6f
|
cc3dfc2da41b3aa47bd442d9d4451cfbd4b86506
|
refs/heads/master
| 2020-09-10T02:42:28.890517
| 2019-10-28T21:34:56
| 2019-10-28T21:34:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,849
|
java
|
/*
* Copyright 2016-2018 Litsec AB
*
* 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 se.litsec.opensaml.saml2.common.assertion;
import java.util.Collections;
import java.util.List;
import javax.xml.namespace.QName;
import org.opensaml.saml.common.assertion.AssertionValidationException;
import org.opensaml.saml.common.assertion.ValidationContext;
import org.opensaml.saml.common.assertion.ValidationResult;
import org.opensaml.saml.saml2.assertion.StatementValidator;
import org.opensaml.saml.saml2.core.Assertion;
import org.opensaml.saml.saml2.core.Attribute;
import org.opensaml.saml.saml2.core.AttributeStatement;
import org.opensaml.saml.saml2.core.Statement;
/**
* Abstract validator for {@link AttributeStatement}s.
*
* @author Martin Lindström (martin.lindstrom@litsec.se)
*/
public abstract class AbstractAttributeStatementValidator implements StatementValidator {
/** {@inheritDoc} */
@Override
public QName getServicedStatement() {
return AttributeStatement.DEFAULT_ELEMENT_NAME;
}
/**
* Validates that all required attributes were received in the {@code AttributeStatement}.
*/
@Override
public ValidationResult validate(Statement statement, Assertion assertion, ValidationContext context)
throws AssertionValidationException {
if (statement instanceof AttributeStatement) {
AttributeStatement attributeStatement = (AttributeStatement) statement;
List<Attribute> list = attributeStatement.getAttributes() != null ? attributeStatement.getAttributes() : Collections.emptyList();
return this.validateRequiredAttributes(list, attributeStatement, assertion, context);
}
else {
throw new AssertionValidationException("Illegal call - statement is of type " + statement.getClass().getSimpleName());
}
}
/**
* Validates that the attribute statement contains all attributes that we require.
*
* @param attributes
* the attributes
* @param statement
* the attribute statement
* @param assertion
* the assertion
* @param context
* the validation context
* @return validation result
*/
protected abstract ValidationResult validateRequiredAttributes(List<Attribute> attributes, AttributeStatement statement,
Assertion assertion, ValidationContext context);
}
|
[
"martin.lindstrom@litsec.se"
] |
martin.lindstrom@litsec.se
|
62096395cda86017d79f7f0fb89dea73e0f6090d
|
8f3633a215fc69bb7402c13b57f48e8b21fc1829
|
/ch23-Sorting/src/com/coderbd/book/QuickSort.java
|
c89f4e083300a6a2f32b8cab7b65517e42f15f57
|
[] |
no_license
|
springapidev/Java-8
|
44c167c2ef607de135b83de44c42943a317870f0
|
6801f2f003631c10fcb39c899443ec5b6cc11752
|
refs/heads/master
| 2021-06-06T12:25:16.111508
| 2020-02-23T08:51:28
| 2020-02-23T08:51:28
| 145,200,749
| 10
| 11
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,839
|
java
|
package com.coderbd.book;
public class QuickSort {
public static void quickSort(int[] list) {
quickSort(list, 0, list.length - 1);
}
private static void quickSort(int[] list, int first, int last) {
if (last > first) {
int pivotIndex = partition(list, first, last);
quickSort(list, first, pivotIndex - 1);
quickSort(list, pivotIndex + 1, last);
}
}
/**
* Partition the array list[first..last]
*/
private static int partition(int[] list, int first, int last) {
int pivot = list[first]; // Choose the first element as the pivot
int low = first + 1; // Index for forward search
int high = last; // Index for backward search
while (high > low) {
// Search forward from left
while (low <= high && list[low] <= pivot) {
low++;
}
// Search backward from right
while (low <= high && list[high] > pivot) {
high--;
}
// Swap two elements in the list
if (high > low) {
int temp = list[high];
list[high] = list[low];
list[low] = temp;
}
}
while (high > first && list[high] >= pivot) {
high--;
}
// Swap pivot with list[high]
if (pivot > list[high]) {
list[first] = list[high];
list[high] = pivot;
return high;
} else {
return first;
}
}
/**
* A test method
*/
public static void main(String[] args) {
int[] list = {5, 2, 9, 3, 8, 4, 0, 1, 6, 7};
quickSort(list);
for (int i = 0; i < list.length; i++) {
System.out.print(list[i] + " ");
}
}
}
|
[
"springapidev@gmail.com"
] |
springapidev@gmail.com
|
0fc6c84239771d9597d6cf16a2bb8f1c70099b37
|
b0342571b56afe34e675c22a4cb8c5e66d3e78f5
|
/src/main/java/controller/commands/orderProduct/DeleteProductFromOrderCommand.java
|
e88712b4f26d769ae7d104a5d9124095f237a10b
|
[
"MIT"
] |
permissive
|
DyvakYA/store
|
3ee8c77dbf8d2fc10d4869fb1196ff90ecfac378
|
7727a9f6cccfcaaa3d1cea8fa02f5a78fd6a4cb4
|
refs/heads/master
| 2020-03-31T18:49:22.025519
| 2019-01-07T21:02:52
| 2019-01-07T21:02:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,002
|
java
|
package controller.commands.orderProduct;
import controller.commands.Command;
import controller.commands.pageconstructor.RespondFactory;
import model.entities.Order;
import model.entities.OrderProduct;
import model.entities.Product;
import model.entities.User;
import model.extras.Localization;
import model.services.OrderProductService;
import model.services.UserService;
import model.services.service.OrderProductServiceImpl;
import model.services.service.UserServiceImpl;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import static model.constants.AttributesHolder.*;
import static model.constants.MsgHolder.DELETE_PRODUCT_SUCCESSFUL_MSG;
/**
* This class represents deleting Product from Order command.
*
* @author dyvakyurii@gmail.com
*/
public class DeleteProductFromOrderCommand implements Command {
private OrderProductService orderProductService = OrderProductServiceImpl.getInstance();
private UserService userService = UserServiceImpl.getInstance();
@Override
public String execute(HttpServletRequest request, HttpServletResponse response)
throws IOException {
orderProductService.deleteProductFromOrder(
Integer.parseInt(request.getParameter(ORDER_ID_ATTRIBUTE)),
Integer.parseInt(request.getParameter(PRODUCT_ID_ATTRIBUTE)));
List<User> userList = userService.getAllUsersWithOrders();
Map<User, Map<Order, Map<OrderProduct, Product>>> userMap = userService.getUserMap(userList);
request.setAttribute(USER_MAP_ATTRIBUTE, userMap);
String message = Localization.getLocalizedMessage(request, DELETE_PRODUCT_SUCCESSFUL_MSG);
request.setAttribute(RESULT_ATTRIBUTE, message);
return RespondFactory.builder()
.request(request)
.page("order")
.build()
.createPageFactory();
}
}
|
[
"dyvakyurii@gmail.com"
] |
dyvakyurii@gmail.com
|
ec70721a68ef59eb0258390caf2ae9ece2ee4b3f
|
cfc60fc1148916c0a1c9b421543e02f8cdf31549
|
/src/testcases/CWE190_Integer_Overflow/CWE190_Integer_Overflow__fromDB_add_54d.java
|
7c89bce6d47c7ca505445a624806d0e5eeb890cd
|
[
"LicenseRef-scancode-public-domain"
] |
permissive
|
zhujinhua/GitFun
|
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
|
987f72fdccf871ece67f2240eea90e8c1971d183
|
refs/heads/master
| 2021-01-18T05:46:03.351267
| 2012-09-11T16:43:44
| 2012-09-11T16:43:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,453
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__fromDB_add_54d.java
Label Definition File: CWE190_Integer_Overflow.label.xml
Template File: sources-sinks-54d.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: fromDB Read data from a database connection
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: add
* GoodSink: Ensure there will not be an overflow before performing the addition
* BadSink : Unchecked addition, which can lead to overflow
* Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package
*
* */
package testcases.CWE190_Integer_Overflow;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
import java.security.SecureRandom;
public class CWE190_Integer_Overflow__fromDB_add_54d
{
public void bad_sink(int data ) throws Throwable
{
(new CWE190_Integer_Overflow__fromDB_add_54e()).bad_sink(data );
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(int data ) throws Throwable
{
(new CWE190_Integer_Overflow__fromDB_add_54e()).goodG2B_sink(data );
}
/* goodB2G() - use badsource and goodsink */
public void goodB2G_sink(int data ) throws Throwable
{
(new CWE190_Integer_Overflow__fromDB_add_54e()).goodB2G_sink(data );
}
}
|
[
"amitf@chackmarx.com"
] |
amitf@chackmarx.com
|
f546221acbea6caeb0aa740d3634bf602e9b93b9
|
7cc77b6f50acde4909b351ed9269a7888851a7dd
|
/latc-platform/console/src/main/java/eu/latc/misc/TestMail.java
|
1c34243a9d8599b0a7b27da9c775bb80dec45928
|
[] |
no_license
|
LATC/sandbox
|
a81920bb824acb991cb34841000ed342bdfc9fd5
|
71c9379518023329ec2ce096afa425fe3aa9b612
|
refs/heads/master
| 2016-09-16T04:31:32.486204
| 2012-07-11T16:21:05
| 2012-07-11T16:21:05
| 1,766,640
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 362
|
java
|
/**
*
*/
package eu.latc.misc;
/**
* @author Christophe Guéret <christophe.gueret@gmail.com>
*
*/
public class TestMail {
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
MailSender sender = new MailSender();
sender.send();
MailSender sender2 = new MailSender();
sender2.send();
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
2dce3991b113c978bb5b7f240a614fa81a769f66
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_fa94a2b5dcce964e301fdaaa8f4f21d3767b5ac9/SequenceGrabber/2_fa94a2b5dcce964e301fdaaa8f4f21d3767b5ac9_SequenceGrabber_s.java
|
5513222a08e0f7e872bcdddc76a4015098ab6dd4
|
[] |
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
| 4,588
|
java
|
package project.senior.app.pormmo;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import uk.co.caprica.vlcj.player.MediaPlayer;
/**
* @author Shelby Copeland, Max De Bennedetti, John Fisher
*/
public class SequenceGrabber extends JPanel
{
private UserInterfaceFrame parent;
private MediaPlayer mPlayer;
private long start = 0, end = 0;
private String savePath;
private JLabel pos;
private JTextField fps;
public SequenceGrabber(UserInterfaceFrame parent)
{
this.parent = parent;
mPlayer = parent.mPlayer;
initForm();
}
private void initForm()
{
GridBagLayout gbl = new GridBagLayout();
GridBagConstraints gbs = new GridBagConstraints();
setLayout(gbl);
ButtonListener bl = new ButtonListener();
JButton markStart = new JButton("Sequence Start: ");
markStart.setName("Start");
markStart.addMouseListener(bl);
JButton markEnd = new JButton("Sequence Stop: ");
markEnd.setName("End");
markEnd.addMouseListener(bl);
fps = new JTextField("10");
fps.setPreferredSize(new Dimension(50, 20));
JButton saveSequence = new JButton("Save Sequence");
saveSequence.setName("SaveSequence");
saveSequence.addMouseListener(bl);
gbs.gridx = 0;
gbs.gridy = 0;
add(markStart, gbs);
gbs.gridx = 0;
gbs.gridy = 1;
add(markEnd, gbs);
JPanel groupPan = new JPanel();
groupPan.add(new JLabel("FPS"));
groupPan.add(fps);
gbs.gridx = 0;
gbs.gridy = 2;
add(groupPan, gbs);
gbs.gridx = 0;
gbs.gridy = 3;
add(saveSequence, gbs);
pos = new JLabel("0");
gbs.gridx = 0;
gbs.gridy = 4;
add(pos, gbs);
}
public void SaveSequence(long start, long end, String path, int fps)
{
mPlayer.setTime(start);
parent.pcp.playerFrame.setVisible(true);
BufferedImage currentSnapshot;
long snapFreq = 1000 / fps;
GSR gsr = new GSR();
BufferedWrapper bw;
try
{
for (int i = 0; mPlayer.getTime() <= end; i++)
{
System.out.println("Start: " + start + " end: " + end + " i: " + i);
pos.setText("" + mPlayer.getTime());
currentSnapshot = mPlayer.getSnapshot();
if (currentSnapshot != null)
{
bw = new BufferedWrapper(currentSnapshot, 1);
gsr.RemoveGreen_3(bw, (1.0f * 93) / 100.0f);
ImageIO.write(bw.img, "png", new File(path + "-" + i + ".png"));
}
mPlayer.setTime(start += (i * snapFreq));
System.out.println("Snapping: " + mPlayer.getTime());
}
}
catch (IOException | IllegalArgumentException ex)
{
}
}
private class ButtonListener extends MouseAdapter
{
@Override
public void mouseReleased(MouseEvent e)
{
JButton sourceButton = (JButton) e.getSource();
switch (sourceButton.getName())
{
case "Start":
start = mPlayer.getTime();
sourceButton.setText("Sequence Start: " + start);
parent.repaint();
break;
case "End":
end = mPlayer.getTime();
sourceButton.setText("Sequence Start: " + end);
break;
case "SaveSequence":
if (start > 0 && end > 0)
{
if (start < end)
{
JFileChooser jfc = new JFileChooser("Please choose destination folder for the sequence image(s) and enter a prefix for the images.");
jfc.showSaveDialog(null);
if (jfc.getSelectedFile() != null)
{
SaveSequence(start, end, jfc.getSelectedFile().toString(), new Integer(fps.getText()));
}
}
else
{
JOptionPane.showMessageDialog(null, "Unable to Save Sequence! Start position must be less than the end position.");
}
}
else
{
JOptionPane.showMessageDialog(null, "Unable to Save Sequence! Must have a start and end position.");
}
break;
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a52dfed4cc7e89ecb20fe606ceac5b1db35e0b97
|
91e04b72229eaecb041c96d3d56069022eeb6f14
|
/jtstoolkit/src/test/java/ec/tstoolkit/timeseries/calendars/EasterRelatedDayTest.java
|
acc2d4d30cdd4fa63e21c277b5175527520e8334
|
[] |
no_license
|
codeaudit/jdemetra-core
|
067c3326b419175b4b66dce6921cfd1c8f27347c
|
c5091e7c5c8158b9a29806f306a80baacc38aaa8
|
refs/heads/master
| 2021-01-14T11:07:57.153436
| 2015-01-13T10:18:36
| 2015-01-13T10:18:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,836
|
java
|
/*
* Copyright 2013 National Bank of Belgium
*
* Licensed under the EUPL, Version 1.1 or – as soon they will be approved
* by the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://ec.europa.eu/idabc/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package ec.tstoolkit.timeseries.calendars;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
/**
*
* @author Jean Palate
*/
public class EasterRelatedDayTest {
public EasterRelatedDayTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Test
public void testLongTermCorrection() {
double w = .88;
EasterRelatedDay day = new EasterRelatedDay(-39, w);
double[][] le = day.getLongTermMeanEffect(12);
double p = 0;
for (int i = 0; i < 6; ++i) {
for (int j = 0; j < le.length; ++j) {
if (le[j] != null) {
p += le[j][i];
}
}
}
org.junit.Assert.assertTrue(Math.abs(p - w) < 1e-9);
}
@Test
public void testprobEaster() {
double p = 0;
for (int i = 0; i < 35; ++i) {
double q = EasterRelatedDay.probEaster(i);
p += q;
}
org.junit.Assert.assertTrue(Math.abs(p - 1) < 1e-9);
}
}
|
[
"philippe.charles@nbb.be"
] |
philippe.charles@nbb.be
|
1381a353c9686c470766f38ae449d9254304f27f
|
4de8dc187355527d5abe6741d85b16858542f198
|
/GhostPractice/GhostLibrary/src/main/java/com/boha/ghostlibrary/fragments/TaskFragment.java
|
86d5363d5b92ee89d00f575d3d6c5d1e2a8ca89e
|
[] |
no_license
|
bohatmx/GhostPractice
|
5b05358847c689f6132e4658d587070cf26588a3
|
3f05355f1d747f081fe235c496ae72ad02a086f8
|
refs/heads/master
| 2021-03-16T08:44:35.528388
| 2015-12-06T07:23:56
| 2015-12-06T07:23:56
| 34,336,086
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,025
|
java
|
package com.boha.ghostlibrary.fragments;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Switch;
import android.widget.TextView;
import com.boha.ghostlibrary.R;
import com.boha.ghostpractice.data.GhostRequestDTO;
import com.boha.ghostpractice.data.MobileUser;
import com.boha.ghostpractice.data.TaskDTO;
import com.boha.ghostpractice.data.WebServiceResponse;
import com.boha.ghostpractice.util.CommsUtil;
import com.boha.ghostpractice.util.NetworkUnavailableException;
import com.boha.ghostpractice.util.Statics;
import com.boha.ghostpractice.util.ToastUtil;
import com.boha.ghostpractice.util.bean.CommsException;
import com.fourmob.datetimepicker.date.DatePickerDialog;
import com.google.gson.Gson;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Locale;
/**
* Created by aubreyM on 2014/07/25.
*/
public class TaskFragment extends Fragment {
@Override
public void onAttach(Activity a) {
super.onAttach(a);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle saved) {
Log.i(LOG, "-- onCreateView ............");
ctx = getActivity();
inflater = getActivity().getLayoutInflater();
view = inflater.inflate(R.layout.task, container,
false);
setFields();
Bundle b = getArguments();
if (b != null) {
mobileUser = (MobileUser) b.getSerializable("mobileUser");
if (mobileUser != null) {
txtName.setText(mobileUser.getFirstNames()
+ " " + mobileUser.getLastName());
}
}
return view;
}
private SharedPreferences sp;
WebServiceResponse resp;
TaskDTO task;
Gson gson = new Gson();
class PostTask extends AsyncTask<Void, Void, Integer> {
@Override
protected void onPreExecute() {
}
@Override
protected Integer doInBackground(Void... params) {
if (sp == null) {
sp = PreferenceManager.getDefaultSharedPreferences(ctx);
}
GhostRequestDTO req = new GhostRequestDTO();
req.setRequestType(GhostRequestDTO.ASSIGN_TASK);
req.setTask(task);
req.setAppID(sp.getInt("appID", 0));
req.setPlatformID(sp.getInt("platformID", 0));
req.setUserID(sp.getInt("userID", 0));
req.setCompanyID(sp.getInt("companyID", 0));
req.setDeviceID(sp.getString("deviceID", null));
;
try {
String json = URLEncoder.encode(gson.toJson(req), "UTF-8");
resp = CommsUtil.getData(Statics.URL + json,
ctx);
return resp.getResponseCode();
} catch (CommsException e) {
Log.e(LOG, "Error getting matter detail", e);
return 1;
} catch (NetworkUnavailableException e) {
return 999;
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return 0;
}
@Override
protected void onPostExecute(Integer ret) {
if (ret > 0) {
ToastUtil.errorToast(ctx, resp.getResponseMessage());
return;
}
}
}
private void setFields() {
txtName = (TextView) view.findViewById(R.id.TASK_name);
txtTitle = (TextView) view.findViewById(R.id.HEADER_title);
btnDate = (Button) view.findViewById(R.id.TASK_btnDate);
btnPost = (Button) view.findViewById(R.id.TASK_btnPost);
txtTitle.setText("Assign Task");
aSwitch = (Switch) view.findViewById(R.id.TASK_switch);
editDesc = (EditText) view.findViewById(R.id.TASK_desc);
date = new Date().getTime();
btnDate.setText(sdf.format(new Date(date)));
btnDate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showDateDialog();
}
});
btnPost.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (editDesc.getText().toString().isEmpty()) {
ToastUtil.toast(ctx, "Please enter task description");
return;
}
task = new TaskDTO();
task.setDueDate(date);
task.setTaskDescription(editDesc.getText().toString());
task.setUserID(mobileUser.getUserID());
task.setMatterID(matterID);
if (aSwitch.isChecked()) {
task.setNotifyWhenComplete(true);
}
new PostTask().execute();
}
});
}
public void setMobileUser(MobileUser mobileUser, String matterID) {
this.mobileUser = mobileUser;
txtName.setText(mobileUser.getFirstNames()
+ " " + mobileUser.getLastName());
}
private void showDateDialog() {
if (mYear == 0) {
Calendar cal = GregorianCalendar.getInstance();
mYear = cal.get(Calendar.YEAR);
mMonth = cal.get(Calendar.MONTH);
mDay = cal.get(Calendar.DAY_OF_MONTH);
}
DatePickerDialog dp = DatePickerDialog.newInstance(new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePickerDialog datePickerDialog, int year, int month, int day) {
Calendar cal = GregorianCalendar.getInstance();
cal.set(Calendar.YEAR, year);
cal.set(Calendar.MONTH, month);
cal.set(Calendar.DAY_OF_MONTH, day);
date = cal.getTimeInMillis();
btnDate.setText(sdf.format(cal.getTime()));
}
}, mYear, mMonth, mDay);
dp.setYearRange(2013, 2037);
dp.show(getFragmentManager(), "datP");
}
private static final Locale loc = Locale.getDefault();
private static final SimpleDateFormat sdf = new SimpleDateFormat("EEEE, dd MMMM yyyy", loc);
private int mYear, mMonth, mDay, mHour, mMinute;
long date;
MobileUser mobileUser;
View view;
Switch aSwitch;
TextView txtName, txtTitle;
Button btnDate, btnPost;
EditText editDesc;
String matterID;
static final String LOG = "TaskFragment";
Context ctx;
}
|
[
"malengatiger@gmail.com"
] |
malengatiger@gmail.com
|
5aa24d25b027a78e4894b24a0d1e4950d0b10481
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/plugin/hardwareopt/p1486c/C39244b.java
|
cc6e249bd21bf77e00a16652ed4092a6f32037f2
|
[] |
no_license
|
xsren/AndroidReverseNotes
|
9631a5aabc031006e795a112b7ac756a8edd4385
|
9202c276fe9f04a978e4e08b08e42645d97ca94b
|
refs/heads/master
| 2021-04-07T22:50:51.072197
| 2019-07-16T02:24:43
| 2019-07-16T02:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,550
|
java
|
package com.tencent.p177mm.plugin.hardwareopt.p1486c;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.p177mm.kernel.C1720g;
import com.tencent.p177mm.plugin.report.service.C7060h;
import com.tencent.p177mm.protocal.protobuf.asz;
import com.tencent.p177mm.protocal.protobuf.bbg;
import com.tencent.p177mm.sdk.platformtools.C4990ab;
import com.tencent.p177mm.sdk.platformtools.C5046bo;
import com.tencent.p177mm.storage.C5128ac.C5127a;
import com.tencent.p177mm.vending.p637c.C5681a;
import java.util.Iterator;
import java.util.LinkedList;
import org.json.JSONArray;
import org.json.JSONObject;
/* renamed from: com.tencent.mm.plugin.hardwareopt.c.b */
public final class C39244b implements C5681a<Boolean, asz> {
private boolean nqs = false;
public final /* synthetic */ Object call(Object obj) {
AppMethodBeat.m2504i(59282);
Boolean a = m66865a((asz) obj);
AppMethodBeat.m2505o(59282);
return a;
}
public C39244b(boolean z) {
this.nqs = z;
}
/* renamed from: a */
private Boolean m66865a(asz asz) {
AppMethodBeat.m2504i(59280);
Boolean bool;
if (C1720g.m3534RN().mo5161QY()) {
long longValue = ((Long) C1720g.m3536RP().mo5239Ry().get(C5127a.USERINFO_HARDWARE_LAST_UPLOAD_TICKS_LONG_SYNC, Long.valueOf(-1))).longValue();
long currentTimeMillis = System.currentTimeMillis();
C4990ab.m7417i("MicroMsg.TaskReportHardwareInfo", "hy: last ticks: %d, current ticks: %d, interval: %d", Long.valueOf(longValue), Long.valueOf(currentTimeMillis), Long.valueOf(currentTimeMillis - longValue));
if (!this.nqs && currentTimeMillis - longValue < 86400000) {
C4990ab.m7410d("MicroMsg.TaskReportHardwareInfo", "hy: should not upload. too small interval");
bool = Boolean.FALSE;
AppMethodBeat.m2505o(59280);
return bool;
} else if (!this.nqs && (asz == null || asz.wwG == null)) {
C4990ab.m7420w("MicroMsg.TaskReportHardwareInfo", "hy: error when finding hardware");
C7060h.pYm.mo8378a(661, 1, 1, false);
bool = Boolean.FALSE;
AppMethodBeat.m2505o(59280);
return bool;
} else if (this.nqs || !C5046bo.isNullOrNil(asz.wwG.imei)) {
C4990ab.m7416i("MicroMsg.TaskReportHardwareInfo", "hy: found hardware infos. start report");
C7060h c7060h = C7060h.pYm;
Object[] objArr = new Object[41];
objArr[0] = asz.wwG.imei;
objArr[1] = asz.wwG.vJX;
objArr[2] = asz.wwG.vJY;
objArr[3] = asz.wwG.vJZ;
objArr[4] = asz.wwH.vRD;
objArr[5] = asz.wwH.vRB;
objArr[6] = asz.wwH.vJY;
objArr[7] = asz.wwH.vRE;
objArr[8] = Integer.valueOf(asz.wwH.vRC);
objArr[9] = Integer.valueOf(asz.wwI.wFN);
objArr[10] = Integer.valueOf(asz.wwI.wFO);
objArr[11] = Integer.valueOf(asz.wwJ.xdo);
objArr[12] = Integer.valueOf(asz.wwJ.xdp ? 1 : 0);
objArr[13] = Integer.valueOf(asz.wwN.wkx ? 1 : 0);
objArr[14] = Integer.valueOf(asz.wwN.wky ? 1 : 0);
objArr[15] = asz.wwK.wWb;
objArr[16] = Integer.valueOf(asz.wwK.density);
objArr[17] = asz.wwL.wav;
objArr[18] = Integer.valueOf(asz.wwM.wjw ? 1 : 0);
objArr[19] = Integer.valueOf(asz.wwM.wjx ? 1 : 0);
objArr[20] = Integer.valueOf(asz.wwM.wjy ? 1 : 0);
objArr[21] = Integer.valueOf(asz.wwM.wjz ? 1 : 0);
objArr[22] = Integer.valueOf(asz.wwM.wjA ? 1 : 0);
objArr[23] = Integer.valueOf(asz.wwM.wjB ? 1 : 0);
objArr[24] = Integer.valueOf(asz.wwM.wjC ? 1 : 0);
objArr[25] = Integer.valueOf(asz.wwM.wjN ? 1 : 0);
objArr[26] = Integer.valueOf(asz.wwM.wjD ? 1 : 0);
objArr[27] = Integer.valueOf(asz.wwM.wjE ? 1 : 0);
objArr[28] = Integer.valueOf(asz.wwM.wjF ? 1 : 0);
objArr[29] = Integer.valueOf(asz.wwM.wjG ? 1 : 0);
objArr[30] = Integer.valueOf(asz.wwM.wjH ? 1 : 0);
objArr[31] = Integer.valueOf(asz.wwM.wjI ? 1 : 0);
objArr[32] = Integer.valueOf(asz.wwM.wjJ ? 1 : 0);
objArr[33] = Integer.valueOf(asz.wwM.wjK ? 1 : 0);
objArr[34] = Integer.valueOf(asz.wwM.wjL ? 1 : 0);
objArr[35] = Integer.valueOf(asz.wwM.wjM ? 1 : 0);
objArr[36] = Integer.valueOf(asz.wwI.ggb);
objArr[37] = Integer.valueOf(asz.wwI.wFP);
objArr[38] = asz.wwL.waw;
objArr[39] = C39244b.m66866ad(asz.wwL.wax);
objArr[40] = Integer.valueOf(asz.wwN.wkz ? 1 : 0);
c7060h.mo8381e(14552, objArr);
C1720g.m3536RP().mo5239Ry().set(C5127a.USERINFO_HARDWARE_LAST_UPLOAD_TICKS_LONG_SYNC, Long.valueOf(currentTimeMillis));
C7060h.pYm.mo8378a(661, 0, 1, false);
bool = Boolean.TRUE;
AppMethodBeat.m2505o(59280);
return bool;
} else {
C4990ab.m7420w("MicroMsg.TaskReportHardwareInfo", "hy: no imei detected. maybe not grant permission. ignore");
C7060h.pYm.mo8378a(661, 2, 1, false);
bool = Boolean.FALSE;
AppMethodBeat.m2505o(59280);
return bool;
}
}
C4990ab.m7412e("MicroMsg.TaskReportHardwareInfo", "Account not init, just return");
bool = Boolean.FALSE;
AppMethodBeat.m2505o(59280);
return bool;
}
/* renamed from: ad */
private static String m66866ad(LinkedList<bbg> linkedList) {
AppMethodBeat.m2504i(59281);
JSONArray jSONArray = new JSONArray();
String jSONArray2;
if (linkedList != null) {
try {
Iterator it = linkedList.iterator();
while (it.hasNext()) {
bbg bbg = (bbg) it.next();
if (!(bbg == null || C5046bo.isNullOrNil(bbg.clY))) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("mimeName", bbg.clY);
JSONArray jSONArray3 = new JSONArray();
if (bbg.wFX != null) {
Iterator it2 = bbg.wFX.iterator();
while (it2.hasNext()) {
jSONArray3.put((String) it2.next());
}
}
jSONObject.put("codecName", jSONArray3);
jSONArray.put(jSONObject);
}
}
jSONArray2 = jSONArray.toString();
AppMethodBeat.m2505o(59281);
return jSONArray2;
} catch (Exception e) {
C4990ab.printErrStackTrace("MicroMsg.TaskReportHardwareInfo", e, "hy: error when build up json", new Object[0]);
jSONArray2 = "";
AppMethodBeat.m2505o(59281);
return jSONArray2;
}
}
C4990ab.m7420w("MicroMsg.TaskReportHardwareInfo", "hy: no mime info retrieved!");
jSONArray2 = "";
AppMethodBeat.m2505o(59281);
return jSONArray2;
}
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
04da8e8802f2904fa62b491766f02f65990a4a25
|
97a4b3ab4021b9785f6bb26d7198df01b80120b4
|
/actor-apps/app-android/src/main/java/im/actor/messenger/app/view/MaterialInterpolator.java
|
ed49249f9077cd7a9a54d1fec4d29d339e0d63bc
|
[
"MIT"
] |
permissive
|
DragonStuff/actor-platform
|
473c3b1d9b0c842b8f5fc591d7d874a3aa7ab584
|
d262e6bb3c18b20eb35551313bce16c471cd2928
|
refs/heads/master
| 2021-01-18T17:10:17.176242
| 2015-07-15T22:27:36
| 2015-07-15T22:27:36
| 39,132,856
| 0
| 0
|
MIT
| 2020-07-26T04:03:53
| 2015-07-15T11:20:21
|
Objective-C
|
UTF-8
|
Java
| false
| false
| 602
|
java
|
package im.actor.messenger.app.view;
import android.view.animation.Interpolator;
/**
* <p>Created by Stepan Ex3NDR Korshakov (me@ex3ndr.com)</p>
* Function adapted by Roman Orekhov (http://vk.com/id276848)
*/
public class MaterialInterpolator implements Interpolator {
private static final MaterialInterpolator INSTANCE = new MaterialInterpolator();
public static MaterialInterpolator getInstance() {
return INSTANCE;
}
@Override
public float getInterpolation(float x) {
return (float) (6 * Math.pow(x, 2) - 8 * Math.pow(x, 3) + 3 * Math.pow(x, 4));
}
}
|
[
"me@ex3ndr.com"
] |
me@ex3ndr.com
|
c3083942bab7839e5390de223bad70371c4f175a
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-cs/src/main/java/com/aliyuncs/cs/model/v20151215/DescribeClusterAddonMetadataResponse.java
|
b5b1666cd3ca7beef8e717a038babe7ec03c4a3e
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk
|
a263fa08e261f12d45586d1b3ad8a6609bba0e91
|
e19239808ad2298d32dda77db29a6d809e4f7add
|
refs/heads/master
| 2023-09-03T12:28:09.765286
| 2023-09-01T09:03:00
| 2023-09-01T09:03:00
| 39,555,898
| 1,542
| 1,317
|
NOASSERTION
| 2023-09-14T07:27:05
| 2015-07-23T08:41:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,685
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.cs.model.v20151215;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.cs.transform.v20151215.DescribeClusterAddonMetadataResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class DescribeClusterAddonMetadataResponse extends AcsResponse {
private String name;
private String version;
private String config_schema;
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getVersion() {
return this.version;
}
public void setVersion(String version) {
this.version = version;
}
public String getConfig_schema() {
return this.config_schema;
}
public void setConfig_schema(String config_schema) {
this.config_schema = config_schema;
}
@Override
public DescribeClusterAddonMetadataResponse getInstance(UnmarshallerContext context) {
return DescribeClusterAddonMetadataResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
7ee96e035a93e55c7c5ad2d3e1767006c8350b4f
|
13e15e7072d04fdd74c5dac21a5ccdb3680dc83f
|
/core/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/exception/InapplicableEntityGraphException.java
|
8d964f44a1981b6c3f3f7ed910f3863c4487e8f5
|
[
"MIT"
] |
permissive
|
Cosium/spring-data-jpa-entity-graph
|
74bafb94d22afa0f4fab14782a3a5bceffdf5367
|
6b525336d85016754c47d56e8de2d92fa6ae7f9c
|
refs/heads/master
| 2023-08-25T19:09:41.572644
| 2023-08-14T00:35:47
| 2023-08-14T04:19:53
| 74,491,626
| 382
| 56
|
MIT
| 2023-09-06T16:27:54
| 2016-11-22T16:27:12
|
Java
|
UTF-8
|
Java
| false
| false
| 310
|
java
|
package com.cosium.spring.data.jpa.entity.graph.repository.exception;
/**
* Created on 27/11/16.
*
* @author Reda.Housni-Alaoui
*/
public class InapplicableEntityGraphException extends RepositoryEntityGraphException {
public InapplicableEntityGraphException(String message) {
super(message);
}
}
|
[
"reda.housnialaoui@gmail.com"
] |
reda.housnialaoui@gmail.com
|
4d70fbaad06296386c87c71a27f12e46469d3267
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava2/Foo339.java
|
7461de57d5b0748aca90d66209093e4ba0661cba
|
[] |
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
| 346
|
java
|
package applicationModulepackageJava2;
public class Foo339 {
public void foo0() {
new applicationModulepackageJava2.Foo338().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
7ad24d8f57adb49764db9cd7ead0ea30edcea6ae
|
73fd7cf535b476ed2238ca42cb5e79d440a92f06
|
/app/src/main/java/com/cn/uca/adapter/LetterAdapter.java
|
a03c4da5fa7c93718a5efab8a44d9aacdc33edcd
|
[] |
no_license
|
WengYihao/UCA
|
f4c5ee5d8624aa89aa23eb0558062d80902a576b
|
2b83b0550db9b44c73015f17e1e0e3a7287768a6
|
refs/heads/master
| 2021-01-02T22:28:49.469304
| 2018-03-29T12:38:11
| 2018-03-29T12:38:11
| 99,201,955
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,621
|
java
|
package com.cn.uca.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.cn.uca.R;
/**
* Created by asus on 2017/8/23.
* 字母适配器
*/
public class LetterAdapter extends BaseAdapter{
private String [] list;
private Context context;
public LetterAdapter(){}
public LetterAdapter(String [] list, Context context) {
this.list = list;
this.context = context;
}
public void setList(String [] list) {
if (list != null) {
this.list =( String []) list;
this.notifyDataSetChanged();
}
}
@Override
public int getCount() {
return list.length;
}
@Override
public Object getItem(int position) {
return list[position];
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if (convertView == null) {
holder = new ViewHolder();
convertView = LayoutInflater.from(context).inflate(R.layout.letter_item, parent, false);
holder.item = (TextView)convertView.findViewById(R.id.item);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
holder.item.setText(list[position]);
return convertView;
}
class ViewHolder {
TextView item;
}
}
|
[
"15112360329@163.com"
] |
15112360329@163.com
|
a6fbbdfbcfd68608b1a4c1fbcd41b42b3490a1a2
|
fec0f870ecea8d3df83f039fc973ac072156ae05
|
/app/src/main/java/com/ble/blebzl/adpter/HomeAdapter.java
|
3a9d573a3e4f1ad016095f835b35241eabaf62f7
|
[] |
no_license
|
18271261642/BleBzl
|
7426abe95547b251636b673a81f5dd8b7d2a3a7a
|
d8556b28af645ad9980ba5a4b3d0a767a0052f20
|
refs/heads/master
| 2021-02-12T04:46:06.382508
| 2020-05-15T10:24:31
| 2020-05-15T10:24:31
| 244,562,401
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,365
|
java
|
package com.ble.blebzl.adpter;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.List;
public class HomeAdapter extends PagerAdapter {
private List<View> viewList;
public HomeAdapter() {
this.viewList = new ArrayList<>();
}
@Override
public Object instantiateItem(ViewGroup collection, int position) {
View view = viewList.get(position);
collection.addView(view);
return view;
}
@Override
public void destroyItem(ViewGroup collection, int position, Object view) {
collection.removeView((View) view);
}
@Override
public int getCount() {
return viewList.size();
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == object;
}
public void setData(@Nullable List<View> viewList) {
if (viewList == null) {
this.viewList.clear();
} else {
this.viewList.addAll(viewList);
}
notifyDataSetChanged();
}
@NonNull
public List<View> getData() {
if (viewList == null) {
viewList = new ArrayList<>();
}
return viewList;
}
}
|
[
"758378737@qq.com"
] |
758378737@qq.com
|
baad10b030a32d56f1539d3f6ec8b0d141ee68bc
|
4902adfb7a5b6347121b0ea8e46a87e32b453981
|
/app/src/main/java/com/weizhan/superlook/widget/CustomBitmapMemoryCacheParamsSupplier.java
|
2c38752982280dcc64907bece2ccfd01db2f8363
|
[] |
no_license
|
cherry-cheng/PlayDemo
|
5098cd8f8062fc267e26858114bdf1440b9c62de
|
d3d1b55f8c96f7d2f4b9393fb261cd088b04920e
|
refs/heads/master
| 2020-04-06T09:58:49.223906
| 2018-11-19T10:51:25
| 2018-11-19T10:51:25
| 157,364,178
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,763
|
java
|
package com.weizhan.superlook.widget;
import android.app.ActivityManager;
import android.os.Build;
import com.facebook.common.internal.Supplier;
import com.facebook.common.util.ByteConstants;
import com.facebook.imagepipeline.cache.MemoryCacheParams;
/**
* Created by miserydx on 17/7/13.
*/
public class CustomBitmapMemoryCacheParamsSupplier implements Supplier<MemoryCacheParams> {
private static final int MAX_CACHE_ENTRIES = 56;
private static final int MAX_CACHE_ASHM_ENTRIES = 128;
private static final int MAX_CACHE_EVICTION_SIZE = 5;
private static final int MAX_CACHE_EVICTION_ENTRIES = 5;
private final ActivityManager mActivityManager;
public CustomBitmapMemoryCacheParamsSupplier(ActivityManager activityManager) {
mActivityManager = activityManager;
}
@Override
public MemoryCacheParams get() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
return new MemoryCacheParams(getMaxCacheSize(), MAX_CACHE_ENTRIES, MAX_CACHE_EVICTION_SIZE, MAX_CACHE_EVICTION_ENTRIES, 1);
} else {
return new MemoryCacheParams(
getMaxCacheSize(),
MAX_CACHE_ASHM_ENTRIES,
Integer.MAX_VALUE,
Integer.MAX_VALUE,
Integer.MAX_VALUE);
}
}
private int getMaxCacheSize() {
final int maxMemory =
Math.min(mActivityManager.getMemoryClass() * ByteConstants.MB, Integer.MAX_VALUE);
if (maxMemory < 32 * ByteConstants.MB) {
return 4 * ByteConstants.MB;
} else if (maxMemory < 64 * ByteConstants.MB) {
return 6 * ByteConstants.MB;
} else {
return maxMemory / 5;
}
}
}
|
[
"chengyonghui@yizhanit.com"
] |
chengyonghui@yizhanit.com
|
2e7caea08752415a77943d9ac73d8f7dc1bfa7d1
|
5c4ae76a9885361f4fe94c6fd5e3487cb5fb3036
|
/leadnews/leadnews-migration/src/main/java/com/siyi/migration/config/InitConfig.java
|
d773e81b940c1b71558584a5ef1084075602dc61
|
[] |
no_license
|
ppker/leadnews
|
d4b62d1df459e460d02b58eb49d29bdccfee1440
|
78115309361f7e888040ab265afe167c1005221e
|
refs/heads/main
| 2023-05-27T03:19:07.078738
| 2021-06-02T02:58:04
| 2021-06-02T02:58:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 469
|
java
|
package com.siyi.migration.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
@Configuration
@ComponentScan({"com.siyi.common.common.init","com.siyi.common.mongo","com.siyi.common.mysql.core",
"com.siyi.common.quartz","com.siyi.common.hbase","com.siyi.common.kafka"})
@EnableScheduling
public class InitConfig {
}
|
[
"siyiyimiaozhong@qq.com"
] |
siyiyimiaozhong@qq.com
|
f451e5978b0b4635dbab959845436affd0e6a0f9
|
b39d7e1122ebe92759e86421bbcd0ad009eed1db
|
/sources/android/app/role/RoleControllerService.java
|
5f452b7a160d9ed866a8c1e0baf2502f27f23c0f
|
[] |
no_license
|
AndSource/miuiframework
|
ac7185dedbabd5f619a4f8fc39bfe634d101dcef
|
cd456214274c046663aefce4d282bea0151f1f89
|
refs/heads/master
| 2022-03-31T11:09:50.399520
| 2020-01-02T09:49:07
| 2020-01-02T09:49:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,034
|
java
|
package android.app.role;
import android.Manifest.permission;
import android.annotation.SystemApi;
import android.app.Service;
import android.app.role.IRoleController.Stub;
import android.app.role.RoleManager.ManageHoldersFlags;
import android.content.Intent;
import android.os.Binder;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.RemoteCallback;
import com.android.internal.util.Preconditions;
import com.android.internal.util.function.pooled.PooledLambda;
@SystemApi
public abstract class RoleControllerService extends Service {
public static final String SERVICE_INTERFACE = "android.app.role.RoleControllerService";
private Handler mWorkerHandler;
private HandlerThread mWorkerThread;
public abstract boolean onAddRoleHolder(String str, String str2, @ManageHoldersFlags int i);
public abstract boolean onClearRoleHolders(String str, @ManageHoldersFlags int i);
public abstract boolean onGrantDefaultRoles();
public abstract boolean onIsApplicationQualifiedForRole(String str, String str2);
public abstract boolean onIsRoleVisible(String str);
public abstract boolean onRemoveRoleHolder(String str, String str2, @ManageHoldersFlags int i);
public void onCreate() {
super.onCreate();
this.mWorkerThread = new HandlerThread(RoleControllerService.class.getSimpleName());
this.mWorkerThread.start();
this.mWorkerHandler = new Handler(this.mWorkerThread.getLooper());
}
public void onDestroy() {
super.onDestroy();
this.mWorkerThread.quitSafely();
}
public final IBinder onBind(Intent intent) {
return new Stub() {
public void grantDefaultRoles(RemoteCallback callback) {
enforceCallerSystemUid("grantDefaultRoles");
Preconditions.checkNotNull(callback, "callback cannot be null");
RoleControllerService.this.mWorkerHandler.sendMessage(PooledLambda.obtainMessage(-$$Lambda$RoleControllerService$1$-fmj7uDKaG3BoLl6bhtrA675gRI.INSTANCE, RoleControllerService.this, callback));
}
public void onAddRoleHolder(String roleName, String packageName, int flags, RemoteCallback callback) {
enforceCallerSystemUid("onAddRoleHolder");
Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty");
Preconditions.checkStringNotEmpty(packageName, "packageName cannot be null or empty");
Preconditions.checkNotNull(callback, "callback cannot be null");
RoleControllerService.this.mWorkerHandler.sendMessage(PooledLambda.obtainMessage(-$$Lambda$RoleControllerService$1$UVI1sAWAcBnt3Enqn2IT-Lirwtk.INSTANCE, RoleControllerService.this, roleName, packageName, Integer.valueOf(flags), callback));
}
public void onRemoveRoleHolder(String roleName, String packageName, int flags, RemoteCallback callback) {
enforceCallerSystemUid("onRemoveRoleHolder");
Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty");
Preconditions.checkStringNotEmpty(packageName, "packageName cannot be null or empty");
Preconditions.checkNotNull(callback, "callback cannot be null");
RoleControllerService.this.mWorkerHandler.sendMessage(PooledLambda.obtainMessage(-$$Lambda$RoleControllerService$1$PB6H1df6VvLzUJ3hhB_75mN3u7s.INSTANCE, RoleControllerService.this, roleName, packageName, Integer.valueOf(flags), callback));
}
public void onClearRoleHolders(String roleName, int flags, RemoteCallback callback) {
enforceCallerSystemUid("onClearRoleHolders");
Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty");
Preconditions.checkNotNull(callback, "callback cannot be null");
RoleControllerService.this.mWorkerHandler.sendMessage(PooledLambda.obtainMessage(-$$Lambda$RoleControllerService$1$dBm1t_MGyEA9yMAxoOUMOhYVmPo.INSTANCE, RoleControllerService.this, roleName, Integer.valueOf(flags), callback));
}
private void enforceCallerSystemUid(String methodName) {
if (Binder.getCallingUid() != 1000) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("Only the system process can call ");
stringBuilder.append(methodName);
stringBuilder.append("()");
throw new SecurityException(stringBuilder.toString());
}
}
public void isApplicationQualifiedForRole(String roleName, String packageName, RemoteCallback callback) {
Bundle bundle = null;
RoleControllerService.this.enforceCallingPermission(permission.MANAGE_ROLE_HOLDERS, null);
Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty");
Preconditions.checkStringNotEmpty(packageName, "packageName cannot be null or empty");
Preconditions.checkNotNull(callback, "callback cannot be null");
if (RoleControllerService.this.onIsApplicationQualifiedForRole(roleName, packageName)) {
bundle = Bundle.EMPTY;
}
callback.sendResult(bundle);
}
public void isRoleVisible(String roleName, RemoteCallback callback) {
Bundle bundle = null;
RoleControllerService.this.enforceCallingPermission(permission.MANAGE_ROLE_HOLDERS, null);
Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty");
Preconditions.checkNotNull(callback, "callback cannot be null");
if (RoleControllerService.this.onIsRoleVisible(roleName)) {
bundle = Bundle.EMPTY;
}
callback.sendResult(bundle);
}
};
}
private void grantDefaultRoles(RemoteCallback callback) {
callback.sendResult(onGrantDefaultRoles() ? Bundle.EMPTY : null);
}
private void onAddRoleHolder(String roleName, String packageName, @ManageHoldersFlags int flags, RemoteCallback callback) {
callback.sendResult(onAddRoleHolder(roleName, packageName, flags) ? Bundle.EMPTY : null);
}
private void onRemoveRoleHolder(String roleName, String packageName, @ManageHoldersFlags int flags, RemoteCallback callback) {
callback.sendResult(onRemoveRoleHolder(roleName, packageName, flags) ? Bundle.EMPTY : null);
}
private void onClearRoleHolders(String roleName, @ManageHoldersFlags int flags, RemoteCallback callback) {
callback.sendResult(onClearRoleHolders(roleName, flags) ? Bundle.EMPTY : null);
}
}
|
[
"shivatejapeddi@gmail.com"
] |
shivatejapeddi@gmail.com
|
30d3b8f8fc0025fa65fbc1442cde3d65fe5389aa
|
15a04ddc490a2273f9516fb2f730b208c672a7bd
|
/officefloor/tutorials/TestHttpServer/src/test/java/net/officefloor/tutorial/testhttpserver/TemplateLogicJUnit4Test.java
|
9af3882299fdec6ea186b598a258aafa5a9e3a81
|
[
"Apache-2.0"
] |
permissive
|
officefloor/OfficeFloor
|
d50c4441e96773e3f33b6a154dcaf049088480a2
|
4bad837e3d71dbc49b161f9814d6b188937ca69d
|
refs/heads/master
| 2023-09-01T12:06:04.230609
| 2023-08-27T16:36:04
| 2023-08-27T16:36:04
| 76,112,580
| 60
| 7
|
Apache-2.0
| 2023-09-14T20:12:48
| 2016-12-10T12:56:50
|
Java
|
UTF-8
|
Java
| false
| false
| 2,297
|
java
|
package net.officefloor.tutorial.testhttpserver;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.util.EntityUtils;
import org.junit.Rule;
import org.junit.Test;
import net.officefloor.plugin.clazz.Dependency;
import net.officefloor.server.http.HttpClientRule;
import net.officefloor.server.http.HttpMethod;
import net.officefloor.server.http.mock.MockHttpResponse;
import net.officefloor.server.http.mock.MockHttpServer;
import net.officefloor.test.OfficeFloorRule;
import net.officefloor.woof.mock.MockWoofServerRule;
/**
* Tests the {@link TemplateLogic}.
*
* @author Daniel Sagenschneider
*/
public class TemplateLogicJUnit4Test {
// START SNIPPET: system
@Rule
public final MockWoofServerRule server = new MockWoofServerRule(this);
@Test
public void systemTest() throws Exception {
// Send request to add
MockHttpResponse response = this.server
.sendFollowRedirect(MockHttpServer.mockRequest("/template+add?a=1&b=2").method(HttpMethod.POST));
assertEquals("Should be successful", 200, response.getStatus().getStatusCode());
// Ensure added the values
String entity = response.getEntity(null);
assertTrue("Should have added the values", entity.contains("= 3"));
}
// END SNIPPET: system
// START SNIPPET: full-system
@Rule
public final OfficeFloorRule officeFloor = new OfficeFloorRule(this);
@Rule
public final HttpClientRule client = new HttpClientRule();
@Test
public void callingSystemTest() throws Exception {
// Send request to add
HttpResponse response = this.client.execute(new HttpPost(this.client.url("/template+add?a=1&b=2")));
assertEquals("Should be successful", 200, response.getStatusLine().getStatusCode());
// Ensure added the values
String entity = EntityUtils.toString(response.getEntity());
assertTrue("Should have added the values: " + entity, entity.contains("= 3"));
}
// END SNIPPET: full-system
// START SNIPPET: inject-dependency
private @Dependency Calculator calculator;
@Test
public void injectDependency() {
int result = calculator.plus(1, 2);
assertEquals("Should calculate correct result", 3, result);
}
// END SNIPPET: inject-dependency
}
|
[
"daniel@officefloor.net"
] |
daniel@officefloor.net
|
f10b9068d3e16e88d4a857c556bf67b7fc1ba0d0
|
c257d8afd0785bddaff12819ca3fea58efef375c
|
/juju-user/src/main/java/com/juju/sport/user/service/impl/UserTeamServiceImpl.java
|
6053f99deeff90b48e2904763239759bbbed0eba
|
[] |
no_license
|
wwbg1988/juju_sport
|
37c2177a185a6485cd75ef0d72d084476dc51b8b
|
39a2d91ef815c85de60649adc50372f7ee3e3343
|
refs/heads/master
| 2020-06-21T03:47:28.924899
| 2016-11-26T06:08:46
| 2016-11-26T06:08:46
| 74,807,863
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,624
|
java
|
package com.juju.sport.user.service.impl;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.juju.sport.common.model.PageQuery;
import com.juju.sport.common.model.PageResult;
import com.juju.sport.common.util.BeanUtils;
import com.juju.sport.common.util.UUIDGenerator;
import com.juju.sport.user.dao.UserTeamDao;
import com.juju.sport.user.dto.TeamDto;
import com.juju.sport.user.pojo.Team;
import com.juju.sport.user.service.IUserTeamService;
/**
*
* 此类描述的是:
*
* @author: cwftalus@163.com
* @version: 2015年4月2日 上午11:08:36
*/
@Service
public class UserTeamServiceImpl implements IUserTeamService {
@Autowired
private UserTeamDao userTeamDao;
@Override
public String saveOrUpdate(TeamDto teamDto) {
Team team = BeanUtils.createBeanByTarget(teamDto, Team.class);
if (StringUtils.isEmpty(teamDto.getId())) {
String teamId = UUIDGenerator.getUUID();
team.setId(teamId);
userTeamDao.insert(team);
return teamId;
} else {
userTeamDao.updateByPrimaryKeySelective(team);
return "0";
}
}
@Override
public PageResult<TeamDto> findBy(TeamDto teamDto, PageQuery page) {
List<Team> results = userTeamDao.findBy(teamDto, page);
List<TeamDto> teams = BeanUtils.createBeanListByTarget(results,TeamDto.class);
// for (TeamDto team : teams) {
// }
long total = userTeamDao.count(teamDto);
page.setTotal(total);
return new PageResult<TeamDto>(page, teams);
}
@Override
public List<TeamDto> findBy(TeamDto teamDto) {
List<Team> results = userTeamDao.findBy(teamDto);
List<TeamDto> teams = BeanUtils.createBeanListByTarget(results,TeamDto.class);
return teams;
}
public TeamDto findByObj(String teamId){
Team team = userTeamDao.findByObj(teamId);
TeamDto teamDto = BeanUtils.createBeanByTarget(team,TeamDto.class);
return teamDto;
}
@Override
public int releaseFright(TeamDto teamDto) {
Team team = new Team();
BeanUtils.copyProperties(teamDto, team);
int result = userTeamDao.insert(team);
return result;
}
@Override
public List<TeamDto> findSportId(String userAccountId) {
List<Team> teamList = userTeamDao.findSportId(userAccountId);
List<TeamDto> teamDtoList = BeanUtils.createBeanListByTarget(teamList,TeamDto.class);
return teamDtoList;
}
@Override
public List<TeamDto> findJoinList(String id) {
List<Team> teamList = userTeamDao.findJoinList(id);
List<TeamDto> teamDtoList = BeanUtils.createBeanListByTarget(teamList,TeamDto.class);
return teamDtoList;
}
}
|
[
"wuweitree@163.com"
] |
wuweitree@163.com
|
fb32f9b2636d817d3342075c6d5a537bf708e55e
|
982f6c3a3c006d2b03f4f53c695461455bee64e9
|
/src/main/java/com/alipay/api/domain/AlipayCommerceIotDeviceDeleteModel.java
|
2225b059b8e6cea5c22e5447b231532b66e5e36d
|
[
"Apache-2.0"
] |
permissive
|
zhaomain/Alipay-Sdk
|
80ffc0505fe81cc7dd8869d2bf9a894b823db150
|
552f68a2e7c10f9ffb33cd8e0036b0643c7c2bb3
|
refs/heads/master
| 2022-11-15T03:31:47.418847
| 2020-07-09T12:18:59
| 2020-07-09T12:18:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,336
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 删除指定设备
*
* @author auto create
* @since 1.0, 2017-09-14 22:22:40
*/
public class AlipayCommerceIotDeviceDeleteModel extends AlipayObject {
private static final long serialVersionUID = 2355235756973641938L;
/**
* 设备id+唯一+协议服务商用于唯一标识一个设备的设备id+唯一+协议服务商创建设备记录时指定
*/
@ApiField("device_id")
private String deviceId;
/**
* 协议服务商id+唯一+指定操作数据归属于哪个协议服务商+协议服务商接入时由支付宝统一分配
*/
@ApiField("protocol_supplier_id")
private String protocolSupplierId;
/**
* 蚂蚁统一会员ID
*/
@ApiField("user_id")
private String userId;
public String getDeviceId() {
return this.deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getProtocolSupplierId() {
return this.protocolSupplierId;
}
public void setProtocolSupplierId(String protocolSupplierId) {
this.protocolSupplierId = protocolSupplierId;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
0947c5d7cd47d90a52f2a93172b8398dabdae309
|
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
|
/sources/com/airbnb/android/core/viewcomponents/models/MessageItemEpoxyModel.java
|
40b1922f940c96e3f3c7b478e277fc2be56ac54f
|
[] |
no_license
|
jasonnth/AirCode
|
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
|
d37db1baa493fca56f390c4205faf5c9bbe36604
|
refs/heads/master
| 2020-07-03T08:35:24.902940
| 2019-08-12T03:34:56
| 2019-08-12T03:34:56
| 201,842,970
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,907
|
java
|
package com.airbnb.android.core.viewcomponents.models;
import android.content.Context;
import android.view.View.OnClickListener;
import android.view.View.OnCreateContextMenuListener;
import android.view.View.OnLongClickListener;
import com.airbnb.android.core.C0716R;
import com.airbnb.android.core.models.Post;
import com.airbnb.p027n2.epoxy.AirEpoxyModel;
import com.airbnb.p027n2.primitives.messaging.MessageItem;
public abstract class MessageItemEpoxyModel extends AirEpoxyModel<MessageItem> {
OnClickListener clickListener;
OnCreateContextMenuListener contextMenuListener;
boolean hideProfilePhoto = false;
OnLongClickListener longClickListener;
CharSequence messageText;
Post post;
OnClickListener profileImageClickListener;
int profileImageRes;
String profileImageUrl;
CharSequence profilePlaceholderText;
OnClickListener reportTextClickListener;
boolean reported = false;
boolean sendFailed = false;
boolean showReportLink = false;
CharSequence statusText;
boolean withLinks = false;
public void bind(MessageItem message) {
boolean z;
boolean z2 = true;
super.bind(message);
Context context = message.getContext();
message.setTag(this.post);
message.setMessageText(this.reported ? context.getString(C0716R.string.flagged_post_text) : this.messageText);
message.setStatusText(this.statusText);
message.setReported(this.reported);
message.setReportLinkText(this.reported ? context.getString(C0716R.string.show_message_text) : context.getString(C0716R.string.hide_message_text));
message.showReportLink(this.showReportLink);
message.setPlaceholderText(this.hideProfilePhoto ? this.profilePlaceholderText : null);
if (this.hideProfilePhoto) {
message.setProfileDrawable(C0716R.C0717drawable.no_profile_image);
} else if (this.profileImageRes != 0) {
message.setProfileDrawable(this.profileImageRes);
} else {
message.setProfileUrl(this.profileImageUrl);
}
message.setOnClickListener(this.clickListener);
if (this.clickListener != null) {
z = true;
} else {
z = false;
}
message.setClickable(z);
message.setOnLongClickListener(this.longClickListener);
if (this.longClickListener == null) {
z2 = false;
}
message.setLongClickable(z2);
message.setProfileClickLink(this.profileImageClickListener);
message.setMessageState(this.sendFailed);
message.setReportClickLink(this.reportTextClickListener);
message.setOnCreateContextMenuListener(this.contextMenuListener);
if (this.withLinks) {
message.setLinksOnMessage();
}
}
public void unbind(MessageItem message) {
super.unbind(message);
message.setOnClickListener(null);
message.setOnLongClickListener(null);
message.setOnCreateContextMenuListener(null);
message.setProfileClickLink(null);
}
public int getDefaultLayout() {
throw new IllegalStateException("senderNoTail(), receiverNoTail(), senderWithTail, or receiverWithTail() must be called on MessageItemEpoxyModel object");
}
public MessageItemEpoxyModel senderNoTail() {
layout(C0716R.layout.view_holder_message_item_sender_no_tail);
return this;
}
public MessageItemEpoxyModel receiverNoTail() {
layout(C0716R.layout.view_holder_message_item_receiver_no_tail);
return this;
}
public MessageItemEpoxyModel senderWithTail() {
layout(C0716R.layout.view_holder_message_item_sender_with_tail);
return this;
}
public MessageItemEpoxyModel receiverWithTail() {
layout(C0716R.layout.view_holder_message_item_receiver_with_tail);
return this;
}
}
|
[
"thanhhuu2apc@gmail.com"
] |
thanhhuu2apc@gmail.com
|
0fb3b81938010e8a077737cd01525498e0b08c93
|
493a8065cf8ec4a4ccdf136170d505248ac03399
|
/net.sf.ictalive.service.owlseditor.diagram/src/control/diagram/edit/policies/ControlConstructListControlConstructListFirstCompartmentItemSemanticEditPolicy.java
|
127b4338ca02b5f21c7dd381be60f4b17c7089ce
|
[] |
no_license
|
ignasi-gomez/aliveclipse
|
593611b2d471ee313650faeefbed591c17beaa50
|
9dd2353c886f60012b4ee4fe8b678d56972dff97
|
refs/heads/master
| 2021-01-14T09:08:24.839952
| 2014-10-09T14:21:01
| 2014-10-09T14:21:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,775
|
java
|
/*
*
*/
package control.diagram.edit.policies;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import control.diagram.edit.commands.AnyOrder7CreateCommand;
import control.diagram.edit.commands.Choice2CreateCommand;
import control.diagram.edit.commands.IfThenElse7CreateCommand;
import control.diagram.edit.commands.Perform7CreateCommand;
import control.diagram.edit.commands.Produce7CreateCommand;
import control.diagram.edit.commands.RepeatUntil7CreateCommand;
import control.diagram.edit.commands.RepeatWhile7CreateCommand;
import control.diagram.edit.commands.Sequence2CreateCommand;
import control.diagram.edit.commands.Set7CreateCommand;
import control.diagram.edit.commands.Split7CreateCommand;
import control.diagram.edit.commands.SplitJoin7CreateCommand;
import control.diagram.providers.ControlElementTypes;
/**
* @generated
*/
public class ControlConstructListControlConstructListFirstCompartmentItemSemanticEditPolicy
extends ControlBaseItemSemanticEditPolicy {
/**
* @generated
*/
public ControlConstructListControlConstructListFirstCompartmentItemSemanticEditPolicy() {
super(ControlElementTypes.ControlConstructList_3001);
}
/**
* @generated
*/
protected Command getCreateCommand(CreateElementRequest req) {
if (ControlElementTypes.Sequence_3002 == req.getElementType()) {
return getGEFWrapper(new Sequence2CreateCommand(req));
}
if (ControlElementTypes.Choice_3003 == req.getElementType()) {
return getGEFWrapper(new Choice2CreateCommand(req));
}
if (ControlElementTypes.AnyOrder_3083 == req.getElementType()) {
return getGEFWrapper(new AnyOrder7CreateCommand(req));
}
if (ControlElementTypes.Split_3084 == req.getElementType()) {
return getGEFWrapper(new Split7CreateCommand(req));
}
if (ControlElementTypes.SplitJoin_3085 == req.getElementType()) {
return getGEFWrapper(new SplitJoin7CreateCommand(req));
}
if (ControlElementTypes.IfThenElse_3086 == req.getElementType()) {
return getGEFWrapper(new IfThenElse7CreateCommand(req));
}
if (ControlElementTypes.RepeatUntil_3087 == req.getElementType()) {
return getGEFWrapper(new RepeatUntil7CreateCommand(req));
}
if (ControlElementTypes.RepeatWhile_3088 == req.getElementType()) {
return getGEFWrapper(new RepeatWhile7CreateCommand(req));
}
if (ControlElementTypes.Perform_3089 == req.getElementType()) {
return getGEFWrapper(new Perform7CreateCommand(req));
}
if (ControlElementTypes.Produce_3090 == req.getElementType()) {
return getGEFWrapper(new Produce7CreateCommand(req));
}
if (ControlElementTypes.Set_3091 == req.getElementType()) {
return getGEFWrapper(new Set7CreateCommand(req));
}
return super.getCreateCommand(req);
}
}
|
[
"salvarez@lsi.upc.edu"
] |
salvarez@lsi.upc.edu
|
08964d92f1fe1af2ec090d43f4489ffcc21defff
|
c9b8db6ceff0be3420542d0067854dea1a1e7b12
|
/web/KoreanAir/src/main/java/com/ke/css/cimp/fwb/fwb14/Rule_Hid_Goods_data_Identifier_S.java
|
f9b31d8cdd638d01dc07517ed6defb7ef202a3ec
|
[
"Apache-2.0"
] |
permissive
|
ganzijo/portfolio
|
12ae1531bd0f4d554c1fcfa7d68953d1c79cdf9a
|
a31834b23308be7b3a992451ab8140bef5a61728
|
refs/heads/master
| 2021-04-15T09:25:07.189213
| 2018-03-22T12:11:00
| 2018-03-22T12:11:00
| 126,326,291
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,269
|
java
|
package com.ke.css.cimp.fwb.fwb14;
/* -----------------------------------------------------------------------------
* Rule_Hid_Goods_data_Identifier_S.java
* -----------------------------------------------------------------------------
*
* Producer : com.parse2.aparse.Parser 2.5
* Produced : Tue Mar 06 10:34:51 KST 2018
*
* -----------------------------------------------------------------------------
*/
import java.util.ArrayList;
final public class Rule_Hid_Goods_data_Identifier_S extends Rule
{
public Rule_Hid_Goods_data_Identifier_S(String spelling, ArrayList<Rule> rules)
{
super(spelling, rules);
}
public Object accept(Visitor visitor)
{
return visitor.visit(this);
}
public static Rule_Hid_Goods_data_Identifier_S parse(ParserContext context)
{
context.push("Hid_Goods_data_Identifier_S");
boolean parsed = true;
int s0 = context.index;
ParserAlternative a0 = new ParserAlternative(s0);
ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>();
parsed = false;
{
int s1 = context.index;
ParserAlternative a1 = new ParserAlternative(s1);
parsed = true;
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
Rule rule = Terminal_StringValue.parse(context, "S");
if ((f1 = rule != null))
{
a1.add(rule, context.index);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
{
as1.add(a1);
}
context.index = s1;
}
ParserAlternative b = ParserAlternative.getBest(as1);
parsed = b != null;
if (parsed)
{
a0.add(b.rules, b.end);
context.index = b.end;
}
Rule rule = null;
if (parsed)
{
rule = new Rule_Hid_Goods_data_Identifier_S(context.text.substring(a0.start, a0.end), a0.rules);
}
else
{
context.index = s0;
}
context.pop("Hid_Goods_data_Identifier_S", parsed);
return (Rule_Hid_Goods_data_Identifier_S)rule;
}
}
/* -----------------------------------------------------------------------------
* eof
* -----------------------------------------------------------------------------
*/
|
[
"whdnfka111@gmail.com"
] |
whdnfka111@gmail.com
|
9ed27f8b79d3e6c05de26d57f00bf76e3f3fe819
|
76a017a0f89f133c89caa12abce6f1f5dce5427c
|
/limites-svc/src/main/java/br/com/coffeeandit/limites/dto/TransactionDTO.java
|
5d807d46c5647b546dc68f43e151d90e3860e869
|
[] |
no_license
|
fabriciolfj/terceiros
|
12ffd72c4305caa061c85966077f9cb911e77c62
|
14850462a0a616fceb824c8663f5ffa04fa4955b
|
refs/heads/main
| 2023-05-06T11:46:14.902268
| 2021-05-29T02:04:40
| 2021-05-29T02:04:40
| 371,858,013
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,253
|
java
|
package br.com.coffeeandit.limites.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.UUID;
@Getter
@Setter
@EqualsAndHashCode(of = "uui")
@ToString
public class TransactionDTO implements Serializable {
private static final long serialVersionUID = 2806421523585360625L;
private BigDecimal valor;
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private LocalDateTime data;
private Conta conta;
private BeneficiatioDto beneficiario;
private TipoTransacao tipoTransacao;
private UUID uui;
private SituacaoEnum situacao;
public void naoAnalisada() {
setSituacao(SituacaoEnum.NAO_ANALISADA);
}
public void analisada() {
setSituacao(SituacaoEnum.ANALISADA);
}
public void suspeitaFraude() {
setSituacao(SituacaoEnum.EM_SUSPEITA_FRAUDE);
}
public void analiseHumana() {
setSituacao(SituacaoEnum.EM_ANALISE_HUMANA);
}
}
|
[
"fabricio.jacob@outlook.com"
] |
fabricio.jacob@outlook.com
|
54ba3c8ead18536dd587a56d4412f04d50208d8e
|
acc82eb4d161af40b4d70a51b18c5e4604790d41
|
/src/main/java/org/lastaflute/di/util/LdiLongConversionUtil.java
|
bb97cab40d1d96fabe39abff457fac81b4cd42db
|
[
"Apache-2.0"
] |
permissive
|
lastaflute/lasta-di
|
8f3735feabb55be7e76e361b185940961def158d
|
eb3f835bcb4cde21179e338ef47c6427135fd2ee
|
refs/heads/develop
| 2022-05-27T16:26:16.034639
| 2022-05-07T10:01:51
| 2022-05-07T10:01:51
| 34,904,614
| 8
| 6
|
Apache-2.0
| 2022-05-07T10:06:12
| 2015-05-01T13:42:14
|
Java
|
UTF-8
|
Java
| false
| false
| 3,155
|
java
|
/*
* Copyright 2015-2022 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.lastaflute.di.util;
import java.text.SimpleDateFormat;
/**
* @author modified by jflute (originated in Seasar)
*/
public class LdiLongConversionUtil {
protected LdiLongConversionUtil() {
}
/**
* @param o
* @return {@link Long}
*/
public static Long toLong(Object o) {
return toLong(o, null);
}
/**
* @param o
* @param pattern
* @return {@link Long}
*/
public static Long toLong(Object o, String pattern) {
if (o == null) {
return null;
} else if (o instanceof Long) {
return (Long) o;
} else if (o instanceof Number) {
return new Long(((Number) o).longValue());
} else if (o instanceof String) {
return toLong((String) o);
} else if (o instanceof java.util.Date) {
if (pattern != null) {
return new Long(new SimpleDateFormat(pattern).format(o));
}
return new Long(((java.util.Date) o).getTime());
} else if (o instanceof Boolean) {
return ((Boolean) o).booleanValue() ? new Long(1) : new Long(0);
} else {
return toLong(o.toString());
}
}
private static Long toLong(String s) {
if (LdiStringUtil.isEmpty(s)) {
return null;
}
return new Long(LdiDecimalFormatUtil.normalize(s));
}
/**
* @param o
* @return long
*/
public static long toPrimitiveLong(Object o) {
return toPrimitiveLong(o, null);
}
/**
* @param o
* @param pattern
* @return long
*/
public static long toPrimitiveLong(Object o, String pattern) {
if (o == null) {
return 0;
} else if (o instanceof Number) {
return ((Number) o).longValue();
} else if (o instanceof String) {
return toPrimitiveLong((String) o);
} else if (o instanceof java.util.Date) {
if (pattern != null) {
return Long.parseLong(new SimpleDateFormat(pattern).format(o));
}
return ((java.util.Date) o).getTime();
} else if (o instanceof Boolean) {
return ((Boolean) o).booleanValue() ? 1 : 0;
} else {
return toPrimitiveLong(o.toString());
}
}
private static long toPrimitiveLong(String s) {
if (LdiStringUtil.isEmpty(s)) {
return 0;
}
return Long.parseLong(LdiDecimalFormatUtil.normalize(s));
}
}
|
[
"dbflute@gmail.com"
] |
dbflute@gmail.com
|
1de5286754d80543b20ab9c74b26f62278f48946
|
06c5b089014a201aca79db78ecaa7eacc36546d7
|
/src/java/main/org/tmforum/resource_domain/resource_abe/logicalresource_abe/logical_role_business_entity/RoutingRole.java
|
565212d8b8632eef4526f3eca060193488fb921d
|
[] |
no_license
|
yarmol/tm-sid-model
|
e783b2e2d448825f78618a6a39dbdffe8e7b1073
|
979689fe571a6e67eb322e2cab7c32f46fe5157c
|
refs/heads/master
| 2021-01-18T17:01:53.612943
| 2017-04-06T13:15:49
| 2017-04-06T13:15:49
| 86,781,391
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,851
|
java
|
/**
* Logical Role ABE
* @see <a href="URL#https://www.tmforum.org/Browsable_HTML_SID_R16.5/content/_3E3F0EC000E93DDEA2E102A3-content.html">Logical Role ABE</a>
* @since SID_R16.5
*/
package org.tmforum.resource_domain.resource_abe.logicalresource_abe.logical_role_business_entity ;
/**
* This class abstracts the different routing capabilities necessary for
* a LogicalDevice to have. This helps simplify the modeling of (especial
* ly) network devices, which have many different sets of capabilities. F
* or example, most routers can do routing, forwarding, and firewalling o
* f traffic. By modeling these capabilities as three roles, router funct
* ionality is both abstracted as well as categorized, so that the differ
* ences between routing done by a router and routing done by a L3 switch
* can be differentiated.
Inheritance tree: |-
<a title="SID Models::Resource Domain::Resource ABE::LogicalResource ABE::Logical Role ABE::LogicalDeviceRole" href="_3E3F0EC000E93DCCA5AF0075-content.html">SID Models::Resource Domain::Resource ABE::LogicalResource ABE::Logical Role ABE::LogicalDeviceRole</a> |-
<a title="SID Models::Resource Domain::Resource ABE::LogicalResource ABE::Logical Role ABE::LogicalResourceRole" href="_3E3F0EC000E93DDFD4C100D7-content.html">SID Models::Resource Domain::Resource ABE::LogicalResource ABE::Logical Role ABE::LogicalResourceRole</a> |-
SID Models::Resource Domain::Resource ABE::ResourceRole |-
SID Models::Common Business Entities Domain::Root Business Entities ABE::EntityRole |-
SID Models::Common Business Entities Domain::Root Business Entities ABE::Role |-
SID Models::Common Business Entities Domain::Root Business Entities ABE::RootEntity @since SID_R16.5
*/
public class RoutingRole extends LogicalDeviceRole,LogicalResourceRole,ResourceRole,EntityRole,Role,RootEntity {
}
|
[
"vitalii.yarmolenko@lifecell.com.ua"
] |
vitalii.yarmolenko@lifecell.com.ua
|
d33fcb9c9bb70a6b454c320983c7cf7ebbdc1fec
|
28b3a4074c919eb5fa0bc53665a977079d2d8f89
|
/ectaxi/src/main/java/com/spring/jersy/hibernate/model/dao/DriverIncomeDetailDao.java
|
3ba0d472a2f514ac6b993ca4c6c1ad4fafff9b66
|
[] |
no_license
|
vrqin/taxi
|
43e7b65c420ace1280d3621662db6db02aa268d9
|
c3c1bd4739425393b2de888b716d7343af8097a4
|
refs/heads/master
| 2020-05-31T15:30:49.540392
| 2018-12-07T12:23:34
| 2018-12-07T12:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 261
|
java
|
package com.spring.jersy.hibernate.model.dao;
import com.spring.jersy.hibernate.model.base.dao.BaseDao;
import com.spring.jersy.hibernate.model.entity.DriverIncomeDetail;
public interface DriverIncomeDetailDao extends BaseDao<DriverIncomeDetail, Integer> {
}
|
[
"heavenlystate@163.com"
] |
heavenlystate@163.com
|
29c84379ea1f4efbb1864b74c5f999a198ed81fa
|
cda3c24aeef4b7d893948bc2adb027e3be46ce3a
|
/src/main/java/com/sae/persistence/dao/ListaPrecioJpaController.java
|
117f7cdd452f0c0c4a3a70cf53f1c28b394e94ae
|
[] |
no_license
|
saesas/SaeFinal
|
1bb052e77739865a23ddc85ad5822c21a556da6c
|
51deb0351410178da4b71d7c3cc7ee079fac615a
|
refs/heads/master
| 2021-01-13T02:02:51.343601
| 2015-08-25T16:53:02
| 2015-08-25T16:53:02
| 41,370,938
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,715
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.sae.persistence.dao; import com.sae.persistence.util.JpaUtil;
import com.sae.persistence.dao.exceptions.NonexistentEntityException;
import com.sae.persistence.dao.exceptions.PreexistingEntityException;
import com.sae.persistence.domain.ListaPrecio;
import java.io.Serializable;
import javax.persistence.Query;
import javax.persistence.EntityNotFoundException;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import com.sae.persistence.domain.Presupuesto;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
/**
*
* @author SAE2
*/
public class ListaPrecioJpaController implements Serializable {
public ListaPrecioJpaController() {
this.emf = JpaUtil.getEmf();
}
private EntityManagerFactory emf = null;
public EntityManager getEntityManager() {
return emf.createEntityManager();
}
public void create(ListaPrecio listaPrecio) throws PreexistingEntityException, Exception {
EntityManager em = null;
try {
em = getEntityManager();
em.getTransaction().begin();
Presupuesto idPresupuesto = listaPrecio.getIdPresupuesto();
if (idPresupuesto != null) {
idPresupuesto = em.getReference(idPresupuesto.getClass(), idPresupuesto.getId());
listaPrecio.setIdPresupuesto(idPresupuesto);
}
em.persist(listaPrecio);
if (idPresupuesto != null) {
idPresupuesto.getListaPrecioList().add(listaPrecio);
idPresupuesto = em.merge(idPresupuesto);
}
em.getTransaction().commit();
} catch (Exception ex) {
if (findListaPrecio(listaPrecio.getId()) != null) {
throw new PreexistingEntityException("ListaPrecio " + listaPrecio + " already exists.", ex);
}
throw ex;
} finally {
if (em != null) {
em.close();
}
}
}
public void edit(ListaPrecio listaPrecio) throws NonexistentEntityException, Exception {
EntityManager em = null;
try {
em = getEntityManager();
em.getTransaction().begin();
ListaPrecio persistentListaPrecio = em.find(ListaPrecio.class, listaPrecio.getId());
Presupuesto idPresupuestoOld = persistentListaPrecio.getIdPresupuesto();
Presupuesto idPresupuestoNew = listaPrecio.getIdPresupuesto();
if (idPresupuestoNew != null) {
idPresupuestoNew = em.getReference(idPresupuestoNew.getClass(), idPresupuestoNew.getId());
listaPrecio.setIdPresupuesto(idPresupuestoNew);
}
listaPrecio = em.merge(listaPrecio);
if (idPresupuestoOld != null && !idPresupuestoOld.equals(idPresupuestoNew)) {
idPresupuestoOld.getListaPrecioList().remove(listaPrecio);
idPresupuestoOld = em.merge(idPresupuestoOld);
}
if (idPresupuestoNew != null && !idPresupuestoNew.equals(idPresupuestoOld)) {
idPresupuestoNew.getListaPrecioList().add(listaPrecio);
idPresupuestoNew = em.merge(idPresupuestoNew);
}
em.getTransaction().commit();
} catch (Exception ex) {
String msg = ex.getLocalizedMessage();
if (msg == null || msg.length() == 0) {
Integer id = listaPrecio.getId();
if (findListaPrecio(id) == null) {
throw new NonexistentEntityException("The listaPrecio with id " + id + " no longer exists.");
}
}
throw ex;
} finally {
if (em != null) {
em.close();
}
}
}
public void destroy(Integer id) throws NonexistentEntityException {
EntityManager em = null;
try {
em = getEntityManager();
em.getTransaction().begin();
ListaPrecio listaPrecio;
try {
listaPrecio = em.getReference(ListaPrecio.class, id);
listaPrecio.getId();
} catch (EntityNotFoundException enfe) {
throw new NonexistentEntityException("The listaPrecio with id " + id + " no longer exists.", enfe);
}
Presupuesto idPresupuesto = listaPrecio.getIdPresupuesto();
if (idPresupuesto != null) {
idPresupuesto.getListaPrecioList().remove(listaPrecio);
idPresupuesto = em.merge(idPresupuesto);
}
em.remove(listaPrecio);
em.getTransaction().commit();
} finally {
if (em != null) {
em.close();
}
}
}
public List<ListaPrecio> findListaPrecioEntities() {
return findListaPrecioEntities(true, -1, -1);
}
public List<ListaPrecio> findListaPrecioEntities(int maxResults, int firstResult) {
return findListaPrecioEntities(false, maxResults, firstResult);
}
private List<ListaPrecio> findListaPrecioEntities(boolean all, int maxResults, int firstResult) {
EntityManager em = getEntityManager();
try {
CriteriaQuery cq = em.getCriteriaBuilder().createQuery();
cq.select(cq.from(ListaPrecio.class));
Query q = em.createQuery(cq);
if (!all) {
q.setMaxResults(maxResults);
q.setFirstResult(firstResult);
}
return q.getResultList();
} finally {
em.close();
}
}
public ListaPrecio findListaPrecio(Integer id) {
EntityManager em = getEntityManager();
try {
return em.find(ListaPrecio.class, id);
} finally {
em.close();
}
}
public int getListaPrecioCount() {
EntityManager em = getEntityManager();
try {
CriteriaQuery cq = em.getCriteriaBuilder().createQuery();
Root<ListaPrecio> rt = cq.from(ListaPrecio.class);
cq.select(em.getCriteriaBuilder().count(rt));
Query q = em.createQuery(cq);
return ((Long) q.getSingleResult()).intValue();
} finally {
em.close();
}
}
}
|
[
"saesas01@gmail.com"
] |
saesas01@gmail.com
|
b746abcb47a79ae28f1fccff54e3d2c3523ba11a
|
0501080cfc10eab5e92111d7c1128bb4ef61430f
|
/Android/kzksmarthome/kzksmarthomelib/src/main/java/com/kzksmarthome/common/biz/widget/UnScrollableGridView.java
|
e706ef239409e541ac0ba0d631375945f60c3bc5
|
[] |
no_license
|
lgq2015/DemoTest
|
4536fc9cd4261dc8b0432af3c87cc8671ebcf1fa
|
ee5d4d3a5c7e2a0b606107b29849f9561874e418
|
refs/heads/master
| 2023-05-13T03:43:33.480202
| 2019-08-29T08:33:19
| 2019-08-29T08:33:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,047
|
java
|
package com.kzksmarthome.common.biz.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.GridView;
public class UnScrollableGridView extends GridView{
public UnScrollableGridView(Context context) {
super(context);
}
public UnScrollableGridView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public UnScrollableGridView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
if(ev.getAction() == MotionEvent.ACTION_MOVE){
return true;//forbid its child(gridview) to scroll
}
return super.dispatchTouchEvent(ev);
}
}
|
[
"1277796119@qq.com"
] |
1277796119@qq.com
|
0cb9efc03f451aaaee0971cc1135144a018dc193
|
f1d20d6c7e6ec5ed491274fcc11e74bb010c57d3
|
/company-central-client/src/main/java/com/ihappy/company/domain/dto/response/CompanyInfoAddRespDTO.java
|
df59cd57bff8d2a4f05ce10245de65cc819e878d
|
[] |
no_license
|
P79N6A/company-central
|
79273c8e90732cf73f2f8b08c006654809e08736
|
f1a83f62a5cf41f8bfcf79c708a54d736fb1a46b
|
refs/heads/master
| 2020-04-12T02:41:38.769868
| 2018-12-18T07:45:31
| 2018-12-18T07:45:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 486
|
java
|
package com.ihappy.company.domain.dto.response;
import com.ihappy.gateway.dto.ICallResponseBaseDTO;
/**
* Created by sunjd on 2018/4/2.
*/
public class CompanyInfoAddRespDTO extends ICallResponseBaseDTO {
private static final long serialVersionUID = 6348573610332120185L;
/**
* 企业id
*/
private Integer compId;
public Integer getCompId() {
return compId;
}
public void setCompId(Integer compId) {
this.compId = compId;
}
}
|
[
"zhangmengdan@ihappy.net.cn"
] |
zhangmengdan@ihappy.net.cn
|
17b0d30e8eb240c032b5903d248b5eab8038d5b9
|
dc0beecadd0404435e6fea1a49f2014f85b4c004
|
/test/net/ion/framework/promise/TestFirst.java
|
1de21b40fe53c32adb98075826491c22e99c72eb
|
[] |
no_license
|
bleujin/ionframework
|
6295ef747429b6d80b52c5372f54ad0aff461f43
|
bf1c5c5a2d46985a81114a9578adfb5823887350
|
refs/heads/master
| 2022-11-20T10:53:20.831425
| 2016-10-10T07:14:41
| 2016-10-10T07:14:41
| 1,971,241
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,896
|
java
|
package net.ion.framework.promise;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicInteger;
import net.ion.framework.util.Debug;
import net.ion.framework.util.RandomUtil;
import junit.framework.Assert;
import net.ion.framework.promise.Promise.State;
import net.ion.framework.promise.impl.*;
public class TestFirst extends TestBasePromise{
public void testDoneWait() {
final ValueHolder<Integer> holder = new ValueHolder<Integer>();
final AtomicInteger failCount = new AtomicInteger();
deferredManager.when(successCallable(100, 1000))
.done(new DoneCallback() {
public void onDone(Object result) {
Assert.assertEquals(result, 100);
holder.set((Integer) result);
}
}).fail(new FailCallback() {
public void onFail(Object result) {
failCount.incrementAndGet();
}
}).always(new AlwaysCallback<Integer, Throwable>() {
public void onAlways(State state, Integer resolved, Throwable rejected) {
Debug.line(state, resolved, rejected);
}
});
waitForCompletion();
holder.assertEquals(100);
Assert.assertEquals(0, failCount.get());
}
public void testThen() throws Exception {
final boolean result = false ;
deferredManager.when(new Callable<Boolean>(){
public Boolean call() throws Exception {
throw new IllegalStateException("false") ;
// return result;
}
}).then(new DoneCallback<Boolean>() {
public void onDone(Boolean result) {
if (! result) throw new IllegalStateException("false") ;
}
}).done(new DoneCallback<Boolean>() {
public void onDone(Boolean result) {
Debug.line(result);
}
}).fail(new FailCallback<Throwable>() {
public void onFail(Throwable result) {
Debug.line(result.getMessage());
}
}) ;
waitForCompletion();
}
public void testDoneRewireToFail() {
final ValueHolder<Integer> preRewireValue = new ValueHolder<Integer>();
final ValueHolder<Integer> postRewireValue = new ValueHolder<Integer>();
final ValueHolder<String> failed = new ValueHolder<String>();
deferredManager.when(new Callable<Integer>() {
public Integer call() {
return 10;
}
}).then(new DonePipe<Integer, Integer, String, Void>() {
public Promise<Integer, String, Void> pipeDone(Integer result) {
preRewireValue.set(result);
if (result < 100) {
return new DeferredObject<Integer, String, Void>().reject("less than 100");
} else {
return new DeferredObject<Integer, String, Void>().resolve(result);
}
}
}).done(new DoneCallback<Integer>() {
public void onDone(Integer result) {
postRewireValue.set(result);
}
}).fail(new FailCallback<String>() {
public void onFail(String result) {
failed.set(result);
}
});
waitForCompletion();
preRewireValue.assertEquals(10);
postRewireValue.assertEquals(null);
failed.assertEquals("less than 100");
}
}
|
[
"bleujin@gmail.com"
] |
bleujin@gmail.com
|
35e906c93fca82ed5e70f9bddb60fe0af401c826
|
5c1c38e219d73f7caab0bbf53dc4acaaf931e227
|
/roncoo-education-course/roncoo-education-course-service/src/main/java/com/roncoo/education/course/service/dao/impl/ZoneCourseDaoImpl.java
|
176fe4a524c0c7d76be96249614d4407374213be
|
[] |
no_license
|
maxiaoli/roncoo-education
|
ad7e9d25fc74f4c3eb453aa5b649bfe3b47d9c6e
|
029cd3cf02c17d1036a5f7097fbd6316992b4d7a
|
refs/heads/master
| 2020-04-15T04:11:01.461528
| 2019-01-06T06:44:27
| 2019-01-06T06:44:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,057
|
java
|
package com.roncoo.education.course.service.dao.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.roncoo.education.course.service.dao.ZoneCourseDao;
import com.roncoo.education.course.service.dao.impl.mapper.ZoneCourseMapper;
import com.roncoo.education.course.service.dao.impl.mapper.entity.ZoneCourse;
import com.roncoo.education.course.service.dao.impl.mapper.entity.ZoneCourseExample;
import com.roncoo.education.course.service.dao.impl.mapper.entity.ZoneCourseExample.Criteria;
import com.roncoo.education.util.base.Page;
import com.roncoo.education.util.base.PageUtil;
import com.roncoo.education.util.enums.StatusIdEnum;
import com.roncoo.education.util.tools.IdWorker;
@Repository
public class ZoneCourseDaoImpl implements ZoneCourseDao {
@Autowired
private ZoneCourseMapper zoneCourseMapper;
@Override
public int save(ZoneCourse record) {
record.setId(IdWorker.getId());
return this.zoneCourseMapper.insertSelective(record);
}
@Override
public int deleteById(Long id) {
return this.zoneCourseMapper.deleteByPrimaryKey(id);
}
@Override
public int updateById(ZoneCourse record) {
return this.zoneCourseMapper.updateByPrimaryKeySelective(record);
}
@Override
public ZoneCourse getById(Long id) {
return this.zoneCourseMapper.selectByPrimaryKey(id);
}
@Override
public Page<ZoneCourse> listForPage(int pageCurrent, int pageSize, ZoneCourseExample example) {
int count = this.zoneCourseMapper.countByExample(example);
pageSize = PageUtil.checkPageSize(pageSize);
pageCurrent = PageUtil.checkPageCurrent(count, pageSize, pageCurrent);
int totalPage = PageUtil.countTotalPage(count, pageSize);
example.setLimitStart(PageUtil.countOffset(pageCurrent, pageSize));
example.setPageSize(pageSize);
return new Page<ZoneCourse>(count, totalPage, pageCurrent, pageSize, this.zoneCourseMapper.selectByExample(example));
}
@Override
public List<ZoneCourse> listByZoneIdAndStatusId(Long zoneId, Integer statusId) {
ZoneCourseExample example = new ZoneCourseExample();
Criteria c = example.createCriteria();
c.andZoneIdEqualTo(zoneId);
c.andStatusIdEqualTo(statusId);
return this.zoneCourseMapper.selectByExample(example);
}
@Override
public List<ZoneCourse> listByZoneId(Long zoneId) {
ZoneCourseExample example = new ZoneCourseExample();
Criteria c = example.createCriteria();
c.andZoneIdEqualTo(zoneId);
c.andStatusIdEqualTo(StatusIdEnum.YES.getCode());
return this.zoneCourseMapper.selectByExample(example);
}
@Override
public ZoneCourse getZoneIdAndCourseId(Long courseId, Long zoneId) {
ZoneCourseExample example = new ZoneCourseExample();
Criteria c = example.createCriteria();
c.andCourseIdEqualTo(courseId);
c.andZoneIdEqualTo(zoneId);
List<ZoneCourse> list = this.zoneCourseMapper.selectByExample(example);
if (list.isEmpty()) {
return null;
}
return list.get(0);
}
}
|
[
"297115770@qq.com"
] |
297115770@qq.com
|
1a1755ba11b1c2694b29009855f17ffc16affbe3
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-sas/src/main/java/com/aliyuncs/sas/transform/v20181203/DescribePropertySoftwareItemResponseUnmarshaller.java
|
56f29a159478477b275cfeef9c182d3e60b544f4
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk
|
a263fa08e261f12d45586d1b3ad8a6609bba0e91
|
e19239808ad2298d32dda77db29a6d809e4f7add
|
refs/heads/master
| 2023-09-03T12:28:09.765286
| 2023-09-01T09:03:00
| 2023-09-01T09:03:00
| 39,555,898
| 1,542
| 1,317
|
NOASSERTION
| 2023-09-14T07:27:05
| 2015-07-23T08:41:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,548
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.sas.transform.v20181203;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.sas.model.v20181203.DescribePropertySoftwareItemResponse;
import com.aliyuncs.sas.model.v20181203.DescribePropertySoftwareItemResponse.PageInfo;
import com.aliyuncs.sas.model.v20181203.DescribePropertySoftwareItemResponse.PropertySoftwareItem;
import com.aliyuncs.transform.UnmarshallerContext;
public class DescribePropertySoftwareItemResponseUnmarshaller {
public static DescribePropertySoftwareItemResponse unmarshall(DescribePropertySoftwareItemResponse describePropertySoftwareItemResponse, UnmarshallerContext _ctx) {
describePropertySoftwareItemResponse.setRequestId(_ctx.stringValue("DescribePropertySoftwareItemResponse.RequestId"));
PageInfo pageInfo = new PageInfo();
pageInfo.setCurrentPage(_ctx.integerValue("DescribePropertySoftwareItemResponse.PageInfo.CurrentPage"));
pageInfo.setPageSize(_ctx.integerValue("DescribePropertySoftwareItemResponse.PageInfo.PageSize"));
pageInfo.setTotalCount(_ctx.integerValue("DescribePropertySoftwareItemResponse.PageInfo.TotalCount"));
pageInfo.setCount(_ctx.integerValue("DescribePropertySoftwareItemResponse.PageInfo.Count"));
describePropertySoftwareItemResponse.setPageInfo(pageInfo);
List<PropertySoftwareItem> propertyItems = new ArrayList<PropertySoftwareItem>();
for (int i = 0; i < _ctx.lengthValue("DescribePropertySoftwareItemResponse.PropertyItems.Length"); i++) {
PropertySoftwareItem propertySoftwareItem = new PropertySoftwareItem();
propertySoftwareItem.setName(_ctx.stringValue("DescribePropertySoftwareItemResponse.PropertyItems["+ i +"].Name"));
propertySoftwareItem.setCount(_ctx.integerValue("DescribePropertySoftwareItemResponse.PropertyItems["+ i +"].Count"));
propertyItems.add(propertySoftwareItem);
}
describePropertySoftwareItemResponse.setPropertyItems(propertyItems);
return describePropertySoftwareItemResponse;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
19e6c5bbe725c1b2e414a9c52024ebae40168527
|
c7e000e5c6549e095a8ffd032d33e0ca449c7ffd
|
/bin/ext-integration/sap/synchronousOM/sapordermgmtbol/testsrc/de/hybris/platform/sap/sapordermgmtbol/transaction/misc/backend/impl/TransactionConfigurationBaseTest.java
|
38a3f6716f33d7cc5e1d418d66b1bc22b7f572fc
|
[] |
no_license
|
J3ys/million
|
e80ff953e228e4bc43a1108a1c117ddf11cc4644
|
a97974b68b4adaf820f9024aa5181de635c60b4f
|
refs/heads/master
| 2021-03-09T22:59:35.115273
| 2015-05-19T02:47:29
| 2015-05-19T02:47:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,747
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2014 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.sap.sapordermgmtbol.transaction.misc.backend.impl;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import de.hybris.bootstrap.annotations.UnitTest;
import de.hybris.platform.sap.core.jco.connection.JCoConnection;
import de.hybris.platform.sap.core.jco.exceptions.BackendException;
import de.hybris.platform.sap.sapordermgmtbol.transaction.misc.backend.impl.erp.TransactionConfigurationERP;
import java.util.Map;
import org.easymock.EasyMock;
import org.junit.Before;
import org.junit.Test;
@UnitTest
@SuppressWarnings("javadoc")
public class TransactionConfigurationBaseTest
{
TransactionConfigurationBase classUnderTest = new TransactionConfigurationERP();
JCoConnection connection = null;
@Before
public void init() throws BackendException
{
connection = EasyMock.createMock(JCoConnection.class);
EasyMock.expect(connection.isFunctionAvailable(TransactionConfigurationBase.RFC_NAME_LANGUAGE_SWITCH_DELIV_CUSTOMIZING))
.andReturn(true);
EasyMock.replay(connection);
}
@Test
public void testLanguageSwitchDelivCustomizingAvailable()
{
assertTrue(classUnderTest.isLanguageSwitchDelivCustomizingAvailable(connection));
}
public void testDeliveryTypes()
{
final Map<String, String> deliveryTypes = classUnderTest.getDeliveryTypes();
assertNotNull(deliveryTypes);
}
}
|
[
"yanagisawa@gotandadenshi.jp"
] |
yanagisawa@gotandadenshi.jp
|
a834ead6979eb7ea0e64869dcdfad1616870a056
|
e1b77066457583c0b108d70c2ff78852a506a7ce
|
/src/main/java/p2/ThreadResource.java
|
3e97ba463e7d958415883795a5114ea139ffecdb
|
[] |
no_license
|
Hmz3192/BankAlo
|
76afdcb07a0933ba44805ef3cc7fcadb05e80acc
|
ba97c17d30ea95f91bdf9c2e43f3dfb33462d345
|
refs/heads/master
| 2021-09-03T15:59:12.821296
| 2018-01-10T08:30:32
| 2018-01-10T08:30:32
| 113,648,046
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 823
|
java
|
package p2;
import java.util.Random;
public class ThreadResource implements Runnable{
private Resource resource = new Resource(10);
@Override
public synchronized void run() {
for(int i=0;i<5;i++) {
resource.decrease_count(10);
System.out.println("线程名" + Thread.currentThread().getName() + "请求资源 || 剩余资源量" + resource.getAvailable_resources());
try {
Thread.currentThread().sleep(1000);
resource.increase_count(10);
System.out.println("在延迟1s之后,线程名" + Thread.currentThread().getName() + "返回资源 || 剩余资源量" + resource.getAvailable_resources());
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
|
[
"1134598796@qq.com"
] |
1134598796@qq.com
|
665bc3b9763b0a7222a14d5cd884f7fa4790165f
|
00e1e0709c471385b807b25ae5da0715f069136d
|
/center/src/com/chuangyou/xianni/email/cmd/GetEmailAttachmentBatchCmd.java
|
c9aa54d611cda9a22f9915997cf360dd59ce9a6b
|
[] |
no_license
|
hw233/app2-java
|
44504896d13a5b63e3d95343c62424495386b7f1
|
f4b5217a4980b0ff81f81577c348a6e71593a185
|
refs/heads/master
| 2020-04-27T11:23:44.089556
| 2016-11-18T01:33:52
| 2016-11-18T01:33:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,072
|
java
|
package com.chuangyou.xianni.email.cmd;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import com.chuangyou.common.protobuf.pb.email.GetEmailAttachmentBatchRespProto.GetEmailAttachmentBatchRespMsg;
import com.chuangyou.common.protobuf.pb.email.OperationEmailRespProto.OperationEmailRespMsg;
import com.chuangyou.xianni.base.AbstractCommand;
import com.chuangyou.xianni.common.ErrorCode;
import com.chuangyou.xianni.common.error.ErrorMsgUtil;
import com.chuangyou.xianni.constant.CommonType;
import com.chuangyou.xianni.email.manager.EmailManager;
import com.chuangyou.xianni.email.vo.EmailItemVo;
import com.chuangyou.xianni.entity.email.Email;
import com.chuangyou.xianni.entity.item.BindType;
import com.chuangyou.xianni.entity.item.ItemAddType;
import com.chuangyou.xianni.player.GamePlayer;
import com.chuangyou.xianni.proto.MessageUtil;
import com.chuangyou.xianni.proto.PBMessage;
import com.chuangyou.xianni.protocol.Protocol;
import com.chuangyou.xianni.socket.Cmd;
@Cmd(code = Protocol.C_REQ_GETEMAILATTACHMENTBATCH, desc = "批量提取邮件附件")
public class GetEmailAttachmentBatchCmd extends AbstractCommand {
@Override
public void execute(GamePlayer player, PBMessage packet) throws Exception {
// TODO Auto-generated method stub
List<Email> list = player.getEmailInventory().getEmails();
boolean flag = false;
OperationEmailRespMsg.Builder nmsg = OperationEmailRespMsg.newBuilder();
nmsg.setType(2);
for (Email email : list) {
if (email.getStatus() == Email.NORMAL_EMAIL || email.getStatus() == Email.READED_EMAIL) { // 邮件状态正确
if (!email.getAttachment().equals("")) { // 附件不为空
// todo 向背包里加物品。
// todo 判断背包是否满啦。
List<EmailItemVo> items = EmailManager.getEmailItems(email.getAttachment());
Iterator<EmailItemVo> it = items.iterator();
while (it.hasNext()) {
EmailItemVo item = it.next();
if (item.getItemTemplateId() == CommonType.CurrencyItemType.MONEY_ITEM) {
player.getBasePlayer().addMoney(item.getCount(), ItemAddType.EMAIL_ADD);
it.remove();
} else if (item.getItemTemplateId() == CommonType.CurrencyItemType.CASH_ITEM) {
player.getBasePlayer().addCash(item.getCount(), ItemAddType.EMAIL_ADD);
it.remove();
} else if (item.getItemTemplateId() == CommonType.CurrencyItemType.CASH_BIND_ITEM) {
player.getBasePlayer().addBindCash(item.getCount(), ItemAddType.EMAIL_ADD);
it.remove();
} else {
if (player.getBagInventory().addItem(item.getItemTemplateId(), item.getCount(), ItemAddType.EMAIL_ADD, item.getBind()==BindType.BIND?true:false)) {
it.remove();
} else {
ErrorMsgUtil.sendErrorMsg(player, ErrorCode.BAG_IS_FULL, Protocol.C_REQ_GETEMAILATTACKMENT, "背包已满");
flag = true;
break;
}
}
}
if (items.size() == 0) {
email.setGetAttachmentTime(new Date());
email.setStatus(Email.READED_GETATTACHMENT_EMAIL);
player.getEmailInventory().updateEmail(email);
} else {
StringBuffer str = new StringBuffer("");
Iterator<EmailItemVo> tempIt = items.iterator();
while (tempIt.hasNext()) {
EmailItemVo item = tempIt.next();
str.append(item.getItemTemplateId()).append(",").append(item.getCount()).append(",").append(item.getBind()).append(";");
}
email.setGetAttachmentTime(new Date());
email.setAttachment(str.toString());
player.getEmailInventory().updateEmail(email);
}
nmsg.addEmails(EmailManager.changeEmail(email));
if (flag == true) {
break;
}
}
}
}
PBMessage pkg = MessageUtil.buildMessage(Protocol.U_RESP_OPERATIONEMAIL, nmsg);
player.sendPbMessage(pkg);
GetEmailAttachmentBatchRespMsg.Builder msg = GetEmailAttachmentBatchRespMsg.newBuilder();
if (!flag) {
msg.setResultType(1);
} else {
msg.setResultType(2);
}
pkg = MessageUtil.buildMessage(Protocol.U_RESP_GETEMAILATTACHMENTBATCH, msg);
player.sendPbMessage(pkg);
}
}
|
[
"you@example.com"
] |
you@example.com
|
9ebc1dd910e1928fbbdd23ca900bedbda8496682
|
08c5675ad0985859d12386ca3be0b1a84cc80a56
|
/src/main/java/org/omg/PortableInterceptor/ForwardRequestHelper.java
|
853d1701bfaa0fc4df260ad9e41a77749949b06a
|
[] |
no_license
|
ytempest/jdk1.8-analysis
|
1e5ff386ed6849ea120f66ca14f1769a9603d5a7
|
73f029efce2b0c5eaf8fe08ee8e70136dcee14f7
|
refs/heads/master
| 2023-03-18T04:37:52.530208
| 2021-03-09T02:51:16
| 2021-03-09T02:51:16
| 345,863,779
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,824
|
java
|
package org.omg.PortableInterceptor;
/**
* org/omg/PortableInterceptor/ForwardRequestHelper.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/PortableInterceptor/Interceptors.idl
* Tuesday, August 4, 2015 11:07:53 AM PDT
*/
abstract public class ForwardRequestHelper {
private static String _id = "IDL:omg.org/PortableInterceptor/ForwardRequest:1.0";
public static void insert(org.omg.CORBA.Any a, org.omg.PortableInterceptor.ForwardRequest that) {
org.omg.CORBA.portable.OutputStream out = a.create_output_stream();
a.type(type());
write(out, that);
a.read_value(out.create_input_stream(), type());
}
public static org.omg.PortableInterceptor.ForwardRequest extract(org.omg.CORBA.Any a) {
return read(a.create_input_stream());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
private static boolean __active = false;
synchronized public static org.omg.CORBA.TypeCode type() {
if (__typeCode == null) {
synchronized (org.omg.CORBA.TypeCode.class) {
if (__typeCode == null) {
if (__active) {
return org.omg.CORBA.ORB.init().create_recursive_tc(_id);
}
__active = true;
org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[1];
org.omg.CORBA.TypeCode _tcOf_members0 = null;
_tcOf_members0 = org.omg.CORBA.ObjectHelper.type();
_members0[0] = new org.omg.CORBA.StructMember(
"forward",
_tcOf_members0,
null);
__typeCode = org.omg.CORBA.ORB.init().create_exception_tc(org.omg.PortableInterceptor.ForwardRequestHelper.id(), "ForwardRequest", _members0);
__active = false;
}
}
}
return __typeCode;
}
public static String id() {
return _id;
}
public static org.omg.PortableInterceptor.ForwardRequest read(org.omg.CORBA.portable.InputStream istream) {
org.omg.PortableInterceptor.ForwardRequest value = new org.omg.PortableInterceptor.ForwardRequest();
// read and discard the repository ID
istream.read_string();
value.forward = org.omg.CORBA.ObjectHelper.read(istream);
return value;
}
public static void write(org.omg.CORBA.portable.OutputStream ostream, org.omg.PortableInterceptor.ForwardRequest value) {
// write the repository ID
ostream.write_string(id());
org.omg.CORBA.ObjectHelper.write(ostream, value.forward);
}
}
|
[
"787491096@qq.com"
] |
787491096@qq.com
|
0df2c67336caa81292c0268690963061c1acbd0d
|
4442e43ab7e144e6e6d3aac62180ee0d95fef87b
|
/src/main/java/com/eystar/console/startup/util/InfoLoader.java
|
e73a0b80509cb15a0875a98a5aca26babe1e1918
|
[] |
no_license
|
sunjiyongtc0/nqs-console-flink
|
b75ce2fa4ab4895aa6e96d81a98951f946344562
|
6d0fb4f123eeb6225be1f47e57487e696958f641
|
refs/heads/master
| 2023-07-20T15:45:54.696938
| 2021-09-06T06:46:26
| 2021-09-06T06:46:26
| 400,025,692
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,778
|
java
|
package com.eystar.console.startup.util;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.eystar.common.util.RedisModifyHelper;
import com.eystar.common.util.XxlConfBean;
import com.eystar.console.startup.cache.redis.util.RedisUtils;
import com.eystar.console.startup.entity.TPProbe;
import com.eystar.console.startup.entity.TPProbeAccessType;
import com.eystar.console.startup.entity.TTTaskParam;
import com.eystar.console.startup.entity.TTTaskSrcDest;
import com.eystar.console.startup.handler.probe.ProbeAccessTypeHelper;
import com.eystar.console.startup.service.ProbeService;
import com.eystar.console.startup.service.TaskParamService;
import com.eystar.console.startup.service.TaskSrcDesService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.alibaba.fastjson.JSONObject;
import com.eystar.common.util.Constants;
import java.util.List;
import java.util.Set;
public class InfoLoader {
protected static final Logger logger = LoggerFactory.getLogger(InfoLoader.class);
private static RedisUtils redisUtils;
private static ProbeService probeService;
private static TaskSrcDesService taskSrcDesService;
private static TaskParamService taskParamService;
public static void init(RedisUtils ru, ProbeService ps){
redisUtils=ru;
probeService=ps;
}
public static void taskInit(TaskSrcDesService tsd,TaskParamService tp){
taskSrcDesService=tsd;
taskParamService=tp;
}
public synchronized static JSONObject loadProbe(String probeId) {
String key = Constants.REDIS_KEY_PROBE + probeId;
String probeJson = redisUtils.get(key);
if (StrUtil.isBlank(probeJson)) {
TPProbe probe = probeService.findById(probeId);
if (probe != null) {
probeJson = JSON.toJSONString(probe);
RedisModifyHelper.updateProbe(probeId,probeJson);
} else {
return new JSONObject();
}
}
return JSONObject.parseObject(probeJson);
}
public synchronized static JSONObject loadProbeAccessType(String probeId) {
String key = Constants.REDIS_KEY_ACCESS_TYPE + probeId;
JSONObject object = new JSONObject();
if (!redisUtils.exists(key)) {
List<TPProbeAccessType> accessTypes = ProbeAccessTypeHelper.findByProbeId(probeId);
for (TPProbeAccessType accessType : accessTypes) {
object.put(accessType.getAccessTypeName(), JSONObject.parseObject(JSON.toJSONString(accessType)));
RedisModifyHelper.updateProbeAccess(probeId, accessType.getAccessTypeName(), JSON.toJSONString(accessType));
if (accessType.getIsDefault() == 1) {
redisUtils.hset(key, "default_name", accessType.getAccessTypeName());
RedisModifyHelper.updateProbeAccess(probeId, "default_name", accessType.getAccessTypeName());
}
}
return object;
} else {
Set<String> fields = redisUtils.hkeys(key);
for (String field : fields) {
if (StrUtil.equals(field, "default_name")) {
continue;
}
object.put(field, JSONObject.parseObject(redisUtils.hget(key, field)));
}
return object;
}
}
public synchronized static JSONObject loadTaskSrcDest(String taskId) {
String key = Constants.REDIS_KEY_TASK_SRC_DEST + taskId;
String taskJson = redisUtils.get(key);
if (StrUtil.isBlank(taskJson)) {
TTTaskSrcDest taskSrcDest = taskSrcDesService.findById(taskId);
if (taskSrcDest != null) {
RedisModifyHelper.updateTaskSrcDest(taskId,JSON.toJSONString(taskSrcDest));
} else {
return new JSONObject();
}
}
return JSONObject.parseObject(taskJson);
}
public synchronized static JSONObject loadTaskParam(String taskParamId) {
String key = Constants.REDIS_KEY_TASK_PARAM + taskParamId;
String task_param_json = redisUtils.get(key);
if (StrUtil.isBlank(task_param_json)) {
TTTaskParam tp = taskParamService.findById(taskParamId);
if (tp != null) {
task_param_json = JSON.toJSONString(tp) ;
RedisModifyHelper.updateTaskParam(taskParamId,task_param_json);
} else {
return new JSONObject();
}
}
return JSONObject.parseObject(task_param_json);
}
public synchronized static JSONObject loadAlarmTemplate(String alarmTemplateId) {
String key = Constants.REDIS_KEY_ALARM_TEMPLATE + alarmTemplateId;
String alarm_template_json = redisUtils.get(key);
// if (StrUtil.isBlank(alarm_template_json)) {
// AlarmTemplate template = AlarmTemplate.dao.findAlarmTemplateById(alarmTemplateId);
// if (template != null) {
// alarm_template_json = template.toJson();
// if (OperationConfig.isReplace) {
// RedisModifyHelper.updateAlarmTemplate(alarmTemplateId, alarm_template_json);
// }
// } else {
// return new JSONObject();
// }
// }
// return JSONObject.parseObject(alarm_template_json);
return new JSONObject();
}
}
|
[
"315541219@qq.com"
] |
315541219@qq.com
|
0b007b1f36dcb4b091dc4e8b21ae688c507aa37f
|
70cbaeb10970c6996b80a3e908258f240cbf1b99
|
/WiFi万能钥匙dex1-dex2jar.jar.src/com/lantern/push/a/b.java
|
ad6399a8ff97d8e89dab870a798adc91cd56f43d
|
[] |
no_license
|
nwpu043814/wifimaster4.2.02
|
eabd02f529a259ca3b5b63fe68c081974393e3dd
|
ef4ce18574fd7b1e4dafa59318df9d8748c87d37
|
refs/heads/master
| 2021-08-28T11:11:12.320794
| 2017-12-12T03:01:54
| 2017-12-12T03:01:54
| 113,553,417
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 631
|
java
|
package com.lantern.push.a;
public final class b
extends a
{
public final String a()
{
if (com.lantern.push.utils.b.a()) {}
for (String str = com.lantern.push.utils.b.b() + "WifiMasterKey/cache/images/";; str = com.lantern.push.utils.b.b() + "WifiMasterKey/cache/images/") {
return str;
}
}
public final String a(String paramString)
{
int i = paramString.hashCode();
return a() + String.valueOf(i);
}
}
/* Location: /Users/hanlian/Downloads/WiFi万能钥匙dex1-dex2jar.jar!/com/lantern/push/a/b.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"lianh@jumei.com"
] |
lianh@jumei.com
|
b68e83fac015e4bb4f0a578906f99f4938276a78
|
3c5e0a73867838bc2afbc3b431dcc53ef8ea3af0
|
/src/com/ulane/callout/action/outb/ObCallbatchHisAction.java
|
ef9dbd8c0137f213588121aff27d03bb95f2fcd0
|
[] |
no_license
|
cjp472/crm
|
5f5d21c9b2307ab5d144ca8a762f374823a950c4
|
d4a7f4dbf2983f0d3abb38ba0d0a916c08cb0c86
|
refs/heads/master
| 2020-03-19T09:48:34.976163
| 2018-05-05T07:47:27
| 2018-05-05T07:47:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,158
|
java
|
package com.ulane.callout.action.outb;
/*
* 北京优创融联科技有限公司 综合客服管理系统 -- http://www.ulane.cn
* Copyright (C) 2008-2010 Beijing Ulane Technology Co., LTD
*/
import java.util.List;
import javax.annotation.Resource;
import java.lang.reflect.Type;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.htsoft.core.util.BeanUtil;
import com.htsoft.core.command.QueryFilter;
import com.htsoft.core.web.action.BaseAction;
import com.ulane.callout.model.outb.ObCallbatchHis;
import com.ulane.callout.service.outb.ObCallbatchHisService;
/**
*
* @author cf0666@gmail.com
*
*/
public class ObCallbatchHisAction extends BaseAction{
@Resource
private ObCallbatchHisService obCallbatchHisService;
private ObCallbatchHis obCallbatchHis;
private Long opeHisId;
public Long getOpeHisId() {
return opeHisId;
}
public void setOpeHisId(Long opeHisId) {
this.opeHisId = opeHisId;
}
public ObCallbatchHis getObCallbatchHis() {
return obCallbatchHis;
}
public void setObCallbatchHis(ObCallbatchHis obCallbatchHis) {
this.obCallbatchHis = obCallbatchHis;
}
/**
* 显示列表
*/
public String list(){
QueryFilter filter=new QueryFilter(getRequest());
List<ObCallbatchHis> list= obCallbatchHisService.getAll(filter);
Type type=new TypeToken<List<ObCallbatchHis>>(){}.getType();
StringBuffer buff = new StringBuffer("{success:true,'totalCounts':").append(filter.getPagingBean().getTotalItems()).append(",result:");
// JSONSerializer serializer = new JSONSerializer();
// serializer.transform(new DateTransformer("yyyy-MM-dd HH:mm:ss"),new String[] { "applyTime"});
// buff.append(serializer.exclude(new String[]{"class","conHiss","conBwListBusRuls"}).serialize(list));
Gson gson=new Gson();
buff.append(gson.toJson(list, type));
buff.append("}");
jsonString=buff.toString();
return SUCCESS;
}
/**
* 批量删除
* @return
*/
public String multiDel(){
String[]ids=getRequest().getParameterValues("ids");
if(ids!=null){
for(String id:ids){
obCallbatchHisService.remove(new Long(id));
}
}
jsonString="{success:true}";
return SUCCESS;
}
/**
* 显示详细信息
* @return
*/
public String get(){
ObCallbatchHis obCallbatchHis=obCallbatchHisService.get(opeHisId);
Gson gson=new GsonBuilder().setDateFormat("yyyy-MM-dd").create();
//将数据转成JSON格式
StringBuffer sb = new StringBuffer("{success:true,data:");
sb.append(gson.toJson(obCallbatchHis));
sb.append("}");
setJsonString(sb.toString());
return SUCCESS;
}
/**
* 添加及保存操作
*/
public String save(){
if(obCallbatchHis.getOpeHisId()==null){
obCallbatchHisService.save(obCallbatchHis);
}else{
ObCallbatchHis orgObCallbatchHis=obCallbatchHisService.get(obCallbatchHis.getOpeHisId());
try{
BeanUtil.copyNotNullProperties(orgObCallbatchHis, obCallbatchHis);
obCallbatchHisService.save(orgObCallbatchHis);
}catch(Exception ex){
logger.error(ex.getMessage());
}
}
setJsonString("{success:true}");
return SUCCESS;
}
}
|
[
"huyang3868@163.com"
] |
huyang3868@163.com
|
2962d50462e2de3146b2108179e838b505058f0e
|
979d76df43eed655ee2709e1e163fb30f2dac009
|
/src/test/java/pages/ProductListingPage.java
|
05df65ed66d55688b8e146fb784288b8a26754e3
|
[] |
no_license
|
aravindanath/amazonPOM_FW
|
b522288024b90fa5ffcdd2c09cfe75a601bbf971
|
78a88d9d845e7d7b3e11539e8e08606095c5ae36
|
refs/heads/master
| 2023-08-03T04:47:32.210458
| 2019-12-08T10:45:14
| 2019-12-08T10:45:14
| 226,651,632
| 0
| 0
| null | 2023-07-22T23:46:57
| 2019-12-08T10:44:27
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,827
|
java
|
package pages;
import java.util.HashMap;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindAll;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
public class ProductListingPage extends BasePage{
private WebDriver driver;
public ProductListingPage(WebDriver driver) {
super(driver);
this.driver = driver;
PageFactory.initElements(driver, this);
}
//Display
@FindBy(xpath="//span[text()='Analogue']")
public WebElement analogueCB;
//movement
@FindBy(xpath="//span[text()='Quartz']")
public WebElement quartzCB;
@FindBy(xpath="//span[text()='Leather']")
public WebElement leatherCB;
@FindBy(xpath="//span[text()='25% Off or more']")
public WebElement discountlink;
@FindBy(xpath="(//span[text()='See more'])[1]")
public WebElement seemoreBrands;
@FindBy(xpath="(//span[text()='Titan'])[1]")
public WebElement titan;
@FindAll(@FindBy(xpath="//div[@class='s-result-list s-search-results sg-row']/div"))
public List<WebElement> watches;
@FindBy(css="#productTitle")
public WebElement productTitle;
@FindBy(css="#priceblock_ourprice")
public WebElement priceTag;
protected HashMap<String, String> plp;
public void selectFilters() {
click(driver, analogueCB);
click(driver, quartzCB);
click(driver, leatherCB);
click(driver, discountlink);
click(driver, seemoreBrands);
click(driver, titan);
}
public void selctWatch(int index) {
watches.get(index).click();
}
public void getProductDetails() {
windowHandle(driver);
String producttitle = productTitle.getText();
System.out.println(producttitle);
String pricetag = priceTag.getText();
System.out.println(pricetag);
}
}
|
[
"aravindanath86@gmail.com"
] |
aravindanath86@gmail.com
|
114dddc045b7312fbce26639bfd024bf61744f89
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes6.dex_source_from_JADX/com/facebook/video/abtest/TriState_DashAbrRolloutGkGatekeeperAutoProvider.java
|
6568f214dfa830386cf72195fc0cc0d53c340d0d
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 605
|
java
|
package com.facebook.video.abtest;
import com.facebook.common.util.TriState;
import com.facebook.gk.GatekeeperStoreImplMethodAutoProvider;
import com.facebook.inject.AbstractProvider;
import com.facebook.inject.InjectorLike;
/* compiled from: scratch */
public class TriState_DashAbrRolloutGkGatekeeperAutoProvider extends AbstractProvider<TriState> {
private static TriState m7984b(InjectorLike injectorLike) {
return GatekeeperStoreImplMethodAutoProvider.a(injectorLike).a(478);
}
public Object get() {
return GatekeeperStoreImplMethodAutoProvider.a(this).a(478);
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
d586e8355b4938c99d0c147868045159d4f5eedc
|
cc66a11bfc637063bdd1cb703072ced8caf942e9
|
/utils/VelocityUtils/src/test/java/com/dhenton9000/utils/velocityproject/App.java
|
0bfbeddce9ec3fde108c6e82edf444b41921e404
|
[] |
no_license
|
donhenton/code-attic
|
e905840a4d53181d8a6d7c8b983c7b2dc553074b
|
e8588bea7af3d3a168958ae96ea8a476fcb6969f
|
refs/heads/master
| 2016-09-05T14:47:39.348847
| 2015-07-20T17:37:38
| 2015-07-20T17:37:38
| 39,396,691
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,662
|
java
|
package com.dhenton9000.utils.velocityproject;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.util.ArrayList;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
/**
* Hello world! http://velocity.apache.org/engine/devel/getting-started.html
*/
public class App {
private static final Logger logger = LogManager.getLogger(App.class);
public void doWork() {
VelocityEngineFactory vFactory = new VelocityEngineFactory();
VelocityEngine ve = vFactory.getEngine();
VelocityContext context = new VelocityContext();
context.put("packageName","output");
context.put("utility", new Utility());
ArrayList<Item> items = new ArrayList<Item>();
items.add(new Item("fred", 35));
items.add(new Item("joe", 27));
logger.debug("start");
for (Item i : items) {
logger.debug(i);
context.put("item",i);
try {
BufferedWriter writer = new BufferedWriter(new FileWriter("src/test/resources/output/"+Utility.proper(i.getName()) + ".java"));
ve.mergeTemplate("templates/test.vm", "UTF-8",context, writer);
writer.flush();
writer.close();
} catch (Exception err) {
logger.error("PROBLEM "+err.getClass().getName()+"\n"+err.getMessage()+"\n",err);
}
}
}
public static void main(String[] args) {
App app = new App();
app.doWork();
}
}
|
[
"donhenton@gmail.com"
] |
donhenton@gmail.com
|
fe7ad59707e4db04b38be0895e9e55a6be2d7c89
|
1056ef28f6d99fb4b1b4e5aadcac0e94ffe776b2
|
/vertx-gaia/vertx-up/src/main/java/io/vertx/up/web/serialization/BooleanSaber.java
|
571d74ba5694b46d22b04630b53a7ccc66f92d3c
|
[
"Apache-2.0"
] |
permissive
|
Ivan97/vertx-zero
|
28e3a09b0c6b0222c6df5eecc3356e042867e678
|
3465af10bb2b4c6d1d4e506f50e70df28698e1ce
|
refs/heads/master
| 2020-03-07T21:31:45.128235
| 2018-07-17T00:30:27
| 2018-07-17T00:30:27
| 127,728,709
| 0
| 0
|
Apache-2.0
| 2018-04-02T08:36:51
| 2018-04-02T08:36:51
| null |
UTF-8
|
Java
| false
| false
| 589
|
java
|
package io.vertx.up.web.serialization;
import io.vertx.up.func.Fn;
import io.vertx.up.tool.Ut;
/**
* Boolean
*/
public class BooleanSaber extends BaseSaber {
@Override
public Object from(final Class<?> paramType,
final String literal) {
return Fn.getSemi(boolean.class == paramType || Boolean.class == paramType, this.getLogger(),
() -> {
this.verifyInput(!Ut.isBoolean(literal), paramType, literal);
return Boolean.parseBoolean(literal);
}, () -> Boolean.FALSE);
}
}
|
[
"silentbalanceyh@126.com"
] |
silentbalanceyh@126.com
|
93c2e3df4a0d5f75e9bf9583e450adb17562aa9d
|
0d23678e1154b4a25090745c96cfc015cc31b21f
|
/app/src/main/java/com/gm/gmrxjavaretrofit/util/AppConstants.java
|
3892f9b96121950f67c59be3ec95400089282517
|
[
"Apache-2.0"
] |
permissive
|
goutham106/GmRxJavaRetrofit
|
d09074b896346187f68591ac371f2065cdd6af96
|
fae9af3305beca8ffce013e0e73fd1f2e1ebde7a
|
refs/heads/master
| 2020-04-06T04:12:03.512866
| 2017-04-12T06:32:20
| 2017-04-12T06:32:20
| 83,011,929
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 266
|
java
|
package com.gm.gmrxjavaretrofit.util;
public class AppConstants extends Constants {
public static final int SPLASH_TIMEOUT_SEC = 3 * 1000; //3 sec
public static final int RECYCLER_VIEW_ITEM_SPACE = 48;
public static final int API_RETRY_COUNT = 3;
}
|
[
"goutham.gm11@gmail.com"
] |
goutham.gm11@gmail.com
|
87b9c8ebaee6df8a887dfd97e7f5b6f5ee67527d
|
8dacfd21e8c0debf7cc7b7a207eb144f71a848b4
|
/android/src/com/android/tools/idea/lint/AndroidLintWrongCaseInspection.java
|
1c84c3856921f46b46088c3c26d5377399758747
|
[
"Apache-2.0"
] |
permissive
|
Ret-Mode/android
|
510efe5f5a892f997ed937cb54852dd747168b02
|
5b427d1fc6a66ff4db09a9e2f02ae61292ccd797
|
refs/heads/master
| 2023-03-23T16:27:19.490681
| 2021-03-11T17:25:44
| 2021-03-11T17:25:44
| 346,621,241
| 0
| 0
|
Apache-2.0
| 2021-03-11T17:25:29
| 2021-03-11T07:53:20
| null |
UTF-8
|
Java
| false
| false
| 2,528
|
java
|
/*
* Copyright (C) 2016 The Android Open Source 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 com.android.tools.idea.lint;
import com.android.tools.idea.lint.common.AndroidLintInspectionBase;
import com.android.tools.idea.lint.common.LintIdeQuickFix;
import com.android.tools.idea.lint.common.ReplaceStringQuickFix;
import com.android.tools.lint.checks.WrongCaseDetector;
import com.android.tools.lint.detector.api.LintFix;
import com.intellij.openapi.editor.Document;
import com.intellij.psi.PsiElement;
import java.util.List;
import org.jetbrains.android.util.AndroidBundle;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class AndroidLintWrongCaseInspection extends AndroidLintInspectionBase {
public AndroidLintWrongCaseInspection() {
super(AndroidBundle.message("android.lint.inspections.wrong.case"), WrongCaseDetector.WRONG_CASE);
}
@NotNull
@Override
public LintIdeQuickFix[] getQuickFixes(@NotNull PsiElement startElement,
@NotNull PsiElement endElement,
@NotNull String message,
@Nullable LintFix fixData) {
@SuppressWarnings("unchecked")
List<String> oldAndNew = LintFix.getData(fixData, List.class);
if (oldAndNew != null && oldAndNew.size() == 2) {
String current = oldAndNew.get(0);
String proposed = oldAndNew.get(1);
return new LintIdeQuickFix[]{new ReplaceStringQuickFix(null, null, current, proposed) {
@Override
protected void editAfter(@SuppressWarnings("UnusedParameters") @NotNull Document document) {
String text = document.getText();
int index = text.indexOf("</" + current + ">");
if (index != -1) {
document.replaceString(index + 2, index + 2 + current.length(), proposed);
}
}
}};
}
return super.getQuickFixes(startElement, endElement, message, fixData);
}
}
|
[
"tnorbye@google.com"
] |
tnorbye@google.com
|
b115e1cf6780957f0c92f258a86bea68d6057759
|
a454eb47350c0846c87546aacdd8a8db539d7ec7
|
/ccs-param-ui/src/main/java/com/sunline/ccs/param/ui/client/program/ProgramInter.java
|
15dd78786596960d9cff575986f22cd5024ea6d6
|
[] |
no_license
|
soldiers1989/guomei-code
|
a4cf353501419a620c0ff2b9d1f7009168a9ae5c
|
ebb85e52012c58708d3b19ee967944afae10ad87
|
refs/heads/master
| 2020-03-27T19:34:29.293383
| 2016-06-18T06:52:16
| 2016-06-18T06:53:43
| 146,998,057
| 0
| 1
| null | 2018-09-01T12:52:12
| 2018-09-01T12:52:12
| null |
UTF-8
|
Java
| false
| false
| 1,143
|
java
|
package com.sunline.ccs.param.ui.client.program;
import java.util.List;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.sunline.ccs.param.def.Program;
import com.sunline.kylin.web.ark.client.rpc.FetchRequest;
import com.sunline.kylin.web.ark.client.rpc.FetchResponse;
import com.sunline.ppy.dictionary.exception.ProcessException;
/*
import com.sunline.ppy.dictionary.exception.ProcessException;
import com.sunline.ccs.param.def.Program;
import com.sunline.ark.gwt.shared.datasource.FetchRequest;
import com.sunline.ark.gwt.shared.datasource.FetchResponse;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
*/
@RemoteServiceRelativePath("rpc/programServer")
public interface ProgramInter extends RemoteService {
FetchResponse getProgramList(FetchRequest request);
void deleteProgram(List<String> keys) throws ProcessException;
void addProgram(Program program) throws ProcessException;
Program getProgram(String key);
void updateProgram(Program program) throws ProcessException;
}
|
[
"yuemk@sunline"
] |
yuemk@sunline
|
6ad38afb00f0bba54fef420830111c3a5b369ba9
|
1a32d704493deb99d3040646afbd0f6568d2c8e7
|
/BOOT-INF/lib/org/hibernate/validator/internal/constraintvalidators/bv/DecimalMinValidatorForNumber.java
|
9004088da32f503a9b46097afffe3e0ea43ffe80
|
[] |
no_license
|
yanrumei/bullet-zone-server-2.0
|
e748ff40f601792405143ec21d3f77aa4d34ce69
|
474c4d1a8172a114986d16e00f5752dc019cdcd2
|
refs/heads/master
| 2020-05-19T11:16:31.172482
| 2019-03-25T17:38:31
| 2019-03-25T17:38:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,361
|
java
|
/* */ package org.hibernate.validator.internal.constraintvalidators.bv;
/* */
/* */ import java.math.BigDecimal;
/* */ import java.math.BigInteger;
/* */ import javax.validation.ConstraintValidator;
/* */ import javax.validation.ConstraintValidatorContext;
/* */ import javax.validation.constraints.DecimalMin;
/* */ import org.hibernate.validator.internal.util.logging.Log;
/* */ import org.hibernate.validator.internal.util.logging.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class DecimalMinValidatorForNumber
/* */ implements ConstraintValidator<DecimalMin, Number>
/* */ {
/* 27 */ private static final Log log = ;
/* */ private BigDecimal minValue;
/* */ private boolean inclusive;
/* */
/* */ public void initialize(DecimalMin minValue)
/* */ {
/* */ try
/* */ {
/* 35 */ this.minValue = new BigDecimal(minValue.value());
/* */ }
/* */ catch (NumberFormatException nfe) {
/* 38 */ throw log.getInvalidBigDecimalFormatException(minValue.value(), nfe);
/* */ }
/* 40 */ this.inclusive = minValue.inclusive();
/* */ }
/* */
/* */
/* */
/* */ public boolean isValid(Number value, ConstraintValidatorContext constraintValidatorContext)
/* */ {
/* 47 */ if (value == null) {
/* 48 */ return true;
/* */ }
/* */
/* */
/* 52 */ if ((value instanceof Double)) {
/* 53 */ if (((Double)value).doubleValue() == Double.POSITIVE_INFINITY) {
/* 54 */ return true;
/* */ }
/* 56 */ if ((Double.isNaN(((Double)value).doubleValue())) || (((Double)value).doubleValue() == Double.NEGATIVE_INFINITY)) {
/* 57 */ return false;
/* */ }
/* */ }
/* 60 */ else if ((value instanceof Float)) {
/* 61 */ if (((Float)value).floatValue() == Float.POSITIVE_INFINITY) {
/* 62 */ return true;
/* */ }
/* 64 */ if ((Float.isNaN(((Float)value).floatValue())) || (((Float)value).floatValue() == Float.NEGATIVE_INFINITY)) {
/* 65 */ return false;
/* */ }
/* */ }
/* */ int comparisonResult;
/* */ int comparisonResult;
/* 70 */ if ((value instanceof BigDecimal)) {
/* 71 */ comparisonResult = ((BigDecimal)value).compareTo(this.minValue);
/* */ } else { int comparisonResult;
/* 73 */ if ((value instanceof BigInteger)) {
/* 74 */ comparisonResult = new BigDecimal((BigInteger)value).compareTo(this.minValue);
/* */ } else { int comparisonResult;
/* 76 */ if ((value instanceof Long)) {
/* 77 */ comparisonResult = BigDecimal.valueOf(value.longValue()).compareTo(this.minValue);
/* */ }
/* */ else
/* 80 */ comparisonResult = BigDecimal.valueOf(value.doubleValue()).compareTo(this.minValue);
/* */ } }
/* 82 */ return comparisonResult >= 0;
/* */ }
/* */ }
/* Location: C:\Users\ikatwal\Downloads\bullet-zone-server-2.0.jar!\BOOT-INF\lib\hibernate-validator-5.3.6.Final.jar!\org\hibernate\validator\internal\constraintvalidators\bv\DecimalMinValidatorForNumber.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"ishankatwal@gmail.com"
] |
ishankatwal@gmail.com
|
d246918a86ad4f3a903b223a185fe9c6b491101c
|
cef9170dbdd3e7794b3b4de89ea61c2ab00934f8
|
/gh-1530/src/test/java/org/springframework/boot/issues/gh1530/dao/WrongExampleServiceIT.java
|
92ed5a248c3bffd947e1ef2f67709e0d5de00eef
|
[] |
no_license
|
choda/spring-boot-issues
|
aa3ba977abdd910427f4441bef529b5ee908e9ca
|
6aec3d13c39f60c07428b1631d2dc8fdf6c99bc8
|
refs/heads/master
| 2021-05-03T11:49:32.298690
| 2018-02-06T16:18:45
| 2018-02-06T16:18:45
| 120,486,256
| 1
| 0
| null | 2018-02-06T16:16:52
| 2018-02-06T16:16:51
| null |
UTF-8
|
Java
| false
| false
| 3,868
|
java
|
package org.springframework.boot.issues.gh1530.dao;
import java.util.List;
import java.util.UUID;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.issues.gh1530.Application;
import org.springframework.boot.issues.gh1530.model.Message;
import org.springframework.boot.issues.gh1530.model.MyModel;
import org.springframework.boot.issues.gh1530.model.Transaction;
import org.springframework.boot.issues.gh1530.service.WrongExampleService;
import org.springframework.boot.test.IntegrationTest;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* Message log_message table test.
* @author Pato Istvan <istvan.pato@vanio.hu>
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class)
@IntegrationTest
public class WrongExampleServiceIT {
@Autowired
WrongExampleService exampleService;
@Autowired
TransactionDao transactionDao;
@Autowired
MessageDao messageDao;
@Autowired
MyModelDao myModelDao;
public WrongExampleServiceIT() {
}
@BeforeClass
public static void setUpClass() {
}
@AfterClass
public static void tearDownClass() {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
/**
* Exception in Service tier, it works fine: if you don't throw exception in
* TransactionLoggerAspect!
*/
@Test
public void testStatusException() {
System.out.println("WrongExampleService testStatusException");
String input = "my_input";
// prepare business transaction for audit
String transactionId = UUID.randomUUID().toString();
Transaction transaction = new Transaction(
transactionId,
Transaction.TYPE_MY_TRANSACTION,
Transaction.STATUS_RUNNING);
// prepare request message, always STATUS_OK
Message requestMessage = new Message(
transactionId,
input,
Message.STATUS_OK);
String output = null;
try {
output = exampleService.execute(transaction, requestMessage, input);
} catch (Exception ex) {
// catch exception beacuse I want to run assertions.
System.out.println("Test exception");
}
// service validation: myModel saved to db
List<MyModel> myModelList = myModelDao.readAll();
/**
* Exception in Service tier, so I don't want to see any records.
* It works fine!
*/
assertTrue(myModelList.isEmpty());
// transaction validation
List<Transaction> trList = transactionDao.readAll();
assertTrue(trList.size() == 1);
/**
* Transaction status EXCEPTION. It is ok.
*/
assertEquals(Transaction.STATUS_EXCEPTION, trList.get(0).getStatus());
// message validation
List<Message> messageList = messageDao.readAll();
assertFalse(messageList.isEmpty());
assertTrue(messageList.size() == 2);
assertEquals(Message.STATUS_OK, messageList.get(0).getStatus());
/**
* Output status is EXCEPTION. It is ok.
*/
assertEquals(Message.STATUS_EXCEPTION, messageList.get(1).getStatus());
assertEquals(input, messageList.get(0).getMessage());
assertEquals("Test exception", messageList.get(1).getMessage());
myModelDao.deleteAll();
messageDao.deleteAll();
transactionDao.deleteAll();
}
}
|
[
"pwebb@pivotal.io"
] |
pwebb@pivotal.io
|
c4a8e5ea200ec4ae6c5fa9cc5b30b569ea7c57f5
|
a2dd1a60a9aa6bea5db09beffe0f1c02cef80454
|
/app/src/main/java/com/nevergiveup/MipcaActivityCapture.java
|
67f05e899ba2ca45a09dcd689303d3906a04c76c
|
[] |
no_license
|
targetwest/firstTest
|
4ff3ffd1ca5867928d3a555302c8609a84b3ba4d
|
84b61e038c024647556c1e8bdda0e23b2ac52819
|
refs/heads/master
| 2021-01-10T02:53:40.947180
| 2015-12-22T11:32:25
| 2015-12-22T11:32:25
| 48,306,298
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,661
|
java
|
package com.nevergiveup;
import android.app.Activity;
import android.content.Intent;
import android.content.res.AssetFileDescriptor;
import android.graphics.Bitmap;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.os.Bundle;
import android.os.Handler;
import android.os.Vibrator;
import android.view.SurfaceHolder;
import android.view.SurfaceHolder.Callback;
import android.view.SurfaceView;
import android.widget.Toast;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.Result;
import com.nevergiveup.views.HeaderView;
import java.io.IOException;
import java.util.Vector;
import zxing.camera.CameraManager;
import zxing.decoding.CaptureActivityHandler;
import zxing.decoding.InactivityTimer;
import zxing.view.ViewfinderView;
/**
* Initial the camera
* @author Ryan.Tang
*/
public class MipcaActivityCapture extends Activity implements Callback {
private CaptureActivityHandler handler;
private ViewfinderView viewfinderView;
private boolean hasSurface;
private Vector<BarcodeFormat> decodeFormats;
private String characterSet;
private InactivityTimer inactivityTimer;
private MediaPlayer mediaPlayer;
private boolean playBeep;
private static final float BEEP_VOLUME = 0.10f;
private boolean vibrate;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_capture);
HeaderView headerView = (HeaderView) findViewById(R.id.header);
headerView.hideRightImage();
headerView.setTitle(R.string.scan);
//ViewUtil.addTopView(getApplicationContext(), this, R.string.scan_card);
CameraManager.init(getApplication());
viewfinderView = (ViewfinderView) findViewById(R.id.viewfinder_view);
hasSurface = false;
inactivityTimer = new InactivityTimer(this);
}
@Override
protected void onResume() {
super.onResume();
SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view);
SurfaceHolder surfaceHolder = surfaceView.getHolder();
if (hasSurface) {
initCamera(surfaceHolder);
} else {
surfaceHolder.addCallback(this);
surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
}
decodeFormats = null;
characterSet = null;
playBeep = true;
AudioManager audioService = (AudioManager) getSystemService(AUDIO_SERVICE);
if (audioService.getRingerMode() != AudioManager.RINGER_MODE_NORMAL) {
playBeep = false;
}
initBeepSound();
vibrate = true;
}
@Override
protected void onPause() {
super.onPause();
if (handler != null) {
handler.quitSynchronously();
handler = null;
}
CameraManager.get().closeDriver();
}
@Override
protected void onDestroy() {
inactivityTimer.shutdown();
super.onDestroy();
}
/**
* ����ɨ����
* @param result
* @param barcode
*/
public void handleDecode(Result result, Bitmap barcode) {
inactivityTimer.onActivity();
playBeepSoundAndVibrate();
String resultString = result.getText();
if (resultString.equals("")) {
Toast.makeText(MipcaActivityCapture.this, "Scan failed!", Toast.LENGTH_SHORT).show();
}else {
Intent resultIntent = new Intent();
Bundle bundle = new Bundle();
bundle.putString("result", resultString);
bundle.putParcelable("bitmap", barcode);
resultIntent.putExtras(bundle);
this.setResult(RESULT_OK, resultIntent);
}
MipcaActivityCapture.this.finish();
}
private void initCamera(SurfaceHolder surfaceHolder) {
try {
CameraManager.get().openDriver(surfaceHolder);
} catch (IOException ioe) {
return;
} catch (RuntimeException e) {
return;
}
if (handler == null) {
handler = new CaptureActivityHandler(this, decodeFormats, characterSet);
}
}
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width,
int height) {
}
@Override
public void surfaceCreated(SurfaceHolder holder) {
if (!hasSurface) {
hasSurface = true;
initCamera(holder);
}
}
@Override
public void surfaceDestroyed(SurfaceHolder holder) {
hasSurface = false;
}
public ViewfinderView getViewfinderView() {
return viewfinderView;
}
public Handler getHandler() {
return handler;
}
public void drawViewfinder() {
viewfinderView.drawViewfinder();
}
private void initBeepSound() {
if (playBeep && mediaPlayer == null) {
// The volume on STREAM_SYSTEM is not adjustable, and users found it
// too loud,
// so we now play on the music stream.
setVolumeControlStream(AudioManager.STREAM_MUSIC);
mediaPlayer = new MediaPlayer();
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.setOnCompletionListener(beepListener);
AssetFileDescriptor file = getResources().openRawResourceFd(R.raw.beep);
try {
mediaPlayer.setDataSource(file.getFileDescriptor(),
file.getStartOffset(), file.getLength());
file.close();
mediaPlayer.setVolume(BEEP_VOLUME, BEEP_VOLUME);
mediaPlayer.prepare();
} catch (IOException e) {
mediaPlayer = null;
}
}
}
private static final long VIBRATE_DURATION = 200L;
private void playBeepSoundAndVibrate() {
if (playBeep && mediaPlayer != null) {
mediaPlayer.start();
}
if (vibrate) {
Vibrator vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE);
vibrator.vibrate(VIBRATE_DURATION);
}
}
/**
* When the beep has finished playing, rewind to queue up another one.
*/
private final OnCompletionListener beepListener = new OnCompletionListener() {
public void onCompletion(MediaPlayer mediaPlayer) {
mediaPlayer.seekTo(0);
}
};
}
|
[
"test@gmail.com"
] |
test@gmail.com
|
25b585ae1c4bccf2c2b7aca6f23585521d408413
|
05948ca1cd3c0d2bcd65056d691c4d1b2e795318
|
/classes2/com/xiaoenai/app/utils/d/k.java
|
8893a64e475d7d7175d5e4c5e9840ba13fdba5e5
|
[] |
no_license
|
waterwitness/xiaoenai
|
356a1163f422c882cabe57c0cd3427e0600ff136
|
d24c4d457d6ea9281a8a789bc3a29905b06002c6
|
refs/heads/master
| 2021-01-10T22:14:17.059983
| 2016-10-08T08:39:11
| 2016-10-08T08:39:11
| 70,317,042
| 0
| 8
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,000
|
java
|
package com.xiaoenai.app.utils.d;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public final class k
{
public static void a(Closeable paramCloseable)
{
if (paramCloseable != null) {}
try
{
paramCloseable.close();
return;
}
catch (Exception paramCloseable) {}
}
public static void a(InputStream paramInputStream)
{
byte[] arrayOfByte = new byte[32768];
try
{
int i;
do
{
i = paramInputStream.read(arrayOfByte, 0, 32768);
} while (i != -1);
a(paramInputStream);
return;
}
catch (IOException localIOException)
{
localIOException = localIOException;
a(paramInputStream);
return;
}
finally
{
localObject = finally;
a(paramInputStream);
throw ((Throwable)localObject);
}
}
private static boolean a(a parama, int paramInt1, int paramInt2)
{
return (parama != null) && (!parama.a(paramInt1, paramInt2)) && (paramInt1 * 100 / paramInt2 < 75);
}
public static boolean a(InputStream paramInputStream, OutputStream paramOutputStream, a parama, int paramInt)
{
int j = paramInputStream.available();
int i = j;
if (j <= 0) {
i = 512000;
}
byte[] arrayOfByte = new byte[paramInt];
if (a(parama, 0, i)) {
return false;
}
j = 0;
int k;
do
{
k = paramInputStream.read(arrayOfByte, 0, paramInt);
if (k == -1) {
break;
}
paramOutputStream.write(arrayOfByte, 0, k);
k = j + k;
j = k;
} while (!a(parama, k, i));
return false;
paramOutputStream.flush();
return true;
}
public static abstract interface a
{
public abstract boolean a(int paramInt1, int paramInt2);
}
}
/* Location: E:\apk\xiaoenai2\classes2-dex2jar.jar!\com\xiaoenai\app\utils\d\k.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
b8cce07ccfcb263ddf83453589d4d486278f5ec9
|
49d713097713ed8b191d3ec4d374c0d089996943
|
/OpenCalaisAnnotatorGroovy/src/main/java/org/apache/uima/calaisType/Instance_Type.java
|
d724642abf94682d9bf0e60f3b394f1ce08723d7
|
[
"Apache-2.0"
] |
permissive
|
kidaak/uima-sandbox
|
695a4a1ff2806f6c97ebf7c2f5bb678b00a6ee08
|
f9946d882cbf0a03d230f557f753aaa86d8ec70f
|
refs/heads/trunk
| 2021-01-22T01:33:47.034241
| 2014-10-27T19:13:52
| 2014-10-27T19:13:52
| 47,804,927
| 0
| 0
| null | 2015-12-11T04:22:23
| 2015-12-11T04:22:22
| null |
UTF-8
|
Java
| false
| false
| 1,743
|
java
|
/* First created by JCasGen Mon May 26 21:43:18 EDT 2008 */
package org.apache.uima.calaisType;
import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.FSGenerator;
import org.apache.uima.cas.FeatureStructure;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.Type;
import org.apache.uima.jcas.tcas.Annotation_Type;
/**
* Updated by JCasGen Mon May 26 21:43:18 EDT 2008
* @generated */
public class Instance_Type extends Annotation_Type {
/** @generated */
protected FSGenerator getFSGenerator() {return fsGenerator;}
/** @generated */
private final FSGenerator fsGenerator =
new FSGenerator() {
public FeatureStructure createFS(int addr, CASImpl cas) {
if (Instance_Type.this.useExistingInstance) {
// Return eq fs instance if already created
FeatureStructure fs = Instance_Type.this.jcas.getJfsFromCaddr(addr);
if (null == fs) {
fs = new Instance(addr, Instance_Type.this);
Instance_Type.this.jcas.putJfsFromCaddr(addr, fs);
return fs;
}
return fs;
} else return new Instance(addr, Instance_Type.this);
}
};
/** @generated */
public final static int typeIndexID = Instance.typeIndexID;
/** @generated
@modifiable */
public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.calaisType.Instance");
/** initialize variables to correspond with Cas Type and Features
* @generated */
public Instance_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
}
}
|
[
"schor@apache.org"
] |
schor@apache.org
|
fb4c9ba213ed4a2af070a32e303d53bb2ba69d43
|
d17997fea98e49a05132b7c37e276297a0fec411
|
/JavaOOPAdvance/src/InterfacesAndAbstraction_Exercises/MilitaryElite_08/models/Commando.java
|
9d8534ead46fc856f7524f8a6fe96551de95a6c6
|
[] |
no_license
|
Invincible9/JavaCore
|
cb99186da3ad59dd4c7ecd623c4e3700a6cb5897
|
4e005ac85ccde3038f57efbe592494d0b0afbf90
|
refs/heads/master
| 2021-01-20T02:08:53.404216
| 2019-04-18T12:39:01
| 2019-04-18T12:39:01
| 89,379,476
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,725
|
java
|
package InterfacesAndAbstraction_Exercises.MilitaryElite_08.models;
import InterfacesAndAbstraction_Exercises.MilitaryElite_08.abstraction.SpecialisedSolder;
import InterfacesAndAbstraction_Exercises.MilitaryElite_08.interfaces.Commando_Interface;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
/**
* Created by Mihail on 3/18/2017.
*/
public class Commando extends SpecialisedSolder implements Commando_Interface {
private Set<Missions> missionsSet;
public Commando(int id, String firstName, String lastName, Double salary, String corps) {
super(id, firstName, lastName, salary, corps);
this.missionsSet = new HashSet<>();
}
@Override
public void addMission(Missions missions){
if(this.missionsSet == null){
throw new IllegalArgumentException("Invalid mission");
}
this.missionsSet.add(missions);
}
public void setMissionsSet(Set<Missions> missionsSet) {
this.missionsSet = missionsSet;
}
@Override
public Set<Missions> getMissionsSet() {
return Collections.unmodifiableSet(this.missionsSet);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(String.format(" Name: %s %s Id: %d Salary: %.2f\n", super.getFirstName(), super.getLastName(),
super.getId(), super.getSalary()));
sb.append(String.format("Corps: %s\n", super.getCorps()));
sb.append("Missions:\n");
for (Missions missions : missionsSet) {
sb.append(String.format(" Name: %s State: %s\n", missions.getCodeName(), missions.getState()));
}
return sb.toString().trim();
}
}
|
[
"Invulnerable89@abv.bg"
] |
Invulnerable89@abv.bg
|
2c4baa4278808475903d5631538cf3245c28b076
|
6f5c2984e6eb73dc81c30cb34961fca1d2413c82
|
/chap11/src/chap11/CalendarEx1.java
|
64adb79db393cab80709845363360b2b5ab536af
|
[] |
no_license
|
Shin-JungYeon/Java
|
624a4484ed31887ab9b56b6c3b77acb469410b1c
|
f98e35b9a74f3c355756e611523e675b17ac6e34
|
refs/heads/master
| 2020-07-21T07:59:27.801439
| 2019-09-06T12:29:24
| 2019-09-06T12:29:24
| 206,786,917
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 1,655
|
java
|
package chap11;
import java.util.Calendar;
/*
* Calendar 클래스 : 추상클래스임. getInstance() 클래스 메서드를 이용하여 객체 생성함. -> 생성자가 private(동일 클래스 내에서만 접근 가능)임.
*
*/
public class CalendarEx1 {
public static void main(String[] args) {
Calendar today = Calendar.getInstance();
System.out.println("년도 : " + today.get(Calendar.YEAR));
System.out.println("월 : " + (today.get(Calendar.MONTH)+1)); //today.get(Calendar.MONTH) : 0(1월) ~ 11(12월)
System.out.println("일 : " + today.get(Calendar.DATE));
System.out.println("일 : " + today.get(Calendar.DAY_OF_MONTH));
System.out.println("년도기준 몇째주 : " + today.get(Calendar.WEEK_OF_YEAR));
System.out.println("월기준 몇째주 : " + today.get(Calendar.WEEK_OF_MONTH));
System.out.println("년기준 일자 : " + today.get(Calendar.DAY_OF_YEAR));
System.out.println("요일 : " + today.get(Calendar.DAY_OF_WEEK)); //1:일, 2:월, ..., 7:토
System.out.println("월기준 몇번째요일 : " + today.get(Calendar.DAY_OF_WEEK_IN_MONTH));
System.out.println("오전(0)오후(1) : " + today.get(Calendar.AM_PM));
System.out.println("시간(0~11) : " + today.get(Calendar.HOUR)); //12시가 되면 오후 0시로 표시.
System.out.println("시간(0~23) : " + today.get(Calendar.HOUR_OF_DAY));
System.out.println("분 : " + today.get(Calendar.MINUTE));
System.out.println("초 : " + today.get(Calendar.SECOND));
System.out.println("밀리초 : " + today.get(Calendar.MILLISECOND));
System.out.println("이달의 마지막날 : " + today.getActualMaximum(Calendar.DATE));
}
}
|
[
"ssjy11@gmail.com"
] |
ssjy11@gmail.com
|
ac5ecbcbaa80cb48a367324ccbcf0a64e4ee58bf
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_64d27d08c7e26235c5d67ad113efe5b768ee339f/SelfMadeRegion/2_64d27d08c7e26235c5d67ad113efe5b768ee339f_SelfMadeRegion_t.java
|
fa08bfbe1c26008be9eeefc99e3516dd3f8f4b33
|
[] |
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,346
|
java
|
package de.whichdesign.selfmaderegion;
import java.util.List;
import java.util.Map;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import de.whichdesign.selfmaderegion.commands.Plot;
import de.whichdesign.selfmaderegion.listeners.PlayerInteractEvent;
/**
*
* @author Blockhaus2000
*
*/
public class SelfMadeRegion extends JavaPlugin {
private Plugin plugin;
public SelfMadeRegion() {
this.plugin = this;
}
public void onEnable() {
// Commands
getCommand("plot").setExecutor(new Plot(this));
// Events
getServer().getPluginManager().registerEvents(new PlayerInteractEvent(plugin), plugin);
// Other
loadConfig();
System.out.println("[SelfMadeRegion] by " + Configuration.author);
}
public void onDisable() {
List<String> paths = Configuration.allPaths;
Map<String, Integer> regions = Configuration.regions;
FileConfiguration config = plugin.getConfig();
for (String path : paths) {
config.set(path.replace("|", "."), regions.get(path));
}
config.options().copyDefaults(true);
plugin.saveConfig();
}
private void loadConfig() {
getConfig().addDefault("general.wand", 280);
getConfig().options().copyDefaults(true);
saveConfig();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
3170061a4b4c4496cf9c3123a9c3f601e03253ac
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/module1768_public/tests/more/src/java/module1768_public_tests_more/a/Foo2.java
|
cd40f869a57ae70d43b0a521d633a62b0f1f4fc6
|
[
"BSD-3-Clause"
] |
permissive
|
salesforce/bazel-ls-demo-project
|
5cc6ef749d65d6626080f3a94239b6a509ef145a
|
948ed278f87338edd7e40af68b8690ae4f73ebf0
|
refs/heads/master
| 2023-06-24T08:06:06.084651
| 2023-03-14T11:54:29
| 2023-03-14T11:54:29
| 241,489,944
| 0
| 5
|
BSD-3-Clause
| 2023-03-27T11:28:14
| 2020-02-18T23:30:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,692
|
java
|
package module1768_public_tests_more.a;
import javax.net.ssl.*;
import javax.rmi.ssl.*;
import java.awt.datatransfer.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.management.Attribute
* @see javax.naming.directory.DirContext
* @see javax.net.ssl.ExtendedSSLSession
*/
@SuppressWarnings("all")
public abstract class Foo2<K> extends module1768_public_tests_more.a.Foo0<K> implements module1768_public_tests_more.a.IFoo2<K> {
javax.rmi.ssl.SslRMIClientSocketFactory f0 = null;
java.awt.datatransfer.DataFlavor f1 = null;
java.beans.beancontext.BeanContext f2 = null;
public K element;
public static Foo2 instance;
public static Foo2 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module1768_public_tests_more.a.Foo0.create(input);
}
public String getName() {
return module1768_public_tests_more.a.Foo0.getInstance().getName();
}
public void setName(String string) {
module1768_public_tests_more.a.Foo0.getInstance().setName(getName());
return;
}
public K get() {
return (K)module1768_public_tests_more.a.Foo0.getInstance().get();
}
public void set(Object element) {
this.element = (K)element;
module1768_public_tests_more.a.Foo0.getInstance().set(this.element);
}
public K call() throws Exception {
return (K)module1768_public_tests_more.a.Foo0.getInstance().call();
}
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
c470464b23e5c88107dc8049b9023b0d7d5b6e23
|
92e78ce6614e9c863d4cc9ccf42a72a4807bd7e9
|
/src/main/java/org/webguitoolkit/patterns/views/table/SimpleView.java
|
8c91be59b35f3eec0bd7f340762c1f1e6e78cdcb
|
[] |
no_license
|
webguitoolkit/wgt-demo
|
c620779366f6ae0b8b5e83c8c06be1af0fdc218b
|
169006b5594a0958f188b3b8c4e3f491fb871861
|
refs/heads/master
| 2020-04-15T16:12:20.038839
| 2012-09-19T13:57:32
| 2012-09-19T13:57:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,305
|
java
|
package org.webguitoolkit.patterns.views.table;
import java.util.ArrayList;
import java.util.List;
import org.webguitoolkit.patterns.views.SourceView;
import org.webguitoolkit.ui.base.DataBag;
import org.webguitoolkit.ui.base.IDataBag;
import org.webguitoolkit.ui.base.WebGuiFactory;
import org.webguitoolkit.ui.controls.AbstractView;
import org.webguitoolkit.ui.controls.container.ICanvas;
import org.webguitoolkit.ui.controls.layout.ITableLayout;
import org.webguitoolkit.ui.controls.table.AbstractTableListener;
import org.webguitoolkit.ui.controls.table.ISimpleTable;
import org.webguitoolkit.ui.controls.table.ITable;
import org.webguitoolkit.ui.controls.table.ITableColumn;
import org.webguitoolkit.ui.controls.table.SimpleTable;
/**
* Very simple sample table
*/
public class SimpleView extends AbstractView {
public SimpleView(WebGuiFactory factory, ICanvas viewConnector) {
super(factory, viewConnector);
}
@Override
protected void createControls( WebGuiFactory factory, ICanvas viewConnector ) {
// button to show the source code of this class
factory.createButton( viewConnector, "./images/iconText.gif", "Source Code","Source Code", new SourceView( factory, viewConnector, this.getClass().getName() ) );
ITableLayout layout = factory.createTableLayout(viewConnector);
ISimpleTable table = factory.createSimpleTable(layout, "Simple Table Sample");
table.setFixedViewPort(true);
table.setViewPortWidth("400px;");
table.setViewPortHeight("250px;");
table.setListener(new TableListener());
ITableColumn col = factory.createTableColumn(table, "Type", "type", true);
col.setWidth("50px");
col = factory.createTableColumn(table, "Name", "name", true);
col.setWidth("200px");
col = factory.createTableColumn(table, "Description", "description", true);
col.setWidth("500px");
// Fill with data
List<IDataBag> data = new ArrayList<IDataBag>();
for (int i = 0; i < 100; i++) {
IDataBag bag = new DataBag(null);
bag.addProperty("type", "type " + i);
bag.addProperty("name", "name " + i);
bag.addProperty("description", "description " + i);
data.add(bag);
}
table.getDefaultModel().setTableData(data);
// send data to the front end
table.reload();
layout.newRow();
factory.createLabel(layout, "Table with no fixed Viewport");
layout.newRow();
ISimpleTable simpletable = factory.createSimpleTable(layout, "Simple Table Sample");
simpletable.setListener(new TableListener());
col = factory.createTableColumn(simpletable, "Type", "type", true);
col.setWidth("50px");
col = factory.createTableColumn(simpletable, "Name", "name", true);
col.setWidth("200px");
col = factory.createTableColumn(simpletable, "Description", "description", true);
col.setWidth("500px");
simpletable.getDefaultModel().setTableData(data);
// send data to the front end
simpletable.reload();
}
/**
* Handles table related events
*/
class TableListener extends AbstractTableListener {
@Override
public void onRowSelection(ITable table, int row) {
// get row representing DataBag
IDataBag bag = table.getRow(row);
// send info
table.getPage().sendInfo( "Clicked: " + bag.getString("name") );
}
}
}
|
[
"peter@17sprints.de"
] |
peter@17sprints.de
|
7478a1933d3265340c86027b31b31cb03dae3ff7
|
394d272afc49961c74a496e3bf3378cd563e6df8
|
/sources/com/google/android/gms/internal/zzbah.java
|
d4c12ea8ed728e37ccddbe932743ddf38ed05d6a
|
[] |
no_license
|
agarwalamogh/lpu_marks_calculator
|
00540d8933191af176532a442f05bba5e0560c7a
|
d1257bb17eebac517e9f04172e3bbf6c920b27cb
|
refs/heads/master
| 2020-11-24T06:18:01.856783
| 2020-01-10T06:20:34
| 2020-01-10T06:20:34
| 228,004,291
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,140
|
java
|
package com.google.android.gms.internal;
import android.content.Context;
import android.os.Bundle;
import android.os.Looper;
import com.google.android.gms.common.Scopes;
import com.google.android.gms.common.api.Api;
import com.google.android.gms.common.api.Api.ApiOptions.HasOptions;
import com.google.android.gms.common.api.Api.zzf;
import com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks;
import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener;
import com.google.android.gms.common.api.Scope;
import com.google.android.gms.common.internal.zzg;
public final class zzbah {
public static final Api<zzbaj> API = new Api<>("SignIn.API", zzaie, zzaid);
public static final Api<zza> zzaKN = new Api<>("SignIn.INTERNAL_API", zzbEg, zzbEf);
public static final zzf<zzbat> zzaid = new zzf<>();
public static final com.google.android.gms.common.api.Api.zza<zzbat, zzbaj> zzaie = new com.google.android.gms.common.api.Api.zza<zzbat, zzbaj>() {
public zzbat zza(Context context, Looper looper, zzg zzg, zzbaj zzbaj, ConnectionCallbacks connectionCallbacks, OnConnectionFailedListener onConnectionFailedListener) {
return new zzbat(context, looper, true, zzg, zzbaj == null ? zzbaj.zzbEi : zzbaj, connectionCallbacks, onConnectionFailedListener);
}
};
public static final Scope zzakh = new Scope(Scopes.PROFILE);
public static final Scope zzaki = new Scope("email");
public static final zzf<zzbat> zzbEf = new zzf<>();
static final com.google.android.gms.common.api.Api.zza<zzbat, zza> zzbEg = new com.google.android.gms.common.api.Api.zza<zzbat, zza>() {
public zzbat zza(Context context, Looper looper, zzg zzg, zza zza, ConnectionCallbacks connectionCallbacks, OnConnectionFailedListener onConnectionFailedListener) {
return new zzbat(context, looper, false, zzg, zza.zzPI(), connectionCallbacks, onConnectionFailedListener);
}
};
public static class zza implements HasOptions {
private final Bundle zzbEh;
public Bundle zzPI() {
return this.zzbEh;
}
}
}
|
[
"41386116+agarwalamogh@users.noreply.github.com"
] |
41386116+agarwalamogh@users.noreply.github.com
|
1abbc11077bb96220f12cb8119d24d646f8bd60b
|
31bd68a7b63543e75766ee9815a3f24653ad1b35
|
/JavaRushTasks/2.JavaCore/src/com/javarush/task/task14/task1416/Solution.java
|
916e460449a28c7dd83335641ad9f42278a42509
|
[] |
no_license
|
vpshulga/JavaRush
|
d60a889682de742ae3e0015bea6a5f3107dcc17d
|
d2e920a46fb6c9fd9ee2e1b3eccc41b7b4d53b5f
|
refs/heads/master
| 2021-04-26T22:54:30.725661
| 2018-06-14T10:36:25
| 2018-06-14T10:36:25
| 123,873,066
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,390
|
java
|
package com.javarush.task.task14.task1416;
/*
Исправление ошибок
*/
public class Solution {
public static void main(String[] args) {
Swimmable animal = new Orca();
animal.swim();
animal = new Whale();
animal.swim();
animal = new Otter();
animal.swim();
}
public static void test(Swimmable animal) {
animal.swim();
}
interface Walkable {
void walk();
}
interface Swimmable {
void swim();
}
static abstract class OceanAnimal implements Swimmable{
public void swim() {
OceanAnimal currentAnimal = (OceanAnimal) getCurrentAnimal();
currentAnimal.swimming();
}
private void swimming() {
System.out.println(getCurrentAnimal().getClass().getSimpleName() + " is swimming");
}
abstract Swimmable getCurrentAnimal();
}
static class Orca extends OceanAnimal {
@Override
Swimmable getCurrentAnimal() {
return this;
}
}
static class Whale extends OceanAnimal{
@Override
Swimmable getCurrentAnimal() {
return this;
}
}
static class Otter implements Swimmable, Walkable{
@Override
public void walk() {
}
@Override
public void swim() {
}
}
}
|
[
"vpshulgaa@gmail.com"
] |
vpshulgaa@gmail.com
|
7e6a6d2babfcff2e869b39317a04f3de2defb1a0
|
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
|
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam_new2/Nicad_t1_beam_new2310.java
|
76f8573476abb93aa6b56180aceca9038c26d257
|
[] |
no_license
|
ryosuke-ku/TestCodeSeacherPlus
|
cfd03a2858b67a05ecf17194213b7c02c5f2caff
|
d002a52251f5461598c7af73925b85a05cea85c6
|
refs/heads/master
| 2020-05-24T01:25:27.000821
| 2019-08-17T06:23:42
| 2019-08-17T06:23:42
| 187,005,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 585
|
java
|
// clone pairs:2547:70%
// 2631:beam/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/Top.java
public class Nicad_t1_beam_new2310
{
public boolean equals(Object other) {
if (other == this) {
return true;
}
if (!(other instanceof BoundedHeapCoder)) {
return false;
}
BoundedHeapCoder<?, ?> that = (BoundedHeapCoder<?, ?>) other;
return Objects.equals(this.compareFn, that.compareFn)
&& Objects.equals(this.listCoder, that.listCoder)
&& this.maximumSize == that.maximumSize;
}
}
|
[
"naist1020@gmail.com"
] |
naist1020@gmail.com
|
aba2083fbf69c58a29fa597bb058ec09a4f48986
|
377e5e05fb9c6c8ed90ad9980565c00605f2542b
|
/bin/ext-integration/sap/availability/sapproductavailability/src/de/hybris/platform/sap/sapproductavailability/businessobject/SapProductAvailability.java
|
ab94bd377ce5cd93a03b4145dd3cd065296b4f36
|
[] |
no_license
|
automaticinfotech/HybrisProject
|
c22b13db7863e1e80ccc29774f43e5c32e41e519
|
fc12e2890c569e45b97974d2f20a8cbe92b6d97f
|
refs/heads/master
| 2021-07-20T18:41:04.727081
| 2017-10-30T13:24:11
| 2017-10-30T13:24:11
| 108,957,448
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 640
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 SAP SE or an SAP affiliate company.
* All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.sap.sapproductavailability.businessobject;
import java.util.Date;
import java.util.Map;
public interface SapProductAvailability
{
Long getCurrentStockLevel();
Map<String, Map<Date, Long>> getFutureAvailability();
}
|
[
"santosh.kshirsagar@automaticinfotech.com"
] |
santosh.kshirsagar@automaticinfotech.com
|
bb98ef11840979a3d1b95d6adee69f9466a3f244
|
72c9b3b7deb4af01602fe4f276fbe73e0328c59e
|
/yunkuo-cms/src/main/java/com/yunkuo/cms/controller/site/directive/abs/AbstractChannelDirective.java
|
4a470c40d2cdccc7576c2f5182dc1a010112d9af
|
[] |
no_license
|
kevonz/yunkuocms-2013
|
1adffa85ca25315c97d140849d5c231ea9c87344
|
4da3ab529da28450fac05cc5f05bb3fc91818578
|
refs/heads/master
| 2021-01-19T21:47:21.442812
| 2013-11-28T13:46:29
| 2013-11-28T13:46:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,384
|
java
|
package com.yunkuo.cms.controller.site.directive.abs;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import com.yunkuo.cms.manager.main.ChannelMng;
import com.yunkuo.common.web.freemarker.DirectiveUtils;
import freemarker.template.TemplateDirectiveModel;
import freemarker.template.TemplateException;
import freemarker.template.TemplateModel;
/**
* 内容标签基类
*
*
*/
public abstract class AbstractChannelDirective implements
TemplateDirectiveModel {
/**
* 输入参数,父栏目ID。存在时,获取该栏目的子栏目,不存在时获取顶级栏目。
*/
public static final String PARAM_PARENT_ID = "parentId";
/**
* 输入参数,站点ID。存在时,获取该站点顶级栏目,不存在时获取当前站点顶级栏目。(仅在parentId不存在时起作用)
*/
public static final String PARAM_SITE_ID = "siteId";
/**
* 输入参数,是否有内容。默认所有,否则只获取有内容的栏目。
*/
public static final String PARAM_HAS_CONTENT = "hasContent";
protected boolean getHasContentOnly(Map<String, TemplateModel> params)
throws TemplateException {
Boolean hasContent = DirectiveUtils.getBool(PARAM_HAS_CONTENT, params);
return hasContent != null && hasContent;
}
@Autowired
protected ChannelMng channelMng;
}
|
[
"kevonz@live.com"
] |
kevonz@live.com
|
0b9226d24043b72ada411d09e9f038ad3ac7f3cb
|
35632ad905d8f7057fafd811613e0f2383305e3c
|
/subgrade-sdk/src/main/java/com/dwarfeng/subgrade/sdk/interceptor/AdvisorUtil.java
|
525486b777c3e2e236b5cc5907568c056b5a1fec
|
[
"Apache-2.0"
] |
permissive
|
DwArFeng/subgrade
|
82a1589863676598701525e4deb80b5ae014e0cb
|
b41da26629b1d3b46e549784cc4786a4a2ca03ea
|
refs/heads/master
| 2023-08-22T17:51:16.659855
| 2023-08-07T05:20:05
| 2023-08-07T06:44:49
| 235,097,227
| 2
| 0
|
Apache-2.0
| 2023-09-01T16:00:49
| 2020-01-20T12:32:41
|
Java
|
UTF-8
|
Java
| false
| false
| 7,090
|
java
|
package com.dwarfeng.subgrade.sdk.interceptor;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.reflect.MethodSignature;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
/**
* 增强工具类。
*
* @author DwArFeng
* @since 1.2.0
*/
public final class AdvisorUtil {
/**
* 获取 ProceedingJoinPoint 的方法签名。
*
* @param pjp ProceedingJoinPoint。
* @return ProceedingJoinPoint 的方法签名。
*/
public static MethodSignature methodSignature(ProceedingJoinPoint pjp) {
return (MethodSignature) pjp.getSignature();
}
/**
* 获取 ProceedingJoinPoint 的直接类。
*
* <p> 获取被代理的对象的直接类,而不是父接口/父类。
*
* @param pjp ProceedingJoinPoint。
* @return ProceedingJoinPoint 的直接类。
*/
public static Class<?> directClass(ProceedingJoinPoint pjp) {
return pjp.getTarget().getClass();
}
/**
* 获取 ProceedingJoinPoint 的直接方法。
*
* <p> 获取被代理的对象的直接类的方法,而不是父接口/父类的方法。
*
* @param pjp ProceedingJoinPoint。
* @return ProceedingJoinPoint 的直接方法。
*/
public static Method directMethod(ProceedingJoinPoint pjp) {
MethodSignature methodSignature = methodSignature(pjp);
// 获取拦截方法的名称。
String methodName = methodSignature.getName();
// 获取拦截方法的类型。
Class<?>[] parameterTypes = methodSignature.getMethod().getParameterTypes();
Method method = null;
try {
// 通过反射获得拦截的method
method = directClass(pjp).getMethod(methodName, parameterTypes);
} catch (NoSuchMethodException ignored) {
// 可以保证方法一定存在。
}
assert method != null;
return method;
}
/**
* 获取 ProceedingJoinPoint 的直接类的注解。
*
* <p> 获取被代理的对象的直接类的注解,而不是父接口/父类的注解。
*
* @param pjp ProceedingJoinPoint。
* @param annotationClass 注解的类。
* @param <T> 注解类的泛型。
* @return ProceedingJoinPoint 的直接类的注解。
*/
public static <T extends Annotation> T directClassAnnotation(
ProceedingJoinPoint pjp, Class<T> annotationClass) {
return pjp.getTarget().getClass().getAnnotation(annotationClass);
}
/**
* 获取 ProceedingJoinPoint 的直接类的注解。
*
* <p> 获取被代理的对象的直接类的注解,而不是父接口/父类的注解。
*
* @param pjp ProceedingJoinPoint。
* @param annotationClass 注解的类。
* @param <T> 注解类的泛型。
* @return ProceedingJoinPoint 的直接类的注解组成的数组。
*/
public static <T extends Annotation> T[] directClassAnnotations(
ProceedingJoinPoint pjp, Class<T> annotationClass) {
return pjp.getTarget().getClass().getAnnotationsByType(annotationClass);
}
/**
* 获取 ProceedingJoinPoint 的直接方法的注解。
*
* <p> 获取被代理的对象的直接方法的注解,而不是父接口/父类方法的注解。
*
* @param pjp ProceedingJoinPoint。
* @param annotationClass 注解的类。
* @param <T> 注解类的泛型。
* @return ProceedingJoinPoint 的直接方法的注解。
*/
public static <T extends Annotation> T directMethodAnnotation(
ProceedingJoinPoint pjp, Class<T> annotationClass) {
return directMethod(pjp).getAnnotation(annotationClass);
}
/**
* 获取 ProceedingJoinPoint 的直接方法的注解。
*
* <p> 获取被代理的对象的直接方法的注解,而不是父接口/父类方法的注解。
*
* @param pjp ProceedingJoinPoint。
* @param annotationClass 注解的类。
* @param <T> 注解类的泛型。
* @return ProceedingJoinPoint 的直接方法的注解组成的数组。
*/
public static <T extends Annotation> T[] directMethodAnnotations(
ProceedingJoinPoint pjp, Class<T> annotationClass) {
return directMethod(pjp).getAnnotationsByType(annotationClass);
}
/**
* 获取 ProceedingJoinPoint 的直接方法上参数的注解。
*
* <p> 获取被代理的对象的直接方法上参数的注解,而不是父接口/父类方法上参数的注解。
*
* @param pjp ProceedingJoinPoint。
* @param annotationClass 注解的类。
* @param <T> 注解类的泛型。
* @return ProceedingJoinPoint 的直接方法上参数的注解。
*/
@SuppressWarnings("unchecked")
public static <T extends Annotation> T[] directParameterAnnotation(
ProceedingJoinPoint pjp, Class<T> annotationClass) {
Method method = directMethod(pjp);
T[] array = (T[]) java.lang.reflect.Array.newInstance(annotationClass, method.getParameterCount());
for (int i = 0; i < method.getParameters().length; i++) {
array[i] = method.getParameters()[i].getAnnotation(annotationClass);
}
return array;
}
/**
* 获取 ProceedingJoinPoint 的直接方法上参数的注解。
*
* <p> 获取被代理的对象的直接方法上参数的注解,而不是父接口/父类方法上参数的注解。
*
* @param pjp ProceedingJoinPoint。
* @param annotationClass 注解的类。
* @param <T> 注解类的泛型。
* @return ProceedingJoinPoint 的直接方法上参数的注解组成的数组。
*/
@SuppressWarnings("unchecked")
public static <T extends Annotation> T[][] directParameterAnnotations(
ProceedingJoinPoint pjp, Class<T> annotationClass) {
Class<?> annotationArrayClass = java.lang.reflect.Array.newInstance(annotationClass, 0).getClass();
Method method = directMethod(pjp);
T[][] array = (T[][]) java.lang.reflect.Array.newInstance(annotationArrayClass, method.getParameterCount());
for (int i = 0; i < method.getParameters().length; i++) {
array[i] = method.getParameters()[i].getAnnotationsByType(annotationClass);
}
return array;
}
/**
* 获取 ProceedingJoinPoint 的直接方法的参数。
*
* <p> 获取被代理的对象的直接方法的参数,而不是父接口/父类方法的参数。
*
* @param pjp ProceedingJoinPoint。
* @return ProceedingJoinPoint 的直接方法的参数。
*/
public static Parameter[] directParameters(ProceedingJoinPoint pjp) {
return directMethod(pjp).getParameters();
}
private AdvisorUtil() {
throw new IllegalStateException("禁止外部实例化");
}
}
|
[
"915724865@qq.com"
] |
915724865@qq.com
|
86a61add6b3caa139a6037f124e11f7e4859839f
|
125af5bae85eba5fa8368c4111cc26f3e43ab6c8
|
/app/src/main/java/com/fubang/lihaovv/entities/ListsEntity.java
|
293db9e921275e883e850193f21eb2361459e773
|
[] |
no_license
|
jackycaojiaqi/LihaoVV
|
a3779e45f71f84e2c82b193fd4fa3e7d63ea426d
|
ea819f460f5202ac0a6f89bc09cbcf62cff9c973
|
refs/heads/master
| 2021-01-23T11:33:27.609769
| 2017-07-10T08:49:45
| 2017-07-10T08:49:45
| 93,148,307
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,398
|
java
|
package com.fubang.lihaovv.entities;
/**
* Created by dell on 2016/4/5.
*/
public class ListsEntity {
private String id;
private String uid;
private String nickname;
private String gender;
private String avatar;
private String code;
private String domain;
private String url;
private String title;
private String gameId;
private String spic;
private String bpic;
private String online;
private String status;
private String level;
private String liveTime;
private String hotsLevel;
private String videoId;
private String gameName;
private String gameUrl;
private String gameIcon;
private int follows;
private int highlight;
private int guddesslight;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getDomain() {
return domain;
}
public void setDomain(String domain) {
this.domain = domain;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getGameId() {
return gameId;
}
public void setGameId(String gameId) {
this.gameId = gameId;
}
public String getSpic() {
return spic;
}
public void setSpic(String spic) {
this.spic = spic;
}
public String getBpic() {
return bpic;
}
public void setBpic(String bpic) {
this.bpic = bpic;
}
public String getOnline() {
return online;
}
public void setOnline(String online) {
this.online = online;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getLevel() {
return level;
}
public void setLevel(String level) {
this.level = level;
}
public String getLiveTime() {
return liveTime;
}
public void setLiveTime(String liveTime) {
this.liveTime = liveTime;
}
public String getHotsLevel() {
return hotsLevel;
}
public void setHotsLevel(String hotsLevel) {
this.hotsLevel = hotsLevel;
}
public String getVideoId() {
return videoId;
}
public void setVideoId(String videoId) {
this.videoId = videoId;
}
public String getGameName() {
return gameName;
}
public void setGameName(String gameName) {
this.gameName = gameName;
}
public String getGameUrl() {
return gameUrl;
}
public void setGameUrl(String gameUrl) {
this.gameUrl = gameUrl;
}
public String getGameIcon() {
return gameIcon;
}
public void setGameIcon(String gameIcon) {
this.gameIcon = gameIcon;
}
public int getFollows() {
return follows;
}
public void setFollows(int follows) {
this.follows = follows;
}
public int getHighlight() {
return highlight;
}
public void setHighlight(int highlight) {
this.highlight = highlight;
}
public int getGuddesslight() {
return guddesslight;
}
public void setGuddesslight(int guddesslight) {
this.guddesslight = guddesslight;
}
}
|
[
"353938360@qq.com"
] |
353938360@qq.com
|
86936941b7ada43e893b7f94eb4a8ca99490d6a9
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/com/facebook/share/internal/LikeBoxCountView.java
|
aa52287434ffedf3d5918328231ba86d19c7aad1
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,492
|
java
|
package com.facebook.share.internal;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
import android.widget.FrameLayout;
import android.widget.TextView;
import com.facebook.common.R;
@Deprecated
public class LikeBoxCountView extends FrameLayout {
public TextView a;
public LikeBoxCountViewCaretPosition b = LikeBoxCountViewCaretPosition.LEFT;
public float c;
public float d;
public float e;
public Paint f;
public int g;
public int h;
public enum LikeBoxCountViewCaretPosition {
LEFT,
TOP,
RIGHT,
BOTTOM
}
@Deprecated
public LikeBoxCountView(Context context) {
super(context);
setWillNotDraw(false);
Resources resources = getResources();
int i = R.dimen.com_facebook_likeboxcountview_caret_height;
this.c = resources.getDimension(i);
this.d = getResources().getDimension(R.dimen.com_facebook_likeboxcountview_caret_width);
this.e = getResources().getDimension(R.dimen.com_facebook_likeboxcountview_border_radius);
Paint paint = new Paint();
this.f = paint;
paint.setColor(getResources().getColor(R.color.com_facebook_likeboxcountview_border_color));
this.f.setStrokeWidth(getResources().getDimension(R.dimen.com_facebook_likeboxcountview_border_width));
this.f.setStyle(Paint.Style.STROKE);
this.a = new TextView(context);
this.a.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
this.a.setGravity(17);
this.a.setTextSize(0, getResources().getDimension(R.dimen.com_facebook_likeboxcountview_text_size));
this.a.setTextColor(getResources().getColor(R.color.com_facebook_likeboxcountview_text_color));
this.g = getResources().getDimensionPixelSize(R.dimen.com_facebook_likeboxcountview_text_padding);
this.h = getResources().getDimensionPixelSize(i);
addView(this.a);
setCaretPosition(this.b);
}
public final void a(int i, int i2, int i3, int i4) {
TextView textView = this.a;
int i5 = this.g;
textView.setPadding(i + i5, i2 + i5, i3 + i5, i5 + i4);
}
@Override // android.view.View
public void onDraw(Canvas canvas) {
super.onDraw(canvas);
int paddingTop = getPaddingTop();
int paddingLeft = getPaddingLeft();
int width = getWidth() - getPaddingRight();
int height = getHeight() - getPaddingBottom();
int ordinal = this.b.ordinal();
if (ordinal == 0) {
paddingLeft = (int) (((float) paddingLeft) + this.c);
} else if (ordinal == 1) {
paddingTop = (int) (((float) paddingTop) + this.c);
} else if (ordinal == 2) {
width = (int) (((float) width) - this.c);
} else if (ordinal == 3) {
height = (int) (((float) height) - this.c);
}
float f2 = (float) paddingLeft;
float f3 = (float) paddingTop;
float f4 = (float) width;
float f5 = (float) height;
Path path = new Path();
float f6 = this.e * 2.0f;
float f7 = f2 + f6;
float f8 = f3 + f6;
path.addArc(new RectF(f2, f3, f7, f8), -180.0f, 90.0f);
if (this.b == LikeBoxCountViewCaretPosition.TOP) {
float f9 = f4 - f2;
path.lineTo(((f9 - this.d) / 2.0f) + f2, f3);
path.lineTo((f9 / 2.0f) + f2, f3 - this.c);
path.lineTo(((f9 + this.d) / 2.0f) + f2, f3);
}
path.lineTo(f4 - this.e, f3);
float f10 = f4 - f6;
path.addArc(new RectF(f10, f3, f4, f8), -90.0f, 90.0f);
if (this.b == LikeBoxCountViewCaretPosition.RIGHT) {
float f11 = f5 - f3;
path.lineTo(f4, ((f11 - this.d) / 2.0f) + f3);
path.lineTo(this.c + f4, (f11 / 2.0f) + f3);
path.lineTo(f4, ((f11 + this.d) / 2.0f) + f3);
}
path.lineTo(f4, f5 - this.e);
float f12 = f5 - f6;
path.addArc(new RectF(f10, f12, f4, f5), 0.0f, 90.0f);
if (this.b == LikeBoxCountViewCaretPosition.BOTTOM) {
float f13 = f4 - f2;
path.lineTo(((this.d + f13) / 2.0f) + f2, f5);
path.lineTo((f13 / 2.0f) + f2, this.c + f5);
path.lineTo(((f13 - this.d) / 2.0f) + f2, f5);
}
path.lineTo(this.e + f2, f5);
path.addArc(new RectF(f2, f12, f7, f5), 90.0f, 90.0f);
if (this.b == LikeBoxCountViewCaretPosition.LEFT) {
float f14 = f5 - f3;
path.lineTo(f2, ((this.d + f14) / 2.0f) + f3);
path.lineTo(f2 - this.c, (f14 / 2.0f) + f3);
path.lineTo(f2, ((f14 - this.d) / 2.0f) + f3);
}
path.lineTo(f2, f3 + this.e);
canvas.drawPath(path, this.f);
}
@Deprecated
public void setCaretPosition(LikeBoxCountViewCaretPosition likeBoxCountViewCaretPosition) {
this.b = likeBoxCountViewCaretPosition;
int ordinal = likeBoxCountViewCaretPosition.ordinal();
if (ordinal == 0) {
a(this.h, 0, 0, 0);
} else if (ordinal == 1) {
a(0, this.h, 0, 0);
} else if (ordinal == 2) {
a(0, 0, this.h, 0);
} else if (ordinal == 3) {
a(0, 0, 0, this.h);
}
}
@Deprecated
public void setText(String str) {
this.a.setText(str);
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
a96b44f2fa89c25b096cb21e3ec7f9867585292a
|
27d79138dfa98524df761b73bb3922cb435489a4
|
/MAIN/src/main/java/simplepets/brainsynder/api/entity/hostile/IEntityZombieVillagerPet.java
|
e9bf0e5863e0b7b5897f33b36281b654fad5c976
|
[] |
no_license
|
Hackerjef/SimplePets
|
d22ec3106b0156d59f2c050be26a358bf15c38ce
|
08b1c3d85d75ee1a557eb45be8ac4529b2b9e28d
|
refs/heads/master
| 2023-04-05T01:07:54.414919
| 2021-02-21T04:44:58
| 2021-02-21T04:44:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 196
|
java
|
package simplepets.brainsynder.api.entity.hostile;
import simplepets.brainsynder.api.entity.misc.IProfession;
public interface IEntityZombieVillagerPet extends IEntityZombiePet, IProfession {
}
|
[
"briansnyder498@gmail.com"
] |
briansnyder498@gmail.com
|
e301299e0172cf787b93ff58e22e68eb32b65e4a
|
58b9413658d9ebe9d54949010c02213298395ed1
|
/wade-rpc/src/main/java/com/ailk/rpc/org/jboss/netty/handler/codec/socks/UnknownSocksRequest.java
|
c372475ed423ec78e443fffeb45a6cc056e00f03
|
[] |
no_license
|
kkoo301/wade-root
|
d5fce9e5fe0b86ed4d0bbd9291b4f34bc7d2335a
|
067aee1d6ad2cb1fa8027adf821e1e733a971d4a
|
refs/heads/master
| 2020-04-26T08:30:41.191338
| 2018-05-08T02:32:34
| 2018-05-08T02:32:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,152
|
java
|
/*
* Copyright 2012 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.ailk.rpc.org.jboss.netty.handler.codec.socks;
import com.ailk.rpc.org.jboss.netty.buffer.ChannelBuffer;
/**
* An unknown socks request.
*
* @see {@link SocksInitRequestDecoder}
* @see {@link SocksAuthRequestDecoder}
* @see {@link SocksCmdRequestDecoder}
*/
public final class UnknownSocksRequest extends SocksRequest {
public UnknownSocksRequest() {
super(SocksRequestType.UNKNOWN);
}
@Override
public void encodeAsByteBuf(ChannelBuffer buffer) {
// NOOP
}
}
|
[
"21550566@qq.com"
] |
21550566@qq.com
|
7153dc9ebbc0a44caf015d3a6b51cdb713da60e9
|
f96fe513bfdf2d1dbd582305e1cbfda14a665bec
|
/net.sf.smbt.jazzmutant.diagram/src-custom/net/sf/smbt/jazzmutant/diagram/properties/knob/JZUIKnobFgColorSection.java
|
d4b6ae2d06c148c516163686eb8142472d15fdd0
|
[] |
no_license
|
lucascraft/ubq_wip
|
04fdb727e7b2dc384ba1d2195ad47e895068e1e4
|
eff577040f21be71ea2c76c187d574f1617703ce
|
refs/heads/master
| 2021-01-22T02:28:20.687330
| 2015-06-10T12:38:47
| 2015-06-10T12:38:47
| 37,206,324
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,932
|
java
|
/***********************************************************************************
* Ubiquisense - A smart ambient utilities framework
*
* Copyright (c) 2011, Lucas Bigeardel
*
* The library is released under:
*
* A) LGPL
*
* 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 3 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., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* B) EPL
*
* 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:
* Lucas Bigeardel <lucas.bigeardel@gmail.com> - Initial API and implementation
***********************************************************************************/
package net.sf.smbt.jazzmutant.diagram.properties.knob;
import net.sf.smbt.jazzmutant.diagram.properties.AbstractLemurColorPropertySection;
import net.sf.smbt.jzmui.JzmuiPackage;
import org.eclipse.emf.ecore.EStructuralFeature;
public class JZUIKnobFgColorSection extends AbstractLemurColorPropertySection {
@Override
protected EStructuralFeature getFeature() {
return JzmuiPackage.Literals.JZ_KNOB__FOREGROUND;
}
@Override
protected String getLabelText() {
return "Foreground";
}
}
|
[
"lucas.bigeardel@gmail.com"
] |
lucas.bigeardel@gmail.com
|
154ff26187e6474927fc33678bbbd00f992f2472
|
8a0284a1b6eedf9214ed7dad20f3e2e4c141c334
|
/src/bascula/controller/AgricultorJpaController.java
|
d95ae0684dca45ca358fbbb942288c242c251c47
|
[] |
no_license
|
CiroDeLeon/bascula
|
3f3ad6f9a5c8eefc0df1ecfef9df32ac1ec4a44b
|
b6e2e40b3877b8d4fedb8ffe402fb59fdba1c457
|
refs/heads/master
| 2021-01-22T10:18:27.392198
| 2017-02-15T00:47:03
| 2017-02-15T00:47:03
| 82,001,793
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,914
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package bascula.controller;
import bascula.controller.exceptions.NonexistentEntityException;
import bascula.controller.exceptions.PreexistingEntityException;
import bascula.entity.Agricultor;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Query;
import javax.persistence.EntityNotFoundException;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
/**
*
* @author Usuario1
*/
public class AgricultorJpaController implements Serializable {
public AgricultorJpaController(EntityManagerFactory emf) {
this.emf = emf;
}
private EntityManagerFactory emf = null;
public EntityManager getEntityManager() {
return emf.createEntityManager();
}
public void create(Agricultor agricultor) throws PreexistingEntityException, Exception {
EntityManager em = null;
try {
em = getEntityManager();
em.getTransaction().begin();
em.persist(agricultor);
em.getTransaction().commit();
} catch (Exception ex) {
if (findAgricultor(agricultor.getIdAgricultor()) != null) {
throw new PreexistingEntityException("Agricultor " + agricultor + " already exists.", ex);
}
throw ex;
} finally {
if (em != null) {
em.close();
}
}
}
public void edit(Agricultor agricultor) throws NonexistentEntityException, Exception {
EntityManager em = null;
try {
em = getEntityManager();
em.getTransaction().begin();
agricultor = em.merge(agricultor);
em.getTransaction().commit();
} catch (Exception ex) {
String msg = ex.getLocalizedMessage();
if (msg == null || msg.length() == 0) {
Long id = agricultor.getIdAgricultor();
if (findAgricultor(id) == null) {
throw new NonexistentEntityException("The agricultor with id " + id + " no longer exists.");
}
}
throw ex;
} finally {
if (em != null) {
em.close();
}
}
}
public void destroy(Long id) throws NonexistentEntityException {
EntityManager em = null;
try {
em = getEntityManager();
em.getTransaction().begin();
Agricultor agricultor;
try {
agricultor = em.getReference(Agricultor.class, id);
agricultor.getIdAgricultor();
} catch (EntityNotFoundException enfe) {
throw new NonexistentEntityException("The agricultor with id " + id + " no longer exists.", enfe);
}
em.remove(agricultor);
em.getTransaction().commit();
} finally {
if (em != null) {
em.close();
}
}
}
public List<Agricultor> findAgricultorEntities() {
return findAgricultorEntities(true, -1, -1);
}
public List<Agricultor> findAgricultorEntities(int maxResults, int firstResult) {
return findAgricultorEntities(false, maxResults, firstResult);
}
private List<Agricultor> findAgricultorEntities(boolean all, int maxResults, int firstResult) {
EntityManager em = getEntityManager();
try {
CriteriaQuery cq = em.getCriteriaBuilder().createQuery();
cq.select(cq.from(Agricultor.class));
Query q = em.createQuery(cq);
if (!all) {
q.setMaxResults(maxResults);
q.setFirstResult(firstResult);
}
return q.getResultList();
} finally {
em.close();
}
}
public Agricultor findAgricultor(Long id) {
EntityManager em = getEntityManager();
try {
return em.find(Agricultor.class, id);
} finally {
em.close();
}
}
public int getAgricultorCount() {
EntityManager em = getEntityManager();
try {
CriteriaQuery cq = em.getCriteriaBuilder().createQuery();
Root<Agricultor> rt = cq.from(Agricultor.class);
cq.select(em.getCriteriaBuilder().count(rt));
Query q = em.createQuery(cq);
return ((Long) q.getSingleResult()).intValue();
} finally {
em.close();
}
}
public List<Agricultor> ObtenerAgricultores(String busqueda){
try{
EntityManager em = getEntityManager();
em.getTransaction().begin();
String jpql="select a from bascula.entity.Agricultor a ";
jpql+="where(";
jpql+=" concat('',a.idAgricultor) like :busqueda or ";
jpql+=" ( a.nombres like :busqueda2 or ";
jpql+=" a.apellidos like :busqueda2 or ";
jpql+=" a.razonSocial like :busqueda2 or ";
jpql+=" a.naturaleza like :busqueda2 ";
jpql+=" ) ";
jpql+=")";
Query query=em.createQuery(jpql);
query.setParameter("busqueda",busqueda+"%");
query.setParameter("busqueda2","%"+busqueda+"%");
List<Agricultor> list=query.getResultList();
em.getTransaction().commit();
return list;
}catch(Exception e){
return new ArrayList<Agricultor>();
}
}
}
|
[
"Usuario1@Usuario"
] |
Usuario1@Usuario
|
e62dde88e77cc7907e84d13874c96c5549300f71
|
ad5cd983fa810454ccbb8d834882856d7bf6faca
|
/platform/ext/oauth2/testsrc/de/hybris/platform/webservicescommons/oauth2/token/provider/TokenServicesTest.java
|
9217a411f0dd2a824fdeecd0c7da44dae692d544
|
[] |
no_license
|
amaljanan/my-hybris
|
2ea57d1a4391c9a81c8f4fef7c8ab977b48992b8
|
ef9f254682970282cf8ad6d26d75c661f95500dd
|
refs/heads/master
| 2023-06-12T17:20:35.026159
| 2021-07-09T04:33:13
| 2021-07-09T04:33:13
| 384,177,175
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,508
|
java
|
/*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
package de.hybris.platform.webservicescommons.oauth2.token.provider;
import static org.assertj.core.api.Assertions.assertThat;
import de.hybris.bootstrap.annotations.IntegrationTest;
import de.hybris.platform.servicelayer.ServicelayerTransactionalTest;
import de.hybris.platform.servicelayer.model.ModelService;
import de.hybris.platform.webservicescommons.model.OAuthClientDetailsModel;
import de.hybris.platform.webservicescommons.oauth2.token.provider.HybrisOAuthTokenStoreTest.MockAuthentication;
import javax.annotation.Resource;
import org.junit.Before;
import org.junit.Test;
import org.springframework.security.core.Authentication;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.security.oauth2.provider.OAuth2Request;
import org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices;
import com.google.common.collect.Sets;
@IntegrationTest
public class TokenServicesTest extends ServicelayerTransactionalTest
{
private static final String ADMIN_USER = "admin";
private static final String TEST_SCOPE = "test_scope";
private static final String CLIENT_ID = "test_client";
private static final int ACCESS_TOKEN_VALIDITY_SECONDS = 100;
@Resource
private AuthorizationServerTokenServices oauthTokenServices;
@Resource
private ModelService modelService;
@Before
public void setup()
{
final OAuthClientDetailsModel client = new OAuthClientDetailsModel();
client.setClientId(CLIENT_ID);
client.setAccessTokenValiditySeconds(ACCESS_TOKEN_VALIDITY_SECONDS);
modelService.save(client);
}
@Test
public void testCreateAccessToken()
{
final OAuth2AccessToken token = oauthTokenServices.createAccessToken(createAuthentication());
assertThat(token).isNotNull();
assertThat(token.getExpiresIn()).isLessThanOrEqualTo(ACCESS_TOKEN_VALIDITY_SECONDS);
assertThat(token.getScope().size()).isEqualTo(1);
assertThat(token.getScope()).contains(TEST_SCOPE);
}
protected OAuth2Authentication createAuthentication()
{
final Authentication authentication = new MockAuthentication(ADMIN_USER, false);
final OAuth2Authentication oauthAuthentication = new OAuth2Authentication(
new OAuth2Request(null, CLIENT_ID, null, true, Sets.newHashSet(TEST_SCOPE), null, null, null, null),
authentication);
return oauthAuthentication;
}
}
|
[
"amaljanan333@gmail.com"
] |
amaljanan333@gmail.com
|
1e85823c7aee4d7069f06e40b3a0b050d9b3aa03
|
efca855f83be608cc5fcd5f9976b820f09f11243
|
/ethereum/core/src/main/java/org/enterchain/enter/ethereum/vm/OperandStack.java
|
754dbb4de0dd70241d516cc3bcfbe27a3ed1407b
|
[
"Apache-2.0"
] |
permissive
|
enterpact/enterchain
|
5438e127c851597cbd7e274526c3328155483e58
|
d8b272fa6885e5d263066da01fff3be74a6357a0
|
refs/heads/master
| 2023-05-28T12:48:02.535365
| 2021-06-09T20:44:01
| 2021-06-09T20:44:01
| 375,483,000
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 850
|
java
|
/*
* Copyright ConsenSys AG.
*
* 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.
*
* SPDX-License-Identifier: Apache-2.0
*
*/
package org.enterchain.enter.ethereum.vm;
import org.apache.tuweni.bytes.Bytes32;
public class OperandStack extends FixedStack<Bytes32> {
public OperandStack(final int maxSize) {
super(maxSize, Bytes32.class);
}
}
|
[
"webframes@gmail.com"
] |
webframes@gmail.com
|
8ad12ea4340918453cf1c2d9bc0d2de1cd0f818e
|
88ed30ae68858ad6365357d4b0a95ad07594c430
|
/platform/arcus-modelmanager/src/main/java/com/iris/modelmanager/commands/GenerateTimeZoneId.java
|
423c1a127ab5455cdda6b968b300d6f9b6cabeda
|
[
"Apache-2.0"
] |
permissive
|
Diffblue-benchmarks/arcusplatform
|
686f58654d2cdf3ca3c25bc475bf8f04db0c4eb3
|
b95cb4886b99548a6c67702e8ba770317df63fe2
|
refs/heads/master
| 2020-05-23T15:41:39.298441
| 2019-05-01T03:56:47
| 2019-05-01T03:56:47
| 186,830,996
| 0
| 0
|
Apache-2.0
| 2019-05-30T11:13:52
| 2019-05-15T13:22:26
|
Java
|
UTF-8
|
Java
| false
| false
| 3,215
|
java
|
/*
* Copyright 2019 Arcus 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 com.iris.modelmanager.commands;
import java.util.TimeZone;
import java.util.UUID;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.datastax.driver.core.BoundStatement;
import com.datastax.driver.core.PreparedStatement;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Row;
import com.datastax.driver.core.Session;
import com.iris.modelmanager.engine.ExecutionContext;
import com.iris.modelmanager.engine.command.CommandExecutionException;
import com.iris.modelmanager.engine.command.ExecutionCommand;
import com.iris.util.TimeZones;
/**
*
*/
public class GenerateTimeZoneId implements ExecutionCommand {
private static final Logger logger = LoggerFactory.getLogger(LowercaseLoginIndex.class);
private static final String SELECT = "SELECT id, tzName, tzOffset, tzUsesDst FROM place";
private static final String UPDATE_PLACE =
"UPDATE place " +
"SET tzId = ?, tzName = ?, tzOffset = ?, tzUsesDst = ? " +
"WHERE id = ?";
public GenerateTimeZoneId() {
// TODO Auto-generated constructor stub
}
public void execute(ExecutionContext context, boolean autoRollback) throws CommandExecutionException {
Session session = context.getSession();
PreparedStatement update = session.prepare(UPDATE_PLACE);
ResultSet rs = context.getSession().execute(SELECT);
for(Row row: rs) {
UUID placeId = row.getUUID("id");
String tzName = row.getString("tzName");
if(StringUtils.isEmpty(tzName)) {
continue;
}
logger.debug("Attmempting to repair timzone [{}]...", tzName);
Double offset = row.getDouble("tzOffset");
Boolean usesDst = row.getBool("tzUsesDst");
TimeZone tz;
try {
tz = TimeZones.guessTimezone(tzName, offset, usesDst);
}
catch(Exception e) {
logger.warn("Unable to determine timezone for place [{}]", placeId, e);
continue;
}
logger.info("Found timezone [{}] for name [{}]", tz.getID(), tzName);
BoundStatement bs = update.bind(
tz.getID(),
tzName,
TimeZones.getOffsetAsHours(tz.getRawOffset()),
tz.useDaylightTime(),
placeId
);
session.execute(bs);
}
}
public void rollback(ExecutionContext context, boolean autoRollback) throws CommandExecutionException {
logger.warn("Rollback is not supported for {}", this);
}
}
|
[
"b@yoyo.com"
] |
b@yoyo.com
|
57144d6c117bacaaabfbee5fea079e3b7b63bed9
|
d9477e8e6e0d823cf2dec9823d7424732a7563c4
|
/jEdit/branches/4.3.x-merge-request-2980833/org/gjt/sp/jedit/gui/PasteFromListDialog.java
|
2d5122ea418d83603d2325c24c9db0412a197ea9
|
[] |
no_license
|
RobertHSchmidt/jedit
|
48fd8e1e9527e6f680de334d1903a0113f9e8380
|
2fbb392d6b569aefead29975b9be12e257fbe4eb
|
refs/heads/master
| 2023-08-30T02:52:55.676638
| 2018-07-11T13:28:01
| 2018-07-11T13:28:01
| 140,587,948
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,355
|
java
|
/*
* PasteFromListDialog.java - Paste previous/paste deleted dialog
* :tabSize=8:indentSize=8:noTabs=false:
* :folding=explicit:collapseFolds=1:
*
* Copyright (C) 2003, 2005 Slava Pestov
*
* This program 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 any later version.
*
* This program 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.
*/
package org.gjt.sp.jedit.gui;
//{{{ Imports
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import org.gjt.sp.jedit.*;
//}}}
public class PasteFromListDialog extends EnhancedDialog
{
//{{{ PasteFromListDialog constructor
public PasteFromListDialog(String name, View view, MutableListModel model)
{
super(view,jEdit.getProperty(name + ".title"),true);
this.view = view;
this.listModel = model;
JPanel content = new JPanel(new BorderLayout());
content.setBorder(new EmptyBorder(12,12,12,12));
setContentPane(content);
JPanel center = new JPanel(new GridLayout(2,1,2,12));
clips = new JList(model);
clips.setCellRenderer(new Renderer());
clips.setVisibleRowCount(12);
clips.addMouseListener(new MouseHandler());
clips.addListSelectionListener(new ListHandler());
insert = new JButton(jEdit.getProperty("common.insert"));
cancel = new JButton(jEdit.getProperty("common.cancel"));
JLabel label = new JLabel(jEdit.getProperty(name + ".caption"));
label.setBorder(new EmptyBorder(0,0,6,0));
content.add(BorderLayout.NORTH,label);
JScrollPane scroller = new JScrollPane(clips);
scroller.setPreferredSize(new Dimension(500,150));
center.add(scroller);
clipText = new JTextArea();
clipText.setEditable(false);
scroller = new JScrollPane(clipText);
scroller.setPreferredSize(new Dimension(500,150));
center.add(scroller);
content.add(center, BorderLayout.CENTER);
JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS));
panel.setBorder(new EmptyBorder(12,0,0,0));
panel.add(Box.createGlue());
panel.add(insert);
panel.add(Box.createHorizontalStrut(6));
panel.add(cancel);
panel.add(Box.createGlue());
content.add(panel, BorderLayout.SOUTH);
if(model.getSize() >= 1)
clips.setSelectedIndex(0);
updateButtons();
getRootPane().setDefaultButton(insert);
insert.addActionListener(new ActionHandler());
cancel.addActionListener(new ActionHandler());
GUIUtilities.requestFocus(this,clips);
pack();
setLocationRelativeTo(view);
setVisible(true);
} //}}}
//{{{ ok() method
public void ok()
{
Object[] selected = clips.getSelectedValues();
if(selected == null || selected.length == 0)
{
getToolkit().beep();
return;
}
String text = getSelectedClipText();
/**
* For each selected clip, we remove it, then add it back
* to the model. This has the effect of moving it to the
* top of the list.
*/
for(int i = 0; i < selected.length; i++)
{
listModel.removeElement(selected[i]);
listModel.insertElementAt(selected[i],0);
}
view.getTextArea().setSelectedText(text);
dispose();
} //}}}
//{{{ cancel() method
public void cancel()
{
dispose();
} //}}}
//{{{ Private members
//{{{ Instance variables
private View view;
private MutableListModel listModel;
private JList clips;
private JTextArea clipText;
private JButton insert;
private JButton cancel;
//}}}
//{{{ getSelectedClipText()
private String getSelectedClipText()
{
Object[] selected = clips.getSelectedValues();
StringBuilder clip = new StringBuilder();
for(int i = 0; i < selected.length; i++)
{
if(i != 0)
clip.append('\n');
clip.append(selected[i]);
}
return clip.toString();
}
//}}}
//{{{ updateButtons() method
private void updateButtons()
{
int selected = clips.getSelectedIndex();
insert.setEnabled(selected != -1);
} //}}}
//{{{ showClipText() method
private void showClipText()
{
Object[] selected = clips.getSelectedValues();
if(selected == null || selected.length == 0)
clipText.setText("");
else
clipText.setText(getSelectedClipText());
clipText.setCaretPosition(0);
}
//}}}
//}}}
//{{{ Renderer class
class Renderer extends DefaultListCellRenderer
{
String shorten(String item)
{
StringBuilder buf = new StringBuilder();
// workaround for Swing rendering labels starting
// with <html> using the HTML engine
if(item.toLowerCase().startsWith("<html>"))
buf.append(' ');
boolean ws = true;
for(int i = 0; i < item.length(); i++)
{
char ch = item.charAt(i);
if(Character.isWhitespace(ch))
{
if(ws)
/* do nothing */;
else
{
buf.append(' ');
ws = true;
}
}
else
{
ws = false;
buf.append(ch);
}
}
if(buf.length() == 0)
return jEdit.getProperty("paste-from-list.whitespace");
return buf.toString();
}
public Component getListCellRendererComponent(
JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus)
{
super.getListCellRendererComponent(list,value,index,
isSelected,cellHasFocus);
setText(shorten(value.toString()));
return this;
}
} //}}}
//{{{ ActionHandler class
class ActionHandler implements ActionListener
{
public void actionPerformed(ActionEvent evt)
{
Object source = evt.getSource();
if(source == insert)
ok();
else if(source == cancel)
cancel();
}
} //}}}
//{{{ ListHandler class
class ListHandler implements ListSelectionListener
{
//{{{ valueChanged() method
public void valueChanged(ListSelectionEvent evt)
{
showClipText();
updateButtons();
} //}}}
} //}}}
//{{{ MouseHandler class
class MouseHandler extends MouseAdapter
{
public void mouseClicked(MouseEvent evt)
{
if(evt.getClickCount() == 2)
ok();
}
} //}}}
}
|
[
"Vampire0@6b1eeb88-9816-0410-afa2-b43733a0f04e"
] |
Vampire0@6b1eeb88-9816-0410-afa2-b43733a0f04e
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.