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
88f18de35671c0cba02d29f9dcba74e76bfc303e
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/neuron-20211115/src/main/java/com/aliyun/neuron20211115/models/GrantedRoleListQuery.java
1b4e2887f347fdc3be826099d0d603a1da6fabae
[ "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,187
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.neuron20211115.models; import com.aliyun.tea.*; public class GrantedRoleListQuery extends TeaModel { @NameInMap("authorizerId") public String authorizerId; @NameInMap("authorizerType") public String authorizerType; @NameInMap("name") public String name; public static GrantedRoleListQuery build(java.util.Map<String, ?> map) throws Exception { GrantedRoleListQuery self = new GrantedRoleListQuery(); return TeaModel.build(map, self); } public GrantedRoleListQuery setAuthorizerId(String authorizerId) { this.authorizerId = authorizerId; return this; } public String getAuthorizerId() { return this.authorizerId; } public GrantedRoleListQuery setAuthorizerType(String authorizerType) { this.authorizerType = authorizerType; return this; } public String getAuthorizerType() { return this.authorizerType; } public GrantedRoleListQuery setName(String name) { this.name = name; return this; } public String getName() { return this.name; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
7127f92408fd631b0edc7debc3ca7ebbe16f00f5
6edf6c315706e14dc6aef57788a2abea17da10a3
/com/planet_ink/marble_mud/Behaviors/FaithHelper.java
4571310ed91e6702232a94274388053e1f1a115d
[]
no_license
Cocanuta/Marble
c88efd73c46bd152098f588ba1cdc123316df818
4306fbda39b5488dac465a221bf9d8da4cbf2235
refs/heads/master
2020-12-25T18:20:08.253300
2012-09-10T17:09:50
2012-09-10T17:09:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,953
java
package com.planet_ink.marble_mud.Behaviors; import com.planet_ink.marble_mud.core.interfaces.*; import com.planet_ink.marble_mud.core.*; import com.planet_ink.marble_mud.core.collections.*; import com.planet_ink.marble_mud.Abilities.interfaces.*; import com.planet_ink.marble_mud.Areas.interfaces.*; import com.planet_ink.marble_mud.Behaviors.interfaces.*; import com.planet_ink.marble_mud.CharClasses.interfaces.*; import com.planet_ink.marble_mud.Commands.interfaces.*; import com.planet_ink.marble_mud.Common.interfaces.*; import com.planet_ink.marble_mud.Exits.interfaces.*; import com.planet_ink.marble_mud.Items.interfaces.*; import com.planet_ink.marble_mud.Locales.interfaces.*; import com.planet_ink.marble_mud.MOBS.interfaces.*; import com.planet_ink.marble_mud.Races.interfaces.*; import java.util.*; /* 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. */ public class FaithHelper extends StdBehavior { public String ID(){return "FaithHelper";} protected boolean mobKiller=false; public String accountForYourself() { if(parms.length()>0) return "worshippers of "+parms+" protecting"; else return "worshipper protecting"; } public void startBehavior(PhysicalAgent forMe) { super.startBehavior(forMe); if(forMe instanceof MOB) { if(parms.length()>0) ((MOB)forMe).setWorshipCharID(parms.trim()); } } public void executeMsg(Environmental affecting, CMMsg msg) { super.executeMsg(affecting,msg); if((msg.target()==null)||(!(msg.target() instanceof MOB))) return; MOB source=msg.source(); MOB observer=(MOB)affecting; MOB target=(MOB)msg.target(); if((target==null)||(observer==null)) return; if((source!=observer) &&(CMath.bset(msg.targetMajor(),CMMsg.MASK_MALICIOUS)) &&(!observer.isInCombat()) &&(target!=observer) &&(source!=target) &&(observer.getWorshipCharID().length()>0) &&(CMLib.flags().canBeSeenBy(source,observer)) &&(CMLib.flags().canBeSeenBy(target,observer)) &&(!BrotherHelper.isBrother(source,observer,false))) { if(observer.getWorshipCharID().equalsIgnoreCase(target.getWorshipCharID())) { String reason="THAT`S MY FRIEND!! CHARGE!!"; if((observer.getWorshipCharID().equals(target.getWorshipCharID())) &&(!observer.getWorshipCharID().equals(source.getWorshipCharID()))) reason="BELIEVERS OF "+observer.getWorshipCharID().toUpperCase()+" UNITE! CHARGE!"; Aggressive.startFight(observer,source,true,false,reason); } } } }
[ "Cocanuta@Gmail.com" ]
Cocanuta@Gmail.com
eedaf61471d98c7b4cb4c6432cce1b9c402c9234
1da78034695ec3e550410f59c5ec6002e3774660
/itstack-demo-design-15-00/src/main/java/org/itstack/demo/design/group/Link.java
f9ae4aa97edfa368f11d634b359cf8e493940c73
[ "Apache-2.0" ]
permissive
fuzhengwei/itstack-demo-design
cb4a72541de43e97d9c1a47a204a47ba73f2ab5a
67b2e004766a1252726afb81517d9db84ba06476
refs/heads/master
2023-06-25T22:58:11.537397
2023-06-08T01:01:32
2023-06-08T01:01:32
265,579,053
6,022
1,811
Apache-2.0
2022-12-16T03:37:03
2020-05-20T13:45:30
Java
UTF-8
Java
false
false
554
java
package org.itstack.demo.design.group; /** * 树节点链路 */ public class Link { private String fromId; // 雇员ID private String toId; // 雇员ID public Link(String fromId, String toId) { this.fromId = fromId; this.toId = toId; } public String getFromId() { return fromId; } public void setFromId(String fromId) { this.fromId = fromId; } public String getToId() { return toId; } public void setToId(String toId) { this.toId = toId; } }
[ "184172133@qq.com" ]
184172133@qq.com
a3146d3d86662d2bbc376a590a2d9dec60dfd768
e57083ea584d69bc9fb1b32f5ec86bdd4fca61c0
/sample-components-200/src/main/java/com/example/service/sample200/sample9/Component9_7.java
04f7a3449bb718e054ea616a1c40051c54db83ea
[]
no_license
snicoll-scratches/test-spring-components-index
77e0ad58c8646c7eb1d1563bf31f51aa42a0636e
aa48681414a11bb704bdbc8acabe45fa5ef2fd2d
refs/heads/main
2021-06-13T08:46:58.532850
2019-12-09T15:11:10
2019-12-09T15:11:10
65,806,297
5
3
null
null
null
null
UTF-8
Java
false
false
141
java
package com.example.service.sample200.sample9; import org.springframework.stereotype.Component; @Component public class Component9_7 { }
[ "snicoll@pivotal.io" ]
snicoll@pivotal.io
45546896f7a4af357d922b69b89f48b1f35c0eb4
43ea91f3ca050380e4c163129e92b771d7bf144a
/services/cce/src/main/java/com/huaweicloud/sdk/cce/v3/model/ListNodePoolsRequest.java
ff1b714a28fed5b7b8b4f2e3cdf3856758be28a4
[ "Apache-2.0" ]
permissive
wxgsdwl/huaweicloud-sdk-java-v3
660602ca08f32dc897d3770995b496a82a1cc72d
ee001d706568fdc7b852792d2e9aefeb9d13fb1e
refs/heads/master
2023-02-27T14:20:54.774327
2021-02-07T11:48:35
2021-02-07T11:48:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,476
java
package com.huaweicloud.sdk.cce.v3.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.util.function.Consumer; import java.util.Objects; /** * Request Object */ public class ListNodePoolsRequest { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="cluster_id") private String clusterId; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="errorStatus") private String errorStatus; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="showDefaultNodePool") private String showDefaultNodePool; public ListNodePoolsRequest withClusterId(String clusterId) { this.clusterId = clusterId; return this; } /** * Get clusterId * @return clusterId */ public String getClusterId() { return clusterId; } public void setClusterId(String clusterId) { this.clusterId = clusterId; } public ListNodePoolsRequest withErrorStatus(String errorStatus) { this.errorStatus = errorStatus; return this; } /** * Get errorStatus * @return errorStatus */ public String getErrorStatus() { return errorStatus; } public void setErrorStatus(String errorStatus) { this.errorStatus = errorStatus; } public ListNodePoolsRequest withShowDefaultNodePool(String showDefaultNodePool) { this.showDefaultNodePool = showDefaultNodePool; return this; } /** * Get showDefaultNodePool * @return showDefaultNodePool */ public String getShowDefaultNodePool() { return showDefaultNodePool; } public void setShowDefaultNodePool(String showDefaultNodePool) { this.showDefaultNodePool = showDefaultNodePool; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ListNodePoolsRequest listNodePoolsRequest = (ListNodePoolsRequest) o; return Objects.equals(this.clusterId, listNodePoolsRequest.clusterId) && Objects.equals(this.errorStatus, listNodePoolsRequest.errorStatus) && Objects.equals(this.showDefaultNodePool, listNodePoolsRequest.showDefaultNodePool); } @Override public int hashCode() { return Objects.hash(clusterId, errorStatus, showDefaultNodePool); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ListNodePoolsRequest {\n"); sb.append(" clusterId: ").append(toIndentedString(clusterId)).append("\n"); sb.append(" errorStatus: ").append(toIndentedString(errorStatus)).append("\n"); sb.append(" showDefaultNodePool: ").append(toIndentedString(showDefaultNodePool)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
3693f08fb6fefde1d51a6854d99b75c4b338561f
e617f4ae796f16eeb4705200935a90dfd31955b2
/com/google/android/gms/internal/lm.java
66ea46117766c538f642fd241fe3aea28c233a23
[]
no_license
mascot6699/Go-Jek.Android
98dfb73b1c52a7c2100c7cf8baebc0a95d5d511d
051649d0622bcdc7872cb962a0e1c4f6c0f2a113
refs/heads/master
2021-01-20T00:24:46.431341
2016-01-11T05:59:34
2016-01-11T05:59:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,489
java
package com.google.android.gms.internal; import android.accounts.Account; import android.app.Activity; import android.app.PendingIntent; import android.app.PendingIntent.CanceledException; import android.content.Context; import android.content.Intent; import android.content.IntentSender.SendIntentException; import android.os.Bundle; import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; import android.text.TextUtils; import android.util.Log; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks; import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener; import com.google.android.gms.common.internal.e; import com.google.android.gms.common.internal.e.e; import com.google.android.gms.common.internal.l; import com.google.android.gms.identity.intents.UserAddressRequest; public class lm extends e<lo> { private final String Dd; private a adM; private final int mTheme; private Activity nr; public lm(Activity paramActivity, Looper paramLooper, GoogleApiClient.ConnectionCallbacks paramConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener paramOnConnectionFailedListener, String paramString, int paramInt) { super(paramActivity, paramLooper, paramConnectionCallbacks, paramOnConnectionFailedListener, new String[0]); this.Dd = paramString; this.nr = paramActivity; this.mTheme = paramInt; } protected void a(l paraml, e.e parame) throws RemoteException { paraml.d(parame, 6171000, getContext().getPackageName()); } public void a(UserAddressRequest paramUserAddressRequest, int paramInt) { lT(); this.adM = new a(paramInt, this.nr); try { Bundle localBundle = new Bundle(); localBundle.putString("com.google.android.gms.identity.intents.EXTRA_CALLING_PACKAGE_NAME", getContext().getPackageName()); if (!TextUtils.isEmpty(this.Dd)) { localBundle.putParcelable("com.google.android.gms.identity.intents.EXTRA_ACCOUNT", new Account(this.Dd, "com.google")); } localBundle.putInt("com.google.android.gms.identity.intents.EXTRA_THEME", this.mTheme); lS().a(this.adM, paramUserAddressRequest, localBundle); return; } catch (RemoteException paramUserAddressRequest) { Log.e("AddressClientImpl", "Exception requesting user address", paramUserAddressRequest); paramUserAddressRequest = new Bundle(); paramUserAddressRequest.putInt("com.google.android.gms.identity.intents.EXTRA_ERROR_CODE", 555); this.adM.g(1, paramUserAddressRequest); } } protected lo aF(IBinder paramIBinder) { return lo.a.aH(paramIBinder); } public void disconnect() { super.disconnect(); if (this.adM != null) { a.a(this.adM, null); this.adM = null; } } protected String getServiceDescriptor() { return "com.google.android.gms.identity.intents.internal.IAddressService"; } protected String getStartServiceAction() { return "com.google.android.gms.identity.service.BIND"; } protected lo lS() { return (lo)super.gS(); } protected void lT() { super.dJ(); } public static final class a extends ln.a { private final int Lu; private Activity nr; public a(int paramInt, Activity paramActivity) { this.Lu = paramInt; this.nr = paramActivity; } private void setActivity(Activity paramActivity) { this.nr = paramActivity; } public void g(int paramInt, Bundle paramBundle) { Object localObject; if (paramInt == 1) { localObject = new Intent(); ((Intent)localObject).putExtras(paramBundle); paramBundle = this.nr.createPendingResult(this.Lu, (Intent)localObject, 1073741824); if (paramBundle != null) {} } for (;;) { return; try { paramBundle.send(1); return; } catch (PendingIntent.CanceledException paramBundle) { Log.w("AddressClientImpl", "Exception settng pending result", paramBundle); return; } localObject = null; if (paramBundle != null) { localObject = (PendingIntent)paramBundle.getParcelable("com.google.android.gms.identity.intents.EXTRA_PENDING_INTENT"); } paramBundle = new ConnectionResult(paramInt, (PendingIntent)localObject); if (paramBundle.hasResolution()) { try { paramBundle.startResolutionForResult(this.nr, this.Lu); return; } catch (IntentSender.SendIntentException paramBundle) { Log.w("AddressClientImpl", "Exception starting pending intent", paramBundle); return; } } try { paramBundle = this.nr.createPendingResult(this.Lu, new Intent(), 1073741824); if (paramBundle != null) { paramBundle.send(1); return; } } catch (PendingIntent.CanceledException paramBundle) { Log.w("AddressClientImpl", "Exception setting pending result", paramBundle); } } } } } /* Location: /Users/michael/Downloads/dex2jar-2.0/GO_JEK.jar!/com/google/android/gms/internal/lm.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "michael@MJSTONE-MACBOOK.local" ]
michael@MJSTONE-MACBOOK.local
390c8aef18e942e82864c9f32d11558c3c926d73
7ea12838e263df4ca7ad6ff937aa0e89ed05daea
/src/main/java/com/buuz135/industrial/IndustrialForegoing.java
b8ab590d4b62ecada79b8c7d2d5ddd84fa592771
[ "MIT" ]
permissive
TomSalem/Industrial-Foregoing
6557b901ffd15ac5f436d98f5cfd67ff2a70c743
9ca43d6ac98ac9b40b1f43a0faa8ed73c7a0f595
refs/heads/master
2020-04-14T10:07:17.291348
2019-01-01T17:51:30
2019-01-01T17:51:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,367
java
/* * This file is part of Industrial Foregoing. * * Copyright 2018, Buuz135 * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in the * Software without restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, subject to the * following conditions: * * The above copyright notice and this permission notice shall be included in all copies * or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE * FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package com.buuz135.industrial; import com.buuz135.industrial.proxy.BlockRegistry; import com.buuz135.industrial.proxy.CommonProxy; import com.buuz135.industrial.proxy.ItemRegistry; import com.buuz135.industrial.utils.IFFakePlayer; import com.buuz135.industrial.utils.Reference; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.*; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; import net.ndrei.teslacorelib.config.TeslaCoreLibConfig; import net.ndrei.teslacorelib.items.gears.CoreGearType; import java.util.Arrays; import java.util.HashMap; @Mod(modid = Reference.MOD_ID, name = Reference.MOD_ID, version = Reference.VERSION, dependencies = "required-after:forge@[14.23.1.2594,);required-after:teslacorelib@[1.0.15,);", guiFactory = Reference.GUI_FACTORY, updateJSON = "https://raw.githubusercontent.com/Buuz135/Industrial-Foregoing/master/update.json") public class IndustrialForegoing { public static final SimpleNetworkWrapper NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(Reference.MOD_ID); public static CreativeTabs creativeTab = new CreativeTabs(Reference.MOD_ID) { @Override public ItemStack createIcon() { return new ItemStack(BlockRegistry.blackHoleUnitBlock).isEmpty() ? new ItemStack(ItemRegistry.strawItem) : new ItemStack(BlockRegistry.blackHoleUnitBlock); } }; public static IndustrialForegoing instance; @SidedProxy(clientSide = Reference.PROXY_CLIENT, serverSide = Reference.PROXY_COMMON) private static CommonProxy proxy; private static HashMap<Integer, IFFakePlayer> worldFakePlayer = new HashMap<>(); static { if (!FluidRegistry.isUniversalBucketEnabled()) FluidRegistry.enableUniversalBucket(); } public static FakePlayer getFakePlayer(World world) { if (worldFakePlayer.containsKey(world.provider.getDimension())) return worldFakePlayer.get(world.provider.getDimension()); if (world instanceof WorldServer) { IFFakePlayer fakePlayer = new IFFakePlayer((WorldServer) world); worldFakePlayer.put(world.provider.getDimension(), fakePlayer); return fakePlayer; } return null; } public static FakePlayer getFakePlayer(World world, BlockPos pos) { FakePlayer player = getFakePlayer(world); if (player != null) player.setPositionAndRotation(pos.getX(), pos.getY(), pos.getZ(), 90, 90); return player; } @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { instance = this; proxy.preInit(event); } @Mod.EventHandler public void init(FMLInitializationEvent event) { proxy.init(); } @Mod.EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.postInit(); } @Mod.EventHandler public void construction(FMLConstructionEvent event) { Arrays.asList(TeslaCoreLibConfig.REGISTER_MACHINE_CASE, TeslaCoreLibConfig.REGISTER_GEARS, TeslaCoreLibConfig.REGISTER_GEAR_TYPES + "#" + CoreGearType.IRON.getMaterial(), TeslaCoreLibConfig.REGISTER_GEAR_TYPES + "#" + CoreGearType.GOLD.getMaterial(), TeslaCoreLibConfig.REGISTER_GEAR_TYPES + "#" + CoreGearType.DIAMOND.getMaterial(), TeslaCoreLibConfig.REGISTER_ADDONS, TeslaCoreLibConfig.REGISTER_SPEED_ADDONS, TeslaCoreLibConfig.REGISTER_ENERGY_ADDONS).forEach(s -> TeslaCoreLibConfig.INSTANCE.setDefaultFlag(s, true)); TeslaCoreLibConfig.INSTANCE.setDefaultFlag(TeslaCoreLibConfig.ALLOW_ENERGY_DISPLAY_CHANGE, false); } @Mod.EventHandler public void serverStart(FMLServerStartingEvent event) { worldFakePlayer.clear(); } }
[ "buuz135@hotmail.com" ]
buuz135@hotmail.com
84dac82f56abfdc4e70f9f3033013213a4b33c10
e124c06aa37b93502a84f8931e1e792539883b9d
/crg-scoreboard_0.1.4/src/com/carolinarollergirls/scoreboard/policy/JamClockControlsLineupClockPolicy.java
3b1bd7b5fa9b6e1eb076420900f0b84d19068834
[]
no_license
m-shayanshafi/FactRepositoryProjects
12d7b65505c1e0a8e0ec3577cf937a1e3d17c417
1d45d667b454064107d78213e8cd3ec795827b41
refs/heads/master
2020-06-13T12:04:53.891793
2016-12-02T11:30:49
2016-12-02T11:30:49
75,389,381
1
0
null
null
null
null
UTF-8
Java
false
false
980
java
package com.carolinarollergirls.scoreboard.policy; import com.carolinarollergirls.scoreboard.*; import com.carolinarollergirls.scoreboard.model.*; import com.carolinarollergirls.scoreboard.defaults.*; public class JamClockControlsLineupClockPolicy extends AbstractClockRunningChangePolicy { public JamClockControlsLineupClockPolicy() { super(); addClock(Clock.ID_JAM); setDescription("This controls the Lineup clock based on the Jam clock. When the Jam clock starts, the Lineup clock is stopped. When the Jam clock stops, and the Period clock is running, and the Lineup clock is not running, the Lineup clock is reset then started."); } public void clockRunningChange(Clock clock, boolean running) { ClockModel pc = getScoreBoardModel().getClockModel(Clock.ID_PERIOD); ClockModel lc = getScoreBoardModel().getClockModel(Clock.ID_LINEUP); if (running) { lc.stop(); } else if (pc.isRunning() && !lc.isRunning()) { lc.resetTime(); lc.start(); } } }
[ "mshayanshafi@gmail.com" ]
mshayanshafi@gmail.com
d17072d73ea391c8d0595a9c0bbb2ac4440b155a
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module1002_public/tests/more/src/java/module1002_public_tests_more/a/Foo0.java
c53eb8b2f21c5aadfbecebf0ee43813cd6d9b99d
[ "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,306
java
package module1002_public_tests_more.a; import javax.management.*; import javax.naming.directory.*; import javax.net.ssl.*; /** * 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 java.util.logging.Filter * @see java.util.zip.Deflater * @see javax.annotation.processing.Completion */ @SuppressWarnings("all") public abstract class Foo0<G> implements module1002_public_tests_more.a.IFoo0<G> { javax.lang.model.AnnotatedConstruct f0 = null; javax.management.Attribute f1 = null; javax.naming.directory.DirContext f2 = null; public G element; public static Foo0 instance; public static Foo0 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return null; } public String getName() { return element.toString(); } public void setName(String string) { return; } public G get() { return element; } public void set(Object element) { this.element = (G)element; } public G call() throws Exception { return (G)getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
19b0c3cfed26266f19e2e459684b15f4d55a65c2
5d7b7c9c49c3808bb638b986a00a87dabb3f4361
/boot/security-jpa-thymeleaf-mail-angular-multi/web-cores/web-core/src/main/java/com/genome/dx/wcore/controller/WebCoreController.java
243f882a51227765ddcaca9a35b4c5ecf7988dfb
[]
no_license
kopro-ov/lib-spring
f4e67f8d9e81f9ec4cfbf190e30479013a2bcc1c
89e7d4b9a6318138d24f81e4e0fc2646f2d6a3d5
refs/heads/master
2023-04-04T07:56:14.312704
2021-02-15T01:59:59
2021-02-15T01:59:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,087
java
package com.genome.dx.wcore.controller; import com.genome.dx.core.repository.AdmRepository; import com.genome.dx.wcore.config.security.UserDetailsService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.support.MessageSourceAccessor; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @Slf4j @Controller public class WebCoreController { @Autowired private AdmRepository userRepository; @Autowired private MessageSourceAccessor messageSource; @Autowired UserDetailsService userDetailsService; @Autowired AdmRepository admRepository; @RequestMapping(value = {"", "/"}) public String index(HttpServletRequest request, HttpServletResponse response, ModelMap model) { return "index.html"; } }
[ "visualkhh@gmail.com" ]
visualkhh@gmail.com
69fba07eacf9dea8733db44275bf33a7e399f681
13b00b2d96697790749400270b2a9fe08220c93b
/retail-web/retail-web-backstage/src/main/java/club/xyes/zkh/retail/web/backstage/controller/CommoditySkuController.java
9718c51e460ddd81fe2c4161431123f3642e4b52
[]
no_license
coomia/retail-parent
16a492b358c1fad67b0c3387170c770e13c51ef2
1e4cb9ae769d5380395ac2da95f00d7010c96fa7
refs/heads/master
2020-08-03T14:24:36.140041
2019-09-30T03:31:17
2019-09-30T03:31:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,822
java
package club.xyes.zkh.retail.web.backstage.controller; import club.xyes.zkh.retail.commons.entity.CommoditySku; import club.xyes.zkh.retail.commons.exception.BadRequestException; import club.xyes.zkh.retail.commons.vo.GeneralResult; import club.xyes.zkh.retail.service.general.CommodityService; import club.xyes.zkh.retail.service.general.CommoditySkuService; import club.xyes.zkh.retail.web.backstage.checker.PlatformParamsCheckStrategyContext; import club.xyes.zkh.retail.web.backstage.utils.PlatformUtils; import club.xyes.zkh.retail.web.backstage.vo.PlatformParam; import club.xyes.zkh.retail.web.commons.controller.AbstractEntityController; import com.github.pagehelper.PageInfo; import lombok.val; import org.springframework.web.bind.annotation.*; import javax.validation.constraints.NotNull; import static club.xyes.zkh.retail.commons.utils.ParamChecker.notEmpty; import static club.xyes.zkh.retail.commons.utils.ParamChecker.notNull; /** * Create by 郭文梁 2019/7/29 16:20 * CommoditySkuController * 商品库存党委(套餐 分类)相关数据访问控制器 * * @author 郭文梁 * @data 2019/7/29 16:20 */ @RestController @RequestMapping("/api/sku") public class CommoditySkuController extends AbstractEntityController<CommoditySku> { private final CommoditySkuService commoditySkuService; private final CommodityService commodityService; private final PlatformParamsCheckStrategyContext platformParamsCheckStrategyContext; /** * 构造时指定业务组件 * * @param service 业务组件 */ public CommoditySkuController(CommoditySkuService service, CommodityService commodityService, PlatformParamsCheckStrategyContext platformParamsCheckStrategyContext) { super(service); this.commoditySkuService = service; this.commodityService = commodityService; this.platformParamsCheckStrategyContext = platformParamsCheckStrategyContext; } /** * 查询商品的详细套餐 * * @param commodityId 商品ID * @param page 页码 * @param rows 每页大小 * @return GR */ @GetMapping("/commodity/{commodityId}") public GeneralResult<PageInfo<CommoditySku>> findByCommodity(@PathVariable("commodityId") Integer commodityId, Integer page, Integer rows) { page = defaultPage(page); rows = defaultRows(rows); val commodity = commodityService.require(commodityId); val res = commoditySkuService.findByCommodity(commodityId, page, rows); res.getList().forEach(sku -> sku.setCommodity(commodity)); return GeneralResult.ok(res); } /** * 创建商品库存单位 * * @param commodityId 商品ID * @param param 参数 * @return GR */ @PutMapping("/commodity/{commodityId}") public GeneralResult<CommoditySku> create(@PathVariable("commodityId") Integer commodityId, @RequestBody CommoditySku param) { val commoditySku = new CommoditySku(); checkAndCopyCreateParam(param, commoditySku); val commodity = commodityService.require(commodityId); val res = commoditySkuService.create(commodityId, commoditySku); res.setCommodity(commodity); return GeneralResult.ok(res); } /** * 检查并拷贝创建参数 * * @param param 参数 * @param target 拷贝目标 */ private void checkAndCopyCreateParam(CommoditySku param, CommoditySku target) { val ex = BadRequestException.class; notNull(param, ex, "参数未传!"); notEmpty(param.getName(), ex, "名称必填!"); notNull(param.getCurrentPrice(), ex, "现价必填!"); notNull(param.getOriginalPrice(), ex, "原价必填!"); notNull(param.getCommission1(), ex, "一级返现必填!"); notNull(param.getCommission2(), ex, "二级返现必填!"); notNull(param.getCommission3(), ex, "三级返现必填!"); target.setName(param.getName()); target.setCurrentPrice(param.getCurrentPrice()); target.setOriginalPrice(param.getOriginalPrice()); target.setCommission1(param.getCommission1()); target.setCommission2(param.getCommission2()); target.setCommission3(param.getCommission3()); } /** * 更新商铺套餐信息 * * @param id ID * @param param 参数 * @return GR */ @PostMapping("/{id}") public GeneralResult<CommoditySku> update(@PathVariable("id") Integer id, @RequestBody CommoditySku param) { @NotNull CommoditySku sku = commoditySkuService.require(id); checkAndCopyUpdateParam(param, sku); val res = commoditySkuService.updateById(sku); return GeneralResult.ok(res); } /** * 检查并拷贝更新参数 * * @param param 参数 * @param sku 拷贝目标 */ private void checkAndCopyUpdateParam(CommoditySku param, CommoditySku sku) { checkAndCopyCreateParam(param, sku); } /** * 设置接入平台 * * @param id ID * @param param 参数 * @return GR */ @PostMapping("/{id}/platform") public GeneralResult<Void> setPlatform(@PathVariable("id") Integer id, @RequestBody PlatformParam param) { PlatformUtils.checkPlatformParams(param, platformParamsCheckStrategyContext); val sku = commoditySkuService.require(id); commoditySkuService.setPlatform(sku, param.getPlatform(), param.getParams()); return GeneralResult.ok(); } }
[ "levent8421@outlook.com" ]
levent8421@outlook.com
79bf328aa5548d2a55d7c396a6ac0155ed036437
db24f0b9f11c38a3c3012917cd02a0a1c657ec51
/src/test/java/runner/TextRunnerTest.java
48540f919b51eaa96a011dba174eb52d08da20c3
[]
no_license
nicky-chen/junit
f77a98244379e018a554528be6e7be7fdf18cece
0104eec82272ada2f6eeb8383ff4cb186711d649
refs/heads/master
2020-03-22T04:50:38.324068
2018-07-25T02:20:12
2018-07-25T02:20:12
139,525,018
1
0
null
null
null
null
UTF-8
Java
false
false
1,672
java
package runner; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintStream; import junit.framework.TestCase; import junit.framework.TestResult; import junit.framework.TestSuite; public class TextRunnerTest extends TestCase { public void testFailure() throws Exception { execTest("junit.tests.framework.Failure", false); } public void testSuccess() throws Exception { execTest("junit.tests.framework.Success", true); } public void testError() throws Exception { execTest("junit.tests.BogusDude", false); } void execTest(String testClass, boolean success) throws Exception { String java= System.getProperty("java.home")+File.separator+"bin"+File.separator+"java"; String cp= System.getProperty("java.class.path"); //use -classpath for JDK 1.1.7 compatibility String [] cmd= { java, "-classpath", cp, "junit.textui.TestRunner", testClass}; Process p= Runtime.getRuntime().exec(cmd); InputStream i= p.getInputStream(); int b; while((b= i.read()) != -1) ; //System.out.write(b); assertTrue((p.waitFor() == 0) == success); if (success) assertEquals(junit.textui.TestRunner.SUCCESS_EXIT, p.exitValue()); else assertEquals(junit.textui.TestRunner.FAILURE_EXIT, p.exitValue()); } public void testRunReturnsResult() { PrintStream oldOut= System.out; System.setOut(new PrintStream ( new OutputStream() { public void write(int arg0) throws IOException { } } )); try { TestResult result= junit.textui.TestRunner.run(new TestSuite()); assertTrue(result.wasSuccessful()); } finally { System.setOut(oldOut); } } }
[ "cx52018761@hotmail.com" ]
cx52018761@hotmail.com
02100b408df37f82c79887e9260135f0af4dacb1
4a4c12c9210f3d763690c65c3a1bb3d5255a72b1
/app/src/main/java/com/minilook/minilook/ui/verify/VerifyPresenterImpl.java
c103bfb1fb682a232844ee3c2dd833ae01afad50
[]
no_license
sjyun87/minilook
f6fd0d745955a97eb0f9462d8623187e96baf239
5e4dfcb684cfaf00f6db46e10209a7a52671a563
refs/heads/master
2023-04-01T07:40:13.654554
2021-04-16T08:33:01
2021-04-16T08:33:01
275,824,566
0
0
null
null
null
null
UTF-8
Java
false
false
537
java
package com.minilook.minilook.ui.verify; import com.minilook.minilook.data.common.URLKeys; import com.minilook.minilook.ui.base.BasePresenterImpl; import com.minilook.minilook.ui.verify.di.VerifyArguments; public class VerifyPresenterImpl extends BasePresenterImpl implements VerifyPresenter { private final View view; public VerifyPresenterImpl(VerifyArguments args) { view = args.getView(); } @Override public void onCreate() { view.setupWebView(); view.loadURL(URLKeys.URL_VERIFY); } }
[ "saira_@naver.com" ]
saira_@naver.com
d882aff4bc1d2a7ae6234d56d1221f474ddf076d
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/appbrand/jsapi/m/q.java
fe2a15a32a69b9cb76a09b3f300e1d3b05b3ec8f
[]
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
2,735
java
package com.tencent.mm.plugin.appbrand.jsapi.m; import android.content.Context; import android.content.Intent; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.plugin.appbrand.jsapi.f; import com.tencent.mm.plugin.appbrand.utils.l; import com.tencent.mm.sdk.platformtools.Log; import com.tencent.mm.sdk.platformtools.Util; import org.json.JSONObject; public class q extends com.tencent.mm.plugin.appbrand.jsapi.c<f> { public static final int CTRL_INDEX = 38; public static final String NAME = "openLocation"; public static Intent al(JSONObject paramJSONObject) { AppMethodBeat.i(329232); Log.i("MicroMsg.JsApiOpenLocation", "data:%s", new Object[] { paramJSONObject }); try { float f1 = Util.getFloat(paramJSONObject.optString("latitude"), 0.0F); float f2 = Util.getFloat(paramJSONObject.optString("longitude"), 0.0F); String str1 = l.agD(paramJSONObject.optString("name")); String str2 = l.agD(paramJSONObject.optString("address")); try { i = Util.getInt(paramJSONObject.optString("scale"), 0); paramJSONObject = new Intent(); paramJSONObject.putExtra("map_view_type", 10); paramJSONObject.putExtra("kwebmap_slat", f1); paramJSONObject.putExtra("kwebmap_lng", f2); if (i > 0) { paramJSONObject.putExtra("kwebmap_scale", i); } paramJSONObject.putExtra("kPoiName", str1); paramJSONObject.putExtra("Kwebmap_locaion", str2); AppMethodBeat.o(329232); return paramJSONObject; } catch (Exception paramJSONObject) { for (;;) { int i = 0; } } return null; } catch (Exception paramJSONObject) { AppMethodBeat.o(329232); } } public void a(f paramf, JSONObject paramJSONObject, int paramInt) { AppMethodBeat.i(46385); paramJSONObject = al(paramJSONObject); if (paramJSONObject == null) { paramf.callback(paramInt, ZP("fail:invalid data")); AppMethodBeat.o(46385); return; } Context localContext = paramf.getContext(); if (localContext == null) { paramf.callback(paramInt, ZP("fail:internal error invalid android context")); AppMethodBeat.o(46385); return; } com.tencent.mm.br.c.b(localContext, "location", ".ui.RedirectUI", paramJSONObject); paramf.callback(paramInt, ZP("ok")); AppMethodBeat.o(46385); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar * Qualified Name: com.tencent.mm.plugin.appbrand.jsapi.m.q * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
9fe54dc80c40374fac589c92f276bf0e97928854
1c9bdf7e53599fa79f4e808a6daf1bab08b35a00
/peach/app/src/main/java/com/xygame/second/sg/Group/bean/TransferChatBean.java
ecbc6b39252f0db02309c46fe2ddc0a0b96dced7
[]
no_license
snoylee/GamePromote
cd1380613a16dc0fa8b5aa9656c1e5a1f081bd91
d017706b4d6a78b5c0a66143f6a7a48fcbd19287
refs/heads/master
2021-01-21T20:42:42.116142
2017-06-18T07:59:38
2017-06-18T07:59:38
94,673,520
0
0
null
null
null
null
UTF-8
Java
false
false
417
java
package com.xygame.second.sg.Group.bean; import org.jivesoftware.smackx.muc.MultiUserChat; import java.io.Serializable; /** * Created by tony on 2016/9/8. */ public class TransferChatBean implements Serializable { private MultiUserChat chat; public MultiUserChat getChat() { return chat; } public void setChat(MultiUserChat chat) { this.chat = chat; } }
[ "litieshan549860123@126.com" ]
litieshan549860123@126.com
3b123197893ceb2d394d71226f5d1d8dcca3f624
4a7dccf38e0c106fd4da00e96ac972c2a76ae1ed
/gerrit-server/src/main/java/com/google/gerrit/server/account/InternalGroupBackend.java
84660ece7df92a2810713cf3778c2f166da2bd97
[ "Apache-2.0" ]
permissive
power9li/gerrit-mirro
22fb54b4b42fb633e356513209f7c10c8bb4eab5
d33d4104ea38cb27e66b72a3aac1f37bc785582e
refs/heads/master
2022-12-22T13:52:18.433071
2016-10-14T06:57:59
2016-10-14T06:57:59
70,809,607
0
2
Apache-2.0
2022-12-10T22:01:23
2016-10-13T13:31:42
Java
UTF-8
Java
false
false
3,053
java
// Copyright (C) 2012 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.google.gerrit.server.account; import static java.util.stream.Collectors.toList; import com.google.gerrit.common.data.GroupDescription; import com.google.gerrit.common.data.GroupDescriptions; import com.google.gerrit.common.data.GroupReference; import com.google.gerrit.reviewdb.client.AccountGroup; import com.google.gerrit.server.IdentifiedUser; import com.google.gerrit.server.project.ProjectControl; import com.google.inject.Inject; import com.google.inject.Singleton; import org.eclipse.jgit.lib.ObjectId; import java.util.Collection; import java.util.stream.StreamSupport; /** Implementation of GroupBackend for the internal group system. */ @Singleton public class InternalGroupBackend implements GroupBackend { private final GroupControl.Factory groupControlFactory; private final GroupCache groupCache; private final IncludingGroupMembership.Factory groupMembershipFactory; @Inject InternalGroupBackend(GroupControl.Factory groupControlFactory, GroupCache groupCache, IncludingGroupMembership.Factory groupMembershipFactory) { this.groupControlFactory = groupControlFactory; this.groupCache = groupCache; this.groupMembershipFactory = groupMembershipFactory; } @Override public boolean handles(AccountGroup.UUID uuid) { // See AccountGroup.isInternalGroup return ObjectId.isId(uuid.get()); // [0-9a-f]{40}; } @Override public GroupDescription.Internal get(AccountGroup.UUID uuid) { if (!handles(uuid)) { return null; } AccountGroup g = groupCache.get(uuid); if (g == null) { return null; } return GroupDescriptions.forAccountGroup(g); } @Override public Collection<GroupReference> suggest(final String name, final ProjectControl project) { return StreamSupport.stream(groupCache.all().spliterator(), false) .filter(group -> // startsWithIgnoreCase && isVisible group.getName().regionMatches(true, 0, name, 0, name.length()) && groupControlFactory.controlFor(group).isVisible()) .map(GroupReference::forGroup) .collect(toList()); } @Override public GroupMembership membershipsOf(IdentifiedUser user) { return groupMembershipFactory.create(user); } @Override public boolean isVisibleToAll(AccountGroup.UUID uuid) { GroupDescription.Internal g = get(uuid); return g != null && g.getAccountGroup().isVisibleToAll(); } }
[ "power9li@github.com" ]
power9li@github.com
f63a7d38ddfed42745febb16dc538d1e6c3036e6
7b82d70ba5fef677d83879dfeab859d17f4809aa
/tmp/sys/demo/07-spring-aop/src/main/java/com/zccoder/demo/spring/aop/mark/MyService.java
31cdbc0e981b48106e9b1a392802729988416c66
[]
no_license
apollowesley/jun_test
fb962a28b6384c4097c7a8087a53878188db2ebc
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
refs/heads/main
2022-12-30T20:47:36.637165
2020-10-13T18:10:46
2020-10-13T18:10:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
300
java
package com.zccoder.demo.spring.aop.mark; import org.springframework.stereotype.Component; /** * 自定义服务 * * @author zc 2020-04-24 */ @Component public class MyService { @Mark public void doService() { // 该方法会被拦截 System.out.println("ss"); } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
e30a4460df821a46cd3fc6f727dbeff398795e40
be4dcae13ec8ea3e3ec61869febef96d91ddb200
/exceptions/src/main/java/NeverCaught.java
b1180615331e87306b547e8a35dc94487f293378
[]
no_license
zcdJason/java8-maven
32379e852c48870f114c2fa8d749a26ac2b50694
db7dea9d4a04384a269d0c5cefa23682f7c89beb
refs/heads/master
2023-07-11T04:06:37.303186
2021-08-16T01:50:39
2021-08-16T01:50:39
395,219,459
0
0
null
null
null
null
UTF-8
Java
false
false
698
java
// exceptions/NeverCaught.java // (c)2017 MindView LLC: see Copyright.txt // We make no guarantees that this code is fit for any purpose. // Visit http://OnJava8.com for more book information. // Ignoring RuntimeExceptions // {ThrowsException} public class NeverCaught { static void f() { throw new RuntimeException("From f()"); } static void g() { f(); } public static void main(String[] args) { g(); } } /* Output: ___[ Error Output ]___ Exception in thread "main" java.lang.RuntimeException: From f() at NeverCaught.f(NeverCaught.java:7) at NeverCaught.g(NeverCaught.java:10) at NeverCaught.main(NeverCaught.java:13) */
[ "736777445@qq.com" ]
736777445@qq.com
7fe927e891d4c95bb3dec6adfc8bc003cfa0ad07
9b7780f95ef454fc586d914263aa7baf15196f56
/ADSI_1349397_trimestre_5/Tidsplan/03-Desarrollo/Codigo fuente/Version-3/TidsplanJPA/src/main/java/co/edu/sena/tidsplanjpa/controller/factory/ActivityFactory.java
fb8df6beda4ea8d45cdf59fedf17ba92ec1258a0
[]
no_license
davidbcaro/ADSI
eaa3cddc4c7225e2fa90bb6c34b792f711294609
5fab220093b0cf3a1d495baa072c3f18107aedb4
refs/heads/master
2022-09-15T14:21:47.912849
2019-06-23T13:02:05
2019-06-23T13:02:05
179,738,287
1
1
null
2022-08-31T23:05:47
2019-04-05T18:54:09
HTML
UTF-8
Java
false
false
677
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 co.edu.sena.tidsplanjpa.controller.factory; import co.edu.sena.tidsplanjpa.controller.dao.ActivityDao; import co.edu.sena.tidsplanjpa.controller.dao.TrimesterDao; import co.edu.sena.tidsplanjpa.controller.dao.mysql.ActivityDaoImpl; import co.edu.sena.tidsplanjpa.controller.dao.mysql.TrimesterDaoImpl; /** * * @author 1349397 */ public class ActivityFactory { public static ActivityDao create(Class entityClass){ return new ActivityDaoImpl(entityClass); } }
[ "davidbcaro@gmail.com" ]
davidbcaro@gmail.com
5711a3597bfdbf11122e2ee2682dddee4594f850
256a3596eb3a9c694d2015b173c51b4e20b82ae0
/DailyRhythmPortal/drp-ws-client/target/generated-sources/wsimport/com/bestbuy/bbym/ise/iseclientacdsshipping/MessageMetatDataBaseType.java
f294ced18a22487b35de9d513b9050f94df776fe
[]
no_license
sellasiyer/maven-drp
a8487325586bb6018d08a6cdb4078ce0ef5d5989
cbbab7027e1ee64cdaf9956a82c6ad964bb9ec86
refs/heads/master
2021-01-01T19:15:47.427243
2012-11-03T13:04:14
2012-11-03T13:04:14
5,146,773
0
0
null
null
null
null
UTF-8
Java
false
false
5,177
java
package com.bestbuy.bbym.ise.iseclientacdsshipping; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * Metadata base type to define * * <p>Java class for MessageMetatDataBaseType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="MessageMetatDataBaseType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{http://www.tsh.bestbuy.com/common/metadata/fields/v1}Version" minOccurs="0"/> * &lt;element ref="{http://www.tsh.bestbuy.com/common/metadata/fields/v1}SourceID" minOccurs="0"/> * &lt;element ref="{http://www.tsh.bestbuy.com/common/metadata/fields/v1}UserID" minOccurs="0"/> * &lt;element ref="{http://www.tsh.bestbuy.com/common/metadata/fields/v1}ProgramID" minOccurs="0"/> * &lt;element ref="{http://www.tsh.bestbuy.com/common/metadata/fields/v1}MessageID" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MessageMetatDataBaseType", namespace = "http://www.tsh.bestbuy.com/common/metadata/components/v2", propOrder = { "version", "sourceID", "userID", "programID", "messageID" }) public abstract class MessageMetatDataBaseType { @XmlElement(name = "Version", namespace = "http://www.tsh.bestbuy.com/common/metadata/fields/v1") protected Integer version; @XmlElement(name = "SourceID", namespace = "http://www.tsh.bestbuy.com/common/metadata/fields/v1") protected String sourceID; @XmlElement(name = "UserID", namespace = "http://www.tsh.bestbuy.com/common/metadata/fields/v1") protected String userID; @XmlElement(name = "ProgramID", namespace = "http://www.tsh.bestbuy.com/common/metadata/fields/v1") protected String programID; @XmlElement(name = "MessageID", namespace = "http://www.tsh.bestbuy.com/common/metadata/fields/v1") protected String messageID; /** * Whenever service interface is changed in such a way that the * new service is backward compatible with existing deployments, minor version of service interface MUST be incremented. * Major version will remain same in this case. In cases where the consumers are invoking the existing definitions of the * service and not the new compatible changes in the service, the minor version in request message can continue to be the * older value before the change. * * @return * possible object is * {@link Integer } * */ public Integer getVersion() { return version; } /** * Sets the value of the version property. * * @param value * allowed object is * {@link Integer } * */ public void setVersion(Integer value) { this.version = value; } /** * The Id of the source system which is originating this object. * * @return * possible object is * {@link String } * */ public String getSourceID() { return sourceID; } /** * Sets the value of the sourceID property. * * @param value * allowed object is * {@link String } * */ public void setSourceID(String value) { this.sourceID = value; } /** * User Identifier from the application who requests for the object creation * * * @return * possible object is * {@link String } * */ public String getUserID() { return userID; } /** * Sets the value of the userID property. * * @param value * allowed object is * {@link String } * */ public void setUserID(String value) { this.userID = value; } /** * Program Id of the application which is originating this object * * * @return * possible object is * {@link String } * */ public String getProgramID() { return programID; } /** * Sets the value of the programID property. * * @param value * allowed object is * {@link String } * */ public void setProgramID(String value) { this.programID = value; } /** * This MENDATORY element (of type String) conveys unique [message id] property. * * * @return * possible object is * {@link String } * */ public String getMessageID() { return messageID; } /** * Sets the value of the messageID property. * * @param value * allowed object is * {@link String } * */ public void setMessageID(String value) { this.messageID = value; } }
[ "sella.s.iyer@gmail.com" ]
sella.s.iyer@gmail.com
9b9059549e3c9b02bf2ba39271e11aa000eb10a6
e01b5e6abbf877b133a2895ce0989f6bd5e85e50
/bears/src/main/java/com/sunsta/bear/faster/StringUtils.java
cfa00d0e609c1b8f5ef32e4456fabb04a31b0971
[ "Apache-2.0" ]
permissive
qydq/bear
0725fc737143b4c5ac50fd09b10bb697d259a0fc
6a7ae945e3bf21cf338b0e575f3006911e57ffe1
refs/heads/main
2023-04-19T08:13:00.136467
2021-04-16T13:08:27
2021-04-16T13:08:27
357,509,611
0
0
null
null
null
null
UTF-8
Java
false
false
2,868
java
package com.sunsta.bear.faster; import android.annotation.SuppressLint; import android.content.Context; import android.text.Spannable; import android.text.SpannableString; import android.text.style.RelativeSizeSpan; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.StringRes; import com.sunsta.bear.AnApplication; import com.sunsta.bear.R; import com.sunsta.bear.config.PictureMimeType; import java.util.regex.Pattern; /** * @author:luck * @data:2017/5/25 19:12 * @描述: String Utils */ public class StringUtils { public static void tempTextFont(TextView tv, int mimeType) { String text = tv.getText().toString().trim(); String str = mimeType == PictureMimeType.ofAudio() ? tv.getContext().getString(R.string.picture_empty_audio_title) : tv.getContext().getString(R.string.picture_empty_title); String sumText = str + text; Spannable placeSpan = new SpannableString(sumText); placeSpan.setSpan(new RelativeSizeSpan(0.8f), str.length(), sumText.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); tv.setText(placeSpan); } /** * 匹配数值 * @param str * @return */ public static int stringToInt(String str) { Pattern pattern = Pattern.compile("^[-\\+]?[\\d]+$"); return pattern.matcher(str).matches() ? Integer.valueOf(str) : 0; } /** * 根据类型获取相应的Toast文案 * @param context * @param mimeType * @param maxSelectNum * @return */ @SuppressLint("StringFormatMatches") public static String getMsg(Context context, String mimeType, int maxSelectNum) { if (PictureMimeType.eqVideo(mimeType)) { return context.getString(R.string.picture_message_video_max_num, maxSelectNum); } else if (PictureMimeType.eqAudio(mimeType)) { return context.getString(R.string.picture_message_audio_max_num, maxSelectNum); } else { return context.getString(R.string.picture_message_max_num, maxSelectNum); } } /** * 重命名相册拍照 * @param fileName * @return */ public static String rename(String fileName) { String temp = fileName.substring(0, fileName.lastIndexOf(".")); String suffix = fileName.substring(fileName.lastIndexOf(".")); return temp + "_" + DateUtils.getCreateFileName() + suffix; } /** * 重命名后缀 * @param fileName * @return */ public static String renameSuffix(String fileName, String suffix) { String temp = fileName.substring(0, fileName.lastIndexOf(".")); return temp + suffix; } public static String getString(@StringRes int resId) { return AnApplication.getApplication().getString(resId); } }
[ "qyddai@163.com" ]
qyddai@163.com
649d6c6b5f420ed888d09eb31009c49adb40652f
fd066712bcbc2e9d3c51e7ca88e2f3db8d8db7db
/codding/src/main/java/net/neoremind/mycode/argorithm/leetcode/LargestNumber.java
b9ff7ef6f4414f43c01c561b555122f68251a4a4
[]
no_license
DongZcC/coddding
ee88acb9d005b2743bf28fb90b134c3419036d27
bb91b4582adbd5091e82d46002175a924559fd36
refs/heads/master
2022-10-17T12:00:03.510024
2022-10-11T01:15:38
2022-10-11T01:15:38
161,160,347
0
1
null
2018-12-10T10:53:35
2018-12-10T10:53:34
null
UTF-8
Java
false
false
3,602
java
package net.neoremind.mycode.argorithm.leetcode; import static org.junit.Assert.assertThat; import java.util.Arrays; import org.hamcrest.Matchers; import org.junit.Test; /** * 179. Largest Number My Submissions QuestionEditorial Solution * Total Accepted: 45603 Total Submissions: 237838 Difficulty: Medium * Given a list of non negative integers, arrange them such that they form the largest number. * <p> * For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. * <p> * Note: The result may be very large, so you need to return a string instead of an integer. * <p> * Credits: * Special thanks to @ts for adding this problem and creating all test cases. * <p> * Subscribe to see which companies asked this question * <p> * Hide Tags Sort * <p> * 一开始的想法就是排序,大思路首先正确,就是需要实现自己的排序策略。可以使用各种排序算法,比如选择、快排等。 * <p> * 但是排序的策略,应该利用int转为str来比较的思路。 * <p> * 一直陷入,两个int,应该如何从高位比较到低位,当时的想法是比较高位,直到发现不同的位,则比较不同的位。 * 例如,384 > 3125 * 但是这里有一个坑,就是384 > 3842,因为 * 1)有公共最长前缀384, * 2)公共最长前缀已经到了末尾 * 3)另外一个数字末尾这个2比首位3小 * 这三个条件极其难写算法去实现,会有很多边界条件和额外的计算量。 * 因此不要陷入数字计算的陷阱里,而是想着用字符串比较或者使用jdk的函数式编程思想(例如{@link #largestNumber2(int[])}) * * @author zhangxu */ public class LargestNumber { @Test public void testLargestNumber() { String[] tests = {"34", "3"}; // 343 > 334 因此compareTo返回1,那么就说明s1比s2大,也就是34>3,因此排序后数组是[3, 34],但是实际我们要的是34,3,这样组成的数字更大,所以先比较s2+s1 Arrays.sort(tests, (String s1, String s2) -> (s1 + s2).compareTo(s2 + s1)); System.out.println(Arrays.toString(tests)); int[] nums = new int[] {34, 30}; String str = largestNumber(nums); System.out.println(str); assertThat(str, Matchers.is("3430")); nums = new int[] {0, 0}; str = largestNumber(nums); System.out.println(str); assertThat(str, Matchers.is("0")); nums = new int[] {3, 30, 34, 5, 9}; str = largestNumber2(nums); System.out.println(str); assertThat(str, Matchers.is("9534330")); } public String largestNumber2(int[] num) { String[] array = Arrays.stream(num).mapToObj(String::valueOf).toArray(String[]::new); Arrays.sort(array, (String s1, String s2) -> (s2 + s1).compareTo(s1 + s2)); return Arrays.stream(array).reduce((x, y) -> x.equals("0") ? y : x + y).get(); // Arrays.stream(array).reduce("", (x, y) -> x.equals("0") ? y : x + y); } public String largestNumber(int[] nums) { if (nums == null || nums.length == 0) { return ""; } String[] numsStr = new String[nums.length]; for (int i = 0; i < nums.length; i++) { numsStr[i] = nums[i] + ""; } Arrays.sort(numsStr, (o1, o2) -> (o2 + o1).compareTo(o1 + o2)); StringBuilder sb = new StringBuilder(); for (String str : numsStr) { sb.append(str); } if (sb.charAt(0) == '0') { return "0"; } return sb.toString(); } }
[ "notyetfish@hotmail.com" ]
notyetfish@hotmail.com
7575a7ef7619babb0e3522dd91e11cdc0ac2cf31
ab97a8915347c76d05d6690dbdbcaf23d7f0d1fd
/chrome/android/features/keyboard_accessory/junit/src/org/chromium/chrome/browser/keyboard_accessory/all_passwords_bottom_sheet/AllPasswordsBottomSheetControllerTest.java
2b94e6b792888f8d25633c7dd7a4ab96cb5d0035
[ "BSD-3-Clause" ]
permissive
laien529/chromium
c9eb243957faabf1b477939e3b681df77f083a9a
3f767cdd5c82e9c78b910b022ffacddcb04d775a
refs/heads/master
2022-11-28T00:28:58.669067
2020-08-20T08:37:31
2020-08-20T08:37:31
288,961,699
1
0
BSD-3-Clause
2020-08-20T09:21:57
2020-08-20T09:21:56
null
UTF-8
Java
false
false
2,449
java
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.keyboard_accessory.all_passwords_bottom_sheet; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.verify; import static org.chromium.chrome.browser.keyboard_accessory.all_passwords_bottom_sheet.AllPasswordsBottomSheetProperties.DISMISS_HANDLER; import static org.chromium.chrome.browser.keyboard_accessory.all_passwords_bottom_sheet.AllPasswordsBottomSheetProperties.SHEET_ITEMS; import static org.chromium.chrome.browser.keyboard_accessory.all_passwords_bottom_sheet.AllPasswordsBottomSheetProperties.VISIBLE; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.robolectric.annotation.Config; import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.test.util.browser.Features; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; import org.chromium.ui.modelutil.PropertyModel; /** * Controller tests for the all passwords bottom sheet. */ @RunWith(BaseRobolectricTestRunner.class) @Config(manifest = Config.NONE) @Features.EnableFeatures(ChromeFeatureList.FILLING_PASSWORDS_FROM_ANY_ORIGIN) public class AllPasswordsBottomSheetControllerTest { @Mock private AllPasswordsBottomSheetCoordinator.Delegate mMockDelegate; private final AllPasswordsBottomSheetMediator mMediator = new AllPasswordsBottomSheetMediator(); private PropertyModel mModel; @Before public void setUp() { MockitoAnnotations.initMocks(this); mModel = AllPasswordsBottomSheetProperties.createDefaultModel(mMediator::onDismissed); mMediator.initialize(mMockDelegate, mModel); } @Test public void testCreatesValidDefaultModel() { assertNotNull(mModel.get(SHEET_ITEMS)); assertNotNull(mModel.get(DISMISS_HANDLER)); assertThat(mModel.get(VISIBLE), is(false)); } @Test public void testCallsDelegateOnDismiss() { mMediator.onDismissed(BottomSheetController.StateChangeReason.BACK_PRESS); verify(mMockDelegate).onDismissed(); } }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
eab4b5c98fd6f0cce551d000e1e8f803d32831c3
82c593f4a668ae176738bb6b928d33ae2bae87ec
/HackJava/DetectLatLan.java
2111c4fb2e21a90295f72f90f4eb2cd519fd896c
[]
no_license
ajay-sreeram/My-Coding-Practice
02db43b8d31e7ffb590c1b0aa8f012a3623ffd83
0a6308f26cba44137f032e91703cac8934b2f9a8
refs/heads/master
2021-06-05T02:39:36.776488
2018-04-07T19:57:56
2018-04-07T19:57:56
32,878,814
0
0
null
null
null
null
UTF-8
Java
false
false
907
java
import java.io.*; import java.util.regex.*; public class DetectLatLan { public static void main(String[] args)throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=br.readLine(); String reg="\\(([+|-]|)((([1-8][0-9])|([1-9])|([9][0])|([1-9]))|((([1-8][0-9])|([1-9])|([9][0])||([1-9]))(\\.[0-9]{1,11}))),\\s([+|-]|)(([1][8][0])|([1][8][0]\\.[0]{1,9})|(([1][0-7][0-9])|([2-9][0-9])|([1-9]))|((([1][0-7][0-9])|([2-9][0-9])|([1-9]))\\.[0-9]{1,11}))\\)"; //String reg="\\(([+|-]|)([1-8]?[0-9]|90)\\.[0-9]{1,11},\\s([+|-]|)((1?[0-7]?|[0-9]?)[0-9]|180)\\.[0-9]{1,11}\\)"; //String reg="\\(([+|-]|)([1-8]?[0-9]|90)\\.[0-9]{1,11},\\s([+|-]|)((1?[0-7]?|[0-9]?)[0-9]|180)\\.[0-9]{1,11}\\)"; Pattern p = Pattern.compile(reg); if(p.matcher(line).matches()){ System.out.println("TRUE"); }else{ System.out.println("FALSE"); } } }
[ "sreeram.ajay18@gmail.com" ]
sreeram.ajay18@gmail.com
3514192d54dae4f44f7718df03065f4665f35251
b111b77f2729c030ce78096ea2273691b9b63749
/oreilly-gradle-book-examples/testing-junitforkedthreads/src/test/java/org/gradle/example/simple/TestPerson781.java
a07d5e2c9da6072f61a49f5989f0f96f645b2692
[]
no_license
WeilerWebServices/Gradle
a1a55bdb0dd39240787adf9241289e52f593ccc1
6ab6192439f891256a10d9b60f3073cab110b2be
refs/heads/master
2023-01-19T16:48:09.415529
2020-11-28T13:28:40
2020-11-28T13:28:40
256,249,773
1
0
null
null
null
null
UTF-8
Java
false
false
518
java
package org.gradle.example.simple; import org.gradle.example.simple.Person; import org.junit.Test; import static org.junit.Assert.*; public class TestPerson781 { @Test public void testPerson() { Person p = new Person(); p.setAge(20); p.setName("Fird Birfle"); p.setSalary(195750.22); assertEquals(215325.242, p.calculateBonus(), 0.01); assertEquals("The Honorable Fird Birfle", p.becomeJudge()); assertEquals(30, p.timeWarp()); p.wasteTime(); } }
[ "nateweiler84@gmail.com" ]
nateweiler84@gmail.com
7254d30fb47db47c5774fa5b3cd85b2a1e19a8da
52abb3f9d6f5747ba9a7abeda455767f524a0898
/sp/src/test/java/com/sp/web/scheduler/feed/CompanyActivityFeedSchedulerTest.java
0ffa2e1bc2da2771259026d1a1673b8059bca10c
[]
no_license
srayapatipolarits/ECSandCFN
251e474be9e76126bdd9244a480087eb9e28c039
1c16f7eebc6856afc47ad712fe7c1d160ffd3e84
refs/heads/master
2020-03-17T06:32:43.155453
2018-05-01T13:19:34
2018-05-01T13:19:34
133,360,061
1
0
null
2018-05-14T12:51:34
2018-05-14T12:51:34
null
UTF-8
Java
false
false
5,593
java
package com.sp.web.scheduler.feed; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; import com.sp.web.Constants; import com.sp.web.model.SPFeature; import com.sp.web.model.User; import com.sp.web.model.feed.DashboardMessage; import com.sp.web.model.feed.DashboardMessageType; import com.sp.web.model.feed.SPActivityFeed; import com.sp.web.model.feed.SPDashboardPostData; import com.sp.web.model.log.LogActionType; import com.sp.web.model.tracking.ActivityTracking; import com.sp.web.mvc.test.setup.SPTestLoggedInBase; import com.sp.web.repository.feed.SPDashboardPostDataRepository; import com.sp.web.service.tracking.ActivityTrackingFactory; import com.sp.web.service.tracking.ActivityTrackingHelper; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import java.time.LocalDateTime; import java.util.List; public class CompanyActivityFeedSchedulerTest extends SPTestLoggedInBase { @Autowired CompanyActivityFeedScheduler scheduler; @Autowired SPDashboardPostDataRepository activityFeedsRepository; @Autowired ActivityTrackingFactory activityTrackingFactory; @Autowired ActivityTrackingHelper activityTrackingHelper; @Test public void testScheduler() { try { dbSetup.removeAll("sPDashboardPostData"); dbSetup.removeAll("companyNewsFeed"); dbSetup.removeAll("dashboardMessage"); dbSetup.removeAll("activityTracking"); scheduler.process(); List<DashboardMessage> all = dbSetup.getAll(DashboardMessage.class); assertThat(all, is(empty())); // creating the dashboard post data SPDashboardPostData dashboardPostData = createDashboardPostData(); final List<SPActivityFeed> activityFeeds = dashboardPostData.getActivityFeeds(); scheduler.process(); all = dbSetup.getAll(DashboardMessage.class); assertThat(all, is(empty())); SPActivityFeed activityFeed = new SPActivityFeed(SPFeature.Hiring, "Something to do with SP Match."); activityFeeds.add(activityFeed); activityFeedsRepository.save(dashboardPostData); scheduler.process(); all = dbSetup.getAll(DashboardMessage.class); assertThat(all, is(empty())); dashboardPostData = activityFeedsRepository.findById(Constants.DEFAULT_COMPANY_ID); final List<SPActivityFeed> activityFeeds2 = dashboardPostData.getActivityFeeds(); activityFeed = new SPActivityFeed(SPFeature.Prism, "Something to do with Prism."); activityFeeds2.add(activityFeed); activityFeedsRepository.save(dashboardPostData); scheduler.process(); all = dbSetup.getAll(DashboardMessage.class); assertThat(all, hasSize(1)); assertThat(all.get(0).getType(), is(DashboardMessageType.SPActivityFeed)); scheduler.process(); all = dbSetup.getAll(DashboardMessage.class); assertThat(all, hasSize(2)); assertThat(all.get(0).getType(), is(DashboardMessageType.SPActivityFeed)); assertThat(all.get(1).getType(), is(DashboardMessageType.SPActivityFeed)); User user = dbSetup.getUser("admin@admin.com"); // adding activity tracking activityTrackingHelper.trackActivity(user, LogActionType.RelationshipAdvisor, null); // sleeping for data to get tracked Thread.sleep(1000); scheduler.process(); all = dbSetup.getAll(DashboardMessage.class); assertThat(all, hasSize(3)); assertThat(all.get(0).getType(), is(DashboardMessageType.SPActivityFeed)); assertThat(all.get(1).getType(), is(DashboardMessageType.SPActivityFeed)); assertThat(all.get(2).getType(), is(DashboardMessageType.UserActivity)); List<ActivityTracking> all2 = dbSetup.getAll(ActivityTracking.class); ActivityTracking activityTracking = all2.get(0); activityTracking.setPostedToDashboard(false); activityTracking.setCreatedOn(LocalDateTime.now().minusDays(4)); activityTrackingFactory.create(activityTracking); scheduler.process(); all = dbSetup.getAll(DashboardMessage.class); assertThat(all, hasSize(4)); assertThat(all.get(0).getType(), is(DashboardMessageType.SPActivityFeed)); assertThat(all.get(1).getType(), is(DashboardMessageType.SPActivityFeed)); assertThat(all.get(2).getType(), is(DashboardMessageType.UserActivity)); assertThat(all.get(3).getType(), is(DashboardMessageType.SPActivityFeed)); activityTracking.setCreatedOn(LocalDateTime.now().minusDays(3)); activityTrackingFactory.create(activityTracking); scheduler.process(); all = dbSetup.getAll(DashboardMessage.class); assertThat(all, hasSize(5)); assertThat(all.get(0).getType(), is(DashboardMessageType.SPActivityFeed)); assertThat(all.get(1).getType(), is(DashboardMessageType.SPActivityFeed)); assertThat(all.get(2).getType(), is(DashboardMessageType.UserActivity)); assertThat(all.get(3).getType(), is(DashboardMessageType.SPActivityFeed)); assertThat(all.get(4).getType(), is(DashboardMessageType.UserActivity)); } catch (Exception e) { e.printStackTrace(); fail("Error !!!"); } } private SPDashboardPostData createDashboardPostData() { final SPDashboardPostData activityFeeds = SPDashboardPostData.defaultInstance(); activityFeedsRepository.save(activityFeeds); return activityFeeds; } }
[ "root@ip-10-0-1-253.ec2.internal" ]
root@ip-10-0-1-253.ec2.internal
2fe0cf6e5944eb7f088f4b5e70b6e81119ec6176
9dc11d068f883b15a0fd45935a834c896b722ec0
/app/src/main/java/com/hotellook/booking/SearchInfoForBooking.java
d1a7c42b3748dfadff335ac79ccaef337a4dac4a
[ "Apache-2.0" ]
permissive
justyce2/HotellookDagger
7a44d9b263cbde0da05759119d9c01e9d2090dc6
7229312d711c6cb1f8fc5cfafb413a3c5aff6dbe
refs/heads/master
2020-03-31T21:04:23.472668
2016-07-27T09:03:11
2016-07-27T09:03:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package com.hotellook.booking; import java.util.List; public class SearchInfoForBooking { private final List<Integer> locations; private final String searchId; public SearchInfoForBooking(List<Integer> locations, String searchId) { this.locations = locations; this.searchId = searchId; } public List<Integer> locations() { return this.locations; } public String searchId() { return this.searchId; } }
[ "mdzht@mail.ru" ]
mdzht@mail.ru
852af50e7f2b40affaee3b9dc73a7f483fd5dacf
d76e76e2b6322b4a821ec18f67c03156d5b1e70f
/src/com/zsy/frame/sample/java/control/test/StringSubTest.java
9bae8c76bac1ac9a4bb5ae61c0de680ab73a2a8c
[]
no_license
sy-and/sample_java
f20749562741bedde83e824fc6653ab5859d0176
c54afe0509873499c59cf9f63d8ebe978e5ef0dd
refs/heads/main
2023-02-28T10:38:16.749939
2017-04-16T07:01:57
2017-04-16T07:01:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
401
java
package com.zsy.frame.sample.java.control.test; public class StringSubTest { public static void main(String[] args) { String temp = "防止空格换行css无法控制撑大页面,用正则表达式替换掉空格,所以截取前面100个字符,页面显示的内容多少用css控制"; System.out.println(temp.substring(0,10)); System.out.println(temp.substring(10,temp.length())); } }
[ "shengyouzhang@qq.com" ]
shengyouzhang@qq.com
c0da503c02fa0c19954589efe3824f1fac98b669
4a21ed2f5709ac8382754ca8ff73c4b19c228f10
/java28/src/java28/HandClockUser.java
2eece6069ec25d08e06732e5e6ef86f97ce6e243
[]
no_license
dbalswo1234/Java_mj
39094f11711edc8e72a5989c44ac73ff2e2c76de
3095578974de5f0b75005e8ad351ee3058551916
refs/heads/master
2020-04-07T14:57:23.098331
2019-01-23T05:46:42
2019-01-23T05:46:42
158,467,671
0
0
null
null
null
null
UTF-8
Java
false
false
422
java
package java28; public class HandClockUser { public static void main(String[] args) { RunHandClock run = new RunHandClock(); CookHandClock cook = new CookHandClock(); run.timeStop(); cook.timeStop(); HandClock hand = new RunHandClock(); //추상클래스는 객체생성이 불가하다. 그러나 업캐스팅의 대상은 될수있다. 이것은 업캐스팅의 한예. } }
[ "user@DESKTOP-7EQF3M8" ]
user@DESKTOP-7EQF3M8
216a428e34bc959362a42f0a469edb9b0e345496
e95908f3927bbfcdda59b613bed5ca4788b29457
/src/main/java/createNewHire/NewHire.java
e69033c868d239c9211b3b754b766a74aa74ee39
[]
no_license
mekanhan/AutoBoot
c408ed9e738bb7b729eb45e7c9a2f0bf7b64aad0
f08b60f8784e01f6c4ff678891bcd4cb0c7e89be
refs/heads/master
2022-11-20T04:56:53.523329
2020-07-17T08:23:40
2020-07-17T08:23:40
280,330,213
0
0
null
null
null
null
UTF-8
Java
false
false
1,097
java
package main.java.createNewHire;// Generated by Selenium IDE import org.junit.After; import org.junit.Before; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.Dimension; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import java.util.HashMap; import java.util.Map; public class NewHire { private WebDriver driver; @Test public void setUp() {//web driver location System.setProperty("webdriver.chrome.driver","E:\\Dropbox\\Google Drive\\NAU Boot Camp\\Selenium Course\\selenium-java-3.141.59\\drivers\\chromedriver.exe"); //web driver location WebDriver driver = new ChromeDriver(); //driver.manage().window().maximize(); // maximizes browser view driver.get("https://hr-testing.buffsci.org/"); // js = (JavascriptExecutor) driver; // vars = new HashMap<String, Object>(); } // @After // public void tearDown() { // driver.quit(); // } // @Test // public void NewHireTest() { // // } }
[ "mekjanhan@gmail.com" ]
mekjanhan@gmail.com
d73b4e06eb088465419486b6b507bd7da78f31b7
f7f0adb8eae65d746eb919896b6611ff1cc7dbb5
/app/src/main/java/com/cpigeon/book/module/menu/smalltools/lineweather/view/viewdeo/ILineWeatherView.java
56736281ec086dba707b9b3d05a2857cd4a59e68
[]
no_license
carleewang/BookBlood
d84fa1170d1afdefba1e73aebb16706e14c9564b
6c9715559a5972dcedbfb7698d312589fb8f1f87
refs/heads/master
2021-09-29T03:26:45.200449
2018-11-23T09:26:59
2018-11-23T09:26:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,693
java
package com.cpigeon.book.module.menu.smalltools.lineweather.view.viewdeo; import com.base.http.ApiResponse; import com.cpigeon.book.R; import com.cpigeon.book.http.RequestData; import com.cpigeon.book.module.menu.smalltools.lineweather.model.bean.AssociationListEntity; import com.cpigeon.book.module.menu.smalltools.lineweather.model.bean.GetGongPengListEntity; import com.cpigeon.book.module.menu.smalltools.lineweather.model.bean.GetSiFangDiEntity; import com.cpigeon.book.module.menu.smalltools.lineweather.model.bean.UllageToolEntity; import com.google.gson.reflect.TypeToken; import java.util.List; import java.util.Map; import io.reactivex.Observable; /** * Created by Administrator on 2018/5/9. */ public class ILineWeatherView { //获取公棚坐标信息 public static Observable<ApiResponse<List<GetGongPengListEntity>>> getTool_GetGongPengInfoData(String str) { return RequestData.<ApiResponse<List<GetGongPengListEntity>>>build() .setToJsonType(new TypeToken<ApiResponse<List<GetGongPengListEntity>>>() { }.getType()) .url(R.string.api_tool_get_gong_peng_info) .addBody("s", str) .request(); } //获取协会信息 public static Observable<ApiResponse<List<AssociationListEntity>>> getAssociationInfoData(String str, String p, String c) { return RequestData.<ApiResponse<List<AssociationListEntity>>>build() .setToJsonType(new TypeToken<ApiResponse<List<AssociationListEntity>>>() { }.getType()) .url(R.string.api_XH_GetUsersList) .addBody("skey", str) .addBody("c", c) .addBody("p", p) .request(); } //获取公棚坐标信息 public static Observable<ApiResponse<List<GetSiFangDiEntity>>> getTool_GetSiFangDiData(String str) { return RequestData.<ApiResponse<List<GetSiFangDiEntity>>>build() .setToJsonType(new TypeToken<ApiResponse<List<GetSiFangDiEntity>>>() { }.getType()) .url(R.string.api_tool_get_sfd_info) .addBody("s", str) .request(); } //获取公棚坐标信息 public static Observable<ApiResponse<UllageToolEntity>> getKongju(Map<String, String> body) { return RequestData.<ApiResponse<UllageToolEntity>>build() .setToJsonType(new TypeToken<ApiResponse<UllageToolEntity>>() { }.getType()) .url(R.string.api_get_kongju) .addList(body) .request(); } }
[ "you@example.com" ]
you@example.com
7db70dc7645a0bc6616d357c9ad23d73d4a3df10
8cc622c0e1a3c0555912ac9293a6e4f273d9287e
/BeanPostProcessor/src/main/java/kr/co/softsoldesk/processor/TestBeanPostProcessor.java
597f0a302f0dc0e9fcc533c5c420a5fc37ef9790
[]
no_license
chaerim612/Spring_Basic
a475fec7c058f2bbb7c15712576c1ad2ded45104
094841643a8739dccc8965770639c6d5d89a9f72
refs/heads/main
2023-08-01T13:00:18.364799
2021-09-13T12:36:13
2021-09-13T12:36:13
402,276,800
0
0
null
null
null
null
UTF-8
Java
false
false
697
java
package kr.co.softsoldesk.processor; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; public class TestBeanPostProcessor implements BeanPostProcessor{ //호출 전 public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { System.out.println("Before"); switch(beanName) { case "t1": System.out.println("before t1"); break; case "t2": System.out.println("before t2"); } return bean; } //호출 후 public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { System.out.println("After"); return bean; } }
[ "86398466+chaerim612@users.noreply.github.com" ]
86398466+chaerim612@users.noreply.github.com
0c282ff6f6a622e39e38e7b85ce115ef1d0738f4
ca0e9689023cc9998c7f24b9e0532261fd976e0e
/src/com/tencent/mm/wallet_core/c/d.java
b69eb412a29f6e494be67fc42deec2deb99b5030
[]
no_license
honeyflyfish/com.tencent.mm
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
ce6e605ff98164359a7073ab9a62a3f3101b8c34
refs/heads/master
2020-03-28T15:42:52.284117
2016-07-19T16:33:30
2016-07-19T16:33:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
769
java
package com.tencent.mm.wallet_core.c; import com.tencent.mm.t.j; import com.tencent.mm.ui.MMActivity; public abstract class d { public MMActivity mix; public f miy; public d(MMActivity paramMMActivity, f paramf) { mix = paramMMActivity; miy = paramf; } public abstract boolean d(int paramInt1, int paramInt2, String paramString, j paramj); public abstract boolean k(Object... paramVarArgs); public CharSequence km(int paramInt) { return null; } public boolean o(Object... paramVarArgs) { return false; } public boolean p(Object... paramVarArgs) { return false; } } /* Location: * Qualified Name: com.tencent.mm.wallet_core.c.d * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
50eb242aee7ce1d81b507b85d78024ddc33b6127
2e1aee65bc0ce55132eb3cda469cacabb13b39b0
/src/bq_resume/airbnb/HouseManager.java
5f01b26584b556079cdb397630d8b69e8ce4a445
[]
no_license
iyangzeshi/techbow
f23a8a68a768dbbbabfd65505e31e72fe6148d01
55e22b7c2636b241c364e1a1dea0d9be7473acd4
refs/heads/master
2023-08-27T17:21:39.076035
2021-08-11T11:40:04
2021-10-28T20:37:22
321,618,539
5
3
null
null
null
null
UTF-8
Java
false
false
908
java
package bq_resume.airbnb; import bq_resume.airbnb.GeoLocation.Address; import java.util.ArrayList; import java.util.List; /* Created by FLK on 2020-01-01. singleton */ /*** singleton ***/ public class HouseManager { private static HouseManager instance = null; private HouseManager() { } public static HouseManager getInstance(){ if(instance == null) { synchronized (HouseManager.class) { if (instance == null) { instance = new HouseManager(); } } } return instance; } public List<House> searchByAddress(final Address address) { //Do some query operation or service call return new ArrayList<>(); } public List<House> searchByZipcode(final int zipcode) { //Do some query operation or service call return new ArrayList<>(); } }
[ "iyangzeshi@outlook.com" ]
iyangzeshi@outlook.com
a34f08d2cbe7cf6f14ddbd8dfe5b5f72175103c7
58dc95ed1ee4b6bb7c4c79d836b51bde59e069ca
/src/main/java/io/dummymaker/annotation/simple/GenBoolean.java
fb7003f5f8a1d8cbf6d5664441eed94ae1f98bba
[ "MIT" ]
permissive
morristech/dummymaker
f5f03c9e08a71a5fba2c784dc531555cf903b2b1
fdff8ebf116e90026994b38c8b3c08a8420a3550
refs/heads/master
2023-03-12T13:45:55.840611
2020-12-18T20:37:29
2020-12-18T20:37:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
523
java
package io.dummymaker.annotation.simple; import io.dummymaker.annotation.core.PrimeGen; import io.dummymaker.generator.simple.BooleanGenerator; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * @author GoodforGod * @see BooleanGenerator * @since 21.02.2018 */ @PrimeGen(BooleanGenerator.class) @Retention(value = RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface GenBoolean { }
[ "goodforgod.dev@gmail.com" ]
goodforgod.dev@gmail.com
5ff6ff9302809c32cffd2822c3275caa8c3e3886
551e123c9e17628e720f679d9f854bb82e8f80b6
/smallrye-reactive-messaging-provider/src/test/java/io/smallrye/reactive/messaging/inject/BeanInjectedWithAFlowableOfPayloadsUsingStream.java
16a1c887d9994805d813d5d32aa46524f0547054
[ "Apache-2.0" ]
permissive
misl/smallrye-reactive-messaging
a4460e8678f6798c071604e76db19c72d0774641
e257ac0993f82ec3d0239be040f37a549e900794
refs/heads/master
2020-12-20T06:53:21.950692
2020-01-21T19:04:52
2020-01-21T19:04:52
235,993,402
0
0
Apache-2.0
2020-01-24T11:49:17
2020-01-24T11:49:16
null
UTF-8
Java
false
false
877
java
package io.smallrye.reactive.messaging.inject; import java.util.List; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; import io.reactivex.Flowable; import io.smallrye.reactive.messaging.annotations.Stream; @ApplicationScoped public class BeanInjectedWithAFlowableOfPayloadsUsingStream { private final Flowable<String> constructor; @Inject @Stream("hello") private Flowable<String> field; @Inject public BeanInjectedWithAFlowableOfPayloadsUsingStream(@Stream("bonjour") Flowable<String> constructor) { this.constructor = constructor; } public List<String> consume() { return Flowable .concat( Flowable.fromPublisher(constructor), Flowable.fromPublisher(field)) .toList() .blockingGet(); } }
[ "clement.escoffier@gmail.com" ]
clement.escoffier@gmail.com
9d5c5addf7763a0f908be882f78ed244a705409d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/17/17_e6fb23b0e182d2f7e318195290646a933896b4ae/J2EEArchiveType/17_e6fb23b0e182d2f7e318195290646a933896b4ae_J2EEArchiveType_s.java
f86cf398139d34718dfb7602df2d91d2e04b3fde
[]
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
6,093
java
/** * JBoss, a Division of Red Hat * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.ide.eclipse.as.core.packages.types; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.wst.server.core.IModule; import org.eclipse.wst.server.core.IModuleArtifact; import org.eclipse.wst.server.core.internal.ServerPlugin; import org.jboss.ide.eclipse.archives.core.model.ArchiveNodeFactory; import org.jboss.ide.eclipse.archives.core.model.IArchive; import org.jboss.ide.eclipse.archives.core.model.IArchiveFileSet; import org.jboss.ide.eclipse.archives.core.model.IArchiveFolder; import org.jboss.ide.eclipse.archives.core.model.IArchiveNode; import org.jboss.ide.eclipse.archives.core.model.IArchiveType; /** * * @author rob.stryker@jboss.com */ public abstract class J2EEArchiveType implements IArchiveType { public static final String METAINF = "META-INF"; public static final String WEBINF = "WEB-INF"; public static final String CLASSES = "classes"; public static final String LIB = "lib"; public static final String WEBCONTENT = "WebContent"; public static final String EARCONTENT = "EarContent"; public static final String EJBMODULE = "ejbModule"; protected boolean isModuleType(IModule module, String moduleTypeId){ if(module.getModuleType()!=null && moduleTypeId.equals(module.getModuleType().getId())) return true; return false; } protected IModule getModule(String projectName) { IModuleArtifact moduleArtifacts[] = ServerPlugin.getModuleArtifacts(getProject(projectName)); if (moduleArtifacts != null && moduleArtifacts.length > 0) return moduleArtifacts[0].getModule(); else return null; } protected IProject getProject(String projectName) { return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); } // Find the source folder, then create the IPackage appropriately public static IArchive createGenericIArchive(IProject project, String deployDirectory, String packageName) { try { IJavaProject javaProject = JavaCore.create(project); Assert.isNotNull(javaProject); IPath sourcePath; try { sourcePath = javaProject.getOutputLocation(); } catch (JavaModelException e) { e.printStackTrace(); return null; } sourcePath = sourcePath.removeFirstSegments(1); IContainer sourcePathContainer; if( sourcePath.segmentCount() == 0 ) sourcePathContainer = project; else sourcePathContainer = project.getFolder(sourcePath); return createGenericIArchive(project, deployDirectory, packageName, sourcePathContainer); } catch( Exception e ) { e.printStackTrace(); } return null; } // Create a detached package with some generic settings public static IArchive createGenericIArchive(IProject project, String deployDirectory, String packageName, IContainer sourceContainer) { IArchive jar = ArchiveNodeFactory.createArchive(); if( deployDirectory != null ) { jar.setDestinationPath(new Path(deployDirectory)); jar.setInWorkspace(ResourcesPlugin.getWorkspace().getRoot().getLocation().isPrefixOf(new Path(deployDirectory))); jar.setExploded(false); } else { jar.setDestinationPath(project.getFullPath()); jar.setInWorkspace(true); jar.setExploded(false); } jar.setName(packageName); IArchiveFileSet classes = ArchiveNodeFactory.createFileset(); classes.setIncludesPattern("**/*"); classes.setSourcePath(sourceContainer.getFullPath()); classes.setInWorkspace(true); jar.addChild(classes); return jar; } public static IArchiveFolder addFolder(IProject project, IArchiveNode parent, String name) { IArchiveFolder folder = ArchiveNodeFactory.createFolder(); folder.setName(name); parent.addChild(folder); return folder; } public static IArchiveFileSet addFileset(IProject project, IArchiveNode parent, String sourcePath, String includePattern) { IArchiveFileSet fs = ArchiveNodeFactory.createFileset(); Assert.isNotNull(project); IJavaProject javaProject = JavaCore.create(project); Assert.isNotNull(javaProject); IContainer sourceContainer; if( sourcePath != null && !sourcePath.equals("")) { Path p = new Path(sourcePath); IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); sourceContainer = p.segmentCount() != 1 ? (IContainer)root.getFolder(p) : root.getProject(p.segment(0)); } else { sourceContainer = project; } fs.setSourcePath(sourceContainer.getFullPath()); fs.setInWorkspace(true); fs.setIncludesPattern( includePattern == null ? "**/*" : includePattern ); parent.addChild(fs); return fs; } public abstract String getAssociatedModuleType(); }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1f23ac70262d80925170849a6e10077a65bcc073
745b525c360a2b15b8d73841b36c1e8d6cdc9b03
/jun_java_plugins/jun_jdk/src/main/java/com/jun/plugin/design/adapter/package-info.java
d7d8d8b7898cdada148afe373953f36f3f897bb8
[ "Apache-2.0" ]
permissive
wujun728/jun_java_plugin
1f3025204ef5da5ad74f8892adead7ee03f3fe4c
e031bc451c817c6d665707852308fc3b31f47cb2
refs/heads/master
2023-09-04T08:23:52.095971
2023-08-18T06:54:29
2023-08-18T06:54:29
62,047,478
117
42
null
2023-08-21T16:02:15
2016-06-27T10:23:58
Java
UTF-8
Java
false
false
159
java
/** * @Title: package-info * @Description: 适配器模式 * @Version:1.0.0 * @author pancm * @date 2018年8月8日 */ package com.jun.plugin.design.adapter;
[ "wujun728@163.com" ]
wujun728@163.com
cab6eb02834bdc89d790197ff5b34347ca66a4f0
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/budejie/sources/com/bdj/picture/edit/b/a.java
9eb3f454c9f24cbb1f0dc295e7cdba588fa41b39
[]
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,311
java
package com.bdj.picture.edit.b; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase.CursorFactory; import android.database.sqlite.SQLiteOpenHelper; public class a extends SQLiteOpenHelper { public static final Object a = new Object(); private static a b = null; private Context c; private int d; public static synchronized a a(Context context) { a aVar; synchronized (a.class) { if (b == null) { b = new a(context, "ImageEditDB", null, 1); } aVar = b; } return aVar; } private a(Context context, String str, CursorFactory cursorFactory, int i) { super(context, str, cursorFactory, i); this.c = context; } public void onCreate(SQLiteDatabase sQLiteDatabase) { synchronized (a) { a(sQLiteDatabase); b(sQLiteDatabase); } } public void onUpgrade(SQLiteDatabase sQLiteDatabase, int i, int i2) { this.d = i; synchronized (a) { switch (i) { } } } private void a(SQLiteDatabase sQLiteDatabase) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("create table if not exists Sticker("); stringBuilder.append("id integer primary key not null, "); stringBuilder.append("category_id varchar(10), "); stringBuilder.append("category_parent_id varchar(10), "); stringBuilder.append("name varchar(100), "); stringBuilder.append("image_url varchar(100), "); stringBuilder.append("thumb_url varchar(100), "); stringBuilder.append("introduce varchar(100), "); stringBuilder.append("status varchar(10), "); stringBuilder.append("is_new varchar(10), "); stringBuilder.append("total_times varchar(100), "); stringBuilder.append("used_times varchar(100), "); stringBuilder.append("available_times varchar(100), "); stringBuilder.append("start_time varchar(100), "); stringBuilder.append("end_time varchar(100), "); stringBuilder.append("create_time varchar(100), "); stringBuilder.append("modify_time varchar(100), "); stringBuilder.append("admin varchar(100), "); stringBuilder.append("sub_category_name varchar(100), "); stringBuilder.append("local_path VARCHAR(100), "); stringBuilder.append("down_status VARCHAR(2) "); stringBuilder.append(")"); sQLiteDatabase.execSQL(stringBuilder.toString()); } private void b(SQLiteDatabase sQLiteDatabase) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("create table if not exists StickerCategory("); stringBuilder.append("id integer primary key not null, "); stringBuilder.append("parent_id varchar(10), "); stringBuilder.append("name varchar(100), "); stringBuilder.append("sort_id varchar(10), "); stringBuilder.append("status varchar(10), "); stringBuilder.append("create_time varchar(100), "); stringBuilder.append("modify_time varchar(100)"); stringBuilder.append(")"); sQLiteDatabase.execSQL(stringBuilder.toString()); } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
3621abf5db15c1ae0f154526ed8f2743c70b1261
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/gradle--gradle/18183d8c26d40f0294cfc0fb1c11e39700f7049a/before/Transformers.java
234c926c550ed5fe24d409e332450a722054492a
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
4,458
java
/* * Copyright 2012 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.gradle.api.internal; import org.gradle.api.Action; import org.gradle.api.Named; import org.gradle.api.Namer; import org.gradle.api.Transformer; import org.gradle.internal.UncheckedException; import java.net.MalformedURLException; import java.net.URI; import java.net.URL; /** * Utility transformers. */ public abstract class Transformers { /** * Creates a transformer that simply type casts the input to the given output type. * * @param outputType The type to cast the input to * @param <O> The type of the transformed object * @param <I> The type of the object to be transformed * @return A transformer that simply type casts the input to the given output type. */ public static <O, I> Transformer<O, I> cast(Class<O> outputType) { return new CastingTransformer<O, I>(outputType); } private static class CastingTransformer<O, I> implements Transformer<O, I> { final Class<O> outputType; public CastingTransformer(Class<O> outputType) { this.outputType = outputType; } public O transform(I input) { return Cast.cast(outputType, input); } } public static <T> Transformer<String, T> asString() { return new ToStringTransformer<T>(); } private static class ToStringTransformer<T> implements Transformer<String, T> { public String transform(T original) { return original == null ? null : original.toString(); } } /** * Returns a transformer that names {@link Named} objects. * * Nulls are returned as null. * * @return The naming transformer. */ public static Transformer<String, Named> name() { return name(new Named.Namer()); } /** * Returns a transformer that names objects with the given {@link Namer} * @param namer The namer to name the objects with * @param <T> The type of objects to be named * @return The naming transformer. */ public static <T> Transformer<String, T> name(Namer<? super T> namer) { return new ToNameTransformer<T>(namer); } private static class ToNameTransformer<T> implements Transformer<String, T> { private final Namer<? super T> namer; public ToNameTransformer(Namer<? super T> namer) { this.namer = namer; } public String transform(T thing) { return thing == null ? null : namer.determineName(thing); } } /** * A getClass() transformer. * * @param <T> The type of the object * @return A getClass() transformer. */ public static <T> Transformer<Class<T>, T> type() { return new Transformer<Class<T>, T>() { public Class<T> transform(T original) { @SuppressWarnings("unchecked") Class<T> aClass = (Class<T>) original.getClass(); return aClass; } }; } /** * Converts an {@link Action} to a {@link Transformer} that runs the action against the input value and returns {@code null}. */ public static <R, I> Transformer<R, I> toTransformer(final Action<? super I> action) { return new Transformer<R, I>() { public R transform(I original) { action.execute(original); return null; } }; } /** * Converts a URL to a URI */ public static Transformer<URL, URI> toURL() { return new Transformer<URL, URI>() { public URL transform(URI original) { try { return original.toURL(); } catch (MalformedURLException e) { throw UncheckedException.throwAsUncheckedException(e); } } }; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
2739c459043ceb66fa94784f29a3930890e8d26a
7a5c123e8dd5ce306a84c9d78fad019dd8ea4b56
/scanlibrary/src/main/java/com/scanlibrary/ReOrderDocFragment.java
8c94dfa7c6b33c25dc81aa40ec2f9e2e85cc680f
[]
no_license
MeghaPatel2022/Doc-Scanner
777ad2d94d25f4196e2461c1d74411e1e26c7fb6
da2dbebd76e5de74618ce2af5ee9f24256f7042f
refs/heads/main
2023-08-13T11:25:30.691567
2021-10-18T07:30:26
2021-10-18T07:30:26
416,705,259
0
1
null
null
null
null
UTF-8
Java
false
false
6,686
java
package com.scanlibrary; import android.app.Activity; import android.app.Fragment; import android.content.Intent; import android.graphics.drawable.NinePatchDrawable; import android.os.Build; import android.os.Bundle; import android.util.Log; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.core.content.ContextCompat; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.google.android.material.snackbar.Snackbar; import com.h6ah4i.android.widget.advrecyclerview.animator.DraggableItemAnimator; import com.h6ah4i.android.widget.advrecyclerview.animator.GeneralItemAnimator; import com.h6ah4i.android.widget.advrecyclerview.decoration.ItemShadowDecorator; import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager; import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils; public class ReOrderDocFragment extends Fragment { private RecyclerView mRecyclerView; private ImageView img_back; private RecyclerView.LayoutManager mLayoutManager; private DraggableGridExampleAdapter mAdapter; private RecyclerView.Adapter mWrappedAdapter; private RecyclerViewDragDropManager mRecyclerViewDragDropManager; private AbstractDataProvider mDataProvider; private IScanner scanner; @Override public void onAttach(Activity activity) { super.onAttach(activity); if (!(activity instanceof IScanner)) { throw new ClassCastException("Activity must implement IScanner"); } this.scanner = (IScanner) activity; } @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_reorderdoc, container, false); } @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mDataProvider = new ExampleDataProvider(); //noinspection ConstantConditions mRecyclerView = getView().findViewById(R.id.recycler_view); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { mLayoutManager = new GridLayoutManager(getContext(), 3, RecyclerView.VERTICAL, false); } // drag & drop manager mRecyclerViewDragDropManager = new RecyclerViewDragDropManager(); // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { // mRecyclerViewDragDropManager.setDraggingItemShadowDrawable( // (NinePatchDrawable) ContextCompat.getDrawable(getContext(), R.drawable.material_shadow_z3)); // } // Start dragging after long press mRecyclerViewDragDropManager.setInitiateOnLongPress(true); mRecyclerViewDragDropManager.setInitiateOnMove(false); mRecyclerViewDragDropManager.setLongPressTimeout(450); // setup dragging item effects (NOTE: DraggableItemAnimator is required) mRecyclerViewDragDropManager.setDragStartItemAnimationDuration(150); mRecyclerViewDragDropManager.setDraggingItemAlpha(0.8f); mRecyclerViewDragDropManager.setDraggingItemScale(1.3f); mRecyclerViewDragDropManager.setDraggingItemRotation(15.0f); //adapter final DraggableGridExampleAdapter myItemAdapter = new DraggableGridExampleAdapter(mDataProvider,getActivity()); mAdapter = myItemAdapter; mWrappedAdapter = mRecyclerViewDragDropManager.createWrappedAdapter(myItemAdapter); // wrap for dragging GeneralItemAnimator animator = new DraggableItemAnimator(); // DraggableItemAnimator is required to make item animations properly. mRecyclerView.setLayoutManager(mLayoutManager); mRecyclerView.setAdapter(mWrappedAdapter); // requires *wrapped* adapter mRecyclerView.setItemAnimator(animator); mRecyclerViewDragDropManager.attachRecyclerView(mRecyclerView); img_back = view.findViewById(R.id.img_back); img_back.setOnClickListener(v -> { Const.finalList.clear(); // Log.d("LLLLL_Size: ", String.valueOf(mDataProvider.getCount())); for (int i = 0; i < myItemAdapter.getItemCount(); i++) { Const.finalList.add(mDataProvider.getItem(i).getText()); } scanner.onScanFinish(Const.finalList,true,"",false); }); view.setFocusableInTouchMode(true); view.requestFocus(); view.setOnKeyListener( new View.OnKeyListener() { @Override public boolean onKey( View v, int keyCode, KeyEvent event ) { if( keyCode == KeyEvent.KEYCODE_BACK ) { Const.finalList.clear(); for (int i = 0; i < myItemAdapter.getItemCount(); i++) { Const.finalList.add(mDataProvider.getItem(i).getText()); } scanner.onScanFinish(Const.finalList,true,"",false); return true; } return false; } }); } @Override public void onPause() { mRecyclerViewDragDropManager.cancelDrag(); super.onPause(); } @Override public void onDestroyView() { if (mRecyclerViewDragDropManager != null) { mRecyclerViewDragDropManager.release(); mRecyclerViewDragDropManager = null; } if (mRecyclerView != null) { mRecyclerView.setItemAnimator(null); mRecyclerView.setAdapter(null); mRecyclerView = null; } if (mWrappedAdapter != null) { WrapperAdapterUtils.releaseAll(mWrappedAdapter); mWrappedAdapter = null; } mAdapter = null; mLayoutManager = null; super.onDestroyView(); } private void updateItemMoveMode(boolean swapMode) { int mode = (swapMode) ? RecyclerViewDragDropManager.ITEM_MOVE_MODE_SWAP : RecyclerViewDragDropManager.ITEM_MOVE_MODE_DEFAULT; mRecyclerViewDragDropManager.setItemMoveMode(mode); mAdapter.setItemMoveMode(mode); Snackbar.make(getView(), "Item move mode: " + (swapMode ? "SWAP" : "DEFAULT"), Snackbar.LENGTH_SHORT).show(); } private boolean supportsViewElevation() { return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP); } }
[ "megha.bpatel2022@gmail.com" ]
megha.bpatel2022@gmail.com
a302d0458b9c9b77ac00b237199c4df2f7c86133
fc1bdca42d67d802fccd8807b4b04a5e973ef1db
/restClient/src/main/java/com/adarrivi/webservice/client/RestClient.java
da626d32426c770a4c4cbf6403019b7a90acd919
[]
no_license
adarrivi/spring-training
3e4ab3c23e7267cb62236983639b7656ae31f088
34e8c0a5d0858b84ee776b9ad26daedf0212cab4
refs/heads/master
2020-04-24T20:13:52.163228
2014-06-03T20:04:42
2014-06-03T20:04:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,370
java
package com.adarrivi.webservice.client; import java.util.Collection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; @Component class RestClient { private static final Logger LOGGER = LoggerFactory.getLogger(RestClient.class); private static final String BASE_URL = "http://localhost:8080/restWebService/services/employee"; @Autowired private RestTemplate restTemplate; public void doRestCalls() { Employee newEmployee = new Employee(1, "Tyrion Lannister", 2000); restTemplate.postForEntity(BASE_URL, newEmployee, newEmployee.getClass()); newEmployee.doubleSalary(); restTemplate.put(BASE_URL, newEmployee); LOGGER.debug("All employees: {}", requestAllEmployees()); restTemplate.delete(BASE_URL + "/" + newEmployee.getId()); LOGGER.debug("All employees: {}", requestAllEmployees()); } @SuppressWarnings({ "unchecked", "rawtypes" }) private Collection<Employee> requestAllEmployees() { ResponseEntity<Collection> allEmployeesResponse = restTemplate.getForEntity(BASE_URL, Collection.class); return allEmployeesResponse.getBody(); } }
[ "adarrivi@gmail.com" ]
adarrivi@gmail.com
30c2bdd0de6889ba8f1b9dda728733be09e2ecb2
bc557f4a6bc1f673f6013d20361a000fc7daac11
/android-lib/dmlib/src/main/java/com/damai/core/Crypt.java
4dfc79ba321707fc8a79b13c1c30fbae6fc361d1
[]
no_license
gxl244642529/ecard_realName
6ec14e5feb19dac70e8df1ea2e2fe6111a93b15c
23d9fd11d8a78196433681519c7dec479e2a809e
refs/heads/master
2021-04-09T10:17:42.834082
2018-03-16T09:41:04
2018-03-16T09:41:04
125,492,140
3
1
null
null
null
null
UTF-8
Java
false
false
196
java
package com.damai.core; public class Crypt { public static final int NONE = 0; public static final int UPLOAD = 1; public static final int DOWNLOAD = 2; public static final int BOTH = 3; }
[ "244642529@qq.com" ]
244642529@qq.com
a070b724dff45d22f7ea8afd217b7f11b4d3ebc8
4b764cff4698db8de9a4bcffd209ca00cea1fee7
/bukkit/src/main/java/com/griefdefender/command/CommandClaimAdmin.java
c745ca2b72e7029312b6a10487e4858fc9ab2030
[ "MIT" ]
permissive
creation-reborn/GriefDefender
9a5b059f737a53f33bcd968e7eb91e0b00990273
601f13c266ad2d0f1ca4308313dbde605adbaabd
refs/heads/master
2020-06-23T22:33:56.219429
2019-07-31T06:15:19
2019-07-31T06:15:19
198,773,521
0
1
null
2019-07-25T06:44:26
2019-07-25T06:44:25
null
UTF-8
Java
false
false
2,370
java
/* * This file is part of GriefDefender, licensed under the MIT License (MIT). * * Copyright (c) bloodmc * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.griefdefender.command; import co.aikar.commands.BaseCommand; import co.aikar.commands.annotation.CommandAlias; import co.aikar.commands.annotation.CommandPermission; import co.aikar.commands.annotation.Description; import co.aikar.commands.annotation.Subcommand; import com.griefdefender.GDPlayerData; import com.griefdefender.GriefDefenderPlugin; import com.griefdefender.api.claim.ShovelTypes; import com.griefdefender.cache.MessageCache; import com.griefdefender.permission.GDPermissions; import org.bukkit.entity.Player; @CommandAlias("%griefdefender") @CommandPermission(GDPermissions.COMMAND_ADMIN_CLAIMS) public class CommandClaimAdmin extends BaseCommand { @CommandAlias("modeadmin") @Description("Switches the shovel tool to administrative claims mode") @Subcommand("mode admin") public void execute(Player player) { final GDPlayerData playerData = GriefDefenderPlugin.getInstance().dataStore.getOrCreatePlayerData(player.getWorld(), player.getUniqueId()); playerData.shovelMode = ShovelTypes.ADMIN; GriefDefenderPlugin.sendMessage(player, MessageCache.getInstance().MODE_ADMIN); } }
[ "jdroque@gmail.com" ]
jdroque@gmail.com
9e41f56826d4417e498e0131f0d4c307f1cc1b23
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/29/29_d5abb73fdcfaf0c2e09b5306fff8c1dcd9ea92e0/Users/29_d5abb73fdcfaf0c2e09b5306fff8c1dcd9ea92e0_Users_t.java
5d125721c0f093cc1e4b89420b0d5243b0373478
[]
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,895
java
package controllers; import java.util.List; import java.util.Map; import org.h2.expression.ExpressionList; import play.*; import play.data.*; import play.mvc.*; import play.mvc.Http.Session; import views.html.index; import models.Usuario; public class Users extends Controller { static Form<Usuario> userForm = form(Usuario.class); /* * Elegir acción */ public static Result index() { System.out.println("INDEX---_"); // Comprobar si está logueado if(!isLogged()){ // Mostrar la vista principal return all(); }else{ // Mostrar la vista de usuario logueado return show(); } } /* * Mostrar la lista de usuarios y formulario para registro/logueo. */ public static Result all(){ System.out.println("INICIO"); return ok(views.html.index.render(Usuario.all(), userForm)); } /* * Cargar sesión a partir de objeto usuario. */ public static void loadSession(Usuario user){ String uuid = java.util.UUID.randomUUID().toString(); session("uuid",uuid); session("cuuid",uuid); session("codigo",user.getCodigo()); session("password",user.getPassword()); } /* * Logueo de usuario */ public static Result login(){ Form<Usuario> filledForm = userForm.bindFromRequest(); Map<String, String[]> formData = request().body().asFormUrlEncoded(); String code = ""; String password = ""; if(code == null || password == null){ code = filledForm.get().codigo; password = filledForm.get().password; }else{ code = formData.get("codigo")[0]; password = formData.get("password")[0]; } Usuario user = Usuario.getUserByCodigo(code); // Comprobar password y cargar sesión. if(password.equals(user.getPassword())){ System.out.println("Válido, entrar"); loadSession(user); } // Redireccionar a página inicial (con o sin carga de sesión) return redirect(routes.Application.index()); } /* * Buscar un usuario por su codigo */ public static Result show(String codigo){ return TODO; } /* * Mostrar usuario de la sesión */ public static Result show(){ System.out.println("Entra aquí"); Usuario user = Usuario.getUserByCodigo(session("codigo")); return ok(views.html.user.render(user)); } /* * Comprobar formulario y crear nuevo usuario */ public static Result create(){ Form<Usuario> filledForm = userForm.bindFromRequest(); // Determinar si los datos del formulario tienen errores if(filledForm.hasErrors()){ return badRequest(views.html.index.render(Usuario.all(), filledForm)); }else{ // Es usuario --> Loguear if(isUser(filledForm.get().codigo)){ return login(); // No es usuario --> Registrar }else{ Usuario user; try{ user = Usuario.create(filledForm.get()); }catch(Exception e){ flash("Error","Existen problemas con el usuario"); return redirect(routes.Application.index()); } loadSession(user); return redirect(routes.Application.index()); } } } /* * Determinar si el usuario existe */ public static boolean isUser(String codigo){ Usuario user = Usuario.getUserByCodigo(codigo); if(user == null) return false; else return true; } /* * Buscar el usuario por id */ public static Result find(Long id){ return TODO; } /* * Borrar usuario */ public static Result delete(Long id){ return TODO; } /* * Comprobar si usuario está logueado */ public static boolean isLogged(){ if(validSessionInfo()){ return true; }else{ session().clear(); return false; } } /* * Validar usuario y password, si existen y son válidos */ public static boolean validSessionInfo(){ String codigo = session("codigo"); String password = session("password"); System.out.println(codigo + " " + password + " " + session("uuid") + " " + session("cuuid")); Usuario user = Usuario.getUserByCodigo(codigo); if(user == null){ return false; }else if(!session("uuid").toString().equals(session("cuuid").toString())){ return false; }else{ if(user.getPassword().equals(password)){ return true; }else{ return false; } } } public static Usuario getUserSession(){ String codigo = session("codigo"); String password = session("password"); Usuario user = Usuario.getUserByCodigo(codigo); return user; } public static Result logout(){ session().clear(); return redirect(routes.Application.index()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e27f808f638a7672b14486be3202f0689831dc98
b22f836ef8af2eccf895ad9dd6d2302583e3505d
/src/main/java/com/hankcs/hanlp/dependency/nnparser/parser_dll.java
39a4ff324ed1875760c5ad5af8a7119e28ea11aa
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
shuoshuorili/HanLP
ebf33e2a14ec37c1a3689ee471dbd0fcfac10d8d
c76f4f46b676f295408a443ad6bcc446adb40eb4
refs/heads/master
2023-05-25T22:29:54.079213
2015-12-08T16:49:48
2015-12-08T16:49:48
46,495,179
2
0
null
2015-11-25T07:13:26
2015-11-19T13:51:24
Java
UTF-8
Java
false
false
2,176
java
/* * <summary></summary> * <author>He Han</author> * <email>me@hankcs.com</email> * <create-date>2015/10/30 19:24</create-date> * * <copyright file="parser_dll.java" company="码农场"> * Copyright (c) 2008-2015, 码农场. All Right Reserved, http://www.hankcs.com/ * This source is subject to Hankcs. Please contact Hankcs to get more information. * </copyright> */ package com.hankcs.hanlp.dependency.nnparser; import com.hankcs.hanlp.dependency.nnparser.option.ConfigOption; import com.hankcs.hanlp.dependency.nnparser.option.SpecialOption; import java.util.List; import static com.hankcs.hanlp.utility.Predefine.logger; /** * 静态调用的伪 Windows “dll” * @author hankcs */ public class parser_dll { static NeuralNetworkParser parser; static { parser = new NeuralNetworkParser(); long start = System.currentTimeMillis(); logger.info("开始加载神经网络依存句法模型:" + ConfigOption.PATH); if (!parser.load(ConfigOption.PATH)) { logger.severe("加载神经网络依存句法模型[" + ConfigOption.PATH + "]失败!"); System.exit(-1); } logger.info("加载神经网络依存句法模型[" + ConfigOption.PATH + "]成功,耗时 " + (System.currentTimeMillis() - start) + " ms"); parser.setup_system(); parser.build_feature_space(); } /** * 分析句法 * * @param words 词语列表 * @param postags 词性列表 * @param heads 输出依存指向列表 * @param deprels 输出依存名称列表 * @return 节点的个数 */ public static int parse(List<String> words, List<String> postags, List<Integer> heads, List<String> deprels) { Instance inst = new Instance(); inst.forms.add(SpecialOption.ROOT); inst.postags.add(SpecialOption.ROOT); for (int i = 0; i < words.size(); i++) { inst.forms.add(words.get(i)); inst.postags.add(postags.get(i)); } parser.predict(inst, heads, deprels); heads.remove(0); deprels.remove(0); return heads.size(); } }
[ "jfservice@126.com" ]
jfservice@126.com
1bcef6718b96277e1b3a0c29ba4a9ece27fa9013
f5f143087f35fa67fa4c54cad106a32e1fb45c0e
/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/GetLexIns.java
4d201491076f03c86d172abe1dabc75a9831bffd
[]
no_license
SiverDX/SWFCopyValues
03b665b8f4ae3a2a22f360ea722813eeb52b4ef0
d146d8dcf6d1f7a69aa0471f85b852e64cad02f7
refs/heads/master
2022-07-29T06:56:55.446686
2021-12-04T09:48:48
2021-12-04T09:48:48
324,795,135
0
1
null
null
null
null
UTF-8
Java
false
false
2,008
java
/* * Copyright (C) 2010-2018 JPEXS, All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3.0 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. */ package com.jpexs.decompiler.flash.abc.avm2.instructions.other; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.AVM2LocalData; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.GetLexAVM2Item; import com.jpexs.decompiler.flash.abc.types.Multiname; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.TranslateStack; import java.util.List; /** * * @author JPEXS */ public class GetLexIns extends InstructionDefinition { public GetLexIns() { super(0x60, "getlex", new int[]{AVM2Code.DAT_MULTINAME_INDEX}, true); } @Override public void translate(AVM2LocalData localData, TranslateStack stack, AVM2Instruction ins, List<GraphTargetItem> output, String path) { int multinameIndex = ins.operands[0]; Multiname multiname = localData.getConstants().getMultiname(multinameIndex); stack.push(new GetLexAVM2Item(ins, localData.lineStartInstruction, multiname, localData.getConstants())); } @Override public int getStackPushCount(AVM2Instruction ins, ABC abc) { return 1; } }
[ "kai.zahn@yahoo.de" ]
kai.zahn@yahoo.de
daa008012752e746cd4909ff5745e0e8a1194d37
db6614d06a6433a6e8e8e964d7822b54ba1c44ef
/app/src/main/java/com/geek/huixiaoer/mvp/person/presenter/ShopOrderDetailPresenter.java
7fc89e54e43c455e609881d5669bfed23424f482
[]
no_license
DarianLiu/HuiXiaoEr
979a1d8755c7eb203abc08046bbbefd8ad3160d8
4ee10a740d134149c7b02ce7e2f8ae7202c460b1
refs/heads/master
2021-05-03T08:08:32.138775
2018-06-20T02:27:49
2018-06-20T02:27:49
120,560,453
0
0
null
null
null
null
UTF-8
Java
false
false
7,411
java
package com.geek.huixiaoer.mvp.person.presenter; import android.app.Application; import android.content.Intent; import android.text.TextUtils; import com.alipay.sdk.app.PayTask; import com.geek.huixiaoer.api.utils.RxUtil; import com.geek.huixiaoer.common.utils.Constants; import com.geek.huixiaoer.mvp.common.ui.activity.LoginActivity; import com.geek.huixiaoer.mvp.person.contract.ShopOrderDetailContract; import com.geek.huixiaoer.storage.entity.shop.OrderBean; import com.geek.huixiaoer.storage.entity.shop.OrderCreateResultBean; import com.geek.huixiaoer.storage.entity.shop.OrderDetailBean; import com.jess.arms.di.scope.ActivityScope; import com.jess.arms.http.imageloader.ImageLoader; import com.jess.arms.integration.AppManager; import com.jess.arms.mvp.BasePresenter; import com.jess.arms.utils.ArmsUtils; import com.jess.arms.utils.DataHelper; import com.jess.arms.utils.RxLifecycleUtils; import java.util.Map; import javax.inject.Inject; import io.reactivex.Observable; import io.reactivex.ObservableOnSubscribe; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.annotations.NonNull; import io.reactivex.functions.Consumer; import io.reactivex.schedulers.Schedulers; import me.jessyan.rxerrorhandler.core.RxErrorHandler; import me.jessyan.rxerrorhandler.handler.ErrorHandleSubscriber; import me.jessyan.rxerrorhandler.handler.RetryWithDelay; @ActivityScope public class ShopOrderDetailPresenter extends BasePresenter<ShopOrderDetailContract.Model, ShopOrderDetailContract.View> { @Inject RxErrorHandler mErrorHandler; @Inject Application mApplication; @Inject ImageLoader mImageLoader; @Inject AppManager mAppManager; @Inject public ShopOrderDetailPresenter(ShopOrderDetailContract.Model model, ShopOrderDetailContract.View rootView) { super(model, rootView); } /** * 获取普通订单的详细数据 */ public void orderDetail(String orderSn) { String token = DataHelper.getStringSF(mAppManager.getTopActivity(), Constants.SP_TOKEN); if (TextUtils.isEmpty(token)) { mRootView.launchActivity(new Intent(mAppManager.getTopActivity(), LoginActivity.class)); } mModel.orderDetail(token, orderSn).retryWhen(new RetryWithDelay(3, 2)) .subscribeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread()) .doFinally(() -> { // mRootView.endRefresh();//隐藏下拉刷新的进度条 }).compose(RxLifecycleUtils.bindToLifecycle(mRootView)) .compose(RxUtil.handleBaseResult(mAppManager.getTopActivity())) .subscribeWith(new ErrorHandleSubscriber<OrderDetailBean>(mErrorHandler) { @Override public void onNext(@NonNull OrderDetailBean resultBean) { mRootView.updateView(resultBean); } }); } /** * 支付宝支付 * 支付方式(移动端默认为:alipayMobilePaymentPlugin) * * @param orderSn 交易流水号 * @param amount 交易金额 */ public void paymentSubmitNo(String orderSn, String amount) { String token = DataHelper.getStringSF(mAppManager.getTopActivity(), Constants.SP_TOKEN); mModel.paymentSubmitSn(token, "alipayMobilePaymentPlugin", orderSn, amount) .retryWhen(new RetryWithDelay(0, 30)) .compose(RxUtil.applySchedulers(mRootView)) .compose(RxUtil.handleBaseResult(mAppManager.getTopActivity())) .subscribeWith(new ErrorHandleSubscriber<OrderCreateResultBean>(mErrorHandler) { @Override public void onNext(@NonNull OrderCreateResultBean resultBean) { toALiPay(resultBean.getOutTradeNo()); } }); } /** * 支付宝支付 * 支付方式(移动端默认为:alipayMobilePaymentPlugin) * * @param orderSn 订单号 * @param orderSn 交易流水号 */ public void cancelOrder(String orderSn, String outTradeNo) { String token = DataHelper.getStringSF(mAppManager.getTopActivity(), Constants.SP_TOKEN); mModel.shopOrderCancel(token, orderSn, outTradeNo) .retryWhen(new RetryWithDelay(0, 30)) .compose(RxUtil.applySchedulers(mRootView)) .compose(RxUtil.handleBaseResult(mAppManager.getTopActivity())) .subscribeWith(new ErrorHandleSubscriber<OrderBean>(mErrorHandler) { @Override public void onNext(@NonNull OrderBean resultBean) { mRootView.showMessage("订单取消成功!"); mRootView.killMyself(); // toALiPay(resultBean.getOutTradeNo()); } }); } /** * 唤起支付宝支付 * * @param orderStr 支付宝支付所需字符串 */ private void toALiPay(String orderStr) { Observable.create((ObservableOnSubscribe<Map<String, String>>) emitter -> { PayTask aLiPayTask = new PayTask(mAppManager.getTopActivity()); Map<String, String> resultMap = aLiPayTask.payV2(orderStr, true); emitter.onNext(resultMap); // emitter.onComplete(); }).subscribeOn(Schedulers.newThread()) .observeOn(AndroidSchedulers.mainThread()) .compose(RxLifecycleUtils.bindToLifecycle(mRootView)) .subscribe(new Consumer<Map<String, String>>() { @Override public void accept(Map<String, String> resultMap) throws Exception { String resultStatus = resultMap.get("resultStatus"); if (TextUtils.equals(resultStatus, "9000")) { ArmsUtils.makeText(mApplication, "支付成功"); mRootView.killMyself(); } else if (resultStatus.equals("4000")) { ArmsUtils.makeText(mApplication, "支付失败"); // 4000为支付失败,包括用户主动取消支付,或者系统返回的错误 } else if (resultStatus.equals("6001")) { // 6001为取消支付,或者系统返回的错误 ArmsUtils.makeText(mApplication, "取消支付"); } else if (resultStatus.equals("8000")) { // "8000"代表支付结果因为支付渠道原因或者系统原因还在等待支付结果确认,最终交易是否成功以服务端异步通知为准(小概率状态) ArmsUtils.makeText(mApplication, "支付结果确认中"); mRootView.killMyself(); } else { // 其他为系统返回的错误 ArmsUtils.makeText(mApplication, "支付错误"); } } }); } @Override public void onDestroy() { super.onDestroy(); this.mErrorHandler = null; this.mAppManager = null; this.mImageLoader = null; this.mApplication = null; } }
[ "darian.liu@foxmail.com" ]
darian.liu@foxmail.com
e80e685141b4b3990d6f799e01945a04256ed776
dd70bacf12f2b3fd81e4dac135b9a4e491f73cb8
/net/minecraft/client/render/debug/StructureDebugRenderer.java
cf04a3a2b82209071af494b15e134e8f2b638c2a
[]
no_license
dennisvoliver/minecraft
bd9d8e256778ac3d00c1ab61a2b6c4702ed56827
fbf6271791785db06a3f8fe4a86c6a92f6a8d951
refs/heads/main
2023-04-23T12:38:25.848640
2021-05-19T07:15:38
2021-05-19T07:15:38
368,775,994
2
0
null
null
null
null
UTF-8
Java
false
false
4,793
java
package net.minecraft.client.render.debug; import com.google.common.collect.Maps; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.Camera; import net.minecraft.client.render.RenderLayer; import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.render.VertexConsumerProvider; import net.minecraft.client.render.WorldRenderer; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.util.math.BlockBox; import net.minecraft.util.math.BlockPos; import net.minecraft.world.WorldAccess; import net.minecraft.world.dimension.DimensionType; @Environment(EnvType.CLIENT) public class StructureDebugRenderer implements DebugRenderer.Renderer { private final MinecraftClient field_4624; private final Map<DimensionType, Map<String, BlockBox>> field_4626 = Maps.newIdentityHashMap(); private final Map<DimensionType, Map<String, BlockBox>> field_4627 = Maps.newIdentityHashMap(); private final Map<DimensionType, Map<String, Boolean>> field_4625 = Maps.newIdentityHashMap(); public StructureDebugRenderer(MinecraftClient minecraftClient) { this.field_4624 = minecraftClient; } public void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, double cameraX, double cameraY, double cameraZ) { Camera camera = this.field_4624.gameRenderer.getCamera(); WorldAccess worldAccess = this.field_4624.world; DimensionType dimensionType = worldAccess.getDimension(); BlockPos blockPos = new BlockPos(camera.getPos().x, 0.0D, camera.getPos().z); VertexConsumer vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getLines()); Iterator var14; if (this.field_4626.containsKey(dimensionType)) { var14 = ((Map)this.field_4626.get(dimensionType)).values().iterator(); while(var14.hasNext()) { BlockBox blockBox = (BlockBox)var14.next(); if (blockPos.isWithinDistance(blockBox.getCenter(), 500.0D)) { WorldRenderer.drawBox(matrices, vertexConsumer, (double)blockBox.minX - cameraX, (double)blockBox.minY - cameraY, (double)blockBox.minZ - cameraZ, (double)(blockBox.maxX + 1) - cameraX, (double)(blockBox.maxY + 1) - cameraY, (double)(blockBox.maxZ + 1) - cameraZ, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F, 1.0F); } } } if (this.field_4627.containsKey(dimensionType)) { var14 = ((Map)this.field_4627.get(dimensionType)).entrySet().iterator(); while(var14.hasNext()) { Entry<String, BlockBox> entry = (Entry)var14.next(); String string = (String)entry.getKey(); BlockBox blockBox2 = (BlockBox)entry.getValue(); Boolean boolean_ = (Boolean)((Map)this.field_4625.get(dimensionType)).get(string); if (blockPos.isWithinDistance(blockBox2.getCenter(), 500.0D)) { if (boolean_) { WorldRenderer.drawBox(matrices, vertexConsumer, (double)blockBox2.minX - cameraX, (double)blockBox2.minY - cameraY, (double)blockBox2.minZ - cameraZ, (double)(blockBox2.maxX + 1) - cameraX, (double)(blockBox2.maxY + 1) - cameraY, (double)(blockBox2.maxZ + 1) - cameraZ, 0.0F, 1.0F, 0.0F, 1.0F, 0.0F, 1.0F, 0.0F); } else { WorldRenderer.drawBox(matrices, vertexConsumer, (double)blockBox2.minX - cameraX, (double)blockBox2.minY - cameraY, (double)blockBox2.minZ - cameraZ, (double)(blockBox2.maxX + 1) - cameraX, (double)(blockBox2.maxY + 1) - cameraY, (double)(blockBox2.maxZ + 1) - cameraZ, 0.0F, 0.0F, 1.0F, 1.0F, 0.0F, 0.0F, 1.0F); } } } } } public void method_3871(BlockBox blockBox, List<BlockBox> list, List<Boolean> list2, DimensionType dimensionType) { if (!this.field_4626.containsKey(dimensionType)) { this.field_4626.put(dimensionType, Maps.newHashMap()); } if (!this.field_4627.containsKey(dimensionType)) { this.field_4627.put(dimensionType, Maps.newHashMap()); this.field_4625.put(dimensionType, Maps.newHashMap()); } ((Map)this.field_4626.get(dimensionType)).put(blockBox.toString(), blockBox); for(int i = 0; i < list.size(); ++i) { BlockBox blockBox2 = (BlockBox)list.get(i); Boolean boolean_ = (Boolean)list2.get(i); ((Map)this.field_4627.get(dimensionType)).put(blockBox2.toString(), blockBox2); ((Map)this.field_4625.get(dimensionType)).put(blockBox2.toString(), boolean_); } } public void clear() { this.field_4626.clear(); this.field_4627.clear(); this.field_4625.clear(); } }
[ "user@email.com" ]
user@email.com
41ea851f9e61ab967fb1a00689f93122a9282f5b
df7bfbc78d4ebc6b5037d43999167aae9ab9e021
/portlets/core/admin/src/java/org/exoplatform/portlets/portletregistery/component/UIPortletInfo.java
88ec9fba43a6156f091945f066d9455df9c01c6c
[]
no_license
JavaQualitasCorpus/exoportal-v1.0.2
a39da2992f4ea5423db853e69df5ad37d3c88db4
7d48e67de0200e2ca1dd60ebef9c408361bb5309
refs/heads/master
2023-08-12T08:38:53.336828
2019-03-12T23:21:05
2019-03-12T23:21:05
167,004,704
0
1
null
null
null
null
UTF-8
Java
false
false
3,494
java
/** * Copyright 2001-2003 The eXo platform SARL All rights reserved. * Please look at license.txt in info directory for more license detail. */ package org.exoplatform.portlets.portletregistery.component; import java.util.Collection; import org.exoplatform.faces.core.event.CheckRoleInterceptor; import org.exoplatform.faces.core.event.ExoActionEvent; import org.exoplatform.faces.core.event.ExoActionListener; import org.exoplatform.portal.faces.component.model.PortletCategoryData; import org.exoplatform.services.portletregistery.PortletCategory; import org.exoplatform.services.portletregistery.PortletRegisteryService; /** * Created y the eXo platform team * User: Benjamin Mestrallet * Date: 18 juin 2004 */ public class UIPortletInfo extends org.exoplatform.portal.faces.component.UIPortletInfo { public static final String EDIT_PORTLET = "editPortlet"; public static final String ADD_ROLE = "addRole"; public static final String DELETE_PORTLET = "deletePortlet"; private PortletRegisteryService portletRegisteryService; public UIPortletInfo(PortletRegisteryService portletRegisteryService) { super() ; this.portletRegisteryService = portletRegisteryService; addActionListener(new EditActionListener().setActionToListen(EDIT_PORTLET)); addActionListener(new AddRoleActionListener().setActionToListen(ADD_ROLE)); addActionListener(new DeleteActionListener().setActionToListen(DELETE_PORTLET)); } public String getFamily() { return "org.exoplatform.portlets.portletregistery.component.UIPortletInfo"; } public class EditActionListener extends ExoActionListener { public EditActionListener() { addInterceptor(new CheckRoleInterceptor(CheckRoleInterceptor.ADMIN)) ; } public void execute(ExoActionEvent event) throws Exception { UIPortletRegistry uiPortlet = (UIPortletRegistry) getAncestorOfType(UIPortletRegistry.class) ; UIPortletForm uiForm = (UIPortletForm)uiPortlet.getChildComponentOfType(UIPortletForm.class); uiForm.setPortletData(portlet_) ; uiPortlet.setRenderedComponent(UIPortletForm.class) ; } } private class AddRoleActionListener extends ExoActionListener { public AddRoleActionListener() { addInterceptor(new CheckRoleInterceptor(CheckRoleInterceptor.ADMIN)) ; } public void execute(ExoActionEvent event) throws Exception { UIPortletRegistry uiPortlet = (UIPortletRegistry) getAncestorOfType(UIPortletRegistry.class) ; UIPortletRole uiForm = (UIPortletRole) uiPortlet.getChildComponentOfType(UIPortletRole.class) ; uiForm.setCurrentPortlet(portlet_) ; uiPortlet.setRenderedComponent(uiForm.getId()) ; } } private class DeleteActionListener extends ExoActionListener { public DeleteActionListener() { addInterceptor(new CheckRoleInterceptor(CheckRoleInterceptor.ADMIN)) ; } public void execute(ExoActionEvent event) throws Exception { portletRegisteryService.removePortlet(portlet_.getId()); UIPortletCategory uiCategory = (UIPortletCategory)getSibling(UIPortletCategory.class) ; PortletCategoryData categoryData = uiCategory.getPortletCategoryData() ; PortletCategory portletCategory = categoryData.getPortletCategory() ; Collection portlets = portletRegisteryService.getPortlets(portletCategory.getId()) ; categoryData.reset(portletCategory, portlets) ; setRenderedSibling(UIPortletCategory.class) ; } } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
ac1e6b099113db74ef33c01fdb24e9d5600cc8e4
64d383a904007a939eb90e9e1b3b85d5b1c67794
/aliyun-java-sdk-vod/src/main/java/com/aliyuncs/vod/transform/v20170321/ListAIVideoPornRecogJobResponseUnmarshaller.java
e61d05c84bed5cc9d306a0877a2e353f265ce5c8
[ "Apache-2.0" ]
permissive
15271091213/aliyun-openapi-java-sdk
ff76968c2f28a4e13b0002aea55af1de2c79fa4e
9dabde5f53ae890769feb5fff3a69dfc566a974d
refs/heads/master
2020-03-06T14:42:23.803542
2018-03-27T04:32:26
2018-03-27T04:32:26
126,940,526
1
0
null
2018-03-27T06:38:21
2018-03-27T06:38:21
null
UTF-8
Java
false
false
3,273
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.aliyuncs.vod.transform.v20170321; import java.util.ArrayList; import java.util.List; import com.aliyuncs.vod.model.v20170321.ListAIVideoPornRecogJobResponse; import com.aliyuncs.vod.model.v20170321.ListAIVideoPornRecogJobResponse.AIVideoPornRecogJob; import com.aliyuncs.transform.UnmarshallerContext; public class ListAIVideoPornRecogJobResponseUnmarshaller { public static ListAIVideoPornRecogJobResponse unmarshall(ListAIVideoPornRecogJobResponse listAIVideoPornRecogJobResponse, UnmarshallerContext context) { listAIVideoPornRecogJobResponse.setRequestId(context.stringValue("ListAIVideoPornRecogJobResponse.RequestId")); List<String> nonExistPornRecogJobIds = new ArrayList<String>(); for (int i = 0; i < context.lengthValue("ListAIVideoPornRecogJobResponse.NonExistPornRecogJobIds.Length"); i++) { nonExistPornRecogJobIds.add(context.stringValue("ListAIVideoPornRecogJobResponse.NonExistPornRecogJobIds["+ i +"]")); } listAIVideoPornRecogJobResponse.setNonExistPornRecogJobIds(nonExistPornRecogJobIds); List<AIVideoPornRecogJob> aIVideoPornRecogJobList = new ArrayList<AIVideoPornRecogJob>(); for (int i = 0; i < context.lengthValue("ListAIVideoPornRecogJobResponse.AIVideoPornRecogJobList.Length"); i++) { AIVideoPornRecogJob aIVideoPornRecogJob = new AIVideoPornRecogJob(); aIVideoPornRecogJob.setJobId(context.stringValue("ListAIVideoPornRecogJobResponse.AIVideoPornRecogJobList["+ i +"].JobId")); aIVideoPornRecogJob.setMediaId(context.stringValue("ListAIVideoPornRecogJobResponse.AIVideoPornRecogJobList["+ i +"].MediaId")); aIVideoPornRecogJob.setStatus(context.stringValue("ListAIVideoPornRecogJobResponse.AIVideoPornRecogJobList["+ i +"].Status")); aIVideoPornRecogJob.setCode(context.stringValue("ListAIVideoPornRecogJobResponse.AIVideoPornRecogJobList["+ i +"].Code")); aIVideoPornRecogJob.setMessage(context.stringValue("ListAIVideoPornRecogJobResponse.AIVideoPornRecogJobList["+ i +"].Message")); aIVideoPornRecogJob.setCreationTime(context.stringValue("ListAIVideoPornRecogJobResponse.AIVideoPornRecogJobList["+ i +"].CreationTime")); aIVideoPornRecogJob.setData(context.stringValue("ListAIVideoPornRecogJobResponse.AIVideoPornRecogJobList["+ i +"].Data")); aIVideoPornRecogJobList.add(aIVideoPornRecogJob); } listAIVideoPornRecogJobResponse.setAIVideoPornRecogJobList(aIVideoPornRecogJobList); return listAIVideoPornRecogJobResponse; } }
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
e8670a4c0adc88a09d69ab31008329666a2a0850
c1df93f3a45b05328511d88db51fd412fd5bd476
/15 EXERCISE BUILT-IN QUERY METHODS STREAM API/p05_FilterStudentsByEmailDomain/FilterStudentsByEmailDomain.java
06934b2d4e7f3a7969051c3cea040b9370f551a6
[]
no_license
TsvetanNikolov123/JAVA---Advanced
e9a3f6a349e3b460311c7ed445d7506280c07f23
3591fb7673caf141ba6cb69644e9ab90f406bca6
refs/heads/master
2020-03-11T01:53:20.992178
2019-09-10T15:15:28
2019-09-10T15:15:28
128,548,827
0
0
null
null
null
null
UTF-8
Java
false
false
896
java
package p05_FilterStudentsByEmailDomain; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.List; public class FilterStudentsByEmailDomain { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); List<String> studentMails = new LinkedList<>(); while (true) { String inputLine = reader.readLine(); if ("END".equals(inputLine)) break; if (inputLine == null || inputLine.isEmpty()) continue; studentMails.add(inputLine); } studentMails.stream() .filter(s -> s.endsWith("gmail.com")) .forEach(s -> System.out.println(s.split("\\s+")[0] + " " + s.split("\\s+")[1])); } }
[ "tsdman1985@gmail.com" ]
tsdman1985@gmail.com
fcf1b4f0de5752c12675df63abc5117e5b00cced
fcda34dabc2da39f8aaebf825c28e6682fd9ab7e
/iam-ui/openiam-webconsole/openiam-webconsole-am/src/main/java/org/openiam/ui/webconsole/am/web/bean/converter/AuthProviderFormRequestConverter.java
4837af59ead167c586bb183720efec71051279ef
[]
no_license
cshuig/openiam-idm-ce
af1550a3bf1cb6b82465fcf3e89c24be84b6dddf
79423b496860615029a53687863e787541978440
refs/heads/master
2020-03-31T17:24:32.700815
2016-05-17T05:43:49
2016-05-17T05:43:49
58,993,586
0
0
null
2016-05-17T05:41:15
2016-05-17T05:41:15
null
UTF-8
Java
false
false
6,908
java
package org.openiam.ui.webconsole.am.web.bean.converter; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import javax.annotation.Resource; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; import org.apache.commons.lang.StringUtils; import org.openiam.am.srvc.constants.AuthAttributeDataType; import org.openiam.am.srvc.dto.AuthAttribute; import org.openiam.am.srvc.dto.AuthProvider; import org.openiam.am.srvc.dto.AuthProviderAttribute; import org.openiam.am.srvc.searchbeans.AuthAttributeSearchBean; import org.openiam.am.srvc.searchbeans.AuthProviderSearchBean; import org.openiam.am.srvc.ws.AuthProviderWebService; import org.openiam.am.srvc.ws.AuthResourceAttributeWebService; import org.openiam.ui.bean.converter.BeanConverter; import org.openiam.ui.webconsole.am.web.model.AuthProviderFormRequest; import org.springframework.stereotype.Component; @Component public class AuthProviderFormRequestConverter implements BeanConverter<AuthProvider, AuthProviderFormRequest> { private static final String VALUE_DELIMITER = ","; @Resource(name="authAttributeServiceClient") private AuthResourceAttributeWebService authAttributeServiceClient; @Resource(name="authProviderServiceClient") private AuthProviderWebService authProviderServiceClient; @Override public AuthProvider convert(final AuthProviderFormRequest request) { AuthProvider provider = null; if(request != null) { final String providerId = StringUtils.trimToNull(request.getProviderId()); final AuthProvider originalProvider = getAuthProvider(providerId); /* set common attributes */ provider = new AuthProvider(); provider.setProviderId(providerId); provider.setName(StringUtils.trimToNull(request.getName())); provider.setManagedSysId(StringUtils.trimToNull(request.getManagedSysId())); provider.setDescription(StringUtils.trimToNull(request.getDescription())); provider.setProviderType(request.getProviderType()); provider.setSignRequest(request.isSignRequest()); /* set resource and keys */ final String resourceId = StringUtils.trimToNull(request.getResourceId()); final org.openiam.idm.srvc.res.dto.Resource resource = new org.openiam.idm.srvc.res.dto.Resource(); resource.setId(resourceId); resource.setURL(StringUtils.trimToNull(request.getApplicationURL())); provider.setResource(resource); provider.setResourceId(resourceId); if(request.isSignRequest()) { if(request.getPrivateKey() != null && request.getPrivateKey().getBytes().length > 0) { provider.setPrivateKey(request.getPrivateKey().getBytes()); } else if(!request.isClearPrivateKey() && originalProvider != null) { provider.setPrivateKey(originalProvider.getPrivateKey()); } if(request.getPublicKey() != null && request.getPublicKey().getBytes().length > 0) { provider.setPublicKey(request.getPublicKey().getBytes()); } else if(!request.isClearPublicKey() && originalProvider != null) { provider.setPublicKey(originalProvider.getPublicKey()); } } final Set<AuthProviderAttribute> providerAttributeSet = new HashSet<AuthProviderAttribute>(); if(MapUtils.isNotEmpty(request.getAttributeMap())) { for(final String attributeId : request.getAttributeMap().keySet()) { final String value = request.getAttributeMap().get(attributeId); if(StringUtils.isNotBlank(value)) { final AuthAttributeSearchBean searchBean = new AuthAttributeSearchBean(); searchBean.setKey(attributeId); final List<AuthAttribute> authAttributeList = authProviderServiceClient.findAuthAttributeBeans(searchBean, 1, 0); if(CollectionUtils.isNotEmpty(authAttributeList)) { final AuthAttribute authAttribute = authAttributeList.get(0); /* set value and value types */ final AuthProviderAttribute attribute = new AuthProviderAttribute(); attribute.setAttributeId(attributeId); /* if it's a list value, remove empty Strings, and rejoin using the delimiter */ if(authAttribute.getDataType() == AuthAttributeDataType.listValue) { final String finalValue = rejoinListValue(value, VALUE_DELIMITER); /* just ignore if the input was bad */ if(finalValue == null) { continue; } attribute.setDataType(AuthAttributeDataType.listValue); attribute.setValue(finalValue.toString()); } else { attribute.setDataType(AuthAttributeDataType.singleValue); attribute.setValue(value); } attribute.setProviderId(providerId); /* set name */ final String attributeName = authAttribute.getAttributeName(); attribute.setAttributeName(attributeName); /* set original ID of attribute, if it existed */ if(originalProvider != null && originalProvider.getProviderAttributeMap() != null) { final AuthProviderAttribute previousAttribute = originalProvider.getProviderAttributeMap().get(attributeName); if(previousAttribute != null) { attribute.setProviderAttributeId(previousAttribute.getProviderAttributeId()); } } providerAttributeSet.add(attribute); } } } } provider.setProviderAttributeSet(providerAttributeSet); if(originalProvider != null) { provider.setResourceAttributeMap(originalProvider.getResourceAttributeMap()); } } return provider; } private String rejoinListValue(final String value, final String delimiter) { String retVal = null; final String[] tokenizedValue = StringUtils.split(value, VALUE_DELIMITER); final List<String> splitValue = new LinkedList<String>(); for(final String s : tokenizedValue) { if(StringUtils.isNotEmpty(s)) { splitValue.add(s); } } /* if there's no value, just continue looping over the next attribute */ if(CollectionUtils.isNotEmpty(splitValue)) { final StringBuilder finalValue = new StringBuilder(); for(int i = 0; i < splitValue.size(); i++) { finalValue.append(splitValue.get(i)); if(i < splitValue.size() - 1) { finalValue.append(VALUE_DELIMITER); } } retVal = finalValue.toString(); } return retVal; } private AuthProvider getAuthProvider(final String providerId) { final AuthProviderSearchBean searchBean = new AuthProviderSearchBean(); searchBean.setDeepCopy(true); searchBean.setKey(providerId); final List<AuthProvider> authProvider = (providerId != null) ? authProviderServiceClient.findAuthProviderBeans(searchBean, Integer.MAX_VALUE, 0) : null; return (CollectionUtils.isNotEmpty(authProvider)) ? authProvider.get(0) : null; } }
[ "Dmitry.Zaporozhec@openiam.com" ]
Dmitry.Zaporozhec@openiam.com
95b69e7c00187921429c587bf57d2dcf616fa846
e087ef4984a8658c287d955276f08f06da358397
/src/com/javarush/test/level21/lesson08/task02/Solution.java
ad26d8ccf428d1268c927fa8c8634a6ea55f29de
[]
no_license
YuriiLosinets/javacore
f08fd93623bc5c90fcb4eb13a03a3360b702a5fb
552117fd18a96ff99c6bd5455f16f4bb234d2bdc
refs/heads/master
2021-01-10T14:39:57.494858
2016-03-25T08:40:31
2016-03-25T08:40:31
53,958,241
0
1
null
null
null
null
UTF-8
Java
false
false
1,583
java
package com.javarush.test.level21.lesson08.task02; /* Клонирование Класс Plant не должен реализовывать интерфейс Cloneable Реализуйте механизм глубокого клонирования для Tree. Метод main изменять нельзя. */ public class Solution { public static void main(String[] args) { Tree tree = new Tree("willow", new String[]{"s1", "s2", "s3", "s4"}); Tree clone = null; try { clone = tree.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } System.out.println(tree); System.out.println(clone); System.out.println(tree.branches); System.out.println(clone.branches); } public static class Plant { private String name; public Plant(String name) { this.name = name; } public String getName() { return name; } } public static class Tree extends Plant implements Cloneable { private String[] branches; public Tree(String name, String[] branches) { super(name); this.branches = branches; } public String[] getBranches() { return branches; } @Override protected Tree clone() throws CloneNotSupportedException { return new Tree(getName(), branches != null ? branches.clone() : null); } } }
[ "yuri.losinets@gmail.com" ]
yuri.losinets@gmail.com
a7cd7df916268966f477ddaca0aa42ed3a5f5d9b
4ef431684e518b07288e8b8bdebbcfbe35f364e4
/nodeagent-tests/test-core/src/main/java/com/ca/apm/tests/testbed/NodeJSAgentRuntime10Testbed.java
d9c270bc20dfc658ed02f7215daaa8a33df23fc2
[]
no_license
Sarojkswain/APMAutomation
a37c59aade283b079284cb0a8d3cbbf79f3480e3
15659ce9a0030c2e9e5b992040e05311fff713be
refs/heads/master
2020-03-30T00:43:23.925740
2018-09-27T23:42:04
2018-09-27T23:42:04
150,540,177
0
0
null
null
null
null
UTF-8
Java
false
false
1,643
java
/* * Copyright (c) 2014 CA. All rights reserved. * * This software and all information contained therein is confidential and * proprietary and shall not be duplicated, used, disclosed or disseminated in * any way except as authorized by the applicable license agreement, without * the express written permission of CA. All authorized reproductions must be * marked with this language. * * EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO THE EXTENT * PERMITTED BY APPLICABLE LAW, CA PROVIDES THIS SOFTWARE WITHOUT WARRANTY OF * ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL CA BE * LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR * INDIRECT, FROM THE USE OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, LOST * PROFITS, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF CA IS * EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE. */ package com.ca.apm.tests.testbed; import com.ca.tas.artifact.thirdParty.NodeJsVersionArtifact; import com.ca.tas.resolver.ITasResolver; import com.ca.tas.role.*; import com.ca.tas.tests.annotations.TestBedDefinition; import java.util.Collections; /** * NodeJS10 Agent automation testbed * */ @TestBedDefinition public class NodeJSAgentRuntime10Testbed extends NodeJSAgentTestbed { protected NodeJsRole createNodeJsRole(ITasResolver tasResolver) { return new NodeJsRole.LinuxBuilder(NODEJS_ROLE_ID, tasResolver).versionNodeJs(NodeJsVersionArtifact.LINUXx64v0_10_28.getArtifact()).install("forever", Collections.singletonList("-g")).build(); } }
[ "sarojkswain@gmail.com" ]
sarojkswain@gmail.com
bd6d8a3e2e7ae2fc9859047ea775e70cf2292709
4bb83687710716d91b5da55054c04f430474ee52
/dsrc/sku.0/sys.server/compiled/game/script/theme_park/tatooine/bestine_pilots_club/pilot1.java
4bdd13ae681f5f6f401534f954278599fb3c9092
[]
no_license
geralex/SWG-NGE
0846566a44f4460c32d38078e0a1eb115a9b08b0
fa8ae0017f996e400fccc5ba3763e5bb1c8cdd1c
refs/heads/master
2020-04-06T11:18:36.110302
2018-03-19T15:42:32
2018-03-19T15:42:32
157,411,938
1
0
null
2018-11-13T16:35:01
2018-11-13T16:35:01
null
UTF-8
Java
false
false
1,504
java
package script.theme_park.tatooine.bestine_pilots_club; import script.library.hue; import script.obj_id; public class pilot1 extends script.base_script { public pilot1() { } public int OnInitialize(obj_id self) throws InterruptedException { return SCRIPT_CONTINUE; } public int OnAttach(obj_id self) throws InterruptedException { if (!hasObjVar(self, "dressed")) { } { obj_id suit = createObject("object/tangible/wearables/bodysuit/bodysuit_tie_fighter.iff", self, ""); //obj_id boots = createObject("object/tangible/wearables/boots/boots_s03.iff", self, ""); hue.hueObject(self); pvpSetAlignedFaction(self, (-615855020)); pvpMakeDeclared(self); String hair_table = "datatables/tangible/wearable/hair/hair_human_male.iff"; int numHair = dataTableGetNumRows(hair_table); numHair = numHair - 1; numHair = rand(1, numHair); String hair = dataTableGetString(hair_table, numHair, 1); obj_id hairStyle = createObject(hair, self, ""); hue.hueObject(hairStyle); setObjVar(self, "dressed", 1); } return SCRIPT_CONTINUE; } public int OnDestroy(obj_id self) throws InterruptedException { obj_id club = getObjIdObjVar(self, "club"); messageTo(club, "pilot1Died", null, 20, true); return SCRIPT_CONTINUE; } }
[ "tmoflash@gmail.com" ]
tmoflash@gmail.com
74bdfe12a7a607383e514641626480e65a2eb2fb
4d2b17fd9d7222f2f819a52e547321b30f25700b
/drools-apps/ProcessesTests/src/main/java/org/socraticgrid/workitemhandler/FailWorkItemHandler.java
1937345bd207c0105199a81960dc80d2f9122e4d
[ "Apache-2.0" ]
permissive
SocraticGrid/sg-agents
bb00fbaf3f907e6dc3b15ddf2b9b1b88681cecc4
1542404863df872166a3cd6d2893243f632244ee
refs/heads/master
2021-01-19T08:34:11.331060
2014-07-31T01:49:05
2014-07-31T01:49:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,173
java
/*********************************************************************************************************************** * * Copyright (C) 2012 by Cognitive Medical Systems, Inc (http://www.cognitivemedciine.com) * * 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. * **********************************************************************************************************************/ /*********************************************************************************************************************** * Socratic Grid contains components to which third party terms apply. To comply with these terms, the following notice is provided: * * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION * Copyright (c) 2008, Nationwide Health Information Network (NHIN) Connect. All rights reserved. * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * - Neither the name of the NHIN Connect Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * END OF TERMS AND CONDITIONS * **********************************************************************************************************************/ package org.socraticgrid.workitemhandler; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import org.drools.runtime.StatefulKnowledgeSession; import org.drools.runtime.process.WorkItem; import org.drools.runtime.process.WorkItemHandler; import org.drools.runtime.process.WorkItemManager; import org.drools.runtime.rule.FactHandle; /** * * @author esteban */ public class FailWorkItemHandler implements WorkItemHandler { private StatefulKnowledgeSession session; public FailWorkItemHandler(StatefulKnowledgeSession session) { this.session = session; } public void executeWorkItem(WorkItem workItem, WorkItemManager manager) { List list = (List)workItem.getParameter("list"); Collection<FactHandle> factHandles = session.getFactHandles(); for (FactHandle factHandle : factHandles) { list.add("FAIL - "+factHandle.toExternalForm()); } Map<String, Object> result = new HashMap<String, Object>(); result.put("list", list); manager.completeWorkItem(workItem.getId(), result); } public void abortWorkItem(WorkItem workItem, WorkItemManager manager) { } }
[ "esteban.aliverti@gmail.com" ]
esteban.aliverti@gmail.com
a7228a797ef613a4bb5657d549b8c3a246d4fdb4
2079ff0bfa752ac982b10d3304a0a224bc20e944
/gxt-showcase/src/main/java/com/sencha/gxt/examples/resources/client/model/PlantProxy.java
c5beb8a9aedca26c17eb63e94605d6e576ee6659
[]
no_license
Elisabitao/exo-training
32be8bca0257110b7fcf4df7313a9e8eb1a5917a
414c2efb6c3f8b58331312e7bdfcecfa1a59b3dd
refs/heads/master
2021-01-18T07:49:29.781846
2012-06-27T11:59:12
2012-06-28T11:06:07
62,512,864
1
0
null
2016-07-03T19:55:13
2016-07-03T19:55:11
null
UTF-8
Java
false
false
626
java
/** * Sencha GXT 3.0.0b - Sencha for GWT * Copyright(c) 2007-2012, Sencha, Inc. * licensing@sencha.com * * http://www.sencha.com/products/gxt/license/ */ package com.sencha.gxt.examples.resources.client.model; import java.util.Date; public interface PlantProxy { public Date getAvailable(); public void setAvailable(Date available); public boolean isIndoor(); public void setIndoor(boolean indoor); public String getLight(); public void setLight(String light); public String getName(); public void setName(String name); public double getPrice(); public void setPrice(double price); }
[ "haithanh0809@gmail.com" ]
haithanh0809@gmail.com
6ae3f2da3ffb6629ef9552d7f077444c03a57074
9254e7279570ac8ef687c416a79bb472146e9b35
/baas-20181221/src/main/java/com/aliyun/baas20181221/models/DescribeFabricConsortiumConfigResponseBody.java
2757cc2a155dcc1319cc0c311a7bd8eeb2524734
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,884
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.baas20181221.models; import com.aliyun.tea.*; public class DescribeFabricConsortiumConfigResponseBody extends TeaModel { @NameInMap("RequestId") public String requestId; @NameInMap("ErrorCode") public Integer errorCode; @NameInMap("Success") public Boolean success; @NameInMap("Result") public DescribeFabricConsortiumConfigResponseBodyResult result; public static DescribeFabricConsortiumConfigResponseBody build(java.util.Map<String, ?> map) throws Exception { DescribeFabricConsortiumConfigResponseBody self = new DescribeFabricConsortiumConfigResponseBody(); return TeaModel.build(map, self); } public DescribeFabricConsortiumConfigResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public DescribeFabricConsortiumConfigResponseBody setErrorCode(Integer errorCode) { this.errorCode = errorCode; return this; } public Integer getErrorCode() { return this.errorCode; } public DescribeFabricConsortiumConfigResponseBody setSuccess(Boolean success) { this.success = success; return this; } public Boolean getSuccess() { return this.success; } public DescribeFabricConsortiumConfigResponseBody setResult(DescribeFabricConsortiumConfigResponseBodyResult result) { this.result = result; return this; } public DescribeFabricConsortiumConfigResponseBodyResult getResult() { return this.result; } public static class DescribeFabricConsortiumConfigResponseBodyResult extends TeaModel { @NameInMap("ChannelPolicy") public java.util.List<String> channelPolicy; @NameInMap("OrdererType") public java.util.List<String> ordererType; public static DescribeFabricConsortiumConfigResponseBodyResult build(java.util.Map<String, ?> map) throws Exception { DescribeFabricConsortiumConfigResponseBodyResult self = new DescribeFabricConsortiumConfigResponseBodyResult(); return TeaModel.build(map, self); } public DescribeFabricConsortiumConfigResponseBodyResult setChannelPolicy(java.util.List<String> channelPolicy) { this.channelPolicy = channelPolicy; return this; } public java.util.List<String> getChannelPolicy() { return this.channelPolicy; } public DescribeFabricConsortiumConfigResponseBodyResult setOrdererType(java.util.List<String> ordererType) { this.ordererType = ordererType; return this; } public java.util.List<String> getOrdererType() { return this.ordererType; } } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
54d4b26ebdeaf9e3b15ce9a8737fa4d34d2177ed
dc42de8bcff96301e5d4d453902cfc7c8dcb0969
/app/src/main/java/com/cdkj/link_community/adapters/MarketChooseListAdapter.java
4a6644b7bf520d57ac3b4f7574e6345332afbeba
[]
no_license
ibisTime/xn-bcnew-android
1865040a7c38cbb7fa622db0882954078b9079d1
693b265f6a6b96aa0ead289aa1b31d73b2c02e25
refs/heads/master
2021-04-09T15:17:27.968838
2018-06-05T03:45:02
2018-06-05T03:45:02
125,802,043
0
1
null
null
null
null
UTF-8
Java
false
false
2,851
java
package com.cdkj.link_community.adapters; import android.support.annotation.Nullable; import android.support.v4.content.ContextCompat; import com.cdkj.link_community.R; import com.cdkj.link_community.model.MyChooseMarket; import com.cdkj.link_community.utils.AccountUtil; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import java.util.List; import static com.cdkj.link_community.utils.AccountUtil.formatPercent; /** * 行情自选适配器 * Created by cdkj on 2018/3/19. */ public class MarketChooseListAdapter extends BaseQuickAdapter<MyChooseMarket, BaseViewHolder> { public MarketChooseListAdapter(@Nullable List<MyChooseMarket> data) { super(R.layout.item_market_add_done, data); } @Override protected void convert(BaseViewHolder viewHolder, MyChooseMarket item) { if (item == null ) return; if (viewHolder.getLayoutPosition() % 2 == 0) { viewHolder.setBackgroundColor(R.id.content, ContextCompat.getColor(mContext, R.color.item_bg_other)); } else { viewHolder.setBackgroundColor(R.id.content, ContextCompat.getColor(mContext, R.color.white)); } viewHolder.setText(R.id.tv_name, item.getSymbol()); viewHolder.setText(R.id.tv_name_2, item.getExchangeEname()); viewHolder.setText(R.id.tv_coin_num, item.getToSymbol() + "量:" + item.getVolume()); viewHolder.setText(R.id.tv_price, AccountUtil.MONEY_SIGN + AccountUtil.scale(item.getLastCnyPrice(),2)); viewHolder.setText(R.id.tv_price_2, item.getLastPrice()); viewHolder.setGone(R.id.iv_warn, item.getIsWarn().equals("1")); if (item.getPercentChange() != null){ double rate = Double.parseDouble(item.getPercentChange()); viewHolder.setText(R.id.btn_state, formatPercent(rate*100) + "%"); if (rate == 0) { viewHolder.setBackgroundRes(R.id.btn_state, R.drawable.market_gray_bg); viewHolder.setTextColor(R.id.tv_price, ContextCompat.getColor(mContext, R.color.market_gray)); } else if (rate >= 0) { viewHolder.setText(R.id.btn_state, "+"+formatPercent(rate*100) + "%"); viewHolder.setBackgroundRes(R.id.btn_state, R.drawable.market_green_bg); viewHolder.setTextColor(R.id.tv_price, ContextCompat.getColor(mContext, R.color.market_green)); } else { viewHolder.setBackgroundRes(R.id.btn_state, R.drawable.market_red_bg); viewHolder.setTextColor(R.id.tv_price, ContextCompat.getColor(mContext, R.color.market_red)); } } viewHolder.addOnClickListener(R.id.btn_to_top); viewHolder.addOnClickListener(R.id.btn_delete); viewHolder.addOnClickListener(R.id.content); } }
[ "200951328@qq.com" ]
200951328@qq.com
88aff470e5e388da9fee543fe7d16cecafc2dfd7
7dbbe21b902fe362701d53714a6a736d86c451d7
/BzenStudio-5.6/Source/com/zend/ide/desktop/i.java
7cd0305dacc798ddd11ca261cbe259dae543b91f
[]
no_license
HS-matty/dev
51a53b4fd03ae01981549149433d5091462c65d0
576499588e47e01967f0c69cbac238065062da9b
refs/heads/master
2022-05-05T18:32:24.148716
2022-03-20T16:55:28
2022-03-20T16:55:28
196,147,486
0
0
null
null
null
null
UTF-8
Java
false
false
550
java
package com.zend.ide.desktop; import com.zend.ide.util.a.b; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; class i extends WindowAdapter { final cj a; i(cj paramcj) { } public void windowClosing(WindowEvent paramWindowEvent) { try { this.a.c(false); } catch (Exception localException) { b.a(localException); } } } /* Location: C:\Program Files\Zend\ZendStudio-5.5.1\bin\ZendIDE.jar * Qualified Name: com.zend.ide.desktop.i * JD-Core Version: 0.6.0 */
[ "byqdes@gmail.com" ]
byqdes@gmail.com
4c9d4f488508acd19b9a5b63a7e2b7d152c8e06d
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/google--closure-compiler/4c6e1039b80859f17de5f3cbcfeba61ed8ea0485/after/CheckUnreachableCodeTest.java
6a59266d3418b310c72bb5764fa3c9edab327a4c
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
6,793
java
/* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.javascript.jscomp; import com.google.javascript.jscomp.CheckLevel; /** * Tests for {@link CheckUnreachableCode}. * */ public class CheckUnreachableCodeTest extends CompilerTestCase { @Override protected CompilerPass getProcessor(Compiler compiler) { return new CombinedCompilerPass(compiler, new CheckUnreachableCode(compiler, CheckLevel.ERROR)); } public void testCorrectSimple() { testSame("var x"); testSame("var x = 1"); testSame("var x = 1; x = 2;"); testSame("if (x) { var x = 1 }"); testSame("if (x) { var x = 1 } else { var y = 2 }"); testSame("while(x) {}"); } public void testIncorrectSimple() { assertUnreachable("function f() { return; x=1; }"); assertUnreachable("function f() { return; x=1; x=1; }"); assertUnreachable("function f() { return; var x = 1; }"); } public void testCorrectIfReturns() { testSame("function f() { if (x) { return } }"); testSame("function f() { if (x) { return } return }"); testSame("function f() { if (x) { if (y) { return } } else { return }}"); testSame("function f()" + "{ if (x) { if (y) { return } return } else { return }}"); } public void testInCorrectIfReturns() { assertUnreachable( "function f() { if (x) { return } else { return } return }"); } public void testCorrectSwitchReturn() { testSame("function f() { switch(x) { default: return; case 1: x++; }}"); testSame("function f() {" + "switch(x) { default: return; case 1: x++; } return }"); testSame("function f() {" + "switch(x) { default: return; case 1: return; }}"); testSame("function f() {" + "switch(x) { case 1: return; } return }"); testSame("function f() {" + "switch(x) { case 1: case 2: return; } return }"); testSame("function f() {" + "switch(x) { case 1: return; case 2: return; } return }"); testSame("function f() {" + "switch(x) { case 1 : return; case 2: return; } return }"); } public void testInCorrectSwitchReturn() { assertUnreachable("function f() {" + "switch(x) { default: return; case 1: return; } return }"); assertUnreachable("function f() {" + "switch(x) { default: return; return; case 1: return; } }"); } public void testCorrectLoopBreaksAndContinues() { testSame("while(1) { foo(); break }"); testSame("while(1) { foo(); continue }"); testSame("for(;;) { foo(); break }"); testSame("for(;;) { foo(); continue }"); testSame("for(;;) { if (x) { break } }"); testSame("for(;;) { if (x) { continue } }"); testSame("do { foo(); continue} while(1)"); } public void testInCorrectLoopBreaksAndContinues() { assertUnreachable("while(1) { foo(); break; bar()}"); assertUnreachable("while(1) { foo(); continue; bar() }"); assertUnreachable("for(;;) { foo(); break; bar() }"); assertUnreachable("for(;;) { foo(); continue; bar() }"); assertUnreachable("for(;;) { if (x) { break; bar() } }"); assertUnreachable("for(;;) { if (x) { continue; bar() } }"); assertUnreachable("do { foo(); continue; bar()} while(1)"); } public void testUncheckedWhileInDo() { assertUnreachable("do { foo(); break} while(1)"); } public void testUncheckedConditionInFor() { assertUnreachable("for(var x = 0; x < 100; x++) { break };"); } public void testFunctionDeclaration() { // functions are not in our CFG. testSame("function f() { return; function ff() { }}"); } public void testVarDeclaration() { assertUnreachable("function f() { return; var x = 1 }"); // I think the user should fix this as well. assertUnreachable("function f() { return; var x }"); } public void testReachableTryCatchFinally() { testSame("try { } finally { }"); testSame("try { foo(); } finally bar(); "); testSame("try { foo() } finally { bar() }"); testSame("try { foo(); } catch (e) {e()} finally bar(); "); testSame("try { foo() } catch (e) {e()} finally { bar() }"); } public void testUnreachableCatch() { assertUnreachable("try { var x = 0 } catch (e) { }"); } public void testSpuriousBreak() { testSame("switch (x) { default: throw x; break; }"); } public void testInstanceOfThrowsException() { testSame("function f() {try { if (value instanceof type) return true; } " + "catch (e) { }}"); } public void testFalseCondition() { assertUnreachable("if(false) { }"); assertUnreachable("if(0) { }"); } public void testUnreachableLoop() { assertUnreachable("while(false) {}"); } public void testInfiniteLoop() { testSame("while (true) { foo(); break; }"); // TODO(user): Have a infinite loop warning instead. assertUnreachable("while(true) {} foo()"); } public void testSuppression() { assertUnreachable("if(false) { }"); testSame( "/** @fileoverview\n" + " * @suppress {unreachable}\n" + " */\n" + "if(false) { }"); testSame( "/** @fileoverview\n" + " * @suppress {unreachable}\n" + " */\n" + "function f() { if(false) { } }"); testSame( "/**\n" + " * @suppress {unreachable}\n" + " */\n" + "function f() { if(false) { } }"); assertUnreachable( "/**\n" + " * @suppress {unreachable}\n" + " */\n" + "function f() { if(false) { } }\n" + "function g() { if(false) { } }\n"); testSame( "/**\n" + " * @suppress {unreachable}\n" + " */\n" + "function f() {\n" + " function g() { if(false) { } }\n" + " if(false) { } }\n"); assertUnreachable( "function f() {\n" + " /**\n" + " * @suppress {unreachable}\n" + " */\n" + " function g() { if(false) { } }\n" + " if(false) { } }\n"); testSame( "function f() {\n" + " /**\n" + " * @suppress {unreachable}\n" + " */\n" + " function g() { if(false) { } }\n" + "}\n"); } private void assertUnreachable(String js) { test(js, js, CheckUnreachableCode.UNREACHABLE_CODE); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
6571ddbd505cc42c9afcb925732608bf7301b1ed
8e55394c927c400e5eee0577862308fadf0858eb
/dc3-api/dc3-api-manager/src/main/java/com/dc3/api/center/manager/hystrix/LabelClientHystrix.java
f4b47543340f45d09bf0a5b8a033cc8409ea07ae
[ "Apache-2.0" ]
permissive
lhwolfman/iot-dc3
81343977157cc3d77f19e4889be740f2c1407a0d
02d6fd3bd56fd67f07d31b28b5c9c118af1b6626
refs/heads/master
2022-07-31T08:30:17.398914
2020-05-25T16:05:48
2020-05-25T16:05:48
268,097,527
1
0
null
2020-05-30T14:37:32
2020-05-30T14:37:32
null
UTF-8
Java
false
false
2,093
java
/* * Copyright 2019 Pnoker. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.dc3.api.center.manager.hystrix; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.dc3.api.center.manager.feign.LabelClient; import com.dc3.common.bean.R; import com.dc3.common.dto.LabelDto; import com.dc3.common.model.Label; import feign.hystrix.FallbackFactory; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; /** * <p>LabelClientHystrix * * @author pnoker */ @Slf4j @Component public class LabelClientHystrix implements FallbackFactory<LabelClient> { @Override public LabelClient create(Throwable throwable) { String message = throwable.getMessage() == null ? "No available server for client: DC3-MANAGER" : throwable.getMessage(); log.error("Hystrix:{}", message, throwable); return new LabelClient() { @Override public R<Label> add(Label label) { return R.fail(message); } @Override public R<Boolean> delete(Long id) { return R.fail(message); } @Override public R<Label> update(Label label) { return R.fail(message); } @Override public R<Label> selectById(Long id) { return R.fail(message); } @Override public R<Page<Label>> list(LabelDto labelDto) { return R.fail(message); } }; } }
[ "pnokers@icloud.com" ]
pnokers@icloud.com
5acf3f65fc462642c3dd14752327130e003bfd55
5020fa99c9cc5c235c31281fbc6daeb38b03dfa8
/order-service-engine-ri/src/main/java/org/socraticgrid/hl7/services/orders/dao/PromiseDao.java
4866330999a5892b20d1877bd993d34a293f19f3
[ "Apache-2.0" ]
permissive
SocraticGrid/OMS-Implementation
74e5ad4c60b681e3034788f317c841ac166199ea
48b27f2a58bf7f8469511777dcd98574e204fe3a
refs/heads/master
2021-01-10T15:43:06.986204
2015-10-08T09:29:04
2015-10-08T09:29:04
43,059,743
0
0
null
null
null
null
UTF-8
Java
false
false
960
java
/* * Copyright 2015 Cognitive Medical Systems, Inc (http://www.cognitivemedciine.com). * * 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.socraticgrid.hl7.services.orders.dao; import org.socraticgrid.hl7.services.orders.model.entity.Promise; import org.socraticgrid.hl7.services.orders.model.primatives.Identifier; public interface PromiseDao extends GenericDao<Promise, Long> { Promise getByIdentifier(Identifier identifier); }
[ "esteban.aliverti@gmail.com" ]
esteban.aliverti@gmail.com
5df28af38a5fa8d2e21a9d442d56d13b323310ff
fb7efe44f4d9f30d623f880d0eb620f3a81f0fbd
/android_webview/java/src/org/chromium/android_webview/AwTokenBindingManager.java
dc2dcaebf3f5e4fa69ef10d8157cbf36986c36b2
[ "BSD-3-Clause" ]
permissive
wzyy2/chromium-browser
2644b0daf58f8b3caee8a6c09a2b448b2dfe059c
eb905f00a0f7e141e8d6c89be8fb26192a88c4b7
refs/heads/master
2022-11-23T20:25:08.120045
2018-01-16T06:41:26
2018-01-16T06:41:26
117,618,467
3
2
BSD-3-Clause
2022-11-20T22:03:57
2018-01-16T02:09:10
null
UTF-8
Java
false
false
3,513
java
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.android_webview; import android.net.Uri; import org.chromium.base.Callback; import org.chromium.base.Log; import org.chromium.base.annotations.CalledByNative; import org.chromium.base.annotations.JNINamespace; import java.security.KeyFactory; import java.security.KeyPair; import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.security.spec.PKCS8EncodedKeySpec; import java.security.spec.X509EncodedKeySpec; /** * AwTokenBindingManager manages the token binding protocol. * * see https://tools.ietf.org/html/draft-ietf-tokbind-protocol-03 * * The token binding protocol can be enabled for browser context * separately. However all webviews share the same browser context and do not * expose the browser context to the embedder app. As such, there is no way to * enable token binding manager for individual webviews. */ @JNINamespace("android_webview") public final class AwTokenBindingManager { private static final String TAG = "TokenBindingManager"; private static final String ELLIPTIC_CURVE = "EC"; public void enableTokenBinding() { nativeEnableTokenBinding(); } public void getKey(Uri origin, String[] spec, Callback<KeyPair> callback) { if (callback == null) { throw new IllegalArgumentException("callback can't be null"); } nativeGetTokenBindingKey(origin.getHost(), callback); } public void deleteKey(Uri origin, Callback<Boolean> callback) { if (origin == null) { throw new IllegalArgumentException("origin can't be null"); } // null callback is allowed nativeDeleteTokenBindingKey(origin.getHost(), callback); } public void deleteAllKeys(Callback<Boolean> callback) { // null callback is allowed nativeDeleteAllTokenBindingKeys(callback); } @CalledByNative private static void onKeyReady( Callback<KeyPair> callback, byte[] privateKeyBytes, byte[] publicKeyBytes) { if (privateKeyBytes == null || publicKeyBytes == null) { callback.onResult(null); return; } KeyPair keyPair = null; try { KeyFactory factory = KeyFactory.getInstance(ELLIPTIC_CURVE); PrivateKey privateKey = factory.generatePrivate(new PKCS8EncodedKeySpec(privateKeyBytes)); PublicKey publicKey = factory.generatePublic(new X509EncodedKeySpec(publicKeyBytes)); keyPair = new KeyPair(publicKey, privateKey); } catch (NoSuchAlgorithmException | InvalidKeySpecException ex) { Log.e(TAG, "Failed converting key ", ex); } callback.onResult(keyPair); } @CalledByNative private static void onDeletionComplete(Callback<Boolean> callback) { // At present, the native deletion complete callback always succeeds. callback.onResult(true); } private native void nativeEnableTokenBinding(); private native void nativeGetTokenBindingKey(String host, Callback<KeyPair> callback); private native void nativeDeleteTokenBindingKey(String host, Callback<Boolean> callback); private native void nativeDeleteAllTokenBindingKeys(Callback<Boolean> callback); }
[ "jacob-chen@iotwrt.com" ]
jacob-chen@iotwrt.com
a37fba3f844152dc2757e0917dc07929d140cb5c
37f6d3588aa800c967ac36fabf0176ba7afe592a
/src/main/java/org/vs/others/queens/EightQueenByBacktracking.java
9e67a1597204198003e3936dc2a60fe7cd9bbd84
[]
no_license
vishalsinha21/java-problems
30d064bd1c58dacee9848d0de6b197c70cd6362e
dd3eb2222bc797b4b9639c4dddeaa14fcfa102e9
refs/heads/master
2023-04-16T12:20:59.684969
2023-03-31T13:28:27
2023-03-31T13:28:27
140,075,453
0
0
null
null
null
null
UTF-8
Java
false
false
610
java
package org.vs.others.queens; public class EightQueenByBacktracking { static ChessBoard board = new ChessBoard(8); public static void main(String[] args) { placeQueen(0, 0); board.print(); } public static void placeQueen(int i, int j) { if (board.numberOfQueensPlaced() == 8) { return; } if (board.isAvailable(i, j)) { board.placeQueen(i, j); placeQueen(i + 1, j); } else { if (j >= 8) { placeQueen(i - 1, 0); } placeQueen(i, j + 1); } } }
[ "vishal.sinha21@gmail.com" ]
vishal.sinha21@gmail.com
8cb9e21a51d4e3b86c0b53aa38c2127928e4f46e
9935e21a2599e68506b6bdfd5556893cf3f00562
/app/src/main/java/com/ysxsoft/home/view/activity/MessageDetailActivity.java
6b19018cec2cbe8e4c9f554218bbc5ea3cc870d7
[]
no_license
Sincerly/Home
46d3be75c1cbd13a34f49abb02460f8dc9b20a76
c36379e1b09f5198e09c56de4bd7c1e53a6f2bce
refs/heads/master
2020-06-27T03:45:07.693915
2019-07-15T01:16:50
2019-07-15T01:16:50
199,835,558
0
0
null
null
null
null
UTF-8
Java
false
false
4,846
java
package com.ysxsoft.home.view.activity; import android.os.Handler; import android.os.Looper; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import android.webkit.WebView; import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.alibaba.android.arouter.facade.annotation.Autowired; import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.android.arouter.launcher.ARouter; import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.ysxsoft.common_base.adapter.BaseQuickAdapter; import com.ysxsoft.common_base.adapter.BaseViewHolder; import com.ysxsoft.common_base.base.BaseActivity; import com.ysxsoft.common_base.base.frame.list.IListAdapter; import com.ysxsoft.common_base.base.frame.list.ListManager; import com.ysxsoft.common_base.okhttp.HttpResponse; import com.ysxsoft.common_base.utils.JsonUtils; import com.ysxsoft.common_base.utils.SharedPreferencesUtils; import com.ysxsoft.common_base.utils.WebViewUtils; import com.ysxsoft.common_base.view.widgets.MultipleStatusView; import com.ysxsoft.home.ARouterPath; import com.ysxsoft.home.R; import com.ysxsoft.home.config.AppConfig; import com.ysxsoft.home.response.MessageDetailResponse; import com.zhy.http.okhttp.OkHttpUtils; import com.zhy.http.okhttp.callback.StringCallback; import java.util.ArrayList; import java.util.List; import butterknife.BindView; import butterknife.OnClick; import okhttp3.Call; /** * create by Sincerly on 2019/5/18 0018 **/ @Route(path = "/main/MessageDetailActivity") public class MessageDetailActivity extends BaseActivity { @BindView(R.id.backWithText) TextView backWithText; @BindView(R.id.back) ImageView back; @BindView(R.id.backLayout) LinearLayout backLayout; @BindView(R.id.title) TextView title; @BindView(R.id.rightWithIcon) TextView rightWithIcon; @BindView(R.id.webTitle) TextView webTitle; @BindView(R.id.time) TextView time; @BindView(R.id.webView) WebView webView; @BindView(R.id.bg) LinearLayout bg; @BindView(R.id.bottomLineView) View bottomLineView; @Autowired String mid; public static void start(String mid) { ARouter.getInstance().build(ARouterPath.getMessageDetailActivity()).withString("mid", mid).navigation(); } @Override public void doWork() { super.doWork(); ARouter.getInstance().inject(this); initTitle(); WebViewUtils.init(webView); getDetail(); } /** * 注册 */ private void getDetail() { OkHttpUtils.post() .url(AppConfig.getInstance().MSG_DETAIL) .addParams("uid", SharedPreferencesUtils.getUid(MessageDetailActivity.this)) .addParams("mid", mid) .tag(this) .build() .execute(new StringCallback() { @Override public void onError(Call call, Exception e, int id) { hideLoadingDialog(); } @Override public void onResponse(String response, int id) { hideLoadingDialog(); MessageDetailResponse resp = JsonUtils.parseByGson(response, MessageDetailResponse.class); if (resp != null) { if (HttpResponse.SUCCESS.equals(resp.getCode())) { if (resp.getData() != null) { webTitle.setText(resp.getData().getType()); WebViewUtils.setH5Data(webView, resp.getData().getContent()); } } else { //请求失败 showToast(resp.getMsg()); } } else { showToast("获取消息详情失败"); } } }); } @Override protected int getLayoutId() { return R.layout.activity_message_detail; } private void initTitle() { bg.setBackgroundColor(getResources().getColor(R.color.colorWhite)); backLayout.setVisibility(View.VISIBLE); back.setImageResource(R.mipmap.icon_gray_back); title.setText("消息详情"); } @OnClick({R.id.backLayout}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.backLayout: backToActivity(); break; } } }
[ "1475590636@qq.com" ]
1475590636@qq.com
383f693fea3b56577b49089cf33a9c6dd4b7094a
471a1d9598d792c18392ca1485bbb3b29d1165c5
/jadx-MFP/src/main/java/com/shinobicontrols/charts/cm.java
7de58d6d31f922b540f1d92f9d1c2aca6a2f5052
[]
no_license
reed07/MyPreferencePal
84db3a93c114868dd3691217cc175a8675e5544f
365b42fcc5670844187ae61b8cbc02c542aa348e
refs/heads/master
2020-03-10T23:10:43.112303
2019-07-08T00:39:32
2019-07-08T00:39:32
129,635,379
2
0
null
null
null
null
UTF-8
Java
false
false
5,405
java
package com.shinobicontrols.charts; import android.graphics.PointF; import com.shinobicontrols.charts.Series.SelectionMode; import com.shinobicontrols.charts.ShinobiChart.OnGestureListener; class cm implements OnGestureListener { boolean a; private final v b; private final cn c; public void onDoubleTapDown(ShinobiChart shinobiChart, PointF pointF) { } public void onDoubleTapUp(ShinobiChart shinobiChart, PointF pointF) { } public void onLongTouchDown(ShinobiChart shinobiChart, PointF pointF) { } public void onLongTouchUp(ShinobiChart shinobiChart, PointF pointF) { } public void onPinch(ShinobiChart shinobiChart, PointF pointF, PointF pointF2, PointF pointF3) { } public void onPinchEnd(ShinobiChart shinobiChart, PointF pointF, boolean z, PointF pointF2) { } public void onSecondTouchDown(ShinobiChart shinobiChart, PointF pointF, PointF pointF2) { } public void onSecondTouchUp(ShinobiChart shinobiChart, PointF pointF, PointF pointF2) { } public void onSingleTouchDown(ShinobiChart shinobiChart, PointF pointF) { } public void onSwipe(ShinobiChart shinobiChart, PointF pointF, PointF pointF2) { } public void onSwipeEnd(ShinobiChart shinobiChart, PointF pointF, boolean z, PointF pointF2) { } cm(v vVar) { this.b = vVar; this.c = new cn(vVar); } public void onSingleTouchUp(ShinobiChart shinobiChart, PointF pointF) { a(pointF); } private void a(PointF pointF) { if (this.b.l()) { c(pointF); } else { b(pointF); } } private void b(PointF pointF) { a a2 = this.c.a(pointF, b.SELECTION_MODE_NOT_NONE); if (a.b(a2)) { CartesianSeries cartesianSeries = (CartesianSeries) a2.c(); InternalDataPoint b2 = a2.b(); boolean z = true; switch (cartesianSeries.s) { case POINT_SINGLE: case POINT_MULTIPLE: synchronized (x.a) { if (cartesianSeries.s != SelectionMode.POINT_MULTIPLE) { if (!b2.h) { for (InternalDataPoint internalDataPoint : cartesianSeries.n.c) { if (internalDataPoint != b2) { cartesianSeries.a(internalDataPoint, false); } } cartesianSeries.a(b2, true); } } if (b2.h) { z = false; } cartesianSeries.a(b2, z); } break; case SERIES: synchronized (x.a) { if (!this.a) { if (cartesianSeries.d) { z = false; } cartesianSeries.setSelected(z); } else if (cartesianSeries.d) { cartesianSeries.setSelected(false); } else { for (CartesianSeries cartesianSeries2 : this.b.h()) { if (cartesianSeries2 != cartesianSeries) { cartesianSeries2.setSelected(false); } } cartesianSeries.setSelected(true); } } break; } if (cartesianSeries.s != SelectionMode.NONE) { this.b.b.e(); this.b.b.invalidate(); this.b.redrawChart(); } } } private void c(PointF pointF) { a a2 = this.c.a(pointF); if (a.b(a2)) { PieDonutSeries pieDonutSeries = (PieDonutSeries) a2.c(); PieDonutSlice pieDonutSlice = (PieDonutSlice) a2.b(); switch (pieDonutSeries.s) { case POINT_SINGLE: case POINT_MULTIPLE: a(!pieDonutSlice.h, pieDonutSeries, pieDonutSlice, pieDonutSeries.s, true); return; default: return; } } } /* access modifiers changed from: 0000 */ public void a(boolean z, PieDonutSeries<?> pieDonutSeries, PieDonutSlice pieDonutSlice, SelectionMode selectionMode, boolean z2) { boolean a2; synchronized (x.a) { boolean z3 = false; if (selectionMode == SelectionMode.POINT_SINGLE && !pieDonutSlice.h) { boolean z4 = false; for (InternalDataPoint internalDataPoint : pieDonutSeries.n.c) { PieDonutSlice pieDonutSlice2 = (PieDonutSlice) internalDataPoint; if (pieDonutSlice2 != pieDonutSlice) { z4 |= pieDonutSeries.a((InternalDataPoint) pieDonutSlice2, false); } } z3 = z4; } a2 = pieDonutSeries.a((InternalDataPoint) pieDonutSlice, z) | z3; } if (a2) { pieDonutSeries.a(pieDonutSlice, z2); } } }
[ "anon@ymous.email" ]
anon@ymous.email
920dc3e54f6ac683c109132b7fe831599b4c5275
2c140a0632890ce2a28a9025b493cbc67fab3bd5
/src/main/java/org/hl7/v3/PRPMMT401010UV01TerritorialAuthority.java
b118b96fdab1bfa79ed971481429d928a6e6e878
[]
no_license
darkxi/hl7-Edition2012
cf5d475e06464c776b8b39676953835aae1fb3f5
add3330c499fd0491fd18a2f71be04a3c1efb391
refs/heads/master
2020-06-07T01:21:19.768327
2017-07-18T03:23:43
2017-08-18T09:03:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,091
java
// // 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.7 生成的 // 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // 在重新编译源模式时, 对此文件的所有修改都将丢失。 // 生成时间: 2017.08.10 时间 10:45:02 AM CST // package org.hl7.v3; import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; /** * <p>PRPM_MT401010UV01.TerritorialAuthority complex type的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * * <pre> * &lt;complexType name="PRPM_MT401010UV01.TerritorialAuthority"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;group ref="{urn:hl7-org:v3}InfrastructureRootElements"/> * &lt;element name="code" type="{urn:hl7-org:v3}CD"/> * &lt;element name="territory" type="{urn:hl7-org:v3}PRPM_MT401010UV01.Jurisdiction" minOccurs="0"/> * &lt;element name="part" type="{urn:hl7-org:v3}PRPM_MT401010UV01.Part" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;attGroup ref="{urn:hl7-org:v3}InfrastructureRootAttributes"/> * &lt;attribute name="nullFlavor" type="{urn:hl7-org:v3}NullFlavor" /> * &lt;attribute name="classCode" use="required" type="{urn:hl7-org:v3}RoleClassTerritoryOfAuthority" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PRPM_MT401010UV01.TerritorialAuthority", propOrder = { "realmCode", "typeId", "templateId", "code", "territory", "part" }) public class PRPMMT401010UV01TerritorialAuthority { protected DSETCS realmCode; protected II typeId; protected LISTII templateId; @XmlElement(required = true) protected CD code; @XmlElementRef(name = "territory", namespace = "urn:hl7-org:v3", type = JAXBElement.class, required = false) protected JAXBElement<PRPMMT401010UV01Jurisdiction> territory; @XmlElement(nillable = true) protected List<PRPMMT401010UV01Part> part; @XmlAttribute(name = "nullFlavor") protected NullFlavor nullFlavor; @XmlAttribute(name = "classCode", required = true) protected RoleClassTerritoryOfAuthority classCode; /** * 获取realmCode属性的值。 * * @return * possible object is * {@link DSETCS } * */ public DSETCS getRealmCode() { return realmCode; } /** * 设置realmCode属性的值。 * * @param value * allowed object is * {@link DSETCS } * */ public void setRealmCode(DSETCS value) { this.realmCode = value; } /** * 获取typeId属性的值。 * * @return * possible object is * {@link II } * */ public II getTypeId() { return typeId; } /** * 设置typeId属性的值。 * * @param value * allowed object is * {@link II } * */ public void setTypeId(II value) { this.typeId = value; } /** * 获取templateId属性的值。 * * @return * possible object is * {@link LISTII } * */ public LISTII getTemplateId() { return templateId; } /** * 设置templateId属性的值。 * * @param value * allowed object is * {@link LISTII } * */ public void setTemplateId(LISTII value) { this.templateId = value; } /** * 获取code属性的值。 * * @return * possible object is * {@link CD } * */ public CD getCode() { return code; } /** * 设置code属性的值。 * * @param value * allowed object is * {@link CD } * */ public void setCode(CD value) { this.code = value; } /** * 获取territory属性的值。 * * @return * possible object is * {@link JAXBElement }{@code <}{@link PRPMMT401010UV01Jurisdiction }{@code >} * */ public JAXBElement<PRPMMT401010UV01Jurisdiction> getTerritory() { return territory; } /** * 设置territory属性的值。 * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link PRPMMT401010UV01Jurisdiction }{@code >} * */ public void setTerritory(JAXBElement<PRPMMT401010UV01Jurisdiction> value) { this.territory = value; } /** * Gets the value of the part property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the part property. * * <p> * For example, to add a new item, do as follows: * <pre> * getPart().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link PRPMMT401010UV01Part } * * */ public List<PRPMMT401010UV01Part> getPart() { if (part == null) { part = new ArrayList<PRPMMT401010UV01Part>(); } return this.part; } /** * 获取nullFlavor属性的值。 * * @return * possible object is * {@link NullFlavor } * */ public NullFlavor getNullFlavor() { return nullFlavor; } /** * 设置nullFlavor属性的值。 * * @param value * allowed object is * {@link NullFlavor } * */ public void setNullFlavor(NullFlavor value) { this.nullFlavor = value; } /** * 获取classCode属性的值。 * * @return * possible object is * {@link RoleClassTerritoryOfAuthority } * */ public RoleClassTerritoryOfAuthority getClassCode() { return classCode; } /** * 设置classCode属性的值。 * * @param value * allowed object is * {@link RoleClassTerritoryOfAuthority } * */ public void setClassCode(RoleClassTerritoryOfAuthority value) { this.classCode = value; } }
[ "2319457455@qq.com" ]
2319457455@qq.com
4a6c8a37a27101e35303b1371a9f606e5082a27e
d9347ca35b41db7f6b8a5691524e9dfc96039609
/server/ngb-cli/src/main/java/com/epam/ngb/cli/manager/command/ServerParameters.java
764dcc7a036c8b6f2d6a697425b63a9213d0fd6c
[ "MIT" ]
permissive
sidoruka/NGB2
e2800526b7044c7dd694bfe549f80b8d4023f7cf
77a11df79f051ccbadab0d6780a9c75a7fe8e9f6
refs/heads/master
2021-01-19T20:12:03.247123
2017-04-17T12:55:23
2017-04-17T12:55:23
88,494,386
0
0
null
null
null
null
UTF-8
Java
false
false
3,714
java
/* * MIT License * * Copyright (c) 2016 EPAM Systems * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.epam.ngb.cli.manager.command; /** * {@code ServerParameters} represents an NGB server configuration, required for * HTTP commands execution */ public class ServerParameters { private String serverUrl; private String authenticationUrl; private String authPayload; private String searchUrl; private String registrationUrl; private String projectLoadUrl; private String projectTreeUrl; private String versionUrl; private String projectLoadByIdUrl; private String fileFindUrl; private String serverVersion; public String getServerUrl() { return serverUrl; } public void setServerUrl(String serverUrl) { this.serverUrl = serverUrl; } public String getAuthenticationUrl() { return authenticationUrl; } public void setAuthenticationUrl(String authenticationUrl) { this.authenticationUrl = authenticationUrl; } public String getAuthPayload() { return authPayload; } public void setAuthPayload(String authPayload) { this.authPayload = authPayload; } public String getSearchUrl() { return searchUrl; } public void setSearchUrl(String searchUrl) { this.searchUrl = searchUrl; } public String getRegistrationUrl() { return registrationUrl; } public void setRegistrationUrl(String registrationUrl) { this.registrationUrl = registrationUrl; } public String getProjectLoadUrl() { return projectLoadUrl; } public void setProjectLoadUrl(String projectLoadUrl) { this.projectLoadUrl = projectLoadUrl; } public String getVersionUrl() { return versionUrl; } public void setVersionUrl(String versionUrl) { this.versionUrl = versionUrl; } public String getServerVersion() { return serverVersion; } public void setServerVersion(String serverVersion) { this.serverVersion = serverVersion; } public String getProjectLoadByIdUrl() { return projectLoadByIdUrl; } public void setProjectLoadByIdUrl(String projectLoadByIdUrl) { this.projectLoadByIdUrl = projectLoadByIdUrl; } public String getFileFindUrl() { return fileFindUrl; } public void setFileFindUrl(String fileFindUrl) { this.fileFindUrl = fileFindUrl; } public String getProjectTreeUrl() { return projectTreeUrl; } public void setProjectTreeUrl(String projectTreeUrl) { this.projectTreeUrl = projectTreeUrl; } }
[ "aleksandr_sidoruk@epam.com" ]
aleksandr_sidoruk@epam.com
62b688d8b6dd14a3ac286e25d0a26483c8e57d3a
9e8d721737b3620ec09895102fe15644dd253853
/chapter1/src/com/cqupt/aw/Run.java
c492701326224d2101dbcbcfbf710aaf6a42b206
[]
no_license
stephanie-lss/java-concurrency
c23c92297ebd5ea84cbb28f62fa255d2615a08db
7b1a61fca46afe8fa72d5ce5e76485057676b766
refs/heads/master
2022-11-10T15:37:24.316659
2020-07-02T05:59:22
2020-07-02T05:59:22
250,286,084
0
0
null
null
null
null
UTF-8
Java
false
false
468
java
package com.cqupt.aw; /** * className Run * description * * @author feng * @version 1.0 * @date 2019/1/18 下午9:16 */ public class Run { public static void main(String[] args) throws InterruptedException { VolatileExample example = new VolatileExample(); MyThread writer = new MyThread(example); MyThreadRead reader = new MyThreadRead(example); writer.start(); // Thread.sleep(100); reader.start(); } }
[ "892958173@qq.com" ]
892958173@qq.com
e8fb079f4a721dc353861aa46ee008dbbe4b4a43
8b1f8307ff0b7bab16a5fefe8169b6d8bd8a602d
/core/src/main/java/org/jboss/osgi/modules/ModuleContext.java
2f9cbb8e68776ea25d4eec27d0caeb13877819e4
[]
no_license
spreadline/jbosgi-framework
5a2b751d13d06cc618e85a0c3d87c0f60058f558
9da77a6010fa88f93f1cb963e8b293b4b5b1cca3
refs/heads/master
2021-01-18T12:59:29.924574
2011-01-03T15:26:55
2011-01-03T15:26:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,672
java
/* * JBoss, Home of Professional Open Source * Copyright 2009, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.osgi.modules; import org.jboss.modules.Module; import org.jboss.msc.service.ServiceContainer; import org.jboss.msc.service.ServiceName; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; /** * A the context for Module/OSGi integration. * * @author thomas.diesler@jboss.com * @since 05-Aug-2010 */ public interface ModuleContext { /** * Get the ServiceName for the given service interface that an xservice implements. */ ServiceName getServiceName(Class<?> service); ServiceContainer getServiceContainer(); Module getModule(); BundleContext getSystemContext(); Bundle getBundle(); }
[ "thomas.diesler@jboss.com" ]
thomas.diesler@jboss.com
c45201e5885c7ca64361863fc489bc9e90839ab1
48778626716f115c97b25d51ba4e4d2bea588569
/gravitee-gateway-services/gravitee-gateway-services-healthcheck/src/test/java/io/gravitee/gateway/services/healthcheck/eval/assertion/AssertionEvaluationTest.java
e0ba30dbc865edb94c08d892bab09a594897c4b9
[ "Apache-2.0" ]
permissive
MicrophoneBen/gravitee-gateway
3b2700dcadecda48a5675c84b5222480ab858e4c
356864c621c0b6127423dde45e55bf27f4e9854c
refs/heads/master
2021-05-24T18:02:16.386875
2020-04-03T06:27:44
2020-04-03T06:48:31
253,689,958
1
0
Apache-2.0
2020-04-07T04:50:39
2020-04-07T04:50:39
null
UTF-8
Java
false
false
3,207
java
/** * Copyright (C) 2015 The Gravitee team (http://gravitee.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.gravitee.gateway.services.healthcheck.eval.assertion; import io.gravitee.common.http.HttpStatusCode; import io.gravitee.definition.model.services.healthcheck.Response; import io.gravitee.gateway.services.healthcheck.eval.EvaluationException; import org.junit.Assert; import org.junit.Test; /** * @author David BRASSELY (david.brassely at graviteesource.com) * @author GraviteeSource Team */ public class AssertionEvaluationTest { @Test public void shouldNotValidate_singleCondition() throws EvaluationException { String assertion = "'toto' == 'tata'"; AssertionEvaluation evaluation = new AssertionEvaluation(assertion); boolean result = evaluation.validate(); Assert.assertFalse(result); } @Test public void shouldNotValidate_multipleCondition() throws EvaluationException { String assertion = "'toto' == 'toto' && 1 == 2"; AssertionEvaluation evaluation = new AssertionEvaluation(assertion); boolean result = evaluation.validate(); Assert.assertFalse(result); } @Test public void shouldValidate_simpleHttpCondition() throws EvaluationException { String assertion = Response.DEFAULT_ASSERTION; AssertionEvaluation evaluation = new AssertionEvaluation(assertion); EvaluableHttpResponse response = new EvaluableHttpResponse(); response.status = HttpStatusCode.OK_200; evaluation.setVariable("response", response); boolean result = evaluation.validate(); Assert.assertTrue(result); } @Test public void shouldValidate_jsonPathCondition() throws EvaluationException { String assertion = "#jsonPath(#response.content, '$.status') == 'green'"; AssertionEvaluation evaluation = new AssertionEvaluation(assertion); EvaluableHttpResponse response = new EvaluableHttpResponse(); response.status = HttpStatusCode.OK_200; response.content = "{\"status\": \"green\"}"; evaluation.setVariable("response", response); boolean result = evaluation.validate(); Assert.assertTrue(result); } public static class EvaluableHttpResponse { private int status; private String content; public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } } }
[ "azize.elamrani@gmail.com" ]
azize.elamrani@gmail.com
85fbec3c6d701a4d2083a3e7d0e740b5d480e949
34197f2f61c8d17ba966595b26553fdbbd5cbc3b
/app/src/main/java/ru/busyava/navigationdrawerearly/MainActivity.java
9e7dba8e14630817b81945b1362be4d98cb28b90
[]
no_license
busyava/NavigationDrawerEarly
4d77a5a5142ca1f5d02c6e46dbfef3a95a9e8293
1cad52972d29b7ee0a470da3b982f2ca209c6796
refs/heads/master
2022-11-11T23:19:34.991752
2020-06-28T14:18:26
2020-06-28T14:18:26
275,600,044
0
0
null
null
null
null
UTF-8
Java
false
false
3,452
java
package ru.busyava.navigationdrawerearly; import android.os.Bundle; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.snackbar.Snackbar; import android.view.View; import androidx.core.view.GravityCompat; import androidx.appcompat.app.ActionBarDrawerToggle; import android.view.MenuItem; import com.google.android.material.navigation.NavigationView; import androidx.drawerlayout.widget.DrawerLayout; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import android.view.Menu; public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); FloatingActionButton fab = findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); } }); DrawerLayout drawer = findViewById(R.id.drawer_layout); NavigationView navigationView = findViewById(R.id.nav_view); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); drawer.addDrawerListener(toggle); toggle.syncState(); navigationView.setNavigationItemSelectedListener(this); } @Override public void onBackPressed() { DrawerLayout drawer = findViewById(R.id.drawer_layout); if (drawer.isDrawerOpen(GravityCompat.START)) { drawer.closeDrawer(GravityCompat.START); } else { super.onBackPressed(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } @SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { // Handle navigation view item clicks here. int id = item.getItemId(); if (id == R.id.nav_home) { // Handle the camera action } else if (id == R.id.nav_gallery) { } else if (id == R.id.nav_slideshow) { } else if (id == R.id.nav_tools) { } else if (id == R.id.nav_share) { } else if (id == R.id.nav_send) { } DrawerLayout drawer = findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; } }
[ "user@mail.com" ]
user@mail.com
4d587db8b5d4d3178211bfab92b4c91228a2df59
d76e76e2b6322b4a821ec18f67c03156d5b1e70f
/src/com/zsy/frame/sample/java/control/designmode/behavioral/mediator/virtualchat/Client.java
ba01e1f510e45f08154bdc35a4391b1ebbf2404b
[]
no_license
sy-and/sample_java
f20749562741bedde83e824fc6653ab5859d0176
c54afe0509873499c59cf9f63d8ebe978e5ef0dd
refs/heads/main
2023-02-28T10:38:16.749939
2017-04-16T07:01:57
2017-04-16T07:01:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,188
java
package com.zsy.frame.sample.java.control.designmode.behavioral.mediator.virtualchat; public class Client { public static void main(String args[]) { AbstractChatroom happyChat = new ChatGroup(); Member member1, member2, member3, member4, member5; member1 = new DiamondMember("张三"); member2 = new DiamondMember("李四"); member3 = new CommonMember("王五"); member4 = new CommonMember("小芳"); member5 = new CommonMember("小红"); happyChat.register(member1); happyChat.register(member2); happyChat.register(member3); happyChat.register(member4); happyChat.register(member5); member1.sendText("李四", "李四,你好!"); member2.sendText("张三", "张三,你好!"); member1.sendText("李四", "今天天气不错,有日!"); member2.sendImage("张三", "一个很大很大的太阳"); member2.sendImage("张三", "太阳"); member3.sendText("小芳", "还有问题吗?"); member3.sendText("小红", "还有问题吗?"); member4.sendText("王五", "没有了,谢谢!"); member5.sendText("王五", "我也没有了!"); member5.sendImage("王五", "谢谢"); } }
[ "shengyouzhang@qq.com" ]
shengyouzhang@qq.com
cfcd11b57a539e3b2bd605a7d9cddd3dc4a96a26
4dd2bc66c7b041360ed37d5754f31a4cda565271
/src/main/java/com/ccb/interview/thread/BlockingQueueDemo.java
f71a7b9fee6e3c61db4400d9241d00ec29508e15
[]
no_license
2568808909/interview
34aeaa8a969dfbd7090a3eb629cc0aa8a02e4184
fab5b032e0f51e060c75e627e3894341cc1a7b65
refs/heads/master
2022-09-07T22:15:38.760617
2020-03-31T05:35:35
2020-03-31T05:35:35
242,890,483
0
0
null
2022-09-01T23:21:08
2020-02-25T02:25:00
Java
UTF-8
Java
false
false
1,467
java
package com.ccb.interview.thread; /** * 阻塞队列:当队列为空时,从队列中获取元素会被阻塞,当队列满时,往里放元素会被阻塞 * <p> * 常用的阻塞队列 * {@link java.util.concurrent.ArrayBlockingQueue} 由数组实现的有界阻塞队列,创建时要指定大小 * {@link java.util.concurrent.LinkedBlockingQueue} 由链表实现的有界阻塞队列(默认大小为Integer.MAX_VALUE 这样其实相当于无界,也可以在创建时指定容量) * {@link java.util.concurrent.SynchronousQueue} 不存储元素的阻塞队列,也就是单个元素的阻塞队列,往里放元素时就会阻塞,知道有线程拿元素为止 * {@link java.util.concurrent.PriorityBlockingQueue} 使用优先队列实现的无界阻塞队列 * {@link java.util.concurrent.DelayQueue} 使用优先队列实现的延迟无界队列 * {@link java.util.concurrent.LinkedTransferQueue} 由链表实现的无界阻塞队列 * <p> * 方法类型 抛出异常 特殊值 阻塞 超时 * 插入 add(e) offer(e) put(e) offer(e,time,unit) * 移除 remove() poll() take() poll(time,unit) * 检查 element() peek() 不可用 不可用 * * 为什么要使用阻塞队列: 好处是,我们不需要关心什么时候要阻塞线程,什么时候需要唤醒线程, * 这些都由阻塞队列一手包办了 */ public class BlockingQueueDemo { }
[ "2568808909@qq.com" ]
2568808909@qq.com
08bde388f5f5c2d59d6954b0418c57a488fd20b3
34f8d4ba30242a7045c689768c3472b7af80909c
/JDK10-Java SE Development Kit 10/src/jdk.internal.vm.compiler/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64RoundNode.java
6d1536b584313356067a01b46ac870b06730fd07
[ "Apache-2.0" ]
permissive
lovelycheng/JDK
5b4cc07546f0dbfad15c46d427cae06ef282ef79
19a6c71e52f3ecd74e4a66be5d0d552ce7175531
refs/heads/master
2023-04-08T11:36:22.073953
2022-09-04T01:53:09
2022-09-04T01:53:09
227,544,567
0
0
null
2019-12-12T07:18:30
2019-12-12T07:18:29
null
UTF-8
Java
false
false
3,583
java
/* * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * */ package org.graalvm.compiler.replacements.amd64; import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_1; import org.graalvm.compiler.core.common.type.FloatStamp; import org.graalvm.compiler.core.common.type.Stamp; import org.graalvm.compiler.debug.GraalError; import org.graalvm.compiler.graph.NodeClass; import org.graalvm.compiler.graph.spi.CanonicalizerTool; import org.graalvm.compiler.lir.amd64.AMD64ArithmeticLIRGeneratorTool; import org.graalvm.compiler.lir.amd64.AMD64ArithmeticLIRGeneratorTool.RoundingMode; import org.graalvm.compiler.lir.gen.ArithmeticLIRGeneratorTool; import org.graalvm.compiler.nodeinfo.NodeInfo; import org.graalvm.compiler.nodes.ConstantNode; import org.graalvm.compiler.nodes.NodeView; import org.graalvm.compiler.nodes.ValueNode; import org.graalvm.compiler.nodes.calc.UnaryNode; import org.graalvm.compiler.nodes.spi.ArithmeticLIRLowerable; import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool; import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.JavaKind; /** * Round floating-point value. */ @NodeInfo(cycles = CYCLES_1) public final class AMD64RoundNode extends UnaryNode implements ArithmeticLIRLowerable { public static final NodeClass<AMD64RoundNode> TYPE = NodeClass.create(AMD64RoundNode.class); private final RoundingMode mode; public AMD64RoundNode(ValueNode value, RoundingMode mode) { super(TYPE, roundStamp((FloatStamp) value.stamp(NodeView.DEFAULT), mode), value); this.mode = mode; } private static double round(RoundingMode mode, double input) { switch (mode) { case DOWN: return Math.floor(input); case NEAREST: return Math.rint(input); case UP: return Math.ceil(input); case TRUNCATE: return (long) input; default: throw GraalError.unimplemented("unimplemented RoundingMode " + mode); } } private static FloatStamp roundStamp(FloatStamp stamp, RoundingMode mode) { double min = stamp.lowerBound(); min = Math.min(min, round(mode, min)); double max = stamp.upperBound(); max = Math.max(max, round(mode, max)); return new FloatStamp(stamp.getBits(), min, max, stamp.isNonNaN()); } @Override public Stamp foldStamp(Stamp newStamp) { assert newStamp.isCompatible(getValue().stamp(NodeView.DEFAULT)); return roundStamp((FloatStamp) newStamp, mode); } public ValueNode tryFold(ValueNode input) { if (input.isConstant()) { JavaConstant c = input.asJavaConstant(); if (c.getJavaKind() == JavaKind.Double) { return ConstantNode.forDouble(round(mode, c.asDouble())); } else if (c.getJavaKind() == JavaKind.Float) { return ConstantNode.forFloat((float) round(mode, c.asFloat())); } } return null; } @Override public ValueNode canonical(CanonicalizerTool tool, ValueNode forValue) { ValueNode folded = tryFold(forValue); return folded != null ? folded : this; } @Override public void generate(NodeLIRBuilderTool builder, ArithmeticLIRGeneratorTool gen) { builder.setResult(this, ((AMD64ArithmeticLIRGeneratorTool) gen).emitRound(builder.operand(getValue()), mode)); } }
[ "zeng-dream@live.com" ]
zeng-dream@live.com
c526e060d602adc1fe2373e25a41ef19dde55e06
5b55f38a753d251c1696f87d52f9554f2c04334a
/src/com/more/mes/smt/snconfigure/AjaxGetNeedSel.java
f489c0a232ceb4c5277114ade7b4379e126fba6d
[]
no_license
1wangxueyan2/SKS-MC
2b64d4a51547214690a60dd8bde5cdbdfd67e6ca
898e38e5be2dc78d268774d76cf3054f09c747fe
refs/heads/master
2022-03-06T06:40:51.405811
2019-10-25T06:59:18
2019-10-25T06:59:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,114
java
package com.more.mes.smt.snconfigure; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import com.more.fw.core.base.core.action.BaseActionSupport; import com.more.fw.core.base.core.action.ModelAction; import com.more.fw.core.dbo.model.service.ModelService; import com.more.fw.core.dbo.model.service.impl.base.FuncService; /** * 编码生成配置---获取所需的下拉框 * * @author development */ public class AjaxGetNeedSel implements FuncService { @Override public String exeFunc(ModelAction modelAction, ModelService modelService) { HttpServletRequest request = modelAction.getRequest(); List<Object> param = new ArrayList<Object>(); String dataAuth = request.getParameter("dataAuth");//String.valueOf(modelAction.getRequest().getSession().getAttribute("mcDataAuth")); String codeSegentSql = "SELECT T.CODE,T.VALUE VAL FROM SY_DICT_VAL T WHERE T.DICT_CODE='CCD_CODE_SEGMENT' ORDER BY T.CODE"; List codeSegentList = modelService.listSql(codeSegentSql, null, null, null, null, null); String itemValSql1 = "SELECT T.ID AS CODE,T.VARIABLE_NAME VAL FROM ML_BARCODE_VARIABLES T WHERE T.BARCODE_TYPE = '1' "; //List itemValList1 = modelService.listDataSql(itemValSql1,new Object[] {dataAuth}); List itemValList1 = modelService.listDataSql(itemValSql1); String itemValSql2 = "SELECT T.ID AS CODE,T.VARIABLE_NAME VAL FROM ML_BARCODE_VARIABLES T WHERE T.BARCODE_TYPE != '1' "; List itemValList2 = modelService.listDataSql(itemValSql2); String fillTypeSql = "SELECT T.CODE,T.VALUE VAL FROM SY_DICT_VAL T WHERE T.DICT_CODE='CCD_FILL_TYPE' ORDER BY T.CODE"; List fillTypeList = modelService.listSql(fillTypeSql, null, null, null, null, null); Map<Object, Object> map = new HashMap<Object, Object>(); map.put("codeSegentList", codeSegentList); map.put("itemValList1", itemValList1); map.put("itemValList2", itemValList2); map.put("fillTypeList", fillTypeList); modelAction.setAjaxMap(map); return BaseActionSupport.AJAX; } }
[ "phantomsaber@foxmail.com" ]
phantomsaber@foxmail.com
93df23d33610e1c1128e3e375317e81d64d4e9d8
dd124ff483bb401f9b16265766d0b47ae2750dd6
/Lib_Workflow/src/net/sf/anathema/lib/workflow/booleanvalue/BooleanValuePresentation.java
0b34d3b08cbd785e7df177970d1f86e66e46f194
[]
no_license
eleizel/anathema
d3ece56766963033df057d76ad3580195d107d84
9d003666094e0ff6c17de2ba698d989dd451de9f
refs/heads/master
2020-12-25T10:36:40.969421
2012-04-24T20:30:24
2012-04-24T20:30:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,264
java
package net.sf.anathema.lib.workflow.booleanvalue; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JToggleButton; import net.sf.anathema.lib.control.booleanvalue.IBooleanValueChangedListener; public class BooleanValuePresentation { public void initPresentation(final JToggleButton button, final BooleanValueModel model) { button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { model.setValue(button.isSelected()); } }); model.addChangeListener(new IBooleanValueChangedListener() { public void valueChanged(boolean newValue) { button.setSelected(newValue); } }); button.setSelected(model.getValue()); } public void initPresentation(final IBooleanValueView view, final BooleanValueModel model) { view.addChangeListener(new IBooleanValueChangedListener() { public void valueChanged(boolean newValue) { model.setValue(newValue); } }); model.addChangeListener(new IBooleanValueChangedListener() { public void valueChanged(boolean newValue) { view.setSelected(newValue); } }); view.setSelected(model.getValue()); } }
[ "sandra.sieroux@googlemail.com" ]
sandra.sieroux@googlemail.com
4a37d238e4e0e511c1957687f21fc348624285c3
7ad0fd3c654a1f47f736d03f2f66ac709a7e21f5
/server-common/src/main/java/com/bingo/server/utils/LocalService.java
2af9e129c8192a2346e98fad188979f621af321a
[]
no_license
shiguoxu/server-message
0d0c45cfaa9f07696eb275d6e4874ea6f00b7850
ca8b2ef01cc259ace12677f283c88f9dc063ca81
refs/heads/master
2020-03-18T14:26:44.205415
2017-10-09T08:36:12
2017-10-09T08:36:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,619
java
package com.bingo.server.utils; import com.bingo.framework.common.URL; import com.bingo.framework.remoting.exchange.ExchangeServer; import com.bingo.framework.rpc.Exporter; import com.bingo.framework.rpc.protocol.bingo.BingoProtocol; import com.bingo.server.exception.ServerException; import com.bingo.server.msg.MSG; import java.util.Collection; import java.util.Iterator; /** * Created by ZhangGe on 2017/6/20. */ public class LocalService { public static URL getUrl() { Collection<ExchangeServer> servers = BingoProtocol.getBingoProtocol().getServers(); if (servers != null && servers.size() == 1) { return servers.iterator().next().getUrl(); } if (servers.size() > 1) { throw new ServerException(MSG.MsgCode.SYSTEM_ERROR, "存在多个服务,请使用getInfo(Name)方法获取"); } throw new ServerException(MSG.MsgCode.SYSTEM_ERROR, "本地服务不存在"); } public static URL getUrl(Class service) { String serviceName = service.getName(); Collection<Exporter<?>> serverKeys = BingoProtocol.getBingoProtocol().getExporters(); if (serverKeys != null) { Iterator<Exporter<?>> iterator = serverKeys.iterator(); while (iterator.hasNext()) { Exporter<?> next = iterator.next(); if (next.getInvoker().getUrl().toServiceString().contains(serviceName)) { return next.getInvoker().getUrl(); } } } throw new ServerException(MSG.MsgCode.SYSTEM_ERROR, "本地服务不存在"); } }
[ "namjagbrawa@126.com" ]
namjagbrawa@126.com
9f7e9dec17ebd0526a1db5f1089542cf32b75545
023fac027ed5c9920fcab2e5930e326993b7714c
/fr.java.api/src/main/java/fr/java/patterns/serializable/Deserializer.java
9b045ef215ab936bf14504e396b29b72c3e731ae
[]
no_license
sanke69/javafr
98ddfd0e913623b56fe61f71f9020c591e1574d9
532dd1749cee4514405c15535af4927baefabcdf
refs/heads/master
2023-05-26T00:58:30.053709
2021-06-14T10:19:28
2021-06-14T10:19:28
375,783,530
0
0
null
null
null
null
UTF-8
Java
false
false
979
java
/** * Copyright (C) 2007-?XYZ Steve PECHBERTI <steve.pechberti@laposte.net> * * 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 (at your option) 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 fr.java.patterns.serializable; import java.io.IOException; public interface Deserializer { Object readObject() throws ClassNotFoundException, IOException; }
[ "sanke@xps-13" ]
sanke@xps-13
7bf0f9c71e25f7e4e2375b12d0afd8cd0055fe96
bf92629bef0dea162c468a9b939dec3ac55ae677
/examples/composition/triple/ALE3/src/ale3/impl/Ale3PackageImpl.java
4547ae1c1a787484326273bdc71abdaa69a400d4
[]
no_license
tdegueul/ale-xbase
32db3ee08792e53769971698962a9dcdc80a90a4
3f6de93c322367fd78b1d4d23b20a24edba268d3
refs/heads/master
2021-01-21T21:15:12.645906
2018-08-27T13:47:15
2018-08-27T13:47:15
98,518,635
1
1
null
null
null
null
UTF-8
Java
false
false
4,604
java
/** */ package ale3.impl; import ale3.Ale3Factory; import ale3.Ale3Package; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EPackageImpl; /** * <!-- begin-user-doc --> * An implementation of the model <b>Package</b>. * <!-- end-user-doc --> * @generated */ public class Ale3PackageImpl extends EPackageImpl implements Ale3Package { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass c1EClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass c2EClass = null; /** * Creates an instance of the model <b>Package</b>, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package * package URI value. * <p>Note: the correct way to create the package is via the static * factory method {@link #init init()}, which also performs * initialization of the package, or returns the registered package, * if one already exists. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see org.eclipse.emf.ecore.EPackage.Registry * @see ale3.Ale3Package#eNS_URI * @see #init() * @generated */ private Ale3PackageImpl() { super(eNS_URI, Ale3Factory.eINSTANCE); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static boolean isInited = false; /** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link Ale3Package#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static Ale3Package init() { if (isInited) return (Ale3Package)EPackage.Registry.INSTANCE.getEPackage(Ale3Package.eNS_URI); // Obtain or create and register package Ale3PackageImpl theAle3Package = (Ale3PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Ale3PackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new Ale3PackageImpl()); isInited = true; // Create package meta-data objects theAle3Package.createPackageContents(); // Initialize created meta-data theAle3Package.initializePackageContents(); // Mark meta-data to indicate it can't be changed theAle3Package.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(Ale3Package.eNS_URI, theAle3Package); return theAle3Package; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getC1() { return c1EClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getC2() { return c2EClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Ale3Factory getAle3Factory() { return (Ale3Factory)getEFactoryInstance(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private boolean isCreated = false; /** * Creates the meta-model objects for the package. This method is * guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features c1EClass = createEClass(C1); c2EClass = createEClass(C2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private boolean isInitialized = false; /** * Complete the initialization of the package and its meta-model. This * method is guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void initializePackageContents() { if (isInitialized) return; isInitialized = true; // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); // Create type parameters // Set bounds for type parameters // Add supertypes to classes // Initialize classes, features, and operations; add parameters initEClass(c1EClass, ale3.C1.class, "C1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(c2EClass, ale3.C2.class, "C2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); // Create resource createResource(eNS_URI); } } //Ale3PackageImpl
[ "manuel.leduc@inria.fr" ]
manuel.leduc@inria.fr
fa2436153bb3846f3be1178ba98d827958f6c67b
d07d36614cca7bbceabc15a6b03afdb515b0456b
/gwt-web/apps/gm-p1-adcollect/src/main/java/com/iwgame/gm/p1/adcollect/modules/landing/client/ui/dialog/OperDialog.java
a8b8a6fd3e4ac50616cce451a0bff940c09d626b
[]
no_license
liveqmock/workspaces
b77013e21f8fd7ca6eb53a995bb1285795ac6a31
ca39c5d33a970e5c1452100e0b69e4c56decaa00
refs/heads/master
2021-01-22T13:18:03.914322
2014-10-13T02:55:41
2014-10-13T02:55:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,285
java
/**************************************************************** * 系统名称 : '[gm-p1-adcollect]' * 文件名 : OperDialog.java * (C) Copyright Green Shore Network Technology Co.,Ltd.2012 * All Rights Reserved. * ************************************************************** * 注意: 本内容仅限于上海绿岸网络科技有限公司内部使用,禁止转发 ****************************************************************/ package com.iwgame.gm.p1.adcollect.modules.landing.client.ui.dialog; import java.util.HashMap; import java.util.Map; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.Widget; import com.iwgame.gm.p1.adcollect.modules.landing.client.ui.LandingView; import com.iwgame.gm.p1.adcollect.modules.landing.client.ui.events.MaterialSelectedEvent; import com.iwgame.gm.p1.adcollect.modules.landing.client.ui.events.MaterialSelectedHandler; import com.iwgame.gm.p1.adcollect.modules.landing.client.ui.widget.MaterialField; import com.iwgame.ui.core.client.AsyncCallbackEx; import com.iwgame.ui.grid.client.SchemaGrid; import com.iwgame.ui.panel.client.box.MessageBox; import com.iwgame.ui.panel.client.box.XDialogBox; import com.iwgame.ui.panel.client.form.FormLayout; import com.iwgame.ui.panel.client.form.XFormPanel; import com.iwgame.ui.panel.client.form.field.Direction; import com.iwgame.ui.panel.client.form.field.Field; import com.iwgame.ui.panel.client.form.field.FieldHeaderPlugin; import com.iwgame.ui.panel.client.form.field.HiddenField; import com.iwgame.ui.panel.client.form.field.RadioButtonGroup; import com.iwgame.ui.panel.client.form.field.TextAreaField; import com.iwgame.ui.panel.client.form.field.TextField; import com.iwgame.xmvp.shared.data.BaseModelData; import com.iwgame.xportal.common.client.ApplicationContext; /** * 类说明 * * @简述: 操作到达页 * @作者: ByName's pfwang * @版本: 1.0 * @邮箱: wangpengfei@iwgame.com * @创建时间:2012-9-21 下午04:58:30 */ public class OperDialog extends XDialogBox { private Map<String, Object> oldBase; private XFormPanel formPanel; private FormLayout layout; private TextField name; private TextField link; private RadioButtonGroup status; private final MaterialField material; private TextAreaField explain; private HiddenField productIdField; private HiddenField operField; private HiddenField materialIdField; private boolean type; private final SchemaGrid<BaseModelData> gird; private final LandingView view; private int landingId; /** * * @param type * true 添加 false 修改 */ public OperDialog(final boolean type, final LandingView landingView) { this.type = type; gird = landingView.getGrid(); view = landingView; formPanel = new XFormPanel(); formPanel.setWidth("450px"); layout = new FormLayout(); layout.setColumn(1); formPanel.setLayout(layout); name = new TextField("名称", "name"); name.setAllowBlank(false); name.setValidateOnBlur(true); layout.add(name); link = new TextField("链接", "link"); link.setMaxLength(100); link.setAllowBlank(false); link.setValidateOnBlur(true); layout.add(link); materialIdField = new HiddenField("hiddenField_productId", "materialId"); layout.add(materialIdField); material = new MaterialField("素材", "material"); material.setAllowBlank(false); material.setValidateOnBlur(true); material.getWidget().setReadOnly(true); material.setEnablePlugin(true); material.setHeaderPlugin(new FieldHeaderPlugin() { @Override public Widget getHeader(final Field<?, ?> field) { final Button btn = new Button("选择素材"); btn.setWidth("80px"); field.setFieldName("selMaterial"); btn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { new SelectMaterialDialog().center(); } }); return btn; } }); material.addMaterialSelectedHandlers(new MaterialSelectedHandler() { @Override public void selectMaterial(MaterialSelectedEvent event) { material.setValue(event.getName()); materialIdField.setValue(event.getId()); } }); layout.add(material); status = new RadioButtonGroup("状态", "status", Direction.Horizontal); status.addRadioButton("使用", "1", true); status.addRadioButton("暂停", "0", false); status.setAllowBlank(false); status.setValidateOnBlur(true); layout.add(status); explain = new TextAreaField("说明", "explain"); explain.getWidget().setHeight("60px"); layout.add(explain); productIdField = new HiddenField("hiddenField_productId", "productId"); productIdField.setValue(ApplicationContext.getCurrentProductId()); layout.add(productIdField); operField = new HiddenField("hiddenField_productId", "oper"); operField.setValue(type + ""); layout.add(operField); String id = ""; if (!type) { final Double d = gird.getSelected().get(0).get("id"); setUpdateValue(gird); id = d.intValue() + ""; landingId = d.intValue(); } initBox(type ? "添加到达页" : "修改id为:" + id + "的到达页", formPanel); setButtons(OKCANCEL); } @Override protected void onButtonPressed(Button button) { if (button == getButtonByItemId(OK)) { // 执行 添加 或者 修改操作 if (formPanel.validate()) { final Map<String, Object> parameter = new HashMap<String, Object>(); parameter.put("name", name.getValue()); parameter.put("url", link.getValue()); parameter.put("materialId", materialIdField.getValue()); parameter.put("note", explain.getValue()); parameter.put("status", Integer.parseInt(status.getValue())); if (type) { view.getPresenter().addLanding(parameter, new AsyncCallbackEx<Integer>() { @Override public void onSuccess(Integer result) { if (result != 1) { MessageBox.alert("添加失败"); } else { gird.load(); hide(); } } }); } else { parameter.put("id", landingId); view.getPresenter().updateLanding(parameter, oldBase, new AsyncCallbackEx<Integer>() { @Override public void onSuccess(Integer result) { if (result != 1) { MessageBox.alert("修改失败"); } else { gird.load(); hide(); } } }); } } } if (button == getButtonByItemId(CANCEL)) { hide(); } super.onButtonPressed(button); } // 修改加載參數 private void setUpdateValue(final SchemaGrid<BaseModelData> gird) { oldBase = new HashMap<String, Object>(); final String oldname = gird.getSelected().get(0).get("name").toString(); if ((null != oldname) && (oldname.length() > 0)) { name.setValue(oldname); oldBase.put("name", name.getValue()); } final String oldlink = gird.getSelected().get(0).get("link").toString(); if ((null != oldlink) && (oldlink.length() > 0)) { link.setValue(oldlink); oldBase.put("url", link.getValue()); } final Double d = gird.getSelected().get(0).get("status"); if (null != d) { status.setValue((d.intValue() + "").trim()); oldBase.put("status", Integer.parseInt(status.getValue())); } final String oldnote = gird.getSelected().get(0).get("note").toString(); if ((null != oldnote) && (oldnote.length() > 0)) { explain.setValue(oldnote); oldBase.put("note", explain.getValue()); } else { explain.setValue(null); oldBase.put("note", null); } final String oldurl = gird.getSelected().get(0).get("mname").toString(); if ((null != oldurl) && (oldurl.length() > 0)) { material.setValue(oldurl); } final String materialId = gird.getSelected().get(0).get("materialId").toString(); if ((null != materialId) && (materialId.length() > 0)) { materialIdField.setValue(materialId); oldBase.put("materialId", materialIdField.getValue()); } if (!type) { oldBase.put("id", gird.getSelected().get(0).get("id").toString()); } } }
[ "areskts@icloud.com" ]
areskts@icloud.com
fe00bacc05ac552ccec9c3ecefa179652a451f8a
234d879e748b271aee60e397b42dab92d0fd057e
/org.spbu.pldoctoolkit.graph.diagram.infproduct/src/org/spbu/pldoctoolkit/graph/diagram/infproduct/navigator/DrlModelNavigatorGroup.java
f17710c4c95fde67483d775edef30929a5618278
[]
no_license
spbu-se/pldoctoolkit
e2e4216b9bda2efb6bef52d1f53a6c5a7b70d423
7e44c3dcd64dde590b86208279718e79a7036ebf
refs/heads/master
2023-06-07T10:45:10.171716
2023-03-15T13:44:55
2023-03-15T13:44:55
39,720,466
2
6
null
2023-06-01T10:26:20
2015-07-26T09:30:43
XSLT
UTF-8
Java
false
false
1,807
java
package org.spbu.pldoctoolkit.graph.diagram.infproduct.navigator; import java.util.Collection; import java.util.LinkedList; /** * @generated */ public class DrlModelNavigatorGroup extends DrlModelAbstractNavigatorItem { /** * @generated */ private String myGroupName; /** * @generated */ private String myIcon; /** * @generated */ private Collection myChildren = new LinkedList(); /** * @generated */ DrlModelNavigatorGroup(String groupName, String icon, Object parent) { super(parent); myGroupName = groupName; myIcon = icon; } /** * @generated */ public String getGroupName() { return myGroupName; } /** * @generated */ public String getIcon() { return myIcon; } /** * @generated */ public Object[] getChildren() { return myChildren.toArray(); } /** * @generated */ public void addChildren(Collection children) { myChildren.addAll(children); } /** * @generated */ public void addChild(Object child) { myChildren.add(child); } /** * @generated */ public boolean isEmpty() { return myChildren.size() == 0; } /** * @generated */ public boolean equals(Object obj) { if (obj instanceof org.spbu.pldoctoolkit.graph.diagram.infproduct.navigator.DrlModelNavigatorGroup) { org.spbu.pldoctoolkit.graph.diagram.infproduct.navigator.DrlModelNavigatorGroup anotherGroup = (org.spbu.pldoctoolkit.graph.diagram.infproduct.navigator.DrlModelNavigatorGroup) obj; if (getGroupName().equals(anotherGroup.getGroupName())) { return getParent().equals(anotherGroup.getParent()); } } return super.equals(obj); } /** * @generated */ public int hashCode() { return getGroupName().hashCode(); } }
[ "alexeysem@5f699344-e928-0410-99ec-830c0de225ea" ]
alexeysem@5f699344-e928-0410-99ec-830c0de225ea
60fb8abeb82cd97614e21b5a653ec8850336fa85
8de0190ba91403621d09cdb0855612d00d8179b2
/leetcode-algorithm-java/src/test/java/johnny/leetcode/algorithm/Solution292Test.java
083c39e4bcc4d7975090e6ff3a0deffe9d2e84b4
[]
no_license
156420591/algorithm-problems-java
e2494831becba9d48ab0af98b99fca138aaa1ca8
1aec8a6e128763b1c1378a957d270f2a7952b81a
refs/heads/master
2023-03-04T12:36:06.143086
2021-02-05T05:38:15
2021-02-05T05:38:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
package johnny.leetcode.algorithm; import org.junit.Test; import static org.junit.Assert.assertEquals; public class Solution292Test extends JunitBase { @Test public void testCanWinNim() { System.out.println("canWinNim"); Solution292 instance = new Solution292(); assertEquals(false, instance.canWinNim(0)); assertEquals(false, instance.canWinNim(4)); assertEquals(true, instance.canWinNim(3)); } }
[ "jojozhuang@gmail.com" ]
jojozhuang@gmail.com
958ca241830cf7bcac6d9f5ae13abf18f4b3b0ea
23bd8b894a1d69a146bb20e0aab45d293d03b359
/framework-core/src/main/java/com/hbcd/common/container/StorageContentServiceContainer.java
beae15f49af68af95a5fecc7d65049667440e99b
[]
no_license
rahullodha85/framework-core
567f79983a94b5e2b20cc684a372e156a0f64d7f
9e4c64a09acc51b6cf61055da6d9161692f56d20
refs/heads/master
2021-04-15T11:50:56.519323
2017-06-16T19:48:53
2017-06-16T19:48:53
94,576,240
0
0
null
null
null
null
UTF-8
Java
false
false
1,321
java
package com.hbcd.common.container; import java.util.HashMap; import java.util.Map; public class StorageContentServiceContainer { private static ThreadLocal<StorageContentServiceContainer> _soleInstance = new ThreadLocal<StorageContentServiceContainer>() { public StorageContentServiceContainer initialValue() { return new StorageContentServiceContainer(); } }; private Map<String, Object> _services = new HashMap<String, Object>(); // private static ThreadLocal<Map<String, Object>> _services = new ThreadLocal<Map<String, Object>>() // { // public HashMap<String, Object> initialValue() // { // // } // } public static <T> Object getService(T k) { String key = k.toString(); return _soleInstance.get()._services.get(key); } public static <T> void loadService(T k, Object service) { String key = k.toString(); _soleInstance.get()._services.put(key, service); } public static <T> boolean existKey(T k) { String key = k.toString(); return _soleInstance.get()._services.containsKey(key); } public static <T> void appendToService(T k, Object service) { String key = k.toString(); _soleInstance.get()._services.put(key, service); } }
[ "rahul_lodha@s5a.com" ]
rahul_lodha@s5a.com
446cd24663b1131569b9da3049be4a54dbffee76
7695c8d803f81b1302d80cb189f2dd0df647f7b2
/src/main/java/com/rentable/dms/repository/PersistenceAuditEventRepository.java
d726bdf02c5484bfc271a5589457c39831c2365d
[]
no_license
flemelon/rentable
bc85027bb61d55c306bde3e0fe2cba888efb3705
bd5df90296c6b93253bdce7a96be1551f7b08e86
refs/heads/master
2022-12-02T06:35:22.906150
2020-08-21T12:57:38
2020-08-21T12:57:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
876
java
package com.rentable.dms.repository; import com.rentable.dms.domain.PersistentAuditEvent; import java.time.Instant; import java.util.List; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; /** * Spring Data JPA repository for the {@link PersistentAuditEvent} entity. */ public interface PersistenceAuditEventRepository extends JpaRepository<PersistentAuditEvent, Long> { List<PersistentAuditEvent> findByPrincipal(String principal); List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfterAndAuditEventType(String principal, Instant after, String type); Page<PersistentAuditEvent> findAllByAuditEventDateBetween(Instant fromDate, Instant toDate, Pageable pageable); List<PersistentAuditEvent> findByAuditEventDateBefore(Instant before); }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
72729dcf79d89935a56df31bf35326d8e142498c
126f081eabfbdc6a2d3c2b9c94f6c7c8b1cef071
/Lecture-23/src/com/codingblocks/Main.java
6e8e5951195b21485c9c54766b092ad0a824db52
[ "Apache-2.0" ]
permissive
himanshugoyalfe/Crux-Noida-2018-Aug-Evening
8c87ae477c34943346db10a2cd064a4263b680d0
07e5b02a2f3bba56091dc23676feca492cd665bf
refs/heads/master
2020-04-05T17:36:52.249026
2018-11-11T10:26:09
2018-11-11T10:26:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
308
java
package com.codingblocks; public class Main { public static void main(String[] args) { // write your code here Tries tries = new Tries(); tries.insert("anuj"); tries.insert("mona"); tries.remove("anuj"); System.out.println(tries.findPrefix("a")); } }
[ "anujgargcse@gmail.com" ]
anujgargcse@gmail.com
40cd4bcaa1f4f82274bf199828ee6bd3ef924211
e47823f99752ec2da083ac5881f526d4add98d66
/test_data/07_JHotDraw7.6/src/nanoxml/XMLParseException.java
03e2f758accb50f244ff161134cbfee8f78d28dc
[]
no_license
Echtzeitsysteme/hulk-ase-2016
1dee8aca80e2425ab6acab18c8166542dace25cd
fbfb7aee1b9f29355a20e365f03bdf095afe9475
refs/heads/master
2020-12-24T05:31:49.671785
2017-05-04T08:18:32
2017-05-04T08:18:32
56,681,308
2
0
null
null
null
null
UTF-8
Java
false
false
3,844
java
/* XMLParseException.java * * $Revision: 1.4 $ * $Date: 2002/03/24 10:27:59 $ * $Name: RELEASE_2_2_1 $ * * This file is part of NanoXML 2 Lite. * Copyright (C) 2000-2002 Marc De Scheemaecker, All Rights Reserved. * * This software is provided 'as-is', without any express or implied warranty. * In no event will the authors be held liable for any damages arising from the * use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software in * a product, an acknowledgment in the product documentation would be * appreciated but is not required. * * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * * 3. This notice may not be removed or altered from any source distribution. *****************************************************************************/ package nanoxml; /** * An XMLParseException is thrown when an error occures while parsing an XML * string. * <P> * $Revision: 1.4 $<BR> * $Date: 2002/03/24 10:27:59 $<P> * * @see nanoxml.XMLElement * * @author Marc De Scheemaecker * @version $Name: RELEASE_2_2_1 $, $Revision: 1.4 $ */ public class XMLParseException extends RuntimeException { /** * Indicates that no line number has been associated with this exception. */ public static final int NO_LINE = -1; /** * The line number in the source code where the error occurred, or * <code>NO_LINE</code> if the line number is unknown. * * <dl><dt><b>Invariants:</b></dt><dd> * <ul><li><code>lineNr &gt 0 || lineNr == NO_LINE</code> * </ul></dd></dl> */ private int lineNr; /** * Creates an exception. * * @param name The name of the element where the error is located. * @param message A message describing what went wrong. * * </dl><dl><dt><b>Preconditions:</b></dt><dd> * <ul><li><code>message != null</code> * </ul></dd></dl> * * <dl><dt><b>Postconditions:</b></dt><dd> * <ul><li>getLineNr() => NO_LINE * </ul></dd></dl><dl> */ public XMLParseException(String name, String message) { super("XML Parse Exception during parsing of " + ((name == null) ? "the XML definition" : ("a " + name + " element")) + ": " + message); this.lineNr = XMLParseException.NO_LINE; } /** * Creates an exception. * * @param name The name of the element where the error is located. * @param lineNr The number of the line in the input. * @param message A message describing what went wrong. * * </dl><dl><dt><b>Preconditions:</b></dt><dd> * <ul><li><code>message != null</code> * <li><code>lineNr &gt; 0</code> * </ul></dd></dl> * * <dl><dt><b>Postconditions:</b></dt><dd> * <ul><li>getLineNr() => lineNr * </ul></dd></dl><dl> */ public XMLParseException(String name, int lineNr, String message) { super("XML Parse Exception during parsing of " + ((name == null) ? "the XML definition" : ("a " + name + " element")) + " at line " + lineNr + ": " + message); this.lineNr = lineNr; } /** * Where the error occurred, or <code>NO_LINE</code> if the line number is * unknown. * * @see nanoxml.XMLParseException#NO_LINE */ public int getLineNr() { return this.lineNr; } }
[ "sven.peldszus@stud.tu-darmstadt.de" ]
sven.peldszus@stud.tu-darmstadt.de
51dd605eed2f658581ffbab660b29901dff9a74c
fe26167054ba5ce86a7bcc1fd57c81fb4f060f4e
/design/src/main/java/com/github/boybeak/design/Utils.java
83e95e984153d9094d5329cb74000744f1d5d690
[ "Apache-2.0" ]
permissive
boybeak/HoverBarBehavior
e3e01050f86fe159bd829efb857a09cc4507729a
f97a75c6103546c77a67e4a545ec49e2b9a0abc6
refs/heads/master
2020-04-02T05:37:41.062283
2018-10-26T22:31:30
2018-10-26T22:31:30
154,093,225
0
0
null
null
null
null
UTF-8
Java
false
false
231
java
package com.github.boybeak.design; import android.content.Context; class Utils { public static int dpToPixel(Context context, float dp) { return (int)(context.getResources().getDisplayMetrics().density * dp); } }
[ "boybeak@gmail.com" ]
boybeak@gmail.com
923a7392630ad2630f25803555e693d4b964ce78
c82f89b0e6d1547c2829422e7de7664b378c1039
/src/com/hongyu/entity/PayDeposit.java
e97f66f0bae51287344835a90c5728c373ca2100
[]
no_license
chenxiaoyin3/shetuan_backend
1bab5327cafd42c8086c25ade7e8ce08fda6a1ac
e21a0b14a2427c9ad52ed00f68d5cce2689fdaeb
refs/heads/master
2022-05-15T14:52:07.137000
2022-04-07T03:30:57
2022-04-07T03:30:57
250,762,749
1
2
null
null
null
null
UTF-8
Java
false
false
3,373
java
package com.hongyu.entity; // Generated 2017-12-22 15:00:37 by Hibernate Tools 5.2.3.Final import static javax.persistence.GenerationType.IDENTITY; import java.math.BigDecimal; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * PayDeposit 收支记录 -总公司-付款-押金(门店、供应商) * @author xyy */ @SuppressWarnings("serial") @Entity @Table(name = "hy_pay_deposit") public class PayDeposit implements java.io.Serializable { private Long id; /** 1:门店保证金退还 2:供应商保证金退还*/ private Integer depositType; /** 0:未付款 1:已付款*/ private Integer hasPaid; private String institution; private Date applyDate; private String appliName; private String contractCode; private BigDecimal amount; private BigDecimal balance; private String remark; /** 门店或供应商的银行帐号*/ private Long bankListId; private String payer; private Date payDate; @Column(name = "payer") public String getPayer() { return payer; } public void setPayer(String payer) { this.payer = payer; } @Temporal(TemporalType.DATE) @Column(name = "pay_date") public Date getPayDate() { return payDate; } public void setPayDate(Date payDate) { this.payDate = payDate; } @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "id", unique = true, nullable = false) public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } @Column(name = "deposit_type") public Integer getDepositType() { return this.depositType; } public void setDepositType(Integer depositType) { this.depositType = depositType; } @Column(name = "has_paid") public Integer getHasPaid() { return this.hasPaid; } public void setHasPaid(Integer hasPaid) { this.hasPaid = hasPaid; } @Column(name = "institution") public String getInstitution() { return this.institution; } public void setInstitution(String institution) { this.institution = institution; } @Temporal(TemporalType.DATE) @Column(name = "apply_date") public Date getApplyDate() { return this.applyDate; } public void setApplyDate(Date applyDate) { this.applyDate = applyDate; } @Column(name = "appli_name") public String getAppliName() { return this.appliName; } public void setAppliName(String appliName) { this.appliName = appliName; } @Column(name = "contract_code") public String getContractCode() { return this.contractCode; } public void setContractCode(String contractCode) { this.contractCode = contractCode; } @Column(name = "amount") public BigDecimal getAmount() { return this.amount; } public void setAmount(BigDecimal amount) { this.amount = amount; } @Column(name = "balance") public BigDecimal getBalance() { return balance; } public void setBalance(BigDecimal balance) { this.balance = balance; } @Column(name = "remark") public String getRemark() { return this.remark; } public void setRemark(String remark) { this.remark = remark; } @Column(name = "bank_list_id") public Long getBankListId() { return bankListId; } public void setBankListId(Long bankListId) { this.bankListId = bankListId; } }
[ "925544714@qq.com" ]
925544714@qq.com
1e3710902b4bf6d6538f9e1d56c5e8a9fd482079
677e3f9b2be1b6066bc1a5dc59b1bf29d4395882
/SCT2/tags/ci-build/jenkins-YAKINDU_SCT2_CI-1960/test-plugins/org.yakindu.sct.simulation.core.sexec.test/test-gen/org/yakindu/sct/model/sexec/interpreter/test/SyncForkTest.java
e6bef51c88772c6bc2387b7bf0ae109b6f91e7e6
[]
no_license
peterharaszin/yakindu
5647464966b6fb953272603441fd08d412c27a18
6990984f2c67a853f02cfc7a58e1741f136032f0
refs/heads/master
2021-01-10T21:33:19.748169
2015-04-22T12:52:50
2015-04-22T12:52:50
34,406,387
0
0
null
null
null
null
UTF-8
Java
false
false
2,018
java
/** * Copyright (c) 2013 committers of YAKINDU and others. * 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: * committers of YAKINDU - initial API and implementation */ package org.yakindu.sct.model.sexec.interpreter.test; import static junit.framework.Assert.assertTrue; import org.eclipse.xtext.junit4.InjectWith; import org.eclipse.xtext.junit4.XtextRunner; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.yakindu.sct.model.sexec.ExecutionFlow; import org.yakindu.sct.model.sexec.interpreter.test.util.AbstractExecutionFlowTest; import org.yakindu.sct.model.sexec.interpreter.test.util.SExecInjectionProvider; import org.yakindu.sct.test.models.SCTUnitTestModels; import com.google.inject.Inject; /** * Unit TestCase for SyncFork */ @SuppressWarnings("all") @RunWith(XtextRunner.class) @InjectWith(SExecInjectionProvider.class) public class SyncForkTest extends AbstractExecutionFlowTest { @Inject private SCTUnitTestModels models; @Before public void setup() throws Exception { ExecutionFlow flow = models .loadExecutionFlowFromResource("SyncFork.sct"); initInterpreter(flow); } @Test public void syncForkTest() throws Exception { interpreter.enter(); assertTrue(isActive("A")); raiseEvent("f"); interpreter.runCycle(); assertTrue(isActive("B")); assertTrue(isActive("C1")); assertTrue(isActive("D1")); raiseEvent("f"); interpreter.runCycle(); assertTrue(isActive("B")); assertTrue(isActive("C2")); assertTrue(isActive("D2")); raiseEvent("e"); interpreter.runCycle(); assertTrue(isActive("A")); raiseEvent("f"); interpreter.runCycle(); assertTrue(isActive("B")); assertTrue(isActive("C1")); assertTrue(isActive("D1")); } }
[ "yakindu@itemis.de@6a4fa09a-a2c1-c95f-7b62-f4ef5be68d87" ]
yakindu@itemis.de@6a4fa09a-a2c1-c95f-7b62-f4ef5be68d87
1dd28a654bdb4a44c60f1454c2c6567bfeb414eb
9fcf05729b131e40eedb8bbc1b2e04dbf6f02c98
/Java/Loon-Neo/src/loon/opengl/IndexBufferObjectSubData.java
c748c821f2db0e134088957808b46888ad02e50a
[ "Apache-2.0" ]
permissive
choiyongwoo/LGame
68661774ca4c913e8fae8378a2f291939430fa37
f007cee4c017702d5dd3d7966cb99b3c69bec616
refs/heads/master
2020-05-29T13:39:00.447566
2019-05-28T01:30:53
2019-05-28T01:30:53
189,168,503
1
0
null
2019-05-29T06:59:15
2019-05-29T06:59:14
null
UTF-8
Java
false
false
4,025
java
/** * Copyright 2008 - 2015 The Loon Game Engine 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. * * @project loon * @author cping * @email:javachenpeng@yahoo.com * @version 0.5 */ package loon.opengl; import java.nio.ByteBuffer; import java.nio.ShortBuffer; import loon.LSysException; import loon.LSystem; public class IndexBufferObjectSubData implements IndexData { protected ShortBuffer buffer; protected ByteBuffer byteBuffer; protected int bufferHandle; protected final boolean isDirect; protected boolean isDirty = true; protected boolean isBound = false; protected final int usage; public IndexBufferObjectSubData(boolean isStatic, int maxIndices) { byteBuffer = LSystem.base().support().newByteBuffer(maxIndices * 2); isDirect = true; usage = isStatic ? GL20.GL_STATIC_DRAW : GL20.GL_DYNAMIC_DRAW; buffer = byteBuffer.asShortBuffer(); buffer.flip(); byteBuffer.flip(); bufferHandle = createBufferObject(); } public IndexBufferObjectSubData(int maxIndices) { byteBuffer = LSystem.base().support().newByteBuffer(maxIndices * 2); this.isDirect = true; usage = GL20.GL_STATIC_DRAW; buffer = byteBuffer.asShortBuffer(); buffer.flip(); byteBuffer.flip(); bufferHandle = createBufferObject(); } private int createBufferObject() { GL20 gl = LSystem.base().graphics().gl; int result = gl.glGenBuffer(); gl.glBindBuffer(GL20.GL_ELEMENT_ARRAY_BUFFER, result); gl.glBufferData(GL20.GL_ELEMENT_ARRAY_BUFFER, byteBuffer.capacity(), null, usage); gl.glBindBuffer(GL20.GL_ELEMENT_ARRAY_BUFFER, 0); return result; } @Override public int getNumIndices() { return buffer.limit(); } @Override public int getNumMaxIndices() { return buffer.capacity(); } @Override public void setIndices(short[] indices, int offset, int count) { isDirty = true; buffer.clear(); buffer.put(indices, offset, count); buffer.flip(); byteBuffer.position(0); byteBuffer.limit(count << 1); if (isBound) { LSystem.base().graphics().gl.glBufferSubData( GL20.GL_ELEMENT_ARRAY_BUFFER, 0, byteBuffer.limit(), byteBuffer); isDirty = false; } } @Override public void setIndices(ShortBuffer indices) { int pos = indices.position(); isDirty = true; buffer.clear(); buffer.put(indices); buffer.flip(); indices.position(pos); byteBuffer.position(0); byteBuffer.limit(buffer.limit() << 1); if (isBound) { LSystem.base().graphics().gl.glBufferSubData( GL20.GL_ELEMENT_ARRAY_BUFFER, 0, byteBuffer.limit(), byteBuffer); isDirty = false; } } @Override public ShortBuffer getBuffer() { isDirty = true; return buffer; } @Override public void bind() { if (bufferHandle == 0) { throw new LSysException("bufferHandle == 0"); } LSystem.base().graphics().gl.glBindBuffer(GL20.GL_ELEMENT_ARRAY_BUFFER, bufferHandle); if (isDirty) { byteBuffer.limit(buffer.limit() * 2); LSystem.base().graphics().gl.glBufferSubData( GL20.GL_ELEMENT_ARRAY_BUFFER, 0, byteBuffer.limit(), byteBuffer); isDirty = false; } isBound = true; } @Override public void unbind() { LSystem.base().graphics().gl.glBindBuffer(GL20.GL_ELEMENT_ARRAY_BUFFER, 0); isBound = false; } @Override public void invalidate() { bufferHandle = createBufferObject(); isDirty = true; } @Override public void close() { GL20 gl = LSystem.base().graphics().gl; gl.glBindBuffer(GL20.GL_ELEMENT_ARRAY_BUFFER, 0); gl.glDeleteBuffer(bufferHandle); bufferHandle = 0; } }
[ "longwind2012@hotmail.com" ]
longwind2012@hotmail.com
2d1bd52ecfec5829eba367bdeabc6b12f357559e
5bfa069cf394595d25ddb331b8cd701acf37eeb3
/app/src/main/java/fi/polar/polarflow/ui/custom/an.java
47e00c16f7ff934bbb324fe8842086e65e4cd249
[]
no_license
skorotkov/reversed
747d36a44314e2bf3ebee0607152a0873b191ca5
3f5222de57befe8a54fd1d07462492f3a605efdd
refs/heads/master
2020-03-27T23:45:35.198114
2018-09-04T14:11:47
2018-09-04T14:11:47
147,343,931
0
0
null
null
null
null
UTF-8
Java
false
false
789
java
package fi.polar.polarflow.ui.custom; import android.util.Property; class an extends Property { // $FF: synthetic field final WearableLinearLayoutManager a; an(WearableLinearLayoutManager var1) { super(Integer.class, "scrollVertically"); this.a = var1; } public Integer a(WearableLinearLayoutManager var1) { return WearableLinearLayoutManager.a(var1); } public void a(WearableLinearLayoutManager var1, Integer var2) { WearableLinearLayoutManager.a(var1, var2); } // $FF: synthetic method public Object get(Object var1) { return this.a((WearableLinearLayoutManager)var1); } // $FF: synthetic method public void set(Object var1, Object var2) { this.a((WearableLinearLayoutManager)var1, (Integer)var2); } }
[ "sergey.korotkov@prowidelabs.com" ]
sergey.korotkov@prowidelabs.com
4fb3fd69a2cbbebeec95dbbf4ba76ccf0aa5b409
84e064c973c0cc0d23ce7d491d5b047314fa53e5
/latest9.8/hej/net/sf/saxon/functions/AvailableEnvironmentVariables.java
7600b6da6f0bc90e0641db6488044abbc80b8e6a
[]
no_license
orbeon/saxon-he
83fedc08151405b5226839115df609375a183446
250c5839e31eec97c90c5c942ee2753117d5aa02
refs/heads/master
2022-12-30T03:30:31.383330
2020-10-16T15:21:05
2020-10-16T15:21:05
304,712,257
1
1
null
null
null
null
UTF-8
Java
false
false
2,471
java
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2017 Saxonica Limited. // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// package net.sf.saxon.functions; import net.sf.saxon.expr.Expression; import net.sf.saxon.expr.SystemFunctionCall; import net.sf.saxon.expr.XPathContext; import net.sf.saxon.expr.parser.ExpressionVisitor; import net.sf.saxon.lib.EnvironmentVariableResolver; import net.sf.saxon.lib.FeatureKeys; import net.sf.saxon.om.Sequence; import net.sf.saxon.trans.XPathException; import net.sf.saxon.value.SequenceExtent; import net.sf.saxon.value.StringValue; import java.util.ArrayList; import java.util.List; public class AvailableEnvironmentVariables extends SystemFunction { /** * Evaluate the expression (dynamic evaluation) * * @param context the dynamic evaluation context * @param arguments the values of the arguments, supplied as SequenceIterators * @return the result of the evaluation, in the form of a SequenceIterator * @throws net.sf.saxon.trans.XPathException * if a dynamic error occurs during the evaluation of the expression */ public Sequence call(XPathContext context, Sequence[] arguments) throws XPathException { EnvironmentVariableResolver resolver = (EnvironmentVariableResolver) context.getConfiguration().getConfigurationProperty( FeatureKeys.ENVIRONMENT_VARIABLE_RESOLVER); List<StringValue> myList = new ArrayList<StringValue>(); for (java.lang.String s : resolver.getAvailableEnvironmentVariables()) { myList.add(new StringValue(s)); } return new SequenceExtent(myList); } @Override public Expression makeFunctionCall(Expression[] arguments) { return new SystemFunctionCall(this, arguments) { // Suppress early evaluation public Expression preEvaluate(ExpressionVisitor visitor) { return this; } }; } } //Copyright (c) 2010-2012 Saxonica Limited.
[ "oneil@saxonica.com" ]
oneil@saxonica.com
5935dcc5c750f1859df7b27c83f0bfb49b5c08c8
0f81cb1661e59da59238987643f8368b9eac0de2
/src/main/java/com/example/ssm/shop/enums/OrderStatusEnum.java
fa15c2312a6a4c0648d5bb4dab815ef5dbeebf2f
[]
no_license
saysky/ForestShop
c5d6d2b5421f97bc8c2c94303650bc01929af1d1
2d7767294119ce8d327c23cefb92f930021b04b2
refs/heads/master
2023-03-08T00:54:24.671340
2022-04-27T12:44:44
2022-04-27T12:44:44
245,569,265
14
4
null
2023-02-22T02:17:31
2020-03-07T04:39:57
Java
UTF-8
Java
false
false
583
java
package com.example.ssm.shop.enums; /** * @author 言曌 * @date 2020/3/1 9:46 下午 */ public enum OrderStatusEnum { /** * 待支付 */ NOT_PAY(0), /** * 待发货 */ NOT_SEND(1), /** * 未确认收货 */ NOT_CONFIRM(2), /** * 已收货 */ CONFIRM(3), ; private Integer value; OrderStatusEnum(Integer value) { this.value = value; } public Integer getValue() { return value; } public void setValue(Integer value) { this.value = value; } }
[ "847064370@qq.com" ]
847064370@qq.com
3ed0f55fb5fe934586fecc9c66ef540a78fdb156
c81dd37adb032fb057d194b5383af7aa99f79c6a
/java/com/google/android/gms/internal/measurement/zzfc.java
44cd3f8d67dac4ea1b9ecdbeccd06cf479ac6745
[]
no_license
hongnam207/pi-network-source
1415a955e37fe58ca42098967f0b3307ab0dc785
17dc583f08f461d4dfbbc74beb98331bf7f9e5e3
refs/heads/main
2023-03-30T07:49:35.920796
2021-03-28T06:56:24
2021-03-28T06:56:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,033
java
package com.google.android.gms.internal.measurement; import com.ironsource.sdk.constants.Events; import java.io.Serializable; import java.util.Collection; import java.util.Map; import java.util.Set; import org.checkerframework.checker.nullness.compatqual.NullableDecl; /* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */ public abstract class zzfc<K, V> implements Serializable, Map<K, V> { private static final Map.Entry<?, ?>[] zza = new Map.Entry[0]; private transient zzfg<Map.Entry<K, V>> zzb; private transient zzfg<K> zzc; private transient zzey<V> zzd; zzfc() { } @Override // java.util.Map public abstract V get(@NullableDecl Object obj); /* access modifiers changed from: package-private */ public abstract zzfg<Map.Entry<K, V>> zza(); /* access modifiers changed from: package-private */ public abstract zzfg<K> zzb(); /* access modifiers changed from: package-private */ public abstract zzey<V> zzc(); @Override // java.util.Map @Deprecated public final V put(K k, V v) { throw new UnsupportedOperationException(); } @Override // java.util.Map @Deprecated public final V remove(Object obj) { throw new UnsupportedOperationException(); } @Override // java.util.Map @Deprecated public final void putAll(Map<? extends K, ? extends V> map) { throw new UnsupportedOperationException(); } @Deprecated public final void clear() { throw new UnsupportedOperationException(); } public boolean isEmpty() { return size() == 0; } public boolean containsKey(@NullableDecl Object obj) { return get(obj) != null; } public boolean containsValue(@NullableDecl Object obj) { return ((zzey) values()).contains(obj); } @Override // java.util.Map public final V getOrDefault(@NullableDecl Object obj, @NullableDecl V v) { V v2 = get(obj); return v2 != null ? v2 : v; } public boolean equals(@NullableDecl Object obj) { if (this == obj) { return true; } if (obj instanceof Map) { return entrySet().equals(((Map) obj).entrySet()); } return false; } public int hashCode() { return zzfv.zza((zzfg) entrySet()); } public String toString() { int size = size(); if (size >= 0) { StringBuilder sb = new StringBuilder((int) Math.min(((long) size) << 3, 1073741824L)); sb.append('{'); boolean z = true; for (Map.Entry<K, V> entry : entrySet()) { if (!z) { sb.append(", "); } z = false; sb.append((Object) entry.getKey()); sb.append(Events.EQUAL); sb.append((Object) entry.getValue()); } sb.append('}'); return sb.toString(); } StringBuilder sb2 = new StringBuilder("size".length() + 40); sb2.append("size"); sb2.append(" cannot be negative but was: "); sb2.append(size); throw new IllegalArgumentException(sb2.toString()); } @Override // java.util.Map public /* synthetic */ Set entrySet() { zzfg<Map.Entry<K, V>> zzfg = this.zzb; if (zzfg != null) { return zzfg; } zzfg<Map.Entry<K, V>> zza2 = zza(); this.zzb = zza2; return zza2; } @Override // java.util.Map public /* synthetic */ Collection values() { zzey<V> zzey = this.zzd; if (zzey != null) { return zzey; } zzey<V> zzc2 = zzc(); this.zzd = zzc2; return zzc2; } @Override // java.util.Map public /* synthetic */ Set keySet() { zzfg<K> zzfg = this.zzc; if (zzfg != null) { return zzfg; } zzfg<K> zzb2 = zzb(); this.zzc = zzb2; return zzb2; } }
[ "nganht2@vng.com.vn" ]
nganht2@vng.com.vn
29d5a72cd3e700fecad44ce23c8eb500497c9c4f
77f41106d18d9d2fd2ca85c18531f7e30e6968a8
/chorus/billing-web-services/src/main/java/com/infoclinika/mssharing/services/billing/persistence/enity/storage/ArchiveStorageUsage.java
db8174e8edae73ebdc8b44fc3ae95d690d52ea01
[]
no_license
StratusBioSciences/chorus
a8abaa7ab1e9e8f6d867d327c7ec26e804e6fe0b
c9d8099419733314c0166980ee6270563a212383
refs/heads/master
2021-01-20T12:41:17.996158
2017-05-05T13:33:37
2017-05-05T13:33:37
90,378,816
0
4
null
2019-05-08T17:09:36
2017-05-05T13:32:47
Java
UTF-8
Java
false
false
1,570
java
package com.infoclinika.mssharing.services.billing.persistence.enity.storage; import com.infoclinika.mssharing.services.billing.persistence.enity.ChargeableItemUsage; import javax.persistence.Column; import javax.persistence.MappedSuperclass; import java.util.Date; /** * @author Herman Zamula */ @MappedSuperclass public class ArchiveStorageUsage extends ChargeableItemUsage { @Column(name = "hours") public int hours = 1; //Field used for aggregation storage usages by hours and days. @Column(name = "compressed") public boolean compressed = false; public ArchiveStorageUsage() { super(); } public ArchiveStorageUsage(long lab, long user, long file1, long bytes, Date timestamp, String ownerName, String instrument, long price, String file) { super(lab, user, file1, bytes, timestamp, ownerName, instrument, price, file); } public ArchiveStorageUsage(long lab, long user, Long file, long bytes, long timestamp, String ownerName, String instrument, long price, String fileName, int hours, long balance) { super(lab, user, file, bytes, new Date(timestamp), ownerName, instrument, price, fileName); this.hours = hours; super.setBalance(balance); } public int getHours() { return hours; } public void setHours(int hours) { this.hours = hours; } public boolean isCompressed() { return compressed; } public void setCompressed(boolean compressed) { this.compressed = compressed; } }
[ "vladimir.moiseiev@teamdev.com" ]
vladimir.moiseiev@teamdev.com
2e7febba202c1cc2925f5ba686c95ad178156bb2
66e1c955c3afe0337001d0471db5e4dfa486b768
/java/src/main/java/java/nio/file/FileVisitor.java
af9154ce8c76aa3e54cc2971345ea4df3f0d4e38
[]
no_license
hryou0922/source
c0db766698a541aa80bf8e4880210768ebd91005
2d9d5a34bdc3241181d869de7c6086e895eca534
refs/heads/master
2022-12-22T10:47:45.312009
2019-11-01T09:47:32
2019-11-01T09:47:32
129,269,696
1
1
null
2022-12-16T02:51:39
2018-04-12T15:07:46
Java
UTF-8
Java
false
false
6,536
java
/* * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.nio.file; import java.io.IOException; import java.nio.file.attribute.BasicFileAttributes; /** * A visitor of files. An implementation of this interface is provided to the * {@link Files#walkFileTree Files.walkFileTree} methods to visit each file in * a file tree. * * <p> <b>Usage Examples:</b> * Suppose we want to delete a file tree. In that case, each directory should * be deleted after the entries in the directory are deleted. * <pre> * Path start = ... * Files.walkFileTree(start, new SimpleFileVisitor&lt;Path&gt;() { * &#64;Override * public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) * throws IOException * { * Files.delete(file); * return FileVisitResult.CONTINUE; * } * &#64;Override * public FileVisitResult postVisitDirectory(Path dir, IOException e) * throws IOException * { * if (e == null) { * Files.delete(dir); * return FileVisitResult.CONTINUE; * } else { * // directory iteration failed * throw e; * } * } * }); * </pre> * <p> Furthermore, suppose we want to copy a file tree to a target location. * In that case, symbolic links should be followed and the target directory * should be created before the entries in the directory are copied. * <pre> * final Path source = ... * final Path target = ... * * Files.walkFileTree(source, EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, * new SimpleFileVisitor&lt;Path&gt;() { * &#64;Override * public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) * throws IOException * { * Path targetdir = target.resolve(source.relativize(dir)); * try { * Files.copy(dir, targetdir); * } catch (FileAlreadyExistsException e) { * if (!Files.isDirectory(targetdir)) * throw e; * } * return CONTINUE; * } * &#64;Override * public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) * throws IOException * { * Files.copy(file, target.resolve(source.relativize(file))); * return CONTINUE; * } * }); * </pre> * * @since 1.7 */ public interface FileVisitor<T> { /** * Invoked for a directory before entries in the directory are visited. * * <p> If this method returns {@link FileVisitResult#CONTINUE CONTINUE}, * then entries in the directory are visited. If this method returns {@link * FileVisitResult#SKIP_SUBTREE SKIP_SUBTREE} or {@link * FileVisitResult#SKIP_SIBLINGS SKIP_SIBLINGS} then entries in the * directory (and any descendants) will not be visited. * * @param dir * a reference to the directory * @param attrs * the directory's basic attributes * * @return the visit result * * @throws IOException * if an I/O error occurs */ FileVisitResult preVisitDirectory(T dir, BasicFileAttributes attrs) throws IOException; /** * Invoked for a file in a directory. * * @param file * a reference to the file * @param attrs * the file's basic attributes * * @return the visit result * * @throws IOException * if an I/O error occurs */ FileVisitResult visitFile(T file, BasicFileAttributes attrs) throws IOException; /** * Invoked for a file that could not be visited. This method is invoked * if the file's attributes could not be read, the file is a directory * that could not be opened, and other reasons. * * @param file * a reference to the file * @param exc * the I/O exception that prevented the file from being visited * * @return the visit result * * @throws IOException * if an I/O error occurs */ FileVisitResult visitFileFailed(T file, IOException exc) throws IOException; /** * Invoked for a directory after entries in the directory, and all of their * descendants, have been visited. This method is also invoked when iteration * of the directory completes prematurely (by a {@link #visitFile visitFile} * method returning {@link FileVisitResult#SKIP_SIBLINGS SKIP_SIBLINGS}, * or an I/O error when iterating over the directory). * * @param dir * a reference to the directory * @param exc * {@code null} if the iteration of the directory completes without * an error; otherwise the I/O exception that caused the iteration * of the directory to complete prematurely * * @return the visit result * * @throws IOException * if an I/O error occurs */ FileVisitResult postVisitDirectory(T dir, IOException exc) throws IOException; }
[ "hryou0922@126.com" ]
hryou0922@126.com
f8ac75af02f26e12b05c09494c5b11c4319d2841
d4dbb0571226af5809cc953e73924d505094e211
/Hibernate/05.HibernateRelations/Exercises/src/main/java/app/daos/BatchDao.java
8e41840f9e55cb82f6cc0ac0201d9c8a429021bf
[]
no_license
vasilgramov/database-fundamentals
45e258e965e85514e60b849d9049737ae25e81c0
0ebe74ab4bffef0d29d6ee2e200f07bdc24fe6bf
refs/heads/master
2021-06-18T17:54:36.238976
2017-07-10T14:49:44
2017-07-10T14:49:44
89,739,950
0
1
null
null
null
null
UTF-8
Java
false
false
525
java
package app.daos; import app.entities.batches.ProductionBatch; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import javax.transaction.Transactional; import java.util.Date; import java.util.List; @Repository @Transactional public interface BatchDao extends JpaRepository<ProductionBatch, Long> { List<ProductionBatch> getProductionBatchByBatchDateAfter(Date date); List<ProductionBatch> getProductionBatchByShampoosIsNullOrderByBatchDateDesc(); }
[ "gramovv@gmail.com" ]
gramovv@gmail.com