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
f784c9299350136d40ae5ef511437e260468fb97
2db903fe6c785cf5a9912d6c7dbbf050e2a66059
/src/com/facebook/buck/core/rules/configsetting/ConfigSettingRule.java
44a33ab288e3fd3340d534244ab88c44d9eadd57
[ "Apache-2.0" ]
permissive
nskpaun/buck
1564995f7c8fa8f00c4cdd8e29df87134d4329cc
191adb4a225c034a632a5685df67af22e6f85b5b
refs/heads/master
2020-05-07T01:06:20.690066
2019-04-08T22:18:08
2019-04-08T23:19:47
180,250,240
0
0
null
2019-04-08T23:52:16
2019-04-08T23:52:15
null
UTF-8
Java
false
false
1,725
java
/* * Copyright 2018-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.core.rules.configsetting; import com.facebook.buck.core.model.UnconfiguredBuildTarget; import com.facebook.buck.core.rules.config.ConfigurationRule; import com.facebook.buck.core.select.ProvidesSelectable; import com.facebook.buck.core.select.Selectable; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; /** {@code config_setting} rule. */ public class ConfigSettingRule implements ConfigurationRule, ProvidesSelectable { private final UnconfiguredBuildTarget buildTarget; private final ConfigSettingSelectable configSettingSelectable; public ConfigSettingRule( UnconfiguredBuildTarget buildTarget, ImmutableMap<String, String> values, ImmutableSet<UnconfiguredBuildTarget> constraintValues) { this.buildTarget = buildTarget; configSettingSelectable = new ConfigSettingSelectable(buildTarget, values, constraintValues); } @Override public UnconfiguredBuildTarget getBuildTarget() { return buildTarget; } @Override public Selectable getSelectable() { return configSettingSelectable; } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
d732a9bf599b20c2722166203035e97a5e761fe7
76be7a97182832703e841b9640ac97289ac005cf
/common/src/main/java/redis/BaseRedisConfig.java
8a3e31deee394712099979048ff08767bc154e60
[]
no_license
yiitree/my-cloud-template
1ef4fbdc3a7444a5838fe9612cf1df1c12e28e8a
4039793bc74679563570fe030125062dd7242e3c
refs/heads/master
2023-05-21T05:47:07.792014
2021-06-02T14:24:21
2021-06-02T14:24:21
373,086,836
0
0
null
null
null
null
UTF-8
Java
false
false
3,176
java
package redis; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator; import org.springframework.context.annotation.Bean; import org.springframework.data.redis.cache.RedisCacheConfiguration; import org.springframework.data.redis.cache.RedisCacheManager; import org.springframework.data.redis.cache.RedisCacheWriter; import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; import org.springframework.data.redis.serializer.RedisSerializationContext; import org.springframework.data.redis.serializer.RedisSerializer; import org.springframework.data.redis.serializer.StringRedisSerializer; import redis.impl.RedisServiceImpl; import javax.annotation.Resource; import java.time.Duration; /** * Redis基础配置 * Created by macro on 2020/6/19. */ public class BaseRedisConfig { @Resource RedisSerializer<Object> redisSerializer; @Bean public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) { RedisSerializer<Object> serializer = redisSerializer; RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>(); redisTemplate.setConnectionFactory(redisConnectionFactory); redisTemplate.setKeySerializer(new StringRedisSerializer()); redisTemplate.setValueSerializer(serializer); redisTemplate.setHashKeySerializer(new StringRedisSerializer()); redisTemplate.setHashValueSerializer(serializer); redisTemplate.afterPropertiesSet(); return redisTemplate; } @Bean public RedisSerializer<Object> redisSerializer() { //创建JSON序列化器 Jackson2JsonRedisSerializer<Object> serializer = new Jackson2JsonRedisSerializer<>(Object.class); ObjectMapper objectMapper = new ObjectMapper(); objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); //必须设置,否则无法将JSON转化为对象,会转化成Map类型 objectMapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance,ObjectMapper.DefaultTyping.NON_FINAL); serializer.setObjectMapper(objectMapper); return serializer; } @Bean public RedisCacheManager redisCacheManager(RedisConnectionFactory redisConnectionFactory) { RedisCacheWriter redisCacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(redisConnectionFactory); //设置Redis缓存有效期为1天 RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig() .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer)).entryTtl(Duration.ofDays(1)); return new RedisCacheManager(redisCacheWriter, redisCacheConfiguration); } @Bean public RedisService redisService(){ return new RedisServiceImpl(); } }
[ "772701414@qq.com" ]
772701414@qq.com
d44a9d4f4143445713620b7898af93b47a522b0c
b48772522cbae1c44b9ba69fd763091f21ead400
/engine-rest/src/main/java/org/camunda/bpm/engine/rest/dto/runtime/FilterDto.java
e2e1dfdbf14914426b436c139c7e9b0fc580814f
[ "Apache-2.0" ]
permissive
mischak/camunda-bpm-platform
694a4cb2f9a4230aab7d7118e0f5cb8ea19bf928
543226f8d8b82511af88018470961f13ba62dcff
refs/heads/master
2021-01-17T10:48:49.499997
2014-09-22T15:18:28
2014-09-22T15:18:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,379
java
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.camunda.bpm.engine.rest.dto.runtime; import static javax.ws.rs.core.Response.Status; import java.io.IOException; import java.util.Map; import org.camunda.bpm.engine.filter.Filter; import org.camunda.bpm.engine.rest.exception.InvalidRequestException; import org.codehaus.jackson.map.ObjectMapper; public class FilterDto { protected static final ObjectMapper objectMapper = new ObjectMapper(); protected String id; protected String resourceType; protected String name; protected String owner; protected Map<String, Object> query; protected Map<String, Object> properties; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getResourceType() { return resourceType; } public void setResourceType(String resourceType) { this.resourceType = resourceType; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getOwner() { return owner; } public void setOwner(String owner) { this.owner = owner; } public Map<String, Object> getQuery() { return query; } public void setQuery(Map<String, Object> query) { this.query = query; } public Map<String, Object> getProperties() { return properties; } public void setProperties(Map<String, Object> properties) { this.properties = properties; } public static FilterDto fromFilter(Filter filter) { FilterDto dto = new FilterDto(); dto.id = filter.getId(); dto.resourceType = filter.getResourceType(); dto.name = filter.getName(); dto.owner = filter.getOwner(); dto.query = stringToJsonMap(filter.getQuery()); dto.properties = stringToJsonMap(filter.getProperties()); return dto; } public void updateFilter(Filter filter) { filter.setResourceType(getResourceType()); filter.setName(getName()); filter.setOwner(getOwner()); filter.setQuery(jsonToString(getQuery())); filter.setProperties(getProperties()); } protected static String jsonToString(Object json) { if (json != null) { try { return objectMapper.writeValueAsString(json); } catch (IOException e) { throw new InvalidRequestException(Status.BAD_REQUEST, e, "Unable to convert object to JSON string"); } } else { return null; } } @SuppressWarnings("unchecked") protected static Map<String, Object> stringToJsonMap(String json) { if (json != null && !json.isEmpty()) { try { return (Map<String, Object>) objectMapper.readValue(json, Map.class); } catch (IOException e) { throw new InvalidRequestException(Status.BAD_REQUEST, e, "Unable to convert string to JSON object"); } } else { return null; } } }
[ "sebastian.menski@googlemail.com" ]
sebastian.menski@googlemail.com
f983a0fce9c8aae3adaa8e1a5e175159c47d0117
49fe3d43ab90b4e241795f4c3f43bb53f4cb0e32
/src/com/company/Lesson89/Test01.java
94f2abaea732dbfb24d7b032f20f42b8667ca6cc
[]
no_license
aierko/dev
a0e8a6b8ceaa61f6842cf02a4443fcc9ea6a3cf7
ea52685dd0a70e4bd578369cf417f6c6a2f7a5c9
refs/heads/master
2021-09-03T10:08:45.436562
2017-10-20T12:53:43
2017-10-20T12:53:43
106,323,994
0
0
null
null
null
null
UTF-8
Java
false
false
1,396
java
package com.company.Lesson89; /** * Created by user on 12.05.2017. * /* Каждый метод должен возвращать свой StackTrace Написать пять методов, которые вызывают друг друга. Каждый метод должен возвращать свой StackTrace. */ public class Test01 { public static void main(String[] args) { stack(); } public static StackTraceElement[] stack(){ stack1(); StackTraceElement[] elements = Thread.currentThread().getStackTrace(); //?? return elements; } public static StackTraceElement[] stack1(){ stack2(); StackTraceElement[] elements = Thread.currentThread().getStackTrace(); return elements; } public static StackTraceElement[] stack2(){ stack3(); StackTraceElement[] elements = Thread.currentThread().getStackTrace(); return elements; } public static StackTraceElement[] stack3(){ stack4(); StackTraceElement[] elements = Thread.currentThread().getStackTrace(); return elements; } public static StackTraceElement[] stack4(){ StackTraceElement[] elements = Thread.currentThread().getStackTrace(); for (StackTraceElement element : elements) { System.err.println(element); } return elements; } }
[ "vtldtl80" ]
vtldtl80
d21bfa61d5954ec5ecab1d7bc1a828e15e16b372
a92b2d1198c57706cc4db1c17d9dd68cf84b2237
/cloudfoundry-client-spring/src/main/java/org/cloudfoundry/reactor/util/StaticTrustManagerFactory.java
44ce5aeca588c1081f3f599c5df5e78ac4e84ac4
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
hyunsangchokt/cf-java-client
60694e45a4a47b19d942e970f7dbbf0aec119ce6
eb5d39d4312bdf4201932f3e710c084f73542c51
refs/heads/master
2021-06-01T19:36:32.280132
2016-07-07T09:59:43
2016-07-07T09:59:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,441
java
/* * Copyright 2013-2016 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.cloudfoundry.reactor.util; import io.netty.handler.ssl.util.SimpleTrustManagerFactory; import javax.net.ssl.ManagerFactoryParameters; import javax.net.ssl.TrustManager; import java.security.KeyStore; final class StaticTrustManagerFactory extends SimpleTrustManagerFactory { private final TrustManager[] trustManagers; StaticTrustManagerFactory(TrustManager... trustManager) { this.trustManagers = trustManager; } @Override protected TrustManager[] engineGetTrustManagers() { return this.trustManagers; } @Override protected void engineInit(ManagerFactoryParameters managerFactoryParameters) throws Exception { // Do nothing } @Override protected void engineInit(KeyStore keyStore) throws Exception { // Do nothing } }
[ "bhale@pivotal.io" ]
bhale@pivotal.io
eb92b6fd6f7b39ec86285e8cfc24a224f2642208
d97527c4ba38df7e3b8f13b619b13526ba1a4ba1
/Java_netty/src/main/java/com/learn/bio/Calculator.java
c845fc07298f159a23a6cee0ce1760a2302c2dde
[]
no_license
liman657/learn2019
472d2713b53e0fd73fb9617279c73b7a06ca4732
8e65320752b742463f2a43a41df75b15c0452477
refs/heads/master
2023-06-10T05:26:05.929419
2023-06-04T08:10:18
2023-06-04T08:10:18
174,538,097
2
0
null
2022-06-21T04:20:15
2019-03-08T12:58:17
JavaScript
UTF-8
Java
false
false
720
java
package com.learn.bio; /** * autor:liman * createtime:2019/10/7 * comment: */ public class Calculator { public static int cal(String expression) throws Exception { char op = expression.charAt(1); switch (op) { case '+': return (expression.charAt(0) - 48) + (expression.charAt(2) - 48); case '-': return (expression.charAt(0) - 48) - (expression.charAt(2) - 48); case '*': return (expression.charAt(0) - 48) * (expression.charAt(2) - 48); case '/': return (expression.charAt(0) - 48) / (expression.charAt(2) - 48); } throw new Exception("Calculator error"); } }
[ "657271181@qq.com" ]
657271181@qq.com
88d1e42958e9d8ff2dbdd3caea2bd62ca19ff116
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/invite/supplier/app/SupplierEvaluationContractEntryController.java
778ebdacf530e5bcb89eb8cc5cfcc33b9f565994
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
4,115
java
package com.kingdee.eas.fdc.invite.supplier.app; import com.kingdee.bos.BOSException; //import com.kingdee.bos.metadata.*; import com.kingdee.bos.framework.*; import com.kingdee.bos.util.*; import com.kingdee.bos.Context; import java.lang.String; import com.kingdee.eas.common.EASBizException; import com.kingdee.bos.metadata.entity.EntityViewInfo; import com.kingdee.bos.dao.IObjectPK; import com.kingdee.eas.framework.app.CoreBillEntryBaseController; import com.kingdee.eas.fdc.invite.supplier.SupplierEvaluationContractEntryInfo; import com.kingdee.bos.metadata.entity.SelectorItemCollection; import com.kingdee.eas.framework.CoreBaseCollection; import com.kingdee.bos.metadata.entity.SorterItemCollection; import com.kingdee.bos.util.*; import com.kingdee.bos.metadata.entity.FilterInfo; import com.kingdee.bos.BOSException; import com.kingdee.bos.Context; import com.kingdee.eas.framework.CoreBaseInfo; import com.kingdee.bos.framework.*; import com.kingdee.eas.fdc.invite.supplier.SupplierEvaluationContractEntryCollection; import java.rmi.RemoteException; import com.kingdee.bos.framework.ejb.BizController; public interface SupplierEvaluationContractEntryController extends CoreBillEntryBaseController { public boolean exists(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException; public boolean exists(Context ctx, FilterInfo filter) throws BOSException, EASBizException, RemoteException; public boolean exists(Context ctx, String oql) throws BOSException, EASBizException, RemoteException; public SupplierEvaluationContractEntryInfo getSupplierEvaluationContractEntryInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException; public SupplierEvaluationContractEntryInfo getSupplierEvaluationContractEntryInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException, RemoteException; public SupplierEvaluationContractEntryInfo getSupplierEvaluationContractEntryInfo(Context ctx, String oql) throws BOSException, EASBizException, RemoteException; public IObjectPK addnew(Context ctx, SupplierEvaluationContractEntryInfo model) throws BOSException, EASBizException, RemoteException; public void addnew(Context ctx, IObjectPK pk, SupplierEvaluationContractEntryInfo model) throws BOSException, EASBizException, RemoteException; public void update(Context ctx, IObjectPK pk, SupplierEvaluationContractEntryInfo model) throws BOSException, EASBizException, RemoteException; public void updatePartial(Context ctx, SupplierEvaluationContractEntryInfo model, SelectorItemCollection selector) throws BOSException, EASBizException, RemoteException; public void updateBigObject(Context ctx, IObjectPK pk, SupplierEvaluationContractEntryInfo model) throws BOSException, RemoteException; public void delete(Context ctx, IObjectPK pk) throws BOSException, EASBizException, RemoteException; public IObjectPK[] getPKList(Context ctx) throws BOSException, EASBizException, RemoteException; public IObjectPK[] getPKList(Context ctx, String oql) throws BOSException, EASBizException, RemoteException; public IObjectPK[] getPKList(Context ctx, FilterInfo filter, SorterItemCollection sorter) throws BOSException, EASBizException, RemoteException; public SupplierEvaluationContractEntryCollection getSupplierEvaluationContractEntryCollection(Context ctx) throws BOSException, RemoteException; public SupplierEvaluationContractEntryCollection getSupplierEvaluationContractEntryCollection(Context ctx, EntityViewInfo view) throws BOSException, RemoteException; public SupplierEvaluationContractEntryCollection getSupplierEvaluationContractEntryCollection(Context ctx, String oql) throws BOSException, RemoteException; public IObjectPK[] delete(Context ctx, FilterInfo filter) throws BOSException, EASBizException, RemoteException; public IObjectPK[] delete(Context ctx, String oql) throws BOSException, EASBizException, RemoteException; public void delete(Context ctx, IObjectPK[] arrayPK) throws BOSException, EASBizException, RemoteException; }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
adf36139e39cc366a154ed9d19a63318e3b28b66
3fcc92a2b9882e4a2570f68caaf15b5c7def9703
/app/src/main/java/com/sportstv/tvonline/MyApplication.java
09e971176088fe4fc6fc47d7b2fbb3c8dccce228
[]
no_license
fandofastest/radjatvsport
d6f7a28e71e202bd931d0e61755685958b8958f7
d416e0980631354243dfc48076184b66b8c0ac72
refs/heads/master
2022-12-07T23:23:50.565435
2020-09-01T14:38:18
2020-09-01T14:38:18
274,051,126
0
0
null
null
null
null
UTF-8
Java
false
false
6,627
java
package com.sportstv.tvonline; import android.app.Application; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.net.Uri; import androidx.multidex.MultiDex; import android.util.Log; import com.onesignal.OSNotificationOpenResult; import com.onesignal.OneSignal; import org.json.JSONObject; public class MyApplication extends Application { private static MyApplication mInstance; public SharedPreferences preferences; public String prefName = "LiveTV"; public MyApplication() { mInstance = this; } @Override public void onCreate() { super.onCreate(); // ViewPump.init(ViewPump.builder() // .addInterceptor(new CalligraphyInterceptor( // new CalligraphyConfig.Builder() // .setDefaultFontPath("fonts/custom.otf") // .setFontAttrId(R.attr.fontPath) // .build())) // .build()); // CalligraphyConfig.initDefault(new CalligraphyConfig.Builder() // .setDefaultFontPath("fonts/custom.otf") // .setFontAttrId(R.attr.fontPath) // .build()); OneSignal.startInit(this) .setNotificationOpenedHandler(new ExampleNotificationOpenedHandler()) .inFocusDisplaying(OneSignal.OSInFocusDisplayOption.Notification) .init(); mInstance = this; } @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); } public static synchronized MyApplication getInstance() { return mInstance; } public void saveIsLogin(boolean flag) { preferences = this.getSharedPreferences(prefName, 0); Editor editor = preferences.edit(); editor.putBoolean("IsLoggedIn", flag); editor.apply(); } public boolean getIsLogin() { preferences = this.getSharedPreferences(prefName, 0); return preferences.getBoolean("IsLoggedIn", false); } public void saveIsRemember(boolean flag) { preferences = this.getSharedPreferences(prefName, 0); Editor editor = preferences.edit(); editor.putBoolean("IsLoggedRemember", flag); editor.apply(); } public boolean getIsRemember() { preferences = this.getSharedPreferences(prefName, 0); return preferences.getBoolean("IsLoggedRemember", false); } public void saveRemember(String email, String password) { preferences = this.getSharedPreferences(prefName, 0); Editor editor = preferences.edit(); editor.putString("remember_email", email); editor.putString("remember_password", password); editor.apply(); } public String getRememberEmail() { preferences = this.getSharedPreferences(prefName, 0); return preferences.getString("remember_email", ""); } public String getRememberPassword() { preferences = this.getSharedPreferences(prefName, 0); return preferences.getString("remember_password", ""); } public void saveLogin(String user_id, String user_name, String email) { preferences = this.getSharedPreferences(prefName, 0); Editor editor = preferences.edit(); editor.putString("user_id", user_id); editor.putString("user_name", user_name); editor.putString("email", email); editor.apply(); } public String getUserId() { preferences = this.getSharedPreferences(prefName, 0); return preferences.getString("user_id", ""); } public String getUserName() { preferences = this.getSharedPreferences(prefName, 0); return preferences.getString("user_name", ""); } public String getUserEmail() { preferences = this.getSharedPreferences(prefName, 0); return preferences.getString("email", ""); } public void saveIsNotification(boolean flag) { preferences = this.getSharedPreferences(prefName, 0); SharedPreferences.Editor editor = preferences.edit(); editor.putBoolean("IsNotification", flag); editor.apply(); } public boolean getNotification() { preferences = this.getSharedPreferences(prefName, 0); return preferences.getBoolean("IsNotification", true); } public void saveIsExternalPlayer(boolean flag) { preferences = this.getSharedPreferences(prefName, 0); SharedPreferences.Editor editor = preferences.edit(); editor.putBoolean("IsExternalPlayer", flag); editor.apply(); } public boolean getExternalPlayer() { preferences = this.getSharedPreferences(prefName, 0); return preferences.getBoolean("IsExternalPlayer", false); } private class ExampleNotificationOpenedHandler implements OneSignal.NotificationOpenedHandler { @Override public void notificationOpened(OSNotificationOpenResult result) { JSONObject data = result.notification.payload.additionalData; Log.e("data", "" + data); String customKey; String isExternalLink; if (data != null) { customKey = data.optString("channel_id", null); isExternalLink = data.optString("external_link", null); if (customKey != null) { if (!customKey.equals("0")) { Intent intent = new Intent(MyApplication.this, ChannelDetailsActivity.class); intent.putExtra("Id", customKey); intent.putExtra("isNotification", true); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } else { if (!isExternalLink.equals("false")) { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(isExternalLink)); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } else { Intent intent = new Intent(MyApplication.this, SplashActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } } } } } } }
[ "fandofast@gmail.com" ]
fandofast@gmail.com
e0efe7c523a776c32d690e93a1114e9470892f35
f695ffad9aacddd7628ec41bb8250890a36734c8
/ecp-coreservice/ecp-coreservice-common/src/main/java/com/everwing/coreservice/common/wy/entity/property/store/CountStoreList.java
5e95b3aecf5aa1c713786d17f1574f2a0f651085
[]
no_license
zouyuanfa/Everwing-Cloud-Platform
9dea7e324f9447250b1b033509f17f7c8a0921be
f195dfe95f0addde56221d5c1b066290ad7ba62f
refs/heads/master
2020-04-13T18:22:36.731469
2018-12-28T06:18:37
2018-12-28T06:18:37
163,372,146
0
4
null
null
null
null
UTF-8
Java
false
false
1,652
java
package com.everwing.coreservice.common.wy.entity.property.store;/** * Created by wust on 2017/7/20. */ /** * * Function: * Reason: * Date:2017/7/20 * @author wusongti@lii.com.cn */ public class CountStoreList implements java.io.Serializable{ private static final long serialVersionUID = -9219119456225653770L; private Double buildingAreaSum = 0.00; private Double usableAreaSum = 0.00; private Double finishAreaSum = 0.00; private Double shareAreaSum = 0.00; private Integer allCount = 0; private Integer soldCount = 0; public Double getBuildingAreaSum() { return this.buildingAreaSum; } public void setBuildingAreaSum(Double buildingAreaSum) { this.buildingAreaSum = buildingAreaSum; } public Double getUsableAreaSum() { return this.usableAreaSum; } public void setUsableAreaSum(Double usableAreaSum) { this.usableAreaSum = usableAreaSum; } public Double getFinishAreaSum() { return this.finishAreaSum; } public void setFinishAreaSum(Double finishAreaSum) { this.finishAreaSum = finishAreaSum; } public Double getShareAreaSum() { return this.shareAreaSum; } public void setShareAreaSum(Double shareAreaSum) { this.shareAreaSum = shareAreaSum; } public Integer getAllCount() { return this.allCount; } public void setAllCount(Integer allCount) { this.allCount = allCount; } public Integer getSoldCount() { return this.soldCount; } public void setSoldCount(Integer soldCount) { this.soldCount = soldCount; } }
[ "17711642361@163.com" ]
17711642361@163.com
85909bfaa704d1e0e45bd996c54c6902d27dcc40
50ec1cd86d8db986d3222b34a43a94bf2a86b9d7
/Milkomeda/src/main/java/com/github/yizzuide/milkomeda/metal/MetalContainer.java
0c11c8d94ac5563725414c7a52208ae107305d51
[ "MIT" ]
permissive
Loeng/Milkomeda
2edcd8bd385f9c203d8838ade5ce2a32a214564b
18c714f3296f39056a3e96ed485beb34b62ede7c
refs/heads/master
2022-07-04T20:50:14.028745
2020-05-22T09:31:50
2020-05-22T09:31:50
266,247,643
1
0
MIT
2020-05-23T02:25:11
2020-05-23T02:25:10
null
UTF-8
Java
false
false
3,236
java
package com.github.yizzuide.milkomeda.metal; import com.github.yizzuide.milkomeda.util.ReflectUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.springframework.util.CollectionUtils; import org.springframework.util.ReflectionUtils; import org.springframework.util.StringUtils; import java.lang.reflect.Field; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; /** * MetalContainer * 配置容器,不推荐直接使用该类API,因为有线程安全问题,应该使用 {@link MetalHolder} * * @author yizzuide * @since 3.6.0 * Create at 2020/05/21 18:36 */ @Slf4j public class MetalContainer { private final MetalSource metalSource; private final Map<String, Set<VirtualNode>> vNodeCache = new HashMap<>(); public MetalContainer(MetalSource metalSource) { this.metalSource = metalSource; } /** * 初始化配置源 * @param source 配置源 */ public void init(Map<String, String> source) { metalSource.putAll(source); for (Map.Entry<String, String> entry : source.entrySet()) { updateVNode(entry.getKey(), entry.getValue()); } } /** * 获取配置值 * @param key 配置key * @return 值 */ public String getProperty(String key) { return metalSource.get(key); } /** * 添加虚拟节点 * @param metal Metal元信息 * @param target 目标 * @param field 属性 */ public void addVNode(Metal metal, Object target, Field field) { String key = metal.value(); if (StringUtils.isEmpty(key)) { key = field.getName(); } if (!vNodeCache.containsKey(key)) { vNodeCache.put(key, new HashSet<>()); } // key与虚拟节点绑定 vNodeCache.get(key).add(new VirtualNode(metal, target, field)); } /** * 更新虚拟节点 * @param key 绑定key * @param newVal 新值 */ public void updateVNode(String key, String newVal) { String oldVal = metalSource.get(key); Set<VirtualNode> cacheSet = vNodeCache.get(key); if (CollectionUtils.isEmpty(cacheSet)) { return; } for (VirtualNode vNode : cacheSet) { vNode.update(newVal); metalSource.put(key, newVal); log.info("Metal update vnode '{}' with key '{}' from old value '{}' to '{}'", vNode.getSignature(), key, oldVal, newVal); } } @Data public static class VirtualNode { private Metal metal; private Object target; private Field field; private String signature; private Object value; public VirtualNode(Metal metal, Object target, Field field) { this.metal = metal; this.target = target; this.field = field; signature = target.getClass().getName() + "." + field.getName(); field.setAccessible(true); } public void update(String value) { this.value = ReflectUtil.setTypeField(field, value); ReflectionUtils.setField(field, target, this.value); } } }
[ "fu837014586@163.com" ]
fu837014586@163.com
811278630f760903e56bfd098fb899e886e990ec
cf59afd2db3e319d02a820f4ab017040b515fc76
/dynamodbJava/src/main/java/com/example/dynamodb/cotacoes/CotacaoMilho.java
2ba2e855e9ab8ed6437fa33334969c43fc46a056
[]
no_license
fernandooliveirapimenta/cloudninja-dynamodb
8c03edbc8b9ca92becfe95685c467d90c98c104f
5a14f4b1275a03303dec0983b236a3a3a3d749fa
refs/heads/master
2020-07-24T12:10:13.632137
2020-03-13T12:53:55
2020-03-13T12:53:55
207,921,247
0
0
null
2019-09-11T23:01:07
2019-09-11T23:01:07
null
UTF-8
Java
false
false
4,422
java
package com.example.dynamodb.cotacoes; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.poi.ss.usermodel.*; import org.springframework.http.HttpMethod; import org.springframework.stereotype.Component; import org.springframework.util.StreamUtils; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.time.LocalDate; import java.util.*; @Component public class CotacaoMilho extends CotacaoAbastract implements Cotacao { // https://www.cepea.esalq.usp.br/br/consultas-ao-banco-de-dados-do-site.aspx?tabela_id=dolar&data_inicial=17%2F09%2F2019&periodicidade=1&data_final=17%2F09%2F2019 //{ // com link download lerXlsCepea //} @Override public CotacaoRegistro executar() { final String urlMilhoBovespa = "https://www.cepea.esalq.usp.br/br/indicador/series/milho.aspx?id=77"; final String urlMilhoCepea = "https://www.cepea.esalq.usp.br/br/indicador/series/milho.aspx?id=17"; restTemplate.execute(urlMilhoBovespa, HttpMethod.GET, null, clientHttpResponse -> { final InputStream arquivo = clientHttpResponse.getBody(); File ret = File.createTempFile("download", ".xsl"); StreamUtils.copy(arquivo, new FileOutputStream(ret)); try { lerXlsCepea(ret, "milhobovespa"); } catch (Exception e) { throw new RuntimeException(e); } final boolean delete = ret.delete(); System.out.println(delete); return arquivo; }); // final InputStream inputStream = baixarArquivoStream(urlMilhoBovespa); // lerXlsCepea(inputStream); // final InputStream inputStreamCepea = baixarArquivoStream(urlMilhoBovespa); // lerXlsCepea(inputStreamCepea); return null; } public Map<String, Object> lerXlsCepea(File arquivo, String tipo) throws Exception { Workbook wb = WorkbookFactory.create(arquivo); Sheet datatypeSheet = wb.getSheetAt(0); final Row ultima = datatypeSheet.getRow(datatypeSheet.getLastRowNum()); final Row penultima = datatypeSheet.getRow(datatypeSheet.getLastRowNum() - 1); final Map<String, Object> ultimaLinha = linha(ultima); final Map<String, Object> penultimaLinha = linha(penultima); final Double valorUltima = (Double)ultimaLinha.get("valorReal"); final Double valorPenultima = (Double)penultimaLinha.get("valorReal"); ultimaLinha.put("variacao", ((valorUltima - valorPenultima)/valorPenultima)*100.0); ultimaLinha.put("fonte", "CEPEA"); ultimaLinha.put("dateTime", new Date()); ultimaLinha.put("tipo", tipo); return ultimaLinha; } private Map<String, Object> linha(Row ultima) { String data = ultima.getCell(0).getStringCellValue(); Double valorReal = ultima.getCell(1).getNumericCellValue(); Double valorDolar = ultima.getCell(2).getNumericCellValue(); Map<String, Object> obj = new HashMap<>(); obj.put("data", data); obj.put("valorReal", valorReal); obj.put("valorDolar", valorDolar); return obj; } public CotacaoRegistro executar2() { final List<String> listaLinhas = baixarArquivo(UrlColetoresEnum.MILHO.getUrlTemplate(inicioFim())); ObjectMapper mapper = new ObjectMapper(); final String json = listaLinhas.stream().findFirst().orElse(""); try { if(!json.isEmpty()) { final JsonNode jsonNode = mapper.readTree(json); final JsonNode arquivo = jsonNode.path("arquivo"); if(arquivo != null) { final List<String> linhas = baixarArquivo(arquivo.asText()); if(linhas.size() >= 3){ CotacaoRegistro cotacaoRegistro = new CotacaoRegistro(); cotacaoRegistro.data = LocalDate.now(); cotacaoRegistro.valor = Double.valueOf(linhas.get(1).replace(",", ".")); return cotacaoRegistro; } } } } catch (IOException e) { e.printStackTrace(); return null; } return null; } }
[ "fernando.pimenta107@gmail.com" ]
fernando.pimenta107@gmail.com
4f8e9f89ff8a40ebfdc97fbc50feda62f90ebf59
d800d32081cf72de93cd350d8724a88685ff50e7
/src/com/aliasi/sentences/SentenceChunker.java
58a7bddf21d79bc87b067db0627c0c097d7d9ce0
[]
no_license
Spirit-Dongdong/NLP-learn
584615b4806ca71a41cda5b6ce11eb569f2e0137
96fec17c87d28442e6be32e014194a19c443abc5
refs/heads/master
2016-09-06T16:33:47.539877
2013-12-12T03:09:22
2013-12-12T03:09:22
13,031,595
1
1
null
null
null
null
UTF-8
Java
false
false
6,752
java
/* * LingPipe v. 3.9 * Copyright (C) 2003-2010 Alias-i * * This program is licensed under the Alias-i Royalty Free License * Version 1 WITHOUT ANY WARRANTY, without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Alias-i * Royalty Free License Version 1 for more details. * * You should have received a copy of the Alias-i Royalty Free License * Version 1 along with this program; if not, visit * http://alias-i.com/lingpipe/licenses/lingpipe-license-1.txt or contact * Alias-i, Inc. at 181 North 11th Street, Suite 401, Brooklyn, NY 11211, * +1 (718) 290-9170. */ package com.aliasi.sentences; import com.aliasi.chunk.Chunk; import com.aliasi.chunk.ChunkFactory; import com.aliasi.chunk.Chunker; import com.aliasi.chunk.Chunking; import com.aliasi.chunk.ChunkingImpl; import com.aliasi.tokenizer.Tokenization; import com.aliasi.tokenizer.Tokenizer; import com.aliasi.tokenizer.TokenizerFactory; import com.aliasi.util.AbstractExternalizable; import com.aliasi.util.Strings; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * The <code>SentenceChunker</code> class uses a * <code>SentenceModel</code> to implement sentence detection through * the <code>chunk.Chunker</code> interface. A sentence chunker is * constructed from a tokenizer factory and a sentence model. The * tokenizer factory creates tokens that it sends to the sentence * model. The types of the chunks produced are given by the constant * {@link #SENTENCE_CHUNK_TYPE}. * * <h3>Thread Safety</h3> * * A sentence chunker is thread safe if its tokenizer factory * and sentence model are thread safe. Typical LingPipe sentence * models and tokenizer factories are thread safe for reads. * * <h3>Serialization</h3> * * A sentence chunker is serializer if both its tokenizer * factory and sentence model are serializable. The deserialized * object will be an instance of {@code SentenceChunker} constructed * from the deserialized tokenizer factory and sentence model. * * @author Mitzi Morris * @author Bob Carpenter * @version 3.9 * @since LingPipe2.1 */ public class SentenceChunker implements Chunker, Serializable { static final long serialVersionUID = 2296001471469838378L; private final TokenizerFactory mTokenizerFactory; private final SentenceModel mSentenceModel; /** * Construct a sentence chunker from the specified tokenizer * factory and sentence model. * * @param tf Tokenizer factory for chunker. * @param sm Sentence model for chunker. */ public SentenceChunker(TokenizerFactory tf, SentenceModel sm) { mTokenizerFactory = tf; mSentenceModel = sm; } /** * Returns the tokenizer factory for this chunker. * * @return The tokenizer factory for this chunker. */ public TokenizerFactory tokenizerFactory() { return mTokenizerFactory; } /** * Returns the sentence model for this chunker. * * @return The sentence model for this chunker. */ public SentenceModel sentenceModel() { return mSentenceModel; } /** * Return the chunking derived from the underlying sentence model * over the tokenization of the specified character slice. * Iterating over the returned set is guaranteed to return the * sentence chunks in their original textual order. * * <P><i>Warning:</i> As described in the class documentation * above, a tokenizer factory that produces tokenizers that do not * reproduce the original sequence may cause the underlying * character slice for the chunks to differ from the slice * provided as an argument. * * @param cSeq Character sequence underlying the slice. * @return The sentence chunking of the specified character * sequence. */ public Chunking chunk(CharSequence cSeq) { char[] cs = Strings.toCharArray(cSeq); return chunk(cs,0,cs.length); } /** * Return the chunking derived from the underlying sentence model * over the tokenization of the specified character slice. See * {@link #chunk(CharSequence)} for more information. * * @param cs Underlying character sequence. * @param start Index of first character in slice. * @param end Index of one past the last character in the slice. * @return The sentence chunking of the specified character slice. */ public Chunking chunk(char[] cs, int start, int end) { Tokenization toks = new Tokenization(cs,start,end-start,mTokenizerFactory); String[] tokens = toks.tokens(); String[] whitespaces = toks.whitespaces(); ChunkingImpl chunking = new ChunkingImpl(cs,start,end); if (tokens.length == 0) return chunking; int[] sentenceBoundaries = mSentenceModel.boundaryIndices(tokens,whitespaces); if (sentenceBoundaries.length < 1) return chunking; int startToken = 0; for (int i = 0; i < sentenceBoundaries.length; ++i) { int endToken = sentenceBoundaries[i]; Chunk chunk = ChunkFactory.createChunk(toks.tokenStart(startToken), toks.tokenEnd(endToken), SENTENCE_CHUNK_TYPE); chunking.add(chunk); startToken = endToken+1; } return chunking; } Object writeReplace() { return new Serializer(this); } /** * The type assigned to sentence chunks, namely * <code>&quot;S&quot;</code>. */ public static final String SENTENCE_CHUNK_TYPE = "S"; static class Serializer extends AbstractExternalizable { static final long serialVersionUID = -8566130480755448404L; final SentenceChunker mChunker; public Serializer() { this(null); } public Serializer(SentenceChunker chunker) { mChunker = chunker; } public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(mChunker.mTokenizerFactory); out.writeObject(mChunker.mSentenceModel); } public Object read(ObjectInput in) throws IOException, ClassNotFoundException { @SuppressWarnings("unchecked") TokenizerFactory tokenizerFactory = (TokenizerFactory) in.readObject(); @SuppressWarnings("unchecked") SentenceModel sentenceModel = (SentenceModel) in.readObject(); return new SentenceChunker(tokenizerFactory, sentenceModel); } } }
[ "spirit.dongdong@gmail.com" ]
spirit.dongdong@gmail.com
4771dd1b90f0b738af7ae359317ed85161670f38
838576cc2e44f590d4c59f8a4d120f629969eedf
/src/com/sino/ams/newasset/dao/AmsAssetsChangeZJQueryDAO.java
cc760ded26de26d4179b2a58a9592f502790305b
[]
no_license
fancq/CQEAM
ecbfec8290fc4c213101b88365f7edd4b668fdc8
5dbb23cde5f062d96007f615ddae8fd474cb37d8
refs/heads/master
2021-01-16T20:33:40.983759
2013-09-03T16:00:57
2013-09-03T16:00:57
null
0
0
null
null
null
null
GB18030
Java
false
false
3,627
java
package com.sino.ams.newasset.dao; import java.io.File; import java.sql.Connection; import java.util.HashMap; import java.util.Map; import com.sino.ams.appbase.dao.AMSBaseDAO; import com.sino.ams.newasset.dto.AmsAssetsCJYCDTO; import com.sino.ams.newasset.model.AmsAssetsChangeZJQueryModel; import com.sino.ams.system.user.dto.SfUserDTO; import com.sino.base.constant.WorldConstant; import com.sino.base.db.datatrans.CustomTransData; import com.sino.base.db.datatrans.DataRange; import com.sino.base.db.datatrans.DataTransfer; import com.sino.base.db.datatrans.TransRule; import com.sino.base.db.datatrans.TransferFactory; import com.sino.base.db.sql.model.SQLModel; import com.sino.base.dto.DTO; import com.sino.base.exception.DataTransException; import com.sino.base.exception.SQLModelException; import com.sino.framework.dto.BaseUserDTO; /** * Created by IntelliJ IDEA. * User: srf * Date: 2008-4-9 * Time: 17:18:14 * To change this template use File | Settings | File Templates. */ public class AmsAssetsChangeZJQueryDAO extends AMSBaseDAO { private SfUserDTO sfUser = null; private AmsAssetsCJYCDTO dto = null; public AmsAssetsChangeZJQueryDAO(SfUserDTO userAccount, AmsAssetsCJYCDTO dtoParameter, Connection conn) { super(userAccount, dtoParameter, conn); this.sfUser = userAccount; this.dto = (AmsAssetsCJYCDTO) super.dtoParameter; } protected void initSQLProducer(BaseUserDTO userAccount, DTO dtoParameter) { AmsAssetsCJYCDTO dtoPara = (AmsAssetsCJYCDTO) dtoParameter; super.sqlProducer = new AmsAssetsChangeZJQueryModel((SfUserDTO) userAccount, dtoPara); } public File exportFile() throws DataTransException { File file = null; try { SQLModel sqlModel = sqlProducer.getPageQueryModel(); TransRule rule = new TransRule(); rule.setDataSource(sqlModel); rule.setSourceConn(conn); String fileName = "资产折旧年限统计报表.xls"; String filePath = WorldConstant.USER_HOME; filePath += WorldConstant.FILE_SEPARATOR; filePath += fileName; rule.setTarFile(filePath); DataRange range = new DataRange(); rule.setDataRange(range); Map fieldMap = new HashMap(); fieldMap.put("ORGNIZATION_NAME", "公司名称"); fieldMap.put("ASSET_NUMBER", "资产编号"); fieldMap.put("FA_CATEGORY1", "资产分类"); fieldMap.put("ASSETS_DESCRIPTION", "资产名称"); fieldMap.put("MODEL_NUMBER", "资产型号"); fieldMap.put("NEW_YEARS", "新折旧年限"); fieldMap.put("CHANGE_AMOUNT", "新折旧金额"); fieldMap.put("DATE_PLACED_IN_SERVICE", "资产启用日期"); rule.setFieldMap(fieldMap); CustomTransData custData = new CustomTransData(); custData.setReportTitle(fileName); custData.setReportPerson(sfUser.getUsername()); custData.setNeedReportDate(true); rule.setCustData(custData); /*rule.setSheetSize(1000);*/ //设置分页显示 TransferFactory factory = new TransferFactory(); DataTransfer transfer = factory.getTransfer(rule); transfer.transData(); file = (File) transfer.getTransResult(); } catch (SQLModelException ex) { ex.printLog(); throw new DataTransException(ex); } return file; } }
[ "lq_xm@163.com" ]
lq_xm@163.com
636431dbc9c20051b11a2ef8b6d985637d2436cf
711e906f2b6490ef1e4f1f58ca840fd14b857ce2
/com/google/android/systemui/columbus/IColumbusServiceGestureListener.java
b0146a9c35c0b5d7102d70d8846431364b096630
[]
no_license
dovanduy/SystemUIGoogle
51a29b812000d1857145f429f983e93c02bff14c
cd41959ee1bd39a22d0d4e95dc40cefb72a75ec8
refs/heads/master
2022-07-09T01:48:40.088858
2020-05-16T16:01:21
2020-05-16T16:01:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,282
java
// // Decompiled by Procyon v0.5.36 // package com.google.android.systemui.columbus; import android.os.Parcel; import android.os.IBinder; import android.os.Binder; import android.os.RemoteException; import android.os.IInterface; public interface IColumbusServiceGestureListener extends IInterface { void onGestureProgress(final int p0) throws RemoteException; public abstract static class Stub extends Binder implements IColumbusServiceGestureListener { public static IColumbusServiceGestureListener asInterface(final IBinder binder) { if (binder == null) { return null; } final IInterface queryLocalInterface = binder.queryLocalInterface("com.google.android.systemui.columbus.IColumbusServiceGestureListener"); if (queryLocalInterface != null && queryLocalInterface instanceof IColumbusServiceGestureListener) { return (IColumbusServiceGestureListener)queryLocalInterface; } return new Proxy(binder); } public static IColumbusServiceGestureListener getDefaultImpl() { return Proxy.sDefaultImpl; } private static class Proxy implements IColumbusServiceGestureListener { public static IColumbusServiceGestureListener sDefaultImpl; private IBinder mRemote; Proxy(final IBinder mRemote) { this.mRemote = mRemote; } public IBinder asBinder() { return this.mRemote; } @Override public void onGestureProgress(final int n) throws RemoteException { final Parcel obtain = Parcel.obtain(); try { obtain.writeInterfaceToken("com.google.android.systemui.columbus.IColumbusServiceGestureListener"); obtain.writeInt(n); if (!this.mRemote.transact(1, obtain, (Parcel)null, 1) && Stub.getDefaultImpl() != null) { Stub.getDefaultImpl().onGestureProgress(n); } } finally { obtain.recycle(); } } } } }
[ "ethan.halsall@gmail.com" ]
ethan.halsall@gmail.com
fa26713a1c6a7c689748dfd0104e37bfd2bb91ef
f56b9013728ca5c35c932ebbdd35225ae20a6200
/support/cas-server-support-hazelcast-ticket-registry/src/test/java/org/apereo/cas/ticket/registry/HazelcastTicketRegistryReplicationTests.java
602c09a11b59a9312bcc98e354f690f2e7922eaf
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
seasnail/cas
2eb667c544680b84a8210ef5fe9bd2ed86ce4566
eebddc116173008390815a8509e6a4bdf8ec706d
refs/heads/master
2021-10-13T06:52:54.926486
2017-02-16T21:58:54
2017-02-16T21:58:54
82,248,906
0
1
Apache-2.0
2021-09-28T07:23:40
2017-02-17T02:35:26
Java
UTF-8
Java
false
false
7,445
java
package org.apereo.cas.ticket.registry; import org.apereo.cas.authentication.Authentication; import org.apereo.cas.authentication.CoreAuthenticationTestUtils; import org.apereo.cas.authentication.principal.Service; import org.apereo.cas.mock.MockServiceTicket; import org.apereo.cas.mock.MockTicketGrantingTicket; import org.apereo.cas.services.RegisteredServiceTestUtils; import org.apereo.cas.ticket.ServiceTicket; import org.apereo.cas.ticket.Ticket; import org.apereo.cas.ticket.TicketGrantingTicket; import org.apereo.cas.ticket.proxy.ProxyGrantingTicket; import org.apereo.cas.ticket.TicketGrantingTicketImpl; import org.apereo.cas.ticket.support.NeverExpiresExpirationPolicy; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cloud.autoconfigure.RefreshAutoConfiguration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringRunner; import java.util.Collection; import static org.junit.Assert.*; /** * Unit tests for {@link HazelcastTicketRegistry}. * * @author Dmitriy Kopylenko * @since 4.1.0 */ @RunWith(SpringRunner.class) @ContextConfiguration(locations = {"classpath:HazelcastTicketRegistryTests-context.xml"}) @SpringBootTest(classes = {RefreshAutoConfiguration.class}) public class HazelcastTicketRegistryReplicationTests { @Autowired @Qualifier("hzTicketRegistry1") private TicketRegistry hzTicketRegistry1; @Autowired @Qualifier("hzTicketRegistry2") private TicketRegistry hzTicketRegistry2; public void setHzTicketRegistry1(final HazelcastTicketRegistry hzTicketRegistry1) { this.hzTicketRegistry1 = hzTicketRegistry1; } public void setHzTicketRegistry2(final HazelcastTicketRegistry hzTicketRegistry2) { this.hzTicketRegistry2 = hzTicketRegistry2; } @Test public void retrieveCollectionOfTickets() { Collection<Ticket> col = this.hzTicketRegistry1.getTickets(); for (final Ticket ticket : col) { this.hzTicketRegistry1.deleteTicket(ticket.getId()); } col = hzTicketRegistry2.getTickets(); assertEquals(0, col.size()); final TicketGrantingTicket tgt = newTestTgt(); this.hzTicketRegistry1.addTicket(tgt); this.hzTicketRegistry1.addTicket(newTestSt(tgt)); col = hzTicketRegistry2.getTickets(); assertEquals(2, col.size()); assertEquals(1, hzTicketRegistry2.serviceTicketCount()); assertEquals(1, hzTicketRegistry2.sessionCount()); } @Test public void basicOperationsAndClustering() throws Exception { final TicketGrantingTicket tgt = newTestTgt(); this.hzTicketRegistry1.addTicket(tgt); assertNotNull(this.hzTicketRegistry1.getTicket(tgt.getId())); assertNotNull(this.hzTicketRegistry2.getTicket(tgt.getId())); assertEquals(1, this.hzTicketRegistry2.deleteTicket(tgt.getId())); assertEquals(0, this.hzTicketRegistry1.deleteTicket(tgt.getId())); assertNull(this.hzTicketRegistry1.getTicket(tgt.getId())); assertNull(this.hzTicketRegistry2.getTicket(tgt.getId())); final ServiceTicket st = newTestSt(tgt); this.hzTicketRegistry2.addTicket(st); assertNotNull(this.hzTicketRegistry1.getTicket("ST-TEST")); assertNotNull(this.hzTicketRegistry2.getTicket("ST-TEST")); assertEquals(1, this.hzTicketRegistry1.deleteTicket("ST-TEST")); assertNull(this.hzTicketRegistry1.getTicket("ST-TEST")); assertNull(this.hzTicketRegistry2.getTicket("ST-TEST")); } @Test public void verifyDeleteTicketWithChildren() throws Exception { this.hzTicketRegistry1.addTicket(new TicketGrantingTicketImpl( "TGT", CoreAuthenticationTestUtils.getAuthentication(), new NeverExpiresExpirationPolicy())); final TicketGrantingTicket tgt = this.hzTicketRegistry1.getTicket( "TGT", TicketGrantingTicket.class); final Service service = RegisteredServiceTestUtils.getService("TGT_DELETE_TEST"); final ServiceTicket st1 = tgt.grantServiceTicket( "ST1", service, new NeverExpiresExpirationPolicy(), false, false); final ServiceTicket st2 = tgt.grantServiceTicket( "ST2", service, new NeverExpiresExpirationPolicy(), false, false); final ServiceTicket st3 = tgt.grantServiceTicket( "ST3", service, new NeverExpiresExpirationPolicy(), false, false); this.hzTicketRegistry1.addTicket(st1); this.hzTicketRegistry1.addTicket(st2); this.hzTicketRegistry1.addTicket(st3); this.hzTicketRegistry1.updateTicket(tgt); assertNotNull(this.hzTicketRegistry1.getTicket(tgt.getId(), TicketGrantingTicket.class)); assertNotNull(this.hzTicketRegistry1.getTicket("ST1", ServiceTicket.class)); assertNotNull(this.hzTicketRegistry1.getTicket("ST2", ServiceTicket.class)); assertNotNull(this.hzTicketRegistry1.getTicket("ST3", ServiceTicket.class)); assertTrue("TGT and children were deleted", this.hzTicketRegistry1.deleteTicket(tgt.getId()) > 0); assertNull(this.hzTicketRegistry1.getTicket(tgt.getId(), TicketGrantingTicket.class)); assertNull(this.hzTicketRegistry1.getTicket("ST1", ServiceTicket.class)); assertNull(this.hzTicketRegistry1.getTicket("ST2", ServiceTicket.class)); assertNull(this.hzTicketRegistry1.getTicket("ST3", ServiceTicket.class)); } @Test public void verifyDeleteTicketWithPGT() { final Authentication a = CoreAuthenticationTestUtils.getAuthentication(); this.hzTicketRegistry1.addTicket(new TicketGrantingTicketImpl( "TGT", a, new NeverExpiresExpirationPolicy())); final TicketGrantingTicket tgt = this.hzTicketRegistry1.getTicket( "TGT", TicketGrantingTicket.class); final Service service = RegisteredServiceTestUtils.getService("TGT_DELETE_TEST"); final ServiceTicket st1 = tgt.grantServiceTicket( "ST1", service, new NeverExpiresExpirationPolicy(), false, true); this.hzTicketRegistry1.addTicket(st1); assertNotNull(this.hzTicketRegistry1.getTicket("TGT", TicketGrantingTicket.class)); assertNotNull(this.hzTicketRegistry1.getTicket("ST1", ServiceTicket.class)); final ProxyGrantingTicket pgt = st1.grantProxyGrantingTicket("PGT-1", a, new NeverExpiresExpirationPolicy()); assertEquals(a, pgt.getAuthentication()); this.hzTicketRegistry1.addTicket(pgt); this.hzTicketRegistry1.updateTicket(tgt); assertSame(3, this.hzTicketRegistry1.deleteTicket(tgt.getId())); assertNull(this.hzTicketRegistry1.getTicket("TGT", TicketGrantingTicket.class)); assertNull(this.hzTicketRegistry1.getTicket("ST1", ServiceTicket.class)); assertNull(this.hzTicketRegistry1.getTicket("PGT-1", ProxyGrantingTicket.class)); } private static TicketGrantingTicket newTestTgt() { return new MockTicketGrantingTicket("casuser"); } private static ServiceTicket newTestSt(final TicketGrantingTicket tgt) { return new MockServiceTicket("ST-TEST", RegisteredServiceTestUtils.getService(), tgt); } }
[ "mmoayyed@unicon.net" ]
mmoayyed@unicon.net
3ac5e310b4f0bd81493341c009d00ffe5c29ce7f
811646b3f2db5fe0535b0bccf1634ef55ba13b29
/src/mediabrowser/model/entities/ChapterInfo.java
7317d62dc1077a421a101c7d84d45d194eae7a9b
[ "MIT" ]
permissive
LeonardoBroDobro/MediaBrowser.ApiClient.Java
a986b97bfdea9238bbab02d3212c9d5ed6759aa1
c087b38cd46d8baba951dc05af650204160615f1
refs/heads/master
2021-01-21T08:06:22.287194
2015-05-02T00:41:11
2015-05-02T00:41:11
34,959,736
2
1
null
2015-05-02T19:00:22
2015-05-02T19:00:22
null
UTF-8
Java
false
false
834
java
package mediabrowser.model.entities; /** Class ChapterInfo */ public class ChapterInfo { /** Gets or sets the start position ticks. <value>The start position ticks.</value> */ private long StartPositionTicks; public final long getStartPositionTicks() { return StartPositionTicks; } public final void setStartPositionTicks(long value) { StartPositionTicks = value; } /** Gets or sets the name. <value>The name.</value> */ private String Name; public final String getName() { return Name; } public final void setName(String value) { Name = value; } /** Gets or sets the image path. <value>The image path.</value> */ private String ImagePath; public final String getImagePath() { return ImagePath; } public final void setImagePath(String value) { ImagePath = value; } }
[ "luke.pulverenti@gmail.com" ]
luke.pulverenti@gmail.com
a6ed39f5625e9ac8c064f99509296d9f858530a5
74450d2e5c5d737ab8eb3f3f2e8b7d2e8b40bb5e
/github_java_sort/2/89.java
09c7e11dc0afae380d8cff95754ad1804abf652d
[]
no_license
ulinka/tbcnn-attention
10466b0925987263f722fbc53de4868812c50da7
55990524ce3724d5bfbcbc7fd2757abd3a3fd2de
refs/heads/master
2020-08-28T13:59:25.013068
2019-05-10T08:05:37
2019-05-10T08:05:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,226
java
package algorithm.sort.stable; public class Merge_MergeSort { public static void sort(Comparable[] data){ long start = System.nanoTime(); int len = data.length-1; mergeSort(data,0,len); long end = System.nanoTime(); System.out.println("\nMergeSort Execute time:"+(end-start)); } private static void mergeSort(Comparable[] data, int begin, int end) { if(begin<end){ int mid = (begin+end)/2; mergeSort(data, begin, mid); mergeSort(data, mid+1, end); merge(data,begin,mid,end); } } private static void merge(Comparable[] data, int begin, int mid, int end) { int leftIndex = begin; int rightIndex = mid+1; Comparable[] tmp = new Comparable[end-begin+1]; int tmpIndex = 0; while (leftIndex<=mid && rightIndex<=end) { if(data[leftIndex].compareTo(data[rightIndex])>0) { tmp[tmpIndex] = data[rightIndex]; rightIndex++; }else{ tmp[tmpIndex] = data[leftIndex]; leftIndex++; } tmpIndex++; } while(leftIndex<=mid){ tmp[tmpIndex]=data[leftIndex]; tmpIndex++; leftIndex++; } while(rightIndex<=end){ tmp[tmpIndex]=data[rightIndex]; tmpIndex++; rightIndex++; } for(int i=0;i<tmpIndex;i++) { data[begin+i] = tmp[i]; } } }
[ "bdqnghi@gmail.com" ]
bdqnghi@gmail.com
4ab7a9fa27d84a9a64af5a0a8ee57ccb322cc6ba
6b388774f9bdb6908ecc3449ad78d5b9ebd5e5e0
/sandbox-providers/softlayer/src/main/java/org/jclouds/softlayer/compute/config/SoftLayerComputeServiceContextModule.java
575f21a67df74c75c08afd1b2ddc4aeddbff4b18
[ "Apache-2.0" ]
permissive
regularfry/jclouds
39c38b42eb8d90584daf35e568d88088ea374886
d1ea2827d12ee5ac401a1eab697408d944c0daf2
refs/heads/master
2023-06-13T01:58:11.217828
2011-09-19T15:03:40
2011-09-19T15:03:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,085
java
/** * Licensed to jclouds, Inc. (jclouds) under one or more * contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. jclouds licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.jclouds.softlayer.compute.config; import java.util.Set; import org.jclouds.compute.ComputeServiceAdapter; import org.jclouds.compute.config.ComputeServiceAdapterContextModule; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.domain.Location; import org.jclouds.location.suppliers.OnlyLocationOrFirstZone; import org.jclouds.softlayer.SoftLayerAsyncClient; import org.jclouds.softlayer.SoftLayerClient; import org.jclouds.softlayer.compute.functions.DatacenterToLocation; import org.jclouds.softlayer.compute.functions.ProductItemPriceToImage; import org.jclouds.softlayer.compute.functions.ProductItemPricesToHardware; import org.jclouds.softlayer.compute.functions.VirtualGuestToNodeMetadata; import org.jclouds.softlayer.compute.strategy.SoftLayerComputeServiceAdapter; import org.jclouds.softlayer.domain.Datacenter; import org.jclouds.softlayer.domain.ProductItemPrice; import org.jclouds.softlayer.domain.VirtualGuest; import com.google.common.base.Function; import com.google.common.base.Supplier; import com.google.inject.TypeLiteral; /** * * @author Adrian Cole */ public class SoftLayerComputeServiceContextModule extends ComputeServiceAdapterContextModule<SoftLayerClient, SoftLayerAsyncClient, VirtualGuest, Set<ProductItemPrice>, ProductItemPrice, Datacenter> { public SoftLayerComputeServiceContextModule() { super(SoftLayerClient.class, SoftLayerAsyncClient.class); } @Override protected void configure() { super.configure(); bind(new TypeLiteral<ComputeServiceAdapter<VirtualGuest, Set<ProductItemPrice>, ProductItemPrice, Datacenter>>() { }).to(SoftLayerComputeServiceAdapter.class); bind(new TypeLiteral<Function<VirtualGuest, NodeMetadata>>() { }).to(VirtualGuestToNodeMetadata.class); bind(new TypeLiteral<Function<ProductItemPrice, org.jclouds.compute.domain.Image>>() { }).to(ProductItemPriceToImage.class); bind(new TypeLiteral<Function<Set<ProductItemPrice>, org.jclouds.compute.domain.Hardware>>() { }).to(ProductItemPricesToHardware.class); bind(new TypeLiteral<Function<Datacenter, Location>>() { }).to(DatacenterToLocation.class); bind(new TypeLiteral<Supplier<Location>>() { }).to(OnlyLocationOrFirstZone.class); } }
[ "adrian@jclouds.org" ]
adrian@jclouds.org
1946a41f5b957a82818bbae480920f0b2403ff51
9f4b4438d4329db792de6d370d876001e85e095f
/src/test/event/DoorMain.java
424f598023d7a51bff0e749582aeb75429031137
[]
no_license
squirrelhuan/FxProject01
9c59e8e8408b67d72dd7e7a4a62c3b413083cb08
30c2676e0686ff441561f41218b237f140ff0d50
refs/heads/master
2021-05-06T19:46:34.528653
2021-01-18T02:09:47
2021-01-18T02:09:47
112,151,804
0
0
null
null
null
null
UTF-8
Java
false
false
478
java
package test.event; public class DoorMain { public static void main(String[] args) { DoorManager manager = new DoorManager(); manager.addDoorListener(new DoorListener1());// 给门1增加监听器 // manager.addDoorListener(new DoorListener2());// 给门2增加监听器 // 开门 manager.fireWorkspaceOpened(); System.out.println("我已经进来了"); // 关门 manager.fireWorkspaceClosed(); } }
[ "you@example.com" ]
you@example.com
129ab5e2a653f319823eef8ed42dcf3551a476dc
750bb6c6fa115fde1bfe646bb3359f886373d24e
/src/test/java/wat/WAT137.java
0d905452f85add57e83522bc8adede0a8a01a2d7
[]
no_license
Basha692/BashaSelenium
d21e2c7abd5f9a5d7c3be43578863186f2f7322f
37fb79f85e6c973610b14b53d3e14b6183219a41
refs/heads/master
2022-07-13T11:05:59.156297
2019-12-06T06:08:37
2019-12-06T06:08:37
226,252,795
0
0
null
2022-06-29T17:49:37
2019-12-06T05:30:40
Java
UTF-8
Java
false
false
5,106
java
package wat; import org.testng.SkipException; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import com.relevantcodes.extentreports.LogStatus; import base.TestBase; import util.ExtentManager; import util.OnePObjectMap; /** * Class for Verify that If user hits cancel, feedback is not submitted and the * system must display the author record in curation mode. * * @author UC225218 * */ public class WAT137 extends TestBase { static int status = 1; /** * Method to displaying JIRA ID's for test case in specified path of Extent * Reports * * @throws Exception, * When Something unexpected */ @BeforeTest public void beforeTest() throws Exception { extent = ExtentManager.getReporter(filePath); rowData = testcase.get(this.getClass().getSimpleName()); test = extent.startTest(rowData.getTestcaseId(), rowData.getTestcaseDescription()).assignCategory("WAT"); } /** * Method for login into WAT application using TR ID * * @throws Exception, * When WAT Login is not done */ @Test @Parameters({ "username", "password" }) public void testLoginWATApp(String username, String password) throws Exception { boolean testRunmode = getTestRunMode(rowData.getTestcaseRunmode()); boolean master_condition = suiteRunmode && testRunmode; logger.info("checking master condition status-->" + this.getClass().getSimpleName() + "-->" + master_condition); if (!master_condition) { status = 3; test.log(LogStatus.SKIP, "Skipping test case " + this.getClass().getSimpleName() + " as the run mode is set to NO"); throw new SkipException("Skipping Test Case" + this.getClass().getSimpleName() + " as runmode set to NO");// reports } test.log(LogStatus.INFO, this.getClass().getSimpleName() + " execution starts "); try { openBrowser(); clearCookies(); maximizeWindow(); test.log(LogStatus.INFO, "Logging into WAT Applicaton using valid WAT Entitled user "); ob.navigate().to(host + CONFIG.getProperty("appendWATAppUrl")); pf.getLoginTRInstance(ob).loginToWAT(username, password, test); pf.getSearchAuthClusterPage(ob).validateAuthorSearchPage(test); } catch (Throwable t) { logFailureDetails(test, t, "Login Fail", "login_fail"); pf.getBrowserActionInstance(ob).closeBrowser(); } } /** * Method for Search Author cluster Results * * @param lastName,countryName,orgName * @throws Exception, * When Something unexpected */ @Test(dependsOnMethods = { "testLoginWATApp" }) @Parameters({ "LastName", "CountryName1", "CountryName2", "OrgName1", "OrgName2" }) public void searchAuthorCluster(String LastName, String CountryName1, String CountryName2, String OrgName1, String OrgName2) throws Exception { try { test.log(LogStatus.INFO, "Entering author name... "); pf.getSearchAuthClusterPage(ob).searchAuthorClusterOnlyLastName(LastName, CountryName1, CountryName2, OrgName1, OrgName2, test); test.log(LogStatus.INFO, "Author Search Results are displayed"); } catch (Throwable t) { logFailureDetails(test, t, "Author Search Results are not displayed", "Search_Fail"); pf.getBrowserActionInstance(ob).closeBrowser(); } } /** * Method to Verify that If user hits cancel, feedback is not submitted and * the system must display the author record in curation mode. * * @throws Exception, * When Something unexpected */ @Test(dependsOnMethods = { "searchAuthorCluster" }) public void testCancelCuration() throws Exception { try { test.log(LogStatus.INFO, "Clicking first author card"); pf.getBrowserActionInstance(ob).getElement(OnePObjectMap.WAT_AUTHOR_SEARCH_RESULT_FIRST_CARD_XPATH).click(); pf.getBrowserWaitsInstance(ob) .waitUntilElementIsDisplayed(OnePObjectMap.WAT_AUTHOR_RECORD_DEFAULT_AVATAR_CSS); test.log(LogStatus.INFO, "Getting into curation mode by clicking Accept Recommendation button"); pf.getAuthorRecordPage(ob).getintoCuration(test, "AcceptRecommendation"); pf.getAuthorRecordPage(ob).testRecommendPublicationCancelFunctionality(test); pf.getBrowserActionInstance(ob).closeBrowser(); } catch (Throwable t) { logFailureDetails(test, t, "Rejected publication are not reverted back when curation is cancelled", "Curation_issue"); pf.getBrowserActionInstance(ob).closeBrowser(); } } /** * updating Extent Report with test case status whether it is PASS or FAIL * or SKIP */ @AfterTest public void reportTestResult() { extent.endTest(test); /* * if (status == 1) TestUtil.reportDataSetResult(profilexls, * "Test Cases", TestUtil.getRowNum(profilexls, * this.getClass().getSimpleName()), "PASS"); else if (status == 2) * TestUtil.reportDataSetResult(profilexls, "Test Cases", * TestUtil.getRowNum(profilexls, this.getClass().getSimpleName()), * "FAIL"); else TestUtil.reportDataSetResult(profilexls, "Test Cases", * TestUtil.getRowNum(profilexls, this.getClass().getSimpleName()), * "SKIP"); */ } }
[ "syed2208b@gmail.com" ]
syed2208b@gmail.com
8e1d4ba2ec43675fab331700d5562db92b7a21d6
e96172bcad99d9fddaa00c25d00a319716c9ca3a
/plugin/src/main/java/com/intellij/java/impl/util/descriptors/ConfigFileFactory.java
64c02b426b85516919860491a95a75ad584d5658
[ "Apache-2.0" ]
permissive
consulo/consulo-java
8c1633d485833651e2a9ecda43e27c3cbfa70a8a
a96757bc015eff692571285c0a10a140c8c721f8
refs/heads/master
2023-09-03T12:33:23.746878
2023-08-29T07:26:25
2023-08-29T07:26:25
13,799,330
5
4
Apache-2.0
2023-01-03T08:32:23
2013-10-23T09:56:39
Java
UTF-8
Java
false
false
1,889
java
/* * Copyright 2000-2009 JetBrains s.r.o. * * 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.intellij.java.impl.util.descriptors; import consulo.annotation.component.ComponentScope; import consulo.annotation.component.ServiceAPI; import consulo.ide.ServiceManager; import consulo.project.Project; import consulo.virtualFileSystem.VirtualFile; import javax.annotation.Nullable; /** * @author nik */ @ServiceAPI(ComponentScope.APPLICATION) public abstract class ConfigFileFactory { public static ConfigFileFactory getInstance() { return ServiceManager.getService(ConfigFileFactory.class); } public abstract ConfigFileMetaDataProvider createMetaDataProvider(ConfigFileMetaData... metaDatas); public abstract ConfigFileInfoSet createConfigFileInfoSet(ConfigFileMetaDataProvider metaDataProvider); public abstract ConfigFileContainer createConfigFileContainer(Project project, ConfigFileMetaDataProvider metaDataProvider, ConfigFileInfoSet configuration); public abstract ConfigFileMetaDataRegistry createMetaDataRegistry(); @Nullable public abstract VirtualFile createFile(@Nullable Project project, String url, ConfigFileVersion version, final boolean forceNew); public abstract ConfigFileContainer createSingleFileContainer(Project project, ConfigFileMetaData metaData); }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
6f603ff67f39f5db8f7541193a3492cbf404bdd3
d2984ba2b5ff607687aac9c65ccefa1bd6e41ede
/src/net/datenwerke/scheduler/service/scheduler/events/SchedulerShutdownWatchdogEvent.java
05f0b2b387c0ba4cce4042bee0eae73ae826ce52
[]
no_license
bireports/ReportServer
da979eaf472b3e199e6fbd52b3031f0e819bff14
0f9b9dca75136c2bfc20aa611ebbc7dc24cfde62
refs/heads/master
2020-04-18T10:18:56.181123
2019-01-25T00:45:14
2019-01-25T00:45:14
167,463,795
0
0
null
null
null
null
UTF-8
Java
false
false
1,224
java
/* * ReportServer * Copyright (c) 2018 InfoFabrik GmbH * http://reportserver.net/ * * * This file is part of ReportServer. * * ReportServer is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package net.datenwerke.scheduler.service.scheduler.events; import net.datenwerke.security.service.eventlogger.DwLoggedEvent; public class SchedulerShutdownWatchdogEvent extends DwLoggedEvent { public SchedulerShutdownWatchdogEvent(Object... properties){ super(properties); } @Override public String getLoggedAction() { return "SCHEDULER_SHUTDOWN_WATCHDOG"; } }
[ "srbala@gmail.com" ]
srbala@gmail.com
95b0d73f9a6442c5110b2e17b40829b19d9587b0
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava1/Foo374Test.java
2a1f4c0f7312e7260032b9b8ee7919726ba0f242
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
481
java
package applicationModulepackageJava1; import org.junit.Test; public class Foo374Test { @Test public void testFoo0() { new Foo374().foo0(); } @Test public void testFoo1() { new Foo374().foo1(); } @Test public void testFoo2() { new Foo374().foo2(); } @Test public void testFoo3() { new Foo374().foo3(); } @Test public void testFoo4() { new Foo374().foo4(); } @Test public void testFoo5() { new Foo374().foo5(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
36b5c1d5db8f390109ec843d76022ad52c4a235c
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module1245/src/main/java/module1245packageJava0/Foo67.java
e842f97a286b15103dedf05922d0ef6a92c65d27
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
351
java
package module1245packageJava0; import java.lang.Integer; public class Foo67 { Integer int0; Integer int1; public void foo0() { new module1245packageJava0.Foo66().foo4(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
61ba29451552f18f2fdd9e4a3faa707b7ee7df98
11c721abff1c38dbfcdc050dc11e9e62d7ed3662
/surefire-integration-tests/src/test/resources/surefire-946-killMainProcessInReusableFork/src/test/java/junit44/environment/Basic05Test.java
92f5f158e6b653a14fc4d88544729eb470170b61
[ "Apache-2.0" ]
permissive
DaGeRe/maven-surefire
4106549e59d8bd154ce0872726cc73a7585e8edb
45de58b12413df54d3dc7cd313f117930964504e
refs/heads/master
2022-03-09T15:41:34.644027
2017-10-11T15:29:09
2017-10-11T22:46:54
106,571,653
1
2
null
2017-10-11T15:20:17
2017-10-11T15:20:17
null
UTF-8
Java
false
false
1,222
java
package junit44.environment; /* * 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. */ import org.junit.AfterClass; import org.junit.Test; public class Basic05Test { @Test public void testNothing() { } @AfterClass public static void waitSomeTimeAround() { try { Thread.sleep( Integer.getInteger( "testSleepTime", 2000 ) ); } catch ( InterruptedException ignored ) { } } }
[ "krosenvold@apache.org" ]
krosenvold@apache.org
7bcce08bcde32be66a781fc11094128d7e00747a
8f322f02a54dd5e012f901874a4e34c5a70f5775
/src/main/java/PTUCharacterCreator/Abilities/Magician.java
31a39c379bd317f3b351ef338009834a2c21bf24
[]
no_license
BMorgan460/PTUCharacterCreator
3514a4040eb264dec69aee90d95614cb83cb53d8
e55f159587f2cb8d6d7b456e706f910ba5707b14
refs/heads/main
2023-05-05T08:26:04.277356
2021-05-13T22:11:25
2021-05-13T22:11:25
348,419,608
0
0
null
null
null
null
UTF-8
Java
false
false
402
java
package PTUCharacterCreator.Abilities; import PTUCharacterCreator.Ability; public class Magician extends Ability { { name = "Magician"; freq = "Scene - Free Action"; effect = "Trigger: The user hits a foe with a damaging Single-Target attack\nEffect: The user takes the target's Held Item. This Ability may not be triggered if the user is already holding a Held Item."; } public Magician(){} }
[ "alaskablake460@gmail.com" ]
alaskablake460@gmail.com
07f6ee093b7d6b36f8c72a39a44adc0fdc673e5c
3634eded90370ff24ee8f47ccfa19e388d3784ad
/src/main/java/com/douban/book/reader/manager/StoreManager.java
21dc9a34c0072f9074bab728586782d9da469477
[]
no_license
xiaofans/ResStudyPro
8bc3c929ef7199c269c6250b390d80739aaf50b9
ac3204b27a65e006ebeb5b522762848ea82d960b
refs/heads/master
2021-01-25T05:09:52.461974
2017-06-06T12:12:41
2017-06-06T12:12:41
93,514,258
0
0
null
null
null
null
UTF-8
Java
false
false
863
java
package com.douban.book.reader.manager; import com.douban.book.reader.entity.store.StoreTabEntity; import com.douban.book.reader.manager.exception.DataLoadException; import com.douban.book.reader.network.param.RequestParam; import org.androidannotations.annotations.EBean; import org.androidannotations.annotations.EBean.Scope; @EBean(scope = Scope.Singleton) public class StoreManager extends BaseManager<StoreTabEntity> { public StoreManager() { super("store/index", StoreTabEntity.class); maxStaleness(28800000); } public StoreTabEntity getTab(String tabName) throws DataLoadException { return (StoreTabEntity) get((Object) tabName); } public StoreTabEntity getFromRemote(Object tabName) throws DataLoadException { return (StoreTabEntity) get(RequestParam.queryString().append("name", tabName)); } }
[ "zhaoyu@neoteched.com" ]
zhaoyu@neoteched.com
75a816cfccfde641cff6e5a4406c02b3d49dff5f
253dcf00c8f9302335688016dce86c91c4e21109
/owner/src/test/java/org/aeonbits/owner/multithread/MultiThreadTestBase.java
8118dab5752b61d6c8e406d82b402cb39930b47b
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
cybernetics/owner
74aa7f31a18191a059b019c706cd36ac1e8a0b3e
89bb9ff2640e1468e49150945d81c4412430869d
refs/heads/master
2020-12-26T03:43:39.819448
2013-12-09T21:26:08
2013-12-09T21:26:08
16,543,828
1
0
null
null
null
null
UTF-8
Java
false
false
1,932
java
/* * Copyright (c) 2013, Luigi R. Viggiano * All rights reserved. * * This software is distributable under the BSD license. * See the terms of the BSD license in the documentation provided with this software. */ package org.aeonbits.owner.multithread; import org.aeonbits.owner.Config; import java.lang.Thread.State; import java.util.List; /** * @author Luigi R. Viggiano */ abstract class MultiThreadTestBase { void join(ThreadBase[]... args) throws InterruptedException { for (ThreadBase[] threads : args) for (Thread thread : threads) thread.join(); } void start(ThreadBase[]... args) throws InterruptedException { for (ThreadBase[] threads : args) for (Thread thread : threads) { thread.start(); while (thread.getState() != State.WAITING) // waits for all threads to be started and ready to rush // when lock.notifyAll() is issued thread.join(1); } } <T extends Config> void assertNoErrors(ThreadBase<T>[] threads) throws Throwable { for (int i = 0; i < threads.length; i++) { ThreadBase<T> thread = threads[i]; int errorCount = thread.errors.size(); if (errorCount > 0) System.err.printf("There are %d exception collected by %s#%d\n", errorCount, thread.getClass().getName(), i); List<Throwable> errors = thread.errors; for (Throwable error : errors) { System.err.printf("%s#%d thrown an exception: %s\n", thread.getClass().getName(), i, error.getMessage()); error.printStackTrace(System.err); throw error; } } } void notifyAll(Object lock) { synchronized (lock) { lock.notifyAll(); } } }
[ "luigi.viggiano@newinstance.it" ]
luigi.viggiano@newinstance.it
64a7ec41ca95f2bcac91ea6f3165436f29693b8b
0ca9a0873d99f0d69b78ed20292180f513a20d22
/src/main/java/android/support/p004v7/widget/FitWindowsViewGroup.java
303ca179739c1e770a13bc1f7c06086851324ec8
[]
no_license
Eliminater74/com.google.android.tvlauncher
44361fbbba097777b99d7eddd6e03d4bbe5f4d60
e8284f9970d77a05042a57e9c2173856af7c4246
refs/heads/master
2021-01-14T23:34:04.338366
2020-02-24T16:39:53
2020-02-24T16:39:53
242,788,539
1
0
null
null
null
null
UTF-8
Java
false
false
571
java
package android.support.p004v7.widget; import android.graphics.Rect; import android.support.annotation.RestrictTo; @RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX}) /* renamed from: android.support.v7.widget.FitWindowsViewGroup */ public interface FitWindowsViewGroup { /* renamed from: android.support.v7.widget.FitWindowsViewGroup$OnFitSystemWindowsListener */ public interface OnFitSystemWindowsListener { void onFitSystemWindows(Rect rect); } void setOnFitSystemWindowsListener(OnFitSystemWindowsListener onFitSystemWindowsListener); }
[ "eliminater74@gmail.com" ]
eliminater74@gmail.com
15841cab1705500544682848fb72ceb2515d895a
42e94aa09fe8d979f77449e08c67fa7175a3e6eb
/src/net/minecraft/world/gen/feature/WorldGenLakes.java
38687da4483777c5f919b1454920f2bbe5ab48fa
[ "Unlicense" ]
permissive
HausemasterIssue/novoline
6fa90b89d5ebf6b7ae8f1d1404a80a057593ea91
9146c4add3aa518d9aa40560158e50be1b076cf0
refs/heads/main
2023-09-05T00:20:17.943347
2021-11-26T02:35:25
2021-11-26T02:35:25
432,312,803
1
0
Unlicense
2021-11-26T22:12:46
2021-11-26T22:12:45
null
UTF-8
Java
false
false
6,188
java
package net.minecraft.world.gen.feature; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.feature.WorldGenerator; public class WorldGenLakes extends WorldGenerator { private Block block; public WorldGenLakes(Block var1) { this.block = var1; } public boolean generate(World var1, Random var2, BlockPos var3) { for(var3 = var3.a(-8, 0, -8); var3.getY() > 5 && var1.isAirBlock(var3); var3 = var3.down()) { ; } if(var3.getY() <= 4) { return false; } else { var3 = var3.down(4); boolean[] var4 = new boolean[2048]; int var5 = var2.nextInt(4) + 4; for(int var6 = 0; var6 < var5; ++var6) { double var7 = var2.nextDouble() * 6.0D + 3.0D; double var9 = var2.nextDouble() * 4.0D + 2.0D; double var11 = var2.nextDouble() * 6.0D + 3.0D; double var13 = var2.nextDouble() * (16.0D - var7 - 2.0D) + 1.0D + var7 / 2.0D; double var15 = var2.nextDouble() * (8.0D - var9 - 4.0D) + 2.0D + var9 / 2.0D; double var17 = var2.nextDouble() * (16.0D - var11 - 2.0D) + 1.0D + var11 / 2.0D; for(int var19 = 1; var19 < 15; ++var19) { for(int var20 = 1; var20 < 15; ++var20) { for(int var21 = 1; var21 < 7; ++var21) { double var22 = ((double)var19 - var13) / (var7 / 2.0D); double var24 = ((double)var21 - var15) / (var9 / 2.0D); double var26 = ((double)var20 - var17) / (var11 / 2.0D); double var28 = var22 * var22 + var24 * var24 + var26 * var26; if(var28 < 1.0D) { var4[(var19 * 16 + var20) * 8 + var21] = true; } } } } } for(int var32 = 0; var32 < 16; ++var32) { for(int var37 = 0; var37 < 16; ++var37) { for(int var8 = 0; var8 < 8; ++var8) { if(var4[(var32 * 16 + var37) * 8 + var8] || (var32 >= 15 || !var4[((var32 + 1) * 16 + var37) * 8 + var8]) && !var4[((var32 - 1) * 16 + var37) * 8 + var8] && (var37 >= 15 || !var4[(var32 * 16 + var37 + 1) * 8 + var8]) && !var4[(var32 * 16 + var37 - 1) * 8 + var8] && (var8 >= 7 || !var4[(var32 * 16 + var37) * 8 + var8 + 1]) && !var4[(var32 * 16 + var37) * 8 + var8 - 1]) { boolean var48 = false; } else { boolean var10000 = true; } Material var10 = var1.getBlockState(var3.a(var32, var8, var37)).getBlock().getMaterial(); if(var8 >= 4 && var10.isLiquid()) { return false; } if(var8 < 4 && !var10.isSolid() && var1.getBlockState(var3.a(var32, var8, var37)).getBlock() != this.block) { return false; } } } } for(int var33 = 0; var33 < 16; ++var33) { for(int var38 = 0; var38 < 16; ++var38) { for(int var42 = 0; var42 < 8; ++var42) { if(var4[(var33 * 16 + var38) * 8 + var42]) { var1.setBlockState(var3.a(var33, var42, var38), var42 >= 4?Blocks.air.getDefaultState():this.block.getDefaultState(), 2); } } } } for(int var34 = 0; var34 < 16; ++var34) { for(int var39 = 0; var39 < 16; ++var39) { for(int var43 = 4; var43 < 8; ++var43) { if(var4[(var34 * 16 + var39) * 8 + var43]) { BlockPos var46 = var3.a(var34, var43 - 1, var39); if(var1.getBlockState(var46).getBlock() == Blocks.dirt && var1.getLightFor(EnumSkyBlock.SKY, var3.a(var34, var43, var39)) > 0) { BiomeGenBase var47 = var1.getBiomeGenForCoords(var46); if(var47.topBlock.getBlock() == Blocks.mycelium) { var1.setBlockState(var46, Blocks.mycelium.getDefaultState(), 2); } else { var1.setBlockState(var46, Blocks.grass.getDefaultState(), 2); } } } } } } if(this.block.getMaterial() == Material.lava) { for(int var35 = 0; var35 < 16; ++var35) { for(int var40 = 0; var40 < 16; ++var40) { for(int var44 = 0; var44 < 8; ++var44) { if(var4[(var35 * 16 + var40) * 8 + var44] || (var35 >= 15 || !var4[((var35 + 1) * 16 + var40) * 8 + var44]) && !var4[((var35 - 1) * 16 + var40) * 8 + var44] && (var40 >= 15 || !var4[(var35 * 16 + var40 + 1) * 8 + var44]) && !var4[(var35 * 16 + var40 - 1) * 8 + var44] && (var44 >= 7 || !var4[(var35 * 16 + var40) * 8 + var44 + 1]) && !var4[(var35 * 16 + var40) * 8 + var44 - 1]) { boolean var50 = false; } else { boolean var49 = true; } if((var44 < 4 || var2.nextInt(2) != 0) && var1.getBlockState(var3.a(var35, var44, var40)).getBlock().getMaterial().isSolid()) { var1.setBlockState(var3.a(var35, var44, var40), Blocks.stone.getDefaultState(), 2); } } } } } if(this.block.getMaterial() == Material.water) { for(int var36 = 0; var36 < 16; ++var36) { for(int var41 = 0; var41 < 16; ++var41) { byte var45 = 4; if(var1.canBlockFreezeWater(var3.a(var36, var45, var41))) { var1.setBlockState(var3.a(var36, var45, var41), Blocks.ice.getDefaultState(), 2); } } } } return true; } } }
[ "91408199+jeremypelletier@users.noreply.github.com" ]
91408199+jeremypelletier@users.noreply.github.com
563506ef052badb654bb2969ede2d36a3247c1a8
7e4fa9ed884ebd42489396c3e901ca535e7e3bdf
/service-proxy/src/test/java/org/jboss/weld/vertx/serviceproxy/EchoServiceProxyTest.java
df113193013825a2f94a70bdd214e724ee932247
[ "Apache-2.0" ]
permissive
jk1216/weld-vertx
6b454453466d1e8792e3056c627c6576aaedc21d
5e2143ff93970562d5224dee72bf61a881569514
refs/heads/master
2021-01-23T14:21:41.415419
2017-09-01T15:03:04
2017-09-01T15:03:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,254
java
package org.jboss.weld.vertx.serviceproxy; import static org.junit.Assert.assertEquals; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; import org.jboss.weld.vertx.Timeouts; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.Timeout; import org.junit.runner.RunWith; import io.vertx.core.Vertx; import io.vertx.ext.unit.TestContext; import io.vertx.ext.unit.junit.VertxUnitRunner; /** * * @author Martin Kouba */ @RunWith(VertxUnitRunner.class) public class EchoServiceProxyTest { static final BlockingQueue<Object> SYNCHRONIZER = new LinkedBlockingQueue<>(); private Vertx vertx; private EchoServiceVerticle echoVerticle; @Rule public Timeout globalTimeout = Timeout.millis(Timeouts.GLOBAL_TIMEOUT); @Before public void init(TestContext context) throws InterruptedException { vertx = Vertx.vertx(); echoVerticle = new EchoServiceVerticle(); vertx.deployVerticle(echoVerticle, context.asyncAssertSuccess()); vertx.createHttpServer().requestHandler(request -> { request.response().end(); }).listen(8080, context.asyncAssertSuccess()); SYNCHRONIZER.clear(); } @After public void close(TestContext context) { vertx.close(context.asyncAssertSuccess()); } @Test public void testEchoServiceProxy() throws InterruptedException { String message = "foooo"; echoVerticle.container().select(EchoServiceConsumer.class).get().doEchoBusiness(message); assertEquals(message, poll()); } @Test public void testEchoServiceProxyDynamicLookup() throws InterruptedException { String message = "foooo"; // Lookup service proxy with ServiceProxy qualifier literal echoVerticle.container().select(EchoService.class, ServiceProxy.Literal.of("echo-service-address")).get().echo(message, (r) -> SYNCHRONIZER.add(r.result())); assertEquals(message, poll()); } private Object poll() throws InterruptedException { return SYNCHRONIZER.poll(Timeouts.DEFAULT_TIMEOUT, TimeUnit.MILLISECONDS); } }
[ "mkouba@redhat.com" ]
mkouba@redhat.com
fe5e9044cb102c5ce8f14225f2749c499c4b1cba
d26f70f2aca82ca634aa9f1ca8a341e0f2c1d7d5
/lib/src/main/java/it/mbkj/lib/utils/verifier/CheckBoxVerifier.java
f13083136934a54aed943e72f15f2fb6b247c579
[]
no_license
hailinliu/gongxiangsuanli
48ef4c4db764a36eed3b05aa40d04ecfe68fd40e
5dfda12a61ffc1af5efa87aeba23cd7b4c869a3c
refs/heads/master
2023-07-09T11:14:11.766033
2021-08-09T05:44:34
2021-08-09T05:44:34
394,164,706
0
0
null
null
null
null
UTF-8
Java
false
false
337
java
package it.mbkj.lib.utils.verifier; import com.github.yoojia.inputs.EmptyableVerifier; public class CheckBoxVerifier extends EmptyableVerifier { public CheckBoxVerifier() { } @Override public boolean performTestNotEmpty(String notEmptyInput) throws Exception { return Boolean.valueOf(notEmptyInput); } }
[ "1135231523@qq.com" ]
1135231523@qq.com
e525af9fd8fd85141e2a141ae935b65517fbd681
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Mockito-7/org.mockito.internal.util.reflection.GenericMetadataSupport/BBC-F0-opt-100/28/org/mockito/internal/util/reflection/GenericMetadataSupport_ESTest_scaffolding.java
587765a8ea593341141bfe013b9029b77140077a
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
7,826
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Oct 24 00:47:03 GMT 2021 */ package org.mockito.internal.util.reflection; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; import static org.evosuite.shaded.org.mockito.Mockito.*; @EvoSuiteClassExclude public class GenericMetadataSupport_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.mockito.internal.util.reflection.GenericMetadataSupport"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {} } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(GenericMetadataSupport_ESTest_scaffolding.class.getClassLoader() , "org.mockito.internal.configuration.plugins.PluginRegistry", "org.mockito.internal.util.reflection.GenericMetadataSupport$BoundedType", "org.mockito.configuration.AnnotationEngine", "org.mockito.cglib.proxy.Callback", "org.mockito.internal.util.reflection.GenericMetadataSupport$FromClassGenericMetadataSupport", "org.mockito.internal.util.reflection.GenericMetadataSupport$NotGenericReturnTypeSupport", "org.mockito.configuration.DefaultMockitoConfiguration", "org.mockito.internal.configuration.ClassPathLoader", "org.mockito.exceptions.base.MockitoException", "org.mockito.plugins.PluginSwitch", "org.mockito.stubbing.Answer", "org.mockito.internal.util.collections.Iterables", "org.mockito.internal.configuration.plugins.PluginLoader", "org.mockito.internal.configuration.plugins.DefaultPluginSwitch", "org.mockito.internal.exceptions.stacktrace.StackTraceFilter", "org.mockito.internal.creation.cglib.CglibMockMaker", "org.mockito.configuration.IMockitoConfiguration", "org.mockito.internal.util.reflection.GenericMetadataSupport$TypeVariableReturnType", "org.mockito.internal.util.Checks", "org.mockito.internal.util.reflection.GenericMetadataSupport$FromParameterizedTypeGenericMetadataSupport", "org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleaner", "org.mockito.exceptions.stacktrace.StackTraceCleaner", "org.mockito.internal.configuration.GlobalConfiguration", "org.mockito.internal.configuration.plugins.Plugins", "org.mockito.cglib.proxy.MethodInterceptor", "org.mockito.internal.util.reflection.GenericMetadataSupport$TypeVarBoundedType", "org.mockito.plugins.MockMaker", "org.mockito.internal.configuration.plugins.PluginFinder", "org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleanerProvider", "org.mockito.plugins.StackTraceCleanerProvider", "org.mockito.internal.util.reflection.GenericMetadataSupport", "org.mockito.exceptions.misusing.MockitoConfigurationException", "org.mockito.internal.util.reflection.GenericMetadataSupport$ParameterizedReturnType", "org.mockito.internal.util.reflection.GenericMetadataSupport$WildCardBoundedType", "org.mockito.internal.exceptions.stacktrace.ConditionalStackTraceFilter" ); } private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException { mock(Class.forName("java.lang.reflect.TypeVariable", false, GenericMetadataSupport_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("java.lang.reflect.WildcardType", false, GenericMetadataSupport_ESTest_scaffolding.class.getClassLoader())); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(GenericMetadataSupport_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.mockito.internal.util.reflection.GenericMetadataSupport", "org.mockito.internal.util.reflection.GenericMetadataSupport$WildCardBoundedType", "org.mockito.internal.util.reflection.GenericMetadataSupport$TypeVarBoundedType", "org.mockito.internal.util.reflection.GenericMetadataSupport$NotGenericReturnTypeSupport", "org.mockito.internal.util.reflection.GenericMetadataSupport$ParameterizedReturnType", "org.mockito.internal.util.reflection.GenericMetadataSupport$TypeVariableReturnType", "org.mockito.internal.util.reflection.GenericMetadataSupport$FromClassGenericMetadataSupport", "org.mockito.internal.util.reflection.GenericMetadataSupport$FromParameterizedTypeGenericMetadataSupport", "org.mockito.internal.util.Checks", "org.mockito.exceptions.base.MockitoException", "org.mockito.internal.exceptions.stacktrace.ConditionalStackTraceFilter", "org.mockito.internal.configuration.GlobalConfiguration", "org.mockito.configuration.DefaultMockitoConfiguration", "org.mockito.internal.configuration.ClassPathLoader", "org.mockito.internal.configuration.plugins.PluginRegistry", "org.mockito.internal.configuration.plugins.PluginLoader", "org.mockito.internal.configuration.plugins.DefaultPluginSwitch", "org.mockito.internal.configuration.plugins.PluginFinder", "org.mockito.internal.util.collections.Iterables", "org.mockito.internal.creation.cglib.CglibMockMaker", "org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleanerProvider", "org.mockito.internal.configuration.plugins.Plugins", "org.mockito.internal.exceptions.stacktrace.DefaultStackTraceCleaner", "org.mockito.internal.exceptions.stacktrace.StackTraceFilter" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
00c002bd033377f6cc0c44a266a9e13e2c6c45cd
6e6db7db5aa823c77d9858d2182d901684faaa24
/sample/webservice/HelloeBayTrading/src/com/ebay/trading/api/EBayMotorsProContactByEmailEnabledDefinitionType.java
950a7f882164b0433447a34ec831b2514881b09c
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
4everalone/nano
68a480d07d80f0f50d73ec593443bfb362d646aa
71779b1ad546663ee90a29f1c2d4236a6948a621
refs/heads/master
2020-12-25T14:08:08.303942
2013-07-25T13:28:41
2013-07-25T13:28:41
10,792,684
0
1
Apache-2.0
2019-04-24T20:12:27
2013-06-19T13:14:26
Java
UTF-8
Java
false
false
563
java
// Generated by xsd compiler for android/java // DO NOT CHANGE! package com.ebay.trading.api; import java.io.Serializable; import com.leansoft.nano.annotation.*; import java.util.List; /** * * Indicates whether the category supports the use of email to contact the * seller for Classified Ad format listings.Added for EbayMotors Pro users. * */ public class EBayMotorsProContactByEmailEnabledDefinitionType implements Serializable { private static final long serialVersionUID = -1L; @AnyElement @Order(value=0) public List<Object> any; }
[ "51startup@sina.com" ]
51startup@sina.com
63057c3d5fadcc7428cecb36f738f3f37f5b26f7
5440c44721728e87fb827fb130b1590b25f24989
/WIG/src/br/com/brasiltelecom/wig/util/ResolvedorNomeServidor.java
6c32ea6e1d4d52be2830a1b0fd139562d2f4d621
[]
no_license
amigosdobart/gpp
b36a9411f39137b8378c5484c58d1023c5e40b00
b1fec4e32fa254f972a0568fb7ebfac7784ecdc2
refs/heads/master
2020-05-15T14:20:11.462484
2019-04-19T22:34:54
2019-04-19T22:34:54
182,328,708
0
0
null
null
null
null
UTF-8
Java
false
false
836
java
package br.com.brasiltelecom.wig.util; import java.util.HashMap; import java.util.Map; public class ResolvedorNomeServidor { private static ResolvedorNomeServidor instance; private Map servidores; private ResolvedorNomeServidor() { servidores = new HashMap(); servidores.put("btdf0180" ,"10.61.176.109"); servidores.put("btdf0182" ,"10.61.176.111"); servidores.put("btdf0171" ,"10.61.176.115"); servidores.put("btdf0172" ,"10.61.176.116"); servidores.put("10.44.250.55","10.44.250.55"); servidores.put("localhost" ,"localhost"); } public static ResolvedorNomeServidor getInstance() { if (instance == null) instance = new ResolvedorNomeServidor(); return instance; } public String resolveNome(String nome) { return (String)servidores.get(nome); } }
[ "lucianovilela@gmail.com" ]
lucianovilela@gmail.com
8d7fb30e69bcd45d5a99fcfc3a48cd0d5f7b1513
4255af4f62bd078b4b6e8205556f3a62d78acfe5
/app/src/main/java/com/example/myapplication/mine/activiity/AddressActivity.java
342f9eb45b650cd257a9610379b3918666e4cd75
[]
no_license
moxun/btacion
96c9aa200711a6cda1b223f713f3dab074095f42
5390ae6f9abfbd0f8196b928ba51a0cc6b2fd85f
refs/heads/master
2022-06-03T08:11:29.689241
2020-04-30T05:18:50
2020-04-30T05:18:50
254,660,230
0
0
null
null
null
null
UTF-8
Java
false
false
3,745
java
package com.example.myapplication.mine.activiity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.example.myapplication.R; import com.example.myapplication.ZgwApplication; import com.example.myapplication.base.BaseActivity; import com.example.myapplication.bean.AddressBean; import com.example.myapplication.bean.UserinfoBean; import com.example.myapplication.mine.adapter.AddressAdapter; import com.example.myapplication.okhttp.OkHttpUtils; import com.example.myapplication.okhttp.callback.ResponseCallBack; import com.example.myapplication.okhttp.callback.ResultModelCallback; import com.example.myapplication.utils.SharedPreferenceUtils; import org.json.JSONException; import java.util.ArrayList; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; public class AddressActivity extends BaseActivity { @BindView(R.id.finish) ImageButton finish; @BindView(R.id.tool_title) TextView toolTitle; @BindView(R.id.recy_book) RecyclerView recyBook; @BindView(R.id.linear_modle) LinearLayout linearModle; @BindView(R.id.next_do) TextView nextDo; private ArrayList<AddressBean.DataBean> rechargeAddressBeanXES; private AddressAdapter addressAdapter; @Override protected void initView() { } private void getAddressList() { OkHttpUtils.get().url(ZgwApplication.appRequestUrl + "wallet/v1/user/recharge_address") .addHeader("X-Requested-With", "XMLHttpReques") .addHeader("Authorization", SharedPreferenceUtils.getToken()) .build() .execute(new ResultModelCallback(this, new ResponseCallBack<AddressBean>() { @Override public void onError(String e) { } @Override public void onResponse(AddressBean response) throws JSONException { Log.d("----------", "onResponse: ."+response.getData().size()); if(linearModle==null){ return; } if(response.getData().size()>0){ linearModle.setVisibility(View.GONE); recyBook.setVisibility(View.VISIBLE); rechargeAddressBeanXES.addAll(response.getData()); addressAdapter.notifyDataSetChanged(); }else { linearModle.setVisibility(View.VISIBLE); recyBook.setVisibility(View.GONE); } } })); } @Override protected void initData() { toolTitle.setText(getString(R.string.address)); rechargeAddressBeanXES = new ArrayList<>(); addressAdapter = new AddressAdapter(rechargeAddressBeanXES); recyBook.setLayoutManager(new LinearLayoutManager(this)); recyBook.setAdapter(addressAdapter); } @Override protected int getLayoutId() { return R.layout.activity_address; } @OnClick({R.id.finish, R.id.next_do}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.finish: finish(); break; case R.id.next_do: startActivity(new Intent(this,AddradressActivity.class)); break; } } }
[ "2636216883@qq.com" ]
2636216883@qq.com
211416b21ee77d0be8f2658bae4640abcd18853f
a07f5ac20bec8e0daa33f7d157035907d1ba1440
/bizcore/WEB-INF/demodata_core_src/com/test/demodata/userwhitelist/UserWhiteList.java
774864dd4c2e417e27f769d788585c1c76659690
[]
no_license
retail-ecommerce/demodata-biz-suite
8da63ae11ce5effe644840f91d3aa94b9a51346b
a4325887a5abcad9ec78273235bfad29b6c13334
refs/heads/master
2020-07-13T09:04:34.887504
2019-02-21T09:42:59
2019-02-21T09:42:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,886
java
package com.test.demodata.userwhitelist; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.math.BigDecimal; import com.terapico.caf.DateTime; import com.test.demodata.BaseEntity; import com.test.demodata.SmartList; import com.test.demodata.KeyValuePair; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.test.demodata.userdomain.UserDomain; @JsonSerialize(using = UserWhiteListSerializer.class) public class UserWhiteList extends BaseEntity implements java.io.Serializable{ public static final String ID_PROPERTY = "id" ; public static final String USER_IDENTITY_PROPERTY = "userIdentity" ; public static final String USER_SPECIAL_FUNCTIONS_PROPERTY = "userSpecialFunctions"; public static final String DOMAIN_PROPERTY = "domain" ; public static final String VERSION_PROPERTY = "version" ; public static final String INTERNAL_TYPE="UserWhiteList"; public String getInternalType(){ return INTERNAL_TYPE; } public String getDisplayName(){ String displayName = getUserIdentity(); if(displayName!=null){ return displayName; } return super.getDisplayName(); } private static final long serialVersionUID = 1L; protected String mId ; protected String mUserIdentity ; protected String mUserSpecialFunctions; protected UserDomain mDomain ; protected int mVersion ; public UserWhiteList(){ //lazy load for all the properties } //disconnect from all, 中文就是一了百了,跟所有一切尘世断绝往来藏身于茫茫数据海洋 public void clearFromAll(){ setDomain( null ); this.changed = true; } public UserWhiteList(String userIdentity, String userSpecialFunctions, UserDomain domain) { setUserIdentity(userIdentity); setUserSpecialFunctions(userSpecialFunctions); setDomain(domain); } //Support for changing the property public void changeProperty(String property, String newValueExpr) { if(USER_IDENTITY_PROPERTY.equals(property)){ changeUserIdentityProperty(newValueExpr); } if(USER_SPECIAL_FUNCTIONS_PROPERTY.equals(property)){ changeUserSpecialFunctionsProperty(newValueExpr); } } protected void changeUserIdentityProperty(String newValueExpr){ String oldValue = getUserIdentity(); String newValue = parseString(newValueExpr); if(equalsString(oldValue , newValue)){ return;//they can be both null, or exact the same object, this is much faster than equals function } //they are surely different each other updateUserIdentity(newValue); this.onChangeProperty(USER_IDENTITY_PROPERTY, oldValue, newValue); return; } protected void changeUserSpecialFunctionsProperty(String newValueExpr){ String oldValue = getUserSpecialFunctions(); String newValue = parseString(newValueExpr); if(equalsString(oldValue , newValue)){ return;//they can be both null, or exact the same object, this is much faster than equals function } //they are surely different each other updateUserSpecialFunctions(newValue); this.onChangeProperty(USER_SPECIAL_FUNCTIONS_PROPERTY, oldValue, newValue); return; } public void setId(String id){ this.mId = trimString(id);; } public String getId(){ return this.mId; } public UserWhiteList updateId(String id){ this.mId = trimString(id);; this.changed = true; return this; } public void setUserIdentity(String userIdentity){ this.mUserIdentity = trimString(userIdentity);; } public String getUserIdentity(){ return this.mUserIdentity; } public UserWhiteList updateUserIdentity(String userIdentity){ this.mUserIdentity = trimString(userIdentity);; this.changed = true; return this; } public void setUserSpecialFunctions(String userSpecialFunctions){ this.mUserSpecialFunctions = trimString(userSpecialFunctions);; } public String getUserSpecialFunctions(){ return this.mUserSpecialFunctions; } public UserWhiteList updateUserSpecialFunctions(String userSpecialFunctions){ this.mUserSpecialFunctions = trimString(userSpecialFunctions);; this.changed = true; return this; } public void setDomain(UserDomain domain){ this.mDomain = domain;; } public UserDomain getDomain(){ return this.mDomain; } public UserWhiteList updateDomain(UserDomain domain){ this.mDomain = domain;; this.changed = true; return this; } public void clearDomain(){ setDomain ( null ); this.changed = true; } public void setVersion(int version){ this.mVersion = version;; } public int getVersion(){ return this.mVersion; } public UserWhiteList updateVersion(int version){ this.mVersion = version;; this.changed = true; return this; } public void collectRefercences(BaseEntity owner, List<BaseEntity> entityList, String internalType){ addToEntityList(this, entityList, getDomain(), internalType); } public List<BaseEntity> collectRefercencesFromLists(String internalType){ List<BaseEntity> entityList = new ArrayList<BaseEntity>(); return entityList; } public List<SmartList<?>> getAllRelatedLists() { List<SmartList<?>> listOfList = new ArrayList<SmartList<?>>(); return listOfList; } public List<KeyValuePair> keyValuePairOf(){ List<KeyValuePair> result = super.keyValuePairOf(); appendKeyValuePair(result, ID_PROPERTY, getId()); appendKeyValuePair(result, USER_IDENTITY_PROPERTY, getUserIdentity()); appendKeyValuePair(result, USER_SPECIAL_FUNCTIONS_PROPERTY, getUserSpecialFunctions()); appendKeyValuePair(result, DOMAIN_PROPERTY, getDomain()); appendKeyValuePair(result, VERSION_PROPERTY, getVersion()); return result; } public BaseEntity copyTo(BaseEntity baseDest){ if(baseDest instanceof UserWhiteList){ UserWhiteList dest =(UserWhiteList)baseDest; dest.setId(getId()); dest.setUserIdentity(getUserIdentity()); dest.setUserSpecialFunctions(getUserSpecialFunctions()); dest.setDomain(getDomain()); dest.setVersion(getVersion()); } super.copyTo(baseDest); return baseDest; } public String toString(){ StringBuilder stringBuilder=new StringBuilder(128); stringBuilder.append("UserWhiteList{"); stringBuilder.append("\tid='"+getId()+"';"); stringBuilder.append("\tuserIdentity='"+getUserIdentity()+"';"); stringBuilder.append("\tuserSpecialFunctions='"+getUserSpecialFunctions()+"';"); if(getDomain() != null ){ stringBuilder.append("\tdomain='UserDomain("+getDomain().getId()+")';"); } stringBuilder.append("\tversion='"+getVersion()+"';"); stringBuilder.append("}"); return stringBuilder.toString(); } //provide number calculation function }
[ "philip_chang@163.com" ]
philip_chang@163.com
510ea46cb0b1f564c8ce65561296635d382afa44
6d60a8adbfdc498a28f3e3fef70366581aa0c5fd
/codebase/dataset/t3/327_frag1.java
4c734ac7dc5516be71b78666f9cad102f93410f1
[]
no_license
rayhan-ferdous/code2vec
14268adaf9022d140a47a88129634398cd23cf8f
c8ca68a7a1053d0d09087b14d4c79a189ac0cf00
refs/heads/master
2022-03-09T08:40:18.035781
2022-02-27T23:57:44
2022-02-27T23:57:44
140,347,552
0
1
null
null
null
null
UTF-8
Java
false
false
459
java
public Set<Integer> getHashes(Storetype type) { Set<Integer> resultSet = new HashSet<Integer>(); try { PreparedStatement statement = GET_HASHES[type.ordinal()]; ResultSet rs = statement.executeQuery(); while (rs.next()) { resultSet.add(rs.getInt(1)); } } catch (SQLException e) { e.printStackTrace(); } return resultSet; }
[ "aaponcseku@gmail.com" ]
aaponcseku@gmail.com
57c7b9198d5362ca10e3e2a78f0a8ea6eb1ee526
5eae683a6df0c4b97ab1ebcd4724a4bf062c1889
/bin/platform/bootstrap/gensrc/de/hybris/platform/kymaintegrationservices/dto/OAuthData.java
4493999361587c77a17e33f61e37674ca3043f0a
[]
no_license
sujanrimal/GiftCardProject
1c5e8fe494e5c59cca58bbc76a755b1b0c0333bb
e0398eec9f4ec436d20764898a0255f32aac3d0c
refs/heads/master
2020-12-11T18:05:17.413472
2020-01-17T18:23:44
2020-01-17T18:23:44
233,911,127
0
0
null
2020-06-18T15:26:11
2020-01-14T18:44:18
null
UTF-8
Java
false
false
2,154
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! * --- Generated at Jan 17, 2020 11:49:28 AM * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.kymaintegrationservices.dto; import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonProperty; public class OAuthData implements Serializable { /** Default serialVersionUID value. */ private static final long serialVersionUID = 1L; /** <i>Generated property</i> for <code>OAuthData.url</code> property defined at extension <code>kymaintegrationservices</code>. */ @JsonProperty("url") private String url; /** <i>Generated property</i> for <code>OAuthData.clientId</code> property defined at extension <code>kymaintegrationservices</code>. */ @JsonProperty("clientId") private String clientId; /** <i>Generated property</i> for <code>OAuthData.clientSecret</code> property defined at extension <code>kymaintegrationservices</code>. */ @JsonProperty("clientSecret") private String clientSecret; public OAuthData() { // default constructor } @JsonProperty("url") public void setUrl(final String url) { this.url = url; } @JsonProperty("url") public String getUrl() { return url; } @JsonProperty("clientId") public void setClientId(final String clientId) { this.clientId = clientId; } @JsonProperty("clientId") public String getClientId() { return clientId; } @JsonProperty("clientSecret") public void setClientSecret(final String clientSecret) { this.clientSecret = clientSecret; } @JsonProperty("clientSecret") public String getClientSecret() { return clientSecret; } }
[ "travis.d.crawford@accenture.com" ]
travis.d.crawford@accenture.com
690db8b76f45704edaccf0fb33a3cab523a1e170
1f62f0a7a849df1d54d4ed2e34a59d9a745c7ed2
/src/main/java/it/aranciaict/productchatbot/config/Constants.java
e4323c4e8fc51e8fc78d82a13109a225e609b833
[]
no_license
danieledb/ProductChatBot
a2e6bf30f3e15d0aa3a80269948dc8dba1f9ab18
f7f47f4f0297c43657fa58ea977fd68db77b12bd
refs/heads/master
2021-04-09T11:02:00.324352
2018-03-16T10:01:16
2018-03-16T10:01:16
125,484,311
0
0
null
2018-03-16T10:01:18
2018-03-16T08:08:58
Java
UTF-8
Java
false
false
434
java
package it.aranciaict.productchatbot.config; /** * Application constants. */ public final class Constants { // Regex for acceptable logins public static final String LOGIN_REGEX = "^[_'.@A-Za-z0-9-]*$"; public static final String SYSTEM_ACCOUNT = "system"; public static final String ANONYMOUS_USER = "anonymoususer"; public static final String DEFAULT_LANGUAGE = "en"; private Constants() { } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
f246e542fdf073709331d51ba3c7ee59346df0cb
1dc083c68a742d4acf67835b55157063a70cbee8
/src/main/java/com/telerikacademy/socialnetwork/services/contracts/FriendShipService.java
5b1a3527dc72b7a1692b2f984a51740940fe17f1
[ "MIT" ]
permissive
yavoryankov83/Traveller-Social-Network
c03cee7c420d4d5b93eb26933d9805f21b97f81b
528fb0f3d6d821b35cbf49a397ef1bd76104fedc
refs/heads/master
2020-09-12T12:18:34.281969
2019-11-19T17:46:23
2019-11-19T17:46:23
222,423,026
0
0
null
null
null
null
UTF-8
Java
false
false
1,421
java
package com.telerikacademy.socialnetwork.services.contracts; import com.telerikacademy.socialnetwork.models.Friendship; import com.telerikacademy.socialnetwork.models.User; import java.security.Principal; import java.util.List; import java.util.Set; public interface FriendShipService { Friendship getFriendship(Integer userId, Integer friendId); Friendship getIfRelationExists(Integer userId, Integer friendId); boolean isUsersAreFriends(Principal principal, Integer friendId); boolean hasUsersRelation(Principal principal, Integer friendId); boolean isBlockedUserByPrincipal(Principal principal, Integer friendId); boolean hasPrincipalRequest(Integer userId, Principal principal); List<Friendship> getAllUserFriendShips(Integer userId); List<User> getAllUserFriends(Principal principal); List<User> getAllUserSentMeRequest(Principal principal); List<User> getUserFriends(Integer userId); Set<User> getAllNonRelation(Principal principal); void sendFriendShipRequest(Principal principal, Integer userId); void updateFriendShipRequest(Integer userId, Principal principal, Integer statusId); void acceptFriendshipRequest(Integer friendId, Integer principalId); void rejectFriendshipRequest(Integer friendId, Integer principalId); void blockFriendshipRequest(Integer friendId, Principal principal); void unblockFriendshipRequest(Principal principal, Integer friendId); }
[ "yavoryankov83@gmail.com" ]
yavoryankov83@gmail.com
3b3ed0e3970ef64cfe2e6af5b2253dd3e6fe73af
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a164/A164983Test.java
8bc3f4572d0c87319ab010bbe3c69e30b3b17a11
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a164; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A164983Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
ade8bdbdd50e593afa3395d7587a019109dfff7b
981df8aa31bf62db3b9b4e34b5833f95ef4bd590
/xworker_swt/src/main/java/xworker/swt/xworker/attributeEditor/OpenWindowEditorCreator.java
b2b6bdb7e71a40bc1c15164bdd2e612f6efde77e
[ "Apache-2.0" ]
permissive
x-meta/xworker
638c7cd935f0a55d81f57e330185fbde9dce9319
430fba081a78b5d3871669bf6fcb1e952ad258b2
refs/heads/master
2022-12-22T11:44:10.363983
2021-10-15T00:57:10
2021-10-15T01:00:24
217,432,322
1
0
Apache-2.0
2022-12-12T23:21:16
2019-10-25T02:13:51
Java
UTF-8
Java
false
false
5,791
java
/******************************************************************************* * Copyright 2007-2013 See AUTHORS file. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ******************************************************************************/ package xworker.swt.xworker.attributeEditor; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; import org.xmeta.ActionContext; import org.xmeta.Thing; import org.xmeta.World; import org.xmeta.util.UtilString; import xworker.swt.design.Designer; import xworker.swt.util.SwtDialog; import xworker.swt.util.SwtDialogCallback; import xworker.swt.xworker.AttributeEditor; public class OpenWindowEditorCreator { public static Object create(ActionContext actionContext){ World world = World.getInstance(); Thing self = (Thing) actionContext.get("self"); //为不污染原始动作上下文,新建动作上下文 ActionContext context = new ActionContext(); context.put("parent", actionContext.get("parent")); context.put("parentContext", actionContext); context.put("explorerActions", Designer.getExplorerActions()); context.put("explorerContext", Designer.getExplorerActionContext()); context.put("utilBrowser", actionContext.get("utilBrowser")); context.put("thing", actionContext.get("thing")); //输入编辑器 Thing inputThing = world.getThing("xworker.swt.xworker.attributeEditor.OpenWindowEditor/@composite"); Composite composite = (Composite) inputThing.doAction("create", context); xworker.swt.form.GridData gridData = (xworker.swt.form.GridData) actionContext.get("gridData"); Thing attribute = gridData.source; context.put("attribute", attribute); Text text = (Text) context.get("text"); //在事物编辑器里被调用 composite.setLayoutData((GridData) actionContext.get("layoutData")); if(actionContext.get("modifyListener") != null){ text.addModifyListener((ModifyListener) actionContext.get("modifyListener")); } //Text输入框为输入属性编辑器的Model事物 actionContext.getScope(0).put(attribute.getString("name") + "Input", text); composite.setData(AttributeEditor.INPUT_CONTROL, text); return composite; } public static void editButtonAction(ActionContext actionContext){ final Text text = (Text) actionContext.get("text"); //窗口只打开一个 Shell oldShell = (Shell) text.getData("shell"); if(oldShell != null && !oldShell.isDisposed()) { oldShell.setVisible(true); oldShell.setActive(); return; } //窗口事物 Shell shell = text.getShell(); Thing attribute = (Thing) actionContext.get("attribute"); String inputAttrs = attribute.getString("inputattrs"); if(inputAttrs == null || "".equals(inputAttrs)){ inputAttrs = "xworker.swt.xworker.attributeEditor.OpenWindows"; //showError(shell, "属性的输入扩展属性没有设置弹出窗口的路径!"); //return; } String[] ws = inputAttrs.split("[|]"); Thing winThing = World.getInstance().getThing(ws[0]); if(winThing == null){ showError(shell, "Window not exists,path=" + ws[0]); return; } //参数 String param = ""; if(ws.length >= 2){ param = ws[1]; } ActionContext parentContext = (ActionContext) actionContext.get("parentContext"); ActionContext ac = new ActionContext(); ac.put("parent", shell); ac.put("value", text.getText()); ac.put("text", text); ac.put("param", param); ac.put("params", UtilString.getParams(param, ",")); ac.put("parentContext", actionContext.get("parentContext")); ac.put("utilBrowser", actionContext.get("utilBrowser")); ac.put("explorerActions", actionContext.get("explorerActions")); ac.put("explorerContext", actionContext.get("explorerContext")); ac.put("textContext", actionContext.get("actionContext")); ac.put("parentModel", parentContext.get("__editModel__model")); if(ac.get("parentModel") == null){ ac.put("parentModel", parentContext.get("model")); } ac.put("parentForm", parentContext.get("__dataObjectForm")); ac.put("thing", parentContext.get("thing")); Shell winShell = (Shell) winThing.doAction("create", ac); text.setData("shell", winShell); if(winShell != null && !winShell.isDisposed()){ SwtDialog dialog = new SwtDialog(shell, winShell, ac); dialog.open(new SwtDialogCallback() { @Override public void disposed(Object result) { if(result != null && !text.isDisposed()) { text.setText(String.valueOf(result)); } } }); } } public static void showError(Shell shell, String message){ MessageBox box = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK); box.setText("OpenWindowEditor"); box.setMessage(message); box.open(); } }
[ "zhangyuxiang@tom.com" ]
zhangyuxiang@tom.com
b7e526ef98570c02b1b0f2260094091c4dc05a60
c19435aface677d3de0958c7fa8b0aa7e3b759f3
/web/rest-ui/src/main/java/org/artifactory/ui/rest/service/setmeup/GetSetMeUpService.java
b757b81e14cd878ba8bfb9c9081814569071e449
[]
no_license
apaqi/jfrog-artifactory-5.11.0
febc70674b4a7b90f37f2dfd126af36b90784c28
6a4204ed9ce9334d3eb7a8cb89c1d9dc72d709c1
refs/heads/master
2020-03-18T03:13:41.286825
2018-05-21T06:57:30
2018-05-21T06:57:30
134,229,368
0
0
null
null
null
null
UTF-8
Java
false
false
7,680
java
/* * * Artifactory is a binaries repository manager. * Copyright (C) 2016 JFrog Ltd. * * Artifactory is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Artifactory 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Artifactory. If not, see <http://www.gnu.org/licenses/>. * */ package org.artifactory.ui.rest.service.setmeup; import com.google.common.collect.Sets; import org.artifactory.addon.AddonsManager; import org.artifactory.addon.CoreAddons; import org.artifactory.api.config.CentralConfigService; import org.artifactory.api.context.ContextHelper; import org.artifactory.api.repo.RepositoryService; import org.artifactory.api.security.AuthorizationService; import org.artifactory.descriptor.repo.*; import org.artifactory.repo.InternalRepoPathFactory; import org.artifactory.repo.RepoPath; import org.artifactory.rest.common.service.ArtifactoryRestRequest; import org.artifactory.rest.common.service.RestResponse; import org.artifactory.rest.common.service.RestService; import org.artifactory.ui.rest.model.setmeup.SetMeUpModel; import org.artifactory.ui.rest.model.utils.repositories.RepoKeyType; import org.artifactory.util.HttpUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Set; /** * @author chen Keinan * @author Lior Hasson */ @Component @Scope(BeanDefinition.SCOPE_PROTOTYPE) public class GetSetMeUpService implements RestService { @Autowired private CentralConfigService centralConfigService; @Autowired private RepositoryService repositoryService; @Autowired private AuthorizationService authorizationService; @Override public void execute(ArtifactoryRestRequest request, RestResponse response) { /// get list of repositories descriptor by user permissions List<RepoKeyType> repoKeyTypes = getRepoKeyTypes(); // update set me up model SetMeUpModel setMeUpModel = getSetMeUpModel(request, repoKeyTypes); response.iModel(setMeUpModel); } private SetMeUpModel getSetMeUpModel(ArtifactoryRestRequest artifactoryRequest, List<RepoKeyType> repoKeyTypes) { SetMeUpModel setMeUpModel = new SetMeUpModel(); setMeUpModel.setRepoKeyTypes(repoKeyTypes); String servletContextUrl = HttpUtils.getServletContextUrl(artifactoryRequest.getServletRequest()); setMeUpModel.setBaseUrl(servletContextUrl); setMeUpModel.setServerId(centralConfigService.getServerName()); setMeUpModel.setHostname(ContextHelper.get().beanForType(AddonsManager.class).addonByType(CoreAddons.class).getArtifactoryServerName()); return setMeUpModel; } /** * get user keys type list * @return - list of user keys types */ private List<RepoKeyType> getRepoKeyTypes() { Set<RepoBaseDescriptor> userRepos = getUserRepos(); List<RepoKeyType> repoKeyTypes = new ArrayList<>(); userRepos.forEach(userRepo -> { if (!userRepo.getKey().endsWith("-cache")) { RepoKeyType repoKeyType = new RepoKeyType(userRepo.getType(), userRepo.getKey()); // update can read or deploy updateCanReadOrDeploy(userRepo, repoKeyType); if(userRepo instanceof LocalRepoDescriptor){ repoKeyType.setIsLocal(true); } if(userRepo instanceof RemoteRepoDescriptor){ repoKeyType.setIsRemote(true); } if(userRepo instanceof VirtualRepoDescriptor){ repoKeyType.setIsVirtual(true); if (((VirtualRepoDescriptor)userRepo).getDefaultDeploymentRepo() != null) { repoKeyType.setIsDefaultDeploymentConfigured(true); } } repoKeyTypes.add(repoKeyType); } }); return repoKeyTypes; } private void updateCanReadOrDeploy(RepoBaseDescriptor userRepo, RepoKeyType repoKeyType) { RepoPath repoPath; repoKeyType.setCanRead(false); repoKeyType.setCanDeploy(false); if(userRepo instanceof HttpRepoDescriptor){ repoPath = InternalRepoPathFactory.repoRootPath(userRepo.getKey() + "-cache"); } else { repoPath = InternalRepoPathFactory.repoRootPath(userRepo.getKey()); } if (authorizationService.canRead(repoPath) || authorizationService.userHasPermissionsOnRepositoryRoot(repoPath.getRepoKey())) { repoKeyType.setCanRead(true); } if(authorizationService.canDeploy(repoPath)) { repoKeyType.setCanDeploy(true); } } /** * get list of repositories allowed for this user to deploy * * @return - list of repositories */ private Set<RepoBaseDescriptor> getUserRepos() { Set<RepoBaseDescriptor> baseDescriptors = Sets.newTreeSet(new RepoComparator()); List<LocalRepoDescriptor> localDescriptors = repositoryService.getLocalAndCachedRepoDescriptors(); removeNonPermissionRepositories(localDescriptors); baseDescriptors.addAll(localDescriptors); // add remote repo List<RemoteRepoDescriptor> remoteDescriptors = repositoryService.getRemoteRepoDescriptors(); removeNonPermissionRepositories(remoteDescriptors); baseDescriptors.addAll(remoteDescriptors); // add virtual repo List<VirtualRepoDescriptor> virtualDescriptors = repositoryService.getVirtualRepoDescriptors(); removeNonPermissionRepositories(virtualDescriptors); baseDescriptors.addAll(virtualDescriptors); return baseDescriptors; } /** * * filter non permitted repositories */ private void removeNonPermissionRepositories(List<? extends RepoDescriptor> repositories) { AuthorizationService authorizationService = ContextHelper.get().getAuthorizationService(); repositories.removeIf( repoDescriptor -> !authorizationService.userHasPermissionsOnRepositoryRoot(repoDescriptor.getKey())); } private static class RepoComparator implements Comparator<RepoBaseDescriptor> { @Override public int compare(RepoBaseDescriptor descriptor1, RepoBaseDescriptor descriptor2) { //Local repositories can be either ordinary or caches if (descriptor1 instanceof LocalRepoDescriptor) { boolean repo1IsCache = ((LocalRepoDescriptor) descriptor1).isCache(); boolean repo2IsCache = ((LocalRepoDescriptor) descriptor2).isCache(); //Cache repositories should appear in a higher priority if (repo1IsCache && !repo2IsCache) { return 1; } else if (!repo1IsCache && repo2IsCache) { return -1; } } return descriptor1.getKey().compareTo(descriptor2.getKey()); } } }
[ "wangpeixuan00@126.com" ]
wangpeixuan00@126.com
ff4fede980122931a7ece376d47d6efa9d40e718
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.browser-base/sources/defpackage/C0244Ea.java
c1d9a3429892c206a1cf1a105f59ad8dd4e21553
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
1,009
java
package defpackage; import android.os.Environment; import android.os.StatFs; import java.io.File; import java.util.Objects; import org.chromium.base.ContextUtils; /* renamed from: Ea reason: default package and case insensitive filesystem */ /* compiled from: chromium-OculusBrowser.apk-stable-281887347 */ public class C0244Ea extends AbstractC2032cb { public final Runnable i; public final /* synthetic */ E51 j; public C0244Ea(E51 e51, Runnable runnable) { this.j = e51; this.i = runnable; } @Override // defpackage.AbstractC2032cb public Object c() { E51 e51 = this.j; ContextUtils.getApplicationContext(); Objects.requireNonNull(e51); File dataDirectory = Environment.getDataDirectory(); if (!dataDirectory.exists()) { return null; } return new StatFs(dataDirectory.getPath()); } @Override // defpackage.AbstractC2032cb public void k(Object obj) { this.i.run(); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
aafab9d35599ce7e1540d7094270acc27f16aab2
377405a1eafa3aa5252c48527158a69ee177752f
/src/com/newrelic/agent/android/api/common/WanType.java
0887f80d916f0e50127fb898dd3181e8d752e0d2
[]
no_license
apptology/AltFuelFinder
39c15448857b6472ee72c607649ae4de949beb0a
5851be78af47d1d6fcf07f9a4ad7f9a5c4675197
refs/heads/master
2016-08-12T04:00:46.440301
2015-10-25T18:25:16
2015-10-25T18:25:16
44,921,258
0
1
null
null
null
null
UTF-8
Java
false
false
1,128
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.newrelic.agent.android.api.common; public interface WanType { public static final String CDMA = "CDMA"; public static final String EDGE = "EDGE"; public static final String EVDO_REV_0 = "EVDO rev 0"; public static final String EVDO_REV_A = "EVDO rev A"; public static final String EVDO_REV_B = "EVDO rev B"; public static final String GPRS = "GPRS"; public static final String HRPD = "HRPD"; public static final String HSDPA = "HSDPA"; public static final String HSPA = "HSPA"; public static final String HSPAP = "HSPAP"; public static final String HSUPA = "HSUPA"; public static final String IDEN = "IDEN"; public static final String LTE = "LTE"; public static final String NONE = "none"; public static final String RTT = "1xRTT"; public static final String UMTS = "UMTS"; public static final String UNKNOWN = "unknown"; public static final String WIFI = "wifi"; }
[ "rich.foreman@apptology.com" ]
rich.foreman@apptology.com
2e0dd8495e5053aba6c93c7648f14cb483e7123e
0cb38080151dd0b59be8396b293c5c10d7e1c78f
/sketch/src/main/java/me/xiaopan/sketch/request/DownloadHelper.java
b3e21a78738400dcee93c847a8ef248871882f66
[]
no_license
dengdaoyus/android_often_utils
df0c7184ec7397d50c348d1cdd81a42163f521f1
e031996d84855f0a114d866862370b4428d474a1
refs/heads/master
2021-01-20T13:13:40.695749
2018-04-16T03:26:17
2018-04-16T03:26:17
101,740,484
1
0
null
null
null
null
UTF-8
Java
false
false
6,469
java
/* * Copyright (C) 2013 Peng fei Pan <sky@xiaopan.me> * * 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 me.xiaopan.sketch.request; import me.xiaopan.sketch.SLogType; import me.xiaopan.sketch.Sketch; import me.xiaopan.sketch.SLog; import me.xiaopan.sketch.cache.DiskCache; import me.xiaopan.sketch.util.SketchUtils; /** * 下载Helper,负责组织、收集、初始化下载参数,最后执行commit()提交请求 */ public class DownloadHelper { protected String logName = "DownloadHelper"; protected Sketch sketch; protected boolean sync; protected DownloadInfo downloadInfo = new DownloadInfo(); protected DownloadOptions downloadOptions = new DownloadOptions(); protected DownloadListener downloadListener; protected DownloadProgressListener downloadProgressListener; public DownloadHelper(Sketch sketch, String uri) { this.sketch = sketch; this.downloadInfo.reset(uri); } /** * 禁用磁盘缓存 */ @SuppressWarnings("unused") public DownloadHelper disableCacheInDisk() { downloadOptions.setCacheInDiskDisabled(true); return this; } /** * 设置请求Level */ @SuppressWarnings("unused") public DownloadHelper requestLevel(RequestLevel requestLevel) { if (requestLevel != null) { downloadOptions.setRequestLevel(requestLevel); downloadOptions.setRequestLevelFrom(null); } return this; } /** * 批量设置下载参数,这会是一个合并的过程,并不会完全覆盖 */ public DownloadHelper options(DownloadOptions newOptions) { downloadOptions.merge(newOptions); return this; } /** * 批量设置下载参数,你只需要提前将DownloadOptions通过Sketch.putDownloadOptions()方法存起来, * 然后在这里指定其名称即可,另外这会是一个合并的过程,并不会完全覆盖 */ @SuppressWarnings("unused") public DownloadHelper optionsByName(Enum<?> optionsName) { return options(Sketch.getDownloadOptions(optionsName)); } /** * 设置下载监听器 */ public DownloadHelper listener(DownloadListener downloadListener) { this.downloadListener = downloadListener; return this; } /** * 设置下载进度监听器 */ @SuppressWarnings("unused") public DownloadHelper downloadProgressListener(DownloadProgressListener downloadProgressListener) { this.downloadProgressListener = downloadProgressListener; return this; } /** * 同步处理 */ @SuppressWarnings("unused") public DownloadHelper sync() { this.sync = true; return this; } /** * 提交 */ public DownloadRequest commit() { if (sync && SketchUtils.isMainThread()) { throw new IllegalStateException("Cannot sync perform the download in the UI thread "); } CallbackHandler.postCallbackStarted(downloadListener, sync); preProcess(); if (!checkUri()) { return null; } if (!checkDiskCache()) { return null; } return submitRequest(); } /** * 对属性进行预处理 */ protected void preProcess() { // 暂停下载对于下载请求并不起作用,就相当于暂停加载对加载请求并不起作用一样,因此这里不予处理 // 根据URI和下载选项生成请求key if (downloadInfo.getKey() == null) { downloadInfo.setKey(SketchUtils.makeRequestKey(downloadInfo.getUri(), downloadOptions)); } } private boolean checkUri() { if (downloadInfo.getUri() == null || "".equals(downloadInfo.getUri().trim())) { if (SLogType.REQUEST.isEnabled()) { SLog.e(SLogType.REQUEST, logName, "uri is null or empty"); } CallbackHandler.postCallbackError(downloadListener, ErrorCause.URI_NULL_OR_EMPTY, sync); return false; } if (downloadInfo.getUriScheme() == null) { SLog.e(SLogType.REQUEST, logName, "unknown uri scheme. %s", downloadInfo.getUri()); CallbackHandler.postCallbackError(downloadListener, ErrorCause.URI_NO_SUPPORT, sync); return false; } if (downloadInfo.getUriScheme() != UriScheme.NET) { if (SLogType.REQUEST.isEnabled()) { SLog.e(SLogType.REQUEST, logName, "only support http ot https. %s", downloadInfo.getUri()); } CallbackHandler.postCallbackError(downloadListener, ErrorCause.URI_NO_SUPPORT, sync); return false; } return true; } private boolean checkDiskCache() { if (!downloadOptions.isCacheInDiskDisabled()) { DiskCache diskCache = sketch.getConfiguration().getDiskCache(); DiskCache.Entry diskCacheEntry = diskCache.get(downloadInfo.getDiskCacheKey()); if (diskCacheEntry != null) { if (SLogType.REQUEST.isEnabled()) { SLog.i(SLogType.REQUEST, logName, "image download completed. %s", downloadInfo.getKey()); } if (downloadListener != null) { DownloadResult result = new DownloadResult(diskCacheEntry, ImageFrom.DISK_CACHE); downloadListener.onCompleted(result); } return false; } } return true; } private DownloadRequest submitRequest() { RequestFactory requestFactory = sketch.getConfiguration().getRequestFactory(); DownloadRequest request = requestFactory.newDownloadRequest(sketch, downloadInfo, downloadOptions, downloadListener, downloadProgressListener); request.setSync(sync); request.submit(); return request; } }
[ "980322048@qq.com" ]
980322048@qq.com
16710d00e5949603fb0ae5f193f2aaa69c353f57
f3dfc9dcfb7c4cbdb38ab851e3bb74a06871bf46
/src/com/huiyee/esite/dao/imp/RmbRuleDaoImpl.java
7fab7d9f51b0e6a29409e9430e7de96b3bfe3744
[]
no_license
yilaoban/hy_esite2.0
967f96daf28a0b7f99404398ef7ecee52ff3b97a
7b5a36bf8b998140436c92ddd9200af7e382f831
refs/heads/master
2021-01-11T19:59:03.348983
2017-07-13T09:44:01
2017-07-13T09:44:01
79,436,860
3
2
null
null
null
null
UTF-8
Java
false
false
2,846
java
package com.huiyee.esite.dao.imp; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.RowMapper; import com.huiyee.esite.dao.IRmbRuleDao; import com.huiyee.esite.model.BalanceRule; import com.huiyee.esite.util.Arith; public class RmbRuleDaoImpl implements IRmbRuleDao { private JdbcTemplate jdbcTemplate; public void setJdbcTemplate(JdbcTemplate jdbcTemplate) { this.jdbcTemplate = jdbcTemplate; } @Override public List<BalanceRule> findBalanceRuleListByOwner(long owner) { String sql = "select * from es_hy_user_balance_rule where owner = ?"; Object[] params = {owner}; return jdbcTemplate.query(sql, params, new RowMapper(){ @Override public Object mapRow(ResultSet rs, int arg1) throws SQLException { BalanceRule r = new BalanceRule(); r.setId(rs.getLong("id")); r.setOwner(rs.getLong("owner")); r.setRmb(rs.getInt("rmb")); r.setGetrmb(rs.getInt("getrmb")); r.setGetjf(rs.getInt("getjf")); int total = rs.getInt("rmb") + rs.getInt("getrmb"); if(total > 0){ double bilu = Arith.div(rs.getInt("rmb"),total,2); r.setBilu( Arith.mul(bilu,10)); } return r; } }); } @Override public int delRmbRule(long ruleid,long owner) { String sql = "delete from es_hy_user_balance_rule where id = ? and owner = ?"; Object[] params = {ruleid,owner}; return jdbcTemplate.update(sql, params); } @Override public int saveRmbRule(BalanceRule rule, long owner) { String sql = "insert into es_hy_user_balance_rule(owner,rmb,getrmb,getjf) values(?,?,?,?)"; Object[] params = {owner,rule.getRmb(),rule.getGetrmb(),rule.getGetjf()}; return jdbcTemplate.update(sql, params); } @Override public BalanceRule findRuleById(long ruleid,long owner) { String sql = "select * from es_hy_user_balance_rule where id = ? and owner = ?"; Object[] params = {ruleid,owner}; List<BalanceRule> list = jdbcTemplate.query(sql, params, new RowMapper(){ @Override public Object mapRow(ResultSet rs, int arg1) throws SQLException { BalanceRule r = new BalanceRule(); r.setId(rs.getLong("id")); r.setOwner(rs.getLong("owner")); r.setRmb(rs.getInt("rmb")); r.setGetrmb(rs.getInt("getrmb")); r.setGetjf(rs.getInt("getjf")); return r; } }); if(list != null && list.size() > 0){ return list.get(0); } return null; } @Override public int updateRmbRule(BalanceRule rule,long owner) { String sql = "update es_hy_user_balance_rule set rmb = ?,getrmb=?,getjf=? where id = ? and owner = ?"; Object[] params = {rule.getRmb(),rule.getGetrmb(),rule.getGetjf(),rule.getId(),owner}; return jdbcTemplate.update(sql, params); } }
[ "huangjian@huangjian.yinpiao.com" ]
huangjian@huangjian.yinpiao.com
9bad9306a76ebcfa358bd5660ee62efb9b7395ad
56ae790ef1b0a65643a5e8c7e14a6f5d2e88cbdd
/financeiro-caixa-banco/src/main/java/com/t2tierp/model/bean/financeiro/FinParcelaPagar.java
6dfdae97cdcb2578f5a994fc9c0509398e5a14bc
[ "MIT" ]
permissive
herculeshssj/T2Ti-ERP-2.0-Java-WEB
6751db19b82954116f855fe107c4ac188524d7d5
275205e05a0522a2ba9c36d36ba577230e083e72
refs/heads/master
2023-01-04T21:06:24.175662
2020-10-30T11:00:46
2020-10-30T11:00:46
286,570,333
0
0
null
2020-08-10T20:16:56
2020-08-10T20:16:56
null
UTF-8
Java
false
false
7,063
java
/* * The MIT License * * Copyright: Copyright (C) 2014 T2Ti.COM * * 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. * * The author may be contacted at: t2ti.com@gmail.com * * @author Claudio de Barros (T2Ti.com) * @version 2.0 */ package com.t2tierp.model.bean.financeiro; import com.t2tierp.model.bean.cadastros.ContaCaixa; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; import java.util.Set; import javax.persistence.Basic; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; @Entity @Table(name = "FIN_PARCELA_PAGAR") public class FinParcelaPagar implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "ID") private Integer id; @Column(name = "NUMERO_PARCELA") private Integer numeroParcela; @Temporal(TemporalType.DATE) @Column(name = "DATA_EMISSAO") private Date dataEmissao; @Temporal(TemporalType.DATE) @Column(name = "DATA_VENCIMENTO") private Date dataVencimento; @Temporal(TemporalType.DATE) @Column(name = "DESCONTO_ATE") private Date descontoAte; @Column(name = "SOFRE_RETENCAO") private String sofreRetencao; @Column(name = "VALOR") private BigDecimal valor; @Column(name = "TAXA_JURO") private BigDecimal taxaJuro; @Column(name = "TAXA_MULTA") private BigDecimal taxaMulta; @Column(name = "TAXA_DESCONTO") private BigDecimal taxaDesconto; @Column(name = "VALOR_JURO") private BigDecimal valorJuro; @Column(name = "VALOR_MULTA") private BigDecimal valorMulta; @Column(name = "VALOR_DESCONTO") private BigDecimal valorDesconto; @JoinColumn(name = "ID_FIN_STATUS_PARCELA", referencedColumnName = "ID") @ManyToOne(optional = false) private FinStatusParcela finStatusParcela; @JoinColumn(name = "ID_FIN_LANCAMENTO_PAGAR", referencedColumnName = "ID") @ManyToOne(optional = false) private FinLancamentoPagar finLancamentoPagar; @JoinColumn(name = "ID_CONTA_CAIXA", referencedColumnName = "ID") @ManyToOne(optional = false) private ContaCaixa contaCaixa; @OneToMany(fetch = FetchType.LAZY, mappedBy = "finParcelaPagar", cascade = CascadeType.ALL, orphanRemoval = true) private Set<FinParcelaPagamento> listaFinParcelaPagamento; public FinParcelaPagar() { } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getNumeroParcela() { return numeroParcela; } public void setNumeroParcela(Integer numeroParcela) { this.numeroParcela = numeroParcela; } public Date getDataEmissao() { return dataEmissao; } public void setDataEmissao(Date dataEmissao) { this.dataEmissao = dataEmissao; } public Date getDataVencimento() { return dataVencimento; } public void setDataVencimento(Date dataVencimento) { this.dataVencimento = dataVencimento; } public Date getDescontoAte() { return descontoAte; } public void setDescontoAte(Date descontoAte) { this.descontoAte = descontoAte; } public String getSofreRetencao() { return sofreRetencao; } public void setSofreRetencao(String sofreRetencao) { this.sofreRetencao = sofreRetencao; } public BigDecimal getValor() { return valor; } public void setValor(BigDecimal valor) { this.valor = valor; } public BigDecimal getTaxaJuro() { return taxaJuro; } public void setTaxaJuro(BigDecimal taxaJuro) { this.taxaJuro = taxaJuro; } public BigDecimal getTaxaMulta() { return taxaMulta; } public void setTaxaMulta(BigDecimal taxaMulta) { this.taxaMulta = taxaMulta; } public BigDecimal getTaxaDesconto() { return taxaDesconto; } public void setTaxaDesconto(BigDecimal taxaDesconto) { this.taxaDesconto = taxaDesconto; } public BigDecimal getValorJuro() { return valorJuro; } public void setValorJuro(BigDecimal valorJuro) { this.valorJuro = valorJuro; } public BigDecimal getValorMulta() { return valorMulta; } public void setValorMulta(BigDecimal valorMulta) { this.valorMulta = valorMulta; } public BigDecimal getValorDesconto() { return valorDesconto; } public void setValorDesconto(BigDecimal valorDesconto) { this.valorDesconto = valorDesconto; } public FinStatusParcela getFinStatusParcela() { return finStatusParcela; } public void setFinStatusParcela(FinStatusParcela finStatusParcela) { this.finStatusParcela = finStatusParcela; } public FinLancamentoPagar getFinLancamentoPagar() { return finLancamentoPagar; } public void setFinLancamentoPagar(FinLancamentoPagar finLancamentoPagar) { this.finLancamentoPagar = finLancamentoPagar; } public ContaCaixa getContaCaixa() { return contaCaixa; } public void setContaCaixa(ContaCaixa contaCaixa) { this.contaCaixa = contaCaixa; } @Override public String toString() { return "com.t2tierp.model.bean.financeiro.FinParcelaPagar[id=" + id + "]"; } public Set<FinParcelaPagamento> getListaFinParcelaPagamento() { return listaFinParcelaPagamento; } public void setListaFinParcelaPagamento(Set<FinParcelaPagamento> listaFinParcelaPagamento) { this.listaFinParcelaPagamento = listaFinParcelaPagamento; } }
[ "claudiobsi@gmail.com" ]
claudiobsi@gmail.com
001bd124c6d453b91c12602dc8c96f07b44e2dbf
b7429cb7d9f3197d33121d366050183dd7447111
/app/src/main/java/com/hex/express/iwant/bean/MyloginBean.java
37ee5a0e2ff2efa843b481150687459afd19706b
[]
no_license
hexiaoleione/biaowang_studio
28c719909667f131637205de79bb8cc72fc52545
1735f31cd4e25ba5e08dd117ba7492186dcee8b0
refs/heads/master
2021-07-10T00:03:42.022656
2019-02-12T03:35:51
2019-02-12T03:35:51
144,809,142
0
0
null
null
null
null
UTF-8
Java
false
false
1,983
java
package com.hex.express.iwant.bean; import java.util.ArrayList; import java.util.List; public class MyloginBean { public List<Data> data = new ArrayList<Data>(); public List<Data> getData() { return data; } public void setData(List<Data> data) { this.data = data; } public class Data{ public int recId;//信息id public int userId;//发件人id public String userToId;//wuliurend public String cargoName;//货物名称 public String startPlace;//货物起始地点 public String entPlace;//货物到达地点 public Boolean takeCargo;//是否需要取货 public Boolean sendCargo;//是否需要送货 public String cargoWeight;//货物重量 public String cargoVolume;//货物体积 public String takeTime;//取货时间 public String arriveTime;//到达时间 public String takeName;//收货人姓名 public String takeMobile;//收货电话 public String publishTime; //推送时间 public String status;//是否发布 public String quotationNumber; public String billCode; public String whether; public String premium; public String category; public String insurance; public String cargoCost; //价值 public double insureCost;//保险费 public String sendName; public String sendMobile; public String carNumImg; public String sendPerson; //普通版发件人姓名 public String sendPhone; //普通版发件人电话 public String pdfURL; public String remark;//保单号 public String cargoNumber;// public String appontSpace; public String length; public String wide; public String high; public String weight; public String cargoSize; public String carType; public String carName; public String tem; } public String message; public boolean success; public int errCode; }
[ "798711147@qq.com" ]
798711147@qq.com
1be02e821bc5d8af26c15d6ae12ddee983fa0b75
cbb75ebbee3fb80a5e5ad842b7a4bb4a5a1ec5f5
/com/jingdong/crash/inner/d.java
f2fea50e8055a0036a712185f6fd444561d0b14a
[]
no_license
killbus/jd_decompile
9cc676b4be9c0415b895e4c0cf1823e0a119dcef
50c521ce6a2c71c37696e5c131ec2e03661417cc
refs/heads/master
2022-01-13T03:27:02.492579
2018-05-14T11:21:30
2018-05-14T11:21:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,952
java
package com.jingdong.crash.inner; import android.app.ActivityManager; import android.app.ActivityManager.RunningAppProcessInfo; import android.content.Context; import android.os.Process; import android.text.TextUtils; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.util.List; class d { public static String a(int i) { FileNotFoundException e; InputStreamReader inputStreamReader; IOException e2; Throwable th; BufferedReader bufferedReader = null; int i2 = 0; InputStreamReader inputStreamReader2; BufferedReader bufferedReader2; try { inputStreamReader2 = new InputStreamReader(new FileInputStream("/proc/" + i + "/cmdline")); try { bufferedReader2 = new BufferedReader(inputStreamReader2); try { char[] cArr = new char[64]; bufferedReader2.read(cArr); int length = cArr.length; int i3 = 0; while (i2 < length && cArr[i2] != '\u0000') { i3++; i2++; } String str = new String(cArr, 0, i3); if (inputStreamReader2 != null) { try { inputStreamReader2.close(); } catch (IOException e3) { e3.printStackTrace(); } } if (bufferedReader2 == null) { return str; } try { bufferedReader2.close(); return str; } catch (IOException e4) { return str; } } catch (FileNotFoundException e5) { e = e5; inputStreamReader = inputStreamReader2; try { e.printStackTrace(); if (inputStreamReader != null) { try { inputStreamReader.close(); } catch (IOException e22) { e22.printStackTrace(); } } if (bufferedReader2 != null) { try { bufferedReader2.close(); } catch (IOException e6) { } } return ""; } catch (Throwable th2) { th = th2; inputStreamReader2 = inputStreamReader; bufferedReader = bufferedReader2; if (inputStreamReader2 != null) { try { inputStreamReader2.close(); } catch (IOException e7) { e7.printStackTrace(); } } if (bufferedReader != null) { try { bufferedReader.close(); } catch (IOException e8) { } } throw th; } } catch (IOException e9) { e22 = e9; bufferedReader = bufferedReader2; try { e22.printStackTrace(); if (inputStreamReader2 != null) { try { inputStreamReader2.close(); } catch (IOException e222) { e222.printStackTrace(); } } if (bufferedReader != null) { try { bufferedReader.close(); } catch (IOException e10) { } } return ""; } catch (Throwable th3) { th = th3; if (inputStreamReader2 != null) { inputStreamReader2.close(); } if (bufferedReader != null) { bufferedReader.close(); } throw th; } } catch (Throwable th4) { th = th4; bufferedReader = bufferedReader2; if (inputStreamReader2 != null) { inputStreamReader2.close(); } if (bufferedReader != null) { bufferedReader.close(); } throw th; } } catch (FileNotFoundException e11) { e = e11; bufferedReader2 = null; inputStreamReader = inputStreamReader2; e.printStackTrace(); if (inputStreamReader != null) { inputStreamReader.close(); } if (bufferedReader2 != null) { bufferedReader2.close(); } return ""; } catch (IOException e12) { e222 = e12; e222.printStackTrace(); if (inputStreamReader2 != null) { inputStreamReader2.close(); } if (bufferedReader != null) { bufferedReader.close(); } return ""; } } catch (FileNotFoundException e13) { e = e13; bufferedReader2 = null; e.printStackTrace(); if (inputStreamReader != null) { inputStreamReader.close(); } if (bufferedReader2 != null) { bufferedReader2.close(); } return ""; } catch (IOException e14) { e222 = e14; inputStreamReader2 = null; e222.printStackTrace(); if (inputStreamReader2 != null) { inputStreamReader2.close(); } if (bufferedReader != null) { bufferedReader.close(); } return ""; } catch (Throwable th5) { th = th5; inputStreamReader2 = null; if (inputStreamReader2 != null) { inputStreamReader2.close(); } if (bufferedReader != null) { bufferedReader.close(); } throw th; } } public static boolean a(Context context) { List<RunningAppProcessInfo> runningAppProcesses = ((ActivityManager) context.getSystemService("activity")).getRunningAppProcesses(); if (runningAppProcesses == null) { return false; } for (RunningAppProcessInfo runningAppProcessInfo : runningAppProcesses) { if (runningAppProcessInfo.processName.equals(context.getPackageName())) { return runningAppProcessInfo.importance == 100; } } return false; } public static boolean b(Context context) { if (context == null) { return false; } CharSequence trim = a(Process.myPid()).trim(); return !TextUtils.isEmpty(trim) && TextUtils.equals(trim, context.getPackageName()); } }
[ "13511577582@163.com" ]
13511577582@163.com
51ec52983a833de894cf4e3ef0b47928c791bbd8
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
/bazaar8.apk-decompiled/sources/com/farsitel/bazaar/analytics/model/what/InstalledAppsItemClick.java
4f595ea7508b83c7052855574c924f41b12e0ce8
[]
no_license
BaseMax/PopularAndroidSource
a395ccac5c0a7334d90c2594db8273aca39550ed
bcae15340907797a91d39f89b9d7266e0292a184
refs/heads/master
2020-08-05T08:19:34.146858
2019-10-06T20:06:31
2019-10-06T20:06:31
212,433,298
2
0
null
null
null
null
UTF-8
Java
false
false
384
java
package com.farsitel.bazaar.analytics.model.what; import h.f.b.j; /* compiled from: ItemClick.kt */ public final class InstalledAppsItemClick extends ItemClick { /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public InstalledAppsItemClick(String str) { super("installed_apps", str, null); j.b(str, "referrer"); } }
[ "MaxBaseCode@gmail.com" ]
MaxBaseCode@gmail.com
220b00422e89d8b182b142c2b118a9b90edce641
01184bde1e356176bf218beb38d243e568214f38
/BitSetCheckBoxes/src/java/example/MainPanel.java
76cf8fe63555a5d4d16b86e3a7134bc410e49436
[ "MIT" ]
permissive
basebandit/java-swing-tips
a8a7ebe8fc06f7e1ae160050b7d14d75ca1d136d
1d07ce3fd40ff4433af9ff926dd18504766ebaa9
refs/heads/master
2020-04-01T18:39:37.845578
2018-10-17T10:50:36
2018-10-17T10:50:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,971
java
package example; // -*- mode:java; encoding:utf-8 -*- // vim:set fileencoding=utf-8: // @homepage@ import java.awt.*; import java.awt.event.*; import java.util.BitSet; import java.util.Collections; import java.util.stream.IntStream; import javax.swing.*; import javax.swing.undo.AbstractUndoableEdit; import javax.swing.undo.CannotRedoException; import javax.swing.undo.CannotUndoException; import javax.swing.undo.UndoManager; import javax.swing.undo.UndoableEditSupport; public class MainPanel extends JPanel { // Long.MAX_VALUE // 0b111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111 // protected static final int BIT_LENGTH = 63; protected static final int BIT_LENGTH = 72; protected BitSet status = BitSet.valueOf(new long[] {Long.valueOf("111000111", 2)}); protected static final String ZEROPAD = String.join("", Collections.nCopies(BIT_LENGTH, "0")); protected final transient UndoableEditSupport undoSupport = new UndoableEditSupport(); private final JLabel label = new JLabel(print(status)); private final JPanel panel = new JPanel(new GridLayout(0, 8)); private final UndoManager um = new UndoManager(); private final Action undoAction = new UndoAction(um); private final Action redoAction = new RedoAction(um); private final Action selectAllAction = new AbstractAction("select all") { @Override public void actionPerformed(ActionEvent e) { BitSet newValue = new BitSet(BIT_LENGTH); newValue.set(0, BIT_LENGTH, true); undoSupport.postEdit(new StatusEdit(status, newValue)); updateCheckBoxes(newValue); } }; private final Action clearAllAction = new AbstractAction("clear all") { @Override public void actionPerformed(ActionEvent e) { BitSet newValue = new BitSet(BIT_LENGTH); undoSupport.postEdit(new StatusEdit(status, newValue)); updateCheckBoxes(newValue); } }; public MainPanel() { super(new BorderLayout()); undoSupport.addUndoableEditListener(um); Box box = Box.createHorizontalBox(); box.add(Box.createHorizontalGlue()); box.add(new JButton(undoAction)); box.add(Box.createHorizontalStrut(2)); box.add(new JButton(redoAction)); box.add(Box.createHorizontalStrut(2)); box.add(new JButton(selectAllAction)); box.add(Box.createHorizontalStrut(2)); box.add(new JButton(clearAllAction)); box.add(Box.createHorizontalStrut(2)); IntStream.range(0, BIT_LENGTH).forEach(i -> { JCheckBox c = new JCheckBox(Integer.toString(i), status.get(i)); c.addActionListener(e -> { JCheckBox cb = (JCheckBox) e.getSource(); BitSet newValue = status.get(0, BIT_LENGTH); newValue.set(i, cb.isSelected()); undoSupport.postEdit(new StatusEdit(status, newValue)); status = newValue; label.setText(print(status)); }); panel.add(c); }); label.setFont(label.getFont().deriveFont(8f)); add(label, BorderLayout.NORTH); add(new JScrollPane(panel)); add(box, BorderLayout.SOUTH); setPreferredSize(new Dimension(320, 240)); } protected final void updateCheckBoxes(BitSet value) { status = value; for (int i = 0; i < BIT_LENGTH; i++) { ((JCheckBox) panel.getComponent(i)).setSelected(status.get(i)); } label.setText(print(status)); } private class StatusEdit extends AbstractUndoableEdit { private final BitSet oldValue; private final BitSet newValue; protected StatusEdit(BitSet oldValue, BitSet newValue) { super(); this.oldValue = oldValue; this.newValue = newValue; } @Override public void undo() throws CannotUndoException { super.undo(); updateCheckBoxes(oldValue); } @Override public void redo() throws CannotRedoException { super.redo(); updateCheckBoxes(newValue); } } private static String print(BitSet bitSet) { StringBuilder buf = new StringBuilder(); for (long lv: bitSet.toLongArray()) { buf.insert(0, Long.toUnsignedString(lv, 2)); } String b = buf.toString(); int count = bitSet.cardinality(); return "<html>0b" + ZEROPAD.substring(b.length()) + b + "<br/> count: " + count; } public static void main(String... args) { EventQueue.invokeLater(new Runnable() { @Override public void run() { createAndShowGui(); } }); } public static void createAndShowGui() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } JFrame frame = new JFrame("@title@"); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); frame.getContentPane().add(new MainPanel()); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); } } class UndoAction extends AbstractAction { private final UndoManager um; protected UndoAction(UndoManager um) { super("undo"); this.um = um; } @Override public void actionPerformed(ActionEvent e) { if (um.canUndo()) { um.undo(); } } } class RedoAction extends AbstractAction { private final UndoManager um; protected RedoAction(UndoManager um) { super("redo"); this.um = um; } @Override public void actionPerformed(ActionEvent e) { if (um.canRedo()) { um.redo(); } } }
[ "aterai@outlook.com" ]
aterai@outlook.com
fd85560168cdd120f9ea2a6f193997ccd522f722
e1be07c04d74336448787700ff6eb16028f421fb
/lib/JP/go/ipa/oz/user/ide/CBClassListListener_if.java
ace093d2813374c0173051bc98efd32740a6f136
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
yoshiylife/OZonJava
0e66a989556d359361d02d74641968c076b24565
b0d89353a8bf1224a9a8da490409c5f62dc2d017
refs/heads/master
2021-01-10T01:06:37.338257
2016-02-18T18:47:12
2016-02-18T18:47:12
52,029,219
0
0
null
null
null
null
UTF-8
Java
false
false
172
java
package JP.go.ipa.oz.user.ide; public interface CBClassListListener_if extends JP.go.ipa.oz.lib.standard._ActionListener_if { static final boolean _final_ = true; }
[ "yoshiylife@gmail.com" ]
yoshiylife@gmail.com
a68a74b844266b2c866bdc5641b1570734ee5412
71975999c9d702a0883ec9038ce3e76325928549
/src2.4.0/src/main/java/defpackage/ex.java
9db55e996a7007a9e5651e441d764df750792874
[]
no_license
XposedRunner/PhysicalFitnessRunner
dc64179551ccd219979a6f8b9fe0614c29cd61de
cb037e59416d6c290debbed5ed84c956e705e738
refs/heads/master
2020-07-15T18:18:23.001280
2019-09-02T04:21:34
2019-09-02T04:21:34
205,620,387
3
2
null
null
null
null
UTF-8
Java
false
false
3,084
java
package defpackage; import android.content.Context; import android.support.v4.content.ContextCompat; import android.support.v7.widget.RecyclerView.Adapter; import android.support.v7.widget.RecyclerView.ViewHolder; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.zjwh.android_wh_physicalfitness.R; import com.zjwh.android_wh_physicalfitness.entity.DailySignBean; import java.util.ArrayList; import java.util.List; import java.util.Locale; /* compiled from: SignDialogAdapter */ /* renamed from: ex */ public class ex extends Adapter<O000000o> { private List<DailySignBean> O000000o = new ArrayList(); /* compiled from: SignDialogAdapter */ /* renamed from: ex$O000000o */ class O000000o extends ViewHolder { private TextView O00000Oo; private TextView O00000o0; public O000000o(View view) { super(view); this.O00000Oo = (TextView) view.findViewById(R.id.tvDays); this.O00000o0 = (TextView) view.findViewById(R.id.tvScore); } } /* renamed from: O000000o */ public O000000o onCreateViewHolder(ViewGroup viewGroup, int i) { return new O000000o(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.sign_dialog_list_item, viewGroup, false)); } /* renamed from: O000000o */ public void onBindViewHolder(O000000o o000000o, int i) { DailySignBean dailySignBean = (DailySignBean) this.O000000o.get(i); if (dailySignBean != null) { Context context; o000000o.O00000Oo.setText(String.format(Locale.getDefault(), "第%d天", new Object[]{Integer.valueOf(dailySignBean.getDay())})); TextView O000000o = o000000o.O00000Oo; boolean isSelected = dailySignBean.isSelected(); int i2 = R.color.white; O000000o.setTextColor(isSelected ? ContextCompat.getColor(o000000o.itemView.getContext(), R.color.white) : ContextCompat.getColor(o000000o.itemView.getContext(), R.color.text_color_label)); o000000o.O00000o0.setText(String.format(Locale.getDefault(), "+%d", new Object[]{Integer.valueOf(dailySignBean.getScore())})); O000000o = o000000o.O00000o0; if (dailySignBean.isSelected()) { context = o000000o.itemView.getContext(); } else { context = o000000o.itemView.getContext(); i2 = R.color.sport_green; } O000000o.setTextColor(ContextCompat.getColor(context, i2)); o000000o.itemView.setBackgroundResource(dailySignBean.isSelected() ? R.drawable.sign_dialog_list_select_bg : R.drawable.sign_dialog_list_unselect_bg); } } public void O000000o(List<DailySignBean> list) { this.O000000o.clear(); this.O000000o.addAll(list); notifyDataSetChanged(); } public int getItemCount() { return this.O000000o == null ? 0 : this.O000000o.size(); } }
[ "xr_master@mail.com" ]
xr_master@mail.com
da53ff08948cf9f1bb40eabc4d651b4b93eabd15
8dba0a2b37be0545149586516df1cffa85d9e383
/app/src/main/java/com/example/mrlanguageturkish/c_cartoons_1_2_14.java
13d110bfcefc2959ab261bc1b82b1c372a9fc03c
[]
no_license
ghomdoust/MrLanguageTurkish
9e2ee449ba77d99057f9e3903696f791ef91ce13
ae69f0922d06a9537ec7a5b4b5a05760637f6760
refs/heads/master
2023-03-30T20:38:01.303512
2021-04-06T23:16:20
2021-04-06T23:16:20
355,352,171
0
0
null
null
null
null
UTF-8
Java
false
false
5,623
java
package com.example.mrlanguageturkish; import androidx.appcompat.app.AppCompatActivity; import android.annotation.SuppressLint; import android.app.DownloadManager; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebChromeClient; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.FrameLayout; import android.widget.ProgressBar; import android.widget.Toast; import ir.aghayezaban.mrlanguageturkish.R; public class c_cartoons_1_2_14 extends AppCompatActivity { WebView mWebView; ProgressBar progressBar; @SuppressLint("SetJavaScriptEnabled") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.c_cartoons_1_2_14); progressBar = (ProgressBar) findViewById(R.id.progressbar); mWebView = (WebView) findViewById(R.id.mWebView); progressBar.setVisibility(View.VISIBLE); mWebView.setWebViewClient(new c_cartoons_1_2_14.Browser_home()); mWebView.setWebChromeClient(new c_cartoons_1_2_14.MyChrome()); WebSettings webSettings = mWebView.getSettings(); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setLoadWithOverviewMode(true); mWebView.getSettings().setUseWideViewPort(true); mWebView.getSettings().setSupportZoom(true); mWebView.getSettings().setBuiltInZoomControls(true); mWebView.getSettings().setDisplayZoomControls(false); mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); mWebView.setScrollbarFadingEnabled(false); webSettings.setJavaScriptEnabled(true); webSettings.setAllowFileAccess(true); webSettings.setAppCacheEnabled(true); loadWebsite(); } private void loadWebsite() { ConnectivityManager cm = (ConnectivityManager) getApplication().getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo netInfo = cm.getActiveNetworkInfo(); if (netInfo != null && netInfo.isConnectedOrConnecting()) { mWebView.loadUrl("https://aspb17.cdn.asset.aparat.com/aparat-video/a19507211f1ea5e4e7d9a43416ebc98121946772-480p.mp4"); } else { mWebView.setVisibility(View.GONE); } mWebView.setDownloadListener(new DownloadListener() { @Override public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { DownloadManager.Request myRequest = new DownloadManager.Request(Uri.parse(url)); myRequest.allowScanningByMediaScanner(); myRequest.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); DownloadManager myManager = (DownloadManager) getSystemService(DOWNLOAD_SERVICE); myManager.enqueue(myRequest); Toast.makeText(c_cartoons_1_2_14.this,"ویدیوی شما در حال بارگزاریست", Toast.LENGTH_SHORT).show(); } }); } class Browser_home extends WebViewClient { Browser_home() { } @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); } @Override public void onPageFinished(WebView view, String url) { setTitle(view.getTitle()); progressBar.setVisibility(View.GONE); super.onPageFinished(view, url); } } private class MyChrome extends WebChromeClient { private View mCustomView; private WebChromeClient.CustomViewCallback mCustomViewCallback; protected FrameLayout mFullscreenContainer; private int mOriginalOrientation; private int mOriginalSystemUiVisibility; MyChrome() {} public Bitmap getDefaultVideoPoster() { if (mCustomView == null) { return null; } return BitmapFactory.decodeResource(getApplicationContext().getResources(), 2130837573); } public void onHideCustomView() { ((FrameLayout)getWindow().getDecorView()).removeView(this.mCustomView); this.mCustomView = null; getWindow().getDecorView().setSystemUiVisibility(this.mOriginalSystemUiVisibility); setRequestedOrientation(this.mOriginalOrientation); this.mCustomViewCallback.onCustomViewHidden(); this.mCustomViewCallback = null; } public void onShowCustomView(View paramView, WebChromeClient.CustomViewCallback paramCustomViewCallback) { if (this.mCustomView != null) { onHideCustomView(); return; } this.mCustomView = paramView; this.mOriginalSystemUiVisibility = getWindow().getDecorView().getSystemUiVisibility(); this.mOriginalOrientation = getRequestedOrientation(); this.mCustomViewCallback = paramCustomViewCallback; ((FrameLayout)getWindow().getDecorView()).addView(this.mCustomView, new FrameLayout.LayoutParams(-1, -1)); getWindow().getDecorView().setSystemUiVisibility(3846); } } }
[ "47427371+ghomdoust@users.noreply.github.com" ]
47427371+ghomdoust@users.noreply.github.com
3572fce0f82ea96b9221172e71f61766608fe0c4
dd80a584130ef1a0333429ba76c1cee0eb40df73
/development/samples/HelloEffects/src/com/example/android/mediafx/GLToolbox.java
0062fa1895b251e0d5c7dd53c5aa2ea960a20df6
[ "MIT", "Apache-2.0" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
Java
false
false
3,356
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.example.android.mediafx; import android.opengl.GLES20; public class GLToolbox { public static int loadShader(int shaderType, String source) { int shader = GLES20.glCreateShader(shaderType); if (shader != 0) { GLES20.glShaderSource(shader, source); GLES20.glCompileShader(shader); int[] compiled = new int[1]; GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compiled, 0); if (compiled[0] == 0) { String info = GLES20.glGetShaderInfoLog(shader); GLES20.glDeleteShader(shader); shader = 0; throw new RuntimeException("Could not compile shader " + shaderType + ":" + info); } } return shader; } public static int createProgram(String vertexSource, String fragmentSource) { int vertexShader = loadShader(GLES20.GL_VERTEX_SHADER, vertexSource); if (vertexShader == 0) { return 0; } int pixelShader = loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentSource); if (pixelShader == 0) { return 0; } int program = GLES20.glCreateProgram(); if (program != 0) { GLES20.glAttachShader(program, vertexShader); checkGlError("glAttachShader"); GLES20.glAttachShader(program, pixelShader); checkGlError("glAttachShader"); GLES20.glLinkProgram(program); int[] linkStatus = new int[1]; GLES20.glGetProgramiv(program, GLES20.GL_LINK_STATUS, linkStatus, 0); if (linkStatus[0] != GLES20.GL_TRUE) { String info = GLES20.glGetProgramInfoLog(program); GLES20.glDeleteProgram(program); program = 0; throw new RuntimeException("Could not link program: " + info); } } return program; } public static void checkGlError(String op) { int error; while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { throw new RuntimeException(op + ": glError " + error); } } public static void initTexParams() { GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR); GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR); GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE); GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE); } }
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
8927045527cef94937ac2d9a6d9af5c9974647d2
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-58b-8-1-MOEAD-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/optimization/general/AbstractLeastSquaresOptimizer_ESTest_scaffolding.java
c0f8bb8f88c4ce950718e834dfb77be0c47a0b55
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
478
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Apr 08 09:19:07 UTC 2020 */ package org.apache.commons.math.optimization.general; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractLeastSquaresOptimizer_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
fa77ec5f9ed4e2997da333952d67ac1354103ee6
0a8b68908ef457f8b0c0ab18c1ec1b57b32e03e1
/creditEcoSystem/kernel/credit-third-interface/src/main/java/com/ctc/credit/blackgreylist/service/grayChain/CompanyInfoMatchChain.java
9dee177b23bfcce515c58ca332f5f15e787efc8b
[]
no_license
gspandy/c.r.e.d.it
68f33b347a4bd1cb6e110bf3123fb2674a4ad900
8095962d0f4b4443c884ef4a318f9d1aa818e0dc
refs/heads/master
2023-08-09T15:41:15.738503
2015-08-07T06:10:12
2015-08-07T06:10:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,976
java
package com.ctc.credit.blackgreylist.service.grayChain; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.ctc.credit.blackgreylist.pojo.HandleRequest; import com.ctc.credit.blackgreylist.service.IAbstractGrayMatchChain; import com.ctc.credit.blackgreylist.service.IBlkgrayListRoleService; /** * 匹配灰名单 B 类型 * @author zhangwenjun * */ @Component public class CompanyInfoMatchChain extends IAbstractGrayMatchChain { @Autowired private IBlkgrayListRoleService blkgrayListRoleServiceImpl; private List<Map<String,Object>> result; @Override public List<Map<String, Object>> doMatch(HandleRequest requestInfo) { result = new ArrayList<Map<String,Object>>(); // TODO Auto-generated method stub List<Map<String,Object>> matchResult = blkgrayListRoleServiceImpl.matchGrayCompanyInfo(requestInfo.getCompanyName(), requestInfo.getCompanyAddressDetail(), requestInfo.getCompanyPhone()); Map<String,Object> pTemp = null; //如果匹配到了则合并数据 Map<String,String> matchInfo = new HashMap<String,String>(); for(Map<String,Object> mr : matchResult){ String info = matchInfo.get(mr.get("TIGGER_SOURCE").toString()); matchInfo.put(mr.get("TIGGER_SOURCE").toString(), (info == null?"":info+" ")+mr.get("TIGGER_INFO")); } for(String key : matchInfo.keySet()){ Map<String,Object> mm = new HashMap<String,Object>(); mm.put("glistInfo", matchInfo.get(key)); mm.put("glistTrigger", key); mm.put("glistName", "疑似欺诈客户灰名单C"); mm.put("glistRole", "单位名称||单位地址||单位电话"); result.add(mm); } //如果没有下一级,直接返回结果 if(this.getNextChain() == null){ return result; }else{ result.addAll(this.getNextChain().doMatch(requestInfo)); } return result; } }
[ "sunhonglei01@chinatopcredit.com" ]
sunhonglei01@chinatopcredit.com
189aa89905dab7a9a376e644949667bf48bf5660
19f8e8acbde7cea252aadeeff1e97747ff966774
/app/src/main/java/fm/qian/michael/common/web/JavaScriptInterface.java
363942be6cb0c3f1f3c037e490a4868c228dd66d
[]
no_license
lv1107748200/michoel
c34a1edaff2e88a3e739566f92abe81fee27407f
1241c8818bbd349e01aaf8689e7efd1fd786d9ed
refs/heads/master
2020-04-01T00:35:12.428403
2018-10-30T10:36:40
2018-10-30T10:36:40
152,703,464
1
0
null
null
null
null
UTF-8
Java
false
false
721
java
package fm.qian.michael.common.web; import android.webkit.JavascriptInterface; /** * Created by 吕 on 2018/1/17. * webView.addJavascriptInterface(new SonicJavaScriptInterface(sonicSessionClient, intent), "sonic"); */ public class JavaScriptInterface extends Object{ private JsCallBack jsCallBack; public JavaScriptInterface(JsCallBack jsCallBack) { this.jsCallBack = jsCallBack; } // 1 回馈 2 签名 @JavascriptInterface public void setfFeedback(String operationTypeData) { if(null != jsCallBack){ jsCallBack.JscallBack(operationTypeData); } } public interface JsCallBack{ public void JscallBack(String operationTypeData); } }
[ "18203887023@163.com" ]
18203887023@163.com
cda210d09fe733020b91ffde974bc3e3ec5fc60f
5643e2dc3946ffb490ac8d9f9e5e27c386656f46
/app/src/main/java/android/luna/ViewUi/widget/SettingItemColorItem.java
1a6411840b9c79e15e26dfb47e7cc7e3ad765fe4
[]
no_license
cremlee/App
c22402df07a3e4ec483eed4ee3575cafd8899b69
454d5d43b27328282d18ffb6a66026dd0f0eeddc
refs/heads/master
2021-06-24T16:43:23.337350
2018-08-10T00:09:53
2018-08-10T00:09:53
143,685,409
0
0
null
null
null
null
UTF-8
Java
false
false
3,829
java
package android.luna.ViewUi.widget; import android.content.Context; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import evo.luna.android.R; public class SettingItemColorItem extends LinearLayout { private static final String TAG = "SettingItemTextView2"; private Context mContext; private TextView textView1; private TextView textView2; private View line; private String textTitle; // 前面的标题 private String textValue; // 后面的描述 private Drawable titleDrawable; // 标题图标,左边显示的图标,不设置不显示 private Drawable valueDrawable;// 描述的右箭头,不设置不显示 private boolean showLine; private int textBackground; // 背景色 private int textNameColor;// 文字颜色 public SettingItemColorItem(Context context) { super(context, null); this.mContext = context; } public SettingItemColorItem(Context context, AttributeSet attrs) { super(context, attrs); this.mContext = context; initViews(attrs); } private void initViews(AttributeSet attrs) { View view = LayoutInflater.from(mContext).inflate(R.layout.layout_setting_item_textview2, this, true); textView1 = (TextView) view.findViewById(R.id.textView1); textView2 = (TextView) view.findViewById(R.id.textView2); final TypedArray array = mContext.obtainStyledAttributes(attrs, R.styleable.SettingItemTextView2); setTextTitle(array.getString(R.styleable.SettingItemTextView2_textview2TextTitle)); setTextValue(array.getString(R.styleable.SettingItemTextView2_textview2TextValue)); setTextBackground(array.getColor(R.styleable.SettingItemTextView2_textview2TextBackground, 0xFFF)); setTextNameColor(array.getColor(R.styleable.SettingItemTextView2_textview2TextColor, 0xFF3C3127)); setTitleDrawable(array.getDrawable(R.styleable.SettingItemTextView2_textview2DrawbleLeft)); setValueDrawable(array.getDrawable(R.styleable.SettingItemTextView2_textview2DrawbleRight)); setShowLine(array.getBoolean(R.styleable.SettingItemTextView2_textview2Line, true)); array.recycle(); } public String getTextTitle() { return textTitle; } public TextView getTextView2() { return textView2; } public void setTextTitle(String textTitle) { this.textTitle = textTitle; textView1.setText(textTitle); } public String getTextValue() { return textValue; } public void setTextValue(String textValue) { this.textValue = textValue; textView2.setText(textValue); } public int getTextBackground() { return textBackground; } public void setTextBackground(int textBackground) { this.textBackground = textBackground; textView1.setBackgroundColor(textBackground); textView2.setBackgroundColor(textBackground); } public int getTextNameColor() { return textNameColor; } public void setTextNameColor(int textNameColor) { this.textNameColor = textNameColor; textView1.setTextColor(textNameColor); textView2.setTextColor(textNameColor); } public Drawable getTitleDrawable() { return titleDrawable; } public void setTitleDrawable(Drawable titleDrawable) { this.titleDrawable = titleDrawable; textView1.setCompoundDrawablesRelativeWithIntrinsicBounds(titleDrawable, null, null, null); } public Drawable getValueDrawable() { return valueDrawable; } public void setValueDrawable(Drawable valueDrawable) { this.valueDrawable = valueDrawable; textView2.setCompoundDrawablesRelativeWithIntrinsicBounds(null, null, valueDrawable, null); } public boolean isShowLine() { return showLine; } public void setShowLine(boolean showLine) { this.showLine = showLine; if (!showLine) { line.setVisibility(View.INVISIBLE); } } }
[ "hhjtlee@163.com" ]
hhjtlee@163.com
9676fc3db1b2314e920dcbe724a965725da2404b
b19674396d9a96c7fd7abdcfa423fe9fea4bb5be
/ratis-proto-shaded/src/main/java/org/apache/ratis/shaded/com/google/common/io/AppendableWriter.java
960d324195a11c4369dbae8791fcc644dfd4e21d
[]
no_license
snemuri/ratis.github.io
0529ceed6f86ad916fbc559576b39ae123c465a0
85e1dd1890477d4069052358ed0b163c3e23db76
refs/heads/master
2020-03-24T07:18:03.130700
2018-07-27T13:29:06
2018-07-27T13:29:06
142,558,496
0
0
null
null
null
null
UTF-8
Java
false
false
3,475
java
/* * Copyright (C) 2006 The Guava 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.apache.ratis.shaded.com.google.common.io; import static org.apache.ratis.shaded.com.google.common.base.Preconditions.checkNotNull; import org.apache.ratis.shaded.com.google.common.annotations.GwtIncompatible; import java.io.Closeable; import java.io.Flushable; import java.io.IOException; import java.io.Writer; import org.checkerframework.checker.nullness.compatqual.NullableDecl; /** * Writer that places all output on an {@link Appendable} target. If the target is {@link Flushable} * or {@link Closeable}, flush()es and close()s will also be delegated to the target. * * @author Alan Green * @author Sebastian Kanthak * @since 1.0 */ @GwtIncompatible class AppendableWriter extends Writer { private final Appendable target; private boolean closed; /** * Creates a new writer that appends everything it writes to {@code target}. * * @param target target to which to append output */ AppendableWriter(Appendable target) { this.target = checkNotNull(target); } /* * Abstract methods from Writer */ @Override public void write(char[] cbuf, int off, int len) throws IOException { checkNotClosed(); // It turns out that creating a new String is usually as fast, or faster // than wrapping cbuf in a light-weight CharSequence. target.append(new String(cbuf, off, len)); } /* * Override a few functions for performance reasons to avoid creating unnecessary strings. */ @Override public void write(int c) throws IOException { checkNotClosed(); target.append((char) c); } @Override public void write(@NullableDecl String str) throws IOException { checkNotClosed(); target.append(str); } @Override public void write(@NullableDecl String str, int off, int len) throws IOException { checkNotClosed(); // tricky: append takes start, end pair... target.append(str, off, off + len); } @Override public void flush() throws IOException { checkNotClosed(); if (target instanceof Flushable) { ((Flushable) target).flush(); } } @Override public void close() throws IOException { this.closed = true; if (target instanceof Closeable) { ((Closeable) target).close(); } } @Override public Writer append(char c) throws IOException { checkNotClosed(); target.append(c); return this; } @Override public Writer append(@NullableDecl CharSequence charSeq) throws IOException { checkNotClosed(); target.append(charSeq); return this; } @Override public Writer append(@NullableDecl CharSequence charSeq, int start, int end) throws IOException { checkNotClosed(); target.append(charSeq, start, end); return this; } private void checkNotClosed() throws IOException { if (closed) { throw new IOException("Cannot write to a closed writer."); } } }
[ "snemuri@hortonworks.com" ]
snemuri@hortonworks.com
6c180dd7e292a764c4ec181f60411cd1fa6e76b0
09cf080c8d9689b6567ee14c0bba7cfce4846d99
/baza-bzb-app-android/tuikit/src/main/java/com/tencent/qcloud/tim/uikit/modules/chat/layout/message/holder/MessageBaseHolder.java
c01f9cf4089577a4d5be8e22f29678aa8f797391
[]
no_license
wangxiaofan/new_baza
ab233d452c02f142ab22ecf9c9d8bbcd0540516c
f079a1d5d2d20e17ef00504cc4b550263009ff45
refs/heads/master
2022-10-13T23:59:02.542833
2020-06-12T08:40:12
2020-06-12T08:40:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,534
java
package com.tencent.qcloud.tim.uikit.modules.chat.layout.message.holder; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.recyclerview.widget.RecyclerView; import com.tencent.qcloud.tim.uikit.R; import com.tencent.qcloud.tim.uikit.TUIKit; import com.tencent.qcloud.tim.uikit.modules.chat.layout.message.MessageLayout; import com.tencent.qcloud.tim.uikit.modules.chat.layout.message.MessageLayoutUI; import com.tencent.qcloud.tim.uikit.modules.chat.layout.message.MessageListAdapter; import com.tencent.qcloud.tim.uikit.modules.message.MessageInfo; public abstract class MessageBaseHolder extends RecyclerView.ViewHolder { public MessageListAdapter mAdapter; public MessageLayoutUI.Properties properties = MessageLayout.Properties.getInstance(); protected View rootView; protected MessageLayout.OnItemClickListener onItemClickListener; protected MessageLayout.OnClickListener onClickListener; public MessageBaseHolder(View itemView) { super(itemView); rootView = itemView; } public void setAdapter(RecyclerView.Adapter adapter) { mAdapter = (MessageListAdapter) adapter; } public void setOnItemClickListener(MessageLayout.OnItemClickListener listener) { this.onItemClickListener = listener; } public void setOnClickListener(MessageLayout.OnClickListener listener) { this.onClickListener = listener; } public abstract void layoutViews(final MessageInfo msg, final int position); public static class Factory { public static RecyclerView.ViewHolder getInstance(ViewGroup parent, RecyclerView.Adapter adapter, int viewType) { LayoutInflater inflater = LayoutInflater.from(TUIKit.getAppContext()); RecyclerView.ViewHolder holder = null; View view = null; // 头部的holder if (viewType == MessageListAdapter.MSG_TYPE_HEADER_VIEW) { view = inflater.inflate(R.layout.message_adapter_content_header, parent, false); holder = new MessageHeaderHolder(view); return holder; } // 加群消息等holder if (viewType >= MessageInfo.MSG_TYPE_TIPS) { view = inflater.inflate(R.layout.message_adapter_item_empty, parent, false); holder = new MessageTipsHolder(view); } // 具体消息holder view = inflater.inflate(R.layout.message_adapter_item_content, parent, false); switch (viewType) { case MessageInfo.MSG_TYPE_TEXT: holder = new MessageTextHolder(view); break; case MessageInfo.MSG_TYPE_IMAGE: case MessageInfo.MSG_TYPE_VIDEO: case MessageInfo.MSG_TYPE_CUSTOM_FACE: holder = new MessageImageHolder(view); break; case MessageInfo.MSG_TYPE_AUDIO: holder = new MessageAudioHolder(view); break; case MessageInfo.MSG_TYPE_FILE: holder = new MessageFileHolder(view); break; case MessageInfo.MSG_TYPE_CUSTOM: holder = new MessageCustomHolder(view); break; } if (holder != null) { ((MessageEmptyHolder) holder).setAdapter(adapter); } return holder; } } }
[ "123456" ]
123456
dc9c00ef17128794742caab60978a1272b7bea7f
f2709e865a7cdf4dc58c8db7bc0804a310ef96e1
/lab-1/boot-solution/src/main/java/demo/controller/HelloController.java
387fc4b63b4754959725e1f9bb0152f897ba8c35
[]
no_license
lasalazarr/workshop-02-deploycloud
5cab6cec10e71d6bb1e26399287b474267225420
79d0a95c0a0e65daabd57ac7bfa4105f29bcf276
refs/heads/master
2020-03-14T03:39:02.094705
2018-04-28T16:34:50
2018-04-28T16:34:50
131,424,471
1
0
null
2018-04-28T16:10:00
2018-04-28T16:10:00
null
UTF-8
Java
false
false
251
java
package demo.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class HelloController { @RequestMapping("/") public String hi() { return "hello"; } }
[ "jose.diaz@joedayz.pe" ]
jose.diaz@joedayz.pe
de219e07dcc95b759927997e594de071d4cc4959
64794b4ea0b5a2c5c98b8bc7ecfbeb3bbd6686ff
/otc/src/main/java/com/lanjing/otc/controller/app/OtcAdsController.java
cc609aa39d429f9eff09f6d1343e03fedab98ba4
[]
no_license
chinaares/agc_server
a31ba3bee0df5748a0bdf6533cae7cd887cfd7c3
a2b64007d5259d8426b8b21965a97a475010f5fa
refs/heads/master
2023-02-10T08:03:16.617788
2021-01-04T09:43:42
2021-01-04T09:46:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,345
java
package com.lanjing.otc.controller.app; import com.alibaba.fastjson.JSONObject; import com.github.pagehelper.PageHelper; import com.jester.util.utils.DateUtil; import com.jester.util.utils.PageInfo; import com.jester.util.utils.Result; import com.lanjing.otc.config.Config; import com.lanjing.otc.controller.BaseController; import com.lanjing.otc.model.*; import com.lanjing.otc.model.po.Ads; import com.lanjing.otc.model.po.Wallet; import com.lanjing.otc.service.*; import com.lanjing.otc.util.RedisDao; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * 广告模块 * * @author Jester * @version version 1.0.0 * @email jiansite@qq.com * @date 2019-07-10 14:35 */ @RestController @SuppressWarnings("all") public class OtcAdsController extends BaseController { @Autowired OtcAdsService otcAdsService; @Autowired UsersService usersService; @Autowired WalletsService walletsService; @Autowired PayWayService payWayService; @Autowired UnderwriterService underwriterService; @Autowired RedisDao redisDao; /** * 发布广告 * * @param param * @return */ @RequestMapping("/app/otc/ads/addAds") public Object addAds(@RequestBody JSONObject param) { OtcAds otcAds = JSONObject.toJavaObject(param, OtcAds.class); String password = param.getString("password"); Integer userId = getUserId(); if (userId == null || StringUtils.isEmpty(password)) { return Result.error("参数错误"); } Users user = usersService.selectByPrimaryKey(userId); Integer isReal = user.getIsreal(); //实名认证 if (isReal == null || isReal != 2) { return Result.error(202, "请待实名通过"); } //收款方式设置 int count = payWayService.countByUserId(getUserId()); if (count < 1) { return Result.error(203, "请设置收款方式"); } //承兑商 Underwriter underwriter = underwriterService.findByUserId(getUserId()); if (underwriter == null) { return Result.error(204, "请申请承兑商"); } //0 待审核,1审核通过,2审核拒绝 if (underwriter.getStatus() == 0) { return Result.error("请等待承兑商审核"); } if (underwriter.getStatus() == 2) { return Result.error("承兑商审核未通过"); } String key=String.format("%s%s", Config.KEY_PASS,userId); Boolean hasKey = redisDao.hasKey(key); if (hasKey) { Integer num = Integer.valueOf(redisDao.getValue(key)); //每日限制交易密码只能错误三次 if (num > 3) { return Result.error("交易密码错误超过3次,请明日再试"); } } if (!password.equals(user.getTranspassword())) { redisDao.increment(key); if (!hasKey){ //初始化过期时间 redisDao.setTime(key, DateUtil.nextDay()/1000); } return Result.error("交易密码错误"); } //密码正确,清除错误密码累计 if (hasKey){ redisDao.remove(key); } try { otcAdsService.addAds(otcAds, userId); } catch (Exception e) { return Result.error(e.getMessage()); } return Result.success(); } /** * 获取承兑商状态 * * @param param * @return */ @RequestMapping("/app/otc/ads/getUnderwriter") public Object getUnderwriter() { //承兑商 Underwriter underwriter = underwriterService.findByUserId(getUserId()); if (underwriter == null) { return Result.error(203); } return Result.success(underwriter); } /** * 取消广告 * * @param param * @return */ @RequestMapping("/app/otc/ads/cancelAds") public Object cancelAds(@RequestBody JSONObject param) { Integer id = param.getInteger("id"); Integer userId = getUserId(); if (userId == null) { return Result.error("获取登陆信息错误"); } if (id == null) { return Result.error("参数错误"); } try { otcAdsService.cancelAds(id, userId); } catch (Exception e) { return Result.error(e.getMessage()); } return Result.success(); } /** * 用户广告 * * @param param * @return */ @RequestMapping("/app/otc/ads/adsList") public Object adsList(@RequestBody JSONObject param) { Integer pageNum = param.getInteger("pageNum"); Integer pageSize = param.getInteger("pageSize"); Integer id = param.getInteger("id"); Integer userId = getUserId(); if (pageSize == null || pageNum == null || id==null) { return Result.error("参数错误"); } PageHelper.startPage(pageNum, pageSize); List<OtcAds> otcAds = otcAdsService.selectAll(userId,id); PageInfo<OtcAds> pageInfo = new PageInfo<>(otcAds); return Result.success(pageInfo); } /** * 用户广告 * * @param param * @return */ @RequestMapping("/app/otc/ads/adsLists") public Object adsLists(@RequestBody JSONObject param) { Integer pageNum = param.getInteger("pageNum"); Integer pageSize = param.getInteger("pageSize"); Integer id = param.getInteger("id"); Integer userId = getUserId(); if (pageSize == null || pageNum == null || id==null) { return Result.error("参数错误"); } Wallets wallet = walletsService.selectByUserandcoin(getUserKey(), id); PageHelper.startPage(pageNum, pageSize); List<OtcAds> otcAds = otcAdsService.selectAll(userId,id); PageInfo<OtcAds> pageInfo = new PageInfo<>(otcAds); return Result.success(wallet,pageInfo); } /** * 买入卖出列表 * * @param param * @return */ @RequestMapping("/app/otc/ads/adsBuyOrSell") public Object adsBuyOrSell(@RequestBody JSONObject param) { Integer pageNum = param.getInteger("pageNum"); Integer pageSize = param.getInteger("pageSize"); Integer type = param.getInteger("type"); Integer coinId = param.getInteger("coinId"); String userKey = getUserKey(); if (StringUtils.isEmpty(userKey) || pageSize == null || pageNum == null || type == null) { return Result.error("参数错误"); } WalletsExample walletsExample = new WalletsExample(); WalletsExample.Criteria criteria = walletsExample.createCriteria(); criteria.andUserkeyEqualTo(userKey); criteria.andCoinidEqualTo(coinId); List<Wallets> wallets = walletsService.selectByExample(walletsExample); double balance = 0; double freeze = 0; if (wallets.size() > 0) { Wallets wallet = wallets.get(0); //可用余额 balance = wallet.getCoinnum(); //冻结 freeze = wallet.getFrozennum(); } PageHelper.startPage(pageNum, pageSize); List<Ads> otcAds = otcAdsService.selectAdsBuyOrSell(coinId, type); PageInfo<Ads> pageInfo = new PageInfo<>(otcAds); JSONObject result = new JSONObject(); result.put("freeze", freeze); result.put("balance", balance); result.put("pageInfo", pageInfo); return Result.success(result); } /** * 获取钱包信息 */ @RequestMapping("/app/otc/walletInformation") public Object walletInformation() { String userKey = getUserKey(); if (StringUtils.isEmpty(userKey)) { return Result.error("获取登陆信息失败"); } List<Wallet> wallets = walletsService.selectByUserId(userKey); return Result.success(wallets); } }
[ "1044508403@qq.com" ]
1044508403@qq.com
56d3761c3e0deefdb0348ae7bc2af5aead136340
e2b9aba2e2b280604fd955395ef42b80c653d908
/src/java/com/hzih/audit/web/filter/CheckLoginFilter.java
a2ef9c913b024d2bbe9429c392b604be011b6c4f
[]
no_license
huanghengmin/audit_check
e30b7eef04657be0182aebe621a8702bd8cd97de
6cb63c6fee0c8a4379051d484bd8d9cd57a32f5b
refs/heads/master
2020-12-24T19:27:48.803392
2016-04-15T15:06:17
2016-04-15T15:06:17
56,328,804
0
1
null
null
null
null
UTF-8
Java
false
false
1,406
java
package com.hzih.audit.web.filter; import cn.collin.commons.utils.DateUtils; import com.hzih.audit.web.SessionUtils; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** * 检测用户是否已经登录 * * @author collin.code@gmail.com */ public class CheckLoginFilter implements Filter { public void destroy() { } public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) res; String requestURL = request.getRequestURL().toString(); if (SessionUtils.getAccount(request) == null && requestURL.indexOf("login") < 0) { response.sendRedirect(request.getContextPath() + "/login.jsp"); } else { // 如果不是前台自动发起的请求,则重新设置logintime if (requestURL.indexOf("checkTimeout.action") < 0 && requestURL.indexOf("alertRule.action") < 0 && requestURL.indexOf("alert.action") < 0) { SessionUtils.setLoginTime(request, DateUtils.getNow().getTime()); } chain.doFilter(request, response); } } public void init(FilterConfig arg0) throws ServletException { } }
[ "465805947@QQ.com" ]
465805947@QQ.com
bbf8f2c87e0b11a153bdcfc0e036c300003d5212
b111b77f2729c030ce78096ea2273691b9b63749
/db-example-large-multi-project/project68/src/main/java/org/gradle/test/performance/mediumjavamultiproject/project68/p343/Production6877.java
6275bfc0281e7670cabccca8dd1d1983482a0869
[]
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
1,968
java
package org.gradle.test.performance.mediumjavamultiproject.project68.p343; public class Production6877 { private Production6874 property0; public Production6874 getProperty0() { return property0; } public void setProperty0(Production6874 value) { property0 = value; } private Production6875 property1; public Production6875 getProperty1() { return property1; } public void setProperty1(Production6875 value) { property1 = value; } private Production6876 property2; public Production6876 getProperty2() { return property2; } public void setProperty2(Production6876 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "nateweiler84@gmail.com" ]
nateweiler84@gmail.com
588b57afdd5985f5c5a2a1443b69b61f61adf9ff
1dd1923defe8bc58dcc65e5049c9a2e55ee98c6d
/app/src/main/java/com/delex/pojo/TripsPojo/TripsData.java
2a8176f7557a610bdac1819061d62b424816b532
[]
no_license
gogo207/delexDriver
359bfd2a568a39a7d31f75e5b2ac057ed93faba7
0f986927bc8264dc234453b3bf4137bd0e428824
refs/heads/master
2020-03-31T00:49:54.331713
2018-07-18T06:36:10
2018-07-18T06:36:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
715
java
package com.delex.pojo.TripsPojo; import java.io.Serializable; import java.util.ArrayList; /** * Created by embed on 23/5/17. */ public class TripsData implements Serializable { private ArrayList<Appointments> appointments; private ArrayList<TotalEarning> totalEarning; public ArrayList<Appointments> getAppointments() { return appointments; } public void setAppointments(ArrayList<Appointments> appointments) { this.appointments = appointments; } public ArrayList<TotalEarning> getTotalEarnings() { return totalEarning; } public void setTotalEarnings(ArrayList<TotalEarning> totalEarnings) { this.totalEarning = totalEarnings; } }
[ "kyoungae3017@gmail.com" ]
kyoungae3017@gmail.com
04345e7590e7afea2572c8738b22bc112b8872ef
1a3252aef9917251ad3b87455d25f1e9529176b8
/Mom/src/com/xiaoaitouch/event/EventBusException.java
8913f78ed47f17b7357c4303f0ddea508c7d94ae
[]
no_license
notigit/Mom
a0a2869729aafd551063965e2fde27364050a52c
132e145ec6c900f877f4f2f64793da990d649806
refs/heads/master
2021-01-20T19:19:18.173365
2016-06-20T03:41:00
2016-06-20T03:41:00
61,514,271
1
0
null
null
null
null
UTF-8
Java
false
false
1,222
java
/* * Copyright (C) 2012 Markus Junginger, greenrobot (http://greenrobot.de) * * 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.xiaoaitouch.event; /** * An {@link RuntimeException} thrown in cases something went wrong inside EventBus. * * @author Markus * */ public class EventBusException extends RuntimeException { private static final long serialVersionUID = -2912559384646531479L; public EventBusException(String detailMessage) { super(detailMessage); } public EventBusException(Throwable throwable) { super(throwable); } public EventBusException(String detailMessage, Throwable throwable) { super(detailMessage, throwable); } }
[ "1026452140@qq.com" ]
1026452140@qq.com
ce4c6ec10f50b34253dfa1266e4747cf09e753a2
8db480eb13872fcd44c6e833f6f3fe085dddad19
/biz.aQute.eclipse.compiler/src/org/eclipse/jdt/internal/compiler/env/AccessRestriction.java
ca642294df01a6711db39ea1adde884840f80fbe
[ "Apache-2.0" ]
permissive
sderdak/bnd
fe3d5d615a4fa58f4b53deacada27aaac11fec47
68ab6cd75d76c5f3920e63ba571b873f3900d5e8
refs/heads/master
2020-12-30T17:32:57.087278
2012-08-11T11:46:40
2012-08-11T11:46:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,192
java
/******************************************************************************* * Copyright (c) 2000, 2007 IBM Corporation 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: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.internal.compiler.env; public class AccessRestriction { private AccessRule accessRule; public byte classpathEntryType; public static final byte COMMAND_LINE = 0, PROJECT = 1, LIBRARY = 2; public String classpathEntryName; public AccessRestriction(AccessRule accessRule, byte classpathEntryType, String classpathEntryName) { this.accessRule = accessRule; this.classpathEntryName = classpathEntryName; this.classpathEntryType = classpathEntryType; } public int getProblemId() { return this.accessRule.getProblemId(); } public boolean ignoreIfBetter() { return this.accessRule.ignoreIfBetter(); } }
[ "peter.kriens@aqute.biz" ]
peter.kriens@aqute.biz
65783941ef57bb703016a67c22ab053aae6b4733
aae8bc50d6834596a577d5e142598cd9b894d42f
/src/main/java/cn/nukkit/entity/mob/EntityEndermite.java
fa19ae9d50c5d05f02f41a0e335ac737e23a7e90
[]
no_license
Rover656/Nukkit-SuomiCraftPE
73d6e73685bef3940fc82b8507b34af3cd40649a
2664a2bc03da882d51a3a20842e45821abf39fe9
refs/heads/master
2020-03-26T04:19:54.652406
2018-09-07T14:50:22
2018-09-07T14:50:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,460
java
package cn.nukkit.entity.mob; import cn.nukkit.Player; import cn.nukkit.entity.Entity; import cn.nukkit.event.entity.EntityDamageByEntityEvent; import cn.nukkit.event.entity.EntityDamageEvent; import cn.nukkit.entity.mob.EntityWalkingMob; import cn.nukkit.item.Item; import cn.nukkit.level.format.FullChunk; import cn.nukkit.nbt.tag.CompoundTag; import java.util.HashMap; public class EntityEndermite extends EntityWalkingMob { public static final int NETWORK_ID = 55; public EntityEndermite(FullChunk chunk, CompoundTag nbt) { super(chunk, nbt); } @Override public int getNetworkId() { return NETWORK_ID; } @Override public float getWidth() { return 0.4f; } @Override public float getHeight() { return 0.3f; } @Override public double getSpeed() { return 1.1; } @Override public void initEntity() { super.initEntity(); this.setMaxHealth(8); this.setDamage(new int[] { 0, 1, 1, 1 }); } @Override public void attackEntity(Entity player) { if (this.attackDelay > 10 && this.distanceSquared(player) < 1) { this.attackDelay = 0; HashMap<EntityDamageEvent.DamageModifier, Float> damage = new HashMap<>(); damage.put(EntityDamageEvent.DamageModifier.BASE, (float) this.getDamage()); if (player instanceof Player) { @SuppressWarnings("serial") HashMap<Integer, Float> armorValues = new HashMap<Integer, Float>() { { put(Item.LEATHER_CAP, 1f); put(Item.LEATHER_TUNIC, 3f); put(Item.LEATHER_PANTS, 2f); put(Item.LEATHER_BOOTS, 1f); put(Item.CHAIN_HELMET, 1f); put(Item.CHAIN_CHESTPLATE, 5f); put(Item.CHAIN_LEGGINGS, 4f); put(Item.CHAIN_BOOTS, 1f); put(Item.GOLD_HELMET, 1f); put(Item.GOLD_CHESTPLATE, 5f); put(Item.GOLD_LEGGINGS, 3f); put(Item.GOLD_BOOTS, 1f); put(Item.IRON_HELMET, 2f); put(Item.IRON_CHESTPLATE, 6f); put(Item.IRON_LEGGINGS, 5f); put(Item.IRON_BOOTS, 2f); put(Item.DIAMOND_HELMET, 3f); put(Item.DIAMOND_CHESTPLATE, 8f); put(Item.DIAMOND_LEGGINGS, 6f); put(Item.DIAMOND_BOOTS, 3f); } }; float points = 0; for (Item i : ((Player) player).getInventory().getArmorContents()) { points += armorValues.getOrDefault(i.getId(), 0f); } damage.put(EntityDamageEvent.DamageModifier.ARMOR, (float) (damage.getOrDefault(EntityDamageEvent.DamageModifier.ARMOR, 0f) - Math.floor(damage.getOrDefault(EntityDamageEvent.DamageModifier.BASE, 1f) * points * 0.04))); } player.attack(new EntityDamageByEntityEvent(this, player, EntityDamageEvent.DamageCause.ENTITY_ATTACK, damage)); } } @Override public Item[] getDrops() { return new Item[0]; } @Override public int getKillExperience() { return 3; } }
[ "petteri.malkavaara1@gmail.com" ]
petteri.malkavaara1@gmail.com
0204c93ca54189cb492e1dfcbb4a8b564d46df0b
5ebfe7bb05c0bf9a1f957eeb53b9d925038df0b7
/lightning/src/main/java/com/slack/api/lightning/service/InstallationService.java
8e23f3e41c02ab8730863771aa61f01370fe8fdc
[ "MIT" ]
permissive
aoberoi/java-slack-sdk
0c0fba0f57fabbd1f5095176e7548649bede6435
807f4c12799326fe406e452532178f269f142a29
refs/heads/master
2020-12-22T05:02:15.520881
2020-01-27T21:36:39
2020-01-27T21:36:39
236,676,613
0
0
MIT
2020-01-28T06:59:53
2020-01-28T06:59:52
null
UTF-8
Java
false
false
600
java
package com.slack.api.lightning.service; import com.slack.api.lightning.model.Bot; import com.slack.api.lightning.model.Installer; public interface InstallationService { boolean isHistoricalDataEnabled(); void setHistoricalDataEnabled(boolean isHistoricalDataEnabled); void saveInstallerAndBot(Installer installer) throws Exception; void deleteBot(Bot bot) throws Exception; void deleteInstaller(Installer installer) throws Exception; Bot findBot(String enterpriseId, String teamId); Installer findInstaller(String enterpriseId, String teamId, String userId); }
[ "seratch@gmail.com" ]
seratch@gmail.com
5942e43b204031a406d0e76f394e21fd9ceac516
e53daa94a988135b8b1379c2a1e19e25bb045091
/xunbo_live/app/build/generated/ap_generated_sources/miaomiDebug/out/com/zz/live/ui/activity/message_activity/SystemMessageActivity_ViewBinding.java
a626de15d501d6604ca38acd979994ea658b082b
[]
no_license
2020xiaotu/trunk
f90c9bf15c9000a1bb18c7c0a3c0a96d4daf8e68
ba19836c64828c2994e1f0db22fb5d26b4a014f5
refs/heads/master
2023-08-27T08:10:41.709940
2021-10-05T06:27:12
2021-10-05T06:27:12
413,684,673
0
0
null
null
null
null
UTF-8
Java
false
false
2,211
java
// Generated code from Butter Knife. Do not modify! package com.zz.live.ui.activity.message_activity; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.CallSuper; import androidx.annotation.UiThread; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.recyclerview.widget.RecyclerView; import butterknife.Unbinder; import butterknife.internal.Utils; import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.zz.live.R; import java.lang.IllegalStateException; import java.lang.Override; public class SystemMessageActivity_ViewBinding implements Unbinder { private SystemMessageActivity target; @UiThread public SystemMessageActivity_ViewBinding(SystemMessageActivity target) { this(target, target.getWindow().getDecorView()); } @UiThread public SystemMessageActivity_ViewBinding(SystemMessageActivity target, View source) { this.target = target; target.refreshLayout = Utils.findRequiredViewAsType(source, R.id.system_message_refresh, "field 'refreshLayout'", SmartRefreshLayout.class); target.system_message_recycler = Utils.findRequiredViewAsType(source, R.id.system_message_recycler, "field 'system_message_recycler'", RecyclerView.class); target.loading_linear = Utils.findRequiredViewAsType(source, R.id.loading_linear, "field 'loading_linear'", ConstraintLayout.class); target.error_linear = Utils.findRequiredViewAsType(source, R.id.error_linear, "field 'error_linear'", LinearLayout.class); target.reload_tv = Utils.findRequiredViewAsType(source, R.id.reload_tv, "field 'reload_tv'", TextView.class); target.nodata_linear = Utils.findRequiredViewAsType(source, R.id.nodata_linear, "field 'nodata_linear'", LinearLayout.class); } @Override @CallSuper public void unbind() { SystemMessageActivity target = this.target; if (target == null) throw new IllegalStateException("Bindings already cleared."); this.target = null; target.refreshLayout = null; target.system_message_recycler = null; target.loading_linear = null; target.error_linear = null; target.reload_tv = null; target.nodata_linear = null; } }
[ "xiaotu20201016@gmail.com" ]
xiaotu20201016@gmail.com
4bbea979a3871cc5e3994f411285ce47062596e6
2fc7e341bf68d7da91505cb9e08701ca18fd9217
/java7sdk/src/javax/swing/event/AncestorEvent.java
093a6045defad36142fea063f3bf130c52a00d8a
[]
no_license
Zir0-93/java7-sdk
70c190c059f22bac1721139382d018590be1b1cb
227e04ea027bd2400ab3e9d2fa3ce5576c6f7239
refs/heads/master
2021-01-10T14:43:08.338197
2016-03-07T21:21:11
2016-03-07T21:21:11
53,359,588
0
0
null
null
null
null
UTF-8
Java
false
false
3,479
java
/*=========================================================================== * Licensed Materials - Property of IBM * "Restricted Materials of IBM" * * IBM SDK, Java(tm) Technology Edition, v7 * (C) Copyright IBM Corp. 2014, 2014. All Rights Reserved * * US Government Users Restricted Rights - Use, duplication or disclosure * restricted by GSA ADP Schedule Contract with IBM Corp. *=========================================================================== */ /* * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.swing.event; import java.awt.event.*; import java.awt.*; import javax.swing.*; /** * An event reported to a child component that originated from an * ancestor in the component hierarchy. * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans<sup><font size="-2">TM</font></sup> * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. * * @author Dave Moore */ public class AncestorEvent extends AWTEvent { /** * An ancestor-component was added to the hierarchy of * visible objects (made visible), and is currently being displayed. */ public static final int ANCESTOR_ADDED = 1; /** * An ancestor-component was removed from the hierarchy * of visible objects (hidden) and is no longer being displayed. */ public static final int ANCESTOR_REMOVED = 2; /** An ancestor-component changed its position on the screen. */ public static final int ANCESTOR_MOVED = 3; Container ancestor; Container ancestorParent; /** * Constructs an AncestorEvent object to identify a change * in an ancestor-component's display-status. * * @param source the JComponent that originated the event * (typically <code>this</code>) * @param id an int specifying {@link #ANCESTOR_ADDED}, * {@link #ANCESTOR_REMOVED} or {@link #ANCESTOR_MOVED} * @param ancestor a Container object specifying the ancestor-component * whose display-status changed * @param ancestorParent a Container object specifying the ancestor's parent */ public AncestorEvent(JComponent source, int id, Container ancestor, Container ancestorParent) { super(source, id); this.ancestor = ancestor; this.ancestorParent = ancestorParent; } /** * Returns the ancestor that the event actually occurred on. */ public Container getAncestor() { return ancestor; } /** * Returns the parent of the ancestor the event actually occurred on. * This is most interesting in an ANCESTOR_REMOVED event, as * the ancestor may no longer be in the component hierarchy. */ public Container getAncestorParent() { return ancestorParent; } /** * Returns the component that the listener was added to. */ public JComponent getComponent() { return (JComponent)getSource(); } }
[ "muntazir@live.ca" ]
muntazir@live.ca
c6033ceaebce750f2f16e5e45da81be79d515424
80dded658a2def9f19efda0285e22405a8dd451c
/decompiled_src/JDGui/org/anddev/andengine/engine/handler/UpdateHandlerList.java
97e6b8044a7fba8d3ae18a4ac539627df3d9bb58
[ "Apache-2.0" ]
permissive
rLadia-demo/AttacknidPatch
57482e19c6e99e8923e299a121b9b2c74242b8ee
561fc5fa5c1bc5afa4bad28855bf16b480c3ab6a
refs/heads/master
2021-01-25T07:08:43.450419
2014-06-15T14:35:03
2014-06-15T14:35:03
20,852,359
1
0
null
null
null
null
UTF-8
Java
false
false
845
java
package org.anddev.andengine.engine.handler; import java.util.ArrayList; public class UpdateHandlerList extends ArrayList<IUpdateHandler> implements IUpdateHandler { private static final long serialVersionUID = -8842562717687229277L; public void onUpdate(float paramFloat) { for (int i = -1 + size();; i--) { if (i < 0) { return; } ((IUpdateHandler)get(i)).onUpdate(paramFloat); } } public void reset() { for (int i = -1 + size();; i--) { if (i < 0) { return; } ((IUpdateHandler)get(i)).reset(); } } } /* Location: C:\Users\Rodelle\Desktop\Attacknid\Tools\Attacknids-dex2jar.jar * Qualified Name: org.anddev.andengine.engine.handler.UpdateHandlerList * JD-Core Version: 0.7.0.1 */
[ "rLadia@ymail.com" ]
rLadia@ymail.com
48d77d7887b2251c4666f7e0e9897a3ce3ee74a8
b5f9bbd8f5e79d73b5a4ab9a92930034f0677eff
/src/com/excellentsystem/TokoEmasJagoCabang/KoneksiLokal.java
e25f71008f8c325ac371db4f37fe2d580a8a36d1
[]
no_license
vonn89/TokoEmasJagoCabang
9f598afe9f22ea88e08772710f91bece867d7b07
6e1e3c677aa62ce76b83149bf30a12ebe2a2c750
refs/heads/master
2023-03-04T00:52:28.726320
2021-01-31T12:35:21
2021-01-31T12:35:21
334,650,960
0
0
null
null
null
null
UTF-8
Java
false
false
744
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.excellentsystem.TokoEmasJagoCabang; import java.sql.Connection; import java.sql.DriverManager; /** * * @author Xtreme */ public class KoneksiLokal { public static Connection getConnection(String ipServer, String kodeCabang)throws Exception{ String DbName = "jdbc:mysql://"+ipServer+":3306/tokoemasjago_"+kodeCabang+"?" + "connectTimeout=0&socketTimeout=0&autoReconnect=true"; Class.forName("com.mysql.jdbc.Driver"); return DriverManager.getConnection(DbName,"jago_admin","jagopusat"); } }
[ "vonn89@gmail.com" ]
vonn89@gmail.com
6699ffaa8b5ff48c1cb7e7734f41bb14696e019a
96196a9b6c8d03fed9c5b4470cdcf9171624319f
/decompiled/cz/msebera/android/httpclient/conn/HttpHostConnectException.java
a3bd3e711c14e455778b0addf15a5ff431afa46e
[]
no_license
manciuszz/KTU-Asmens-Sveikatos-Ugdymas
8ef146712919b0fb9ad211f6cb7cbe550bca10f9
41e333937e8e62e1523b783cdb5aeedfa1c7fcc2
refs/heads/master
2020-04-27T03:40:24.436539
2019-03-05T22:39:08
2019-03-05T22:39:08
174,031,152
0
0
null
null
null
null
UTF-8
Java
false
false
1,426
java
package cz.msebera.android.httpclient.conn; import com.fasterxml.jackson.core.util.MinimalPrettyPrinter; import cz.msebera.android.httpclient.HttpHost; import cz.msebera.android.httpclient.annotation.Immutable; import java.io.IOException; import java.net.ConnectException; import java.net.InetAddress; import java.util.Arrays; @Immutable public class HttpHostConnectException extends ConnectException { private static final long serialVersionUID = -3194482710275220224L; private final HttpHost host; @Deprecated public HttpHostConnectException(HttpHost host, ConnectException cause) { this(cause, host, null); } public HttpHostConnectException(IOException cause, HttpHost host, InetAddress... remoteAddresses) { StringBuilder append = new StringBuilder().append("Connect to ").append(host != null ? host.toHostString() : "remote host"); String str = (remoteAddresses == null || remoteAddresses.length <= 0) ? "" : MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR + Arrays.asList(remoteAddresses); append = append.append(str); if (cause == null || cause.getMessage() == null) { str = " refused"; } else { str = " failed: " + cause.getMessage(); } super(append.append(str).toString()); this.host = host; initCause(cause); } public HttpHost getHost() { return this.host; } }
[ "evilquaint@gmail.com" ]
evilquaint@gmail.com
0cf7270ea10eb17d624c8bc73b52e846275acae8
82a1fce35d5157f10654d511ef53cf54a5cd9356
/java/org/apache/geronimo/xbeans/geronimo/jaspi/impl/JaspiTargetTypeImpl.java
12cafecad4227c955c51988ad461ce71608f2603
[]
no_license
fideoman/GeronimoBarebone
8f4bc86177777f8b630609e034f6aafe17c1977c
9ca432ba109aaeaf129723dcee88b2e7a7cd8199
refs/heads/master
2021-05-18T20:35:48.063179
2020-03-30T19:28:33
2020-03-30T19:28:33
251,407,644
0
1
null
null
null
null
UTF-8
Java
false
false
2,937
java
/* * XML Type: targetType * Namespace: http://geronimo.apache.org/xml/ns/geronimo-jaspi * Java type: org.apache.geronimo.xbeans.geronimo.jaspi.JaspiTargetType * * Automatically generated - do not modify. */ package org.apache.geronimo.xbeans.geronimo.jaspi.impl; /** * An XML targetType(@http://geronimo.apache.org/xml/ns/geronimo-jaspi). * * This is a complex type. */ public class JaspiTargetTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.xbeans.geronimo.jaspi.JaspiTargetType { private static final long serialVersionUID = 1L; public JaspiTargetTypeImpl(org.apache.xmlbeans.SchemaType sType) { super(sType); } private static final javax.xml.namespace.QName CLASSNAME$0 = new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/geronimo-jaspi", "className"); /** * Gets the "className" element */ public java.lang.String getClassName() { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CLASSNAME$0, 0); if (target == null) { return null; } return target.getStringValue(); } } /** * Gets (as xml) the "className" element */ public org.apache.xmlbeans.XmlString xgetClassName() { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlString target = null; target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CLASSNAME$0, 0); return target; } } /** * Sets the "className" element */ public void setClassName(java.lang.String className) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CLASSNAME$0, 0); if (target == null) { target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CLASSNAME$0); } target.setStringValue(className); } } /** * Sets (as xml) the "className" element */ public void xsetClassName(org.apache.xmlbeans.XmlString className) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlString target = null; target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CLASSNAME$0, 0); if (target == null) { target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(CLASSNAME$0); } target.set(className); } } }
[ "isaac.silva@usach.cl" ]
isaac.silva@usach.cl
9a4c37fab16083501a5adb0ff7cbee400af56479
4abab33500b1b7bdb6124a467ae05c3c083dacfd
/src/mexc-sun/framework-1/framework-test/src/main/java/com/mexc/sun/framework/test/ExceptionGenerator.java
e7153321ead7486a14557661848571f602da8784
[]
no_license
easyfun/efungame
245a2987746c87ec5d2d9d144175abb82acd6265
80cde77f8c4f414798f20f5655e3bd2b66772152
refs/heads/master
2021-01-01T15:45:42.179303
2018-09-29T08:17:31
2018-09-29T08:17:31
97,691,286
0
0
null
null
null
null
UTF-8
Java
false
false
158
java
package com.mexc.sun.framework.test; public class ExceptionGenerator { public static void createException() { int a = 100; int b = 0; b = a / b; } }
[ "ywd979@foxmail.com" ]
ywd979@foxmail.com
36b36a3cb68b76b2ec6515a5d8e106d41385a82e
80d8121a0ed12970f2daf668ac3f65971e467e5a
/学习线路/TestDemo/src/com/example/file/FileActivity.java
baf3825760663cf4774b45be66f82dca1c93077b
[]
no_license
YC-YC/AndroidCode
44ec2b7275c6f235ad95b26170b80e867f0a9421
d0739122afbba2c5af2fa16b8ac40c7d55818f72
refs/heads/master
2021-01-10T14:36:11.648971
2016-03-05T16:45:15
2016-03-05T16:45:15
46,731,704
0
1
null
null
null
null
GB18030
Java
false
false
2,600
java
package com.example.file; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import com.example.testdemo.R; import android.app.Activity; import android.os.Bundle; import android.os.Environment; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; /* * openFileOutput()用于把数据输出到文件中 * 创建的文件保存到/data/data/<package>/files目录 */ public class FileActivity extends Activity { private static final String FILE_NAME = "text.txt"; private EditText et_filecontent; private EditText et_fileShow; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.file); et_filecontent = (EditText) findViewById(R.id.et_filecontent); et_fileShow = (EditText) findViewById(R.id.et_fileshow); /*File file = new File(Environment.getExternalStorageDirectory() + FILE_NAME); if (!file.exists()){ try { file.createNewFile(); } catch (IOException e) { e.printStackTrace(); } } file.delete();*/ // File file = this.getFilesDir();//当前应用目录 // File dir = this.getCacheDir();//缓存文件目录 // File dir = this.getDir("imooc", MODE_PRIVATE);//创建一个新目录 // this.getExternalCacheDir();//外置SD卡的cache目录 } public void saveFile(View view) { WriteFiles(et_filecontent.getText().toString()); et_fileShow.setText(ReadFiles()); } private void WriteFiles(String content) { try { FileOutputStream fos = openFileOutput("test.txt", MODE_PRIVATE); fos.write(content.getBytes()); fos.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public String ReadFiles() { String content = null; try { FileInputStream fis = openFileInput("test.txt"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int len = 0; while((len = fis.read(buffer)) != -1) { baos.write(buffer, 0, len); } content = baos.toString(); fis.close(); baos.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return content; } }
[ "yellowc.yc@aliyun.com" ]
yellowc.yc@aliyun.com
c39cd018dab99b50a187d0edec0afc930a0e792e
e54eeb44fca03942eb59ccec4ba9a14cfc25b99b
/src/edu/ncsu/csc/itrust/dao/mysql/NDCodesDAO.java
94d6c8dfd0036f767270a3e49e4e0d048f110b2c
[]
no_license
mouna2/iTrust
98d230c8830ee21ec6df6e3e07a96e5789cd84f3
7720aebf99cc57789f080c80b8484b62381375f2
refs/heads/master
2023-01-13T01:11:55.171506
2020-11-14T15:53:32
2020-11-14T15:53:32
310,899,066
0
0
null
null
null
null
UTF-8
Java
false
false
5,494
java
package edu.ncsu.csc.itrust.dao.mysql; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; import edu.ncsu.csc.itrust.DBUtil; import edu.ncsu.csc.itrust.beans.MedicationBean; import edu.ncsu.csc.itrust.beans.loaders.MedicationBeanLoader; import edu.ncsu.csc.itrust.dao.DAOFactory; import edu.ncsu.csc.itrust.exception.DBException; import edu.ncsu.csc.itrust.exception.iTrustException; /** * Used for managing the ND Codes. * * DAO stands for Database Access Object. All DAOs are intended to be reflections of the database, that is, * one DAO per table in the database (most of the time). For more complex sets of queries, extra DAOs are * added. DAOs can assume that all data has been validated and is correct. * * DAOs should never have setters or any other parameter to the constructor than a factory. All DAOs should be * accessed by DAOFactory (@see {@link DAOFactory}) and every DAO should have a factory - for obtaining JDBC * connections and/or accessing other DAOs. * * The National Drug Code (NDC) is a universal product identifier used in the * United States for drugs intended for human use. * * @see http://www.fda.gov/Drugs/InformationOnDrugs/ucm142438.htm * @author Andy * */ public class NDCodesDAO { private DAOFactory factory; private MedicationBeanLoader medicationLoader = new MedicationBeanLoader(); /** * The typical constructor. * @param factory The {@link DAOFactory} associated with this DAO, which is used for obtaining SQL connections, etc. */ public NDCodesDAO(DAOFactory factory) { this.factory = factory; } /** * Returns a list of all ND codes * * @return A java.util.List of MedicationBeans. * @throws DBException */ public List<MedicationBean> getAllNDCodes() throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("SELECT * FROM ndcodes ORDER BY CODE"); ResultSet rs = ps.executeQuery(); return medicationLoader.loadList(rs); } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } /** * Returns a particular description for a given code. * * @param code The ND code to be looked up. * @return A bean representing the Medication that was looked up. * @throws DBException */ public MedicationBean getNDCode(String code) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("SELECT * FROM ndcodes WHERE Code = ?"); ps.setString(1, code); ResultSet rs = ps.executeQuery(); if (rs.next()) return medicationLoader.loadSingle(rs); return null; } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } /** * Adds a new ND code, returns whether or not the change was made. If the code already exists, an * iTrustException is thrown. * * @param med The medication bean to be added. * @return A boolean indicating success or failure. * @throws DBException * @throws iTrustException */ public boolean addNDCode(MedicationBean med) throws DBException, iTrustException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("INSERT INTO ndcodes (Code, Description) " + "VALUES (?,?)"); ps.setString(1, med.getNDCode()); ps.setString(2, med.getDescription()); return (1 == ps.executeUpdate()); } catch (SQLException e) { e.printStackTrace(); if (1062 == e.getErrorCode()) throw new iTrustException("Error: Code already exists."); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } /** * Updates a particular code's description * * @param med A bean representing the particular medication to be updated. * @return An int representing the number of updated rows. * @throws DBException */ public int updateCode(MedicationBean med) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("UPDATE ndcodes SET Description = ? " + "WHERE Code = ?"); ps.setString(1, med.getDescription()); ps.setString(2, med.getNDCode()); return ps.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } /** * Removes a ND code, returns whether or not the change was made. * * @param med The medication bean to be removed. * @return A boolean indicating success or failure. * @throws DBException * @throws iTrustException */ public boolean removeNDCode(MedicationBean med) throws DBException, iTrustException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("DELETE FROM ndcodes WHERE Code=?"); ps.setString(1, med.getNDCode()); return (1 == ps.executeUpdate()); } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } }
[ "mounahammoudi2@gmail.com" ]
mounahammoudi2@gmail.com
e697d5ce0d27d6085bbb2d234a73c596c368917c
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project37/src/main/java/org/gradle/test/performance37_2/Production37_198.java
9e6fbb3ca0fa95d686de07829bcfe94593c638d9
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance37_2; public class Production37_198 extends org.gradle.test.performance13_2.Production13_198 { private final String property; public Production37_198() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
69c1909ef61b3fc144d06d91d80892df25bacd91
de14ba7c1cf923b2f74990b1d500cf5ed5cd49d7
/src/main/java/com/cai/pullrefresh/imp/OnItemTouchListener.java
db758cae445d541ba28632762a1f78ec07f6ba21
[]
no_license
clarenceV1/LibPullToRefresh
b5fffe66e0ff6c2e8b38e682845f8071cd472a79
94f70161db06ac9914cef7425870288fff4f3ca0
refs/heads/master
2018-10-31T12:39:52.319403
2018-09-06T13:09:04
2018-09-06T13:09:04
66,892,671
0
0
null
null
null
null
UTF-8
Java
false
false
3,293
java
package com.cai.pullrefresh.imp; import android.support.v4.view.GestureDetectorCompat; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; public abstract class OnItemTouchListener implements RecyclerView.OnItemTouchListener { private GestureDetectorCompat mGestureDetectorCompat; private RecyclerView mRecyclerView; @Override public void onTouchEvent(RecyclerView rv, MotionEvent e) { init(rv); mGestureDetectorCompat.onTouchEvent(e); } @Override public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) { init(rv); mGestureDetectorCompat.onTouchEvent(e); return false; } @Override public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) { } private void init(RecyclerView rv) { if (mGestureDetectorCompat == null) { mRecyclerView = rv; mGestureDetectorCompat = new GestureDetectorCompat(mRecyclerView.getContext(), new MyGestureListener()); } } public abstract void onItemClick(RecyclerView.ViewHolder vh); public abstract void onItemLongClick(RecyclerView.ViewHolder vh); private class MyGestureListener extends GestureDetector.SimpleOnGestureListener { @Override public boolean onDown(MotionEvent e) { View child = getChildView(e); if (child != null) { // child.setClickable(true); child.onTouchEvent(e); Log.e("Test", "onDown hashCode=" + child.hashCode()); } return super.onDown(e); } @Override public boolean onSingleTapUp(MotionEvent e) { View child = getChildView(e); if (child != null) { RecyclerView.ViewHolder VH = mRecyclerView.getChildViewHolder(child); onItemClick(VH); //child.onTouchEvent(e); Log.e("Test", "onSingleTapUp hashCode=" + child.hashCode()); /* child.setClickable(false); child.setFocusable(false); child.requestFocus();*/ } return true; } @Override public void onLongPress(MotionEvent e) { View child = getChildView(e); if (child != null) { RecyclerView.ViewHolder VH = mRecyclerView.getChildViewHolder(child); onItemLongClick(VH); //child.onTouchEvent(e); Log.e("Test", "onLongPress hashCode=" + child.hashCode()); } } @Override public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { Log.e("Test", "onScroll distanceX"); View child = getChildView(e1); if (child != null) { // child.onTouchEvent(e1); Log.e("Test", "onScroll hashCode=" + child.hashCode()); } return super.onScroll(e1, e2, distanceX, distanceY); } private View getChildView(MotionEvent e) { return mRecyclerView.findChildViewUnder(e.getX(), e.getY()); } } }
[ "caishuxing@linggan.com" ]
caishuxing@linggan.com
9171a87c966133a64b9df2fa12e5ef822dc90226
943a97513847749f7ad6679842e0d5bdfe1c9340
/bridge-impl/src/main/java/com/liferay/faces/bridge/filter/internal/ResourceResponseHttpServletAdapter.java
0b3536e62984d6d37bc2732b460ea4d8d34dcef5
[ "Apache-2.0" ]
permissive
phantoan/liferay-faces-bridge-impl
c07f8c74870f3e9f26939ec81561bdc4b7f7c4fe
429f398462bb0d18336d36f4e8f133d651dfd3b4
refs/heads/master
2020-03-21T17:08:12.726086
2018-06-25T20:15:54
2018-06-25T20:18:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,107
java
/** * Copyright (c) 2000-2017 Liferay, Inc. 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.liferay.faces.bridge.filter.internal; import java.util.Locale; import javax.annotation.Resource; import javax.portlet.ActionURL; import javax.portlet.PortletURL; import javax.portlet.ResourceResponse; import javax.servlet.http.HttpServletResponse; /** * Provides a way to decorate a {@link ResourceResponse} as an {@link HttpServletResponse}. The methods signatures that * are unique to {@link HttpServletResponse} throw {@link UnsupportedOperationException} since they are never called * during the RENDER_RESPONSE phase of the JSF lifecycle (the use-case for which this class was written). For more * information, see {@link com.liferay.faces.bridge.application.view.internal.ViewDeclarationLanguageBridgeJspImpl}. * * @author Neil Griffin */ public class ResourceResponseHttpServletAdapter extends MimeResponseHttpServletAdapter implements ResourceResponse { public ResourceResponseHttpServletAdapter(ResourceResponse resourceResponse) { super(resourceResponse); } @Override public void setCharacterEncoding(String charset) { ((ResourceResponse) getResponse()).setCharacterEncoding(charset); } @Override public void setContentLength(int len) { ((ResourceResponse) getResponse()).setContentLength(len); } @Override public void setContentLengthLong(long len) { ((ResourceResponse) getResponse()).setContentLengthLong(len); } @Override public void setLocale(Locale loc) { ((ResourceResponse) getResponse()).setLocale(loc); } }
[ "neil.griffin.scm@gmail.com" ]
neil.griffin.scm@gmail.com
b45db0bd844593aa404950e1c9fdf3a8acd25395
5175002964bf1ea0462ac8effab3fd2ad37ba982
/app/src/main/java/com/example/ejerciciopropuesto/Element.java
8ee4b3a2ad11b2a94854ceecee418d5130a65ebf
[]
no_license
jamcestech/Ejercicio-Listas
37325b15877f871057fd6975525976f74496c26f
1d2bdac40786a8033a43b23425be51ceac95c449
refs/heads/master
2020-05-05T11:19:23.917394
2019-04-26T22:10:34
2019-04-26T22:10:34
179,985,050
0
0
null
null
null
null
UTF-8
Java
false
false
473
java
package com.example.ejerciciopropuesto; import com.google.gson.Gson; public class Element { public String txt; public int img; public Element(String txt, int img) { this.txt = txt; this.img = img; } public String toJson() { Gson gson = new Gson(); return gson.toJson(this); } public Element fromJson(String json) { Gson gson = new Gson(); return gson.fromJson(json, Element.class); } }
[ "=" ]
=
227bb70ebdde6a711737281ed8f3c54aa3df8b50
14956dbed8ae4fba1d65b9829d9405fcf43ac698
/Cyber Security/Capture the Flag Competitions/2020/STACK the Flags/Mobile/Decompiled/sources/b/a/a/w/o.java
a7e7eac2e7ecbfe03e0d752b5b390ac05e10f4eb
[]
no_license
Hackin7/Programming-Crappy-Solutions
ae8bbddad92a48cf70976cec91bf66234c9b4d39
ffa3b3c26a6a06446cc49c8ac4f35b6d30b1ee0f
refs/heads/master
2023-03-21T01:21:00.764957
2022-12-28T14:22:33
2022-12-28T14:22:33
201,292,128
12
7
null
2023-03-05T16:05:34
2019-08-08T16:00:21
Roff
UTF-8
Java
false
false
353
java
package b.a.a.w; import b.a.a.w.k0.c; public class o implements j0<Integer> { /* renamed from: a reason: collision with root package name */ public static final o f2298a = new o(); /* renamed from: b */ public Integer a(c reader, float scale) { return Integer.valueOf(Math.round(p.g(reader) * scale)); } }
[ "zunmun@gmail.com" ]
zunmun@gmail.com
bc73ad2d1413fcd5ddd836bb80e4fc293e2af5b5
ca97a7318b16c29dfbe81ab621afd1718fa48ad1
/drools-demo/drools-springboot/src/main/java/cn/v5cn/drools/demo/config/DroolsConfig.java
7d864d2a73211944955a8ec1628e79ce34118b9e
[]
no_license
zyw/springcloud-common
61994a9a91d0403098f4118ceaedf093afdc06e2
3c5dbe33844c1009e7ed625a93199effd21f1f20
refs/heads/master
2022-05-20T21:41:50.984381
2022-05-19T01:16:18
2022-05-19T01:16:18
200,951,573
1
2
null
2020-07-02T00:09:19
2019-08-07T01:47:37
Java
UTF-8
Java
false
false
2,367
java
package cn.v5cn.drools.demo.config; import org.kie.api.KieBase; import org.kie.api.KieServices; import org.kie.api.builder.KieBuilder; import org.kie.api.builder.KieFileSystem; import org.kie.api.builder.KieRepository; import org.kie.api.runtime.KieContainer; import org.kie.internal.io.ResourceFactory; import org.kie.spring.KModuleBeanFactoryPostProcessor; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver; import java.io.IOException; /** * @author powertime */ @Configuration public class DroolsConfig { //指定规则文件存放的目录 private static final String RULES_PATH = "rules/"; private final KieServices kieServices = KieServices.Factory.get(); @Bean @ConditionalOnMissingBean public KieFileSystem kieFileSystem() throws IOException { KieFileSystem kieFileSystem = kieServices.newKieFileSystem(); ResourcePatternResolver patternResolver = new PathMatchingResourcePatternResolver(); Resource[] files = patternResolver.getResources("classpath*:" + RULES_PATH + "*.*"); String path = null; for (Resource file : files) { path = RULES_PATH + file.getFilename(); kieFileSystem.write(ResourceFactory.newClassPathResource(path, "UTF-8")); } return kieFileSystem; } @Bean @ConditionalOnMissingBean public KieContainer kieContainer() throws IOException { KieRepository kieRepository = kieServices.getRepository(); kieRepository.addKieModule(kieRepository::getDefaultReleaseId); KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem()); kieBuilder.buildAll(); return kieServices.newKieContainer(kieRepository.getDefaultReleaseId()); } @Bean @ConditionalOnMissingBean public KieBase kieBase() throws IOException { return kieContainer().getKieBase(); } @Bean @ConditionalOnMissingBean public KModuleBeanFactoryPostProcessor kiePostProcessor() { return new KModuleBeanFactoryPostProcessor(); } }
[ "zyw090111@163.com" ]
zyw090111@163.com
c448ab868939c6e35e34f57ef1a84828a23c6b6b
e42c98daf48cb6b70e3dbd5f5af3517d901a06ab
/modules/uctool-manager/src/main/java/com/cisco/axl/api/_10/ListApplicationDialRulesReq.java
6b220a2f35694d4012453ddfb22dc7ea294fbf6a
[]
no_license
mgnext/UCTOOL
c238d8f295e689a8babcc1156eb0b487cba31da0
5e7aeb422a33b3cf33fca0231616ac0416d02f1a
refs/heads/master
2020-06-03T04:07:57.650216
2015-08-07T10:44:04
2015-08-07T10:44:04
39,693,900
2
1
null
null
null
null
UTF-8
Java
false
false
8,048
java
package com.cisco.axl.api._10; import java.math.BigInteger; 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.XmlSchemaType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ListApplicationDialRulesReq complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ListApplicationDialRulesReq"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="searchCriteria"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="numberBeginWith" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;element name="returnedTags" type="{http://www.cisco.com/AXL/API/10.5}LApplicationDialRules"/> * &lt;element name="skip" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" minOccurs="0"/> * &lt;element name="first" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" minOccurs="0"/> * &lt;/sequence> * &lt;attribute name="sequence" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ListApplicationDialRulesReq", propOrder = { "searchCriteria", "returnedTags", "skip", "first" }) public class ListApplicationDialRulesReq { @XmlElement(required = true) protected ListApplicationDialRulesReq.SearchCriteria searchCriteria; @XmlElement(required = true) protected LApplicationDialRules returnedTags; @XmlSchemaType(name = "unsignedLong") protected BigInteger skip; @XmlSchemaType(name = "unsignedLong") protected BigInteger first; @XmlAttribute(name = "sequence") @XmlSchemaType(name = "unsignedLong") protected BigInteger sequence; /** * Gets the value of the searchCriteria property. * * @return * possible object is * {@link ListApplicationDialRulesReq.SearchCriteria } * */ public ListApplicationDialRulesReq.SearchCriteria getSearchCriteria() { return searchCriteria; } /** * Sets the value of the searchCriteria property. * * @param value * allowed object is * {@link ListApplicationDialRulesReq.SearchCriteria } * */ public void setSearchCriteria(ListApplicationDialRulesReq.SearchCriteria value) { this.searchCriteria = value; } /** * Gets the value of the returnedTags property. * * @return * possible object is * {@link LApplicationDialRules } * */ public LApplicationDialRules getReturnedTags() { return returnedTags; } /** * Sets the value of the returnedTags property. * * @param value * allowed object is * {@link LApplicationDialRules } * */ public void setReturnedTags(LApplicationDialRules value) { this.returnedTags = value; } /** * Gets the value of the skip property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getSkip() { return skip; } /** * Sets the value of the skip property. * * @param value * allowed object is * {@link BigInteger } * */ public void setSkip(BigInteger value) { this.skip = value; } /** * Gets the value of the first property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getFirst() { return first; } /** * Sets the value of the first property. * * @param value * allowed object is * {@link BigInteger } * */ public void setFirst(BigInteger value) { this.first = value; } /** * Gets the value of the sequence property. * * @return * possible object is * {@link BigInteger } * */ public BigInteger getSequence() { return sequence; } /** * Sets the value of the sequence property. * * @param value * allowed object is * {@link BigInteger } * */ public void setSequence(BigInteger value) { this.sequence = value; } /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="numberBeginWith" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "name", "description", "numberBeginWith" }) public static class SearchCriteria { protected String name; protected String description; protected String numberBeginWith; /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the description property. * * @return * possible object is * {@link String } * */ public String getDescription() { return description; } /** * Sets the value of the description property. * * @param value * allowed object is * {@link String } * */ public void setDescription(String value) { this.description = value; } /** * Gets the value of the numberBeginWith property. * * @return * possible object is * {@link String } * */ public String getNumberBeginWith() { return numberBeginWith; } /** * Sets the value of the numberBeginWith property. * * @param value * allowed object is * {@link String } * */ public void setNumberBeginWith(String value) { this.numberBeginWith = value; } } }
[ "agentmilindu@gmail.com" ]
agentmilindu@gmail.com
e7c60ec3a40666d6e3a9aa912b02424dfb575a30
73dba21c344ca3da3ecd8453d267c8d3b9f4408d
/src/main/java/com/example/demo/dao/BranchRepository.java
27197e468ac323ca46d36da37690b489a7683d1b
[]
no_license
phases-freelance/demo
0127dc6ef86b01dfe7641485de3c38960a148e38
4610c87b94cf6af95af8b0b05f0091fca729e70a
refs/heads/master
2020-05-04T04:31:32.406996
2019-04-11T03:09:53
2019-04-11T03:09:53
178,966,999
0
0
null
2019-04-05T15:34:52
2019-04-02T00:16:11
Java
UTF-8
Java
false
false
964
java
/** * */ package com.example.demo.dao; import java.util.Date; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import com.example.demo.entity.Branch; /** * @author arockia * */ public interface BranchRepository extends JpaRepository<Branch, Integer>{ List<Branch> findByTotalAmount(Integer amount); // @Query(value = "select * from branch where id IN(select tb1.branch_id from )", nativeQuery=true) // List<Branch> findByCostByDateDate(Date date); @Query(value ="select * from branch INNER JOIN tbl_branch_cost_by_date ON tbl_branch_cost_by_date.branch_id = branch.id where tbl_branch_cost_by_date.cost_by_date_id IN (select id from cost_by_date where date = ?1)", nativeQuery=true) List<Branch> findByCondition(Date date); @Query(value = "select id, branchName, totalAmount, value from branch", nativeQuery = true) List<Branch> findAllInBranch(); }
[ "arivazhagan@kloudone.com" ]
arivazhagan@kloudone.com
3240fed7a0cd0f114c1ae90dda56054b85c2fe08
f34e3ec72f395528e42e7a6e84ce1836229bfab5
/src/main/java/net/imagej/ops/threshold/Thresholds.java
6c584b032f77c943960f37ad6dfdb19969d79ece
[ "BSD-2-Clause" ]
permissive
haesleinhuepf/imagej-ops
147861c6d22a24085552be554aa90481e06bd611
162a4f56795e4933343ded1f4a4207a09dd482bd
refs/heads/master
2021-01-18T16:55:37.011635
2020-08-11T07:42:16
2020-08-11T07:42:16
286,678,387
0
0
BSD-2-Clause
2020-08-11T07:39:52
2020-08-11T07:39:51
null
UTF-8
Java
false
false
3,344
java
/* * #%L * ImageJ software for multidimensional image processing and analysis. * %% * Copyright (C) 2014 - 2020 ImageJ developers. * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY 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 HOLDERS 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. * #L% */ package net.imagej.ops.threshold; // Ported from Antti Niemisto's HistThresh Matlab toolbox // Relicensed BSD 2-12-13 /** * Utility methods used by the various threshold methods. * * @author Barry DeZonia * @author Gabriel Landini */ public final class Thresholds { private Thresholds() { // NB: Prevent instantiation of utility class. } public static boolean bimodalTest(double[] y) { int len = y.length; int modes = 0; for (int k = 1; k < len - 1; k++) { if (y[k - 1] < y[k] && y[k + 1] < y[k]) { modes++; if (modes > 2) return false; } } return (modes == 2); } /** * The partial sum A from C. A. Glasbey, "An analysis of histogram-based * thresholding algorithms," CVGIP: Graphical Models and Image Processing, * vol. 55, pp. 532-537, 1993. */ public static double A(long[] y, int j) { double x = 0; for (int i = 0; i <= j; i++) x += y[i]; return x; } /** * The partial sum B from C. A. Glasbey, "An analysis of histogram-based * thresholding algorithms," CVGIP: Graphical Models and Image Processing, * vol. 55, pp. 532-537, 1993. */ public static double B(long[] y, int j) { double x = 0; for (int i = 0; i <= j; i++) x += y[i] * i; return x; } /** * The partial sum C from C. A. Glasbey, "An analysis of histogram-based * thresholding algorithms," CVGIP: Graphical Models and Image Processing, * vol. 55, pp. 532-537, 1993. */ public static double C(long[] y, int j) { double x = 0; for (int i = 0; i <= j; i++) x += y[i] * i * i; return x; } /** * The partial sum D from C. A. Glasbey, "An analysis of histogram-based * thresholding algorithms," CVGIP: Graphical Models and Image Processing, * vol. 55, pp. 532-537, 1993. */ public static double D(long[] y, int j) { double x = 0; for (int i = 0; i <= j; i++) x += y[i] * i * i * i; return x; } }
[ "ctrueden@wisc.edu" ]
ctrueden@wisc.edu
0409773da870fe816323ec9d982cc9a71af966bb
fce8f3a67722221e968dbac0993b2b91e9590e85
/scouter.agent.java/src/main/java/scouter/agent/asm/ApiCallResponseObjectASM.java
f70d03fe29ff43eb074222e633f8c462e6107383
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
sejoung/scouter
2a30bb520086ea4af4382934cf02bb59ab588764
72e7cdf2494c289588580e841c69bdcf796844f5
refs/heads/master
2020-03-30T09:09:15.415382
2018-10-17T06:38:55
2018-10-17T06:38:55
151,062,591
0
0
Apache-2.0
2018-10-17T06:38:56
2018-10-01T09:12:09
Java
UTF-8
Java
false
false
3,783
java
/* * Copyright 2015 the original author or authors. * @https://github.com/scouter-project/scouter * * 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 scouter.agent.asm; import scouter.agent.ClassDesc; import scouter.agent.Configure; import scouter.agent.trace.TraceApiCall; import scouter.org.objectweb.asm.ClassVisitor; import scouter.org.objectweb.asm.Label; import scouter.org.objectweb.asm.MethodVisitor; import scouter.org.objectweb.asm.Opcodes; import scouter.org.objectweb.asm.Type; import scouter.org.objectweb.asm.commons.LocalVariablesSorter; import java.util.HashSet; import java.util.Set; /** * @author Gun Lee (gunlee01@gmail.com) on 2018. 3. 20. */ public class ApiCallResponseObjectASM implements IASM, Opcodes { private Configure conf = Configure.getInstance(); private static Set<String> hookingClasses = new HashSet<String>(); static { hookingClasses.add("org/apache/http/impl/execchain/HttpResponseProxy"); hookingClasses.add("org/apache/http/impl/client/CloseableHttpResponseProxy"); } public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) { if (conf._hook_apicall_enabled == false) return cv; if (hookingClasses.contains(className)) { return new ApiCallResponseObjectCV(cv, className); } return cv; } } class ApiCallResponseObjectCV extends ClassVisitor implements Opcodes { String className; public ApiCallResponseObjectCV(ClassVisitor cv, String className) { super(ASM5, cv); this.className = className; } @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); if (mv == null) { return null; } if ("<init>".equals(name) && desc.startsWith("(Lorg/apache/http/HttpResponse;")) { return new ApiCallResponseObjectInitMV(className, access, name, desc, mv); } return mv; } } class ApiCallResponseObjectInitMV extends LocalVariablesSorter implements Opcodes { private static final String TRACE = TraceApiCall.class.getName().replace('.', '/'); private static final String END_METHOD = "setCalleeToCtxInHttpClientResponse"; private static final String END_SIGNATURE = "(Ljava/lang/Object;Ljava/lang/Object;)V"; private String className; private String name; private String desc; private int statIdx; private Type returnType; private Label startFinally = new Label(); public ApiCallResponseObjectInitMV(String className, int access, String name, String desc, MethodVisitor mv) { super(ASM5, access, desc, mv); this.className = className; this.name = name; this.desc = desc; this.returnType = Type.getReturnType(desc); } @Override public void visitInsn(int opcode) { if ((opcode >= IRETURN && opcode <= RETURN)) { mv.visitVarInsn(ALOAD, 0); mv.visitVarInsn(ALOAD, 1); mv.visitMethodInsn(Opcodes.INVOKESTATIC, TRACE, END_METHOD, END_SIGNATURE, false); } mv.visitInsn(opcode); } }
[ "gunlee01@gmail.com" ]
gunlee01@gmail.com
538b1e30ba310b30996f8d84b0c3ae50c965df7d
d8ab609aa9f44bbc01231d1d7d5c6c1524de9842
/herd-code/herd-service/src/main/java/org/finra/herd/service/impl/PartitionKeyGroupServiceImpl.java
f9f98980d54b0d813fa3f6ef71b30f583f54800a
[ "Apache-2.0" ]
permissive
diffblue-assistant/herd
423f04204ef90c28cb558f4a5adad7b7996d44d3
d514d2447cfe5789cb4828abfd3e0d1422a7f039
refs/heads/master
2020-03-27T03:03:57.251203
2018-08-14T18:26:43
2018-08-14T18:26:43
145,837,219
0
0
Apache-2.0
2018-08-23T10:17:17
2018-08-23T10:17:17
null
UTF-8
Java
false
false
7,540
java
/* * Copyright 2015 herd contributors * * 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.finra.herd.service.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.finra.herd.dao.BusinessObjectFormatDao; import org.finra.herd.dao.PartitionKeyGroupDao; import org.finra.herd.dao.config.DaoSpringModuleConfig; import org.finra.herd.model.AlreadyExistsException; import org.finra.herd.model.api.xml.PartitionKeyGroup; import org.finra.herd.model.api.xml.PartitionKeyGroupCreateRequest; import org.finra.herd.model.api.xml.PartitionKeyGroupKey; import org.finra.herd.model.api.xml.PartitionKeyGroupKeys; import org.finra.herd.model.jpa.PartitionKeyGroupEntity; import org.finra.herd.service.PartitionKeyGroupService; import org.finra.herd.service.helper.PartitionKeyGroupDaoHelper; import org.finra.herd.service.helper.PartitionKeyGroupHelper; /** * The partition key group service implementation. */ @Service @Transactional(value = DaoSpringModuleConfig.HERD_TRANSACTION_MANAGER_BEAN_NAME) public class PartitionKeyGroupServiceImpl implements PartitionKeyGroupService { @Autowired private BusinessObjectFormatDao businessObjectFormatDao; @Autowired private PartitionKeyGroupDao partitionKeyGroupDao; @Autowired private PartitionKeyGroupDaoHelper partitionKeyGroupDaoHelper; @Autowired private PartitionKeyGroupHelper partitionKeyGroupHelper; /** * Creates a new partition key group. * * @param request the information needed to create a partition key group * * @return the newly created partition key group information */ @Override public PartitionKeyGroup createPartitionKeyGroup(PartitionKeyGroupCreateRequest request) { // Perform the validation. partitionKeyGroupHelper.validatePartitionKeyGroupKey(request.getPartitionKeyGroupKey()); // Ensure a partition key group with the specified name doesn't already exist. PartitionKeyGroupEntity partitionKeyGroupEntity = partitionKeyGroupDao.getPartitionKeyGroupByKey(request.getPartitionKeyGroupKey()); if (partitionKeyGroupEntity != null) { throw new AlreadyExistsException(String.format("Unable to create partition key group with name \"%s\" because it already exists.", request.getPartitionKeyGroupKey().getPartitionKeyGroupName())); } // Create a partition key group entity from the request information. partitionKeyGroupEntity = createPartitionKeyGroupEntity(request); // Persist the new entity. partitionKeyGroupEntity = partitionKeyGroupDao.saveAndRefresh(partitionKeyGroupEntity); // Create and return the partition key group object from the persisted entity. return createPartitionKeyGroupFromEntity(partitionKeyGroupEntity); } /** * Gets an existing partition key group by key. * * @param partitionKeyGroupKey the partition key group key * * @return the partition key group information */ @Override public PartitionKeyGroup getPartitionKeyGroup(PartitionKeyGroupKey partitionKeyGroupKey) { // Perform validation and trim. partitionKeyGroupHelper.validatePartitionKeyGroupKey(partitionKeyGroupKey); // Retrieve and ensure that a partition key group exists with the specified name. PartitionKeyGroupEntity partitionKeyGroupEntity = partitionKeyGroupDaoHelper.getPartitionKeyGroupEntity(partitionKeyGroupKey); // Create and return the partition key group object from the persisted entity. return createPartitionKeyGroupFromEntity(partitionKeyGroupEntity); } /** * Deletes an existing partition key group by key. * * @param partitionKeyGroupKey the partition key group key * * @return the partition key group that got deleted */ @Override public PartitionKeyGroup deletePartitionKeyGroup(PartitionKeyGroupKey partitionKeyGroupKey) { // Perform validation and trim. partitionKeyGroupHelper.validatePartitionKeyGroupKey(partitionKeyGroupKey); // Retrieve and ensure that a partition key group already exists with the specified name. PartitionKeyGroupEntity partitionKeyGroupEntity = partitionKeyGroupDaoHelper.getPartitionKeyGroupEntity(partitionKeyGroupKey); // Check if we are allowed to delete this business object format. if (businessObjectFormatDao.getBusinessObjectFormatCount(partitionKeyGroupEntity) > 0L) { throw new IllegalArgumentException(String.format("Can not delete \"%s\" partition key group since it is being used by a business object format.", partitionKeyGroupKey.getPartitionKeyGroupName())); } // Delete the partition key group. partitionKeyGroupDao.delete(partitionKeyGroupEntity); // Create and return the partition key group object from the deleted entity. return createPartitionKeyGroupFromEntity(partitionKeyGroupEntity); } /** * Gets a list of keys for all existing partition key groups. * * @return the partition key group keys */ @Override public PartitionKeyGroupKeys getPartitionKeyGroups() { // Create and populate a list of partition key group keys. PartitionKeyGroupKeys partitionKeyGroupKeys = new PartitionKeyGroupKeys(); partitionKeyGroupKeys.getPartitionKeyGroupKeys().addAll(partitionKeyGroupDao.getPartitionKeyGroups()); return partitionKeyGroupKeys; } /** * Creates a new partition key group entity from the request information. * * @param request the partition key group create request * * @return the newly created partition key group entity */ private PartitionKeyGroupEntity createPartitionKeyGroupEntity(PartitionKeyGroupCreateRequest request) { // Create a new entity. PartitionKeyGroupEntity partitionKeyGroupEntity = new PartitionKeyGroupEntity(); partitionKeyGroupEntity.setPartitionKeyGroupName(request.getPartitionKeyGroupKey().getPartitionKeyGroupName()); return partitionKeyGroupEntity; } /** * Creates the partition key group from the persisted entity. * * @param partitionKeyGroupEntity the partition key group entity * * @return the partition key group */ private PartitionKeyGroup createPartitionKeyGroupFromEntity(PartitionKeyGroupEntity partitionKeyGroupEntity) { // Create the partition key group. PartitionKeyGroup partitionKeyGroup = new PartitionKeyGroup(); PartitionKeyGroupKey partitionKeyGroupKey = new PartitionKeyGroupKey(); partitionKeyGroup.setPartitionKeyGroupKey(partitionKeyGroupKey); partitionKeyGroupKey.setPartitionKeyGroupName(partitionKeyGroupEntity.getPartitionKeyGroupName()); return partitionKeyGroup; } }
[ "mchao47@gmail.com" ]
mchao47@gmail.com
8ce5b24a6395553500e0724f6fd296f226463f2e
aa836d05066e304d86c62c8cc969d67e46dd89c3
/src/main/java/com/empowerops/linqalike/queries/FastSize.java
5376253a5b99d9dc0a302326dd91219fd789a54a
[]
no_license
Groostav/LinqALike
352995b55678bc2fce3581ccbda2394dbb712819
28f1f5104b89522aa49e4dccf552eba5ae378fd0
refs/heads/master
2020-12-24T06:24:00.545589
2017-04-18T04:34:54
2017-04-18T04:34:54
16,452,492
2
0
null
2015-12-06T03:43:03
2014-02-02T10:05:24
Java
UTF-8
Java
false
false
692
java
package com.empowerops.linqalike.queries; /** * interface to denote that a particular Queryable implementation * has custom (fast) handling for size() access. * * Created by Geoff on 2015-10-29. */ // TODO this is broken, it should be a tree-model wherein we iterate down, // but as is a lot of cappedCount methods dont properly recurse. public interface FastSize{ int size(); /** * Counts the number of elements up to the supplied <code>maxValueToReturn</code>, * at which point <i>no further counting</i> should be done. */ default int cappedCount(int maxValueToReturn){ int size = size(); return Math.min(maxValueToReturn, size); } }
[ "geoff_groos@msn.com" ]
geoff_groos@msn.com
b19164d5090c9ab6d2dd30cc9037ca9da8940749
55e46ffa52e429c565bae112d22720714697cdd3
/ArchersParadox/src/main/java/cofh/archersparadox/entity/projectile/EnderArrowEntity.java
4c467b63d82e2f7dcd8d5daa418fc9b3999c6971
[]
no_license
fdk123/thermal_food
35e4d3f891e1a574529a8ad1891386f3a5eebe73
86f688c6aff7afab7fb43320f7f2b7df021ad979
refs/heads/main
2023-04-24T05:04:05.927762
2021-05-17T14:08:01
2021-05-17T14:08:01
368,121,200
1
0
null
null
null
null
UTF-8
Java
false
false
4,906
java
package cofh.archersparadox.entity.projectile; import cofh.lib.util.Utils; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.projectile.AbstractArrowEntity; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.nbt.CompoundNBT; import net.minecraft.network.IPacket; import net.minecraft.particles.ParticleTypes; import net.minecraft.potion.EffectInstance; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.EntityRayTraceResult; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.vector.Vector3d; import net.minecraft.world.World; import net.minecraftforge.fml.network.NetworkHooks; import static cofh.archersparadox.init.APReferences.ENDER_ARROW_ENTITY; import static cofh.archersparadox.init.APReferences.ENDER_ARROW_ITEM; import static cofh.lib.util.constants.NBTTags.TAG_ARROW_DATA; import static cofh.lib.util.references.CoreReferences.ENDERFERENCE; public class EnderArrowEntity extends AbstractArrowEntity { private static float baseDamage = 0.5F; private static final int DURATION = 80; private static final int DURATION_FACTOR = 2; public boolean discharged; private BlockPos origin; public EnderArrowEntity(EntityType<? extends EnderArrowEntity> entityIn, World worldIn) { super(entityIn, worldIn); this.damage = baseDamage; } public EnderArrowEntity(World worldIn, LivingEntity shooter) { super(ENDER_ARROW_ENTITY, shooter, worldIn); this.damage = baseDamage; this.origin = shooter.getPosition(); } public EnderArrowEntity(World worldIn, double x, double y, double z) { super(ENDER_ARROW_ENTITY, x, y, z, worldIn); this.damage = baseDamage; this.origin = new BlockPos(x, y, z); } @Override protected ItemStack getArrowStack() { return discharged ? new ItemStack(Items.ARROW) : new ItemStack(ENDER_ARROW_ITEM); } @Override protected void onImpact(RayTraceResult raytraceResultIn) { super.onImpact(raytraceResultIn); Entity shooter = func_234616_v_(); if (raytraceResultIn.getType() != RayTraceResult.Type.MISS && !discharged && shooter != null) { int duration = DURATION; if (raytraceResultIn.getType() == RayTraceResult.Type.BLOCK) { Utils.teleportEntityTo(shooter, this.getPosition()); if (shooter instanceof LivingEntity && !Utils.isFakePlayer(shooter)) { ((LivingEntity) shooter).addPotionEffect(new EffectInstance(ENDERFERENCE, duration, 0, false, false)); } } if (raytraceResultIn.getType() == RayTraceResult.Type.ENTITY) { BlockPos originPos = origin == null ? shooter.getPosition() : origin; Utils.teleportEntityTo(shooter, getPosition()); if (shooter instanceof LivingEntity && !Utils.isFakePlayer(shooter)) { ((LivingEntity) shooter).addPotionEffect(new EffectInstance(ENDERFERENCE, duration, 0, false, false)); } Entity entity = ((EntityRayTraceResult) raytraceResultIn).getEntity(); if (entity instanceof LivingEntity && entity.isNonBoss()) { Utils.teleportEntityTo(entity, originPos); ((LivingEntity) entity).addPotionEffect(new EffectInstance(ENDERFERENCE, duration, 0, false, false)); } } discharged = true; } } @Override public void setFire(int seconds) { } @Override public void setIsCritical(boolean critical) { } @Override public void setKnockbackStrength(int knockbackStrengthIn) { } @Override public void setPierceLevel(byte level) { } @Override public void tick() { super.tick(); if (!this.inGround || this.getNoClip()) { if (Utils.isClientWorld(world)) { Vector3d vec3d = this.getMotion(); double d1 = vec3d.x; double d2 = vec3d.y; double d0 = vec3d.z; this.world.addParticle(ParticleTypes.PORTAL, this.getPosX() + d1 * 0.25D, this.getPosY() + d2 * 0.25D, this.getPosZ() + d0 * 0.25D, -d1, -d2 + 0.2D, -d0); } } } @Override public void writeAdditional(CompoundNBT compound) { super.writeAdditional(compound); compound.putBoolean(TAG_ARROW_DATA, discharged); } @Override public void readAdditional(CompoundNBT compound) { super.readAdditional(compound); discharged = compound.getBoolean(TAG_ARROW_DATA); } @Override public IPacket<?> createSpawnPacket() { return NetworkHooks.getEntitySpawningPacket(this); } }
[ "lol-faseofic@yandex.ru" ]
lol-faseofic@yandex.ru
c6658d49264a1414e1276f13122910f2507161a3
964800b7b0bb45c8965b6a0547939ba9ae93cddf
/CityPassServer/src/com/citypass/dao/IUserDao.java
5429b26ee8c4a8deb5815d562ede157f171a0abb
[]
no_license
gyadministrator/CityPassServer
cfed3c2bd7db570becf5ebe1fb1d809cd313b804
ded32e313b9f57eeed42a8b5fc8fd62664b5e41d
refs/heads/master
2020-12-30T14:34:42.381171
2017-05-12T15:09:55
2017-05-12T15:09:55
91,072,332
0
0
null
null
null
null
UTF-8
Java
false
false
223
java
package com.citypass.dao; import com.citypass.vo.User; public interface IUserDao { public User queryToLogin(String account, String password) throws Exception; public void save(User user) throws Exception; }
[ "1562211757@qq.com" ]
1562211757@qq.com
bc529e2f7875b9bf0c81a92d7c1c422e75725ebd
434008226ebb31966f5f00cb193a6869d27b0e99
/src/main/java/com/liyuan/model/SysUser.java
e6119c2bb4f086958e40910527a76f92a7d9f6a6
[]
no_license
liyuan231/SpringSocial_SpringSecurity_githubOAuth2
be79b5b49b304eb7b9cfb357a3f3b34f6bd0818c
6071cce7caf1947623874a4781fac0db68ff10e2
refs/heads/master
2022-12-03T20:01:25.619036
2020-08-25T03:05:40
2020-08-25T03:05:40
288,906,992
0
0
null
null
null
null
UTF-8
Java
false
false
1,564
java
package com.liyuan.model; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.AuthorityUtils; import org.springframework.social.security.SocialUser; import java.util.Collection; public class SysUser extends SocialUser { /** * 用户在本系统中的唯一标志 */ private String userId; private Integer roleId; public SysUser(String username, String password, Collection<? extends GrantedAuthority> authorities, String userId, Integer roleId) { super(username, password, authorities); this.userId = userId; this.roleId = roleId; } public SysUser(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities, String userId, Integer roleId) { super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities); this.userId = userId; this.roleId = roleId; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public int getRoleId() { return roleId; } public void setRoleId(int roleId) { this.roleId = roleId; } }
[ "1987151116@qq.com" ]
1987151116@qq.com
e59635523078c83e994be3a4d893a319fc732f7d
71975999c9d702a0883ec9038ce3e76325928549
/src2.4.0/src/main/java/org/jsoup/parser/ParseError.java
3559286dc556609ecfaf0645c15cb6b82912b27f
[]
no_license
XposedRunner/PhysicalFitnessRunner
dc64179551ccd219979a6f8b9fe0614c29cd61de
cb037e59416d6c290debbed5ed84c956e705e738
refs/heads/master
2020-07-15T18:18:23.001280
2019-09-02T04:21:34
2019-09-02T04:21:34
205,620,387
3
2
null
null
null
null
UTF-8
Java
false
false
778
java
package org.jsoup.parser; public class ParseError { private int O000000o; private String O00000Oo; ParseError(int i, String str) { this.O000000o = i; this.O00000Oo = str; } ParseError(int i, String str, Object... objArr) { this.O00000Oo = String.format(str, objArr); this.O000000o = i; } public String O000000o() { return this.O00000Oo; } public int O00000Oo() { return this.O000000o; } public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(this.O000000o); stringBuilder.append(": "); stringBuilder.append(this.O00000Oo); return stringBuilder.toString(); } }
[ "xr_master@mail.com" ]
xr_master@mail.com
f6cba953ba47952382574c182d171c1712f8ead2
40a6d17d2fd7bd7f800d5562d8bb9a76fb571ab4
/pxlab/src/main/java/de/pxlab/pxl/display/RandomDotMotionContrast.java
301193e2d3919ee63d35678f962694a08e67dcfd
[ "MIT" ]
permissive
manuelgentile/pxlab
cb6970e2782af16feb1f8bf8e71465ebc48aa683
c8d29347d36c3e758bac4115999fc88143c84f87
refs/heads/master
2021-01-13T02:26:40.208893
2012-08-08T13:49:53
2012-08-08T13:49:53
5,121,970
2
0
null
null
null
null
UTF-8
Java
false
false
1,936
java
package de.pxlab.pxl.display; import java.awt.*; import de.pxlab.pxl.*; import de.pxlab.util.Randomizer; /** * A set of static dots mixed with a set of moving dots which induce apparent * motion for the static dots. * * @version 0.2.0 */ /* * * 06/11/02 */ public class RandomDotMotionContrast extends RandomDotMotionThreshold { /* * public ExPar CenterSize = new ExPar(PROPORT, new ExParValue(0.33, 0.0, * 1.0), "Center Field Size"); */ public RandomDotMotionContrast() { setTitleAndTopic("Motion contrast for Random Dots", RANDOM_DOT_DSP); Circular.set(1); MotionVectorLength.set(1); DotDuration.set(60); } // private int fpc = 30; protected int create() { int s = super.create(); // setFramesPerCycle(fpc); return s; } protected void backgroundMotion() { int dn = base_dotArray.size(); RandomDot transformed_dot; int m = 0; int vidx = MotionVectorAngle.getInt() % 360; int w2 = transformed_rda.getWidth() / 2; int h2 = transformed_rda.getHeight() / 2; long r2 = (long) w2 * (long) w2 * (long) h2 * (long) h2; int rx, ry; long rrx, rry; int x, y; for (int i = 0; i < dn; i++) { transformed_dot = (RandomDot) transformed_dotArray.get(i); if (transformed_dot.code == RandomDot.BACKGROUND) { x = transformed_dot.x + vdx[vidx]; y = transformed_dot.y + vdy[vidx]; rx = x - w2; ry = y - h2; rrx = (long) h2 * (long) rx; rry = (long) w2 * (long) ry; if ((rrx * rrx + rry * rry) >= r2) { transformed_dot.x = (-1) * (transformed_dot.x - w2) + w2; transformed_dot.y = (-1) * (transformed_dot.y - h2) + h2; } else { transformed_dot.x = x; transformed_dot.y = y; } } else { } } } /* Compute the Display object's geometry for */ public void computeAnimationFrame(int frame) { super.computeAnimationFrame(1); backgroundMotion(); } }
[ "manuelgentile@gmail.com" ]
manuelgentile@gmail.com
1cd9526ace383dce119675372e0b34af30740e58
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/kylin/learning/6545/TooBigDictionaryException.java
562d3351bd06bf6dd0092c07ac0efb8fd5d5f31d
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,183
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kylin.common.exceptions; /** * @author TinChiWay * @date 2018/4/2 */ @SuppressWarnings("serial") public class TooBigDictionaryException extends RuntimeException { public TooBigDictionaryException(String message, Exception e) { super(message, e); } public TooBigDictionaryException(String message) { super(message); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
d436b2da6ee6694380a0910efd9c42b10c5bc175
4b492c78161a33de1a89bbbebca9a79d0cf1d265
/com/hbm/items/special/ItemRadioactive.java
064ae226dac6ccffc8538937888be82bc5ca04a8
[ "WTFPL" ]
permissive
Arrandale3/Hbm-s-Nuclear-Tech-GIT
5abdbe39aecf89fde6230e458cbab3e8c38c4016
58faac65bfd745b762e9360e7e332891c8de2ef9
refs/heads/master
2022-10-13T22:06:51.095659
2020-06-07T14:41:22
2020-06-07T14:41:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,073
java
package com.hbm.items.special; import java.util.List; import com.hbm.handler.ArmorUtil; import com.hbm.lib.Library; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; public class ItemRadioactive extends ItemCustomLore { float radiation; boolean fire; boolean blinding; public ItemRadioactive(float radiation) { this.radiation = radiation; } public ItemRadioactive(float radiation, boolean fire) { this.radiation = radiation; this.fire = fire; } public ItemRadioactive(float radiation, boolean fire, boolean blinding) { this.radiation = radiation; this.fire = fire; this.blinding = blinding; } @Override public void onUpdate(ItemStack stack, World world, Entity entity, int i, boolean b) { doRadiationDamage(entity, stack.stackSize); } public void doRadiationDamage(Entity entity, float mod) { if (entity instanceof EntityLivingBase) { if(this.radiation > 0) Library.applyRadData(entity, this.radiation / 20F); if(this.fire) entity.setFire(5); if(!(entity instanceof EntityPlayer && ArmorUtil.checkForGoggles((EntityPlayer)entity))) if(this.blinding) ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.blindness.id, 100, 0)); } } @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { super.addInformation(stack, player, list, bool); if(radiation > 0) { list.add(EnumChatFormatting.GREEN + "[Radioactive]"); list.add(EnumChatFormatting.YELLOW + (radiation + "RAD/s")); } if(fire) list.add(EnumChatFormatting.GOLD + "[Pyrophyric / Hot]"); if(blinding) list.add(EnumChatFormatting.DARK_AQUA + "[Blinding]"); } }
[ "hbmmods@gmail.com" ]
hbmmods@gmail.com