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
d9655b5a63a90bf7e6ce8eb7feeaa46d4b5612f8
e2d1ad7bfd684f4d49469130e166efd6f47b59af
/design_pattern/src/main/java/com/study/book/state/example8/ProjectManagerState.java
f082846e0fda76be94f08a4433a20676f920c85f
[]
no_license
snowbuffer/jdk-java-basic
8545aef243c2d0a2749ea888dbe92bec9b49751c
2414167f93569d878b2d802b9c70af906b605c7a
refs/heads/master
2022-12-22T22:10:11.575240
2021-07-06T06:13:38
2021-07-06T06:13:38
172,832,856
0
1
null
2022-12-16T04:40:12
2019-02-27T03:04:57
Java
GB18030
Java
false
false
2,146
java
package com.study.book.state.example8; import java.util.Scanner; /** * 处理项目经理的审核,处理后可能对应部门经理审核、审核结束之中的一种 */ public class ProjectManagerState implements LeaveRequestState { public void doWork(StateMachine request) { //先把业务对象造型回来 LeaveRequestModel lrm = (LeaveRequestModel) request.getBusinessVO(); System.out.println("项目经理审核中,请稍候......"); //模拟用户处理界面,通过控制台来读取数据 System.out.println(lrm.getUser() + "申请从" + lrm.getBeginDate() + "开始请假" + lrm.getLeaveDays() + "天,请项目经理审核(1为同意,2为不同意):"); //读取从控制台输入的数据 Scanner scanner = new Scanner(System.in); if (scanner.hasNext()) { int a = scanner.nextInt(); //设置回到上下文中 String result = "不同意"; if (a == 1) { result = "同意"; } lrm.setResult("项目经理审核结果:" + result); //根据选择的结果和条件来设置下一步 if (a == 1) { if (lrm.getLeaveDays() > 3) { //如果请假天数大于3天,而且项目经理同意了,就提交给部门经理 request.setState(new DepManagerState()); //继续执行下一步工作 request.doWork(); } else { //3天以内的请假,由项目经理做主,就不用提交给部门经理了,转向审核结束状态 request.setState(new AuditOverState()); //继续执行下一步工作 request.doWork(); } } else { //项目经理要是不同意的话,也就不用提交给部门经理了,转向审核结束状态 request.setState(new AuditOverState()); //继续执行下一步工作 request.doWork(); } } } }
[ "timmydargon@sina.com" ]
timmydargon@sina.com
7103a56cb09845ad91e6ce732a2b469ab3c9311e
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/HyperSQL/HyperSQL1645.java
e51a08f88b945c4c5cddc07382d58accbfb9071a
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
581
java
private int findLargestFreeSpace(int spaceId) { int maxFree = 0; int blockIndex = -1; ba.initialise(false); try { for (; ba.nextBlockForTable(spaceId); ) { // find the largest free int currentFree = ba.getFreeBlockValue(); if (currentFree > maxFree) { blockIndex = ba.currentBlockIndex; maxFree = currentFree; } } return blockIndex; } finally { ba.reset(); } }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
420a65412b64c5cdd8b0a20ad25ca79be2fd103a
d2984ba2b5ff607687aac9c65ccefa1bd6e41ede
/src/net/datenwerke/rs/teamspace/service/teamspace/locale/TeamSpaceMessages.java
597b9879dc7a996274609a1877fc670a0204300d
[]
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,600
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.rs.teamspace.service.teamspace.locale; import net.datenwerke.rs.utils.localization.Messages; public interface TeamSpaceMessages extends Messages{ String teamSpaceSecureeName(); String rightTeamSpaceAdminAbbreviation(); String rightTeamSpaceAdminDescription(); String commandTeamspacemod_description(); String commandTeamspacemod_sub_useradd_description(); String commandTeamspacemod_sub_useradd_cflag(); String commandTeamspacemod_sub_useradd_arg1(); String commandTeamspacemod_sub_useradd_arg2(); String commandTeamspacemod_sub_setrole_description(); String commandTeamspacemod_sub_setrole_arg1(); String commandTeamspacemod_sub_setrole_arg2(); String commandTeamspacemod_sub_setrole_arg3(); }
[ "srbala@gmail.com" ]
srbala@gmail.com
ba3c1a9fd98c33e32b86f523ced3a9e9e61815ad
eb2c22492d4740a3eb455f2a898f6b3bc8235809
/jnnsBank/kyc-api/src/main/java/com/ideatech/ams/kyc/service/DirectorService.java
5d481b91a824d7422654423587cdf12dc8b8be81
[]
no_license
deepexpert-gaohz/sa-d
72a2d0cbfe95252d2a62f6247e7732c883049459
2d14275071b3d562447d24bd44d3a53f5a96fb71
refs/heads/master
2023-03-10T08:39:15.544657
2021-02-24T02:17:58
2021-02-24T02:17:58
341,395,351
1
0
null
null
null
null
UTF-8
Java
false
false
217
java
package com.ideatech.ams.kyc.service; import com.ideatech.ams.kyc.dto.DirectorDto; import java.util.List; public interface DirectorService { void insertBatch(Long saicInfoId, List<DirectorDto> directorList); }
[ "807661486@qq.com" ]
807661486@qq.com
c1d782e7189337e4a492915cb60fb5c32ea67a93
2216a8c20377a034384f0725abee4cabd0163996
/app/src/main/java/com/withustudy/zikao/WelcomeActivity.java
5537d801cec441d7e3a43a11b8a62792c1657a39
[]
no_license
Rachel-hsw/ComputerTest
89f6db428ef6357d98ce0a112b154709bb4e0125
4bdd644a39c24a1fb0dfb7462731fa4d61e7e766
refs/heads/master
2020-07-04T16:02:52.455299
2019-08-14T10:50:58
2019-08-14T10:50:58
202,331,561
0
0
null
null
null
null
UTF-8
Java
false
false
798
java
package com.withustudy.zikao; import android.content.Intent; import android.view.View; import android.widget.ImageView; public class WelcomeActivity extends AbsBaseActivity { private ImageView image; private ImageView image1; @Override public void initView() { super.initView(); this.image = ((ImageView) findViewById(R.id.image_welcome)); this.image1 = ((ImageView) findViewById(R.id.image_welcome1)); image.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(WelcomeActivity.this,GuideActivity.class)); } }); } @Override public void setContentView() { setContentView(R.layout.activity_welcome); } }
[ "1623404291@qq.com" ]
1623404291@qq.com
d94db2667741b67f1d1fcea9c015b9f6c958b8af
c4b94158b0ac8f1c4f3d535b6cdee5d1639743ce
/Java/543__Diameter_of_Binary_Tree.java
890b7ec15b489016a6e9bdbe107edfd3f23f4eb0
[]
no_license
FIRESTROM/Leetcode
fc61ae5f11f9cb7a118ae7eac292e8b3e5d10e41
801beb43235872b2419a92b11c4eb05f7ea2adab
refs/heads/master
2020-04-04T17:40:59.782318
2019-08-26T18:58:21
2019-08-26T18:58:21
156,130,665
2
0
null
null
null
null
UTF-8
Java
false
false
611
java
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { int result; public int diameterOfBinaryTree(TreeNode root) { result = 1; helper(root); return result - 1; } private int helper(TreeNode root) { if (root == null) return 0; int depth_l = helper(root.left); int depth_r = helper(root.right); result = Math.max(result, depth_l + depth_r + 1); return 1 + Math.max(depth_l, depth_r); } }
[ "junou_cui@berkeley.edu" ]
junou_cui@berkeley.edu
cf9b7dc218efe5e32a5b6e4cc6f390cc8628842b
71b912e47ad8e73a651c79670a8a9377eaff2110
/lac3/lac3-core/src/main/java/com/linkallcloud/core/pagination/WebPage.java
99aa53429e2bfbedd1b80738bd21254ba30e2f3f
[]
no_license
jasonzhoumj/lac3
5f47cc227e631fd1be201e005ab9f3bbac5431bf
fba08c10693f5745914d446222718cfacec3def9
refs/heads/master
2021-03-28T12:55:26.875522
2020-03-11T01:28:52
2020-03-11T01:28:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,732
java
package com.linkallcloud.core.pagination; import com.alibaba.fastjson.annotation.JSONField; import com.linkallcloud.core.domain.Domain; import com.linkallcloud.core.dt.DtColumn; import com.linkallcloud.core.dt.DtOrder; import com.linkallcloud.core.dt.DtSearch; import com.linkallcloud.core.query.Orderby; import com.linkallcloud.core.query.WebQuery; import java.util.ArrayList; import java.util.List; public class WebPage extends WebQuery { private static final long serialVersionUID = 2387079940133998932L; private int draw; // 当前记录位置 private int start; // 每页记录数 private int length; // 总记录数 private long recordsTotal; private long recordsFiltered; // 查询结果 private List<Object> data; /* 是否重新查询总记录数(默认 true) */ @JSONField(serialize = false) private boolean searchCount = true; @JSONField(serialize = false) private DtSearch search; @JSONField(serialize = false) private List<DtOrder> order = new ArrayList<DtOrder>(); @JSONField(serialize = false) private List<DtColumn> columns = new ArrayList<DtColumn>(); public WebPage() { super(); } public WebPage(int start, int length) { super(); this.start = start < 0 ? 0 : start; this.length = length < 1 ? 1 : length; } public <E extends Domain> Page<E> toPage() { Page<E> page = new Page<E>(); WebQuery.copyWebQueryFields2Query(this, page); WebPage.copyWebPageFields2Page(this, page); return page; } public <E> CPage<E> toCPage() { CPage<E> page = new CPage<E>(); WebQuery.copyWebQueryFields2Query(this, page); WebPage.copyWebPageFields2CPage(this, page); return page; } private static <E> void copyWebPageFields2CPage(WebPage src, CPage<E> dest) { if (src == null || dest == null) { return; } dest.setDraw(src.getDraw()); dest.setStart(src.getStart()); dest.setLength(src.getLength()); dest.setRecordsTotal(src.getRecordsTotal()); dest.setRecordsFiltered(src.getRecordsFiltered()); // dest.addDataAll(src.getData()); dest.setSearchCount(src.isSearchCount()); dest.setOrderby(src.getWebOrderby()); } public static <E extends Domain> void copyWebPageFields2Page(WebPage src, Page<E> dest) { if (src == null || dest == null) { return; } dest.setDraw(src.getDraw()); dest.setStart(src.getStart()); dest.setLength(src.getLength()); dest.setRecordsTotal(src.getRecordsTotal()); dest.setRecordsFiltered(src.getRecordsFiltered()); // dest.addDataAll(src.getData()); dest.setSearchCount(src.isSearchCount()); dest.setOrderby(src.getWebOrderby()); } public int getDraw() { return draw; } public void setDraw(int draw) { this.draw = draw; } public int getStart() { return start; } public void setStart(int start) { this.start = start; } public int getLength() { return length; } public void setLength(int length) { this.length = length; } public long getRecordsTotal() { return recordsTotal; } public void setRecordsTotal(long recordsTotal) { this.recordsTotal = recordsTotal; } public long getRecordsFiltered() { return recordsFiltered; } public void setRecordsFiltered(long recordsFiltered) { this.recordsFiltered = recordsFiltered; } public void addDataAll(List<?> d) { if (d == null || d.isEmpty()) { return; } if (this.data == null) { this.data = new ArrayList<Object>(); } this.data.addAll(d); } public List<Object> getData() { return data; } public void setData(List<Object> data) { this.data = data; } public boolean isSearchCount() { return searchCount; } public void setSearchCount(boolean searchCount) { this.searchCount = searchCount; } public DtSearch getSearch() { return search; } public void setSearch(DtSearch search) { this.search = search; } public List<DtOrder> getOrder() { return order; } public void setOrder(List<DtOrder> order) { this.order = order; } public List<DtColumn> getColumns() { return columns; } public void setColumns(List<DtColumn> columns) { this.columns = columns; } public Orderby getWebOrderby() { if (getOrderby() != null && getOrderby().isOrderBySetted()) { return getOrderby(); } else if (getOrder() != null && !getOrder().isEmpty()) { return getOrder().get(0).toOrderby(getColumns(), isMapUnderscoreToCamelCase()); } return null; } @Override @JSONField(serialize = false) public String[] getOrdersSqlFrags() { if (getOrder() != null && !getOrder().isEmpty()) { List<String> orderSqlFrags = new ArrayList<String>(); for (DtOrder order : getOrder()) { String orderSql = order.getOrderSql(getColumns(), isMapUnderscoreToCamelCase()); orderSqlFrags.add(orderSql); } return orderSqlFrags.toArray(new String[orderSqlFrags.size()]); } else if (getOrderby() != null && getOrderby().isOrderBySetted()) { return getOrderby().getOrderSqls(isMapUnderscoreToCamelCase()); } return null; } }
[ "838485220@qq.com" ]
838485220@qq.com
66bf7aaaa625b323893cb4e8f644f1e0e1af8c1f
ab23280f5e8283a20fd90a970bef899d51a2243c
/app/src/test/java/iambedoy/oliveoil/ExampleUnitTest.java
2cf1ef94a2bd07b82e4cbc0e4fe20aa464190630
[ "Apache-2.0" ]
permissive
cbedoy/OliverOil
05f64d20da247c76c26e56626984f693967b1fb0
0111fb4e8f15bda99513617e73e9bc2e145e8948
refs/heads/master
2021-07-20T18:28:33.391159
2017-10-27T02:38:05
2017-10-27T02:38:05
108,490,169
0
0
null
null
null
null
UTF-8
Java
false
false
1,186
java
package iambedoy.oliveoil; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runner.Runner; import org.mockito.junit.MockitoJUnitRunner; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(MockitoJUnitRunner.class) public class ExampleUnitTest { @Test public void shouldReturnNotNullInstancesAfterInject() throws Exception { OilInjector.inject( BaseInteractor.class, BasePresenter.class, BaseViewController.class ); BaseInteractor interactor = (BaseInteractor) OilInjector .getInstanceFromClass(BaseInteractor.class); BasePresenter presenter = (BasePresenter) OilInjector .getInstanceFromClass(BasePresenter.class); BaseViewController viewController = (BaseViewController) OilInjector .getInstanceFromClass(BaseViewController.class); assertNotNull(interactor); assertNotNull(presenter); assertNotNull(viewController); } }
[ "carlos.bedoy@gmail.com" ]
carlos.bedoy@gmail.com
38fe9e82e9d186d8060f256ceec14624f72b33ce
cc511ceb3194cfdd51f591e50e52385ba46a91b3
/example/source_code/2937fd845f88cb9b85d8853d5d1bb930506c5086/jackrabbit/src/main/java/org/apache/jackrabbit/core/fs/db/DB2FileSystem.java
034776147344f0159108c8c169e9cfdc80ec7bf6
[]
no_license
huox-lamda/testing_hw
a86cdce8d92983e31e653dd460abf38b94a647e4
d41642c1e3ffa298684ec6f0196f2094527793c3
refs/heads/master
2020-04-16T19:24:49.643149
2019-01-16T15:47:13
2019-01-16T15:47:13
165,858,365
3
3
null
null
null
null
UTF-8
Java
false
false
4,806
java
org apach jackrabbit core java sql sql except sqlexcept java util link list linkedlist java util list code db2filesystem code jdbc base code filesystem code implement jackrabbit persist file system entri db2 databas configur properti code driver code fqn jdbc driver class default code ibm db2 jcc db2driver code code schema code type schema default code db2 code code url code databas url code jdbc db2 databas code code user code databas user code password code user' password code schemaobjectprefix code prefix prepend schema object link dbfilesystem fragment sampl configur pre filesystem class org apach jackrabbit core db2filesystem param url jdbc db2 test param schemaobjectprefix rep filesystem pre db2 file system db2filesystem file system dbfilesystem creat code db2filesystem code instanc db2 file system db2filesystem preset attribut reason default schema db2 driver ibm db2 jcc db2driver schema object prefix schemaobjectprefix user password initi dbfilesystem overrid inheritdoc db2 requir paramet marker select claus explicitli type code cast type code statement chang list init prepar statement initpreparedstat sql except sqlexcept list stmt link list linkedlist stmt add insert file stmt insertfilestmt con prepar statement preparestat insert schema object prefix schemaobjectprefix fsentri fsentri path fsentri fsentri data fsentri lastmod fsentri length valu stmt add insert folder stmt insertfolderstmt con prepar statement preparestat insert schema object prefix schemaobjectprefix fsentri fsentri path fsentri fsentri lastmod fsentri length valu stmt add updat data stmt updatedatastmt con prepar statement preparestat updat schema object prefix schemaobjectprefix fsentri set fsentri data fsentri lastmod fsentri length fsentri path fsentri fsentri data null stmt add updat modifi stmt updatelastmodifiedstmt con prepar statement preparestat updat schema object prefix schemaobjectprefix fsentri set fsentri lastmod fsentri path fsentri fsentri data null stmt add select exist stmt selectexiststmt con prepar statement preparestat select schema object prefix schemaobjectprefix fsentri fsentri path fsentri stmt add select file exist stmt selectfileexiststmt con prepar statement preparestat select schema object prefix schemaobjectprefix fsentri fsentri path fsentri fsentri data null stmt add select folder exist stmt selectfolderexiststmt con prepar statement preparestat select schema object prefix schemaobjectprefix fsentri fsentri path fsentri fsentri data null stmt add select file name stmt selectfilenamesstmt con prepar statement preparestat select fsentri schema object prefix schemaobjectprefix fsentri fsentri path fsentri data null stmt add select folder name stmt selectfoldernamesstmt con prepar statement preparestat select fsentri schema object prefix schemaobjectprefix fsentri fsentri path fsentri data null stmt add select file folder name stmt selectfileandfoldernamesstmt con prepar statement preparestat select fsentri schema object prefix schemaobjectprefix fsentri fsentri path stmt add select child count stmt selectchildcountstmt con prepar statement preparestat select count fsentri schema object prefix schemaobjectprefix fsentri fsentri path stmt add select data stmt selectdatastmt con prepar statement preparestat select fsentri data schema object prefix schemaobjectprefix fsentri fsentri path fsentri fsentri data null stmt add select modifi stmt selectlastmodifiedstmt con prepar statement preparestat select fsentri lastmod schema object prefix schemaobjectprefix fsentri fsentri path fsentri stmt add select length stmt selectlengthstmt con prepar statement preparestat select fsentri length schema object prefix schemaobjectprefix fsentri fsentri path fsentri fsentri data null stmt add delet file stmt deletefilestmt con prepar statement preparestat delet schema object prefix schemaobjectprefix fsentri fsentri path fsentri fsentri data null stmt add delet folder stmt deletefolderstmt con prepar statement preparestat delet schema object prefix schemaobjectprefix fsentri fsentri path fsentri fsentri data null fsentri path fsentri path stmt add copi file stmt copyfilestmt con prepar statement preparestat insert schema object prefix schemaobjectprefix fsentri fsentri path fsentri fsentri data fsentri lastmod fsentri length select cast varchar cast varchar fsentri data fsentri lastmod fsentri length schema object prefix schemaobjectprefix fsentri fsentri path fsentri fsentri data null stmt add copi file stmt copyfilesstmt con prepar statement preparestat insert schema object prefix schemaobjectprefix fsentri fsentri path fsentri fsentri data fsentri lastmod fsentri length select cast varchar fsentri fsentri data fsentri lastmod fsentri length schema object prefix schemaobjectprefix fsentri fsentri path fsentri data null stmt
[ "huox@lamda.nju.edu.cn" ]
huox@lamda.nju.edu.cn
c62904a93576872d9bb37f02ff25b11576bf737f
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project71/src/test/java/org/gradle/test/performance71_4/Test71_330.java
ece61d56b06cd3a51e2a6b504467c3b8772b2b3d
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance71_4; import static org.junit.Assert.*; public class Test71_330 { private final Production71_330 production = new Production71_330("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
9a29585aac378f02078931ecc8b791b5293df8b7
84e064c973c0cc0d23ce7d491d5b047314fa53e5
/latest9.8/hej/net/sf/saxon/expr/IntersectionEnumeration.java
7f61f8193f04f9150d0cd7b0b1a8ae8a9d2daaa0
[]
no_license
orbeon/saxon-he
83fedc08151405b5226839115df609375a183446
250c5839e31eec97c90c5c942ee2753117d5aa02
refs/heads/master
2022-12-30T03:30:31.383330
2020-10-16T15:21:05
2020-10-16T15:21:05
304,712,257
1
1
null
null
null
null
UTF-8
Java
false
false
3,999
java
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2017 Saxonica Limited. // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// package net.sf.saxon.expr; import net.sf.saxon.expr.sort.ItemOrderComparer; import net.sf.saxon.om.NodeInfo; import net.sf.saxon.om.SequenceIterator; import net.sf.saxon.trans.XPathException; /** * An enumeration representing a nodeset that is an intersection of two other NodeSets. * This implements the XPath 2.0 operator "intersect". */ public class IntersectionEnumeration implements SequenceIterator { private SequenceIterator e1; private SequenceIterator e2; /*@Nullable*/ private NodeInfo nextNode1 = null; private NodeInfo nextNode2 = null; private ItemOrderComparer comparer; /** * Form an enumeration of the intersection of the nodes in two nodesets * * @param p1 the first operand: must be in document order * @param p2 the second operand: must be in document order * @param comparer Comparer to be used for putting nodes in document order * @throws XPathException if an error occurs, for example reading from the input sequence */ public IntersectionEnumeration(SequenceIterator p1, SequenceIterator p2, ItemOrderComparer comparer) throws XPathException { e1 = p1; e2 = p2; this.comparer = comparer; // move to the first node in each input nodeset nextNode1 = next(e1); nextNode2 = next(e2); } /** * Get the next item from one of the input sequences, * checking that it is a node. * * @param iter the iterator from which the next item is to be taken * @return the next value returned by that iterator * @throws XPathException if a failure occurs reading from the input sequence */ private NodeInfo next(SequenceIterator iter) throws XPathException { return (NodeInfo) iter.next(); // rely on type-checking to prevent a ClassCastException } public NodeInfo next() throws XPathException { // main merge loop: iterate whichever sequence has the lower value, returning when a pair // is found that match. if (nextNode1 == null || nextNode2 == null) { return null; } while (nextNode1 != null && nextNode2 != null) { int c = comparer.compare(nextNode1, nextNode2); if (c < 0) { nextNode1 = next(e1); } else if (c > 0) { nextNode2 = next(e2); } else { // keys are equal NodeInfo current = nextNode2; // which is the same as nextNode1 nextNode2 = next(e2); nextNode1 = next(e1); return current; } } return null; } public void close() { e1.close(); e2.close(); } /** * Get properties of this iterator, as a bit-significant integer. * * @return the properties of this iterator. This will be some combination of * properties such as {@link SequenceIterator#GROUNDED}, {@link SequenceIterator#LAST_POSITION_FINDER}, * and {@link SequenceIterator#LOOKAHEAD}. It is always * acceptable to return the value zero, indicating that there are no known special properties. * It is acceptable for the properties of the iterator to change depending on its state. */ public int getProperties() { return 0; } }
[ "oneil@saxonica.com" ]
oneil@saxonica.com
d885bffceb775596f53809f02cba551a5519b10b
ecfce997b3d9abdf786e50a031f0818bf089cedf
/src/main/java/com/ms/shiro/service/impl/INI4j.java
ecea4887982c3196f06b409a686c1f615b343f2d
[]
no_license
viewolspace/invite_ms
c6f94bed4fa29c99e7b4d4973ddd88a81ecbcfb9
9ebde64d4d79bb39d617b40630ca510b92f8f9a4
refs/heads/master
2020-05-25T06:25:08.859621
2019-06-14T01:56:04
2019-06-14T01:56:04
187,667,854
0
0
null
null
null
null
UTF-8
Java
false
false
2,392
java
package com.ms.shiro.service.impl; import org.springframework.core.io.ClassPathResource; import java.io.*; import java.util.LinkedHashMap; import java.util.Map; public class INI4j { /** * 用linked hash map 来保持有序的读取 */ final LinkedHashMap<String, LinkedHashMap<String, String>> coreMap = new LinkedHashMap<>(); /** * 当前Section的引用 */ String currentSection = null; public INI4j(File file) throws FileNotFoundException { this.init(new BufferedReader(new FileReader(file))); } public INI4j(String path) throws FileNotFoundException { this.init(new BufferedReader(new FileReader(path))); } public INI4j(ClassPathResource source) throws IOException { this(source.getFile()); } void init(BufferedReader bufferedReader) { try { read(bufferedReader); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("IO Exception:" + e); } } void read(BufferedReader reader) throws IOException { String line = null; while ((line = reader.readLine()) != null) { parseLine(line); } } void parseLine(String line) { line = line.trim(); // 此部分为注释 if (line.matches("^\\#.*$")) { return; } else if (line.matches("^\\[\\S+\\]$")) { String section = line.replaceFirst("^\\[(\\S+)\\]$", "$1"); addSection(section); } else if (line.matches("^\\S+=.*$")) { int i = line.indexOf("="); String key = line.substring(0, i).trim(); String value = line.substring(i + 1).trim(); addKeyValue(currentSection, key, value); } } void addKeyValue(String currentSection, String key, String value) { if (!coreMap.containsKey(currentSection)) { return; } Map<String, String> childMap = coreMap.get(currentSection); childMap.put(key, value); } void addSection(String section) { if (!coreMap.containsKey(section)) { currentSection = section; LinkedHashMap<String, String> childMap = new LinkedHashMap<String, String>(); coreMap.put(section, childMap); } } public String get(String section, String key) { if (coreMap.containsKey(section)) { return get(section).containsKey(key) ? get(section).get(key) : null; } return null; } public Map<String, String> get(String section) { return coreMap.containsKey(section) ? coreMap.get(section) : null; } public LinkedHashMap<String, LinkedHashMap<String, String>> get() { return coreMap; } }
[ "shileibrave@163.com" ]
shileibrave@163.com
40a9c6cb33b420f6f28bf01b138c46878c33d7a6
9926a6a4ac88171c98b07b848f5861728fd18239
/.history/assignment6_20211017152731.java
15b8a09299952fb5db97ef5b019461d7c402783a
[]
no_license
magikflowz/JavaAssignments
4dadee2f0f23d581f94c998680ab188c1247013c
a4f01f60cedd08dd216841ba98fadac9c09bbe76
refs/heads/master
2023-08-28T13:08:43.877417
2021-11-02T10:47:55
2021-11-02T10:47:55
423,601,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,894
java
/* Programming Assignment 6. CSET 1200. * University of Toledo. * Instructor: Jared Oluoch, Ph.D. * Due Date: Monday October 18, 2021 at 11:59 PM. * Total Points: 20 * * Your program must compile and run to get credit. * If your program does not compile, you may get 0. * If you copy from your classmate, both of you get 0. * If you copy from a website, you get 0. * Your program must have the following information at the top. # Name : Anthony Urbina # Class: CSET 1200 # Instructor: Dr. Jared Oluoch # Programming Assignment: 5 # Date: 10/17/2021 # Summary: A brief description of what the program does # The TA for this class is Bibek Poudel (bibek.poudel@rockets.utoledo.edu). Please reach out to him if you have questions about the assignment. # You must put this line as a comment at the top of your Java source file. “This code is my own work. I did not get any help from any online source such as chegg.com; from a classmate, or any other person other than the instructor or TA for this course. I understand that getting outside help from this course other than from the instructor or TA will result in a grade of 0 in this assignment and other disciplinary actions for academic dishonesty.” **/ import java.util.*; public class assignment6 { public static void main(String[] args){ int[] bills = new int[12]; int[] gas = new int[12]; int[] internet = new int[12]; Scanner keyboard = new Scanner(System.in); for (int i=0; i<12; i++){ System.out.println("What is your gas bill: "); gas[i] = keyboard.nextInt(); } for (int i=0; i<12; i++){ System.out.println("What is your internet bill: "); internet[i] = keyboard.nextInt(); } } public static int getmim(int[] bill){ pass; } }
[ "75277480+ImNotMagik@users.noreply.github.com" ]
75277480+ImNotMagik@users.noreply.github.com
c9c0eefdbdab24e9d80d15db2bf403dc4afe3699
d28749370f041343f29ab48ef7cfe2e3b7032d28
/src/com/wicloud/main/java/web/ActivityWeb.java
097929cb6fcd4c46563d57231cd9d12ea0262e85
[]
no_license
china4sq/wizone
e3f45ae31e9c960765e3eb99ab6afdcbb84fbb1c
4cd8f4edb43027bf0c5c933c40a3fc1615b75759
refs/heads/master
2021-01-22T18:02:18.492359
2017-09-11T05:55:09
2017-09-11T05:55:09
85,046,996
1
1
null
null
null
null
UTF-8
Java
false
false
1,205
java
package com.wicloud.main.java.web; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.wicloud.main.java.service.ActivityService; @Controller @RequestMapping(value = "/activity") public class ActivityWeb { @Autowired private ActivityService activityService; @ResponseBody @RequestMapping(value = "/getAll/") public String getAll(HttpServletRequest request) { int kaishi = 0, jieshu = 0; String time = request.getParameter("kaishi"); if(time != null) { kaishi = Integer.parseInt(time); } time = request.getParameter("jieshu"); if(time != null) { jieshu = Integer.parseInt(time); } return activityService.getAll(kaishi,jieshu); } @ResponseBody @RequestMapping(value = "/weekActivity/") public String weekActivity(HttpServletRequest request) { int jieshu = 0; String time = request.getParameter("jieshu"); if(time != null) { jieshu = Integer.parseInt(time); } return activityService.getweekActivity(jieshu); } }
[ "xiangflight@foxmail.com" ]
xiangflight@foxmail.com
a8902c8769b8d61b647dadc8394355634c5c1ae2
54c34a97a718289402e12c63a9c66857dd92fd1a
/system/model/src/main/java/com/microsys/app/model/entity/common/MicPhoneCust.java
22b61b13dbdc1d7653be82c45564c54506ef27a0
[]
no_license
AbhideepRND/invoice
de99ba91da5df44f7912e2c187e5fe65f7617a27
bf12b8017b9da9b494c182e8b65deabd85bf5fb5
refs/heads/master
2021-07-08T11:28:01.648321
2017-10-01T16:53:50
2017-10-01T16:53:50
33,485,705
0
0
null
null
null
null
UTF-8
Java
false
false
2,990
java
package com.microsys.app.model.entity.common; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.NamedQuery; import javax.persistence.Table; import org.hibernate.annotations.Type; import org.hibernate.annotations.Where; import com.microsys.app.common.audit.BaseAuditEntity; import com.microsys.app.common.customenum.CustCompEnum; import com.microsys.app.common.customenum.PhoneTypeEnum; import com.microsys.app.common.customenum.RecordStatusEnum; import com.microsys.app.common.util.StringUtils; import com.microsys.app.model.entity.MicCustomer; import com.microsys.app.model.entity.customtype.CustCompType; import com.microsys.app.model.entity.customtype.PhoneType; import com.microsys.app.model.entity.customtype.RecordStatusType; /** * The persistent class for the mic_phone database table. * */ @Entity @Table(name = "mic_phone") @NamedQuery(name = "MicPhoneCust.findAll", query = "SELECT m FROM MicPhoneCust m") public class MicPhoneCust extends BaseAuditEntity implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(name = "PHONE_ID") @GeneratedValue(strategy = GenerationType.AUTO) private Long phoneId; @Column(name = "PHONE_NO") private String phoneNo; @Column(name = "PHONE_TYPE") @Type(type = PhoneType.PHONE_TYPE) private PhoneTypeEnum phoneType; @Column(name = "STATUS") @Type(type = RecordStatusType.USER_TYPE) private RecordStatusEnum status; @Column(name = "TYPE") @Type(type = CustCompType.CUST_COMP) @Where(clause = "type = 'CUST'") private CustCompEnum type; @ManyToOne @JoinColumn(name = "TYPE_ID", referencedColumnName = "CUST_ID") private MicCustomer customerPhone; public Long getPhoneId() { return this.phoneId; } public void setPhoneId(Long phoneId) { this.phoneId = phoneId; } public String getPhoneNo() { return this.phoneNo; } public void setPhoneNo(String phoneNo) { this.phoneNo = phoneNo; } public PhoneTypeEnum getPhoneType() { return this.phoneType; } public void setPhoneType(PhoneTypeEnum phoneType) { this.phoneType = phoneType; } public RecordStatusEnum getStatus() { return this.status; } public void setStatus(RecordStatusEnum status) { this.status = status; } public MicCustomer getCustomerPhone() { return this.customerPhone; } public void setCustomerPhone(MicCustomer customerPhone) { this.customerPhone = customerPhone; } public boolean equals(MicPhoneCust obj) { return this.phoneId == obj.getPhoneId() ? true : false; } public CustCompEnum getType() { return type; } public void setType(CustCompEnum type) { this.type = type; } @Override public int hashCode() { return StringUtils.getHashCode(phoneNo) + StringUtils.getHashCode(type.getDbCode()); } }
[ "samtel09@gmail.com" ]
samtel09@gmail.com
a54fa8917abc1ce3dcc2650a3a7a451aca35d1ca
ebd841eaf73e7b6649920f70d770f4e3fba2605b
/src/snaptea/JSDataTransfer.java
50bc6aadaa3c40fcdb6e89445d68ef7780bfd954
[]
no_license
reportmill/TVMTest
ff2afcb01321ffc30ca9063698d24b109dd98ce2
93eb90a41011456a30f987b73a33beaf8be61c3f
refs/heads/main
2023-06-16T03:58:12.762056
2021-07-15T18:44:27
2021-07-15T18:44:27
386,008,714
2
1
null
2021-07-15T18:44:27
2021-07-14T16:40:29
Java
UTF-8
Java
false
false
5,333
java
package snaptea; import org.teavm.jso.JSObject; import org.teavm.jso.JSProperty; import org.teavm.jso.core.JSArray; import org.teavm.jso.core.JSArrayReader; import org.teavm.jso.core.JSString; import org.teavm.jso.dom.html.HTMLElement; /** * DataTransfer is used to hold the data that is being dragged during a drag and drop operation. It may hold one or more * data items, each of one or more data types. For more information about drag and drop, see HTML Drag and Drop API. */ public interface JSDataTransfer extends JSObject { @JSProperty public JSArray <JSString> getTypes(); /** * Returns the data for a given type. */ public String getData(String aType); /** * Set the data for a given type. If data for the type does not exist, it is added at the end, such that the last item * in the types list will be the new format. If data for the type already exists, the existing data is replaced in the * same position. */ public void setData(String aType, String theData); /** * Returns an array of all the local files available on the data transfer. If the drag operation doesn't involve * dragging files, this property is an empty list. */ @JSProperty public JSArrayReader<File> getFiles(); /** * Sets the image Element element to use for the drag feedback image. */ public void setDragImage(HTMLElement aImg, double xOffset, double yOffset); // The types //String _types[]; // The items //DataTransferItem _items[]; // The Files //File _files[]; /** * Returns whether DataTransfer has given type. */ //public boolean hasType(String aType) //{ // for (String type : getTypes()) // if (type.equals(aType)) // return true; // return false; //} /** * Returns an array of strings giving the formats that were set in the dragstart event. */ //public String[] getTypes() //{ // if (_types!=null) return _types; // int count = getTypeCount(); // _types = new String[count]; // for (int i=0;i<count;i++) _types[i] = getString(getType(i)); // return _types; //} /** Returns the number of types. */ //native int getTypeCount(); /** Returns the number of types. */ //native Object getType(int anIndex); /** Returns data for given type, or empty string if data for type does not exist or data transfer contains no data. */ /*public String getData(String aType) { Object dstr = getDataJSO(aType); return getString(dstr); }*/ /** * Set the data for a given type. If data for the type does not exist, it is added at the end, such that the last item * in the types list will be the new format. If data for the type already exists, the existing data is replaced in the * same position. */ /*public void setData(String aType, String theData); { setDataJSO(aType, theData); _types = null; _items = null; _files = null; }*/ /** Set the data for a given type. */ //native void setDataJSO(String aType, String theData); /** Removes drag op's drag data for given type. If data for given type does not exist, this method does nothing. */ //public native void clearData(String aType); /** * Returns an array of all the local files available on the data transfer. If the drag operation doesn't involve * dragging files, this property is an empty list. */ /*public File[] getFiles() { if (_files!=null) return _files; int count = getFileCount(); _files = new File[count]; for (int i=0;i<count;i++) { _files[i] = new File(); _files[i]._jso = getFileJSO(i); } return _files; }*/ /** Returns an the number of all the local files available on the data transfer. */ //native int getFileCount(); /** Returns an the local files available on the data transfer at given index. */ //native Object getFileJSO(int anIndex); /** Sets the files. */ /*public void setFiles(File ... theFiles) { _files = Arrays.copyOf(theFiles, theFiles.length); }*/ /** * Sets the image Element element to use for the drag feedback image. */ //public native void setDragImage(Element aImg, double xOffset, double yOffset); /** * Returns an array of DataTransferItem objects representing drag data. */ /*public DataTransferItem[] getItems() { if (_items!=null) return _items; int count = getItemCount(); _items = new DataTransferItem[count]; for (int i=0;i<count;i++) { _items[i] = new DataTransferItem(); _items[i]._jso = getItemJSO(i); } return _items; }*/ /** Returns the number of data transfer items. */ //native int getItemCount(); /** Returns the DataTransferItem JSO at index. */ //native Object getItemJSO(int anIndex); /** * Standard toString implementation. */ /*public String toString() { StringBuilder sb = new StringBuilder("DataTransfer { Types:["); String types[] = getTypes(); for (String type : types) { if (type!=types[0]) sb.append(", "); sb.append(type); } sb.append(" ] }"); return sb.toString(); }*/ }
[ "jeff@reportmill.com" ]
jeff@reportmill.com
3a671282dcbbd9d3e0fb7271cfd1ad51d34de29f
2b4d9930cea7fd37736f2b539d8da030d9d110ac
/src/test/java/ch/ethz/idsc/tensor/alg/TensorMapTest.java
91e87849a68355678d82a538f60b283b97dce47f
[]
no_license
amodeus-science/tensor
a7540abcf22d93464b04faa18813bf14cf9279c8
2c30f929dd3dae10ab813371c1c9748cbe1f2d35
refs/heads/master
2022-12-31T10:36:25.815391
2020-05-07T09:32:28
2020-05-07T09:32:28
261,510,649
1
5
null
2020-10-13T21:48:36
2020-05-05T15:29:47
Java
UTF-8
Java
false
false
2,956
java
// code by jph package ch.ethz.idsc.tensor.alg; import java.util.Arrays; import ch.ethz.idsc.tensor.RealScalar; import ch.ethz.idsc.tensor.Scalars; import ch.ethz.idsc.tensor.Tensor; import ch.ethz.idsc.tensor.Tensors; import ch.ethz.idsc.tensor.io.ResourceData; import ch.ethz.idsc.tensor.opt.TensorScalarFunction; import ch.ethz.idsc.tensor.opt.TensorUnaryOperator; import ch.ethz.idsc.tensor.red.Total; import ch.ethz.idsc.tensor.sca.Increment; import junit.framework.TestCase; public class TensorMapTest extends TestCase { public void testUnmodifiable() { Tensor matrix = Array.zeros(3, 1).unmodifiable(); try { TensorMap.of(s -> { s.set(RealScalar.ONE, 0); return s; }, matrix, 1); fail(); } catch (Exception exception) { // --- } assertEquals(matrix, Array.zeros(3, 1)); } public void testTotal() { Tensor tensor = Tensors.fromString("{{1, 2, 3}, {4, 5}}"); Tensor result = TensorMap.of(Total::of, tensor, 1); assertEquals(result, Tensors.vector(6, 9)); } public void testIrregular() { Tensor array = Tensors.fromString("{{1, 2, 3}, {8, 9}}"); Tensor result = TensorMap.of(row -> Total.of(row), array, 1); assertEquals(array, Tensors.fromString("{{1, 2, 3}, {8, 9}}")); assertEquals(result, Tensors.vector(6, 17)); } public void testModifiable() { Tensor matrix = Array.zeros(3, 1); Tensor blub = TensorMap.of(s -> { s.set(RealScalar.ONE, 0); return s; }, matrix, 1); assertEquals(matrix, Array.zeros(3, 1).map(Increment.ONE)); assertEquals(matrix, blub); assertFalse(matrix == blub); } public void testImageTUO() { TensorUnaryOperator tensorUnaryOperator = rgba -> { if (Scalars.isZero(rgba.Get(0))) return Tensors.vector(255, 248, 198, 255); return rgba; }; Tensor tensor = ResourceData.of("/io/image/rgba15x33.png"); assertEquals(Dimensions.of(tensor), Arrays.asList(33, 15, 4)); Tensor result = TensorMap.of(tensorUnaryOperator, tensor, 2); assertEquals(Dimensions.of(result), Arrays.asList(33, 15, 4)); } public void testImageTSF() { TensorScalarFunction tensorScalarFunction = rgba -> { if (Scalars.isZero(rgba.Get(0))) return RealScalar.ONE; return RealScalar.ZERO; }; Tensor tensor = ResourceData.of("/io/image/rgba15x33.png"); assertEquals(Dimensions.of(tensor), Arrays.asList(33, 15, 4)); Tensor result = TensorMap.of(tensorScalarFunction, tensor, 2); assertEquals(Dimensions.of(result), Arrays.asList(33, 15)); } public void testScalar() { Tensor result = TensorMap.of(RealScalar.ONE::add, RealScalar.ONE, 0); assertEquals(result, RealScalar.of(2)); } public void testNegativeFail() { Tensor tensor = Tensors.fromString("{{1, 2, 3}, {4, 5, 6}}"); try { TensorMap.of(Total::of, tensor, -1); fail(); } catch (Exception exception) { // --- } } }
[ "jan.hakenberg@gmail.com" ]
jan.hakenberg@gmail.com
75165ed465af0509bc3e0844599f355c170f670a
14018ecc70b43d4f5d218fe0fd1e78e6ca60ba54
/src/utility/Conversion.java
418fdfee5674df1c6f403e1d53b022064173c8df
[]
no_license
amolujagare123/POM-9pm-july21
499b487238268d7ce423af15c7f5978b998806c8
3b229ed0c8f191c29504519b7bb046eb6847ff6b
refs/heads/master
2023-07-04T15:07:17.251330
2021-08-05T16:37:12
2021-08-05T16:37:12
390,420,915
0
0
null
null
null
null
UTF-8
Java
false
false
1,329
java
package utility; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Conversion { public static String convertCountry(String shortCounty) { String fullFormCountry=""; switch (shortCounty) { case "IN" : fullFormCountry = "India";break; case "AF" : fullFormCountry = "Afghanistan";break; case "CN" : fullFormCountry = "China";break; case "AO" : fullFormCountry = "Angola";break; case "IE" : fullFormCountry = "Ireland";break; } return fullFormCountry; } public static String genderConversion(String genderID) { String gender =""; switch (genderID) { case "0" : gender="Male";break; case "1" : gender="Feale";break; case "2" : gender="Other";break; } return gender; } /* Expected :01/05/1982 --> MM/dd/yyyy Actual :1982-01-05*/ // --> yyyy-MM-dd public static String convertDate(String dbDate) throws ParseException // yyyy-dd-MM { String convertedDate = ""; Date date = new SimpleDateFormat("yyyy-MM-dd").parse(dbDate); convertedDate = new SimpleDateFormat("MM/dd/yyyy").format(date); return convertedDate; } }
[ "amolujagare@gmail.com" ]
amolujagare@gmail.com
749d0583f14c2d168722d84f7e984155990be017
c8db4b8a20aa52c196e7d2a7695e1c863ae97844
/allWSMath/src/webservices/SumResponse.java
06715a79e875bd144ad693e11b819fd029a5b6f2
[]
no_license
carledwin/k19Git
c8df92f53b081dc3aa97bc2a8211a1a2d293f746
3fa80715a1eeddfdb50815d8707da61dbb2abb1a
refs/heads/master
2016-09-08T02:04:35.842356
2014-08-22T11:29:22
2014-08-22T11:29:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,215
java
package webservices; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for sumResponse complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="sumResponse"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}double"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "sumResponse", propOrder = { "_return" }) public class SumResponse { @XmlElement(name = "return") protected double _return; /** * Gets the value of the return property. * */ public double getReturn() { return _return; } /** * Sets the value of the return property. * */ public void setReturn(double value) { this._return = value; } }
[ "carlinstr@gmail.com" ]
carlinstr@gmail.com
6b1064e6038c365a1c2fec7e6e8ab6e374c58fce
778da6dbb2eb27ace541338d0051f44353c3f924
/src/main/java/com/espertech/esper/epl/expression/baseagg/ExprAggregateNodeParamDesc.java
465a3fc6b36d27796cd1a0e2b53a24414ba10f23
[]
no_license
jiji87432/ThreadForEsperAndBenchmark
daf7188fb142f707f9160173d48c2754e1260ec7
fd2fc3579b3dd4efa18e079ce80d3aee98bf7314
refs/heads/master
2021-12-12T02:15:18.810190
2016-12-01T12:15:01
2016-12-01T12:15:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,429
java
/* * ************************************************************************************* * Copyright (C) 2006-2015 EsperTech, Inc. All rights reserved. * * http://www.espertech.com/esper * * http://www.espertech.com * * ---------------------------------------------------------------------------------- * * The software in this package is published under the terms of the GPL license * * a copy of which has been included with this distribution in the license.txt file. * * ************************************************************************************* */ package com.espertech.esper.epl.expression.baseagg; import com.espertech.esper.epl.expression.core.ExprNode; public class ExprAggregateNodeParamDesc { private final ExprNode[] positionalParams; private final ExprAggregateLocalGroupByDesc optLocalGroupBy; public ExprAggregateNodeParamDesc(ExprNode[] positionalParams, ExprAggregateLocalGroupByDesc optLocalGroupBy) { this.positionalParams = positionalParams; this.optLocalGroupBy = optLocalGroupBy; } public ExprNode[] getPositionalParams() { return positionalParams; } public ExprAggregateLocalGroupByDesc getOptLocalGroupBy() { return optLocalGroupBy; } }
[ "qinjie2012@163.com" ]
qinjie2012@163.com
9dbc22cfa33a3aab7848b94cb504f95f410326f1
1f7a8a0a76e05d096d3bd62735bc14562f4f071a
/NeverPuk/net/z/tl.java
2acd7105473fe0841c8cd6c0596887c497678538
[]
no_license
yunusborazan/NeverPuk
b6b8910175634523ebd4d21d07a4eb4605477f46
a0e58597858de2fcad3524daaea656362c20044d
refs/heads/main
2023-05-10T09:08:02.183430
2021-06-13T17:17:50
2021-06-13T17:17:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,935
java
package net.z; import net.xn; import net.z.g; import net.z.m; public class tl extends m { private float B; public boolean W; private final net.nr.d q; private final float I; private final float C; public tl(int var1, int var2, int var3, net.nr.d var4) { this(var1, var2, var3, var4, 0.0F, 1.0F); } public tl(int var1, int var2, int var3, net.nr.d var4, float var5, float var6) { super(var1, var2, var3, 150, 20, ""); this.B = 1.0F; this.q = var4; this.I = var5; this.C = var6; net.nn.j var7 = net.nn.j.b(); this.B = var4.f(var7.T.T(var4)); this.J = var7.T.L(var4); } protected int O(boolean var1) { return 0; } protected void N(net.nn.j var1, int var2, int var3) { boolean var4 = g.C(); if(this.F) { if(this.W) { this.B = (float)(var2 - (this.D + 4)) / (float)(this.s - 8); this.B = net.u.t.T(this.B, 0.0F, 1.0F); float var5 = this.q.y(this.B); var1.T.N(this.q, var5); this.B = this.q.f(var5); this.J = var1.T.L(this.q); } var1.n().E(b); net.y.d.T(1.0F, 1.0F, 1.0F, 1.0F); this.g(this.D + (int)(this.B * (float)(this.s - 8)), this.R, 0, 66, 4, 20); this.g(this.D + (int)(this.B * (float)(this.s - 8)) + 4, this.R, 196, 66, 4, 20); } } public boolean X(net.nn.j var1, int var2, int var3) { boolean var4 = g.B(); if(super.X(var1, var2, var3)) { this.B = (float)(var2 - (this.D + 4)) / (float)(this.s - 8); this.B = net.u.t.T(this.B, 0.0F, 1.0F); var1.T.N(this.q, this.q.y(this.B)); this.J = var1.T.L(this.q); this.W = true; return true; } else { return false; } } public void A(int var1, int var2) { this.W = false; } private static xn c(xn var0) { return var0; } }
[ "68544940+Lazy-Hero@users.noreply.github.com" ]
68544940+Lazy-Hero@users.noreply.github.com
ebb2ef7349e47b37e411302e5114186ed9b64bc6
746572ba552f7d52e8b5a0e752a1d6eb899842b9
/JDK8Source/src/main/java/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java
b2f4545d4b4baa1bfc786b6f9f8f8fa3a42bc17a
[]
no_license
lobinary/Lobinary
fde035d3ce6780a20a5a808b5d4357604ed70054
8de466228bf893b72c7771e153607674b6024709
refs/heads/master
2022-02-27T05:02:04.208763
2022-01-20T07:01:28
2022-01-20T07:01:28
26,812,634
7
5
null
null
null
null
UTF-8
Java
false
false
3,761
java
/***** Lobxxx Translate Finished ******/ /* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright 2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * <p> *  版权所有2005 Apache软件基金会。 * *  根据Apache许可证2.0版("许可证")授权;您不能使用此文件,除非符合许可证。您可以通过获取许可证的副本 * *  http://www.apache.org/licenses/LICENSE-2.0 * *  除非适用法律要求或书面同意,否则根据许可证分发的软件按"原样"分发,不附带任何明示或暗示的担保或条件。请参阅管理许可证下的权限和限制的特定语言的许可证。 * */ package com.sun.org.apache.xerces.internal.jaxp.validation; import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; /** * <p>A container for grammar pools which only contain schema grammars.</p> * * <p> *  <p>只包含模式语法的语法池容器。</p> * * * @author Michael Glavassevich, IBM * @version $Id: XSGrammarPoolContainer.java,v 1.6 2010-11-01 04:40:08 joehw Exp $ */ public interface XSGrammarPoolContainer { /** * <p>Returns the grammar pool contained inside the container.</p> * * <p> *  <p>返回容器中包含的语法池。</p> * * * @return the grammar pool contained inside the container */ public XMLGrammarPool getGrammarPool(); /** * <p>Returns whether the schema components contained in this object * can be considered to be a fully composed schema and should be * used to the exclusion of other schema components which may be * present elsewhere.</p> * * <p> *  <p>返回此对象中包含的模式组件是否可以被认为是完全组合的模式,应该用于排除其他可能存在的其他模式组件。</p> * * * @return whether the schema components contained in this object * can be considered to be a fully composed schema */ public boolean isFullyComposed(); /** * Returns the initial value of a feature for validators created * using this grammar pool container or null if the validators * should use the default value. * <p> *  返回使用此语法池容器创建的验证器的要素的初始值,如果验证器应使用默认值,则返回null。 * */ public Boolean getFeature(String featureId); /* * Set a feature on the schema * <p> *  在模式上设置一个功能 * */ public void setFeature(String featureId, boolean state); /** * Returns the initial value of a property for validators created * using this grammar pool container or null if the validators * should use the default value. * <p> *  返回使用此语法池容器创建的验证器的属性的初始值,如果验证器应使用默认值,则返回null。 * */ public Object getProperty(String propertyId); /* * Set a property on the schema * <p> *  在模式上设置属性 */ public void setProperty(String propertyId, Object state); }
[ "919515134@qq.com" ]
919515134@qq.com
02c7eaa8542364ef23db38e19cf9cfb115950bae
365aefb818d81241ba603e311e6e840658c0e268
/Mmt/src/com/repair/allcase/detail/FetchDetailTask.java
d79b183f1ddf960d27d90ed123a5edec876e54bb
[]
no_license
github188/Android-171017
a5839fb173b7866bece594c7250ba4c9e3cd7ede
bafd2f0be41e0796f515b5ad3a90ce4fec90eead
refs/heads/master
2021-04-26T22:11:36.438877
2017-10-20T09:06:06
2017-10-20T09:06:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,479
java
package com.repair.allcase.detail; import android.content.Context; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.mapgis.mmt.common.util.BaseClassUtil; import com.mapgis.mmt.common.util.NetUtil; import com.mapgis.mmt.config.ServerConnectConfig; import com.mapgis.mmt.entity.ResultData; import com.mapgis.mmt.global.MmtBaseTask; import com.repair.entity.CaseFullyDetail; public class FetchDetailTask extends MmtBaseTask<String, Integer, ResultData<CaseFullyDetail>> { public FetchDetailTask(Context context, boolean showLoading, OnWxyhTaskListener<ResultData<CaseFullyDetail>> listener) { super(context, showLoading, listener); } @Override protected ResultData<CaseFullyDetail> doInBackground(String... params) { ResultData<CaseFullyDetail> data = null; try { String url = ServerConnectConfig.getInstance().getBaseServerPath() + "/Services/Zondy_MapGISCitySvr_MobileBusiness/REST/RepairStandardRest.svc/FetchCaseDetail"; String json = NetUtil.executeHttpGet(url, "caseID", params[0]); if (BaseClassUtil.isNullOrEmptyString(json)) { return null; } data = new Gson().fromJson(json, new TypeToken<ResultData<CaseFullyDetail>>() { }.getType()); } catch (Exception e) { e.printStackTrace(); } return data; } }
[ "shoubei_2007@126.com" ]
shoubei_2007@126.com
bd7bd928acff850c2f02200b7bc3efa2296186cf
a715e8312a90d099b72c24e5b7da1372c9fe67fb
/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/controlflow/BooleanExpressionMayBeConditionalInspection.java
c5aac405b23f80c2c08c898cd05aba6179b03585
[ "Apache-2.0" ]
permissive
wiltonlazary/bugvm-studio
ff98c1beca1f890013aa05ecd67f137a14a70c32
5861389424a51181c58178576c78cf35c0ceb1b5
refs/heads/master
2021-01-24T20:58:41.730805
2015-12-18T19:34:14
2015-12-18T19:34:14
56,322,614
2
1
null
2016-04-15T13:34:56
2016-04-15T13:34:56
null
UTF-8
Java
false
false
6,470
java
/* * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.siyeh.ig.controlflow; import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.openapi.project.Project; import com.intellij.psi.JavaTokenType; import com.intellij.psi.PsiBinaryExpression; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiExpression; import com.intellij.psi.tree.IElementType; import com.siyeh.InspectionGadgetsBundle; import com.siyeh.ig.BaseInspection; import com.siyeh.ig.BaseInspectionVisitor; import com.siyeh.ig.InspectionGadgetsFix; import com.siyeh.ig.PsiReplacementUtil; import com.siyeh.ig.psiutils.BoolUtils; import com.siyeh.ig.psiutils.EquivalenceChecker; import com.siyeh.ig.psiutils.ParenthesesUtils; import com.siyeh.ig.psiutils.SideEffectChecker; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; /** * @author Bas Leijdekkers */ public class BooleanExpressionMayBeConditionalInspection extends BaseInspection { @Nls @NotNull @Override public String getDisplayName() { return InspectionGadgetsBundle.message("boolean.expression.may.be.conditional.display.name"); } @NotNull @Override protected String buildErrorString(Object... infos) { return InspectionGadgetsBundle.message("if.may.be.conditional.problem.descriptor"); } @Override protected InspectionGadgetsFix buildFix(Object... infos) { return new BooleanExpressionMayBeConditionalFix(); } private static class BooleanExpressionMayBeConditionalFix extends InspectionGadgetsFix { @Override @NotNull public String getName() { return InspectionGadgetsBundle.message("if.may.be.conditional.quickfix"); } @NotNull @Override public String getFamilyName() { return getName(); } @Override protected void doFix(Project project, ProblemDescriptor descriptor) { final PsiElement element = descriptor.getPsiElement(); if (!(element instanceof PsiBinaryExpression)) { return; } final PsiBinaryExpression binaryExpression = (PsiBinaryExpression)element; final PsiExpression lhs = ParenthesesUtils.stripParentheses(binaryExpression.getLOperand()); final PsiExpression rhs = ParenthesesUtils.stripParentheses(binaryExpression.getROperand()); if (!(lhs instanceof PsiBinaryExpression) || !(rhs instanceof PsiBinaryExpression)) { return; } final PsiBinaryExpression lBinaryExpression = (PsiBinaryExpression)lhs; final PsiBinaryExpression rBinaryExpression = (PsiBinaryExpression)rhs; final PsiExpression llhs = ParenthesesUtils.stripParentheses(lBinaryExpression.getLOperand()); final PsiExpression lrhs = ParenthesesUtils.stripParentheses(rBinaryExpression.getLOperand()); if (llhs == null || lrhs == null) { return; } final PsiExpression thenExpression = ParenthesesUtils.stripParentheses(lBinaryExpression.getROperand()); final PsiExpression elseExpression = ParenthesesUtils.stripParentheses(rBinaryExpression.getROperand()); if (thenExpression == null || elseExpression == null) { return; } if (BoolUtils.isNegation(llhs) ) { PsiReplacementUtil.replaceExpression(binaryExpression, getText(lrhs) + '?' + getText(elseExpression) + ':' + getText(thenExpression)); } else { PsiReplacementUtil.replaceExpression(binaryExpression, getText(llhs) + '?' + getText(thenExpression) + ':' + getText(elseExpression)); } } private static String getText(@NotNull PsiExpression expression) { return ParenthesesUtils.getText(expression, ParenthesesUtils.CONDITIONAL_PRECEDENCE); } } @Override public BaseInspectionVisitor buildVisitor() { return new BooleanExpressionMayBeConditionalVisitor(); } private static class BooleanExpressionMayBeConditionalVisitor extends BaseInspectionVisitor { @Override public void visitBinaryExpression(PsiBinaryExpression expression) { super.visitBinaryExpression(expression); final IElementType tokenType = expression.getOperationTokenType(); if (!JavaTokenType.OROR.equals(tokenType)) { return; } final PsiExpression lhs = ParenthesesUtils.stripParentheses(expression.getLOperand()); final PsiExpression rhs = ParenthesesUtils.stripParentheses(expression.getROperand()); if (!(lhs instanceof PsiBinaryExpression) || !(rhs instanceof PsiBinaryExpression)) { return; } final PsiBinaryExpression lBinaryExpression = (PsiBinaryExpression)lhs; final PsiBinaryExpression rBinaryExpression = (PsiBinaryExpression)rhs; final IElementType lTokenType = lBinaryExpression.getOperationTokenType(); final IElementType rTokenType = rBinaryExpression.getOperationTokenType(); if (!JavaTokenType.ANDAND.equals(lTokenType) || !JavaTokenType.ANDAND.equals(rTokenType)) { return; } final PsiExpression expression1 = ParenthesesUtils.stripParentheses(lBinaryExpression.getLOperand()); final PsiExpression expression2 = ParenthesesUtils.stripParentheses(rBinaryExpression.getLOperand()); if (expression1 == null || expression2 == null || ParenthesesUtils.stripParentheses(lBinaryExpression.getROperand()) == null || ParenthesesUtils.stripParentheses(rBinaryExpression.getROperand()) == null) { return; } if (EquivalenceChecker.expressionsAreEquivalent(BoolUtils.getNegated(expression1), expression2) && !SideEffectChecker.mayHaveSideEffects(expression2)) { registerError(expression); } else if (EquivalenceChecker.expressionsAreEquivalent(expression1, BoolUtils.getNegated(expression2)) && !SideEffectChecker.mayHaveSideEffects(expression1)) { registerError(expression); } } } }
[ "github@ibinti.com" ]
github@ibinti.com
231f9eb3b806a63a3d78684d138203aa7479f968
87548fa1c3f8906cb5912e5b42a87656e740ff2c
/src/test/java/zx/soft/crm/dao/MemberExpRecordMapperTest.java
61198bbd56f3dbce635d643399c04ea3d8cce6a4
[]
no_license
khaliyo/virtual-users-crm
64b313796ce33e045a2ed510c23a84f0a289b9ab
49712cf92b3460a9ddf4af81ed3e613efb0e3d88
refs/heads/master
2021-01-15T12:09:33.998737
2015-06-17T08:39:20
2015-06-17T08:39:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,699
java
package zx.soft.crm.dao; import static org.junit.Assert.assertEquals; import java.util.Date; import java.util.List; import javax.inject.Inject; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.TransactionConfiguration; import org.springframework.transaction.annotation.Transactional; import zx.soft.crm.dao.MemberExpRecordMapper; import zx.soft.crm.model.MemberExpRecord; import zx.soft.crm.model.RecordQueryCondition; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("/webapp/WEB-INF/applicationContext.xml") @TransactionConfiguration(transactionManager = "transactionManager") @Transactional public class MemberExpRecordMapperTest { static final String memberExpRecord_1 = "MemberExpRecord [uid=1, mid=101, reason=砸金蛋, exp_change=100, create_time=Sun Mar 23 15:22:29 CST 2014]"; static final String memberExpRecord_2 = "MemberExpRecord [uid=1, mid=101, reason=刮刮卡, exp_change=150, create_time=Fri Mar 28 15:23:03 CST 2014]"; @Inject private MemberExpRecordMapper mapper; private final long uid = 1; @Test public void testGetList() { RecordQueryCondition condition = new RecordQueryCondition().setUid(uid).setMid(101); assertEquals(2, mapper.countList(condition)); List<MemberExpRecord> records = mapper.list(condition); assertEquals(2, records.size()); assertEquals(memberExpRecord_1, records.get(0).toString()); } @Test public void testGetList_page() { RecordQueryCondition condition = new RecordQueryCondition().setUid(uid).setMid(101).setPage(2).setPer_page(1); assertEquals(2, mapper.countList(condition)); List<MemberExpRecord> records = mapper.list(condition); assertEquals(1, records.size()); assertEquals(memberExpRecord_2, records.get(0).toString()); } @Test public void testGetList_time() { Date timepoint = new Date(1395590400000L); // 2014-03-24 00:00:00 RecordQueryCondition condition = new RecordQueryCondition().setUid(uid).setMid(101).setStart_time(timepoint); assertEquals(1, mapper.countList(condition)); List<MemberExpRecord> records = mapper.list(condition); assertEquals(memberExpRecord_2, records.get(0).toString()); condition.setStart_time(null).setEnd_time(timepoint); assertEquals(1, mapper.countList(condition)); records = mapper.list(condition); assertEquals(memberExpRecord_1, records.get(0).toString()); } @Test public void testDelete(){ int result = mapper.delete(1, 101); assertEquals(2, result); } }
[ "wanggang@zxisl.com" ]
wanggang@zxisl.com
afdf594dfdf2b07d3de37c1c77731e574210fcde
b3124be5e48bd1feeaa5ef357fcbe931a84f8e28
/httpclient_core_android/src/main/java/apache/http/impl/io/DefaultHttpRequestWriterFactory.java
9ec508378cb625b9ea4bf8b49e72bd43c1f7e69a
[]
no_license
fabletang/sposutils
80fe3d915214b85585d50ea4c4c1bfeca913f36d
65e86e0fd4fc13e23c77bbc3ebc2a0cb072fe5cd
refs/heads/master
2016-09-08T01:44:11.829037
2015-04-20T03:15:32
2015-04-20T03:15:32
23,818,759
0
0
null
null
null
null
UTF-8
Java
false
false
2,313
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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package apache.http.impl.io; import apache.http.io.HttpMessageWriter; import apache.http.io.SessionOutputBuffer; import apache.http.message.BasicLineFormatter; import apache.http.message.LineFormatter; import apache.http.HttpRequest; import apache.http.annotation.Immutable; /** * Default factory for request message writers. * * @since 4.3 */ @Immutable public class DefaultHttpRequestWriterFactory implements apache.http.io.HttpMessageWriterFactory<HttpRequest> { public static final DefaultHttpRequestWriterFactory INSTANCE = new DefaultHttpRequestWriterFactory(); private final LineFormatter lineFormatter; public DefaultHttpRequestWriterFactory(final LineFormatter lineFormatter) { super(); this.lineFormatter = lineFormatter != null ? lineFormatter : BasicLineFormatter.INSTANCE; } public DefaultHttpRequestWriterFactory() { this(null); } public HttpMessageWriter<HttpRequest> create(final SessionOutputBuffer buffer) { return new DefaultHttpRequestWriter(buffer, lineFormatter); } }
[ "tanghai@paxsz.com" ]
tanghai@paxsz.com
0d5c26bee0d2c3845daaf2abbbec73ac6822d705
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipseswt_cluster/20563/src_1.java
fbafb9452d3a07b4cf8a95513200865f9834eed2
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,408
java
/******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.swt.tests.junit; import junit.framework.*; import junit.textui.*; import org.eclipse.swt.*; import org.eclipse.swt.widgets.*; /** * Automated Test Suite for class org.eclipse.swt.widgets.DirectoryDialog * * @see org.eclipse.swt.widgets.DirectoryDialog */ public class Test_org_eclipse_swt_widgets_DirectoryDialog extends Test_org_eclipse_swt_widgets_Dialog { public Test_org_eclipse_swt_widgets_DirectoryDialog(String name) { super(name); } public static void main(String[] args) { TestRunner.run(suite()); } protected void setUp() { super.setUp(); dirDialog = new DirectoryDialog(shell, SWT.NULL); setDialog(dirDialog); } public void test_ConstructorLorg_eclipse_swt_widgets_Shell() { new DirectoryDialog(shell); try { new DirectoryDialog(null); fail("No exception thrown for null parent"); } catch (IllegalArgumentException e) { } } public void test_ConstructorLorg_eclipse_swt_widgets_ShellI() { warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_ShellI not written"); } public void test_getFilterPath() { // tested in test_setFilterPathLjava_lang_String } public void test_getMessage() { // tested in test_setMessageLjava_lang_String } public void test_open() { if (fTestDialogOpen) dirDialog.open(); } public void test_setFilterPathLjava_lang_String() { assertTrue(":1:", dirDialog.getFilterPath() == ""); String testStr = "./*"; dirDialog.setFilterPath(testStr); assertTrue(":2:", dirDialog.getFilterPath().equals(testStr)); dirDialog.setFilterPath(""); assertTrue(":3:", dirDialog.getFilterPath().equals("")); dirDialog.setFilterPath(null); assertTrue(":4:", dirDialog.getFilterPath() == null); } public void test_setMessageLjava_lang_String() { assertTrue(":1:", dirDialog.getMessage() == ""); String testStr = "test string"; dirDialog.setMessage(testStr); assertTrue(":2:", dirDialog.getMessage().equals(testStr)); dirDialog.setMessage(""); assertTrue(":3:", dirDialog.getMessage().equals("")); try { dirDialog.setMessage(null); fail ("null argument did not throw IllegalArgumentException"); } catch (IllegalArgumentException e) { } } public static Test suite() { TestSuite suite = new TestSuite(); java.util.Vector<String> methodNames = methodNames(); java.util.Enumeration<String> e = methodNames.elements(); while (e.hasMoreElements()) { suite.addTest(new Test_org_eclipse_swt_widgets_DirectoryDialog(e.nextElement())); } return suite; } public static java.util.Vector<String> methodNames() { java.util.Vector<String> methodNames = new java.util.Vector<String>(); methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Shell"); methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ShellI"); methodNames.addElement("test_getFilterPath"); methodNames.addElement("test_getMessage"); methodNames.addElement("test_open"); methodNames.addElement("test_setFilterPathLjava_lang_String"); methodNames.addElement("test_setMessageLjava_lang_String"); methodNames.addAll(Test_org_eclipse_swt_widgets_Dialog.methodNames()); // add superclass method names return methodNames; } protected void runTest() throws Throwable { if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Shell")) test_ConstructorLorg_eclipse_swt_widgets_Shell(); else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ShellI")) test_ConstructorLorg_eclipse_swt_widgets_ShellI(); else if (getName().equals("test_getFilterPath")) test_getFilterPath(); else if (getName().equals("test_getMessage")) test_getMessage(); else if (getName().equals("test_open")) test_open(); else if (getName().equals("test_setFilterPathLjava_lang_String")) test_setFilterPathLjava_lang_String(); else if (getName().equals("test_setMessageLjava_lang_String")) test_setMessageLjava_lang_String(); else super.runTest(); } /* custom */ DirectoryDialog dirDialog; }
[ "375833274@qq.com" ]
375833274@qq.com
103508b2c070327b02a3ddbaebdfc3689a38a5f9
24bf0692593b9c80a2fd51b89ab74f9c62d77042
/app/src/main/java/com/runtai/mvpproject/mudule/model/IPModelImpl.java
ce3438e39dd28cfb002466d4d71098128dbd110b
[]
no_license
836948082/MVPProject
a0c9d22572d592c33312770f5362d8ec00efabf1
602c5015d256f47331dd197796a10b58942ce868
refs/heads/master
2021-01-22T05:38:09.205598
2017-05-26T07:33:29
2017-05-26T07:33:29
92,484,648
0
0
null
null
null
null
UTF-8
Java
false
false
2,771
java
package com.runtai.mvpproject.mudule.model; import android.util.Log; import com.runtai.mvpproject.comment.api.BaseURL; import com.runtai.mvpproject.comment.api.HttpApiService; import com.runtai.mvpproject.comment.http.RetrofitUtils; import com.runtai.mvpproject.mudule.base.OnHttpCallBack; import com.runtai.mvpproject.mudule.bean.IPBean; import com.runtai.mvpproject.mudule.contract.IPContract; import com.socks.library.KLog; import java.net.ConnectException; import java.net.SocketTimeoutException; import retrofit2.adapter.rxjava.HttpException; import rx.Subscriber; import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; /** * Created by Administrator on 2017/03/13 */ public class IPModelImpl implements IPContract.Model { @Override public void query(String ip, final OnHttpCallBack<IPBean> callBack) { RetrofitUtils.newInstence(BaseURL.IP_QUERY_URL) .create(HttpApiService.class) .queryIp(ip) .observeOn(AndroidSchedulers.mainThread()) .subscribeOn(Schedulers.newThread()) .subscribe(new Subscriber<IPBean>() { @Override public void onCompleted() { } @Override public void onError(Throwable e) { e.printStackTrace(); //失败的时候回调-----一下可以忽略 直接 callBack.onFaild("请求失败"); if (e instanceof HttpException) { HttpException httpException = (HttpException) e; //httpException.response().errorBody().string() int code = httpException.code(); if (code == 500 || code == 404) { callBack.onFaild("服务器出错"); } } else if (e instanceof ConnectException) { callBack.onFaild("网络断开,请打开网络!"); } else if (e instanceof SocketTimeoutException) { callBack.onFaild("网络连接超时!!"); } else { callBack.onFaild("发生未知错误" + e.getMessage()); KLog.e(e.getMessage()); } } @Override public void onNext(IPBean ipbean) { Log.e("回调", "回调" + ipbean.toString()); callBack.onSuccessful(ipbean);//请求成功---回调 KLog.e(ipbean.toString()); } }); } }
[ "836948082@qq.com" ]
836948082@qq.com
c7ca81d0474cf06bf414fc11c53f6274a9e69a05
72003cab6711efe96e7080599376d758e065fc33
/PCLApp/JavaSource/com/citibank/ods/modules/product/prodsubfamlprvt/action/ProdSubFamlPrvtMovementListAction.java
df9b8e04278d0ff9a846304d6f916f258da89d7e
[]
no_license
mv58799/PCLApp
39390b8ff5ccaf95c654f394e32ed03b7713e8ad
2f8772a60fee035104586bbbf2827567247459c4
refs/heads/master
2020-03-19T09:06:30.870074
2018-06-06T03:10:07
2018-06-06T03:10:07
136,260,531
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,639
java
package com.citibank.ods.modules.product.prodsubfamlprvt.action; import com.citibank.ods.common.action.BaseODSListAction; import com.citibank.ods.common.functionality.BaseFnc; import com.citibank.ods.common.functionality.valueobject.BaseFncVO; import com.citibank.ods.modules.product.prodsubfamlprvt.functionality.ProdSubFamlPrvtMovementListFnc; import com.citibank.ods.modules.product.prodsubfamlprvt.functionality.valueobject.ProdSubFamlPrvtMovementListFncVO; /** * @author fernando.salgado * */ public class ProdSubFamlPrvtMovementListAction extends BaseODSListAction { /* * Parte do nome do módulo ou ação */ private static final String C_SCREEN_NAME = "ProdSubFamlPrvt.ProdSubFamlPrvtMovementList"; /** * @see com.citibank.ods.commom.action.BaseAction#getFncVOPublishName() */ public String getFncVOPublishName() { return ProdSubFamlPrvtMovementListFncVO.class.getName(); } /* * (non-Javadoc) * @see com.citibank.ods.common.action.BaseODSAction#getODSFuncionality() */ protected BaseFnc getFuncionality() { return new ProdSubFamlPrvtMovementListFnc(); } /* * (non-Javadoc) * @see com.citibank.ods.common.action.BaseODSAction#getScreenName() */ protected String getScreenName() { return C_SCREEN_NAME; } /* * (non-Javadoc) * @see com.citibank.ods.common.action.BaseODSAction#extraActions(com.citibank.ods.common.functionality.valueobject.BaseFncVO, * java.lang.String) */ protected String extraActions( BaseFncVO fncVO_, String invokePath_ ) { return null; } }
[ "mv58799@LACBRA900W1153.lac.nsroot.net" ]
mv58799@LACBRA900W1153.lac.nsroot.net
90cc98c804e0e54108246f08861587134b4d6002
a3aefc3e03923bc95030b42089577a9edf950eb3
/src/main/java/ar/gob/ambiente/sacvefor/localcompleto/facades/TipoGuiaTasaFacade.java
3f257aa0f8e6d2d997c315c9f9130a1c68e24181
[]
no_license
rizoma-forestal/scvf-cgl
300221756f155a449394a0aef113e1cede0ab9b6
2e74bb4ef71ea0460446945614e914915c1f3e06
refs/heads/master
2021-08-02T00:09:56.507492
2021-07-21T22:46:09
2021-07-21T22:46:09
100,499,493
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
package ar.gob.ambiente.sacvefor.localcompleto.facades; import ar.gob.ambiente.sacvefor.localcompleto.entities.TipoGuiaTasa; import javax.ejb.Stateless; /** * Acceso a datos para la entidad TipoGuiaTasa que gestiona las tasas de los tipos de guías * Utiliza los métodos de la clase abstracta * @author rincostante */ @Stateless public class TipoGuiaTasaFacade extends AbstractFacade<TipoGuiaTasa> { /** * Constructor */ public TipoGuiaTasaFacade() { super(TipoGuiaTasa.class); } }
[ "rincostante@ambiente.gob.ar" ]
rincostante@ambiente.gob.ar
17132bfc04d89b9ac692810d727befcf2854ce25
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/ugc/aweme/notice/api/utils/NoticeChallengePropertyUtil.java
56de7334600d9aaab25bedc602bd8d3b7fc5eef5
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package com.p280ss.android.ugc.aweme.notice.api.utils; import com.p280ss.android.ugc.aweme.discover.model.Challenge; /* renamed from: com.ss.android.ugc.aweme.notice.api.utils.NoticeChallengePropertyUtil */ public interface NoticeChallengePropertyUtil { boolean isCommerce(Challenge challenge); void markCommerce(Challenge challenge); }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
7714b88061c871c103e0c94edc994d22e7fa50e8
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
/sources/com/airbnb/android/p011p3/P3Fragment$$Lambda$2.java
c1d34e165ebe788391ca7a92d2b37c72437a070d
[]
no_license
jasonnth/AirCode
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
d37db1baa493fca56f390c4205faf5c9bbe36604
refs/heads/master
2020-07-03T08:35:24.902940
2019-08-12T03:34:56
2019-08-12T03:34:56
201,842,970
0
2
null
null
null
null
UTF-8
Java
false
false
560
java
package com.airbnb.android.p011p3; import p032rx.functions.Action1; /* renamed from: com.airbnb.android.p3.P3Fragment$$Lambda$2 */ final /* synthetic */ class P3Fragment$$Lambda$2 implements Action1 { private final P3Fragment arg$1; private P3Fragment$$Lambda$2(P3Fragment p3Fragment) { this.arg$1 = p3Fragment; } public static Action1 lambdaFactory$(P3Fragment p3Fragment) { return new P3Fragment$$Lambda$2(p3Fragment); } public void call(Object obj) { this.arg$1.bookButton.setReferralCredit(""); } }
[ "thanhhuu2apc@gmail.com" ]
thanhhuu2apc@gmail.com
fb7f3d5bfac6c7afb9cb91da49a83688fa53039e
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
/bazaar8.apk-decompiled/sources/com/google/android/exoplayer2/metadata/id3/PrivFrame.java
26778b066babfce711ded5c7c29705a24069aaec
[]
no_license
BaseMax/PopularAndroidSource
a395ccac5c0a7334d90c2594db8273aca39550ed
bcae15340907797a91d39f89b9d7266e0292a184
refs/heads/master
2020-08-05T08:19:34.146858
2019-10-06T20:06:31
2019-10-06T20:06:31
212,433,298
2
0
null
null
null
null
UTF-8
Java
false
false
1,790
java
package com.google.android.exoplayer2.metadata.id3; import android.os.Parcel; import android.os.Parcelable; import c.e.a.a.o.I; import java.util.Arrays; public final class PrivFrame extends Id3Frame { public static final Parcelable.Creator<PrivFrame> CREATOR = new k(); /* renamed from: b reason: collision with root package name */ public final String f12641b; /* renamed from: c reason: collision with root package name */ public final byte[] f12642c; public PrivFrame(String str, byte[] bArr) { super("PRIV"); this.f12641b = str; this.f12642c = bArr; } public boolean equals(Object obj) { boolean z = true; if (this == obj) { return true; } if (obj == null || PrivFrame.class != obj.getClass()) { return false; } PrivFrame privFrame = (PrivFrame) obj; if (!I.a((Object) this.f12641b, (Object) privFrame.f12641b) || !Arrays.equals(this.f12642c, privFrame.f12642c)) { z = false; } return z; } public int hashCode() { String str = this.f12641b; return ((527 + (str != null ? str.hashCode() : 0)) * 31) + Arrays.hashCode(this.f12642c); } public String toString() { return this.f12632a + ": owner=" + this.f12641b; } public void writeToParcel(Parcel parcel, int i2) { parcel.writeString(this.f12641b); parcel.writeByteArray(this.f12642c); } public PrivFrame(Parcel parcel) { super("PRIV"); String readString = parcel.readString(); I.a(readString); this.f12641b = readString; byte[] createByteArray = parcel.createByteArray(); I.a(createByteArray); this.f12642c = createByteArray; } }
[ "MaxBaseCode@gmail.com" ]
MaxBaseCode@gmail.com
4f315ec4c0ad22c5b42cadd5d62482cf52e0ada8
bff449a67bde60eb42d58b6e81d592bccada40e5
/BCCS_IM/src/java/com/viettel/bccs/inventory/controller/stock/RecoveryOverdueUsedKITController.java
3856f6485eae227f04d8a4d26bf9f6bdb0a7cae7
[]
no_license
tiendat182/IM_UNITTEST
923be43427e2c47446462fef2c0d944bb7f9acce
2eb4b9c11e236d09044b41dabf9529dc295cb476
refs/heads/master
2021-07-19T09:36:51.341386
2017-10-25T14:26:33
2017-10-25T14:26:33
108,283,748
0
0
null
null
null
null
UTF-8
Java
false
false
877
java
package com.viettel.bccs.inventory.controller.stock; import com.viettel.web.common.annotation.Security; import com.viettel.web.common.controller.BaseController; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; /** * Created by anhvv4 on 19/11/2015. */ @Component @Scope("view") @ManagedBean (name="recoveryOverdueUsedKITController") public class RecoveryOverdueUsedKITController extends BaseController { private String typeInputSerial ="0"; @Security("@") @PostConstruct public void init(){ typeInputSerial = "0"; } public String getTypeInputSerial() { return typeInputSerial; } public void setTypeInputSerial(String typeInputSerial) { this.typeInputSerial = typeInputSerial; } }
[ "tiendat.fet4@gmail.com" ]
tiendat.fet4@gmail.com
de56bc2de618888f8a9d740f829977941a5238cf
092c76fcc6c411ee77deef508e725c1b8277a2fe
/hybris/bin/ext-channel/mobileservices/testsrc/de/hybris/platform/mobileservices/DatamatrixCodesTest.java
e2e28746e9322ebfaf4926d77450192da5180127
[ "MIT" ]
permissive
BaggaShivanshu2/hybris-bookstore-tutorial
4de5d667bae82851fe4743025d9cf0a4f03c5e65
699ab7fd8514ac56792cb911ee9c1578d58fc0e3
refs/heads/master
2022-11-28T12:15:32.049256
2020-08-05T11:29:14
2020-08-05T11:29:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,518
java
/* * [y] hybris Platform * * Copyright (c) 2000-2016 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package de.hybris.platform.mobileservices; import static junit.framework.Assert.assertNotNull; import de.hybris.platform.mobileservices.facade.Code2DService; import de.hybris.platform.servicelayer.ServicelayerTest; import java.awt.image.BufferedImage; import java.io.File; import javax.annotation.Resource; import javax.imageio.ImageIO; import org.apache.log4j.Logger; import org.junit.Before; import org.junit.Test; import org.springframework.core.io.ClassPathResource; /** * The Class TestDatamatrixCodes. * All 3 test images consists on encoding the google url: "http://www.google.com" * Currently, our datamatrix decoding libraries fails to decode non alphanumeric characters * The errors produced, varies with the encoding string. The longer the string, the worse results */ public class DatamatrixCodesTest extends ServicelayerTest { /** The code2d service. */ @Resource private Code2DService code2dService; /** Edit the local|project.properties to change logging behavior (properties 'log4j.*'). */ private static final Logger LOG = Logger.getLogger(DatamatrixCodesTest.class.getName()); /** The google1. */ private BufferedImage google1 = null; /** The google2. */ private BufferedImage google2 = null; /** The google3. */ private BufferedImage google3 = null; /** * Sets the up. * @throws Exception the exception */ @Before public void setUp() throws Exception { google1 = ImageIO.read(new ClassPathResource("/test/dmgoogle1.png").getFile()); google2 = ImageIO.read(new ClassPathResource("/test/dmgoogle2.png").getFile()); google3 = ImageIO.read(new ClassPathResource("/test/dmgoogle3.png").getFile()); } /** * Test env is ready. * @throws Exception the exception */ @Test public void testEnvisReady() throws Exception { assertNotNull("images loaded", google1); assertNotNull("images loaded", google2); assertNotNull("images loaded", google3); } /** * Encode decode. * @param testString the test string * @param fileName the file name * @throws Exception the exception */ private void encodeTest(final String testString, final String fileName) throws Exception // NOPMD by willy on 14/12/09 10:59 { final BufferedImage test = code2dService.encodeDatamatrixCode(testString, 300, 300); if (fileName != null) { try { ImageIO.write(test, "png", File.createTempFile("outputdm" + fileName, "png")); } catch (final Exception x) { LOG.warn("Unable to write to the filesystem"); } } assertNotNull("encode failed", test); } /** * Encode long url test. * @throws Exception the exception */ @Test public void encodeLongTest() throws Exception // NOPMD by willy on 24/11/09 12:11 { encodeTest("http://localhost:9001/mobile/barcode/catalog/hwcatalog/version/Online/cat?voucherCode=A04", "longurl"); } /** * Encode short test. * @throws Exception the exception */ @Test public void encodeShortTest() throws Exception // NOPMD by willy on 24/11/09 12:11 { encodeTest("http://www.google.com", "shorturl"); } /** * Encode short alpha test. * @throws Exception the exception */ @Test public void encodeShortAlphaTest() throws Exception // NOPMD by willy on 24/11/09 12:11 { encodeTest("Awesome", "shortalpha"); } /** * Encode long alpha test. * @throws Exception the exception */ @Test public void encodeLongAlphaTest() throws Exception // NOPMD by willy on 24/11/09 12:11 { encodeTest( "This is a text test phrased as long as possible to give the test case the chance to test decoding against a very long sentence such as this", "longalpha"); } /** * Encode short non alpha test. * @throws Exception the exception */ @Test public void encodeShortNonAlphaTest() throws Exception // NOPMD by willy on 24/11/09 12:11 { encodeTest("././$$%%&&##", "shortnonalpha"); } /** * Encode long non alpha test. * @throws Exception the exception */ @Test public void encodeLongNonAlphaTest() throws Exception // NOPMD by willy on 24/11/09 12:11 { encodeTest(":-) :-( ;-) :-P :-D :-/ :-S }:-) {:) ~|| *+-5?! <> [] '-_- # @ =", "lonngnonalpha"); } }
[ "xelilim@hotmail.com" ]
xelilim@hotmail.com
43a5498753e78260d1bb5ae5fd08b824425e6807
b635a2120b3e055fd91f2b4f7cb0e91b43cead92
/kafka-manager-common/src/main/java/com/xiaojukeji/kafka/manager/common/zookeeper/ZkPathUtil.java
0410a5539401253f62a45a4c9c56e600b9e5cae3
[ "Apache-2.0" ]
permissive
Yangchenguang0/Logi-KafkaManager
13d8c2275d2ac1a19a84c6fd2bc51a3d5fc32b28
a2228d016984991f9565daedd1d5b8431ce74eba
refs/heads/master
2023-06-08T18:12:17.264332
2021-06-24T10:04:57
2021-06-24T10:04:57
382,201,886
1
0
Apache-2.0
2021-07-02T01:50:19
2021-07-02T01:50:18
null
UTF-8
Java
false
false
5,562
java
package com.xiaojukeji.kafka.manager.common.zookeeper; /** * @author tukun * @date 15/11/05 * @version 1.0.0 */ public class ZkPathUtil { private static final String ZOOKEEPER_SEPARATOR = "/"; public static final String BROKER_ROOT_NODE = ZOOKEEPER_SEPARATOR + "brokers"; public static final String CONTROLLER_ROOT_NODE = ZOOKEEPER_SEPARATOR + "controller"; public static final String BROKER_IDS_ROOT = BROKER_ROOT_NODE + ZOOKEEPER_SEPARATOR + "ids"; public static final String BROKER_TOPICS_ROOT = BROKER_ROOT_NODE + ZOOKEEPER_SEPARATOR + "topics"; public static final String CONSUMER_ROOT_NODE = ZOOKEEPER_SEPARATOR + "consumers"; public static final String REASSIGN_PARTITIONS_ROOT_NODE = "/admin/reassign_partitions"; /** * config */ public static final String CONFIG_ROOT_NODE = ZOOKEEPER_SEPARATOR + "config"; public static final String CONFIG_TOPICS_ROOT_NODE = CONFIG_ROOT_NODE + ZOOKEEPER_SEPARATOR + "topics"; public static final String CONFIG_CLIENTS_ROOT_NODE = CONFIG_ROOT_NODE + ZOOKEEPER_SEPARATOR + "clients"; public static final String CONFIG_ENTITY_CHANGES_ROOT_NODE = CONFIG_ROOT_NODE + ZOOKEEPER_SEPARATOR + "changes/config_change_"; private static final String D_METRICS_CONFIG_ROOT_NODE = CONFIG_ROOT_NODE + ZOOKEEPER_SEPARATOR + "KafkaExMetrics"; public static final String D_CONFIG_EXTENSION_ROOT_NODE = CONFIG_ROOT_NODE + ZOOKEEPER_SEPARATOR + "extension"; public static final String D_CONTROLLER_CANDIDATES = D_CONFIG_EXTENSION_ROOT_NODE + ZOOKEEPER_SEPARATOR + "candidates"; public static String getBrokerIdNodePath(Integer brokerId) { return BROKER_IDS_ROOT + ZOOKEEPER_SEPARATOR + String.valueOf(brokerId); } public static String getBrokerTopicRoot(String topicName) { return BROKER_TOPICS_ROOT + ZOOKEEPER_SEPARATOR + topicName; } public static String getBrokerTopicPartitionStatePath(String topicName, Integer partitionId) { return BROKER_TOPICS_ROOT + ZOOKEEPER_SEPARATOR + topicName + ZOOKEEPER_SEPARATOR + "partitions" + ZOOKEEPER_SEPARATOR + String.valueOf(partitionId) + ZOOKEEPER_SEPARATOR + "state"; } //for consumer public static String getConsumerTopicPartitionOffsetNodePath(String consumerGroup, String topic, int partitionId) { return String.format(CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + "%s" + ZOOKEEPER_SEPARATOR + "offset" + "%s" + "%d", consumerGroup, topic, partitionId); } public static String getConsumerGroupRoot(String consumerGroup) { return CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + consumerGroup; } public static String getConsumerGroupIdsRoot(String consumerGroup) { return CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + consumerGroup + ZOOKEEPER_SEPARATOR + "ids"; } public static String getConsumerGroupOffsetRoot(String consumerGroup) { return CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + consumerGroup + ZOOKEEPER_SEPARATOR + "offsets"; } public static String getConsumerGroupOwnersRoot(String consumerGroup) { return CONSUMER_ROOT_NODE + ZOOKEEPER_SEPARATOR + consumerGroup + ZOOKEEPER_SEPARATOR + "owners"; } public static String getConsumerGroupConsumerIdsNodePath(String consumerGroup, String consumerId) { return getConsumerGroupIdsRoot(consumerGroup) + ZOOKEEPER_SEPARATOR + consumerId; } public static String getConsumerGroupOffsetTopicNode(String consumerGroup, String topic) { return getConsumerGroupOffsetRoot(consumerGroup) + ZOOKEEPER_SEPARATOR + topic; } public static String getConsumerGroupOffsetTopicPartitionNode(String consumerGroup, String topic, int partitionId) { return getConsumerGroupOffsetTopicNode(consumerGroup, topic) + ZOOKEEPER_SEPARATOR + partitionId; } public static String getConsumerGroupOwnersTopicNode(String consumerGroup, String topic) { return getConsumerGroupOwnersRoot(consumerGroup) + ZOOKEEPER_SEPARATOR + topic; } public static String getConsumerGroupOwnersTopicPartitionNode(String consumerGroup, String topic, int partitionId) { return getConsumerGroupOwnersTopicNode(consumerGroup, topic) + ZOOKEEPER_SEPARATOR + partitionId; } public static String getConfigTopicNode(String topicName) { return CONFIG_TOPICS_ROOT_NODE + ZOOKEEPER_SEPARATOR + topicName; } public static String getConfigClientNodePath(String appId, String topicName) { return CONFIG_CLIENTS_ROOT_NODE + ZOOKEEPER_SEPARATOR + appId + "." + topicName; } public static String parseLastPartFromZkPath(String zkPath) { return zkPath.substring(zkPath.lastIndexOf(ZOOKEEPER_SEPARATOR) + 1); } public static String getKafkaExtraMetricsPath(Integer brokerId) { return D_METRICS_CONFIG_ROOT_NODE + ZOOKEEPER_SEPARATOR + brokerId; } public static String getControllerCandidatePath(Integer brokerId) { return D_CONTROLLER_CANDIDATES + ZOOKEEPER_SEPARATOR + brokerId; } private ZkPathUtil() { } }
[ "zengqiao@didiglobal.com" ]
zengqiao@didiglobal.com
970a1c4babc2bedcb8fd99a91b45e31bb6ec5b16
4d54d7f6447e64629b6cbdf65e8fa5581a53eaa3
/app/src/main/java/com/haqwat/ui/activity_sign_up/SignUpActivity.java
9ad114ffefdadd03be42cfbf030d452717912751
[]
no_license
6544/Haqwat
6d811b0b56f3b292da742dc243d34031441f1bfa
c6fe2ed144d335ac32c51c285279fa74e72834f9
refs/heads/master
2023-03-05T20:05:02.940349
2021-02-16T09:16:20
2021-02-16T09:16:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,595
java
package com.haqwat.ui.activity_sign_up; import androidx.appcompat.app.AppCompatActivity; import androidx.core.content.ContextCompat; import androidx.databinding.DataBindingUtil; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.CountDownTimer; import android.util.Log; import android.widget.Toast; import com.haqwat.R; import com.haqwat.databinding.ActivitySignUpBinding; import com.haqwat.language.Language; import com.haqwat.models.AccountsModel; import com.haqwat.models.SignUpModel; import com.haqwat.models.UserModel; import com.haqwat.preferences.Preferences; import com.haqwat.remote.Api; import com.haqwat.share.Common; import com.haqwat.tags.Tags; import com.haqwat.ui.activity_complete_sign_up.CompleteSignUpActivity; import com.haqwat.ui.activity_confirm_code.ConfirmCodeActivity; import com.haqwat.ui.activity_login.LoginActivity; import java.io.IOException; import java.util.Locale; import io.paperdb.Paper; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; public class SignUpActivity extends AppCompatActivity { private ActivitySignUpBinding binding; private SignUpModel signUpModel; @Override protected void attachBaseContext(Context newBase) { Paper.init(newBase); super.attachBaseContext(Language.updateResources(newBase, Paper.book().read("lang", "ar"))); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = DataBindingUtil.setContentView(this,R.layout.activity_sign_up); initView(); } private void initView() { if (signUpModel==null){ signUpModel = new SignUpModel(); } binding.setModel(signUpModel); binding.btnSignUp.setOnClickListener(view -> { if (signUpModel.isStep1Valid(getApplicationContext())){ signUp1(); } }); binding.tvLogin.setOnClickListener(view -> { navigateToLoginActivity(); }); } private void signUp1() { ProgressDialog dialog = Common.createProgressDialog(this,getString(R.string.wait)); dialog.setCanceledOnTouchOutside(false); dialog.show(); Api.getService(Tags.base_url).signUp1(signUpModel.getEmail(),signUpModel.getPassword(),"android",signUpModel.withSocial) .enqueue(new Callback<UserModel>() { @Override public void onResponse(Call<UserModel> call, Response<UserModel> response) { dialog.dismiss(); if (response.isSuccessful()){ Preferences preferences = Preferences.getInstance(); AccountsModel model = new AccountsModel(signUpModel.getEmail(),signUpModel.getPassword()); model.setLoggedIn(true); preferences.createAccount(SignUpActivity.this,model); Intent intent; if (response.body().getIs_confirmed().equals("yes")){ intent = new Intent(SignUpActivity.this, CompleteSignUpActivity.class); }else { intent = new Intent(SignUpActivity.this, ConfirmCodeActivity.class); } intent.putExtra("data",response.body()); startActivity(intent); finish(); }else { try { Log.e("error",response.code()+"_"+response.errorBody().string()); if (response.code()==403){ Toast.makeText(SignUpActivity.this, R.string.email_exist, Toast.LENGTH_SHORT).show(); navigateToLoginActivity(); }else { Toast.makeText(SignUpActivity.this, R.string.failed, Toast.LENGTH_SHORT).show(); } } catch (IOException e) { e.printStackTrace(); } } } @Override public void onFailure(Call<UserModel> call, Throwable t) { try { dialog.dismiss(); if (t.getMessage() != null) { Log.e("error", t.getMessage() + "__"); if (t.getMessage().toLowerCase().contains("failed to connect") || t.getMessage().toLowerCase().contains("unable to resolve host")) { Toast.makeText(SignUpActivity.this, getString(R.string.something), Toast.LENGTH_SHORT).show(); } else { Toast.makeText(SignUpActivity.this, getString(R.string.failed), Toast.LENGTH_SHORT).show(); } } }catch (Exception e){} } }); } private void navigateToLoginActivity() { Intent intent = new Intent(this, LoginActivity.class); startActivity(intent); finish(); } @Override public void onBackPressed() { navigateToLoginActivity(); } }
[ "emadmagdy.developer@gmail.com" ]
emadmagdy.developer@gmail.com
346c73ca46860db10407c539ba38c20986b6463f
df8d2c695c2e214711e33656b85db0be5afd1df1
/simple-spring-admin-server/src/main/java/trial/Application.java
a26a034be3c91d6917287b7356f5e44ad9208b8e
[]
no_license
irof/trial-spring-boot-admin
0d6c237e55df3179d02977c7d75f16a39bca6422
264e34458bebdae3fac0ac0310d19f7ba2a04fe5
refs/heads/master
2021-01-22T01:34:09.941059
2015-03-15T21:34:47
2015-03-15T21:36:35
32,284,969
0
1
null
null
null
null
UTF-8
Java
false
false
377
java
package trial; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import de.codecentric.boot.admin.config.EnableAdminServer; @SpringBootApplication @EnableAdminServer public class Application { public static void main(String... args) { SpringApplication.run(Application.class, args); } }
[ "irof@hogedriven.net" ]
irof@hogedriven.net
22437c55160a6642e1418796887365ee7040a7fb
b12218b44655c734ef72edbfbd157a774c5754ad
/aplanmis-rest/src/main/java/com/augurit/aplanmis/rest/userCenter/vo/AeaProjInfoResultVo.java
97587d5e53167ba4295e795c28e87b044e6a31f9
[]
no_license
laughing1990/aplan-fork
590a0ebf520e75d1430d5ed862979f6757a6a9e8
df27f74c7421982639169cb45a814c9723d9ead9
refs/heads/master
2021-05-21T16:27:32.373425
2019-12-19T09:26:31
2019-12-19T09:26:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,054
java
package com.augurit.aplanmis.rest.userCenter.vo; import com.augurit.aplanmis.common.domain.AeaProjInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.beans.BeanUtils; @Data @ApiModel("项目信息返回结果VO") public class AeaProjInfoResultVo { @ApiModelProperty(value = "项目/工程名称") private String projName; @ApiModelProperty(value = "项目ID") private String projInfoId; @ApiModelProperty(value = "项目代码") private String localCode; @ApiModelProperty(value = "工程编码") private String gcbm; @ApiModelProperty(value = "所属主题") private String themeName; @ApiModelProperty(value = "所属主题ID") private String themeId; public static AeaProjInfoResultVo build(AeaProjInfo aeaProjInfo) { AeaProjInfoResultVo aeaProjInfoResultVo = new AeaProjInfoResultVo(); BeanUtils.copyProperties(aeaProjInfo, aeaProjInfoResultVo); return aeaProjInfoResultVo; } }
[ "xiongyb@augurit.com" ]
xiongyb@augurit.com
5b0b0e363ad9c77bab66c49eb7aac3b3ffb78644
47798511441d7b091a394986afd1f72e8f9ff7ab
/src/main/java/com/alipay/api/domain/EpElement.java
a0fc108c310fe764c001e0c7b963bbe582c7e0db
[ "Apache-2.0" ]
permissive
yihukurama/alipay-sdk-java-all
c53d898371032ed5f296b679fd62335511e4a310
0bf19c486251505b559863998b41636d53c13d41
refs/heads/master
2022-07-01T09:33:14.557065
2020-05-07T11:20:51
2020-05-07T11:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
777
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 企业征信基本单元 * * @author auto create * @since 1.0, 2017-10-13 14:33:12 */ public class EpElement extends AlipayObject { private static final long serialVersionUID = 1197373185299447229L; /** * 企业征信数据key */ @ApiField("key") private String key; /** * 企业征信数据value,字段长度不定。 */ @ApiField("value") private String value; public String getKey() { return this.key; } public void setKey(String key) { this.key = key; } public String getValue() { return this.value; } public void setValue(String value) { this.value = value; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
dc6a2eca96355f8af8060cc721cd688770fccc55
3b34ec3651055b290f99ebb43a7db0169022c924
/DS4P/acs-showcase/c32-parser/src/main/java/gov/samhsa/consent2share/c32/dto/Results.java
f2e0863ef706d38e58a91259b30b95e7fa58d850
[ "BSD-3-Clause" ]
permissive
pmaingi/Consent2Share
f9f35e19d124cd40275ef6c43953773f0a3e6f25
00344812cd95fdc75a9a711d35f92f1d35f10273
refs/heads/master
2021-01-11T01:20:55.231460
2016-09-29T16:58:40
2016-09-29T16:58:40
70,718,518
1
0
null
2016-10-12T16:21:33
2016-10-12T16:21:33
null
UTF-8
Java
false
false
4,594
java
/******************************************************************************* * Open Behavioral Health Information Technology Architecture (OBHITA.org) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the <organization> nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // // 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.10.18 at 11:05:26 AM EDT // package gov.samhsa.consent2share.c32.dto; 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.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; // TODO: Auto-generated Javadoc /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="text" type="{urn:hl7-org:v3}textType" minOccurs="0"/> * &lt;element name="result" type="{urn:hl7-org:v3}result" maxOccurs="unbounded"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "text", "result" }) @XmlRootElement(name = "results") public class Results { /** The text. */ protected TextType text; /** The result. */ @XmlElement(required = true) protected List<Result> result; /** * Gets the value of the text property. * * @return the text * possible object is * {@link TextType } */ public TextType getText() { return text; } /** * Sets the value of the text property. * * @param value * allowed object is * {@link TextType } * */ public void setText(TextType value) { this.text = value; } /** * Gets the value of the result 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 result property. * * <p> * For example, to add a new item, do as follows: * <pre> * getResult().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * * @return the result * {@link Result } */ public List<Result> getResult() { if (result == null) { result = new ArrayList<Result>(); } return this.result; } }
[ "tao.lin@feisystems.com" ]
tao.lin@feisystems.com
05b7b92292902da37c30eae064a8c513add60d34
10839f9b208f2ad526a613bed7a6775811930835
/jdroid-android-sample/src/test/java/com/jdroid/android/sample/TestAppContext.java
c4b0248f072f7c449722154ed41736fefe0e77e6
[ "Apache-2.0" ]
permissive
code4lifevn/jdroid
1f57288412c08dab7ecad061f17197ee08a18dd4
a215c488f1c2094c98356106fb0957d1758171c7
refs/heads/master
2021-06-17T23:05:08.625142
2017-06-13T03:01:29
2017-06-13T03:03:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
474
java
package com.jdroid.android.sample; import com.jdroid.android.context.AppContext; public class TestAppContext extends AppContext { @Override protected String getServerName() { return null; } @Override public String getInstallationSource() { return "GooglePlay"; } @Override public String getBuildType() { return "test"; } @Override public String getLocalIp() { return null; } @Override public Boolean isStrictModeEnabled() { return false; } }
[ "maxirosson@gmail.com" ]
maxirosson@gmail.com
01d2d3196ea04b8e00711208a90a1bd7066ee472
39df4ebdc529bd677017caf3fc2af20be3dd3538
/fap-db/src/main/java/eon/hg/fap/db/service/impl/SystemTipServiceImpl.java
9828138f74b5237d259e290e40ac9d3952d70050
[]
no_license
aeonj/eon-dmp
6d3580d758f697d407178175bb6bc532add8a85f
d1cfc867bb31833f5d4b7faa3146d468434f9fc5
refs/heads/master
2022-09-12T09:51:32.136245
2021-07-02T09:26:42
2021-07-02T09:26:42
141,535,375
0
0
null
2022-09-01T23:09:36
2018-07-19T06:39:51
Java
UTF-8
Java
false
false
1,345
java
package eon.hg.fap.db.service.impl; import eon.hg.fap.core.query.support.IPageList; import eon.hg.fap.core.query.support.IQueryObject; import eon.hg.fap.db.dao.primary.SystemTipDao; import eon.hg.fap.db.model.primary.SystemTip; import eon.hg.fap.db.service.ISystemTipService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.io.Serializable; import java.util.List; import java.util.Map; @Service @Transactional public class SystemTipServiceImpl implements ISystemTipService { @Resource private SystemTipDao systemTipDao; public SystemTip save(SystemTip systemTip) { return this.systemTipDao.save(systemTip); } public SystemTip getObjById(Long id) { return this.systemTipDao.get(id); } public void delete(Long id) { this.systemTipDao.remove(id); } public void batchDelete(List<Long> systemTipIds) { for (Serializable id : systemTipIds) { delete((Long) id); } } public IPageList list(IQueryObject properties) { return systemTipDao.list(properties); } public SystemTip update(SystemTip systemTip) { return this.systemTipDao.update( systemTip); } public List<SystemTip> query(String query, Map params, int begin, int max){ return this.systemTipDao.query(query, params, begin, max); } }
[ "aeonj@163.com" ]
aeonj@163.com
5c28c6fb8094c89c95aefac1357fdd28968865ae
b0fbf2b9cd4f16d4de38cc92cfc987bd8f5c112a
/src/com/zs/ina/assesment/relative/dao/RelativeBEAN.java
0230a4c893bc683c9a1b85f888fdfda9d1d27240
[]
no_license
sumesh-tg/International_Academy
31fba8b9f1f4985111ea6cbb837e27125b75b531
7816795ab52bbb7411aa651983a6317a2a261f4b
refs/heads/master
2020-04-11T03:11:27.067358
2018-12-12T11:15:04
2018-12-12T11:15:04
161,470,316
0
0
null
null
null
null
UTF-8
Java
false
false
2,939
java
/* * Copyright (C) 2016 100018 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package com.zs.ina.assesment.relative.dao; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; /** * * @author SUMESH */ public class RelativeBEAN { private final StringProperty countryOfRelative = new SimpleStringProperty(); private final StringProperty relationship = new SimpleStringProperty(); private final StringProperty enquiryId = new SimpleStringProperty(); private final StringProperty rowId = new SimpleStringProperty(); /** * * @return */ public String getRowId() { return rowId.get(); } /** * * @param value */ public void setRowId(String value) { rowId.set(value); } /** * * @return */ public StringProperty rowIdProperty() { return rowId; } /** * * @return */ public String getEnquiryId() { return enquiryId.get(); } /** * * @param value */ public void setEnquiryId(String value) { enquiryId.set(value); } /** * * @return */ public StringProperty enquiryIdProperty() { return enquiryId; } /** * * @return */ public String getRelationship() { return relationship.get(); } /** * * @param value */ public void setRelationship(String value) { relationship.set(value); } /** * * @return */ public StringProperty relationshipProperty() { return relationship; } /** * * @return */ public String getCountryOfRelative() { return countryOfRelative.get(); } /** * * @param value */ public void setCountryOfRelative(String value) { countryOfRelative.set(value); } /** * * @return */ public StringProperty countryOfRelativeProperty() { return countryOfRelative; } @Override public String toString() { return "RelativeBEAN{" + "countryOfRelative=" + countryOfRelative + ", relationship=" + relationship + ", enquiryId=" + enquiryId + ", rowId=" + rowId + '}'; } }
[ "mailbox4sumesh@gmail.com" ]
mailbox4sumesh@gmail.com
948ed6404273b936f7cfa66f7c1e848fdd4b1b9f
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/53/org/apache/commons/math/util/MathUtils_checkNotNull_2329.java
7aa2aadb58f4256e97c0a4590e59cf82920f61f9
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,602
java
org apach common math util addit built function link math version math util mathutil check object param object check null argument except nullargumentexcept code code check null checknotnul object null argument except nullargumentexcept null argument except nullargumentexcept
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
0552ae9eecc02aec64607220502c3b1729f3f3df
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_0931.java
4921a67796ea66f3514272784f1c282f7ccf3b5c
[ "Apache-2.0" ]
permissive
lesaint/experimenting-annotation-processing
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
1e9692ceb0d3d2cda709e06ccc13290262f51b39
refs/heads/master
2021-01-23T11:20:19.836331
2014-11-13T10:37:14
2014-11-13T10:37:14
26,336,984
1
0
null
null
null
null
UTF-8
Java
false
false
151
java
package fr.javatronic.blog.massive.annotation1.sub1; import fr.javatronic.blog.processor.Annotation_001; @Annotation_001 public class Class_0931 { }
[ "sebastien.lesaint@gmail.com" ]
sebastien.lesaint@gmail.com
d9fed196cc377ea37873ad0ec2ae42b45b4e88cd
2bea415b1997fb13512957cfcbfa75d591c23dae
/aili/aili-hibernate/src/main/java/org/hbhk/aili/hibernate/share/model/RoleInfo.java
6e9e0a923df51d154dfeef9c88671c0e047969a5
[]
no_license
konglingjuanyi/aili-framework
d1aac2a02c3863e70cfaed2fefd570dcb1fe9d99
2453de39f7a94196a273a10204e0551c36652c81
refs/heads/master
2021-01-23T22:30:00.200605
2015-04-05T06:28:48
2015-04-05T06:28:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,129
java
package org.hbhk.aili.hibernate.share.model; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; @Entity(name= "t_aili_role") public class RoleInfo implements java.io.Serializable { private static final long serialVersionUID = 4218930427867063297L; @Column(name="id",length=255) private String id; @Column(name="id",length=255) private String code; @Column(name="id",length=255) private boolean enable; @Column(name="id",length=255) private String name; private Set<ResourceInfo> resources; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public boolean getEnable() { return enable; } public void setEnable(boolean enable) { this.enable = enable; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Set<ResourceInfo> getResources() { return resources; } public void setResources(Set<ResourceInfo> resources) { this.resources = resources; } }
[ "1024784402@qq.com" ]
1024784402@qq.com
6c802343cee647d58971eddf714b932238f9ae4e
1095fea85170be0fead52a277f7c5c2661c747ff
/rs3 files/Server/src/com/rs/game/npc/others/SkillAlchemistNPC.java
87ffa182404f8e7f4fcde0c1777340a6d0461f58
[ "Apache-2.0" ]
permissive
emcry666/project-scape
fed5d533f561cb06b3187ea116ff2692b840b6b7
827d213f129a9fd266cf42e7412402609191c484
refs/heads/master
2021-09-01T01:01:40.472745
2017-12-23T19:55:02
2017-12-23T19:55:02
114,505,346
0
0
null
null
null
null
UTF-8
Java
false
false
370
java
package com.rs.game.npc.others; import com.rs.game.WorldTile; import com.rs.game.npc.NPC; @SuppressWarnings("serial") public class SkillAlchemistNPC extends NPC { public SkillAlchemistNPC(int id, WorldTile tile, int mapAreaNameHash, boolean canBeAttackFromOutOfArea) { super(id, tile, mapAreaNameHash, canBeAttackFromOutOfArea); setName("Skill Alchemist"); } }
[ "34613829+emcry666@users.noreply.github.com" ]
34613829+emcry666@users.noreply.github.com
401642c2393a163dd1a160badc4688dc0ecb18ca
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/java-design-patterns/learning/449/AppClient.java
9ba52151abedffeceeef91e66eb75a7ab7c17db6
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,323
java
/** * The MIT License * Copyright (c) 2014-2016 Ilkka Seppälä * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.iluwatar.reactor.app; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; import java.net.UnknownHostException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; /** * Represents the clients of Reactor pattern. Multiple clients are run concurrently and send logging * requests to Reactor. */ public class AppClient { private static final Logger LOGGER = LoggerFactory.getLogger(AppClient.class); private final ExecutorService service = Executors.newFixedThreadPool(4); /** * App client entry. * * @throws IOException if any I/O error occurs. */ public static void main(String[] args) throws IOException { AppClient appClient =new AppClient(); appClient.start(); } /** * Starts the logging clients. * * @throws IOException if any I/O error occurs. */ public void start() throws IOException { LOGGER.info("Starting logging clients"); service.execute(new TcpLoggingClient("Client 1", 6666)); service.execute(new TcpLoggingClient("Client 2", 6667)); service.execute(new UdpLoggingClient("Client 3", 6668)); service.execute(new UdpLoggingClient("Client 4", 6668)); } /** * Stops logging clients. This is a blocking call. */ public void stop() { service.shutdown(); if (!service.isTerminated()) { service.shutdownNow(); try { service.awaitTermination(1000, TimeUnit.SECONDS); } catch (InterruptedException e) { LOGGER.error("exception awaiting termination", e); } } LOGGER.info("Logging clients stopped"); } private static void artificialDelayOf(long millis) { try { Thread.sleep(millis); } catch (InterruptedException e) { LOGGER.error("sleep interrupted", e); } } /** * A logging client that sends requests to Reactor on TCP socket. */ static class TcpLoggingClient implements Runnable { private final int serverPort; private final String clientName; /** * Creates a new TCP logging client. * * @param clientName the name of the client to be sent in logging requests. * @param serverPort the port on which client will send logging requests. */ public TcpLoggingClient(String clientName, int serverPort) { this.clientName = clientName; this.serverPort = serverPort; } @Override public void run() { try (Socket socket = new Socket(InetAddress.getLocalHost(), serverPort)) { OutputStream outputStream = socket.getOutputStream(); PrintWriter writer = new PrintWriter(outputStream); sendLogRequests(writer, socket.getInputStream()); } catch (IOException e) { LOGGER.error("error sending requests", e); throw new RuntimeException(e); } } private void sendLogRequests(PrintWriter writer, InputStream inputStream) throws IOException { for (int i = 0; i < 4; i++) { writer.println(clientName + " - Log request: " + i); writer.flush(); byte[] data = new byte[1024]; int read = inputStream.read(data, 0, data.length); if (read == 0) { LOGGER.info("Read zero bytes"); } else { LOGGER.info(new String(data, 0, read)); } artificialDelayOf(100); } } } /** * A logging client that sends requests to Reactor on UDP socket. */ static class UdpLoggingClient implements Runnable { private final String clientName; private final InetSocketAddress remoteAddress; /** * Creates a new UDP logging client. * * @param clientName the name of the client to be sent in logging requests. * @param port the port on which client will send logging requests. * @throws UnknownHostException if localhost is unknown */ public UdpLoggingClient(String clientName, int port) throws UnknownHostException { this.clientName = clientName; this.remoteAddress = new InetSocketAddress(InetAddress.getLocalHost(), port); } @Override public void run() { try (DatagramSocket socket = new DatagramSocket()) { for (int i = 0; i < 4; i++) { String message = clientName + " - Log request: " + i; DatagramPacket request = new DatagramPacket(message.getBytes(), message.getBytes().length, remoteAddress); socket.send(request); byte[] data = new byte[1024]; DatagramPacket reply = new DatagramPacket(data, data.length); socket.receive(reply); if (reply.getLength() == 0) { LOGGER.info("Read zero bytes"); } else { LOGGER.info(new String(reply.getData(), 0, reply.getLength())); } artificialDelayOf(100); } } catch (IOException e1) { LOGGER.error("error sending packets", e1); } } } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
e0e5f780e874706a238d271c54f55c03ed35608a
e8cd24201cbfadef0f267151ea5b8a90cc505766
/group08/1425809544/03-12/code/com/xyy/download/impl/ConnectionManagerImpl.java
7b99d34a7ea6b8feff18416707ca8d94d0e85b32
[]
no_license
XMT-CN/coding2017-s1
30dd4ee886dd0a021498108353c20360148a6065
382f6bfeeeda2e76ffe27b440df4f328f9eafbe2
refs/heads/master
2021-01-21T21:38:42.199253
2017-06-25T07:44:21
2017-06-25T07:44:21
94,863,023
0
0
null
null
null
null
UTF-8
Java
false
false
692
java
package xyy.download.impl; import vvv.download.api.ConnectionException; import xyy.download.api.Connection; import xyy.download.api.ConnectionManager; import java.io.IOException; /** * Created by 14258 on 2017/3/14. */ public class ConnectionManagerImpl implements ConnectionManager { private String url; @Override public Connection open(String url) throws ConnectionException, IOException { Connection conn = null; if (!url.equals(this.url)){ conn = new ConnectionImpl(url); this.url = url; }else { conn = new ConnectionImpl(url, false); } return conn; } }
[ "542194147@qq.com" ]
542194147@qq.com
941c5da9e150ee0943e8f6fb610805de462c6c35
706dae6cc6526064622d4f5557471427441e5c5e
/src/test/java/com/anbo/juja/patterns/builder_20/classic/case7_assertThat/AssertsTest.java
0093f1e9987099bc5ecab5e579212e284c633fb9
[]
no_license
Anton-Bondar/Design-patterns-JUJA-examples-
414edabfd8c4148640de7de8d01f809b01c3c17c
9e3d628f7e45c0106514f8f459ea30fffed702d5
refs/heads/master
2021-10-09T04:45:42.372993
2018-12-21T12:09:00
2018-12-21T12:11:14
121,509,668
0
0
null
null
null
null
UTF-8
Java
false
false
1,524
java
package com.anbo.juja.patterns.builder_20.classic.case7_assertThat; import org.junit.Test; import java.util.Arrays; import java.util.Collection; import static ua.com.juja.patterns.builder.classic.case7_assertThat.Asserts.*; /** * Created by oleksandr.baglai on 07.02.2016. */ public class AssertsTest { // проверяем все ассерты @Test public void testBoolean() { boolean flag = true; assertThat(flag).isTrue(); assertThat(flag).isNotFalse(); flag = false; assertThat(flag).isFalse(); assertThat(flag).isNotTrue(); } @Test public void testInteger() { int number = 13; assertThat(number).isMoreThan(10).isLessThan(15).inRange(10, 20).positive(); assertThat(number).isMoreThan(10); assertThat(number).isLessThan(15); assertThat(number).inRange(10, 20); assertThat(number).positive(); } @Test public void testCollection() { Collection<String> strings = Arrays.asList("qwe", "asd"); assertThat(strings).contains("qwe"); assertThat(strings).doesNotContain("zxc"); } @Test public void testAllTogether() { boolean flag = true; int number = 13; Collection<String> strings = Arrays.asList("qwe", "asd"); assertThat(flag).isTrue().isNotFalse(); assertThat(number).isMoreThan(10).isLessThan(15).inRange(10, 20).positive(); assertThat(strings).contains("qwe").doesNotContain("zxc"); } }
[ "AntonBondar2013@gmail.com" ]
AntonBondar2013@gmail.com
a60db667abbe8691438cf9804a70c6902f5b85d6
aeb30a11e37adcd6b28cc10a5cb47d9478ee6a6e
/test/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java
5c64a253e2c7dc7e9e33a1ac6dbc05765edc3e37
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
FanZhoukai/spring1.1.1
cf89459812d97070f870560109b66e16b6d44ed9
214897f5a731a47ffc30996099afb9e1866ddc82
refs/heads/master
2020-04-27T20:32:14.456644
2019-05-03T10:24:24
2019-05-03T10:24:24
174,661,624
1
0
null
null
null
null
UTF-8
Java
false
false
3,630
java
/* * Copyright 2002-2004 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.beans.factory.config; import java.beans.PropertyEditorSupport; import java.text.DateFormat; import java.text.ParseException; import java.util.Date; import java.util.HashMap; import java.util.Locale; import java.util.Map; import junit.framework.TestCase; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.TestBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.propertyeditors.CustomDateEditor; /** * @author Juergen Hoeller * @since 31.07.2004 */ public class CustomEditorConfigurerTests extends TestCase { public void testCustomEditorConfigurerWithClassNames() throws ParseException { DefaultListableBeanFactory bf = new DefaultListableBeanFactory(); CustomEditorConfigurer cec = new CustomEditorConfigurer(); Map editors = new HashMap(); DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.GERMAN); editors.put(Date.class.getName(), new CustomDateEditor(df, true)); cec.setCustomEditors(editors); cec.postProcessBeanFactory(bf); MutablePropertyValues pvs = new MutablePropertyValues(); pvs.addPropertyValue("date", "2.12.1975"); bf.registerBeanDefinition("tb", new RootBeanDefinition(TestBean.class, pvs)); TestBean tb = (TestBean) bf.getBean("tb"); assertEquals(df.parse("2.12.1975"), tb.getDate()); } public void testCustomEditorConfigurerWithClasses() throws ParseException { DefaultListableBeanFactory bf = new DefaultListableBeanFactory(); CustomEditorConfigurer cec = new CustomEditorConfigurer(); Map editors = new HashMap(); DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.GERMAN); editors.put(Date.class, new CustomDateEditor(df, true)); cec.setCustomEditors(editors); cec.postProcessBeanFactory(bf); MutablePropertyValues pvs = new MutablePropertyValues(); pvs.addPropertyValue("date", "2.12.1975"); bf.registerBeanDefinition("tb", new RootBeanDefinition(TestBean.class, pvs)); TestBean tb = (TestBean) bf.getBean("tb"); assertEquals(df.parse("2.12.1975"), tb.getDate()); } public void testCustomEditorConfigurerWithArray() throws ParseException { DefaultListableBeanFactory bf = new DefaultListableBeanFactory(); CustomEditorConfigurer cec = new CustomEditorConfigurer(); Map editors = new HashMap(); editors.put("java.lang.String[]", new PropertyEditorSupport() { public void setAsText(String text) { setValue(new String[] {"test"}); } }); cec.setCustomEditors(editors); cec.postProcessBeanFactory(bf); MutablePropertyValues pvs = new MutablePropertyValues(); pvs.addPropertyValue("stringArray", "xxx"); bf.registerBeanDefinition("tb", new RootBeanDefinition(TestBean.class, pvs)); TestBean tb = (TestBean) bf.getBean("tb"); assertTrue(tb.getStringArray() != null && tb.getStringArray().length == 1); assertEquals("test", tb.getStringArray()[0]); } }
[ "fanzhoukai@163.com" ]
fanzhoukai@163.com
f59a3a135f4eae2a8fc2d4715572b5d84ff91ec2
960499569a1018c2a8817d21b13e79856ff344ba
/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrDaydreamApi.java
e95ee912e52449ce92d0fcf7ebf6fddb21521273
[ "BSD-3-Clause" ]
permissive
ollie314/chromium
e0082d960bb3c0b19a38315f8d25dd7645129d04
533a1c2a90fe2a3bc74892f66f34d45aef3a8f98
refs/heads/master
2022-12-30T17:45:45.833312
2016-11-13T22:46:54
2016-11-13T22:46:53
49,952,784
0
0
null
2016-11-13T22:46:54
2016-01-19T12:58:33
null
UTF-8
Java
false
false
718
java
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.vr_shell; import android.app.PendingIntent; /** * Abstract away DaydreamImpl class, which may or may not be present at runtime depending on compile * flags. */ public interface VrDaydreamApi { /** * Register the intent to launch after phone inserted into a Daydream viewer. */ void registerDaydreamIntent(PendingIntent pendingIntent); /** * Unregister the intent if any. */ void unregisterDaydreamIntent(); /** * Close the private api. */ void close(); }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
281cf5b2b2268eaf5976e7e97ea91fd075eaf1e1
56456387c8a2ff1062f34780b471712cc2a49b71
/b/a/a/a/i/d/j.java
97d76e5e173a4d77d74a509965ca7285c0cfce47
[]
no_license
nendraharyo/presensimahasiswa-sourcecode
55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50
890fc86782e9b2b4748bdb9f3db946bfb830b252
refs/heads/master
2020-05-21T11:21:55.143420
2019-05-10T19:03:56
2019-05-10T19:03:56
186,022,425
1
0
null
null
null
null
UTF-8
Java
false
false
782
java
package b.a.a.a.i.d; import b.a.a.a.f.b; import b.a.a.a.f.e; import b.a.a.a.f.m; public class j extends a { public void a(m paramm, String paramString) { b.a.a.a.o.a.a(paramm, "Cookie"); paramm.a(true); } public boolean b(b paramb, e parame) { b.a.a.a.o.a.a(paramb, "Cookie"); String str = "Cookie origin"; b.a.a.a.o.a.a(parame, str); boolean bool = paramb.i(); if (bool) { bool = parame.d(); if (!bool) {} } else { bool = true; } for (;;) { return bool; bool = false; str = null; } } } /* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\b\a\a\a\i\d\j.class * Java compiler version: 5 (49.0) * JD-Core Version: 0.7.1 */
[ "haryo.nendra@gmail.com" ]
haryo.nendra@gmail.com
1113a69a09526790dbbb501615ce1227fdc6781e
0f2d15e30082f1f45c51fdadc3911472223e70e0
/src/3.7/plugins/com.perforce.team.ui/src/com/perforce/team/ui/shelve/SubmitShelveAction.java
5e636959887c597d07fce5864234d365dca95cf5
[ "BSD-2-Clause" ]
permissive
eclipseguru/p4eclipse
a28de6bd211df3009d58f3d381867d574ee63c7a
7f91b7daccb2a15e752290c1f3399cc4b6f4fa54
refs/heads/master
2022-09-04T05:50:25.271301
2022-09-01T12:47:06
2022-09-01T12:47:06
136,226,938
2
1
BSD-2-Clause
2022-09-01T19:42:29
2018-06-05T19:45:54
Java
UTF-8
Java
false
false
7,755
java
/** * Copyright (c) 2008 Perforce Software. All rights reserved. */ package com.perforce.team.ui.shelve; import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.window.Window; import com.perforce.p4java.core.file.FileSpecOpStatus; import com.perforce.p4java.core.file.IExtendedFileSpec; import com.perforce.p4java.core.file.IFileSpec; import com.perforce.p4java.exception.P4JavaException; import com.perforce.p4java.impl.generic.core.file.FileSpec; import com.perforce.p4java.impl.mapbased.server.Server; import com.perforce.p4java.server.CmdSpec; import com.perforce.team.core.IConstants; import com.perforce.team.core.p4java.IP4Connection; import com.perforce.team.core.p4java.IP4Resource; import com.perforce.team.core.p4java.IP4Runnable; import com.perforce.team.core.p4java.IP4ShelvedChangelist; import com.perforce.team.core.p4java.P4Collection; import com.perforce.team.core.p4java.P4Event; import com.perforce.team.core.p4java.P4Event.EventType; import com.perforce.team.core.p4java.P4Runnable; import com.perforce.team.core.p4java.P4Workspace; import com.perforce.team.ui.P4ConnectionManager; import com.perforce.team.ui.PerforceUIPlugin; import com.perforce.team.ui.p4java.actions.Messages; import com.perforce.team.ui.p4java.actions.P4Action; public class SubmitShelveAction extends P4Action { /** * @see com.perforce.team.ui.p4java.actions.P4Action#isEnabledEx() */ @Override public boolean isEnabledEx() { boolean enabled = containsOnlineConnection(); if (enabled) { enabled = containsContainers(); if (!enabled) { P4Collection collection = getResourceSelection(); for (IP4Resource resource : collection.members()) { if (resource instanceof IP4ShelvedChangelist) { IP4ShelvedChangelist list = (IP4ShelvedChangelist) resource; if (!list.isReadOnly() && list.getFiles().length > 0) { enabled = true; break; } } } } } return enabled; } private void submitListsFromCollection(final P4Collection collection, final boolean showDialog) { IP4Runnable runnable = new P4Runnable() { @Override public void run(IProgressMonitor monitor) { List<IP4ShelvedChangelist> changes = new ArrayList<IP4ShelvedChangelist>(); List<IExtendedFileSpec> nonSubmittables=new ArrayList<IExtendedFileSpec>(); for (IP4Resource resource : collection.members()) { if (resource instanceof IP4ShelvedChangelist) { IP4ShelvedChangelist sl = (IP4ShelvedChangelist) resource; List<IExtendedFileSpec> openedFiles = sl.getOpenedSpecs(); nonSubmittables.addAll(openedFiles); IP4ShelvedChangelist list = (IP4ShelvedChangelist) resource; changes.add(list); if(nonSubmittables.isEmpty()) showSubmitDialogs(changes, showDialog); else{ final StringBuilder sb=new StringBuilder(); sb.append(MessageFormat.format(Messages.SubmitShelveAction_ChangelistContainsNonShelvedFiles,IConstants.EMPTY_STRING+sl.getId())); if(nonSubmittables.size()<20){ sb.append(Messages.SubmitShelveAction_MoveFollowingFIlesToAnotherChangelist); for(IExtendedFileSpec s: nonSubmittables){ sb.append(" "); //$NON-NLS-1$ sb.append(s.getDepotPathString()); sb.append(IConstants.RETURN); } }else{ sb.append(Messages.SubmitShelveAction_MoveFilesToAnotherCHangelist); } PerforceUIPlugin.syncExec(new Runnable() { public void run() { MessageDialog.openError(getShell(), getTitle(), sb.toString()); } }); } } } } @Override public String getTitle() { return com.perforce.team.ui.p4java.actions.Messages.SubmitAction_SubmittingChangelistTitle; } }; runRunnable(runnable); } private void showSubmitDialogs( final List<IP4ShelvedChangelist> lists, final boolean showDialog) { PerforceUIPlugin.syncExec(new Runnable() { public void run() { if (!lists.isEmpty()) { for (final IP4ShelvedChangelist list : lists) { if (showDialog) { SubmitShelveDialog dialog = new SubmitShelveDialog(getShell(), MessageFormat.format(Messages.SubmitShelveAction_Submit_shelved_change,list.getId()), list); if(Window.OK==dialog.open()){ submit(list); } } else { submit(list); } } } else { P4ConnectionManager.getManager().openInformation( getShell(), com.perforce.team.ui.p4java.actions.Messages.SubmitAction_NoFilesToSubmitTitle, com.perforce.team.ui.p4java.actions.Messages.SubmitAction_NoFilesToSubmitMessage); } } }); } /** * Runs the submit and optionally shows it as a dialog or just submits with * the current collection and settings * * @param showDialog */ public void runAction(boolean showDialog) { P4Collection collection = getResourceSelection(); submitListsFromCollection(collection, showDialog); } /** * @see com.perforce.team.ui.p4java.actions.P4Action#runAction() */ @Override public void runAction() { runAction(true); } private void submit(IP4ShelvedChangelist changelist){ IP4Connection connection = changelist.getConnection(); Server server=(Server) connection.getServer(); List<Map<String, Object>> retMaps = connection.execMapCmdList(CmdSpec.SUBMIT.name(), new String[]{"-e"+changelist.getId()}, new HashMap<String, Object>()); //$NON-NLS-1$ try { List<IFileSpec> fileList = new ArrayList<IFileSpec>(); final String SUBMITTED_MSG="Submitted as change "; //$NON-NLS-1$ final String KEY_SUBMITTEDCHANGE="submittedChange";//$NON-NLS-1$ final String KEY_LOCK="locked"; //$NON-NLS-1$ if (retMaps != null) { for (Map<String, Object> map : retMaps) { if (map.get(KEY_SUBMITTEDCHANGE) != null) { Integer id = new Integer((String) map.get(KEY_SUBMITTEDCHANGE)); fileList.add(new FileSpec(FileSpecOpStatus.INFO, SUBMITTED_MSG + id)); } else if (map.get(KEY_LOCK) != null) { //$NON-NLS-1$ // disregard this message for now } else { fileList.add(server.handleFileReturn(map)); } } } for (IFileSpec spec : fileList) { if (spec.getStatusMessage()!=null && !spec.getStatusMessage().contains(SUBMITTED_MSG)) { MessageDialog.openError(getShell(), Messages.SubmitShelveAction_Error, spec.getStatusMessage()); break; }else{ updateChanges(changelist); } } } catch (P4JavaException e) { e.printStackTrace(); } } private void updateChanges(IP4ShelvedChangelist changelist) { changelist.refresh(); // Send update shelve event P4Workspace.getWorkspace().notifyListeners( new P4Event(EventType.SUBMIT_SHELVEDCHANGELIST, changelist)); } }
[ "gunnar@wagenknecht.org" ]
gunnar@wagenknecht.org
0d7afdd9b17fbedc36da0b3e37b591522976b0a4
ae18f62ab28314d0573939a36e72863452c7c2e9
/src/leetcode/editor/en/Leetcode1192CriticalConnectionsInANetwork.java
188138eec4abca8de6f043886c57f57f36f09f8a
[]
no_license
Minussy/leetcode_practice
a79f0fb60228ed7f131debc47c832b31e9f17f80
9cac056738722ff464f7d52fb2371ae61deebcb9
refs/heads/master
2023-02-24T19:49:00.557829
2021-01-20T23:06:16
2021-01-20T23:06:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,069
java
//There are n servers numbered from 0 to n-1 connected by undirected server-to-s //erver connections forming a network where connections[i] = [a, b] represents a c //onnection between servers a and b. Any server can reach any other server directl //y or indirectly through the network. // // A critical connection is a connection that, if removed, will make some server // unable to reach some other server. // // Return all critical connections in the network in any order. // // // Example 1: // // // // //Input: n = 4, connections = [[0,1],[1,2],[2,0],[1,3]] //Output: [[1,3]] //Explanation: [[3,1]] is also accepted. // // // // Constraints: // // // 1 <= n <= 10^5 // n-1 <= connections.length <= 10^5 // connections[i][0] != connections[i][1] // There are no repeated connections. // // Related Topics Depth-first Search // 👍 1173 👎 82 package leetcode.editor.en; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; // 2020-07-19 23:21:35 // Zeshi Yang public class Leetcode1192CriticalConnectionsInANetwork{ // Java: critical-connections-in-a-network public static void main(String[] args) { Solution sol = new Leetcode1192CriticalConnectionsInANetwork().new Solution(); // TO TEST System.out.println(); } //leetcode submit region begin(Prohibit modification and deletion) class Solution { // Solution 1: DFS with list denoting neighbors public List<List<Integer>> criticalConnections(int n, List<List<Integer>> connections) { List<List<Integer>> graph = new ArrayList<>(); for (int i = 0; i < n; i++) { graph.add(new ArrayList<>()); } // build the graph for (List<Integer> neighbor: connections) { graph.get(neighbor.get(0)).add(neighbor.get(1)); graph.get(neighbor.get(1)).add(neighbor.get(0)); } // an array to save the timestamp that we meet a certain node List<List<Integer>> res = new ArrayList<>(); int[] id = new int[n]; dfs(1, -1, 0, id, graph, res); return res; } /** * @param vertexID: the # of the vertex * @param prev: index of the previous vertex * @param cur: index of current vertex * @param id: the time stamp array * @param graph: the graph connection between vertices * @param res: result * @return: the # of the vertex cur */ private int dfs(int vertexID, int prev, int cur, int[] id, List<List<Integer>> graph, List<List<Integer>> res) { if (id[cur] > 0) { // pruning, look up the form return id[cur]; } id[cur] = vertexID; for (int next: graph.get(cur)) { if (next == prev) { // ignore the edge where 'cur' comes from, 避免A走向B之后,B又走向A continue; } id[next] = dfs(vertexID + 1, cur, next, id, graph, res); id[cur] = Math.min(id[cur], id[next]); } // determine whether (prev, cur) is a critical edge if (id[cur] == vertexID && prev != -1) { res.add(Arrays.asList(prev, cur)); } return id[cur]; } } //leetcode submit region end(Prohibit modification and deletion) /* 1. 用一个HashMap来建图,key就是图上的点,value就是这个点左右的neighbors list。 2. 这道题最tricky的地方在于用一个timestamp来查环,当cur的timestamp <= return timestamp,则表示没有环,存在critical edge;反之则是有环。 3. 在遍历neighbors的过程中,不能直接往回走,即cur == prev的情况要用continue直接跳过。 4. 当符合上述条件进行加答案时,由于初始值prev我们设定了一个假想值-1,所以要判断一开始的时候不能加答案。 5. dfs()返回的是一个最小值,所以一定要在最后返回的时候将cur和return timestamp进行比较,拿到最小值 */ // Solution 1: DFS with list denoting neighbors class Solution1 { public List<List<Integer>> criticalConnections(int n, List<List<Integer>> connections) { List<List<Integer>> graph = new ArrayList<>(); for (int i = 0; i < n; i++) { graph.add(new ArrayList<>()); } // build the graph for (List<Integer> neighbor: connections) { graph.get(neighbor.get(0)).add(neighbor.get(1)); graph.get(neighbor.get(1)).add(neighbor.get(0)); } // an array to save the timestamp that we meet a certain node List<List<Integer>> res = new ArrayList<>(); int[] id = new int[n]; dfs(1, -1, 0, id, graph, res); return res; } /** * @param vertexID: the # of the vertex * @param prev: index of the previous vertex * @param cur: index of current vertex * @param id: the time stamp array * @param graph: the graph connection between vertices * @param res: result * @return: the # of the vertex cur */ private int dfs(int vertexID, int prev, int cur, int[] id, List<List<Integer>> graph, List<List<Integer>> res) { if (id[cur] > 0) { // pruning, look up the form return id[cur]; } id[cur] = vertexID; for (int next: graph.get(cur)) { if (next == prev) { // ignore the edge where 'cur' comes from, 避免A走向B之后,B又走向A continue; } id[next] = dfs(vertexID + 1, cur, next, id, graph, res); id[cur] = Math.min(id[cur], id[next]); } // determine whether (prev, cur) is a critical edge if (id[cur] == vertexID && prev != -1) { res.add(Arrays.asList(prev, cur)); } return id[cur]; } } // Solution 2: DFS with HashSet denoting neighbors class Solution2 { public List<List<Integer>> criticalConnections(int n, List<List<Integer>> connections) { Map<Integer, Set<Integer>> graph = new HashMap<>(); buildGraph(connections, graph); // an array to save the timestamp that we meet a certain node List<List<Integer>> res = new ArrayList<>(); int[] id = new int[n]; dfs(1, -1, 0, id, graph, res); return res; } private void buildGraph(List<List<Integer>> con, Map<Integer, Set<Integer>> graph) { for (List<Integer> edge : con) { int n1 = edge.get(0); int n2 = edge.get(1); if (!graph.containsKey(n1)) { Set<Integer> set2 = new HashSet<>(); graph.put(n1, set2); } if (!graph.containsKey(n2)) { Set<Integer> set1 = new HashSet<>(); graph.put(n2, set1); } graph.get(n1).add(n2); graph.get(n2).add(n1); } } /** * @param vertexID: the # of the vertex * @param prev: index of the previous vertex * @param cur: index of current vertex * @param id: the time stamp array * @param graph: the graph connection between vertices * @param res: result * @return: the # of the vertex cur */ private int dfs(int vertexID, int prev, int cur, int[] id, Map<Integer, Set<Integer>> graph, List<List<Integer>> res) { if (id[cur] > 0) { // pruning, look up the form return id[cur]; } id[cur] = vertexID; Set<Integer> set = graph.get(cur); for (int next: set) { if (next == prev) { // ignore the edge where 'cur' comes from, 避免A走向B之后,B又走向A continue; } id[next] = dfs(vertexID + 1, cur, next, id, graph, res); id[cur] = Math.min(id[cur], id[next]); } // determine whether (prev, cur) is a critical edge if (id[cur] == vertexID && prev != -1) { res.add(Arrays.asList(prev, cur)); } return id[cur]; } } }
[ "iyangzeshi@outlook.com" ]
iyangzeshi@outlook.com
7cccc846e3dafc30152f38356d7faddecdc6ceb6
848271617c9f0b677e3e517a3642cf18b72e55ed
/app/src/main/java/com/cpigeon/cpigeonhelper/utils/service/ServiceUtil.java
6b9be4b55d6406ea5dbbdc2f09dee0534e84da99
[]
no_license
xiaohl-902/CHelperAndroid
77e9c406e8b385bfadb1454395d215d5b7392e25
9a9c4262424d1b8bcb552720bbe8d48f1fa451df
refs/heads/master
2020-04-06T13:08:34.183892
2019-01-25T08:31:18
2019-01-25T08:31:18
157,485,914
1
1
null
null
null
null
UTF-8
Java
false
false
828
java
package com.cpigeon.cpigeonhelper.utils.service; import android.app.ActivityManager; import android.content.Context; import java.util.List; /** * Created by Administrator on 2018/4/18. */ public class ServiceUtil { // 判断服务是否开启 public static boolean isServiceAlive(Context context, String serviceClassName) { ActivityManager manager = (ActivityManager) context .getSystemService(Context.ACTIVITY_SERVICE); List<ActivityManager.RunningServiceInfo> running = manager .getRunningServices(200); for (int i = 0; i < running.size(); i++) { if (serviceClassName.equals(running.get(i).service.getClassName())) { return true; } } return false; } }
[ "656452024@qq.com" ]
656452024@qq.com
df2e1ce183644e95efff4006539a4f5cff374a6d
294e77c56a3ced3d230a948873feee4d48fe53fa
/jims-api/src/main/java/com/jims/sys/entity/UnitInContract.java
c3728a8d131753d3b8ec6fb99ef8b2542848f62d
[]
no_license
zyg58979008/hrm
c5ecad2217b7ea10d3c09389e079442ce4c8e75e
c53b2205f3f44926f5ee9378dd9e8fd9d47fec9e
refs/heads/master
2020-05-23T17:38:05.871318
2017-03-13T04:03:18
2017-03-13T04:03:18
84,775,991
0
1
null
null
null
null
UTF-8
Java
false
false
3,731
java
/** * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.jims.sys.entity; import com.jims.common.persistence.DataEntity; import org.hibernate.validator.constraints.Length; /** * 合同单位记录Entity * @author zhangpeng * @version 2016-04-18 */ public class UnitInContract extends DataEntity<UnitInContract> { private static final long serialVersionUID = 1L; private String unitName; // 合同单位名称 private String inputCode; // 输入码 private String address; // 单位地址 private String unitType; // 单位性质 private String subordinateTo; // 隶属单位 private String distanceToHospital; // 就医距离 private String regularNum; // 在编人数 private String tempNum; // 非编人数 private String retiredNum; // 离退休人数 private String inputCodeWb; // 五笔码 private String orgId; public UnitInContract() { super(); } public UnitInContract(String id){ super(id); } @Length(min=0, max=40, message="合同单位名称长度必须介于 0 和 40 之间") public String getUnitName() { return unitName; } public void setUnitName(String unitName) { this.unitName = unitName; } @Length(min=0, max=8, message="输入码长度必须介于 0 和 8 之间") public String getInputCode() { return inputCode; } public void setInputCode(String inputCode) { this.inputCode = inputCode; } @Length(min=0, max=40, message="单位地址长度必须介于 0 和 40 之间") public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } @Length(min=0, max=1, message="单位性质长度必须介于 0 和 1 之间") public String getUnitType() { return unitType; } public void setUnitType(String unitType) { this.unitType = unitType; } @Length(min=0, max=11, message="隶属单位长度必须介于 0 和 11 之间") public String getSubordinateTo() { return subordinateTo; } public void setSubordinateTo(String subordinateTo) { this.subordinateTo = subordinateTo; } public String getDistanceToHospital() { return distanceToHospital; } public void setDistanceToHospital(String distanceToHospital) { this.distanceToHospital = distanceToHospital; } @Length(min=0, max=4, message="在编人数长度必须介于 0 和 4 之间") public String getRegularNum() { return regularNum; } public void setRegularNum(String regularNum) { this.regularNum = regularNum; } @Length(min=0, max=4, message="非编人数长度必须介于 0 和 4 之间") public String getTempNum() { return tempNum; } public void setTempNum(String tempNum) { this.tempNum = tempNum; } @Length(min=0, max=4, message="离退休人数长度必须介于 0 和 4 之间") public String getRetiredNum() { return retiredNum; } public void setRetiredNum(String retiredNum) { this.retiredNum = retiredNum; } @Length(min=0, max=8, message="五笔码长度必须介于 0 和 8 之间") public String getInputCodeWb() { return inputCodeWb; } public void setInputCodeWb(String inputCodeWb) { this.inputCodeWb = inputCodeWb; } @Length(min = 0, max = 64, message = "所属组织结构长度必须介于 0 和 64 之间") public String getOrgId() { return orgId; } public void setOrgId(String orgId) { this.orgId = orgId; } }
[ "58979008@qq.com" ]
58979008@qq.com
5cc200826b7f169b3b99fc555ef96213681cdfa3
c345afae580fd66bd0ee59f9d69d7d8ee28bbd8c
/Exams/November20th2016Morning/src/P05Fox.java
12f71b20cecd1fe342ac7897d1a4dee488c6747e
[]
no_license
AleksandarBoev/Software-University-Programming-Basics-with-Java
755ee52238d52bebec168acacbd4d7c4fbf7e020
91cd9a41078c0500badc93b69eb49b3235fa7298
refs/heads/master
2021-09-25T15:54:51.950332
2018-10-23T19:40:42
2018-10-23T19:40:42
114,541,596
0
0
null
null
null
null
UTF-8
Java
false
false
1,788
java
import java.util.Scanner; public class P05Fox { public static void main(String[] args) { Scanner console = new Scanner(System.in); int n = Integer.parseInt(console.nextLine()); //odd numbah int pictureWidth = 2 * n + 3; //ears: int earsHeight = n; for (int row = 1; row <= earsHeight ; row++) { System.out.print(returnStr(row, "*")); System.out.print("\\"); System.out.print(returnStr(pictureWidth - 2 * row - 2, "-")); System.out.print("/"); System.out.println(returnStr(row, "*")); } //eyes: // int eyesHeight = (n / 2 / 2) + 1; int eyesHeight = n / 3; int eyeWidth = n / 2; for (int row = 0; row < eyesHeight; row++) { System.out.print("|"); System.out.print(returnStr(eyeWidth + row, "*")); System.out.print("\\"); System.out.print(returnStr(pictureWidth - 2 - (eyeWidth + row) * 2 - 2, "*")); //or n - (2 * row) System.out.print("/"); System.out.print(returnStr(eyeWidth + row, "*")); System.out.println("|"); } //mouth: int mouthHeight = n; for (int row = 1; row <= mouthHeight; row++) { System.out.print(returnStr(row, "-")); System.out.print("\\"); System.out.print(returnStr(pictureWidth - 2 - (2 * row), "*")); System.out.print("/"); System.out.println(returnStr(row, "-")); } //main ends here } static String returnStr (int count, String text) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < count; i++) { sb.append(text); } return sb.toString(); } }
[ "aleksandarboev95@gmail.com" ]
aleksandarboev95@gmail.com
4dcd7365faadd0bf6c62839f7e2872e85631cd5e
339265c37840a7a8fece6418c0398f93b0a95ac4
/src/com/engc/oamobile/support/utils/TimeType.java
66a0e3716022d74881c8090b9da540f17ff7ffcb
[]
no_license
giserh/OAMobile
f93b69ea72f21ac8a4b7cc4de032fb7c41fef10b
98e7fafc63b003f5f6b77e15397a0524a431441e
refs/heads/master
2021-01-14T14:06:42.335423
2014-07-17T16:23:42
2014-07-17T16:23:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
295
java
package com.engc.oamobile.support.utils; public class TimeType { public static final int MONTH = 1; // 月份 public static final int DAY = 5; // 日子 public static final int HOUR = 2;// 小时 public static final int MIN = 3; // 分钟 public static final int SECONDS = 4; // 秒数 }
[ "taowu78@gmail.com" ]
taowu78@gmail.com
c3b3853aa3e7088299443bf3a0a2bc61284e7780
02a087e8de0a7d0cfed9dba60e8cff5be4ae3be1
/Research_Bucket/Completed_Archived/ConcolicProcess/oracles/Bellon/bellon_benchmark/sourcecode/eclipse-jdtcore/src/internal/compiler/ast/Block.java
441a1950a9978687c8db34c4985e71975a17e7df
[]
no_license
dan7800/Research
7baf8d5afda9824dc5a53f55c3e73f9734e61d46
f68ea72c599f74e88dd44d85503cc672474ec12a
refs/heads/master
2021-01-23T09:50:47.744309
2018-09-01T14:56:01
2018-09-01T14:56:01
32,521,867
1
1
null
null
null
null
UTF-8
Java
false
false
4,964
java
package org.eclipse.jdt.internal.compiler.ast; /* * (c) Copyright IBM Corp. 2000, 2001. * All Rights Reserved. */ import org.eclipse.jdt.internal.compiler.IAbstractSyntaxTreeVisitor; import org.eclipse.jdt.internal.compiler.impl.*; import org.eclipse.jdt.internal.compiler.codegen.*; import org.eclipse.jdt.internal.compiler.flow.*; import org.eclipse.jdt.internal.compiler.lookup.*; public class Block extends Statement { public Statement[] statements; public int explicitDeclarations; // the number of explicit declaration , used to create scope public BlockScope scope; public static final Block None = new Block(0); public Block(int explicitDeclarations) { this.explicitDeclarations = explicitDeclarations; } public FlowInfo analyseCode( BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { // empty block if (statements == null) return flowInfo; for (int i = 0, max = statements.length; i < max; i++) { Statement stat; if (!flowInfo.complainIfUnreachable((stat = statements[i]), scope)) { flowInfo = stat.analyseCode(scope, flowContext, flowInfo); } } return flowInfo; } public static final Block EmptyWith(int sourceStart, int sourceEnd) { //return an empty block which position is s and e Block bk = new Block(0); bk.sourceStart = sourceStart; bk.sourceEnd = sourceEnd; return bk; } /** * Code generation for a block */ public void generateCode(BlockScope currentScope, CodeStream codeStream) { if ((bits & IsReachableMASK) == 0) { return; } int pc = codeStream.position; if (statements != null) { for (int i = 0, max = statements.length; i < max; i++) { statements[i].generateCode(scope, codeStream); } } // for local variable debug attributes if (scope != currentScope) { // was really associated with its own scope codeStream.exitUserScope(scope); } codeStream.recordPositionsFrom(pc, this.sourceStart); } public boolean isEmptyBlock() { return statements == null; } public void resolve(BlockScope upperScope) { if (statements != null) { scope = explicitDeclarations == 0 ? upperScope : new BlockScope(upperScope, explicitDeclarations); int i = 0, length = statements.length; while (i < length) statements[i++].resolve(scope); } } public void resolveUsing(BlockScope givenScope) { // this optimized resolve(...) is sent only on none empty blocks scope = givenScope; if (statements != null) { int i = 0, length = statements.length; while (i < length) statements[i++].resolve(scope); } } public String toString(int tab) { /* slow code */ String s = tabString(tab); if (this.statements == null) { s += "{\n"; //$NON-NLS-1$ s += tabString(tab); s += "}"; //$NON-NLS-1$ return s; } // s = s + (explicitDeclarations != 0 // ? " { // ---scope needed for "+String.valueOf(explicitDeclarations) +" locals------------ \n" // : "{// ---NO scope needed------ \n") ; s += "{\n"; //$NON-NLS-1$ s += this.toStringStatements(tab); s += tabString(tab); s += "}"; //$NON-NLS-1$ return s; } public String toStringStatements(int tab) { if (this.statements == null) return ""; //$NON-NLS-1$ StringBuffer buffer = new StringBuffer(); for (int i = 0; i < statements.length; i++) { buffer.append(statements[i].toString(tab + 1)); if (statements[i] instanceof Block) { buffer.append("\n"); //$NON-NLS-1$ } else { buffer.append(";\n"); }//$NON-NLS-1$ }; return buffer.toString(); } public void traverse( IAbstractSyntaxTreeVisitor visitor, BlockScope blockScope) { if (visitor.visit(this, blockScope)) { if (statements != null) { int statementLength = statements.length; for (int i = 0; i < statementLength; i++) statements[i].traverse(visitor, scope); } } visitor.endVisit(this, blockScope); } }
[ "dxkvse@rit.edu" ]
dxkvse@rit.edu
c2f7e9145214129f147b2874001a00a2e22e1c71
e7e4c88c5e48006ed8e54416fb55b74752303bb8
/core/src/main/java/com/omega/core/exception/PermissionNotFoundException.java
8e40536772e94727692dd6df78a0eff5135629c0
[]
no_license
KyuBlade/BotOfSteel
a08311edb46fe387a6e0046e6d6abdbc9b05cce8
a1c918a6c982e833af4a05cb79829f966564e5a4
refs/heads/master
2020-05-26T15:35:59.843758
2018-10-22T15:39:31
2018-10-22T15:39:31
82,493,599
0
1
null
null
null
null
UTF-8
Java
false
false
393
java
package com.omega.core.exception; public class PermissionNotFoundException extends Exception { private final String permission; public PermissionNotFoundException() { this.permission = null; } public PermissionNotFoundException(String permission) { this.permission = permission; } public String getPermission() { return permission; } }
[ "jonesadev@gmail.com" ]
jonesadev@gmail.com
9c725ea246ef52c8dd8cff72070aaf8c785f91ec
dfd7e70936b123ee98e8a2d34ef41e4260ec3ade
/analysis/reverse-engineering/decompile-fitts-with-gradle-20191031-2200/src/main/java/kr/co/popone/fitts/feature/push/order/PaymentCancelMisPriceFragment$onViewCreated$2.java
792bd527adfbb8638956fceccd84c5c8723bdf94
[ "Apache-2.0" ]
permissive
skkuse-adv/2019Fall_team2
2d4f75bc793368faac4ca8a2916b081ad49b7283
3ea84c6be39855f54634a7f9b1093e80893886eb
refs/heads/master
2020-08-07T03:41:11.447376
2019-12-21T04:06:34
2019-12-21T04:06:34
213,271,174
5
5
Apache-2.0
2019-12-12T09:15:32
2019-10-07T01:18:59
Java
UTF-8
Java
false
false
844
java
package kr.co.popone.fitts.feature.push.order; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import kr.co.popone.fitts.feature.order.detail.OrderDetailActivity; final class PaymentCancelMisPriceFragment$onViewCreated$2 implements OnClickListener { final /* synthetic */ PaymentCancelMisPriceFragment this$0; PaymentCancelMisPriceFragment$onViewCreated$2(PaymentCancelMisPriceFragment paymentCancelMisPriceFragment) { this.this$0 = paymentCancelMisPriceFragment; } public final void onClick(View view) { Bundle arguments = this.this$0.getArguments(); if (arguments != null) { OrderDetailActivity.Companion.start(this.this$0.getContext(), arguments.getLong(PaymentCancelMisPriceFragment.KEY_ORDER_ID)); } } }
[ "33246398+ajid951125@users.noreply.github.com" ]
33246398+ajid951125@users.noreply.github.com
2526973a9bcfff19a3c61fa296035b95cee82d6e
23b6d6971a66cf057d1846e3b9523f2ad4e05f61
/MLMN-Alarm-Feedback/src/controller/W_WORKING_TYPESContronller.java
8b160dea36f464f9e823be25d34710a594ced44c
[]
no_license
vhctrungnq/mlmn
943f5a44f24625cfac0edc06a0d1b114f808dfb8
d3ba1f6eebe2e38cdc8053f470f0b99931085629
refs/heads/master
2020-03-22T13:48:30.767393
2018-07-08T05:14:12
2018-07-08T05:14:12
140,132,808
0
1
null
2018-07-08T05:29:27
2018-07-08T02:57:06
Java
UTF-8
Java
false
false
6,953
java
package controller; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import org.displaytag.tags.TableTagParameters; import org.displaytag.util.ParamEncoder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import vo.W_WORKING_TYPES; import dao.W_WORKING_TYPESDAO; @Controller @RequestMapping("/w_working_types/*") public class W_WORKING_TYPESContronller extends BaseController{ @Autowired private W_WORKING_TYPESDAO working_typesDao; @RequestMapping("list") public ModelAndView list(@ModelAttribute("filter") W_WORKING_TYPES filter, Model model, HttpServletRequest request) { // Lay ten file export Calendar currentDate = Calendar.getInstance(); SimpleDateFormat formatter= new SimpleDateFormat("ddMMyyyy"); String dateNow = formatter.format(currentDate.getTime()); String exportFileName = "DanhMucCongViec_" + dateNow; model.addAttribute("exportFileName", exportFileName); if(filter.getName() != null) filter.setName(filter.getName().trim()); if(filter.getOrderingStr() != null && filter.getOrderingStr() != "") filter.setOrderingStr(filter.getOrderingStr().trim()); try { int ordering; if(filter.getOrderingStr() != null && filter.getOrderingStr() != "") ordering = Integer.parseInt(filter.getOrderingStr()); List<W_WORKING_TYPES> working_types = working_typesDao.getWorkingTypesFilter(filter.getName(), filter.getOrderingStr()); model.addAttribute("working_typesList", working_types); } catch(Exception e){ List<W_WORKING_TYPES> working_types = null; model.addAttribute("working_typesList", working_types); } return new ModelAndView("jsp/working_typesList"); } @RequestMapping(value = "delete", method = RequestMethod.GET) public String onDelete(@RequestParam (required = true) Integer id, HttpServletRequest request, HttpServletResponse response) { /*List<W_WORKING_MANAGEMENTS> id_works_managements = working_managementDao.getIdWorksTypes(Integer.toString(id)); if(id_works_managements.size()>0) { for(int i=0;i<id_works_managements.size();i++) { Delete3Table(Integer.toString(id_works_managements.get(i).getId())); working_managementDao.deleteByPrimaryKey(id_works_managements.get(i).getId()); // Xóa ở bảng W_WORKING_MANAGEMENTS } }*/ try{ working_typesDao.deleteByPrimaryKey(id); saveMessageKey(request, "messsage.confirm.deletesuccess"); } catch(Exception e){ saveMessage(request, "Xóa thất bại, dữ liệu đã được dùng ở nơi khác."); } return "redirect:list.htm"; } @RequestMapping(value = "form", method = RequestMethod.GET) public String showForm(@RequestParam(required = false) Integer id, ModelMap model, HttpServletRequest request) { W_WORKING_TYPES working_types = (id == null) ? new W_WORKING_TYPES() : working_typesDao.selectByPrimaryKey(id); model.addAttribute("w_working_types",working_types); if(id == null){ model.addAttribute("WorksAddEdit", "Y"); } else { model.addAttribute("WorksAddEdit", "N"); } return "jsp/working_typesForm"; } @RequestMapping(value = "form", method = RequestMethod.POST) public String onSubmit(@ModelAttribute("w_working_types") @Valid W_WORKING_TYPES working_types, BindingResult result, ModelMap model, HttpServletRequest request) { //Ném lỗi if (result.hasErrors()) { if(working_types.getId() == null){ model.addAttribute("WorksAddEdit", "Y"); } else { model.addAttribute("WorksAddEdit", "N"); } if(result.hasFieldErrors("ordering")) model.addAttribute("orderingError", "orderingError"); return "jsp/working_typesForm"; } SecurityContext securityContext = SecurityContextHolder.getContext(); Authentication authentication = securityContext.getAuthentication(); if(working_typesDao.selectByPrimaryKey(working_types.getId())== null) { if(working_typesDao.countNameTogether(working_types.getName()) == 0){ working_types.setCreatedBy(authentication.getName()); working_typesDao.insert(working_types); saveMessageKey(request, "messsage.confirm.addsuccess"); } else { if(working_types.getId() == null){ model.addAttribute("WorksAddEdit", "Y"); } else { model.addAttribute("WorksAddEdit", "N"); } saveMessageKey(request, "messsage.confirm.loaiCongViecTonTai"); return "jsp/working_typesForm"; } } else { if(working_typesDao.countNameDontId(working_types) == 0){ working_types.setModifiedBy(authentication.getName()); working_typesDao.updateByPrimaryKey(working_types); saveMessageKey(request, "messsage.confirm.updatesuccess"); } else { if(working_types.getId() == null){ model.addAttribute("WorksAddEdit", "Y"); } else { model.addAttribute("WorksAddEdit", "N"); } saveMessageKey(request, "messsage.confirm.loaiCongViecTonTai"); return "jsp/working_typesForm"; } } return "redirect:list.htm"; } //FORM DANH SÁCH CÔNG VIỆC - works_contentList.jsp @RequestMapping(value="{fileName}", method = RequestMethod.GET) @ResponseBody public byte[] getNameInJSP(@PathVariable String fileName) throws IOException { File file = new File("C:\\uploads\\" + fileName); FileInputStream is = new FileInputStream(file); /*Image image =*/ byte[] content = new byte[(int) file.length()]; // Read in the bytes int offset = 0; int numRead = 0; while (offset < content.length && (numRead=is.read(content, offset, content.length-offset)) >= 0) { offset += numRead; } is.close(); return content; /*return image.getData();*/ } }
[ "trungnq@vhc.com.vn" ]
trungnq@vhc.com.vn
83ffd2db123fe279815e71c28a987d1c52bae454
5b55c12f1e60ea2c0f094bf6e973e9150bbda57f
/common/src/main/java/com/ssitcloud/readermgmt/entity/UploadReaderFieldTempEntity.java
27962688702371d449cc32b892846776bcd83d24
[]
no_license
huguodong/Cloud-4
f18a8f471efbb2167e639e407478bf808d1830c2
3facaf5fc3d585c938ecc93e89a6a4a7d35e5bcc
refs/heads/master
2020-03-27T22:59:41.109723
2018-08-24T01:42:39
2018-08-24T01:43:04
147,279,899
0
0
null
2018-09-04T02:54:28
2018-09-04T02:54:28
null
UTF-8
Java
false
false
1,104
java
package com.ssitcloud.readermgmt.entity; import java.util.List; public class UploadReaderFieldTempEntity { /**字段名称 code 编号 */ private String data_source_select; /**单行、还是多行,多行是指:在excel一列中存在多种内容,1233311|兰大|本科 text|multiple-text*/ private String cOptionType; /**分割符(| ,*, #)*/ private String dataFilter; /**字段在excel的位置(第几列)*/ private int columnRank; public String getData_source_select() { return data_source_select; } public void setData_source_select(String data_source_select) { this.data_source_select = data_source_select; } public String getcOptionType() { return cOptionType; } public void setcOptionType(String cOptionType) { this.cOptionType = cOptionType; } public String getDataFilter() { return dataFilter; } public void setDataFilter(String dataFilter) { this.dataFilter = dataFilter; } public int getColumnRank() { return columnRank; } public void setColumnRank(int columnRank) { this.columnRank = columnRank; } }
[ "chenkun141@163com" ]
chenkun141@163com
d4834de94f1f220557285ffe953945631e134e70
f3073ed112bf411ceaeafefc482a05604d9c1319
/app/src/main/java/com/qingwing/safebox/net/request/BoxAlarmUploadReq.java
87a1989ad761edc722ec4da824a331964542064c
[]
no_license
shoxgov/UserApp_AS_2
ab20fc6935fc99643b167fa227b866d617e0ad24
ce892818fbc2072fda38aec52c614a9f17f30328
refs/heads/master
2021-08-22T12:28:54.632535
2017-11-30T06:32:37
2017-11-30T06:32:37
109,775,934
0
0
null
null
null
null
UTF-8
Java
false
false
1,657
java
package com.qingwing.safebox.net.request; import com.qingwing.safebox.net.BaseCommReq; import com.qingwing.safebox.net.BaseResponse; import com.qingwing.safebox.net.response.BoxAlarmUploadResponse; import com.qingwing.safebox.network.ServerAddress; import java.util.HashMap; import java.util.Map; public class BoxAlarmUploadReq extends BaseCommReq { public String url = ServerAddress.BOXWARNBOXUPLOAD; private String barcode; private String actionType; private String date; private BoxAlarmUploadResponse warnUploadResponse; private Map<String, String> postParams = new HashMap<String, String>(); @Override public String generUrl() { setTag("BoxAlarmUploadReq"); postParams.put("barcode", barcode); postParams.put("actionType", actionType); postParams.put("date", date); setPostParam(postParams); return url; } @Override public Class getResClass() { return BoxAlarmUploadResponse.class; } @Override public BaseResponse getResBean() { if (warnUploadResponse == null) { warnUploadResponse = new BoxAlarmUploadResponse(); } return warnUploadResponse; } public String getBarcode() { return barcode; } public void setBarcode(String barcode) { this.barcode = barcode; } public String getActionType() { return actionType; } public void setActionType(String actionType) { this.actionType = actionType; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } }
[ "shoxgov@126.com" ]
shoxgov@126.com
76e90773e7a61b12d878586df362f73a83267e95
cb5f27eb6960c64542023d7382d6b917da38f0fc
/sources/com/google/android/gms/measurement/internal/zzbo.java
3c3e6bc464a777e7370d29bc79c95f1bda70f12c
[]
no_license
djtwisty/ccah
a9aee5608d48448f18156dd7efc6ece4f32623a5
af89c8d3c216ec3371929436545227682e811be7
refs/heads/master
2020-04-13T05:33:08.267985
2018-12-24T13:52:39
2018-12-24T13:52:39
162,995,366
0
0
null
null
null
null
UTF-8
Java
false
false
1,366
java
package com.google.android.gms.measurement.internal; import android.content.BroadcastReceiver.PendingResult; import android.content.Context; import android.os.Bundle; final class zzbo implements Runnable { private final /* synthetic */ Context val$context; private final /* synthetic */ zzbw zzaoe; private final /* synthetic */ zzas zzaof; private final /* synthetic */ long zzaog; private final /* synthetic */ Bundle zzaoh; private final /* synthetic */ PendingResult zzrf; zzbo(zzbm zzbm, zzbw zzbw, long j, Bundle bundle, Context context, zzas zzas, PendingResult pendingResult) { this.zzaoe = zzbw; this.zzaog = j; this.zzaoh = bundle; this.val$context = context; this.zzaof = zzas; this.zzrf = pendingResult; } public final void run() { long j = this.zzaoe.zzgu().zzanf.get(); long j2 = this.zzaog; if (j > 0 && (j2 >= j || j2 <= 0)) { j2 = j - 1; } if (j2 > 0) { this.zzaoh.putLong("click_timestamp", j2); } this.zzaoh.putString("_cis", "referrer broadcast"); zzbw.zza(this.val$context, null).zzgj().logEvent("auto", "_cmp", this.zzaoh); this.zzaof.zzjo().zzby("Install campaign recorded"); if (this.zzrf != null) { this.zzrf.finish(); } } }
[ "alex@Alexs-MacBook-Pro.local" ]
alex@Alexs-MacBook-Pro.local
90cfdeb8fc0dc53dd9fa48e90bad7c500e4fbfb0
2d2e1c6126870b0833c6f80fec950af7897065e5
/scriptom-office-2k7/src/main/java/org/codehaus/groovy/scriptom/tlb/office2007/MsoLineDashStyle.java
c7a0774516b2c887367a1491f948c8028e9e0f07
[]
no_license
groovy/Scriptom
d650b0464f58d3b58bb13469e710dbb80e2517d5
790eef97cdacc5da293d18600854b547f47e4169
refs/heads/master
2023-09-01T16:13:00.152780
2022-02-14T12:30:17
2022-02-14T12:30:17
39,463,850
20
7
null
2015-07-23T12:48:26
2015-07-21T18:52:11
Java
UTF-8
Java
false
false
4,519
java
/* * Copyright 2009 (C) The Codehaus. All Rights Reserved. * * Redistribution and use of this software and associated documentation * ("Software"), with or without modification, are permitted provided that the * following conditions are met: * 1. Redistributions of source code must retain copyright statements and * notices. Redistributions must also contain a copy of this document. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name "groovy" must not be used to endorse or promote products * derived from this Software without prior written permission of The Codehaus. * For written permission, please contact info@codehaus.org. * 4. Products derived from this Software may not be called "groovy" nor may * "groovy" appear in their names without prior written permission of The * Codehaus. "groovy" is a registered trademark of The Codehaus. * 5. Due credit should be given to The Codehaus - http://groovy.codehaus.org/ * * THIS SOFTWARE IS PROVIDED BY THE CODEHAUS AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE CODEHAUS OR ITS CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ package org.codehaus.groovy.scriptom.tlb.office2007; import java.util.Map; import java.util.TreeMap; import java.util.Collections; /** * @author Jason Smith */ public final class MsoLineDashStyle { private MsoLineDashStyle() { } /** * Value is -2 (0xFFFFFFFE) */ public static final Integer msoLineDashStyleMixed = Integer.valueOf(-2); /** * Value is 1 (0x1) */ public static final Integer msoLineSolid = Integer.valueOf(1); /** * Value is 2 (0x2) */ public static final Integer msoLineSquareDot = Integer.valueOf(2); /** * Value is 3 (0x3) */ public static final Integer msoLineRoundDot = Integer.valueOf(3); /** * Value is 4 (0x4) */ public static final Integer msoLineDash = Integer.valueOf(4); /** * Value is 5 (0x5) */ public static final Integer msoLineDashDot = Integer.valueOf(5); /** * Value is 6 (0x6) */ public static final Integer msoLineDashDotDot = Integer.valueOf(6); /** * Value is 7 (0x7) */ public static final Integer msoLineLongDash = Integer.valueOf(7); /** * Value is 8 (0x8) */ public static final Integer msoLineLongDashDot = Integer.valueOf(8); /** * Value is 9 (0x9) */ public static final Integer msoLineLongDashDotDot = Integer.valueOf(9); /** * Value is 10 (0xA) */ public static final Integer msoLineSysDash = Integer.valueOf(10); /** * Value is 11 (0xB) */ public static final Integer msoLineSysDot = Integer.valueOf(11); /** * Value is 12 (0xC) */ public static final Integer msoLineSysDashDot = Integer.valueOf(12); /** * A {@code Map} of the symbolic names to constant values. */ public static final Map<String,Object> values; static { TreeMap<String,Object> v = new TreeMap<String,Object>(); v.put("msoLineDashStyleMixed", msoLineDashStyleMixed); v.put("msoLineSolid", msoLineSolid); v.put("msoLineSquareDot", msoLineSquareDot); v.put("msoLineRoundDot", msoLineRoundDot); v.put("msoLineDash", msoLineDash); v.put("msoLineDashDot", msoLineDashDot); v.put("msoLineDashDotDot", msoLineDashDotDot); v.put("msoLineLongDash", msoLineLongDash); v.put("msoLineLongDashDot", msoLineLongDashDot); v.put("msoLineLongDashDotDot", msoLineLongDashDotDot); v.put("msoLineSysDash", msoLineSysDash); v.put("msoLineSysDot", msoLineSysDot); v.put("msoLineSysDashDot", msoLineSysDashDot); values = Collections.synchronizedMap(Collections.unmodifiableMap(v)); } }
[ "ysb33r@gmail.com" ]
ysb33r@gmail.com
10df97df4757b039c0234444ecce07f2c99057c8
86d2ce064d95c8897cbe7e2f77d486af2fe5bc3b
/app/src/main/java/com/tec/travelagency/home/fragment/CostInfoFragment.java
84c3d3307689c56c530fffd40b83589de4aaf714
[]
no_license
payencai/TravelShop
d1c868173b47ddc48c1801147297dbf399cac8f2
072a45cb506dafa69d06990cc3e39df893b0b33a
refs/heads/master
2020-05-25T02:29:12.301722
2019-05-20T06:13:06
2019-05-20T06:13:06
187,578,124
0
0
null
null
null
null
UTF-8
Java
false
false
1,620
java
package com.tec.travelagency.home.fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.tec.travelagency.R; import com.tec.travelagency.base.BaseFragment; import com.tec.travelagency.home.entity.PathSelfDetailBean; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; /** * 作者:凌涛 on 2018/9/6 15:02 * 邮箱:771548229@qq..com */ public class CostInfoFragment extends BaseFragment { @BindView(R.id.trafficSpecification) TextView trafficSpecification; @BindView(R.id.ticketSpecification) TextView ticketSpecification; @BindView(R.id.hotelSpecification) TextView hotelSpecification; @Override protected int getContentId() { return R.layout.fragment_cost_info_layout; } @Override protected void initView() { EventBus.getDefault().register(this); } /** * 更新界面,由寄主Activity 发出 * @param bean */ @Subscribe public void changeUI(PathSelfDetailBean bean) { trafficSpecification.setText("【交通】\n\t" + bean.getTrafficSpecification()); ticketSpecification.setText("【门票】\n\t" + bean.getTicketSpecification()); hotelSpecification.setText("【住宿】\n\t" + bean.getHotelSpecification()); } @Override public void onDestroy() { super.onDestroy(); EventBus.getDefault().unregister(this); } }
[ "payencai@sina.com" ]
payencai@sina.com
da04cc041d5146c12555e674df4fef1fca4e6ccd
8cd65d377506fbcf148e9a2ec1a0841ced2efb86
/src/com/zjxjwxk/codinginterview/_03_FindRepeatNumber/Solution2.java
ba4c7b06faf1c3856d1305d6c5bb44a29cd502e7
[]
no_license
zjxjwxk/CodingInterview
5bf516656dd29126b0483cd9c57c28f6a1bd781f
5f45af4fd878a68ef819b27f22aba30d685f6815
refs/heads/master
2023-06-10T16:35:24.480190
2021-06-23T11:09:22
2021-06-23T11:09:22
280,687,656
0
0
null
null
null
null
UTF-8
Java
false
false
1,658
java
package com.zjxjwxk.codinginterview._03_FindRepeatNumber; /** * 剑指 Offer 03. 数组中重复的数字 * * 题目二:不修改数组找出重复的数字。 * 在一个长度为 n+1 的数组里的所有数字都在 1~n 的范围内,所以数 * 组中至少有一个数字是重复的。请找出数组中任意一个重复的数字,但 * 不能修改输入的数组。例如,如果输入长度为 8 的数组 {2, 3, 5, * 4, 3, 2, 6, 7},那么对应的输出是重复的数字 2 或者 3。 * * @author zjxjwxk * @date 2020/7/18 9:39 下午 */ public class Solution2 { public static int findRepeatNumber(int[] nums) { if (nums == null || nums.length == 0) { return -1; } int left = 1, right = nums.length - 1, mid, count; while (left <= right) { mid = ((right - left) >> 1) + left; count = countNumber(nums, left, mid); if (left == right) { if (count > 1) { return left; } else { break; } } if (count > mid - left + 1) { right = mid; } else { left = mid + 1; } } return -1; } public static int countNumber(int[] nums, int left, int right) { int count = 0; for (int num : nums) { if (num >= left && num <= right) { ++count; } } return count; } public static void main(String[] args) { System.out.println(findRepeatNumber(new int[]{2, 3, 5, 4, 3, 2, 6, 7})); } }
[ "zjxjwxk@gmail.com" ]
zjxjwxk@gmail.com
146e6e33d5284d6c4121f57fb297eba6cc43f846
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module588/src/main/java/module588packageJava0/Foo861.java
2ca5212914a0aa1e2b90ec4fa829ba28285fe57e
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
431
java
package module588packageJava0; import java.lang.Integer; public class Foo861 { Integer int0; Integer int1; public void foo0() { new module588packageJava0.Foo860().foo6(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
6e391c269e016062f391697607f594e24fa090b3
84977be791b912c6ed0c7da3c3ca0c1e7a9b1220
/src/main/java/com/skycloud/management/portal/admin/template/entity/TResourcePoolBO.java
51c6c204c6e70b2c53cbb9fed786cfac1e8e197c
[]
no_license
henrylv206/UCFCloudPortal
1503b9e7a66103684444b78935882973306d9744
0283d6c4d1ac9f3de67ea579a8f77c3331fcc897
refs/heads/master
2020-12-30T10:50:05.608675
2014-07-22T07:33:54
2014-07-22T07:33:54
21,964,181
0
1
null
null
null
null
UTF-8
Java
false
false
1,152
java
package com.skycloud.management.portal.admin.template.entity; public class TResourcePoolBO { private String id; private String poolName; private String ip; private String username; private String password; private String state; private String createDt; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getPoolName() { return poolName; } public void setPoolName(String poolName) { this.poolName = poolName; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getCreateDt() { return createDt; } public void setCreateDt(String createDt) { this.createDt = createDt; } }
[ "henrylv206@qq.com" ]
henrylv206@qq.com
7b2eabaef319899d34ff162f7cf0c9537def8806
c3445da9eff3501684f1e22dd8709d01ff414a15
/LIS/sinosoft-parents/lis-business/src/main/java_schema/com/sinosoft/lis/vschema/LLCaseSet.java
52b22b684c020d8e3b6160f3922cc85a17f818eb
[]
no_license
zhanght86/HSBC20171018
954403d25d24854dd426fa9224dfb578567ac212
c1095c58c0bdfa9d79668db9be4a250dd3f418c5
refs/heads/master
2021-05-07T03:30:31.905582
2017-11-08T08:54:46
2017-11-08T08:54:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,227
java
/** * Copyright (c) 2002 sinosoft Co. Ltd. * All right reserved. */ package com.sinosoft.lis.vschema; import com.sinosoft.lis.schema.LLCaseSchema; import com.sinosoft.utility.*; /* * <p>ClassName: LLCaseSet </p> * <p>Description: LLCaseSchemaSet类文件 </p> * <p>Copyright: Copyright (c) 2007</p> * <p>Company: sinosoft </p> * @Database: PhysicalDataModel_2 */ public class LLCaseSet extends SchemaSet { // @Method public boolean add(LLCaseSchema aSchema) { return super.add(aSchema); } public boolean add(LLCaseSet aSet) { return super.add(aSet); } public boolean remove(LLCaseSchema aSchema) { return super.remove(aSchema); } public LLCaseSchema get(int index) { LLCaseSchema tSchema = (LLCaseSchema)super.getObj(index); return tSchema; } public boolean set(int index, LLCaseSchema aSchema) { return super.set(index,aSchema); } public boolean set(LLCaseSet aSet) { return super.set(aSet); } /** * 数据打包,按 XML 格式打包,顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpLLCase描述/A>表字段 * @return: String 返回打包后字符串 **/ public String encode() { StringBuffer strReturn = new StringBuffer(""); int n = this.size(); for (int i = 1; i <= n; i++) { LLCaseSchema aSchema = this.get(i); strReturn.append(aSchema.encode()); if( i != n ) strReturn.append(SysConst.RECORDSPLITER); } return strReturn.toString(); } /** * 数据解包 * @param: str String 打包后字符串 * @return: boolean **/ public boolean decode( String str ) { int nBeginPos = 0; int nEndPos = str.indexOf('^'); this.clear(); while( nEndPos != -1 ) { LLCaseSchema aSchema = new LLCaseSchema(); if(aSchema.decode(str.substring(nBeginPos, nEndPos))) { this.add(aSchema); nBeginPos = nEndPos + 1; nEndPos = str.indexOf('^', nEndPos + 1); } else { // @@错误处理 this.mErrors.copyAllErrors( aSchema.mErrors ); return false; } } LLCaseSchema tSchema = new LLCaseSchema(); if(tSchema.decode(str.substring(nBeginPos))) { this.add(tSchema); return true; } else { // @@错误处理 this.mErrors.copyAllErrors( tSchema.mErrors ); return false; } } }
[ "dingzansh@sinosoft.com.cn" ]
dingzansh@sinosoft.com.cn
6efa96abda9d24d78d8d720d2be65a3d23a7d2df
affe223efe18ba4d5e676f685c1a5e73caac73eb
/clients/webservice/src/main/java/com/vmware/vim25/VirtualMachineFaultToleranceState.java
9b7627f0834b71c78c974abcd9d7574f0d94b659
[]
no_license
RohithEngu/VM27
486f6093e0af2f6df1196115950b0d978389a985
f0f4f177210fd25415c2e058ec10deb13b7c9247
refs/heads/master
2021-01-16T00:42:30.971054
2009-08-14T19:58:16
2009-08-14T19:58:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,562
java
/** * VirtualMachineFaultToleranceState.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package com.vmware.vim25; public class VirtualMachineFaultToleranceState implements java.io.Serializable { /** * */ private static final long serialVersionUID = 1L; private java.lang.String _value_; private static java.util.HashMap _table_ = new java.util.HashMap(); // Constructor protected VirtualMachineFaultToleranceState(java.lang.String value) { _value_ = value; _table_.put(_value_, this); } public static final java.lang.String _notConfigured = "notConfigured"; public static final java.lang.String _disabled = "disabled"; public static final java.lang.String _enabled = "enabled"; public static final java.lang.String _needSecondary = "needSecondary"; public static final java.lang.String _starting = "starting"; public static final java.lang.String _running = "running"; public static final VirtualMachineFaultToleranceState notConfigured = new VirtualMachineFaultToleranceState( _notConfigured); public static final VirtualMachineFaultToleranceState disabled = new VirtualMachineFaultToleranceState( _disabled); public static final VirtualMachineFaultToleranceState enabled = new VirtualMachineFaultToleranceState( _enabled); public static final VirtualMachineFaultToleranceState needSecondary = new VirtualMachineFaultToleranceState( _needSecondary); public static final VirtualMachineFaultToleranceState starting = new VirtualMachineFaultToleranceState( _starting); public static final VirtualMachineFaultToleranceState running = new VirtualMachineFaultToleranceState( _running); public java.lang.String getValue() { return _value_; } public static VirtualMachineFaultToleranceState fromValue( java.lang.String value) throws java.lang.IllegalArgumentException { VirtualMachineFaultToleranceState enumeration = (VirtualMachineFaultToleranceState) _table_ .get(value); if (enumeration == null) { throw new java.lang.IllegalArgumentException(); } return enumeration; } public static VirtualMachineFaultToleranceState fromString( java.lang.String value) throws java.lang.IllegalArgumentException { return fromValue(value); } @Override public boolean equals(java.lang.Object obj) { return (obj == this); } @Override public int hashCode() { return toString().hashCode(); } @Override public java.lang.String toString() { return _value_; } public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_); } public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.EnumSerializer(_javaType, _xmlType); } public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.EnumDeserializer(_javaType, _xmlType); } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc( VirtualMachineFaultToleranceState.class); static { typeDesc.setXmlType(new javax.xml.namespace.QName("urn:vim25", "VirtualMachineFaultToleranceState")); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } }
[ "sankarachary@intalio.com" ]
sankarachary@intalio.com
ae5341c99b73be08c059cc2917bc86053ed5b002
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/17/17_dfb1ac2cdc7c54b12c1f48133ad9bf2d097c2d7d/BasicTest/17_dfb1ac2cdc7c54b12c1f48133ad9bf2d097c2d7d_BasicTest_s.java
063251e164bc6b22656da96f7f685d401adfea67
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,653
java
import org.junit.*; import controllers.Hash; import controllers.Login; import java.util.*; import play.test.*; import models.*; public class BasicTest extends UnitTest { String demoAvatar = "http://www.colourbox.com/preview/2578170-616024-graphic-illustration-of-man-in-business-suit-as-user-icon-avatar.jpg"; @Before public void setup() { Fixtures.deleteAll(); } @Test public void createAndRetrieveUser() { User newUser = new User("Bob","Meyer",Hash.createPassword("secret"),"bob@gmail.com",demoAvatar); assertNotNull(newUser); assertEquals("Bob",newUser.firstName); // check of Hash class assertTrue(Hash.checkPassword("secret", newUser.password)); assertFalse(Hash.checkPassword("badpassword", newUser.password)); } @Test public void createAndRetrieveItem() { Item newItem = new Item("Schuhe","sportlich","Men","Nike","http://images.asos-media.com/inv/media/5/3/1/6/3016135/black/image1xl.jpg",125.0,"demo@mytum.de"); assertNotNull(newItem); assertEquals("Schuhe",newItem.title); } @Test public void createAndRetrieveBoard() { Item newItem = new Item("Schuhe","sportlich","Men","Nike","http://images.asos-media.com/inv/media/5/3/1/6/3016135/black/image1xl.jpg",125.0,"demo@mytum.de"); Board newBoard = new Board("Sportlicher Look für Männer","AF423G"); newBoard.items.add(newItem); assertNotNull(newItem); assertNotNull(newBoard); assertEquals("Sportlicher Look für Männer",newBoard.title); // Item got successful added to board assertEquals(newItem.title,newBoard.items.get(0).title); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b21f5fba4416564dbbb68a60c25496b972d1b2b9
746572ba552f7d52e8b5a0e752a1d6eb899842b9
/JDK8Source/src/main/java/com/sun/org/apache/xalan/internal/xsltc/compiler/PositionCall.java
1df37f4a6621690ad9d3a5958015651e5c1c6799
[]
no_license
lobinary/Lobinary
fde035d3ce6780a20a5a808b5d4357604ed70054
8de466228bf893b72c7771e153607674b6024709
refs/heads/master
2022-02-27T05:02:04.208763
2022-01-20T07:01:28
2022-01-20T07:01:28
26,812,634
7
5
null
null
null
null
UTF-8
Java
false
false
3,191
java
/***** Lobxxx Translate Finished ******/ /* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright 2001-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * <p> *  版权所有2001-2004 Apache软件基金会。 * *  根据Apache许可证2.0版("许可证")授权;您不能使用此文件,除非符合许可证。您可以通过获取许可证的副本 * *  http://www.apache.org/licenses/LICENSE-2.0 * */ /* * $Id: PositionCall.java,v 1.2.4.1 2005/09/02 11:17:10 pvedula Exp $ * <p> *  除非适用法律要求或书面同意,否则根据许可证分发的软件按"原样"分发,不附带任何明示或暗示的担保或条件。请参阅管理许可证下的权限和限制的特定语言的许可证。 * */ package com.sun.org.apache.xalan.internal.xsltc.compiler; import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; import com.sun.org.apache.bcel.internal.generic.ILOAD; import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE; import com.sun.org.apache.bcel.internal.generic.InstructionList; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.CompareGenerator; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TestGenerator; /** /* <p> /*  $ Id:PositionCall.java,v 1.2.4.1 2005/09/02 11:17:10 pvedula Exp $ /* /* * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen */ final class PositionCall extends FunctionCall { public PositionCall(QName fname) { super(fname); } public boolean hasPositionCall() { return true; } public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final InstructionList il = methodGen.getInstructionList(); if (methodGen instanceof CompareGenerator) { il.append(((CompareGenerator)methodGen).loadCurrentNode()); } else if (methodGen instanceof TestGenerator) { il.append(new ILOAD(POSITION_INDEX)); } else { final ConstantPoolGen cpg = classGen.getConstantPool(); final int index = cpg.addInterfaceMethodref(NODE_ITERATOR, "getPosition", "()I"); il.append(methodGen.loadIterator()); il.append(new INVOKEINTERFACE(index,1)); } } }
[ "919515134@qq.com" ]
919515134@qq.com
019cd277036692c0addb1d8f1984fea0c331d336
75adc426717866b8c05b9d569610a7f23c50e639
/vertx-servicediscovery/src/main/java/com/edgar/vertx/service/discovery/http/HttpServiceVerticle.java
c11830a392928aa203d5451a165d27824c216d0c
[]
no_license
edgar615/vertx-study
7466312e0deaee59361f7bf5d796061abc487643
ec004eccad3c6fe36050892c8858e8a6d5ca842f
refs/heads/master
2020-04-12T09:32:07.163244
2018-01-31T07:43:24
2018-01-31T07:43:24
53,409,712
4
1
null
null
null
null
UTF-8
Java
false
false
1,175
java
package com.edgar.vertx.service.discovery.http; import io.vertx.core.AbstractVerticle; import io.vertx.core.Launcher; import io.vertx.servicediscovery.Record; import io.vertx.servicediscovery.ServiceDiscovery; import io.vertx.servicediscovery.types.HttpEndpoint; /** * Created by edgar on 16-6-29. */ public class HttpServiceVerticle extends AbstractVerticle { public static void main(String[] args) { new Launcher().execute("run", HttpServiceVerticle.class.getName(), "--cluster"); } @Override public void start() throws Exception { ServiceDiscovery discovery = ServiceDiscovery.create(vertx); Record httpRecord = HttpEndpoint.createRecord("some-rest-api", "localhost", 8080, "/api"); System.out.println(httpRecord.getRegistration()); discovery.publish(httpRecord, ar -> { if (ar.succeeded()) { Record publishedRecord = ar.result(); System.out.println(httpRecord.getRegistration()); System.out.println(publishedRecord.getLocation()); System.out.println(publishedRecord.getType()); System.out.println(publishedRecord.getStatus()); } else { } }); discovery.close(); } }
[ "edgar615@gmail.com" ]
edgar615@gmail.com
db472112a33232cc08b7dc360f6e5f8e5dd8b5f6
6a17ca587384d5e6ab875f14ec5568f60f1cb643
/java/daily-coding-problem/src/main/java/com/vaani/dcp/dropbox/_246/Solution.java
ec6946bf689058516a17d8f7c8875fabab6b8532
[ "MIT" ]
permissive
kinshuk4/daily-coding-problem-solutions
37f70236aa9172afebca6b05e589604457af4c9c
743d242f747ac1f0ae84b7957c3fe2b727e9653a
refs/heads/master
2023-09-04T12:17:46.695803
2023-09-03T20:22:29
2023-09-03T20:22:29
171,018,919
10
2
MIT
2021-12-14T21:52:13
2019-02-16T15:31:24
Java
UTF-8
Java
false
false
1,075
java
package com.vaani.dcp.dropbox._246; import java.util.Deque; import java.util.LinkedList; /** * * */ public class Solution { public static void main(String... args) { System.out.println(isBalanced("([])[]({})")); // true System.out.println(isBalanced("([)]")); // false System.out.println(isBalanced("((()")); // false } public static boolean isBalanced(String str) { Deque<Character> stack = new LinkedList<>(); for (int i = 0; i < str.length(); i++) { char ch = str.charAt(i); if (ch == '(' || ch == '[' || ch == '{') stack.push(ch); else { if (stack.isEmpty()) return false; char prv = stack.pop(); if (prv == '(' && ch != ')') return false; if (prv == '[' && ch != ']') return false; if (prv == '{' && ch != '}') return false; } } return stack.isEmpty(); } }
[ "kinshuk.ram@gmail.com" ]
kinshuk.ram@gmail.com
e4f081cdd3232406fd8ef5c735602366634a7b85
12dac7b8a8a9b65d4f7ea375f43d004f24b594f8
/PrivateLLG/.svn/pristine/e4/e4f081cdd3232406fd8ef5c735602366634a7b85.svn-base
0f68a42a137b4cec93b7748ce9f590e3a2b4c0ed
[]
no_license
SomnusWu/FGQQ_Gradle_Project
51b89297bd135b1125189b0c10f4555935af48dd
17ca596bc8820434c96ce6cc1daef410b341df38
refs/heads/master
2021-01-01T05:19:45.729656
2016-05-11T01:28:00
2016-05-11T01:28:26
57,933,888
0
0
null
null
null
null
UTF-8
Java
false
false
879
package com.llg.privateproject.swiplistview; import android.content.Context; import java.util.ArrayList; import java.util.List; /** * * @author baoyz * @date 2014-8-23 * */ public class SwipeMenu { private Context mContext; private List<SwipeMenuItem> mItems; private int mViewType; public SwipeMenu(Context context) { mContext = context; mItems = new ArrayList<SwipeMenuItem>(); } public Context getContext() { return mContext; } public void addMenuItem(SwipeMenuItem item) { mItems.add(item); } public void removeMenuItem(SwipeMenuItem item) { mItems.remove(item); } public List<SwipeMenuItem> getMenuItems() { return mItems; } public SwipeMenuItem getMenuItem(int index) { return mItems.get(index); } public int getViewType() { return mViewType; } public void setViewType(int viewType) { this.mViewType = viewType; } }
[ "wuzhensomnus@163.com" ]
wuzhensomnus@163.com
8a5160410b64ef4e1656310e590a121f1cc5dd19
0721305fd9b1c643a7687b6382dccc56a82a2dad
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/com/airbnb/lottie/p287p/p288k0/C8628a.java
0c91c453eb678daae980ec526d84794ca8328d0a
[]
no_license
a2en/Zenly_re
09c635ad886c8285f70a8292ae4f74167a4ad620
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
refs/heads/master
2020-12-13T17:07:11.442473
2020-01-17T04:32:44
2020-01-17T04:32:44
234,470,083
1
0
null
null
null
null
UTF-8
Java
false
false
185
java
package com.airbnb.lottie.p287p.p288k0; /* renamed from: com.airbnb.lottie.p.k0.a */ final class C8628a extends RuntimeException { C8628a(String str) { super(str); } }
[ "developer@appzoc.com" ]
developer@appzoc.com
5a2d3750917d63beea206ad14287f2045b5e01dc
360d9baef2784cbf4d88ddd019a1da496d61b8b9
/day1209/GugudanAll.java
f2f428c6d8e0715c862a7fc04e22cdc47376d529
[]
no_license
hminah0215/java_study
6437763021ddcea4c6cd456834a6ceb13bbdfc2e
ca4a7f5117a8d9611ceb397594a2570bb97bdffa
refs/heads/master
2022-06-06T19:09:13.074538
2020-04-30T12:02:48
2020-04-30T12:02:48
260,198,823
0
0
null
null
null
null
UHC
Java
false
false
381
java
//구구단 2단부터 9단까지 출력하시오. //중첩반복문 class GugudanAll { public static void main(String[] args) { for( int dan=2 ; dan <=9 ;dan++ ){ System.out.println(dan+ "단"); for( int i =1 ; i <=9 ; i++ ){ System.out.println(dan+ "*"+i+"="+(dan*i)); } System.out.println(); //단 사이에 빈줄추가하고 싶을때. } } }
[ "hyeonminah@gmail.com" ]
hyeonminah@gmail.com
8d7742e0bd2a75fa178d548ae84854fe236ced34
c4f7f080b4fdc3163725abdb7aa4c4d19c83b7d1
/src/main/java/com/learn/demo/file/SpringFileAccessDemo.java
1facae5512b67e3000b99d85abcb9a56b86ea449
[]
no_license
yihaoshi/project-learn
558a7c9cb120d2cd65afb29d927bf547484c0674
d8d8d68cbeb84ea63e8e8cabb9a1c4c33bfbc5d4
refs/heads/master
2023-08-11T06:44:57.838129
2019-06-24T12:20:03
2019-06-24T12:20:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,716
java
package com.learn.demo.file; import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.ProtocolResolver; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; import org.springframework.util.StreamUtils; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import java.nio.charset.Charset; /** * @ClassName: SpringFileAccessDemo * @Description: Spring 读取配置文件 * @Author: 尚先生 * @CreateDate: 2018/12/11 17:33 * @Version: 1.0 */ public class SpringFileAccessDemo { private final static String URL_PREFIX = "cp:/"; public static void main(String[] args) throws Exception { DefaultResourceLoader resourceLoader = new DefaultResourceLoader(); resourceLoader.addProtocolResolver(new ProtocolResolver() { @Override public Resource resolve(String location, ResourceLoader resourceLoader) { if (location.startsWith(URL_PREFIX)) { String substring = location.substring(URL_PREFIX.length()); Resource resource = resourceLoader.getResource(substring); return resource; } return null; } }); Resource resource = resourceLoader.getResource("cp:/application.properties"); URL url = resource.getURL(); URLConnection urlConnection = url.openConnection(); InputStream inputStream = urlConnection.getInputStream(); String toString = StreamUtils.copyToString(inputStream, Charset.forName("UTF-8")); System.out.println(toString); } }
[ "shang_sk@163.com" ]
shang_sk@163.com
49816ce8cc24a0cc64ccbd802ae0b2c679c7a0e4
97abe314f90c47105d0a5a987c86c8a5eee8ace2
/carbidev/com.nokia.tools.variant.report_1.0.0.v20090225_01-11/src/com/nokia/tools/variant/report/actions/package-info.java
c45cc4a3058394e1e05e03003c54c14637f1b897
[]
no_license
SymbianSource/oss.FCL.sftools.depl.swconfigapps.configtools
f668c9cd73dafd83d11beb9f86252674d2776cd2
dcab5fbd53cf585e079505ef618936fd8a322b47
refs/heads/master
2020-12-24T12:00:19.067971
2010-06-02T07:50:41
2010-06-02T07:50:41
73,007,522
0
0
null
null
null
null
UTF-8
Java
false
false
561
java
/* * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * * Initial Contributors: * Nokia Corporation - initial contribution. * * Contributors: * * Description: * */ /** * Provides classes for Generate Report actions. */ package com.nokia.tools.variant.report.actions;
[ "none@none" ]
none@none
b84241a5dcde34a2a75067044d44ccea27a1df07
82bda3ed7dfe2ca722e90680fd396935c2b7a49d
/app-meipai/src/main/java/com/arashivision/algorithm/AlgorithmAutoDetect.java
5796c160710bd5260b9d93ba2b30c836e23d01ad
[]
no_license
cvdnn/PanoramaApp
86f8cf36d285af08ba15fb32348423af7f0b7465
dd6bbe0987a46f0b4cfb90697b38f37f5ad47cfc
refs/heads/master
2023-03-03T11:15:40.350476
2021-01-29T09:14:06
2021-01-29T09:14:06
332,968,433
1
1
null
null
null
null
UTF-8
Java
false
false
1,748
java
package com.arashivision.algorithm; import android.util.Log; import com.arashivision.arvbmg.exporter.FrameExporterSample; import com.arashivision.arvbmg.render.gyro.BMGSequenceStabilizer; import com.arashivision.arvbmg.render.rendermodel.BMGNativeObjectRef; public class AlgorithmAutoDetect extends BMGNativeObjectRef { public static final String TAG = "AutoDetectSystem"; public boolean mReleased; public AlgorithmAutoDetect(BMGSequenceStabilizer bMGSequenceStabilizer, String str, int i2, int i3) { this(createNativeWrap(bMGSequenceStabilizer, str, i2, i3)); setRequireFreeManually(); } public static native long createNativeWrap(BMGSequenceStabilizer bMGSequenceStabilizer, String str, int i2, int i3); private native void nativeProcessFrame(FrameExporterSample frameExporterSample); private native void nativeRelease(); public void finalize() throws Throwable { if (this.mReleased) { release(); super.finalize(); return; } StringBuilder sb = new StringBuilder(); sb.append(getName()); sb.append(" not release before finalize "); throw new IllegalStateException(sb.toString()); } public void processFrame(FrameExporterSample frameExporterSample) { nativeProcessFrame(frameExporterSample); } public void release() { StringBuilder sb = new StringBuilder(); sb.append(getName()); sb.append(" release"); Log.i(TAG, sb.toString()); if (!this.mReleased) { nativeRelease(); free(); this.mReleased = true; } } public AlgorithmAutoDetect(long j2) { super(j2, "AlgorithmHDRPlus"); } }
[ "cvvdnn@gmail.com" ]
cvvdnn@gmail.com
0ddb3bb3d2fb1017357dc25018ddb684e4606fba
c94f888541c0c430331110818ed7f3d6b27b788a
/mq/java/src/main/java/com/antgroup/antchain/openapi/mq/models/TraceMapDTO.java
eb181a022b801723c9c8b64d6e833ad6aadcde17
[ "Apache-2.0", "MIT" ]
permissive
alipay/antchain-openapi-prod-sdk
48534eb78878bd708a0c05f2fe280ba9c41d09ad
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
refs/heads/master
2023-09-03T07:12:04.166131
2023-09-01T08:56:15
2023-09-01T08:56:15
275,521,177
9
10
MIT
2021-03-25T02:35:20
2020-06-28T06:22:14
PHP
UTF-8
Java
false
false
3,873
java
// This file is auto-generated, don't edit it. Thanks. package com.antgroup.antchain.openapi.mq.models; import com.aliyun.tea.*; public class TraceMapDTO extends TeaModel { // 消息发送方的客户端地址 @NameInMap("born_host") @Validation(required = true) public String bornHost; // 生产端的cell name @NameInMap("cell") public String cell; // 发送耗时,单位毫秒 @NameInMap("cost_time") @Validation(required = true) public Long costTime; // 消息的 ID,即 Message ID @NameInMap("msg_id") @Validation(required = true) public String msgId; // 消息的 Key ,即 Message Key @NameInMap("msg_key") @Validation(required = true) public String msgKey; // 发送方客户端配置的 Group ID @NameInMap("pub_group_name") @Validation(required = true) public String pubGroupName; // 消息发送时间 @NameInMap("pub_time") @Validation(required = true) public Long pubTime; // 发送状态。取值说明如下: // // SEND_SUCCESS:发送成功 // SEND_FAILED:发送失败 // SEND_ROLLBACK:事务消息回滚 // SEND_UNKNOWN:事务消息未提交 // SEND_DELAY:定时(延时)消息定时中 @NameInMap("status") @Validation(required = true) public String status; // 消息的消费轨迹列表 @NameInMap("sub_list") @Validation(required = true) public java.util.List<SubMapDTO> subList; // 消息的 Tag,即 Message Tag @NameInMap("tag") @Validation(required = true) public String tag; // 消息的 Topic @NameInMap("topic") @Validation(required = true) public String topic; public static TraceMapDTO build(java.util.Map<String, ?> map) throws Exception { TraceMapDTO self = new TraceMapDTO(); return TeaModel.build(map, self); } public TraceMapDTO setBornHost(String bornHost) { this.bornHost = bornHost; return this; } public String getBornHost() { return this.bornHost; } public TraceMapDTO setCell(String cell) { this.cell = cell; return this; } public String getCell() { return this.cell; } public TraceMapDTO setCostTime(Long costTime) { this.costTime = costTime; return this; } public Long getCostTime() { return this.costTime; } public TraceMapDTO setMsgId(String msgId) { this.msgId = msgId; return this; } public String getMsgId() { return this.msgId; } public TraceMapDTO setMsgKey(String msgKey) { this.msgKey = msgKey; return this; } public String getMsgKey() { return this.msgKey; } public TraceMapDTO setPubGroupName(String pubGroupName) { this.pubGroupName = pubGroupName; return this; } public String getPubGroupName() { return this.pubGroupName; } public TraceMapDTO setPubTime(Long pubTime) { this.pubTime = pubTime; return this; } public Long getPubTime() { return this.pubTime; } public TraceMapDTO setStatus(String status) { this.status = status; return this; } public String getStatus() { return this.status; } public TraceMapDTO setSubList(java.util.List<SubMapDTO> subList) { this.subList = subList; return this; } public java.util.List<SubMapDTO> getSubList() { return this.subList; } public TraceMapDTO setTag(String tag) { this.tag = tag; return this; } public String getTag() { return this.tag; } public TraceMapDTO setTopic(String topic) { this.topic = topic; return this; } public String getTopic() { return this.topic; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
fd4d3347c97d0b6905e221e0b7291dd32fceb8c2
c79740d884dc974429443296b399ae9ca61efc45
/FirstLineOfCode_Android/accelerometersensortest/src/main/java/com/bigfat/accelerometersensortest/MainActivity.java
bc20ee946097b0141e609426cca3ec41259cb412
[ "Apache-2.0" ]
permissive
yueban/AndroidExercise
fe8feee8c89258e24560ef6484e356dd762fef46
9ff75adc009aadedba4d05850af8a7748afbb6e2
refs/heads/master
2023-01-23T01:53:58.213292
2023-01-17T09:00:16
2023-01-17T09:00:16
27,426,345
17
6
null
null
null
null
UTF-8
Java
false
false
2,470
java
package com.bigfat.accelerometersensortest; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.Menu; import android.view.MenuItem; import android.widget.Toast; public class MainActivity extends ActionBarActivity { public static final int YAOYIYAO_VALUE = 10; private SensorManager sensorManager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); Sensor sensor = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); sensorManager.registerListener(listener, sensor, SensorManager.SENSOR_DELAY_NORMAL); } @Override protected void onDestroy() { super.onDestroy(); if (sensorManager != null) { sensorManager.unregisterListener(listener); } } private SensorEventListener listener = new SensorEventListener() { @Override public void onSensorChanged(SensorEvent event) { float xValue = Math.abs(event.values[0]); float yValue = Math.abs(event.values[1]); float zValue = Math.abs(event.values[2]); if (xValue > YAOYIYAO_VALUE || yValue > YAOYIYAO_VALUE || zValue > YAOYIYAO_VALUE) { Toast.makeText(MainActivity.this, "摇一摇", Toast.LENGTH_SHORT).show(); } } @Override public void onAccuracyChanged(Sensor sensor, int accuracy) { } }; @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }
[ "fbzhh007@gmail.com" ]
fbzhh007@gmail.com
c139e9e88cb94e7a75fc4a0d5f5a1631a71681b4
f7295dfe3c303e1d656e7dd97c67e49f52685564
/smali/com/xiaomi/accountsdk/utils/FidNonce.java
77f43b16a745c1322d21db7f8e56b7bbf6c28360
[]
no_license
Eason-Chen0452/XiaoMiGame
36a5df0cab79afc83120dab307c3014e31f36b93
ba05d72a0a0c7096d35d57d3b396f8b5d15729ef
refs/heads/master
2022-04-14T11:08:31.280151
2020-04-14T08:57:25
2020-04-14T08:57:25
255,541,211
0
1
null
null
null
null
UTF-8
Java
false
false
745
java
package com.xiaomi.accountsdk.utils; public class FidNonce extends e { public FidNonce(String paramString1, String paramString2) { super(paramString1, paramString2); } public static class Builder { public static FidNonce a(FidNonce.Type paramType) { ServerTimeUtil.a(); FidSigningUtil.a(); new Builder(); if (paramType == null) { throw new IllegalArgumentException("type == null"); } return null; } } public static enum Type { private Type() {} } } /* Location: C:\Users\Administrator\Desktop\apk\dex2jar\classes-dex2jar.jar!\com\xiaomi\accountsdk\utils\FidNonce.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "chen_guiq@163.com" ]
chen_guiq@163.com
1e77cc5eb8249eb8aab6a71676d5f32be5e4cf94
7b82d70ba5fef677d83879dfeab859d17f4809aa
/_part2/cocook/src/tom/cocook/view/FreeMarkerView.java
f5f7732074ac0374042068b578d80aab05b4ac60
[]
no_license
apollowesley/jun_test
fb962a28b6384c4097c7a8087a53878188db2ebc
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
refs/heads/main
2022-12-30T20:47:36.637165
2020-10-13T18:10:46
2020-10-13T18:10:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,215
java
package tom.cocook.view; import java.io.File; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.io.StringWriter; import java.util.Locale; import java.util.Properties; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import tom.cocook.config.Constants; import tom.cocook.core.RequestContext; import freemarker.template.Configuration; import freemarker.template.ObjectWrapper; import freemarker.template.Template; import freemarker.template.TemplateException; import freemarker.template.TemplateExceptionHandler; public class FreeMarkerView extends View { private static final Configuration config = new Configuration(); private static final String encoding = Constants.getEncoding(); @Override public void init() { Properties properties = config(); if(properties!=null){ try { config.setSettings(properties); } catch (TemplateException e) { e.printStackTrace(); } return; } // Initialize the FreeMarker configuration; // - Create a configuration instance // config = new Configuration(); // - Templates are stoted in the WEB-INF/templates directory of the Web app. //config.setServletContextForTemplateLoading(servletContext, "/"); // "WEB-INF/templates" try{ config.setDirectoryForTemplateLoading(new File(Constants.getWebRoot())); }catch(IOException e){ } // - Set update dealy to 0 for now, to ease debugging and testing. // Higher value should be used in production environment. config.setTemplateUpdateDelay(0); // - Set an error handler that prints errors so they are readable with // a HTML browser. // config.setTemplateExceptionHandler(TemplateExceptionHandler.HTML_DEBUG_HANDLER); config.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER); // - Use beans wrapper (recommmended for most applications) config.setObjectWrapper(ObjectWrapper.BEANS_WRAPPER); // - Set the default charset of the template files config.setDefaultEncoding(encoding); // config.setDefaultEncoding("ISO-8859-1"); // - Set the charset of the output. This is actually just a hint, that // templates may require for URL encoding and for generating META element // that uses http-equiv="Content-type". config.setOutputEncoding(encoding); // config.setOutputEncoding("UTF-8"); // - Set the default locale config.setLocale(Locale.CHINA /* Locale.CHINA */ ); // config.setLocale(Locale.US); config.setLocalizedLookup(false); // 去掉int型输出时的逗号, 例如: 123,456 // config.setNumberFormat("#"); // config.setNumberFormat("0"); 也可以 config.setNumberFormat("#0.#####"); } @Override public void render(String view) { RequestContext context = RequestContext.get(); HttpServletResponse res = context.getResponse(); res.setContentType("text/html;charset="+encoding); res.setCharacterEncoding(encoding); PrintWriter writer = null; try { Template template = config.getTemplate(view); ServletOutputStream output = res.getOutputStream(); template.process(context.getAttributsMap(), new OutputStreamWriter(output, encoding)); // Merge the data-model and the template } catch (Exception e) { try{ error(res, e); }catch(IOException ee){} } finally { if (writer != null) writer.close(); } } private void error(HttpServletResponse response, Exception cause) throws IOException{ StringBuffer html = new StringBuffer(); html.append("<html>"); html.append("<title>Error</title>"); html.append("<body bgcolor=\"#ffffff\">"); html.append("<h2>You know: Error processing the template</h2>"); html.append("<xmp>"); /* 打印所有信息 */ StringWriter sw = new StringWriter(); cause.printStackTrace(new PrintWriter(sw)); html.append(sw.toString()); html.append("</xmp>"); html.append("</body>"); html.append("</html>"); response.getOutputStream().print(html.toString()); } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
1893823042fdde42e2100cc93688de637bfb1c6d
95d2a35208ce924c21054df62befec9bfad0a3df
/app/src/main/java/com/liany/mytest3/image/shape/IEventful.java
16341443f6cbf78a01f9adec7fcea15184c4c085
[]
no_license
AitGo/ImageTest1
4b95d7f7c39f2b74b7d30e20884fe3609f89f333
c3f6e6becfcfd2606b5120e35444ea72eb06c819
refs/heads/master
2022-07-01T16:16:09.942450
2020-05-13T09:06:49
2020-05-13T09:06:49
262,249,293
0
0
null
null
null
null
UTF-8
Java
false
false
469
java
package com.liany.mytest3.image.shape; public interface IEventful { final static int LONEPRESS = 800; void onDelete(); void beforeDraw(); void onTransforming(); void afterDragDraw(DrawableShape shape); void onPress(float x, float y); void onDoubleClick(); void onLongPress(float x, float y); void onPressHandler(float x, float y); void onLongPressHandler(float x, float y); void onHandlerMove(float x, float y); }
[ "ly490099@163.com" ]
ly490099@163.com
a9c304564f3082148e15d50707142ceebaee8172
352f6ae2cc37cf37adf79e48071581e6082715e8
/src/main/java/com/lam/coder/topCoder/TravellingSalesmanEasy.java
1c2ac00db4ef58b2d72f7ac0726f26aaf5119c02
[]
no_license
ludoviko/codeRacing
91380a38a096c023648f315eb73fee30bb1d81f8
253d70779c886092e256f752d8b530acc8894aee
refs/heads/master
2021-01-23T21:01:48.362779
2020-05-02T23:38:58
2020-05-02T23:38:58
40,973,712
0
2
null
null
null
null
UTF-8
Java
false
false
760
java
package com.lam.coder.topCoder; /** * Created by Usuario on 04/10/2016. */ public class TravellingSalesmanEasy { public int getMaxProfit(int M, int[] profit, int[] city, int[] visit) { int max = 0; int total = 0; int n = -1; for (int i = 0; i < visit.length; i++) { for (int j = 0; j < city.length; j++) { if (visit[i] == city[j]) { if (profit[j] > max) { max = profit[j]; n = j; } } } if (n >= 0) { profit[n] = 0; total += max; max = 0; n = -1; } } return total; } }
[ "ludovikoazuaje@yahoo.com" ]
ludovikoazuaje@yahoo.com
3542c309a245d85f97837be948c62b3abc1d1b3e
f2e01bda12de959faf44193a38723444570e78b0
/game-common/src/main/java/com/game/common/config/IGameConfig.java
3f57cdf6b3bac6d01daac18b094d55560707249f
[]
no_license
Ox0400/NettyGameServer
b051d026907e59e213ee1644c36faaac7570a46b
5e39ec258584032d2ac3a922bcfe94c6a611703b
refs/heads/master
2023-03-16T06:07:57.056684
2018-06-27T11:04:13
2018-06-27T11:04:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
210
java
package com.game.common.config; /** * 游戏配置 * @author JiangBangMing * * 2018年6月2日 下午2:13:12 */ public interface IGameConfig { public void loadConfig(String filePaht) throws Exception; }
[ "jiangbang617@sina.cn" ]
jiangbang617@sina.cn
cd48d8d5d91726d109b7b9dd7f19a600bbabb1a1
647b1232e7bd89039ebeb13088460bab0faad36c
/thinking-in-spring/aop-features/src/main/java/org/geekbang/thinking/in/spring/aop/features/AspectJSchemaBasedPointcutDemo.java
c4d961c66d5f8d3604ba4bac7d7a3555894a67c0
[ "Apache-2.0" ]
permissive
bestzhangtao/geekbang-lessons
8ebf986e4416e352a9c649dc97433680a308452d
35e8e6ce0a2296225ce699def7ec8bdd6f200252
refs/heads/master
2023-05-27T13:02:08.732705
2023-05-17T19:14:38
2023-05-17T19:14:38
229,888,436
1
0
Apache-2.0
2020-04-14T07:23:27
2019-12-24T06:54:13
null
UTF-8
Java
false
false
1,857
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.geekbang.thinking.in.spring.aop.features; import org.geekbang.thinking.in.spring.aop.features.aspect.AspectConfiguration; import org.geekbang.thinking.in.spring.aop.overview.EchoService; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * 基于 XML 配置 Pointcut 示例 * * @author <a href="mailto:mercyblitz@gmail.com">Mercy</a> * @since */ public class AspectJSchemaBasedPointcutDemo { public static void main(String[] args) { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath:/META-INF/spring-aop-context.xml"); context.refresh(); EchoService echoService = context.getBean("echoService", EchoService.class); System.out.println(echoService.echo("Hello,World")); context.close(); } }
[ "mercyblitz@gmail.com" ]
mercyblitz@gmail.com
2095f7173d762a533a78b392ef13811b19e24415
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Time/11/org/joda/time/format/DateTimeFormatterBuilder_appendPattern_1131.java
2e60d8e4f745444dab3a9cd2c888ecf017455313
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
4,174
java
org joda time format factori creat complex instanc date time formatt datetimeformatt method call datetim format perform link date time formatt datetimeformatt class provid factori method creat formatt link date time format datetimeformat link iso date time format isodatetimeformat date time formatt builder datetimeformatterbuild construct formatt print pars formatt built append specif field formatt instanc builder formatt print month year januari construct pre date time formatt datetimeformatt month year monthandyear date time formatt builder datetimeformatterbuild append month year text appendmonthofyeartext append liter appendliter append year appendyear formatt toformatt pre date time formatt builder datetimeformatterbuild mutabl thread safe formatt build thread safe immut author brian neill o'neil author stephen colebourn author fredrik borgh date time format datetimeformat iso date time format isodatetimeformat date time formatt builder datetimeformatterbuild call link date time format datetimeformat pars pattern append result builder param pattern pattern specif illeg argument except illegalargumentexcept pattern invalid date time format datetimeformat date time formatt builder datetimeformatterbuild append pattern appendpattern string pattern date time format datetimeformat append pattern appendpatternto pattern
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
fe6921330860933ded73ae61c0d84113cde6fa16
d132a32f07cdc583c021e56e61a4befff6228900
/src/main/java/net/minecraft/client/gui/GuiResourcePackList.java
45adefe737bc9106a6fe27481562a7a59cf6bf4b
[]
no_license
TechCatOther/um_clean_forge
27d80cb6e12c5ed38ab7da33a9dd9e54af96032d
b4ddabd1ed7830e75df9267e7255c9e79d1324de
refs/heads/master
2020-03-22T03:14:54.717880
2018-07-02T09:28:10
2018-07-02T09:28:10
139,421,233
0
0
null
null
null
null
UTF-8
Java
false
false
1,693
java
package net.minecraft.client.gui; import java.util.List; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.resources.ResourcePackListEntry; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public abstract class GuiResourcePackList extends GuiListExtended { protected final Minecraft mc; protected final List field_148204_l; private static final String __OBFID = "CL_00000825"; public GuiResourcePackList(Minecraft mcIn, int p_i45055_2_, int p_i45055_3_, List p_i45055_4_) { super(mcIn, p_i45055_2_, p_i45055_3_, 32, p_i45055_3_ - 55 + 4, 36); this.mc = mcIn; this.field_148204_l = p_i45055_4_; this.field_148163_i = false; this.setHasListHeader(true, (int)((float)mcIn.fontRendererObj.FONT_HEIGHT * 1.5F)); } protected void drawListHeader(int p_148129_1_, int p_148129_2_, Tessellator p_148129_3_) { String s = EnumChatFormatting.UNDERLINE + "" + EnumChatFormatting.BOLD + this.getListHeader(); this.mc.fontRendererObj.drawString(s, p_148129_1_ + this.width / 2 - this.mc.fontRendererObj.getStringWidth(s) / 2, Math.min(this.top + 3, p_148129_2_), 16777215); } protected abstract String getListHeader(); public List getList() { return this.field_148204_l; } protected int getSize() { return this.getList().size(); } public ResourcePackListEntry getListEntry(int p_148180_1_) { return (ResourcePackListEntry)this.getList().get(p_148180_1_); } public int getListWidth() { return this.width; } protected int getScrollBarX() { return this.right - 6; } }
[ "alone.inbox@gmail.com" ]
alone.inbox@gmail.com
053da4b8e28ac3840a6b559ae34ce910aed11b25
885a3d996fde65f0cbda048e8e222aef49269637
/src/oio/Sender.java
fdd8e26a402ac2f244f8003d4a5bf8299a80b34e
[]
no_license
li5220008/net
d0fb9e7bba58bd01360049f1e2287349f9487cd5
840605e18bbc3026124aff9b3036b814cdeb1363
refs/heads/master
2020-05-31T12:12:23.814764
2014-02-14T09:23:32
2014-02-14T09:23:32
15,197,329
0
1
null
null
null
null
UTF-8
Java
false
false
624
java
package oio; import java.io.IOException; import java.io.PipedOutputStream; /** * Desc: * User: weiguili(li5220008@gmail.com) * Date: 14-2-13 * Time: 上午11:31 */ public class Sender extends Thread { private PipedOutputStream out = new PipedOutputStream(); public PipedOutputStream getOut(){ return out; } @Override public void run() { String strInfo = new String("hello,receiver!"); try { out.write(strInfo.getBytes()); out.close(); } catch (IOException e) { e.printStackTrace(); } } }
[ "li5220008@163.com" ]
li5220008@163.com
a841ed64bb2c7c90b857cb82c7f023ceafedfc98
06bab7d12d6a970b37712bac820a8fac4df1a10a
/IMSAdminViewfull/student/src/java/com/adept/ims/student/service/ParentService.java
06962db43f1cbed8c5e619aceb878f90900ac585
[]
no_license
singhvikash630/ims_project
e0920fe41c15eeb10857adb608f36fc4deb652b0
d2b55cf9067d5799e1d93f4cc7013453bc55645c
refs/heads/master
2022-11-22T00:21:12.979220
2020-06-25T13:29:38
2020-06-25T13:29:38
274,922,381
0
0
null
null
null
null
UTF-8
Java
false
false
576
java
package com.adept.ims.student.service; import java.util.List; import com.adept.ims.student.database.pojo.Parent; public interface ParentService { public List<Parent> getAll(); public Parent get(long parentId); public List<Parent> getById(String basicSearchValue); public Parent save(Parent parent); public void update(Parent parent); public void remove(long parentId); public List<Parent> getById(long id); public List<Parent> getByFilter(String filter,String value); public List<Parent> getByOperator(Parent parent, String operator); }
[ "singh.vikash630@gmail.com" ]
singh.vikash630@gmail.com
2ba7d71225607f61e99ae2c0eb5c15d88eda7bcb
bf2a6af7fd7569ab3b77c021daff803bf1dfee50
/MyBatisGenerator/common/src/com/contest/model/RoleModel.java
65d3ac1acf09bd33c1c396a122a162e4639b9c4d
[]
no_license
juno1985/program-contest
cafde07648e2cb8e8af3f8cd6939f6300613c1e1
1b6ca9d8457789b28257be9535f076abca2daac5
refs/heads/master
2020-04-26T09:14:27.874386
2019-07-05T07:30:20
2019-07-05T07:30:20
173,448,910
0
0
null
null
null
null
UTF-8
Java
false
false
3,631
java
package com.contest.model; public class RoleModel { /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column t_role.id * * @mbg.generated Thu Jun 20 13:21:50 CST 2019 */ private Integer id; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column t_role.rolename * * @mbg.generated Thu Jun 20 13:21:50 CST 2019 */ private String rolename; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column t_role.status * * @mbg.generated Thu Jun 20 13:21:50 CST 2019 */ private Integer status; /** * * This field was generated by MyBatis Generator. * This field corresponds to the database column t_role.comment * * @mbg.generated Thu Jun 20 13:21:50 CST 2019 */ private String comment; /** * This method was generated by MyBatis Generator. * This method returns the value of the database column t_role.id * * @return the value of t_role.id * * @mbg.generated Thu Jun 20 13:21:50 CST 2019 */ public Integer getId() { return id; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column t_role.id * * @param id the value for t_role.id * * @mbg.generated Thu Jun 20 13:21:50 CST 2019 */ public void setId(Integer id) { this.id = id; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column t_role.rolename * * @return the value of t_role.rolename * * @mbg.generated Thu Jun 20 13:21:50 CST 2019 */ public String getRolename() { return rolename; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column t_role.rolename * * @param rolename the value for t_role.rolename * * @mbg.generated Thu Jun 20 13:21:50 CST 2019 */ public void setRolename(String rolename) { this.rolename = rolename == null ? null : rolename.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column t_role.status * * @return the value of t_role.status * * @mbg.generated Thu Jun 20 13:21:50 CST 2019 */ public Integer getStatus() { return status; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column t_role.status * * @param status the value for t_role.status * * @mbg.generated Thu Jun 20 13:21:50 CST 2019 */ public void setStatus(Integer status) { this.status = status; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column t_role.comment * * @return the value of t_role.comment * * @mbg.generated Thu Jun 20 13:21:50 CST 2019 */ public String getComment() { return comment; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column t_role.comment * * @param comment the value for t_role.comment * * @mbg.generated Thu Jun 20 13:21:50 CST 2019 */ public void setComment(String comment) { this.comment = comment == null ? null : comment.trim(); } }
[ "wangzhen_tju@126.com" ]
wangzhen_tju@126.com
e881d412b9e5d29fd9212ffa4a9d27f666d35ab9
ca9371238f2f8fbec5f277b86c28472f0238b2fe
/src/mx/com/kubo/services/EmploymentService.java
0820dff33bdd0d2dfd1bff77649f2ed8fc5970c4
[]
no_license
ocg1/kubo.portal
64cb245c8736a1f8ec4010613e14a458a0d94881
ab022457d55a72df73455124d65b625b002c8ac2
refs/heads/master
2021-05-15T17:23:48.952576
2017-05-08T17:18:09
2017-05-08T17:18:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,329
java
package mx.com.kubo.services; import java.util.List; import mx.com.kubo.model.BmxEconActivityCat; import mx.com.kubo.model.Contract_typeCat; import mx.com.kubo.model.Employment; import mx.com.kubo.model.EmploymentPK; import mx.com.kubo.model.InegiEconActivityCat; import mx.com.kubo.model.InegiEconActivityCatPK; import mx.com.kubo.model.NeighborhoodCat; import mx.com.kubo.model.Other_IncomeCat; import mx.com.kubo.model.TenureCat; public interface EmploymentService { Employment getEmploymentById(EmploymentPK pk); InegiEconActivityCat searchActivitySector(InegiEconActivityCatPK pk); List<BmxEconActivityCat> searchActivityList(String descripString); List<Employment> getEmploymentList(); List<Contract_typeCat> getContractTypeList(); List<TenureCat> getTenureList(); List<Other_IncomeCat> getOtherIncomeList(); List<NeighborhoodCat> getAsentamientosByCP(String cp); List<Employment> getListEmployByProspect(int prospectID, int companyID); String getTenure(int tenure_id); boolean add (Employment newEmployment); boolean updateEmployment (Employment employ); boolean updateEmploymentBlur(Employment employ, EmploymentPK pk); boolean removeEmployment (EmploymentPK pk); boolean deleteAllEmployment(int prospectID, int companyID); }
[ "damian.tapia.nava@gmail.com" ]
damian.tapia.nava@gmail.com
4f4a1b46868b527b8eb9958bc75a34935d39535d
077d623883ad0e3895156f54ad1f68565bad5aab
/trunk/J2SE/Test_jar/src/net/sf/cindy/SessionFilter.java
bd57af00efcdff32308672e4a96943f88ad690c3
[]
no_license
BGCX262/zsfwebserver-svn-to-git
50c0d28c9a7cc8d9980df3ef099c0d873a1f89ee
95eb8e4f8ede1a58cd8a61f28fea4f64969a8ee7
refs/heads/master
2020-05-05T07:15:00.593832
2015-08-23T06:55:12
2015-08-23T06:55:12
41,255,564
0
2
null
null
null
null
UTF-8
Java
false
false
3,866
java
/* * Copyright 2004-2006 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.sf.cindy; /** * Session filter, filter session events. * * @author <a href="chenrui@gmail.com">Roger Chen</a> * @version $id$ */ public interface SessionFilter { /** * Session have started. * * @param filterChain * session filter chain * @throws Exception * any exception */ void sessionStarted(SessionFilterChain filterChain) throws Exception; /** * Session have closed. * * @param filterChain * session filter chain * @throws Exception * any exception */ void sessionClosed(SessionFilterChain filterChain) throws Exception; /** * Session timeout, but not closed. * * @param filterChain * session filter chain * @throws Exception * any exception */ void sessionTimeout(SessionFilterChain filterChain) throws Exception; /** * Session received a packet. * * @param filterChain * session filter chain * @param packet * the received packet * @throws Exception * any exception */ void packetReceived(SessionFilterChain filterChain, Packet packet) throws Exception; /** * Session received a object which is decoded by <code>PacketDecoder</code>. * * @param filterChain * session filter chain * @param obj * object * @throws Exception * any exception */ void objectReceived(SessionFilterChain filterChain, Object obj) throws Exception; /** * Filter before send packet. This event will be dispatched in the reversed * order. * * @param filterChain * session filter chain * @param packet * send packet * @throws Exception * any exception */ void packetSend(SessionFilterChain filterChain, Packet packet) throws Exception; /** * Session sent a packet. This event will be dispatched in the reversed * order. The packet's position will not be updated. * * @param filterChain * session filter chain * @param packet * the sent packet * @throws Exception * any exception */ void packetSent(SessionFilterChain filterChain, Packet packet) throws Exception; /** * Session sent a object. This event will be dispatched in the reversed * order. * * @param filterChain * session filter chain * @param obj * the sent object * @throws Exception * any exception */ void objectSent(SessionFilterChain filterChain, Object obj) throws Exception; /** * Session caught a exception. * * @param filterChain * session filter chain * @param cause * exception */ void exceptionCaught(SessionFilterChain filterChain, Throwable cause); }
[ "you@example.com" ]
you@example.com
62e94b6a8ae4a2d71c1d613e2ad459687e67eb2e
19490fcc6f396eeb35a9234da31e7b615abf6d04
/JDownloader/src/org/jdownloader/extensions/shutdown/WarningDialog.java
2e038c6418a53c70503ee9298bb525213a9e6751
[]
no_license
amicom/my-project
ef72026bb91694e74bc2dafd209a1efea9deb285
951c67622713fd89448ffe6e0983fe3f934a7faa
refs/heads/master
2021-01-02T09:15:45.828528
2015-09-06T15:57:01
2015-09-06T15:57:01
41,953,961
0
0
null
null
null
null
UTF-8
Java
false
false
760
java
package org.jdownloader.extensions.shutdown; import org.appwork.uio.UIOManager; import org.appwork.utils.swing.dialog.ConfirmDialog; import org.appwork.utils.swing.dialog.Dialog; import org.jdownloader.images.NewTheme; public class WarningDialog extends ConfirmDialog implements WarningDialogInterface { private ShutdownExtension extension; public WarningDialog(ShutdownExtension shutDown, String title, String message) { super(Dialog.STYLE_HTML | UIOManager.LOGIC_COUNTDOWN, title, message, NewTheme.I().getIcon("warning", 32), null, null); this.extension = shutDown; this.setTimeout(shutDown.getSettings().getCountdownTime() * 1000); } protected void packed() { getDialog().setAlwaysOnTop(true); } }
[ "amicom.pro@gmail.com" ]
amicom.pro@gmail.com