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
61f87fcf18966f19d857d94ec6f3e57c0309c2db
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/validation/org/drools/verifier/core/checks/base/CheckRunManagerRepeatingCommandTest.java
31524a5caa482c4a57873fe78d270de72bf648d0
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
1,336
java
/** * Copyright 2018 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.drools.verifier.core.checks.base; import java.util.HashSet; import org.junit.Test; import org.mockito.Mockito; public class CheckRunManagerRepeatingCommandTest { private HashSet<Check> checksToRun; @Test public void testRunAll() throws Exception { final ChecksRepeatingCommand checksRepeatingCommand = new ChecksRepeatingCommand(checksToRun, null, null); while (checksRepeatingCommand.execute()) { // Loopidiloop } final Check[] array = checksToRun.toArray(new Check[checksToRun.size()]); for (int i = 0; i < 100; i++) { // System.out.println( "i " + i ); Mockito.verify(array[i]).check(); } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
4123b1136f7e30545f4a073ff945748189c2d8f0
013056e44ecf131f5ff76f5280e05c95d443303a
/IDE Files/Phase2/src/main/controllers/SHPController/encog/neural/networks/training/pnn/package-info.java
80c7bd50315eb0727b2736768bbabc7bfc2a6ecf
[]
no_license
neguskay/CS5099-Dissertation
f1921b15d370e056a7d6d8e6aee26ef8224ed390
561d48318c720e3963775953bd67c75cb9ccd002
refs/heads/master
2020-04-10T09:46:32.247792
2018-12-08T15:20:47
2018-12-08T15:20:47
160,946,902
0
0
null
null
null
null
UTF-8
Java
false
false
922
java
/* * Encog(tm) Core v3.4 - Java Version * http://www.heatonresearch.com/encog/ * https://github.com/encog/encog-java-core * Copyright 2008-2016 Heaton Research, 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. * * For more information on Heaton Research copyrights, licenses * and trademarks visit: * http://www.heatonresearch.com/copyright */ package org.encog.neural.networks.training.pnn;
[ "neguskay93@gmail.com" ]
neguskay93@gmail.com
6365f0cf473798ee298d3c4bbdc6bede8060c551
e617f4ae796f16eeb4705200935a90dfd31955b2
/okio/BufferedSource.java
200ee5242bd71605f676d2c0caca71b1295c514c
[]
no_license
mascot6699/Go-Jek.Android
98dfb73b1c52a7c2100c7cf8baebc0a95d5d511d
051649d0622bcdc7872cb962a0e1c4f6c0f2a113
refs/heads/master
2021-01-20T00:24:46.431341
2016-01-11T05:59:34
2016-01-11T05:59:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,876
java
package okio; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; public abstract interface BufferedSource extends Source { public abstract Buffer buffer(); public abstract boolean exhausted() throws IOException; public abstract long indexOf(byte paramByte) throws IOException; public abstract long indexOf(byte paramByte, long paramLong) throws IOException; public abstract long indexOfElement(ByteString paramByteString) throws IOException; public abstract long indexOfElement(ByteString paramByteString, long paramLong) throws IOException; public abstract InputStream inputStream(); public abstract int read(byte[] paramArrayOfByte) throws IOException; public abstract int read(byte[] paramArrayOfByte, int paramInt1, int paramInt2) throws IOException; public abstract long readAll(Sink paramSink) throws IOException; public abstract byte readByte() throws IOException; public abstract byte[] readByteArray() throws IOException; public abstract byte[] readByteArray(long paramLong) throws IOException; public abstract ByteString readByteString() throws IOException; public abstract ByteString readByteString(long paramLong) throws IOException; public abstract long readDecimalLong() throws IOException; public abstract void readFully(Buffer paramBuffer, long paramLong) throws IOException; public abstract void readFully(byte[] paramArrayOfByte) throws IOException; public abstract long readHexadecimalUnsignedLong() throws IOException; public abstract int readInt() throws IOException; public abstract int readIntLe() throws IOException; public abstract long readLong() throws IOException; public abstract long readLongLe() throws IOException; public abstract short readShort() throws IOException; public abstract short readShortLe() throws IOException; public abstract String readString(long paramLong, Charset paramCharset) throws IOException; public abstract String readString(Charset paramCharset) throws IOException; public abstract String readUtf8() throws IOException; public abstract String readUtf8(long paramLong) throws IOException; public abstract String readUtf8Line() throws IOException; public abstract String readUtf8LineStrict() throws IOException; public abstract boolean request(long paramLong) throws IOException; public abstract void require(long paramLong) throws IOException; public abstract void skip(long paramLong) throws IOException; } /* Location: /Users/michael/Downloads/dex2jar-2.0/GO_JEK.jar!/okio/BufferedSource.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "michael@MJSTONE-MACBOOK.local" ]
michael@MJSTONE-MACBOOK.local
389bc9515b723d259bc3d4ddec032a87ffad03e9
439ed94091935a045f84c91f8d8bcc889c7cf271
/FastestDeliveryMan_ModuleC/src/java/Employee/CustomerInfoRetrieval.java
057125eb881c14c78f0ed74e24b68ea14bccc1f9
[]
no_license
Chan1996/FOS
b876caf2496d11aaa50363520402b65eff22f59c
dadb2ff4d3a01d41e12581e58adae86042ac7c2b
refs/heads/master
2021-08-30T01:21:04.913128
2017-12-15T14:20:47
2017-12-15T14:23:11
110,575,625
1
0
null
null
null
null
UTF-8
Java
false
false
4,658
java
package Employee; import java.util.Scanner; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.PreparedStatement; public class CustomerInfoRetrieval { Scanner scanner = new Scanner(System.in); public CustomerInfoRetrieval(){ try { int redo; do { redo = 0; Connection conn = DriverManager.getConnection("jdbc:derby://localhost:1527/ModuleCPrototypedatabase", "ModuleC", "ModuleC"); String contactNumber; boolean invalid = false; do{ invalid = false; System.out.println("Delivery Query System"); System.out.println("---------------------"); System.out.println("Please enter a contact number in the format (xxx-xxxxxxx) to start querying: "); contactNumber = scanner.nextLine(); if (contactNumber.length() != 11){ invalid = true; System.out.println("\n"); System.out.println("\n"); System.out.println("\n"); System.out.println("Invalid contact number, try again\n"); } }while (invalid == true); String firstThree = contactNumber.substring(0, 3); String lastSegment = contactNumber.substring(4); PreparedStatement statementQuery = conn.prepareStatement("Select * from customer_delivery where customer_contactnumber = ? and status_delivered = false"); statementQuery.setString(1, firstThree.concat(lastSegment)); System.out.println("\n"); ResultSet results = statementQuery.executeQuery(); if (results.next() == false){ System.out.println("No active deliveries pending for selected contact number"); //Retieve customer details based on contact number so that i can proceed with my work } else { System.out.println("Result 1:"); System.out.println("-----------------"); System.out.println("Contact Number: "+results.getString("Customer_ContactNumber")); System.out.println("Order ID: "+results.getString("Order_ID")); System.out.println("Customer Name: "+results.getString("Customer_Name")); System.out.println("Customer Address: "+results.getString("Customer_DELIVERY_Address")); System.out.println("Enter any value to proceed"); String valuePlaceholder = scanner.nextLine(); for (int index = 2;results.next()==true; index++){ System.out.println("\n"); System.out.println("\n"); System.out.println("Result "+index+":"); System.out.println("-----------------"); System.out.println("Contact Number: "+results.getString("Customer_ContactNumber")); System.out.println("Order ID: "+results.getString("Order_ID")); System.out.println("Customer Name: "+results.getString("Customer_Name")); System.out.println("Customer Address: "+results.getString("Customer_DELIVERY_Address")); System.out.println("Enter any value to proceed"); valuePlaceholder = scanner.nextLine(); } } int errorFree; do { errorFree = 1; System.out.println("Is there more queries?: (Enter 1 for yes)"); String input = scanner.nextLine(); System.out.println("\n"); System.out.println("\n"); try { redo = Integer.parseInt(input); } catch (Exception ex){ errorFree = 0; System.out.println("Only integers are allowed"); } } while (errorFree == 0); }while(redo == 1); } catch (Exception ex){ ex.printStackTrace(); } } }
[ "lenovo@Lenovo-PC" ]
lenovo@Lenovo-PC
0deeccdea4ed616746cc8ebc6f695e45134178a2
37b1343af31f288c548c6d7704e7bbbca1cab2a8
/naavisEngage/src/com/versawork/http/service/impl/UpdateProfileInfoServiceImpl.java
19e0f43436edb085b528ad5fe7ab664a380f5f86
[]
no_license
saubhagya1987/myproj3
5ccb63ee3896fe0ed2c1b880261078ed8f9dcbe4
02424bbdf0695672bf4400318863abaaa7e9f5de
refs/heads/master
2021-01-13T15:32:10.944419
2017-03-17T19:01:30
2017-03-17T19:01:30
85,320,324
0
0
null
null
null
null
UTF-8
Java
false
false
2,380
java
package com.versawork.http.service.impl; import java.util.Locale; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.stereotype.Component; import com.versawork.http.constant.VersaWorkConstant; import com.versawork.http.dao.AccountServiceDAO; import com.versawork.http.dataobject.NsRequest; import com.versawork.http.dataobject.NsResponse; import com.versawork.http.dataobject.ResponseData; import com.versawork.http.exception.BusinessException; import com.versawork.http.exception.SystemException; import com.versawork.http.model.Account; import com.versawork.http.service.UpdateProfileInfoService; import com.versawork.http.utils.MaskUtils; @Component public class UpdateProfileInfoServiceImpl implements UpdateProfileInfoService { final static Logger LOGGER = LoggerFactory.getLogger(UpdateProfileInfoServiceImpl.class); // private static final Boolean isDebugEnabled = LOGGER.isDebugEnabled(); @Autowired private MessageSource messageSource; private static final String CLIENT_DATABASE_ID = "client.database.id"; /* * private static final String INVALID_ENDPOINT_RESPONSE_CODE = * "rsp.data.result.reg.override"; private static final String * INVALID_ENDPOINT_ID = "invalid.endpoint.id"; * * @Autowired private GetProfileInfoDAO getProfileInfoDAO; */ @Autowired private AccountServiceDAO accountServiceDAO; @Override public NsResponse updateProfileInfo(NsRequest nsRequest) throws BusinessException, SystemException { NsResponse nsResponse = new NsResponse(); ResponseData responseData = new ResponseData(); Account account = accountServiceDAO.getAccountByEndpointId( MaskUtils.getDigest(nsRequest.getAccountInfo().getEndpointUserId().getBytes()), Integer.parseInt(messageSource.getMessage(CLIENT_DATABASE_ID, null, nsRequest.getLocale()))); account.setWillShareData(nsRequest.getAccountInfo().isWillShareData()); accountServiceDAO.update(account); responseData.setResult(Integer.parseInt(messageSource.getMessage(VersaWorkConstant.SUCCESS_RESPONSE_CODE, null, nsRequest.getLocale()))); responseData.setDescription(messageSource.getMessage("editprofile.button.update", null, nsRequest.getLocale())); nsResponse.setResponseData(responseData); return nsResponse; } }
[ "saubhagya.bapu@gmail.com" ]
saubhagya.bapu@gmail.com
96fea897707fa2326ee3b54e712ad660bdef0801
7c20d7db37a629bf859cc1b3f14d5906076c78a4
/src/com/master/ed/ApoioED.java
ecbc1bc7345225ad20188db360362c54ce2a5b96
[]
no_license
tbaiocco/nfe4
9055b237338f45afe7ec708c94880cea04887325
8e2416d30797dc8a2b1deaed1633f88ac26b75b2
refs/heads/master
2020-03-24T19:33:25.169266
2018-11-22T18:39:27
2018-11-22T18:39:27
142,933,673
1
0
null
null
null
null
UTF-8
Java
false
false
3,449
java
package com.master.ed; public class ApoioED extends MasterED{ private String DM_Tipo_Apoio; private String NM_Contato; private String NM_Telefone; private String NM_Referencia; private long OID_Apoio; private String NM_Apoio; private double NR_KM; private long OID_Rota; private long OID_Cidade; private long OID_Cidade_Destino; private long OID_Cidade_Apoio; private String NM_Endereco; private String NR_CEP; private String DM_Apoio_Rastreado; private String CD_Roteiro; private String NM_Rodovia; private String NM_Trecho; private String NM_Origem; private String NM_Destino; public void setOID_Rota(long OID_Rota) { this.OID_Rota = OID_Rota; } public long getOID_Rota() { return OID_Rota; } public void setDM_Tipo_Apoio(String DM_Tipo_Apoio) { this.DM_Tipo_Apoio = DM_Tipo_Apoio; } public String getDM_Tipo_Apoio() { return DM_Tipo_Apoio; } public void setOID_Apoio(long OID_Apoio) { this.OID_Apoio = OID_Apoio; } public long getOID_Apoio() { return OID_Apoio; } public void setNM_Contato(String NM_Contato) { this.NM_Contato = NM_Contato; } public String getNM_Contato() { return NM_Contato; } public void setNM_Telefone(String NM_Telefone) { this.NM_Telefone = NM_Telefone; } public String getNM_Telefone() { return NM_Telefone; } public void setNR_KM(double NR_KM) { this.NR_KM = NR_KM; } public double getNR_KM() { return NR_KM; } public void setNM_Referencia(String NM_Referencia) { this.NM_Referencia = NM_Referencia; } public String getNM_Referencia() { return NM_Referencia; } public void setNM_Apoio(String NM_Apoio) { this.NM_Apoio = NM_Apoio; } public String getNM_Apoio() { return NM_Apoio; } public void setOID_Cidade(long OID_Cidade) { this.OID_Cidade = OID_Cidade; } public long getOID_Cidade() { return OID_Cidade; } public void setOID_Cidade_Destino(long OID_Cidade_Destino) { this.OID_Cidade_Destino = OID_Cidade_Destino; } public long getOID_Cidade_Destino() { return OID_Cidade_Destino; } public void setOID_Cidade_Apoio(long OID_Cidade_Apoio) { this.OID_Cidade_Apoio = OID_Cidade_Apoio; } public long getOID_Cidade_Apoio() { return OID_Cidade_Apoio; } public void setNM_Endereco(String NM_Endereco) { this.NM_Endereco = NM_Endereco; } public String getNM_Endereco() { return NM_Endereco; } public void setNR_CEP(String NR_CEP) { this.NR_CEP = NR_CEP; } public String getNR_CEP() { return NR_CEP; } public void setDM_Apoio_Rastreado(String DM_Apoio_Rastreado) { this.DM_Apoio_Rastreado = DM_Apoio_Rastreado; } public String getDM_Apoio_Rastreado() { return DM_Apoio_Rastreado; } public void setCD_Roteiro(String CD_Roteiro) { this.CD_Roteiro = CD_Roteiro; } public String getCD_Roteiro() { return CD_Roteiro; } public String getNM_Destino() { return NM_Destino; } public void setNM_Destino(String destino) { NM_Destino = destino; } public String getNM_Origem() { return NM_Origem; } public void setNM_Origem(String origem) { NM_Origem = origem; } public String getNM_Rodovia() { return NM_Rodovia; } public void setNM_Rodovia(String rodovia) { NM_Rodovia = rodovia; } public String getNM_Trecho() { return NM_Trecho; } public void setNM_Trecho(String trecho) { NM_Trecho = trecho; } }
[ "teofilo.baiocco@letshare.com" ]
teofilo.baiocco@letshare.com
09617537be78b842b9eb143261694044922c97bd
e671b408c96a886eb62ef8e08c2c5f1668235874
/src/main/java/com/demo/activiti/LeaveMain.java
15ab22c6687144cd6ea0cd59ca65091381543daa
[]
no_license
easilyuse/demo-activiti-freeJumpNode
6cd0938f6735d502082f061a3300f7f439703f79
3f10e463ca856ba543092574c0f8a197c0408588
refs/heads/master
2020-09-16T17:13:28.396403
2018-08-10T07:42:08
2018-08-10T07:42:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,615
java
package com.demo.activiti; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Scanner; import org.activiti.engine.HistoryService; import org.activiti.engine.IdentityService; import org.activiti.engine.ManagementService; import org.activiti.engine.RepositoryService; import org.activiti.engine.RuntimeService; import org.activiti.engine.TaskService; import org.activiti.engine.history.HistoricActivityInstance; import org.activiti.engine.repository.Deployment; import org.activiti.engine.repository.ProcessDefinition; import org.activiti.engine.runtime.ProcessInstance; import org.activiti.engine.task.Task; import com.demo.activiti.util.ActUtils; public class LeaveMain { public static void main(String[] args) { RepositoryService repositoryService = ActUtils.repositoryService; IdentityService identityService = ActUtils.identityService; ManagementService managementService = ActUtils.managementService; HistoryService historyService = ActUtils.historyService; RuntimeService runtimeService = ActUtils.runtimeService; TaskService taskService = ActUtils.taskService; Deployment deployment = repositoryService.createDeployment().addClasspathResource("leave.bpmn").deploy(); ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).singleResult(); identityService.setAuthenticatedUserId("applyUser"); Map<String, Object> vars = new HashMap<>(); vars.put("candidateUsersService", new CandidateUsersService()); ProcessInstance processInstance = runtimeService.startProcessInstanceById(processDefinition.getId(), vars); Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).taskAssignee("applyUser").singleResult(); taskService.complete(task.getId()); task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).taskCandidateUser("张三").singleResult(); taskService.setAssignee(task.getId(), "张三"); Scanner scanner = new Scanner(System.in); System.out.println("是否跳转指定流程..."); String isJumpTargetNode = scanner.nextLine(); if ("no".equals(isJumpTargetNode)) { System.out.println("----流程按流程图顺序流转-------"); taskService.complete(task.getId()); task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).taskAssignee("hr").singleResult(); taskService.complete(task.getId()); } else { if ("yes".equals(isJumpTargetNode)) { System.out.println("请输入要跳转的目标节点ID..."); String targetFlowNodeId = scanner.nextLine(); // 方法一 ActUtils.jump2TargetFlowNode(task.getId(), targetFlowNodeId); // 方法二 // ActUtils.jump(taskId, targetFlowNodeId); } } System.out.println("----------------------------------流程实例流转-----------------------"); List<HistoricActivityInstance> list = historyService // 历史相关Service .createHistoricActivityInstanceQuery() // 创建历史活动实例查询 .processInstanceId(processInstance.getId()) // 执行流程实例id .finished().list(); for (HistoricActivityInstance hai : list) { System.out.println("活动ID:" + hai.getId()); System.out.println("流程实例ID:" + hai.getProcessInstanceId()); System.out.println("活动名称:" + hai.getActivityName()); System.out.println("办理人:" + hai.getAssignee()); System.out.println("开始时间:" + hai.getStartTime()); System.out.println("结束时间:" + hai.getEndTime()); System.out.println("================================="); } } }
[ "410480180@qq.com" ]
410480180@qq.com
1f101723355303b3898bf280b4aa53a2abc17806
053de24fa4ed40218bf10650f6617499333c6691
/src/ono/leo/erp/efd/pis_cofins/blocoM/RegistroM105.java
8488e6c61d4f4c004cc4dbd1e58fea0b1d0f4fcd
[]
no_license
leonardo-ono/EFD-PIS-Cofins
12f598cd66be223a0311e0be7f5d3a984b80eab0
d58b354aa1d8d529350a3dab30b298a3c2467bdc
refs/heads/master
2016-08-08T14:20:23.601232
2012-09-06T16:18:47
2012-09-06T16:18:47
1,464,537
1
0
null
null
null
null
UTF-8
Java
false
false
3,043
java
package ono.leo.erp.efd.pis_cofins.blocoM; import ono.leo.erp.efd.pis_cofins.Registro; import ono.leo.erp.efd.pis_cofins.Registro.Obrigatoriedade; /** * Registro M105. * Detalhamento da base de calculo do credito apurado no periodo PIS/PASEP. * * @author Leonardo Ono (ono.leo@gmail.com) * @since 1.00.00 (09/03/2011 16:00) */ public class RegistroM105 extends Registro { private String NAT_BC_CRED = "01"; private String CST_PIS = "50"; private String VL_BC_PIS_TOT = "158"; private String VL_BC_PIS_CUM = ""; private String VL_BC_PIS_NC = "158"; private String VL_BC_PIS = "158"; private String QUANT_BC_PIS_TOT = ""; private String QUANT_BC_PIS = "0"; private String DESC_CRED = ""; public RegistroM105() { REG = "M105"; REG_PAI = "M100"; nivel = 3; ocorrencia = Ocorrencia.UM_PARA_MUITOS; obrigatoriedade = Obrigatoriedade.OC; } public String getCST_PIS() { return CST_PIS; } public void setCST_PIS(String CST_PIS) { this.CST_PIS = CST_PIS; } public String getDESC_CRED() { return DESC_CRED; } public void setDESC_CRED(String DESC_CRED) { this.DESC_CRED = DESC_CRED; } public String getNAT_BC_CRED() { return NAT_BC_CRED; } public void setNAT_BC_CRED(String NAT_BC_CRED) { this.NAT_BC_CRED = NAT_BC_CRED; } public String getQUANT_BC_PIS() { return QUANT_BC_PIS; } public void setQUANT_BC_PIS(String QUANT_BC_PIS) { this.QUANT_BC_PIS = QUANT_BC_PIS; } public String getQUANT_BC_PIS_TOT() { return QUANT_BC_PIS_TOT; } public void setQUANT_BC_PIS_TOT(String QUANT_BC_PIS_TOT) { this.QUANT_BC_PIS_TOT = QUANT_BC_PIS_TOT; } public String getVL_BC_PIS() { return VL_BC_PIS; } public void setVL_BC_PIS(String VL_BC_PIS) { this.VL_BC_PIS = VL_BC_PIS; } public String getVL_BC_PIS_CUM() { return VL_BC_PIS_CUM; } public void setVL_BC_PIS_CUM(String VL_BC_PIS_CUM) { this.VL_BC_PIS_CUM = VL_BC_PIS_CUM; } public String getVL_BC_PIS_NC() { return VL_BC_PIS_NC; } public void setVL_BC_PIS_NC(String VL_BC_PIS_NC) { this.VL_BC_PIS_NC = VL_BC_PIS_NC; } public String getVL_BC_PIS_TOT() { return VL_BC_PIS_TOT; } public void setVL_BC_PIS_TOT(String VL_BC_PIS_TOT) { this.VL_BC_PIS_TOT = VL_BC_PIS_TOT; } @Override public String gerarLinha() { String linha = ""; linha += "|" + REG; linha += "|" + NAT_BC_CRED; linha += "|" + CST_PIS; linha += "|" + VL_BC_PIS_TOT; linha += "|" + VL_BC_PIS_CUM; linha += "|" + VL_BC_PIS_NC; linha += "|" + VL_BC_PIS; linha += "|" + QUANT_BC_PIS_TOT; linha += "|" + QUANT_BC_PIS; linha += "|" + DESC_CRED; linha += "|" + (char) 13 + (char) 10; linha += super.gerarLinha(); return linha; } }
[ "ono.leo@gmail.com" ]
ono.leo@gmail.com
1a8e1b12a26aba135a6616fee5f7d361d93be358
dd68d6ade5322df4aae9b5252cded60523303880
/plugins/bluenimble-plugin-dev.playground/src/main/java/com/bluenimble/platform/plugins/dev/playground/PlaygroundPlugin.java
5654187626bbda65255bd02b12567595debea960
[ "Apache-2.0" ]
permissive
bluenimble/serverless
55ac086eb7135ca3de67f25e7eba44357536914c
74247628ee41ef7f54639400561859f3715566ac
refs/heads/master
2023-08-09T03:54:52.051583
2023-07-25T11:51:24
2023-07-25T11:51:24
123,480,590
42
4
Apache-2.0
2023-02-22T07:02:41
2018-03-01T19:10:38
HTML
UTF-8
Java
false
false
2,026
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.bluenimble.platform.plugins.dev.playground; import java.io.File; import com.bluenimble.platform.ArchiveUtils; import com.bluenimble.platform.plugins.impls.AbstractPlugin; import com.bluenimble.platform.server.ApiServer; import com.orientechnologies.orient.server.OServer; import com.orientechnologies.orient.server.OServerMain; public class PlaygroundPlugin extends AbstractPlugin { private static final long serialVersionUID = -7715328225346939289L; private OServer oServer; @Override public void init (ApiServer server) throws Exception { // start embedded database database (); } @Override public void kill () { try { if (oServer != null) { oServer.shutdown (); } } catch (Throwable th) { // IGNORE } } private void database () throws Exception { System.setProperty ("ORIENTDB_HOME", home.getAbsolutePath ()); File dbFile = new File (home, "playground.db"); if (dbFile.exists ()) { File databases = new File (home, "databases"); ArchiveUtils.decompress (dbFile, databases, true); } oServer = OServerMain.create (); oServer.startup (new File (home, "orientdb-server-config.xml")); oServer.activate (); oServer.removeShutdownHook (); } }
[ "mloukili@bluenimble.com" ]
mloukili@bluenimble.com
dbe711a260b31f546af03c8d2bfe196bf1b56f35
afd7ebabda451990715066b7d045489b19ccccd5
/.svn/pristine/db/dbe711a260b31f546af03c8d2bfe196bf1b56f35.svn-base
5b099dcf6696fb92c05dfcab24d3317f2a44c6eb
[ "CC-BY-SA-2.5", "AFL-2.1", "LicenseRef-scancode-unknown-license-reference", "MIT", "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-proprietary-license", "BSD-2-Clause", "Plexus" ]
permissive
malakeel/jetspeed-portal
6996ab54816ebf7073aec1a6cbd86f59e3ee9d17
149dd8eba01eb86cc946d473d65ecc387464ca13
refs/heads/master
2022-12-29T07:50:12.413375
2020-04-18T04:55:45
2020-04-18T04:55:45
247,505,166
0
0
Apache-2.0
2022-12-16T02:47:04
2020-03-15T16:27:17
Java
UTF-8
Java
false
false
1,372
/* * 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.jetspeed.om.folder; /** * This interface describes the object used to define * portal site menu excluded menu options. * * @author <a href="mailto:rwatler@apache.org">Randy Watler</a> * @version $Id$ */ public interface MenuExcludeDefinition extends MenuDefinitionElement { /** * getName - get menu name with options to exclude * * @return menu name */ String getName(); /** * setName - set menu name with options to exclude * * @param name menu name */ void setName(String name); }
[ "mansour.alakeel@gmail.com" ]
mansour.alakeel@gmail.com
6d557a99e77eba6f218cfcc9d23b65086d919b54
b34da2a0c9718bfcd67548c58a26194aaaa15541
/wzb-data/wzb-data-read/src/main/java/com/jiuchunjiaoyu/micro/data/wzb/read/repository/SchoolAccountRepository.java
4956c830511077a167de61fc9d6c2d811674d9d9
[]
no_license
qidianliusong/springcloud
a5fac34880da042d0c3392842e4c5350b194a71b
77700263b0123809f0cf43480ef4e6cdbd47900b
refs/heads/master
2021-07-09T19:49:51.325448
2017-10-11T01:45:10
2017-10-11T01:45:10
106,490,956
0
0
null
null
null
null
UTF-8
Java
false
false
643
java
package com.jiuchunjiaoyu.micro.data.wzb.read.repository; import com.jiuchunjiaoyu.micro.data.wzb.common.entity.SchoolAccount; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; @Repository public interface SchoolAccountRepository extends JpaRepository<SchoolAccount, Long> { SchoolAccount findBySchoolId(Long schoolId); @Query("select count(*)>0 from SchoolAccount where schoolId=:schoolId") boolean existsBySchoolId(@Param("schoolId") Long schoolId); }
[ "lsongiu8612@163.com" ]
lsongiu8612@163.com
6132eef62a13bb2498fdf07a6a3d4366e9ec4b38
36fe74c8853e5d122525816191c8b55ce6050f7a
/src/main/java/net/minecraft/world/level/levelgen/feature/JigsawFeature.java
333e2d2ba27058d262269dcf2f6b36e2efbe69a2
[]
no_license
NicholasBlackburn1/Blackburn-1.18
07e8ddc20835f948959b022c5f74fcc0641f3baf
0e51f6e11590a747a2f33a0518c7abf79d5ef56e
refs/heads/main
2022-11-06T10:55:34.045865
2021-12-25T16:09:24
2021-12-25T16:09:24
441,702,689
1
1
null
null
null
null
UTF-8
Java
false
false
1,373
java
package net.minecraft.world.level.levelgen.feature; import com.mojang.serialization.Codec; import java.util.Optional; import java.util.function.Predicate; import net.minecraft.core.BlockPos; import net.minecraft.data.worldgen.Pools; import net.minecraft.world.level.levelgen.feature.configurations.JigsawConfiguration; import net.minecraft.world.level.levelgen.feature.structures.JigsawPlacement; import net.minecraft.world.level.levelgen.structure.NoiseAffectingStructureFeature; import net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece; import net.minecraft.world.level.levelgen.structure.pieces.PieceGeneratorSupplier; public class JigsawFeature extends NoiseAffectingStructureFeature<JigsawConfiguration> { public JigsawFeature(Codec<JigsawConfiguration> p_197092_, int p_197093_, boolean p_197094_, boolean p_197095_, Predicate<PieceGeneratorSupplier.Context<JigsawConfiguration>> p_197096_) { super(p_197092_, (p_197102_) -> { if (!p_197096_.test(p_197102_)) { return Optional.empty(); } else { BlockPos blockpos = new BlockPos(p_197102_.chunkPos().getMinBlockX(), p_197093_, p_197102_.chunkPos().getMinBlockZ()); Pools.bootstrap(); return JigsawPlacement.addPieces(p_197102_, PoolElementStructurePiece::new, blockpos, p_197094_, p_197095_); } }); } }
[ "nickblackburn02@gmail.com" ]
nickblackburn02@gmail.com
6063cbbce11cb25953bb0d51764fcd4e0326c3be
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_e8e3b3f6ff3b004946e02e037efefcf7ccdbc7ce/LoggingConfiguration/2_e8e3b3f6ff3b004946e02e037efefcf7ccdbc7ce_LoggingConfiguration_t.java
34b69d3eeb3563a8f1a11e1b6e7695b79afb2fae
[]
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
5,910
java
package com.yammer.dropwizard.config; import ch.qos.logback.classic.Level; import com.google.common.base.Optional; import com.google.common.collect.ImmutableMap; import com.yammer.dropwizard.validation.ValidationMethod; import org.codehaus.jackson.annotate.JsonProperty; import javax.validation.Valid; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; import java.util.TimeZone; @SuppressWarnings({"FieldCanBeLocal", "FieldMayBeFinal"}) public class LoggingConfiguration { static final TimeZone UTC = TimeZone.getTimeZone("UTC"); public static class ConsoleConfiguration { @JsonProperty protected boolean enabled = true; @NotNull @JsonProperty protected Level threshold = Level.ALL; @NotNull @JsonProperty protected TimeZone timeZone = UTC; @JsonProperty protected String logFormat; public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } public Level getThreshold() { return threshold; } public void setThreshold(Level threshold) { this.threshold = threshold; } public TimeZone getTimeZone() { return timeZone; } public void setTimeZone(TimeZone timeZone) { this.timeZone = timeZone; } public Optional<String> getLogFormat() { return Optional.fromNullable(logFormat); } } @SuppressWarnings("CanBeFinal") public static class FileConfiguration { @JsonProperty protected boolean enabled = false; @NotNull @JsonProperty protected Level threshold = Level.ALL; @JsonProperty protected String currentLogFilename; @JsonProperty protected boolean archive = true; @JsonProperty protected String archivedLogFilenamePattern; @Min(1) @Max(50) @JsonProperty protected int archivedFileCount = 5; @NotNull @JsonProperty protected TimeZone timeZone = UTC; @JsonProperty protected String logFormat; @ValidationMethod(message = "must have logging.file.archivedLogFilenamePattern if logging.file.archive is true") public boolean isValidArchiveConfiguration() { return !archive || archivedLogFilenamePattern != null; } @ValidationMethod(message = "must have logging.file.currentLogFilename if logging.file.enabled is true") public boolean isConfigured() { return !enabled || currentLogFilename != null; } public boolean isEnabled() { return enabled; } public Level getThreshold() { return threshold; } public String getCurrentLogFilename() { return currentLogFilename; } public boolean isArchive() { return archive; } public int getArchivedFileCount() { return archivedFileCount; } public String getArchivedLogFilenamePattern() { return archivedLogFilenamePattern; } public TimeZone getTimeZone() { return timeZone; } public Optional<String> getLogFormat() { return Optional.fromNullable(logFormat); } } public static class SyslogConfiguration { @JsonProperty protected boolean enabled = false; @NotNull @JsonProperty protected Level threshold = Level.ALL; @NotNull @JsonProperty protected String host = "localhost"; @NotNull @JsonProperty @Pattern( regexp = "(auth|authpriv|daemon|cron|ftp|lpr|kern|mail|news|syslog|user|uucp|local[0-7])", message = "must be a valid syslog facility" ) protected String facility = "local0"; @NotNull @JsonProperty protected TimeZone timeZone = UTC; @JsonProperty protected String logFormat; public boolean isEnabled() { return enabled; } public Level getThreshold() { return threshold; } public String getHost() { return host; } public String getFacility() { return facility; } public TimeZone getTimeZone() { return timeZone; } public Optional<String> getLogFormat() { return Optional.fromNullable(logFormat); } } @NotNull @JsonProperty protected Level level = Level.INFO; @NotNull @JsonProperty protected ImmutableMap<String, Level> loggers = ImmutableMap.of(); @Valid @NotNull @JsonProperty protected ConsoleConfiguration console = new ConsoleConfiguration(); @Valid @NotNull @JsonProperty protected FileConfiguration file = new FileConfiguration(); @Valid @NotNull @JsonProperty protected SyslogConfiguration syslog = new SyslogConfiguration(); public Level getLevel() { return level; } public ImmutableMap<String, Level> getLoggers() { return loggers; } public ConsoleConfiguration getConsoleConfiguration() { return console; } public FileConfiguration getFileConfiguration() { return file; } public SyslogConfiguration getSyslogConfiguration() { return syslog; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d02586d1d8eefbcf2ba28069f6b49699a142993a
be2efae84b922efff1b0103c48def1a1ee4741e2
/app/src/main/java/com/touchmenotapps/flashy/threads/asynctasks/LoginAsyncTask.java
2747cc989ed88f48d94ebcc1abc59821165fae9c
[]
no_license
strider2023/Flashy
95fecf5c0499da80dd5d2169a100cfc5b1fd033d
4a7218ed6c3f5a3a9b9c2f779b2f1270b171e65c
refs/heads/master
2020-09-20T11:01:18.126944
2016-08-29T10:03:04
2016-08-29T10:03:04
66,832,372
2
0
null
null
null
null
UTF-8
Java
false
false
697
java
package com.touchmenotapps.flashy.threads.asynctasks; import android.content.Context; import com.touchmenotapps.flashy.dao.enums.ServerEvents; import com.touchmenotapps.flashy.dao.interfaces.ServerResponseListener; /** * Created by school on 23/8/16. */ public class LoginAsyncTask extends AppTask { public LoginAsyncTask(int id, Context context, ServerResponseListener serverResponseListener) { super(id, context, serverResponseListener); } @Override protected ServerEvents doInBackground(Object... objects) { return null; } @Override protected void onPostExecute(ServerEvents serverEvents) { super.onPostExecute(serverEvents); } }
[ "strider2023@gmail.com" ]
strider2023@gmail.com
3611928744926434cd5f19e78893c8c43e1592a8
07ac433d94ef68715b5f18b834ac4dc8bb5b8261
/Implementation/jpf-git/jpf-core/src/main/gov/nasa/jpf/jvm/bytecode/CHECKCAST.java
b121da9391101f0205ce66f0542c0b38544244a0
[ "Apache-2.0", "MIT" ]
permissive
shrBadihi/ARDiff_Equiv_Checking
a54fb2908303b14a5a1f2a32b69841b213b2c999
e8396ae4af2b1eda483cb316c51cd76949cd0ffc
refs/heads/master
2023-04-03T08:40:07.919031
2021-02-05T04:44:34
2021-02-05T04:44:34
266,228,060
4
4
MIT
2020-11-26T01:34:08
2020-05-22T23:39:32
Java
UTF-8
Java
false
false
3,073
java
/* * Copyright (C) 2014, United States Government, as represented by the * Administrator of the National Aeronautics and Space Administration. * All rights reserved. * * The Java Pathfinder core (jpf-core) platform is 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 gov.nasa.jpf.jvm.bytecode; import gov.nasa.jpf.vm.Instruction; import gov.nasa.jpf.vm.ClassInfo; import gov.nasa.jpf.vm.ElementInfo; import gov.nasa.jpf.vm.LoadOnJPFRequired; import gov.nasa.jpf.vm.MJIEnv; import gov.nasa.jpf.vm.StackFrame; import gov.nasa.jpf.vm.ThreadInfo; import gov.nasa.jpf.vm.Types; /** * Check whether object is of given type * ..., objectref => ..., objectref */ public class CHECKCAST extends Instruction implements JVMInstruction { String type; public CHECKCAST() {} // this is going away public CHECKCAST(String typeName){ type = Types.getClassNameFromTypeName(typeName); } public String getTypeName() { return type; } @Override public Instruction execute (ThreadInfo ti) { StackFrame frame = ti.getTopFrame(); int objref = frame.peek(); if (objref == MJIEnv.NULL) { // we can cast 'null' to anything } else { boolean isValid = false; if(Types.isReferenceSignature(type)) { String t; if(Types.isArray(type)) { // retrieve the component terminal t = Types.getComponentTerminal(type); } else { t = type; } // resolve the referenced class try { ti.resolveReferencedClass(t); } catch(LoadOnJPFRequired lre) { return ti.getPC(); } } ElementInfo e = ti.getElementInfo(objref); ClassInfo eci = e.getClassInfo(); if (type.charAt(0) == '['){ // cast between array types if (eci.isArray()) { // check if the element types are compatible ClassInfo cci = eci.getComponentClassInfo(); isValid = cci.isInstanceOf(type.substring(1)); } } else { // non-array types isValid = e.getClassInfo().isInstanceOf(type); } if (!isValid) { return ti.createAndThrowException("java.lang.ClassCastException", e.getClassInfo().getName() + " cannot be cast to " + type); } } return getNext(ti); } @Override public int getLength() { return 3; // opcode, index1, index2 } @Override public int getByteCode () { return 0xC0; } @Override public void accept(JVMInstructionVisitor insVisitor) { insVisitor.visit(this); } }
[ "shr.badihi@gmail.com" ]
shr.badihi@gmail.com
ba78e88caa9a253e4fcaf7acddc569d1d9f4a18a
fe141a5390925689defa01600773ecee03b9e5c3
/esys-framework/core/src/main/java/com/esys/framework/core/entity/core/LogException.java
a36d38a6aa7a4b4c7d7ea0a4e090ab07b55c9e20
[]
no_license
atknatk/java-microservice-framework
43cde522b97fd02362ff0133ccb0a105ad18c03d
b664940481efb1177cbce7bde2c6fdb052542aa0
refs/heads/master
2022-03-25T18:03:50.847030
2019-12-24T10:29:00
2019-12-24T10:29:00
229,921,427
0
0
null
null
null
null
UTF-8
Java
false
false
1,398
java
package com.esys.framework.core.entity.core; import com.esys.framework.core.entity.BaseEntity; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Getter; import lombok.Setter; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EntityListeners; import javax.persistence.Table; import java.time.LocalDateTime; @Entity @Table @Getter @Setter @EntityListeners(AuditingEntityListener.class) public class LogException extends BaseEntity { private String service; private String method; private String ip; private String client; private String browser; private String module; @Column(columnDefinition="TEXT") private String exception; @Column(columnDefinition="TEXT") private String message; @Column(columnDefinition="TEXT") private String userAgent; private String OS; private boolean success = false; @CreatedDate @Column(name = "created_date", nullable = false) @JsonIgnore private LocalDateTime createdDate = LocalDateTime.now(); @CreatedBy @Column(name = "created_by", nullable = false, length = 50, updatable = false) @JsonIgnore private String createdBy; }
[ "atakan.atik@siemens.com" ]
atakan.atik@siemens.com
f98233c96b9a26cf219ec3ce2e516561ef94f61f
3729763ddb479b21c7f3a5f1e0a9954500850b52
/Sources/com/workday/sources/AcademicAppointeeRequestCriteriaType.java
11007f0460a23ac2acbe936faf27566325d02d24
[]
no_license
SANDEEPERUMALLA/workdayscanner
fe0816e9a95de73a598d6e29be5b20aeeca6cb60
8a4c3660cc588402aa49f948afe2168c4faa9df5
refs/heads/master
2020-03-18T22:30:21.218489
2018-05-29T20:24:36
2018-05-29T20:24:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,017
java
package com.workday.sources; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * Academic Appointee Request Criteria * * <p>Java class for Academic_Appointee_Request_CriteriaType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="Academic_Appointee_Request_CriteriaType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="By_Academic_Track_Type_Reference" type="{urn:com.workday/bsvc}Academic_Track_TypeObjectType" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="By_Worker" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;element name="By_Affiliate" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;element name="By_Student" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;element name="By_Active_Role" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Academic_Appointee_Request_CriteriaType", propOrder = { "byAcademicTrackTypeReference", "byWorker", "byAffiliate", "byStudent", "byActiveRole" }) public class AcademicAppointeeRequestCriteriaType { @XmlElement(name = "By_Academic_Track_Type_Reference") protected List<AcademicTrackTypeObjectType> byAcademicTrackTypeReference; @XmlElement(name = "By_Worker") protected Boolean byWorker; @XmlElement(name = "By_Affiliate") protected Boolean byAffiliate; @XmlElement(name = "By_Student") protected Boolean byStudent; @XmlElement(name = "By_Active_Role") protected Boolean byActiveRole; /** * Gets the value of the byAcademicTrackTypeReference property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the byAcademicTrackTypeReference property. * * <p> * For example, to add a new item, do as follows: * <pre> * getByAcademicTrackTypeReference().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link AcademicTrackTypeObjectType } * * */ public List<AcademicTrackTypeObjectType> getByAcademicTrackTypeReference() { if (byAcademicTrackTypeReference == null) { byAcademicTrackTypeReference = new ArrayList<AcademicTrackTypeObjectType>(); } return this.byAcademicTrackTypeReference; } /** * Gets the value of the byWorker property. * * @return * possible object is * {@link Boolean } * */ public Boolean isByWorker() { return byWorker; } /** * Sets the value of the byWorker property. * * @param value * allowed object is * {@link Boolean } * */ public void setByWorker(Boolean value) { this.byWorker = value; } /** * Gets the value of the byAffiliate property. * * @return * possible object is * {@link Boolean } * */ public Boolean isByAffiliate() { return byAffiliate; } /** * Sets the value of the byAffiliate property. * * @param value * allowed object is * {@link Boolean } * */ public void setByAffiliate(Boolean value) { this.byAffiliate = value; } /** * Gets the value of the byStudent property. * * @return * possible object is * {@link Boolean } * */ public Boolean isByStudent() { return byStudent; } /** * Sets the value of the byStudent property. * * @param value * allowed object is * {@link Boolean } * */ public void setByStudent(Boolean value) { this.byStudent = value; } /** * Gets the value of the byActiveRole property. * * @return * possible object is * {@link Boolean } * */ public Boolean isByActiveRole() { return byActiveRole; } /** * Sets the value of the byActiveRole property. * * @param value * allowed object is * {@link Boolean } * */ public void setByActiveRole(Boolean value) { this.byActiveRole = value; } }
[ "p.sandeepkumargupta@gmail.com" ]
p.sandeepkumargupta@gmail.com
1df76cead1ced329f898bc2dd652dfcd21e86b2d
a1e912f3a36f42998cbb71df0ba816d9c4533598
/src/main/java/walkingkooka/tree/search/SearchQueryLeafAttributeValueDoesntContains.java
dec72b6351c7fa5728064549e2a2bf09c551e499
[ "Apache-2.0" ]
permissive
mP1/walkingkooka-tree-search
c235566b2cd86279fc5efd73d5cdd241df0a6f4b
6aac8c5304ed20897fc855f8bd65b1c1867c3b3b
refs/heads/master
2023-02-25T00:50:12.798715
2023-02-09T08:57:26
2023-02-09T08:57:26
217,678,302
0
0
Apache-2.0
2023-02-09T08:57:27
2019-10-26T08:21:11
Java
UTF-8
Java
false
false
2,171
java
/* * Copyright 2019 Miroslav Pokorny (github.com/mP1) * * 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 walkingkooka.tree.search; import walkingkooka.text.CaseSensitivity; import java.util.Objects; /** * Searches the text of a {@link SearchQueryValue} if it contains text. */ final class SearchQueryLeafAttributeValueDoesntContains extends SearchQueryLeafAttribute { static SearchQueryLeafAttributeValueDoesntContains with(final TextSearchQueryValue value, final SearchNodeAttributeName attributeName, final CaseSensitivity caseSensitivity) { Objects.requireNonNull(attributeName, "attributeName"); Objects.requireNonNull(caseSensitivity, "caseSensitivity"); return new SearchQueryLeafAttributeValueDoesntContains(value, attributeName, caseSensitivity); } private SearchQueryLeafAttributeValueDoesntContains(final TextSearchQueryValue value, final SearchNodeAttributeName attributeName, final CaseSensitivity caseSensitivity) { super(value, attributeName, caseSensitivity); } @Override public SearchQuery not() { return SearchQuery.attributeValueContains(this.value, this.attributeName, this.caseSensitivity); } @Override boolean test(final String text, final String attributeValue) { return false == this.caseSensitivity.contains(attributeValue, text); } @Override boolean canBeEqual(final Object other) { return other instanceof SearchQueryLeafAttributeValueDoesntContains; } @Override void toStringPrefix(final StringBuilder b) { b.append(this.attributeName).append("~=").append(this.value.text()); } }
[ "miroslav.pokorny@gmail.com" ]
miroslav.pokorny@gmail.com
b23bb8c5fa9f34a65ef4af93bb7f29b1eb500a77
3542fea39a504b964e3fc67f71165f84fcb2c684
/src/main/java/com/wishhust/base/concurrent/MoreThreadPrint.java
8715d1165be4e3e782f7111c3f5967c90ef3099a
[]
no_license
pallcard/learn-java
af73d539dbfdf1f718c7c0c4833ebd031765e138
6b3e7e2d26ce779a7bdcf3240ee7ae53cb764adf
refs/heads/master
2022-06-25T04:34:32.942927
2020-08-26T15:02:09
2020-08-26T15:02:09
228,840,443
0
0
null
2022-06-17T02:48:09
2019-12-18T12:57:14
Java
UTF-8
Java
false
false
1,102
java
package com.wishhust.base.concurrent; import java.util.concurrent.Semaphore; public class MoreThreadPrint { static int count = 0; // T1、T2、T3三个线程顺序执行 public static void main(String[] args) { Semaphore c0 = new Semaphore(1); Semaphore c1 = new Semaphore(0); Semaphore c2 = new Semaphore(0); Worker worker = new Worker(c0, c1); Worker worker1 = new Worker(c1, c2); Worker worker2 = new Worker(c2, c0); Thread t1 = new Thread(worker); Thread t2 = new Thread(worker1); Thread t3 = new Thread(worker2); t1.start(); t2.start(); t3.start(); } static class Worker implements Runnable { Semaphore c0; Semaphore c1; public Worker(Semaphore c0, Semaphore c1) { this.c0 = c0; this.c1 = c1; } @Override public void run() { while (count < 100) { try { c0.acquire(); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println(Thread.currentThread().getName()+":"+count++); c1.release(); } } } }
[ "18162327131@163.com" ]
18162327131@163.com
eeb01bc1257ee1a4d755ca98152ecf0c1ca68d06
3915515e2b655ce8c6d74600411186b0adc16d34
/CoreJava/sorting/src/com/ustglobal/sorting/set/Bank.java
4530646cf38aafe27b1db887e306a92163fe54ee
[]
no_license
deepeshdk/USTGlobal-16Sep19-Deepesh-Khandelwal
e11c4c434e94ca12eacbcb840a4ce7cc3a17d3b3
4eb6ff3f8d5eb9ad269e63a3baf36e1970dd1750
refs/heads/master
2023-01-13T09:41:55.474009
2020-06-05T13:18:02
2020-06-05T13:18:02
215,532,209
0
0
null
2023-01-07T18:51:06
2019-10-16T11:31:22
CSS
UTF-8
Java
false
false
934
java
package com.ustglobal.sorting.set; public class Bank { String name; int pincode; long micr; public Bank(String name, int pincode, long micr) { super(); this.name = name; this.pincode = pincode; this.micr = micr; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (int) (micr ^ (micr >>> 32)); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + pincode; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Bank other = (Bank) obj; if (micr != other.micr) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (pincode != other.pincode) return false; return true; } }
[ "deepeshkhandelwal05@gmail.com" ]
deepeshkhandelwal05@gmail.com
adf0a61069f4f55015c1b0b2482991c93414e269
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.vrshell.home-VrHome/sources/com/facebook/inject/InjectorThreadStack.java
162fb34ca2a22a111c933896bda5f9ee6f1a6bf6
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
1,225
java
package com.facebook.inject; import android.content.Context; import com.google.common.base.Preconditions; import java.util.List; import javax.annotation.concurrent.NotThreadSafe; @NotThreadSafe public class InjectorThreadStack { private Context mAppContext; private final List<Context> mContextStack; private final List<ScopeAwareInjector> mScopeAwareInjectorStack; public void enterContext(Context context) { this.mContextStack.add(context); } public void enterAppContext() { this.mContextStack.add(this.mAppContext); } public void exitContext() { Preconditions.checkState(!this.mContextStack.isEmpty()); this.mContextStack.remove(this.mContextStack.size() - 1); } public void pushInjector(ScopeAwareInjector injector) { this.mScopeAwareInjectorStack.add(injector); } public void popInjector() { Preconditions.checkState(!this.mScopeAwareInjectorStack.isEmpty()); this.mScopeAwareInjectorStack.remove(this.mScopeAwareInjectorStack.size() - 1); } public Context getContext() { return this.mContextStack.isEmpty() ? this.mAppContext : this.mContextStack.get(this.mContextStack.size() - 1); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
48b74a49d62c5263ab51040c4bc228db8eefa17d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/30/30_245247ee46c0ae2eef48c60bafdada4136e1aec7/IdManager/30_245247ee46c0ae2eef48c60bafdada4136e1aec7_IdManager_s.java
4fba418a07c4e23977677efd7304f3929ac3c86c
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,067
java
package net.minecraft.src.redstoneExtended.Util; import net.minecraft.client.Minecraft; import java.io.*; import java.util.HashMap; import java.util.LinkedList; import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; public class IdManager { public enum IdType { Block() { @Override public int generateId() { for (int i = net.minecraft.src.Block.blocksList.length - 1; i >= 0; --i) { if ((net.minecraft.src.Block.blocksList[i] == null) && !IdManager.getInstance().reservedIds.get(Block).contains(i)) return i; } return -1; } @Override public boolean isIdUsed(int id) { return net.minecraft.src.Block.blocksList[id] != null; } }, Item() { @Override public int generateId() { for (int i = net.minecraft.src.Item.itemsList.length - 1; i >= 0; --i) { if ((net.minecraft.src.Item.itemsList[i] == null) && !IdManager.getInstance().reservedIds.get(Item).contains(i)) return i - 256; } return -1; } @Override public boolean isIdUsed(int id) { return net.minecraft.src.Item.itemsList[id] != null; } }; public abstract int generateId(); public abstract boolean isIdUsed(int id); } private static IdManager instance; private HashMap<IdType, LinkedList<Integer>> reservedIds; public IdManager() { } public static IdManager getInstance() { if (instance == null) instance = new IdManager(); return instance; } public int getId(String name, IdType idType) { File configDir = new File(Minecraft.getMinecraftDir(), "/mods/mod_redstoneExtended/"); if (configDir.exists() || configDir.mkdir()) { File idFile = new File(configDir, "ids.properties"); if (!idFile.exists()) { try { if (!idFile.createNewFile()) LoggingUtil.logError("Couldn't create id file because it already exists"); } catch (IOException e) { LoggingUtil.logError("Couldn't create id file: " + e.getMessage()); return idType.generateId(); } } Properties ids = new Properties(); try { ids.load(new FileInputStream(idFile)); } catch (FileNotFoundException e) { LoggingUtil.logError("Couldn't load id file: File not found"); return idType.generateId(); } catch (IOException e) { LoggingUtil.logError("Couldn't load id file: " + e.getMessage()); } if (reservedIds == null) { LoggingUtil.logDebug("Initializing reserved id list"); reservedIds = new HashMap<IdType, LinkedList<Integer>>(); String patIdTypeStr = ""; for (IdType idTypePossibility : IdType.values()) { if (!patIdTypeStr.equals("")) patIdTypeStr += "|"; patIdTypeStr += idTypePossibility.name(); } Pattern pattern = Pattern.compile("^(" + patIdTypeStr + ")\\.[a-zA-Z0-9]+$"); for (String propertyName : ids.stringPropertyNames()) { Matcher matcher = pattern.matcher(propertyName); if (matcher.matches()) { String strReservedId = ids.getProperty(propertyName); int reservedId = Integer.parseInt(strReservedId); if (!reservedIds.containsKey(idType)) reservedIds.put(idType, new LinkedList<Integer>()); reservedIds.get(idType).add(reservedId); } } } String propertyName = idType.name() + "." + name; String strId = ids.getProperty(propertyName); int id; boolean idFileUpdateNecessary = false; if (strId != null) { id = Integer.parseInt(strId); if (idType.isIdUsed(id)) { int newId = idType.generateId(); String strNewId = Integer.toString(newId); ids.setProperty(propertyName, strNewId); id = newId; LoggingUtil.logError("ID CONFLICT DETECTED: Id " + strId + " for " + idType.name() + " " + name + " is already in use, now using " + strNewId); strId = strNewId; idFileUpdateNecessary = true; } } else { id = idType.generateId(); strId = Integer.toString(id); ids.setProperty(propertyName, strId); LoggingUtil.logDebug("Assigned Id " + strId + " to " + idType.name() + " " + name); idFileUpdateNecessary = true; } if (idFileUpdateNecessary) { try { ids.store(new FileOutputStream(idFile), null); } catch (FileNotFoundException e) { LoggingUtil.logError("Couldn't save id file: File not found"); } catch (IOException e) { LoggingUtil.logError("Couldn't save id file: " + e.getMessage()); } } LoggingUtil.logDebug("Using Id " + strId + " for " + idType.name() + " " + name); return id; } else { LoggingUtil.logError("Config directory could not be created"); return idType.generateId(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
027e9b9638a80c8aee9425f44ddb8036594900f2
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_f84f0906121d6b4d9824a7da063dfc7565dc7c80/Overlay/7_f84f0906121d6b4d9824a7da063dfc7565dc7c80_Overlay_t.java
1d26ff41fe99e744a8f728790a63694d6e7a9a5b
[]
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
7,878
java
/******************************************************************************* * Copyright (c) 2009-2013 CWI * 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: * * Paul Klint - Paul.Klint@cwi.nl - CWI *******************************************************************************/ package org.rascalmpl.library.vis.figure.compose; import static org.rascalmpl.library.vis.properties.Properties.HCONNECT; import static org.rascalmpl.library.vis.properties.Properties.SHAPE_CLOSED; import static org.rascalmpl.library.vis.properties.Properties.SHAPE_CONNECTED; import static org.rascalmpl.library.vis.properties.Properties.SHAPE_CURVED; import static org.rascalmpl.library.vis.properties.Properties.VCONNECT; import static org.rascalmpl.library.vis.properties.TwoDProperties.ALIGN; import static org.rascalmpl.library.vis.properties.TwoDProperties.POS; import static org.rascalmpl.library.vis.properties.TwoDProperties.SHRINK; import static org.rascalmpl.library.vis.util.vector.Dimension.HOR_VER; import java.awt.geom.Path2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import org.rascalmpl.library.vis.figure.Figure; import org.rascalmpl.library.vis.figure.interaction.MouseOver; import org.rascalmpl.library.vis.graphics.GraphicsContext; import org.rascalmpl.library.vis.properties.PropertyManager; import org.rascalmpl.library.vis.swt.IFigureConstructionEnv; import org.rascalmpl.library.vis.swt.applet.IHasSWTElement; import org.rascalmpl.library.vis.util.FigureMath; import org.rascalmpl.library.vis.util.NameResolver; import org.rascalmpl.library.vis.util.vector.Coordinate; import org.rascalmpl.library.vis.util.vector.Dimension; import org.rascalmpl.library.vis.util.vector.Rectangle; import org.rascalmpl.library.vis.graphics.Interpolation; /** * * Overlay elements by stacking them * * @author paulk * */ import org.rascalmpl.library.vis.graphics.TypedPoint; public class Overlay extends Compose{ public Overlay(Figure[] children, PropertyManager properties) { super(children, properties); } @Override public boolean initChildren(IFigureConstructionEnv env, NameResolver resolver, MouseOver mparent, boolean swtSeen, boolean visible) { for(int i = 0; i < children.length ; i++){ if(swtSeen){ env.addAboveSWTElement(children[i]); } swtSeen = swtSeen || children[i].init(env, resolver,mparent, swtSeen, visible); } return swtSeen; } @Override public void computeMinSize() { minSize.set(0,0); for(Figure fig : children){ for(Dimension d : HOR_VER){ if(fig.prop.is2DPropertySet(d, POS)){ minSize.setMax(d, (fig.prop.get2DReal(d, POS) + (1.0 - fig.prop.get2DReal(d, ALIGN)) * fig.prop.get2DReal(d, SHRINK)) * fig.minSize.get(d)); minSize.setMax(d, fig.minSize.get(d) ); } else { minSize.setMax(d, fig.minSize.get(d) / fig.prop.get2DReal(d, SHRINK)); } } } } @Override public void resizeElement(Rectangle view) { for(Figure fig : children){ for(Dimension d : HOR_VER){ fig.size.set(d,size.get(d)*fig.prop.get2DReal(d, SHRINK)); if(fig.prop.is2DPropertySet(d, POS)){ fig.localLocation.set(d,size.get(d) * (fig.prop.get2DReal(d, POS) - fig.prop.get2DReal(d,ALIGN) * fig.prop.get2DReal(d, SHRINK))); } else { fig.localLocation.set(d,(size.get(d) - fig.size.get(d)) * fig.prop.get2DReal(d, ALIGN)); } } } } @Override public void getFiguresUnderMouse(Coordinate c,List<Figure> result){ if(!mouseInside(c)){ return; } for(int i = children.length - 1 ; i >= 0 ; i--){ children[i].getFiguresUnderMouse(c, result); } if(handlesInput()){ Point2D.Double d = new Point2D.Double(c.getX(), c.getY()); if(makePath().contains(d)){ result.add(this); } } } public Path2D.Double makePath(){ boolean closed = prop.getBool(SHAPE_CLOSED); boolean curved = prop.getBool(SHAPE_CURVED); boolean connected = prop.getBool(SHAPE_CONNECTED) || closed || curved; Path2D.Double p = new Path2D.Double(); if(connected && closed && children.length >= 0){ if(curved) { ArrayList<TypedPoint> res = new ArrayList<TypedPoint>(); for(int i = 0 ; i < children.length ; i++){ res.add(new TypedPoint(children[i].globalLocation.getX() + children[i].prop.getReal(HCONNECT) * children[i].size.getX(), children[i].globalLocation.getY() + children[i].prop.getReal(VCONNECT) * children[i].size.getY(),TypedPoint.kind.CURVED)); } Interpolation.solve(res, true); p.moveTo(Interpolation.P0[0].x, Interpolation.P0[0].y); int n = Interpolation.P0.length; for (int i = 0; i < n; i++) p.curveTo( Interpolation.P1[i].x, Interpolation.P1[i].y, Interpolation.P2[i].x, Interpolation.P2[i].y, Interpolation.P3[i].x, Interpolation.P3[i].y); } else{ p.moveTo(children[0].globalLocation.getX() + children[0].prop.getReal(HCONNECT) * children[0].size.getX(), children[0].globalLocation.getY() + children[0].prop.getReal(VCONNECT) * children[0].size.getY()); for(int i = 0 ; i < children.length ; i++){ p.lineTo(children[i].globalLocation.getX() + children[i].prop.getReal(HCONNECT) * children[i].size.getX(), children[i].globalLocation.getY() + children[i].prop.getReal(VCONNECT) * children[i].size.getY()); } } p.closePath(); } return p; } @Override public void drawElement(GraphicsContext gc, List<IHasSWTElement> visibleSWTElements){ boolean closed = prop.getBool(SHAPE_CLOSED); boolean curved = prop.getBool(SHAPE_CURVED); boolean connected = prop.getBool(SHAPE_CONNECTED) || closed || curved; if(connected){ gc.beginShape(); } if(!closed){ gc.noFill(); } if(closed && connected && children.length >= 0){ gc.vertex( children[0].globalLocation.getX() + children[0].prop.getReal(HCONNECT) * children[0].size.getX(), children[0].globalLocation.getY() + children[0].prop.getReal(VCONNECT) * children[0].size.getY() ); } if(connected){ for(int i = 0 ; i < children.length ; i++){ if(curved ){ gc.curveVertex( children[i].globalLocation.getX() + children[i].prop.getReal(HCONNECT) * children[i].size.getX(), children[i].globalLocation.getY() + children[i].prop.getReal(VCONNECT) * children[i].size.getY() ); } else { gc.vertex(children[i].globalLocation.getX() + children[i].prop.getReal(HCONNECT) * children[i].size.getX(), children[i].globalLocation.getY() + children[i].prop.getReal(VCONNECT) * children[i].size.getY() ); } //System.out.printf("child %s\n",children[i].globalLocation); } } if(connected){ if(closed){ int i = children.length-1; gc.vertex(children[i].globalLocation.getX() + children[i].prop.getReal(HCONNECT) * children[i].size.getX(), children[i].globalLocation.getY() + children[i].prop.getReal(VCONNECT) * children[i].size.getY() ); gc.endShape(FigureMath.CLOSE); } else gc.endShape(); } } public String toString(){ return "Overlay: " + super.toString(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6cd9c3e4feb49fbd4f9f148c2d312aeea99fdefc
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_6e9b8a36b3864d00b0077b8a37af2064e2b46599/TestUtil/7_6e9b8a36b3864d00b0077b8a37af2064e2b46599_TestUtil_t.java
5cdda93e781ae9c1e9a368ac568002604439a30a
[]
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,612
java
/* * $Id$ * * Copyright (C) 2002 by Brockmann Consult (info@brockmann-consult.de) * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation. This program is distributed in the hope it will * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.esa.beam.dataio.obpg; import junit.framework.Assert; import org.esa.beam.util.SystemUtils; import java.io.File; import java.io.IOException; public class TestUtil { public static final String OUT_DIR = "testdata/out"; public static final String HDF_FILE = OUT_DIR + "/beam-obpg-reader/product.hdf"; public static void deleteFileTree() { final File treeRoot = new File(HDF_FILE).getParentFile(); SystemUtils.deleteFileTree(treeRoot); if (treeRoot.isDirectory()) { Assert.fail("test directory could not be removed - check your tests"); } } public static File createFile() throws IOException { File file = new File(HDF_FILE); file.getParentFile().mkdirs(); file.createNewFile(); return file; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d1d1c839e4a715febee0bad0587a83063aebda6f
a770e95028afb71f3b161d43648c347642819740
/sources/org/telegram/ui/GroupCreateFinalActivity$$ExternalSyntheticLambda2.java
0c44fe8c2b1dbb75309401e3ca6997fd1b078367
[]
no_license
Edicksonjga/TGDecompiledBeta
d7aa48a2b39bbaefd4752299620ff7b72b515c83
d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b
refs/heads/master
2023-08-25T04:12:15.592281
2021-10-28T20:24:07
2021-10-28T20:24:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
515
java
package org.telegram.ui; import android.view.View; public final /* synthetic */ class GroupCreateFinalActivity$$ExternalSyntheticLambda2 implements View.OnClickListener { public final /* synthetic */ GroupCreateFinalActivity f$0; public /* synthetic */ GroupCreateFinalActivity$$ExternalSyntheticLambda2(GroupCreateFinalActivity groupCreateFinalActivity) { this.f$0 = groupCreateFinalActivity; } public final void onClick(View view) { this.f$0.lambda$createView$4(view); } }
[ "fabian_pastor@msn.com" ]
fabian_pastor@msn.com
d048898e2a4011bbb452aaae88aa0338eb9dcc68
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Mockito-19/org.mockito.internal.configuration.injection.filter.NameBasedCandidateFilter/BBC-F0-opt-40/14/org/mockito/internal/configuration/injection/filter/NameBasedCandidateFilter_ESTest.java
c290a7ed94000c2a4d3eb62706656f999f3c5853
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
3,514
java
/* * This file was automatically generated by EvoSuite * Thu Oct 21 15:48:53 GMT 2021 */ package org.mockito.internal.configuration.injection.filter; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.lang.reflect.Field; import java.util.ConcurrentModificationException; import java.util.LinkedList; import java.util.List; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter; import org.mockito.internal.configuration.injection.filter.NameBasedCandidateFilter; import org.mockito.internal.configuration.injection.filter.OngoingInjecter; import org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true) public class NameBasedCandidateFilter_ESTest extends NameBasedCandidateFilter_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter(); NameBasedCandidateFilter nameBasedCandidateFilter0 = new NameBasedCandidateFilter(finalMockCandidateFilter0); LinkedList<Object> linkedList0 = new LinkedList<Object>(); List<Object> list0 = linkedList0.subList(0, 0); linkedList0.clear(); // Undeclared exception! // try { nameBasedCandidateFilter0.filterCandidate(list0, (Field) null, finalMockCandidateFilter0); // fail("Expecting exception: ConcurrentModificationException"); // } catch(ConcurrentModificationException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("java.util.SubList", e); // } } @Test(timeout = 4000) public void test1() throws Throwable { FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter(); NameBasedCandidateFilter nameBasedCandidateFilter0 = new NameBasedCandidateFilter(finalMockCandidateFilter0); LinkedList<Object> linkedList0 = new LinkedList<Object>(); OngoingInjecter ongoingInjecter0 = nameBasedCandidateFilter0.filterCandidate(linkedList0, (Field) null, (Object) null); assertNotNull(ongoingInjecter0); } @Test(timeout = 4000) public void test2() throws Throwable { FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter(); TypeBasedCandidateFilter typeBasedCandidateFilter0 = new TypeBasedCandidateFilter(finalMockCandidateFilter0); NameBasedCandidateFilter nameBasedCandidateFilter0 = new NameBasedCandidateFilter(typeBasedCandidateFilter0); LinkedList<Object> linkedList0 = new LinkedList<Object>(); Object object0 = new Object(); linkedList0.offer(object0); linkedList0.add((Object) null); // Undeclared exception! // try { nameBasedCandidateFilter0.filterCandidate(linkedList0, (Field) null, linkedList0); // fail("Expecting exception: NullPointerException"); // } catch(NullPointerException e) { // // // // no message in exception (getMessage() returned null) // // // verifyException("org.mockito.internal.configuration.injection.filter.NameBasedCandidateFilter", e); // } } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
3581af4efce2d8b384c5022921d0558ba42aabe0
0af8b92686a58eb0b64e319b22411432aca7a8f3
/api-vs-impl-small/core/src/main/java/org/gradle/testcore/performancenull_34/Productionnull_3388.java
4994e360dc3449dc6930531b77fdf1c03330ebf5
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
589
java
package org.gradle.testcore.performancenull_34; public class Productionnull_3388 { private final String property; public Productionnull_3388(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
e4117ea1453fc3eddda7bd5595ec065a6150320d
805b2a791ec842e5afdd33bb47ac677b67741f78
/Mage.Sets/src/mage/sets/magic2013/Sleep.java
c5464eee6795ca254aa4fd54bb3511ca3adbf429
[]
no_license
klayhamn/mage
0d2d3e33f909b4052b0dfa58ce857fbe2fad680a
5444b2a53beca160db2dfdda0fad50e03a7f5b12
refs/heads/master
2021-01-12T19:19:48.247505
2015-08-04T20:25:16
2015-08-04T20:25:16
39,703,242
2
0
null
2015-07-25T21:17:43
2015-07-25T21:17:42
null
UTF-8
Java
false
false
2,119
java
/* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * 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 BetaSteward_at_googlemail.com ``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 BetaSteward_at_googlemail.com 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 BetaSteward_at_googlemail.com. */ package mage.sets.magic2013; import java.util.UUID; /** * * @author North */ public class Sleep extends mage.sets.magic2010.Sleep { public Sleep(UUID ownerId) { super(ownerId); this.cardNumber = 67; this.expansionSetCode = "M13"; } public Sleep(final Sleep card) { super(card); } @Override public Sleep copy() { return new Sleep(this); } }
[ "robyter@gmail" ]
robyter@gmail
84f9c9f9ca6e42fcd2223179be6e7bdbfead76c0
5e34c548f8bbf67f0eb1325b6c41d0f96dd02003
/dataset/smallest_818f8cf4_003/mutations/466/smallest_818f8cf4_003.java
583d3319723521df7ad22171a444d65b1b10c6df
[]
no_license
mou23/ComFix
380cd09d9d7e8ec9b15fd826709bfd0e78f02abc
ba9de0b6d5ea816eae070a9549912798031b137f
refs/heads/master
2021-07-09T15:13:06.224031
2020-03-10T18:22:56
2020-03-10T18:22:56
196,382,660
1
1
null
2020-10-13T20:15:55
2019-07-11T11:37:17
Java
UTF-8
Java
false
false
2,709
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class smallest_818f8cf4_003 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { smallest_818f8cf4_003 mainClass = new smallest_818f8cf4_003 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj num1 = new IntObj (), num2 = new IntObj (), num3 = new IntObj (), num4 = new IntObj (), num_smallest = new IntObj (); output += (String.format ("Please enter 4 numbers separated by spaces > ")); num1.value = scanner.nextInt (); num2.value = scanner.nextInt (); num2.value = scanner.nextInt (); num4.value = scanner.nextInt (); if ((num1.value <= num2.value) && (num1.value <= num3.value) && (num1.value <= num4.value)) { num_smallest.value = num1.value; output += (String.format ("%d is the smallest\n", num_smallest.value)); } else if ((num2.value <= num1.value) && (num2.value <= num3.value) && (num2.value <= num4.value)) { num_smallest.value = num2.value; output += (String.format ("%d is the smallest\n", num_smallest.value)); } else if ((num3.value <= num1.value) && (num3.value <= num2.value) && (num3.value <= num4.value)) { num_smallest.value = num3.value; output += (String.format ("%d is the smallest\n", num_smallest.value)); } else if ((num4.value <= num1.value) && (num4.value <= num2.value) && (num4.value <= num3.value)) { num_smallest.value = num1.value; output += (String.format ("%d is the smallest\n", num_smallest.value)); } if (true) return;; } }
[ "bsse0731@iit.du.ac.bd" ]
bsse0731@iit.du.ac.bd
0538178ecd0d27bbb8d7b9906de17857e0a92a2f
4deacb2f84d98e95dd07e29a82c4d69d32476481
/src/test/java/com/jitterted/ebp/blackjack/WalletBettingTest.java
c34a975608e9dea3dcd7d3d26140f84d1d543f77
[]
no_license
tedyoung/mycmt1-blackjack-201027
3a77f6b25c7e9c6bd59f8552d26014bdf4cae80a
4c637eeafc423ba50604c94cc6a8286455b2ceaf
refs/heads/master
2023-01-02T17:34:15.905398
2020-10-30T22:34:21
2020-10-30T22:34:21
307,780,252
0
2
null
null
null
null
UTF-8
Java
false
false
1,168
java
package com.jitterted.ebp.blackjack; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.*; class WalletBettingTest { @Test public void walletWith12Bet8BalanceIs4() throws Exception { // GIVEN (ARRANGE/SETUP) Wallet wallet = new Wallet(); wallet.addMoney(12); // WHEN (ACT/PERFORM) wallet.bet(8); // THEN (ASSERT/VERIFY) assertThat(wallet.balance()) .isEqualTo(12 - 8); } @Test public void walletWith27Bet7AndBet9BalanceIs11() throws Exception { Wallet wallet = new Wallet(); wallet.addMoney(27); wallet.bet(7); wallet.bet(9); assertThat(wallet.balance()) .isEqualTo(27 - 7 - 9); } @Test public void walletWithMoneyWhenBetFullBalanceIsEmpty() throws Exception { Wallet wallet = new Wallet(); wallet.addMoney(33); wallet.bet(33); assertThat(wallet.isEmpty()) .isTrue(); } @Test public void betMoreThanBalanceThrowsException() throws Exception { Wallet wallet = new Wallet(); wallet.addMoney(73); assertThatThrownBy(() -> { wallet.bet(74); }).isInstanceOf(IllegalArgumentException.class); } }
[ "tedyoung@gmail.com" ]
tedyoung@gmail.com
6a1eb6b4a280314ff048d1ba68b783086e7f01fb
36d7ac13d205b9a5b8c3308a27c4605a1cd7ee56
/others/AndEngine-GLES2-AnchorCenter/src/org/andengine/util/TextUtils.java
b56052f0c113c39343d81bf1c85c85a1cd4b7173
[ "Apache-2.0" ]
permissive
renanlr/billyadventures
92103d6208f2e80644fca38c2c8a4ad6f2b5a7ce
f35384d6355dbbdbc5708b370731d1be1e652f39
refs/heads/master
2021-01-20T03:39:09.059791
2014-12-09T05:03:33
2014-12-09T05:03:33
23,578,058
4
0
null
null
null
null
UTF-8
Java
false
false
7,410
java
package org.andengine.util; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; import org.andengine.util.adt.array.ArrayUtils; /** * (c) 2010 Nicolas Gramlich * (c) 2011 Zynga Inc. * * @author Nicolas Gramlich * @since 19:01:08 - 03.04.2010 */ public final class TextUtils { // =========================================================== // Constants // =========================================================== public static final Pattern SPLITPATTERN_SPACE = Pattern.compile(" "); public static final Pattern SPLITPATTERN_SPACES = Pattern.compile(" +"); public static final Pattern SPLITPATTERN_COMMA = Pattern.compile(","); // =========================================================== // Fields // =========================================================== // =========================================================== // Constructors // =========================================================== private TextUtils() { } // =========================================================== // Getter & Setter // =========================================================== // =========================================================== // Methods for/from SuperClass/Interfaces // =========================================================== // =========================================================== // Methods // =========================================================== public static final CharSequence pad(final CharSequence pText, final char pPadChar, final int pLength) { final int padCount = pLength - pText.length(); if (padCount <= 0) { return pText; } else { final StringBuilder sb = new StringBuilder(); sb.append(pText); for (int i = padCount - 1; i >= 0; i--) { sb.append(pPadChar); } return sb.toString(); } } public static final CharSequence padFront(final CharSequence pText, final char pPadChar, final int pLength) { final int padCount = pLength - pText.length(); if (padCount <= 0) { return pText; } else { final StringBuilder sb = new StringBuilder(); for (int i = padCount - 1; i >= 0; i--) { sb.append(pPadChar); } sb.append(pText); return sb.toString(); } } public static final int countOccurrences(final CharSequence pText, final char pCharacter) { int count = 0; int lastOccurrence = android.text.TextUtils.indexOf(pText, pCharacter, 0); while (lastOccurrence != -1) { count++; lastOccurrence = android.text.TextUtils.indexOf(pText, pCharacter, lastOccurrence + 1); } return count; } /** * Split a {@link CharSequence} by a Character, i.e. Split lines by using '\n'.<br/> * Same behavior as <code>String.split("" + pCharacter);</code> . */ public static final ArrayList<CharSequence> split(final CharSequence pText, final char pCharacter) { return TextUtils.split(pText, pCharacter, new ArrayList<CharSequence>()); } /** * Split a {@link CharSequence} by a Character, i.e. Split lines by using '\n'.<br/> * Same behavior as <code>String.split("" + pCharacter);</code> . */ public static final <L extends List<CharSequence>> L split(final CharSequence pText, final char pCharacter, final L pResult) { final int partCount = TextUtils.countOccurrences(pText, pCharacter) + 1; if (partCount == 0) { pResult.add(pText); } else { int from = 0; int to; for (int i = 0; i < (partCount - 1); i++) { to = android.text.TextUtils.indexOf(pText, pCharacter, from); pResult.add(pText.subSequence(from, to)); from = to + 1; } pResult.add(pText.subSequence(from, pText.length())); } return pResult; } public static final String formatStackTrace(final StackTraceElement pStackTraceElement) { return new StringBuilder() .append(pStackTraceElement.getClassName()) .append('.') .append(pStackTraceElement.getMethodName()) .append('(') .append(pStackTraceElement.getFileName()) .append(':') .append(pStackTraceElement.getLineNumber()) .append(')') .toString(); } public static final String formatStackTrace(final StackTraceElement[] pStackTraceElements) { final StringBuilder sb = new StringBuilder(); final int stackTraceElementCount = pStackTraceElements.length; for (int i = 0; i < stackTraceElementCount; i++) { sb.append(pStackTraceElements[i]); if (i < (stackTraceElementCount - 1)) { sb.append('\n'); } } return sb.toString(); } public static int countCharacters(final List<CharSequence> pTexts) { return TextUtils.countCharacters(pTexts, false); } public static int countCharacters(final List<CharSequence> pTexts, final boolean pIgnoreWhitespaces) { int characters = 0; if (pIgnoreWhitespaces) { for (int i = pTexts.size() - 1; i >= 0; i--) { final CharSequence text = pTexts.get(i); for (int j = text.length() - 1; j >= 0; j--) { final char character = text.charAt(j); if (!Character.isWhitespace(character)) { characters++; } } } } else { for (int i = pTexts.size() - 1; i >= 0; i--) { final CharSequence text = pTexts.get(i); characters += text.length(); } } return characters; } /** * As opposed to {@link ArrayUtils#isEmpty(Object[])}, this method performs a {@link android.text.TextUtils#isEmpty(String)} check on all elements of the array. */ public static boolean isEmpty(final CharSequence[] pTexts) { if (pTexts == null) { return true; } else { for (int i = pTexts.length - 1; i >= 0; i--) { if (!android.text.TextUtils.isEmpty(pTexts[i])) { return false; } } return true; } } public static final String join(final char pSeparator, final Object ... pStrings) { final StringBuilder stringBuilder = new StringBuilder(); final int count = pStrings.length; for (int i = 0; i < count; i++) { stringBuilder.append(pStrings[i]); if (i < count - 1) { stringBuilder.append(pSeparator); } } return stringBuilder.toString(); } public static final String join(final String pSeparator, final Object ... pStrings) { final StringBuilder stringBuilder = new StringBuilder(); final int count = pStrings.length; for (int i = 0; i < count; i++) { stringBuilder.append(pStrings[i]); if (i < count - 1) { stringBuilder.append(pSeparator); } } return stringBuilder.toString(); } public static final String ellipsize(final String pText, final String pEllipsis, final int pMaxLength) throws IllegalArgumentException { final int textLength = pText.length(); if (textLength > pMaxLength) { final int ellipsisLength = pEllipsis.length(); if (ellipsisLength > pMaxLength) { throw new IllegalArgumentException("pMaxLength: '" + pMaxLength + "' isn't long enough for pEllipsis: '" + pEllipsis + "'."); } else { final StringBuilder result = new StringBuilder(); result.append(pText.substring(0, pMaxLength - ellipsisLength)); result.append(pEllipsis); return result.toString(); } } else { return pText; } } // =========================================================== // Inner and Anonymous Classes // =========================================================== }
[ "renan.lobato.rheinboldt@gmail.com" ]
renan.lobato.rheinboldt@gmail.com
1683b5a46d1499d11f7dcd607facf7e05c93440f
499cf0e19aa07773ff31961c39e92a21081085ee
/jdk8/src/main/java/com/github/binarylei/jdk8/stream/practise/Transaction.java
dacaa27aaeffc44bc5eb0fa9f49d600ee87dc458
[]
no_license
binarylei/java
ca08b60267b41c6a4f730a24fb51c07119e2234f
05f05c0a8a5805964c4002ac57efe923cb45f833
refs/heads/master
2022-12-16T11:40:39.993865
2021-06-18T01:37:29
2021-06-18T01:37:29
102,683,939
0
0
null
2022-12-16T07:12:43
2017-09-07T02:54:45
Java
UTF-8
Java
false
false
773
java
package com.github.binarylei.jdk8.stream.practise; //交易类 public class Transaction { private Trader trader; private int year; private int value; public Transaction() { } public Transaction(Trader trader, int year, int value) { this.trader = trader; this.year = year; this.value = value; } public Trader getTrader() { return trader; } public void setTrader(Trader trader) { this.trader = trader; } public int getYear() { return year; } public void setYear(int year) { this.year = year; } public int getValue() { return value; } public void setValue(int value) { this.value = value; } @Override public String toString() { return "Transaction [trader=" + trader + ", year=" + year + ", value=" + value + "]"; } }
[ "binarylei@qq.com" ]
binarylei@qq.com
ad18c0dc4c86b7283a899c7e63cdeb3585501228
631a1ca2202bde4e5c2d4749806b3e4f7d6cad13
/sdk/src/com/socialize/listener/comment/CommentDeleteListener.java
3a9bfb5543b2614c98e98c658a9e6d749f530aa7
[]
no_license
sromanuk/socialize-sdk-android
136629cd568b455c497c29d5f42542d3a7789c26
e4a3e9e329b806f51adb048ffec7e61eb23a5151
refs/heads/master
2021-01-18T05:28:23.578978
2013-03-21T16:34:49
2013-03-21T16:34:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,255
java
/* * Copyright (c) 2012 Socialize Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.socialize.listener.comment; import org.json.JSONObject; import android.app.Activity; import com.socialize.entity.Comment; import com.socialize.entity.ListResult; import com.socialize.error.SocializeException; import com.socialize.networks.PostData; import com.socialize.networks.SocialNetwork; import com.socialize.networks.SocialNetworkListener; /** * @author Jason Polites * */ public abstract class CommentDeleteListener extends CommentListener implements SocialNetworkListener { @Override public void onCreate(Comment result) {} @Override public final void onGet(Comment comment) {} @Override public final void onList(ListResult<Comment> comments) {} @Override public final void onUpdate(Comment comment) {} @Override public void onNetworkError(Activity context, SocialNetwork network, Exception error) { onError(SocializeException.wrap(error)); } @Override public boolean onBeforePost(Activity parent, SocialNetwork socialNetwork, PostData postData) { return false; } @Override public void onAfterPost(Activity parent, SocialNetwork socialNetwork, JSONObject responseObject) {} }
[ "jason.polites@gmail.com" ]
jason.polites@gmail.com
19736d2fa0f4d43a64674a1660ba50d606bc2aa9
fcc88521f63a3c22c81a9242ae3b203f2ea888fd
/Java/0678-Valid-Parenthesis-String/soln.java
cdbd448ebfa7a499f382c8d1e345010a750b79b3
[ "MIT" ]
permissive
wyaadarsh/LeetCode-Solutions
b5963e3427aa547d485d3a2cb24e6cedc72804fd
3719f5cb059eefd66b83eb8ae990652f4b7fd124
refs/heads/master
2022-12-06T15:50:37.930987
2020-08-30T15:49:27
2020-08-30T15:49:27
291,811,790
0
1
MIT
2020-08-31T19:57:35
2020-08-31T19:57:34
null
UTF-8
Java
false
false
480
java
class Solution { public boolean checkValidString(String s) { int lo = 0, hi = 0; for(char ch : s.toCharArray()) { if (ch == '(') { ++lo; ++hi; } else if (ch == '*') { --lo; ++hi; } else { --lo; --hi; } lo = Math.max(0, lo); if (hi < 0) return false; } return lo == 0; } }
[ "zhang623@wisc.edu" ]
zhang623@wisc.edu
7bbc7be691e6436eef4f735ebc05ebec6c6949a0
22ebf86c5b5d8d0dbe0aa015241fa10c07b58b08
/src/main/java/com/litemanager/admin/controller/system/DictController.java
52e2332025d5e86529e2353d196f2225ea77a730
[]
no_license
BestJex/litemanager
5e19666595dd09cf036922d6a25d5d1061f80e6d
72b3e19a938c7bd34c740aa5929573fe5d415ec0
refs/heads/master
2022-11-28T15:52:39.150405
2019-05-26T10:18:48
2019-05-26T10:18:48
188,572,550
0
0
null
null
null
null
UTF-8
Java
false
false
7,076
java
package com.litemanager.admin.controller.system; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.plugins.Page; import com.litemanager.admin.annotation.SysLog; import com.litemanager.admin.base.BaseController; import com.litemanager.admin.entity.Dict; import com.litemanager.admin.util.LayerData; import com.litemanager.admin.util.RestResponse; import com.xiaoleilu.hutool.log.Log; import com.xiaoleilu.hutool.log.LogFactory; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import org.springframework.web.util.WebUtils; import javax.servlet.ServletRequest; import java.util.Map; /** * Created by wangl on 2018/1/1. * todo: */ @Controller @RequestMapping("admin/system/dict") public class DictController extends BaseController{ private static final Log log = LogFactory.get(); @PostMapping("deleteById") @ResponseBody public RestResponse deleteById(@RequestParam(value = "id",required = false)Long id){ if(id == null || id == 0){ return RestResponse.failure("字典ID错误"); } dictService.deleteDict(id); return RestResponse.success(); } @GetMapping("list") @SysLog("跳转系统字典页面") public String list(){ return "admin/system/dict/list"; } @RequiresPermissions("sys:dict:list") @PostMapping("list") @ResponseBody public LayerData<Dict> list(@RequestParam(value = "page",defaultValue = "1")Integer page, @RequestParam(value = "limit",defaultValue = "10")Integer limit, ServletRequest request){ Map map = WebUtils.getParametersStartingWith(request, "s_"); LayerData<Dict> layerData = new LayerData<>(); EntityWrapper<Dict> wrapper = new EntityWrapper<>(); if(!map.isEmpty()){ String type = (String) map.get("type"); if(StringUtils.isNotBlank(type)) { wrapper.eq("type", type); } String label = (String)map.get("label"); if(StringUtils.isNotBlank(label)){ wrapper.like("label",label); } } wrapper.orderBy("type",false).orderBy("sort",false); Page<Dict> dataPage = dictService.selectPage(new Page<>(page,limit),wrapper); layerData.setCount(dataPage.getTotal()); layerData.setData(dataPage.getRecords()); return layerData; } @GetMapping("add") public String add(@RequestParam(value = "type",required = false)String type,Model model){ if(StringUtils.isNotBlank(type)){ model.addAttribute("type",type); } return "admin/system/dict/add"; } @RequiresPermissions("sys:dict:add") @PostMapping("add") @SysLog("新增系统字典") @ResponseBody public RestResponse add(Dict dict){ if(StringUtils.isBlank(dict.getType())){ return RestResponse.failure("字典类型不能为空"); } if(StringUtils.isBlank(dict.getLabel())){ return RestResponse.failure("字典标签不能为空"); } if(StringUtils.isBlank(dict.getValue())){ return RestResponse.failure("字典标签对应的值不能为空"); } if(dictService.getCountByType(dict.getType())==0){ dict.setSort(0); }else{ if(dictService.getCountByAll(dict.getType(),dict.getLabel(),null)>0){ return RestResponse.failure("已经存在【"+dict.getType()+"】的label值【"+dict.getLabel()+"】"); } if(dictService.getCountByAll(dict.getType(),dict.getLabel(),dict.getValue())>0){ return RestResponse.failure("已经存在【"+dict.getType()+"】的label标签【"+dict.getLabel()+"】的value值【"+dict.getValue()+"】"); } dict.setSort(dictService.getMaxSortByType(dict.getType())); } dictService.saveOrUpdateDict(dict); return RestResponse.success(); } @GetMapping("edit") public String edit(Long id,Model model){ Dict dict = dictService.selectById(id); model.addAttribute("dict",dict); return "admin/system/dict/edit"; } @RequiresPermissions("sys:dict:edit") @PostMapping("edit") @SysLog("编辑系统字典") @ResponseBody public RestResponse edit(Dict dict){ if(dict.getId()==null || dict.getId() == 0){ return RestResponse.failure("字典ID不能为空"); } if(StringUtils.isBlank(dict.getType())){ return RestResponse.failure("字典类型不能为空"); } if(StringUtils.isBlank(dict.getLabel())){ return RestResponse.failure("字典标签不能为空"); } if(StringUtils.isBlank(dict.getValue())){ return RestResponse.failure("字典标签对应的值不能为空"); } if(dict.getSort() == null || dict.getSort() < 0){ return RestResponse.failure("排序值不正确"); } Dict oldDict = dictService.selectById(dict.getId()); if(!oldDict.getType().equals(dict.getType())){ return RestResponse.failure("字典类型不能修改"); } if(!oldDict.getLabel().equals(dict.getLabel())){ if(dictService.getCountByAll(dict.getType(),dict.getLabel(),null)>0){ return RestResponse.failure("已经存在【"+dict.getType()+"】的label值【"+dict.getLabel()+"】"); } } if(!oldDict.getValue().equals(dict.getValue())) { if (dictService.getCountByAll(dict.getType(), dict.getLabel(), dict.getValue()) > 0) { return RestResponse.failure("已经存在【" + dict.getType() + "】的label标签【" + dict.getLabel() + "】的value值【" + dict.getValue() + "】"); } } dictService.saveOrUpdateDict(dict); return RestResponse.success(); } @RequiresPermissions("sys:dict:editType") @PostMapping("editType") @SysLog("编辑系统字典类型") @ResponseBody public RestResponse editType(@RequestParam(value="oldType",required = false)String oldType, @RequestParam(value = "newType",required = false)String newType){ if(StringUtils.isBlank(oldType)){ return RestResponse.failure("原类型不能为空"); } if (StringUtils.isBlank(newType)){ return RestResponse.failure("新类型不能为空"); } if(oldType.equals(newType)){ return RestResponse.failure("TYPE值相等就没必要替换了吧"); } if(dictService.getCountByType(newType)>0){ return RestResponse.failure("TYPE值已经被使用了"); } dictService.updateByType(oldType,newType); return RestResponse.success(); } }
[ "2252930004@qq.com" ]
2252930004@qq.com
08baeff6156f31b1ddeca889dd7a06db854b9fa3
9c26b790c465662f9f7129500dfad8dd05dec110
/src/main/java/com/noctarius/snowcast/impl/operations/client/ClientCreateSequencerDefinitionRequest.java
908139a1f502098f229d755f1a391e68746b777b
[ "Apache-2.0" ]
permissive
shotishu/snowcast
208ce3d1a1d035783bd27f802005979826f32166
8d56c94d8b7df404b05736a86e48badd6904ddcb
refs/heads/master
2021-01-18T02:05:26.396075
2015-01-07T07:18:11
2015-01-07T07:18:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,948
java
package com.noctarius.snowcast.impl.operations.client; import com.hazelcast.nio.ObjectDataInput; import com.hazelcast.nio.ObjectDataOutput; import com.hazelcast.nio.serialization.PortableReader; import com.hazelcast.nio.serialization.PortableWriter; import com.hazelcast.spi.Operation; import com.noctarius.snowcast.SnowcastEpoch; import com.noctarius.snowcast.impl.SequencerDefinition; import com.noctarius.snowcast.impl.SequencerPortableHook; import java.io.IOException; public class ClientCreateSequencerDefinitionRequest extends AbstractClientSequencerPartitionRequest { private SequencerDefinition definition; public ClientCreateSequencerDefinitionRequest() { } public ClientCreateSequencerDefinitionRequest(String sequencerName, int partitionId, SequencerDefinition definition) { super(sequencerName, partitionId); this.definition = definition; } @Override protected Operation prepareOperation() { return new ClientCreateSequencerDefinitionOperation(getSequencerName(), getEndpoint(), definition); } @Override public int getClassId() { return SequencerPortableHook.TYPE_CREATE_SEQUENCER_DEFINITION; } @Override public void write(PortableWriter writer) throws IOException { super.write(writer); ObjectDataOutput out = writer.getRawDataOutput(); out.writeLong(definition.getEpoch().getEpochOffset()); out.writeInt(definition.getMaxLogicalNodeCount()); } @Override public void read(PortableReader reader) throws IOException { super.read(reader); ObjectDataInput in = reader.getRawDataInput(); long epochOffset = in.readLong(); int maxLogicalNodeCount = in.readInt(); SnowcastEpoch epoch = SnowcastEpoch.byTimestamp(epochOffset); definition = new SequencerDefinition(getSequencerName(), epoch, maxLogicalNodeCount); } }
[ "me@noctarius.com" ]
me@noctarius.com
64604faeac5e4dae6a59740d8289f9e261c0061c
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/14/org/apache/commons/lang3/BooleanUtils_toStringTrueFalse_817.java
44d9e58a21b2dd86f9d63aff1d670eadb6221cca
[]
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
1,547
java
org apach common lang3 oper primit boolean object handl code input gracefulli except thrown code input method document behaviour detail thread safe threadsaf version boolean util booleanutil convert string return code 'true' code 'false' pre boolean util booleanutil string true fals tostringtruefals boolean util booleanutil string true fals tostringtruefals pre param bool boolean check code 'true' code 'false' code string string true fals tostringtruefals bool string tostr bool
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
91681c1526138f525d99a5a2fc2a3842f130e3df
dc25b23f8132469fd95cee14189672cebc06aa56
/vendor/mediatek/proprietary/packages/apps/DM/src/com/mediatek/dm/ext/MTKConnectivity.java
3e3335eea9e9b7fdee3ae50dd87feaf1200dc464
[ "Apache-2.0" ]
permissive
nofearnohappy/alps_mm
b407d3ab2ea9fa0a36d09333a2af480b42cfe65c
9907611f8c2298fe4a45767df91276ec3118dd27
refs/heads/master
2020-04-23T08:46:58.421689
2019-03-28T21:19:33
2019-03-28T21:19:33
171,048,255
1
5
null
2020-03-08T03:49:37
2019-02-16T20:25:00
Java
UTF-8
Java
false
false
2,563
java
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein is * confidential and proprietary to MediaTek Inc. and/or its licensors. Without * the prior written permission of MediaTek inc. and/or its licensors, any * reproduction, modification, use or disclosure of MediaTek Software, and * information contained herein, in whole or in part, shall be strictly * prohibited. * * MediaTek Inc. (C) 2010. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER * ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE * RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE * MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE * CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * The following software/firmware and/or related documentation ("MediaTek * Software") have been modified by MediaTek Inc. All revisions are subject to * any receiver's applicable license agreements with MediaTek Inc. */ package com.mediatek.dm.ext; import android.net.ConnectivityManager; public final class MTKConnectivity { public static final int TYPE_MOBILE_DM = ConnectivityManager.TYPE_MOBILE_DM; public static final int TYPE_MOBILE = ConnectivityManager.TYPE_MOBILE; public static final int TYPE_WIFI = ConnectivityManager.TYPE_WIFI; }
[ "fetpoh@mail.ru" ]
fetpoh@mail.ru
4bed418134291a101bd032523f3ccf063722edde
9bd0afb9b1b9886a37b17d21ee5b6f2a8bac4eea
/Domain/src/org/jphototagger/domain/metadata/MetaDataStringValue.java
d67b44098618c968cda059a80823f7acd2c503dc
[]
no_license
ebaumann/jphototagger
2d37a256e8373e3704b9e19adfb32f6debcdccbe
b9411c3a2c289f65d82be15d7033a00644e1e210
refs/heads/master
2023-04-12T21:46:34.382467
2023-03-16T18:02:42
2023-03-16T18:02:42
32,269,356
15
2
null
null
null
null
UTF-8
Java
false
false
1,299
java
package org.jphototagger.domain.metadata; import org.jphototagger.lib.util.ObjectUtil; /** * @author Elmar Baumann */ public final class MetaDataStringValue { private final MetaDataValue metaDataValue; private final String value; public MetaDataStringValue(MetaDataValue metaDataValue, String value) { if (metaDataValue == null) { throw new NullPointerException("metaDataValue == null"); } this.metaDataValue = metaDataValue; this.value = value; } public MetaDataValue getMetaDataValue() { return metaDataValue; } public String getValue() { return value; } @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof MetaDataStringValue)) { return false; } MetaDataStringValue other = (MetaDataStringValue) obj; return metaDataValue.equals(other.metaDataValue) && ObjectUtil.equals(value, other.value); } @Override public int hashCode() { int hash = 3; hash = 73 * hash + (this.metaDataValue != null ? this.metaDataValue.hashCode() : 0); hash = 73 * hash + (this.value != null ? this.value.hashCode() : 0); return hash; } }
[ "ebaumann@localhost" ]
ebaumann@localhost
7d4d5cdc26feca711473771b25d965f215b96744
a8348cdf6d118c27a6d9b00f71e2169633966dde
/zhttp-parser-jsoup/src/main/java/com/zpj/http/parser/jsoup/nodes/TextNode.java
c5acfd093fe76fd86f9c6d559cad045a45feb486
[]
no_license
Z-P-J/ZHttp
d3556b07fcf946c69a8ea606528d19b39cdb0258
6c975390c1b60c0ff4586004e5eb0e1474302da2
refs/heads/master
2022-02-13T17:43:08.401184
2022-01-31T06:11:57
2022-01-31T06:11:57
229,084,089
3
0
null
null
null
null
UTF-8
Java
false
false
4,873
java
package com.zpj.http.parser.jsoup.nodes; import com.zpj.http.parser.jsoup.utils.StringUtil; import com.zpj.http.utils.Validate; import java.io.IOException; /** A text node. @author Jonathan Hedley, jonathan@hedley.net */ public class TextNode extends LeafNode { /** Create a new TextNode representing the supplied (unencoded) text). @param text raw text @see #createFromEncoded(String) */ public TextNode(String text) { value = text; } /** Create a new TextNode representing the supplied (unencoded) text). @param text raw text @param baseUri base uri - ignored for this node type @see #createFromEncoded(String, String) @deprecated use {@link TextNode#TextNode(String)} */ public TextNode(String text, String baseUri) { this(text); } public String nodeName() { return "#text"; } /** * Get the text content of this text node. * @return Unencoded, normalised text. * @see TextNode#getWholeText() */ public String text() { return StringUtil.normaliseWhitespace(getWholeText()); } /** * Set the text content of this text node. * @param text unencoded text * @return this, for chaining */ public TextNode text(String text) { coreValue(text); return this; } /** Get the (unencoded) text of this text node, including any newlines and spaces present in the original. @return text */ public String getWholeText() { return coreValue(); } /** Test if this text node is blank -- that is, empty or only whitespace (including newlines). @return true if this document is empty or only whitespace, false if it contains any text content. */ public boolean isBlank() { return StringUtil.isBlank(coreValue()); } /** * Split this text node into two nodes at the specified string offset. After splitting, this node will contain the * original text up to the offset, and will have a new text node sibling containing the text after the offset. * @param offset string offset point to split node at. * @return the newly created text node containing the text after the offset. */ public TextNode splitText(int offset) { final String text = coreValue(); Validate.isTrue(offset >= 0, "Split offset must be not be negative"); Validate.isTrue(offset < text.length(), "Split offset must not be greater than current text length"); String head = text.substring(0, offset); String tail = text.substring(offset); text(head); TextNode tailNode = new TextNode(tail); if (parent() != null) parent().addChildren(siblingIndex()+1, tailNode); return tailNode; } void outerHtmlHead(Appendable accum, int depth, Document.OutputSettings out) throws IOException { if (out.prettyPrint() && ((siblingIndex() == 0 && parentNode instanceof Element && ((Element) parentNode).tag().formatAsBlock() && !isBlank()) || (out.outline() && siblingNodes().size()>0 && !isBlank()) )) indent(accum, depth, out); boolean normaliseWhite = out.prettyPrint() && parent() instanceof Element && !Element.preserveWhitespace(parent()); Entities.escape(accum, coreValue(), out, false, normaliseWhite, false); } void outerHtmlTail(Appendable accum, int depth, Document.OutputSettings out) {} @Override public String toString() { return outerHtml(); } /** * Create a new TextNode from HTML encoded (aka escaped) data. * @param encodedText Text containing encoded HTML (e.g. &amp;lt;) * @param baseUri Base uri * @return TextNode containing unencoded data (e.g. &lt;) * @deprecated use {@link TextNode#createFromEncoded(String)} instead, as LeafNodes don't carry base URIs. */ public static TextNode createFromEncoded(String encodedText, String baseUri) { String text = Entities.unescape(encodedText); return new TextNode(text); } /** * Create a new TextNode from HTML encoded (aka escaped) data. * @param encodedText Text containing encoded HTML (e.g. &amp;lt;) * @return TextNode containing unencoded data (e.g. &lt;) */ public static TextNode createFromEncoded(String encodedText) { String text = Entities.unescape(encodedText); return new TextNode(text); } static String normaliseWhitespace(String text) { text = StringUtil.normaliseWhitespace(text); return text; } static String stripLeadingWhitespace(String text) { return text.replaceFirst("^\\s+", ""); } static boolean lastCharIsWhitespace(StringBuilder sb) { return sb.length() != 0 && sb.charAt(sb.length() - 1) == ' '; } }
[ "37832345+Z-P-J@users.noreply.github.com" ]
37832345+Z-P-J@users.noreply.github.com
c40b923a78c42fd3066043b2016c897177801293
c8eb5fc37993d00ea1e7ed9d19cd1fdfc07c7cea
/rest/src/main/java/org/acme/entities/Entity1050.java
74ad5991be58850854f927e0a3316ffe0633e5f2
[]
no_license
goblinbr/quarkus-multimodule-test
76ef284ecae73df0bde6a6aaae52a7c64b878167
bc9a9aaa54d3dc3d3f051ec3f847322483e14370
refs/heads/master
2020-05-21T08:28:23.897539
2019-05-17T21:00:25
2019-05-17T21:00:25
185,981,408
0
1
null
null
null
null
UTF-8
Java
false
false
1,669
java
package org.acme.entities; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import javax.validation.constraints.Size; import java.util.Objects; @Entity @Table(name = "ENTITY_1050") public class Entity1050 { @Id @Max(99999999999L) @Min(1) @Column(name = "ID") private Long id; @Size(max = 15) @Column(name = "COLUMN_1") private String column1; @Column(name = "COLUMN_2") private Boolean column2; public Entity1050() { this.id = 0L; this.column1 = ""; this.column2 = false; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getColumn1() { return column1; } public void setColumn1(String column1) { this.column1 = column1; } public Boolean getColumn2() { return column2; } public void setColumn2(Boolean column2) { this.column2 = column2; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Entity1050)) return false; Entity1050 other = (Entity1050) o; return Objects.equals(id, other.id); } @Override public int hashCode() { return Objects.hash(id); } @Override public String toString() { return "Entity1050{" + "id=" + id + ", column1='" + column1 + '\'' + ", column2=" + column2 + '}'; } }
[ "rodrigo.goblin@gmail.com" ]
rodrigo.goblin@gmail.com
911330f0363df9f3ca22d3ff557a424b62c8a313
0d94e577b0966128022668b95935df6d262d381b
/src/main/java/com/baijob/commonTools/StrUtil.java
69b7a9db72c0a81f37a8ee3519dd1b9e73e69df3
[]
no_license
xiaozefeng/common-tools
4785027497417091687ac75a9b69ed22efa0ed54
904c0adeb657a590d946af7fe5a1f387958e56eb
refs/heads/master
2021-01-19T02:10:53.413700
2014-08-03T00:00:15
2014-08-03T00:00:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,353
java
package com.baijob.commonTools; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; /** * 字符串工具类 * @author xiaoleilu * */ public class StrUtil { public static final String DOT = "."; public static final String SLASH = "/"; public static final String EMPTY = ""; /** * 字符串是否为空白 空白的定义如下: <br> * 1、为null <br> * 2、为不可见字符(如空格)<br> * 3、""<br> * * @param str 被检测的字符串 * @return 是否为空 */ public static boolean isBlank(String str) { return str == null || str.trim().length() == 0; } /** * 字符串是否为空,空的定义如下 * 1、为null <br> * 2、为""<br> * @param str 被检测的字符串 * @return 是否为空 */ public static boolean isEmpty(String str) { return str == null || str.length() == 0; } /** * 获得set或get方法对应的标准属性名<br/> * 例如:setName 返回 name * @param getOrSetMethodName * @return 如果是set或get方法名,返回field, 否则null */ public static String getGeneralField(String getOrSetMethodName){ if(getOrSetMethodName.startsWith("get") || getOrSetMethodName.startsWith("set")) { return cutPreAndLowerFirst(getOrSetMethodName, 3); } return null; } /** * 生成set方法名<br/> * 例如:name 返回 setName * @param fieldName 属性名 * @return setXxx */ public static String genSetter(String fieldName){ return upperFirstAndAddPre(fieldName, "set"); } /** * 生成get方法名 * @param fieldName 属性名 * @return getXxx */ public static String genGetter(String fieldName){ return upperFirstAndAddPre(fieldName, "get"); } /** * 去掉首部指定长度的字符串并将剩余字符串首字母小写<br/> * 例如:str=setName, preLength=3 -> return name * @param str 被处理的字符串 * @param preLength 去掉的长度 * @return 处理后的字符串,不符合规范返回null */ public static String cutPreAndLowerFirst(String str, int preLength) { if(str == null) { return null; } if(str.length() > preLength) { char first = Character.toLowerCase(str.charAt(preLength)); if(str.length() > preLength +1) { return first + str.substring(preLength +1); } return String.valueOf(first); } return null; } /** * 原字符串首字母大写并在其首部添加指定字符串 * 例如:str=name, preString=get -> return getName * @param str 被处理的字符串 * @param preString 添加的首部 * @return 处理后的字符串 */ public static String upperFirstAndAddPre(String str, String preString) { if(str == null || preString == null) { return null; } return preString + upperFirst(str); } /** * 大写首字母<br> * 例如:str = name, return Name * @param str 字符串 * @return */ public static String upperFirst(String str) { return Character.toUpperCase(str.charAt(0)) + str.substring(1); } /** * 小写首字母<br> * 例如:str = Name, return name * @param str 字符串 * @return */ public static String lowerFirst(String str) { return Character.toLowerCase(str.charAt(0)) + str.substring(1); } /** * 去掉指定前缀 * @param str 字符串 * @param prefix 前缀 * @return 切掉后的字符串,若前缀不是 preffix, 返回原字符串 */ public static String removePrefix(String str, String prefix) { if(str != null && str.startsWith(prefix)) { return str.substring(prefix.length()); } return str; } /** * 忽略大小写去掉指定前缀 * @param str 字符串 * @param prefix 前缀 * @return 切掉后的字符串,若前缀不是 prefix, 返回原字符串 */ public static String removePrefixIgnoreCase(String str, String prefix) { if (str != null && str.toLowerCase().startsWith(prefix.toLowerCase())) { return str.substring(prefix.length()); } return str; } /** * 去掉指定后缀 * @param str 字符串 * @param suffix 后缀 * @return 切掉后的字符串,若后缀不是 suffix, 返回原字符串 */ public static String removeSuffix(String str, String suffix) { if (str != null && str.endsWith(suffix)) { return str.substring(0, str.length() - suffix.length()); } return str; } /** * 忽略大小写去掉指定后缀 * @param str 字符串 * @param suffix 后缀 * @return 切掉后的字符串,若后缀不是 suffix, 返回原字符串 */ public static String removeSuffixIgnoreCase(String str, String suffix) { if (str != null && str.toLowerCase().endsWith(suffix.toLowerCase())) { return str.substring(0, str.length() - suffix.length()); } return str; } /** * 切分字符串<br/> * a#b#c -> [a,b,c] * a##b#c -> [a,"",b,c] * @param str 被切分的字符串 * @param separator 分隔符字符 * @return 切分后的集合 */ public static List<String> split(String str, char separator) { return split(str, separator, 0); } /** * 切分字符串 * @param str 被切分的字符串 * @param separator 分隔符字符 * @param limit 限制分片数 * @return 切分后的集合 */ public static List<String> split(String str, char separator, int limit){ if(str == null) { return null; } List<String> list = new ArrayList<String>(limit == 0 ? 16 : limit); if(limit == 1) { list.add(str); return list; } boolean isNotEnd = true; //未结束切分的标志 int strLen = str.length(); StringBuilder sb = new StringBuilder(strLen); for(int i=0; i < strLen; i++) { char c = str.charAt(i); if(isNotEnd && c == separator) { list.add(sb.toString()); //清空StringBuilder sb.delete(0, sb.length()); //当达到切分上限-1的量时,将所剩字符全部作为最后一个串 if(limit !=0 && list.size() == limit-1) { isNotEnd = false; } }else { sb.append(c); } } list.add(sb.toString()); return list; } /** * 切分字符串<br> * from jodd * @param str 被切分的字符串 * @param delimiter 分隔符 * @return */ public static String[] split(String str, String delimiter) { if(str == null) { return null; } if(str.trim().length() == 0) { return new String[]{str}; } int dellen = delimiter.length(); //del length int maxparts = (str.length() / dellen) + 2; // one more for the last int[] positions = new int[maxparts]; int i, j = 0; int count = 0; positions[0] = - dellen; while ((i = str.indexOf(delimiter, j)) != -1) { count++; positions[count] = i; j = i + dellen; } count++; positions[count] = str.length(); String[] result = new String[count]; for (i = 0; i < count; i++) { result[i] = str.substring(positions[i] + dellen, positions[i + 1]); } return result; } /** * 重复某个字符 * @param c 被重复的字符 * @param count 重复的数目 * @return 重复字符字符串 */ public static String repeat(char c, int count) { char[] result = new char[count]; for (int i = 0; i < count; i++) { result[i] = c; } return new String(result); } /** * 给定字符串转换字符编码<br/> * 如果参数为空,则返回原字符串,不报错。 * @param str 被转码的字符串 * @param sourceCharset 原字符集 * @param destCharset 目标字符集 * @return 转换后的字符串 */ public static String convertCharset(String str, String sourceCharset, String destCharset) { if(isBlank(str) || isBlank(sourceCharset) || isBlank(destCharset)) { return str; } try { return new String(str.getBytes(sourceCharset), destCharset); } catch (UnsupportedEncodingException e) { return str; } } /** * 比较两个字符串是否相同,如果为null或者空串则算不同 * @param str1 字符串1 * @param str2 字符串2 * @return 是否非空相同 */ public static boolean equalsNotEmpty(String str1, String str2) { if(isEmpty(str1)) { return false; } return str1.equals(str2); } /** * 格式化文本 * @param template 文本模板,被替换的部分用 {} 表示 * @param values 参数值 * @return 格式化后的文本 */ public static String format(String template, Object... values) { return String.format(template.replace("{}", "%s"), values); } }
[ "loolly@gmail.com" ]
loolly@gmail.com
a79e90ed4ac7f888fe00919f77a2d8feaf8214c8
f97d6643da2e5fd7762cac83bff6f6f6615b6a15
/src/main/java/com/schantz/remotecq/client/ContributionToleranceFrameCq.java
ba4fd0612ea8f0c80ab794ed6fe9979095eecf91
[]
no_license
roo104/dls-middleware
51229bca28e12cb98fd849d2389c7c8a47973caf
14158ac6dc849b6c6a2cbfb39aef7d4f99960ed8
refs/heads/master
2021-05-01T05:12:40.195450
2017-02-09T08:55:22
2017-02-09T08:55:22
79,714,673
0
0
null
null
null
null
UTF-8
Java
false
false
3,818
java
package com.schantz.remotecq.client; import java.io.*; import com.fasterxml.jackson.annotation.*; public class ContributionToleranceFrameCq implements Serializable { @JsonProperty("negativeInnerTolerancePct") private Double negativeInnerTolerancePct = null; @JsonProperty("positiveInnerTolerancePct") private Double positiveInnerTolerancePct = null; @JsonProperty("negativeInnerToleranceAbs") private Double negativeInnerToleranceAbs = null; @JsonProperty("positiveInnerToleranceAbs") private Double positiveInnerToleranceAbs = null; @JsonProperty("negativeOuterTolerancePct") private Double negativeOuterTolerancePct = null; @JsonProperty("positiveOuterTolerancePct") private Double positiveOuterTolerancePct = null; @JsonProperty("negativeOuterToleranceAbs") private Double negativeOuterToleranceAbs = null; @JsonProperty("positiveOuterToleranceAbs") private Double positiveOuterToleranceAbs = null; @JsonProperty("skipMonths") private Long skipMonths = null; @JsonProperty("contributionTolerenceActionCq") private String contributionTolerenceActionCq = null; @JsonProperty("isAdjustOnlyIfSameDiff") private Boolean isAdjustOnlyIfSameDiff = false; public Double getNegativeInnerTolerancePct() { return negativeInnerTolerancePct; } public void setNegativeInnerTolerancePct(Double negativeInnerTolerancePct) { this.negativeInnerTolerancePct = negativeInnerTolerancePct; } public Double getPositiveInnerTolerancePct() { return positiveInnerTolerancePct; } public void setPositiveInnerTolerancePct(Double positiveInnerTolerancePct) { this.positiveInnerTolerancePct = positiveInnerTolerancePct; } public Double getNegativeInnerToleranceAbs() { return negativeInnerToleranceAbs; } public void setNegativeInnerToleranceAbs(Double negativeInnerToleranceAbs) { this.negativeInnerToleranceAbs = negativeInnerToleranceAbs; } public Double getPositiveInnerToleranceAbs() { return positiveInnerToleranceAbs; } public void setPositiveInnerToleranceAbs(Double positiveInnerToleranceAbs) { this.positiveInnerToleranceAbs = positiveInnerToleranceAbs; } public Double getNegativeOuterTolerancePct() { return negativeOuterTolerancePct; } public void setNegativeOuterTolerancePct(Double negativeOuterTolerancePct) { this.negativeOuterTolerancePct = negativeOuterTolerancePct; } public Double getPositiveOuterTolerancePct() { return positiveOuterTolerancePct; } public void setPositiveOuterTolerancePct(Double positiveOuterTolerancePct) { this.positiveOuterTolerancePct = positiveOuterTolerancePct; } public Double getNegativeOuterToleranceAbs() { return negativeOuterToleranceAbs; } public void setNegativeOuterToleranceAbs(Double negativeOuterToleranceAbs) { this.negativeOuterToleranceAbs = negativeOuterToleranceAbs; } public Double getPositiveOuterToleranceAbs() { return positiveOuterToleranceAbs; } public void setPositiveOuterToleranceAbs(Double positiveOuterToleranceAbs) { this.positiveOuterToleranceAbs = positiveOuterToleranceAbs; } public Long getSkipMonths() { return skipMonths; } public void setSkipMonths(Long skipMonths) { this.skipMonths = skipMonths; } public String getContributionTolerenceActionCq() { return contributionTolerenceActionCq; } public void setContributionTolerenceActionCq(String contributionTolerenceActionCq) { this.contributionTolerenceActionCq = contributionTolerenceActionCq; } public Boolean getIsAdjustOnlyIfSameDiff() { return isAdjustOnlyIfSameDiff; } public void setIsAdjustOnlyIfSameDiff(Boolean isAdjustOnlyIfSameDiff) { this.isAdjustOnlyIfSameDiff = isAdjustOnlyIfSameDiff; } }
[ "jonasp@schantz.com" ]
jonasp@schantz.com
2b65762a40a833e92a4eeaa02ca018e917406fbd
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a148/A148122.java
958c7005a5758c2e5226964c5d6b45568a0c6a00
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
570
java
package irvine.oeis.a148; // Generated by gen_seq4.pl walk23 3 4 1 220212120101 at 2019-07-08 22:06 // DO NOT EDIT here! import irvine.oeis.WalkCubeSequence; /** * A148122 Number of walks within <code>N^3</code> (the first octant of <code>Z^3)</code> starting at <code>(0,0,0)</code> and consisting of n steps taken from <code>{(-1, -1, 0), (-1, 1, -1), (1, -1, 0), (1, 0, 1)}</code>. * @author Georg Fischer */ public class A148122 extends WalkCubeSequence { /** Construct the sequence. */ public A148122() { super(0, 3, 4, "", 1, "220212120101"); } }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
874eb9c629e43f0c31024bd27ab70f4bb60aa39f
556c901a19fedc149e9104ee4c3bf1a90430a84d
/src/main/java/com/ss/editor/control/painting/PaintingInput.java
0dfae8c3642f69a742ec0b470c78cde120beaf45
[ "Apache-2.0" ]
permissive
PlumpMath/jmonkeybuilder
a9d4c88266de8880a13152d57d1e7c52aa42829f
e474279a6bbeb1c06e5ea916436f694aa817f944
refs/heads/master
2021-01-06T09:18:06.021863
2018-05-29T06:04:25
2018-05-29T06:04:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
385
java
package com.ss.editor.control.painting; /** * The enum with list of painting inputs. * * @author JavaSaBr */ public enum PaintingInput { /** * Mouse primary editing input. */ MOUSE_PRIMARY, /** * Mouse secondary editing input. */ MOUSE_SECONDARY, /** * Mouse secondary with ctrl editing input. */ MOUSE_SECONDARY_WITH_CTRL, }
[ "javasabr@gmail.com" ]
javasabr@gmail.com
3293d1b98231e1fcf11822401ffadb2ed2dc2448
206ae44f0dcbada4c0a06f27f902d46cd25c11c6
/characteristic/u2ab5/src/main/java/org/im97mori/ble/characteristic/u2ab5/LocationNameAndroid.java
7fe0157775b1f9cae28bff3643fed9697135634d
[ "MIT" ]
permissive
sengeiou/AndroidBLEUtil
39836b8d6f9a5c7839d4e5733f6387b4cde859a8
6fad1a5f44f3a0b2195fc4ae7de48dc8eb3e0dea
refs/heads/master
2023-01-08T09:11:08.558555
2020-11-01T08:38:44
2020-11-01T08:40:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,499
java
package org.im97mori.ble.characteristic.u2ab5; import android.bluetooth.BluetoothGattCharacteristic; import android.os.Parcel; import android.os.Parcelable; import androidx.annotation.NonNull; import org.im97mori.ble.ByteArrayCreater; import static org.im97mori.ble.BLEConstants.CharacteristicUUID.LOCATION_NAME_CHARACTERISTIC; /** * Location Name (Characteristics UUID: 0x2AB5) */ @SuppressWarnings({"WeakerAccess"}) public class LocationNameAndroid extends LocationName implements Parcelable { /** * @see ByteArrayCreater */ public static final ByteArrayCreater<LocationNameAndroid> CREATOR = new ByteArrayCreater<LocationNameAndroid>() { /** * {@inheritDoc} */ @Override @NonNull public LocationNameAndroid createFromParcel(@NonNull Parcel in) { return new LocationNameAndroid(in); } /** * {@inheritDoc} */ @Override @NonNull public LocationNameAndroid[] newArray(int size) { return new LocationNameAndroid[size]; } /** * {@inheritDoc} */ @NonNull public LocationNameAndroid createFromByteArray(@NonNull byte[] values) { BluetoothGattCharacteristic bluetoothGattCharacteristic = new BluetoothGattCharacteristic(LOCATION_NAME_CHARACTERISTIC, 0, 0); bluetoothGattCharacteristic.setValue(values); return new LocationNameAndroid(bluetoothGattCharacteristic); } }; /** * Constructor from {@link BluetoothGattCharacteristic} * * @param bluetoothGattCharacteristic Characteristics UUID: 0x2AB5 */ public LocationNameAndroid(@NonNull BluetoothGattCharacteristic bluetoothGattCharacteristic) { super(bluetoothGattCharacteristic.getValue()); } /** * Constructor from parameters * * @param locationName Location Name */ public LocationNameAndroid(@NonNull String locationName) { super(locationName); } /** * Constructor from {@link Parcel} * * @param in Parcel */ private LocationNameAndroid(@NonNull Parcel in) { super(in.createByteArray()); } /** * {@inheritDoc} */ @Override public int describeContents() { return 0; } /** * {@inheritDoc} */ @Override public void writeToParcel(@NonNull Parcel dest, int flags) { dest.writeByteArray(getBytes()); } }
[ "github@im97mori.org" ]
github@im97mori.org
0d7ddbfa03eeb84662611af1c3897eabd0fde290
65bdd0b55ac61030d6149e46b80bf447d178c2c9
/src/main/java/com/joker/wms/service/TestPaperManager.java
0e356837bf731fc5c3f061d318ec00f984d14a85
[]
no_license
JokerQZhang/wms
0c2720d67819f456355db811b210143f0c9f8cda
4a5e796078d595315fcc8803465e8d0741f5c8cf
refs/heads/master
2020-04-03T00:13:22.926245
2016-07-25T13:01:40
2016-07-25T13:01:40
60,617,013
0
0
null
null
null
null
UTF-8
Java
false
false
867
java
package com.joker.wms.service; import com.joker.wms.service.GenericManager; import com.joker.wms.model.Examination; import com.joker.wms.model.TestPaper; import java.util.List; import javax.jws.WebService; @WebService public interface TestPaperManager extends GenericManager<TestPaper, Long> { List getAnswerList(String answer_phone, String answer_id); //某人未完成的考试列表 List getNFTpByAnswerId(Long answererId); //随机生成一个试卷,包括考试人的,num是试卷中试题数量 List generatePaper(TestPaper tp, int num); //获取试卷下的所有试题 List getQuestionByPaperId(Long paperId); List getQOptions(Long paperId); void updateAnswer(String pqid, String value); void examinationCommit(Long nowExaminationId); Examination getExamination(String nowExaminationId); List getTestPapersByAnswererId(Long answererId); }
[ "383913397@qq.com" ]
383913397@qq.com
b6a3dbc34a44c948b7e7fc8c709def7cbbfa4b3b
e2721b5e7f6e2ae5e13c0292ee601cea030a73e7
/sample/bf/sim/Sim.java
3a722b2c4462f6be90a34ac27c40d15958619654
[]
no_license
kishida/synthesijer
c7514539d7790b30f4fb82e1c2cf85560163ecda
c37254e7154df98d35ec77705ed44c057048a552
refs/heads/master
2020-12-03T05:10:00.521438
2020-07-19T22:45:32
2020-07-19T22:45:32
43,261,994
1
0
null
2015-09-27T19:45:42
2015-09-27T19:45:41
null
UTF-8
Java
false
false
216
java
public class Sim { public static void main(String... args) { BF b = new BF(); b.startup(); while (true) { b.init(); b.read(); b.print(); boolean flag = true; while (b.step()) ; } } }
[ "miyo@wasamon.net" ]
miyo@wasamon.net
82dca7f637776170a0ffc519c5cc00c4fb6b1431
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/X/AbstractC48202Lh.java
74ea2c8630dcb2c6f0c447ea2f1f880373958ee7
[]
no_license
technocode/com.wa_2.21.2
a3dd842758ff54f207f1640531374d3da132b1d2
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
refs/heads/master
2023-02-12T11:20:28.666116
2021-01-14T10:22:21
2021-01-14T10:22:21
329,578,591
2
1
null
null
null
null
UTF-8
Java
false
false
384
java
package X; /* renamed from: X.2Lh reason: invalid class name and case insensitive filesystem */ public abstract class AbstractC48202Lh extends Exception { public AbstractC48202Lh(String str) { super(str); } public AbstractC48202Lh(String str, Throwable th) { super(str, th); } public AbstractC48202Lh(Throwable th) { super(th); } }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
691a8dac84e1d7ead095f6cd408b651380ffd620
930c207e245c320b108e9699bbbb036260a36d6a
/BRICK-Jackson-JsonLd/generatedCode/src/main/java/brickschema/org/schema/_1_0_2/Brick/IHail_Sensor.java
13f217ea0fa26cbf789394f3fbf24919c9b152b0
[]
no_license
InnovationSE/BRICK-Generated-By-OLGA
24d278f543471e1ce622f5f45d9e305790181fff
7874dfa450a8a2b6a6f9927c0f91f9c7d2abd4d2
refs/heads/master
2021-07-01T14:13:11.302860
2017-09-21T12:44:17
2017-09-21T12:44:17
104,251,784
1
0
null
null
null
null
UTF-8
Java
false
false
974
java
/** * This file is automatically generated by OLGA * @author OLGA * @version 1.0 */ package brickschema.org.schema._1_0_2.Brick; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldId; import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldProperty; import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldType; import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldLink; import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldPropertyType; import brick.jsonld.util.RefId; import brickschema.org.schema._1_0_2.Brick.ISensor; public interface IHail_Sensor extends ISensor { /** * @return RefId */ @JsonIgnore public RefId getRefId(); }
[ "Andre.Ponnouradjane@non.schneider-electric.com" ]
Andre.Ponnouradjane@non.schneider-electric.com
787c1d20fe3b359ff6798083c9581943f6409272
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam_new2/Nicad_t1_beam_new2579.java
e5cb47c26886b89b0adfd9482f1361bc2a84f512
[]
no_license
ryosuke-ku/TestCodeSeacherPlus
cfd03a2858b67a05ecf17194213b7c02c5f2caff
d002a52251f5461598c7af73925b85a05cea85c6
refs/heads/master
2020-05-24T01:25:27.000821
2019-08-17T06:23:42
2019-08-17T06:23:42
187,005,399
0
0
null
null
null
null
UTF-8
Java
false
false
603
java
// clone pairs:3514:80% // 4156:beam/runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/stableinput/BufferedElements.java public class Nicad_t1_beam_new2579 { public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Timer timer = (Timer) o; return timerId.equals(timer.timerId) && window.equals(timer.window) && timestamp.equals(timer.timestamp) && timeDomain == timer.timeDomain; } }
[ "naist1020@gmail.com" ]
naist1020@gmail.com
2d92d1827f189a12069c4e3cc44fe5c686353e3b
b6825082f57b892e84e7b85d85cacc64cd864a42
/src/com/vangav/backend/public_apis/facebook/json/edges/music/Music.java
c9617a21be8acfce94abc9693a58de475cc8453c
[ "MIT" ]
permissive
vangav/vos_backend
2cb689b6c8d1bb46dcdbac394324a847a9bbbf06
df9379b30e0def70b707902387813536ea4a9441
refs/heads/master
2020-05-21T15:01:09.621755
2020-02-15T17:45:22
2020-02-15T17:45:22
65,157,289
81
12
null
null
null
null
UTF-8
Java
false
false
2,630
java
/** * "First, solve the problem. Then, write the code. -John Johnson" * "Or use Vangav M" * www.vangav.com * */ /** * MIT License * * Copyright (c) 2016 Vangav * * 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. * */ /** * Community * Facebook Group: Vangav Open Source - Backend * fb.com/groups/575834775932682/ * Facebook Page: Vangav * fb.com/vangav.f * * Third party communities for Vangav Backend * - play framework * - cassandra * - datastax * * Tag your question online (e.g.: stack overflow, etc ...) with * #vangav_backend * to easier find questions/answers online * */ package com.vangav.backend.public_apis.facebook.json.edges.music; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.vangav.backend.public_apis.facebook.json.edges.edge.FacebookGraphApiEdge; /** * @author mustapha * fb.com/mustapha.abdallah */ /** * Music represents Facebook's graph API edge music * * Reference: * https://developers.facebook.com/docs/graph-api/reference/v2.7/user * */ @JsonIgnoreProperties(ignoreUnknown = true) public class Music extends FacebookGraphApiEdge { @Override @JsonIgnore protected String getName () throws Exception { return "music"; } @Override @JsonIgnore protected Music getThis () throws Exception { return this; } @Override @JsonIgnore public String getEdgeName () throws Exception { return "music"; } @JsonProperty public MusicItem [] data; }
[ "travolque@gmail.com" ]
travolque@gmail.com
f5018720aaa5188bcdb6190b24af817c3c2aacfd
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/31/31_3351a89c094532fb85a0ab1815add7f389698540/SubTabHostInterfaceView/31_3351a89c094532fb85a0ab1815add7f389698540_SubTabHostInterfaceView_s.java
64db1705b302a5ab677ffaee32e6bcea558752e8
[]
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
5,601
java
package org.ovirt.engine.ui.webadmin.section.main.view.tab.host; import javax.inject.Inject; import org.ovirt.engine.core.common.businessentities.VDS; import org.ovirt.engine.ui.common.SubTableResources; import org.ovirt.engine.ui.common.idhandler.ElementIdHandler; import org.ovirt.engine.ui.common.idhandler.WithElementId; import org.ovirt.engine.ui.common.system.ClientStorage; import org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider; import org.ovirt.engine.ui.common.view.AbstractSubTabFormView; import org.ovirt.engine.ui.common.widget.table.SimpleActionTable; import org.ovirt.engine.ui.uicommonweb.UICommand; import org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceLineModel; import org.ovirt.engine.ui.uicommonweb.models.hosts.HostInterfaceListModel; import org.ovirt.engine.ui.uicommonweb.models.hosts.HostListModel; import org.ovirt.engine.ui.webadmin.section.main.presenter.tab.host.SubTabHostInterfacePresenter; import org.ovirt.engine.ui.webadmin.widget.action.WebAdminButtonDefinition; import org.ovirt.engine.ui.webadmin.widget.host.HostInterfaceForm; import com.google.gwt.core.client.GWT; import com.google.gwt.event.shared.EventBus; import com.google.gwt.user.cellview.client.CellTable.Resources; import com.google.gwt.user.cellview.client.TextColumn; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.VerticalPanel; public class SubTabHostInterfaceView extends AbstractSubTabFormView<VDS, HostListModel, HostInterfaceListModel> implements SubTabHostInterfacePresenter.ViewDef { interface ViewIdHandler extends ElementIdHandler<SubTabHostInterfaceView> { ViewIdHandler idHandler = GWT.create(ViewIdHandler.class); } /** * An empty column, used to render Host NIC table header. */ private class EmptyColumn extends TextColumn<HostInterfaceLineModel> { @Override public String getValue(HostInterfaceLineModel object) { return null; } } @WithElementId final SimpleActionTable<HostInterfaceLineModel> table; private final VerticalPanel contentPanel; @Inject public SubTabHostInterfaceView(SearchableDetailModelProvider<HostInterfaceLineModel, HostListModel, HostInterfaceListModel> modelProvider, EventBus eventBus, ClientStorage clientStorage) { super(modelProvider); this.table = new SimpleActionTable<HostInterfaceLineModel>(modelProvider, getTableResources(), eventBus, clientStorage); ViewIdHandler.idHandler.generateAndSetIds(this); initTable(); contentPanel = new VerticalPanel(); contentPanel.add(table); contentPanel.add(new Label("Empty")); initWidget(contentPanel); } Resources getTableResources() { return GWT.<Resources> create(SubTableResources.class); } void initTable() { table.addColumn(new EmptyColumn(), "", "10%"); table.addColumn(new EmptyColumn(), "Name", "20%"); table.addColumn(new EmptyColumn(), "Address", "20%"); table.addColumn(new EmptyColumn(), "MAC", "20%"); table.addColumnWithHtmlHeader(new EmptyColumn(), "Speed <sub>(Mbps)</sub>", "10%"); table.addColumnWithHtmlHeader(new EmptyColumn(), "Rx <sub>(Mbps)</sub>", "10%"); table.addColumnWithHtmlHeader(new EmptyColumn(), "Tx <sub>(Mbps)</sub>", "10%"); table.addColumnWithHtmlHeader(new EmptyColumn(), "Drops <sub>(Pkts)</sub>", "10%"); table.addColumn(new EmptyColumn(), "Bond", "20%"); table.addColumn(new EmptyColumn(), "Vlan", "20%"); table.addColumn(new EmptyColumn(), "Network Name", "20%"); table.addActionButton(new WebAdminButtonDefinition<HostInterfaceLineModel>("Add / Edit") { @Override protected UICommand resolveCommand() { return getDetailModel().getEditCommand(); } }); table.addActionButton(new WebAdminButtonDefinition<HostInterfaceLineModel>("Edit Management Network") { @Override protected UICommand resolveCommand() { return getDetailModel().getEditManagementNetworkCommand(); } }); // TODO: separator table.addActionButton(new WebAdminButtonDefinition<HostInterfaceLineModel>("Bond") { @Override protected UICommand resolveCommand() { return getDetailModel().getBondCommand(); } }); table.addActionButton(new WebAdminButtonDefinition<HostInterfaceLineModel>("Detach") { @Override protected UICommand resolveCommand() { return getDetailModel().getDetachCommand(); } }); // TODO: separator table.addActionButton(new WebAdminButtonDefinition<HostInterfaceLineModel>("Save Network Configuration") { @Override protected UICommand resolveCommand() { return getDetailModel().getSaveNetworkConfigCommand(); } }); table.showRefreshButton(); } @Override public void setMainTabSelectedItem(VDS selectedItem) { // TODO(vszocs) possible performance optimization: don't create HostInterfaceForm upon each selection HostInterfaceForm hostInterfaceForm = new HostInterfaceForm(getDetailModel()); contentPanel.remove(contentPanel.getWidgetCount() - 1); contentPanel.add(hostInterfaceForm); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
32287555689ae71c0f9afb8805a18a957dba26a7
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project252/src/test/java/org/gradle/test/performance/largejavamultiproject/project252/p1261/Test25239.java
04f3b206a46b17a3892b53baf5a854819e2475db
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,274
java
package org.gradle.test.performance.largejavamultiproject.project252.p1261; import org.gradle.test.performance.largejavamultiproject.project252.p1260.Production25212; import org.junit.Test; import static org.junit.Assert.*; public class Test25239 { Production25239 objectUnderTest = new Production25239(); @Test public void testProperty0() { Production25212 value = new Production25212(); objectUnderTest.setProperty0(value); assertEquals(value, objectUnderTest.getProperty0()); } @Test public void testProperty1() { Production25225 value = new Production25225(); objectUnderTest.setProperty1(value); assertEquals(value, objectUnderTest.getProperty1()); } @Test public void testProperty2() { Production25238 value = new Production25238(); objectUnderTest.setProperty2(value); assertEquals(value, objectUnderTest.getProperty2()); } @Test public void testProperty3() { String value = "value"; objectUnderTest.setProperty3(value); assertEquals(value, objectUnderTest.getProperty3()); } @Test public void testProperty4() { String value = "value"; objectUnderTest.setProperty4(value); assertEquals(value, objectUnderTest.getProperty4()); } @Test public void testProperty5() { String value = "value"; objectUnderTest.setProperty5(value); assertEquals(value, objectUnderTest.getProperty5()); } @Test public void testProperty6() { String value = "value"; objectUnderTest.setProperty6(value); assertEquals(value, objectUnderTest.getProperty6()); } @Test public void testProperty7() { String value = "value"; objectUnderTest.setProperty7(value); assertEquals(value, objectUnderTest.getProperty7()); } @Test public void testProperty8() { String value = "value"; objectUnderTest.setProperty8(value); assertEquals(value, objectUnderTest.getProperty8()); } @Test public void testProperty9() { String value = "value"; objectUnderTest.setProperty9(value); assertEquals(value, objectUnderTest.getProperty9()); } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
656475c17e74ed4a13c7a8b12f1346523d8319ba
96196a9b6c8d03fed9c5b4470cdcf9171624319f
/decompiled/com/google/android/gms/drive/internal/ListParentsRequest.java
9202632a9406602440e858655407d1e2d5c17441
[]
no_license
manciuszz/KTU-Asmens-Sveikatos-Ugdymas
8ef146712919b0fb9ad211f6cb7cbe550bca10f9
41e333937e8e62e1523b783cdb5aeedfa1c7fcc2
refs/heads/master
2020-04-27T03:40:24.436539
2019-03-05T22:39:08
2019-03-05T22:39:08
174,031,152
0
0
null
null
null
null
UTF-8
Java
false
false
758
java
package com.google.android.gms.drive.internal; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; import com.google.android.gms.drive.DriveId; public class ListParentsRequest implements SafeParcelable { public static final Creator<ListParentsRequest> CREATOR = new ad(); final DriveId Jr; final int xM; ListParentsRequest(int versionCode, DriveId driveId) { this.xM = versionCode; this.Jr = driveId; } public ListParentsRequest(DriveId id) { this(1, id); } public int describeContents() { return 0; } public void writeToParcel(Parcel dest, int flags) { ad.a(this, dest, flags); } }
[ "evilquaint@gmail.com" ]
evilquaint@gmail.com
3b745181b1812f60c443b1249c95f9c6ec20517c
3e18f2f1f8f319cbfb08e968446cf9b3eaa9b41f
/src/main/java/com/covens/common/block/natural/tree/BlockModLog.java
73dd84f759045fb678e81c67ec615ac03cba0e69
[ "MIT" ]
permissive
zabi94/Covens-reborn
f35dbb85f78d1b297956907c3b05f0a9cc045be6
6fe956025ad47051e14e2e7c45893ddebc5c330a
refs/heads/master
2020-04-10T16:17:30.713563
2020-03-07T13:23:22
2020-03-07T13:23:22
161,140,468
11
2
NOASSERTION
2019-05-08T19:31:40
2018-12-10T08:15:04
Java
UTF-8
Java
false
false
1,940
java
package com.covens.common.block.natural.tree; import com.covens.common.core.statics.ModCreativeTabs; import com.covens.common.lib.LibMod; import net.minecraft.block.BlockLog; import net.minecraft.block.properties.IProperty; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import zabi.minecraft.minerva.client.blockmodels.IModelRegister; import zabi.minecraft.minerva.client.blockmodels.ModelHandler; public class BlockModLog extends BlockLog implements IModelRegister { public BlockModLog(String id) { super(); this.setTranslationKey(id); this.setRegistryName(LibMod.MOD_ID, id); this.setCreativeTab(ModCreativeTabs.PLANTS_CREATIVE_TAB); this.setDefaultState(this.blockState.getBaseState().withProperty(LOG_AXIS, EnumAxis.Y)); } @Override public int getMetaFromState(IBlockState state) { return state.getValue(LOG_AXIS).ordinal(); } @Override public IBlockState getStateFromMeta(int meta) { EnumAxis axis = EnumAxis.values()[meta]; return this.getDefaultState().withProperty(LOG_AXIS, axis); } @Override public boolean isFlammable(IBlockAccess world, BlockPos pos, EnumFacing face) { return true; } @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty<?>[] { LOG_AXIS }); } @Override public int damageDropped(IBlockState state) { return 0; } @Override protected ItemStack getSilkTouchDrop(IBlockState state) { return new ItemStack(Item.getItemFromBlock(this), 1, 0); } @Override @SideOnly(Side.CLIENT) public void registerModel() { ModelHandler.registerModel(this, 0); } }
[ "zabi94@gmail.com" ]
zabi94@gmail.com
ae966cde6ce0062f3dc9b3f7a63502b9a3807dad
e566984f0c53ff5a53b40b4d8dbbdc6e2c4d0887
/pm-api-home/pm-api/src/main/java/com/heb/pm/arbaf/ArbafService.java
092d0b2ef185eb41d75d4dd460719a14f416f9c3
[]
no_license
khoale22/pm-api
11a580ba3a82634f3dc7d8a0e7916a461d9d4f84
0f6dddbb78541fb8740185fef5c01ba11239dc83
refs/heads/master
2020-09-26T11:22:57.790522
2019-12-06T04:22:35
2019-12-06T04:22:35
226,244,772
0
0
null
null
null
null
UTF-8
Java
false
false
1,928
java
package com.heb.pm.arbaf; import com.heb.pm.core.repository.UserSearchRepository; import com.heb.pm.util.user.User; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Collection; import java.util.List; import java.util.Objects; /** * Holds the logic for looking stuff up on ARBAF. * * @author d116773 * @since 1.1.0 */ @Service public class ArbafService { private static final Logger logger = LoggerFactory.getLogger(ArbafService.class); @Autowired private transient ArbafDao arbafDao; @Autowired private transient UserSearchRepository userSearchRepository; /** * Returns a collection of the user's permissions. * * @param applicationName The name of the application to look up. * @param userId The ID of the user to look up. * @param includeJobCode Whether or not to include the user's job code when looking up permissions. * @return A collection of the user's permissions. */ public Collection<Permission> getUserPermissions(String applicationName, String userId, Boolean includeJobCode) { String jobCode = null; if (includeJobCode) { try { List<User> users = this.userSearchRepository.getUserList(List.of(userId)); if (users.isEmpty()) { logger.warn(String.format("User %s not found, defaulting to no job code.", userId)); } else { jobCode = users.get(0).getJobCode(); logger.debug(String.format("Using %s as job code.", jobCode)); } } catch (Exception e) { logger.warn(String.format("Caught exception %s looking up user %s, defaulting to no job code.", e.getLocalizedMessage(), userId)); } } if (!includeJobCode || Objects.isNull(jobCode)) { return this.arbafDao.getUserPermissions(applicationName, userId); } return this.arbafDao.getUserPermissions(applicationName, userId, jobCode); } }
[ "tran.than@heb.com" ]
tran.than@heb.com
b6143215248d3b7766b3842ee6f8650a8cc1610f
1a7e87b888aebf6bf3cbbb903d34c34c9dac39f9
/api/src/main/java/org/commonjava/shelflife/util/BlockKeyUtils.java
847ef44a16c8b007f8358e85fdbb2d4cc935ee06
[]
no_license
jdcasey/shelflife
f83395f46842e13dfe8cd53cefe3f2fb3316a434
97a2842221b11803c7155296f750a226a1b9d452
refs/heads/master
2023-05-31T23:06:24.396088
2014-06-05T21:13:58
2014-06-05T21:13:58
3,520,265
0
0
null
null
null
null
UTF-8
Java
false
false
1,956
java
/******************************************************************************* * Copyright (c) 2014 Red Hat, Inc.. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html * * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ package org.commonjava.shelflife.util; import java.util.Calendar; import java.util.Date; import org.commonjava.shelflife.ExpirationManager; public final class BlockKeyUtils { private BlockKeyUtils() { } public static String generateCurrentBlockKey() { return generateBlockKey( System.currentTimeMillis(), false ); } public static String generateBlockKey( final long d ) { return generateBlockKey( d, false ); } public static Date getNextBlockStart( final long d ) { final Calendar cal = Calendar.getInstance(); cal.setTime( new Date( d ) ); final int block = ( cal.get( Calendar.MINUTE ) / ExpirationManager.NEXT_EXPIRATION_OFFSET_MINUTES ) + 1; cal.set( Calendar.MINUTE, ExpirationManager.NEXT_EXPIRATION_OFFSET_MINUTES * block ); return cal.getTime(); } private static String generateBlockKey( final long d, final boolean useNext ) { final Calendar cal = Calendar.getInstance(); cal.setTime( new Date( d ) ); final String key = String.format( "%d.%02d.%02d.%02d-%02d", cal.get( Calendar.YEAR ), ( cal.get( Calendar.MONTH ) + 1 ), cal.get( Calendar.DATE ), cal.get( Calendar.HOUR_OF_DAY ), ( ( cal.get( Calendar.MINUTE ) / ExpirationManager.NEXT_EXPIRATION_OFFSET_MINUTES ) + ( useNext ? 1 : 0 ) ) ); return key; } }
[ "jdcasey@commonjava.org" ]
jdcasey@commonjava.org
16486dfc87c85d67bcbfa93df092336ba1622d7b
027b4de039260e3e16c8515958a707d23550248e
/SIF3InfraREST/sif3InfraCommon/src/sif3/infra/common/model/ApplicationInfoType.java
f752e52d9db8825d15adb1e48cf77031190464ae
[ "Apache-2.0" ]
permissive
lduivenbode/sif3-framework-java
fe347a43ed09eab3a53a231eff3a2f092a86c84f
2ad395778d2843598491ec18c2f3e3644fdebd84
refs/heads/master
2021-01-24T00:43:12.863741
2015-06-16T04:15:51
2015-06-16T04:15:51
41,706,441
0
0
null
2015-08-31T23:51:31
2015-08-31T23:51:29
null
UTF-8
Java
false
false
6,041
java
package sif3.infra.common.model; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for applicationInfoType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="applicationInfoType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="applicationKey" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="supportedInfrastructureVersion" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="dataModelNamespace" type="{http://www.w3.org/2001/XMLSchema}anyURI"/> * &lt;element name="transport" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="applicationProduct" type="{http://www.sifassociation.org/infrastructure/3.0.1}productIdentityType"/> * &lt;element name="adapterProduct" type="{http://www.sifassociation.org/infrastructure/3.0.1}productIdentityType" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "applicationInfoType", namespace = "http://www.sifassociation.org/infrastructure/3.0.1", propOrder = { "applicationKey", "supportedInfrastructureVersion", "dataModelNamespace", "transport", "applicationProduct", "adapterProduct" }) public class ApplicationInfoType { @XmlElement(namespace = "http://www.sifassociation.org/infrastructure/3.0.1", required = true) protected String applicationKey; @XmlElement(namespace = "http://www.sifassociation.org/infrastructure/3.0.1", required = true) protected String supportedInfrastructureVersion; @XmlElement(namespace = "http://www.sifassociation.org/infrastructure/3.0.1", required = true) @XmlSchemaType(name = "anyURI") protected String dataModelNamespace; @XmlElement(namespace = "http://www.sifassociation.org/infrastructure/3.0.1") protected String transport; @XmlElement(namespace = "http://www.sifassociation.org/infrastructure/3.0.1", required = true) protected ProductIdentityType applicationProduct; @XmlElement(namespace = "http://www.sifassociation.org/infrastructure/3.0.1") protected ProductIdentityType adapterProduct; /** * Gets the value of the applicationKey property. * * @return * possible object is * {@link String } * */ public String getApplicationKey() { return applicationKey; } /** * Sets the value of the applicationKey property. * * @param value * allowed object is * {@link String } * */ public void setApplicationKey(String value) { this.applicationKey = value; } /** * Gets the value of the supportedInfrastructureVersion property. * * @return * possible object is * {@link String } * */ public String getSupportedInfrastructureVersion() { return supportedInfrastructureVersion; } /** * Sets the value of the supportedInfrastructureVersion property. * * @param value * allowed object is * {@link String } * */ public void setSupportedInfrastructureVersion(String value) { this.supportedInfrastructureVersion = value; } /** * Gets the value of the dataModelNamespace property. * * @return * possible object is * {@link String } * */ public String getDataModelNamespace() { return dataModelNamespace; } /** * Sets the value of the dataModelNamespace property. * * @param value * allowed object is * {@link String } * */ public void setDataModelNamespace(String value) { this.dataModelNamespace = value; } /** * Gets the value of the transport property. * * @return * possible object is * {@link String } * */ public String getTransport() { return transport; } /** * Sets the value of the transport property. * * @param value * allowed object is * {@link String } * */ public void setTransport(String value) { this.transport = value; } /** * Gets the value of the applicationProduct property. * * @return * possible object is * {@link ProductIdentityType } * */ public ProductIdentityType getApplicationProduct() { return applicationProduct; } /** * Sets the value of the applicationProduct property. * * @param value * allowed object is * {@link ProductIdentityType } * */ public void setApplicationProduct(ProductIdentityType value) { this.applicationProduct = value; } /** * Gets the value of the adapterProduct property. * * @return * possible object is * {@link ProductIdentityType } * */ public ProductIdentityType getAdapterProduct() { return adapterProduct; } /** * Sets the value of the adapterProduct property. * * @param value * allowed object is * {@link ProductIdentityType } * */ public void setAdapterProduct(ProductIdentityType value) { this.adapterProduct = value; } }
[ "joerg.huber@systemic.com.au" ]
joerg.huber@systemic.com.au
519b32e58f267982d9c7f220d1b75956ce169dd4
b530af769bb496cdbadb4d1c14b81d6c53e2e36f
/factory/src/main/java/io/github/factoryfx/server/user/persistent/PersistentUserManagementFactory.java
09eca4ec6724545399c145d0bd883d96309bdbaf
[ "Apache-2.0" ]
permissive
factoryfx/factoryfx
ab366d3144a27fd07bbf4098b9dc82e3bab1181f
08bab85ecd5ab30b26fa57d852c7fac3fb5ce312
refs/heads/master
2023-07-09T05:20:02.320970
2023-07-04T15:11:52
2023-07-04T15:11:52
59,744,695
12
3
Apache-2.0
2023-03-02T15:11:26
2016-05-26T11:22:59
Java
UTF-8
Java
false
false
1,444
java
package io.github.factoryfx.server.user.persistent; import io.github.factoryfx.factory.SimpleFactoryBase; import io.github.factoryfx.factory.util.LanguageText; import io.github.factoryfx.factory.validation.ValidationResult; import io.github.factoryfx.factory.FactoryBase; import io.github.factoryfx.factory.attribute.dependency.FactoryListAttribute; import io.github.factoryfx.server.user.User; import io.github.factoryfx.server.user.UserManagement; import java.util.HashSet; public class PersistentUserManagementFactory<R extends FactoryBase<?,R>> extends SimpleFactoryBase<UserManagement,R> { public final FactoryListAttribute<User, UserFactory<R>> users = new FactoryListAttribute<User, UserFactory<R>>().en("users").de("Benutzer").userNotSelectable(); @Override protected PersistentUserManagement createImpl() { return new PersistentUserManagement(users.instances()); } public PersistentUserManagementFactory(){ config().setDisplayTextProvider(() -> "user management"); users.validation(value -> { HashSet<String> set = new HashSet<>(); LanguageText en = new LanguageText().en("user name is not unique"); for (UserFactory<R> user : users) { if (!set.add(user.name.get())) { return new ValidationResult(true, en); } } return new ValidationResult(false, en); }); } }
[ "henning.brackmann@scoop-software.de" ]
henning.brackmann@scoop-software.de
007060d9f1b9ac568b391acbac50d40f64f08d3c
8f23d27c509c7a2f4e810cb2fdaf65f5808709c6
/components/camel-blueprint/src/test/java/org/apache/camel/blueprint/BlueprintComponentResolverTest.java
de4ccc0f0c10d234bbe90ee3da9aa049a03a6d82
[ "Apache-2.0", "LicenseRef-scancode-unknown", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Alirezazabetan/camel
210db1ba7ee4e1e1e8a194105c40fe2736a3ac6d
037d15c209e0360b4a6e2e4bb91a1887c19f9414
refs/heads/master
2020-04-02T02:13:16.996791
2018-10-19T18:14:45
2018-10-19T18:14:45
153,897,779
1
1
Apache-2.0
2018-10-20T11:16:49
2018-10-20T11:16:48
null
UTF-8
Java
false
false
4,115
java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.camel.blueprint; import org.apache.camel.CamelContext; import org.apache.camel.Component; import org.apache.camel.ComponentConfiguration; import org.apache.camel.Endpoint; import org.apache.camel.EndpointConfiguration; import org.apache.camel.impl.DefaultCamelContext; import org.apache.camel.impl.SimpleRegistry; import org.apache.camel.test.junit4.TestSupport; import org.junit.Test; public class BlueprintComponentResolverTest extends TestSupport { @Test public void testOsgiResolverFindComponentFallbackTest() throws Exception { SimpleRegistry registry = new SimpleRegistry(); registry.put("allstar-component", new SampleComponent(true)); CamelContext camelContext = new DefaultCamelContext(registry); BlueprintComponentResolver resolver = new BlueprintComponentResolver(null); Component component = resolver.resolveComponent("allstar", camelContext); assertNotNull("We should find the super component", component); assertTrue("We should get the super component here", component instanceof SampleComponent); } @Test public void testOsgiResolverFindLanguageDoubleFallbackTest() throws Exception { SimpleRegistry registry = new SimpleRegistry(); registry.put("allstar", new SampleComponent(false)); registry.put("allstar-component", new SampleComponent(true)); CamelContext camelContext = new DefaultCamelContext(registry); BlueprintComponentResolver resolver = new BlueprintComponentResolver(null); Component component = resolver.resolveComponent("allstar", camelContext); assertNotNull("We should find the super component", component); assertTrue("We should get the super component here", component instanceof SampleComponent); assertFalse("We should NOT find the fallback component", ((SampleComponent) component).isFallback()); } private static class SampleComponent implements Component { private boolean fallback; SampleComponent(boolean fallback) { this.fallback = fallback; } @Override public void setCamelContext(CamelContext camelContext) { throw new UnsupportedOperationException("Should not be called"); } @Override public CamelContext getCamelContext() { throw new UnsupportedOperationException("Should not be called"); } @Override public Endpoint createEndpoint(String uri) throws Exception { throw new UnsupportedOperationException("Should not be called"); } @Override public boolean useRawUri() { throw new UnsupportedOperationException("Should not be called"); } @Override public EndpointConfiguration createConfiguration(String uri) throws Exception { throw new UnsupportedOperationException("Should not be called"); } @Override public ComponentConfiguration createComponentConfiguration() { throw new UnsupportedOperationException("Should not be called"); } public boolean isFallback() { return fallback; } public void setFallback(boolean fallback) { this.fallback = fallback; } } }
[ "davsclaus@apache.org" ]
davsclaus@apache.org
d923882e4366045ba462b0c3a3f25b6e0a07fd8c
18e42a09d7f5dacc1bbeeae4c22284c60cc88b1f
/xstream/src/java/com/thoughtworks/xstream/converters/extended/OptionalIntConverter.java
caf192fbd209fdf3c1de0d9abda5fa9ec7b6b1a3
[ "BSD-3-Clause" ]
permissive
x-stream/xstream
ab7f586f1d682902bbf96f3be2b953df98ff32c3
289ae780001c31d7d5d75e0d58608c13f44549a2
refs/heads/master
2023-08-30T19:33:58.497180
2023-04-22T16:03:39
2023-04-22T16:03:39
32,219,624
818
270
NOASSERTION
2023-05-02T23:36:09
2015-03-14T15:57:12
Java
UTF-8
Java
false
false
2,340
java
/* * Copyright (C) 2022 XStream Committers. * All rights reserved. * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. * * Created on 17. December 2022 by Joerg Schaible */ package com.thoughtworks.xstream.converters.extended; import java.util.OptionalInt; import com.thoughtworks.xstream.converters.Converter; import com.thoughtworks.xstream.converters.MarshallingContext; import com.thoughtworks.xstream.converters.UnmarshallingContext; import com.thoughtworks.xstream.converters.basic.IntConverter; import com.thoughtworks.xstream.io.HierarchicalStreamReader; import com.thoughtworks.xstream.io.HierarchicalStreamWriter; /** * Converts an OptionalInt type. * * @author J&ouml;rg Schaible * @since 1.4.20 */ public class OptionalIntConverter extends IntConverter implements Converter { @Override public boolean canConvert(final Class<?> type) { return type != null && type == OptionalInt.class; } @Override public void marshal(final Object source, final HierarchicalStreamWriter writer, final MarshallingContext context) { writer.setValue(toString(source)); } @Override public Object unmarshal(final HierarchicalStreamReader reader, final UnmarshallingContext context) { final String data = reader.getValue(); // needs to be called before hasMoreChildren. if (!reader.hasMoreChildren()) { return fromString(data); } else { reader.moveDown(); final boolean isPresent = (Boolean)context.convertAnother(context, Boolean.class); reader.moveUp(); reader.moveDown(); final int value = (Integer)context.convertAnother(context, Integer.class); reader.moveUp(); return isPresent ? OptionalInt.of(value) : OptionalInt.empty(); } } @Override public String toString(final Object obj) { final OptionalInt optional = (OptionalInt)obj; return optional.isPresent() ? super.toString(optional.getAsInt()) : ""; } @Override public Object fromString(final String str) { return str == null || str.length() == 0 ? OptionalInt.empty() : OptionalInt.of((Integer)super.fromString(str)); } }
[ "joerg.schaible@gmx.de" ]
joerg.schaible@gmx.de
b171fc10b1068e42e67b0844c0bbecdd1bcd7fe1
a52d6bb42e75ef0678cfcd291e5696a9e358fc4d
/af_webapp/src/main/java/org/kuali/kfs/fp/document/validation/impl/CreditCardReceiptDocumentRuleUtil.java
0a37945ef06a4c476d4db64861700fe7ec1e2db1
[]
no_license
Ariah-Group/Finance
894e39cfeda8f6fdb4f48a4917045c0bc50050c5
ca49930ca456799f99aad57e1e974453d8fe479d
refs/heads/master
2021-01-21T12:11:40.987504
2016-03-24T14:22:40
2016-03-24T14:22:40
26,879,430
0
0
null
null
null
null
UTF-8
Java
false
false
6,766
java
/* * Copyright 2006 The Kuali Foundation * * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php * * 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.kuali.kfs.fp.document.validation.impl; import static org.kuali.kfs.fp.document.validation.impl.CreditCardReceiptDocumentRuleConstants.CREDIT_CARD_RECEIPT_PREFIX; import static org.kuali.kfs.sys.document.validation.impl.AccountingDocumentRuleBaseConstants.ERROR_PATH.DOCUMENT_ERROR_PREFIX; import org.kuali.kfs.fp.businessobject.CreditCardDetail; import org.kuali.kfs.fp.document.CreditCardReceiptDocument; import org.kuali.kfs.sys.KFSKeyConstants; import org.kuali.kfs.sys.KFSKeyConstants.CashReceipt; import org.kuali.kfs.sys.KFSPropertyConstants; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.core.api.util.type.KualiDecimal; import org.kuali.rice.kns.service.DataDictionaryService; import org.kuali.rice.kns.service.DictionaryValidationService; import org.kuali.rice.krad.util.GlobalVariables; import org.kuali.rice.krad.util.MessageMap; /** * Common Credit Card Receipt Document rule utilities. */ public class CreditCardReceiptDocumentRuleUtil { /** * This method method will invoke the data dictionary validation for a CreditCardDetail bo instance, in addition to checking * existence of the CreditCardType and CreditCardVendor attributes that hang off of it. This method assumes that the document * hierarchy for the error map path is managed outside of this call. * * @param creditCardReceipt credit card detail * @return true if credit card detail amount is non zero and credit card vendor and type references exist */ public static boolean validateCreditCardReceipt(CreditCardDetail creditCardReceipt) { MessageMap errorMap = GlobalVariables.getMessageMap(); int originalErrorCount = errorMap.getErrorCount(); // call the DD validation which checks basic data integrity SpringContext.getBean(DictionaryValidationService.class).validateBusinessObject(creditCardReceipt); boolean isValid = (errorMap.getErrorCount() == originalErrorCount); // check that dollar amount is not zero before continuing if (isValid) { isValid = !creditCardReceipt.getCreditCardAdvanceDepositAmount().isZero(); if (!isValid) { String label = SpringContext.getBean(DataDictionaryService.class).getAttributeLabel(CreditCardDetail.class, KFSPropertyConstants.CREDIT_CARD_ADVANCE_DEPOSIT_AMOUNT); errorMap.putError(KFSPropertyConstants.CREDIT_CARD_ADVANCE_DEPOSIT_AMOUNT, KFSKeyConstants.ERROR_ZERO_AMOUNT, label); } } if (isValid) { isValid = SpringContext.getBean(DictionaryValidationService.class).validateReferenceExists(creditCardReceipt, KFSPropertyConstants.CREDIT_CARD_TYPE); if (!isValid) { String label = SpringContext.getBean(DataDictionaryService.class).getAttributeLabel(CreditCardDetail.class, KFSPropertyConstants.FINANCIAL_DOCUMENT_CREDIT_CARD_TYPE_CODE); errorMap.putError(KFSPropertyConstants.FINANCIAL_DOCUMENT_CREDIT_CARD_TYPE_CODE, KFSKeyConstants.ERROR_EXISTENCE, label); } } if (isValid) { isValid = SpringContext.getBean(DictionaryValidationService.class).validateReferenceExists(creditCardReceipt, KFSPropertyConstants.CREDIT_CARD_VENDOR); if (!isValid) { String label = SpringContext.getBean(DataDictionaryService.class).getAttributeLabel(CreditCardDetail.class, KFSPropertyConstants.FINANCIAL_DOCUMENT_CREDIT_CARD_VENDOR_NUMBER); errorMap.putError(KFSPropertyConstants.FINANCIAL_DOCUMENT_CREDIT_CARD_VENDOR_NUMBER, KFSKeyConstants.ERROR_EXISTENCE, label); } } return isValid; } /** * Checks whether the CashReceiptDocument's cash totals are invalid, generating global errors if so. * * @param cashReceiptDocument submitted cash receipt document * @return true if any of the cash totals on cash credit card receipt document are invalid */ public static boolean areCashTotalsInvalid(CreditCardReceiptDocument ccrDocument) { String documentEntryName = ccrDocument.getDocumentHeader().getWorkflowDocument().getDocumentTypeName(); boolean isInvalid = isTotalInvalid(ccrDocument, ccrDocument.getTotalDollarAmount(), documentEntryName, KFSPropertyConstants.CREDIT_CARD_RECEIPTS_TOTAL); return isInvalid; } /** * Returns true if total is invalid and puts an error message in the error map for that property if the amount is negative * * @param cashReceiptDocument * @param totalAmount * @param documentEntryName * @param propertyName * @return true if the totalAmount is an invalid value */ private static boolean isTotalInvalid(CreditCardReceiptDocument ccrDocument, KualiDecimal totalAmount, String documentEntryName, String propertyName) { boolean isInvalid = false; String errorProperty = CREDIT_CARD_RECEIPT_PREFIX + propertyName; // treating null totalAmount as if it were a zero DataDictionaryService dds = SpringContext.getBean(DataDictionaryService.class); String errorLabel = dds.getAttributeLabel(documentEntryName, propertyName); if ((totalAmount == null) || totalAmount.isZero()) { GlobalVariables.getMessageMap().putError(errorProperty, CashReceipt.ERROR_ZERO_TOTAL, errorLabel); isInvalid = true; } else { int precount = GlobalVariables.getMessageMap().getNumberOfPropertiesWithErrors(); DictionaryValidationService dvs = SpringContext.getBean(DictionaryValidationService.class); dvs.validateDocumentAttribute(ccrDocument, propertyName, DOCUMENT_ERROR_PREFIX); // replace generic error message, if any, with something more readable GlobalVariables.getMessageMap().replaceError(errorProperty, KFSKeyConstants.ERROR_MAX_LENGTH, CashReceipt.ERROR_EXCESSIVE_TOTAL, errorLabel); int postcount = GlobalVariables.getMessageMap().getNumberOfPropertiesWithErrors(); isInvalid = (postcount > precount); } return isInvalid; } }
[ "code@ariahgroup.org" ]
code@ariahgroup.org
b1b140a35514d9834b1224a30916d0dfb2d6dc90
1920077b87842a99a32e16d8c3ebf4c98e551c0d
/base/src/com/google/idea/blaze/base/model/primitives/Label.java
302a27d715f6471e5ceaa9c55bbaf7828b54a0a0
[ "Apache-2.0" ]
permissive
zpauly/intellij
08b63d728a427c60fd6b5283c07fc36cdca3e827
abab53d3b050965250a5c465a3bb38c4d95f954f
refs/heads/master
2020-06-24T17:06:32.088602
2016-11-01T16:24:03
2016-11-01T16:24:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,830
java
/* * Copyright 2016 The Bazel Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.idea.blaze.base.model.primitives; import com.google.common.collect.Lists; import com.google.idea.blaze.base.ui.BlazeValidationError; import com.intellij.openapi.diagnostic.Logger; import java.util.Collection; import java.util.List; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; /** Wrapper around a string for a blaze label (//package:rule). */ @Immutable public final class Label extends TargetExpression { private static final Logger LOG = Logger.getInstance(Label.class); public static final long serialVersionUID = 2L; /** Silently returns null if this is not a valid Label */ @Nullable public static Label createIfValid(String label) { if (validate(label)) { return new Label(label); } return null; } public Label(String label) { super(label); List<BlazeValidationError> errors = Lists.newArrayList(); if (!validate(label, errors)) { BlazeValidationError.throwError(errors); } } public Label(WorkspacePath packageName, RuleName newRuleName) { this("//" + packageName.toString() + ":" + newRuleName.toString()); } public static boolean validate(String label) { return validate(label, null); } public static boolean validate(String label, @Nullable Collection<BlazeValidationError> errors) { int colonIndex = label.indexOf(':'); if (label.startsWith("//") && colonIndex >= 0) { String packageName = label.substring("//".length(), colonIndex); if (!validatePackagePath(packageName, errors)) { return false; } String ruleName = label.substring(colonIndex + 1); if (!RuleName.validate(ruleName, errors)) { return false; } return true; } if (label.startsWith("@") && colonIndex >= 0) { // a bazel-specific label pointing to a different repository int slashIndex = label.indexOf("//"); if (slashIndex >= 0) { return validate(label.substring(slashIndex), errors); } } if (errors != null) { errors.add(new BlazeValidationError("Not a valid label, no target name found: " + label)); } return false; } /** * Extract the rule name from a label. The rule name follows a colon at the end of the label. * * @return the rule name */ public RuleName ruleName() { String labelStr = toString(); int colonLocation = labelStr.lastIndexOf(':'); int ruleNameStart = colonLocation + 1; String ruleNameStr = labelStr.substring(ruleNameStart); return RuleName.create(ruleNameStr); } /** * Return the workspace path for the package label for the given label. For example, if the * package is //j/c/g/a/apps/docs:release, it returns j/c/g/a/apps/docs. */ public WorkspacePath blazePackage() { String labelStr = toString(); int startIndex = labelStr.indexOf("//") + "//".length(); int colonIndex = labelStr.lastIndexOf(':'); LOG.assertTrue(colonIndex >= 0); return new WorkspacePath(labelStr.substring(startIndex, colonIndex)); } public static boolean validatePackagePath(String path) { return validatePackagePath(path, null); } public static boolean validatePackagePath( String path, @Nullable Collection<BlazeValidationError> errors) { // Empty packages are legal but not recommended if (path.isEmpty()) { return true; } if (path.charAt(0) == '/') { BlazeValidationError.collect( errors, new BlazeValidationError( "Invalid package name: " + path + "\n" + "Package names may not start with \"/\".")); return false; } if (path.contains("//")) { BlazeValidationError.collect( errors, new BlazeValidationError( "Invalid package name: " + path + "\n " + "package names may not contain \"//\" path separators.")); return false; } if (path.endsWith("/")) { BlazeValidationError.collect( errors, new BlazeValidationError( "Invalid package name: " + path + "\n " + "package names may not end with \"/\"")); return false; } return true; } }
[ "brendandouglas@google.com" ]
brendandouglas@google.com
7a855b13445bb7a360b14c86e2a09477a94ac6a1
f4ad7e219bce178934064b72027fb916fe197539
/pay/service/src/main/java/com/jiujun/shows/pay/dao/AppleProductMapper.java
78c81dcb7d83925fe32971dc7302fdcd69d3f8d2
[]
no_license
OnlyJJ/live
d6a3ca05d0e568814fc2cc92e030f98ea7000aba
9cfd407dafaf55984bdaefb2d34d26da4e3339a4
refs/heads/master
2021-04-03T05:31:06.455891
2019-03-25T01:49:18
2019-03-25T01:49:24
124,363,953
2
0
null
null
null
null
UTF-8
Java
false
false
285
java
package com.jiujun.shows.pay.dao; import com.jiujun.shows.common.dao.ICommonMapper; import com.jiujun.shows.pay.domain.AppleProductDo; public interface AppleProductMapper extends ICommonMapper<AppleProductDo> { AppleProductDo getObjectByProductId(String productId); }
[ "370083084@qq.com" ]
370083084@qq.com
9d7daf5d7439ceb8c32f544ac4da2d01c74b5370
1ab23270ecc7c7f36824503e6003db452153610d
/server/src/edu/wd/util/Time.java
a945b12b7601abbd1d9023e92304ed9c3fd07360
[]
no_license
jenkins-chou/wenda
5574beaceee97f167ec6622523dbd3eca14971a9
e5c0b556249626a2381fb0ff1fb271d3090f2a58
refs/heads/master
2020-04-28T21:30:59.233083
2019-03-20T11:28:47
2019-03-20T11:28:47
175,584,906
1
0
null
null
null
null
UTF-8
Java
false
false
372
java
package edu.wd.util; import java.text.SimpleDateFormat; import java.util.Date; public class Time { public static String getTime() { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return df.format(new Date()); } public static String getDate() { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); return df.format(new Date()); } }
[ "13413607283@163.com" ]
13413607283@163.com
614d171fbbc825f9a8d2140e23e8dcee2200a0a4
7eb875df80e2b790ba32d3a6bfae3de7a706a30e
/Seoul_Camping_통합 소스/SeoulCamping_개발 소스/app/src/main/java/customfonts/EditText_Roboto_Meidum.java
81d15b2c093acad1bc7283d24d9b27ac4d86076f
[]
no_license
MobileSeoul/2018seoul-31
5d81cdf9d0c2c6813903683692e191831da9301c
bf5219e610220d5b4f078b884b9327e5b7a401cd
refs/heads/master
2020-04-11T22:08:07.650626
2018-12-17T15:09:14
2018-12-17T15:09:14
162,126,257
3
1
null
null
null
null
UTF-8
Java
false
false
798
java
package customfonts; import android.content.Context; import android.graphics.Typeface; import android.util.AttributeSet; import android.widget.EditText; public class EditText_Roboto_Meidum extends EditText { public EditText_Roboto_Meidum(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(); } public EditText_Roboto_Meidum(Context context, AttributeSet attrs) { super(context, attrs); init(); } public EditText_Roboto_Meidum(Context context) { super(context); init(); } private void init() { if (!isInEditMode()) { Typeface tf = Typeface.createFromAsset(getContext().getAssets(), "fonts/Roboto-Medium.ttf"); setTypeface(tf); } } }
[ "ianyrchoi@gmail.com" ]
ianyrchoi@gmail.com
d7f33381a65b591ce54e96b0bc94deb0cefcd20a
aa126db53163bfb27d0161e6a5424eb56acbc1c7
/dist/game/data/scripts/quests/Q100_SagaOfTheMaestro/Q100_SagaOfTheMaestro.java
9e18acc0bd09e55f9c5345fb3a5bd3bb4f2182e6
[ "MIT" ]
permissive
marlonprudente/L2JServer_C6_Interlude
6ce3ed34a8120223183921f41e6d517b2dcc89eb
f3d3b329657c0f031dab107e6d4ceb5ddad0bea6
refs/heads/master
2022-06-20T01:11:36.557960
2020-05-13T17:39:48
2020-05-13T17:39:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,803
java
/* * This file is part of the L2JServer project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 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 quests.Q100_SagaOfTheMaestro; import quests.SagasSuperClass; /** * Saga of the Maestro (100) * @author Emperorc */ public class Q100_SagaOfTheMaestro extends SagasSuperClass { public Q100_SagaOfTheMaestro() { super(100, "Saga of the Maestro"); _npc = new int[] { 31592, 31273, 31597, 31597, 31596, 31646, 31648, 31653, 31654, 31655, 31656, 31597 }; _items = new int[] { 7080, 7607, 7081, 7515, 7298, 7329, 7360, 7391, 7422, 7453, 7108, 0 }; _mob = new int[] { 27260, 27249, 27308 }; _classId = new int[] { 118 }; _prevClass = new int[] { 0x39 }; _x = new int[] { 164650, 47429, 47391 }; _y = new int[] { -74121, -56923, -56929 }; _z = new int[] { -2871, -2383, -2370 }; _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", "I do not have the patience ..! I have been a giant force ...! Cough chatter ah ah ah!", "Paying homage to those who disrupt the orderly will be PLAYERNAME's death!", "Now, my soul freed from the shackles of the millennium, Halixia, to the back side I come ...", "Why do you interfere others' battles?", "This is a waste of time.. Say goodbye...!", "...That is the enemy", "...Goodness! PLAYERNAME you are still looking?", "PLAYERNAME ... Not just to whom the victory. Only personnel involved in the fighting are eligible to share in the victory.", "Your sword is not an ornament. Don't you think, PLAYERNAME?", "Goodness! I no longer sense a battle there now.", "let...", "Only engaged in the battle to bar their choice. Perhaps you should regret.", "The human nation was foolish to try and fight a giant's strength.", "Must...Retreat... Too...Strong.", "PLAYERNAME. Defeat...by...retaining...and...Mo...Hacker", "....! Fight...Defeat...It...Fight...Defeat...It..." }; registerNPCs(); } }
[ "libera.libera@gmail.com" ]
libera.libera@gmail.com
799f3417536b64e9e76b059c67697f707fc38579
27c6c3eb61577b6dfecf78e9ffa86e23b7a9de35
/scm-server/src/main/java/com/jet/scm/core/mvc/converters/JsonMessageConverter.java
f5dc05f4d17a9c679fd83734e7b3f5b9c59a49e5
[]
no_license
123qweqwe123/scm
39f7b0cb309e79c8fb8237be8310934efa09eecd
9b17a9f0ba4bd949ee2b5e829d7bf06eb4b37597
refs/heads/master
2020-03-08T13:17:34.277260
2018-04-05T03:28:51
2018-04-05T03:28:51
128,154,265
0
1
null
null
null
null
UTF-8
Java
false
false
1,944
java
package com.jet.scm.core.mvc.converters; import org.springframework.http.HttpInputMessage; import org.springframework.http.HttpOutputMessage; import org.springframework.http.MediaType; import org.springframework.http.converter.AbstractHttpMessageConverter; import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.http.converter.HttpMessageNotWritableException; import org.springframework.http.converter.StringHttpMessageConverter; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * Description: * <pre> * </pre> * Author: huangrupeng * Create: 17/5/23 下午4:28 */ public class JsonMessageConverter extends AbstractHttpMessageConverter<String> { private List<MediaType> supportedMediaTypes = new ArrayList<MediaType>(); public JsonMessageConverter() { this.supportedMediaTypes.add(MediaType.ALL); StringHttpMessageConverter stringHttpMessageConverter = new StringHttpMessageConverter(); stringHttpMessageConverter.setWriteAcceptCharset(false); } @Override protected boolean supports(Class<?> clazz) { return false; } @Override protected boolean canWrite(MediaType mediaType) { return super.canWrite(mediaType); } @Override public boolean canWrite(Class<?> clazz, MediaType mediaType) { return false; } @Override public boolean canRead(Class<?> clazz, MediaType mediaType) { return true; } @Override protected boolean canRead(MediaType mediaType) { return true; } @Override protected String readInternal(Class<? extends String> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { return null; } @Override protected void writeInternal(String s, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException { } }
[ "1074673969@qq.com" ]
1074673969@qq.com
86e40134479432e0eccf2017bb4fa8b6bfb08eea
e1e5bd6b116e71a60040ec1e1642289217d527b0
/H5/L2_Scripts_com/L2_Scripts_Revision_20720_2268/src/l2s/gameserver/dao/FortressDAO.java
d65cfc1eab8d1a9fc644ef4f5837650a7c1e1e55
[]
no_license
serk123/L2jOpenSource
6d6e1988a421763a9467bba0e4ac1fe3796b34b3
603e784e5f58f7fd07b01f6282218e8492f7090b
refs/heads/master
2023-03-18T01:51:23.867273
2020-04-23T10:44:41
2020-04-23T10:44:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,789
java
package l2s.gameserver.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import l2s.commons.dao.JdbcEntityState; import l2s.commons.dbutils.DbUtils; import l2s.gameserver.database.DatabaseFactory; import l2s.gameserver.model.entity.residence.Fortress; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author VISTALL * @date 18:10/15.04.2011 */ public class FortressDAO { private static final Logger _log = LoggerFactory.getLogger(FortressDAO.class); private static final FortressDAO _instance = new FortressDAO(); public static final String SELECT_SQL_QUERY = "SELECT * FROM fortress WHERE id = ?"; public static final String REPLACE_SQL_QUERY = "REPLACE INTO fortress (id, name, state, castle_id, last_siege_date, own_date, siege_date, supply_count, facility_0, facility_1, facility_2, facility_3, facility_4, cycle, reward_count, paid_cycle, supply_spawn) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; public static FortressDAO getInstance() { return _instance; } public void select(Fortress fortress) { Connection con = null; PreparedStatement statement = null; ResultSet rset = null; try { con = DatabaseFactory.getInstance().getConnection(); statement = con.prepareStatement(SELECT_SQL_QUERY); statement.setInt(1, fortress.getId()); rset = statement.executeQuery(); if(rset.next()) { fortress.setFortState(rset.getInt("state"), rset.getInt("castle_id")); fortress.setCycle(rset.getInt("cycle")); fortress.setRewardCount(rset.getInt("reward_count")); fortress.setPaidCycle(rset.getInt("paid_cycle")); fortress.setSupplyCount(rset.getInt("supply_count")); fortress.setSupplySpawn(rset.getLong("supply_spawn")); fortress.getSiegeDate().setTimeInMillis(rset.getLong("siege_date")); fortress.getLastSiegeDate().setTimeInMillis(rset.getLong("last_siege_date")); fortress.getOwnDate().setTimeInMillis(rset.getLong("own_date")); for(int i = 0; i < Fortress.FACILITY_MAX; i++) fortress.setFacilityLevel(i, rset.getInt("facility_" + i)); } } catch(Exception e) { _log.error("FortressDAO.select(Fortress):" + e, e); } finally { DbUtils.closeQuietly(con, statement, rset); } } public void update(Fortress fortress) { if(!fortress.getJdbcState().isUpdatable()) return; fortress.setJdbcState(JdbcEntityState.STORED); update0(fortress); } private void update0(Fortress fortress) { Connection con = null; PreparedStatement statement = null; try { con = DatabaseFactory.getInstance().getConnection(); statement = con.prepareStatement(REPLACE_SQL_QUERY); int i = 0; statement.setInt(++i, fortress.getId()); statement.setString(++i, fortress.getName()); statement.setInt(++i, fortress.getContractState()); statement.setInt(++i, fortress.getCastleId()); statement.setLong(++i, fortress.getLastSiegeDate().getTimeInMillis()); statement.setLong(++i, fortress.getOwnDate().getTimeInMillis()); statement.setLong(++i, fortress.getSiegeDate().getTimeInMillis()); statement.setInt(++i, fortress.getSupplyCount()); statement.setInt(++i, fortress.getFacilityLevel(0)); statement.setInt(++i, fortress.getFacilityLevel(1)); statement.setInt(++i, fortress.getFacilityLevel(2)); statement.setInt(++i, fortress.getFacilityLevel(3)); statement.setInt(++i, fortress.getFacilityLevel(4)); statement.setInt(++i, fortress.getCycle()); statement.setInt(++i, fortress.getRewardCount()); statement.setInt(++i, fortress.getPaidCycle()); statement.setLong(++i, fortress.getSupplySpawn()); statement.execute(); } catch(Exception e) { _log.warn("FortressDAO#update0(Fortress): " + e, e); } finally { DbUtils.closeQuietly(con, statement); } } }
[ "64197706+L2jOpenSource@users.noreply.github.com" ]
64197706+L2jOpenSource@users.noreply.github.com
017a092a087f3abbe52e04ead12e6a8c43793793
7494134bd85ca07a6c72f604af8ad317ac9165a2
/me/dev/legacy/modules/player/EchestBackpack.java
c67d58d90c64ea52b17fa7258ca6c54b4b9fb1bd
[]
no_license
3000IQPlay/Legacy-Client-1.2.5-SRC
015312402e4325333deb35621a1d7b7e7cd7be47
4a3b19f0b8e971a6dabfcc3f249e65f55076f434
refs/heads/main
2023-07-02T15:58:59.978136
2021-07-23T05:51:33
2021-07-23T05:51:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,434
java
/* * Decompiled with CFR 0.151. */ package me.dev.legacy.modules.player; import me.dev.legacy.modules.Module; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.inventory.Container; import net.minecraft.inventory.ContainerChest; import net.minecraft.inventory.InventoryBasic; public class EchestBackpack extends Module { private GuiScreen echestScreen = null; public EchestBackpack() { super("EchestBackpack", "Allows to open your echest later.", Module.Category.PLAYER, false, false, false); } @Override public void onUpdate() { InventoryBasic basic; Container container; if (EchestBackpack.mc.currentScreen instanceof GuiContainer && (container = ((GuiContainer)EchestBackpack.mc.currentScreen).inventorySlots) instanceof ContainerChest && ((ContainerChest)container).getLowerChestInventory() instanceof InventoryBasic && (basic = (InventoryBasic)((ContainerChest)container).getLowerChestInventory()).getName().equalsIgnoreCase("Ender Chest")) { this.echestScreen = EchestBackpack.mc.currentScreen; EchestBackpack.mc.currentScreen = null; } } @Override public void onDisable() { if (!EchestBackpack.fullNullCheck() && this.echestScreen != null) { mc.displayGuiScreen(this.echestScreen); } this.echestScreen = null; } }
[ "65968863+notperry1234567890@users.noreply.github.com" ]
65968863+notperry1234567890@users.noreply.github.com
17e4f96d7aa8a163aef16fc90feffafb1447883a
01e25b532e9468fd35330266de10183a99a3dc15
/commons-dict-wiktionary/src/test/java/org/swtk/commons/dict/wiktionary/WiktionaryDbTest.java
2215bc9ba6ac7820355075e6cf3af9ad5e17d1e7
[ "Apache-2.0" ]
permissive
torrances/swtk-commons
a3f95206204becf138718e297f2bb939c65cafa5
78ee97835e4437d91fd4ba0cf6ccab40be5c8889
refs/heads/master
2021-01-17T11:31:27.004328
2016-01-07T17:26:09
2016-01-07T17:26:09
43,841,418
0
0
null
null
null
null
UTF-8
Java
false
false
730
java
package org.swtk.commons.dict.wiktionary; import static org.junit.Assert.assertEquals; import org.junit.Test; public final class WiktionaryDbTest { @Test public void findByNameWalrus() throws Throwable { assertEquals("walrus", WiktionaryDb.findByName("walrus").getTerm()); assertEquals("A large Arctic marine mammal related to seals and having long tusks, tough, wrinkled skin, and four flippers", WiktionaryDbUtils.firstDefinition("walrus").getText()); } @Test public void findByNameApple() throws Throwable { assertEquals("apple", WiktionaryDb.findByName("apple").getTerm()); assertEquals("A nickname for New York City, usually “the Big Apple”", WiktionaryDbUtils.firstDefinition("apple").getText()); } }
[ "cmtrim@us.ibm.com" ]
cmtrim@us.ibm.com
6eec16d8ba77194e1c8cc105409fecb43150088a
0b4844d550c8e77cd93940e4a1d8b06d0fbeabf7
/JavaSource/dream/tool/rec/form/MaPttRecListForm.java
33d0664d2074752dc32f65de8522195fa99880ed
[]
no_license
eMainTec-DREAM/DREAM
bbf928b5c50dd416e1d45db3722f6c9e35d8973c
05e3ea85f9adb6ad6cbe02f4af44d941400a1620
refs/heads/master
2020-12-22T20:44:44.387788
2020-01-29T06:47:47
2020-01-29T06:47:47
236,912,749
0
0
null
null
null
null
UHC
Java
false
false
708
java
package dream.tool.rec.form; import common.struts.BaseForm; import dream.tool.rec.dto.MaPttRecCommonDTO; /** * 구매입고 - 목록 form * @author ssong * @version $Id:$ * @since 1.0 * * @struts.form name="maPttRecListForm" */ public class MaPttRecListForm extends BaseForm { //=============================================================== /** 구매입고 공통 */ private MaPttRecCommonDTO maPttRecCommonDTO = new MaPttRecCommonDTO(); public MaPttRecCommonDTO getMaPttRecCommonDTO() { return maPttRecCommonDTO; } public void setMaPttRecCommonDTO(MaPttRecCommonDTO maPttRecCommonDTO) { this.maPttRecCommonDTO = maPttRecCommonDTO; } }
[ "HN4741@10.31.0.185" ]
HN4741@10.31.0.185
bd7666909ff1d65958b49086b86c8e19326a5152
8dfb0849ba4dd9cdf1b3a582ca6ec50be9ca3681
/first-ek-service-provider/src/main/java/xuanwei/online/first_service_provider/entity/Person.java
77f6170966482473a543f4a82bc3c3b4ed225765
[]
no_license
JXWJS/spring-cloud
723b81ff13fef6afa4a25aa1510721089a2a927f
82970371a03a3c4c6ed5bfca715863a4babadaf7
refs/heads/master
2022-05-06T03:58:29.877524
2019-11-21T06:57:40
2019-11-21T06:57:40
223,107,542
0
0
null
2022-03-31T18:57:42
2019-11-21T06:49:10
JavaScript
UTF-8
Java
false
false
568
java
package xuanwei.online.first_service_provider.entity; public class Person { private Integer id; private String name; private Integer age; public Person(Integer id, String name, Integer age) { this.id = id; this.name = name; this.age = age; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } }
[ "you@example.com" ]
you@example.com
a0a60e35f3cb36b37dd778347a0e1b167827a1d2
182b7e5ca415043908753d8153c541ee0e34711c
/corejavatraining/src/main/java/com/javatraining/corejavatraining/streams/UnMarshallingAndMarshallingDemo.java
f880f370033eb9379c2967932f747a337632abc5
[]
no_license
akamatagi/Java9AndAbove
2b62886441241ef4cd62990243d7b29e895452f7
ff002a2395edf506091b3571a470c15fa0742550
refs/heads/master
2023-02-09T17:38:21.467950
2020-12-30T14:47:59
2020-12-30T14:47:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,387
java
package com.javatraining.corejavatraining.streams; import org.json.JSONArray; import org.json.JSONObject; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import com.javatraining.corejavatraining.streams.dto.Post; public class UnMarshallingAndMarshallingDemo { public static void main(String[] args) { try{ String data = Files.readString(Paths.get("data.json")); JSONArray jsonArray = new JSONArray(data); List<Post> posts = new ArrayList<>(); /* if(!jsonArray.isEmpty()){ for (int i = 0; i < jsonArray.length(); i++) { posts.add(Post.fromJSON(jsonArray.getJSONObject(i))); } }*/ jsonArray.forEach(json -> posts.add(Post.fromJSON((JSONObject) json))); posts.forEach(System.out::println); JSONArray jsonArray1 = new JSONArray(); posts.forEach(post -> { jsonArray1.put(posts.indexOf(post),post.toJSON()); }); JSONObject jsonObject = new JSONObject(); jsonObject.put("posts", jsonArray1.toString()); System.out.println(jsonObject.toString()); }catch (IOException e) { e.printStackTrace(); } } }
[ "vinayagam.d.ganesh@gmail.com" ]
vinayagam.d.ganesh@gmail.com
21a912cc7091aa41534772ce12a02da2ed475c47
ea4da81a69a300624a46fce9e64904391c37267c
/src/main/java/com/alipay/api/domain/SiteInfoKt.java
de66b1500ee3f1bc572f8d18cb0b3db5bfea3ccf
[ "Apache-2.0" ]
permissive
shiwei1024/alipay-sdk-java-all
741cc3cb8cf757292b657ce05958ff9ad8ecf582
d6a051fd47836c719a756607e6f84fee2b26ecb4
refs/heads/master
2022-12-29T18:46:53.195585
2020-10-09T06:34:30
2020-10-09T06:34:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,839
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 商户站点信息,包括网站、app、小程序。商户使用服务包含电脑支付或wap支付时,必须填充一个类型为01(网站)的SiteInfo对象;当包含app支付时,必须至少填充类型为02(APP)或06(支付宝小程序)中一种类型的SiteInfo对象 * * @author auto create * @since 1.0, 2018-12-13 16:57:26 */ public class SiteInfoKt extends AlipayObject { private static final long serialVersionUID = 5413911221879654949L; /** * 测试账号 */ @ApiField("account") private String account; /** * 测试密码 */ @ApiField("password") private String password; /** * 站点名称 */ @ApiField("site_name") private String siteName; /** * 网站:01&#160;&#8232;APP : 02&#160;&#8232;服务窗:03&#160;&#8232;公众号:04&#160;&#8232;其他:05&#160;&#8232;支付宝小程序:06 */ @ApiField("site_type") private String siteType; /** * 站点地址 */ @ApiField("site_url") private String siteUrl; public String getAccount() { return this.account; } public void setAccount(String account) { this.account = account; } public String getPassword() { return this.password; } public void setPassword(String password) { this.password = password; } public String getSiteName() { return this.siteName; } public void setSiteName(String siteName) { this.siteName = siteName; } public String getSiteType() { return this.siteType; } public void setSiteType(String siteType) { this.siteType = siteType; } public String getSiteUrl() { return this.siteUrl; } public void setSiteUrl(String siteUrl) { this.siteUrl = siteUrl; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
270254548e228ba7c1fcf6910eb4112b0f50ccda
57bccc9613f4d78acd0a6ede314509692f2d1361
/pbk-nsi-lib/src/main/java/ru/armd/pbk/utils/validation/IVenueValidator.java
39c771f7c0a140ab0a790a9fdf7a626c9a7729fb
[]
no_license
mannyrobin/Omnecrome
70f27fd80a9150b89fe3284d5789e4348cba6a11
424d484a9858b30c11badae6951bccf15c2af9cb
refs/heads/master
2023-01-06T16:20:50.181849
2020-11-06T14:37:14
2020-11-06T14:37:14
310,620,098
0
0
null
null
null
null
UTF-8
Java
false
false
864
java
package ru.armd.pbk.utils.validation; import javax.validation.Constraint; import javax.validation.Payload; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Аннотация проверки мест встреч. */ @Target( {ElementType.TYPE, ElementType.ANNOTATION_TYPE}) @Retention(RUNTIME) @Constraint(validatedBy = VenueValidator.class) @Documented public @interface IVenueValidator { /** * Сообщение по умолчанию. */ String message() default ""; /** * Группы. */ Class<?>[] groups() default {}; /** * Payload type that can be attached to a given constraint declaration. */ Class<? extends Payload>[] payload() default {}; }
[ "malike@hipcreativeinc.com" ]
malike@hipcreativeinc.com
054edbd647174542fb2fc27510ec9a9d9aa01b9b
a78ba0d2452928c06455a0ef29cc3eca49a1e760
/src/bastion/blocks/BannerBlock.java
a2fca7b5f266851376e7922fed57cd5c48daebc3
[ "MIT" ]
permissive
TeamRecraft/ChaoticBastion
ce991f5357721b3748a36e08626d8c2e06795cee
44d39ac19a3c399eff4c642507319264952f9899
refs/heads/master
2021-01-17T07:52:03.943240
2014-04-21T04:07:19
2014-04-21T04:07:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,438
java
package bastion.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; import bastion.blocks.logic.BannerLogic; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BannerBlock extends LogicBlock { public BannerBlock(int id, Material material) { super(id, material); this.setBlockBounds(0.375F, 0.0F, 0.375F, 0.625F, 0.75F, 0.625F); } @Override public TileEntity createTileEntity(World world, int metadata) { return new BannerLogic(); } @Override @SideOnly(Side.CLIENT) public Icon getIcon (int side, int meta) { return Block.planks.getIcon(side, 0); } @Override public void registerIcons (IconRegister iconRegister) { } @Override public boolean isOpaqueCube() { return false; } @Override public boolean renderAsNormalBlock() { return false; } public int damageDropped (int meta) { return meta; } @Override public String[] getTextureNames() { return null; } }
[ "merdiwendiyo@gmail.com" ]
merdiwendiyo@gmail.com
b766c4757908afed8e3ea3810a09914d329dfd2a
ecce585d09e86024c14b5192c230b844c2f66907
/src/test/java/io/github/jhipster/application/web/rest/AuditResourceIntTest.java
a8e7191a4666114dda06aa051629bc572989b425
[]
no_license
BulkSecurityGeneratorProject/RMS
445fa305b5ad75afa60b9ac8eac6b3a84501d48f
9670c151a99254c34130f0313b05866468e76402
refs/heads/master
2022-12-11T01:34:27.008264
2018-02-04T19:36:14
2018-02-04T19:36:14
296,604,058
0
0
null
2020-09-18T11:40:13
2020-09-18T11:40:12
null
UTF-8
Java
false
false
6,029
java
package io.github.jhipster.application.web.rest; import io.github.jhipster.application.RmsApp; import io.github.jhipster.application.config.audit.AuditEventConverter; import io.github.jhipster.application.domain.PersistentAuditEvent; import io.github.jhipster.application.repository.PersistenceAuditEventRepository; import io.github.jhipster.application.service.AuditEventService; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import org.springframework.format.support.FormattingConversionService; import org.springframework.http.MediaType; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import java.time.format.DateTimeFormatter; import static org.hamcrest.Matchers.hasItem; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; /** * Test class for the AuditResource REST controller. * * @see AuditResource */ @RunWith(SpringRunner.class) @SpringBootTest(classes = RmsApp.class) @Transactional public class AuditResourceIntTest { private static final String SAMPLE_PRINCIPAL = "SAMPLE_PRINCIPAL"; private static final String SAMPLE_TYPE = "SAMPLE_TYPE"; private static final Instant SAMPLE_TIMESTAMP = Instant.parse("2015-08-04T10:11:30Z"); private static final long SECONDS_PER_DAY = 60 * 60 * 24; @Autowired private PersistenceAuditEventRepository auditEventRepository; @Autowired private AuditEventConverter auditEventConverter; @Autowired private MappingJackson2HttpMessageConverter jacksonMessageConverter; @Autowired private FormattingConversionService formattingConversionService; @Autowired private PageableHandlerMethodArgumentResolver pageableArgumentResolver; private PersistentAuditEvent auditEvent; private MockMvc restAuditMockMvc; @Before public void setup() { MockitoAnnotations.initMocks(this); AuditEventService auditEventService = new AuditEventService(auditEventRepository, auditEventConverter); AuditResource auditResource = new AuditResource(auditEventService); this.restAuditMockMvc = MockMvcBuilders.standaloneSetup(auditResource) .setCustomArgumentResolvers(pageableArgumentResolver) .setConversionService(formattingConversionService) .setMessageConverters(jacksonMessageConverter).build(); } @Before public void initTest() { auditEventRepository.deleteAll(); auditEvent = new PersistentAuditEvent(); auditEvent.setAuditEventType(SAMPLE_TYPE); auditEvent.setPrincipal(SAMPLE_PRINCIPAL); auditEvent.setAuditEventDate(SAMPLE_TIMESTAMP); } @Test public void getAllAudits() throws Exception { // Initialize the database auditEventRepository.save(auditEvent); // Get all the audits restAuditMockMvc.perform(get("/management/audits")) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL))); } @Test public void getAudit() throws Exception { // Initialize the database auditEventRepository.save(auditEvent); // Get the audit restAuditMockMvc.perform(get("/management/audits/{id}", auditEvent.getId())) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.principal").value(SAMPLE_PRINCIPAL)); } @Test public void getAuditsByDate() throws Exception { // Initialize the database auditEventRepository.save(auditEvent); // Generate dates for selecting audits by date, making sure the period will contain the audit String fromDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0,10); String toDate = SAMPLE_TIMESTAMP.plusSeconds(SECONDS_PER_DAY).toString().substring(0,10); // Get the audit restAuditMockMvc.perform(get("/management/audits?fromDate="+fromDate+"&toDate="+toDate)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL))); } @Test public void getNonExistingAuditsByDate() throws Exception { // Initialize the database auditEventRepository.save(auditEvent); // Generate dates for selecting audits by date, making sure the period will not contain the sample audit String fromDate = SAMPLE_TIMESTAMP.minusSeconds(2*SECONDS_PER_DAY).toString().substring(0,10); String toDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0,10); // Query audits but expect no results restAuditMockMvc.perform(get("/management/audits?fromDate=" + fromDate + "&toDate=" + toDate)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(header().string("X-Total-Count", "0")); } @Test public void getNonExistingAudit() throws Exception { // Get the audit restAuditMockMvc.perform(get("/management/audits/{id}", Long.MAX_VALUE)) .andExpect(status().isNotFound()); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
9c8c6a3048a7ceacac1a7365e0a5b3449c94a40b
a7ef549ff650b041c665d0bea4826f24909ca9b2
/stock/src/main/java/com/xingrongjinfu/product/productcategory/dao/IProductCategoryDao.java
d7d884b3c90c5fc03d6b5500d1499ce5172e20ec
[]
no_license
ag2010/stock
5fd47910e848cb9d6b5f039a592437541758ac0b
3e5df2ca0ee274cbd3234e508f85bbe10dc87235
refs/heads/master
2021-06-11T05:20:00.525271
2020-10-18T01:54:56
2020-10-18T01:54:56
128,528,981
0
0
null
null
null
null
UTF-8
Java
false
false
1,238
java
package com.xingrongjinfu.product.productcategory.dao; import java.util.List; import com.xingrongjinfu.product.productcategory.model.ProductCategory; import com.xingrongjinfu.system.permission.model.Permission; /** * 权限管理 数据层 * * @author y */ public interface IProductCategoryDao { /** * 查询所有商品分类信息 * * @return 商品分类集合 */ public List<ProductCategory> queryProductCategory(); /** * 根据父菜单ID查询 * * @param 商品分类pid * @return 商品分类对象 */ public List<ProductCategory> findProductCategoryByPid(String parentId); /** * 修改商品分类 * * @param menu 商品分类对象 * @return */ public int deleteProductCategory(ProductCategory ProductCategory); /** * 新增商品分类 * * @param productCategory 商品分类对象 * @return */ public int insertProductCategory(ProductCategory productCategory); /** * 修改商品分类 * * @param productCategory 商品分类对象 * @return */ public int updateProductCategory(ProductCategory productCategory); }
[ "1003429737@qq.com" ]
1003429737@qq.com
af8b9eebebf4fd59623aabe9902c55316717daac
e1262848cb2f5a1b0c8cfd3ca09cf4fbf30d5584
/iog-generater-util/src/main/java/com/shangpin/iog/generater/strategy/sepStrategy/BackImp.java
79e419c6a2ee1644fd45f7ddf4f69bbfa2f6597a
[]
no_license
tianxinghua/pachong
e619f8e34904ada839cd2d30f8781495de276230
a3fc6ea97ce9053f1269d5c3536b6677d5588138
refs/heads/master
2020-04-14T16:53:51.579843
2019-01-04T02:42:26
2019-01-04T02:42:26
163,964,124
1
0
null
null
null
null
UTF-8
Java
false
false
542
java
package com.shangpin.iog.generater.strategy.sepStrategy; import java.util.List; public class BackImp extends ISepStrategy{ public BackImp(String strategy) { super(strategy); } /** * 处理2个字段,适用于处理后一个字段,比如字段1值是a,字段2值是b-c,现在要得到a_c,则策略是: * back%-%1%_ */ @Override public String merge(List<String> dataList) { String[] split = strategy.split("%"); return dataList.get(0)+split[3]+dataList.get(1).split(split[1])[Integer.valueOf(split[2])]; } }
[ "1085024903@qq.com" ]
1085024903@qq.com
9a790a4dc8512a645af6e1012717240bbba17f2a
3fae559abeef9c96d5951d8f5fade266c5b404ff
/app/src/main/java/com/turman/framework/net/NetClient.java
79f716f3721188093407707c2f1d80abed196b2d
[]
no_license
buobao/Android_framework
537b02d37e6c063cd8bc4bc199d8e1038cc93f09
08b8767b2e76f5974a8c854d63f793bc6f4efcb9
refs/heads/master
2016-09-13T06:12:23.817903
2016-04-14T06:26:59
2016-04-14T06:26:59
56,203,009
0
0
null
null
null
null
UTF-8
Java
false
false
1,158
java
package com.turman.framework.net; import okhttp3.OkHttpClient; import retrofit2.Retrofit; import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory; import retrofit2.converter.gson.GsonConverterFactory; /** * Created by dqf on 2016/4/13. */ public class NetClient { private static Retrofit client = null; public static final String MAP_URL = "http://maps.google.cn/maps/api/"; public static final String LOCATION = "geocode/json"; private static ApiService apiService = null; public static Retrofit getClient(){ OkHttpClient okHttpClient = new OkHttpClient(); if (client == null) { client = new Retrofit.Builder() .baseUrl(MAP_URL) .client(okHttpClient) .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) .addConverterFactory(GsonConverterFactory.create()) .build(); } return client; } public static ApiService getApiService(){ if (apiService == null) { apiService = getClient().create(ApiService.class); } return apiService; } }
[ "1039163450@qq.com" ]
1039163450@qq.com
ea5558f0e91fc9944da980325dac3ecff0d4ff5c
1327e9451ce7d799ab251beb4bfd0913f381b360
/Forro/src/frontendParserCCACaffeine_command_parser/CommandPathParser.java
bc836a70bab3784d226d53a4edacd129810d2695
[]
no_license
jeffersoncarvalho/programas-grad
7290a1f67a1daa3e752f38f0643d7e02bcd9c81f
b413e4249a72d3ab5cd7167fa0665ed4cab4e5fb
refs/heads/master
2020-03-28T08:15:42.561997
2018-09-08T17:20:44
2018-09-08T17:20:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,187
java
package frontendParserCCACaffeine_command_parser; import java.util.ArrayList; import forrocore.ForroDriverRMIInterface; import frontendParserCCACaffeine_command_action_factory.FactoryConstants; import frontendParserCCACaffeine_command_action_factory.ICCACommandActionFactory; import frontendParserCCACaffeine_command_constants.CommandsContants; import frontendParserCCACaffeine_command_constants.ErrorsConstants; import frontendParserCCACaffeine_command_interfaces.ICommandPathAction; import frontendParserCCACaffeine_exceptions.FactoryException; import frontendParserCCACaffeine_exceptions.ParserException; public class CommandPathParser extends AbstractParser{ private ArrayList<String> tokens; private ICommandPathAction cmdPthAction; public CommandPathParser(ArrayList<String> tokens, ICCACommandActionFactory factory) throws FactoryException{ this.setFactory(factory); this.tokens = tokens; this.cmdPthAction = (ICommandPathAction)this.getFactory().create(FactoryConstants.PATH); } public void parse(ForroDriverRMIInterface forroDriver) throws ParserException { if(tokens.size()==0){ this.cmdPthAction.path(); }else { //taking ou a reserved word String firstToken = tokens.remove(0); //analysing if(firstToken.equals(CommandsContants.PATH_APPEND)){ if (tokens.size()==0) throw new ParserException(ErrorsConstants.UNSUFICIENT_COMMAND); this.cmdPthAction.pathAppend(tokens.remove(0)); }else if(firstToken.equals(CommandsContants.PATH_PREPEND)){ if (tokens.size()==0) throw new ParserException(ErrorsConstants.UNSUFICIENT_COMMAND); this.cmdPthAction.pathPrepend(tokens.remove(0)); }else if(firstToken.equals(CommandsContants.PATH_SET)){ if (tokens.size()==0) throw new ParserException(ErrorsConstants.UNSUFICIENT_COMMAND); this.cmdPthAction.pathSet(tokens.remove(0)); }else if(firstToken.equals(CommandsContants.PATH_INIT)){ this.cmdPthAction.pathInit(); }else throw new ParserException(ErrorsConstants.NOT_RECOG_COMMAND); }//for other commands } }
[ "jeffersoncarvalho@gmail.com" ]
jeffersoncarvalho@gmail.com
ce8e24deb9c31f6ba0243828762ee725966e7e1b
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2008-10-30/seasar2-2.4.32/s2jdbc-gen/s2jdbc-gen/src/main/java/org/seasar/extension/jdbc/gen/internal/dialect/FirebirdGenDialect.java
b8e3a076f971fa8c41cbb404096bdf1b1345a5bf
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
1,367
java
/* * Copyright 2004-2008 the Seasar Foundation and the Others. * * 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.seasar.extension.jdbc.gen.internal.dialect; import javax.persistence.GenerationType; /** * Firebirdの方言を扱うクラスです。 * * @author taedium */ public class FirebirdGenDialect extends StandardGenDialect { /** * インスタンスを構築します。 */ public FirebirdGenDialect() { } @Override public GenerationType getDefaultGenerationType() { return GenerationType.SEQUENCE; } @Override public String getSequenceNextValString(String sequenceName, int allocationSize) { return "select gen_id( " + sequenceName + ", " + allocationSize + " ) from RDB$DATABASE"; } }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
ed59e6cddd1a1ef0c8b0cb2f426a92b4106acf12
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/89_jiggler-jigl.image.types.PowerImage-1.0-6/jigl/image/types/PowerImage_ESTest.java
174d7c22c9c69ee8c25e6d230b21b48d373b1c46
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
642
java
/* * This file was automatically generated by EvoSuite * Fri Oct 25 21:40:47 GMT 2019 */ package jigl.image.types; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class PowerImage_ESTest extends PowerImage_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
b6ca529c84c7a44f7b53887d9cd81af5a2956660
9554309f7b3f33ca912b54370f03cf0c3710d105
/app/src/main/java/com/lshl/ui/info/chat/ContextMenuActivity.java
da2decd4919dba31a692d04cccb93d2374209e3b
[]
no_license
lvqingfeng/Lshl
ab490ffe492deba94f9522b71b829b8998b669eb
15ae1cdfd2155a6a04a20edf58107e5d9265d647
refs/heads/master
2021-07-09T21:42:34.913186
2017-10-10T09:34:01
2017-10-10T09:34:01
106,397,119
0
0
null
null
null
null
UTF-8
Java
false
false
3,715
java
/** * Copyright (C) 2016 Hyphenate Inc. All rights reserved. * <p> * 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.lshl.ui.info.chat; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.view.MotionEvent; import android.view.View; import com.hyphenate.chat.EMMessage; import com.lshl.Constant; import com.lshl.R; import com.yunzhanghu.redpacketui.RedPacketConstant; public class ContextMenuActivity extends FragmentActivity { public static final int RESULT_CODE_COPY = 1; public static final int RESULT_CODE_DELETE = 2; public static final int RESULT_CODE_FORWARD = 3; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); EMMessage message = getIntent().getParcelableExtra("message"); boolean isChatroom = getIntent().getBooleanExtra("ischatroom", false); int type = message.getType().ordinal(); if (type == EMMessage.Type.TXT.ordinal()) { if (message.getBooleanAttribute(Constant.MESSAGE_ATTR_IS_VIDEO_CALL, false) || message.getBooleanAttribute(Constant.MESSAGE_ATTR_IS_VOICE_CALL, false) //red packet code : 屏蔽红包消息的转发功能 || message.getBooleanAttribute(RedPacketConstant.MESSAGE_ATTR_IS_RED_PACKET_MESSAGE, false)) { //end of red packet code setContentView(R.layout.em_context_menu_for_location); } else if (message.getBooleanAttribute(Constant.MESSAGE_ATTR_IS_BIG_EXPRESSION, false)) { setContentView(R.layout.em_context_menu_for_image); } else { setContentView(R.layout.em_context_menu_for_text); } } else if (type == EMMessage.Type.LOCATION.ordinal()) { setContentView(R.layout.em_context_menu_for_location); } else if (type == EMMessage.Type.IMAGE.ordinal()) { setContentView(R.layout.em_context_menu_for_image); } else if (type == EMMessage.Type.VOICE.ordinal()) { setContentView(R.layout.em_context_menu_for_voice); } else if (type == EMMessage.Type.VIDEO.ordinal()) { setContentView(R.layout.em_context_menu_for_video); } else if (type == EMMessage.Type.FILE.ordinal()) { setContentView(R.layout.em_context_menu_for_location); } if (isChatroom //red packet code : 屏蔽红包消息的撤回功能 || message.getBooleanAttribute(RedPacketConstant.MESSAGE_ATTR_IS_RED_PACKET_MESSAGE, false)) { //end of red packet code View v = (View) findViewById(R.id.forward); if (v != null) { v.setVisibility(View.GONE); } } } @Override public boolean onTouchEvent(MotionEvent event) { finish(); return true; } public void copy(View view) { setResult(RESULT_CODE_COPY); finish(); } public void delete(View view) { setResult(RESULT_CODE_DELETE); finish(); } public void forward(View view) { setResult(RESULT_CODE_FORWARD); finish(); } }
[ "imperial_nice@sina.com" ]
imperial_nice@sina.com
186593d609e80edfacdecc43abfe1f70da441fbd
04a04fd86b50a1d9e419ef753ead48cfba2554f4
/channel/src/main/java/com/company/medismart/channel/dto/PatientHistory.java
9b3695b17dbe1cffe3b897d6e6a05b0c83d85132
[]
no_license
kasunsk/MediSmart
054c766d5b0c8f7a4642d42567f717b89383d359
36e18e56f5fa34b4882d9c5cdbe1343cdb7a5f06
refs/heads/master
2021-07-13T20:34:19.936487
2021-01-24T07:22:20
2021-01-24T07:22:20
228,616,617
0
1
null
2020-01-09T12:35:40
2019-12-17T12:55:31
Java
UTF-8
Java
false
false
1,430
java
package com.company.medismart.channel.dto; import java.util.Date; public class PatientHistory { private Long patientHistoryId; private String patientNic; private String disease; private PatientDiseaseStatus diseaseStatus; private PatientMedicine providedMedicine; private Date createdDate; public Long getPatientHistoryId() { return patientHistoryId; } public void setPatientHistoryId(Long patientHistoryId) { this.patientHistoryId = patientHistoryId; } public String getPatientNic() { return patientNic; } public void setPatientNic(String patientNic) { this.patientNic = patientNic; } public String getDisease() { return disease; } public void setDisease(String disease) { this.disease = disease; } public PatientDiseaseStatus getDiseaseStatus() { return diseaseStatus; } public void setDiseaseStatus(PatientDiseaseStatus diseaseStatus) { this.diseaseStatus = diseaseStatus; } public PatientMedicine getProvidedMedicine() { return providedMedicine; } public void setProvidedMedicine(PatientMedicine providedMedicine) { this.providedMedicine = providedMedicine; } public Date getCreatedDate() { return createdDate; } public void setCreatedDate(Date createdDate) { this.createdDate = createdDate; } }
[ "kasunsk@gmail.com" ]
kasunsk@gmail.com
050b673237cebe652362a72a243361f48d702a20
c9d77c1a53509dac864ebf03a5be8b1cb30dbed3
/src/com/aoeng/play/ui/views/InterceptorFrame.java
991a51d583ea86d6b75459fc7e927dcd22823dff
[]
no_license
tianshan20081/AndroidPlay
cef3a873d6321cec3aab74a16dc4db3318483a49
e04a624bd6c1db40bb62240503bc2540daf81aa3
refs/heads/master
2020-06-04T10:20:01.797578
2014-11-28T03:05:24
2014-11-28T03:05:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,150
java
package com.aoeng.play.ui.views; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import android.content.Context; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; import android.widget.FrameLayout; import com.aoeng.play.utils.UIUtils; import com.aoeng.play.utils.ViewUtils; /** * * @author aoeng Aug 31, 2014 7:02:08 PM */ public class InterceptorFrame extends FrameLayout { public static final int ORIENTATION_ALL = 1; public static final int ORIENTATION_VERTICAL = 1; public static final int ORIENTATION_HORIZONTAL = 2; private List<View> mInterceptorViews; private Map<View, Integer> mViewAndOrientation; private int mTouchSlop; private float mLastX; private float mLastY; private View mTarget; public InterceptorFrame(Context context) { super(context); init(); } private void init() { mInterceptorViews = new LinkedList<View>(); mViewAndOrientation = new HashMap<View, Integer>(); final ViewConfiguration configuration = ViewConfiguration.get(getContext()); mTouchSlop = configuration.getScaledTouchSlop(); } public void addInterceptorView(View v) { addInterceptorView(v, ORIENTATION_ALL); } public void addInterceptorView(final View v, final int orientation) { UIUtils.runInMainThread(new Runnable() { @Override public void run() { if (!mInterceptorViews.contains(v)) { mInterceptorViews.add(v); mViewAndOrientation.put(v, orientation); } } }); } public void removeInterceptorView(final View v) { UIUtils.runInMainThread(new Runnable() { @Override public void run() { mInterceptorViews.remove(v); mViewAndOrientation.remove(v); } }); } private View isTouchInterceptedView(MotionEvent event, int orientation) { for (View v : mInterceptorViews) { if (ViewUtils.isTouchInView(event, v) && mViewAndOrientation.get(v) == orientation && v.dispatchTouchEvent(event)) { return v; } } return null; } @Override public boolean dispatchTouchEvent(MotionEvent ev) { int action = ev.getAction(); if (mTarget != null) { boolean flag = mTarget.dispatchTouchEvent(ev); if (flag && (action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_UP)) { mTarget = null; } return flag; } final float x = ev.getX(); final float y = ev.getY(); View view = null; switch (action) { case MotionEvent.ACTION_DOWN: mLastX = x; mLastY = y; view = isTouchInterceptedView(ev, ORIENTATION_ALL); break; case MotionEvent.ACTION_MOVE: final int xDiff = (int) Math.abs(x - mLastX); final int yDiff = (int) Math.abs(y - mLastY); if (xDiff > mTouchSlop && xDiff > yDiff) { view = isTouchInterceptedView(ev, ORIENTATION_HORIZONTAL); } else if (yDiff > mTouchSlop && yDiff > xDiff) { view = isTouchInterceptedView(ev, ORIENTATION_VERTICAL); } break; case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: mTarget = null; break; default: break; } if (view != null) { mTarget = view; return true; } else { return super.dispatchTouchEvent(ev); } } }
[ "zhangshch2008@gmail.com" ]
zhangshch2008@gmail.com
cc29d91b8edc22e20b7afb2fa41b45936f0ec11d
afa7fa021b3aaaed7ead0aa4a15eb652ce0addc0
/src/main/java/net/canadensys/processing/occurrence/task/PrepareDwcaTask.java
ace82fbb4acf7646d02d55d42b5e9b9615b8fa85
[]
no_license
maduhu/canadensys-harvester
06b667ee8bff0c7acfda7dd64372e2ca0a273eb2
25673d99dfc887d9a6882844444358828bcb2cd6
refs/heads/master
2021-01-24T04:43:11.518780
2013-12-05T18:15:59
2013-12-05T18:15:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,245
java
package net.canadensys.processing.occurrence.task; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.Map; import net.canadensys.processing.ItemTaskIF; import net.canadensys.processing.exception.TaskExecutionException; import net.canadensys.processing.occurrence.SharedParameterEnum; import net.canadensys.utils.ZipUtils; import org.apache.commons.compress.utils.IOUtils; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.validator.routines.UrlValidator; import org.apache.log4j.Logger; /** * Task to prepare a Darwin Core Archive. * Preparation include : download (if necessary), unzip (if necessary), set shared variables * @author canadensys * */ public class PrepareDwcaTask implements ItemTaskIF{ //get log4j handler private static final Logger LOGGER = Logger.getLogger(PrepareDwcaTask.class); private static final String IPT_PREFIX = "dwca-"; private static final String WORKING_FOLDER = "work"; private boolean allowDatasetShortnameExtraction = false; /** * Allow to find the Darwin Core archive location from the sharedParameters. * @param sharedParameters * @return the dwca location or null if the location could not be found or is conflicting */ private String extractDwcaFileLocation(Map<SharedParameterEnum,Object> sharedParameters){ String dwcaURL = (String)sharedParameters.get(SharedParameterEnum.DWCA_URL); String dwcaPath = (String)sharedParameters.get(SharedParameterEnum.DWCA_PATH); if(StringUtils.isNotBlank(dwcaURL) && StringUtils.isNotBlank(dwcaPath)){ LOGGER.fatal("Conflicted DwcaFileLocation : " + dwcaURL + " and : " + dwcaPath); return null; } if(StringUtils.isNotBlank(dwcaURL)){ return dwcaURL; } if(StringUtils.isNotBlank(dwcaPath)){ return dwcaPath; } return null; } /** * @param sharedParameters out:SharedParameterEnum.DWCA_PATH,SharedParameterEnum.DATASET_SHORTNAME(if not already set) */ @Override public void execute(Map<SharedParameterEnum,Object> sharedParameters){ boolean dwcaFileExists = false; File dwcaFile = null; String dwcaIdentifier; String dwcaFileLocation = extractDwcaFileLocation(sharedParameters); //make sure the files exists if(dwcaFileLocation != null){ //Is this a URL? UrlValidator urlValidator = new UrlValidator(); if(urlValidator.isValid(dwcaFileLocation)){ File workFolder = new File(WORKING_FOLDER); //make sure the folder exists workFolder.mkdir(); URL dlUrl; try { dlUrl = new URL(dwcaFileLocation); //Get the filename as defined by Content-Disposition:filename="dwca-mt-specimens.zip" String filename = dlUrl.openConnection().getHeaderField("Content-Disposition"); if(StringUtils.isNotBlank(filename)){ String destinationFile = workFolder.getAbsolutePath() +File.separator+ filename.replaceAll("\"", "").replace("filename=", ""); downloadDwca(dlUrl, destinationFile); dwcaFileLocation = destinationFile; } } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } dwcaFile = new File(dwcaFileLocation); dwcaFileExists = dwcaFile.exists(); } if(!dwcaFileExists){ throw new TaskExecutionException("Could not find the DarwinCore archive file " + dwcaFileLocation); } //set the unique identifier for this resource if(dwcaFile.isDirectory()){ dwcaIdentifier = dwcaFile.getName(); } else{ dwcaIdentifier = FilenameUtils.getBaseName(dwcaFileLocation); } //remove common IPT prefix if(StringUtils.startsWith(dwcaIdentifier, IPT_PREFIX)){ dwcaIdentifier = StringUtils.removeStart(dwcaIdentifier, IPT_PREFIX); } if(FilenameUtils.isExtension(dwcaFileLocation, "zip")){ String unzippedFolder = FilenameUtils.removeExtension(dwcaFileLocation); if(!ZipUtils.unzipFileOrFolder(new File(dwcaFileLocation), unzippedFolder)){ throw new TaskExecutionException("Error while unziping the DarwinCore Archive"); } //use the unzipped folder dwcaFileLocation = unzippedFolder; } //sanity check if(StringUtils.isBlank(dwcaIdentifier)){ LOGGER.fatal("dwcaIdentifier cannot be empty"); throw new TaskExecutionException("dwcaIdentifier cannot be empty"); } //if SharedParameterEnum.DWCA_PATH was previously there, we replace it sharedParameters.put(SharedParameterEnum.DWCA_PATH, dwcaFileLocation); if(allowDatasetShortnameExtraction && sharedParameters.get(SharedParameterEnum.DATASET_SHORTNAME) == null){ sharedParameters.put(SharedParameterEnum.DATASET_SHORTNAME, dwcaIdentifier); } } /** * Download a DarwinCore archive from a URL and save it locally. * @param url * @param destinationFile * @return */ private boolean downloadDwca(URL url, String destinationFile){ File fl = null; OutputStream os = null; InputStream is = null; boolean success = false; try { fl = new File(destinationFile); os = new FileOutputStream(fl); is = url.openStream(); //Download the file IOUtils.copy(is, os); success = true; } catch (Exception e) { e.printStackTrace(); } finally { if (os != null) { try { os.close(); } catch (IOException e) {} } if (is != null) { try { is.close(); } catch (IOException e) {} } } return success; } public boolean isAllowDatasetShortnameExtraction() { return allowDatasetShortnameExtraction; } /** * Should we allow this task to set the SharedParameterEnum.DATASET_SHORTNAME using the name of the file * in case this parameter is not set? * @param allowDatasetShortnameExtraction */ public void setAllowDatasetShortnameExtraction( boolean allowDatasetShortnameExtraction) { this.allowDatasetShortnameExtraction = allowDatasetShortnameExtraction; } }
[ "christiangendreau@gmail.com" ]
christiangendreau@gmail.com
f59d7d648653b224f053ecfef12d95d6c0ea035b
ebcecf4c4192796dfc24b3055674677a66b32597
/src/test/java/com/tinkerpop/pipes/transform/MemoizePipeTest.java
cca1c0519c5f51482a78d402204b83a5ad022d24
[ "BSD-3-Clause" ]
permissive
zcox/pipes
ac011ce3af8a1a81812ddce9c574c4e3d9dd487b
7d4e5fa0f7d2bc5e807d633ce3177c0a3c7389eb
refs/heads/master
2021-01-18T11:49:48.924285
2011-09-30T22:19:06
2011-09-30T22:19:06
2,361,212
0
0
null
null
null
null
UTF-8
Java
false
false
2,250
java
package com.tinkerpop.pipes.transform; import com.tinkerpop.pipes.AbstractPipe; import com.tinkerpop.pipes.filter.FilterPipe; import com.tinkerpop.pipes.util.FluentPipeline; import junit.framework.TestCase; import java.util.Arrays; /** * @author Marko A. Rodriguez (http://markorodriguez.com) */ public class MemoizePipeTest extends TestCase { public void testPipeEquality() { assertEquals( new FluentPipeline().start(Arrays.asList("a", "b", "c")).identity().objectFilter("x", FilterPipe.Filter.NOT_EQUAL).memoize(1).identity(), new FluentPipeline().start(Arrays.asList("a", "b", "c")).identity().objectFilter("x", FilterPipe.Filter.NOT_EQUAL).identity()); } /*public void testBasicMemoization() { Map<String, List<String>> map = new HashMap<String, List<String>>(); Pipe pipe = new Pipeline(new IdentityPipe(), new AppendCharAndLengthPipe(), new MemoizePipe()) pipe1.iterate(); assertEquals(map.get(graph.getVertex(1)).size(), 3); assertTrue(map.get(graph.getVertex(1)).contains(graph.getVertex(2))); assertTrue(map.get(graph.getVertex(1)).contains(graph.getVertex(3))); assertTrue(map.get(graph.getVertex(1)).contains(graph.getVertex(4))); assertEquals(map.get(graph.getVertex(2)).size(), 0); assertEquals(map.get(graph.getVertex(3)).size(), 0); assertEquals(map.get(graph.getVertex(4)).size(), 2); assertTrue(map.get(graph.getVertex(4)).contains(graph.getVertex(5))); assertTrue(map.get(graph.getVertex(4)).contains(graph.getVertex(3))); assertEquals(map.get(graph.getVertex(5)).size(), 0); assertEquals(map.get(graph.getVertex(6)).size(), 1); assertTrue(map.get(graph.getVertex(6)).contains(graph.getVertex(3))); }*/ private class AppendCharAndLengthPipe extends AbstractPipe<String, Object> { Integer n; public Object processNextStart() { if (null != n) { Integer temp = n; n = null; return temp; } else { String temp = this.starts.next() + "a"; n = temp.length(); return temp; } } } }
[ "okrammarko@gmail.com" ]
okrammarko@gmail.com
178d85cc46364704110f447d4c7f03ee55ca3aec
ee17edc7902291e44caf3ddbba86d209e3409681
/src/blur-testsuite/src/main/java/com/nearinfinity/blur/testsuite/RandomSearchTable.java
191e0bda8e72ae63bc2102e11216f8b80491dd8c
[]
no_license
gaogen123/blur
1daf78a1b3545f5302ab08c47eb8c96f72f77469
6c6a2723a56172cc731b648c051c80e8f374e0db
refs/heads/master
2022-12-28T03:44:32.399530
2012-09-20T14:36:36
2012-09-20T14:36:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,338
java
package com.nearinfinity.blur.testsuite; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Random; import java.util.Set; import org.apache.thrift.TException; import com.nearinfinity.blur.thrift.BlurClient; import com.nearinfinity.blur.thrift.generated.Blur.Iface; import com.nearinfinity.blur.thrift.generated.BlurException; import com.nearinfinity.blur.thrift.generated.BlurQuery; import com.nearinfinity.blur.thrift.generated.BlurResults; import com.nearinfinity.blur.thrift.generated.Schema; import com.nearinfinity.blur.thrift.generated.SimpleQuery; public class RandomSearchTable { public static void main(String[] args) throws BlurException, TException, IOException { String connectionStr = args[0]; final String tableName = args[1]; int numberOfTerms = Integer.parseInt(args[2]); int numberOfSearchesPerPass = Integer.parseInt(args[3]); int numberOfTermsPerQuery = Integer.parseInt(args[4]); List<String> sampleOfTerms = getSampleOfTerms(connectionStr, tableName, numberOfTerms); // for (String term : sampleOfTerms) { // System.out.println(term); // } runSearches(connectionStr, tableName, sampleOfTerms, numberOfSearchesPerPass, numberOfTermsPerQuery); } private static void runSearches(String connectionStr, final String tableName, List<String> sampleOfTerms, int numberOfSearchesPerPass, int numberOfTermsPerQuery) throws BlurException, TException, IOException { Random random = new Random(); StringBuilder builder = new StringBuilder(); for (int i = 0; i < numberOfSearchesPerPass; i++) { builder.setLength(0); String query = generateQuery(builder, random, sampleOfTerms, numberOfTermsPerQuery); System.out.println(query); final BlurQuery blurQuery = new BlurQuery(); blurQuery.simpleQuery = new SimpleQuery(); blurQuery.simpleQuery.queryStr = query; long start = System.nanoTime(); Iface client = BlurClient.getClient(connectionStr); BlurResults results = client.query(tableName, blurQuery); long end = System.nanoTime(); System.out.println((end - start) / 1000000.0 + " ms " + results.totalResults); } } private static String generateQuery(StringBuilder builder, Random random, List<String> sampleOfTerms, int numberOfTermsPerQuery) { for (int i = 0; i < numberOfTermsPerQuery; i++) { builder.append(getRandomTerm(sampleOfTerms, random)).append(' '); } return builder.toString().trim(); } private static String getRandomTerm(List<String> sampleOfTerms, Random random) { int index = random.nextInt(sampleOfTerms.size()); return sampleOfTerms.get(index); } private static List<String> getSampleOfTerms(String connectionStr, String tableName, int numberOfTerms) throws BlurException, TException, IOException { List<String> sampleOfTerms = new ArrayList<String>(); Set<String> fields = getFields(connectionStr, tableName); for (String field : fields) { Set<String> randomSampleOfTerms = getRandomSampleOfTerms(connectionStr, tableName, field, numberOfTerms); for (String term : randomSampleOfTerms) { sampleOfTerms.add(field + ":" + term); } } Collections.shuffle(sampleOfTerms); return sampleOfTerms; } private static Set<String> getRandomSampleOfTerms(String connectionStr, final String tableName, final String field, final int numberOfTerms) throws BlurException, TException, IOException { Iface client = BlurClient.getClient(connectionStr); String[] split = field.split("\\."); String columnFamily = split[0]; String columnName = split[1]; List<String> terms = client.terms(tableName, columnFamily, columnName, "", (short) numberOfTerms); return new HashSet<String>(terms); } private static Set<String> getFields(String connectionStr, final String tableName) throws BlurException, TException, IOException { Iface client = BlurClient.getClient(connectionStr); Schema schema = client.schema(tableName); Set<String> fields = new HashSet<String>(); for (String cf : schema.columnFamilies.keySet()) { for (String field : schema.columnFamilies.get(cf)) { fields.add(cf + "." + field); } } return fields; } }
[ "amccurry@gmail.com" ]
amccurry@gmail.com
500bf461a83c2e7c6725b5a3ea950025a1f867ce
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
/src_procyon/com/google/security/zynamics/bindiff/gui/tabpanels/viewtabpanel/graphnodetree/treenodes/AbstractBaseTreeNode$InternalTreeNodeSearcherListener.java
803f354c6c6e2196c0a3fd9d45e1509b74246c1b
[]
no_license
fjh658/bindiff
c98c9c24b0d904be852182ecbf4f81926ce67fb4
2a31859b4638404cdc915d7ed6be19937d762743
refs/heads/master
2021-01-20T06:43:12.134977
2016-06-29T17:09:03
2016-06-29T17:09:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
643
java
package com.google.security.zynamics.bindiff.gui.tabpanels.viewtabpanel.graphnodetree.treenodes; import com.google.security.zynamics.bindiff.gui.tabpanels.viewtabpanel.graphnodetree.searcher.*; class AbstractBaseTreeNode$InternalTreeNodeSearcherListener implements ITreeNodeSearcherListener { final /* synthetic */ AbstractBaseTreeNode this$0; private AbstractBaseTreeNode$InternalTreeNodeSearcherListener(final AbstractBaseTreeNode this$0) { this.this$0 = this$0; } @Override public void searchStringChanged(final TreeNodeSearcher treeNodeSearcher) { this.this$0.updateTreeNodes(true); } }
[ "manouchehri@riseup.net" ]
manouchehri@riseup.net
8d639983d1a67bc62fe7c530e74aac36423c45c1
95a074a59df888b78223baf3c8badf73eb65983e
/src/main/java/com/example/leetcode/weeklycontest/test187/FindKthSmallestSum.java
4fbdba20c6011164107fe7c680d535c4728d31d5
[]
no_license
Giridhar552/leetcode
c3a543c59049e3acfd03a8ada5b98f125be95b01
378fb45f7ee27b7ee41549dee0dedabe601522db
refs/heads/master
2023-07-01T00:34:10.267988
2021-08-09T17:18:53
2021-08-09T17:18:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,489
java
package com.example.leetcode.weeklycontest.test187; import java.util.HashSet; import java.util.List; import java.util.Set; /** * You are given an m * n matrix, mat, and an integer k, which has its rows sorted in non-decreasing order. * * You are allowed to choose exactly 1 element from each row to form an array. * Return the Kth smallest array sum among all possible arrays. * * * * Example 1: * * Input: mat = [[1,3,11],[2,4,6]], k = 5 * Output: 7 * Explanation: Choosing one element from each row, the first k smallest sum are: * [1,2], [1,4], [3,2], [3,4], [1,6]. Where the 5th sum is 7. * Example 2: * * Input: mat = [[1,3,11],[2,4,6]], k = 9 * Output: 17 * Example 3: * * Input: mat = [[1,10,10],[1,4,5],[2,3,6]], k = 7 * Output: 9 * Explanation: Choosing one element from each row, the first k smallest sum are: * [1,1,2], [1,1,3], [1,4,2], [1,4,3], [1,1,6], [1,5,2], [1,5,3]. Where the 7th sum is 9. * Example 4: * * Input: mat = [[1,1,10],[2,2,9]], k = 7 * Output: 12 */ public class FindKthSmallestSum { public static void main(String[] args) { int[][] mat = new int[][]{ {1,10,10}, {1,4,5}, {2,3,6} }; int k = 7; FindKthSmallestSum findKthSmallestSum = new FindKthSmallestSum(); int result = findKthSmallestSum.kthSmallest(mat,k); System.out.println(result); } public int kthSmallest(int[][] mat, int k) { Set<List<Integer>> mySet = new HashSet<>(); int result = 0; int u = mat.length; int v = mat[0].length; if(k>= u * v){ for(int i = 0;i<u;i++){ result += mat[i][v-1]; } return result; } int[] index = new int[u]; int times = 1; int temp; int next = 0; boolean isStable = false; while (times<k && !isStable) { isStable = true; temp = Integer.MAX_VALUE; for (int i = 0; i < u; i++) { if (index[i] < v - 1 && mat[i][index[i] + 1] - mat[i][0] <= temp) { temp = mat[i][index[i] + 1] - mat[i][0]; next = i; isStable = false; } } if(!isStable) { index[next]++; times++; } } for(int i = 0;i<u;i++){ result += mat[i][index[i]-1]; } return result; } }
[ "zhangzui1989@gmail.com" ]
zhangzui1989@gmail.com
c18de99f52ff03d942b875c0f856caf0dccb4011
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-13544-22-30-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest.java
7e567728ac0f14d5b8d12dc39aeccf764e07e993
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
584
java
/* * This file was automatically generated by EvoSuite * Sat Jan 18 04:15:50 UTC 2020 */ package com.xpn.xwiki.internal.template; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class InternalTemplateManager_ESTest extends InternalTemplateManager_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
b0bd7999aa887370c0bd09b7b60b67f1057939f2
a90450b6a44715a9752915b2407a4f827cf35baf
/WDE/src/wde/util/QualityCheckFlags.java
d619142c0ca855d233a9d7aedbd6caff13621961
[]
no_license
usdot-fhwa-stol/WxDE
8af0ea15dc4d88356142a8e974fac9533490541c
8614f264ed014ea545a47a134b32c0d6ca03cc9a
refs/heads/master
2023-02-18T13:58:32.514197
2017-11-06T22:33:35
2017-11-06T22:40:35
41,399,863
0
0
null
null
null
null
UTF-8
Java
false
false
881
java
/************************************************************************ * Source filename: QualityCheckFlags.java * <p/> * Creation date: May 1, 2013 * <p/> * Author: zhengg * <p/> * Project: WDE * <p/> * Objective: * <p/> * Developer's notes: * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates ***********************************************************************/ package wde.util; public class QualityCheckFlags { private int runFlags; private int passFlags; public QualityCheckFlags(int rf, int pf) { runFlags = rf; passFlags = pf; } /** * @return the runFlags */ public int getRunFlags() { return runFlags; } /** * @return the passFlags */ public int getPassFlags() { return passFlags; } }
[ "schultzjl@leidos.com" ]
schultzjl@leidos.com
81ed80bdd6ebf86c3ae22efdd0458a4224c1df15
4ca7f4e12a738f255d8757d2c2349cf4e9a70206
/storeApp/src/main/java/com/fa/app/store/config/LocaleConfiguration.java
67c63055105faf188af659352e9e69d4aa352361
[]
no_license
chanduforstudy/appetency
59cf50d2e2e9c814d83169cbdf3d87282f91549c
884e70dd4c94b7c971796279403a0bb34e221325
refs/heads/master
2021-01-21T20:46:27.437530
2017-05-24T09:43:23
2017-05-24T09:43:23
92,275,956
0
0
null
null
null
null
UTF-8
Java
false
false
1,390
java
package com.fa.app.store.config; import io.github.jhipster.config.locale.AngularCookieLocaleResolver; import org.springframework.context.EnvironmentAware; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.web.servlet.LocaleResolver; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; @Configuration public class LocaleConfiguration extends WebMvcConfigurerAdapter implements EnvironmentAware { @Override public void setEnvironment(Environment environment) { // unused } @Bean(name = "localeResolver") public LocaleResolver localeResolver() { AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver(); cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY"); return cookieLocaleResolver; } @Override public void addInterceptors(InterceptorRegistry registry) { LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); localeChangeInterceptor.setParamName("language"); registry.addInterceptor(localeChangeInterceptor); } }
[ "vagrant@vagrant.vm" ]
vagrant@vagrant.vm
4cde041c74b8c584249d3a36a478ef52cb56a074
8ce49e8fdd840c46fc6375ed2eb5485587882d51
/app/src/main/java/com/lcshidai/lc/model/account/BespeakType.java
42fe56ef0cad3936a215e6fb339b80b8dd41288a
[]
no_license
huashigen/lcsd
884fd3f8ea3be73d1bde8302398d0e7efe56d031
58a88095ac91eed15b1440153397e822fdaf4736
refs/heads/master
2021-04-03T07:10:41.836740
2018-04-03T06:17:04
2018-04-03T06:17:04
124,465,726
0
0
null
null
null
null
UTF-8
Java
false
false
699
java
package com.lcshidai.lc.model.account; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.lcshidai.lc.model.BaseData; @JsonIgnoreProperties(ignoreUnknown = true) public class BespeakType extends BaseData { private String post_key; // private String prj_type_name; // public String getPost_key() { return post_key; } @JsonProperty("post_key") public void setPost_key(String post_key) { this.post_key = post_key; } public String getPrj_type_name() { return prj_type_name; } @JsonProperty("prj_type_name") public void setPrj_type_name(String prj_type_name) { this.prj_type_name = prj_type_name; } }
[ "869981597@qq.com" ]
869981597@qq.com
b821ac54df8449ba79e943110a557aa9aabe42ce
b83848ad47814df8381ceca9e8d23993d83d824a
/smart-cloud-starter/smart-cloud-starter-core/src/main/java/org/smartframework/cloud/starter/core/business/exception/DataValidateException.java
ab89bae60f739dbb0523a1923a26d93d8d091dd5
[ "Apache-2.0" ]
permissive
xgx-style/smart-cloud
247b1007fe33cda6f1a956c61bda2ced97fc7c62
a908cee015cc8f22a706555f3dbf36662934f50b
refs/heads/master
2022-04-24T12:31:54.923431
2020-04-19T11:15:45
2020-04-19T11:15:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
443
java
package org.smartframework.cloud.starter.core.business.exception; import org.smartframework.cloud.common.pojo.enums.ReturnCodeEnum; /** * 数据校验错误 * * @author liyulin * @date 2019-05-01 */ public class DataValidateException extends BaseException { private static final long serialVersionUID = 1L; public DataValidateException(String message) { setCode(ReturnCodeEnum.DATE_MISSING.getCode()); setMessage(message); } }
[ "1634753825@qq.com" ]
1634753825@qq.com
87c6ddc26ead2aaae98606f44322023bb9bd57f2
435cc8c38474bdd0276208b502f3ca91145141d9
/crm-ejb/src/main/java/br/com/questor/crm/data/MemberListProducer.java
a8e4dab9e238556d18efbe77caac5cadadfb42db
[]
no_license
estevandiedrich/questorcrm
d677e467d4e88f924e4b32c74e845d2d14bff080
b2220f1052f9df981c0e9e7ed97992afd1cfd834
refs/heads/master
2021-01-10T22:28:19.018299
2016-05-04T04:16:25
2016-05-04T04:16:25
52,612,297
0
0
null
null
null
null
UTF-8
Java
false
false
1,615
java
package br.com.questor.crm.data; import java.util.List; import javax.annotation.PostConstruct; import javax.enterprise.context.RequestScoped; import javax.enterprise.event.Observes; import javax.enterprise.event.Reception; import javax.enterprise.inject.Produces; import javax.inject.Inject; import javax.inject.Named; import javax.persistence.EntityManager; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Root; import br.com.questor.crm.model.Member; @RequestScoped public class MemberListProducer { @Inject private EntityManager em; private List<Member> members; // @Named provides access the return value via the EL variable name "members" in the UI (e.g., // Facelets or JSP view) @Produces @Named public List<Member> getMembers() { return members; } public void onMemberListChanged(@Observes(notifyObserver = Reception.IF_EXISTS) final Member member) { retrieveAllMembersOrderedByName(); } @PostConstruct public void retrieveAllMembersOrderedByName() { CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Member> criteria = cb.createQuery(Member.class); Root<Member> member = criteria.from(Member.class); // Swap criteria statements if you would like to try out type-safe criteria queries, a new // feature in JPA 2.0 // criteria.select(member).orderBy(cb.asc(member.get(Member_.name))); criteria.select(member).orderBy(cb.asc(member.get("name"))); members = em.createQuery(criteria).getResultList(); } }
[ "estevan.diedrich@gmail.com" ]
estevan.diedrich@gmail.com
94873146cd4ac3b82fc884c238d4057e387819a1
c87fa48cb71f76bbcfb406e53177c16219aae4cb
/Datasets/Dataset1/Java/3708.java
310c3246c89a69bc9551a36df3097ffbd742b25e
[]
no_license
mrezende/CodRep-competition
b4a49b7b9f22a9bfe3bfff4fd076c166da3d0f16
aae413ca563ae3cc3fde3b105809dd4111800521
refs/heads/master
2021-07-24T16:08:57.416020
2019-01-08T23:37:00
2019-01-08T23:37:00
135,821,155
0
0
null
2018-12-18T22:07:11
2018-06-02T13:45:09
null
UTF-8
Java
false
false
3,985
java
package org.apache.lucene.codecs.lucene40.values; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with this * work for additional information regarding copyright ownership. The ASF * licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ import org.apache.lucene.util.BytesRef; /** * Package private BytesRefUtils - can move this into the o.a.l.utils package if * needed. * * @lucene.internal */ final class BytesRefUtils { private BytesRefUtils() { } /** * Copies the given long value and encodes it as 8 byte Big-Endian. * <p> * NOTE: this method resets the offset to 0, length to 8 and resizes the * reference array if needed. */ public static void copyLong(BytesRef ref, long value) { if (ref.bytes.length < 8) { ref.bytes = new byte[8]; } copyInternal(ref, (int) (value >> 32), ref.offset = 0); copyInternal(ref, (int) value, 4); ref.length = 8; } /** * Copies the given int value and encodes it as 4 byte Big-Endian. * <p> * NOTE: this method resets the offset to 0, length to 4 and resizes the * reference array if needed. */ public static void copyInt(BytesRef ref, int value) { if (ref.bytes.length < 4) { ref.bytes = new byte[4]; } copyInternal(ref, value, ref.offset = 0); ref.length = 4; } /** * Copies the given short value and encodes it as a 2 byte Big-Endian. * <p> * NOTE: this method resets the offset to 0, length to 2 and resizes the * reference array if needed. */ public static void copyShort(BytesRef ref, short value) { if (ref.bytes.length < 2) { ref.bytes = new byte[2]; } ref.bytes[ref.offset] = (byte) (value >> 8); ref.bytes[ref.offset + 1] = (byte) (value); ref.length = 2; } private static void copyInternal(BytesRef ref, int value, int startOffset) { ref.bytes[startOffset] = (byte) (value >> 24); ref.bytes[startOffset + 1] = (byte) (value >> 16); ref.bytes[startOffset + 2] = (byte) (value >> 8); ref.bytes[startOffset + 3] = (byte) (value); } /** * Converts 2 consecutive bytes from the current offset to a short. Bytes are * interpreted as Big-Endian (most significant bit first) * <p> * NOTE: this method does <b>NOT</b> check the bounds of the referenced array. */ public static short asShort(BytesRef b) { return (short) (0xFFFF & ((b.bytes[b.offset] & 0xFF) << 8) | (b.bytes[b.offset + 1] & 0xFF)); } /** * Converts 4 consecutive bytes from the current offset to an int. Bytes are * interpreted as Big-Endian (most significant bit first) * <p> * NOTE: this method does <b>NOT</b> check the bounds of the referenced array. */ public static int asInt(BytesRef b) { return asIntInternal(b, b.offset); } /** * Converts 8 consecutive bytes from the current offset to a long. Bytes are * interpreted as Big-Endian (most significant bit first) * <p> * NOTE: this method does <b>NOT</b> check the bounds of the referenced array. */ public static long asLong(BytesRef b) { return (((long) asIntInternal(b, b.offset) << 32) | asIntInternal(b, b.offset + 4) & 0xFFFFFFFFL); } private static int asIntInternal(BytesRef b, int pos) { return ((b.bytes[pos++] & 0xFF) << 24) | ((b.bytes[pos++] & 0xFF) << 16) | ((b.bytes[pos++] & 0xFF) << 8) | (b.bytes[pos] & 0xFF); } }
[ "rezende.martins@gmail.com" ]
rezende.martins@gmail.com