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
ba2b371a1aac0b6a1a6b310152b1f02083196b65
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app71/source/com/zhangzhifu/sdk/util/Frequency.java
07602e49be1fceb5ef496898caa44f24d2bb16d8
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
1,856
java
package com.zhangzhifu.sdk.util; import java.io.PrintStream; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; public class Frequency { private Set bK = new TreeSet(); private boolean bL = true; private Map map = new HashMap(); public Frequency() {} private void dataChanged() { Iterator localIterator; if (this.bL) { localIterator = this.map.keySet().iterator(); } for (;;) { if (!localIterator.hasNext()) { return; } String str = (String)localIterator.next(); this.bK.add(new Frequency.Entiry(this, str, (Integer)this.map.get(str))); this.bL = false; } } public void addStatistics(String paramString) { Integer localInteger = (Integer)this.map.get(paramString); Map localMap = this.map; if (localInteger == null) {} for (int i = 1;; i = localInteger.intValue() + 1) { localMap.put(paramString, Integer.valueOf(i)); return; } } public List getDataDesc() { dataChanged(); Iterator localIterator = this.bK.iterator(); ArrayList localArrayList = new ArrayList(); for (;;) { if (!localIterator.hasNext()) { return localArrayList; } Frequency.Entiry localEntiry = (Frequency.Entiry)localIterator.next(); localArrayList.add(localEntiry); System.out.println(localEntiry.toString()); } } public Frequency.Entiry getMaxValueItem() { dataChanged(); Iterator localIterator = this.bK.iterator(); Frequency.Entiry localEntiry = null; if (localIterator.hasNext()) { localEntiry = (Frequency.Entiry)localIterator.next(); System.out.println(localEntiry.toString()); } return localEntiry; } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
7a2b8fe46d48be0b80c66845f54c6f9f6ccf9abb
74bc3a1fd6ded5fee51de40fb0822be155555c2c
/gasoline/src/java/com/stepup/gasoline/qt/gasimport/GasImportFormAction.java
6aaef99102e21cf1f479cf96841163acc82101c4
[]
no_license
phuongtu1983/quangtrung
0863f7a6125918faaaffb6e27fad366369885cb6
ece90b4876c8680ee6d386e950db2fbb0208a56a
refs/heads/master
2021-06-05T07:21:30.227630
2020-10-07T02:12:19
2020-10-07T02:12:19
130,137,918
0
0
null
null
null
null
UTF-8
Java
false
false
4,309
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.stepup.gasoline.qt.gasimport; import com.stepup.core.util.DateUtil; import com.stepup.core.util.NumberUtil; import com.stepup.gasoline.qt.bean.EmployeeBean; import com.stepup.gasoline.qt.bean.GasImportBean; import com.stepup.gasoline.qt.bean.VendorBean; import com.stepup.gasoline.qt.core.SpineAction; import com.stepup.gasoline.qt.dao.AccountDAO; import com.stepup.gasoline.qt.dao.GasDAO; import com.stepup.gasoline.qt.dao.GoodDAO; import com.stepup.gasoline.qt.dao.VendorDAO; import com.stepup.gasoline.qt.util.Constants; import com.stepup.gasoline.qt.util.PermissionUtil; import com.stepup.gasoline.qt.util.QTUtil; import java.util.ArrayList; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.validator.GenericValidator; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; /** * * @author phuongtu */ public class GasImportFormAction extends SpineAction { /** * This is the action called from the Struts framework. * * @param mapping The ActionMapping used to select this instance. * @param form The optional ActionForm bean for this request. * @param request The HTTP Request we are processing. * @param response The HTTP Response we are processing. * @throws java.lang.Exception * @return */ @Override public boolean doAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { GasImportBean bean = null; String id = request.getParameter("gasImportId"); ArrayList arrDetail = null; GasDAO gasDAO = new GasDAO(); if (!GenericValidator.isBlankOrNull(id)) { try { int gasImportId = NumberUtil.parseInt(id, 0); bean = gasDAO.getGasImport(gasImportId); arrDetail = gasDAO.getGasImportDetail(gasImportId); } catch (Exception ex) { } } GasImportFormBean formBean = null; if (bean != null) { formBean = new GasImportFormBean(bean); if (PermissionUtil.hasPermission(request, PermissionUtil.OPERATION_EDIT_PAST, PermissionUtil.PER_GAS_IMPORT)) { formBean.setCanEdit(1); } } else { formBean = new GasImportFormBean(); try { String prefix = ""; if (formBean.getId() == 0) { prefix = DateUtil.today("yyyyMMdd") + "-GI-"; String number = gasDAO.getNextGasImportNumber(prefix, 4); prefix += number; } formBean.setCode(prefix); } catch (Exception ex) { } } request.setAttribute(Constants.GAS_IMPORT, formBean); if (arrDetail == null) { arrDetail = new ArrayList(); } request.setAttribute(Constants.GAS_IMPORT_SHELL, arrDetail); ArrayList arrShell = null; try { GoodDAO goodDAO = new GoodDAO(); arrShell = goodDAO.getShells(EmployeeBean.STATUS_ACTIVE); } catch (Exception ex) { } if (arrShell == null) { arrShell = new ArrayList(); } request.setAttribute(Constants.SHELL_LIST, arrShell); String organizationIds = QTUtil.getOrganizationManageds(request.getSession()); ArrayList arrAccount = null; try { AccountDAO accountDAO = new AccountDAO(); arrAccount = accountDAO.getAccounts(organizationIds); } catch (Exception ex) { } if (arrAccount == null) { arrAccount = new ArrayList(); } request.setAttribute(Constants.ACCOUNT_LIST, arrAccount); ArrayList arrVendor = null; try { VendorDAO vendorDAO = new VendorDAO(); arrVendor = vendorDAO.getVendors(organizationIds, VendorBean.IS_GAS + ""); } catch (Exception ex) { } if (arrVendor == null) { arrVendor = new ArrayList(); } request.setAttribute(Constants.VENDOR_LIST, arrVendor); return true; } }
[ "phuongtu1983@gmail.com" ]
phuongtu1983@gmail.com
891ace6c5c6a5a04292630e1681ccb99bac2c265
9cf4afbef0e9158ec9d1ccccd05502c4e3ef6a13
/src/test/java/tddbc/VendingMachineTest.java
9cd416bdc1307ba05ee82f39f0f68c68d86ae337
[]
no_license
ravencoding/TDDBC_OSAKA_20130113_java
7b08382ccb00e99b3e1be586317e77dffc1c88a8
6ddd4835fb7d3ce49af38ef4c8f4408ff1911857
refs/heads/master
2020-04-05T23:32:43.745906
2013-01-13T08:25:29
2013-01-13T08:25:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,788
java
package tddbc; import org.junit.Before; import org.junit.Test; import org.junit.experimental.runners.Enclosed; import org.junit.experimental.theories.Theories; import org.junit.experimental.theories.Theory; import org.junit.experimental.theories.suppliers.TestedOn; import org.junit.runner.RunWith; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; @RunWith(Enclosed.class) public class VendingMachineTest { public static class お金が投入されていない状態 { private VendingMachine sut; @Before public void setUp() { sut = new VendingMachine(); } @Test public void 投入前に投入金額を取得したら0円() { assertThat(sut.getCreditAmount(), is(0)); } @Test public void 在庫情報を取得できる() { assertThat(sut.getStockText(), is("コーラ:120円:5本")); } @Test public void お金が足りないと購入しても在庫は減らない() { sut.purchase(); assertThat(sut.getStockText(), is("コーラ:120円:5本")); } @Test public void お金が足りないと購入しても投入金額は減らない() { sut.purchase(); assertThat(sut.getCreditAmount(), is(0)); } } public static class お金が投入されている状態 { private VendingMachine sut; @Before public void setUp() { sut = new VendingMachine(); sut.insert(1000); } @Test public void 投入後は投入金額が取得できる() { assertThat(sut.getCreditAmount(), is(1000)); } @Test public void 複数回投入して投入金額を取得() { sut.insert(100); assertThat(sut.getCreditAmount(), is(1100)); } @Test public void 十分なお金を投入して購入すると在庫が減る() { sut.purchase(); assertThat(sut.getStockText(), is("コーラ:120円:4本")); } @Test public void 購入すると投入金額が減る() { sut.purchase(); assertThat(sut.getCreditAmount(), is(880)); } @Test public void 払い戻していないときのお釣りは0円() { assertThat(sut.getChangeAmount(), is(0)); } @Test public void 払い戻すと投入金額がお釣りになる() { sut.payback(); assertThat(sut.getChangeAmount(), is(1000)); } @Test public void 二回連続で払い戻してもお釣りは増えない() { sut.payback(); sut.payback(); assertThat(sut.getChangeAmount(), is(1000)); } @Test public void 払い戻すと預かり金額が0円になる() { sut.payback(); assertThat(sut.getCreditAmount(), is(0)); } } @RunWith(Theories.class) public static class 金種による扱い { private VendingMachine sut; @Before public void setUp() { sut = new VendingMachine(); sut.insert(100); } @Theory public void 扱えるお金を投入_投入金額は増える(@TestedOn(ints = {10, 50, 100, 500, 1000}) int amount) { sut.insert(amount); assertThat(sut.getCreditAmount(), is(100 + amount)); } @Theory public void 扱えないお金を投入_投入金額は変わらない(@TestedOn(ints = {1, 5, 2000, 5000, 10000}) int amount) { sut.insert(amount); assertThat(sut.getCreditAmount(), is(100)); } } }
[ "irof@hogedriven.net" ]
irof@hogedriven.net
e8e8d047151a64986cbfa3b151e94a135151cc27
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/24/2697.java
3a96f4dd72306f7d673972cc3b555adc187e9661
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,175
java
package <missing>; public class GlobalMembers { public static int Main() { int n; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { n = Integer.parseInt(tempVar); } int i; int j; int l; int min = 1000; int max = 0; String a = new String(new char[100]); String b = new String(new char[100]); String c = new String(new char[100]); for (i = 0;i < n;i++) { for (j = 0;;j++) { String tempVar2 = ConsoleInput.scanfRead(null, 1); if (tempVar2 != null) { a = tangible.StringFunctions.changeCharacter(a, j, tempVar2); } if (a.charAt(j) == ' ' || a.charAt(j) == '\n') { l = j; break; } } if (l > max) { max = l; for (j = 0;j < l;j++) { b = tangible.StringFunctions.changeCharacter(b, j, a.charAt(j)); } } if (l < min) { min = l; for (j = 0;j < l;j++) { c = tangible.StringFunctions.changeCharacter(c, j, a.charAt(j)); } } } for (i = 0;i < max;i++) { System.out.printf("%c",b.charAt(i)); } System.out.print("\n"); for (j = 0;j < min;j++) { System.out.printf("%c",c.charAt(j)); } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
6c82bfa692bdf81fd4ffd0c65d25c808531586f8
bf3d4e8d18230544ad9b4c9b7c8e9621b0b70724
/src/ua/artcode/week2/University.java
e2b4fa54b3ae69c1529330a7279dacefdc2e3dbd
[]
no_license
presly808/ACB10
19c479306e01ffb16de5dfdb53db5815cf3ba571
edc3fbfe71332a507873f82c3f5d5face95e92d2
refs/heads/master
2021-01-19T07:41:53.770585
2015-10-05T11:38:52
2015-10-05T11:38:52
42,823,467
0
0
null
null
null
null
UTF-8
Java
false
false
691
java
package ua.artcode.week2; /** * Created by serhii on 26.09.15. */ public class University { // signature -> interface for user, name is verb // public static <return_type> <name> (<arg_type> <arg_name>){<logic>} // public static <return_type> <name> (){<logic>} // public static String buyCoffee(double money, int choice){ // logic int middleCoffeePrice = 10; if(money < middleCoffeePrice){ return "Not enough money"; // return and destroy frame } if(choice == 1){ return "Americano"; } else if(choice == 2){ return "Capucino"; } return "Wrong choice"; } }
[ "presly808@gmail.com" ]
presly808@gmail.com
f8799c90c0cdeeeae805bde619e5453254be19b9
d167c4fbb7759e84dd9f4efbcbe59637509afee0
/repast-admin/src/main/java/com/aaa/repast/admin/project/system/config/service/IConfigService.java
9b1d14b2b2f9a5d529b52153783f202bcf52910c
[]
no_license
c90005471/repast
71abf698a9bba2b838255e7f2982012f8b786972
69fc2e8af2fbc64b7ec0809e90d813d6fdb72439
refs/heads/master
2022-10-31T09:21:55.090528
2019-12-18T02:35:27
2019-12-18T02:35:27
219,511,880
0
1
null
2022-10-12T20:33:37
2019-11-04T13:47:28
JavaScript
UTF-8
Java
false
false
1,465
java
package com.aaa.repast.admin.project.system.config.service; import com.aaa.repast.admin.project.system.config.domain.Config; import java.util.List; /** * 参数配置 服务层 * * @author teacherChen */ public interface IConfigService { /** * 查询参数配置信息 * * @param configId 参数配置ID * @return 参数配置信息 */ public Config selectConfigById(Long configId); /** * 根据键名查询参数配置信息 * * @param configKey 参数键名 * @return 参数键值 */ public String selectConfigByKey(String configKey); /** * 查询参数配置列表 * * @param config 参数配置信息 * @return 参数配置集合 */ public List<Config> selectConfigList(Config config); /** * 新增参数配置 * * @param config 参数配置信息 * @return 结果 */ public int insertConfig(Config config); /** * 修改参数配置 * * @param config 参数配置信息 * @return 结果 */ public int updateConfig(Config config); /** * 批量删除参数配置信息 * * @param ids 需要删除的数据ID * @return 结果 */ public int deleteConfigByIds(String ids); /** * 校验参数键名是否唯一 * * @param config 参数信息 * @return 结果 */ public String checkConfigKeyUnique(Config config); }
[ "86521760@qq.com" ]
86521760@qq.com
7b93f09c85e23ffdba7152c02f5cdaa554f63415
523ede9e42a8d9cb852a4c656726cf7481dab9c2
/Tikhachev/lab8/Lab8_original/src/ParallelMatrixProduct.java
e5e4e26736a94c49b7b8bd2d3582852221245fc6
[]
no_license
slu27/5512-labs
78e6bea45bb3a88a716939ee5db3aae39aeccd96
0816cbc25040716dee8caf8510577a9f98b895e2
refs/heads/master
2021-08-31T07:59:50.216662
2017-12-20T18:12:36
2017-12-20T18:12:36
109,099,153
1
0
null
2017-11-01T07:11:46
2017-11-01T07:11:46
null
UTF-8
Java
false
false
2,699
java
import java.util.LinkedList; import java.util.ListIterator; /** * Created by root on 14.07.17 with love. */ public class ParallelMatrixProduct { private int numbersOfThread; private UsualMatrix firstUsual; private UsualMatrix secondUsual; private UsualMatrix resProductMatrix; private LinkedList<MatrixThread> threadList; public ParallelMatrixProduct(int numberOfThreads, UsualMatrix firstUsual, UsualMatrix secondUsual) { this.numbersOfThread = numberOfThreads; this.firstUsual = firstUsual; this.secondUsual = secondUsual; this.resProductMatrix = new UsualMatrix(firstUsual.rows(), secondUsual.columns()); this.threadList = new LinkedList<>(); } public UsualMatrix product() { for(int i = 0; i < numbersOfThread; i++) { MatrixThread thread = new MatrixThread(("thread #" + i), i); threadList.add(thread); thread.start(); // try { // thread.join(); // } catch (InterruptedException e) { // System.out.printf("%s прерван\n", thread.getName()); // } } try { ListIterator it = threadList.listIterator(); while(it.hasNext()) { Thread tmp = (Thread) it.next(); tmp.join(); } } catch (Exception e){ e.printStackTrace(); } // boolean end = false; // // while(!end) { // end = true; // ListIterator<MatrixThread> it = threadList.listIterator(); // while(it.hasNext()) { // if(it.next().isAlive()) { // end = false; // } // } // try { // Thread.sleep(100); // } catch (InterruptedException e) { // e.printStackTrace(); // } // } return resProductMatrix; } public class MatrixThread extends Thread { private int numberThread; public MatrixThread(String name, int numberThread) { super(name); this.numberThread = numberThread; } @Override public void run() { for (int i = numberThread; i < firstUsual.rows(); i += numbersOfThread) { for (int j = 0; j < firstUsual.columns(); j++) { for(int k = 0; k < firstUsual.columns(); k++) { resProductMatrix.setElement(i, j, (resProductMatrix.getElement(i, j) + firstUsual.getElement(i, k) * secondUsual.getElement(k, j))); } } } } } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
1ce08ca576c007abe7a491c5eb2d70e0bc63514f
19ba8f487f1bc8965b6155469acae4d5059c77c5
/src/mx/tiendas3b/tdexpress/entities/ActivoAsignacion.java
c3debd2d1642d29d4fc7e12857f3aae28301d261
[]
no_license
opelayoa/tdexpress
a7c8460159786b3a7ee2f40912788fd62c17cb07
d917858db7dcbce94d42c7e2d940af80c72ea11f
refs/heads/master
2020-04-26T14:31:52.936070
2019-06-10T02:11:55
2019-06-10T02:11:55
173,617,629
0
0
null
null
null
null
UTF-8
Java
false
false
2,588
java
package mx.tiendas3b.tdexpress.entities; // Generated 6/03/2019 08:16:53 AM by Hibernate Tools 4.3.5.Final import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * ActivoAsignacion generated by hbm2java */ @Entity @Table(name = "activo_asignacion", catalog = "itaid") public class ActivoAsignacion implements java.io.Serializable { private int id; private int activoId; private int tipoasignacion; private int asignadoId; private int motivo; private Date inicia; private Date termina; private boolean vigente; public ActivoAsignacion() { } public ActivoAsignacion(int id, int activoId, int tipoasignacion, int asignadoId, int motivo, Date inicia, Date termina, boolean vigente) { this.id = id; this.activoId = activoId; this.tipoasignacion = tipoasignacion; this.asignadoId = asignadoId; this.motivo = motivo; this.inicia = inicia; this.termina = termina; this.vigente = vigente; } @Id @Column(name = "id", unique = true, nullable = false) public int getId() { return this.id; } public void setId(int id) { this.id = id; } @Column(name = "activo_id", nullable = false) public int getActivoId() { return this.activoId; } public void setActivoId(int activoId) { this.activoId = activoId; } @Column(name = "tipoasignacion", nullable = false) public int getTipoasignacion() { return this.tipoasignacion; } public void setTipoasignacion(int tipoasignacion) { this.tipoasignacion = tipoasignacion; } @Column(name = "asignado_id", nullable = false) public int getAsignadoId() { return this.asignadoId; } public void setAsignadoId(int asignadoId) { this.asignadoId = asignadoId; } @Column(name = "motivo", nullable = false) public int getMotivo() { return this.motivo; } public void setMotivo(int motivo) { this.motivo = motivo; } @Temporal(TemporalType.DATE) @Column(name = "inicia", nullable = false, length = 10) public Date getInicia() { return this.inicia; } public void setInicia(Date inicia) { this.inicia = inicia; } @Temporal(TemporalType.DATE) @Column(name = "termina", nullable = false, length = 10) public Date getTermina() { return this.termina; } public void setTermina(Date termina) { this.termina = termina; } @Column(name = "vigente", nullable = false) public boolean isVigente() { return this.vigente; } public void setVigente(boolean vigente) { this.vigente = vigente; } }
[ "od.pelayo@gmail.com" ]
od.pelayo@gmail.com
48ee941d4ef9947c3fc5b09bf696d5bed4c3ecb4
278ed483cae1001dbbb9f7350f7086293063b967
/newyu-service-realize/src/main/java/com/newyu/service/impl/FxParamServiceImpl.java
1622adcd0b53683749fbad9120c68c717d102a8a
[]
no_license
newyuliuyu/newyu
cca1b44a34b1101662641505760d8880dbabab11
228871303c2329ac392f436c2744c813a232cf7d
refs/heads/master
2022-12-28T00:49:00.267977
2019-12-06T07:35:33
2019-12-06T07:35:33
180,946,389
0
0
null
2022-12-16T00:03:17
2019-04-12T06:40:13
Java
UTF-8
Java
false
false
403
java
package com.newyu.service.impl; import com.newyu.service.FxParamService; import org.springframework.stereotype.Service; /** * ClassName: FxParamServiceImpl <br/> * Function: ADD FUNCTION. <br/> * Reason: ADD REASON(可选). <br/> * date: 19-6-14 上午11:06 <br/> * * @author liuyu * @version v1.0 * @since JDK 1.7+ */ @Service public class FxParamServiceImpl implements FxParamService { }
[ "306487103@qq.com" ]
306487103@qq.com
292a6cacf7b34980e2eb0e23ceeff4ed1d94d3c8
d60e287543a95a20350c2caeabafbec517cabe75
/NLPCCd/Camel/2189_1.java
2d3b368a89ce6bf01ef583ce834ab4e09adddf90
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
483
java
//,temp,sample_5624.java,2,14,temp,sample_5019.java,2,14 //,2 public class xxx { public void testAsyncJmsInOut() throws Exception { MockEndpoint mock = getMockEndpoint("mock:result"); mock.expectedMessageCount(100); mock.expectsNoDuplicates(body()); StopWatch watch = new StopWatch(); for (int i = 0; i < 100; i++) { template.sendBody("seda:start", "" + i); } assertMockEndpointsSatisfied(20, TimeUnit.SECONDS); log.info("took ms to process messages request reply over jms"); } };
[ "SHOSHIN\\sgholamian@shoshin.uwaterloo.ca" ]
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
54ed3fbf5d3e56f1947e1b8fd9e08f386710594a
5440c44721728e87fb827fb130b1590b25f24989
/GPP/com/brt/gpp/aplicacoes/recarregar/RecargaXMLParser.java
510942f9a63b1c19f89494e4da675e3ca3b1dba2
[]
no_license
amigosdobart/gpp
b36a9411f39137b8378c5484c58d1023c5e40b00
b1fec4e32fa254f972a0568fb7ebfac7784ecdc2
refs/heads/master
2020-05-15T14:20:11.462484
2019-04-19T22:34:54
2019-04-19T22:34:54
182,328,708
0
0
null
null
null
null
UTF-8
Java
false
false
6,849
java
package com.brt.gpp.aplicacoes.recarregar; import java.io.StringReader; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.InputSource; import com.brt.gpp.comum.Definicoes; import com.brt.gpp.comum.GerarXML; import com.brt.gpp.comum.gppExceptions.GPPBadXMLFormatException; import com.brt.gpp.comum.mapeamentos.MapCodigosRetorno; import com.brt.gpp.comum.mapeamentos.entidade.CodigoRetorno; /** * Classe responsavel pela criacao e parse de XML's com informacoes referentes a recargas. * * @version 1.0 10/04/2007 * @author Daniel Ferreira */ public abstract class RecargaXMLParser { /** * Cria o XML com as informacoes de resultado da Consulta Pre-Recarga. * * @param retorno Codigo de retorno da Consulta Pre-Recarga. * @return XML com as informacoes de resultado da Consulta Pre-Recarga. */ public static String getXMLRetornoConsultaPreRecarga(int retorno) { //Obtendo o XML de retorno. GerarXML xml = new GerarXML("GPPRetornoConsultaPreRecarga"); //Codigo de retorno. DecimalFormat conversorRetorno = new DecimalFormat(Definicoes.MASCARA_CODIGO_RETORNO); xml.adicionaTag("retorno", conversorRetorno.format(retorno)); //Descricao do codigo de retorno. MapCodigosRetorno mapRetorno = MapCodigosRetorno.getInstance(); CodigoRetorno entidade = mapRetorno.getRetorno(retorno); String descRetorno = (entidade != null) ? entidade.getDescRetorno() : null; xml.adicionaTag("descRetorno", descRetorno); return "<?xml version=\"1.0\"?>" + xml.getXML(); } /** * Retorna os parametros de recarga definidos no XML enviado pelos sistemas externos. * * @param xmlRecarga XML com os parametros de recarga. * @return Informacoes de recarga. * @throws GPPBadXMLFormatException */ public static ParametrosRecarga parseXMLRecarga(String xmlRecarga) throws GPPBadXMLFormatException { ParametrosRecarga result = new ParametrosRecarga(); try { //Criando os objetos necessarios para realizar o parse do XML. DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); InputSource input = new InputSource(new StringReader(xmlRecarga)); //Realizando o parse do XML. Document document = builder.parse(input); Element elmRoot = (Element)document.getElementsByTagName("root").item(0); Element elmGppRecarga = (Element)elmRoot.getElementsByTagName("GPPRecarga").item(0); //Obtendo os parametros de recarga a partir do documento criado. //Elementos obrigatorios. if((elmGppRecarga.getElementsByTagName("msisdn").getLength() > 0) && (elmGppRecarga.getElementsByTagName("msisdn").item(0).getChildNodes().getLength() > 0)) { result.setMSISDN(elmGppRecarga.getElementsByTagName("msisdn").item(0).getChildNodes().item(0).getNodeValue()); } if((elmGppRecarga.getElementsByTagName("tipoTransacao").getLength() > 0) && (elmGppRecarga.getElementsByTagName("tipoTransacao").item(0).getChildNodes().getLength() > 0)) { result.setTipoTransacao(elmGppRecarga.getElementsByTagName("tipoTransacao").item(0).getChildNodes().item(0).getNodeValue()); } if((elmGppRecarga.getElementsByTagName("identificacaoRecarga").getLength() > 0) && (elmGppRecarga.getElementsByTagName("identificacaoRecarga").item(0).getChildNodes().getLength() > 0)) { result.setIdentificacaoRecarga(elmGppRecarga.getElementsByTagName("identificacaoRecarga").item(0).getChildNodes().item(0).getNodeValue()); } if((elmGppRecarga.getElementsByTagName("dataHora").getLength() > 0) && (elmGppRecarga.getElementsByTagName("dataHora").item(0).getChildNodes().getLength() > 0)) { SimpleDateFormat conversorDataHoraGPP = new SimpleDateFormat(Definicoes.MASCARA_DATA_HORA_GPP); result.setDatOrigem(conversorDataHoraGPP.parse(elmGppRecarga.getElementsByTagName("dataHora").item(0).getChildNodes().item(0).getNodeValue())); } if((elmGppRecarga.getElementsByTagName("valor").getLength() > 0) && (elmGppRecarga.getElementsByTagName("valor").item(0).getChildNodes().getLength() > 0)) { result.setIdValor(new Double(elmGppRecarga.getElementsByTagName("valor").item(0).getChildNodes().item(0).getNodeValue()).doubleValue()); } if((elmGppRecarga.getElementsByTagName("tipoCredito").getLength() > 0) && (elmGppRecarga.getElementsByTagName("tipoCredito").item(0).getChildNodes().getLength() > 0)) { result.setTipoCredito(elmGppRecarga.getElementsByTagName("tipoCredito").item(0).getChildNodes().item(0).getNodeValue()); } if((elmGppRecarga.getElementsByTagName("sistemaOrigem").getLength() > 0) && (elmGppRecarga.getElementsByTagName("sistemaOrigem").item(0).getChildNodes().getLength() > 0)) { result.setSistemaOrigem(elmGppRecarga.getElementsByTagName("sistemaOrigem").item(0).getChildNodes().item(0).getNodeValue()); } if((elmGppRecarga.getElementsByTagName("operador").getLength() > 0) && (elmGppRecarga.getElementsByTagName("operador").item(0).getChildNodes().getLength() > 0)) { result.setOperador(elmGppRecarga.getElementsByTagName("operador").item(0).getChildNodes().item(0).getNodeValue()); } //Elementos nao obrigatorios. if((elmGppRecarga.getElementsByTagName("nsuInstituicao").getLength() > 0) && (elmGppRecarga.getElementsByTagName("nsuInstituicao").item(0).getChildNodes().getLength() > 0)) { result.setNsuInstituicao(elmGppRecarga.getElementsByTagName("nsuInstituicao").item(0).getChildNodes().item(0).getNodeValue()); } if((elmGppRecarga.getElementsByTagName("hashCc").getLength() > 0) && (elmGppRecarga.getElementsByTagName("hashCc").item(0).getChildNodes().getLength() > 0)) { result.setHash_cc(elmGppRecarga.getElementsByTagName("hashCc").item(0).getChildNodes().item(0).getNodeValue()); } if((elmGppRecarga.getElementsByTagName("cpfCnpj").getLength() > 0) && (elmGppRecarga.getElementsByTagName("cpfCnpj").item(0).getChildNodes().getLength() > 0)) { result.setCpf(elmGppRecarga.getElementsByTagName("cpfCnpj").item(0).getChildNodes().item(0).getNodeValue()); } // @since 14/04/2008 // @modify Inclusao dos atributos abaixo por default, pois esse metodo // realiza o parse para execucao de Recargas // @autor Joao Paulo Galvagni result.setIndCreditoDebito(Definicoes.TIPO_AJUSTE_CREDITO); result.setIdOperacao(Definicoes.TIPO_RECARGA); } catch(Exception e) { throw new GPPBadXMLFormatException(e.toString()); } return result; } }
[ "lucianovilela@gmail.com" ]
lucianovilela@gmail.com
a0142932970415b6c6e80cd51d5ec88fa5f80ef1
7d169e796639b01c6b652f12effa1d59951b8345
/src/java/com/tulskiy/musique/plugins/discogs/DiscogsCaller.java
b8ed74cf126cd5dace3471594ea6952832d6809b
[ "Apache-2.0" ]
permissive
dubenju/javay
65555744a895ecbd345df07e5537072985095e3b
29284c847c2ab62048538c3973a9fb10090155aa
refs/heads/master
2021-07-09T23:44:55.086890
2020-07-08T13:03:50
2020-07-08T13:03:50
47,082,846
7
1
null
null
null
null
UTF-8
Java
false
false
3,509
java
/* * Copyright (c) 2008, 2009, 2010, 2011 Denis Tulskiy * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * version 3 along with this work. If not, see <http://www.gnu.org/licenses/>. */ package com.tulskiy.musique.plugins.discogs; import java.util.LinkedList; import java.util.List; import org.discogs.model.Artist; import org.discogs.ws.Discogs; import org.discogs.ws.search.ArtistSearchResult; import org.discogs.ws.search.Search; import org.discogs.ws.search.SearchResult; /** * @author mliauchuk */ // TODO rewrite using SwingWorker way public class DiscogsCaller implements Runnable { private static Discogs DISCOGS = null; private CallMode mode; private String query; private DiscogsListener callback; public static enum CallMode { ARTIST, RELEASE, SEARCH_ARTISTS; } public static void updateCachingConfiguration() { updateCachingConfiguration(DiscogsPlugin.isCacheEnabled(), DiscogsPlugin.getCacheDir()); } public static void updateCachingConfiguration(boolean cacheEnabled, String cacheDir) { if (DISCOGS != null) { DISCOGS.setCacheEnabled(cacheEnabled); DISCOGS.setCacheDir(cacheDir); } } public DiscogsCaller(CallMode mode, String query, DiscogsListener callback) { super(); if (DISCOGS == null) { DISCOGS = new Discogs(DiscogsPlugin.API_KEY, DiscogsPlugin.isCacheEnabled(), DiscogsPlugin.getCacheDir()); } this.mode = mode; this.query = query; this.callback = callback; } @Override public void run() { callback.onRetrieveStart(mode); Object result = null; try { switch (mode) { case ARTIST: result = DISCOGS.getArtist(query); break; case RELEASE: result = DISCOGS.getRelease(query); break; case SEARCH_ARTISTS: List<Artist> artists = new LinkedList<Artist>(); Search s = DISCOGS.search(Discogs.SEARCH_TYPE_ARTIST, query); List<SearchResult> srs = null; if (!s.getExactResults().isEmpty()) { srs = s.getExactResults(); } else { srs = s.getSearchResults(); } for (SearchResult sr : srs) { if (sr instanceof ArtistSearchResult) { try { ArtistSearchResult asr = (ArtistSearchResult) sr; if (!artistAlreadyFound(asr.getTitle(), artists)) { artists.add(asr.getArtist()); } } catch (Exception e) { // failed to retrieve, don't bother } } } result = artists.isEmpty() ? null : artists; break; default: break; } } catch (Exception e) { e.printStackTrace(); } // TODO investigate how to avoid this ugly hack (Cancel button pressed while querying Discogs) if (Thread.interrupted()) { return; } callback.onRetrieveFinish(mode, result); } private boolean artistAlreadyFound(String artistName, List<Artist> artists) { for (Artist artist : artists) { if (artist.getName().equalsIgnoreCase(artistName)) { return true; } } return false; } }
[ "dubenju@163.com" ]
dubenju@163.com
ba7ecf43b2f2d6bc47f69a3eeaa438b9f9a02067
09bf47084bc71f90f265a736cdefaffcbc4334ba
/primefaces-selenium/primefaces-selenium-core/src/main/java/org/primefaces/selenium/internal/ConfigProvider.java
766759b11cab1cb69fc38d896922add4469e7199
[ "MIT" ]
permissive
Jackliaoall-Tools-Front/primefaces
c49dc1ea2cf8e6235cc8befe9080ac83052c94f9
49c81177ee3d3e85fd142f09c8504073e79082d3
refs/heads/master
2023-08-30T14:50:18.753024
2021-09-27T07:55:04
2021-09-27T07:55:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,431
java
/* * The MIT License * * Copyright (c) 2009-2021 PrimeTek * * 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 org.primefaces.selenium.internal; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.util.stream.Collectors; import org.primefaces.selenium.spi.PrimeSeleniumAdapter; public class ConfigProvider { private static ConfigProvider configProvider = null; private int guiTimeout = 2; private int ajaxTimeout = 10; private int httpTimeout = 10; private int documentLoadTimeout = 15; private String driverBrowser; private boolean driverHeadless = false; private String driverVersion; private boolean disableAnimations = true; private PrimeSeleniumAdapter adapter; private List<String> onloadScripts; public ConfigProvider() { try { InputStream config = getClass().getResourceAsStream("/primefaces-selenium/config.properties"); if (config != null) { Properties properties = new Properties(); properties.load(config); String guiTimeout = properties.getProperty("guiTimeout"); if (guiTimeout != null && !guiTimeout.trim().isEmpty()) { this.guiTimeout = Integer.parseInt(guiTimeout); } String ajaxTimeout = properties.getProperty("ajaxTimeout"); if (ajaxTimeout != null && !ajaxTimeout.trim().isEmpty()) { this.ajaxTimeout = Integer.parseInt(ajaxTimeout); } String httpTimeout = properties.getProperty("httpTimeout"); if (httpTimeout != null && !httpTimeout.trim().isEmpty()) { this.httpTimeout = Integer.parseInt(httpTimeout); } String documentLoadTimeout = properties.getProperty("documentLoadTimeout"); if (documentLoadTimeout != null && !documentLoadTimeout.trim().isEmpty()) { this.documentLoadTimeout = Integer.parseInt(documentLoadTimeout); } String disableAnimations = properties.getProperty("disableAnimations"); if (disableAnimations != null && !disableAnimations.trim().isEmpty()) { this.disableAnimations = Boolean.parseBoolean(disableAnimations); } String adapter = properties.getProperty("adapter"); if (adapter != null && !adapter.trim().isEmpty()) { this.adapter = (PrimeSeleniumAdapter) Class.forName(adapter).getDeclaredConstructor().newInstance(); } String driverBrowser = properties.getProperty("driver.browser"); if (driverBrowser != null && !driverBrowser.trim().isEmpty()) { this.driverBrowser = driverBrowser; } String driverHeadless = properties.getProperty("driver.headless"); if (driverHeadless != null && !driverHeadless.trim().isEmpty()) { this.driverHeadless = Boolean.parseBoolean(driverHeadless); } String driverVersion = properties.getProperty("driver.version"); if (driverVersion != null && !driverVersion.trim().isEmpty()) { this.driverVersion = driverVersion; } } if (adapter == null) { throw new RuntimeException("No 'adapter' set via config.properties!"); } buildOnloadScripts(); } catch (Exception e) { throw new RuntimeException(e); } } protected void buildOnloadScripts() throws Exception { onloadScripts = new ArrayList<>(); try (BufferedReader buffer = new BufferedReader(new InputStreamReader( getClass().getResourceAsStream("/primefaces-selenium/onload.js"), StandardCharsets.UTF_8))) { onloadScripts.add(buffer.lines().collect(Collectors.joining("\n"))); } if (disableAnimations) { onloadScripts.add("if (window.PrimeFaces) { $(function() { PrimeFaces.utils.disableAnimations(); }); }"); } adapter.registerOnloadScripts(onloadScripts); } public int getGuiTimeout() { return guiTimeout; } public int getAjaxTimeout() { return ajaxTimeout; } public int getHttpTimeout() { return httpTimeout; } public int getDocumentLoadTimeout() { return documentLoadTimeout; } public boolean isDisableAnimations() { return disableAnimations; } public PrimeSeleniumAdapter getAdapter() { return adapter; } public List<String> getOnloadScripts() { return onloadScripts; } public String getDriverBrowser() { return driverBrowser; } public boolean isDriverHeadless() { return driverHeadless; } public String getDriverVersion() { return driverVersion; } public static synchronized ConfigProvider getInstance() { if (configProvider == null) { configProvider = new ConfigProvider(); } return configProvider; } }
[ "tandraschko@apache.org" ]
tandraschko@apache.org
43e5e1c82d253d4ba4d3f9e0db23538dd1ee7b01
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/19/org/jfree/chart/plot/PiePlot_setBaseSectionPaint_922.java
4aa4ec4fe9042959c479523e3e82f7097d72f639
[]
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
3,692
java
org jfree chart plot plot displai data form pie chart data link pie dataset piedataset special note start point o'clock pie section proce clockwis direct set chang neg valu dataset util method creat link pie dataset piedataset link org jfree data categori categori dataset categorydataset plot pie dataset piedataset pie plot pieplot plot cloneabl serializ set base section paint send link plot chang event plotchangeev regist listen param paint paint code code permit base section paint getbasesectionpaint set base section paint setbasesectionpaint paint paint paint illeg argument except illegalargumentexcept null 'paint' argument base section paint basesectionpaint paint notifi listen notifylisten plot chang event plotchangeev
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
fef45418e4b2b051196495ce764007b0c1a6f6fc
a6782271c7c95e4defab58970874e699a17903a9
/src/main/java/com/oms/OrderManagementSystemApplication.java
1f3c04380adb031cf82ecfb0bdfa06636af74453
[ "MIT" ]
permissive
sdrahnea/order-management-system
055e826e0b4973293eff4d36b48bae5945a7bec1
7df5b46f84e1bd396d2043735abbda9a9be08399
refs/heads/master
2022-07-27T05:12:53.898966
2022-07-02T04:45:59
2022-07-02T04:45:59
180,559,258
7
8
MIT
2022-07-02T04:46:00
2019-04-10T10:34:18
HTML
UTF-8
Java
false
false
472
java
package com.oms; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; /** * * @author sdrahnea */ @SpringBootApplication @EnableJpaRepositories public class OrderManagementSystemApplication { public static void main(String[] args) { SpringApplication.run(OrderManagementSystemApplication.class, args); } }
[ "s.drahnea@gmail.com" ]
s.drahnea@gmail.com
4dbc6ad0969294cf8e38ac3932af9b152af7bb36
6b34e9f52ebd095dc190ee9e89bcb5c95228aed6
/l2gw-core/highfive/gameserver/java/ru/l2gw/gameserver/loginservercon/gspackets/SendAccountInfoList.java
a80d31b1672e46e45c82d41a17d6c71030506a51
[]
no_license
tablichka/play4
86c057ececdb81f24fc493c7557b7dbb7260218d
b0c7d142ab162b7b37fe79d203e153fcf440a8a6
refs/heads/master
2022-04-25T17:04:32.244384
2020-04-27T12:59:45
2020-04-27T12:59:45
259,319,030
0
0
null
null
null
null
UTF-8
Java
false
false
458
java
package ru.l2gw.gameserver.loginservercon.gspackets; import javolution.util.FastMap; /** * @author rage * @date 03.02.11 17:32 */ public class SendAccountInfoList extends GameServerBasePacket { public SendAccountInfoList(FastMap<String, byte[]> info) { writeC(0x0f); writeD(info.size()); for(String account : info.keySet()) { writeS(account); writeC(info.get(account)[0]); writeC(info.get(account)[1]); } } }
[ "ubuntu235@gmail.com" ]
ubuntu235@gmail.com
49945f35708e644fe681bf8a934df0fdbec4a79a
c2a61be96c17963c807964583b86bac6d3081556
/stack-core/src/main/java/com/digitalpetri/opcua/stack/core/types/structured/NodeReference.java
f89ba56e460eed05baa92eec6467f569a19266c8
[ "Apache-2.0" ]
permissive
stdttakr/opc-ua-stack
967b005150d48e2b0be756707026e10327871bd0
007f4e5c4ff102814bec17bb7c41f27e2e52f2fd
refs/heads/master
2021-05-31T20:59:30.501696
2016-07-01T15:50:30
2016-07-01T15:50:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,719
java
/* * Copyright 2015 Kevin Herron * * 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.digitalpetri.opcua.stack.core.types.structured; import com.digitalpetri.opcua.stack.core.Identifiers; import com.digitalpetri.opcua.stack.core.serialization.DelegateRegistry; import com.digitalpetri.opcua.stack.core.serialization.UaDecoder; import com.digitalpetri.opcua.stack.core.serialization.UaEncoder; import com.digitalpetri.opcua.stack.core.serialization.UaStructure; import com.digitalpetri.opcua.stack.core.types.UaDataType; import com.digitalpetri.opcua.stack.core.types.builtin.NodeId; @UaDataType("NodeReference") public class NodeReference implements UaStructure { public static final NodeId TypeId = Identifiers.NodeReference; public static final NodeId BinaryEncodingId = Identifiers.NodeReference_Encoding_DefaultBinary; public static final NodeId XmlEncodingId = Identifiers.NodeReference_Encoding_DefaultXml; protected final NodeId _nodeId; protected final NodeId _referenceTypeId; protected final Boolean _isForward; protected final NodeId[] _referencedNodeIds; public NodeReference() { this._nodeId = null; this._referenceTypeId = null; this._isForward = null; this._referencedNodeIds = null; } public NodeReference(NodeId _nodeId, NodeId _referenceTypeId, Boolean _isForward, NodeId[] _referencedNodeIds) { this._nodeId = _nodeId; this._referenceTypeId = _referenceTypeId; this._isForward = _isForward; this._referencedNodeIds = _referencedNodeIds; } public NodeId getNodeId() { return _nodeId; } public NodeId getReferenceTypeId() { return _referenceTypeId; } public Boolean getIsForward() { return _isForward; } public NodeId[] getReferencedNodeIds() { return _referencedNodeIds; } @Override public NodeId getTypeId() { return TypeId; } @Override public NodeId getBinaryEncodingId() { return BinaryEncodingId; } @Override public NodeId getXmlEncodingId() { return XmlEncodingId; } public static void encode(NodeReference nodeReference, UaEncoder encoder) { encoder.encodeNodeId("NodeId", nodeReference._nodeId); encoder.encodeNodeId("ReferenceTypeId", nodeReference._referenceTypeId); encoder.encodeBoolean("IsForward", nodeReference._isForward); encoder.encodeArray("ReferencedNodeIds", nodeReference._referencedNodeIds, encoder::encodeNodeId); } public static NodeReference decode(UaDecoder decoder) { NodeId _nodeId = decoder.decodeNodeId("NodeId"); NodeId _referenceTypeId = decoder.decodeNodeId("ReferenceTypeId"); Boolean _isForward = decoder.decodeBoolean("IsForward"); NodeId[] _referencedNodeIds = decoder.decodeArray("ReferencedNodeIds", decoder::decodeNodeId, NodeId.class); return new NodeReference(_nodeId, _referenceTypeId, _isForward, _referencedNodeIds); } static { DelegateRegistry.registerEncoder(NodeReference::encode, NodeReference.class, BinaryEncodingId, XmlEncodingId); DelegateRegistry.registerDecoder(NodeReference::decode, NodeReference.class, BinaryEncodingId, XmlEncodingId); } }
[ "kevinherron@gmail.com" ]
kevinherron@gmail.com
8544f15f88116be29b9c938ef42c61a432c54c3f
bfac99890aad5f43f4d20f8737dd963b857814c2
/reg4/v1/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/hibernate/HibernateAttachmentRecycleBinStore.java
95cf4b2f0f6e79546906bb6f6c4b2b8910f8b0af
[]
no_license
STAMP-project/dbug
3b3776b80517c47e5cac04664cc07112ea26b2a4
69830c00bba4d6b37ad649aa576f569df0965c72
refs/heads/master
2021-01-20T03:59:39.330218
2017-07-12T08:03:40
2017-07-12T08:03:40
89,613,961
0
1
null
null
null
null
UTF-8
Java
false
false
7,258
java
/* * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package com.xpn.xwiki.store.hibernate; import java.util.Date; import java.util.List; import javax.inject.Named; import javax.inject.Singleton; import org.apache.commons.lang3.StringUtils; import org.hibernate.Criteria; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.criterion.Order; import org.hibernate.criterion.Restrictions; import org.xwiki.component.annotation.Component; import com.xpn.xwiki.XWikiContext; import com.xpn.xwiki.XWikiException; import com.xpn.xwiki.doc.DeletedAttachment; import com.xpn.xwiki.doc.XWikiAttachment; import com.xpn.xwiki.doc.XWikiDocument; import com.xpn.xwiki.store.AttachmentRecycleBinStore; import com.xpn.xwiki.store.XWikiHibernateBaseStore; /** * Realization of {@link AttachmentRecycleBinStore} for Hibernate-based storage. * * @version $Id: 67b08ede0c9d47d8a4323b29a3660c11a03eda2a $ * @since 1.4M1 */ @Component @Named("hibernate") @Singleton public class HibernateAttachmentRecycleBinStore extends XWikiHibernateBaseStore implements AttachmentRecycleBinStore { /** String used to annotate unchecked exceptions. */ private static final String ANOTATE_UNCHECKED = "unchecked"; /** Constant string used to refer Document ID. */ private static final String DOC_ID = "docId"; /** Constant string used to refer date. */ private static final String DATE = "date"; /** * Constructor used by {@link com.xpn.xwiki.XWiki} during storage initialization. * * @param context The current context. * @deprecated 1.6M1. Use ComponentManager.lookup(AttachmentRecycleBinStore.class) instead. */ @Deprecated public HibernateAttachmentRecycleBinStore(XWikiContext context) { super(context.getWiki(), context); } /** * Empty constructor needed for component manager. */ public HibernateAttachmentRecycleBinStore() { } @Override public void saveToRecycleBin(XWikiAttachment attachment, String deleter, Date date, XWikiContext context, boolean bTransaction) throws XWikiException { final DeletedAttachment trashAtachment = new DeletedAttachment(attachment, deleter, date, context); executeWrite(context, bTransaction, new HibernateCallback<Object>() { @Override public Object doInHibernate(Session session) throws HibernateException { session.save(trashAtachment); return null; } }); } @Override public XWikiAttachment restoreFromRecycleBin(final XWikiAttachment attachment, final long index, final XWikiContext context, boolean bTransaction) throws XWikiException { return executeRead(context, bTransaction, new HibernateCallback<XWikiAttachment>() { @Override public XWikiAttachment doInHibernate(Session session) throws HibernateException, XWikiException { try { DeletedAttachment trashAttachment = (DeletedAttachment) session.load(DeletedAttachment.class, Long.valueOf(index)); return trashAttachment.restoreAttachment(attachment, context); } catch (Exception ex) { // Invalid recycle entry. return null; } } }); } @Override public DeletedAttachment getDeletedAttachment(final long index, XWikiContext context, boolean bTransaction) throws XWikiException { return executeRead(context, bTransaction, new HibernateCallback<DeletedAttachment>() { @Override public DeletedAttachment doInHibernate(Session session) throws HibernateException, XWikiException { return (DeletedAttachment) session.get(DeletedAttachment.class, Long.valueOf(index)); } }); } @Override public List<DeletedAttachment> getAllDeletedAttachments(final XWikiAttachment attachment, XWikiContext context, boolean bTransaction) throws XWikiException { return executeRead(context, bTransaction, new HibernateCallback<List<DeletedAttachment>>() { @SuppressWarnings(ANOTATE_UNCHECKED) @Override public List<DeletedAttachment> doInHibernate(Session session) throws HibernateException, XWikiException { Criteria c = session.createCriteria(DeletedAttachment.class); if (attachment != null) { c.add(Restrictions.eq(DOC_ID, attachment.getDocId())); if (!StringUtils.isBlank(attachment.getFilename())) { c.add(Restrictions.eq("filename", attachment.getFilename())); } } return c.addOrder(Order.desc(DATE)).list(); } }); } @Override public List<DeletedAttachment> getAllDeletedAttachments(final XWikiDocument doc, XWikiContext context, boolean bTransaction) throws XWikiException { return executeRead(context, bTransaction, new HibernateCallback<List<DeletedAttachment>>() { @SuppressWarnings(ANOTATE_UNCHECKED) @Override public List<DeletedAttachment> doInHibernate(Session session) throws HibernateException, XWikiException { assert doc != null; return session.createCriteria(DeletedAttachment.class).add(Restrictions.eq(DOC_ID, doc.getId())) .addOrder(Order.desc(DATE)).list(); } }); } @Override public void deleteFromRecycleBin(final long index, XWikiContext context, boolean bTransaction) throws XWikiException { executeWrite(context, bTransaction, new HibernateCallback<Object>() { @Override public Object doInHibernate(Session session) throws HibernateException, XWikiException { try { session.createQuery("delete from " + DeletedAttachment.class.getName() + " where id=?") .setLong(0, index).executeUpdate(); } catch (Exception ex) { // Invalid ID? } return null; } }); } }
[ "caroline.landry@inria.fr" ]
caroline.landry@inria.fr
364681a6c30c46410349a3a3aec4093b6149e1ce
11f5628d7dc19987c942a38d6837bd3c9f6852ab
/src/main/java/com/pure/service/service/impl/FreeClassPlanServiceImpl.java
c3774295e8481ab238a6642408b23ce44b66a053
[]
no_license
BulkSecurityGeneratorProject/simple-service
a5addc1b937fcc1fab0570325f0c5220ab5d1669
e1cb63df0f662fe50b631d441da08ebfefcd6851
refs/heads/master
2022-12-22T21:07:31.198260
2020-01-10T15:07:16
2020-01-10T15:07:16
296,543,457
0
0
null
2020-09-18T07:14:09
2020-09-18T07:14:08
null
UTF-8
Java
false
false
2,270
java
package com.pure.service.service.impl; import com.pure.service.service.FreeClassPlanService; import com.pure.service.domain.FreeClassPlan; import com.pure.service.repository.FreeClassPlanRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * Service Implementation for managing FreeClassPlan. */ @Service @Transactional public class FreeClassPlanServiceImpl implements FreeClassPlanService{ private final Logger log = LoggerFactory.getLogger(FreeClassPlanServiceImpl.class); private final FreeClassPlanRepository freeClassPlanRepository; public FreeClassPlanServiceImpl(FreeClassPlanRepository freeClassPlanRepository) { this.freeClassPlanRepository = freeClassPlanRepository; } /** * Save a freeClassPlan. * * @param freeClassPlan the entity to save * @return the persisted entity */ @Override public FreeClassPlan save(FreeClassPlan freeClassPlan) { log.debug("Request to save FreeClassPlan : {}", freeClassPlan); return freeClassPlanRepository.save(freeClassPlan); } /** * Get all the freeClassPlans. * * @param pageable the pagination information * @return the list of entities */ @Override @Transactional(readOnly = true) public Page<FreeClassPlan> findAll(Pageable pageable) { log.debug("Request to get all FreeClassPlans"); return freeClassPlanRepository.findAll(pageable); } /** * Get one freeClassPlan by id. * * @param id the id of the entity * @return the entity */ @Override @Transactional(readOnly = true) public FreeClassPlan findOne(Long id) { log.debug("Request to get FreeClassPlan : {}", id); return freeClassPlanRepository.findOne(id); } /** * Delete the freeClassPlan by id. * * @param id the id of the entity */ @Override public void delete(Long id) { log.debug("Request to delete FreeClassPlan : {}", id); freeClassPlanRepository.delete(id); } }
[ "leeming-jiang@163.com" ]
leeming-jiang@163.com
e23eb406bf36af88c10c24d03e0d7e9d94c4bd8b
7360784e149ba754518b4dce1ff78f4ddbea6650
/com/samsung/android/server/wifi/share/ICasterCallback.java
95b1df1529752af771a62b8c896cc2a0f2ad205d
[]
no_license
headuck/SM-N9750-TGY-1
c4cc11759649c9d0aa0b222c239ba4ab7497e320
72a22e5b13d2d2d93267f4d28c76c5758adfdd83
refs/heads/main
2022-12-25T03:27:33.194017
2020-10-15T23:41:56
2020-10-15T23:41:56
304,472,478
1
0
null
null
null
null
UTF-8
Java
false
false
307
java
package com.samsung.android.server.wifi.share; import com.samsung.android.server.wifi.share.McfDataUtil; /* access modifiers changed from: package-private */ public interface ICasterCallback { void onPasswordRequested(McfDataUtil.McfData mcfData, String str); void onSessionClosed(String str); }
[ "headuck@users.noreply.github.com" ]
headuck@users.noreply.github.com
25d064ed0e51df4bc83a4526aab50940c6879f9b
cffd4e2afaede5fcf0ff647b4e55a00493e711ed
/IJTest_1/src/imagej/data/event/DatasetUpdatedEvent.java
f855e029dd33ad952606c99db90732ae28be1473
[]
no_license
donaldlee2008/FURI_Code
f3d96d2037768f3e2b7cd4b3547db96e08fa6e44
5e1261c9bffb1ef49a60b4e8e2de6cf811df0dea
refs/heads/master
2021-01-13T12:38:07.839866
2013-04-25T17:18:34
2013-04-25T17:18:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,540
java
/* * #%L * ImageJ software for multidimensional image processing and analysis. * %% * Copyright (C) 2009 - 2012 Board of Regents of the University of * Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck * Institute of Molecular Cell Biology and Genetics. * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of any organization. * #L% */ package imagej.data.event; import imagej.data.Dataset; /** * An event indicating a {@link Dataset}'s data has been updated. This means * that sample values may have changed, but the dimensional structure is the * same as before. * * @author Curtis Rueden */ public class DatasetUpdatedEvent extends DataUpdatedEvent { private final Dataset dataset; private final boolean metadataOnly; public DatasetUpdatedEvent(final Dataset dataset, boolean metadataOnly) { super(dataset); this.dataset = dataset; this.metadataOnly = metadataOnly; } // -- ObjectEvent methods -- @Override public Dataset getObject() { return dataset; } public boolean isMetaDataOnly() { return metadataOnly; } }
[ "msteptoe@EN4085206.fulton.ad.asu.edu" ]
msteptoe@EN4085206.fulton.ad.asu.edu
a6dd3c6bbe0b2db2d2a690a1109bd5294795e765
95c14adc382890aec7a4f042d8dc1f1e302829f1
/src/main/java/sorting/OrderedLibrary.java
cbbae7c673fbe0ff0b917d417e0dec205b272841
[]
no_license
kovacseni/training-solutions
fdfbc0b113beea226346dc57abe4404beb855464
834e4f86fc8d403249913256a64918250d3434ed
refs/heads/master
2023-04-18T04:03:41.893938
2021-05-05T20:00:44
2021-05-05T20:00:44
308,728,317
0
2
null
null
null
null
UTF-8
Java
false
false
606
java
package sorting; import java.util.Set; public class OrderedLibrary { private Set<Book> books; public OrderedLibrary(Set<Book> books) { this.books = books; } public Set<Book> getBooks() { return books; } public Book lendFirstBook() { if (books == null || books.isEmpty()) { throw new NullPointerException("Library is empty!"); } Book first = new Book(99999, "XY", "xy"); for (Book b : books) { if (b.compareTo(first) < 0) { first = b; } } return first; } }
[ "kovacseni@gmail.com" ]
kovacseni@gmail.com
5efced8182a91783d1157bff5fbf6aa5393394b8
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
/Corpus/eclipse.pde.ui/3657.java
107512050e1db88bebf420d383ec4613b54c8840
[ "MIT" ]
permissive
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
d3fd21745dfddb2979e8ac262588cfdfe471899f
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
refs/heads/master
2020-03-31T15:52:01.005505
2018-10-01T23:38:50
2018-10-01T23:38:50
152,354,327
1
0
MIT
2018-10-10T02:57:02
2018-10-10T02:57:02
null
UTF-8
Java
false
false
3,156
java
/******************************************************************************* * Copyright (c) 2000, 2008 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.pde.internal.core.feature; import org.eclipse.pde.internal.core.ifeature.IFeatureChild; import org.eclipse.pde.internal.core.ifeature.IFeatureData; import org.eclipse.pde.internal.core.ifeature.IFeatureImport; import org.eclipse.pde.internal.core.ifeature.IFeatureInfo; import org.eclipse.pde.internal.core.ifeature.IFeatureInstallHandler; import org.eclipse.pde.internal.core.ifeature.IFeatureModel; import org.eclipse.pde.internal.core.ifeature.IFeatureModelFactory; import org.eclipse.pde.internal.core.ifeature.IFeaturePlugin; import org.eclipse.pde.internal.core.ifeature.IFeatureURL; import org.eclipse.pde.internal.core.ifeature.IFeatureURLElement; public class FeatureFactory implements IFeatureModelFactory { private IFeatureModel model; public FeatureFactory(IFeatureModel model) { this.model = model; } @Override public IFeaturePlugin createPlugin() { FeaturePlugin plugin = new FeaturePlugin(); plugin.model = model; plugin.parent = model.getFeature(); return plugin; } @Override public IFeatureData createData() { FeatureData data = new FeatureData(); data.model = model; data.parent = model.getFeature(); return data; } @Override public IFeatureChild createChild() { FeatureChild child = new FeatureChild(); child.model = model; child.parent = model.getFeature(); return child; } @Override public IFeatureImport createImport() { FeatureImport iimport = new FeatureImport(); iimport.model = model; iimport.parent = model.getFeature(); return iimport; } @Override public IFeatureURL createURL() { FeatureURL url = new FeatureURL(); url.model = model; url.parent = model.getFeature(); return url; } @Override public IFeatureInstallHandler createInstallHandler() { FeatureInstallHandler handler = new FeatureInstallHandler(); handler.model = model; handler.parent = model.getFeature(); return handler; } @Override public IFeatureInfo createInfo(int index) { FeatureInfo info = new FeatureInfo(index); info.model = model; info.parent = model.getFeature(); return info; } @Override public IFeatureURLElement createURLElement(IFeatureURL parent, int elementType) { FeatureURLElement element = new FeatureURLElement(elementType); element.model = model; element.parent = parent; return element; } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
19597976c790c43bb3d5d72a151d8513e2723d87
711e906f2b6490ef1e4f1f58ca840fd14b857ce2
/com/android/systemui/statusbar/phone/LightsOutNotifController.java
dc63cb2c0e518f5760df433c4234c4f10a7f7dc9
[]
no_license
dovanduy/SystemUIGoogle
51a29b812000d1857145f429f983e93c02bff14c
cd41959ee1bd39a22d0d4e95dc40cefb72a75ec8
refs/heads/master
2022-07-09T01:48:40.088858
2020-05-16T16:01:21
2020-05-16T16:01:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,122
java
// // Decompiled by Procyon v0.5.36 // package com.android.systemui.statusbar.phone; import android.view.ViewPropertyAnimator; import android.animation.Animator$AnimatorListener; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.TimeInterpolator; import android.view.animation.AccelerateInterpolator; import com.android.internal.statusbar.NotificationVisibility; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.internal.view.AppearanceRegion; import android.view.WindowManager; import android.view.View; import com.android.systemui.statusbar.notification.NotificationEntryManager; import com.android.systemui.statusbar.notification.NotificationEntryListener; import com.android.systemui.statusbar.CommandQueue; import com.android.internal.annotations.VisibleForTesting; public class LightsOutNotifController { @VisibleForTesting int mAppearance; private final CommandQueue.Callbacks mCallback; private final CommandQueue mCommandQueue; private int mDisplayId; private final NotificationEntryListener mEntryListener; private final NotificationEntryManager mEntryManager; private View mLightsOutNotifView; private final WindowManager mWindowManager; LightsOutNotifController(final WindowManager mWindowManager, final NotificationEntryManager mEntryManager, final CommandQueue mCommandQueue) { this.mCallback = new CommandQueue.Callbacks() { @Override public void onSystemBarAppearanceChanged(final int n, final int mAppearance, final AppearanceRegion[] array, final boolean b) { if (n != LightsOutNotifController.this.mDisplayId) { return; } final LightsOutNotifController this$0 = LightsOutNotifController.this; this$0.mAppearance = mAppearance; this$0.updateLightsOutView(); } }; this.mEntryListener = new NotificationEntryListener() { @Override public void onEntryRemoved(final NotificationEntry notificationEntry, final NotificationVisibility notificationVisibility, final boolean b, final int n) { LightsOutNotifController.this.updateLightsOutView(); } @Override public void onNotificationAdded(final NotificationEntry notificationEntry) { LightsOutNotifController.this.updateLightsOutView(); } @Override public void onPostEntryUpdated(final NotificationEntry notificationEntry) { LightsOutNotifController.this.updateLightsOutView(); } }; this.mWindowManager = mWindowManager; this.mEntryManager = mEntryManager; this.mCommandQueue = mCommandQueue; } private void destroy() { this.mEntryManager.removeNotificationEntryListener(this.mEntryListener); this.mCommandQueue.removeCallback(this.mCallback); } private boolean hasActiveNotifications() { return this.mEntryManager.hasActiveNotifications(); } private void init() { this.mDisplayId = this.mWindowManager.getDefaultDisplay().getDisplayId(); this.mEntryManager.addNotificationEntryListener(this.mEntryListener); this.mCommandQueue.addCallback(this.mCallback); this.updateLightsOutView(); } @VisibleForTesting boolean areLightsOut() { return (this.mAppearance & 0x4) != 0x0; } @VisibleForTesting boolean isShowingDot() { return this.mLightsOutNotifView.getVisibility() == 0 && this.mLightsOutNotifView.getAlpha() == 1.0f; } void setLightsOutNotifView(final View mLightsOutNotifView) { this.destroy(); this.mLightsOutNotifView = mLightsOutNotifView; if (mLightsOutNotifView != null) { mLightsOutNotifView.setVisibility(8); this.mLightsOutNotifView.setAlpha(0.0f); this.init(); } } @VisibleForTesting boolean shouldShowDot() { return this.hasActiveNotifications() && this.areLightsOut(); } @VisibleForTesting void updateLightsOutView() { if (this.mLightsOutNotifView == null) { return; } final boolean shouldShowDot = this.shouldShowDot(); if (shouldShowDot != this.isShowingDot()) { float n = 0.0f; if (shouldShowDot) { this.mLightsOutNotifView.setAlpha(0.0f); this.mLightsOutNotifView.setVisibility(0); } final ViewPropertyAnimator animate = this.mLightsOutNotifView.animate(); if (shouldShowDot) { n = 1.0f; } final ViewPropertyAnimator alpha = animate.alpha(n); long duration; if (shouldShowDot) { duration = 750L; } else { duration = 250L; } alpha.setDuration(duration).setInterpolator((TimeInterpolator)new AccelerateInterpolator(2.0f)).setListener((Animator$AnimatorListener)new AnimatorListenerAdapter() { public void onAnimationEnd(final Animator animator) { final View access$000 = LightsOutNotifController.this.mLightsOutNotifView; float alpha; if (shouldShowDot) { alpha = 1.0f; } else { alpha = 0.0f; } access$000.setAlpha(alpha); final View access$2 = LightsOutNotifController.this.mLightsOutNotifView; int visibility; if (shouldShowDot) { visibility = 0; } else { visibility = 8; } access$2.setVisibility(visibility); } }).start(); } } }
[ "ethan.halsall@gmail.com" ]
ethan.halsall@gmail.com
fc82cca59d0476f5b8c486737b0b4ca95392221e
ea1d880008200dd7fdc668730d2d307f0a403098
/LeetCodePractice/src/Contest/ValidateBinaryTreeNodes.java
9578833cbcdc4859d2d9399e7fb26d48b92de582
[]
no_license
arnabs542/Practice
6118f596ff8233a23a1f064d1ca01bcc74bb543a
c779ea15ff2d9ce1efdfa295be741a2825929df8
refs/heads/master
2023-03-08T12:01:09.493197
2021-02-14T07:31:49
2021-02-14T07:31:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,180
java
package Contest; /*You have n binary tree nodes numbered from 0 to n - 1 where node i has two children leftChild[i] and rightChild[i], return true if and only if all the given nodes form exactly one valid binary tree. If node i has no left child then leftChild[i] will equal -1, similarly for the right child. Note that the nodes have no values and that we only use the node numbers in this problem. Example 1: Input: n = 4, leftChild = [1,-1,3,-1], rightChild = [2,-1,-1,-1] Output: true Example 2: Input: n = 4, leftChild = [1,-1,3,-1], rightChild = [2,3,-1,-1] Output: false Example 3: Input: n = 2, leftChild = [1,0], rightChild = [-1,-1] Output: false Example 4: Input: n = 6, leftChild = [1,-1,-1,4,-1,-1], rightChild = [2,-1,-1,5,-1,-1] Output: false Constraints: 1 <= n <= 10^4 leftChild.length == rightChild.length == n -1 <= leftChild[i], rightChild[i] <= n - 1 */ public class ValidateBinaryTreeNodes { public boolean validateBinaryTreeNodes(int n, int[] leftChild, int[] rightChild) { return false; } }
[ "tengh@amazon.com" ]
tengh@amazon.com
480010dd09680b3719de1555adfb5352dbdd417c
9e67440a89ca496b85413582160b43be9af6bc8b
/app/src/main/java/com/aserbao/aserbaosandroid/AserbaoApplication.java
96902ed65e64d07f8b9c9b9eba5989afd37a2fa7
[]
no_license
tulip110/AserbaosAndroid
a39bfd3569a88ac84a38f79dc796ac362c05790f
ae8829c6de899672d0d0dd5be64befcd3a9f4421
refs/heads/master
2020-04-08T14:28:52.119676
2018-11-21T06:07:16
2018-11-21T06:07:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,756
java
package com.aserbao.aserbaosandroid; import android.app.Application; import android.database.sqlite.SQLiteDatabase; import android.text.TextUtils; import android.util.Log; import com.aserbao.aserbaosandroid.functions.database.greenDao.db.DaoMaster; import com.aserbao.aserbaosandroid.functions.database.greenDao.db.DaoSession; import com.aserbao.aserbaosandroid.functions.database.greenDao.db.MyDaoMaster; import org.greenrobot.greendao.database.Database; import java.io.File; /** * Created by aserbao on 2018 2018/1/15.23:27 * Email:aserbao@163.com * weixin: aserbao */ public class AserbaoApplication extends Application { @Override public void onCreate() { super.onCreate(); init(); } private void init() { initData(); } private void initData() { initGreenDao(); } /** * 初始化GreenDao,直接在Application中进行初始化操作 */ private void initGreenDao() { /* File databasePath = getDatabasePath("aserbaos.db"); boolean exists = databasePath.exists(); File file = new File(databasePath.getParentFile(), "aserbaos.db"); databasePath.renameTo(file); Log.e("test", "initGreenDao: " + databasePath.getAbsolutePath());*/ MyDaoMaster helper = new MyDaoMaster(this, "aserbaos.db"); // DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(this, "aserbao.db"); SQLiteDatabase db = helper.getWritableDatabase(); // Database db = helper.getEncryptedWritableDb("aserbao"); DaoMaster daoMaster = new DaoMaster(db); daoSession = daoMaster.newSession(); } private DaoSession daoSession; public DaoSession getDaoSession() { return daoSession; } }
[ "1142803753@qq.com" ]
1142803753@qq.com
382c096a50ae7b4d51f55137f313d35911d63fd6
5272ea9b2c0679a5ba5ef4b7cabcf75a30634ee2
/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectMetadata.java
e53fa46c4d89cbfcec9c2f912c0372b606eb2b26
[ "Apache-2.0" ]
permissive
whvixd/spring4-note
ad3fa3a79fc0a23b8f6bc5e27770b3eaa09c0593
1f37db9f25bdadb09f417ce84f6266921c308dee
refs/heads/master
2022-12-30T16:36:20.729963
2020-10-21T03:47:10
2020-10-21T03:47:10
269,893,579
0
0
null
null
null
null
UTF-8
Java
false
false
5,452
java
/* * Copyright 2002-2015 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 * * https://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.aop.aspectj.annotation; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.reflect.AjType; import org.aspectj.lang.reflect.AjTypeSystem; import org.aspectj.lang.reflect.PerClauseKind; import org.springframework.aop.Pointcut; import org.springframework.aop.aspectj.AspectJExpressionPointcut; import org.springframework.aop.aspectj.TypePatternClassFilter; import org.springframework.aop.framework.AopConfigException; import org.springframework.aop.support.ComposablePointcut; /** * Metadata for an AspectJ aspect class, with an additional Spring AOP pointcut * for the per clause. * * <p>Uses AspectJ 5 AJType reflection API, so is only supported on Java 5. * Enables us to work with different AspectJ instantiation models such as * "singleton", "pertarget" and "perthis". * * @author Rod Johnson * @author Juergen Hoeller * @since 2.0 * @see org.springframework.aop.aspectj.AspectJExpressionPointcut */ public class AspectMetadata { /** * The name of this aspect as defined to Spring (the bean name) - * allows us to determine if two pieces of advice come from the * same aspect and hence their relative precedence. */ private final String aspectName; /** * AspectJ reflection information (AspectJ 5 / Java 5 specific). */ private final AjType<?> ajType; /** * Spring AOP pointcut corresponding to the per clause of the * aspect. Will be the Pointcut.TRUE canonical instance in the * case of a singleton, otherwise an AspectJExpressionPointcut. */ private final Pointcut perClausePointcut; /** * Create a new AspectMetadata instance for the given aspect class. * @param aspectClass the aspect class * @param aspectName the name of the aspect */ public AspectMetadata(Class<?> aspectClass, String aspectName) { this.aspectName = aspectName; Class<?> currClass = aspectClass; AjType<?> ajType = null; while (currClass != Object.class) { AjType<?> ajTypeToCheck = AjTypeSystem.getAjType(currClass); if (ajTypeToCheck.isAspect()) { ajType = ajTypeToCheck; break; } currClass = currClass.getSuperclass(); } if (ajType == null) { throw new IllegalArgumentException("Class '" + aspectClass.getName() + "' is not an @AspectJ aspect"); } if (ajType.getDeclarePrecedence().length > 0) { throw new IllegalArgumentException("DeclarePrecendence not presently supported in Spring AOP"); } this.ajType = ajType; switch (this.ajType.getPerClause().getKind()) { case SINGLETON : this.perClausePointcut = Pointcut.TRUE; return; case PERTARGET : case PERTHIS : AspectJExpressionPointcut ajexp = new AspectJExpressionPointcut(); ajexp.setLocation("@Aspect annotation on " + aspectClass.getName()); ajexp.setExpression(findPerClause(aspectClass)); this.perClausePointcut = ajexp; return; case PERTYPEWITHIN : // Works with a type pattern this.perClausePointcut = new ComposablePointcut(new TypePatternClassFilter(findPerClause(aspectClass))); return; default : throw new AopConfigException( "PerClause " + ajType.getPerClause().getKind() + " not supported by Spring AOP for " + aspectClass); } } /** * Extract contents from String of form {@code pertarget(contents)}. */ private String findPerClause(Class<?> aspectClass) { // TODO when AspectJ provides this, we can remove this hack. Hence we don't // bother to make it elegant. Or efficient. Or robust :-) String str = aspectClass.getAnnotation(Aspect.class).value(); str = str.substring(str.indexOf("(") + 1); str = str.substring(0, str.length() - 1); return str; } /** * Return AspectJ reflection information. */ public AjType<?> getAjType() { return this.ajType; } /** * Return the aspect class. */ public Class<?> getAspectClass() { return this.ajType.getJavaClass(); } /** * Return the aspect class. */ public String getAspectName() { return this.aspectName; } /** * Return a Spring pointcut expression for a singleton aspect. * (e.g. {@code Pointcut.TRUE} if it's a singleton). */ public Pointcut getPerClausePointcut() { return this.perClausePointcut; } /** * Return whether the aspect is defined as "perthis" or "pertarget". */ public boolean isPerThisOrPerTarget() { PerClauseKind kind = getAjType().getPerClause().getKind(); return (kind == PerClauseKind.PERTARGET || kind == PerClauseKind.PERTHIS); } /** * Return whether the aspect is defined as "pertypewithin". */ public boolean isPerTypeWithin() { PerClauseKind kind = getAjType().getPerClause().getKind(); return (kind == PerClauseKind.PERTYPEWITHIN); } /** * Return whether the aspect needs to be lazily instantiated. */ public boolean isLazilyInstantiated() { return (isPerThisOrPerTarget() || isPerTypeWithin()); } }
[ "wangzhx@fxiaoke.com" ]
wangzhx@fxiaoke.com
f8c194b3ffd39748f1446c00113fa2995369a693
d4d3fbf19e954c844dba06b8bce68ddf2c59ab03
/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/columns/specific/experiment/CommonExperimentColDefKind.java
fca456ca638fdc407757367dcdcbc2bec91ef7f7
[]
no_license
BackupTheBerlios/sciradama-svn
134adf98632d2ad023b768e410177b6e87a5e967
310a45a1ade1223892e38bbf366122523664d779
refs/heads/master
2020-04-06T04:02:15.210182
2009-09-23T06:55:24
2009-09-23T06:55:24
40,805,698
0
0
null
null
null
null
UTF-8
Java
false
false
4,836
java
/* * Copyright 2008 ETH Zuerich, CISD * * 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 ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.specific.experiment; import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.AbstractColumnDefinitionKind; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.columns.framework.IColumnDefinitionKind; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Experiment; /** * Definition of experiment table columns. * * @author Tomasz Pylak */ public enum CommonExperimentColDefKind implements IColumnDefinitionKind<Experiment> { CODE(new AbstractColumnDefinitionKind<Experiment>(Dict.CODE) { @Override public String tryGetValue(Experiment entity) { return entity.getCode(); } }), EXPERIMENT_TYPE(new AbstractColumnDefinitionKind<Experiment>(Dict.EXPERIMENT_TYPE, true) { @Override public String tryGetValue(Experiment entity) { return entity.getExperimentType().getCode(); } }), EXPERIMENT_IDENTIFIER(new AbstractColumnDefinitionKind<Experiment>(Dict.EXPERIMENT_IDENTIFIER, 150, true) { @Override public String tryGetValue(Experiment entity) { return entity.getIdentifier(); } }), DATABASE_INSTANCE(new AbstractColumnDefinitionKind<Experiment>(Dict.DATABASE_INSTANCE, true) { @Override public String tryGetValue(Experiment entity) { return entity.getProject().getGroup().getInstance().getCode(); } }), GROUP(new AbstractColumnDefinitionKind<Experiment>(Dict.GROUP, true) { @Override public String tryGetValue(Experiment entity) { return entity.getProject().getGroup().getCode(); } }), PROJECT(new AbstractColumnDefinitionKind<Experiment>(Dict.PROJECT, true) { @Override public String tryGetValue(Experiment entity) { return entity.getProject().getCode(); } }), REGISTRATOR(new AbstractColumnDefinitionKind<Experiment>(Dict.REGISTRATOR) { @Override public String tryGetValue(Experiment entity) { return renderRegistrator(entity); } }), REGISTRATION_DATE(new AbstractColumnDefinitionKind<Experiment>(Dict.REGISTRATION_DATE, 200, false) { @Override public String tryGetValue(Experiment entity) { return renderRegistrationDate(entity); } }), IS_INVALID(new AbstractColumnDefinitionKind<Experiment>(Dict.IS_INVALID, true) { @Override public String tryGetValue(Experiment entity) { return renderInvalidationFlag(entity); } }), PERM_ID(new AbstractColumnDefinitionKind<Experiment>(Dict.PERM_ID, true) { @Override public String tryGetValue(Experiment entity) { return entity.getPermId(); } }), SHOW_DETAILS_LINK(new AbstractColumnDefinitionKind<Experiment>(Dict.SHOW_DETAILS_LINK, true) { @Override public String tryGetValue(Experiment entity) { return entity.getPermlink(); } }); private final AbstractColumnDefinitionKind<Experiment> columnDefinitionKind; private CommonExperimentColDefKind(AbstractColumnDefinitionKind<Experiment> columnDefinitionKind) { this.columnDefinitionKind = columnDefinitionKind; } public String id() { return name(); } public AbstractColumnDefinitionKind<Experiment> getDescriptor() { return columnDefinitionKind; } }
[ "felmer@a9a122e8-2d74-0410-b01f-b93345715403" ]
felmer@a9a122e8-2d74-0410-b01f-b93345715403
5008820a44255580d418690ae430e59365442db0
db5e2811d3988a5e689b5fa63e748c232943b4a0
/jadx/sources/o/C2930.java
99a5c962ae63a5f0fdde063f1fad56bcd017d377
[]
no_license
ghuntley/TraceTogether_1.6.1.apk
914885d8be7b23758d161bcd066a4caf5ec03233
b5c515577902482d741cabdbd30f883a016242f8
refs/heads/master
2022-04-23T16:59:33.038690
2020-04-27T05:44:49
2020-04-27T05:44:49
259,217,124
0
0
null
null
null
null
UTF-8
Java
false
false
1,019
java
package o; /* renamed from: o.ө reason: contains not printable characters */ public class C2930 extends C0320<C2930> { /* renamed from: ɩ reason: contains not printable characters */ static final String f13611 = "login"; /* renamed from: Ι reason: contains not printable characters */ static final String f13612 = "success"; /* renamed from: ι reason: contains not printable characters */ static final String f13613 = "method"; /* access modifiers changed from: package-private */ /* renamed from: Ι reason: contains not printable characters */ public String m15127() { return f13611; } /* renamed from: ı reason: contains not printable characters */ public C2930 m15126(String str) { this.f3661.m14120(f13613, str); return this; } /* renamed from: ι reason: contains not printable characters */ public C2930 m15128(boolean z) { this.f3661.m14120(f13612, Boolean.toString(z)); return this; } }
[ "ghuntley@ghuntley.com" ]
ghuntley@ghuntley.com
0fd4a5109b1fa53af47eedc07c5a4bdc6033fa9c
56ff4efd9b5dd55d1578269793082c2a4ba34bc7
/2_java/1_2_class/Ch06_Class/src/p12_package/ex1/DefaultData.java
0db3d801ec7756b16e9170cc79c023bd96a7b3ca
[]
no_license
10soos17/lecture_choongang
8274389e7a573bb0e568ee3b905691dd3dc639c3
f00a57965e4bc7755ca6115ac5be5b111ac58b31
refs/heads/master
2023-08-04T08:00:09.528129
2021-07-24T02:14:06
2021-07-24T02:14:06
355,406,674
0
0
null
null
null
null
UTF-8
Java
false
false
180
java
package p12_package.ex1; class DefaultData { int defaultVar = 50; DefaultData() { System.out.println("기본 생성자"); } void add() { System.out.println(10); } }
[ "shinsh1017@gmail.com" ]
shinsh1017@gmail.com
53455ff133c5e31d9154b2d2731927e13ecd6993
2c705b29bec006d2de389294ff7206d491f8db5b
/net/minecraft/util/EntityDamageSourceIndirect.java
92f9b63496634574452f010b916b1c97b3311b4a
[]
no_license
see32ry/chrome-client
dd25b90919b236236f07c34d5868020eb1fefe99
102f7b398760d2de58e2e864bd5fb1c0172b5b30
refs/heads/master
2020-03-22T19:14:52.995317
2017-12-09T02:48:33
2017-12-09T02:48:33
140,515,706
1
1
null
2018-07-11T03:17:49
2018-07-11T03:17:48
null
UTF-8
Java
false
false
1,532
java
package net.minecraft.util; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; public class EntityDamageSourceIndirect extends EntityDamageSource { private Entity indirectEntity; public EntityDamageSourceIndirect(String p_i1568_1_, Entity p_i1568_2_, Entity indirectEntityIn) { super(p_i1568_1_, p_i1568_2_); this.indirectEntity = indirectEntityIn; } public Entity getSourceOfDamage() { return this.damageSourceEntity; } public Entity getEntity() { return this.indirectEntity; } /** * Gets the death message that is displayed when the player dies */ public IChatComponent getDeathMessage(EntityLivingBase p_151519_1_) { IChatComponent ichatcomponent = this.indirectEntity == null ? this.damageSourceEntity.getDisplayName() : this.indirectEntity.getDisplayName(); ItemStack itemstack = this.indirectEntity instanceof EntityLivingBase ? ((EntityLivingBase)this.indirectEntity).getHeldItem() : null; String s = "death.attack." + this.damageType; String s1 = s + ".item"; return itemstack != null && itemstack.hasDisplayName() && StatCollector.canTranslate(s1) ? new ChatComponentTranslation(s1, new Object[] {p_151519_1_.getDisplayName(), ichatcomponent, itemstack.getChatComponent()}): new ChatComponentTranslation(s, new Object[] {p_151519_1_.getDisplayName(), ichatcomponent}); } }
[ "haqgamer66@gmail.com" ]
haqgamer66@gmail.com
47c8dac11b8bf44234274022b8ab605fe2776d96
0907c886f81331111e4e116ff0c274f47be71805
/sources/com/google/android/gms/internal/ads/zzajz.java
819c7b5a788152e21b3e4d77307cafcb1437182d
[ "MIT" ]
permissive
Minionguyjpro/Ghostly-Skills
18756dcdf351032c9af31ec08fdbd02db8f3f991
d1a1fb2498aec461da09deb3ef8d98083542baaf
refs/heads/Android-OS
2022-07-27T19:58:16.442419
2022-04-15T07:49:53
2022-04-15T07:49:53
415,272,874
2
0
MIT
2021-12-21T10:23:50
2021-10-09T10:12:36
Java
UTF-8
Java
false
false
391
java
package com.google.android.gms.internal.ads; import android.content.Context; @zzadh public final class zzajz { public static void zzai(Context context) { if (zzamy.zzbl(context) && !zzamy.zzsk()) { zzakb.zzdj("Updating ad debug logging enablement."); zzanm.zza((zzanz) new zzaka(context).zznt(), "AdDebugLogUpdater.updateEnablement"); } } }
[ "66115754+Minionguyjpro@users.noreply.github.com" ]
66115754+Minionguyjpro@users.noreply.github.com
57d0bf403d5298e30627d998c5c9bf61e1fc401b
c4fc44747591d09c91870f6547b4258d4a73cdf2
/src/vate/org/vash/vate/server/console/local/standard/command/VTLOCK.java
b6173e1edeab94f6ffe9b7dee10da347b3c2f07f
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
wknishio/variable-terminal
2c3aa7a182662df5c13e026471338d43142690a7
83eedc7ed37fed6859a5ed3355aa3685ed589f1a
refs/heads/master
2023-09-03T11:11:24.946980
2023-09-02T15:29:05
2023-09-02T15:29:05
37,862,908
1
0
null
null
null
null
UTF-8
Java
false
false
1,118
java
package org.vash.vate.server.console.local.standard.command; import org.vash.vate.console.VTConsole; import org.vash.vate.help.VTHelpManager; import org.vash.vate.server.console.local.standard.VTServerStandardLocalConsoleCommandProcessor; public class VTLOCK extends VTServerStandardLocalConsoleCommandProcessor { public VTLOCK() { this.setFullName("*VTLOCK"); this.setAbbreviatedName("*VTLK"); this.setFullSyntax("*VTLOCK <USER/PASS>"); this.setAbbreviatedSyntax("*VTLK <US/PW>"); } public void execute(String command, String[] parsed) throws Exception { if (parsed.length >= 2 && parsed[1].contains("/")) { int idx = parsed[1].indexOf('/'); String user = parsed[1].substring(0, idx); String password = parsed[1].substring(idx + 1); server.setUniqueUserCredential(user, password); VTConsole.print("\rVT>Single credential set!\nVT>"); } else { VTConsole.print("\rVT>Invalid command syntax!" + VTHelpManager.getHelpForServerCommand(parsed[0])); } } public void close() { } }
[ "wknishio@gmail.com" ]
wknishio@gmail.com
8122446cc9823653fc0611f5b4bd3f1d8ad06967
f553ee5889c9876d3c1356ce6461651dcf26bcc9
/src/de/christopherstock/shooter/game/bot/BotFactory.java
edd59ddb9d611069f9ef973652a208e0f48afb4c
[]
no_license
christopherstock/GC_LWJGL_J2SE_3dShooter
08885a706d35b5c317aea327c24b66510ec8c15e
2741f26820f9d7f4ac5738088138055917b20b05
refs/heads/master
2021-05-16T03:15:16.607331
2018-03-14T07:27:50
2018-03-14T07:27:50
34,397,885
1
0
null
null
null
null
UTF-8
Java
false
false
6,380
java
/* $Id: ShooterBotFactory.java 1275 2014-07-02 06:16:12Z jenetic.bytemare $ * ======================================================================================= */ package de.christopherstock.shooter.game.bot; import java.awt.geom.*; import de.christopherstock.lib.g3d.*; import de.christopherstock.lib.math.*; import de.christopherstock.shooter.game.artefact.Artefact; import de.christopherstock.shooter.game.artefact.ArtefactType; import de.christopherstock.shooter.game.objects.*; import de.christopherstock.shooter.game.objects.Bot.*; /************************************************************************************** * The superclass of all non-player-characters. * * @author Christopher Stock * @version 0.3.11 **************************************************************************************/ public class BotFactory { public static enum Glasses { ENever, EAlways, ESometimes, EOften, ; } public static enum Hat { ENever, EAlways, ESometimes, EOften, ; } public static enum BotKind { EUnitSecurity( Glasses.ENever, Hat.ENever, BotSkinType.SET_NORTH_EUROPEAN, BotBodyType.values() ), EUnitPilot( Glasses.EAlways, Hat.EAlways, BotSkinType.SET_SOUTH_EUROPEAN, BotBodyType.values() ), EUnitSpecialForces( Glasses.ESometimes, Hat.ESometimes, BotSkinType.SET_NORTH_AFRICAN, BotBodyType.values() ), EUnitOfficeEmployee( Glasses.EOften, Hat.ENever, BotSkinType.SET_NORTH_EUROPEAN, BotBodyType.values() ), ; public BotSkinType[] iSkinTypes = null; public BotBodyType[] iBodyTypes = null; public Glasses iGlasses = null; public Hat iHat = null; private BotKind( Glasses aGlasses, Hat aHat, BotSkinType[] aSkinTypes, BotBodyType[] aBodyTypes ) { iGlasses = aGlasses; iHat = aHat; iSkinTypes = aSkinTypes; iBodyTypes = aBodyTypes; } } private BotKind iKind = null; private LibVertex iAnchor = null; private float iFacingAngle = 0.0f; private BotAction[] iActions = null; private int iID = 0; public BotFactory( int aID, BotKind aKind, LibVertex aAnchor, float aFacingAngle, BotAction[] aActions ) { iKind = aKind; iAnchor = aAnchor; iFacingAngle = aFacingAngle; iActions = aActions; iID = aID; } public final Bot createBot() { switch ( iKind ) { case EUnitOfficeEmployee: { switch ( LibMath.getRandom( 0, 3 ) ) { default: return new Bot( new BotPattern( BotPatternBase.EOfficeEmployee1, iKind ), Bot.BotType.ETypeFriend, iAnchor, null, BotJob.EStandStill, null, iFacingAngle, iActions, BotHealth.ECivilian, iID, BotHanded.ERightHanded ); } //break; } case EUnitSecurity: { switch ( LibMath.getRandom( 0, 1 ) ) { case 0: return new Bot( new BotPattern( BotPatternBase.ESecurityLight, iKind ), Bot.BotType.ETypeEnemy, iAnchor, null, BotJob.EAttackPlayerFire, new Artefact[] { new Artefact( ArtefactType.ESpaz12 ) }, iFacingAngle, iActions, BotHealth.ESecurity, iID, BotHanded.ERightHanded ); case 1: return new Bot( new BotPattern( BotPatternBase.ESecurityHeavy, iKind ), Bot.BotType.ETypeEnemy, iAnchor, null, BotJob.EAttackPlayerFire, new Artefact[] { new Artefact( ArtefactType.ESpaz12 ) }, iFacingAngle, iActions, BotHealth.ESecurity, iID, BotHanded.ERightHanded ); } break; } case EUnitPilot: { switch ( LibMath.getRandom( 0, 1 ) ) { case 0: return new Bot( new BotPattern( BotPatternBase.EPilot1, iKind ), Bot.BotType.ETypeFriend, iAnchor, new Point2D.Float[] { new Point2D.Float( 7.0f, 4.0f ), new Point2D.Float( 7.0f, 10.0f ), }, BotJob.EWalkWaypoints, new Artefact[] { new Artefact( ArtefactType.ESpaz12 ) }, iFacingAngle, iActions, BotHealth.ECivilian, iID, BotHanded.ERightHanded ); case 1: return new Bot( new BotPattern( BotPatternBase.EPilot1, iKind ), Bot.BotType.ETypeFriend, iAnchor, new Point2D.Float[] { new Point2D.Float( 7.0f, 4.0f ), new Point2D.Float( 7.0f, 10.0f ), }, BotJob.EWalkWaypoints, new Artefact[] { new Artefact( ArtefactType.ESpaz12 ) }, iFacingAngle, iActions, BotHealth.ECivilian, iID, BotHanded.ERightHanded ); } break; } case EUnitSpecialForces: { switch ( LibMath.getRandom( 0, 1 ) ) { case 0: return new Bot( new BotPattern( BotPatternBase.ESpecialForces, iKind ), Bot.BotType.ETypeFriend, iAnchor, null, BotJob.EWatchPlayer, new Artefact[] { new Artefact( ArtefactType.ESpaz12 ) }, iFacingAngle, iActions, BotHealth.EPrivateSoldier, iID, BotHanded.ERightHanded ); case 1: return new Bot( new BotPattern( BotPatternBase.ESpecialForces, iKind ), Bot.BotType.ETypeFriend, iAnchor, null, BotJob.EWatchPlayer, new Artefact[] { new Artefact( ArtefactType.ESpaz12 ) }, iFacingAngle, iActions, BotHealth.EPrivateSoldier, iID, BotHanded.ERightHanded ); } break; } } return null; } }
[ "email@christopherstock.de" ]
email@christopherstock.de
0dd8d62c0ee7b8728ed8f5338be43d5bc94747e5
3c8f8900a95ddb488947858c385d1629d4ea0155
/src/main/java/com/zzx/graduate/entity/AttachFile.java
3ab34c84bdcd4b9afdc7a5c61639a1e676776de4
[]
no_license
Glacier759/Student-Manager
8e5dbdcd1741d66708797a619b1745d8d5b3039a
2f945b7b76937ff92d43b88e1d06e8a48ab026c8
refs/heads/master
2016-09-11T01:53:47.543670
2015-05-24T08:10:22
2015-05-24T08:10:22
35,598,224
2
1
null
null
null
null
UTF-8
Java
false
false
2,436
java
package com.zzx.graduate.entity; import com.zzx.graduate.util.StreamUtil; import org.apache.commons.io.FileUtils; import org.apache.log4j.Logger; import sun.swing.FilePane; import java.io.*; /** * Created by glacier on 15-5-17. */ public class AttachFile implements Serializable { private static Logger logger = Logger.getLogger(AttachFile.class.getName()); private String fileName; private byte[] fileBytes; public AttachFile() { } public AttachFile(File attachFile) { try { this.fileName = attachFile.getName(); this.fileBytes = StreamUtil.toByteArray(FileUtils.openInputStream(attachFile)); }catch (Exception e) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); e.printStackTrace(new PrintStream(baos)); logger.error(baos.toString()); } } public AttachFile(String fileName, byte[] fileBytes) { this.fileName = fileName; this.fileBytes = fileBytes; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public byte[] getFileBytes() { return fileBytes; } public void setFileBytes(byte[] fileBytes) { this.fileBytes = fileBytes; } public String toFile() { try { String path_dir = "./tmp/download_file/"; String path = path_dir + fileName; File tmpFile = new File(path); if ( !tmpFile.exists() ) { new File(path_dir).mkdirs(); tmpFile.createNewFile(); } FileUtils.writeByteArrayToFile(new File(path), fileBytes); return (new File(".").getAbsolutePath()); }catch (Exception e) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); e.printStackTrace(new PrintStream(baos)); logger.error(baos.toString()); } return null; } public void delFile(String path) { try { File tmpFile = new File(path); if ( !tmpFile.exists() ) return; else tmpFile.delete(); }catch (Exception e) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); e.printStackTrace(new PrintStream(baos)); logger.error(baos.toString()); } } }
[ "OurHom.759@gmail.com" ]
OurHom.759@gmail.com
31a6d9008ee1e47c660fadcfba1dde80806889c9
bab3327562d43f1a8082cf30888409163cc7601c
/src/main/java/com/sissi/server/tls/impl/CertificateContextBuilder.java
8c7efdc71c44b649312995667da898893592a8e6
[ "Apache-2.0" ]
permissive
wzl4022561/sissi
e451386447ff79e3963aa4a749b3e0f60e3316d6
7b3a2bb73c8da058dd8118811b4ad76d93b89d33
refs/heads/master
2021-01-13T15:18:39.560354
2015-05-21T01:22:51
2015-05-21T01:22:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,260
java
package com.sissi.server.tls.impl; import java.io.InputStream; import java.security.KeyStore; import javax.net.ssl.KeyManager; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.sissi.commons.Trace; import com.sissi.commons.apache.IOUtil; import com.sissi.server.tls.SSLContextBuilder; /** * @author kim 2013年12月18日 */ public class CertificateContextBuilder implements SSLContextBuilder { private final String protocol = "TLS"; private final String keystore = "jks"; private final Log log = LogFactory.getLog(this.getClass()); private final SSLContext context; public CertificateContextBuilder(Certificate key, Certificate trust) { super(); this.context = this.build(key, trust); } @Override public SSLContext build() { return this.context; } private SSLContext build(Certificate key, Certificate trust) { try { SSLContext context = SSLContext.getInstance(this.protocol); context.init(this.getKeyManagers(key), this.getTrustManagers(trust), null); return context; } catch (Exception e) { this.log.fatal(e.toString()); Trace.trace(this.log, e); return null; } } private KeyManager[] getKeyManagers(Certificate key) throws Exception { KeyManagerFactory factory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); InputStream certificate = key.getFile().openStream(); try { KeyStore ks = KeyStore.getInstance(this.keystore); ks.load(certificate, key.getPassword()); factory.init(ks, key.getPassword()); } finally { IOUtil.closeQuietly(certificate); } return factory.getKeyManagers(); } private TrustManager[] getTrustManagers(Certificate trust) throws Exception { TrustManagerFactory factory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); InputStream certificate = trust.getFile().openStream(); try { KeyStore ks = KeyStore.getInstance(this.keystore); ks.load(certificate, trust.getPassword()); factory.init(ks); } finally { IOUtil.closeQuietly(certificate); } return factory.getTrustManagers(); } }
[ "sjw_job@126.com" ]
sjw_job@126.com
1c1eeab311f33194719930b45d35cc82271ad0be
c51e5561abb2b3df4608c4d2d9325c4362d2c089
/crm/src/main/java/com/pl/airboss/crm/product/dao/ProductBeanMapper.java
aa86858f346954de63a7a65326629f1f970319a0
[]
no_license
kodw38/airboss
3c08d9b6edd567966947840b771215cf1f5fa423
c30aa83dc29b12172cb459b7c615ca23c39acf84
refs/heads/master
2023-01-05T18:45:42.289703
2020-10-31T13:22:35
2020-10-31T13:22:35
293,515,746
0
1
null
null
null
null
UTF-8
Java
false
false
933
java
package com.pl.airboss.crm.product.dao; import com.pl.airboss.crm.ac.bean.FeeInterfaceBean; import com.pl.airboss.crm.product.bean.ProductBean; import com.pl.airboss.crm.product.bean.ProductBeanKey; import com.pl.airboss.crm.product.bean.ProductInfo; import com.pl.airboss.crm.product.bean.ServiceBean; import org.apache.ibatis.annotations.Param; import java.util.List; public interface ProductBeanMapper { int deleteByPrimaryKey(Integer key); int insert(ProductBean record); int insertSelective(ProductBean record); ProductBean selectByPrimaryKey(Integer key); int updateByPrimaryKeySelective(ProductBean record); int updateByPrimaryKeyWithBLOBs(ProductBean record); int updateByPrimaryKey(ProductBean record); List<ProductInfo> selectProductInfo(); List<ServiceBean> selectServices(@Param("prodId") Integer prodId); List<FeeInterfaceBean> selectFeeListByProductId(Long prodId); }
[ "kodw38@126.com" ]
kodw38@126.com
82d59f9b0b76e2a0d8cd6081616f47a698e222de
ff2683777d02413e973ee6af2d71ac1a1cac92d3
/src/main/java/com/alipay/api/response/KoubeiCateringPosPaymodesortModifyResponse.java
b635528f62684e7c82a30188d6dd1836fcb55c21
[ "Apache-2.0" ]
permissive
weizai118/alipay-sdk-java-all
c30407fec93e0b2e780b4870b3a71e9d7c55ed86
ec977bf06276e8b16c4b41e4c970caeaf21e100b
refs/heads/master
2020-05-31T21:01:16.495008
2019-05-28T13:14:39
2019-05-28T13:14:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
387
java
package com.alipay.api.response; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.catering.pos.paymodesort.modify response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class KoubeiCateringPosPaymodesortModifyResponse extends AlipayResponse { private static final long serialVersionUID = 2541482362814461794L; }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
f1c15d1efb14efeaf6263e1f17f109930dff991f
1c8df5231969cf1f6bc51e3f09b5bd2582b6ab4a
/src/com/attilax/designpatter/commandPkg/Command.java
9cd4fe907fe71ca9f8e8b9e4300d3f705f33bec9
[]
no_license
attilax/wechat4property
5225d10045b000f93ff8fb30384ba8df3439d676
c1a220736346c24d97e46bc69042fe249db10a3d
refs/heads/master
2016-09-06T02:26:57.496151
2015-03-02T17:14:00
2015-03-02T17:14:00
31,132,960
0
0
null
null
null
null
UTF-8
Java
false
false
847
java
/** * */ package com.attilax.designpatter.commandPkg; import java.util.HashMap; import java.util.Map; import com.attilax.Closure; import com.attilax.ClosureNoExcpt; import com.attilax.Closure2; /** * @author ASIMO * */ public class Command { public static Map<String,Closure2> mp=new HashMap<String, Closure2>(); String key; /** * @param string */ public Command(String string) { key=string; } /** @author attilax 老哇的爪子 * @return @since ob2 m_s_54 */ public Object execute() { Closure2 cls=(Closure2) mp.get(key); return cls.execute(""); } /** @author attilax 老哇的爪子 @since ob2 m_37_0 */ public static void reg(String key, Closure2 closure_RE) { mp.put(key, closure_RE); } //public }
[ "1466519819@qq.com" ]
1466519819@qq.com
9add461ec23dbbdb57ca50eafd259668a93d304b
f9456e29108a59df11fb4c2cd63853fa781391e6
/src/main/java/org/txazo/java/collection/map/TreeMapTest.java
79ff090b671ee7ec7883c2a475143f0d636335f4
[ "Apache-2.0" ]
permissive
txazo/java
5a974d9fbc589e9744b0e3bf2f03723468388a25
d3e9b20ee98c890bfaa464140554961d9850a06d
refs/heads/master
2022-12-25T14:58:34.752341
2021-09-16T14:41:21
2021-09-16T14:41:21
62,528,396
0
1
Apache-2.0
2022-12-10T03:27:23
2016-07-04T03:19:02
Java
UTF-8
Java
false
false
185
java
package org.txazo.java.collection.map; /** * TreeMap * <p> * 1) 有序的Map, 通过红黑树实现 * 2) Entry: parent left right key value color */ public class TreeMapTest { }
[ "784990655@qq.com" ]
784990655@qq.com
63edcd253c50ce898fe4a6672119d632a7ee36a1
ac214152e069ba09f108db6bfb6bb4db0da75933
/app/src/main/java/com/Wsdl2Code/WebServices/WSAmandaService/completeFolderResponse.java
fc71a763c5442befc103ab400ba00f223d93d313
[]
no_license
bapisth/ST
9783028650f4ff8593e4970898356745d5ca6d29
66f2c4f13e2bfe3bcc6c989e5b39833d72c0650b
refs/heads/master
2021-01-10T13:20:28.079785
2016-01-27T05:57:38
2016-01-27T05:57:38
50,485,308
0
0
null
null
null
null
UTF-8
Java
false
false
2,076
java
package com.Wsdl2Code.WebServices.WSAmandaService; //------------------------------------------------------------------------------ // <wsdl2code-generated> // This code was generated by http://www.wsdl2code.com version 2.6 // // Date Of Creation: 1/24/2016 9:16:23 PM // Please dont change this code, regeneration will override your changes //</wsdl2code-generated> // //------------------------------------------------------------------------------ // //This source code was auto-generated by Wsdl2Code Version // import com.Wsdl2Code.WebServices.WSAmandaService.wsFolder; import com.Wsdl2Code.WebServices.WSAmandaService.KvmSerializable_ws; import org.ksoap2.serialization.PropertyInfo; import java.util.Hashtable; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapPrimitive; public class completeFolderResponse implements KvmSerializable_ws { public wsFolder returnField; public completeFolderResponse(){} public completeFolderResponse(SoapObject soapObject) { if (soapObject == null) return; if (soapObject.hasProperty("return")) { SoapObject j = (SoapObject)soapObject.getProperty("return"); returnField = new wsFolder (j); } } @Override public Object getProperty(int arg0) { switch(arg0){ case 0: return returnField; } return null; } @Override public int getPropertyCount() { return 1; } @Override public void getPropertyInfo(int index, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo info) { switch(index){ case 0: info.type = wsFolder.class; info.name = "return"; break; } } @Override public String getInnerText() { return null; } @Override public void setInnerText(String s) { } @Override public void setProperty(int arg0, Object arg1) { } }
[ "hemendra7011@rediffmail.com" ]
hemendra7011@rediffmail.com
800cf1877ce781bb333c56346970e93c62322752
e6e4f73f4558eb0721425379087095ad911c3b6f
/JavaBeginner/src/classwork160414/StringPool.java
996a0bce7fbdead155051235ae5387f8f6e3340d
[]
no_license
zstudent/JavaForBeginnersSpring2016
50822f0eb3580023e4d313cffdba18e4fa36ddad
2c95ed08296a3cdeb62d033fceb6da2aed7f6ff0
refs/heads/master
2021-05-31T09:05:25.402249
2016-05-12T19:08:23
2016-05-12T19:08:23
53,066,757
0
1
null
null
null
null
UTF-8
Java
false
false
318
java
package classwork160414; public class StringPool { public static void main(String[] args) { String name = "Mike"; String name2 = "Mike"; String name3 = new String("Mike"); System.out.println(name == name2); System.out.println(name == name3); System.out.println(name.equals(name3)); } }
[ "Zaal_Lyanov@epam.com" ]
Zaal_Lyanov@epam.com
62050ae7edfaab9359baaa1b71e0ba5d668eda8a
c8c34ec8a09d19b9e9c62f4e1222845dd7659d68
/src/test/java/org/agilewiki/jid/scalar/vlens/actor/RootJidTest.java
19b99bf0e505388c0babbffaa4251c0e998e5bba
[]
no_license
macrohuang/JID
41e8362ea9dda828476ea273b4b55141af176634
1abf7f41a222a6d5365e2916b3998f27b397d098
refs/heads/master
2021-01-18T07:19:52.882987
2012-05-05T06:00:44
2012-05-05T06:00:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,463
java
package org.agilewiki.jid.scalar.vlens.actor; import junit.framework.TestCase; import org.agilewiki.jactor.Actor; import org.agilewiki.jactor.JAFuture; import org.agilewiki.jactor.JAMailboxFactory; import org.agilewiki.jactor.MailboxFactory; import org.agilewiki.jid.*; import org.agilewiki.jid.scalar.vlens.Clear; import org.agilewiki.jid.scalar.vlens.string.GetString; import org.agilewiki.jid.scalar.vlens.string.SetString; import org.agilewiki.jid.scalar.vlens.string.StringJidFactory; public class RootJidTest extends TestCase { public void test() { MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1); try { JAFuture future = new JAFuture(); Actor factory = new JidFactories(mailboxFactory.createMailbox()); factory.setParent(null); RootJidFactory rootJidFactory = new RootJidFactory(); Actor rootJid1 = rootJidFactory.newActor(factory.getMailbox(), factory); int sl = GetSerializedLength.req.send(future, rootJid1); assertEquals(0, sl); Clear.req.send(future, rootJid1); sl = GetSerializedLength.req.send(future, rootJid1); assertEquals(0, sl); Actor rootJid1a = GetActor.req.send(future, rootJid1); assertNull(rootJid1a); Actor rpa = (new ResolvePathname("")).send(future, rootJid1); assertNotNull(rpa); assertEquals(rpa, rootJid1); rpa = (new ResolvePathname("0")).send(future, rootJid1); assertNull(rpa); Actor rootJid11 = (new CopyJID()).send(future, rootJid1); assertNotNull(rootJid11); sl = GetSerializedLength.req.send(future, rootJid11); assertEquals(0, sl); rpa = (new ResolvePathname("")).send(future, rootJid11); assertNotNull(rpa); assertEquals(rpa, rootJid11); rpa = (new ResolvePathname("0")).send(future, rootJid11); assertNull(rpa); StringJidFactory stringJidAFactory = StringJidFactory.fac; Actor string1 = stringJidAFactory.newActor(factory.getMailbox(), factory); (new SetString("abc")).send(future, string1); byte[] sb = GetSerializedBytes.req.send(future, string1); (new SetActorBytes(stringJidAFactory, sb)).send(future, rootJid1); Actor sj = GetActor.req.send(future, rootJid1); assertEquals("abc", GetString.req.send(future, sj)); Actor rootJid2 = RootJidFactory.fac.newActor(factory.getMailbox(), factory); sl = GetSerializedLength.req.send(future, rootJid2); assertEquals(0, sl); SetActor sjvj = new SetActor(JidFactories.JID_TYPE); sjvj.send(future, rootJid2); MakeActor mjvj = new MakeActor(JidFactories.JID_TYPE); boolean made = mjvj.send(future, rootJid2); assertEquals(false, made); Actor jidJid2a = GetActor.req.send(future, rootJid2); assertNotNull(jidJid2a); sl = GetSerializedLength.req.send(future, jidJid2a); assertEquals(0, sl); sl = GetSerializedLength.req.send(future, rootJid2); assertEquals(10, sl); rpa = (new ResolvePathname("")).send(future, rootJid2); assertNotNull(rpa); assertEquals(rpa, rootJid2); rpa = (new ResolvePathname("0")).send(future, rootJid2); assertNotNull(rpa); assertEquals(rpa, jidJid2a); Actor rootJid22 = (new CopyJID()).send(future, rootJid2); Clear.req.send(future, rootJid2); sl = GetSerializedLength.req.send(future, rootJid2); assertEquals(0, sl); jidJid2a = GetActor.req.send(future, rootJid2); assertNull(jidJid2a); assertNotNull(rootJid22); sl = GetSerializedLength.req.send(future, rootJid22); assertEquals(10, sl); rpa = (new ResolvePathname("")).send(future, rootJid22); assertNotNull(rpa); assertEquals(rpa, rootJid22); rpa = (new ResolvePathname("0")).send(future, rootJid22); assertNotNull(rpa); sl = GetSerializedLength.req.send(future, rpa); assertEquals(0, sl); } catch (Exception e) { e.printStackTrace(); } finally { mailboxFactory.close(); } } }
[ "laforge49@gmail.com" ]
laforge49@gmail.com
38d8970ce8d8aaf2da85493c9221b2745eaefaa6
3aa8c052fe73d6949c39c4391db3ff4de20e8722
/discovery-springcloud-example-service/src/main/java/com/nepxion/discovery/plugin/example/service/impl/MyRegisterListener.java
faf82814dbcd74c2c95b2a24224cbb5a23702a5e
[ "Apache-2.0" ]
permissive
xyyz150/Discovery
c5da66e3d34904a1566ea6821211776bce126eaf
999ecc03f9b0c29ef676b411ea41bdfb48fbfa93
refs/heads/master
2020-06-03T21:24:50.665612
2019-06-13T08:55:53
2019-06-13T08:55:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,451
java
package com.nepxion.discovery.plugin.example.service.impl; /** * <p>Title: Nepxion Discovery</p> * <p>Description: Nepxion Discovery</p> * <p>Copyright: Copyright (c) 2017-2050</p> * <p>Company: Nepxion</p> * @author Haojun Ren * @version 1.0 */ import org.apache.commons.lang3.StringUtils; import org.springframework.cloud.client.serviceregistry.Registration; import com.nepxion.discovery.common.constant.DiscoveryConstant; import com.nepxion.discovery.common.exception.DiscoveryException; import com.nepxion.discovery.plugin.framework.listener.register.AbstractRegisterListener; // 当元数据中的group为mygroup1,禁止注册 public class MyRegisterListener extends AbstractRegisterListener { @Override public void onRegister(Registration registration) { String serviceId = registration.getServiceId().toLowerCase(); String group = registration.getMetadata().get(DiscoveryConstant.GROUP); if (StringUtils.equals(group, "mygroup1")) { throw new DiscoveryException("服务名=" + serviceId + ",组名=" + group + "的服务不允许被注册到注册中心"); } } @Override public void onDeregister(Registration registration) { } @Override public void onSetStatus(Registration registration, String status) { } @Override public void onClose() { } @Override public int getOrder() { return LOWEST_PRECEDENCE - 1; } }
[ "1394997@qq.com" ]
1394997@qq.com
009fbccf63644b5048a394bb7cd6a966501ef242
4b321bc5dd32cb7bbfb5451b475432a55066053a
/src/_module3/les_30_170123/_3_6_2_where_to_write_new/Machine.java
bc7704cd62f80b5db1ae4814e04c1fe8035c55ba
[]
no_license
Golovko-Vitalii/Java-1-course
ae3888fbd996f473fb39552fe4625715b916f338
aee48538c0c4173c81cf3211e1e513c08c562abe
refs/heads/master
2021-01-22T05:42:26.623550
2017-05-26T07:59:52
2017-05-26T07:59:52
92,486,819
0
0
null
null
null
null
UTF-8
Java
false
false
278
java
package _module3.les_30_170123._3_6_2_where_to_write_new; public class Machine { String name; int year; String color; public Machine(String name, int year, String color) { this.name = name; this.year = year; this.color = color; } }
[ "golovko.inc@gmail.com" ]
golovko.inc@gmail.com
95773aed36bca459e6407f05f9367d312e3d4778
7a58d08e242b6dc28e9ba9a61865275353883423
/src/thinkinjava/chapter10_innerclasses/AnonymousConstructor.java
341b087ce3208e572d741b3a19177f5e03e3f529
[]
no_license
zjxht62/learnJava
8bcf10dc7ee4f6ad001983273a22a76f55870de2
f25357ce44b82aeb2560688bb66a74851fbe51f0
refs/heads/master
2022-01-21T04:17:23.288413
2022-01-17T06:11:37
2022-01-17T06:11:37
210,154,936
0
0
null
null
null
null
UTF-8
Java
false
false
701
java
package thinkinjava.chapter10_innerclasses; /** * Demo class * * @author trevor.zhao * @date 2020/7/27 */ abstract class Base { public Base(int i) { System.out.println("Base constructor. i = " + i); } public abstract void f(); } public class AnonymousConstructor { public static Base getBase(int i) { return new Base(i) { { System.out.println("Inside instance initializer"); } @Override public void f() { System.out.println("In anonymous f()"); } }; } public static void main(String[] args) { Base base = getBase(47); base.f(); } }
[ "zhao_ji_xiang@126.com" ]
zhao_ji_xiang@126.com
6cf12b7d6a1ce2b4839f4b0bffde3b432ee1999f
ca0e9689023cc9998c7f24b9e0532261fd976e0e
/src/com/tencent/mm/protocal/b/alp.java
61d39c53b92db7d3a109e601eae2283447044b98
[]
no_license
honeyflyfish/com.tencent.mm
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
ce6e605ff98164359a7073ab9a62a3f3101b8c34
refs/heads/master
2020-03-28T15:42:52.284117
2016-07-19T16:33:30
2016-07-19T16:33:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,924
java
package com.tencent.mm.protocal.b; import java.util.LinkedList; public final class alp extends alt { public String atU; public String cMk; public int kfh; public double latitude; public double longitude; protected final int a(int paramInt, Object... paramVarArgs) { if (paramInt == 0) { paramVarArgs = (a.a.a.c.a)paramVarArgs[0]; if (kfq != null) { paramVarArgs.cx(1, kfq.iO()); kfq.a(paramVarArgs); } paramVarArgs.a(2, longitude); paramVarArgs.a(3, latitude); paramVarArgs.cw(4, kfh); if (cMk != null) { paramVarArgs.e(5, cMk); } if (atU != null) { paramVarArgs.e(6, atU); } return 0; } if (paramInt == 1) { if (kfq == null) { break label496; } } label496: for (paramInt = a.a.a.a.cv(1, kfq.iO()) + 0;; paramInt = 0) { int i = paramInt + (a.a.a.b.b.a.aQ(2) + 8) + (a.a.a.b.b.a.aQ(3) + 8) + a.a.a.a.cu(4, kfh); paramInt = i; if (cMk != null) { paramInt = i + a.a.a.b.b.a.f(5, cMk); } i = paramInt; if (atU != null) { i = paramInt + a.a.a.b.b.a.f(6, atU); } return i; if (paramInt == 2) { paramVarArgs = new a.a.a.a.a((byte[])paramVarArgs[0], jrk); for (paramInt = alt.a(paramVarArgs); paramInt > 0; paramInt = alt.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.bve(); } } break; } if (paramInt == 3) { Object localObject1 = (a.a.a.a.a)paramVarArgs[0]; alp localalp = (alp)paramVarArgs[1]; paramInt = ((Integer)paramVarArgs[2]).intValue(); switch (paramInt) { default: return -1; case 1: paramVarArgs = ((a.a.a.a.a)localObject1).vC(paramInt); i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { Object localObject2 = (byte[])paramVarArgs.get(paramInt); localObject1 = new df(); localObject2 = new a.a.a.a.a((byte[])localObject2, jrk); for (boolean bool = true; bool; bool = ((df)localObject1).a((a.a.a.a.a)localObject2, (com.tencent.mm.ax.a)localObject1, alt.a((a.a.a.a.a)localObject2))) {} kfq = ((df)localObject1); paramInt += 1; } case 2: longitude = mMY.readDouble(); return 0; case 3: latitude = mMY.readDouble(); return 0; case 4: kfh = mMY.id(); return 0; case 5: cMk = mMY.readString(); return 0; } atU = mMY.readString(); return 0; } return -1; } } } /* Location: * Qualified Name: com.tencent.mm.protocal.b.alp * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
2f1aaf657b72cd47d036d04c7c18166b2cbbdd57
fde1dd452fef4a08fbdb097dce90878b3f92f611
/src/mc/alk/arena/objects/ArenaCommandSign.java
8fbd42f1201c222ec7a22c741e5ecbabd4e1f106
[]
no_license
ToxicDeath/BattleArena
3b1e25ffabbc7586449fd2a9f850acc35d22f766
03050fc2d1136b63998284c9a3eac9012763ee43
refs/heads/master
2021-01-18T09:33:10.408239
2012-10-22T16:11:10
2012-10-22T16:11:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,579
java
package mc.alk.arena.objects; import mc.alk.arena.BattleArena; import mc.alk.arena.competition.events.Event; import mc.alk.arena.controllers.EventController; import mc.alk.arena.executors.BAExecutor; import mc.alk.arena.executors.EventExecutor; import mc.alk.arena.util.SignUtil.ARENA_COMMAND; public class ArenaCommandSign { MatchParams mp; ARENA_COMMAND command; String options1; String options2; public ArenaCommandSign(MatchParams mp, ARENA_COMMAND cmd, String op1, String op2) { this.mp = mp; this.command = cmd; this.options1 = op1; this.options2 = op2; } public void performAction(ArenaPlayer player) { if (mp instanceof EventParams){ performEventAction(player); } else { performMatchAction(player); } } private void performMatchAction(ArenaPlayer player) { BAExecutor executor = BattleArena.getBAExecutor(); String args[] = {options1,options2}; switch (command){ case JOIN: executor.join(player, mp, args, true); break; case LEAVE: executor.leave(player); break; case START: break; } } private void performEventAction(ArenaPlayer player) { Event event = EventController.getEvent(mp.getName()); EventExecutor executor = EventController.getEventExecutor(event); // String args[] = {options1,options2}; switch (command){ case JOIN: executor.eventJoin(player); break; case LEAVE: executor.leave(player); break; case START: // executor.start(); break; } } public MatchParams getMatchParams() { return mp; } public ARENA_COMMAND getCommand() { return command; } }
[ "alkarin.v@gmail.com" ]
alkarin.v@gmail.com
7dab44be87fad5bb30969127f80974f587c2423a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/22/22_fe049e8043385881f94a651c700f8c6018952591/MenuLoggedDescriptor/22_fe049e8043385881f94a651c700f8c6018952591_MenuLoggedDescriptor_t.java
6bf6d918a6aebd0a0d34d9577c87a79419040ce7
[]
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,556
java
/* * * Copyright (C) 2007-2012 The kune development team (see CREDITS for details) * This file is part of kune. * * This program 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 cc.kune.gspace.client.actions; import cc.kune.common.client.actions.ui.descrip.MenuDescriptor; import cc.kune.core.client.events.AccessRightsChangedEvent; import cc.kune.core.client.events.AccessRightsChangedEvent.AccessRightsChangedHandler; import cc.kune.core.client.state.AccessRightsClientManager; public class MenuLoggedDescriptor extends MenuDescriptor { public MenuLoggedDescriptor(final AccessRightsClientManager rightsManager) { rightsManager.onRightsChanged(true, new AccessRightsChangedHandler() { @Override public void onAccessRightsChanged(final AccessRightsChangedEvent event) { MenuLoggedDescriptor.this.setVisible(event.getCurrentRights().isVisible()); } }); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
286062e6272755c989ad7b7e4e78a17449c967c3
46d45bce8a6ea195426831d822a4d1a97dc684ae
/src/main/java/com/looseboxes/msofficekiosk/functions/GetEncryption.java
25dafdce89719d12c2907b378c7059d3d56f206e
[]
no_license
poshjosh/msofficekiosk
0f0e7a1fa8e4355174ea56a28dc4d225ac8d11cf
2ec7280c84a085f66d9d406139154ae4af23523f
refs/heads/master
2020-08-31T23:35:23.368043
2019-10-31T18:09:36
2019-10-31T18:09:36
218,815,649
0
0
null
null
null
null
UTF-8
Java
false
false
2,145
java
/* * Copyright 2018 NUROX Ltd. * * Licensed under the NUROX Ltd Software License (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.looseboxes.com/legal/licenses/software.html * * 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.looseboxes.msofficekiosk.functions; import com.bc.security.Encryption; import com.bc.security.SecurityProvider; import com.looseboxes.msofficekiosk.AppContext; import java.security.GeneralSecurityException; import java.util.function.Function; import com.looseboxes.msofficekiosk.config.ConfigNames; import com.bc.config.Config; import java.util.Properties; import com.looseboxes.msofficekiosk.config.ConfigService; /** * @author Chinomso Bassey Ikwuagwu on May 12, 2018 8:57:56 PM */ public class GetEncryption implements Function<AppContext, Encryption> { @Override public Encryption apply(AppContext context) { try{ return this.getOrException(context); }catch(GeneralSecurityException e) { throw new RuntimeException(e); } } public Encryption get(AppContext context, Encryption outputIfNone) { try{ return this.getOrException(context); }catch(GeneralSecurityException ignored) { return outputIfNone; } } public Encryption getOrException(AppContext context) throws GeneralSecurityException { final Config<Properties> config = context.getConfig(ConfigService.APP_INTERNAL); final String algorithm = config.getString(ConfigNames.SECURITY_ALGORITHM); final String encryptionKey = config.getString(ConfigNames.SECURITY_ENCRYPTIONKEY); final Encryption encryption = SecurityProvider.DEFAULT.getEncryption(algorithm, encryptionKey); return encryption; } }
[ "posh.bc@gmail.com" ]
posh.bc@gmail.com
4b44f2dab1091d9b73a4fd8d53ce0332a8357837
53ac24f186c016ed66dcc951d7332dc41b52789c
/src/main/java/com/zelish/web/rest/vm/ManagedUserVM.java
b7f821ee3cfa9763035c8f845ad390bf9a36b180
[]
no_license
ramanathnayak/Zelish
960a12e8fb4a7ea9fff0eab1d7d52955049b3af1
d3856cd904f581122bb625d1a763529e4dff0da3
refs/heads/master
2020-06-28T23:39:41.553226
2019-08-03T13:36:25
2019-08-03T13:36:25
200,373,221
0
0
null
2020-04-04T21:36:49
2019-08-03T12:30:03
Java
UTF-8
Java
false
false
414
java
package com.zelish.web.rest.vm; import com.zelish.service.dto.UserDTO; /** * View Model extending the UserDTO, which is meant to be used in the user management UI. */ public class ManagedUserVM extends UserDTO { public ManagedUserVM() { // Empty constructor needed for Jackson. } @Override public String toString() { return "ManagedUserVM{" + super.toString() + "} "; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
6f4b3eec83130c70ee4f4b7f6e0990db848919fe
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipsejdt_cluster/54879/tar_0.java
495c25acfbf15ad5c24834d34c0972d802a591f4
[]
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
1,871
java
/******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.internal.compiler.parser; /** * Internal import structure for parsing recovery */ import org.eclipse.jdt.internal.compiler.ast.ASTNode; import org.eclipse.jdt.internal.compiler.ast.ImportReference; public class RecoveredImport extends RecoveredElement { public ImportReference importReference; public RecoveredImport(ImportReference importReference, RecoveredElement parent, int bracketBalance){ super(parent, bracketBalance); this.importReference = importReference; } /* * Answer the associated parsed structure */ public ASTNode parseTree(){ return importReference; } /* * Answer the very source end of the corresponding parse node */ public int sourceEnd(){ return this.importReference.declarationSourceEnd; } public String toString(int tab) { return tabString(tab) + "Recovered import: " + importReference.toString(); //$NON-NLS-1$ } public ImportReference updatedImportReference(){ return importReference; } public void updateParseTree(){ this.updatedImportReference(); } /* * Update the declarationSourceEnd of the corresponding parse node */ public void updateSourceEndIfNecessary(int bodyStart, int bodyEnd){ if (this.importReference.declarationSourceEnd == 0) { this.importReference.declarationSourceEnd = bodyEnd; this.importReference.declarationEnd = bodyEnd; } } }
[ "375833274@qq.com" ]
375833274@qq.com
0d6a0bbb10741bb8461d3f7584377be775408d1e
0aba3ca0c2da8626bed808155a854858f93b80e0
/services/cloudbuild/src/main/java/com/huaweicloud/sdk/cloudbuild/v3/model/DefaultRequestBody.java
00f596edc5b72d7db365d68639caf12768800388
[ "Apache-2.0" ]
permissive
LanYus/huaweicloud-sdk-java-v3
5b51e0953f5b1a8a5d38bccbaa7389222a8c0ea7
761a9c43c0ea287a927707891c529389e43e8280
refs/heads/master
2023-05-31T15:46:06.772578
2021-06-10T12:06:03
2021-06-10T12:06:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,972
java
package com.huaweicloud.sdk.cloudbuild.v3.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import java.util.function.Consumer; import java.util.Objects; /** * DefaultRequestBody */ public class DefaultRequestBody { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="request_body") private String requestBody; public DefaultRequestBody withRequestBody(String requestBody) { this.requestBody = requestBody; return this; } /** * 请求体 * @return requestBody */ public String getRequestBody() { return requestBody; } public void setRequestBody(String requestBody) { this.requestBody = requestBody; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DefaultRequestBody defaultRequestBody = (DefaultRequestBody) o; return Objects.equals(this.requestBody, defaultRequestBody.requestBody); } @Override public int hashCode() { return Objects.hash(requestBody); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DefaultRequestBody {\n"); sb.append(" requestBody: ").append(toIndentedString(requestBody)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
309b7f309e504be48dd8626a12e7bd1275182f7b
5617c164afdf62f54731e3375c3dfc93885f960d
/app/src/main/java/com/eaglesakura/andriders/db/importer/GpxImporter.java
4693389e185ce37c6694d5692a63fcf3be0a0299
[ "MIT" ]
permissive
kassy-kz/andriders-central-engine-v3
6efcc5f93a7dc80072f2a3cea8299e63ee84c663
e580e1a187cf745ae5379b8e2154bbb92944869b
refs/heads/develop
2021-01-17T22:58:56.337927
2016-07-25T07:38:00
2016-07-25T07:38:00
51,561,274
0
0
null
2016-02-12T01:48:07
2016-02-12T01:48:07
null
UTF-8
Java
false
false
3,996
java
package com.eaglesakura.andriders.db.importer; import com.eaglesakura.andriders.central.CentralDataManager; import com.eaglesakura.andriders.data.gpx.Gpx; import com.eaglesakura.andriders.data.gpx.GpxParser; import com.eaglesakura.andriders.data.gpx.GpxPoint; import com.eaglesakura.andriders.data.gpx.GpxSegment; import com.eaglesakura.andriders.util.Clock; import com.eaglesakura.andriders.util.ClockTimer; import com.eaglesakura.io.CancelableInputStream; import com.eaglesakura.lambda.CallbackUtils; import com.eaglesakura.lambda.CancelCallback; import com.eaglesakura.util.IOUtil; import org.xmlpull.v1.XmlPullParserException; import android.content.Context; import android.net.Uri; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InterruptedIOException; import java.util.Date; /** * */ public class GpxImporter { @NonNull final Context mContext; @Nullable final Uri mGpxUri; @Nullable final File mGpxFile; @NonNull final GpxParser mParser = new GpxParser(); @Nullable Date mImportStartDate; @Nullable Date mImportEndDate; public GpxImporter(@NonNull Context context, @NonNull Uri gpxFile) { mContext = context; mGpxUri = gpxFile; mGpxFile = null; } public GpxImporter(@NonNull Context context, @NonNull File gpxFile) { mContext = context; mGpxUri = null; mGpxFile = gpxFile; } @NonNull public GpxParser getParser() { return mParser; } @Nullable public Date getImportStartDate() { return mImportStartDate; } @Nullable public Date getImportEndDate() { return mImportEndDate; } /** * インストールを行う * * @return 読み込んだセグメント数 */ public int install(CancelCallback cancelCallback) throws XmlPullParserException, IOException { Gpx gpx; InputStream is; if (mGpxUri != null) { is = mContext.getContentResolver().openInputStream(mGpxUri); } else if (mGpxFile != null) { is = new FileInputStream(mGpxFile); } else { throw new IllegalStateException(); } // キャンセルコールバックでラップする is = new CancelableInputStream(is, cancelCallback); try { gpx = mParser.parse(is); } finally { IOUtil.close(is); } if (gpx.getTrackSegments().isEmpty()) { return 0; } // GPXからデータをエミュレートする int segmentIndex = 0; for (GpxSegment segment : gpx.getTrackSegments()) { Clock clock = new Clock(segment.getFirstPoint().getTime().getTime()); ClockTimer clockTimer = new ClockTimer(clock); CentralDataManager centralDataManager = new CentralDataManager(mContext, clock); for (GpxPoint pt : segment.getPoints()) { clock.set(pt.getTime().getTime()); centralDataManager.setGpxPoint(pt); if (!centralDataManager.onUpdate()) { continue; } if (clockTimer.overTimeMs(1000 * 30)) { centralDataManager.commit(); clockTimer.start(); } } // 最後のデータを書き込む centralDataManager.commit(); ++segmentIndex; if (CallbackUtils.isCanceled(cancelCallback)) { throw new InterruptedIOException("Import Canceled"); } } // インストール範囲を指定する mImportStartDate = gpx.getFirstSegment().getFirstPoint().getTime(); mImportEndDate = gpx.getLastSegment().getLastPoint().getTime(); return segmentIndex; } }
[ "eagle.sakura@gmail.com" ]
eagle.sakura@gmail.com
366efe36c061e259dc2bc7106173262a19daed43
f404f7198c91a0f91ed6d6dd0a1cda9adf3edbb1
/com/planet_ink/coffee_mud/Abilities/Prayers/Prayer_LightHammer.java
bb06a891915749e61fd6396e7e2bf186cd89e91b
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bbailey/ewok
1f1d35b219a6ebd33fd3ad3d245383d075ef457d
b4fcf4ba90c7460b19d0af56a3ecabbc88470f6f
refs/heads/master
2020-04-05T08:27:05.904034
2017-02-01T04:14:19
2017-02-01T04:14:19
656,100
0
0
null
null
null
null
UTF-8
Java
false
false
3,807
java
package com.planet_ink.coffee_mud.Abilities.Prayers; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2014-2016 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Prayer_LightHammer extends Prayer { @Override public String ID() { return "Prayer_LightHammer"; } private final static String localizedName = CMLib.lang().L("Hammer of Light"); @Override public String name() { return localizedName; } @Override public int classificationCode(){return Ability.ACODE_PRAYER|Ability.DOMAIN_VEXING;} @Override public int abstractQuality(){ return Ability.QUALITY_MALICIOUS;} @Override public long flags(){return Ability.FLAG_HOLY;} @Override public int castingQuality(MOB mob, Physical target) { if(mob!=null) { if(target instanceof MOB) { if(!CMLib.flags().isEvil((target))) return Ability.QUALITY_INDIFFERENT; } } return super.castingQuality(mob,target); } @Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { final MOB target=this.getTarget(mob,commands,givenTarget); if(target==null) return false; final boolean undead=CMLib.flags().isUndead(target); if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final boolean success=proficiencyCheck(mob,0,auto); if((success)&&(CMLib.flags().isEvil(target))) { final CMMsg msg=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto)|CMMsg.MASK_MALICIOUS,L(auto?"<T-NAME> is filled with holy light!":"^S<S-NAME> "+prayWord(mob)+" for a hammer of light to strike <T-NAMESELF>!^?")+CMLib.protocol().msp("spelldam1.wav",40)); final CMMsg msg2=CMClass.getMsg(mob,target,this,CMMsg.MSK_CAST_MALICIOUS_VERBAL|CMMsg.TYP_JUSTICE|(auto?CMMsg.MASK_ALWAYS:0),null); final Room R=target.location(); if((R.okMessage(mob,msg))&&((R.okMessage(mob,msg2)))) { R.send(mob,msg); R.send(mob,msg2); int harming=CMLib.dice().roll(2,adjustedLevel(mob,asLevel)+5,adjustedLevel(mob,asLevel)); if((msg.value()>0)||(msg2.value()>0)) harming=(int)Math.round(CMath.div(harming,2.0)); if(undead) harming=harming*2; if(CMLib.flags().isEvil(target)) CMLib.combat().postDamage(mob,target,this,harming,CMMsg.MASK_ALWAYS|CMMsg.TYP_JUSTICE,Weapon.TYPE_BURSTING,L("^SA hammer of holy light <DAMAGE> <T-NAME>!^?")); } } else return maliciousFizzle(mob,target,L("<S-NAME> @x1, but nothing happens.",prayWord(mob))); // return whether it worked return success; } }
[ "nosanity79@gmail.com" ]
nosanity79@gmail.com
f5808e14c6186ff0860f83d476edc86ebe8c79b3
9b7780f95ef454fc586d914263aa7baf15196f56
/ADSI_1349397_trimestre_5/EON/03-Desarrollo/05_JPA_EON/EONJPA/src/main/java/co/edu/sena/eon_jpa/model/jpa/entities/MailServer.java
5f7ba3fbab7608ca899abd50b4ebbed265942beb
[]
no_license
davidbcaro/ADSI
eaa3cddc4c7225e2fa90bb6c34b792f711294609
5fab220093b0cf3a1d495baa072c3f18107aedb4
refs/heads/master
2022-09-15T14:21:47.912849
2019-06-23T13:02:05
2019-06-23T13:02:05
179,738,287
1
1
null
2022-08-31T23:05:47
2019-04-05T18:54:09
HTML
UTF-8
Java
false
false
5,288
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package co.edu.sena.eon_jpa.model.jpa.entities; import java.io.Serializable; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; /** * * @author 1349397 */ @Entity @Table(name = "mail_server") @NamedQueries({ @NamedQuery(name = "MailServer.findAll", query = "SELECT m FROM MailServer m"), @NamedQuery(name = "MailServer.findByMail", query = "SELECT m FROM MailServer m WHERE m.mail = :Mail"), @NamedQuery(name = "MailServer.findByPassword", query = "SELECT m FROM MailServer m WHERE m.password = :Password"), @NamedQuery(name = "MailServer.findBySmtpHost", query = "SELECT m FROM MailServer m WHERE m.smtpHost = :SmtpHost"), @NamedQuery(name = "MailServer.findBySmtpPort", query = "SELECT m FROM MailServer m WHERE m.smtpPort = :SmtpPort"), @NamedQuery(name = "MailServer.findBySmtpStartTlsEnable", query = "SELECT m FROM MailServer m WHERE m.smtpStarttlsenable = :SmtpStartTlsEnable"), @NamedQuery(name = "MailServer.findBySmtpAuth", query = "SELECT m FROM MailServer m WHERE m.smtpAuth = :SmtpAuth"), @NamedQuery(name = "MailServer.findByRecoveryCase", query = "SELECT m FROM MailServer m WHERE m.recoveryCase = :recoveryCase"), @NamedQuery(name = "MailServer.findByMessageRecovery", query = "SELECT m FROM MailServer m WHERE m.messageRecovery = :messageRecovery"), @NamedQuery(name = "MailServer.findByLikePassword", query = "SELECT m FROM MailServer m WHERE m.password LIKE :Password"), @NamedQuery(name = "MailServer.findByLikeSmtpHost", query = "SELECT m FROM MailServer m WHERE m.smtpHost LIKE :SmtpHost"), @NamedQuery(name = "MailServer.findByLikeRecoveryCase", query = "SELECT m FROM MailServer m WHERE m.recoveryCase LIKE :recoveryCase"), @NamedQuery(name = "MailServer.findByLikeMessageRecovery", query = "SELECT m FROM MailServer m WHERE m.messageRecovery LIKE :messageRecovery"), @NamedQuery(name = "MailServer.updatePrimaryKey", query = "UPDATE MailServer m SET m.mail = :mailNuevo WHERE m.mail = :mailViejo") }) public class MailServer implements Serializable { private static final long serialVersionUID = 1L; @Id @Basic(optional = false) @Column(name = "Mail", nullable = false) private Integer mail; @Column(name = "Password", length = 30) private String password; @Column(name = "smtp_Host", length = 120) private String smtpHost; @Column(name = "smtp_Port") private Integer smtpPort; @Column(name = "smtp_Start_tls_enable") private Boolean smtpStarttlsenable; @Column(name = "smtp_Auth") private Boolean smtpAuth; @Column(name = "recovery_Case", length = 50) private String recoveryCase; @Column(name = "message_Recovery", length = 250) private String messageRecovery; public MailServer() { } public MailServer(Integer mail) { this.mail = mail; } public Integer getMail() { return mail; } public void setMail(Integer mail) { this.mail = mail; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getSmtpHost() { return smtpHost; } public void setSmtpHost(String smtpHost) { this.smtpHost = smtpHost; } public Integer getSmtpPort() { return smtpPort; } public void setSmtpPort(Integer smtpPort) { this.smtpPort = smtpPort; } public Boolean getSmtpStarttlsenable() { return smtpStarttlsenable; } public void setSmtpStarttlsenable(Boolean smtpStarttlsenable) { this.smtpStarttlsenable = smtpStarttlsenable; } public Boolean getSmtpAuth() { return smtpAuth; } public void setSmtpAuth(Boolean smtpAuth) { this.smtpAuth = smtpAuth; } public String getRecoveryCase() { return recoveryCase; } public void setRecoveryCase(String recoveryCase) { this.recoveryCase = recoveryCase; } public String getMessageRecovery() { return messageRecovery; } public void setMessageRecovery(String messageRecovery) { this.messageRecovery = messageRecovery; } @Override public int hashCode() { int hash = 0; hash += (mail != null ? mail.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof MailServer)) { return false; } MailServer other = (MailServer) object; if ((this.mail == null && other.mail != null) || (this.mail != null && !this.mail.equals(other.mail))) { return false; } return true; } @Override public String toString() { return "co.edu.sena.eon_jpa.model.jpa.entities.MailServer[ mail=" + mail + " ]"; } }
[ "davidbcaro@gmail.com" ]
davidbcaro@gmail.com
54ef81b188ee44e75ad234c328b75beae2c9a9e0
95d958f70e05ac3733d1b04d40507fddd0013968
/Common/src/main/java/org/jnbt/FloatTag.java
fc7e4cb2ac2154f9cfb07aa4b5c28abe7db2aac6
[ "MIT" ]
permissive
JaelysonM/uzm-common
9fff352599c6e34ed7d27cd7df7c8b307cd49992
c707edf675a4efc74ba4717866cdb7c0bf8b9a9f
refs/heads/master
2023-06-20T18:53:05.850067
2021-07-10T19:37:50
2021-07-10T19:37:50
374,212,751
1
1
MIT
2021-06-05T21:47:15
2021-06-05T21:09:33
Java
UTF-8
Java
false
false
2,409
java
package org.jnbt; /* * JNBT License * * Copyright (c) 2010 Graham Edgecombe * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of the JNBT team nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /** * The <code>TAG_Float</code> tag. * * @author Graham Edgecombe * */ public final class FloatTag extends Tag { /** * The value. */ private final float value; /** * Creates the tag. * * @param name The name. * @param value The value. */ public FloatTag(String name, float value) { super(name); this.value = value; } @Override public Float getValue() { return value; } @Override public String toString() { String name = getName(); String append = ""; if (name != null && !name.equals("")) { append = "(\"" + this.getName() + "\")"; } return "TAG_Float" + append + ": " + value; } }
[ "jaelysonmartins@gmail.com" ]
jaelysonmartins@gmail.com
ff3e17cc7fcc5181d716220dbc302fb3d6a59518
8b73d92e633f5ffee2664fe5567bbfa7890c66d3
/mall-search/src/main/java/com/yukino/MallSearchApplication.java
080cd4abfdb5945484b355f7b51e321110d00f03
[]
no_license
yukinocyann/guli_mall
d0541d774973d7004ba7a35f1a98eccb5862bc01
847343d79adc0e5cea2fa7f8bf7874699fcf476e
refs/heads/master
2023-09-01T19:38:44.828460
2021-10-07T08:47:48
2021-10-07T08:47:48
393,608,647
0
0
null
null
null
null
UTF-8
Java
false
false
623
java
package com.yukino; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; @EnableRedisHttpSession @EnableFeignClients @EnableDiscoveryClient @SpringBootApplication public class MallSearchApplication { public static void main(String[] args) { SpringApplication.run(MallSearchApplication.class, args); } }
[ "yukinoyannA@gmail.com" ]
yukinoyannA@gmail.com
aa3a3d55a407ea91860d0356fbfcb7b4876efcd0
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Junit/Junit99.java
28683ffb9fc035bfc495b7bb278ba818ca54d105
[]
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
286
java
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CompositeKey that = (CompositeKey) o; return this.namespace.equals(that.namespace) && this.key.equals(that.key); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
cd67cca008418823b4ce68d945b8c47e03dd2ca2
f7770e21f34ef093eb78dae21fd9bde99b6e9011
/src/main/java/com/hengyuan/hicash/exception/SaveCardException.java
558404b23f02ee207246ab8197d67550d93b16c8
[]
no_license
webvul/HicashAppService
9ac8e50c00203df0f4666cd81c108a7f14a3e6e0
abf27908f537979ef26dfac91406c1869867ec50
refs/heads/master
2020-03-22T19:58:41.549565
2017-12-26T08:30:04
2017-12-26T08:30:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
394
java
package com.hengyuan.hicash.exception; import com.hengyuan.hicash.constant.ExceptionMsg; /** * 保存银行卡信息异常 * @author Andy.Niu * @create 2014-08-04 */ public class SaveCardException extends Exception{ /** * */ private static final long serialVersionUID = 4374679945035296459L; public SaveCardException(){ super(ExceptionMsg.SAVE_CARD_EXCEPTION); } }
[ "hanlu@dpandora.cn" ]
hanlu@dpandora.cn
200d30915b218b329866a24f2a84b027aa6157e4
f1679c7aef0f0fdfed467d3e74e6274c0dd62ccd
/LearnSpringCloud/ad-springcloud/ad-service/ad-search/src/main/java/com/hellodev/client/vo/AdPlanGetRequest.java
6e69249ecacc3c22513638179f8c166335742656
[ "MIT" ]
permissive
lujiahao0708/LearnSpring
11e6f0cf60f76da1167938ad704d9dec50debb3a
47f5caae9ba921006eea22b2ab789b6a604ef4e3
refs/heads/master
2022-06-30T02:39:51.841909
2020-07-02T07:42:25
2020-07-02T07:42:25
214,594,518
1
0
MIT
2022-06-21T02:28:36
2019-10-12T06:49:57
Java
UTF-8
Java
false
false
329
java
package com.hellodev.client.vo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.util.List; /** * * @author lujiahao * @date 2019-09-02 */ @Data @NoArgsConstructor @AllArgsConstructor public class AdPlanGetRequest { private Long userId; private List<Long> ids; }
[ "lujiahao0708@gmail.com" ]
lujiahao0708@gmail.com
f16370778f30b52aa3ba1d5ae633e4200c6f214b
0bf914f5101ba851b5d22e719c190a85201a53ff
/imlib/src/main/java/com/qunar/im/ui/presenter/views/WorkWorldNoticeView.java
4a20fb3b3a8905b40083f2201619298d30363708
[ "MIT" ]
permissive
westwindwing/imsdk-android
34bb4b1fd86a3fcff8845775670ad2cd622db913
660f53d56eb15288341263cb7fe0f438a5a01d36
refs/heads/master
2020-05-27T15:29:05.674979
2019-06-23T08:56:32
2019-06-23T08:56:39
188,681,156
0
0
MIT
2019-05-26T12:39:33
2019-05-26T12:39:33
null
UTF-8
Java
false
false
257
java
package com.qunar.im.ui.presenter.views; import com.qunar.im.base.module.MultiItemEntity; import java.util.List; public interface WorkWorldNoticeView { public void showNewData(List<? extends MultiItemEntity> list); public int getShowCount(); }
[ "lihaibin.li@qunar.com" ]
lihaibin.li@qunar.com
bffa05684b83db9356ee11c7724c8b5b958493a6
8d841bba4f0209d61376a7a3d3755ca55daacb7d
/guns-user/src/main/java/com/stylefeng/guns/rest/modular/user/UserServiceImpl.java
aed1357178be088612150cc97099077fd9252d47
[ "Apache-2.0" ]
permissive
LicV587/SeeMovie
c2ee27466e70dc58758a17f6cfceef208ef40362
ea93cdc24981f0a87ac923a114dccecef8b01a50
refs/heads/master
2023-07-30T12:04:29.013121
2019-09-07T10:26:28
2019-09-07T10:26:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,164
java
package com.stylefeng.guns.rest.modular.user; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.stylefeng.guns.api.user.UserAPI; import com.stylefeng.guns.api.user.UserInfoModel; import com.stylefeng.guns.api.user.UserModel; import com.stylefeng.guns.core.util.MD5Util; import com.stylefeng.guns.rest.common.persistence.dao.UserMapper; import com.stylefeng.guns.rest.common.persistence.model.UserDO; import org.apache.dubbo.config.annotation.Service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.Date; /** * @author hncboy * @date 2019/9/7 8:33 * @description 用户模块业务层 */ @Component @Service(interfaceClass = UserAPI.class) public class UserServiceImpl implements UserAPI { @Autowired private UserMapper userMapper; @Override public int login(String username, String password) { UserDO userDO = userMapper.selectOne(new UserDO().setUserName(username)); if (userDO != null && userDO.getUserId() > 0) { String md5Password = MD5Util.encrypt(password); if (userDO.getPassword().equals(md5Password)) { return userDO.getUserId(); } } return 0; } @Override public boolean register(UserModel userModel) { // 将注册信息转为数据实体 UserDO userDO = new UserDO() .setUserName(userModel.getUsername()) // 密码采用 md5 加密 .setPassword(MD5Util.encrypt(userModel.getPassword())) .setEmail(userModel.getEmail()) .setAddress(userModel.getAddress()) .setUserPhone(userModel.getPhone()); return userMapper.insert(userDO) > 0; } @Override public boolean checkUsername(String username) { EntityWrapper<UserDO> entityWrapper = new EntityWrapper<>(); entityWrapper.eq("user_name", username); Integer count = userMapper.selectCount(entityWrapper); return count == null || count <= 0; } @Override public UserInfoModel getUserInfo(int userId) { return userDOToUserInfoModel(userMapper.selectById(userId)); } @Override public UserInfoModel updateUserInfo(UserInfoModel userInfoModel) { UserDO userDO = new UserDO() .setUpdateTime(timeToDate(System.currentTimeMillis())) .setNickName(userInfoModel.getNickname()) .setLifeState(Integer.valueOf(userInfoModel.getLifeState())) .setBirthday(userInfoModel.getBirthday()) .setBiography(userInfoModel.getBiography()) .setAvatorUrl(userInfoModel.getAvatorUrl()) .setUserSex(userInfoModel.getSex()) .setUserId(userInfoModel.getUserId()) .setUserName(userInfoModel.getUsername()) .setEmail(userInfoModel.getEmail()) .setAddress(userInfoModel.getAddress()); Integer count = userMapper.updateById(userDO); return count != null && count > 0 ? getUserInfo(userDO.getUserId()) : userInfoModel; } /** * time -> date * * @param time * @return */ private Date timeToDate(Long time) { return new Date(time); } /** * UserDO -> UserInfoModel * * @param userDO * @return */ private UserInfoModel userDOToUserInfoModel(UserDO userDO) { return new UserInfoModel() .setUsername(userDO.getUserName()) .setUpdateTime(userDO.getUpdateTime().getTime()) .setCreateTime(userDO.getCreateTime().getTime()) .setSex(userDO.getUserSex()) .setPhone(userDO.getUserPhone()) .setNickname(userDO.getNickName()) .setLifeState(String.valueOf(userDO.getLifeState())) .setAvatorUrl(userDO.getAvatorUrl()) .setEmail(userDO.getEmail()) .setBirthday(userDO.getBirthday()) .setBiography(userDO.getBiography()) .setAddress(userDO.getAddress()); } }
[ "619452863@qq.com" ]
619452863@qq.com
bdb4b9c00e13f29ce83ab20e63566944fdaa886c
9476979ffea7042c1cc875bc2982cbd7672b8fdb
/src/main/java/com/sun/qxgl/authority/entity/SysPermission.java
70d2c926217d3b9d32d300e1ab3e4ae0076146a0
[]
no_license
charlidsun/qxgl
904c83021776c01520f5888cb339e7b083796dc2
e9f37fe23827dd94a833db52653cd6bbd84d60df
refs/heads/master
2020-03-21T21:55:10.734568
2018-07-04T23:38:45
2018-07-04T23:38:45
139,093,330
0
0
null
null
null
null
UTF-8
Java
false
false
2,600
java
package com.sun.qxgl.authority.entity; import java.io.Serializable; /** * 功能: 说明: * * @author 孙荆阁: * @Date 2018年7月2日 下午1:46:34 */ public class SysPermission implements Serializable{ private static final long serialVersionUID = 1L; private int id;// 主键. private String name;// 名称. private String resourceType;// 资源类型,[menu|button] private String url;// 资源路径. private String permission; // 权限字符串,menu例子:role:*,button例子:role:create,role:update,role:delete,role:view private Long parentId; // 父编号 private String parentIds; // 父编号列表 private Boolean available = Boolean.FALSE; /** * @return the id */ public int getId() { return id; } /** * @param id * the id to set */ public void setId(int id) { this.id = id; } /** * @return the name */ public String getName() { return name; } /** * @param name * the name to set */ public void setName(String name) { this.name = name; } /** * @return the resourceType */ public String getResourceType() { return resourceType; } /** * @param resourceType * the resourceType to set */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** * @return the url */ public String getUrl() { return url; } /** * @param url * the url to set */ public void setUrl(String url) { this.url = url; } /** * @return the permission */ public String getPermission() { return permission; } /** * @param permission * the permission to set */ public void setPermission(String permission) { this.permission = permission; } /** * @return the parentId */ public Long getParentId() { return parentId; } /** * @param parentId * the parentId to set */ public void setParentId(Long parentId) { this.parentId = parentId; } /** * @return the parentIds */ public String getParentIds() { return parentIds; } /** * @param parentIds * the parentIds to set */ public void setParentIds(String parentIds) { this.parentIds = parentIds; } /** * @return the available */ public Boolean getAvailable() { return available; } /** * @param available * the available to set */ public void setAvailable(Boolean available) { this.available = available; } }
[ "yulinsunjingge@gmail.com" ]
yulinsunjingge@gmail.com
dbc2aeb656b93d659aaea4a1372f3d130be21f3e
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipseswt_cluster/41408/tar_0.java
0b52809ebdaee626cdf3803f62a8a966f2261cbd
[]
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
1,298
java
/******************************************************************************* * Copyright (c) 2000, 2008 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.internal.cocoa; public class DOMKeyboardEvent extends DOMUIEvent { public DOMKeyboardEvent() { super(); } public DOMKeyboardEvent(int /*long*/ id) { super(id); } public DOMKeyboardEvent(id id) { super(id); } public boolean altKey() { return OS.objc_msgSend_bool(this.id, OS.sel_altKey); } public int charCode() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_charCode); } public boolean ctrlKey() { return OS.objc_msgSend_bool(this.id, OS.sel_ctrlKey); } public int keyCode() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_keyCode); } public boolean metaKey() { return OS.objc_msgSend_bool(this.id, OS.sel_metaKey); } public boolean shiftKey() { return OS.objc_msgSend_bool(this.id, OS.sel_shiftKey); } }
[ "375833274@qq.com" ]
375833274@qq.com
92c7526853481fc652ec9cb70769cd1b864f98ce
e7c533864a230055846950cfa06bf2661ebe9a6e
/app/src/main/java/com/example/lenovo/hd_beijing_meseum/view/webac/TransInfoWeb.java
00a0eae19bf2bced8720491947b888b96eae0b95
[]
no_license
lliqiang/HD_BJGJZBWG
a1445fbfd28e4e91957ccd71727fc53606b57fb7
271a6a9901973bb38d2c824183694cff187b027d
refs/heads/master
2020-06-17T12:51:16.747363
2017-06-13T01:35:35
2017-06-13T01:35:35
94,156,395
0
0
null
null
null
null
UTF-8
Java
false
false
2,101
java
package com.example.lenovo.hd_beijing_meseum.view.webac; import android.graphics.Color; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.webkit.WebSettings; import android.webkit.WebView; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.example.lenovo.hd_beijing_meseum.BaseActivity; import com.example.lenovo.hd_beijing_meseum.Constant.Constant; import com.example.lenovo.hd_beijing_meseum.R; public class TransInfoWeb extends BaseActivity implements View.OnClickListener{ private ImageView toBack; private WebView webView; private TextView title; private String url; private String path; private ImageView imageView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_trans_info_web); initView(); url= Constant.getDefaultFileDir()+"CHINESE"+"/"+"1303"+"/"+"1303.html"; // path=Constant.getDefaultFileDir()+"CHINESE"+"/"+"1303"+"/"+"1303.png"; // Glide.with(this).load(path).diskCacheStrategy(DiskCacheStrategy.ALL).into(imageView); webView.setBackgroundColor(Color.TRANSPARENT); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setTextSize(WebSettings.TextSize.LARGER); webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); webView.requestFocus(); webView.loadUrl("file:///"+url); initListner(); } private void initView() { toBack= (ImageView) findViewById(R.id.toback); imageView= (ImageView) findViewById(R.id.tranlatee); webView= (WebView) findViewById(R.id.webview_transInfo); title= (TextView) findViewById(R.id.title); title.setText("交通信息"); } private void initListner() { toBack.setOnClickListener(this); } @Override public void onClick(View v) { finish(); } }
[ "13821062095@163.com" ]
13821062095@163.com
408c3ec6bfc678f2e14f6b8f2b3fe3d9364184bc
6be5788c02e76bf28e8eb8a292635cba4915f306
/lib/models/src/main/java/org/sagebionetworks/repo/model/table/parser/StringParser.java
e29bb865aee7dc8ca6b292549231e085a3334be8
[ "Apache-2.0" ]
permissive
garyskeete/Synapse-Repository-Services
5c209fcd78459152d3544ac49865e264b01809a0
094a57b44c2ffc1ea9e01a54a8b2bb90604581ff
refs/heads/develop
2020-12-03T06:35:59.916097
2017-06-27T18:01:50
2017-06-27T18:01:50
95,705,097
0
0
null
2017-06-28T19:38:34
2017-06-28T19:38:34
null
UTF-8
Java
false
false
429
java
package org.sagebionetworks.repo.model.table.parser; import org.sagebionetworks.repo.model.table.ValueParser; public class StringParser implements ValueParser { @Override public Object parseValueForDatabaseWrite(String value) throws IllegalArgumentException { return value; } @Override public String parseValueForDatabaseRead(String value) throws IllegalArgumentException { return value; } }
[ "john.hill@sagebase.org" ]
john.hill@sagebase.org
6cae0da66dbfd525aaaa269b3e9e34290460e5bc
dc7c4a4312fc9d6db4cc968bacb146baa904daa3
/src/main/java/org/anstis/client/grid/model/BaseGridData.java
300d047692d879d7a66bca68550dfef13232dfe3
[ "Apache-2.0" ]
permissive
manstis/grid
7faab4b3055c729c86977647a8697bb43eac87f1
d8162f19590f678854f70f7b4082cfe251b5348a
refs/heads/master
2021-01-02T09:13:49.137583
2015-05-27T17:01:03
2015-05-27T17:01:03
31,558,797
0
0
null
null
null
null
UTF-8
Java
false
false
4,054
java
/* * Copyright 2015 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.anstis.client.grid.model; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * Base implementation of a grid to avoid boiler-plate for more specific implementations. * @param <R> The generic type of rows within the grid * @param <C> The generic type of columns within the grid * @param <V> The generic type of cells within the grid */ public abstract class BaseGridData<R extends IGridRow<V>, C extends IGridColumn<R, V>, V extends IGridCell<?>> implements IGridData<R, C, V> { protected List<R> rows = new ArrayList<>(); protected List<C> columns = new ArrayList<>(); @Override public List<C> getColumns() { return Collections.unmodifiableList( columns ); } @Override public void appendColumn( final C column ) { column.setIndex( columns.size() ); columns.add( column ); } @Override public void insertColumn( final int index, final C column ) { column.setIndex( columns.size() ); columns.add( index, column ); } @Override public void removeColumn( final C column ) { columns.remove( column ); for ( R row : rows ) { row.getCells().remove( column.getIndex() ); } } @Override public void moveColumnTo( final int index, final C column ) { final int currentIndex = columns.indexOf( column ); if ( index == currentIndex ) { return; } columns.remove( currentIndex ); columns.add( index, column ); } @Override public double getColumnOffset( final C gridColumn ) { final int columnIndex = getColumns().indexOf( gridColumn ); return getColumnOffset( columnIndex ); } @Override public double getColumnOffset( final int columnIndex ) { double columnOffset = 0; final List<C> columns = getColumns(); for ( int i = 0; i < columnIndex; i++ ) { final IGridColumn column = columns.get( i ); columnOffset = columnOffset + column.getWidth(); } return columnOffset; } @Override public double getRowOffset( final R gridRow ) { final int rowIndex = rows.indexOf( gridRow ); return getRowOffset( rowIndex ); } @Override public double getRowOffset( final int rowIndex ) { double height = 0; for ( int i = 0; i < rowIndex; i++ ) { final IGridRow<V> row = getRow( i ); height = height + row.getHeight(); } return height; } @Override public void appendRow( final R row ) { this.rows.add( row ); } @Override public void insertRow( final int rowIndex, final R row ) { this.rows.add( rowIndex, row ); } @Override public R getRow( final int rowIndex ) { return rows.get( rowIndex ); } @Override public int getRowCount() { return rows.size(); } @Override public V getCell( final int rowIndex, final int columnIndex ) { if ( rowIndex < 0 || rowIndex > rows.size() - 1 ) { return null; } final int _columnIndex = columns.get( columnIndex ).getIndex(); return rows.get( rowIndex ).getCells().get( _columnIndex ); } }
[ "michael.anstis@gmail.com" ]
michael.anstis@gmail.com
f9051843192902e8ec27d087095c76a320edebc4
448792a5326330131d5b1fb71e3686df9263f332
/src/main/java/com/awslabs/iot/data/CertificateId.java
84749da80238e12e030085969e34126b8098e677
[ "Apache-2.0" ]
permissive
awslabs/results-iterator-for-aws-java-sdk
9f63de83a739796134677e73aa24e893fce0aede
edca2a88c4c133cb7f06a01ac50d0c8fe6b477ef
refs/heads/master
2023-09-03T21:46:09.574268
2022-07-14T14:32:44
2022-07-14T14:32:44
194,749,539
10
4
Apache-2.0
2023-09-14T13:50:02
2019-07-01T22:11:53
Java
UTF-8
Java
false
false
267
java
package com.awslabs.iot.data; import com.awslabs.data.NoToString; import org.immutables.gson.Gson; import org.immutables.value.Value; @Gson.TypeAdapters @Value.Immutable public abstract class CertificateId extends NoToString { public abstract String getId(); }
[ "tim@mattison.org" ]
tim@mattison.org
47beb1280a1801fabb86ac4acc0bc377177ede77
608cf243607bfa7a2f4c91298463f2f199ae0ec1
/android/versioned-abis/expoview-abi39_0_0/src/main/java/abi39_0_0/host/exp/exponent/modules/api/components/datetimepicker/RNDismissableTimePickerDialog.java
9956bc8e3bc1ed74a3ceafc3fbb5730aad310c50
[ "MIT", "BSD-3-Clause", "Apache-2.0" ]
permissive
kodeco835/symmetrical-happiness
ca79bd6c7cdd3f7258dec06ac306aae89692f62a
4f91cb07abef56118c35f893d9f5cc637b9310ef
refs/heads/master
2023-04-30T04:02:09.478971
2021-03-23T03:19:05
2021-03-23T03:19:05
350,565,410
0
1
MIT
2023-04-12T19:49:48
2021-03-23T03:18:02
Objective-C
UTF-8
Java
false
false
4,593
java
/** * Copyright (c) Facebook, Inc. and its affiliates. * <p> * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * </p> */ package abi39_0_0.host.exp.exponent.modules.api.components.datetimepicker; import static abi39_0_0.host.exp.exponent.modules.api.components.datetimepicker.ReflectionHelper.findField; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import android.app.TimePickerDialog; import android.content.Context; import android.content.res.TypedArray; import android.os.Build; import android.util.AttributeSet; import android.widget.TimePicker; import androidx.annotation.Nullable; /** * <p> * Certain versions of Android (Jellybean-KitKat) have a bug where when dismissed, the * {@link TimePickerDialog} still calls the OnTimeSetListener. This class works around that issue * by *not* calling super.onStop on KitKat on lower, as that would erroneously call the * OnTimeSetListener when the dialog is dismissed, or call it twice when "OK" is pressed. * </p> * * <p> * See: <a href="https://code.google.com/p/android/issues/detail?id=34833">Issue 34833</a> * </p> */ public class RNDismissableTimePickerDialog extends MinuteIntervalSnappableTimePickerDialog { public RNDismissableTimePickerDialog( Context context, @Nullable TimePickerDialog.OnTimeSetListener callback, int hourOfDay, int minute, int minuteInterval, boolean is24HourView, RNTimePickerDisplay display ) { super(context, callback, hourOfDay, minute, minuteInterval, is24HourView, display); fixSpinner(context, hourOfDay, minute, is24HourView, display); } public RNDismissableTimePickerDialog( Context context, int theme, @Nullable TimePickerDialog.OnTimeSetListener callback, int hourOfDay, int minute, int minuteInterval, boolean is24HourView, RNTimePickerDisplay display ) { super(context, theme, callback, hourOfDay, minute, minuteInterval, is24HourView, display); fixSpinner(context, hourOfDay, minute, is24HourView, display); } @Override protected void onStop() { if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) { super.onStop(); } } private void fixSpinner(Context context, int hourOfDay, int minute, boolean is24HourView, RNTimePickerDisplay display) { if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N && display == RNTimePickerDisplay.SPINNER) { try { Class<?> styleableClass = Class.forName("com.android.internal.R$styleable"); Field timePickerStyleableField = styleableClass.getField("TimePicker"); int[] timePickerStyleable = (int[]) timePickerStyleableField.get(null); final TypedArray a = context.obtainStyledAttributes(null, timePickerStyleable, android.R.attr.timePickerStyle, 0); a.recycle(); TimePicker timePicker = (TimePicker) findField(TimePickerDialog.class, TimePicker.class, "mTimePicker").get(this); Class<?> delegateClass = Class.forName("android.widget.TimePicker$TimePickerDelegate"); Field delegateField = findField(TimePicker.class, delegateClass, "mDelegate"); Object delegate = delegateField.get(timePicker); Class<?> spinnerDelegateClass; spinnerDelegateClass = Class.forName("android.widget.TimePickerSpinnerDelegate"); // In 7.0 Nougat for some reason the timePickerMode is ignored and the delegate is TimePickerClockDelegate if (delegate.getClass() != spinnerDelegateClass) { delegateField.set(timePicker, null); // throw out the TimePickerClockDelegate! timePicker.removeAllViews(); // remove the TimePickerClockDelegate views Constructor spinnerDelegateConstructor = spinnerDelegateClass.getConstructor(TimePicker.class, Context.class, AttributeSet.class, int.class, int.class); spinnerDelegateConstructor.setAccessible(true); // Instantiate a TimePickerSpinnerDelegate delegate = spinnerDelegateConstructor.newInstance(timePicker, context, null, android.R.attr.timePickerStyle, 0); delegateField.set(timePicker, delegate); // set the TimePicker.mDelegate to the spinner delegate // Set up the TimePicker again, with the TimePickerSpinnerDelegate timePicker.setIs24HourView(is24HourView); timePicker.setCurrentHour(hourOfDay); timePicker.setCurrentMinute(minute); timePicker.setOnTimeChangedListener(this); } } catch (Exception e) { throw new RuntimeException(e); } } } }
[ "81201147+kodeco835@users.noreply.github.com" ]
81201147+kodeco835@users.noreply.github.com
84ec490af58e8daf095614f267314c8ac39ede96
340b193641c8c4f6534072604b50dc4fd737466e
/src/main/java/com/lcy/dto/business/Skillcard/LifeGoalCardSaveDTO.java
2bcd14dd02724c0c54e279c0970a5887edcd2207
[]
no_license
wang0077/hxjy
169aafae00dc4defd30a03968a8bd8db24330bed
1054fe54ec3f4cd870d4e9935eb8c62f358cd4bb
refs/heads/master
2023-02-24T13:49:26.024943
2021-02-03T08:31:23
2021-02-03T08:31:23
327,232,057
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package com.lcy.dto.business.Skillcard; public class LifeGoalCardSaveDTO { private boolean success; private Integer feedbackCode; public boolean isSuccess() { return success; } public void setSuccess(boolean success) { this.success = success; } public Integer getFeedbackCode() { return feedbackCode; } public void setFeedbackCode(Integer feedbackCode) { this.feedbackCode = feedbackCode; } }
[ "44741783+wang0077@users.noreply.github.com" ]
44741783+wang0077@users.noreply.github.com
fb137dbee3ab11cc22561d912aec0fd1829d3173
f97ba375da68423d12255fa8231365104867d9b0
/study-notes/j2ee-collection/framework/15-Elasticsearch/project_wolf2w/trip-core/src/main/java/cn/wolfcode/wolf2w/mapper/TravelMapper.java
098f365c532339692a4367137713f6b4bb38d124
[ "MIT" ]
permissive
lei720/coderZsq.practice.server
7a728612e69c44e0877c0153c828b50d8ea7fa7c
4ddf9842cd088d4a0c2780ac22d41d7e6229164b
refs/heads/master
2023-07-16T11:21:26.942849
2021-09-08T04:38:07
2021-09-08T04:38:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
239
java
package cn.wolfcode.wolf2w.mapper; import cn.wolfcode.wolf2w.domain.Travel; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * 游记持久层接口 */ public interface TravelMapper extends BaseMapper<Travel>{ }
[ "a13701777868@yahoo.com" ]
a13701777868@yahoo.com
c03fe545ff789ba0528d1bfe9ed9d3e2347931b3
03d6f1c706592d25704995221c442fb0917657d5
/ged/src/main/java/com/enigma/controller/RolesController.java
c8f2f797f6fd60088fed8973df28195d1e9a1fee
[]
no_license
siamsubekti/-Final---project-
6bcae1254efb585152e1b6f4e9210288fecce666
af9c27611ed9f3b51aea26712d2d17994c91d1ca
refs/heads/master
2022-04-08T14:28:30.111708
2020-02-20T14:50:36
2020-02-20T14:50:36
241,874,213
0
0
null
null
null
null
UTF-8
Java
false
false
1,568
java
package com.enigma.controller; import com.enigma.entities.Roles; import com.enigma.services.RolesService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.util.List; @CrossOrigin(origins = "*", maxAge = 3600) @RestController public class RolesController { @Autowired RolesService rolesService; @GetMapping("/roles") public ResponseEntity<List<Roles>> getListRoles(){ try { return new ResponseEntity<>(rolesService.getAllRoles(), HttpStatus.OK); }catch (Exception e){ return new ResponseEntity<>(HttpStatus.NOT_FOUND); } } @PostMapping("/roles") public ResponseEntity<Roles> createRoles(@RequestBody Roles roles) { try { return new ResponseEntity<>(rolesService.createRole(roles), HttpStatus.CREATED); }catch (Exception e){ return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } } @GetMapping("/roles/{id}") public ResponseEntity<Roles> findById(@PathVariable Integer id) throws Exception { try { return new ResponseEntity<>(rolesService.findByIdRole(id), HttpStatus.OK); }catch (Exception e){ return new ResponseEntity<>(HttpStatus.NOT_FOUND); } } @DeleteMapping("/roles/{id}") public void deleteIdRole(@PathVariable Integer id) { } }
[ "trisiam4@gmail.com" ]
trisiam4@gmail.com
1da61526478677a815345fe4b57471f839522498
91297ffb10fb4a601cf1d261e32886e7c746c201
/php.smarty/src/org/netbeans/modules/php/smarty/editor/utlis/EmbeddingUtils.java
9e2fc9dcf61ca4f99affcb5022a06dff05e949f8
[]
no_license
JavaQualitasCorpus/netbeans-7.3
0b0a49d8191393ef848241a4d0aa0ecc2a71ceba
60018fd982f9b0c9fa81702c49980db5a47f241e
refs/heads/master
2023-08-12T09:29:23.549956
2019-03-16T17:06:32
2019-03-16T17:06:32
167,005,013
0
0
null
null
null
null
UTF-8
Java
false
false
3,582
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (collectively, the * "License"). You may not use this file except in compliance with the * License. You can obtain a copy of the License at * http://www.netbeans.org/cddl-gplv2.html * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the * specific language governing permissions and limitations under the * License. When distributing the software, include this License Header * Notice in each file and include the License file at * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the * License Header, with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * If you wish your version of this file to be governed by only the CDDL * or only the GPL Version 2, indicate your decision by adding * "[Contributor] elects to include this software in this distribution * under the [CDDL or GPL Version 2] license." If you do not indicate a * single choice of license, a recipient has the option to distribute * your version of this file under either the CDDL, the GPL Version 2 or * to extend the choice of license to its licensees as provided above. * However, if you add GPL Version 2 code and therefore, elected the GPL * Version 2 license, then the option applies only if the new code is * made subject to such option by the copyright holder. * * Contributor(s): * * Portions Copyrighted 2009 Sun Microsystems, Inc. */ package org.netbeans.modules.php.smarty.editor.utlis; import java.io.BufferedReader; import java.io.File; import java.io.FileFilter; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.logging.Logger; import javax.swing.text.BadLocationException; import javax.swing.text.Document; import javax.swing.text.StyledDocument; import org.netbeans.api.lexer.InputAttributes; import org.netbeans.api.lexer.Token; import org.netbeans.api.lexer.TokenHierarchy; import org.netbeans.api.lexer.TokenSequence; import org.netbeans.modules.parsing.api.Snapshot; import org.netbeans.modules.parsing.api.Source; import org.netbeans.modules.php.smarty.editor.lexer.TplTokenId; import org.netbeans.modules.php.smarty.editor.lexer.TplTopTokenId; import org.openide.filesystems.FileObject; /** * * @author Martin Fousek */ public class EmbeddingUtils { public static TokenHierarchy<CharSequence> createTplTokenHierarchy(CharSequence inputText, Snapshot tmplSnapshot) { InputAttributes inputAttributes = new InputAttributes(); FileObject fo = tmplSnapshot.getSource().getFileObject(); if (fo != null) { //try to obtain tmpl coloring info for file based snapshots final Document doc = tmplSnapshot.getSource().getDocument(true); } TokenHierarchy<CharSequence> th = TokenHierarchy.create( inputText, true, TplTokenId.language(), Collections.<TplTokenId>emptySet(), inputAttributes); return th; } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
145e2889f99d951e626298b40952085409b24c6f
2c5b8aff137117e316f8557bf82e553e55454989
/leetcode/src/test/java/metaprep/greedyalgorithms/StockBuyAndSellTest.java
917b7d9a3abe1fcae5cdaca656b00fbba06e9633
[]
no_license
lamadipen/Algo
33de4fc1e7049c3d597b5e6090e408460fa2e90e
ef9e5f06214a3387dd4dbe7dd3e979a70617da1d
refs/heads/master
2022-10-07T16:52:26.537618
2022-10-05T21:06:05
2022-10-05T21:06:05
82,363,649
2
0
null
2023-09-12T13:55:45
2017-02-18T05:21:18
Java
UTF-8
Java
false
false
487
java
package metaprep.greedyalgorithms; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.util.Assert; import static org.junit.jupiter.api.Assertions.*; class StockBuyAndSellTest { @Test void bestDaysToBuyAndSellTest1() { int[] result = StockBuyAndSell.bestDaysToBuyAndSell(new int[]{100, 180, 260, 310, 40, 535, 695}); Assertions.assertEquals(4,result[0]); Assertions.assertEquals(6,result[1]); } }
[ "lamadipen@yahoo.com" ]
lamadipen@yahoo.com
bf80560fe29b28c52d8a83752ad4897f278d6431
6c68562b9dab8c15f3c58a6967965c8ea0755b7a
/app/src/main/java/com/idx/running/utils/BitGL.java
2ea2e18de0278cfe6869e115c28ddcaa11e37904
[]
no_license
sqHayden/Running
8e5ec02a4f220abb24044d839fc85f0e0c02b0a1
02b08d4e4b95cba14d4dc41a19ddd33a34f9ab20
refs/heads/master
2020-03-20T13:36:56.032987
2018-06-15T08:21:39
2018-06-15T08:21:39
137,460,996
0
0
null
null
null
null
UTF-8
Java
false
false
402
java
package com.idx.running.utils; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import com.idx.running.R; /** * Created by steve on 17-11-17. */ public class BitGL { public static Bitmap bitmap; public static void init(Resources resources) { bitmap = BitmapFactory.decodeResource(resources, R.drawable.mofang3); } }
[ "ryan.fp.chan@mail.foxconn.com" ]
ryan.fp.chan@mail.foxconn.com
278dc77419548fff90f1cf134dfb391e639e62ad
5c756f78f8e62c3f49e303130629f1580c0b2b62
/src/main/java/com/wedian/site/modules/cms/web/CmsController.java
938aab7038ea0b7d0daa7631765ce4d8a1c92c26
[ "Apache-2.0" ]
permissive
jbigdata/wedian
99bfb445326401e9ca80b3a6b8f93e371b84479a
53da4f96126de5a3324dfcf2f5b8bbebd7c373ff
refs/heads/master
2016-08-07T10:14:48.128865
2015-08-04T10:10:48
2015-08-04T10:10:48
39,112,075
0
0
null
null
null
null
UTF-8
Java
false
false
1,321
java
/** * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.wedian.site.modules.cms.web; import com.wedian.site.common.web.BaseController; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import com.wedian.site.common.web.BaseController; import com.wedian.site.modules.cms.service.CategoryService; /** * 内容管理Controller * @author ThinkGem * @version 2013-4-21 */ @Controller @RequestMapping(value = "${adminPath}/cms") public class CmsController extends BaseController { @Autowired private CategoryService categoryService; @RequiresPermissions("cms:view") @RequestMapping(value = "") public String index() { return "modules/cms/cmsIndex.jsp"; } @RequiresPermissions("cms:view") @RequestMapping(value = "tree") public String tree(Model model) { model.addAttribute("categoryList", categoryService.findByUser(true, null)); return "modules/cms/cmsTree.jsp"; } @RequiresPermissions("cms:view") @RequestMapping(value = "none") public String none() { return "modules/cms/cmsNone.jsp"; } }
[ "wan_liang@126.com" ]
wan_liang@126.com
1aef2314e346b32df286574afe10a536ea21ebbd
f5c9bf4875814adcf045362c4ecf15906ca185ae
/smstarseelmodel/test/smstarseelmodel/CallLogTest.java
38d1c4b5b985488d2d918e1c4083a5a1ff016387
[]
no_license
InteractiveHealthSolutions/smstarseel
29e8996543655b95a3124a930ce47531b99cd7e2
3017a43b29e1b779c632a22e888050140bd4c349
refs/heads/master
2023-08-23T11:36:22.280947
2019-10-07T07:00:24
2019-10-07T07:00:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,505
java
package smstarseelmodel; import javax.management.InstanceAlreadyExistsException; import org.hibernate.Session; import org.irdresearch.smstarseel.context.TarseelContext; import org.junit.Test; public class CallLogTest { @Test public void testCallLogPerformance() throws InstanceAlreadyExistsException{ TarseelContext.instantiate(null, "smstarseel.cfg.xml"); Session ses = TarseelContext.getNewSession(); System.out.println("START ADDING INDEX"); ses.beginTransaction(); long stlwi = System.currentTimeMillis(); ses.createSQLQuery("CREATE INDEX callstatus_index ON calllog (callstatus);").executeUpdate(); ses.createSQLQuery("CREATE INDEX calldate_index ON calllog (calldate);").executeUpdate(); ses.getTransaction().commit(); System.out.println("END ADDING INDEX (ms): "+(System.currentTimeMillis()-stlwi)); long stflwi = System.currentTimeMillis(); ses.beginTransaction(); ses.createSQLQuery("SELECT * FROM calllog WHERE calldate like '2013-06-30%'").list(); System.out.println("FETCH TIME WITH INDEXES (ms):"+(System.currentTimeMillis()-stflwi)); long stulwi = System.currentTimeMillis(); ses.createSQLQuery("UPDATE calllog SET description = CONCAT('"+System.currentTimeMillis()+"UPDATED NOW ',NOW())").executeUpdate(); ses.getTransaction().commit(); System.out.println("UPDATE TIME WITH INDEXES (ms): "+(System.currentTimeMillis()-stulwi)); try { Thread.sleep(1000*10); } catch (InterruptedException e) { e.printStackTrace(); } //--------------------------------------------------- System.out.println("START DROPING INDEX"); ses.beginTransaction(); long stl = System.currentTimeMillis(); ses.createSQLQuery("ALTER TABLE calllog DROP INDEX callstatus_index").executeUpdate(); ses.createSQLQuery("ALTER TABLE calllog DROP INDEX calldate_index").executeUpdate(); ses.getTransaction().commit(); System.out.println("END DROPING INDEX (ms): "+(System.currentTimeMillis()-stl)); long stfl = System.currentTimeMillis(); ses.beginTransaction(); ses.createSQLQuery("SELECT * FROM calllog WHERE calldate like '2013-06-30%'").list(); System.out.println("FETCH TIME WITHOUT INDEXES (ms):"+(System.currentTimeMillis()-stfl)); long stul = System.currentTimeMillis(); ses.createSQLQuery("UPDATE calllog SET description = CONCAT('"+System.currentTimeMillis()+"UPDATED NOW ',NOW())").executeUpdate(); ses.getTransaction().commit(); System.out.println("UPDATE TIME WITHOUT INDEXES (ms): "+(System.currentTimeMillis()-stul)); } }
[ "maimoona.kausar@ihsinformatics.com" ]
maimoona.kausar@ihsinformatics.com
6555b15e1898b5d967765dfd22a9e263f4632a9a
e26451ec53424e24737cc40fb7501f575c8eb490
/app/src/main/java/okhttp3/Interceptor.java
2211b1e88c897ae003a80482bf6219f897746d56
[]
no_license
whenSunSet/MyOkhttp
6fd3a35e6948fd36087277454dc89dea9932e695
b423fd4015461c2ae5376c8ed00453c55a305905
refs/heads/master
2021-01-20T13:18:42.026601
2017-05-16T13:36:11
2017-05-16T13:36:11
90,473,422
1
0
null
null
null
null
UTF-8
Java
false
false
655
java
package okhttp3; /** * Created by heshixiyang on 2017/5/6. */ import java.io.IOException; /** * 修改所观察到的东西,通常拦截器添加、删除或转换头在请求或响应。 * Observes, modifies, and potentially short-circuits requests going out and the corresponding * responses coming back in. Typically interceptors add, remove, or transform headers on the request * or response. */ public interface Interceptor { Response intercept(Chain chain) throws IOException; interface Chain { Request request(); Response proceed(Request request) throws IOException; Connection connection(); } }
[ "a1018998632@gmail.com" ]
a1018998632@gmail.com
c89f4ff91efb821c3141a27ac74297541c858a55
d7dd88823655437b3ffbf3eb8b3a789cd87bc503
/src/main/java/org/reactome/web/diagram/renderers/layout/s300/RNADrugRenderer300.java
c3f65eece3fbf1054e36ba5d5439574ea0140051
[]
no_license
reactome-pwp/diagram
fcfc9cbae6d6ace27e52d5714e0fc75e40570cad
55419a20d5bb4d5f7dbcbd0e253b20cb086a2895
refs/heads/master
2023-06-23T11:34:38.438713
2023-06-13T16:34:45
2023-06-13T16:34:45
39,070,905
5
6
null
2021-06-01T18:38:10
2015-07-14T11:27:19
Java
UTF-8
Java
false
false
599
java
package org.reactome.web.diagram.renderers.layout.s300; import org.reactome.web.diagram.data.layout.Coordinate; import org.reactome.web.diagram.data.layout.DiagramObject; import org.reactome.web.diagram.renderers.layout.abs.RNADrugAbstractRenderer; import org.reactome.web.diagram.util.AdvancedContext2d; /** * @author Antonio Fabregat <fabregat@ebi.ac.uk> */ public class RNADrugRenderer300 extends RNADrugAbstractRenderer { @Override public void draw(AdvancedContext2d ctx, DiagramObject item, Double factor, Coordinate offset) { super.draw(ctx, item, factor, offset); } }
[ "fabregat.antonio@gmail.com" ]
fabregat.antonio@gmail.com
d1b4be6fdc139e8e0451082a7cd4a3e1c045d1a3
76852b1b29410436817bafa34c6dedaedd0786cd
/sources-2020-11-04-tempmail/sources/com/google/android/gms/internal/ads/zzdoz.java
a8ad78a65f2e782ae02597de2e2ab19007c42bfe
[]
no_license
zteeed/tempmail-apks
040e64e07beadd8f5e48cd7bea8b47233e99611c
19f8da1993c2f783b8847234afb52d94b9d1aa4c
refs/heads/master
2023-01-09T06:43:40.830942
2020-11-04T18:55:05
2020-11-04T18:55:05
310,075,224
0
0
null
null
null
null
UTF-8
Java
false
false
1,058
java
package com.google.android.gms.internal.ads; import java.util.concurrent.ScheduledExecutorService; /* compiled from: com.google.android.gms:play-services-ads@@19.2.0 */ public final class zzdoz implements zzela<zzdou> { /* renamed from: a reason: collision with root package name */ private final zzelj<zzdvi> f8453a; /* renamed from: b reason: collision with root package name */ private final zzelj<ScheduledExecutorService> f8454b; /* renamed from: c reason: collision with root package name */ private final zzelj<ay> f8455c; private zzdoz(zzelj<zzdvi> zzelj, zzelj<ScheduledExecutorService> zzelj2, zzelj<ay> zzelj3) { this.f8453a = zzelj; this.f8454b = zzelj2; this.f8455c = zzelj3; } public static zzdoz a(zzelj<zzdvi> zzelj, zzelj<ScheduledExecutorService> zzelj2, zzelj<ay> zzelj3) { return new zzdoz(zzelj, zzelj2, zzelj3); } public final /* synthetic */ Object get() { return new zzdou(this.f8453a.get(), this.f8454b.get(), this.f8455c.get()); } }
[ "zteeed@minet.net" ]
zteeed@minet.net
e8996f85de3ecf55cb48c29df59b8f37cb7f8b97
5a088135a99a386e473f94f971c571864373865c
/05.HWE/02.Engineering/03.Code/01.server/branches/hwe0.1.6/02.HWE-pay/src/main/java/com/lenovohit/hwe/pay/support/alipay/utils/Utils.java
dd503f56a9d3fdd0c32ad0a5a84556f62edc0fe7
[]
no_license
jacky-cyber/work
a7bebd2cc910da1e9e227181def880a78cc1de07
e58558221b2a8f410b087fa2ce88017cea12efa4
refs/heads/master
2022-02-25T09:48:53.940782
2018-05-01T10:04:53
2018-05-01T10:04:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,301
java
package com.lenovohit.hwe.pay.support.alipay.utils; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import com.lenovohit.core.utils.StringUtils; /** * Created by liuyangkly on 15/6/27. * 杂物工具类 */ public class Utils { private Utils() { // No instances. } public static String toAmount(long amount) { return new BigDecimal(amount).divide(new BigDecimal(100)).toString(); } public static String toDate(Date date) { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date); } public static boolean isEmpty(Object object) { if (object instanceof String) { return StringUtils.isEmpty((String) object); } return object == null; } public static boolean isNotEmpty(Object object) { return !isEmpty(object); } public static <T> boolean isListNotEmpty(List<T> list) { return list != null && list.size() > 0; } public static <T> boolean isListEmpty(List<T> list) { return !isListNotEmpty(list); } public static void sleep(long time) { try { Thread.sleep(time); } catch (InterruptedException e) { e.printStackTrace(); } } }
[ "liuximing2016@qq.com" ]
liuximing2016@qq.com
bffecffe3921eedcba5b27290ac77fe01ec9ca63
047d9a9048e89626e27ba7f4e12281244df536f8
/contrib-3d/src/main/java/terefang/gdx/contrib/g3d/AbstractScene3dNamed.java
b74665b6a344677eed65c2a8e6ad5441ff8efb7c
[ "0BSD", "LicenseRef-scancode-unknown-license-reference", "ISC" ]
permissive
terefang/terefang-gdx-contrib
0c3121fe9c2ef1b2382f4271bbd7aa3cea7971f1
1123b964d27469d8e8bfa16d08a3f9d7a752bafd
refs/heads/master
2021-06-13T14:58:46.182758
2021-02-18T07:38:26
2021-02-18T07:38:26
141,065,557
0
1
null
null
null
null
UTF-8
Java
false
false
888
java
/* * Copyright (c) 2018. terefang@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package terefang.gdx.contrib.g3d; public abstract class AbstractScene3dNamed extends AbstractScene3dIdable implements IScene3dNamed { String name = "null"; @Override public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
833c1bd1d77855bef73b60cf280f6f1ae194c5a6
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Spring/Spring4772.java
3e7f1888c457b11f92357092a82e7f23b908dc5c
[]
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
734
java
public MimeType(String type, String subtype, @Nullable Map<String, String> parameters) { Assert.hasLength(type, "'type' must not be empty"); Assert.hasLength(subtype, "'subtype' must not be empty"); checkToken(type); checkToken(subtype); this.type = type.toLowerCase(Locale.ENGLISH); this.subtype = subtype.toLowerCase(Locale.ENGLISH); if (!CollectionUtils.isEmpty(parameters)) { Map<String, String> map = new LinkedCaseInsensitiveMap<>(parameters.size(), Locale.ENGLISH); parameters.forEach((attribute, value) -> { checkParameters(attribute, value); map.put(attribute, value); }); this.parameters = Collections.unmodifiableMap(map); } else { this.parameters = Collections.emptyMap(); } }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
fb7d23d5e32ebd42a903ca7a9c87338de95b6d29
6eb010ece91f1b2ef6b4a48c0f078f67401ccacd
/app/src/main/java/com/yapin/shanduo/presenter/MyWalletPresenter.java
e6aac8f30767eae6d2a291e9b0fae4086434ea9c
[]
no_license
CQ173/ShanDuo
d29cbc31e7cd2be1f3490f59c64b9fd7b8a97107
0ae5aad9571c7d2d5b27cbf5d26b3ff7e0457155
refs/heads/master
2020-04-01T17:04:04.284143
2018-10-17T07:12:59
2018-10-17T07:12:59
130,808,255
0
0
null
null
null
null
UTF-8
Java
false
false
1,156
java
package com.yapin.shanduo.presenter; import android.content.Context; import com.yapin.shanduo.model.MyWalletModel; import com.yapin.shanduo.model.entity.FlickerPurseInfo; import com.yapin.shanduo.model.impl.MyWalletModelImpl; import com.yapin.shanduo.ui.contract.MywalletContract; /** * Created by dell on 2018/6/4. */ public class MyWalletPresenter implements MywalletContract.Presenter { private MywalletContract.View view; private MyWalletModel myWalletModel; public void init(Context context, MywalletContract.View view) { this.view = view; view.initView(); myWalletModel = new MyWalletModelImpl(); } @Override public void mywallet() { myWalletModel.load(new OnLoadListener <FlickerPurseInfo>() { @Override public void onSuccess(FlickerPurseInfo success) { view.success(success); } @Override public void onError(String msg) { view.error(msg); } @Override public void networkError() { view.networkError(); } }); } }
[ "1322127081@qq.com" ]
1322127081@qq.com
54da54fe1cea20841c848c37bdf277868f7778fd
489dbf038dc81578ee3d1f3465e10d2148a7d3d5
/name.martingeisse.wicket/src/main/java/name/martingeisse/wicket/util/WicketPageUtil.java
be863054825d1eeb3727ba705dbcc711fc1731e4
[ "MIT" ]
permissive
MartinGeisse/public
9b3360186be7953d2185608da883916622ec84e3
57b905485322222447187ae78a5a56bf3ce67900
refs/heads/master
2023-01-21T03:00:43.350628
2016-03-20T16:30:09
2016-03-20T16:30:09
4,472,103
1
0
NOASSERTION
2022-12-27T14:45:54
2012-05-28T15:56:16
Java
UTF-8
Java
false
false
1,025
java
/** * Copyright (c) 2010 Martin Geisse * * This file is distributed under the terms of the MIT license. */ package name.martingeisse.wicket.util; import org.apache.wicket.core.request.handler.IPageClassRequestHandler; import org.apache.wicket.request.cycle.RequestCycle; /** * Utility methods to deal with pages. */ public final class WicketPageUtil { /** * Redirects to a new instance of the current page class, with the current page * parameters. Useful to escape when stuck in a stateful page with outdated values. */ public static void setResponsePageToNewPageInstance() { RequestCycle requestCycle = RequestCycle.get(); IPageClassRequestHandler requestHandler = requestCycle.find(IPageClassRequestHandler.class); if (requestHandler == null) { throw new IllegalStateException("no IPageClassRequestHandler found"); } requestCycle.setResponsePage(requestHandler.getPageClass(), requestHandler.getPageParameters()); } /** * Prevent instantiation. */ private WicketPageUtil() { } }
[ "martingeisse@googlemail.com" ]
martingeisse@googlemail.com
a6396e4358dd0cdc44540c7722c162f017ba5fea
fa338aa9a23c959b549a38ea732670415dd52fab
/src/com/portal/cms/service/ChannelCountCacheImpl.java
422513ab74dbe08b117054ee41126edcb9abb5be
[]
no_license
liumangafei/lsq-portal
0529cd3aa49cf00ee3204f06d2dc7eb4f2a0351b
7a1ea543a085ec283546f466b8d0c86195a8d487
refs/heads/master
2020-04-10T17:32:06.555978
2015-07-12T15:58:49
2015-07-12T15:58:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,446
java
package com.portal.cms.service; import net.sf.ehcache.Ehcache; import net.sf.ehcache.Element; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import com.portal.cms.entity.main.ChannelCount; import com.portal.cms.manager.main.ChannelCountMng; import com.portal.cms.manager.main.ChannelMng; /** * 栏目计数器缓存实现 */ @Service public class ChannelCountCacheImpl implements ChannelCountCache, DisposableBean { private Logger log = LoggerFactory.getLogger(ChannelCountCacheImpl.class); /** * @see ChannelCountCache#viewAndGet(Integer) */ public int[] viewAndGet(Integer id) { ChannelCount count=channelMng.findById(id).getChannelCount(); if (count == null) { return null; } Element e = cache.get(count.getId()); Integer view; if (e != null) { view = (Integer) e.getValue() + 1; } else { view = 1; } cache.put(new Element(id, view)); refreshToDB(); return new int[] { view + count.getViews() }; } private void refreshToDB() { long time = System.currentTimeMillis(); if (time > refreshTime + interval) { refreshTime = time; int count = channelCountMng.freshCacheToDB(cache); // 清除缓存 cache.removeAll(); log.info("refresh cache views to DB: {}", count); } } /** * 销毁BEAN时,缓存入库。 */ public void destroy() throws Exception { int count = channelCountMng.freshCacheToDB(cache); log.info("Bean destroy.refresh cache views to DB: {}", count); } // 间隔时间 private int interval = 1 * 60 * 1000; // 10分钟 // 最后刷新时间 private long refreshTime = System.currentTimeMillis(); private ChannelCountMng channelCountMng; private ChannelMng channelMng; private Ehcache cache; /** * 刷新间隔时间 * * @param interval * 单位分钟 */ public void setInterval(int interval) { this.interval = interval * 60 * 1000; } @Autowired public void setChannelCountMng(ChannelCountMng channelCountMng) { this.channelCountMng = channelCountMng; } @Autowired public void setChannelMng(ChannelMng channelMng) { this.channelMng = channelMng; } @Autowired public void setCache(@Qualifier("channelCount")Ehcache cache) { this.cache = cache; } }
[ "loushi135@163.com" ]
loushi135@163.com
af15e4d916b3f73ac90bbaafc5bcd0ee15b0c612
15b260ccada93e20bb696ae19b14ec62e78ed023
/v2/src/main/java/com/alipay/api/domain/ScheduleResResult.java
49ec9cb490e121e27f67a75d821f499b46e60f7d
[ "Apache-2.0" ]
permissive
alipay/alipay-sdk-java-all
df461d00ead2be06d834c37ab1befa110736b5ab
8cd1750da98ce62dbc931ed437f6101684fbb66a
refs/heads/master
2023-08-27T03:59:06.566567
2023-08-22T14:54:57
2023-08-22T14:54:57
132,569,986
470
207
Apache-2.0
2022-12-25T07:37:40
2018-05-08T07:19:22
Java
UTF-8
Java
false
false
926
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 排班调度资源查询结果 * * @author auto create * @since 1.0, 2020-05-07 15:30:21 */ public class ScheduleResResult extends AlipayObject { private static final long serialVersionUID = 1346666768125524287L; /** * 返回码 */ @ApiField("code") private String code; /** * 结果 */ @ApiField("data") private ScheduleResItem data; /** * 返回消息 */ @ApiField("message") private String message; public String getCode() { return this.code; } public void setCode(String code) { this.code = code; } public ScheduleResItem getData() { return this.data; } public void setData(ScheduleResItem data) { this.data = data; } public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } }
[ "auto-publish" ]
auto-publish
a1137067be4e97b62f57a4d7756b9c88bae6e2be
43eb759f66530923dfe1c6e191ec4f350c097bd9
/projects/commons-math/src/test/java/org/apache/commons/math3/random/Well512aTest.java
f88938a28405fe9c70dbe853734c4b84bf65086f
[ "MIT", "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-public-domain", "Minpack", "LicenseRef-scancode-generic-cla" ]
permissive
hayasam/lightweight-effectiveness
fe4bd04f8816c6554e35c8c9fc8489c11fc8ce0b
f6ef4c98b8f572a86e42252686995b771e655f80
refs/heads/master
2023-08-17T01:51:46.351933
2020-09-03T07:38:35
2020-09-03T07:38:35
298,672,257
0
0
MIT
2023-09-08T15:33:03
2020-09-25T20:23:43
null
UTF-8
Java
false
false
5,459
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.math3.random; import org.junit.Assert; import org.junit.Test; public class Well512aTest extends RandomGeneratorAbstractTest { @Override public RandomGenerator makeGenerator() { return new Well512a(101); } @Test public void testReferenceCode() { Well512a mt = new Well512a(new int[] { 740849862, 1202665156, -199039369, -259008301, -291878969, -1164428990, -1565918811, 491009864, -1883086670, 1383450241, 1244617256, 689006653, -1576746370, -1307940314, 1421489086, 1742094000 }); int[] refInt = { 1634813289, 1876773016, -973836208, -2130023652, -1045460084, -1834384857, 1691032973, 609714289, 2033920362, 555915483, 6680992, 1958127415, 1866469645, -1471336965, 2049178762, -192324811, -2056050066, 810879705, 1405046309, -781317118, 1012782311, -1045081032, 728377508, 1473511660, 290489070, 326666761, 2018299979, -1876688058, 1239968501, 1464625040, 2025151042, -101397407, 1387902041, 210959839, 1366359326, -476473433, 153180037, -1607631523, -506743495, 17888738, 313865008, -340504498, 586684079, 1243699375, 753162229, -646761694, -739189655, -210120185, -1856358726, -628255542, -1812798197, 1416288088, 1077967722, -846846208, 1379850409, -580183344, -1858959, 210859778, 295841424, 1492774865, -1415543680, -344870570, -1942779197, 1549510646, -389544849, 314254218, 11784988, -1311757368, 1719514841, -764610517, 1296788970, -994707050, 783854563, 422654144, 387639079, 1219688425, 2144352572, -834212874, -1036550358, 935909479, -568610842, 1327498837, -588933178, 1910065754, -40851599, -182063170, 1302731458, 541311559, -1647345522, 805224371, -1721196679, 1518507830, -952689880, -433276260, 509675254, -777259954, 1277810106, 284054896, 936042202, 2036836351, 1956412426, -1186403024, 287795400, 2135311211, 720485927, 1500695024, -281656583, -1277937322, -1628968482, 1242814831, -2030700974, 1473867890, 440813549, -1357033971, 28384076, 1602731216, -641465746, -609054347, 635938444, 1472898176, 1476894555, -747974186, -1590337055, -884242108, -389736197, -2066984505, 1087103272, -1236446290, 31657463, 1835715432, -468439078, -2132633204, -434609235, 258308151, 1851926761, -1630139159, -1344617241, 1969204215, 619463174, -174392624, 207475487, -1619828078, 1327980298, -83968178, 445951782, -1786230541, 6279288, -580982231, 1550645552, 2006533941, 275746007, 455676647, 2019637349, 1115547704, -1313120106, -516213449, 73752461, -1382448112, 398589620, 1319888048, -1595572334, 1566934536, -1735685764, -1509545339, 1458173912, -549395819, -618827040, 1516624531, 1900757187, -1454200688, 965524719, 488355065, -1869294316, -810641680, -2059428251, 1454656431, 1329120541, -232185900, -994996943, 1855980910, -452077812, 1565630611, 759842266, 1241435187, -1390456063, 1946400597, -2032319771, 683667881, 905911106, 1983310786, 120010546, 526018017, -1946881912, 205004987, -1307250612, 2130980818, 2052864161, 189839787, 1789478047, 406168885, -1145186347, 8507675, 1277188815, 1492619042, 2009819675, -1627411598, -851016743, -1828234956, 1962622506, 2140398255, 236935165, -337237772, 1263419111, 516775236, -335741025, 1391328225, 455979249, -1457534664, -657606241, 485648133, 1762116343, 1194889600, 817834937, 321150162, 131159182, 290277758, -1876924740, -1770401129, 1291602973, -1003642974, -1580211929, 1520422021, -399171579, -24315308, 453805396, -659197747, -205656847, 466526550, 1444397201, 1178091401, -1157268826, -602394028, -1370668795, 1614896435, 1699071659, 1864753793, 1888518358, -1721244514, 1812776767, 668822227, -297283057, 2130183333, -1169618692, 912860240, -2028253096, 1244694278 }; for (int i = 0; i < refInt.length; ++i) { Assert.assertEquals(refInt[i], mt.nextInt()); } } }
[ "granogiovanni90@gmail.com" ]
granogiovanni90@gmail.com
5d70188c94ea32b29a18ca0ece0720b56cef7a35
e27942cce249f7d62b7dc8c9b86cd40391c1ddd4
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201702/cm/SizeLimitErrorReason.java
f385e0f6e7337e3ff647ef3605a5e740c730bc29
[ "Apache-2.0" ]
permissive
mo4ss/googleads-java-lib
b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a
efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641
refs/heads/master
2022-12-05T00:30:56.740813
2022-11-16T10:47:15
2022-11-16T10:47:15
108,132,394
0
0
Apache-2.0
2022-11-16T10:47:16
2017-10-24T13:41:43
Java
UTF-8
Java
false
false
3,952
java
// Copyright 2017 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /** * SizeLimitErrorReason.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.adwords.axis.v201702.cm; public class SizeLimitErrorReason implements java.io.Serializable { private java.lang.String _value_; private static java.util.HashMap _table_ = new java.util.HashMap(); // Constructor protected SizeLimitErrorReason(java.lang.String value) { _value_ = value; _table_.put(_value_,this); } public static final java.lang.String _REQUEST_SIZE_LIMIT_EXCEEDED = "REQUEST_SIZE_LIMIT_EXCEEDED"; public static final java.lang.String _RESPONSE_SIZE_LIMIT_EXCEEDED = "RESPONSE_SIZE_LIMIT_EXCEEDED"; public static final java.lang.String _INTERNAL_STORAGE_ERROR = "INTERNAL_STORAGE_ERROR"; public static final java.lang.String _UNKNOWN = "UNKNOWN"; public static final SizeLimitErrorReason REQUEST_SIZE_LIMIT_EXCEEDED = new SizeLimitErrorReason(_REQUEST_SIZE_LIMIT_EXCEEDED); public static final SizeLimitErrorReason RESPONSE_SIZE_LIMIT_EXCEEDED = new SizeLimitErrorReason(_RESPONSE_SIZE_LIMIT_EXCEEDED); public static final SizeLimitErrorReason INTERNAL_STORAGE_ERROR = new SizeLimitErrorReason(_INTERNAL_STORAGE_ERROR); public static final SizeLimitErrorReason UNKNOWN = new SizeLimitErrorReason(_UNKNOWN); public java.lang.String getValue() { return _value_;} public static SizeLimitErrorReason fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { SizeLimitErrorReason enumeration = (SizeLimitErrorReason) _table_.get(value); if (enumeration==null) throw new java.lang.IllegalArgumentException(); return enumeration; } public static SizeLimitErrorReason fromString(java.lang.String value) throws java.lang.IllegalArgumentException { return fromValue(value); } public boolean equals(java.lang.Object obj) {return (obj == this);} public int hashCode() { return toString().hashCode();} 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(SizeLimitErrorReason.class); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201702", "SizeLimitError.Reason")); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
07ce4a048a541243ec4ce7fe67ebf0773c6bc7d3
ba1390ede5d7d004b30682e8fb49fcd518aaf78e
/cas-server-support-spnego/src/main/java/org/jasig/cas/support/spnego/util/SpnegoConstants.java
20fe5246ba3ff6be7c4808ff2188a935071cbb6e
[]
no_license
shaisxx/cas-server-v3.5.2
a282c156f6731c91d38148852af12b8a3b606eb0
34ba6be5399ceb3f2db60d4f719444b3ff3d4b3b
refs/heads/master
2021-01-18T21:02:26.708599
2016-06-16T03:47:22
2016-06-16T03:47:22
66,063,157
1
0
null
2016-08-19T07:41:17
2016-08-19T07:41:16
null
UTF-8
Java
false
false
1,495
java
/* * Licensed to Jasig under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. * Jasig 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 the following location: * * 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.jasig.cas.support.spnego.util; /** * Spnego Constants * * @author Arnaud Lesueur * @author Marc-Antoine Garrigue * @version $Revision$ $Date$ * @since 3.1 */ public interface SpnegoConstants { String HEADER_AUTHENTICATE = "WWW-Authenticate"; String HEADER_AUTHORIZATION = "Authorization"; String HEADER_USER_AGENT = "User-Agent"; String NEGOTIATE = "Negotiate"; String SPNEGO_FIRST_TIME = "spnegoFirstTime"; String SPNEGO_CREDENTIALS = "spnegoCredentials"; byte[] NTLMSSP_SIGNATURE = new byte[]{(byte) 'N', (byte) 'T', (byte) 'L', (byte) 'M', (byte) 'S', (byte) 'S', (byte) 'P', (byte) 0}; String NTLM = "NTLM"; }
[ "xushaomin@foxmail.com" ]
xushaomin@foxmail.com
eba0dcea4656ab96907ea0c224ae3603d1c4d570
49ffdcc00481e0ad6178d759336e0379cc0ffd8b
/src/main/java/com/ezendai/credit2/rule/dao/impl/SignLoanRuleDaoImpl.java
ac80658dfe51fc942300b0ddd5da7405bbbd0c4e
[]
no_license
InverseOfControl/car
5ffaffc0d37ed0476bc58e89ae975ec369b908cf
351962fc6378612b2127b18c33088dbff39c2dd3
refs/heads/master
2020-03-09T23:05:51.599055
2018-04-12T02:38:54
2018-04-12T02:38:54
129,050,850
0
1
null
null
null
null
UTF-8
Java
false
false
965
java
package com.ezendai.credit2.rule.dao.impl; import org.springframework.stereotype.Repository; import com.ezendai.credit2.framework.dao.impl.BaseDaoImpl; import com.ezendai.credit2.rule.dao.SignLoanRuleDao; import com.ezendai.credit2.rule.model.LoanRule; import com.ezendai.credit2.rule.vo.LoanRuleVO; /** * * <pre> * 特殊签单规则设置的Dao实现 * </pre> * * @author zhangshihai * @version $Id: LoanRuleDaoImpl.java, v 0.1 2014年8月22日 下午12:34:42 zhangshihai Exp $ */ @Repository public class SignLoanRuleDaoImpl extends BaseDaoImpl<LoanRule> implements SignLoanRuleDao { @Override public int invalidRule(LoanRuleVO loanRuleVO) { return getSqlSession().update(getIbatisMapperNameSpace() + ".invalidRule", loanRuleVO); } @Override public int getCountByVO(LoanRuleVO loanRuleVO) { Object count = getSqlSession().selectOne(getIbatisMapperNameSpace() + ".ruleCount", loanRuleVO); return Integer.parseInt(count.toString()); } }
[ "gaohongxuhappy@163.com" ]
gaohongxuhappy@163.com
763dab5091a2f3eec11a485653b6d7b404e8e965
38d815e3b2c4f7ba96d674f58e8f394e8b6d8d10
/last-resort/cg-src-pool/mutated/Mockito_18_9.java
59423a3aaf1fc93d206f64e2b5c095c54625e6d8
[ "Apache-2.0" ]
permissive
Shoeboxam/Automatic-Patch-Validation
64ef4438c422c197478d36a7a6372cd6e8ed7a18
9c5e09670794be0117b93824dd8869c6696f4b55
refs/heads/master
2020-05-20T18:36:50.158833
2019-05-08T22:28:53
2019-05-08T22:28:53
185,686,726
0
0
null
null
null
null
UTF-8
Java
false
false
1,418
java
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.debugging; import org.mockito.internal.invocation.InvocationMatcher; import org.mockito.internal.util.MockitoLogger; import org.mockito.internal.util.SimpleMockitoLogger; import org.mockito.invocation.Invocation; import java.util.List; public class WarningsPrinterImpl { private final boolean warnAboutUnstubbed; private final WarningsFinder finder; public WarningsPrinterImpl(List<Invocation> unusedStubs, List<InvocationMatcher> unstubbedInvocations) { this(unusedStubs, unstubbedInvocations, false); } public WarningsPrinterImpl(List<Invocation> unusedStubs, List<InvocationMatcher> allInvocations, boolean warnAboutUnstubbed) { this(warnAboutUnstubbed, new WarningsFinder(unusedStubs, allInvocations)); } WarningsPrinterImpl(boolean warnAboutUnstubbed, WarningsFinder finder) { this.warnAboutUnstubbed = warnAboutUnstubbed; this.finder = finder; } public void print(final MockitoLogger logger) { finder.find(new LoggingListener(warnAboutUnstubbed, logger)); } public String print() { SimpleMockitoLogger logger = new SimpleMockitoLogger(); this.print(logger); return new org.mockito.internal.util.SimpleMockitoLogger().getLoggedInfo(); } }
[ "ali.ghanbari@utdallas.edu" ]
ali.ghanbari@utdallas.edu
eb5af24ff229bed9418a96efc8852a5f57a1b349
58c1178e7c8008030cabc76b1d544693e01a7a71
/chapter0-1-0/src/main/java/com/goat/lang3/MyStrUtil.java
a097c4724281509fb9cb2b255b7b552fa6b72a15
[]
no_license
sunhao28256/springboot
a7b3703b688cef48942528c2adeb169c2039497b
57ff783e5b35a6665b5e3533312bbe566be8d814
refs/heads/master
2020-07-13T23:23:29.962369
2019-08-29T12:23:25
2019-08-29T12:23:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
997
java
package com.goat.lang3; import org.junit.Test; import java.text.DecimalFormat; /** * Created by 64274 on 2019/6/12. * * @ Description: 自己的字符串 工具类 * @ author 山羊来了 * @ date 2019/6/12---15:38 */ public class MyStrUtil { @Test public void test(){ // 用 0 填充 填充后总长度为4位 待填充内容 == String haha = fill("1", 6, 9); System.out.println(haha); // 0001 } /** * @Description: 功能描述: 格式填充 * @author: Goat * @Param: mark 填充标记 (使用什么内容填充) * @Param: count 填充后的总长度 * @Param: num 待填充内容 * @Return: * @Date: 2019年6月12日16:19:19 */ public String fill(String mark,Integer count,Integer num){ StringBuilder sb = new StringBuilder(); for (int i = 0; i < count; i++) { sb.append(mark); } return new DecimalFormat(sb.toString()).format(num); } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
67a18441ae46d932578ce0c91041b33032a13768
90800e4e0495075e9a33250ddc71a24a8988682c
/cloud-memcache/src/main/java/io/activej/memcache/client/AbstractMemcacheClient.java
b4a7e44a4810edbe1e97514ef604115829745e7a
[ "Apache-2.0" ]
permissive
akullpp/activej
5421cbfe439399a2136fa0d2f4a22319c2b037cf
069c906110f44046bcd028877cfae36c36f80c4b
refs/heads/master
2022-11-16T17:13:13.140273
2020-07-16T14:51:48
2020-07-16T14:51:48
280,828,147
6
1
Apache-2.0
2020-07-19T08:56:58
2020-07-19T08:56:57
null
UTF-8
Java
false
false
2,191
java
/* * Copyright (C) 2020 ActiveJ LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.activej.memcache.client; import io.activej.memcache.protocol.MemcacheRpcMessage.GetRequest; import io.activej.memcache.protocol.MemcacheRpcMessage.GetResponse; import io.activej.memcache.protocol.MemcacheRpcMessage.PutRequest; import io.activej.memcache.protocol.MemcacheRpcMessage.Slice; import io.activej.promise.Promise; import io.activej.rpc.client.IRpcClient; public abstract class AbstractMemcacheClient<K, V> implements MemcacheClient<K, V> { private final IRpcClient rpcClient; protected AbstractMemcacheClient(IRpcClient rpcClient) { this.rpcClient = rpcClient; } protected abstract byte[] encodeKey(K key); protected abstract Slice encodeValue(V value); protected abstract V decodeValue(Slice slice); @Override public Promise<Void> put(K key, V value, int timeout) { PutRequest request = new PutRequest(encodeKey(key), encodeValue(value)); return rpcClient.sendRequest(request, timeout).toVoid(); } @Override public Promise<V> get(K key, int timeout) { GetRequest request = new GetRequest(encodeKey(key)); return rpcClient.<GetRequest, GetResponse>sendRequest(request, timeout) .map(response -> decodeValue(response.getData())); } @Override public Promise<Void> put(K key, V value) { PutRequest request = new PutRequest(encodeKey(key), encodeValue(value)); return rpcClient.sendRequest(request).toVoid(); } @Override public Promise<V> get(K key) { GetRequest request = new GetRequest(encodeKey(key)); return rpcClient.<GetRequest, GetResponse>sendRequest(request) .map(response -> decodeValue(response.getData())); } }
[ "dmitry@activej.io" ]
dmitry@activej.io
4983bf3427144273915a8015f1f870177dd9e19e
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2016/8/BuiltInProceduresProvider.java
7ac07e30146a767eeb49c4a9f162f298212817dc
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
1,551
java
/* * Copyright (c) 2002-2016 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.builtinprocs; import org.neo4j.helpers.Service; import org.neo4j.kernel.api.exceptions.KernelException; import org.neo4j.kernel.impl.factory.ProceduresProvider; import org.neo4j.kernel.impl.proc.Procedures; @Service.Implementation( ProceduresProvider.class ) public class BuiltInProceduresProvider extends Service implements ProceduresProvider { public BuiltInProceduresProvider() { super( "built-in-procedures-provider" ); } @Override public void registerProcedures( Procedures procedures ) { try { procedures.register( BuiltInProcedures.class ); } catch ( KernelException e ) { throw new RuntimeException( e ); } } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
47a4bc2d2cb1b52971b025de2d4220514e01e4d1
d49e3ff34467c71630681df5a791cb3e4bd72ab7
/src/com/adobe/primetime/core/radio/Radio.java
dd3101964f50219e05245c8669b555e27cfeea22
[]
no_license
reverseengineeringer/com.gogoair.ife
124691cf49e832f5dd8009ceb590894a7a058dfa
e88a26eec5640274844e6cdafcd706be727e8ae3
refs/heads/master
2020-09-15T19:45:27.094286
2016-09-01T13:32:34
2016-09-01T13:32:34
67,133,682
0
0
null
null
null
null
UTF-8
Java
false
false
1,032
java
package com.adobe.primetime.core.radio; import com.adobe.primetime.core.ILogger; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.Map; public class Radio { private Map _channels; private ILogger _logger; public Radio(ILogger paramILogger) { if (paramILogger == null) { throw new Error("Reference to the logger object cannot be NULL"); } _logger = paramILogger; _channels = new HashMap(); } public Channel channel(String paramString) { if (_channels.get(paramString) == null) { _channels.put(paramString, new Channel(paramString, _logger)); } return (Channel)_channels.get(paramString); } public void shutdown() { Iterator localIterator = _channels.values().iterator(); while (localIterator.hasNext()) { ((Channel)localIterator.next()).shutdown(); } } } /* Location: * Qualified Name: com.adobe.primetime.core.radio.Radio * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
686229e9fc1b3e6e1831e79836c463494e1c858a
7a637e9654f3b6720d996e9b9003f53e40f94814
/aylson-dao/src/main/java/com/aylson/dc/cfdb/search/UserTasklistHisSearch.java
27235f1bd6bacf4389fe25ab3b848ec348e6ee7f
[]
no_license
hemin1003/aylson-parent
118161fc9f7a06b583aa4edd23d36bdd6e000f33
1a2a4ae404705871717969449370da8531028ff9
refs/heads/master
2022-12-26T14:12:19.452615
2019-09-20T01:58:40
2019-09-20T01:58:40
97,936,256
161
103
null
2022-12-16T07:38:18
2017-07-21T10:30:03
JavaScript
UTF-8
Java
false
false
630
java
package com.aylson.dc.cfdb.search; import com.aylson.core.frame.search.BaseSearch; public class UserTasklistHisSearch extends BaseSearch{ private static final long serialVersionUID = 2015547934553985736L; //模糊查询 private String phoneIdLike; //手机唯一标识码 private String taskNameLike; //任务名称 public String getPhoneIdLike() { return phoneIdLike; } public void setPhoneIdLike(String phoneIdLike) { this.phoneIdLike = phoneIdLike; } public String getTaskNameLike() { return taskNameLike; } public void setTaskNameLike(String taskNameLike) { this.taskNameLike = taskNameLike; } }
[ "hemin_it@163.com" ]
hemin_it@163.com
f8659c75e68e124a5095396814c225dfd600f210
c857a144d1b71f000071c6dbfb0d3664d1764c4c
/user-center-core/com/easou/usercenter/web/user/UserCenterController.java
b4e40520beb8c5b0bb244ce689afbb551e8420f0
[]
no_license
smsg-game/usercenter
81e5430145dd4cf5c9af5ce992bb0224bae56d29
8d655d57b305a4cda14e85fbdf1078392981f6ca
refs/heads/master
2021-01-10T03:34:30.165498
2015-12-08T07:38:57
2015-12-08T07:38:57
47,591,346
1
1
null
null
null
null
UTF-8
Java
false
false
1,645
java
package com.easou.usercenter.web.user; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import com.easou.common.util.MobileUtil; import com.easou.usercenter.entity.EucUser; import com.easou.usercenter.service.EucUserService; @Controller //@RequestMapping("/user/userCenter") public class UserCenterController extends UserBaseController { @Resource(name = "eucUserServiceImpl") private EucUserService eucUserService; @RequestMapping("/user/userCenter") public String show(ModelMap model, final HttpServletRequest request, final HttpServletResponse response) { ArrestValidation av = checkLogin(request, model); // if(!av.isLogin()) { // model.addAttribute("redirUrl", av.getBackUrl()); // model.addAttribute("retMessage", "非法操作,系统将在3 秒后返回..."); // return "result"; // } EucUser user = eucUserService.queryUserInfoById(av.getUserId()); if (null == user) { // 该id用户不存在 removeLoginAssert(request); model.addAttribute("redirUrl", av.getBackUrl()); model.addAttribute("retMessage", "非法操作,系统将在3 秒后返回..."); return "result"; } model.addAttribute("eaId",user.getId()); model.addAttribute("mobile",MobileUtil.secertString(user.getMobile())); model.addAttribute("email",MobileUtil.secertString(user.getEmail())); model.addAttribute("nickName", user.getNickName()); return "default/ui/userCenter"; } }
[ "dogdog7788@qq.com" ]
dogdog7788@qq.com
042ce79110167d17f1f8f37a8bd32145bf36c7d9
6bd8df11384e39077a362c3b1711b24437dc3e73
/src/main/java/com/mycompany/myapp/config/AsyncConfiguration.java
d16bbe0e92fdf402d02f72ff516ac8e70a13a9cb
[]
no_license
pierre-filliolaud/jhipster-bigchaindb-app
fa9fd9602f788b792e6d07401f36e83e57ea5345
7f004eee542a532409f6bf1616c6309c8b7332ba
refs/heads/master
2020-05-21T10:11:00.316484
2016-09-21T14:50:22
2016-09-21T14:50:22
68,819,350
1
0
null
null
null
null
UTF-8
Java
false
false
1,640
java
package com.mycompany.myapp.config; import com.mycompany.myapp.async.ExceptionHandlingAsyncTaskExecutor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.*; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import java.util.concurrent.Executor; import javax.inject.Inject; @Configuration @EnableAsync @EnableScheduling public class AsyncConfiguration implements AsyncConfigurer { private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class); @Inject private JHipsterProperties jHipsterProperties; @Override @Bean(name = "taskExecutor") public Executor getAsyncExecutor() { log.debug("Creating Async Task Executor"); ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize()); executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize()); executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity()); executor.setThreadNamePrefix("bigchaindbjhipster-Executor-"); return new ExceptionHandlingAsyncTaskExecutor(executor); } @Override public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { return new SimpleAsyncUncaughtExceptionHandler(); } }
[ "pierre.filliolaud@gmail.com" ]
pierre.filliolaud@gmail.com