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
56e2d51086ba5d7d082ff8c2b49a20003b6331f5
07b996b8440dbe5499b857f284e0aa86193f2faa
/src/main/java/com/sky/ddt/dao/generate/OutboundOrderShopSkuMapper.java
557d49f104488dc09dc8e5d41335ab9ef6e21d5f
[]
no_license
skywhitebai/ddt
2b0b35194199abf2126e8297316ad16fec2186b9
33ce8da01d75f185c832e32ac117e23a7040cf64
refs/heads/master
2023-06-07T00:29:53.206163
2023-06-04T04:19:53
2023-06-04T04:19:53
311,826,029
0
1
null
null
null
null
UTF-8
Java
false
false
1,052
java
package com.sky.ddt.dao.generate; import com.sky.ddt.entity.OutboundOrderShopSku; import com.sky.ddt.entity.OutboundOrderShopSkuExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface OutboundOrderShopSkuMapper { long countByExample(OutboundOrderShopSkuExample example); int deleteByExample(OutboundOrderShopSkuExample example); int deleteByPrimaryKey(Integer id); int insert(OutboundOrderShopSku record); int insertSelective(OutboundOrderShopSku record); List<OutboundOrderShopSku> selectByExample(OutboundOrderShopSkuExample example); OutboundOrderShopSku selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") OutboundOrderShopSku record, @Param("example") OutboundOrderShopSkuExample example); int updateByExample(@Param("record") OutboundOrderShopSku record, @Param("example") OutboundOrderShopSkuExample example); int updateByPrimaryKeySelective(OutboundOrderShopSku record); int updateByPrimaryKey(OutboundOrderShopSku record); }
[ "baixueping@rfchina.com" ]
baixueping@rfchina.com
bb413be51ac20901b4b89e39ee80af9971ac5f53
030cf3fe2ac3cd3be8d37ca3b45a0c8299c01764
/backend/src/test/java/com/sergiomartinrubio/backend/GetAllGamesSummaryIntegrationTest.java
b4fbc01af5655ffd64389ee9991569639a8eb6e6
[]
no_license
smartinrub/rock-paper-scissors
f91823fa512adcebbbf19774d5d19cebe77d9589
37174a49c9f46883cf440d793e383300e5055102
refs/heads/master
2022-11-11T11:53:34.417821
2020-07-04T16:16:18
2020-07-04T16:16:18
277,123,716
0
0
null
null
null
null
UTF-8
Java
false
false
3,919
java
package com.sergiomartinrubio.backend; import com.sergiomartinrubio.backend.model.GamesSummary; import com.sergiomartinrubio.backend.model.Result; import com.sergiomartinrubio.backend.model.ResultSummary; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import java.util.ArrayList; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class GetAllGamesSummaryIntegrationTest { @LocalServerPort private int port; @Autowired private TestRestTemplate restTemplate; @Test public void givenTwoSeparateGamesWhenGetAllSummaryGamesThenReturnValuesOfThreeSummaries() { // GIVEN ResponseEntity<String> firstResponse = restTemplate .exchange("http://localhost:" + port + "/play", HttpMethod.POST, null, String.class); HttpHeaders firstRequestHeaders = new HttpHeaders(); firstRequestHeaders.add("Cookie", firstResponse.getHeaders().get("Set-Cookie").get(0)); HttpEntity firstRequestEntity = new HttpEntity(null, firstRequestHeaders); ResponseEntity<String> secondResponse = restTemplate .exchange("http://localhost:" + port + "/play", HttpMethod.POST, null, String.class); HttpHeaders secondRequestHeaders = new HttpHeaders(); secondRequestHeaders.add("Cookie", secondResponse.getHeaders().get("Set-Cookie").get(0)); HttpEntity secondRequestEntity = new HttpEntity(null, secondRequestHeaders); restTemplate.exchange("http://localhost:" + port + "/play", HttpMethod.POST, firstRequestEntity, String.class); // WHEN GamesSummary gamesSummary = restTemplate.exchange("http://localhost:" + port + "/summary", HttpMethod.GET, null, GamesSummary.class) .getBody(); // THEN List<ResultSummary> firstResultSummaries = restTemplate .exchange("http://localhost:" + port + "/rounds-summary", HttpMethod.GET, firstRequestEntity, new ParameterizedTypeReference<List<ResultSummary>>() { }).getBody(); List<ResultSummary> secondResultSummaries = restTemplate .exchange("http://localhost:" + port + "/rounds-summary", HttpMethod.GET, secondRequestEntity, new ParameterizedTypeReference<List<ResultSummary>>() { }).getBody(); List<ResultSummary> resultSummaries = new ArrayList<>(); resultSummaries.addAll(firstResultSummaries); resultSummaries.addAll(secondResultSummaries); long drawCount = resultSummaries.stream().filter(resultSummary -> resultSummary.getResult() == Result.DRAW).count(); long playerOneCount = resultSummaries.stream().filter(resultSummary -> resultSummary.getResult() == Result.PLAYER_1_WINS).count(); long playerTwoCount = resultSummaries.stream().filter(resultSummary -> resultSummary.getResult() == Result.PLAYER_2_WINS).count(); assertThat(gamesSummary.getTotalRoundsPlayed()).isEqualTo(3); assertThat(gamesSummary.getTotalDraws()).isEqualTo(drawCount); assertThat(gamesSummary.getTotalWinsFirstPlayers()).isEqualTo(playerOneCount); assertThat(gamesSummary.getTotalWinsSecondPlayers()).isEqualTo(playerTwoCount); } }
[ "econsergio@gmail.com" ]
econsergio@gmail.com
04de3888fa02e3fcc42c09697dce6f80c94ebf35
bdba19cc0346b5719e200c74159896391117723f
/tps/travelPortalRest(April 22, 2016)/src/igc/tech/com/dao/AlbumDao.java
5eff6c9e88247e9001c6e07a76a7f24099455b9d
[]
no_license
tilakpeace/tps1
181f2812b640cf2f28624a825047c19ad01db28a
dd164199c635dd6783f63248759de0073750491e
refs/heads/master
2021-01-22T03:06:19.769511
2017-02-06T15:41:04
2017-02-06T15:41:04
81,099,126
0
1
null
null
null
null
UTF-8
Java
false
false
240
java
package igc.tech.com.dao; import java.util.List; public interface AlbumDao { public List procAlbum(String albumId, String albumCaption, String detail, String type, String commonId, String imageId, String user, String flag); }
[ "tilakpeace0000@gmail.com" ]
tilakpeace0000@gmail.com
18d8b25f829458cab916dca650d0d8667769171f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-12798-112-6-SPEA2-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest_scaffolding.java
87ca46b866960eb841cbe2b0410c96c1864b9e30
[]
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
459
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Apr 07 02:41:59 UTC 2020 */ package com.xpn.xwiki.internal.template; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class InternalTemplateManager_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
ce455991708f9bb73322e06ca02ed0a3b014fe49
c7d2f0c03a17973ddfee2f91ed0fcc08b63e1a45
/src/handling/channel/handler/AttackType.java
fefed978bb5e1ab8a30ae2a8974a40247f44d90b
[]
no_license
Rabbit-Guo/TWMS_134
1ff26104efcfe4973c9ba803ebedb8ab6ea989b5
ffe96a957c216fba23c5361c89c3817ce44e4b90
refs/heads/master
2023-05-18T18:38:08.794937
2019-01-09T18:12:22
2019-01-09T18:12:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
146
java
package handling.channel.handler; public enum AttackType { NON_RANGED, RANGED, RANGED_WITH_SHADOWPARTNER, NON_RANGED_WITH_MIRROR; }
[ "s884812@gmail.com" ]
s884812@gmail.com
1e427095c3d9f4b7955762f2d66037ac032a8a13
b39d7e1122ebe92759e86421bbcd0ad009eed1db
/sources/com/android/internal/os/UidAppCpuPowerCalculator.java
e804894c21b47f0ae97d22f00c5d35bffc09ea2c
[]
no_license
AndSource/miuiframework
ac7185dedbabd5f619a4f8fc39bfe634d101dcef
cd456214274c046663aefce4d282bea0151f1f89
refs/heads/master
2022-03-31T11:09:50.399520
2020-01-02T09:49:07
2020-01-02T09:49:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,593
java
package com.android.internal.os; import android.content.Context; import com.android.internal.os.UidAppBatteryStatsImpl.UidPackage; public class UidAppCpuPowerCalculator { private static final boolean DEBUG = false; private static final long MICROSEC_IN_HR = 3600000000L; private static final String TAG = "UidAppCpuPowerCalculator"; private final Context mContext; public UidAppCpuPowerCalculator(Context context) { this.mContext = context; } public void calculateUidApp(BatterySipper app, UidPackage p, int statsType) { UidPackage uidPackage; int i; BatterySipper batterySipper = app; PowerProfile profile = new PowerProfile(this.mContext); batterySipper.cpuTimeMs = (p.getUserCpuTimeUs(statsType) + p.getSystemCpuTimeUs(statsType)) / 1000; int numClusters = profile.getNumCpuClusters(); double cpuPowerMaUs = 0.0d; for (int cluster = 0; cluster < numClusters; cluster++) { for (int speed = 0; speed < profile.getNumSpeedStepsInCpuCluster(cluster); speed++) { cpuPowerMaUs += ((double) p.getTimeAtCpuSpeed(cluster, speed, statsType)) * profile.getAveragePowerForCpuCore(cluster, speed); } uidPackage = p; i = statsType; } uidPackage = p; i = statsType; batterySipper.cpuPowerMah = cpuPowerMaUs / 3.6E9d; if (batterySipper.cpuFgTimeMs > batterySipper.cpuTimeMs) { batterySipper.cpuTimeMs = batterySipper.cpuFgTimeMs; } } }
[ "shivatejapeddi@gmail.com" ]
shivatejapeddi@gmail.com
3dedb63d3e2b0bb39dff6c25ac8238aca6ea1c02
e64a60440c98744dbaa17f116259db1c9d2e1522
/src/PersonsAndWeapons/King.java
d446a85de165c3494624fde55842eff01a96cfed
[]
no_license
Senat77/Patterns
bfdd85a434618906579542e33b5e7de29fdd656e
2f43771735e173ff0a601c22d149f48afe7be7cb
refs/heads/master
2020-05-04T00:14:03.852431
2019-09-04T08:54:28
2019-09-04T08:54:28
178,880,147
0
0
null
null
null
null
UTF-8
Java
false
false
291
java
package PersonsAndWeapons; public class King extends Character { public King() { weapon = new BowAndArrowBehavior(); } @Override public void fight() { weapon.useWeapon(); } @Override public String toString() { return "King{}"; } }
[ "sergii.senatorov@gmail.com" ]
sergii.senatorov@gmail.com
b2bbd664ab78f7d2fb5999920f168fb8e8f70919
19869bc44bb4ee4ddcd415cf3751f850bbf3b39e
/noark-core/src/main/java/xyz/noark/core/annotation/orm/Entity.java
08d553fb988e7406fac1fbb394890af0c7b65859
[ "LicenseRef-scancode-mulanpsl-1.0-en", "LicenseRef-scancode-unknown-license-reference", "MulanPSL-1.0" ]
permissive
xiaoe/noark3
30c049f0c96692a430e0a7d4f7802aa071f73bd8
610e44e01a21dfc846be6df415b5e3c06d8341f2
refs/heads/master
2022-12-24T23:48:41.536073
2022-09-16T05:51:50
2022-09-16T05:51:50
148,116,142
19
11
NOASSERTION
2022-10-04T23:54:28
2018-09-10T07:28:00
Java
UTF-8
Java
false
false
2,008
java
/* * Copyright © 2018 www.noark.xyz All Rights Reserved. * * 感谢您选择Noark框架,希望我们的努力能为您提供一个简单、易用、稳定的服务器端框架 ! * 除非符合Noark许可协议,否则不得使用该文件,您可以下载许可协议文件: * * http://www.noark.xyz/LICENSE * * 1.未经许可,任何公司及个人不得以任何方式或理由对本框架进行修改、使用和传播; * 2.禁止在本项目或任何子项目的基础上发展任何派生版本、修改版本或第三方版本; * 3.无论你对源代码做出任何修改和改进,版权都归Noark研发团队所有,我们保留所有权利; * 4.凡侵犯Noark版权等知识产权的,必依法追究其法律责任,特此郑重法律声明! */ package xyz.noark.core.annotation.orm; import java.lang.annotation.*; /** * Entity注解是用来标注一个Java类为实体类. * <p> * 当一个Java类没有Entity注解时,就认为他不是一个实体对象. <br> * 当实体类没有此注解时会抛出 NoEntityException异常. * * @author 小流氓[176543888@qq.com] * @since 3.0 */ @Documented @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface Entity { /** * 返回当前实体类的抓取策略. * * @return 返回配置的抓取策略,默认值为什么用,什么时候初始化. */ FetchType fetch() default FetchType.USE; /** * 抓取策略. * <p> * 1.启动服务器的时候,初始化当前实体数据.<br> * 2.登录游戏的时候,初始化当前实体数据.<br> * 3.什么时候用,什么时候初始化当前实体数据.<br> * * @author 小流氓[176543888@qq.com] */ public enum FetchType { /** * 启动服务器的时候,初始化当前实体数据. */ START, /** * 什么时候用,什么时候初始化当前实体数据. */ USE; } }
[ "176543888@qq.com" ]
176543888@qq.com
cca72c40133c45113173193e91fe703947eb5683
1d5137bb92e48c0347752fabf875cb360be280ee
/rule-generator/src/main/java/com/resolute/rule/generator/customer/CustomerResource.java
e993ba7ef8b4e42b09c56cfc726d0c6278514a18
[]
no_license
cpdevoto/code-exchange
11a91fefe5e801480c2db0bccc11f893d6f43d32
cdcca990fb5b9a7d89c155418885757b8ff140c6
refs/heads/master
2023-02-02T22:37:13.786122
2020-07-31T13:27:57
2020-07-31T13:27:57
65,395,461
0
1
null
2023-01-25T20:58:26
2016-08-10T15:47:37
Java
UTF-8
Java
false
false
929
java
package com.resolute.rule.generator.customer; import java.util.List; import javax.annotation.security.PermitAll; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import com.resolute.rule.generator.common.model.EntityIndex; import com.resolute.rule.generator.customer.dao.CustomerDao; import static java.util.Objects.requireNonNull; @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @Path("/customers") public class CustomerResource { private final CustomerDao dao; public CustomerResource(CustomerDao dao) { this.dao = requireNonNull(dao, "dao cannot be null"); } @PermitAll @GET public Response get() { List<EntityIndex> customers = dao.get(); return Response.ok().entity(customers).header("Access-Control-Allow-Origin", "*").build(); } }
[ "cdevoto@maddogtechnology.com" ]
cdevoto@maddogtechnology.com
b75adde03d7659fe1ac018b48cf86dc41d99b243
0d86a98cd6a6477d84152026ffc6e33e23399713
/kata/7-kyu/find-sum-of-top-left-to-bottom-right-diagonals/test/SolutionTest.java
03aad114838872179daa6cf7e5ec0f4b8d4c9755
[ "MIT" ]
permissive
ParanoidUser/codewars-handbook
0ce82c23d9586d356b53070d13b11a6b15f2d6f7
692bb717aa0033e67995859f80bc7d034978e5b9
refs/heads/main
2023-07-28T02:42:21.165107
2023-07-27T12:33:47
2023-07-27T12:33:47
174,944,458
224
65
MIT
2023-09-14T11:26:10
2019-03-11T07:07:34
Java
UTF-8
Java
false
false
496
java
import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; class SolutionTest { @Test void sample() { assertEquals(12, Diagonal.diagonalSum(new int[][]{{12}})); assertEquals(5, Diagonal.diagonalSum(new int[][]{{1, 2}, {3, 4}})); assertEquals(15, Diagonal.diagonalSum(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}})); assertEquals(34, Diagonal.diagonalSum(new int[][]{{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}})); } }
[ "5120290+ParanoidUser@users.noreply.github.com" ]
5120290+ParanoidUser@users.noreply.github.com
066d8146f6cec813913d065b22d8844e4921c0c0
18c267316085f9f6df83e13ba50a0455e6386d45
/_51Park/src/main/java/cn/com/unispark/login/entity/UserInfo.java
49fd6cd31a9822b14e442171b309e5da0a469694
[]
no_license
Sunnyfor/51Park
e2fae32728bbca2f28c3f10b5d87365368794333
8c8a9cb31fcf8e53b06762b62b93006d4abcd533
refs/heads/master
2020-09-30T10:17:27.233421
2019-12-11T03:07:41
2019-12-11T03:07:41
227,263,238
0
0
null
null
null
null
UTF-8
Java
false
false
3,433
java
package cn.com.unispark.login.entity; import java.io.Serializable; /** * <pre> * 功能说明: 用户信息实体类 * 日期: 2015年10月26日 * 开发者: 任建飞 * 版本信息:V5.0.0 * 版权声明:版权所有@北京百会易泊科技有限公司 * * 历史记录 * 修改内容: * 修改人员: * 修改日期: 2015年11月17日 * </pre> */ public class UserInfo implements Serializable { public UserInfo() { super(); } private static final long serialVersionUID = 1L; private String uid;// 用户uid private String token;// 获取到的凭证 private String userid;// 用户uid private int sex;// 性别('0'未设置,'1'男,'2'女) private String username;// 用户名(手机号) private String userscore;// 用户余额 private String cardno;// 车牌号 private String qr;// 用户二维码信息 private String name;// 用户姓名 private String card_no_qr;// 会员卡号 private String binddate;// 绑卡日期(例如:2015-03-16 18:24:54) private String regdate;// 注册时间(例如:20150316182454,连连支付使用) private String noagree;// 用户在连连支付签约号 private int autopay;// 1:关闭自动支付;2:开启自动支付 public String getUserid() { if(userid == null){ userid = uid; } return userid; } public void setUserid(String userid) { this.uid = userid; this.userid = userid; } public int getSex() { return sex; } public void setSex(int sex) { this.sex = sex; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getUserscore() { return userscore; } public void setUserscore(String userscore) { this.userscore = userscore; } public String getCardno() { return cardno; } public void setCardno(String cardno) { this.cardno = cardno; } public String getQr() { return qr; } public void setQr(String qr) { this.qr = qr; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCard_no_qr() { return card_no_qr; } public void setCard_no_qr(String card_no_qr) { this.card_no_qr = card_no_qr; } public String getBinddate() { return binddate; } public void setBinddate(String binddate) { this.binddate = binddate; } public String getRegdate() { return regdate; } public void setRegdate(String regdate) { this.regdate = regdate; } public String getNoagree() { return noagree; } public void setNoagree(String noagree) { this.noagree = noagree; } public int getAutopay() { return autopay; } public void setAutopay(int autopay) { this.autopay = autopay; } public String getUid() { if(uid == null){ uid = userid; } return uid; } public void setUid(String uid) { this.userid = uid; this.uid = uid; } public String getToken() { return token; } public void setToken(String token) { this.token = token; } @Override public String toString() { return "UserInfo [uid=" + uid + ", token=" + token + ", userid=" + userid + ", sex=" + sex + ", username=" + username + ", userscore=" + userscore + ", cardno=" + cardno + ", qr=" + qr + ", name=" + name + ", card_no_qr=" + card_no_qr + ", binddate=" + binddate + ", regdate=" + regdate + ", noagree=" + noagree + ", autopay=" + autopay + "]"; } }
[ "yongzuo.chen@foxmail.com" ]
yongzuo.chen@foxmail.com
133adcbfcb20c69d4aa3301a19f20acce6b80097
8d8024d86f02fe208029e7a05c198a2d3d9e4411
/app/src/main/java/com/itg/calderysapp/widget/CustomDurationScroller.java
74cedd3485f3478b8eec3e814ad816375d7e203a
[]
no_license
AndroidItg8/calderys_final_testing
137b34eba3cd93b152e491946312cdff6893cc09
52ff87b8baebeb81f29e57615203da2c7a422534
refs/heads/master
2020-04-21T17:40:29.139009
2019-02-19T05:26:16
2019-02-19T05:26:16
169,743,922
0
0
null
null
null
null
UTF-8
Java
false
false
1,188
java
package com.itg.calderysapp.widget; import android.content.Context; import android.view.animation.Interpolator; import android.widget.Scroller; /** * Created by Android itg 8 on 11/2/2017. */ public class CustomDurationScroller extends Scroller { private double scrollFactor = 1; public CustomDurationScroller(Context context) { super(context); } public CustomDurationScroller(Context context, Interpolator interpolator) { super(context, interpolator); } /** * not exist in android 2.3 * * @param context * @param interpolator * @param flywheel */ // @SuppressLint("NewApi") // public CustomDurationScroller(Context context, Interpolator interpolator, boolean flywheel){ // super(context, interpolator, flywheel); // } /** * Set the factor by which the duration will change */ public void setScrollDurationFactor(double scrollFactor) { this.scrollFactor = scrollFactor; } @Override public void startScroll(int startX, int startY, int dx, int dy, int duration) { super.startScroll(startX, startY, dx, dy, (int)(duration * scrollFactor)); } }
[ "itechgalaxy.app@gmail.com" ]
itechgalaxy.app@gmail.com
9053283a189ee3047cf48ef9d8ceeeb8539655b1
625986344a26f6f9c80d7181ff9e33001c9e0a25
/JavaLibrary/src/org/bn/types/NullObject.java
bbf365cbd3a60a8374b9567cc8d8c062d2b55eeb
[]
no_license
gec/BinaryNotes
b3e7be684167b6e90340b3b44f829969705f9e48
350b4c2bc5e5aef29a01af4051f7169ee98bb820
refs/heads/master
2021-01-01T05:40:15.550328
2012-01-20T14:47:32
2012-01-20T14:47:32
3,226,917
4
4
null
2017-05-27T17:45:59
2012-01-20T14:34:54
Java
UTF-8
Java
false
false
998
java
/* Copyright 2006-2011 Abdulla Abdurakhmanov (abdulla@latestbit.com) Original sources are available at www.latestbit.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.bn.types; /** * Dummy class declaration for ASN.1 NULL type */ public class NullObject { public NullObject() { } public boolean equals(Object obj) { if(obj instanceof NullObject && obj!=null) return true; else return false; } }
[ "akira_ag@6e58b0a2-a920-0410-943a-aae568831f16" ]
akira_ag@6e58b0a2-a920-0410-943a-aae568831f16
8a487023b9a8ba03c9bf49eab0dd068193d083c9
8bba923942604359185cfceffc680b006efb9306
/JavaOOPAdvance/Reflection-Exercises/src/pr0304Barracks/contracts/Inject.java
246691feeffc7d45d1c28878cf40132d3bf91691
[]
no_license
KaPrimov/JavaCoursesSoftUni
d8a48ab30421d7a847f35d970535ddc3da595597
9676ec4c9bc1ece13d64880ff47a3728227bf4c9
refs/heads/master
2022-12-04T13:27:47.249203
2022-07-14T14:44:10
2022-07-14T14:44:10
97,306,295
1
2
null
2022-11-24T09:28:28
2017-07-15T09:39:47
Java
UTF-8
Java
false
false
290
java
package pr0304Barracks.contracts; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Inject { }
[ "k.primov92@gmail.com" ]
k.primov92@gmail.com
f297a230018bcf391032888ddcfd2c3c5f133143
dd76d0b680549acb07278b2ecd387cb05ec84d64
/divestory-CFR/com/google/android/gms/internal/drive/zzmn.java
2ab57486bb6982415d961571757f501d89c530ce
[]
no_license
ryangardner/excursion-decompiling
43c99a799ce75a417e636da85bddd5d1d9a9109c
4b6d11d6f118cdab31328c877c268f3d56b95c58
refs/heads/master
2023-07-02T13:32:30.872241
2021-08-09T19:33:37
2021-08-09T19:33:37
299,657,052
0
0
null
null
null
null
UTF-8
Java
false
false
530
java
/* * Decompiled with CFR <Could not determine version>. */ package com.google.android.gms.internal.drive; import java.util.Iterator; import java.util.NoSuchElementException; final class zzmn implements Iterator<Object> { zzmn() { } @Override public final boolean hasNext() { return false; } @Override public final Object next() { throw new NoSuchElementException(); } @Override public final void remove() { throw new UnsupportedOperationException(); } }
[ "ryan.gardner@coxautoinc.com" ]
ryan.gardner@coxautoinc.com
8305290f0df1c6602ad2f8d9672f0d4b4949bfb5
d28eb4c3c4bc8c3e3fa8714a8ee34400cd3b1b65
/examples/scenes/src/RunHandlerScene.java
d89b2d6a3c72e7ea6b883dee4cb8cd28f7daa2a2
[ "Apache-2.0" ]
permissive
JetBrains/skija
98d0c18a7ca2b9885b4a038db180e63288ae347a
8581a6c04808c0ada7863aabed9f2a9d77353b39
refs/heads/master
2023-08-29T22:47:49.168005
2023-08-14T13:50:36
2023-08-14T13:50:36
253,568,386
2,768
143
Apache-2.0
2023-08-14T13:50:38
2020-04-06T17:25:23
Java
UTF-8
Java
false
false
5,861
java
package org.jetbrains.skija.examples.scenes; import java.util.*; import java.util.stream.*; import org.jetbrains.skija.*; import org.jetbrains.skija.shaper.*; public class RunHandlerScene extends Scene { public final Font lato36; public final Font inter9; public final Paint boundsStroke = new Paint().setColor(0x403333CC).setMode(PaintMode.STROKE).setStrokeWidth(1); public final Paint boundsFill = new Paint().setColor(0x403333CC); public final Paint textFill = new Paint().setColor(0xFF000000); public RunHandlerScene() { lato36 = new Font(Typeface.makeFromFile(file("fonts/Lato-Regular.ttf")), 36); inter9 = new Font(inter, 9); _variants = new String[] { "Approximate All", "Approximate Spaces", "Approximate Punctuation", "Approximate None", }; } @Override public void draw(Canvas canvas, int width, int height, float dpi, int xpos, int ypos) { canvas.translate(20, 20); var text = "hello мир, дружба! fi fl 👃 one two ثلاثة 12 👂 34 خمسة"; try (var shaper = Shaper.makeShapeThenWrap(); // Shaper.makeCoreText(); var tbHandler = new TextBlobBuilderRunHandler(text, new Point(0, 0)); var handler = new DebugTextBlobHandler().withRuns();) { var opts = switch (_variants[_variantIdx]) { case "Approximate Spaces" -> ShapingOptions.DEFAULT.withApproximatePunctuation(false); case "Approximate Punctuation" -> ShapingOptions.DEFAULT.withApproximateSpaces(false); case "Approximate None" -> ShapingOptions.DEFAULT.withApproximateSpaces(false).withApproximatePunctuation(false); default -> ShapingOptions.DEFAULT; }; // TextBlobBuilderRunHandler shaper.shape(text, lato36, opts, width - 40, tbHandler); try (var blob = tbHandler.makeBlob()) { canvas.drawTextBlob(blob, 0, 0, textFill); canvas.translate(0, blob.getBounds().getBottom() + 20); } // DebugTextBlobHandler shaper.shape(text, lato36, opts, width - 40, handler); try (var blob = handler.makeBlob()) { canvas.drawTextBlob(blob, 0, 0, textFill); } List<Rect> taken = new ArrayList<>(); FontMetrics interMetrics = inter9.getMetrics(); float maxBottom = 0; for (var run: handler._runs) { var runBounds = run.getBounds(); canvas.drawRect(runBounds, boundsStroke); var info = run.getInfo(); try (var builder = new TextBlobBuilder();) { float lh = interMetrics.getHeight(); float yPos = -interMetrics.getAscent(); float padding = 6; float margin = 6; var font = run.getFont(); // build details blob try (var typeface = font.getTypeface();) { builder.appendRun(inter9, typeface.getFamilyName() + " " + font.getSize() + "px", 0, yPos); } builder.appendRun(inter9, "bidi " + info.getBidiLevel(), 0, yPos + lh); builder.appendRun(inter9, "adv (" + info.getAdvanceX() + ", " + info.getAdvanceY() + ")", 0, yPos + lh * 2); builder.appendRun(inter9, "range " + info.getRangeBegin() + ".." + info.getRangeEnd() + " “" + text.substring(info.getRangeBegin(), info.getRangeEnd()) + "”", 0, yPos + lh * 3); builder.appendRun(inter9, info.getGlyphCount() + " glyphs: " + Arrays.toString(run.getGlyphs()), 0, yPos + lh * 4); builder.appendRun(inter9, "x positions " + Arrays.stream(run.getPositions()).map(Point::getX).map(Object::toString).collect(Collectors.joining(", ", "[", "]")), 0, yPos + lh * 5); builder.appendRun(inter9, "y position " + run.getPositions()[0].getY(), 0, yPos + lh * 6); builder.appendRun(inter9, "clusters " + Arrays.toString(run.getClusters()), 0, yPos + lh * 7); try (var detailsBlob = builder.build(); ) { // try to fit in var detailsWidth = detailsBlob.getBounds().getWidth(); var detailsHeight = detailsBlob.getBounds().getHeight(); for (yPos = runBounds.getBottom() + margin; yPos < height; yPos += margin) { Rect detailsOuter = Rect.makeXYWH(runBounds.getLeft(), yPos, detailsWidth + 2 * padding + margin, detailsHeight + 2 * padding + margin); Rect detailsBorder = Rect.makeXYWH(runBounds.getLeft(), yPos, detailsWidth + 2 * padding, detailsHeight + 2 * padding); Rect detailsInner = Rect.makeXYWH(runBounds.getLeft() + padding, yPos + padding, detailsWidth, detailsHeight); if (taken.stream().allMatch(r -> r.intersect(detailsOuter) == null)) { // draw details canvas.drawRect(detailsBorder, boundsFill); canvas.drawLine(runBounds.getLeft(), runBounds.getBottom(), detailsBorder.getLeft(), detailsBorder.getBottom(), boundsStroke); canvas.drawTextBlob(detailsBlob, detailsInner.getLeft(), detailsInner.getTop(), textFill); taken.add(detailsOuter); maxBottom = Math.max(maxBottom, detailsOuter.getBottom()); break; } } } } } } } }
[ "niki@tonsky.me" ]
niki@tonsky.me
24226bc2f1c338028b2691ca4446e6eb2a07465c
888805e5b79a9b48a68f9794a7df720b62f52f96
/mall-product/src/main/java/com/example/mallproduct/service/impl/SpuCommentServiceImpl.java
474fdcccf6d868917c293f54feb2145cf3833fb2
[]
no_license
wujuxuan/mall-618
09e2d66f8ee80c585a466a52603fca8062c86e95
de76b7a6061a035d88796090940c644018a49407
refs/heads/master
2023-06-04T22:29:44.240214
2021-06-19T08:27:51
2021-06-19T08:27:51
378,072,042
0
0
null
null
null
null
UTF-8
Java
false
false
621
java
package com.example.mallproduct.service.impl; import org.springframework.stereotype.Service; import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.example.mallproduct.dao.SpuCommentDao; import com.example.mallproduct.entity.SpuCommentEntity; import com.example.mallproduct.service.SpuCommentService; @Service("spuCommentService") public class SpuCommentServiceImpl extends ServiceImpl<SpuCommentDao, SpuCommentEntity> implements SpuCommentService { }
[ "100742869@qq.com" ]
100742869@qq.com
afff9ce0c17f0fac31c39facb87ea7a01bacffa7
f2e297ec31af0ff8fed9ee5bfd714f35dd3c602b
/org.idempiere.test.assertj/src/org/idempiere/test/assertj/AbstractAD_TreeNodeBPAssert.java
2492ebed993d7ab78d31cb061ee587579294b50b
[]
no_license
kriegfrj/idempiere-test
c6382226d3a8f3b511edf59fc1cecc62b869d5fd
9730ac505607eddcc0727687797ba57f5c614c7c
refs/heads/master
2022-11-28T15:59:12.092607
2020-08-17T07:02:22
2020-08-17T07:02:22
275,079,977
0
0
null
2020-08-17T07:02:23
2020-06-26T05:21:40
Java
UTF-8
Java
false
false
3,720
java
/****************************************************************************** * Product: iDempiere ERP & CRM Smart Business Solution * * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. * * This program is free software, you can redistribute it and/or modify it * * under the terms version 2 of the GNU General Public License as published * * by the Free Software Foundation. This program is distributed in the hope * * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * * with this program, if not, write to the Free Software Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * * For the text or an alternative of this public license, you may reach us * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Assertion Class - DO NOT CHANGE */ package org.idempiere.test.assertj; import java.util.Objects; import javax.annotation.Generated; import org.compiere.model.X_AD_TreeNodeBP; /** Generated assertion class for AD_TreeNodeBP * @author idempiere-test (generated) * @version Release 6.2 - $Id$ */ @Generated("class org.idempiere.test.generator.ModelAssertionGenerator") public abstract class AbstractAD_TreeNodeBPAssert<SELF extends AbstractAD_TreeNodeBPAssert<SELF, ACTUAL>, ACTUAL extends X_AD_TreeNodeBP> extends AbstractPOAssert<SELF, ACTUAL> { /** Standard Constructor */ public AbstractAD_TreeNodeBPAssert (ACTUAL actual, Class<SELF> selfType) { super (actual, selfType); } public SELF hasAD_Tree_ID(int expected) { isNotNull(); int actualField = actual.getAD_Tree_ID(); if (expected != actualField) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have AD_Tree_ID: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasAD_TreeNodeBP_UU(String expected) { isNotNull(); String actualField = actual.getAD_TreeNodeBP_UU(); if (!Objects.equals(expected, actualField)) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have AD_TreeNodeBP_UU: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasNode_ID(int expected) { isNotNull(); int actualField = actual.getNode_ID(); if (expected != actualField) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have Node_ID: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasParent_ID(int expected) { isNotNull(); int actualField = actual.getParent_ID(); if (expected != actualField) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have Parent_ID: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } public SELF hasSeqNo(int expected) { isNotNull(); int actualField = actual.getSeqNo(); if (expected != actualField) { failWithActualExpectedAndMessage(actualField, expected, "\nExpecting PO: \n <%s>\n to have SeqNo: <%s>\nbut it was: <%s>", getPODescription(), expected, actualField); } return myself; } }
[ "fr.jkrieg@greekwelfaresa.org.au" ]
fr.jkrieg@greekwelfaresa.org.au
2c71f239a33f2ee125462b8915b3ee525bda009b
d2984ba2b5ff607687aac9c65ccefa1bd6e41ede
/src/net/datenwerke/eximport/exceptions/ImportException.java
4a725fc2c3c036e90e472861e579b4357fad3946
[]
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,376
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.eximport.exceptions; public class ImportException extends RuntimeException { /** * */ private static final long serialVersionUID = -5943762831800696410L; public ImportException(){ super("An error occured during import."); } public ImportException(String msg){ super(msg); } public ImportException(Throwable cause){ super("An error occured during import: " + cause.getMessage(), cause); } public ImportException(String msg, Throwable cause){ super(msg, cause); } }
[ "srbala@gmail.com" ]
srbala@gmail.com
02b2cdf0254fb7f08984272b246f00a1256cb585
62867c0debba4090f6debdf9e8649293fdcf2886
/车辆管理系统(struts+hibernate+spring+oracle)/ITSMPM/src/com/action/user/UpRoletbAction.java
ed094df1106cf0ab8a2f791bd6c93d178563ccd5
[]
no_license
luomo135/26-
ac1a56a2d2c78a10bf22e31a7bc6d291dd7a8bcc
349538f5cdebae979910c11150962a72cc2f799c
refs/heads/master
2022-01-26T08:25:48.015257
2018-08-01T02:55:06
2018-08-01T02:55:06
null
0
0
null
null
null
null
GB18030
Java
false
false
1,919
java
package com.action.user; import java.util.ArrayList; import java.util.List; import com.java.Roletb; import com.java.Xxuser; import com.opensymphony.xwork2.ActionSupport; import com.service.intface.user.UserService; public class UpRoletbAction extends ActionSupport { private String rolename; private Long roletbid; private String roledes; private UserService userService; @Override public String execute() throws Exception { // TODO Auto-generated method stub Roletb rol=new Roletb(); rol.setRoledes(roledes); rol.setRolename(rolename); rol.setRoletbid(roletbid); userService.upRoletb(rol); addActionMessage("数据修改成功!"); return SUCCESS; } @Override public void validate() { // TODO Auto-generated method stub if(rolename==null||rolename.trim().equals("")){ addActionError("角色必须填写!"); } List l=new ArrayList(); l=userService.QueryByTabId("Roletb", "roletbid", roletbid); //判断是否修改 if(l.size()!=0){ for(int i=0;i<l.size();i++){ Roletb roletb=new Roletb(); roletb=(Roletb)l.get(i); if(roletb.getRolename().equals(rolename.trim())){ System.out.println("mei gai"); }else{ List n=new ArrayList(); n=userService.QueryByTab("Roletb", "rolename", rolename); if(n.size()!=0){ addActionError("该用户已经存在!"); } } } } } public String getRolename() { return rolename; } public void setRolename(String rolename) { this.rolename = rolename; } public Long getRoletbid() { return roletbid; } public void setRoletbid(Long roletbid) { this.roletbid = roletbid; } public String getRoledes() { return roledes; } public void setRoledes(String roledes) { this.roledes = roledes; } public UserService getUserService() { return userService; } public void setUserService(UserService userService) { this.userService = userService; } }
[ "huangwutongdd@163.com" ]
huangwutongdd@163.com
7f03d91e99f7aa92a5799c3c9ae0da3189006b29
cefa355cb23a000f0262fded6ba75233caa04289
/src/test/java/com/helospark/lightdi/it/conditionaltest/ConditionalOnBeanShouldCreateBean.java
3e10402eb925781d40db23a0418a242fd14eadd7
[ "MIT" ]
permissive
helospark/light-di
1754fdd53daf0c9f8cc2ceb4692fc332fe6b3403
fd5e8d00f30ffa99a090a5be194eb453c1eb41c4
refs/heads/master
2021-06-03T03:45:11.218776
2020-03-08T20:31:54
2020-03-08T20:31:54
101,509,965
10
0
MIT
2020-10-12T22:23:39
2017-08-26T19:59:41
Java
UTF-8
Java
false
false
269
java
package com.helospark.lightdi.it.conditionaltest; import com.helospark.lightdi.annotation.Component; import com.helospark.lightdi.annotation.ConditionalOnBean; @Component @ConditionalOnBean(TestConfiguration.class) public class ConditionalOnBeanShouldCreateBean { }
[ "helospark@gmail.com" ]
helospark@gmail.com
7171197b7bb55a51f76913881c330b27870e6eb2
1ba27fc930ba20782e9ef703e0dc7b69391e191b
/Src/prjCheckstyle/src2/com/compuware/caqs/pmd/ast/ASTConditionalAndExpression.java
2d21ee5d60b53f81ec5150812be316c6bf8f8782
[]
no_license
LO-RAN/codeQualityPortal
b0d81c76968bdcfce659959d0122e398c647b09f
a7c26209a616d74910f88ce0d60a6dc148dda272
refs/heads/master
2023-07-11T18:39:04.819034
2022-03-31T15:37:56
2022-03-31T15:37:56
37,261,337
0
0
null
null
null
null
UTF-8
Java
false
false
541
java
/* Generated By:JJTree: Do not edit this line. ASTConditionalAndExpression.java */ package com.compuware.caqs.pmd.ast; public class ASTConditionalAndExpression extends SimpleJavaNode { public ASTConditionalAndExpression(int id) { super(id); } public ASTConditionalAndExpression(JavaParser p, int id) { super(p, id); } /** * Accept the visitor. * */ public Object jjtAccept(JavaParserVisitor visitor, Object data) { return visitor.visit(this, data); } }
[ "laurent.izac@gmail.com" ]
laurent.izac@gmail.com
4d6ce2be5813e096c859de46d3434cb4c791b6c1
90f9d0d74e6da955a34a97b1c688e58df9f627d0
/com.ibm.ccl.soa.deploy.saf/src/com/ibm/ccl/soa/deploy/internal/saf/Messages.java
303d97f0b07a7fb053616aba77ea57e61dae1451
[]
no_license
kalapriyakannan/UMLONT
0431451674d7b3eb744fb436fab3d13e972837a4
560d9f5d2ba6a800398a24fd8265e5a946179fd3
refs/heads/master
2020-03-30T03:16:44.327160
2018-09-28T03:28:11
2018-09-28T03:28:11
150,679,726
1
1
null
null
null
null
UTF-8
Java
false
false
1,336
java
/*************************************************************************************************** * Copyright (c) 2003, 2007 IBM Corporation Licensed Material - Property of IBM. All rights * reserved. * * US Government Users Restricted Rights - Use, duplication or disclosure v1.0 restricted by GSA ADP * Schedule Contract with IBM Corp. * * Contributors: IBM Corporation - initial API and implementation **************************************************************************************************/ package com.ibm.ccl.soa.deploy.internal.saf; import org.eclipse.osgi.util.NLS; /** * */ public class Messages extends NLS { private static final String BUNDLE_NAME = "messages"; //$NON-NLS-1$ private Messages() { } static { // initialize resource bundle NLS.initializeMessages(BUNDLE_NAME, Messages.class); } public static String ccl_soa_core_component_attributeNameMissing; public static String ccl_soa_core_component_attributeIconInvalid; public static String ccl_soa_core_component_attributeKindMissing; public static String InterfaceHandlerDescriptor_Invalid_number_of_enablement_expres_; public static String InterfaceHandlerDescriptor_The_0_extension_defined_by_1_do_; public static String InterfaceHandlerDescriptor_An_instance_of_0_for_the_1_attr_; }
[ "kalapriya.kannan@in.ibm.com" ]
kalapriya.kannan@in.ibm.com
f965af1a679f1e841cbefeb82751592fd28656d6
3841f7991232e02c850b7e2ff6e02712e9128b17
/小浪底泥沙三维/EV_Xld/jni/src/JAVA/EV_Spatial_GUIWrapper/src/com/earthview/world/spatial/systemui/EV_MenuType.java
e201b46bce8e8f279787a13dfecb57badcb9f945
[]
no_license
15831944/BeijingEVProjects
62bf734f1cb0a8be6fed42cf6b207f9dbdf99e71
3b5fa4c4889557008529958fc7cb51927259f66e
refs/heads/master
2021-07-22T14:12:15.106616
2017-10-15T11:33:06
2017-10-15T11:33:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
792
java
package com.earthview.world.spatial.systemui; import global.*; import com.earthview.world.base.*; import com.earthview.world.util.*; import com.earthview.world.core.*; public enum EV_MenuType implements INativeEnum<EV_MenuType> { MT_Operation_2D(EV_MenuTypeHelper.ENUM_VALUES[0]); private int value; EV_MenuType(int i) { this.value = i; } public EV_MenuType getEnum(int val) { return toEnum(val); } public int getValue() { return this.value; } public static final EV_MenuType toEnum(int retval) { if(retval == MT_Operation_2D.value){ return MT_Operation_2D; } throw new RuntimeException("wrong number in jni call for an enum!"); } } class EV_MenuTypeHelper { public static final int[] ENUM_VALUES = getEnumValues(); private static native int[] getEnumValues(); }
[ "yanguanqi@aliyun.com" ]
yanguanqi@aliyun.com
a6f92d3cb081d7892a8836881fe46ee5cd6e80a7
30bea0c3b4331f9051921743198a287beccb1926
/src/com/indooratlas/mapcreator/main/CLASS238.java
48af0b781881a283b9ca1772c6d48e1ae5994f90
[]
no_license
Leoxinghai/indooratlas
afbb48b3be2678d7ddbc199c27527a3f3d067025
cdf02f1ccc2e4e9f03e87c869b76ee610d244aa6
refs/heads/master
2021-01-19T03:41:00.739164
2016-07-01T14:01:15
2016-07-01T14:01:15
62,396,896
1
0
null
null
null
null
UTF-8
Java
false
false
950
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) package com.indooratlas.mapcreator.main; import android.content.DialogInterface; import com.indooratlas.types.IndoorAtlas; // Referenced classes of package com.indooratlas.mapcreator.main: // MapScreen class CLASS238 implements android.content.DialogInterface.OnClickListener { CLASS238(MapScreen mapscreen) { MF_CLASS238_a785 = mapscreen; } public void onClick(DialogInterface dialoginterface, int i) { MF_CLASS238_a785.showInProgressDialog(MF_CLASS238_a785.getString(0x7f08003b), true); MapScreen.MF_CLASS19_a67(MF_CLASS238_a785, true); MapScreen.MF_CLASS24_c88(MF_CLASS238_a785).setPreferMobileConnection(false); dialoginterface.cancel(); } final MapScreen MF_CLASS238_a785; }
[ "leoxinghai@hotmail.com" ]
leoxinghai@hotmail.com
9542cfb389afc3250ca7a20e5df3c3a342bf14e8
f40a6b40763498580b13900897aae661faae77e8
/app/src/main/java/illiyin/mhandharbeni/burgertahudelivery/fragment/sub/RouteOrder.java
8c0078fda037c513349405dc8cda2536a5bcbd01
[]
no_license
handharbeni/BurgerTahuDelivery
a52915ef9bd003ed1cb9386c00b4df8d84490728
0255f0cc26acbf25807d7370f51afe53aea27d1f
refs/heads/master
2021-01-23T06:14:51.367356
2018-02-22T18:06:43
2018-02-22T18:06:43
102,495,791
0
0
null
null
null
null
UTF-8
Java
false
false
5,094
java
package illiyin.mhandharbeni.burgertahudelivery.fragment.sub; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; import android.provider.Settings; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.view.Window; import android.view.WindowManager; import android.widget.TextView; import com.google.android.gms.maps.CameraUpdate; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.BitmapDescriptor; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.LatLngBounds; import com.google.android.gms.maps.model.MarkerOptions; import illiyin.mhandharbeni.burgertahudelivery.R; import illiyin.mhandharbeni.drawroutemap.Navigator; import static android.provider.Settings.Global.AIRPLANE_MODE_ON; /** * Created by root on 11/08/17. */ public class RouteOrder extends AppCompatActivity implements OnMapReadyCallback { protected GoogleMap mMap; protected LatLng start; protected LatLng end; private static final String LOG_TAG = "MyActivity"; private String nama, nama_outlet, latitude, latitude_outlet, longitude, longitude_outlet; private TextView txtOutlet, txtCustomer; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { Window w = getWindow(); w.addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); } initParam(); setContentView(R.layout._layout_routeorder); txtOutlet = (TextView) findViewById(R.id.txtOutlet); txtCustomer = (TextView) findViewById(R.id.txtCustomer); SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map); mapFragment.getMapAsync(this); } static boolean isAirplaneModeOn(Context context) { ContentResolver contentResolver = context.getContentResolver(); return Settings.System.getInt(contentResolver, AIRPLANE_MODE_ON, 0) != 0; } private BitmapDescriptor bitmapDescriptorFromVector(Context context, int vectorResId) { Drawable vectorDrawable = ContextCompat.getDrawable(context, vectorResId); vectorDrawable.setBounds(0, 0, vectorDrawable.getIntrinsicWidth(), vectorDrawable.getIntrinsicHeight()); Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(), vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); vectorDrawable.draw(canvas); return BitmapDescriptorFactory.fromBitmap(bitmap); } public void initParam(){ Intent i = getIntent(); nama = i.getStringExtra("NAMA"); latitude = i.getStringExtra("LATITUDE"); longitude = i.getStringExtra("LONGITUDE"); nama_outlet = i.getStringExtra("NAMAOUTLET"); latitude_outlet = i.getStringExtra("LATITUDEOUTLET"); longitude_outlet = i.getStringExtra("LONGITUDEOUTLET"); } @Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; start = new LatLng(Double.valueOf(latitude_outlet), Double.valueOf(longitude_outlet)); end = new LatLng(Double.valueOf(latitude),Double.valueOf(longitude)); Navigator nav = new Navigator(mMap,start,end,getApplicationContext(), this); nav.findDirections(true, false); addMarker(start, nama_outlet, bitmapDescriptorFromVector(getApplicationContext(), R.drawable.ic_marker_outlet)); addMarker(end, nama, bitmapDescriptorFromVector(getApplicationContext(), R.drawable.ic_marker_customer)); zoomMaps(); initInfo(); } private void initInfo(){ txtOutlet.setText(nama_outlet); txtCustomer.setText(nama); } private void addMarker(LatLng latLng, String caption, BitmapDescriptor drawable){ mMap.addMarker(new MarkerOptions() .icon(drawable) .position(latLng) .title(caption)); } public void zoomMaps(){ LatLngBounds.Builder builder = new LatLngBounds.Builder(); builder.include(start); builder.include(end); LatLngBounds latLngBounds = builder.build(); int width = getResources().getDisplayMetrics().widthPixels; int height = getResources().getDisplayMetrics().heightPixels; int padding = (int) (width * 0.30); CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(latLngBounds, width, height, padding); mMap.animateCamera(cu); } }
[ "mhandharbeni@gmail.com" ]
mhandharbeni@gmail.com
5434fee59829a0f2ad91edf5e5a3c8b3c8620830
d71fc6f733e494f35f1ea855f25c5e830efea632
/extension/other/databinding/fabric3-jaxb/src/main/java/org/fabric3/databinding/jaxb/JaxbContributionServiceListener.java
b4e74829a2a63263ef5afa7e89ccdd8822a7c313
[ "Apache-2.0" ]
permissive
carecon/fabric3-core
d92ba6aa847386ee491d16f7802619ee1f65f493
14a6c6cd5d7d3cabf92e670ac89432a5f522c518
refs/heads/master
2020-04-02T19:54:51.148466
2018-12-06T19:56:50
2018-12-06T19:56:50
154,750,871
0
0
null
2018-10-25T23:39:54
2018-10-25T23:39:54
null
UTF-8
Java
false
false
3,158
java
/* * Fabric3 * Copyright (c) 2009-2015 Metaform Systems * * 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.fabric3.databinding.jaxb; import org.fabric3.spi.contribution.Contribution; import org.fabric3.spi.contribution.ContributionManifest; import org.fabric3.spi.contribution.ContributionServiceListener; import org.fabric3.spi.contribution.manifest.JavaImport; import org.fabric3.spi.contribution.manifest.PackageInfo; /** * Adds implicit imports for JAXB implementation classes to user contributions since <code>JAXBContext</code> searches the TCCL, which is set to the * contribution classloader during runtime execution of user code. */ public class JaxbContributionServiceListener implements ContributionServiceListener { private JavaImport jaxbImport; private JavaImport iStackImport; private JavaImport xsomImport; private JavaImport txw2Import; private JavaImport dtdParserImport; private JavaImport utilImport; public JaxbContributionServiceListener() { PackageInfo jaxbInfo = new PackageInfo("com.sun.xml.bind.*"); jaxbImport = new JavaImport(jaxbInfo); PackageInfo istackInfo = new PackageInfo("com.sun.istack.*"); iStackImport = new JavaImport(istackInfo); PackageInfo xsominfo = new PackageInfo("com.sun.xml.xsom.*"); xsomImport = new JavaImport(xsominfo); PackageInfo txw2Info = new PackageInfo("com.sun.xml.txw2.*"); txw2Import = new JavaImport(txw2Info); PackageInfo dtdParserInfo = new PackageInfo("com.sun.xml.dtdparser.*"); dtdParserImport = new JavaImport(dtdParserInfo); PackageInfo utilInfo = new PackageInfo("com.sun.xml.util.*"); utilImport = new JavaImport(utilInfo); } public void onProcessManifest(Contribution contribution) { ContributionManifest manifest = contribution.getManifest(); if (manifest.isExtension()) { // extensions should manually enable JAXB return; } manifest.addImport(jaxbImport); manifest.addImport(iStackImport); manifest.addImport(xsomImport); manifest.addImport(txw2Import); manifest.addImport(dtdParserImport); manifest.addImport(utilImport); } public void onStore(Contribution contribution) { // no-op } public void onInstall(Contribution contribution) { // no-op } public void onUpdate(Contribution contribution) { // no-op } public void onUninstall(Contribution contribution) { // no-op } public void onRemove(Contribution contribution) { // no-op } }
[ "jim.marino@gmail.com" ]
jim.marino@gmail.com
80bd59470477804afc91cb7dc71ecbb5971a7090
c992cc664787167313fb4d317f172e8b057b1f5b
/modules/cuba/src/test/java/com/haulmont/cuba/core/model/common/User.java
d492562f25ac0caa7898702b8b47d7f6a60fd7dc
[ "Apache-2.0" ]
permissive
alexbudarov/jmix
42628ce00a2a67bac7f4113a7e642d5a67c38197
23272dc3d6cb1f1a9826edbe888b3c993ab22d85
refs/heads/master
2020-12-19T15:57:38.886284
2020-01-23T10:06:16
2020-01-23T10:06:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,734
java
/* * Copyright 2019 Haulmont. * * 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.haulmont.cuba.core.model.common; import com.haulmont.cuba.core.model.Address; import io.jmix.core.DeletePolicy; import io.jmix.core.compatibility.AppContext; import io.jmix.core.entity.StandardEntity; import io.jmix.core.entity.annotation.Listeners; import io.jmix.core.entity.annotation.OnDeleteInverse; import io.jmix.core.entity.annotation.SystemLevel; import io.jmix.core.entity.annotation.TrackEditScreenHistory; import io.jmix.core.metamodel.annotations.Composition; import io.jmix.core.metamodel.annotations.NamePattern; import org.apache.commons.lang3.StringUtils; import javax.persistence.*; import java.text.MessageFormat; import java.util.List; /** * User */ @Entity(name = "test$User") @Table(name = "TEST_USER") @NamePattern("#getCaption|login,name") @TrackEditScreenHistory @Listeners("test_UserEntityListener") public class User extends StandardEntity { private static final long serialVersionUID = 5007187642916030394L; @Column(name = "LOGIN", length = 50, nullable = false) protected String login; @SystemLevel @Column(name = "LOGIN_LC", length = 50, nullable = false) protected String loginLowerCase; @SystemLevel @Column(name = "PASSWORD", length = 255) protected String password; @SystemLevel @Column(name = "PASSWORD_ENCRYPTION", length = 50) protected String passwordEncryption; @Column(name = "NAME", length = 255) protected String name; @Column(name = "FIRST_NAME", length = 255) protected String firstName; @Column(name = "LAST_NAME", length = 255) protected String lastName; @Column(name = "MIDDLE_NAME", length = 255) protected String middleName; @Column(name = "POSITION_", length = 255) protected String position; @Column(name = "EMAIL", length = 100) protected String email; @Column(name = "LANGUAGE_", length = 20) protected String language; @Column(name = "TIME_ZONE") protected String timeZone; @Column(name = "TIME_ZONE_AUTO") protected Boolean timeZoneAuto; @Column(name = "ACTIVE") protected Boolean active = true; @Column(name = "CHANGE_PASSWORD_AT_LOGON") protected Boolean changePasswordAtNextLogon = false; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "GROUP_ID") @OnDeleteInverse(DeletePolicy.DENY) protected Group group; @Column(name = "GROUP_NAMES") protected String groupNames; @OneToMany(mappedBy = "user") @OrderBy("createTs") @Composition protected List<UserRole> userRoles; @OneToMany(mappedBy = "user") @OrderBy("createTs") @Composition protected List<UserSubstitution> substitutions; @Column(name = "IP_MASK", length = 200) protected String ipMask; @Column(name = "SYS_TENANT_ID") protected String sysTenantId; @Transient protected boolean disabledDefaultRoles; public boolean isDisabledDefaultRoles() { return disabledDefaultRoles; } public void setDisabledDefaultRoles(boolean disabledDefaultRoles) { this.disabledDefaultRoles = disabledDefaultRoles; } public String getLogin() { return login; } public void setLogin(String login) { this.login = login; } public String getLoginLowerCase() { return loginLowerCase; } public void setLoginLowerCase(String loginLowerCase) { this.loginLowerCase = loginLowerCase; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getPasswordEncryption() { return passwordEncryption; } public void setPasswordEncryption(String passwordEncryption) { this.passwordEncryption = passwordEncryption; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Group getGroup() { return group; } public void setGroup(Group group) { this.group = group; } public String getGroupNames() { return groupNames; } public void setGroupNames(String groupNames) { this.groupNames = groupNames; } public List<UserRole> getUserRoles() { return userRoles; } public void setUserRoles(List<UserRole> userRoles) { this.userRoles = userRoles; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getLanguage() { return language; } public void setLanguage(String language) { this.language = language; } public String getTimeZone() { return timeZone; } public void setTimeZone(String timeZone) { this.timeZone = timeZone; } public Boolean getTimeZoneAuto() { return timeZoneAuto; } public void setTimeZoneAuto(Boolean timeZoneAuto) { this.timeZoneAuto = timeZoneAuto; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getMiddleName() { return middleName; } public void setMiddleName(String middleName) { this.middleName = middleName; } public String getPosition() { return position; } public void setPosition(String position) { this.position = position; } public List<UserSubstitution> getSubstitutions() { return substitutions; } public void setSubstitutions(List<UserSubstitution> substitutions) { this.substitutions = substitutions; } public Boolean getActive() { return active; } public void setActive(Boolean active) { this.active = active; } public String getIpMask() { return ipMask; } public void setIpMask(String ipMask) { this.ipMask = ipMask; } public String getSysTenantId() { return sysTenantId; } public void setSysTenantId(String sysTenantId) { this.sysTenantId = sysTenantId; } public String getCaption() { String pattern = AppContext.getProperty("cuba.user.namePattern"); if (StringUtils.isBlank(pattern)) { pattern = "{1} [{0}]"; } MessageFormat fmt = new MessageFormat(pattern); return StringUtils.trimToEmpty(fmt.format(new Object[]{ StringUtils.trimToEmpty(login), StringUtils.trimToEmpty(name) })); } public Boolean getChangePasswordAtNextLogon() { return changePasswordAtNextLogon; } public void setChangePasswordAtNextLogon(Boolean changePasswordAtNextLogon) { this.changePasswordAtNextLogon = changePasswordAtNextLogon; } @Transient @Deprecated public String getSalt() { return id != null ? id.toString() : ""; } }
[ "subbotin@haulmont.com" ]
subbotin@haulmont.com
9df21aa6b092bb8119e2f8a03efc68022d9bf055
55b93ddeb025281f1e5bdfa165cb5074ec622544
/graphsdk/src/main/java/com/microsoft/graph/extensions/PlannerPlanDetails.java
9e143f5f38411d22c90716d14ec4037282385833
[ "MIT" ]
permissive
Glennmen/msgraph-sdk-android
7c13e8367fb6cb7bb9a655860a4c14036601296b
cb774abbaa1abde0c63229a70256b3d97f212a3e
refs/heads/master
2020-03-30T15:56:29.622277
2018-10-03T09:07:00
2018-10-03T09:07:00
151,386,422
1
0
NOASSERTION
2018-10-03T09:03:00
2018-10-03T09:02:59
null
UTF-8
Java
false
false
886
java
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ package com.microsoft.graph.extensions; import com.microsoft.graph.concurrency.*; import com.microsoft.graph.core.*; import com.microsoft.graph.extensions.*; import com.microsoft.graph.http.*; import com.microsoft.graph.generated.*; import com.microsoft.graph.options.*; import com.microsoft.graph.serializer.*; import java.util.Arrays; import java.util.EnumSet; // This file is available for extending, afterwards please submit a pull request. /** * The class for the Planner Plan Details. */ public class PlannerPlanDetails extends BasePlannerPlanDetails { }
[ "c.bales@outlook.com" ]
c.bales@outlook.com
c380a90a1b644cff8173b77cbf0249b1091aab8a
e820097c99fb212c1c819945e82bd0370b4f1cf7
/gwt-sh/src/main/java/com/skynet/spms/client/gui/basedatamanager/organization/usergroup/UserGroupButtonPanl.java
20578f32e91c3cccadcbd6cc47b94d20d05af902
[]
no_license
jayanttupe/springas-train-example
7b173ca4298ceef543dc9cf8ae5f5ea365431453
adc2e0f60ddd85d287995f606b372c3d686c3be7
refs/heads/master
2021-01-10T10:37:28.615899
2011-12-20T07:47:31
2011-12-20T07:47:31
36,887,613
0
0
null
null
null
null
UTF-8
Java
false
false
3,985
java
package com.skynet.spms.client.gui.basedatamanager.organization.usergroup; import com.skynet.spms.client.constants.ConstantsUtil; import com.skynet.spms.client.gui.base.BaseButtonToolStript; import com.skynet.spms.client.tools.ShowWindowTools; import com.smartgwt.client.core.Rectangle; import com.smartgwt.client.util.BooleanCallback; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.toolbar.ToolStripButton; public class UserGroupButtonPanl extends BaseButtonToolStript { private UserGroupListgrid userGroupListgrid; public UserGroupButtonPanl(final UserGroupListgrid userGroupListgrid) { super("organization.userGroup"); this.userGroupListgrid = userGroupListgrid; } protected void showWindow(String windowName, ToolStripButton button) { Rectangle srcRect = null; if (button != null) srcRect = button.getPageRect(); if ("add".equalsIgnoreCase(windowName)) { useWindow = new UserGroupAddWindow( ConstantsUtil.organizationConstants.addUserGroup(), false, srcRect,userGroupListgrid,"showwindow/organization_add_01.png"); ShowWindowTools.showWondow(srcRect, useWindow, -1); } else if ("modify".equalsIgnoreCase(windowName)) { if (userGroupListgrid.getSelection().length == 1) { useWindow = new UserGroupModifyWindow( ConstantsUtil.organizationConstants.modifyUserGroup(), false,srcRect,userGroupListgrid,"showwindow/organization_modify_01.png"); ShowWindowTools.showWondow(srcRect, useWindow, -1); } else { SC.say(ConstantsUtil.commonConstants.alertSelectFortoolbar()); } } else if ("view".equalsIgnoreCase(windowName)) { if (userGroupListgrid.getSelection().length == 1) { useWindow = new UserGroupViewWindow(userGroupListgrid); } else { SC.say(ConstantsUtil.commonConstants.alertSelectFortoolbar()); } } else if ("usertogroup".equalsIgnoreCase(windowName)) { if (userGroupListgrid.getSelection().length == 1) { useWindow = new AddUserToGroupWindow( ConstantsUtil.organizationConstants.addUserToGroup(), false,srcRect,userGroupListgrid,"showwindow/organization_group_01.png"); ShowWindowTools.showWondow(srcRect, useWindow, -1); } else { SC.say(ConstantsUtil.commonConstants.alertSelectFortoolbar()); } } else if("roletogroup".equalsIgnoreCase(windowName)){ if (userGroupListgrid.getSelection().length == 1) { useWindow = new AddRoleToGroupWindow( ConstantsUtil.organizationConstants.addRoleToGroup(), false,srcRect,userGroupListgrid,"showwindow/organization_group_01.png"); ShowWindowTools.showWondow(srcRect, useWindow, -1); } else { SC.say(ConstantsUtil.commonConstants.alertSelectFortoolbar()); } } else if("delete".equalsIgnoreCase(windowName)) { if (userGroupListgrid.getSelection().length != 0) { SC.confirm(ConstantsUtil.commonConstants.ConfirmForDelete(), new BooleanCallback() { @Override public void execute(Boolean value) { if (value.equals(true)) { SC.say(ConstantsUtil.commonConstants.alertForsuccessDelete()); userGroupListgrid.removeSelectedData(); } } }); /*//addToButton.addClickHandler(new ClickHandler() { // public void onClick(ClickEvent event) { SC.ask(ConstantsUtil.commonConstants.ConfirmForDelete(), new BooleanCallback() { public void execute(Boolean value) { if (value != null && value) { SC.say("成功删除数据"); userGroupListgrid.removeSelectedData(); } else { // labelAnswer.setContents("No"); } } }); */ }else{ SC.say(ConstantsUtil.commonConstants.alertSelectFortoolbar()); } } } }
[ "usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d" ]
usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d
d5beb38a3668ff21ec981a3ebd0d28b640044516
758b42d96896ebc63d4a9a431ed1576828a7c7d0
/src/main/java/org/jboss/jdeparser/StaticInitJBlock.java
eb426c98b8b4d58e9f69382b1bb056ed397029b4
[ "Apache-2.0" ]
permissive
jdeparser/jdeparser2
8ebc1e2864b3da793a4e9cf6ec17b0eb9d2a69eb
fd6310c3745ff6d61487df6b8804760bea9cb866
refs/heads/2.0
2022-05-20T02:02:46.001672
2022-04-29T19:43:34
2022-04-29T19:43:34
16,367,807
10
6
Apache-2.0
2022-04-29T19:44:01
2014-01-30T03:56:46
Java
UTF-8
Java
false
false
1,665
java
/* * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * 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.jboss.jdeparser; import static org.jboss.jdeparser.Tokens.*; import java.io.IOException; /** * @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a> */ class StaticInitJBlock extends BasicJBlock implements ClassContent, JClassItem { StaticInitJBlock() { super(null, Braces.REQUIRED); } public void write(final SourceFileWriter writer) throws IOException { writeComments(writer); writer.write($KW.STATIC); super.write(writer, FormatPreferences.Space.BEFORE_BRACE_METHOD); } public Kind getItemKind() { return Kind.INIT_BLOCK; } public int getModifiers() { return JMod.STATIC; } public boolean hasAllModifiers(final int mods) { return (mods & JMod.STATIC) == mods; } public boolean hasAnyModifier(final int mods) { return (mods & JMod.STATIC) != 0; } public String getName() { return null; } }
[ "david.lloyd@redhat.com" ]
david.lloyd@redhat.com
d96f96cc2eddbdbc705302247b47ed2602f2ba88
033efd99e8718e93b45ee8ae0e35de5d2884287d
/src/main/java/com/ky2009666/service/exception/CustomRuntimeException.java
54a50c06e492cebe5a0353a2e30b47991c30968f
[]
no_license
ky2009888/springboot-shiro-01
69de9ebf5c4d32036ca360a904383cbb8b5e51c4
027397dc207586933349eaccdc4bd6ae643c52ac
refs/heads/master
2023-04-13T18:20:27.806925
2021-04-29T03:28:34
2021-04-29T03:28:34
362,676,985
0
0
null
null
null
null
UTF-8
Java
false
false
916
java
package com.ky2009666.service.exception; /** * @author ky2009666 * @description 自定义运行时异常 * @date 2021/4/28 **/ public class CustomRuntimeException extends RuntimeException{ /** * Constructs a new runtime exception with {@code null} as its * detail message. The cause is not initialized, and may subsequently be * initialized by a call to {@link #initCause}. */ public CustomRuntimeException() { super(); } /** * Constructs a new runtime exception with the specified detail message. * The cause is not initialized, and may subsequently be initialized by a * call to {@link #initCause}. * * @param message the detail message. The detail message is saved for * later retrieval by the {@link #getMessage()} method. */ public CustomRuntimeException(String message) { super(message); } }
[ "ji_jinliang2012@163.com" ]
ji_jinliang2012@163.com
7da591b0daef1a53146127c299e38ebacd3edb42
028cbe18b4e5c347f664c592cbc7f56729b74060
/external/modules/trinidad/2.0.2-glassfish-1/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/PropertyArrayMap.java
817a9125008c9f90a79f097db557bd1ef864f4c1
[]
no_license
dmatej/Glassfish-SVN-Patched
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
269e29ba90db6d9c38271f7acd2affcacf2416f1
refs/heads/master
2021-05-28T12:55:06.267463
2014-11-11T04:21:44
2014-11-11T04:21:44
23,610,469
1
0
null
null
null
null
UTF-8
Java
false
false
7,681
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.myfaces.trinidad.bean.util; import java.util.Map; import java.util.Set; import javax.el.ValueExpression; import javax.faces.component.PartialStateHolder; import org.apache.myfaces.trinidad.bean.FacesBean; import org.apache.myfaces.trinidad.bean.PropertyKey; import org.apache.myfaces.trinidad.bean.PropertyMap; import org.apache.myfaces.trinidad.util.ArrayMap; import javax.faces.context.FacesContext; public class PropertyArrayMap extends ArrayMap<PropertyKey,Object> implements PropertyMap { public PropertyArrayMap( int initialCapacity) { super(initialCapacity); } public PropertyArrayMap() { super(); } public Object get( PropertyKey pKey) { if (pKey.getIndex() < 0) return get(pKey); return getByIdentity(pKey); } @Override public Object put( PropertyKey key, Object value) { Object retValue = super.put(key, value); if (_createDeltas()) { if (key.getMutable().isAtLeastSometimesMutable() || !_equals(value, retValue)) _deltas.put(key, value); } else if (key.getMutable().isAtLeastSometimesMutable() && !(value instanceof ValueExpression)) { _getMutableTracker(true).addProperty(key); } if (key.isPartialStateHolder()) { _getPartialStateHolderTracker(true).addProperty(key); } return retValue; } @Override public Object remove( Object key) { boolean useDeltas = _createDeltas(); if (useDeltas) { if (!super.containsKey(key)) return null; // If this key is contained, it certainly must be a PropertyKey! assert(key instanceof PropertyKey); _deltas.put((PropertyKey) key, null); } if (key instanceof PropertyKey) { PropertyKey propKey = (PropertyKey)key; if (propKey.isPartialStateHolder()) { _getPartialStateHolderTracker(true).removeProperty(propKey); } if (!useDeltas && propKey.getMutable().isAtLeastSometimesMutable()) { PropertyTracker mutableTracker = _getMutableTracker(false); if (mutableTracker != null) mutableTracker.removeProperty(propKey); } } return super.remove(key); } @Override public void putAll(Map<? extends PropertyKey, ? extends Object> t) { boolean useDeltas =_createDeltas(); if (useDeltas) _deltas.putAll(t); Set<? extends PropertyKey> keys = t.keySet(); for (PropertyKey key: keys) { if (key.isPartialStateHolder()) { _getPartialStateHolderTracker(true).addProperty(key); } if (!useDeltas && key.getMutable().isAtLeastSometimesMutable()) { Object value = t.get(key); if (!(value instanceof ValueExpression)) { _getMutableTracker(true).addProperty(key); } } } super.putAll(t); } public Object saveState(FacesContext context) { if (_initialStateMarked) { if (_deltas == null) return null; return StateUtils.saveState(_deltas, context, getUseStateHolder()); } else { return StateUtils.saveState(this, context, getUseStateHolder()); } } public void restoreState( FacesContext context, FacesBean.Type type, Object state) { StateUtils.restoreState(this, context, type, state, getUseStateHolder()); } protected PropertyMap createDeltaPropertyMap() { PropertyArrayMap map = new PropertyArrayMap(2); map.setUseStateHolder(getUseStateHolder()); map.setType(_type); PropertyTracker tracker = _getMutableTracker(false); if (tracker != null) { for (PropertyKey key: tracker) { Object val = get(key); if (val != null) { map.put(key, val); } } _mutableTracker = null; } return map; } public boolean getUseStateHolder() { return _useStateHolder; } public void setUseStateHolder(boolean useStateHolder) { _useStateHolder = useStateHolder; } // =-=AEW CLEAR? public void markInitialState() { _initialStateMarked = true; // PropertyTracker uses a bitmask to track properties // We are tracking all properties that have CA_PARTIAL_STATE_HOLDER capability, // so that we do not have to check every property here PropertyTracker tracker = _getPartialStateHolderTracker(false); if (tracker != null) { for (PropertyKey key: tracker) { Object val = get(key); if (val != null) { ((PartialStateHolder)val).markInitialState(); } } } } public void clearInitialState() { _initialStateMarked = false; _deltas = null; // PropertyTracker uses a bitmask to track properties // We are tracking all properties that have CA_PARTIAL_STATE_HOLDER capability, // so that we do not have to check every property here PropertyTracker tracker = _getPartialStateHolderTracker(false); if (tracker != null) { for (PropertyKey key: tracker) { Object val = get(key); if (val != null) { ((PartialStateHolder)val).clearInitialState(); } } } } public boolean initialStateMarked() { return _initialStateMarked; } /** * Sets the the FacesBean type used by this map's owner bean * @param type FacesBean type */ public void setType(FacesBean.Type type) { _type = type; } private boolean _createDeltas() { if (_initialStateMarked) { if (_deltas == null) { _deltas = createDeltaPropertyMap(); } return true; } return false; } static private boolean _equals(Object a, Object b) { if (a == b) return true; if (a == null) return false; return a.equals(b); } private PropertyTracker _getPartialStateHolderTracker(boolean create) { if (_tracker == null && create) { if (_type == null) { throw new IllegalStateException("FacesBean.TYPE is required to track properties"); } _tracker = new PropertyTracker(_type); } return _tracker; } private PropertyTracker _getMutableTracker(boolean create) { if (_mutableTracker == null && create) { if (_type == null) { throw new IllegalStateException("FacesBean.TYPE is required to track properties"); } _mutableTracker = new PropertyTracker(_type); } return _mutableTracker; } private transient boolean _initialStateMarked; private transient PropertyMap _deltas; private boolean _useStateHolder; private FacesBean.Type _type; private PropertyTracker _tracker; private transient PropertyTracker _mutableTracker; }
[ "janey@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5" ]
janey@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
f0ff15f3444ebc0051de71f467ac6d2b374a60bd
19dc4b795d50f177a74438a0192af69c3849ac5e
/goshop-service-order/src/main/java/org/goshop/order/mapper/read/ReadGsAddressMapper.java
0579dcb10325ba5687f56d4d8788bb46e8309cab
[]
no_license
spidermandl/stoneshop
6e2d469ce0fe05d66c3bb56e04f160b54dd63ebc
ecff96a61d8f2fc3b5cd279e7209da0ae07bc26d
refs/heads/master
2021-09-09T17:44:14.847907
2018-03-18T17:05:03
2018-03-18T17:05:03
111,582,391
0
1
null
null
null
null
UTF-8
Java
false
false
267
java
package org.goshop.order.mapper.read; import org.goshop.order.pojo.GsAddress; import java.util.List; import java.util.Map; public interface ReadGsAddressMapper { GsAddress selectByPrimaryKey(Long id); List<GsAddress> selectByCondition(Map condition); }
[ "Desmond@Desmonds-MacBook-Pro.local" ]
Desmond@Desmonds-MacBook-Pro.local
1ba45be880cc2d88b3029e47487141f6df38d8bd
0158d752f828f0b7aea8751e90601aaff3547a5b
/hutool-core/src/main/java/cn/hutool/core/lang/Snowflake.java
9183fe5d0639365c06a9a83af762601b7adb9f6b
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-mulanpsl-2.0-en", "MulanPSL-2.0" ]
permissive
pick-stars/hutool
fe76dfe04e06870226d268ffb4335d2d89ae2a89
7bf6c7c4d75e24b407c797d618142552e5909c0f
refs/heads/v5-master
2023-06-04T07:50:16.515964
2021-06-19T17:33:46
2021-06-19T17:33:46
354,790,250
0
0
NOASSERTION
2021-06-24T16:12:37
2021-04-05T10:01:00
null
UTF-8
Java
false
false
6,870
java
package cn.hutool.core.lang; import cn.hutool.core.date.SystemClock; import cn.hutool.core.util.StrUtil; import java.io.Serializable; import java.util.Date; /** * Twitter的Snowflake 算法<br> * 分布式系统中,有一些需要使用全局唯一ID的场景,有些时候我们希望能使用一种简单一些的ID,并且希望ID能够按照时间有序生成。 * * <p> * snowflake的结构如下(每部分用-分开):<br> * * <pre> * 0 - 0000000000 0000000000 0000000000 0000000000 0 - 00000 - 00000 - 000000000000 * </pre> * <p> * 第一位为未使用(符号位表示正数),接下来的41位为毫秒级时间(41位的长度可以使用69年)<br> * 然后是5位datacenterId和5位workerId(10位的长度最多支持部署1024个节点)<br> * 最后12位是毫秒内的计数(12位的计数顺序号支持每个节点每毫秒产生4096个ID序号) * <p> * 并且可以通过生成的id反推出生成时间,datacenterId和workerId * <p> * 参考:http://www.cnblogs.com/relucent/p/4955340.html * * @author Looly * @since 3.0.1 */ public class Snowflake implements Serializable { private static final long serialVersionUID = 1L; private final long twepoch; private final long workerIdBits = 5L; // 最大支持机器节点数0~31,一共32个 @SuppressWarnings({"PointlessBitwiseExpression", "FieldCanBeLocal"}) private final long maxWorkerId = -1L ^ (-1L << workerIdBits); private final long dataCenterIdBits = 5L; // 最大支持数据中心节点数0~31,一共32个 @SuppressWarnings({"PointlessBitwiseExpression", "FieldCanBeLocal"}) private final long maxDataCenterId = -1L ^ (-1L << dataCenterIdBits); // 序列号12位 private final long sequenceBits = 12L; // 机器节点左移12位 private final long workerIdShift = sequenceBits; // 数据中心节点左移17位 private final long dataCenterIdShift = sequenceBits + workerIdBits; // 时间毫秒数左移22位 private final long timestampLeftShift = sequenceBits + workerIdBits + dataCenterIdBits; // 序列掩码,用于限定序列最大值不能超过4095 @SuppressWarnings("FieldCanBeLocal") private final long sequenceMask = ~(-1L << sequenceBits);// 4095 private final long workerId; private final long dataCenterId; private final boolean useSystemClock; private long sequence = 0L; private long lastTimestamp = -1L; /** * 构造 * * @param workerId 终端ID * @param dataCenterId 数据中心ID */ public Snowflake(long workerId, long dataCenterId) { this(workerId, dataCenterId, false); } /** * 构造 * * @param workerId 终端ID * @param dataCenterId 数据中心ID * @param isUseSystemClock 是否使用{@link SystemClock} 获取当前时间戳 */ public Snowflake(long workerId, long dataCenterId, boolean isUseSystemClock) { this(null, workerId, dataCenterId, isUseSystemClock); } /** * @param epochDate 初始化时间起点(null表示默认起始日期),后期修改会导致id重复,如果要修改连workerId dataCenterId,慎用 * @param workerId 工作机器节点id * @param dataCenterId 数据中心id * @param isUseSystemClock 是否使用{@link SystemClock} 获取当前时间戳 * @since 5.1.3 */ public Snowflake(Date epochDate, long workerId, long dataCenterId, boolean isUseSystemClock) { if (null != epochDate) { this.twepoch = epochDate.getTime(); } else{ // Thu, 04 Nov 2010 01:42:54 GMT this.twepoch = 1288834974657L; } if (workerId > maxWorkerId || workerId < 0) { throw new IllegalArgumentException(StrUtil.format("worker Id can't be greater than {} or less than 0", maxWorkerId)); } if (dataCenterId > maxDataCenterId || dataCenterId < 0) { throw new IllegalArgumentException(StrUtil.format("datacenter Id can't be greater than {} or less than 0", maxDataCenterId)); } this.workerId = workerId; this.dataCenterId = dataCenterId; this.useSystemClock = isUseSystemClock; } /** * 根据Snowflake的ID,获取机器id * * @param id snowflake算法生成的id * @return 所属机器的id */ public long getWorkerId(long id) { return id >> workerIdShift & ~(-1L << workerIdBits); } /** * 根据Snowflake的ID,获取数据中心id * * @param id snowflake算法生成的id * @return 所属数据中心 */ public long getDataCenterId(long id) { return id >> dataCenterIdShift & ~(-1L << dataCenterIdBits); } /** * 根据Snowflake的ID,获取生成时间 * * @param id snowflake算法生成的id * @return 生成的时间 */ public long getGenerateDateTime(long id) { return (id >> timestampLeftShift & ~(-1L << 41L)) + twepoch; } /** * 下一个ID * * @return ID */ public synchronized long nextId() { long timestamp = genTime(); if (timestamp < this.lastTimestamp) { if(this.lastTimestamp - timestamp < 2000){ // 容忍2秒内的回拨,避免NTP校时造成的异常 timestamp = lastTimestamp; } else{ // 如果服务器时间有问题(时钟后退) 报错。 throw new IllegalStateException(StrUtil.format("Clock moved backwards. Refusing to generate id for {}ms", lastTimestamp - timestamp)); } } if (timestamp == this.lastTimestamp) { final long sequence = (this.sequence + 1) & sequenceMask; if (sequence == 0) { timestamp = tilNextMillis(lastTimestamp); } this.sequence = sequence; } else { sequence = 0L; } lastTimestamp = timestamp; return ((timestamp - twepoch) << timestampLeftShift) | (dataCenterId << dataCenterIdShift) | (workerId << workerIdShift) | sequence; } /** * 下一个ID(字符串形式) * * @return ID 字符串形式 */ public String nextIdStr() { return Long.toString(nextId()); } // ------------------------------------------------------------------------------------------------------------------------------------ Private method start /** * 循环等待下一个时间 * * @param lastTimestamp 上次记录的时间 * @return 下一个时间 */ private long tilNextMillis(long lastTimestamp) { long timestamp = genTime(); // 循环直到操作系统时间戳变化 while (timestamp == lastTimestamp) { timestamp = genTime(); } if (timestamp < lastTimestamp) { // 如果发现新的时间戳比上次记录的时间戳数值小,说明操作系统时间发生了倒退,报错 throw new IllegalStateException( StrUtil.format("Clock moved backwards. Refusing to generate id for {}ms", lastTimestamp - timestamp)); } return timestamp; } /** * 生成时间戳 * * @return 时间戳 */ private long genTime() { return this.useSystemClock ? SystemClock.now() : System.currentTimeMillis(); } // ------------------------------------------------------------------------------------------------------------------------------------ Private method end }
[ "loolly@gmail.com" ]
loolly@gmail.com
38a6c43dcaaffed8f9509ae985740371eb52017d
51fa3cc281eee60058563920c3c9059e8a142e66
/Java/src/testcases/CWE400_Resource_Exhaustion/s01/CWE400_Resource_Exhaustion__getCookies_Servlet_write_66a.java
b7fde615b8f477b30cfda97dbe026bc617be794d
[]
no_license
CU-0xff/CWE-Juliet-TestSuite-Java
0b4846d6b283d91214fed2ab96dd78e0b68c945c
f616822e8cb65e4e5a321529aa28b79451702d30
refs/heads/master
2020-09-14T10:41:33.545462
2019-11-21T07:34:54
2019-11-21T07:34:54
223,105,798
1
4
null
null
null
null
UTF-8
Java
false
false
4,343
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE400_Resource_Exhaustion__getCookies_Servlet_write_66a.java Label Definition File: CWE400_Resource_Exhaustion.label.xml Template File: sources-sinks-66a.tmpl.java */ /* * @description * CWE: 400 Resource Exhaustion * BadSource: getCookies_Servlet Read count from the first cookie using getCookies() * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: write * GoodSink: Write to a file count number of times, but first validate count * BadSink : Write to a file count number of times * Flow Variant: 66 Data flow: data passed in an array from one method to another in different source files in the same package * * */ package testcases.CWE400_Resource_Exhaustion.s01; import testcasesupport.*; import javax.servlet.http.*; import java.util.logging.Level; public class CWE400_Resource_Exhaustion__getCookies_Servlet_write_66a extends AbstractTestCaseServlet { public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { int count; count = Integer.MIN_VALUE; /* initialize count in case there are no cookies */ /* Read count from cookies */ { Cookie cookieSources[] = request.getCookies(); if (cookieSources != null) { /* POTENTIAL FLAW: Read count from the first cookie value */ String stringNumber = cookieSources[0].getValue(); try { count = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception reading count from cookie", exceptNumberFormat); } } } int[] countArray = new int[5]; countArray[2] = count; (new CWE400_Resource_Exhaustion__getCookies_Servlet_write_66b()).badSink(countArray , request, response ); } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { goodG2B(request, response); goodB2G(request, response); } /* goodG2B() - use goodsource and badsink */ private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable { int count; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ count = 2; int[] countArray = new int[5]; countArray[2] = count; (new CWE400_Resource_Exhaustion__getCookies_Servlet_write_66b()).goodG2BSink(countArray , request, response ); } /* goodB2G() - use badsource and goodsink */ private void goodB2G(HttpServletRequest request, HttpServletResponse response) throws Throwable { int count; count = Integer.MIN_VALUE; /* initialize count in case there are no cookies */ /* Read count from cookies */ { Cookie cookieSources[] = request.getCookies(); if (cookieSources != null) { /* POTENTIAL FLAW: Read count from the first cookie value */ String stringNumber = cookieSources[0].getValue(); try { count = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception reading count from cookie", exceptNumberFormat); } } } int[] countArray = new int[5]; countArray[2] = count; (new CWE400_Resource_Exhaustion__getCookies_Servlet_write_66b()).goodB2GSink(countArray , request, response ); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "frank@fischer.com.mt" ]
frank@fischer.com.mt
f669fb7923d75f2bc9cbda23dbb12ad9d9a9aa53
44ad6bd6ea0424123d41783d3e8ba66dfc54718c
/graviton - game/src/main/java/org/graviton/game/interaction/actions/PlayerMovement.java
22823e7d11311a2c12a58a92372eaaa5c6d85ac5
[]
no_license
Tulba/GDCore
6629da749c015dcc62ef3e09ff218e6d80262798
78d5585ff501d485040311516fb43a35dd4b0546
refs/heads/master
2021-01-20T05:09:14.686838
2017-04-27T11:47:11
2017-04-27T11:47:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,163
java
package org.graviton.game.interaction.actions; import org.graviton.game.client.player.Player; import org.graviton.game.creature.monster.MonsterGroup; import org.graviton.game.interaction.AbstractGameAction; import org.graviton.game.interaction.Status; import org.graviton.game.maps.GameMap; import org.graviton.game.maps.cell.Cell; import org.graviton.game.maps.cell.Trigger; import org.graviton.game.paths.Path; import org.graviton.network.game.protocol.GamePacketFormatter; import org.graviton.network.game.protocol.MessageFormatter; import org.graviton.utils.Cells; import java.util.Optional; /** * Created by Botan on 16/11/2016 : 21:05 */ public class PlayerMovement extends Path implements AbstractGameAction { private final GameMap gameMap; private final Player player; private Cell newCell; public PlayerMovement(Player player, String path) { super(path, player.getGameMap(), player.getCell().getId(), player); System.err.println("New player movement"); this.player = player; this.gameMap = player.getGameMap(); } @Override public boolean begin() { System.err.println("New player [begin] movement"); if (player.getPods()[0] >= player.getPods()[1]) { player.send(MessageFormatter.maxPodsReached()); return false; } boolean valid = super.isValid(); gameMap.send(valid ? GamePacketFormatter.creatureMovementMessage((short) 1, player.getId(), super.toString()) : GamePacketFormatter.noActionMessage()); if (!valid) return false; player.setStatus(Status.WALKING); initialize(); newCell = gameMap.getCells().get(getCell()); return true; } @Override public void cancel(String data) { System.err.println("New player [cancel] movement"); player.getLocation().setCell(gameMap.getCells().get(Short.parseShort(data.substring(2)))); player.getLocation().setOrientation(getOrientation()); } @Override public void finish(String data) { System.err.println("New player [finish] movement"); player.setStatus(Status.DEFAULT); player.getLocation().setOrientation(getOrientation()); if(tasks.isEmpty()) { Optional<MonsterGroup> groupOptional = gameMap.monsters().stream() .filter(creature -> Cells.distanceBetween(gameMap.getWidth(), creature.getLocation().getCell().getId(), newCell.getId()) < 2).findFirst(); if (groupOptional.isPresent()) { byte alignment = groupOptional.get().alignment(); if(alignment != 0 && player.getAlignment().getId() == alignment) return; gameMap.getFightFactory().newMonsterFight(player, groupOptional.get()); return; } player.getLocation().setCell(newCell); Trigger trigger = gameMap.getTriggers().get(newCell.getId()); if (trigger != null) player.changeMap(trigger.getNextMap(), trigger.getNextCell()); } else tasks.forEach(Runnable::run); } }
[ "ahmed.botan94@gmail.com" ]
ahmed.botan94@gmail.com
bb2b8e99f08a1bdc8c7a9d0bb726a070a93ed612
3841f7991232e02c850b7e2ff6e02712e9128b17
/小浪底泥沙三维/EV_Xld/jni/src/JAVA/EV_MapControlWrapper/src/com/earthview/world/spatial2d/controls/EllipticArcAlgoriClassFactory.java
e2cf38aef8ddf785d30547d041b24f42b1fc81c6
[]
no_license
15831944/BeijingEVProjects
62bf734f1cb0a8be6fed42cf6b207f9dbdf99e71
3b5fa4c4889557008529958fc7cb51927259f66e
refs/heads/master
2021-07-22T14:12:15.106616
2017-10-15T11:33:06
2017-10-15T11:33:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
399
java
package com.earthview.world.spatial2d.controls; import global.*; import com.earthview.world.base.*; import com.earthview.world.util.*; import com.earthview.world.core.*; public class EllipticArcAlgoriClassFactory implements IClassFactory { public BaseObject create() { EllipticArcAlgori emptyInstance = new EllipticArcAlgori(CreatedWhenConstruct.CWC_NotToCreate); return emptyInstance; } }
[ "yanguanqi@aliyun.com" ]
yanguanqi@aliyun.com
bedd232451fa1adbd139c15c0eecacaca10afcee
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13377-9-16-NSGA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/user/impl/LDAP/XWikiLDAPAuthServiceImpl_ESTest.java
37d201d8a648b83afe7e32b28dfb9342f8a30d4e
[]
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
583
java
/* * This file was automatically generated by EvoSuite * Wed Apr 01 13:42:41 UTC 2020 */ package com.xpn.xwiki.user.impl.LDAP; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class XWikiLDAPAuthServiceImpl_ESTest extends XWikiLDAPAuthServiceImpl_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
0b56e85b3e81d3abd275f976d7e36a2272132d0d
2160d7150c58aba493af7c00ad2c1cbaf9983972
/app/src/main/java/com/jingye/coffeemac/service/bean/action/AppDownloadInfo.java
b3c3b92cd8d2eb83cd0302e99f51124e38552bb1
[]
no_license
ailinghengshui/CoffeeMachine
5fb963d1dc02fd3667162822697de3bd17e3cd31
139a5c8b84255767d56038f2ea0c5a6130a5d40f
refs/heads/master
2021-07-23T15:47:29.555231
2017-11-03T09:41:44
2017-11-03T09:41:44
109,377,882
0
0
null
null
null
null
UTF-8
Java
false
false
555
java
package com.jingye.coffeemac.service.bean.action; import com.jingye.coffeemac.service.ITranCode; import com.jingye.coffeemac.service.bean.BeanAncestor; public class AppDownloadInfo extends BeanAncestor { private static final long serialVersionUID = 3583021391822166462L; private String uid; @Override public int getWhat() { return ITranCode.ACT_COFFEE; } @Override public int getAction() { return ITranCode.ACT_COFFEE_APP_DOWNLOAD; } public String getUid() { return uid; } public void setUid(String uid) { this.uid = uid; } }
[ "hdwhhc@sina.cn" ]
hdwhhc@sina.cn
419d2ae41420492caa2e226ed67c3ff8bfae7c25
516fb367430d4c1393f4cd726242618eca862bda
/sources/com/bumptech/glide/load/engine/b/g.java
cfe93aa3581c0bab201f09aca6478b52b88f496e
[]
no_license
cmFodWx5YWRhdjEyMTA5/Gaana2
75d6d6788e2dac9302cff206a093870e1602921d
8531673a5615bd9183c9a0466325d0270b8a8895
refs/heads/master
2020-07-22T15:46:54.149313
2019-06-19T16:11:11
2019-06-19T16:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
977
java
package com.bumptech.glide.load.engine.b; import android.annotation.SuppressLint; import com.bumptech.glide.f.e; import com.bumptech.glide.load.c; import com.bumptech.glide.load.engine.b.h.a; import com.bumptech.glide.load.engine.q; public class g extends e<c, q<?>> implements h { private a a; public /* bridge */ /* synthetic */ q b(c cVar, q qVar) { return (q) super.b(cVar, qVar); } public g(int i) { super(i); } public void a(a aVar) { this.a = aVar; } /* Access modifiers changed, original: protected */ public void a(c cVar, q<?> qVar) { if (this.a != null) { this.a.b(qVar); } } /* Access modifiers changed, original: protected */ public int a(q<?> qVar) { return qVar.d(); } @SuppressLint({"InlinedApi"}) public void a(int i) { if (i >= 40) { a(); } else if (i >= 20) { b(b() / 2); } } }
[ "master@master.com" ]
master@master.com
0deb92ffb916017032357a24dd5181d0b661ec15
737fa9c593d25122b611956238295a0b5be40193
/src/org/basic/comp/adapter/ParentPagingInterface.java
904bb7ee9d9a01a55cd9538007bc1d900dec23f4
[]
no_license
saiful-mukhlis/mlm
3f16ac1f150c0de5024fcef4d73450c8b647bfa1
6db7b54505106c83fc421fbb677ab638d6d81f3b
refs/heads/master
2021-01-19T18:51:35.795920
2013-02-05T05:24:47
2013-02-05T05:24:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
369
java
package org.basic.comp.adapter; import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx; import javax.swing.table.TableModel; public interface ParentPagingInterface extends TableModel { public void setPaging(PagingInterface paging); public void loadJumlahData(ODatabaseDocumentTx db); public void reload(ODatabaseDocumentTx db); }
[ "saiful.mukhlis@gmail.com" ]
saiful.mukhlis@gmail.com
85b35525cad71ded966b9248aa433ab8b8d9d20e
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
/src_procyon/org/jfree/ui/StrokeChooserPanel.java
8e76613ce88584396616e4950fe3b42ca7350f4d
[]
no_license
fjh658/bindiff
c98c9c24b0d904be852182ecbf4f81926ce67fb4
2a31859b4638404cdc915d7ed6be19937d762743
refs/heads/master
2021-01-20T06:43:12.134977
2016-06-29T17:09:03
2016-06-29T17:09:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
800
java
package org.jfree.ui; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class StrokeChooserPanel extends JPanel { private JComboBox selector; public StrokeChooserPanel(final StrokeSample selectedItem, final StrokeSample[] array) { this.setLayout(new BorderLayout()); (this.selector = new JComboBox((E[])array)).setSelectedItem(selectedItem); this.selector.setRenderer(new StrokeSample(new BasicStroke(1.0f))); this.add(this.selector); this.selector.addActionListener(new StrokeChooserPanel$1(this)); } protected final JComboBox getSelector() { return this.selector; } public Stroke getSelectedStroke() { return ((StrokeSample)this.selector.getSelectedItem()).getStroke(); } }
[ "manouchehri@riseup.net" ]
manouchehri@riseup.net
73293f561e900ee8e56c2fe19811605e3dcda141
a7f1830b8748574cdaef600e9c03d31354bf2130
/src/main/java/me/brunosantana/codigo_apostila_curso_java/chapter02/classes_abstratas/Leao.java
e7ed08075e7bdff484d099ff20feadd947f7b457
[]
no_license
brunosantanati/apostila-curso-java-codigo
00429a2daf4ec78d9cb223adb2733b7a591bb342
6643468865cefa161c6f6557561879d3fd6e6673
refs/heads/master
2021-07-24T11:59:04.275912
2019-12-15T20:20:23
2019-12-15T20:20:23
225,260,655
1
0
null
2020-10-13T17:53:37
2019-12-02T01:37:45
Java
UTF-8
Java
false
false
198
java
package me.brunosantana.codigo_apostila_curso_java.chapter02.classes_abstratas; public class Leao extends Animal { @Override public void fazerSom() { System.out.println("rugindo..."); } }
[ "bruno.santana.ti@gmail.com" ]
bruno.santana.ti@gmail.com
98d784e97ec0759abcc9c7c2dc6479d7edd0386c
5f14a75cb6b80e5c663daa6f7a36001c9c9b778c
/src/agh.java
c5132aa03bd6fd50dc4494d59a4a3b82f0b7b3ad
[]
no_license
MaTriXy/com.ubercab
37b6f6d3844e6a63dc4c94f8b6ba6bb4eb0118fb
ccd296d27e0ecf5ccb46147e8ec8fb70d2024b2c
refs/heads/master
2021-01-22T11:16:39.511861
2016-03-19T20:58:25
2016-03-19T20:58:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,816
java
import android.annotation.TargetApi; import android.app.Activity; import android.app.Application; import android.app.Application.ActivityLifecycleCallbacks; import android.content.Context; import android.os.Bundle; @apl @TargetApi(14) public final class agh implements Application.ActivityLifecycleCallbacks { private Activity a; private Context b; private final Object c = new Object(); public agh(Application paramApplication, Activity paramActivity) { paramApplication.registerActivityLifecycleCallbacks(this); a(paramActivity); b = paramApplication.getApplicationContext(); } private void a(Activity paramActivity) { synchronized (c) { if (!paramActivity.getClass().getName().startsWith("com.google.android.gms.ads")) { a = paramActivity; } return; } } public final Activity a() { return a; } public final Context b() { return b; } public final void onActivityCreated(Activity paramActivity, Bundle paramBundle) {} public final void onActivityDestroyed(Activity paramActivity) { synchronized (c) { if (a == null) { return; } if (a.equals(paramActivity)) { a = null; } return; } } public final void onActivityPaused(Activity paramActivity) { a(paramActivity); } public final void onActivityResumed(Activity paramActivity) { a(paramActivity); } public final void onActivitySaveInstanceState(Activity paramActivity, Bundle paramBundle) {} public final void onActivityStarted(Activity paramActivity) { a(paramActivity); } public final void onActivityStopped(Activity paramActivity) {} } /* Location: * Qualified Name: agh * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
a15b1d7cbce54c91677ce8085eda1f328ea18562
995f73d30450a6dce6bc7145d89344b4ad6e0622
/DVC-AN20_EMUI10.1.1/src/main/java/android/net/booster/HwCommBoosterServiceManager.java
16e8af89c5cd8b087b3a984b88f1a6161971fdba
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,024
java
package android.net.booster; import android.net.booster.IHwCommBoosterService; import android.os.Bundle; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemProperties; import android.util.Log; public class HwCommBoosterServiceManager implements IHwCommBoosterServiceManager { private static final boolean BOOSTER_SUPPORT = SystemProperties.getBoolean("ro.config.hw_booster", true); private static final String TAG = "HwCommBoosterServiceManager"; private static final Object mLock = new Object(); private static HwCommBoosterServiceManager sInstance = null; public static HwCommBoosterServiceManager getInstance() { HwCommBoosterServiceManager hwCommBoosterServiceManager; synchronized (mLock) { if (sInstance == null) { sInstance = new HwCommBoosterServiceManager(); } hwCommBoosterServiceManager = sInstance; } return hwCommBoosterServiceManager; } private HwCommBoosterServiceManager() { } private IHwCommBoosterService getService() { return IHwCommBoosterService.Stub.asInterface(ServiceManager.getService("HwCommBoosterService")); } public int registerCallBack(String pkgName, IHwCommBoosterCallback cb) { if (!BOOSTER_SUPPORT || pkgName == null || cb == null) { Log.w(TAG, "registerCallBack failed invalid input"); return -3; } IHwCommBoosterService service = getService(); if (service != null) { try { return service.registerCallBack(pkgName, cb); } catch (RemoteException ex) { Log.w(TAG, "registerCallBack exception! ", ex); return -2; } } else { Log.e(TAG, "registerCallBack failed, IHwCommBoosterService is null"); return -1; } } public int unRegisterCallBack(String pkgName, IHwCommBoosterCallback cb) { if (!BOOSTER_SUPPORT || pkgName == null || cb == null) { Log.w(TAG, "unRegisterCallBack failed invalid input"); return -3; } IHwCommBoosterService service = getService(); if (service != null) { try { return service.unRegisterCallBack(pkgName, cb); } catch (RemoteException ex) { Log.w(TAG, "unRegisterCallBack exception! ", ex); return -2; } } else { Log.e(TAG, "unRegisterCallBack failed, IHwCommBoosterService is null"); return -1; } } public int reportBoosterPara(String pkgName, int dataType, Bundle data) { if (!BOOSTER_SUPPORT || pkgName == null || data == null) { Log.w(TAG, "reportBoosterPara failed invalid input"); return -3; } IHwCommBoosterService service = getService(); if (service != null) { try { return service.reportBoosterPara(pkgName, dataType, data); } catch (RemoteException ex) { Log.w(TAG, "reportBoosterPara exception! ", ex); return -2; } } else { Log.e(TAG, "reportBoosterPara failed, IHwCommBoosterService is null"); return -1; } } public Bundle getBoosterPara(String pkgName, int dataType, Bundle data) { if (!BOOSTER_SUPPORT || pkgName == null || data == null) { Log.w(TAG, "getBoosterPara failed, invalid input"); return null; } IHwCommBoosterService service = getService(); if (service != null) { try { return service.getBoosterPara(pkgName, dataType, data); } catch (RemoteException e) { Log.w(TAG, "getBoosterPara exception!"); return null; } } else { Log.e(TAG, "getBoosterPara failed, IHwCommBoosterService is null"); return null; } } }
[ "dstmath@163.com" ]
dstmath@163.com
e45f5ab2612f521c9f4e9a477ce8d308aecdc294
94029b5cf7ec5aa90d7d11391d246a67d0a74b5c
/Module 3_Code/Chapter_01_Code/YASTU/mobile/src/main/java/com/plattysoft/yass/YassActivity.java
48c6fa1a397b876a5c178b7ddf5abe4e492c0d55
[ "MIT" ]
permissive
PacktPublishing/Android-Game-Programming
a2cc11d238a40132239dd25cd8bfcfa1df31d01b
00a595b13c4d6bcc6d2d51e7c7e9281d50946ae7
refs/heads/master
2023-02-07T00:56:22.242351
2023-01-30T08:14:19
2023-01-30T08:14:19
68,189,396
24
15
null
null
null
null
UTF-8
Java
false
false
3,010
java
package com.plattysoft.yass; import android.app.Activity; import android.os.Build; import android.os.Bundle; import android.view.View; import com.plattysoft.yass.counter.GameFragment; import com.plattysoft.yass.counter.MainMenuFragment; public class YassActivity extends Activity { private static final String TAG_FRAGMENT = "content"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_yass); if (savedInstanceState == null) { getFragmentManager().beginTransaction() .add(R.id.container, new MainMenuFragment(), TAG_FRAGMENT) .commit(); } } public void startGame() { // Navigate the the game fragment, which makes the start automatically navigateToFragment( new GameFragment()); } private void navigateToFragment(YassBaseFragment dst) { getFragmentManager() .beginTransaction() .replace(R.id.container, dst, TAG_FRAGMENT) .addToBackStack(null) .commit(); } // public void navigateToFragment(Fragment newFragment) { // // Set it and do the transaction // FragmentTransaction ft = getFragmentManager().beginTransaction(); //// ft.setCustomAnimations(R.animator.fragment_return_enter, R.animator.fragment_return_exit, R.animator.fragment_enter, R.animator.fragment_exit); // ft.replace(R.id.container, newFragment, TAG_FRAGMENT); // ft.addToBackStack(null); // ft.commit(); // } @Override public void onBackPressed() { final YassBaseFragment fragment = (YassBaseFragment) getFragmentManager().findFragmentByTag(TAG_FRAGMENT); if (fragment == null || !fragment.onBackPressed()) { super.onBackPressed(); } } public void navigateBack() { // Do a push on the navigation history super.onBackPressed(); } @Override public void onWindowFocusChanged(boolean hasFocus) { super.onWindowFocusChanged(hasFocus); if (hasFocus) { View decorView = getWindow().getDecorView(); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LOW_PROFILE); } else { decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); } } } }
[ "sushantn@packt.com" ]
sushantn@packt.com
91cc2adc57f40bbfbc6b3581e813ea830c18648e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_5e52e94e49366e063bf316e41e1231ded0000b07/MFRCreativeTab/1_5e52e94e49366e063bf316e41e1231ded0000b07_MFRCreativeTab_s.java
fb7644956142fcb20fdd39818bc728c09ea1568c
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
890
java
package powercrystals.minefactoryreloaded.gui; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.ItemStack; import powercrystals.minefactoryreloaded.MineFactoryReloadedCore; public class MFRCreativeTab extends CreativeTabs { public static final MFRCreativeTab tab = new MFRCreativeTab("Minefactory Reloaded", new ItemStack(MineFactoryReloadedCore.conveyorBlock)); //------------------- private String label; private ItemStack icon; public MFRCreativeTab(String label, ItemStack icon) { super(label); this.label = label; } @Override public ItemStack getIconItemStack() { return icon; } @Override public String getTabLabel() { return this.label; } @Override public String getTranslatedTabLabel() { return this.getTabLabel(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c0bf54c7afa798d6e32806610d4ef280fd266a63
a73f1351063a9f06360e39552d47e15d0cf1a092
/ch15/src/sec05_04_Comparator/Fruit.java
c8be3cbf869b4b35641e9da6a02248a4ff3d354c
[]
no_license
jonghwankwon/Java-Lecture
37d6ad91145cb963592af2ad66935da2c899a3e2
cca81332911ac11abfdf9cefaa9908592e15047b
refs/heads/master
2020-04-28T19:51:19.073957
2019-04-15T12:52:02
2019-04-15T12:52:02
175,524,476
0
0
null
null
null
null
UTF-8
Java
false
false
175
java
package sec05_04_Comparator; public class Fruit { public String name; public int price; Fruit(String name, int price) { this.name = name; this.price = price; } }
[ "whdghks1048@naver.com" ]
whdghks1048@naver.com
4f17ef97e5e6bbc9bc2b641b34a9b1df88eca4cd
4a6e86f911592a76ac2f177fa201facd54e73f95
/teamsport/src/main/java/com/paracelsoft/teamsport/config/MyCustomAuthSuccessHandler.java
a631d2e99f0a8e725e6d3329a44adc76e8f7faa3
[]
no_license
hungtruong121/JavaWeb
6d12849a7a5fa907b37026b5012b4488d1e64f8f
9fec0cfaed820a734aedc0d6efec4e727884fbad
refs/heads/master
2023-03-28T17:43:25.742062
2021-04-03T04:57:19
2021-04-03T04:57:19
354,202,881
0
1
null
null
null
null
UTF-8
Java
false
false
1,778
java
package com.paracelsoft.teamsport.config; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.web.authentication.AuthenticationSuccessHandler; public class MyCustomAuthSuccessHandler implements AuthenticationSuccessHandler { @Override public void onAuthenticationSuccess( HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { UserDetail user = (UserDetail)authentication.getPrincipal(); //check role if(user == null || (user.getAuthorities() != null && !user.getAuthorities().contains(new SimpleGrantedAuthority("ADMIN")))) { response.sendRedirect(request.getContextPath() + "/login-error"); } UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken( authentication.getPrincipal(), user.getUsername(), user.getAuthorities()); auth.setDetails(user); SecurityContext securityContext = SecurityContextHolder.getContext(); securityContext.setAuthentication(auth); //set our response to OK status response.setStatus(HttpServletResponse.SC_OK); response.sendRedirect(request.getContextPath() + "/dashboard"); } }
[ "hungtruonglearning@gmail.com" ]
hungtruonglearning@gmail.com
9db2e2f3ae34e271e756178882c76b432689a237
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/thinkaurelius--titan/1c91e6cd1ad51c838f3214ba899f6855d38b64ad/before/GraphOfTheGodsFactory.java
8896dcd0f68b417462129cc3a1283fcb96b4b7f9
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
6,642
java
package com.thinkaurelius.titan.example; import com.thinkaurelius.titan.core.*; import com.thinkaurelius.titan.core.attribute.Geoshape; import com.thinkaurelius.titan.core.Multiplicity; import com.thinkaurelius.titan.core.schema.ConsistencyModifier; import com.thinkaurelius.titan.core.schema.TitanGraphIndex; import com.thinkaurelius.titan.core.schema.TitanManagement; import com.tinkerpop.gremlin.structure.Direction; import com.tinkerpop.gremlin.structure.Edge; import com.tinkerpop.gremlin.structure.Vertex; import com.tinkerpop.gremlin.structure.util.ElementHelper; import java.io.File; /** * Example Graph factory that creates a {@link TitanGraph} based on roman mythology. * Used in the documentation examples and tutorials. * * @author Marko A. Rodriguez (http://markorodriguez.com) */ public class GraphOfTheGodsFactory { public static final String INDEX_NAME = "search"; public static TitanGraph create(final String directory) { TitanFactory.Builder config = TitanFactory.build(); config.set("storage.backend", "berkeleyje"); config.set("storage.directory", directory); config.set("index."+INDEX_NAME+".backend","elasticsearch"); config.set("index." + INDEX_NAME + ".directory", directory + File.separator + "es"); config.set("index."+INDEX_NAME+".elasticsearch.local-mode",true); config.set("index."+INDEX_NAME+".elasticsearch.client-only",false); TitanGraph graph = config.open(); GraphOfTheGodsFactory.load(graph); return graph; } public static void load(final TitanGraph graph) { //Create Schema TitanManagement mgmt = graph.getManagementSystem(); final PropertyKey name = mgmt.makePropertyKey("name").dataType(String.class).make(); TitanGraphIndex namei = mgmt.buildIndex("name",Vertex.class).addKey(name).unique().buildCompositeIndex(); mgmt.setConsistency(namei, ConsistencyModifier.LOCK); final PropertyKey age = mgmt.makePropertyKey("age").dataType(Integer.class).make(); mgmt.buildIndex("vertices",Vertex.class).addKey(age).buildMixedIndex(INDEX_NAME); final PropertyKey time = mgmt.makePropertyKey("time").dataType(Integer.class).make(); final PropertyKey reason = mgmt.makePropertyKey("reason").dataType(String.class).make(); final PropertyKey place = mgmt.makePropertyKey("place").dataType(Geoshape.class).make(); TitanGraphIndex eindex = mgmt.buildIndex("edges",Edge.class) .addKey(reason).addKey(place).buildMixedIndex(INDEX_NAME); mgmt.makeEdgeLabel("father").multiplicity(Multiplicity.MANY2ONE).make(); mgmt.makeEdgeLabel("mother").multiplicity(Multiplicity.MANY2ONE).make(); EdgeLabel battled = mgmt.makeEdgeLabel("battled").signature(time).make(); mgmt.buildEdgeIndex(battled, "battlesByTime", Direction.BOTH, Order.DESC, time); mgmt.makeEdgeLabel("lives").signature(reason).make(); mgmt.makeEdgeLabel("pet").make(); mgmt.makeEdgeLabel("brother").make(); mgmt.makeVertexLabel("titan").make(); mgmt.makeVertexLabel("location").make(); mgmt.makeVertexLabel("god").make(); mgmt.makeVertexLabel("demigod").make(); mgmt.makeVertexLabel("human").make(); mgmt.makeVertexLabel("monster").make(); mgmt.commit(); TitanTransaction tx = graph.newTransaction(); // vertices Vertex saturn = tx.addVertex("label","titan","name", "saturn","age", 10000); Vertex sky = tx.addVertex("label","location","name", "sky"); Vertex sea = tx.addVertex("label","location", "name", "sea"); Vertex jupiter = tx.addVertex("label","god", "name", "jupiter", "age", 5000); Vertex neptune = tx.addVertex("label","god", "name", "neptune", "age", 4500); Vertex hercules = tx.addVertex("label","demigod", "name", "hercules", "age", 30); Vertex alcmene = tx.addVertex("label","human", "name", "alcmene", "age", 45); Vertex pluto = tx.addVertex("label","god", "name", "pluto", "age", 4000); Vertex nemean = tx.addVertex("label","monster", "name", "nemean"); Vertex hydra = tx.addVertex("label","monster", "name", "hydra"); Vertex cerberus = tx.addVertex("label","monster", "name", "cerberus"); Vertex tartarus = tx.addVertex("label","location", "name", "tartarus"); // edges jupiter.addEdge("father", saturn); jupiter.addEdge("lives", sky, "reason", "loves fresh breezes"); jupiter.addEdge("brother", neptune); jupiter.addEdge("brother", pluto); neptune.addEdge("lives", sea).property("reason", "loves waves"); neptune.addEdge("brother", jupiter); neptune.addEdge("brother", pluto); hercules.addEdge("father", jupiter); hercules.addEdge("mother", alcmene); hercules.addEdge("battled", nemean, "time", 1, "place", Geoshape.point(38.1f, 23.7f)); hercules.addEdge("battled", hydra, "time", 2, "place", Geoshape.point(37.7f, 23.9f)); hercules.addEdge("battled", cerberus, "time", 12, "place", Geoshape.point(39f, 22f)); pluto.addEdge("brother", jupiter); pluto.addEdge("brother", neptune); pluto.addEdge("lives", tartarus, "reason", "no fear of death"); pluto.addEdge("pet", cerberus); cerberus.addEdge("lives", tartarus); // commit the transaction to disk tx.commit(); } /** * Calls {@link TitanFactory#open(String)}, passing the Titan configuration file path * which must be the sole element in the {@code args} array, then calls * {@link #load(com.thinkaurelius.titan.core.TitanGraph)} on the opened graph, * then calls {@link com.thinkaurelius.titan.core.TitanGraph#close()} * and returns. * <p> * This method may call {@link System#exit(int)} if it encounters an error, such as * failure to parse its arguments. Only use this method when executing main from * a command line. Use one of the other methods on this class ({@link #create(String)} * or {@link #load(com.thinkaurelius.titan.core.TitanGraph)}) when calling from * an enclosing application. * * @param args a singleton array containing a path to a Titan config properties file */ public static void main(String args[]) { if (null == args || 1 != args.length) { System.err.println("Usage: GraphOfTheGodsFactory <titan-config-file>"); System.exit(1); } TitanGraph g = TitanFactory.open(args[0]); load(g); g.close(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
32dc04c473e91148bab5b4f565bfa4370bc17f06
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/branches/2.5.3/code/base/dso-system-tests/tests.system/com/tctest/MapValuesIteratorFaultBreadthTest.java
8311409f49610d3692a6f9289cac10cf44f37ab9
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
687
java
/* * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved. */ package com.tctest; public class MapValuesIteratorFaultBreadthTest extends TransparentTestBase implements TestConfigurator { private static final int NODE_COUNT = 3; private static final int THREADS_COUNT = 1; protected Class getApplicationClass() { return MapValuesIteratorFaultBreadthTestApp.class; } public void doSetUp(TransparentTestIface t) throws Exception { t.getTransparentAppConfig().setClientCount(NODE_COUNT).setApplicationInstancePerClientCount(THREADS_COUNT); t.initializeTestRunner(); } }
[ "jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864
130900eebeb292ba985ebc5b863e5031da83e5ae
db5e2811d3988a5e689b5fa63e748c232943b4a0
/jadx/sources/o/C1952.java
de36aa645e8f2837bd467461ed010114040b96bb
[]
no_license
ghuntley/TraceTogether_1.6.1.apk
914885d8be7b23758d161bcd066a4caf5ec03233
b5c515577902482d741cabdbd30f883a016242f8
refs/heads/master
2022-04-23T16:59:33.038690
2020-04-27T05:44:49
2020-04-27T05:44:49
259,217,124
0
0
null
null
null
null
UTF-8
Java
false
false
1,661
java
package o; import android.graphics.Path; import android.graphics.PathMeasure; import android.graphics.PointF; import android.util.Property; /* renamed from: o.ιł reason: contains not printable characters */ final class C1952<T> extends Property<T, Float> { /* renamed from: ı reason: contains not printable characters */ private final PathMeasure f9836; /* renamed from: Ɩ reason: contains not printable characters */ private float f9837; /* renamed from: ǃ reason: contains not printable characters */ private final float[] f9838 = new float[2]; /* renamed from: ɩ reason: contains not printable characters */ private final float f9839; /* renamed from: Ι reason: contains not printable characters */ private final PointF f9840 = new PointF(); /* renamed from: ι reason: contains not printable characters */ private final Property<T, PointF> f9841; public final /* synthetic */ void set(Object obj, Object obj2) { Float f = (Float) obj2; this.f9837 = f.floatValue(); this.f9836.getPosTan(this.f9839 * f.floatValue(), this.f9838, (float[]) null); PointF pointF = this.f9840; float[] fArr = this.f9838; pointF.x = fArr[0]; pointF.y = fArr[1]; this.f9841.set(obj, pointF); } C1952(Property<T, PointF> property, Path path) { super(Float.class, property.getName()); this.f9841 = property; this.f9836 = new PathMeasure(path, false); this.f9839 = this.f9836.getLength(); } public final /* synthetic */ Object get(Object obj) { return Float.valueOf(this.f9837); } }
[ "ghuntley@ghuntley.com" ]
ghuntley@ghuntley.com
6fb8ce478f1f0a9a76ee71a5fbb0e11180bb31e7
b20ef055cfdd97017abe2da33ed22c1dc2f52554
/com.dexels.consulosgi/src/com/dexels/sharedconfigstore/consul/ConsulTest.java
2d0026605d5b1b7e320d31dec59cd57fd33585e9
[]
no_license
ANierbeck/consul-osgi
15db064807d24d3c7ceb1662659c8d386c665cf7
10e981eea794c580ec0cdd54cff49d867e74e318
refs/heads/master
2020-12-11T04:18:04.415789
2015-10-01T20:28:58
2015-10-01T20:28:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
859
java
package com.dexels.sharedconfigstore.consul; import java.util.HashMap; import java.util.Map; import com.dexels.sharedconfigstore.consul.impl.ConsulMonitorImpl; import com.dexels.sharedconfigstore.consul.impl.LongPollingHttpListenerImpl; public class ConsulTest { public static void main(String[] args) throws InterruptedException { final LongPollingHttpListenerImpl lphl = new LongPollingHttpListenerImpl(); // final ObjectMapper mapper = new ObjectMapper().configure(JsonGenerator.Feature.AUTO_CLOSE_TARGET, false);; final Map<String,Object> settings = new HashMap<>(); settings.put("consulServer", "http://192.168.99.102:8500"); settings.put("servicePrefix", "serviceAttributes"); lphl.activate(settings); ConsulMonitorImpl cmi = new ConsulMonitorImpl(); cmi.setConsulListener(lphl); cmi.activate(); Thread.sleep(100000); } }
[ "frank@dexels.com" ]
frank@dexels.com
5c3b972a5e8b138ef239092907aaadbf8df0257a
a122268774d0c6316918ac60adc26d5e2f23b467
/src/main/java/com/ura/casemgt/core/exception/ProcessingException.java
070964f014a21f814b0458635c3d54b7de3ba3cb
[]
no_license
smallgod/case-tracker
fe803da14cfea018d8254b5fe266160e83281298
63bd00c974fc4f1c2a60bbc0caf56621a46d8d29
refs/heads/master
2022-12-04T18:47:48.576114
2019-08-12T06:50:31
2019-08-12T06:50:31
201,873,427
0
0
null
2022-11-24T09:34:59
2019-08-12T06:46:20
Java
UTF-8
Java
false
false
722
java
package com.ura.casemgt.core.exception; import com.ura.casemgt.core.DisplayMsg; /** * @author smallGod */ public final class ProcessingException extends DisplayMsgException { private static final long serialVersionUID = 3599015809889620758L; private final String displayMsg; /** * Any exception thrown in the database.. * */ public ProcessingException(Throwable throwable) { super(DisplayMsg.TRY_AGAIN, throwable); this.displayMsg = DisplayMsg.TRY_AGAIN; } @Override public String getDisplayMsg() { return displayMsg; } @Override public ErrorCode getErrorCode() { return ErrorCode.APPLICATION_ERR; } }
[ "davies.mugume@gmail.com" ]
davies.mugume@gmail.com
e82ee8e2ee01a2de5f2daa43d9a57472ee3b3a28
48723c30d5389234ea57c61b39e8dc487b088e27
/app/src/main/java/com/huafeng/client/tools/PhotoUtil.java
8c12b86fee68d7d69ebd117e55d4213ebcb38f53
[]
no_license
payencai/HuafengClient
2add27d41e33808560f1fc7d41fbe3e729faa94a
e995a3fef7499f28cdb42288ceb4224673fc009b
refs/heads/master
2020-06-28T11:07:26.371970
2019-08-02T10:34:26
2019-08-02T10:34:26
200,216,372
1
0
null
null
null
null
UTF-8
Java
false
false
3,704
java
package com.huafeng.client.tools; import android.content.Context; import android.view.View; import com.huafeng.client.R; import com.maning.imagebrowserlibrary.MNImageBrowser; import com.maning.imagebrowserlibrary.model.ImageBrowserConfig; import java.util.ArrayList; public class PhotoUtil { public static ImageBrowserConfig.TransformType transformType = ImageBrowserConfig.TransformType.Transform_Default; public static ImageBrowserConfig.IndicatorType indicatorType = ImageBrowserConfig.IndicatorType.Indicator_Number; public static ImageBrowserConfig.ScreenOrientationType screenOrientationType = ImageBrowserConfig.ScreenOrientationType.Screenorientation_Default; public static void seeBigPhoto(Context context, int position, ArrayList<String> sourceImageList, View view) { MNImageBrowser.with(context) //必须-当前位置 .setCurrentPosition(position) //必须-图片加载用户自己去选择 .setImageEngine(new SeePhotoLoader()) //必须(setImageList和setImageUrl二选一,会覆盖)-图片集合 .setImageList(sourceImageList) //必须(setImageList和setImageUrl二选一,会覆盖)-设置单张图片 .setTransformType(transformType) //非必须-指示器样式(默认文本样式:两种模式) .setIndicatorType(indicatorType) //设置隐藏指示器 .setIndicatorHide(false) //设置自定义遮盖层,定制自己想要的效果,当设置遮盖层后,原本的指示器会被隐藏 //非必须-屏幕方向:横屏,竖屏,Both(默认:横竖屏都支持) .setScreenOrientationType(screenOrientationType) //非必须-图片单击监听 //全屏模式:默认非全屏模式 .setFullScreenMode(false) //打开动画 .setActivityOpenAnime(R.anim.activity_anmie_in) //关闭动画 .setActivityExitAnime(R.anim.activity_anmie_out) //打开 .show(view); } public static void seeSinglePhoto(Context context, String url, View view) { MNImageBrowser.with(context) //必须-当前位置 .setCurrentPosition(0) //必须-图片加载用户自己去选择 .setImageEngine(new SeePhotoLoader()) //必须(setImageList和setImageUrl二选一,会覆盖)-图片集合 .setImageUrl(url) //必须(setImageList和setImageUrl二选一,会覆盖)-设置单张图片 .setTransformType(transformType) //非必须-指示器样式(默认文本样式:两种模式) .setIndicatorType(indicatorType) //设置隐藏指示器 .setIndicatorHide(false) //设置自定义遮盖层,定制自己想要的效果,当设置遮盖层后,原本的指示器会被隐藏 //非必须-屏幕方向:横屏,竖屏,Both(默认:横竖屏都支持) .setScreenOrientationType(screenOrientationType) //非必须-图片单击监听 //全屏模式:默认非全屏模式 .setFullScreenMode(false) //打开动画 .setActivityOpenAnime(R.anim.activity_anmie_in) //关闭动画 .setActivityExitAnime(R.anim.activity_anmie_out) //打开 .show(view); } }
[ "2295038285@qq.com" ]
2295038285@qq.com
3cf3772018c8b319fdddf2cd73fc71a968b68e95
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/mm/protocal/c/bm.java
b49c0663d73e70c95897b028728a5ac4b2116aec
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
1,689
java
package com.tencent.mm.protocal.c; public final class bm extends com.tencent.mm.bk.a { public int rbP; public String username; protected final int a(int paramInt, Object... paramVarArgs) { if (paramInt == 0) { paramVarArgs = (f.a.a.c.a)paramVarArgs[0]; if (this.username != null) { paramVarArgs.g(1, this.username); } paramVarArgs.fT(2, this.rbP); return 0; } if (paramInt == 1) { if (this.username == null) { break label212; } } label212: for (paramInt = f.a.a.b.b.a.h(1, this.username) + 0;; paramInt = 0) { return paramInt + f.a.a.a.fQ(2, this.rbP); if (paramInt == 2) { paramVarArgs = new f.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler); for (paramInt = com.tencent.mm.bk.a.a(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bk.a.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.cJS(); } } break; } if (paramInt == 3) { f.a.a.a.a locala = (f.a.a.a.a)paramVarArgs[0]; bm localbm = (bm)paramVarArgs[1]; switch (((Integer)paramVarArgs[2]).intValue()) { default: return -1; case 1: localbm.username = locala.vHC.readString(); return 0; } localbm.rbP = locala.vHC.rY(); return 0; } return -1; } } } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes4-dex2jar.jar!/com/tencent/mm/protocal/c/bm.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "526687570@qq.com" ]
526687570@qq.com
1e3eaec877b5a397fc09f97214d974ee6eaa8c28
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas_ReducedClassCount/applicationModule/src/test/java/applicationModulepackageJava0/Foo448Test.java
b27d01565a4becd128eff22ab964b783acff78a8
[]
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
741
java
package applicationModulepackageJava0; import org.junit.Test; public class Foo448Test { @Test public void testFoo0() { new Foo448().foo0(); } @Test public void testFoo1() { new Foo448().foo1(); } @Test public void testFoo2() { new Foo448().foo2(); } @Test public void testFoo3() { new Foo448().foo3(); } @Test public void testFoo4() { new Foo448().foo4(); } @Test public void testFoo5() { new Foo448().foo5(); } @Test public void testFoo6() { new Foo448().foo6(); } @Test public void testFoo7() { new Foo448().foo7(); } @Test public void testFoo8() { new Foo448().foo8(); } @Test public void testFoo9() { new Foo448().foo9(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
ef8b43665474060cefcd57e072dcb337619789f3
7c130d68a4deaaab53af90c978869bf934db8956
/AIM-4.0-Data-Model/src/edu/emory/cci/aim/model/LISTEDDocInline.java
7b2289d19d512665188d13074ab9ac7d1824a9dd
[]
no_license
nadirsaghar/AIM-4.0-Data-Model-Java-bindings
a70eeb0d6388d227649efe3af5d2260d3180085f
79428f32748c319f638498a5f5baebf4c2d36bef
refs/heads/master
2016-08-06T14:52:31.093028
2013-05-25T02:50:43
2013-05-25T02:50:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,187
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2013.05.24 at 10:41:57 PM EDT // package edu.emory.cci.aim.model; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for LIST_ED.Doc.Inline complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="LIST_ED.Doc.Inline"> * &lt;complexContent> * &lt;extension base="{uri:iso.org:21090}ANY"> * &lt;sequence> * &lt;element name="item" type="{uri:iso.org:21090}ED.Doc.Inline" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LIST_ED.Doc.Inline", propOrder = { "item" }) @XmlSeeAlso({ HISTEDDocInline.class }) public class LISTEDDocInline extends ANY { protected List<EDDocInline> item; /** * Gets the value of the item property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the item property. * * <p> * For example, to add a new item, do as follows: * <pre> * getItem().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link EDDocInline } * * */ public List<EDDocInline> getItem() { if (item == null) { item = new ArrayList<EDDocInline>(); } return this.item; } }
[ "nadirsaghar@yahoo.com" ]
nadirsaghar@yahoo.com
1296cef1f9403bfc4a6396f948337b90fae770d5
53f5a941261609775dc3eedf0cb487956b734ab0
/com.samsung.accessory.atticmgr/sources/androidx/work/InputMergerFactory.java
7e020f4e3afc3561105166c51db536cea3ea2588
[]
no_license
ThePBone/BudsProAnalysis
4a3ede6ba6611cc65598d346b5a81ea9c33265c0
5b04abcae98d1ec8d35335d587b628890383bb44
refs/heads/master
2023-02-18T14:24:57.731752
2021-01-17T12:44:58
2021-01-17T12:44:58
322,783,234
16
1
null
null
null
null
UTF-8
Java
false
false
767
java
package androidx.work; public abstract class InputMergerFactory { public abstract InputMerger createInputMerger(String str); public final InputMerger createInputMergerWithDefaultFallback(String str) { InputMerger createInputMerger = createInputMerger(str); return createInputMerger == null ? InputMerger.fromClassName(str) : createInputMerger; } public static InputMergerFactory getDefaultInputMergerFactory() { return new InputMergerFactory() { /* class androidx.work.InputMergerFactory.AnonymousClass1 */ @Override // androidx.work.InputMergerFactory public InputMerger createInputMerger(String str) { return null; } }; } }
[ "thebone.main@gmail.com" ]
thebone.main@gmail.com
f332d771b631898eaa1858d2c5f0944f1c3b4fe6
c6c32e93247cc427de3154d028edeb4b7d583ec6
/src/main/java/org/squiddev/iwasbored/api/neural/INeuralUpgrade.java
83e1e42c46e4d5946f4a398a485009161f709488
[ "MIT" ]
permissive
SquidDev-CC/IWasBored
0103a3c298689a5b10ccf8b32ad71ec673cca01a
1f78cfe6b914dab7a6311fb62fe07a07a940351c
refs/heads/master
2021-01-10T15:45:35.797402
2015-12-28T16:14:29
2015-12-28T16:14:29
46,746,419
0
0
null
null
null
null
UTF-8
Java
false
false
1,182
java
package org.squiddev.iwasbored.api.neural; import dan200.computercraft.api.lua.ILuaObject; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; public interface INeuralUpgrade { /** * Get the Lua Object used to interface with this upgrade * This is cached by the neural interface so you don't have to. */ ILuaObject getLuaObject(); /** * Called when the computer is turned on. * This is called on the computer thread. */ void attach(INeuralInterface neuralInterface); /** * Called when the computer is turned off. * This is called on the computer thread. */ void detach(); /** * Called every update tick. * This is called on the server thread. */ void update(); /** * Get the unique name for this type of upgrade: * A neural interface cannot have more than one type. */ String getName(); /** * Write this upgrade to an NBT compound. * Ideally upgrades shouldn't need to store state-specific information, * but just in case. * * @return The written tag */ NBTTagCompound toNBT(); /** * Convert this upgrade to an item stack * * @return The produced ItemStack */ ItemStack toStack(); }
[ "bonzoweb@hotmail.co.uk" ]
bonzoweb@hotmail.co.uk
903d024edeca75434edf888ff497497534b6e0f7
05547b3c0c4bb3d350dcf32b8b707baefb84251e
/tongmeng-edu-service/tongmeng-edu-service-edu/src/main/java/com/tingyu/tongmeng/edu/service/edu/entity/Course.java
d18dd1b58f0c4ca925b533a3e7a7bda990f1c03b
[]
no_license
Essionshy/tongmeng-edu
b2fda317368b325fd6e6a494eb9cf26e7d527e20
bf4b35d514d72de5adcf80fb952795c7ad68bbf9
refs/heads/master
2023-01-13T07:31:20.840661
2020-11-10T08:13:38
2020-11-10T08:13:38
310,498,709
0
0
null
null
null
null
UTF-8
Java
false
false
2,145
java
package com.tingyu.tongmeng.edu.service.edu.entity; import com.baomidou.mybatisplus.annotation.*; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; /** * <p> * 课程 * </p> * * @author 1218817610@qq.com * @since 2020-10-27 */ @Data @EqualsAndHashCode(callSuper = false) @TableName("edu_course") @ApiModel(value="Course对象", description="课程") public class Course implements Serializable { private static final long serialVersionUID = 1L; @ApiModelProperty(value = "课程ID") @TableId(value = "id", type = IdType.ID_WORKER_STR) private String id; @ApiModelProperty(value = "课程讲师ID") private String teacherId; @ApiModelProperty(value = "课程专业ID") private String subjectId; @ApiModelProperty(value = "课程专业父级ID") private String subjectParentId; @ApiModelProperty(value = "课程标题") private String title; @ApiModelProperty(value = "课程销售价格,设置为0则可免费观看") private BigDecimal price; @ApiModelProperty(value = "总课时") private Integer lessonNum; @ApiModelProperty(value = "课程封面图片路径") private String cover; @ApiModelProperty(value = "销售数量") private Long buyCount; @ApiModelProperty(value = "浏览数量") private Long viewCount; @ApiModelProperty(value = "乐观锁") private Long version; @ApiModelProperty(value = "课程状态 Draft未发布 Normal已发布") private String status; @ApiModelProperty(value = "逻辑删除 1(true)已删除, 0(false)未删除") private Integer isDeleted; @ApiModelProperty(value = "创建时间") @TableField(fill = FieldFill.INSERT) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date gmtCreate; @ApiModelProperty(value = "更新时间") @TableField(fill = FieldFill.INSERT_UPDATE) private Date gmtModified; }
[ "1218817610@qq.com" ]
1218817610@qq.com
7fb50c55dfd3598b3ba081e61efa832e07c78003
dba87418d2286ce141d81deb947305a0eaf9824f
/sources/com/iaai/android/bdt/feature/landing/quickFilter/SearchByVehicleFragment_MembersInjector.java
19b02c391a07ac87eb86a0442d869bfdc6f132ff
[]
no_license
Sluckson/copyOavct
1f73f47ce94bb08df44f2ba9f698f2e8589b5cf6
d20597e14411e8607d1d6e93b632d0cd2e8af8cb
refs/heads/main
2023-03-09T12:14:38.824373
2021-02-26T01:38:16
2021-02-26T01:38:16
341,292,450
0
1
null
null
null
null
UTF-8
Java
false
false
1,634
java
package com.iaai.android.bdt.feature.landing.quickFilter; import androidx.lifecycle.ViewModelProvider; import com.iaai.android.bdt.feature.login.SessionManager; import dagger.MembersInjector; import javax.inject.Provider; public final class SearchByVehicleFragment_MembersInjector implements MembersInjector<SearchByVehicleFragment> { private final Provider<SessionManager> sessionManagerProvider; private final Provider<ViewModelProvider.Factory> viewModelFactoryProvider; public SearchByVehicleFragment_MembersInjector(Provider<ViewModelProvider.Factory> provider, Provider<SessionManager> provider2) { this.viewModelFactoryProvider = provider; this.sessionManagerProvider = provider2; } public static MembersInjector<SearchByVehicleFragment> create(Provider<ViewModelProvider.Factory> provider, Provider<SessionManager> provider2) { return new SearchByVehicleFragment_MembersInjector(provider, provider2); } public void injectMembers(SearchByVehicleFragment searchByVehicleFragment) { injectViewModelFactory(searchByVehicleFragment, this.viewModelFactoryProvider.get()); injectSessionManager(searchByVehicleFragment, this.sessionManagerProvider.get()); } public static void injectViewModelFactory(SearchByVehicleFragment searchByVehicleFragment, ViewModelProvider.Factory factory) { searchByVehicleFragment.viewModelFactory = factory; } public static void injectSessionManager(SearchByVehicleFragment searchByVehicleFragment, SessionManager sessionManager) { searchByVehicleFragment.sessionManager = sessionManager; } }
[ "lucksonsurprice94@gmail.com" ]
lucksonsurprice94@gmail.com
b816eb3e950270256c1fa8e3754c8b82ca9196e4
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
/src/br/com/mind5/business/employeeLunchTime/model/decisionTree/EmplutmRootSelect.java
30eceff5823fc6d471da1ae1e5dc5a1588d82877
[]
no_license
grazianiborcai/Agenda_WS
4b2656716cc49a413636933665d6ad8b821394ef
e8815a951f76d498eb3379394a54d2aa1655f779
refs/heads/master
2023-05-24T19:39:22.215816
2023-05-15T15:15:15
2023-05-15T15:15:15
109,902,084
0
0
null
2022-06-29T19:44:56
2017-11-07T23:14:21
Java
UTF-8
Java
false
false
3,159
java
package br.com.mind5.business.employeeLunchTime.model.decisionTree; import java.util.ArrayList; import java.util.List; import br.com.mind5.business.employeeLunchTime.info.EmplutmInfo; import br.com.mind5.business.employeeLunchTime.model.action.EmplutmVisiMergeStolis; import br.com.mind5.business.employeeLunchTime.model.action.EmplutmVisiMergeToSelect; import br.com.mind5.business.employeeLunchTime.model.action.EmplutmVisiMergeWeekday; import br.com.mind5.business.employeeLunchTime.model.checker.EmplutmCheckLangu; import br.com.mind5.business.employeeLunchTime.model.checker.EmplutmCheckOwner; import br.com.mind5.business.employeeLunchTime.model.checker.EmplutmCheckRead; import br.com.mind5.model.action.ActionLazy; import br.com.mind5.model.action.ActionStd; import br.com.mind5.model.action.commom.ActionLazyCommom; import br.com.mind5.model.action.commom.ActionStdCommom; import br.com.mind5.model.checker.ModelChecker; import br.com.mind5.model.checker.ModelCheckerHelperQueue; import br.com.mind5.model.checker.ModelCheckerOption; import br.com.mind5.model.decisionTree.DeciTreeOption; import br.com.mind5.model.decisionTree.DeciTreeTemplateRead; public final class EmplutmRootSelect extends DeciTreeTemplateRead<EmplutmInfo> { public EmplutmRootSelect(DeciTreeOption<EmplutmInfo> option) { super(option); } @Override protected ModelChecker<EmplutmInfo> buildCheckerHook(DeciTreeOption<EmplutmInfo> option) { List<ModelChecker<EmplutmInfo>> queue = new ArrayList<>(); ModelChecker<EmplutmInfo> checker; ModelCheckerOption checkerOption; checkerOption = new ModelCheckerOption(); checkerOption.conn = option.conn; checkerOption.schemaName = option.schemaName; checkerOption.expectedResult = ModelCheckerOption.SUCCESS; checker = new EmplutmCheckRead(checkerOption); queue.add(checker); checkerOption = new ModelCheckerOption(); checkerOption.conn = option.conn; checkerOption.schemaName = option.schemaName; checkerOption.expectedResult = ModelCheckerOption.EXIST_ON_DB; checker = new EmplutmCheckLangu(checkerOption); queue.add(checker); checkerOption = new ModelCheckerOption(); checkerOption.conn = option.conn; checkerOption.schemaName = option.schemaName; checkerOption.expectedResult = ModelCheckerOption.EXIST_ON_DB; checker = new EmplutmCheckOwner(checkerOption); queue.add(checker); return new ModelCheckerHelperQueue<>(queue); } @Override protected List<ActionStd<EmplutmInfo>> buildActionsOnPassedHook(DeciTreeOption<EmplutmInfo> option) { List<ActionStd<EmplutmInfo>> actions = new ArrayList<>(); ActionStd<EmplutmInfo> select = new ActionStdCommom<EmplutmInfo>(option, EmplutmVisiMergeToSelect.class); ActionLazy<EmplutmInfo> mergeWeekday = new ActionLazyCommom<EmplutmInfo>(option, EmplutmVisiMergeWeekday.class); ActionLazy<EmplutmInfo> mergeStolis = new ActionLazyCommom<EmplutmInfo>(option, EmplutmVisiMergeStolis.class); select.addPostAction(mergeWeekday); mergeWeekday.addPostAction(mergeStolis); actions.add(select); return actions; } }
[ "mmaciel@mind5.com" ]
mmaciel@mind5.com
45efc03377c1f10a49133c9d235bf449653cebc8
718f93887a4ed06d58c8a4248d33dfb0d51d9923
/java_01_ex/src/day03_ex/BookApp.java
137357845606f13e6378a3743fb09fad6e81b301
[]
no_license
daniel0458/bit_java
792246912b5dfdf6e8f7c7bb51d35034ed5ebbc4
841c8fc7b898f70ad06fec3a39df00c03d7831b2
refs/heads/master
2020-07-09T12:28:26.620244
2019-08-27T03:11:15
2019-08-27T03:11:15
201,861,784
0
0
null
null
null
null
UTF-8
Java
false
false
1,278
java
package day03_ex; import java.util.Scanner; /** * * @author user * */ public class BookApp { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int button; String work = null; String yn; while(true) { System.out.println("******* 명령 선택 *******"); System.out.println("1. insert(등록)\n"); System.out.println("2. delete(삭제)\n"); System.out.println("3. update(수정)\n"); System.out.println("4. quit(종료)\n"); System.out.println("*************************\n"); System.out.println("수행할 명령을 선택하세요!"); System.out.print("1 2 3 4 중 하나를 선택하세요.. _"); button = sc.nextInt(); sc.nextLine(); switch (button) { case 1: work = "등록"; break; case 2: work = "삭제"; break; case 3: work = "수정"; break; case 4: System.out.print("정말 종료하시겠습니까? Y/N"); yn = sc.nextLine().trim(); if(yn.equals("Y") || yn.equals("y")) { sc.close(); sc = null; System.exit(0); }else { break; } default: continue; } System.out.printf("%s 작업을 수행합니다.%n", work); } } }
[ "user@DESKTOP-V882PTR" ]
user@DESKTOP-V882PTR
663e7576454ac9909c3d5e7c5d0000e569d05412
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XRENDERING-418-38-24-Single_Objective_GGA-WeightedSum/org/xwiki/wysiwyg/server/filter/ConversionFilter_ESTest.java
fd74fc97e6fa8c266f569155ee33e48ab6e74895
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
570
java
/* * This file was automatically generated by EvoSuite * Tue Mar 31 06:37:14 UTC 2020 */ package org.xwiki.wysiwyg.server.filter; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class ConversionFilter_ESTest extends ConversionFilter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
322d6248eb66be06666854d619c42ca4965c592b
d5e5129850e4332a8d4ccdcecef81c84220538d9
/Games/Super-Duper-Mario/Source/net/philsprojects/mario/objects/RedMushroom.java
62422365f07009da137794d259398820c5d8e4a5
[]
no_license
ClickerMonkey/ship
e52da76735d6bf388668517c033e58846c6fe017
044430be32d4ec385e01deb17de919eda0389d5e
refs/heads/master
2020-03-18T00:43:52.330132
2018-05-22T13:45:14
2018-05-22T13:45:14
134,109,816
0
0
null
null
null
null
UTF-8
Java
false
false
1,701
java
package net.philsprojects.mario.objects; import static net.philsprojects.game.Constants.*; import static net.philsprojects.mario.GameConstants.*; import net.philsprojects.game.ITiledEntity; import net.philsprojects.game.TiledElement; import net.philsprojects.game.util.Math; import net.philsprojects.game.util.Vector; import net.philsprojects.mario.Tiles; import net.philsprojects.mario.mario.Mario; /** * The mushroom which enlarges Mario to the next largest state unless hes at the maximum size state. * * @author Philip Diffenderfer */ public class RedMushroom extends Item { private Vector _velocity = Vector.zero(); public RedMushroom(int x, int y, int direction) { super(MUSHROOM_RED, (x * TILE_WIDTH) - (MUSHROOM_RED_WIDTH - TILE_WIDTH) / 2f, y * TILE_HEIGHT, MUSHROOM_RED_WIDTH, MUSHROOM_RED_HEIGHT, Tiles.get(MUSHROOM_RED)); _velocity = new Vector(MUSHROOM_RED_SPEED * direction, 0f); updateBounds(); } public void hitEntity(ITiledEntity entity, int hitType) { if (entity instanceof Mario) { _enabled = false; } } public void hitTile(TiledElement element, int x, int y, int hitType) { if (hitType == HIT_LEFT) { _velocity.x = MUSHROOM_RED_SPEED; } else if (hitType == HIT_RIGHT) { _velocity.x = -MUSHROOM_RED_SPEED; } } public void update(float deltatime) { super.update(deltatime); if (_enabled) { _location.add(_velocity.x * deltatime, _velocity.y * deltatime); _velocity.add(0f, MUSHROOM_RED_GRAVITY * deltatime); _velocity.y = Math.max(_velocity.y, MUSHROOM_RED_TERMINAL); updateBounds(); } } @Override public void initialize() { } }
[ "pdiffenderfer@gmail.com" ]
pdiffenderfer@gmail.com
830f6cb368323ea70366655ed952061258bd69e3
fe91ffa11707887e4cdddde8f386a8c8e724aa58
/chrome/android/java/src/org/chromium/chrome/browser/settings/LearnMorePreference.java
230382f3dfe43306f1b69e742ec3bd46d67c596b
[ "BSD-3-Clause" ]
permissive
akshaymarch7/chromium
78baac2b45526031846ccbaeca96c639d1d60ace
d273c844a313b1e527dec0d59ce70c95fd2bd458
refs/heads/master
2023-02-26T23:48:03.686055
2020-04-15T01:20:07
2020-04-15T01:20:07
255,778,651
2
1
BSD-3-Clause
2020-04-15T02:04:56
2020-04-15T02:04:55
null
UTF-8
Java
false
false
2,341
java
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.settings; import android.app.Activity; import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; import android.widget.TextView; import androidx.preference.Preference; import androidx.preference.PreferenceViewHolder; import org.chromium.base.ApiCompatibilityUtils; import org.chromium.base.ContextUtils; import org.chromium.chrome.R; import org.chromium.chrome.browser.help.HelpAndFeedback; import org.chromium.chrome.browser.profiles.Profile; /** * A preference that opens a HelpAndFeedback activity to learn more about the specified context. */ public class LearnMorePreference extends Preference { /** * Resource id for the help page to link to by context name. Corresponds to go/mobilehelprecs. */ private final int mHelpContext; /** * Link text color. */ private final int mColor; public LearnMorePreference(Context context, AttributeSet attrs) { super(context, attrs); TypedArray styledAttributes = context.obtainStyledAttributes(attrs, R.styleable.LearnMorePreference, 0, 0); mHelpContext = styledAttributes.getResourceId(R.styleable.LearnMorePreference_helpContext, 0); mColor = ApiCompatibilityUtils.getColor( context.getResources(), R.color.default_text_color_link); styledAttributes.recycle(); setTitle(R.string.learn_more); setSelectable(false); setSingleLineTitle(false); } @Override protected void onClick() { Activity activity = ContextUtils.activityFromContext(getContext()); HelpAndFeedback.getInstance().show(activity, activity.getString(mHelpContext), Profile.getLastUsedRegularProfile(), null); } @Override public void onBindViewHolder(PreferenceViewHolder holder) { super.onBindViewHolder(holder); TextView titleView = (TextView) holder.findViewById(android.R.id.title); titleView.setClickable(true); titleView.setTextColor(mColor); titleView.setOnClickListener(v -> LearnMorePreference.this.onClick()); } }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
3216661acd2366f3596b2b9fa7cb90aeee79ef20
85dc346b018af3b0ea4164f7a810ef57d8c59603
/app/src/main/java/com/artgaller/reader/decoding/DecodeThread.java
e930b621d88477b3f574299646871cec5129ad1a
[]
no_license
tankangbing/ArtGallerReader1
e4f6fec39edf5be8976505609cc0aba4231093e2
d7f9ea0f0a8be42dea4dc694701b49f02b7e73a9
refs/heads/master
2021-01-22T13:30:09.658280
2017-08-23T01:24:07
2017-08-23T01:24:07
100,659,299
0
0
null
null
null
null
UTF-8
Java
false
false
2,572
java
/* * Copyright (C) 2008 ZXing 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 com.artgaller.reader.decoding; import java.util.Hashtable; import java.util.Vector; import java.util.concurrent.CountDownLatch; import android.os.Handler; import android.os.Looper; import com.artgaller.reader.activity.MipcaActivityCapture; import com.google.zxing.BarcodeFormat; import com.google.zxing.DecodeHintType; import com.google.zxing.ResultPointCallback; /** * This thread does all the heavy lifting of decoding the images. * 解码线程 */ final class DecodeThread extends Thread { public static final String BARCODE_BITMAP = "barcode_bitmap"; private final MipcaActivityCapture activity; private final Hashtable<DecodeHintType, Object> hints; private Handler handler; private final CountDownLatch handlerInitLatch; DecodeThread(MipcaActivityCapture activity, Vector<BarcodeFormat> decodeFormats, String characterSet, ResultPointCallback resultPointCallback) { this.activity = activity; handlerInitLatch = new CountDownLatch(1); hints = new Hashtable<DecodeHintType, Object>(3); if (decodeFormats == null || decodeFormats.isEmpty()) { decodeFormats = new Vector<BarcodeFormat>(); decodeFormats.addAll(DecodeFormatManager.ONE_D_FORMATS); decodeFormats.addAll(DecodeFormatManager.QR_CODE_FORMATS); decodeFormats.addAll(DecodeFormatManager.DATA_MATRIX_FORMATS); } hints.put(DecodeHintType.POSSIBLE_FORMATS, decodeFormats); if (characterSet != null) { hints.put(DecodeHintType.CHARACTER_SET, characterSet); } hints.put(DecodeHintType.NEED_RESULT_POINT_CALLBACK, resultPointCallback); } Handler getHandler() { try { handlerInitLatch.await(); } catch (InterruptedException ie) { // continue? } return handler; } @Override public void run() { Looper.prepare(); handler = new DecodeHandler(activity, hints); handlerInitLatch.countDown(); Looper.loop(); } }
[ "1152708287@qq.com" ]
1152708287@qq.com
1caefc9d9d3714e372514f46135f8427b01579b9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/20/20_f7208b81ebf5c3deb87822996b926de3ab502c24/TextTemplate/20_f7208b81ebf5c3deb87822996b926de3ab502c24_TextTemplate_t.java
76b12dab1b1d689794e03866130c95a1ba05b4b5
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,174
java
/******************************************************************************* * Copyright (c) 2004 Actuate Corporation. 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: Actuate Corporation - * initial API and implementation ******************************************************************************/ package org.eclipse.birt.core.template; import java.util.ArrayList; import java.util.HashMap; public class TextTemplate { ArrayList nodes = new ArrayList( ); public ArrayList getNodes( ) { return nodes; } public static interface Visitor { Object visitText( TextNode node, Object value ); Object visitValue( ValueNode node, Object value ); Object visitImage( ImageNode image, Object value ); } abstract public static class Node { public abstract void accept( Visitor visitor, Object value ); } public static class TextNode extends Node { String content; public String getContent( ) { return content; } public void accept( Visitor visitor, Object value ) { visitor.visitText( this, value ); } } public static class ImageNode extends Node { public static final String IMAGE_TYPE_EXPR = "expr"; public static final String IMAGE_TYPE_EMBEDDED = "embedded"; private HashMap attributes = new HashMap( ); private String imageType = IMAGE_TYPE_EMBEDDED; private String imageName; private String expression; public HashMap getAttributes( ) { return attributes; } public void setAttribute( String name, String value ) { if ( "type".equalsIgnoreCase( name ) ) { if ( IMAGE_TYPE_EXPR.equalsIgnoreCase( value ) ) { imageType = IMAGE_TYPE_EXPR; } else { imageType = IMAGE_TYPE_EMBEDDED; } } else if ( "name".equalsIgnoreCase( name ) ) { imageType = IMAGE_TYPE_EMBEDDED; imageName = value; } else { attributes.put( name, value ); } } public String getExpr( ) { if ( IMAGE_TYPE_EXPR == getType( ) ) { return expression; } return null; } public void setExpr( String expr ) { imageType = IMAGE_TYPE_EXPR; expression = expr; } public String getType( ) { return imageType; } public String getImageName( ) { if ( IMAGE_TYPE_EMBEDDED == imageType ) { return imageName; } return null; } public void accept( Visitor visitor, Object value ) { visitor.visitImage( this, value ); } } public static class ValueNode extends Node { String format; String value; String formatExpression; public String getFormat( ) { return format; } public String getFormatExpression( ) { return formatExpression; } public String getValue( ) { return value; } public void accept( Visitor visitor, Object value ) { visitor.visitValue( this, value ); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b02336d8a01dc37f46217921eb8663a933a19103
407b589d0bc19ca5add3fdd857a2c40c7564f96a
/src/main/java/eu/javaspecialists/tjsn/concurrency/interlocker/InterlockTask.java
6e7bbca0bb8e5af792ba3333348e963c179dcb64
[ "Apache-2.0" ]
permissive
kabutz/javaspecialists
eac86d44abffdc89af64a299cee5920c49c63609
49b89de442ea3fc87732a6f0a8d474a54ce2f995
refs/heads/master
2022-02-01T18:41:39.927557
2022-01-26T06:30:04
2022-01-26T06:30:04
4,346,051
88
38
Apache-2.0
2022-01-26T06:30:52
2012-05-16T10:57:55
Java
UTF-8
Java
false
false
1,304
java
/* * Copyright (C) 2000-2013 Heinz Max Kabutz * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. Heinz Max Kabutz 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 eu.javaspecialists.tjsn.concurrency.interlocker; /** * Is called by two threads alternatively until isDone() returns true. * <p/> * Described in http://www.javaspecialists.eu/archive/Issue188.html * * @author Dr Heinz M. Kabutz */ public interface InterlockTask<T> { boolean isDone(); /** * The call() method is called interleaved by the the threads in a * round-robin fashion. */ void call(); /** * Returns the result after all the call()'s have completed. */ T get(); void reset(); }
[ "heinz@javaspecialists.eu" ]
heinz@javaspecialists.eu
c141afd66b2dd21cc0866b675739d4ec3fde00e7
038d0148bbc587f1b6e5bffa37787de09205c9c5
/tags/pre-busted/source/core/java/org/shiftone/jrat/core/output/FileOutputFactory.java
d0dd1b1e0b057f4a768d88c97b1e2a992911bff6
[]
no_license
JavaQualitasCorpus/jrat-1-beta1
071ef820f8127f9e7569c6d3e6179ca889011287
16b019a22f1ec495771d2bf3b42f9a9ce8d51038
refs/heads/master
2023-08-12T08:42:31.600476
2019-03-13T13:12:04
2019-03-13T13:12:04
167,004,931
0
1
null
null
null
null
UTF-8
Java
false
false
3,456
java
package org.shiftone.jrat.core.output; import org.shiftone.jrat.core.Environment; import org.shiftone.jrat.util.io.nop.NullOutputStream; import org.shiftone.jrat.util.io.nop.NullPrintWriter; import org.shiftone.jrat.util.io.nop.NullWriter; import org.shiftone.jrat.util.log.Logger; import java.io.*; /** * @author jeff@shiftone.org (Jeff Drost) */ public class FileOutputFactory { private static final Logger LOG = Logger.getLogger(FileOutputFactory.class); private final FileOutputRegistry fileOutputRegistry; private final int bufferSize; public FileOutputFactory(FileOutputRegistry fileOutputRegistry, int bufferSize) { this.fileOutputRegistry = fileOutputRegistry; this.bufferSize = bufferSize; } public FileOutputFactory(FileOutputRegistry fileOutputRegistry) { this(fileOutputRegistry, Environment.getSettings().getOutputBufferSize()); } public OutputStream createOutputStreamSafely(File file) { try { return createOutputStream(file); } catch (Throwable e) { LOG.error("unable to column OutputStream for '" + file + "' return /dev/null"); return NullOutputStream.INSTANCE; } } public Writer createWriterSafely(File file) { try { return createWriter(file); } catch (Throwable e) { LOG.error("unable to column Writer for '" + file + "' return /dev/null"); return NullWriter.INSTANCE; } } public PrintWriter createPrintWriterSafely(File file) { try { return createPrintWriter(file); } catch (Throwable e) { LOG.error("unable to column PrintWriter for '" + file + "' return /dev/null"); return NullPrintWriter.INSTANCE; } } public OutputStream createOutputStream(File file) throws IOException { LOG.info("createOutputStream " + file.getAbsolutePath()); OutputStream out = internalCreateOutputStream(file); return fileOutputRegistry.add(out, file.getName()); } public Writer createWriter(File file) throws IOException { LOG.info("createWriter " + file.getAbsolutePath()); Writer out = new OutputStreamWriter(internalCreateOutputStream(file)); return fileOutputRegistry.add(out, file.getName()); } public PrintWriter createPrintWriter(File file) throws IOException { LOG.info("createPrintWriter " + file.getAbsolutePath()); PrintWriter out = new PrintWriter(new OutputStreamWriter(internalCreateOutputStream(file))); return fileOutputRegistry.add(out, file.getName()); } private OutputStream internalCreateOutputStream(File file) throws IOException { LOG.info("createOutputStream " + file.getAbsolutePath()); File parent = file.getParentFile(); if (!parent.exists()) { LOG.info("creating parent directory : " + parent.getAbsolutePath()); parent.mkdirs(); } OutputStream out = new FileOutputStream(file); if (bufferSize > 0) { out = new BufferedOutputStream(out, bufferSize); } return out; } public String toString() { return "FileOutputFactory[" + fileOutputRegistry + "]"; } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
f5a56326cc0c5b1ef6b6f6996b0723c25fdf85cb
97d95ad49efb83a2e5be5df98534dc777a955154
/applications/plugins/org.csstudio.diag.diles/src/org/csstudio/diag/diles/actions/DilesContextMenuProvider.java
0061ca6b41e103f738f0cb0591c979766373e448
[]
no_license
bekumar123/cs-studio
61aa64d30bce53b22627a3d98237d40531cf7789
bc24a7e2d248522af6b2983588be3b72d250505f
refs/heads/master
2021-01-21T16:39:14.712040
2014-01-27T15:30:23
2014-01-27T15:30:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,776
java
package org.csstudio.diag.diles.actions; import org.eclipse.gef.ContextMenuProvider; import org.eclipse.gef.EditPartViewer; import org.eclipse.gef.ui.actions.ActionRegistry; import org.eclipse.gef.ui.actions.GEFActionConstants; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; import org.eclipse.ui.actions.ActionFactory; public class DilesContextMenuProvider extends ContextMenuProvider { private ActionRegistry actionRegistry; public DilesContextMenuProvider(EditPartViewer viewer, ActionRegistry registry) { super(viewer); setActionRegistry(registry); } /* (non-Javadoc) * @see org.eclipse.gef.ContextMenuProvider#buildContextMenu(org.eclipse.jface.action.IMenuManager) */ @Override public void buildContextMenu(IMenuManager menu) { GEFActionConstants.addStandardActionGroups(menu); IAction action; action = getActionRegistry().getAction(ActionFactory.UNDO.getId()); menu.appendToGroup(GEFActionConstants.GROUP_UNDO, action); action = getActionRegistry().getAction(ActionFactory.REDO.getId()); menu.appendToGroup(GEFActionConstants.GROUP_UNDO, action); action = getActionRegistry().getAction(ChangeTrueFalseAction.ID); if (action.isEnabled()) menu.appendToGroup(GEFActionConstants.GROUP_EDIT, action); action = getActionRegistry().getAction(ActionFactory.DELETE.getId()); if (action.isEnabled()) menu.appendToGroup(GEFActionConstants.GROUP_EDIT, action); action = getActionRegistry().getAction(ActionFactory.SAVE.getId()); if (action.isEnabled()) menu.appendToGroup(GEFActionConstants.GROUP_SAVE, action); } private ActionRegistry getActionRegistry() { return actionRegistry; } public void setActionRegistry(ActionRegistry registry) { actionRegistry = registry; } }
[ "jan.hatje@desy.de" ]
jan.hatje@desy.de
b423444fafdaffa1456c54256e820176418ee03d
6ecd41c5499cd7a1d0f70b4c3f4acf045aa52fa5
/disruptor/src/main/java/LongEventMain.java
82a9c4036e791e4ffe020d0d9b8259c203780ece
[]
no_license
shixw/note
e6d9170cb644c743020db1907b907457a0c7a1ec
6da3a3487d47fbc6545d1981553fb6dafc8c85ef
refs/heads/master
2021-06-07T19:10:47.305947
2019-12-22T13:36:45
2019-12-22T13:36:45
155,144,938
0
0
null
2021-04-26T18:43:29
2018-10-29T03:13:30
Java
UTF-8
Java
false
false
1,022
java
import com.lmax.disruptor.RingBuffer; import com.lmax.disruptor.dsl.Disruptor; import com.lmax.disruptor.util.DaemonThreadFactory; import java.nio.ByteBuffer; public class LongEventMain { public static void main(String[] args) throws InterruptedException { LongEventFactory longEventFactory = new LongEventFactory(); int bufferSize = 1024; Disruptor<LongEvent> disruptor = new Disruptor<LongEvent>(longEventFactory,bufferSize, DaemonThreadFactory.INSTANCE); disruptor.handleEventsWith(new LongEventHandler()); disruptor.start(); RingBuffer<LongEvent> ringBuffer = disruptor.getRingBuffer(); LongEventProducerWithTranslator longEventProducerWithTranslator = new LongEventProducerWithTranslator(ringBuffer); ByteBuffer byteBuffer = ByteBuffer.allocate(8); for (long l = 0; true; l++) { byteBuffer.putLong(0,l); longEventProducerWithTranslator.onData(byteBuffer); Thread.sleep(1000); } } }
[ "shixw_usr@126.com" ]
shixw_usr@126.com
870141b438bf6961a56d399c372a908d66ebc40f
0bcde78717c59eeecfba976ac6eabb58d223b86f
/src/main/java/com/gdtopway/core/web/filter/WebAppContextInitFilter.java
1345b2ad00802136c2c6bc8896ab56859104d9d7
[ "Apache-2.0" ]
permissive
isis-github/gdtopway-core
194c2d5e25eac3fd0545bd99f3953f3fba346f17
5dfadff1fcb4283de92ff84124134a5a321d744a
refs/heads/master
2021-05-05T06:01:57.081923
2018-03-04T16:30:20
2018-03-04T16:30:20
118,736,330
0
0
null
null
null
null
UTF-8
Java
false
false
3,404
java
/** * Copyright (c) 2012 */ package com.gdtopway.core.web.filter; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.util.Assert; import com.gdtopway.core.context.SpringContextHolder; import com.gdtopway.support.service.DynamicConfigService; /** * 通过过滤器基于request对象初始化并缓存记录当前应用上下文路径 */ public class WebAppContextInitFilter implements Filter { private final Logger logger = LoggerFactory.getLogger(WebAppContextInitFilter.class); private static String WEB_CONTEXT_FULL_URL = null; private static String WEB_CONTEXT_REAL_PATH = null; @Override public void init(FilterConfig arg0) throws ServletException { logger.debug("Invoking WebAppContextInitFilter init method..."); } @Override public void destroy() { logger.debug("Invoking WebAppContextInitFilter destroy method..."); } @Override public void doFilter(ServletRequest req, ServletResponse rep, FilterChain chain) throws IOException, ServletException { if (WEB_CONTEXT_FULL_URL == null) { HttpServletRequest request = (HttpServletRequest) req; DynamicConfigService dynamicConfigService = SpringContextHolder.getBean(DynamicConfigService.class); String contextPath = dynamicConfigService.getString("context.full.path"); if (StringUtils.isBlank(contextPath)) { StringBuffer sb = new StringBuffer(); sb.append(request.getScheme()).append("://").append(request.getServerName()); sb.append(request.getServerPort() == 80 ? "" : ":" + request.getServerPort()); sb.append(request.getContextPath()); contextPath = sb.toString(); } //当前应用的完整上下文路径,一般用于邮件、短信等需要组装完整访问路径之用 WEB_CONTEXT_FULL_URL = contextPath; //设置当前WEB_ROOT根目录到配置属性以便在单纯的Service运行环境取到应用根目录获取WEB-INF下相关资源 WEB_CONTEXT_REAL_PATH = request.getServletContext().getRealPath("/"); logger.info("Init setup WebApp Context Info: ", WEB_CONTEXT_FULL_URL); logger.info(" - WEB_CONTEXT_FULL_URL: {}", WEB_CONTEXT_FULL_URL); logger.info(" - WEB_CONTEXT_REAL_PATH: {}", WEB_CONTEXT_REAL_PATH); } chain.doFilter(req, rep); } public static String getInitedWebContextFullUrl() { if (WEB_CONTEXT_FULL_URL == null) { if (DynamicConfigService.isDemoMode()) { return "http://runing.at.demo.mode"; } else { Assert.notNull(WEB_CONTEXT_FULL_URL, "WEB_CONTEXT_FULL_URL must NOT null"); } } return WEB_CONTEXT_FULL_URL; } public static String getInitedWebContextRealPath() { return WEB_CONTEXT_REAL_PATH; } public static void reset() { WEB_CONTEXT_FULL_URL = null; WEB_CONTEXT_REAL_PATH = null; } }
[ "2812849244@qq.com" ]
2812849244@qq.com
c0e83b2019e853fc98c9ddf09ab1b071fc25037c
bfb6643ea4445b54312a9cef70dfa21178fe9844
/hauth/src/main/java/com/asofdate/hauth/controller/UserDomainController.java
4b430fe933145597d7f2978e9fc37338dacb6f30
[ "MIT" ]
permissive
hzwy23/hauth-java
a00df87c0df6c72b69021f85c0545fb4f112406b
d137b731d983eed3d0f551d1e192b798f650e86e
refs/heads/master
2022-07-20T18:43:33.180181
2022-07-14T09:59:50
2022-07-14T09:59:50
95,974,694
75
42
MIT
2022-07-14T09:51:05
2017-07-01T16:13:13
Java
UTF-8
Java
false
false
1,095
java
package com.asofdate.hauth.controller; import com.asofdate.hauth.authentication.JwtService; import com.asofdate.hauth.dto.DomainDTO; import com.asofdate.hauth.service.DomainService; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; /** * Created by hzwy23 on 2017/6/18. */ @RestController @Api("用户可访问域管理") public class UserDomainController { @Autowired private DomainService domainService; @RequestMapping(value = "/v1/auth/domain/self/owner", method = RequestMethod.GET) @ResponseBody public DomainDTO getDomain(HttpServletRequest request) { // 获取连接用户账号 String domainId = JwtService.getConnUser(request).getDomainID(); return domainService.findAll(domainId); } }
[ "hzwy23@163.com" ]
hzwy23@163.com
f60d193f0544952528ec399574322b3d68c91512
d3ea6608d81ddc8e1b51f42b7fbec5e6fa1914b6
/kie-wb-common-stunner/kie-wb-common-stunner-core/kie-wb-common-stunner-commons/kie-wb-common-stunner-client-common/src/main/java/org/kie/workbench/common/stunner/core/client/session/impl/DefaultCanvasSession.java
9db70d2630ebe3733916222beaa998df7498e2c3
[ "Apache-2.0" ]
permissive
Princeon/kie-wb-common
63a781e62cd5257d4fde065d68041de5825b35de
865fc3a0c34577a9bca895dc230bbe28f4eead38
refs/heads/master
2021-01-11T00:04:13.063827
2016-10-12T15:08:54
2016-10-12T15:08:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,023
java
/* * Copyright 2016 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kie.workbench.common.stunner.core.client.session.impl; import org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvas; import org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler; import org.kie.workbench.common.stunner.core.client.session.CanvasSession; public interface DefaultCanvasSession extends CanvasSession<AbstractCanvas, AbstractCanvasHandler> { }
[ "manstis@users.noreply.github.com" ]
manstis@users.noreply.github.com
c404cb041b4e23b656f738abce795ab2f6cadaca
a53c86b7a14ae6cfd93a68073a1dfc81cd81ff5d
/src/main/java/com/taskManager/service/MailSenderService.java
e53eba51f5b404c84bcb3fb6ed4f0bc38efa50f5
[]
no_license
PavloShchur/TaskManager
595d0f654f33f8d184f6013e697cd7201d54b3af
03c423216017b1f523c50fb72252f8424be3bdf6
refs/heads/master
2021-01-25T04:34:54.112828
2017-06-28T13:01:10
2017-06-28T13:01:10
93,447,521
0
0
null
null
null
null
UTF-8
Java
false
false
140
java
package com.taskManager.service; public interface MailSenderService { void sendMail(String thema, String mailBody, String email); }
[ "pavloshchur@gmail.com" ]
pavloshchur@gmail.com
0ff932ecb21518a6008c42a8fdd23bbbb791f79c
c1385a5c450ed55918d4ec0e2899b20dad4f853f
/branches/mvc/src/main/cn/edu/zju/acm/onlinejudge/util/RankListEntry.java
3cb69d6a1a0e0b63fe7a2a767db52c31ef4c50ec
[]
no_license
BGCX261/zoj-svn-to-git
7e1f821e9ddc0a1097afa177e751a928d06d5a83
339c58e255ee5a8dd01b3ddadbd54baff8e999bf
refs/heads/master
2021-03-12T20:38:36.402362
2015-08-25T15:27:24
2015-08-25T15:27:24
41,491,002
0
0
null
null
null
null
UTF-8
Java
false
false
2,952
java
/* * Copyright 2007 Zhang, Zheng <oldbig@gmail.com> * * This file is part of ZOJ. * * ZOJ is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either revision 3 of the License, or (at your option) any later revision. * * ZOJ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with ZOJ. if not, see * <http://www.gnu.org/licenses/>. */ package cn.edu.zju.acm.onlinejudge.util; import cn.edu.zju.acm.onlinejudge.bean.UserProfile; public class RankListEntry implements Comparable<RankListEntry> { private UserProfile user; private final int[] acceptTime; private final int[] submitNumber; private int penalty = 0; private long solved = 0; private long submitted = 0; public RankListEntry(int problemNumber) { this.acceptTime = new int[problemNumber]; this.submitNumber = new int[problemNumber]; for (int i = 0; i < problemNumber; ++i) { this.acceptTime[i] = -1; } } public void setSolved(long solved) { this.solved = solved; } public long getSolved() { return this.solved; } public int getPenalty() { return this.penalty; } public int getAcceptTime(int index) { return this.acceptTime[index]; } public int getSubmitNumber(int index) { return this.submitNumber[index]; } public void update(int index, int time, boolean accepted) { if (this.acceptTime[index] >= 0) { return; } if (accepted) { this.acceptTime[index] = time; this.penalty += time + this.submitNumber[index] * 20; this.solved++; } this.submitNumber[index]++; } public UserProfile getUserProfile() { return this.user; } public void setUserProfile(UserProfile user) { this.user = user; } public double getACRatio() { if (this.submitNumber.length == 0) { return 0; } else { return (double) this.solved / (double) this.submitted; } } public void setSubmitted(long submitted) { this.submitted = submitted; } public long getSubmitted() { return this.submitted; } @Override public int compareTo(RankListEntry obj) { RankListEntry entry = obj; if (entry.solved == this.solved) { return this.penalty - entry.penalty; } else { return (int) (entry.solved - this.solved); } } }
[ "you@example.com" ]
you@example.com
a2e294723434c969283559ca9e3c70e879ed68a9
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/boot/svg/p708a/p709a/C18009ec.java
862cdf66cc033cee8e385ceb373cffb95490bc7f
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,414
java
package com.tencent.p177mm.boot.svg.p708a.p709a; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Paint.Cap; import android.graphics.Paint.Join; import android.graphics.Paint.Style; import android.graphics.Path; import android.os.Looper; import com.tencent.p177mm.svg.C5163c; import com.tencent.p177mm.svg.WeChatSVGRenderC2Java; import com.tencent.smtt.sdk.WebView; /* renamed from: com.tencent.mm.boot.svg.a.a.ec */ public final class C18009ec extends C5163c { private final int height = 58; private final int width = 58; /* renamed from: a */ public final int mo10620a(int i, Object... objArr) { switch (i) { case 0: return 58; case 1: return 58; case 2: Canvas canvas = (Canvas) objArr[0]; Looper looper = (Looper) objArr[1]; Matrix h = C5163c.m7881h(looper); float[] g = C5163c.m7880g(looper); Paint k = C5163c.m7883k(looper); k.setFlags(385); k.setStyle(Style.FILL); Paint k2 = C5163c.m7883k(looper); k2.setFlags(385); k2.setStyle(Style.STROKE); k.setColor(WebView.NIGHT_MODE_COLOR); k2.setStrokeWidth(1.0f); k2.setStrokeCap(Cap.BUTT); k2.setStrokeJoin(Join.MITER); k2.setStrokeMiter(4.0f); k2.setPathEffect(null); C5163c.m7876a(k2, looper).setStrokeWidth(1.0f); canvas.save(); Paint a = C5163c.m7876a(k, looper); a.setColor(-1); g = C5163c.m7878a(g, 1.0f, 0.0f, -249.0f, 0.0f, 1.0f, -79.0f); h.reset(); h.setValues(g); canvas.concat(h); canvas.save(); a = C5163c.m7876a(a, looper); g = C5163c.m7878a(g, 0.70710677f, 0.70710677f, 4.6425705f, -0.70710677f, 0.70710677f, 229.20816f); h.reset(); h.setValues(g); canvas.concat(h); Path l = C5163c.m7884l(looper); l.moveTo(277.0f, 118.906f); l.lineTo(277.0f, 141.0f); l.lineTo(283.0f, 141.0f); l.lineTo(283.0f, 118.61951f); l.cubicTo(292.68488f, 116.751785f, 300.0f, 108.23016f, 300.0f, 98.0f); l.cubicTo(300.0f, 86.40202f, 290.598f, 77.0f, 279.0f, 77.0f); l.cubicTo(267.402f, 77.0f, 258.0f, 86.40202f, 258.0f, 98.0f); l.cubicTo(258.0f, 108.92341f, 266.34015f, 117.89888f, 277.0f, 118.906f); l.close(); l.moveTo(279.0f, 113.0f); l.cubicTo(287.28427f, 113.0f, 294.0f, 106.28427f, 294.0f, 98.0f); l.cubicTo(294.0f, 89.71573f, 287.28427f, 83.0f, 279.0f, 83.0f); l.cubicTo(270.71573f, 83.0f, 264.0f, 89.71573f, 264.0f, 98.0f); l.cubicTo(264.0f, 106.28427f, 270.71573f, 113.0f, 279.0f, 113.0f); l.close(); WeChatSVGRenderC2Java.setFillType(l, 2); canvas.drawPath(l, a); canvas.restore(); canvas.restore(); C5163c.m7882j(looper); break; } return 0; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
e4544c83a2395f79982a45446857ec85c25ae0f6
3982cc0a73455f8ce32dba330581b4a809988a17
/plugins/git4idea/testFramework/git4idea/test/GitTestUtil.java
74eec538d1cd6d5bfdc5471475353abb57385365
[ "Apache-2.0" ]
permissive
lshain-android-source/tools-idea
56d754089ebadd689b7d0e6400ef3be4255f6bc6
b37108d841684bcc2af45a2539b75dd62c4e283c
refs/heads/master
2016-09-05T22:31:43.471772
2014-07-09T07:58:59
2014-07-09T07:58:59
16,572,470
3
2
null
null
null
null
UTF-8
Java
false
false
5,716
java
/* * Copyright 2000-2013 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 git4idea.test; import com.intellij.notification.Notification; import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.vcs.ProjectLevelVcsManager; import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl; import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VirtualFile; import git4idea.GitUtil; import git4idea.GitVcs; import git4idea.Notificator; import git4idea.repo.GitRepository; import junit.framework.Assert; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.ide.BuiltInServerManagerImpl; import java.io.File; import java.util.HashMap; import java.util.Map; import static com.intellij.dvcs.test.Executor.cd; import static com.intellij.dvcs.test.Executor.touch; import static com.intellij.dvcs.test.TestRepositoryUtil.createDir; import static com.intellij.dvcs.test.TestRepositoryUtil.createFile; import static git4idea.test.GitExecutor.git; import static junit.framework.Assert.assertNotNull; import static junit.framework.Assert.assertNull; /** * @author Kirill Likhodedov */ public class GitTestUtil { private static final String USER_NAME = "John Doe"; private static final String USER_EMAIL = "John.Doe@example.com"; /** * <p>Creates file structure for given paths. Path element should be a relative (from project root) * path to a file or a directory. All intermediate paths will be created if needed. * To create a dir without creating a file pass "dir/" as a parameter.</p> * <p>Usage example: * <code>createFileStructure("a.txt", "b.txt", "dir/c.txt", "dir/subdir/d.txt", "anotherdir/");</code></p> * <p>This will create files a.txt and b.txt in the project dir, create directories dir, dir/subdir and anotherdir, * and create file c.txt in dir and d.txt in dir/subdir.</p> * <p>Note: use forward slash to denote directories, even if it is backslash that separates dirs in your system.</p> * <p>All files are populated with "initial content" string.</p> */ public static Map<String, VirtualFile> createFileStructure(Project project, GitTestRepository repo, String... paths) { Map<String, VirtualFile> result = new HashMap<String, VirtualFile>(); for (String path : paths) { String[] pathElements = path.split("/"); boolean lastIsDir = path.endsWith("/"); VirtualFile currentParent = repo.getVFRootDir(); for (int i = 0; i < pathElements.length-1; i++) { currentParent = createDir(project, currentParent, pathElements[i]); } String lastElement = pathElements[pathElements.length-1]; currentParent = lastIsDir ? createDir(project, currentParent, lastElement) : createFile(project, currentParent, lastElement, "content" + Math.random()); result.put(path, currentParent); } return result; } /** * Init, set up username and make initial commit. * * @param repoRoot */ public static void initRepo(@NotNull String repoRoot) { cd(repoRoot); git("init"); setupUsername(); touch("initial.txt"); git("add initial.txt"); git("commit -m initial"); } public static void setupUsername() { git("config user.name " + USER_NAME); git("config user.email " + USER_EMAIL); } /** * Creates a Git repository in the given root directory; * registers it in the Settings; * return the {@link GitRepository} object for this newly created repository. */ @NotNull public static GitRepository createRepository(@NotNull Project project, @NotNull String root) { initRepo(root); ProjectLevelVcsManagerImpl vcsManager = (ProjectLevelVcsManagerImpl)ProjectLevelVcsManager.getInstance(project); vcsManager.setDirectoryMapping(root, GitVcs.NAME); VirtualFile file = LocalFileSystem.getInstance().findFileByIoFile(new File(root)); GitRepository repository = GitUtil.getRepositoryManager(project).getRepositoryForRoot(file); assertNotNull("Couldn't find repository for root " + root, repository); return repository; } public static void assertNotification(@NotNull Project project, @Nullable Notification expected) { if (expected == null) { assertNull("Notification is unexpected here", expected); return; } Notification actualNotification = ((TestNotificator)ServiceManager.getService(project, Notificator.class)).getLastNotification(); Assert.assertNotNull("No notification was shown", actualNotification); Assert.assertEquals("Notification has wrong title", expected.getTitle(), actualNotification.getTitle()); Assert.assertEquals("Notification has wrong type", expected.getType(), actualNotification.getType()); Assert.assertEquals("Notification has wrong content", expected.getContent(), actualNotification.getContent()); } /** * Default port will be occupied by main idea instance => define the custom default to avoid searching of free port */ public static void setDefaultBuiltInServerPort() { System.setProperty(BuiltInServerManagerImpl.PROPERTY_RPC_PORT, "64463"); } }
[ "lshain.gyh@gmail.com" ]
lshain.gyh@gmail.com
d21ae22c9ae3d79f394b60aa29cabe50b7d845bb
8196d4a595970d91d160b965503171aaaa12620f
/cevo-games/src/main/java/put/ci/cevo/games/player/minmax/NodeState.java
4dd12b12c5e8c807081b250bf4044412fb0d9c56
[]
no_license
wjaskowski/mastering-2048
d3c1657143625c8260aba4cd6c108e4125b85ac6
cb9b92b16adb278a9716faffd2f9a6e3db075ec1
refs/heads/master
2020-07-26T22:22:22.747845
2017-03-04T12:03:48
2017-03-04T12:03:48
73,711,911
10
0
null
null
null
null
UTF-8
Java
false
false
733
java
package put.ci.cevo.games.player.minmax; import static com.google.common.collect.Iterables.getOnlyElement; import static java.util.Collections.singletonList; import java.util.List; import put.ci.cevo.games.board.Board; public class NodeState { private final List<Integer> moves; private final double score; public NodeState(double score) { this(Board.EMPTY, score); } public NodeState(int move, double score) { this(singletonList(move), score); } public NodeState(List<Integer> moves, double score) { this.moves = moves; this.score = score; } public int getMove() { return getOnlyElement(moves); } public List<Integer> getMoves() { return moves; } public double getScore() { return score; } }
[ "wojciech.jaskowski@gmail.com" ]
wojciech.jaskowski@gmail.com
41c5e9d8756db99d166eb1fca04f0138073ecafd
eef4e120557321ef6536479bf0c1ae99a69daf6e
/src/main/java/com/example/func/iobjectjava/grid/GridDataTest.java
9d496ba57317f7bf0e133bbc73e0833fb50f9777
[]
no_license
18753377299/MavenSSM
9d5bcb7d233ca9782bb1fb2f33d1f054425a8f97
5e88d40c4da237b4f3aa6de90f05668acbf83e50
refs/heads/master
2022-12-26T12:09:53.302420
2021-06-03T10:59:01
2021-06-03T10:59:01
163,417,840
0
0
null
2022-12-16T09:48:36
2018-12-28T14:15:39
Java
UTF-8
Java
false
false
8,662
java
package com.example.func.iobjectjava.grid; import java.awt.Color; import com.supermap.data.DatasetGrid; import com.supermap.data.Datasource; import com.supermap.data.Maps; import com.supermap.data.Workspace; import com.supermap.data.WorkspaceConnectionInfo; import com.supermap.data.WorkspaceType; import com.supermap.mapping.Layer; import com.supermap.mapping.Map; import com.supermap.mapping.ThemeGridRange; import com.supermap.mapping.ThemeGridRangeItem; import com.supermap.ui.Action; import com.supermap.ui.MapControl; /** * @author 作者 E-mail: * @date 创建时间:2019年8月19日 下午3:32:46 * @version 1.0 * @parameter * @since * @return */ public class GridDataTest { public static void main(String[] args) { // TODO Auto-generated method stub // setThemeRangeByFile(true); long startDate =System.currentTimeMillis(); setThemeRangeByData(true); long endDate =System.currentTimeMillis(); System.out.println("=====所需的时间=========="+(endDate-startDate)); } /** * 设置是否显示栅格分段专题图 */ public static void setThemeRangeByData(boolean value) { MapControl m_mapControl = new MapControl(); Workspace m_workspace = new Workspace(); // 打开工作空间和地图 // WorkspaceConnectionInfo info = new WorkspaceConnectionInfo( // "F:/A_supermap/superMap_file/MapFile/db/dataLayer.smwu"); // WorkspaceConnectionInfo info = new WorkspaceConnectionInfo( // "F:/A_supermap/superMap_file/MapFile/Interpolation/Interpolation.smwu"); // info.setType(WorkspaceType.SMWU); WorkspaceConnectionInfo connectionInfo = new WorkspaceConnectionInfo(); connectionInfo.setType(WorkspaceType.ORACLE); connectionInfo.setServer("10.10.68.248:1521/orcl"); connectionInfo.setDatabase("riskcontrol_freeze"); connectionInfo.setUser("riskcontrol_freeze"); connectionInfo.setPassword("Picc_2019risk"); //工作空间名称 connectionInfo.setName("riskcontrol_freeze"); // connectionInfo.setType(WorkspaceType.ORACLE); // connectionInfo.setServer("10.10.68.248:1521/orcl"); // connectionInfo.setDatabase("RISKCONTROL_BACK"); // connectionInfo.setUser("RISKCONTROL_BACK"); // connectionInfo.setPassword("RISKCONTROL_BACK"); // //工作空间名称 // connectionInfo.setName("RISKCONTROL_BACK"); boolean openResult = m_workspace.open(connectionInfo); if (openResult) { System.out.println("打开工作空间成功!"); } else { System.out.println("打开工作空间失败!"); } // m_workspace.open(info); Datasource m_datasource = m_workspace.getDatasources().get(0); DatasetGrid m_datasetGrid = (DatasetGrid) m_datasource.getDatasets().get("Temp5000"); System.out.println("====栅格数据的总列数======="+m_datasetGrid.getColumnBlockCount()); m_mapControl.getMap().setWorkspace(m_workspace); //调整m_mapControl的状态 m_mapControl.setAction(Action.PAN); m_mapControl.getMap().getLayers().add(m_datasetGrid, true); m_mapControl.setWaitCursorEnabled(false); Layer m_layerThemeGridRange ; try { // if (m_layerThemeGridRange == null) { //构造栅格分段专题图对象 ThemeGridRange themeGridRange = new ThemeGridRange(); //初始化栅格分段专题图子项并设置各自的属性 ThemeGridRangeItem item0 = new ThemeGridRangeItem(); item0.setStart(-9999); item0.setEnd(m_datasetGrid.getMinValue()); item0.setColor(Color.CYAN); item0.setVisible(true); ThemeGridRangeItem item1 = new ThemeGridRangeItem(); item1.setStart(m_datasetGrid.getMinValue()); item1.setEnd(5.3); item1.setColor(Color.GREEN); item1.setVisible(true); ThemeGridRangeItem item2 = new ThemeGridRangeItem(); item2.setStart(5.3); item2.setEnd(15.7); item2.setColor(Color.BLUE); item2.setVisible(true); ThemeGridRangeItem item3 = new ThemeGridRangeItem(); item3.setStart(15.7); item3.setEnd(26.0); item3.setColor(Color.RED); item3.setVisible(true); ThemeGridRangeItem item4 = new ThemeGridRangeItem(); item4.setStart(26.0); item4.setEnd(Double.MAX_VALUE); item4.setColor(Color.GRAY); item4.setVisible(true); //将栅格分段专题图子项依次添加到栅格分段专题图 themeGridRange.addToHead(item0); themeGridRange.addToTail(item1); themeGridRange.addToTail(item2); themeGridRange.addToTail(item3); themeGridRange.addToTail(item4); //添加栅格分段专题图 m_layerThemeGridRange = m_mapControl.getMap().getLayers().add( m_datasetGrid, themeGridRange, true); //设置图层是否可显示,刷新地图 m_layerThemeGridRange.setVisible(value); // m_mapControl.getMap().refresh(); Maps maps =m_workspace.getMaps(); maps.remove("Temp5000"); maps.add("Temp5000",m_mapControl.getMap().toXML()); // 保存工作空间 m_workspace.save(); System.out.println("===setThemeRangeByData=====success=========="); if(m_datasetGrid!=null){ m_datasetGrid.close(); } if(m_datasource!=null){ m_datasource.close(); } if(connectionInfo!=null){ connectionInfo.dispose(); } if(m_mapControl!=null){ // 释放该对象所占用的资源 m_mapControl.dispose(); } if(m_workspace!=null){ // 关闭工作空间 m_workspace.close(); // 释放该对象所占用的资源 m_workspace.dispose(); } // } } catch (RuntimeException e) { System.out.println(e.getMessage()); } } /** * 设置是否显示栅格分段专题图 */ public static void setThemeRangeByFile(boolean value) { MapControl m_mapControl = new MapControl(); Workspace m_workspace = new Workspace(); // 打开工作空间和地图 // WorkspaceConnectionInfo info = new WorkspaceConnectionInfo( // "F:/A_supermap/superMap_file/MapFile/db/dataLayer.smwu"); WorkspaceConnectionInfo info = new WorkspaceConnectionInfo( "F:/A_supermap/superMap_file/MapFile/Interpolation/Interpolation.smwu"); info.setType(WorkspaceType.SMWU); m_workspace.open(info); Datasource m_datasource = m_workspace.getDatasources().get(0); DatasetGrid m_datasetGrid = (DatasetGrid) m_datasource.getDatasets().get("Temp5000"); m_mapControl.getMap().setWorkspace(m_workspace); //调整m_mapControl的状态 m_mapControl.setAction(Action.PAN); m_mapControl.getMap().getLayers().add(m_datasetGrid, true); m_mapControl.setWaitCursorEnabled(false); Layer m_layerThemeGridRange ; try { // if (m_layerThemeGridRange == null) { //构造栅格分段专题图对象 ThemeGridRange themeGridRange = new ThemeGridRange(); //初始化栅格分段专题图子项并设置各自的属性 ThemeGridRangeItem item0 = new ThemeGridRangeItem(); item0.setStart(-9999); item0.setEnd(m_datasetGrid.getMinValue()); item0.setColor(Color.CYAN); item0.setVisible(true); ThemeGridRangeItem item1 = new ThemeGridRangeItem(); item1.setStart(m_datasetGrid.getMinValue()); item1.setEnd(5.3); item1.setColor(Color.GREEN); item1.setVisible(true); ThemeGridRangeItem item2 = new ThemeGridRangeItem(); item2.setStart(5.3); item2.setEnd(15.7); item2.setColor(Color.BLUE); item2.setVisible(true); ThemeGridRangeItem item3 = new ThemeGridRangeItem(); item3.setStart(15.7); item3.setEnd(26.0); item3.setColor(Color.RED); item3.setVisible(true); ThemeGridRangeItem item4 = new ThemeGridRangeItem(); item4.setStart(26.0); item4.setEnd(Double.MAX_VALUE); item4.setColor(Color.GRAY); item4.setVisible(true); //将栅格分段专题图子项依次添加到栅格分段专题图 themeGridRange.addToHead(item0); themeGridRange.addToTail(item1); themeGridRange.addToTail(item2); themeGridRange.addToTail(item3); themeGridRange.addToTail(item4); //添加栅格分段专题图 m_layerThemeGridRange = m_mapControl.getMap().getLayers().add( m_datasetGrid, themeGridRange, true); //设置图层是否可显示,刷新地图 m_layerThemeGridRange.setVisible(value); // m_mapControl.getMap().refresh(); Maps maps =m_workspace.getMaps(); maps.remove("Temp5000"); Map map = m_mapControl.getMap(); map.ensureVisible(m_layerThemeGridRange); maps.add("Temp5000",map.toXML()); // Map map = new Map(m_workspace); // 用于全幅显示给定的图层所对应的空间对象 // map.ensureVisible(m_layerThemeGridRange); // 保存工作空间 m_workspace.save(); // } } catch (RuntimeException e) { System.out.println(e.getMessage()); } } }
[ "1733856225@qq.com" ]
1733856225@qq.com
bd3aa0660f6f21b5142d678f65c1b1ca34a57590
e5c3be1fd08218d52fcc1b43085bee305d30e707
/src/main/java/org/jukeboxmc/block/BlockMelonBlock.java
a11ca8fde7548280ef11f77d8e0a49f574e41c25
[]
no_license
Leontking/JukeboxMC
e6d48b1270300ea3f72eca3267ccb8b9eafcba44
89490a0cf157b2f806937ad5104cb2d4f5147d56
refs/heads/master
2023-02-23T05:47:29.714715
2021-01-20T12:10:20
2021-01-20T12:10:20
329,557,296
0
0
null
2021-01-14T08:48:11
2021-01-14T08:48:11
null
UTF-8
Java
false
false
203
java
package org.jukeboxmc.block; /** * @author LucGamesYT * @version 1.0 */ public class BlockMelonBlock extends Block { public BlockMelonBlock() { super( "minecraft:melon_block" ); } }
[ "beckerluca16@gmail.com" ]
beckerluca16@gmail.com
52fec88668412f8cd0a16bd46282d773dfaec7c3
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.5.0/sources/com/google/android/gms/internal/clearcut/zzcb.java
df785810f42a9c6d98b8b5c93917eaa1434adfcc
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
3,867
java
package com.google.android.gms.internal.clearcut; import java.lang.reflect.Type; public enum zzcb { DOUBLE(0, zzcd.SCALAR, zzcq.DOUBLE), FLOAT(1, zzcd.SCALAR, zzcq.FLOAT), INT64(2, zzcd.SCALAR, zzcq.LONG), UINT64(3, zzcd.SCALAR, zzcq.LONG), INT32(4, zzcd.SCALAR, zzcq.INT), FIXED64(5, zzcd.SCALAR, zzcq.LONG), FIXED32(6, zzcd.SCALAR, zzcq.INT), BOOL(7, zzcd.SCALAR, zzcq.BOOLEAN), STRING(8, zzcd.SCALAR, zzcq.STRING), MESSAGE(9, zzcd.SCALAR, zzcq.MESSAGE), BYTES(10, zzcd.SCALAR, zzcq.BYTE_STRING), UINT32(11, zzcd.SCALAR, zzcq.INT), ENUM(12, zzcd.SCALAR, zzcq.ENUM), SFIXED32(13, zzcd.SCALAR, zzcq.INT), SFIXED64(14, zzcd.SCALAR, zzcq.LONG), SINT32(15, zzcd.SCALAR, zzcq.INT), SINT64(16, zzcd.SCALAR, zzcq.LONG), GROUP(17, zzcd.SCALAR, zzcq.MESSAGE), DOUBLE_LIST(18, zzcd.VECTOR, zzcq.DOUBLE), FLOAT_LIST(19, zzcd.VECTOR, zzcq.FLOAT), INT64_LIST(20, zzcd.VECTOR, zzcq.LONG), UINT64_LIST(21, zzcd.VECTOR, zzcq.LONG), INT32_LIST(22, zzcd.VECTOR, zzcq.INT), FIXED64_LIST(23, zzcd.VECTOR, zzcq.LONG), FIXED32_LIST(24, zzcd.VECTOR, zzcq.INT), BOOL_LIST(25, zzcd.VECTOR, zzcq.BOOLEAN), STRING_LIST(26, zzcd.VECTOR, zzcq.STRING), MESSAGE_LIST(27, zzcd.VECTOR, zzcq.MESSAGE), BYTES_LIST(28, zzcd.VECTOR, zzcq.BYTE_STRING), UINT32_LIST(29, zzcd.VECTOR, zzcq.INT), ENUM_LIST(30, zzcd.VECTOR, zzcq.ENUM), SFIXED32_LIST(31, zzcd.VECTOR, zzcq.INT), SFIXED64_LIST(32, zzcd.VECTOR, zzcq.LONG), SINT32_LIST(33, zzcd.VECTOR, zzcq.INT), SINT64_LIST(34, zzcd.VECTOR, zzcq.LONG), DOUBLE_LIST_PACKED(35, zzcd.PACKED_VECTOR, zzcq.DOUBLE), FLOAT_LIST_PACKED(36, zzcd.PACKED_VECTOR, zzcq.FLOAT), INT64_LIST_PACKED(37, zzcd.PACKED_VECTOR, zzcq.LONG), UINT64_LIST_PACKED(38, zzcd.PACKED_VECTOR, zzcq.LONG), INT32_LIST_PACKED(39, zzcd.PACKED_VECTOR, zzcq.INT), FIXED64_LIST_PACKED(40, zzcd.PACKED_VECTOR, zzcq.LONG), FIXED32_LIST_PACKED(41, zzcd.PACKED_VECTOR, zzcq.INT), BOOL_LIST_PACKED(42, zzcd.PACKED_VECTOR, zzcq.BOOLEAN), UINT32_LIST_PACKED(43, zzcd.PACKED_VECTOR, zzcq.INT), ENUM_LIST_PACKED(44, zzcd.PACKED_VECTOR, zzcq.ENUM), SFIXED32_LIST_PACKED(45, zzcd.PACKED_VECTOR, zzcq.INT), SFIXED64_LIST_PACKED(46, zzcd.PACKED_VECTOR, zzcq.LONG), SINT32_LIST_PACKED(47, zzcd.PACKED_VECTOR, zzcq.INT), SINT64_LIST_PACKED(48, zzcd.PACKED_VECTOR, zzcq.LONG), GROUP_LIST(49, zzcd.VECTOR, zzcq.MESSAGE), MAP(50, zzcd.MAP, zzcq.VOID); private static final zzcb[] zzjb = null; private static final Type[] zzjc = null; private final int id; private final zzcq zzix; private final zzcd zziy; private final Class<?> zziz; private final boolean zzja; static { zzjc = new Type[0]; zzcb[] values = values(); zzjb = new zzcb[values.length]; int length = values.length; int i; while (i < length) { zzcb zzcb = values[i]; zzjb[zzcb.id] = zzcb; i++; } } private zzcb(int i, zzcd zzcd, zzcq zzcq) { this.id = i; this.zziy = zzcd; this.zzix = zzcq; switch (zzcd) { case MAP: this.zziz = zzcq.zzbq(); break; case VECTOR: this.zziz = zzcq.zzbq(); break; default: this.zziz = null; break; } boolean z = false; if (zzcd == zzcd.SCALAR) { switch (zzcq) { case BYTE_STRING: case MESSAGE: case STRING: break; default: z = true; break; } } this.zzja = z; } public final int id() { return this.id; } }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
fd134f1c26082c10e2c2695b8519cd363aace214
540b0af99eef8cdb9f2b8f31075504ebeab36c74
/heartwork/work-core/src/main/java/im/heart/core/forbidden/ForbiddenWordUtils.java
190cde0bd5c9ffbaa4ed95bdf880d2075c4f432f
[]
no_license
nullllun/heartwork
682aca16df2a970bf1ab598458c234052bd795e7
1d8e56da24c805d1792f0ecdd59c70779fc5eed7
refs/heads/master
2020-07-11T18:51:03.529649
2018-10-23T07:20:28
2018-10-23T07:20:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
764
java
package im.heart.core.forbidden; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * * @author gg * @desc 屏蔽关键词 //TODO 暂不处理 */ public class ForbiddenWordUtils { protected static final Logger logger = LoggerFactory.getLogger(ForbiddenWordUtils.class); /** * 默认的遮罩文字 */ protected static final String DEFAULT_MASK = "***"; /** * 屏蔽关键词抓取的url */ private static String forbiddenWordFetchURL; public static String getForbiddenWordFetchURL() { return forbiddenWordFetchURL; } public static void setForbiddenWordFetchURL(String forbiddenWordFetchURL) { ForbiddenWordUtils.forbiddenWordFetchURL = forbiddenWordFetchURL; } }
[ "lkg61230413@163.com" ]
lkg61230413@163.com
7559116dc183c276889c561d16d66e90dc098b99
0052bffc867d5d71285d358a431935dce8f17baf
/Java-Lab documents/Lab6/TestStatic.java
597d4c39e7e55fc48190b243618ddad14250a56f
[]
no_license
sandhiyasampath/JavaPrograms
b5a48fb9ac73a93c739bb70b29ddd5e70a63e3fa
641bd537cfb79269031c8bbc9d70f145e6217219
refs/heads/master
2023-03-20T21:54:53.468993
2021-03-21T05:13:29
2021-03-21T05:13:29
294,480,726
0
0
null
null
null
null
UTF-8
Java
false
false
247
java
public class TestStatic { static int i = 20; public void test() { // TestStatic ts = new TestStatic(); System.out.println("TestStatic.i = "+TestStatic.i); } public static void main(String[] args) { new TestStatic().test(); } }
[ "anbu171298@gmail.com" ]
anbu171298@gmail.com
48960b57e3c0a545f05c02328c1f3f10ddf1d5aa
fe72285ed83fcf7d047c75118dd4d7caf59b6b8c
/revapi-java/src/test/resources/v2/methods/ReturnType.java
99e80d80a80e0082e4850df679200a3407266691
[ "Apache-2.0" ]
permissive
rfer/revapi
6243ca1608e3d50ae5e9b612b4f6d419d89cae1f
a81a3f16bb62436f030ad534ad42cf7f77feed36
refs/heads/master
2021-08-11T10:49:57.467599
2017-11-13T15:27:14
2017-11-13T15:27:14
108,730,295
0
0
null
2017-10-29T11:58:20
2017-10-29T11:58:19
null
UTF-8
Java
false
false
237
java
import java.util.Set; public interface ReturnType<R extends Number> { int method1(); R method2(); <U extends Comparable<R>> U method3(); <U extends R> U method4(); Set<Double> method5(); String method6(); }
[ "lkrejci@redhat.com" ]
lkrejci@redhat.com
cdb56db3a9d5c36e1b6a7a76bfdafe6b1938a3d0
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/cassandra-20190101/src/main/java/com/aliyun/cassandra20190101/models/DescribeParameterModificationHistoriesRequest.java
f60984fc6f66253fe35e2da8466f15ec058ffb72
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,347
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.cassandra20190101.models; import com.aliyun.tea.*; public class DescribeParameterModificationHistoriesRequest extends TeaModel { @NameInMap("ClusterId") public String clusterId; @NameInMap("PageNumber") public Integer pageNumber; @NameInMap("PageSize") public Integer pageSize; public static DescribeParameterModificationHistoriesRequest build(java.util.Map<String, ?> map) throws Exception { DescribeParameterModificationHistoriesRequest self = new DescribeParameterModificationHistoriesRequest(); return TeaModel.build(map, self); } public DescribeParameterModificationHistoriesRequest setClusterId(String clusterId) { this.clusterId = clusterId; return this; } public String getClusterId() { return this.clusterId; } public DescribeParameterModificationHistoriesRequest setPageNumber(Integer pageNumber) { this.pageNumber = pageNumber; return this; } public Integer getPageNumber() { return this.pageNumber; } public DescribeParameterModificationHistoriesRequest setPageSize(Integer pageSize) { this.pageSize = pageSize; return this; } public Integer getPageSize() { return this.pageSize; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
eb10cffc15717d79032728e32d73b02e3c7398fa
7dbbe21b902fe362701d53714a6a736d86c451d7
/BzenStudio-5.6/Source/com/zend/ide/s/j.java
d6a855bc2fb210866f9d664388fee2a132f848a6
[]
no_license
HS-matty/dev
51a53b4fd03ae01981549149433d5091462c65d0
576499588e47e01967f0c69cbac238065062da9b
refs/heads/master
2022-05-05T18:32:24.148716
2022-03-20T16:55:28
2022-03-20T16:55:28
196,147,486
0
0
null
null
null
null
UTF-8
Java
false
false
4,967
java
package com.zend.ide.s; import com.zend.ide.b.h; import com.zend.ide.bf.d; import com.zend.ide.bf.r; import com.zend.ide.n.bw; import com.zend.ide.n.ho; import com.zend.ide.util.cl; import com.zend.ide.util.dj; import javax.swing.text.BadLocationException; import javax.swing.text.Document; import javax.swing.text.Element; import javax.swing.text.JTextComponent; import javax.swing.text.Segment; import javax.swing.text.Utilities; public abstract class j implements m { private boolean a = false; private boolean h = false; private bw b; protected h d = g(); protected x c; private int e = 1000; private int f = 0; protected boolean i = false; protected boolean g = false; public void a(boolean paramBoolean) { this.a = paramBoolean; } public boolean i() { return this.a; } public void a(int paramInt) { this.e = paramInt; } public int b() { return this.e; } public int c() { return this.f; } public void b(int paramInt) { this.f = paramInt; } public void a(bw parambw) { this.b = parambw; } protected bw d() { return this.b; } public void b(boolean paramBoolean) { this.h = paramBoolean; } public boolean a(int paramInt1, int paramInt2) { JTextComponent localJTextComponent = d().e(); int j; String str; try { j = localJTextComponent.getCaretPosition(); int k = Utilities.getPreviousWord(localJTextComponent, j); str = localJTextComponent.getText(k, j - k); } catch (BadLocationException localBadLocationException1) { return false; } d locald = r.b().a(paramInt1, str); if (locald != null) { try { d().getDocument().remove(j - str.length(), str.length()); } catch (BadLocationException localBadLocationException2) { cl.a(localBadLocationException2); } com.zend.ide.bf.m.b().a(d(), locald, j - str.length()); return true; } return false; } protected static void a(Document paramDocument, int paramInt, String paramString) throws BadLocationException { if (com.zend.ide.bf.m.b().d()) { com.zend.ide.bf.m.b().a(paramString, paramInt, paramString.length(), 0, -1, null); return; } paramDocument.insertString(paramInt, paramString, null); } protected static void a(Document paramDocument, int paramInt1, int paramInt2) throws BadLocationException { if (com.zend.ide.bf.m.b().d()) { com.zend.ide.bf.m.b().a(paramDocument, paramInt1, paramInt2); return; } paramDocument.remove(paramInt1, paramInt2); } protected abstract h g(); protected char a(Document paramDocument, int paramInt1, int paramInt2, char[] paramArrayOfChar) { Segment localSegment = new Segment(); Element localElement1 = paramDocument.getDefaultRootElement(); Element localElement2 = localElement1.getElement(localElement1.getElementIndex(paramInt1)); int j = this.i ? localElement2.getEndOffset() - 1 : paramInt2; int k = 0; try { paramDocument.getText(paramInt1, j - paramInt1, localSegment); int m = paramInt1; int n = localSegment.first(); while (n != 65535) { if (a(n, paramArrayOfChar)) { k = n; break; } int i1 = localSegment.next(); m++; } if (m > paramInt1) a(paramDocument, paramInt1, m - paramInt1); } catch (Exception localException) { } return k; } private static final boolean a(char paramChar, char[] paramArrayOfChar) { for (int j = 0; j < paramArrayOfChar.length; j++) if (paramChar == paramArrayOfChar[j]) return true; return false; } protected static final Segment a(int paramInt1, int paramInt2, bw parambw) { Segment localSegment = new Segment(); localSegment.setPartialReturn(false); try { parambw.getDocument().getText(paramInt1, paramInt2 - paramInt1, localSegment); } catch (BadLocationException localBadLocationException) { throw new dj(localBadLocationException); } return localSegment; } protected static final String a(Segment paramSegment, int paramInt1, int paramInt2) { return new String(paramSegment.array, paramInt1, paramInt2 - paramInt1); } protected final char c(int paramInt) { return a(paramInt, paramInt + 1, d()).first(); } protected static int a(Document paramDocument, int paramInt) { return b(paramDocument, paramInt).c(); } private static bl b(Document paramDocument, int paramInt) { try { ho localho = (ho)paramDocument; return (bl)localho.b(paramInt); } catch (Exception localException) { } throw new dj(localException); } } /* Location: C:\Program Files\Zend\ZendStudio-5.5.1\bin\ZendIDE.jar * Qualified Name: com.zend.ide.s.j * JD-Core Version: 0.6.0 */
[ "byqdes@gmail.com" ]
byqdes@gmail.com
06e2ed85e289860b2bcfb4bfc79fadb3dba0efaa
187ccbd587dc6b946a4845d3fff353aa6838f6f1
/src/test/java/collectionscomp/OrderedLibraryTest.java
98a72f2feb372d4388c6c2d7a4a40354b21d5e03
[]
no_license
lippaitamas1021/training
dd1b52db60804ffeb1699254869393ffc7fa6e24
1f3f28d0286eff6798368b5c2a68b650046c3be1
refs/heads/master
2023-04-07T13:56:35.191872
2021-04-21T09:04:52
2021-04-21T09:04:52
345,300,131
0
0
null
null
null
null
UTF-8
Java
false
false
1,335
java
package collectionscomp; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.Locale; import static org.junit.jupiter.api.Assertions.assertEquals; public class OrderedLibraryTest { private OrderedLibrary library; @BeforeEach public void setUp() { List<Book> bookList = new LinkedList<>(Arrays.asList(new Book(1245, "Őrület", "Utasy Kristóf"), new Book(2454, "Álom", "Ómolnár Géza"), new Book(5454, "Államhatár", "Ákos János"), new Book(5454, "Utitársak", "Ős János"))); library = new OrderedLibrary(bookList); } @Test public void testOrderedByTitle() { List<Book> orderedBookList = library.orderedByTitle(); assertEquals("Utitársak", orderedBookList.get(0).getTitle()); } @Test public void testOrderedByAuthor() { List<Book> orderedBookList = library.orderedByAuthor(); assertEquals("Utasy Kristóf", orderedBookList.get(0).getAuthor()); } @Test public void testOrderedByTitleLocale() { List<String> orderedTitleList = library.orderedByTitleLocale(new Locale("hu", "HU")); assertEquals("Államhatár", orderedTitleList.get(0)); } }
[ "lippaitamas1021@gmail.com" ]
lippaitamas1021@gmail.com
50754be89e380ec09c3d83cd638b62ad0e947a73
14fe53f8ef61e254f31a5b2f368a7c08ffe0a37b
/jdi-light-examples/src/test/java/io/github/epam/testng/TestNGListener.java
01bb12b78600b3879ce7dd083cedf7889188385d
[ "MIT" ]
permissive
fossabot/jdi-light
a93ef63c63048ea47b308b10114b2321f61c0abe
47f4ac6b7d21e4f2040d52a1f538d2cb6f34aca0
refs/heads/master
2020-05-13T23:22:17.058887
2019-04-16T11:11:24
2019-04-16T11:11:24
181,673,684
0
0
MIT
2019-04-16T11:11:23
2019-04-16T11:11:23
null
UTF-8
Java
false
false
1,538
java
package io.github.epam.testng; /** * Created by Roman Iovlev on 14.02.2018 * Email: roman.iovlev.jdi@gmail.com; Skype: roman.iovlev */ import org.testng.IInvokedMethod; import org.testng.IInvokedMethodListener; import org.testng.ITestResult; import org.testng.annotations.Test; import java.lang.reflect.Method; import static com.epam.jdi.light.settings.WebSettings.TEST_NAME; import static com.epam.jdi.light.settings.WebSettings.logger; public class TestNGListener implements IInvokedMethodListener { @Override public void beforeInvocation(IInvokedMethod iInvokedMethod, ITestResult iTestResult) { if (iInvokedMethod.isTestMethod()) { Method testMethod = iInvokedMethod.getTestMethod().getConstructorOrMethod().getMethod(); if (testMethod.isAnnotationPresent(Test.class)) { TEST_NAME = testMethod.getName(); logger.step(""); logger.step("== Test '%s' started ==", TEST_NAME); } } } @Override public void afterInvocation(IInvokedMethod method, ITestResult result) { if (method.isTestMethod()) { logger.step("=== Test '%s' %s ===", TEST_NAME, getTestResult(result)); } } private String getTestResult(ITestResult result) { switch (result.getStatus()) { case ITestResult.SUCCESS: return "PASSED"; case ITestResult.SKIP: return "SKIPPED"; default: return "FAILED"; } } }
[ "romanyister@gmail.com" ]
romanyister@gmail.com
7fa6112619805e0f65b6b06c4107b45e959c2df2
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/platform/platform-impl/src/com/intellij/ide/lightEdit/LightEditPanel.java
ee9bbf43de1855fa5372a93a8bad9eca853e8881
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
1,047
java
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.ide.lightEdit; import com.intellij.openapi.Disposable; import com.intellij.openapi.project.Project; import com.intellij.ui.JBColor; import org.jetbrains.annotations.NotNull; import javax.swing.*; import java.awt.*; public final class LightEditPanel extends JPanel implements Disposable { private final LightEditTabs myTabs; private final LightEditorManagerImpl myEditorManager; public LightEditPanel(@NotNull Project project) { myEditorManager = (LightEditorManagerImpl)LightEditService.getInstance().getEditorManager(); setLayout(new BorderLayout()); myTabs = new LightEditTabs(project, this, myEditorManager); add(myTabs, BorderLayout.CENTER); setBackground(JBColor.background().darker()); } LightEditTabs getTabs() { return myTabs; } @Override public void dispose() { myTabs.removeAll(); myEditorManager.releaseEditors(); } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
e31c14e98457f427a58f19f5481484ea5faf6224
508da7012b304f5d698adcaa21ef1ea444417851
/connectors/camel-cometds-kafka-connector/src/main/java/org/apache/camel/kafkaconnector/cometds/CamelCometdsSourceTask.java
0b50f8cf77b1895c4441f44f03f3eae5b67523d1
[ "Apache-2.0" ]
permissive
jboss-fuse/camel-kafka-connector
02fd86c99ee4d2ac88ac5cf8b4cf56bd0bbcc007
8411f2f772a00d1d4a53ca8f24e13128306f5c02
refs/heads/master
2021-07-02T19:43:30.085652
2020-10-19T13:17:53
2020-10-19T13:18:04
181,911,766
16
7
Apache-2.0
2019-12-04T08:44:47
2019-04-17T14:45:05
Java
UTF-8
Java
false
false
1,689
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.camel.kafkaconnector.cometds; import java.util.HashMap; import java.util.Map; import javax.annotation.Generated; import org.apache.camel.kafkaconnector.CamelSourceConnectorConfig; import org.apache.camel.kafkaconnector.CamelSourceTask; @Generated("This class has been generated by camel-kafka-connector-generator-maven-plugin, remove this annotation to prevent it from being generated.") public class CamelCometdsSourceTask extends CamelSourceTask { @Override protected CamelSourceConnectorConfig getCamelSourceConnectorConfig( Map<String, String> props) { return new CamelCometdsSourceConnectorConfig(props); } @Override protected Map<String, String> getDefaultConfig() { return new HashMap<String, String>() {{ put(CamelSourceConnectorConfig.CAMEL_SOURCE_COMPONENT_CONF, "cometds"); }}; } }
[ "andrea.tarocchi@gmail.com" ]
andrea.tarocchi@gmail.com
8863ceb9028ccb99440d1d7c7a0ba128b512d9f6
b07e059862bee387e62af1d08a229649a022277e
/src/main/java/com/niulipeng/service/impl/TblRuleServiceImpl.java
e22c8224c6cfc7f02ab2cb495970ad8656317943
[]
no_license
nlp0520/service_plateform
5b04e774a0edba4559bbeb517ea0068dcbe4c35d
1c0731bbbfdbb6275a476cbb9a83e030e3e00a7a
refs/heads/master
2023-07-08T04:56:29.575374
2021-08-17T09:22:32
2021-08-17T09:22:32
397,186,912
0
0
null
null
null
null
UTF-8
Java
false
false
492
java
package com.niulipeng.service.impl; import com.niulipeng.bean.TblRule; import com.niulipeng.mapper.TblRuleMapper; import com.niulipeng.service.base.TblRuleService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; /** * <p> * 规章制度 服务实现类 * </p> * * @author lian * @since 2021-07-29 */ @Service public class TblRuleServiceImpl extends ServiceImpl<TblRuleMapper, TblRule> implements TblRuleService { }
[ "784115501@qq.com" ]
784115501@qq.com
eff751fbdcf6526cae7a819321a01d43191ed192
78f284cd59ae5795f0717173f50e0ebe96228e96
/factura-negocio/src/cl/stotomas/factura/capacitacion_14/copy/copy/copy/TestingVulnerabilities.java
86e1a5f0d598b4ffffd3cf06759e60d66ad5a456
[]
no_license
Pattricio/Factura
ebb394e525dfebc97ee2225ffc5fca10962ff477
eae66593ac653f85d05071b6ccb97fb1e058502d
refs/heads/master
2020-03-16T03:08:45.822070
2018-05-07T15:29:25
2018-05-07T15:29:25
132,481,305
0
0
null
null
null
null
ISO-8859-1
Java
false
false
2,284
java
package cl.stotomas.factura.capacitacion_14.copy.copy.copy; import java.applet.Applet; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; //import cl.stomas.factura.negocio.testing.TestingModel.Echo; public class TestingVulnerabilities { public static String decryptMessage(final byte[] message, byte[] secretKey) { try { // CÓDIGO VULNERABLE final SecretKeySpec KeySpec = new SecretKeySpec(secretKey, "DES"); final Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, KeySpec); // RECOMENDACIÓN VERACODE // final Cipher cipher = Cipher.getInstance("DES..."); // cipher.init(Cipher.DECRYPT_MODE, KeySpec); return new String(cipher.doFinal(message)); } catch(Exception e) { e.printStackTrace(); } return null; } // Inclusión de funcionalidades de esfera de control que no es de confianza // Un atacante puede insertar funcionalidades maliciosas dentro de este programa. // Las Applet comprometen la seguridad. ya que sus funcionalidades se pueden adaptar a la Web // Ademas la entrega de acceso de credenciales es engorrosa para el cliente. public final class WidgetData extends Applet { private static final long serialVersionUID = 1L; public float price; public WidgetData() { this.price = LookupPrice("MyWidgetType"); } private float LookupPrice(String string) { return 0; } } class Echo { // Control de Proceso // Posible reemplazo de librería por una maliciosa // Donde además s enos muestra el nombre explícito de esta. public native void runEcho(); { System.loadLibrary("echo"); // Se carga librería } public void main(String[] args) { new Echo().runEcho(); } } class EchoSecond { // Control de Proceso // Posible reemplazo de librería por una maliciosa // Donde además s enos muestra el nombre explícito de esta. public native void runEcho(); { System.loadLibrary("echo"); // Se carga librería } public void main(String[] args) { new Echo().runEcho(); } } }
[ "Adriana Molano@DESKTOP-GQ96FK8" ]
Adriana Molano@DESKTOP-GQ96FK8
249e2275ff38d14b98d6d678dc2807c8ba9f6109
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/39d6cedaf5a7e52fe54d7d73ea22ec07cd5c2fb1/before/JsonSchemaReadTest.java
37aeb2921c41620fdf78983687eab5253e35b452
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
7,447
java
package com.jetbrains.jsonSchema.impl; import com.intellij.codeInsight.completion.CompletionTestCase; import com.intellij.codeInsight.daemon.impl.HighlightInfo; import com.intellij.json.JsonLanguage; import com.intellij.lang.LanguageAnnotators; import com.intellij.lang.annotation.Annotator; import com.intellij.lang.annotation.HighlightSeverity; import com.intellij.openapi.Disposable; import com.intellij.openapi.application.ReadAction; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.testFramework.PlatformTestUtil; import com.intellij.util.concurrency.Semaphore; import com.jetbrains.jsonSchema.JsonSchemaFileType; import com.jetbrains.jsonSchema.JsonSchemaTestServiceImpl; import com.jetbrains.jsonSchema.ide.JsonSchemaService; import org.junit.Assert; import java.io.File; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; /** * @author Irina.Chernushina on 8/29/2015. */ public class JsonSchemaReadTest extends CompletionTestCase { @Override protected String getTestDataPath() { return PlatformTestUtil.getCommunityPath() + "/json/tests/testData/jsonSchema"; } public void testReadSchemaItself() throws Exception { final File file = new File(PlatformTestUtil.getCommunityPath(), "json/tests/testData/jsonSchema/schema.json"); final JsonSchemaObject read = getSchemaObject(file); Assert.assertEquals("http://json-schema.org/draft-04/schema#", read.getId()); Assert.assertTrue(read.getDefinitions().containsKey("positiveInteger")); Assert.assertTrue(read.getProperties().containsKey("multipleOf")); Assert.assertTrue(read.getProperties().containsKey("type")); Assert.assertTrue(read.getProperties().containsKey("additionalProperties")); Assert.assertEquals(2, read.getProperties().get("additionalItems").getAnyOf().size()); Assert.assertEquals("#", read.getProperties().get("additionalItems").getAnyOf().get(1).getRef()); final JsonSchemaObject required = read.getProperties().get("required"); Assert.assertEquals(JsonSchemaType._array, required.getType()); Assert.assertEquals(1, required.getMinItems().intValue()); Assert.assertEquals(JsonSchemaType._string, required.getItemsSchema().getType()); final JsonSchemaObject minLength = read.getProperties().get("minLength"); Assert.assertNotNull(minLength.getAllOf()); final List<JsonSchemaObject> minLengthAllOf = minLength.getAllOf(); boolean haveIntegerType = false; Integer defaultValue = null; Integer minValue = null; for (JsonSchemaObject object : minLengthAllOf) { haveIntegerType |= JsonSchemaType._integer.equals(object.getType()); if (object.getDefault() instanceof Number) { defaultValue = ((Number)object.getDefault()).intValue(); } if (object.getMinimum() != null) { minValue = object.getMinimum().intValue(); } } Assert.assertTrue(haveIntegerType); Assert.assertEquals(0, defaultValue.intValue()); Assert.assertEquals(0, minValue.intValue()); } public void testMainSchemaHighlighting() throws Exception { final Set<VirtualFile> files = JsonSchemaService.Impl.get(myProject).getSchemaFiles(); VirtualFile mainSchema = null; for (VirtualFile file : files) { if ("schema.json".equals(file.getName())) { mainSchema = file; break; } } assertNotNull(mainSchema); assertTrue(JsonSchemaFileType.INSTANCE.equals(mainSchema.getFileType())); final Annotator annotator = new JsonSchemaAnnotator(); LanguageAnnotators.INSTANCE.addExplicitExtension(JsonLanguage.INSTANCE, annotator); Disposer.register(getTestRootDisposable(), new Disposable() { @Override public void dispose() { LanguageAnnotators.INSTANCE.removeExplicitExtension(JsonLanguage.INSTANCE, annotator); JsonSchemaTestServiceImpl.setProvider(null); } }); configureByExistingFile(mainSchema); final List<HighlightInfo> infos = doHighlighting(); for (HighlightInfo info : infos) { if (!HighlightSeverity.INFORMATION.equals(info.getSeverity())) assertFalse(info.getDescription(), true); } } private JsonSchemaObject getSchemaObject(File file) throws Exception { Assert.assertTrue(file.exists()); final VirtualFile virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file); Assert.assertNotNull(virtualFile); final JsonSchemaReader reader = JsonSchemaReader.create(myProject, virtualFile); return reader.read(); } public void testReadSchemaWithCustomTags() throws Exception { final File file = new File(PlatformTestUtil.getCommunityPath(), "json/tests/testData/jsonSchema/withNotesCustomTag.json"); final JsonSchemaObject read = getSchemaObject(file); Assert.assertTrue(read.getDefinitions().get("common").getProperties().containsKey("id")); } public void testArrayItemsSchema() throws Exception { final File file = new File(PlatformTestUtil.getCommunityPath(), "json/tests/testData/jsonSchema/arrayItemsSchema.json"); final JsonSchemaObject read = getSchemaObject(file); final Map<String, JsonSchemaObject> properties = read.getProperties(); Assert.assertEquals(1, properties.size()); final JsonSchemaObject object = properties.get("color-hex-case"); final List<JsonSchemaObject> oneOf = object.getOneOf(); Assert.assertEquals(2, oneOf.size()); final JsonSchemaObject second = oneOf.get(1); final List<JsonSchemaObject> list = second.getItemsSchemaList(); Assert.assertEquals(2, list.size()); final JsonSchemaObject firstItem = list.get(0); final List<Object> anEnum = firstItem.getEnum(); Assert.assertEquals(2, anEnum.size()); Assert.assertTrue(anEnum.contains("\"lower\"")); Assert.assertTrue(anEnum.contains("\"upper\"")); } public void testReadSchemaWithWrongRequired() throws Exception { doTestSchemaReadNotHung(new File(PlatformTestUtil.getCommunityPath(), "json/tests/testData/jsonSchema/WithWrongRequired.json")); } public void testReadSchemaWithWrongItems() throws Exception { doTestSchemaReadNotHung(new File(PlatformTestUtil.getCommunityPath(), "json/tests/testData/jsonSchema/WithWrongItems.json")); } private void doTestSchemaReadNotHung(final File file) throws Exception { // because of threading if (Runtime.getRuntime().availableProcessors() < 2) return; Assert.assertTrue(file.exists()); final AtomicBoolean done = new AtomicBoolean(); final AtomicReference<Exception> error = new AtomicReference<>(); final Semaphore semaphore = new Semaphore(); semaphore.down(); final Thread thread = new Thread(() -> { try { ReadAction.run(() -> getSchemaObject(file)); done.set(true); } catch (Exception e) { error.set(e); } finally { semaphore.up(); } }, getClass().getName() + ": read test json schema " + file.getName()); thread.setDaemon(true); try { thread.start(); semaphore.waitFor(TimeUnit.SECONDS.toMillis(120)); if (error.get() != null) throw error.get(); Assert.assertTrue("Reading test schema hung!", done.get()); } finally { thread.interrupt(); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
80975ecd42d4394c0f343c4c7af277a21ef1ba20
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2016/12/BasicAuthManager.java
25d0a41a44ea84f88007a05d3d89b7e58a619593
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
7,930
java
/* * Copyright (c) 2002-2016 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.server.security.auth; import java.io.IOException; import java.time.Clock; import java.util.Map; import java.util.Set; import org.neo4j.graphdb.security.AuthorizationViolationException; import org.neo4j.kernel.api.exceptions.InvalidArgumentsException; import org.neo4j.kernel.api.security.AuthManager; import org.neo4j.kernel.api.security.AuthSubject; import org.neo4j.kernel.api.security.AuthToken; import org.neo4j.kernel.api.security.AuthenticationResult; import org.neo4j.kernel.api.security.SecurityContext; import org.neo4j.kernel.api.security.exception.InvalidAuthTokenException; import org.neo4j.server.security.auth.exception.ConcurrentModificationException; /** * Manages server authentication and authorization. * <p> * Through the BasicAuthManager you can create, update and delete userRepository, and authenticate using credentials. * <p>> * NOTE: AuthManager will manage the lifecycle of the given UserRepository, * so the given UserRepository should not be added to another LifeSupport. * </p> */ public class BasicAuthManager implements AuthManager, UserManager, UserManagerSupplier { protected final AuthenticationStrategy authStrategy; protected final UserRepository userRepository; protected final PasswordPolicy passwordPolicy; private final UserRepository initialUserRepository; public BasicAuthManager( UserRepository userRepository, PasswordPolicy passwordPolicy, AuthenticationStrategy authStrategy, UserRepository initialUserRepository ) { this.userRepository = userRepository; this.passwordPolicy = passwordPolicy; this.authStrategy = authStrategy; this.initialUserRepository = initialUserRepository; } public BasicAuthManager( UserRepository userRepository, PasswordPolicy passwordPolicy, Clock clock, UserRepository initialUserRepository ) { this( userRepository, passwordPolicy, new RateLimitedAuthenticationStrategy( clock, 3 ), initialUserRepository ); } @Override public void init() throws Throwable { userRepository.init(); initialUserRepository.init(); } @Override public void start() throws Throwable { userRepository.start(); initialUserRepository.start(); if ( userRepository.numberOfUsers() == 0 ) { User neo4j = newUser( INITIAL_USER_NAME, "neo4j", true ); if ( initialUserRepository.numberOfUsers() > 0 ) { User user = initialUserRepository.getUserByName( INITIAL_USER_NAME ); if ( user != null ) { userRepository.update( neo4j, user ); } } } } @Override public void stop() throws Throwable { userRepository.stop(); initialUserRepository.stop(); } @Override public void shutdown() throws Throwable { userRepository.shutdown(); initialUserRepository.shutdown(); } @Override public BasicSecurityContext login( Map<String,Object> authToken ) throws InvalidAuthTokenException { String scheme = AuthToken.safeCast( AuthToken.SCHEME_KEY, authToken ); if ( !scheme.equals( AuthToken.BASIC_SCHEME ) ) { throw new InvalidAuthTokenException( "Unsupported authentication scheme '" + scheme + "'." ); } String username = AuthToken.safeCast( AuthToken.PRINCIPAL, authToken ); String password = AuthToken.safeCast( AuthToken.CREDENTIALS, authToken ); User user = userRepository.getUserByName( username ); AuthenticationResult result = AuthenticationResult.FAILURE; if ( user != null ) { result = authStrategy.authenticate( user, password ); if ( result == AuthenticationResult.SUCCESS && user.passwordChangeRequired() ) { result = AuthenticationResult.PASSWORD_CHANGE_REQUIRED; } } return new BasicSecurityContext( this, user, result ); } @Override public User newUser( String username, String initialPassword, boolean requirePasswordChange ) throws IOException, InvalidArgumentsException { userRepository.assertValidUsername( username ); passwordPolicy.validatePassword( initialPassword ); User user = new User.Builder() .withName( username ) .withCredentials( Credential.forPassword( initialPassword ) ) .withRequiredPasswordChange( requirePasswordChange ) .build(); userRepository.create( user ); return user; } @Override public boolean deleteUser( String username ) throws IOException, InvalidArgumentsException { User user = getUser( username ); return user != null && userRepository.delete( user ); } @Override public User getUser( String username ) throws InvalidArgumentsException { User user = userRepository.getUserByName( username ); if ( user == null ) { throw new InvalidArgumentsException( "User '" + username + "' does not exist." ); } return user; } @Override public User silentlyGetUser( String username ) { return userRepository.getUserByName( username ); } void setPassword( AuthSubject authSubject, String username, String password, boolean requirePasswordChange ) throws IOException, InvalidArgumentsException { if ( !authSubject.hasUsername( username ) ) { throw new AuthorizationViolationException( "Invalid attempt to change the password for user " + username ); } setUserPassword( username, password, requirePasswordChange ); } @Override public void setUserPassword( String username, String password, boolean requirePasswordChange ) throws IOException, InvalidArgumentsException { User existingUser = getUser( username ); passwordPolicy.validatePassword( password ); if ( existingUser.credentials().matchesPassword( password ) ) { throw new InvalidArgumentsException( "Old password and new password cannot be the same." ); } try { User updatedUser = existingUser.augment() .withCredentials( Credential.forPassword( password ) ) .withRequiredPasswordChange( requirePasswordChange ) .build(); userRepository.update( existingUser, updatedUser ); } catch ( ConcurrentModificationException e ) { // try again setUserPassword( username, password, requirePasswordChange ); } } @Override public Set<String> getAllUsernames() { return userRepository.getAllUsernames(); } @Override public UserManager getUserManager( SecurityContext securityContext ) { return this; } @Override public UserManager getUserManager() { return this; } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
dbc2923546d12bb0aa573d53fac13762a28a1183
b58632bd4e7d37b43f2fee66fc37760f6387d46e
/sentinel-cluster/sentinel-cluster-server-default/src/main/java/com/alibaba/csp/sentinel/cluster/flow/statistic/concurrent/CurrentConcurrencyManager.java
de91ab2f8c79f2a235e778a91e63551b6a723c82
[ "Apache-2.0" ]
permissive
alibaba/Sentinel
3287d24754d19461f4b7ba4794ed9733eefd144f
d00798ff8d04c805a0f64772d7802b801e1c86e3
refs/heads/master
2023-08-29T10:54:53.810009
2023-08-16T10:48:32
2023-08-16T10:48:32
128,018,428
22,318
8,447
Apache-2.0
2023-09-10T07:46:27
2018-04-04T06:37:33
Java
UTF-8
Java
false
false
3,373
java
/* * Copyright 1999-2018 Alibaba Group Holding Ltd. * * 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.alibaba.csp.sentinel.cluster.flow.statistic.concurrent; import com.alibaba.csp.sentinel.concurrent.NamedThreadFactory; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; /** * We use a ConcurrentHashMap<long, AtomicInteger> type structure to store nowCalls corresponding to * rules, where the key is flowId and the value is nowCalls. Because nowCalls may be accessed and * modified by multiple threads, we consider to design it as an AtomicInteger class . Each newly * created rule will add a nowCalls object to this map. If the concurrency corresponding to a rule changes, * we will update the corresponding nowCalls in real time. Each request to obtain a token will increase the nowCalls; * and the request to release the token will reduce the nowCalls. * * @author yunfeiyanggzq */ public final class CurrentConcurrencyManager { /** * use ConcurrentHashMap to store the nowCalls of rules. */ private static final ConcurrentHashMap<Long, AtomicInteger> NOW_CALLS_MAP = new ConcurrentHashMap<Long, AtomicInteger>(); @SuppressWarnings("PMD.ThreadPoolCreationRule") private static final ScheduledExecutorService SCHEDULER = Executors.newScheduledThreadPool(1, new NamedThreadFactory("sentinel-cluster-concurrency-record-task", true)); static { ClusterConcurrentCheckerLogListener logTask = new ClusterConcurrentCheckerLogListener(); SCHEDULER.scheduleAtFixedRate(logTask, 0, 1, TimeUnit.SECONDS); } /** * add current concurrency. */ public static void addConcurrency(Long flowId, Integer acquireCount) { AtomicInteger nowCalls = NOW_CALLS_MAP.get(flowId); if (nowCalls == null) { return; } nowCalls.getAndAdd(acquireCount); } /** * get the current concurrency. */ public static AtomicInteger get(Long flowId) { return NOW_CALLS_MAP.get(flowId); } /** * delete the current concurrency. */ public static void remove(Long flowId) { NOW_CALLS_MAP.remove(flowId); } /** * put the current concurrency. */ public static void put(Long flowId, Integer nowCalls) { NOW_CALLS_MAP.put(flowId, new AtomicInteger(nowCalls)); } /** * check flow id. */ public static boolean containsFlowId(Long flowId) { return NOW_CALLS_MAP.containsKey(flowId); } /** * get NOW_CALLS_MAP. */ public static Set<Long> getConcurrencyMapKeySet() { return NOW_CALLS_MAP.keySet(); } }
[ "sczyh16@gmail.com" ]
sczyh16@gmail.com
91ba82a8ae093d95fa8b50163e3f55494f4c0763
8a135ca3f5eb37520774209cbe37244dbaf0e268
/core/src/main/java/com/gengoai/conversion/Tuple2TypeConverter.java
7ba3c69a10cae57062681dc0100225ed1fd4d714
[ "Apache-2.0" ]
permissive
gengoai/mango
511ccb5cd69ee7930996277c400e6a6c26dafd73
c9f427bb74c2dc60813dd5a9c4f66cc2562dc69f
refs/heads/master
2021-06-12T13:42:31.298020
2020-07-31T16:45:11
2020-07-31T16:45:11
128,667,584
0
0
null
null
null
null
UTF-8
Java
false
false
1,980
java
package com.gengoai.conversion; import com.gengoai.reflection.TypeUtils; import com.gengoai.tuple.Tuple2; import org.kohsuke.MetaInfServices; import java.lang.reflect.Type; import java.util.List; import java.util.Map; import static com.gengoai.collection.Arrays2.arrayOf; import static com.gengoai.reflection.TypeUtils.getOrObject; import static com.gengoai.reflection.TypeUtils.parameterizedType; import static com.gengoai.tuple.Tuples.$; /** * Map Entry and Tuple2 Converter * * @author David B. Bracewell */ @MetaInfServices(value = TypeConverter.class) public class Tuple2TypeConverter implements TypeConverter { protected Object getValue(int index, List<?> list, Type[] parameters) throws TypeConversionException { if (list.size() <= index) { return null; } return Converter.convert(list.get(index), getOrObject(index, parameters)); } protected List<?> createList(Object source, Type... parameters) throws TypeConversionException { if (TypeUtils.asClass(getOrObject(0, parameters)).isArray()) { return Converter.convert(source, List.class, Object[].class); } return Converter.convert(source, List.class); } @Override public Object convert(Object source, Type... parameters) throws TypeConversionException { if (source instanceof Map.Entry) { Map.Entry<?, ?> m = Cast.as(source); return $(Converter.convert(m.getKey(), getOrObject(0, parameters)), Converter.convert(m.getValue(), getOrObject(1, parameters))); } List<?> list = createList(source, parameters); if (list.size() <= 2) { return $(getValue(0, list, parameters), getValue(1, list, parameters)); } throw new TypeConversionException(source, parameterizedType(Map.Entry.class, parameters)); } @Override public Class[] getConversionType() { return arrayOf(Map.Entry.class, Tuple2.class); } }//END OF TupleTypeConverter
[ "david@davidbracewell.com" ]
david@davidbracewell.com