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
48ac13a4008df250cf9ed8166150b1941be7d62d
78f284cd59ae5795f0717173f50e0ebe96228e96
/factura-negocio/src/cl/stotomas/factura/negocio/formulario_9/copy3/TestingVulnerabilities.java
4de4fa0fcbd9197ee5da8339d3228d41b2a3fddd
[]
no_license
Pattricio/Factura
ebb394e525dfebc97ee2225ffc5fca10962ff477
eae66593ac653f85d05071b6ccb97fb1e058502d
refs/heads/master
2020-03-16T03:08:45.822070
2018-05-07T15:29:25
2018-05-07T15:29:25
132,481,305
0
0
null
null
null
null
ISO-8859-1
Java
false
false
2,280
java
package cl.stotomas.factura.negocio.formulario_9.copy3; import java.applet.Applet; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; //import cl.stomas.factura.negocio.testing.TestingModel.Echo; public class TestingVulnerabilities { public static String decryptMessage(final byte[] message, byte[] secretKey) { try { // CÓDIGO VULNERABLE final SecretKeySpec KeySpec = new SecretKeySpec(secretKey, "DES"); final Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, KeySpec); // RECOMENDACIÓN VERACODE // final Cipher cipher = Cipher.getInstance("DES..."); // cipher.init(Cipher.DECRYPT_MODE, KeySpec); return new String(cipher.doFinal(message)); } catch(Exception e) { e.printStackTrace(); } return null; } // Inclusión de funcionalidades de esfera de control que no es de confianza // Un atacante puede insertar funcionalidades maliciosas dentro de este programa. // Las Applet comprometen la seguridad. ya que sus funcionalidades se pueden adaptar a la Web // Ademas la entrega de acceso de credenciales es engorrosa para el cliente. public final class WidgetData extends Applet { private static final long serialVersionUID = 1L; public float price; public WidgetData() { this.price = LookupPrice("MyWidgetType"); } private float LookupPrice(String string) { return 0; } } class Echo { // Control de Proceso // Posible reemplazo de librería por una maliciosa // Donde además s enos muestra el nombre explícito de esta. public native void runEcho(); { System.loadLibrary("echo"); // Se carga librería } public void main(String[] args) { new Echo().runEcho(); } } class EchoSecond { // Control de Proceso // Posible reemplazo de librería por una maliciosa // Donde además s enos muestra el nombre explícito de esta. public native void runEcho(); { System.loadLibrary("echo"); // Se carga librería } public void main(String[] args) { new Echo().runEcho(); } } }
[ "Adriana Molano@DESKTOP-GQ96FK8" ]
Adriana Molano@DESKTOP-GQ96FK8
54268d6526838469126399e1faffa64b61348ef6
18bf954fa6e36b861fc1422ed2f6a86470e3a130
/agent/agentapp/systemoperations/src/main/java/com/axway/ats/agent/components/system/operations/InternalSystemOperations.java
e5fb393e0f36de9ad23bb45d2ac459ced6f697af
[ "Apache-2.0" ]
permissive
deepansha/ats-framework
63690ca810912fe98d8892077878fdc2b57b29f8
964b4319334ec0b4a692977801053f16a860aaa5
refs/heads/master
2021-01-21T20:53:26.103991
2017-06-16T11:07:35
2017-06-16T11:07:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,851
java
/* * Copyright 2017 Axway Software * * 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.axway.ats.agent.components.system.operations; import com.axway.ats.agent.core.exceptions.AgentException; import com.axway.ats.agent.core.model.Action; import com.axway.ats.agent.core.model.MemberClasses; import com.axway.ats.agent.core.model.Parameter; import com.axway.ats.common.system.OperatingSystemType; import com.axway.ats.core.system.LocalSystemOperations; @MemberClasses(classes = { InternalSystemInputOperations.class }, namesOfInstances = { "inputOperations" }) public class InternalSystemOperations { private LocalSystemOperations localSystemOperations = new LocalSystemOperations(); @Action(name = "Internal System Operations get Operating System Type") public OperatingSystemType getOperatingSystemType() { return localSystemOperations.getOperatingSystemType(); } @Action(name = "Internal System Operations Get System Property") public String getSystemProperty( @Parameter(name = "propertyName" ) String propertyName) throws AgentException { return localSystemOperations.getSystemProperty( propertyName ); } @Action(name = "Internal System Operations get Time") public String getTime( @Parameter(name = "inMilliseconds" ) boolean inMilliseconds) { return localSystemOperations.getTime( inMilliseconds ); } @Action(name = "Internal System Operations set Time") public void setTime( @Parameter(name = "timestamp" ) String timestamp, @Parameter(name = "inMilliseconds") boolean inMilliseconds) { localSystemOperations.setTime( timestamp, inMilliseconds ); } @Action(name = "Internal System Operations get Ats Version") public String getAtsVersion() { return localSystemOperations.getAtsVersion(); } @Action(name = "Internal System Operations is Listening") public boolean isListening( @Parameter(name = "host" ) String host, @Parameter(name = "port") int port, @Parameter(name = "timeout") int timeout) { return localSystemOperations.isListening( host, port, timeout ); } @Action(name = "Internal System Operations create Screenshot") public String createScreenshot( @Parameter(name = "filePath" ) String filePath) { return localSystemOperations.createScreenshot( filePath ); } @Action(name = "Internal System Operations get Class Path") public String[] getClassPath() { return localSystemOperations.getClassPath(); } @Action(name = "Internal System Operations log Class Path") public void logClassPath() { localSystemOperations.logClassPath(); } @Action(name = "Internal System Operations get Duplicated Jars") public String[] getDuplicatedJars() { return localSystemOperations.getDuplicatedJars(); } @Action(name = "Internal System Operations log Duplicated Jars") public void logDuplicatedJars() { localSystemOperations.logDuplicatedJars(); } }
[ "rslavchev@axway.com" ]
rslavchev@axway.com
b4fcca1e57e1095359b7bd86ba6fae53d3d4c466
12090ceee99b6c2445377bc37d2294a73eb6d1d6
/thunder-framework/src/main/java/com/nepxion/thunder/protocol/apache/ApacheSyncClientExecutor.java
015e51f756de558f33b6ee550371df11f83bcba6
[ "Apache-2.0" ]
permissive
jxfw/Thunder
f0808d9d561956862763616eb45f770a55ed4ecb
4fed53c223a5924f8432535888d9bf7b2872c349
refs/heads/master
2021-09-03T13:21:34.168871
2018-01-09T10:25:30
2018-01-09T10:25:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,002
java
package com.nepxion.thunder.protocol.apache; /** * <p>Title: Nepxion Thunder</p> * <p>Description: Nepxion Thunder For Distribution</p> * <p>Copyright: Copyright (c) 2017</p> * <p>Company: Nepxion</p> * @author Haojun Ren * @email 1394997@qq.com * @version 1.0 */ import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; import org.apache.http.client.config.RequestConfig; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.apache.http.ssl.TrustStrategy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.nepxion.thunder.common.constant.ThunderConstant; import com.nepxion.thunder.common.property.ThunderProperties; public class ApacheSyncClientExecutor { private static final Logger LOG = LoggerFactory.getLogger(ApacheSyncClientExecutor.class); private CloseableHttpClient httpSyncClient; public void initialize(ThunderProperties properties) throws Exception { initialize(properties, false); } public void initialize(ThunderProperties properties, boolean https) throws Exception { RequestConfig requestConfig = RequestConfig.custom() .setConnectTimeout(properties.getInteger(ThunderConstant.APACHE_CONNECT_TIMEOUT_ATTRIBUTE_NAME)) .setConnectionRequestTimeout(properties.getInteger(ThunderConstant.APACHE_CONNECT_TIMEOUT_ATTRIBUTE_NAME)) .setSocketTimeout(properties.getInteger(ThunderConstant.APACHE_SO_TIMEOUT_ATTRIBUTE_NAME)) .build(); HttpClientBuilder clientBuilder = HttpClients.custom(); clientBuilder.setDefaultRequestConfig(requestConfig); if (https) { SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() { @Override public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException { return true; } }).build(); HostnameVerifier hostnameVerifier = new HostnameVerifier() { @Override public boolean verify(String hostname, SSLSession session) { return true; } }; SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(sslContext, hostnameVerifier); clientBuilder.setSSLSocketFactory(sslConnectionSocketFactory); } httpSyncClient = clientBuilder.build(); LOG.info("Create apache sync client with {} successfully", https ? "https mode" : "http mode"); } public CloseableHttpClient getClient() { return httpSyncClient; } }
[ "1394997@qq.com" ]
1394997@qq.com
06e325b194a11b0ee05257cd9f510527356bdd09
8998c06b29e6b7fa68d76b1631a0e30a04bd011b
/src/test/java/de/weltraumschaf/slartibartfass/backend/ReplTest.java
798222911b8d5becac4d990c1827fd34ed3c4952
[]
no_license
Weltraumschaf/slartibartfass
c565b989724a0b688c27ad857b70f0595d4a36eb
90ecbab19694d6d045a4a4e4d12626e24fd1cb52
refs/heads/master
2021-01-22T13:03:13.847195
2017-09-06T19:11:03
2017-09-06T19:11:03
68,524,525
0
0
null
null
null
null
UTF-8
Java
false
false
143
java
package de.weltraumschaf.slartibartfass.backend; /** * Tests for {@link Repl}. * * @author Sven Strittmatter */ public class ReplTest { }
[ "ich@weltraumschaf.de" ]
ich@weltraumschaf.de
afbfc7245c3cac0318a70f953e923631d56c21f8
8fbbcd3e7c500a69019c86b2b8b52e50cb99dec5
/src/main/java/com/ham/cmp/service/impl/TaskServiceImpl.java
c005a9f3a7d8cd8eb23f2e840f4b32d79297a3e1
[]
no_license
BulkSecurityGeneratorProject/cmp
20a90a0c18c31b63a7c023a39a6fb0e3c52c43ca
44f4d46c3d963b7a8f65f4432d16f4b76c862d6c
refs/heads/master
2022-12-16T06:28:34.093618
2018-06-06T04:33:45
2018-06-06T04:33:45
296,582,471
0
0
null
2020-09-18T09:57:13
2020-09-18T09:57:12
null
UTF-8
Java
false
false
3,276
java
package com.ham.cmp.service.impl; import com.ham.cmp.service.TaskService; import com.ham.cmp.domain.Task; import com.ham.cmp.repository.TaskRepository; import com.ham.cmp.repository.search.TaskSearchRepository; import com.ham.cmp.service.dto.TaskDTO; import com.ham.cmp.service.mapper.TaskMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.LinkedList; import java.util.List; import java.util.stream.Collectors; import java.util.stream.StreamSupport; import static org.elasticsearch.index.query.QueryBuilders.*; /** * Service Implementation for managing Task. */ @Service @Transactional public class TaskServiceImpl implements TaskService { private final Logger log = LoggerFactory.getLogger(TaskServiceImpl.class); private final TaskRepository taskRepository; private final TaskMapper taskMapper; private final TaskSearchRepository taskSearchRepository; public TaskServiceImpl(TaskRepository taskRepository, TaskMapper taskMapper, TaskSearchRepository taskSearchRepository) { this.taskRepository = taskRepository; this.taskMapper = taskMapper; this.taskSearchRepository = taskSearchRepository; } /** * Save a task. * * @param taskDTO the entity to save * @return the persisted entity */ @Override public TaskDTO save(TaskDTO taskDTO) { log.debug("Request to save Task : {}", taskDTO); Task task = taskMapper.toEntity(taskDTO); task = taskRepository.save(task); TaskDTO result = taskMapper.toDto(task); taskSearchRepository.save(task); return result; } /** * Get all the tasks. * * @return the list of entities */ @Override @Transactional(readOnly = true) public List<TaskDTO> findAll() { log.debug("Request to get all Tasks"); return taskRepository.findAll().stream() .map(taskMapper::toDto) .collect(Collectors.toCollection(LinkedList::new)); } /** * Get one task by id. * * @param id the id of the entity * @return the entity */ @Override @Transactional(readOnly = true) public TaskDTO findOne(Long id) { log.debug("Request to get Task : {}", id); Task task = taskRepository.findOne(id); return taskMapper.toDto(task); } /** * Delete the task by id. * * @param id the id of the entity */ @Override public void delete(Long id) { log.debug("Request to delete Task : {}", id); taskRepository.delete(id); taskSearchRepository.delete(id); } /** * Search for the task corresponding to the query. * * @param query the query of the search * @return the list of entities */ @Override @Transactional(readOnly = true) public List<TaskDTO> search(String query) { log.debug("Request to search Tasks for query {}", query); return StreamSupport .stream(taskSearchRepository.search(queryStringQuery(query)).spliterator(), false) .map(taskMapper::toDto) .collect(Collectors.toList()); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
e7146dd251ae7b098431bf9f7b99599f99117cd0
22671c118b4917f838124336e488d66ea8b57fb5
/app/src/main/java/megvii/testfacepass/beans/BaoCunBean.java
6404c65f2a3f6fcbfc1723ac33ddd99c3a2c9d8b
[]
no_license
yoyo89757001/xinshuangpingji
03ee2482d80e014c0fb2744e9bb401eb5eb1b360
4c5edf03498b6d26f78e87421a16e899e03e6ac3
refs/heads/master
2020-03-29T02:25:50.864540
2018-10-11T13:33:24
2018-10-11T13:33:24
149,436,125
1
0
null
null
null
null
UTF-8
Java
false
false
7,466
java
package megvii.testfacepass.beans; import io.objectbox.annotation.Entity; import io.objectbox.annotation.Id; /** * Created by Administrator on 2017/9/15. */ @Entity public class BaoCunBean { @Id(assignable = true) private Long id; private String shipingIP; private String zhujiDiZhi; private int moban; private String tuisongDiZhi; private String gonggao; private boolean isShowMoshengren; private boolean isShowShiPingLiu; private boolean isHengOrShu; private int yusu; private int yudiao; private int boyingren; private String zhanghuId; private String wenzi; private int size; private String touxiangzhuji; private String houtaiDiZhi; private String huiyiId; private String wenzi1; private int size1; private String guanggaojiMing; private String shiPingWeiZhi; private String zhanhuiId; private String zhanhuiBianMa; private int shibieFaZhi; private int shibieFaceSize; private float ruKuMoHuDu; private int ruKuFaceSize; private boolean isHuoTi; private int huoTiFZ; private String dangqianChengShi; private String dangqianChengShi2; private String dangqianShiJian; private boolean isTianQi; private String shangBanTime; private String xiaBanTime; private String zhanghao; private String mima; public String getZhanghao() { return zhanghao; } public void setZhanghao(String zhanghao) { this.zhanghao = zhanghao; } public String getMima() { return mima; } public void setMima(String mima) { this.mima = mima; } public String getShangBanTime() { return shangBanTime; } public void setShangBanTime(String shangBanTime) { this.shangBanTime = shangBanTime; } public String getXiaBanTime() { return xiaBanTime; } public void setXiaBanTime(String xiaBanTime) { this.xiaBanTime = xiaBanTime; } public String getDangqianShiJian() { return dangqianShiJian; } public void setDangqianShiJian(String dangqianShiJian) { this.dangqianShiJian = dangqianShiJian; } public boolean isTianQi() { return isTianQi; } public void setTianQi(boolean tianQi) { isTianQi = tianQi; } public String getDangqianChengShi2() { return dangqianChengShi2; } public void setDangqianChengShi2(String dangqianChengShi2) { this.dangqianChengShi2 = dangqianChengShi2; } public String getDangqianChengShi() { return dangqianChengShi; } public void setDangqianChengShi(String dangqianChengShi) { this.dangqianChengShi = dangqianChengShi; } public int getHuoTiFZ() { return huoTiFZ; } public void setHuoTiFZ(int huoTiFZ) { this.huoTiFZ = huoTiFZ; } public int getShibieFaZhi() { return shibieFaZhi; } public void setShibieFaZhi(int shibieFaZhi) { this.shibieFaZhi = shibieFaZhi; } public int getShibieFaceSize() { return shibieFaceSize; } public void setShibieFaceSize(int shibieFaceSize) { this.shibieFaceSize = shibieFaceSize; } public float getRuKuMoHuDu() { return ruKuMoHuDu; } public void setRuKuMoHuDu(float ruKuMoHuDu) { this.ruKuMoHuDu = ruKuMoHuDu; } public int getRuKuFaceSize() { return ruKuFaceSize; } public void setRuKuFaceSize(int ruKuFaceSize) { this.ruKuFaceSize = ruKuFaceSize; } public boolean isHuoTi() { return isHuoTi; } public void setHuoTi(boolean huoTi) { isHuoTi = huoTi; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getShipingIP() { return shipingIP; } public void setShipingIP(String shipingIP) { this.shipingIP = shipingIP; } public String getZhujiDiZhi() { return zhujiDiZhi; } public void setZhujiDiZhi(String zhujiDiZhi) { this.zhujiDiZhi = zhujiDiZhi; } public int getMoban() { return moban; } public void setMoban(int moban) { this.moban = moban; } public String getTuisongDiZhi() { return tuisongDiZhi; } public void setTuisongDiZhi(String tuisongDiZhi) { this.tuisongDiZhi = tuisongDiZhi; } public String getGonggao() { return gonggao; } public void setGonggao(String gonggao) { this.gonggao = gonggao; } public boolean isShowMoshengren() { return isShowMoshengren; } public void setShowMoshengren(boolean showMoshengren) { isShowMoshengren = showMoshengren; } public boolean isShowShiPingLiu() { return isShowShiPingLiu; } public void setShowShiPingLiu(boolean showShiPingLiu) { isShowShiPingLiu = showShiPingLiu; } public boolean isHengOrShu() { return isHengOrShu; } public void setHengOrShu(boolean hengOrShu) { isHengOrShu = hengOrShu; } public int getYusu() { return yusu; } public void setYusu(int yusu) { this.yusu = yusu; } public int getYudiao() { return yudiao; } public void setYudiao(int yudiao) { this.yudiao = yudiao; } public int getBoyingren() { return boyingren; } public void setBoyingren(int boyingren) { this.boyingren = boyingren; } public String getZhanghuId() { return zhanghuId; } public void setZhanghuId(String zhanghuId) { this.zhanghuId = zhanghuId; } public String getWenzi() { return wenzi; } public void setWenzi(String wenzi) { this.wenzi = wenzi; } public int getSize() { return size; } public void setSize(int size) { this.size = size; } public String getTouxiangzhuji() { return touxiangzhuji; } public void setTouxiangzhuji(String touxiangzhuji) { this.touxiangzhuji = touxiangzhuji; } public String getHoutaiDiZhi() { return houtaiDiZhi; } public void setHoutaiDiZhi(String houtaiDiZhi) { this.houtaiDiZhi = houtaiDiZhi; } public String getHuiyiId() { return huiyiId; } public void setHuiyiId(String huiyiId) { this.huiyiId = huiyiId; } public String getWenzi1() { return wenzi1; } public void setWenzi1(String wenzi1) { this.wenzi1 = wenzi1; } public int getSize1() { return size1; } public void setSize1(int size1) { this.size1 = size1; } public String getGuanggaojiMing() { return guanggaojiMing; } public void setGuanggaojiMing(String guanggaojiMing) { this.guanggaojiMing = guanggaojiMing; } public String getShiPingWeiZhi() { return shiPingWeiZhi; } public void setShiPingWeiZhi(String shiPingWeiZhi) { this.shiPingWeiZhi = shiPingWeiZhi; } public String getZhanhuiId() { return zhanhuiId; } public void setZhanhuiId(String zhanhuiId) { this.zhanhuiId = zhanhuiId; } public String getZhanhuiBianMa() { return zhanhuiBianMa; } public void setZhanhuiBianMa(String zhanhuiBianMa) { this.zhanhuiBianMa = zhanhuiBianMa; } }
[ "332663557@qq.com" ]
332663557@qq.com
394d09dd8e055452e7373c154cf24a9d4fcd6166
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/java/generated/src/test/java/com/shinesolutions/swaggeraemosgi4j/model/ComDayCqDamHandlerStandardPsdPsdHandlerPropertiesTest.java
9b5cdfdabce9a73b51e91146b2457e3cc42abeb2
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
1,657
java
/* * Adobe Experience Manager OSGI config (AEM) API * Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API * * The version of the OpenAPI document: 1.0.0 * Contact: opensource@shinesolutions.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package com.shinesolutions.swaggeraemosgi4j.model; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.shinesolutions.swaggeraemosgi4j.model.ConfigNodePropertyInteger; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** * Model tests for ComDayCqDamHandlerStandardPsdPsdHandlerProperties */ public class ComDayCqDamHandlerStandardPsdPsdHandlerPropertiesTest { private final ComDayCqDamHandlerStandardPsdPsdHandlerProperties model = new ComDayCqDamHandlerStandardPsdPsdHandlerProperties(); /** * Model tests for ComDayCqDamHandlerStandardPsdPsdHandlerProperties */ @Test public void testComDayCqDamHandlerStandardPsdPsdHandlerProperties() { // TODO: test ComDayCqDamHandlerStandardPsdPsdHandlerProperties } /** * Test the property 'largeFileThreshold' */ @Test public void largeFileThresholdTest() { // TODO: test largeFileThreshold } }
[ "michael.bloch@shinesolutions.com" ]
michael.bloch@shinesolutions.com
e9e7665e14e13b0e73c16f3281ed64feee20eeaf
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/84_ifx-framework-org.sourceforge.ifx.framework.pain004.simpletype.PaymentTransactionStatusCode-1.0-10/org/sourceforge/ifx/framework/pain004/simpletype/PaymentTransactionStatusCode_ESTest.java
18595555d49eede231e77f57af10e2f0eefc87c3
[]
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
710
java
/* * This file was automatically generated by EvoSuite * Sat Oct 26 02:14:34 GMT 2019 */ package org.sourceforge.ifx.framework.pain004.simpletype; 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 PaymentTransactionStatusCode_ESTest extends PaymentTransactionStatusCode_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
015c24acd6b5b98a785e5d80edc1a6fdd90bb3cc
99d856874f2e13f4da8f67d3a59cb0089ed629fe
/temp/src/minecraft/net/minecraft/src/EntityMooshroom.java
b4b570199baf09e682305606eacce5736e4bd574
[]
no_license
pablo67340/SkinFix
f1e0fa64361edb13c7f937f99a571f08bc349c54
5d5a9aa55a948376236a4fda84a7a0eefa373400
refs/heads/master
2020-04-27T20:07:23.310747
2019-03-09T04:28:15
2019-03-09T04:28:15
174,646,319
0
0
null
null
null
null
UTF-8
Java
false
false
2,357
java
package net.minecraft.src; import net.minecraft.src.Block; import net.minecraft.src.EntityAnimal; import net.minecraft.src.EntityCow; import net.minecraft.src.EntityItem; import net.minecraft.src.EntityPlayer; import net.minecraft.src.Item; import net.minecraft.src.ItemStack; import net.minecraft.src.World; public class EntityMooshroom extends EntityCow { public EntityMooshroom(World p_i491_1_) { super(p_i491_1_); this.field_9357_z = "/mob/redcow.png"; this.func_371_a(0.9F, 1.3F); } public boolean func_353_a(EntityPlayer p_353_1_) { ItemStack var2 = p_353_1_.field_778_b.func_494_a(); if(var2 != null && var2.field_1617_c == Item.field_264_C.field_291_aS && this.func_48123_at() >= 0) { if(var2.field_1615_a == 1) { p_353_1_.field_778_b.func_472_a(p_353_1_.field_778_b.field_847_d, new ItemStack(Item.field_263_D)); return true; } if(p_353_1_.field_778_b.func_504_a(new ItemStack(Item.field_263_D)) && !p_353_1_.field_35212_aW.field_35756_d) { p_353_1_.field_778_b.func_473_a(p_353_1_.field_778_b.field_847_d, 1); return true; } } if(var2 != null && var2.field_1617_c == Item.field_31001_bc.field_291_aS && this.func_48123_at() >= 0) { this.func_395_F(); this.field_615_ag.func_694_a("largeexplode", this.field_611_ak, this.field_610_al + (double)(this.field_643_aD / 2.0F), this.field_609_am, 0.0D, 0.0D, 0.0D); if(!this.field_615_ag.field_1026_y) { EntityCow var3 = new EntityCow(this.field_615_ag); var3.func_365_c(this.field_611_ak, this.field_610_al, this.field_609_am, this.field_605_aq, this.field_604_ar); var3.func_40121_k(this.func_40114_aH()); var3.field_735_n = this.field_735_n; this.field_615_ag.func_674_a(var3); for(int var4 = 0; var4 < 5; ++var4) { this.field_615_ag.func_674_a(new EntityItem(this.field_615_ag, this.field_611_ak, this.field_610_al + (double)this.field_643_aD, this.field_609_am, new ItemStack(Block.field_414_ah))); } } return true; } else { return super.func_353_a(p_353_1_); } } public EntityAnimal func_40145_a(EntityAnimal p_40145_1_) { return new EntityMooshroom(this.field_615_ag); } }
[ "pablo67340@gmail.com" ]
pablo67340@gmail.com
917ddfa1751fce84551bcbffffbee0a78c9e3188
fa63fa8fea6dfd24f369d69f39f322f78143077c
/mall-product/src/main/java/com/scut/mall/product/controller/CategoryBrandRelationController.java
8ebc335243943c6f2b2b2dd31e5c118e370a60b5
[]
no_license
laizikeng/mall
4741f36ba872a673210c1f75b2da8abe2e505083
70f1ead689b4101f3e796438d8200285d0b32fcf
refs/heads/main
2023-07-05T02:36:05.184978
2021-08-21T02:42:33
2021-08-21T02:42:33
387,080,581
0
0
null
null
null
null
UTF-8
Java
false
false
3,070
java
package com.scut.mall.product.controller; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.scut.mall.product.entity.BrandEntity; import com.scut.mall.product.vo.BrandVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import com.scut.mall.product.entity.CategoryBrandRelationEntity; import com.scut.mall.product.service.CategoryBrandRelationService; import com.scut.common.utils.PageUtils; import com.scut.common.utils.R; /** * 品牌分类关联 * * @author lzk * @email 2601665132@qq.com * @date 2021-08-04 21:37:24 */ @RestController @RequestMapping("product/categorybrandrelation") public class CategoryBrandRelationController { @Autowired private CategoryBrandRelationService categoryBrandRelationService; @GetMapping("/brands/list") public R relationBrandsList(@RequestParam(value = "catId",required = true) Long catId){ List<BrandEntity> vos = categoryBrandRelationService.getBrandsByCatId(catId); List<BrandVo> collect = vos.stream().map(item -> { BrandVo vo = new BrandVo(); vo.setBrandId(item.getBrandId()); vo.setBrandName(item.getName()); return vo; }).collect(Collectors.toList()); return R.ok().put("data", collect); } /** * 列表 */ @RequestMapping("/list") public R list(@RequestParam Map<String, Object> params){ PageUtils page = categoryBrandRelationService.queryPage(params); return R.ok().put("page", page); } /** * 获取当前品牌关联的所有分类列表 */ @GetMapping("/catelog/list") public R catelogList(@RequestParam("brandId") Long brandId){ List<CategoryBrandRelationEntity> data = categoryBrandRelationService.list( new QueryWrapper<CategoryBrandRelationEntity>().eq("brand_id",brandId) ); return R.ok().put("data", data); } /** * 信息 */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ CategoryBrandRelationEntity categoryBrandRelation = categoryBrandRelationService.getById(id); return R.ok().put("categoryBrandRelation", categoryBrandRelation); } /** * 保存 */ @RequestMapping("/save") public R save(@RequestBody CategoryBrandRelationEntity categoryBrandRelation){ categoryBrandRelationService.saveDetail(categoryBrandRelation); return R.ok(); } /** * 修改 */ @RequestMapping("/update") public R update(@RequestBody CategoryBrandRelationEntity categoryBrandRelation){ categoryBrandRelationService.updateById(categoryBrandRelation); return R.ok(); } /** * 删除 */ @RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ categoryBrandRelationService.removeByIds(Arrays.asList(ids)); return R.ok(); } }
[ "2601665132@qq.com" ]
2601665132@qq.com
591deaa2ac56a0aff4004a9aafcf83843284eb45
3fddbe5fbcc51f4e4d092e45ac17a4ac17894d69
/usef-build/usef-test/usef-test-dso/src/main/java/energy/usef/dso/workflow/altstep/DsoPlaceOperateFlexOrdersStubOrder.java
d16938827b7f1dd9e797d906ba7b41a5659abcf2
[ "Apache-2.0" ]
permissive
Drimpac2020eu/usef
a77cd3abc5e3ae9f29b46b65d23778cfceab6498
65acaef8248da98df45a4ba7507f017dfc903906
refs/heads/master
2022-12-22T16:59:47.959244
2020-05-08T11:12:51
2020-05-08T11:12:51
241,834,155
0
0
Apache-2.0
2022-12-14T20:26:07
2020-02-20T08:43:30
HTML
UTF-8
Java
false
false
3,531
java
/* * Copyright 2015-2016 USEF Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package energy.usef.dso.workflow.altstep; import energy.usef.core.workflow.WorkflowContext; import energy.usef.core.workflow.WorkflowStep; import energy.usef.core.workflow.dto.FlexOfferDto; import energy.usef.dso.workflow.dto.GridSafetyAnalysisDto; import energy.usef.dso.workflow.operate.PlaceOperateFlexOrdersStepParameter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Workflow step implementation for the Workflow 'Place Operate Flex Orders'. * This stub orders all flex offers. * * This implementation expects to find the following parameters as input: * <ul> * <li>FLEX_OFFER_DTO_LIST ({@link List<FlexOfferDto>}): Flex offer DTO list.</li> * <li>GRID_SAFETY_ANALYSIS_DTO ({@link List<FlexOfferDto>}): Grid safety analysis DTO.</li> * </ul> * <p> * parameters as output: * <ul> * <li>ACCEPTED_FLEX_OFFER_DTO_LIST: Accepted flex offer DTO list.</li> * </ul> * <p> * Flex offer DTO combination is accepted based on optimal price. */ public class DsoPlaceOperateFlexOrdersStubOrder implements WorkflowStep { private static final Logger LOGGER = LoggerFactory.getLogger(DsoPlaceFlexOrdersStubOrder.class); /** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public WorkflowContext invoke(WorkflowContext context) { List<FlexOfferDto> flexOfferDtos = (List<FlexOfferDto>) context .getValue(PlaceOperateFlexOrdersStepParameter.IN.FLEX_OFFER_DTO_LIST.name()); GridSafetyAnalysisDto gridSafetyAnalysisDto = (GridSafetyAnalysisDto) context .getValue(PlaceOperateFlexOrdersStepParameter.IN.GRID_SAFETY_ANALYSIS_DTO.name()); LOGGER.debug("Starting workflow step 'Place Flex Orders' for Entity Address {}, PTU Date {}.", gridSafetyAnalysisDto.getEntityAddress(), gridSafetyAnalysisDto.getPtuDate()); // remove all flex offers with empty ptu data FlexOfferDto[] flexOfferDtoArray = flexOfferDtos.stream() .filter(flexOfferDto -> flexOfferDto.getPtus() != null && !flexOfferDto.getPtus().isEmpty()) .toArray(FlexOfferDto[]::new); List<FlexOfferDto> acceptedFlexOfferDtos = new ArrayList<>(); if (flexOfferDtoArray.length > 0) { acceptedFlexOfferDtos = findAcceptedFlexOfferDtos(flexOfferDtoArray); } context.setValue(PlaceOperateFlexOrdersStepParameter.OUT.ACCEPTED_FLEX_OFFER_DTO_LIST.name(), acceptedFlexOfferDtos); LOGGER.debug("Ending successfully workflow step 'Place Flex Orders'."); return context; } private List<FlexOfferDto> findAcceptedFlexOfferDtos(FlexOfferDto[] flexOfferDtoArray) { List<FlexOfferDto> acceptedFlexOfferDtos = new ArrayList<>(); acceptedFlexOfferDtos.addAll(Arrays.asList(flexOfferDtoArray)); return acceptedFlexOfferDtos; } }
[ "drimpac.2020eu@gmail.com" ]
drimpac.2020eu@gmail.com
05ac1646b5e0f885e10a9b1c946c3ec6ed3bf887
b761ee9c0940728545884c7e5f46afcd06b928ff
/data-exchange-center-service-pcaj/src/main/java/data/exchange/center/service/pcaj/domain/AjlxMeta.java
b8e52b8f5c9e166df397285ee6337480922d1834
[]
no_license
fendaq/data-exchange-center
a55b04335966905b7a26e94bac344d2a4380d301
57c112d37c75ea40ac6c2465c6a7e9c5626f1be7
refs/heads/master
2020-06-22T16:21:12.555502
2018-11-08T08:49:08
2018-11-08T08:49:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,887
java
package data.exchange.center.service.pcaj.domain; import java.io.Serializable; /** * * Description: * <p>Company: xinya </p> * <p>Date:2017年12月26日 下午3:07:27</p> * @author Wen.Yuguang * @version 1.0 * */ public class AjlxMeta implements Serializable { /** * 2017年3月4日下午10:46:49 * yuguang */ private static final long serialVersionUID = 4379765609916720862L; /** * id */ private Integer nId; /** * 案件类型字符代表 */ private String cAjlx; /** * 案件类型中文名 */ private String cName; /** * 对应表前缀 */ private String cEprefix; /** * 案件类别 */ private String cAjlb; /** * 法标 0是,1不是 */ private String cFb; /** * */ private String cStat; public Integer getnId() { return nId; } public void setnId(Integer nId) { this.nId = nId; } public String getcAjlx() { return cAjlx; } public void setcAjlx(String cAjlx) { this.cAjlx = cAjlx; } public String getcName() { return cName; } public void setcName(String cName) { this.cName = cName; } public String getcEprefix() { return cEprefix; } public void setcEprefix(String cEprefix) { this.cEprefix = cEprefix; } public String getcAjlb() { return cAjlb; } public void setcAjlb(String cAjlb) { this.cAjlb = cAjlb; } public String getcFb() { return cFb; } public void setcFb(String cFb) { this.cFb = cFb; } public String getcStat() { return cStat; } public void setcStat(String cStat) { this.cStat = cStat; } }
[ "yuguang wen" ]
yuguang wen
424bbe3253da6a5d2b115425d68cd5d539b5cd5c
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14122-36-4-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/extension/job/internal/AbstractExtensionJob_ESTest_scaffolding.java
504b4a2edf9e0ef5d868e30d07196b80f79c3c32
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
457
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Apr 07 09:12:33 UTC 2020 */ package org.xwiki.extension.job.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractExtensionJob_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
bc33ac41fc07004fcdc9501f298a2400bd77e69d
e0ce8cb64702eccce7f6940d283bc93e8f632745
/tags/1.1/src/org/jajim/controladores/ConversacionControlador.java
1cae3e2702dde077dea54f833a2b1f1bdc969c88
[]
no_license
BackupTheBerlios/jajim-svn
5842b35027d995358e605fbd2c5b61dc2b6f7e80
7fa2082094decb25e7765aaaebd611c418676f07
refs/heads/master
2021-01-01T17:56:36.627562
2013-12-06T20:16:30
2013-12-06T20:16:30
40,748,648
0
0
null
null
null
null
UTF-8
Java
false
false
5,849
java
/* Jabber client. Copyright (C) 2010 Florencio Cañizal Calles 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 org.jajim.controladores; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.Observer; import org.jajim.excepciones.FicheroNoEncontradoException; import org.jajim.excepciones.ImposibleEnviarMensajeException; import org.jajim.excepciones.ImposibleGuardarConversacionException; import org.jajim.modelo.conversaciones.ChatListener; import org.jajim.modelo.conversaciones.InvitacionListener; import org.jajim.utilidades.log.ManejadorDeLogs; import org.jivesoftware.smack.ChatManager; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smackx.muc.MultiUserChat; /** * @author Florencio Cañizal Calles * @version 1.1 * Clase que gestiona todas aquellas operaciones relacionadas con las conversacio * nes. */ public abstract class ConversacionControlador { protected String usuario; protected String[] preferencias; protected static ChatListener cl; protected static InvitacionListener il; protected static ChatManager cm; /** * Constructor de la clase. Inicia la conversación con el usuario. * @param usuario el usuario con el que se va a iniciar la conversación. */ public ConversacionControlador(String usuario){ this.usuario = usuario; } /** * Envía un mensaje a través de la conversación. * @param mensaje El contenido del mensaje que se desea enviar. * @throws ImposibleEnviarMensajeException Si no se puede enviar el mensaje * a los participantes en la conversación. */ public abstract void enviarMensaje(String mensaje) throws ImposibleEnviarMensajeException; /** * Retorna la lista de participantes del chat. * @return La lista de participantes del chat. */ public abstract String[] getParticipantes(); /** * Método que actualiza las preferencias en el controlador para que éste pueda * enviarlas en el mensaje correspondiente. * @param preferencias Las nuevas preferencias de mensajes. */ public void actualizarPreferencias(String[] preferencias){ this.preferencias = preferencias; } /** * Cierra una conversación de manera correcta en el sistema. */ public abstract void cerrarConversacion(); /** * Guarda el contenido de la conversacion actual. * @param nombre El nombre del fichero en el que se va a guardar. * @param ruta La ruta de localización del fichero. * @param texto El contenido de la conversación. * @throws FicheroNoEncontradoException Si no se puede crear el fichero en el * que se va a guardar la conversación * @throws ImposibleGuardarConversacionException Si no se puede guardar la con * versación en el fichero. */ public void guardarConversacion(String nombre,String ruta,String texto) throws FicheroNoEncontradoException,ImposibleGuardarConversacionException{ // Crear un archivo file String f = ruta + File.separator + nombre + ".html"; File fichero = new File(f); // Escribir en el fichero try{ try (FileOutputStream fos = new FileOutputStream(fichero)) { fos.write(texto.getBytes("ISO-8859-1")); } }catch(FileNotFoundException fnfe){ // En caso de que se produzca un error se escribe en el fichero // de log y se lanza una excepción ManejadorDeLogs mdl = ManejadorDeLogs.getManejadorDeLogs(); mdl.escribir("No se encuentra el fichero: " + f); throw new FicheroNoEncontradoException(); }catch(IOException ioe){ // En caso de que se produzca un error se escribe en el fichero // de log y se lanza una excepción ManejadorDeLogs mdl = ManejadorDeLogs.getManejadorDeLogs(); mdl.escribir("No puede escribir en el fichero: " + f); throw new ImposibleGuardarConversacionException(); } } /** * Asocia un oyente de chat a la conexión * @param o El oyente que será notificado de los eventos de chat. */ public static void crearListener(Observer o){ // Recuperar la conexión ConexionControlador cnc = ConexionControlador.getInstancia(); XMPPConnection xc = cnc.getXc(); // Crear el chat listener y asociarlo a la conexión cl = new ChatListener(o,xc); cm = xc.getChatManager(); cm.addChatListener(cl); // Crear el listener de las invitaciones y asignarlo il = new InvitacionListener(o); MultiUserChat.addInvitationListener(xc,il); } /** * Elimina el oyente de chat de la conexión. */ public static void eliminarListener(){ // Recuperar la conexión ConexionControlador cnc = ConexionControlador.getInstancia(); XMPPConnection xc = cnc.getXc(); // Eliminar el chat listener y resetearlo. cm.removeChatListener(cl); cm = null; cl = null; MultiUserChat.removeInvitationListener(xc,il); il = null; } }
[ "npi83@66271abf-8d89-0410-bfa2-80b8d0f357ea" ]
npi83@66271abf-8d89-0410-bfa2-80b8d0f357ea
808c5136f6b2557458f6f8bb55edca4159e01f87
516fb367430d4c1393f4cd726242618eca862bda
/sources/com/google/android/gms/internal/ads/zzatb.java
e2271dd524e05ff3e2ef4511f3bad27afa0fc667
[]
no_license
cmFodWx5YWRhdjEyMTA5/Gaana2
75d6d6788e2dac9302cff206a093870e1602921d
8531673a5615bd9183c9a0466325d0270b8a8895
refs/heads/master
2020-07-22T15:46:54.149313
2019-06-19T16:11:11
2019-06-19T16:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,862
java
package com.google.android.gms.internal.ads; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Class; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Constructor; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Field; import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Param; import java.util.List; @zzark @Class(creator = "NonagonRequestParcelCreator") public final class zzatb extends AbstractSafeParcelable { public static final Creator<zzatb> CREATOR = new zzatc(); @Field(id = 3) private final ApplicationInfo applicationInfo; @Field(id = 4) private final String packageName; @Field(id = 6) private final PackageInfo zzdwh; @Field(id = 5) private final List<String> zzdwt; @Field(id = 7) private final String zzdxc; @Field(id = 1) private final Bundle zzdzn; @Field(id = 2) private final zzbbi zzdzo; @Field(id = 8) private final boolean zzdzp; @Field(id = 9) private final String zzdzq; @Constructor public zzatb(@Param(id = 1) Bundle bundle, @Param(id = 2) zzbbi zzbbi, @Param(id = 3) ApplicationInfo applicationInfo, @Param(id = 4) String str, @Param(id = 5) List<String> list, @Param(id = 6) PackageInfo packageInfo, @Param(id = 7) String str2, @Param(id = 8) boolean z, @Param(id = 9) String str3) { this.zzdzn = bundle; this.zzdzo = zzbbi; this.packageName = str; this.applicationInfo = applicationInfo; this.zzdwt = list; this.zzdwh = packageInfo; this.zzdxc = str2; this.zzdzp = z; this.zzdzq = str3; } public final void writeToParcel(Parcel parcel, int i) { int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel); SafeParcelWriter.writeBundle(parcel, 1, this.zzdzn, false); SafeParcelWriter.writeParcelable(parcel, 2, this.zzdzo, i, false); SafeParcelWriter.writeParcelable(parcel, 3, this.applicationInfo, i, false); SafeParcelWriter.writeString(parcel, 4, this.packageName, false); SafeParcelWriter.writeStringList(parcel, 5, this.zzdwt, false); SafeParcelWriter.writeParcelable(parcel, 6, this.zzdwh, i, false); SafeParcelWriter.writeString(parcel, 7, this.zzdxc, false); SafeParcelWriter.writeBoolean(parcel, 8, this.zzdzp); SafeParcelWriter.writeString(parcel, 9, this.zzdzq, false); SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader); } }
[ "master@master.com" ]
master@master.com
b82e956f8924f5b03e351bd609836bf308d25a37
1ee02b8abe5547a3a1cf6601e8e8a4ebd6d5f20b
/src/E_464_SortIntegers.java
ba0c48f61cf8f0b145bea1ea29e8cc838edd2c31
[]
no_license
techflowing/LintCode
3857e727039bbb20e9b9c9d7a915bf8006a90a0e
fd95f1831c3afad03ff6eb349e7a5f837add2d16
refs/heads/master
2021-05-08T13:13:47.207955
2018-07-19T14:04:40
2018-07-19T14:04:40
120,001,660
1
0
null
null
null
null
UTF-8
Java
false
false
1,002
java
/** * 给一组整数,按照升序排序。使用归并排序,快速排序,堆排序或者任何其他 O(n log n) 的排序算法。 */ public class E_464_SortIntegers { /** * 快速排序 */ public void sortIntegers2(int[] A) { int left = 0; int right = A.length - 1; sort(A, left, right); } public void sort(int[] arr, int left, int right) { int i, j, temp; if (left > right) { return; } temp = arr[left]; i = left; j = right; while (i < j) { while (arr[j] >= temp && i < j) { j--; } while (arr[i] <= temp && i < j) { i++; } if (i < j) { int t = arr[i]; arr[i] = arr[j]; arr[j] = t; } } arr[left] = arr[i]; arr[i] = temp; sort(arr, left, i - 1); sort(arr, i + 1, right); } }
[ "techflowing@gmail.com" ]
techflowing@gmail.com
a2e6687932788bdaccf4e8892d5f49c6a93beef7
821b1befccc702f939c67a843f728d1a7b7d9ca8
/src/main/java/jpa/_01_basic/entity/Address.java
d27135dd2e7c9b5e8f49ddeb1932b583b88364a4
[]
no_license
sahwar/JavaMethodsProgramming
d96a2d941111eb6e5cf8160bbd13f40db09c3c5b
fa5d90fbf8d622c254998ae33e66eb80c18f106c
refs/heads/master
2021-05-31T13:51:22.495705
2016-04-07T21:33:07
2016-04-07T21:33:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
521
java
package jpa._01_basic.entity; import javax.persistence.Embeddable; import java.io.Serializable; @Embeddable public class Address implements Serializable { private String city; private Country nationality; public String getCity() { return city; } public void setCity(String city) { this.city = city; } public Country getNationality() { return nationality; } public void setNationality(Country nationality) { this.nationality = nationality; } }
[ "dmytro.burdyga@gmail.com" ]
dmytro.burdyga@gmail.com
7e277484c4b15fc30ac4b11125f944ad1f8d36a4
ddec46506cbdee03b495b7bc287b14abab12c701
/jdk1.8/src/com/sun/corba/se/spi/activation/_ServerImplBase.java
1d142b2b8302448b676155cd1421eeaf7e957de8
[]
no_license
kvenLin/JDK-Source
f86737d3761102933c4b87730bca8928a5885287
1ff43b09f1056d91de97356be388d58c98ba1982
refs/heads/master
2023-08-10T11:26:59.051952
2023-07-20T06:48:45
2023-07-20T06:48:45
161,105,850
60
24
null
2022-06-17T02:19:27
2018-12-10T02:37:12
Java
UTF-8
Java
false
false
2,513
java
package com.sun.corba.se.spi.activation; /** * com/sun/corba/se/spi/activation/_ServerImplBase.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from /HUDSON/workspace/8-2-build-linux-amd64/jdk8u20/1074/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl * Wednesday, July 30, 2014 1:14:27 PM PDT */ /** Server callback API, passed to Activator in active method. */ public abstract class _ServerImplBase extends org.omg.CORBA.portable.ObjectImpl implements com.sun.corba.se.spi.activation.Server, org.omg.CORBA.portable.InvokeHandler { // Constructors public _ServerImplBase () { } private static java.util.Hashtable _methods = new java.util.Hashtable (); static { _methods.put ("shutdown", new java.lang.Integer (0)); _methods.put ("install", new java.lang.Integer (1)); _methods.put ("uninstall", new java.lang.Integer (2)); } public org.omg.CORBA.portable.OutputStream _invoke (String $method, org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler $rh) { org.omg.CORBA.portable.OutputStream out = null; java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); if (__method == null) throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); switch (__method.intValue ()) { /** Shutdown this server. Returns after orb.shutdown() completes. */ case 0: // activation/Server/shutdown { this.shutdown (); out = $rh.createReply(); break; } /** Install the server. Returns after the install hook completes * execution in the server. */ case 1: // activation/Server/install { this.install (); out = $rh.createReply(); break; } /** Uninstall the server. Returns after the uninstall hook * completes execution. */ case 2: // activation/Server/uninstall { this.uninstall (); out = $rh.createReply(); break; } default: throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); } return out; } // _invoke // Type-specific CORBA::Object operations private static String[] __ids = { "IDL:activation/Server:1.0"}; public String[] _ids () { return (String[])__ids.clone (); } } // class _ServerImplBase
[ "1256233771@qq.com" ]
1256233771@qq.com
ab0a87bb4a4160caf2db608c2ff401e9178bea7f
656ce78b903ef3426f8f1ecdaee57217f9fbc40e
/src/retrofit/client/UrlConnectionClient$1.java
02fac1595d42a9539a800f0743fe3224808823d3
[]
no_license
zhuharev/periscope-android-source
51bce2c1b0b356718be207789c0b84acf1e7e201
637ab941ed6352845900b9d465b8e302146b3f8f
refs/heads/master
2021-01-10T01:47:19.177515
2015-12-25T16:51:27
2015-12-25T16:51:27
48,586,306
8
10
null
null
null
null
UTF-8
Java
false
false
213
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package retrofit.client; class { }
[ "hostmaster@zhuharev.ru" ]
hostmaster@zhuharev.ru
5dec3d527fb92ebfd15ed6707a4332870bbfba17
80f23317897417a5abfe6ddd26d00f33d3b84a74
/Java OOP/Encapsulation/shopping/Main.java
9f50d75795cf5a3ccc09f04390a746b60d8e1864
[]
no_license
Petretooo/SoftUni-Homework
b67c64d221971748a2a9bdbcc3ef8e6f57e67f39
c3e74fcb9f0ef74284265f7955ec76b047578429
refs/heads/master
2021-06-30T15:59:01.491255
2020-01-12T15:05:03
2020-01-12T15:05:03
179,889,608
1
0
null
2020-10-13T15:19:56
2019-04-06T21:40:30
Java
UTF-8
Java
false
false
2,618
java
package Encapsulation.shopping; import Encapsulation.shopping.shoping.Person; import Encapsulation.shopping.shoping.Product; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { Scanner in = new Scanner(System.in); BufferedReader bfr = new BufferedReader(new InputStreamReader(System.in)); String[] peopleData = bfr.readLine().split(";"); Map<String, Person> people = new LinkedHashMap<>(); for (String data : peopleData) { String[] person = data.split("="); String name = person[0]; double money = Double.parseDouble(person[1]); try { Person dude = new Person(name, money); people.put(name, dude); }catch (IllegalArgumentException ex){ System.out.println(ex.getMessage()); } } String[] productData = bfr.readLine().split(";"); Map<String, Product> groceries = new HashMap<>(); for (String data : productData) { String[] products = data.split("="); String name = products[0]; double cost = Double.parseDouble(products[1]); try{ Product product = new Product(name, cost); groceries.put(name, product); }catch (IllegalArgumentException ex){ System.out.println(ex.getMessage()); } } String input; while(!"END".equals(input = bfr.readLine())){ String[] line = input.split(" "); String name = line[0]; String product = line[1]; Person buyer = null; if(people.containsKey(name)){ buyer = people.get(name); } Product purchase = null; if(groceries.containsKey(product)){ purchase = groceries.get(product); } if(buyer != null && purchase != null){ try { buyer.buyProduct(purchase); } catch (IllegalArgumentException ex) { System.out.println(ex.getMessage()); continue; } System.out.println(String.format("%s bought %s", name, product)); } } for (Person value : people.values()) { System.out.println(value); } } }
[ "49255539+Petretooo@users.noreply.github.com" ]
49255539+Petretooo@users.noreply.github.com
d5798ef05451b761b01c6ed46328c1622beda665
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XRENDERING-418-24-18-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/wikimodel/xhtml/filter/DefaultXMLFilter_ESTest_scaffolding.java
be6f1d7708f32c24eb1620caeb713738561950c5
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
463
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Wed Apr 01 22:47:58 UTC 2020 */ package org.xwiki.rendering.wikimodel.xhtml.filter; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DefaultXMLFilter_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
b7d1d7c3903af4232b7be1d11cf4aa7b66798762
56cf34c40c5048b7b5f9a257288bba1c34b1d5e2
/src/org/xpup/hafmis/sysloan/common/dao/BankpalindromeDAO.java
bd450376bf68d46af8f92d3ba3a74228956dcba5
[]
no_license
witnesslq/zhengxin
0a62d951dc69d8d6b1b8bcdca883ee11531fbb83
0ea9ad67aa917bd1911c917334b6b5f9ebfd563a
refs/heads/master
2020-12-30T11:16:04.359466
2012-06-27T13:43:40
2012-06-27T13:43:40
null
0
0
null
null
null
null
GB18030
Java
false
false
1,236
java
package org.xpup.hafmis.sysloan.common.dao; import java.io.Serializable; import org.apache.commons.lang.Validate; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; import org.xpup.hafmis.sysloan.common.domain.entity.Bankpalindrome; /** * PL010 银行回文格式设置表 * @author Administrator * */ public class BankpalindromeDAO extends HibernateDaoSupport { /** * 根据主键查询 * * @param id * @return */ public Bankpalindrome queryById(Serializable id) { Validate.notNull(id); return (Bankpalindrome) getHibernateTemplate().get(Bankpalindrome.class, id); } /** * 插入记录 * * @param assistantOrg * @return */ public Serializable insert(Bankpalindrome bankpalindrome) { Serializable id = null; try { Validate.notNull(bankpalindrome); id = getHibernateTemplate().save(bankpalindrome); } catch (Exception e) { e.printStackTrace(); } return id; } /** * 删除 */ public void delete(Bankpalindrome bankpalindrome){ try{ getHibernateTemplate().delete(bankpalindrome); }catch(Exception a){ a.printStackTrace(); } } }
[ "yuelaotou@gmail.com" ]
yuelaotou@gmail.com
bc69c01ff737b3b4df86f1dd446bc7c26ad1e669
182b7e5ca415043908753d8153c541ee0e34711c
/HibernateBasics/src/main/java/org/vinaylogics/hibernatebasics/annotation/EmployeeSingleRowLoad.java
468e4e036d06a26daf4f184dc0ee93f4c12a9053
[]
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,533
java
package org.vinaylogics.hibernatebasics.annotation; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import org.vinaylogics.hibernatebasics.annotation.models.AnMoEmployee; import java.io.File; public class EmployeeSingleRowLoad { public static void main(String[] args) { runExistingEmployee(); runNonExistingEmployee(); } private static void runExistingEmployee() { File file = new File(EmployeeAnnotationTest.class.getClassLoader().getResource("hibernate.cfg.xml").getFile()); SessionFactory sessionFactory = new Configuration().configure(file) .buildSessionFactory(); Session session = sessionFactory.openSession(); AnMoEmployee employee = session.load(AnMoEmployee.class, 5); System.out.println(employee); System.out.println("Fetch Successful"); sessionFactory.close(); session.close(); } private static void runNonExistingEmployee() { File file = new File(EmployeeAnnotationTest.class.getClassLoader().getResource("hibernate.cfg.xml").getFile()); SessionFactory sessionFactory = new Configuration().configure(file) .buildSessionFactory(); Session session = sessionFactory.openSession(); AnMoEmployee employee = session.load(AnMoEmployee.class, 10); System.out.println(employee); System.out.println("Fetch Successful"); sessionFactory.close(); session.close(); } }
[ "vinayagam.d.ganesh@gmail.com" ]
vinayagam.d.ganesh@gmail.com
3c3b9cb3bc141f74dc64fb85924a6ea993954752
d5ff41b041e5769082045e8f2b9ff221da1a6e73
/src/com/atguigu/surveypark/service/BaseService.java
818e31203a8c71422248864dc602495cd0b613cb
[]
no_license
Tralo/lsn_surveypark
e0fdc8601471e401f48639b23c82bfa6a2009f9f
01d961cf3b1dbe5200ce9f98d95800b3bf4849df
refs/heads/master
2021-01-12T13:08:36.189897
2016-11-06T14:27:42
2016-11-06T14:27:42
72,123,311
0
0
null
null
null
null
UTF-8
Java
false
false
493
java
package com.atguigu.surveypark.service; import java.util.List; public interface BaseService<T> { /** * 写操作 */ public void saveEntity(T t); public void updateEntity(T t); public void saveOrUpdateEntity(T t); public void deleteEntity(T t); public void batchEntityByHQL(String hql, Object... objects); /** * 读操作 * @param t */ public T loadEntity(Integer id); public T getEntity(Integer id); public List<T> findEntityByHQL(String hql,Object...objects); }
[ "13580548169@163.com" ]
13580548169@163.com
31bded4682f94b1aa2f7aad25449a919c3de6229
6451c77ce976b7b927b6345e9dd4c586fd15b317
/cgi_kunde2.0_shop/shop/build/hybris/bin/custom/pacoshop/pacoshopfacades/src/com/cgi/pacoshop/facades/process/email/context/OrderCancelledEmailContext.java
68219e03148581f753ebb4a28c219163cb047991
[]
no_license
dixit-anup/maventotalproject
eefae3fbc1de085b3057edd87dcb3605f7e8750b
2c0f5581d32dd1aa265e455a9447ab7d160cf5f1
refs/heads/master
2021-01-16T21:57:39.423961
2014-08-21T14:58:18
2014-08-21T14:58:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,454
java
/* * [y] hybris Platform * * Copyright (c) 2000-2013 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package com.cgi.pacoshop.facades.process.email.context; import de.hybris.platform.acceleratorservices.model.cms2.pages.EmailPageModel; import de.hybris.platform.acceleratorservices.process.email.context.AbstractEmailContext; import de.hybris.platform.basecommerce.model.site.BaseSiteModel; import de.hybris.platform.commercefacades.order.data.OrderData; import de.hybris.platform.commerceservices.enums.CustomerType; import de.hybris.platform.core.model.c2l.LanguageModel; import de.hybris.platform.core.model.order.OrderModel; import de.hybris.platform.core.model.user.CustomerModel; import de.hybris.platform.orderprocessing.model.OrderProcessModel; import de.hybris.platform.servicelayer.dto.converter.Converter; import org.springframework.beans.factory.annotation.Required; /** * Velocity context for a order cancelled email. */ public class OrderCancelledEmailContext extends AbstractEmailContext<OrderProcessModel> { private Converter<OrderModel, OrderData> orderConverter; private OrderData orderData; private String orderCode; private String orderGuid; private boolean guest; private String storeName; @Override public void init(final OrderProcessModel orderProcessModel, final EmailPageModel emailPageModel) { super.init(orderProcessModel, emailPageModel); orderData = getOrderConverter().convert(orderProcessModel.getOrder()); orderCode = orderProcessModel.getOrder().getCode(); orderGuid = orderProcessModel.getOrder().getGuid(); guest = CustomerType.GUEST.equals(getCustomer(orderProcessModel).getType()); storeName = orderProcessModel.getOrder().getStore().getName(); } @Override protected BaseSiteModel getSite(final OrderProcessModel orderProcessModel) { return orderProcessModel.getOrder().getSite(); } @Override protected CustomerModel getCustomer(final OrderProcessModel orderProcessModel) { return (CustomerModel) orderProcessModel.getOrder().getUser(); } protected Converter<OrderModel, OrderData> getOrderConverter() { return orderConverter; } @Required public void setOrderConverter(final Converter<OrderModel, OrderData> orderConverter) { this.orderConverter = orderConverter; } public OrderData getOrder() { return orderData; } @Override protected LanguageModel getEmailLanguage(final OrderProcessModel orderProcessModel) { return orderProcessModel.getOrder().getLanguage(); } public OrderData getOrderData() { return orderData; } public void setOrderData(final OrderData orderData) { this.orderData = orderData; } public String getOrderCode() { return orderCode; } public void setOrderCode(final String orderCode) { this.orderCode = orderCode; } public String getOrderGuid() { return orderGuid; } public void setOrderGuid(final String orderGuid) { this.orderGuid = orderGuid; } public boolean isGuest() { return guest; } public void setGuest(final boolean guest) { this.guest = guest; } public String getStoreName() { return storeName; } public void setStoreName(final String storeName) { this.storeName = storeName; } }
[ "dmitry.bilyk@symmetrics.de" ]
dmitry.bilyk@symmetrics.de
3b5a03a02240b21a6685732a6a8ab4bcb149418f
d7104de316586bf00a072d127960067af4133682
/OcavaCore/src/test/java/com/ocadotechnology/testing/UtilityClassTest.java
8ca1b178793da4ce6bed9a8ad733e2c11274df78
[ "Apache-2.0" ]
permissive
mfijas/Ocava
401d0841e9039d144c0c17b10b541dbdf597c2ea
ee97522a78d14aa4afb493b6e58ed6ece03da104
refs/heads/master
2020-08-01T09:08:28.614930
2019-09-06T09:44:10
2019-09-06T09:44:10
210,944,443
0
0
Apache-2.0
2019-09-25T21:33:35
2019-09-25T21:33:35
null
UTF-8
Java
false
false
2,565
java
/* * Copyright © 2017 Ocado (Ocava) * * 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.ocadotechnology.testing; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import org.assertj.core.api.Condition; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; /** * Tests for classes that are not intended to only contain static utility methods. */ public interface UtilityClassTest extends ClassTest { @Test @DisplayName("cannot be instantiated") default void cannotBeInstantiated() { Class<?> clazz = getTestSubject(); for (Constructor<?> constructor : clazz.getDeclaredConstructors()) { assertThat(Modifier.isPrivate(constructor.getModifiers())).as("Constructor not private: %s", constructor.toGenericString()).isTrue(); if (constructor.getParameterCount() == 0) { constructor.setAccessible(true); assertThatThrownBy(constructor::newInstance).hasCauseInstanceOf(UnsupportedOperationException.class); } } for (Method method : clazz.getDeclaredMethods()) { assertThat(method).isNot(new Condition<>(m -> m.getReturnType().equals(clazz), "Method returns class type: %s", clazz)); } } @Test @DisplayName("is final") default void isFinal() { assertThat(getTestSubject()).isFinal(); } @Test @DisplayName("contains only static methods") default void isStatic() { for (Method method : getTestSubject().getDeclaredMethods()) { assertThat(Modifier.isStatic(method.getModifiers())).as("Method not static: %s", method.toGenericString()).isTrue(); } } @Test @DisplayName("does not subclass another class") default void isNotASubclass() { assertThat(getTestSubject().getSuperclass()).isEqualTo(Object.class); } }
[ "colin.janke@ocado.com" ]
colin.janke@ocado.com
503879cb8258d7f30231004eab9918420d253b31
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/com/yandex/metrica/impl/ob/nj.java
dd20c991cd5413733cd2f146f48a0008c6baf187
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
563
java
package com.yandex.metrica.impl.ob; import android.support.annotation.NonNull; import com.yandex.metrica.impl.ob.ve; public class nj implements np<ps, ve.a.d.C0355a.C0356a.C0357a> { @NonNull /* renamed from: a */ public ve.a.d.C0355a.C0356a.C0357a b(@NonNull ps psVar) { ve.a.d.C0355a.C0356a.C0357a aVar = new ve.a.d.C0355a.C0356a.C0357a(); aVar.b = psVar.a; aVar.c = psVar.b; return aVar; } @NonNull public ps a(@NonNull ve.a.d.C0355a.C0356a.C0357a aVar) { return new ps(aVar.b, aVar.c); } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
16d6aa79877f3bf3102de82b1729553d47de24cc
2aae974c2c207e715d040866d807a5c8e72e8a18
/Character_Abyssal/src/net/sf/anathema/character/abyssal/reporting/rendering/Resonance2ndEditionEncoderFactory.java
a809ec1a8f80c6d0782b10c0d5647e5f957fb419
[]
no_license
Shadow493/anathema
5ec7afeea4b12360d6fd623ecde28f2c01905463
3f3a3de643bd3ef0462dc3511a37fbd0bcbb7602
refs/heads/master
2020-12-30T18:51:17.548460
2012-03-17T18:40:43
2012-03-17T18:40:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,056
java
package net.sf.anathema.character.abyssal.reporting.rendering; import net.sf.anathema.character.generic.type.CharacterType; import net.sf.anathema.character.reporting.pdf.content.BasicContent; import net.sf.anathema.character.reporting.pdf.rendering.EncoderIds; import net.sf.anathema.character.reporting.pdf.rendering.boxes.AbstractEncoderFactory; import net.sf.anathema.character.reporting.pdf.rendering.boxes.RegisteredEncoderFactory; import net.sf.anathema.character.reporting.pdf.rendering.general.box.ContentEncoder; import net.sf.anathema.lib.resources.IResources; @RegisteredEncoderFactory public class Resonance2ndEditionEncoderFactory extends AbstractEncoderFactory { public Resonance2ndEditionEncoderFactory() { super(EncoderIds.GREAT_CURSE); } @Override public ContentEncoder create(IResources resources, BasicContent content) { return new Resonance2ndEditionEncoder(); } @Override public boolean supports(BasicContent content) { return content.isOfType(CharacterType.ABYSSAL) && content.isSecondEdition(); } }
[ "sandra.sieroux@googlemail.com" ]
sandra.sieroux@googlemail.com
285759241e4a440e1394eb19ddcc7bd814e4c125
d7bdaadca23880af130724d2a5813d56c9148f1b
/TrNetCompilation/test-src/activitymigrationgeneratedfromdsltransoriginal/TrNetPat318InstancePublisher.java
c17438d9e730735f4a2ed212de508aa9773c8313
[]
no_license
clagms/TrNet
14b957e4ba8b8fb81925ca9acf2e64bc805c12e1
5b14e0f0fb352b6f1bf6a684cc1d4aaa0104ab47
refs/heads/master
2021-01-01T03:41:58.483993
2016-04-26T14:20:22
2016-04-26T14:20:22
57,108,988
0
0
null
null
null
null
UTF-8
Java
false
false
235
java
package activitymigrationgeneratedfromdsltransoriginal; public interface TrNetPat318InstancePublisher{ public void registerListener(TrNetPat318InstanceListener listener); public void notifyListeners(TrNetPat318Instance element); }
[ "cla.gms@gmail.com" ]
cla.gms@gmail.com
d401110527725182ddf637843478ea26f57ab2d9
b9f1d02db280edccafb9f000ccda440e8a487dab
/deployment-common/src/test/java/io/github/cloudiator/deployment/domain/EnvironmentGeneratorTest.java
38727cd725768a5915ce773b906526b3471936a2
[]
no_license
cloudiator/deployment
a20d7dcb21f6081e38effbeaec56b51ad2ff17ac
14ec03b2b2150518fb996e14d55db9ed6d6d2479
refs/heads/master
2022-06-13T01:43:19.176816
2020-01-10T14:20:16
2020-01-10T14:20:16
85,323,295
0
2
null
2022-05-20T20:54:40
2017-03-17T14:53:57
Java
UTF-8
Java
false
false
1,514
java
/* * Copyright 2014-2019 University of Ulm * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.github.cloudiator.deployment.domain; import static org.hamcrest.MatcherAssert.assertThat; import io.github.cloudiator.deployment.config.DeploymentContext; import org.hamcrest.collection.IsMapContaining; import org.junit.Test; public class EnvironmentGeneratorTest { @Test public void generate() { final EnvironmentGenerator generator = EnvironmentGenerator .of(MediaWikiJob.wikiJob(), MediaWikiSchedule.schedule(), "http://localhost"); final Environment wikiEnv = generator.generate(MediaWikiSchedule.wikiProcess()); assertThat(wikiEnv, IsMapContaining .hasEntry("PUBLIC_" + MediaWikiJob.wikiRequiresDatabase().name(), "http://db.com")); final Environment lbEnv = generator.generate(MediaWikiSchedule.lbProcess()); assertThat(lbEnv, IsMapContaining .hasEntry("PUBLIC_" + MediaWikiJob.loadbalancerreqwiki().name(), "http://wiki.com")); } }
[ "daniel.baur@uni-ulm.de" ]
daniel.baur@uni-ulm.de
a66deae67ae075d342ece2feb2106392c1e665af
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_1e96ab47fc25aeaf7f12e61a257d0352a753ad3e/CipangoMib/4_1e96ab47fc25aeaf7f12e61a257d0352a753ad3e_CipangoMib_t.java
736eead119a79ff7763c9a8295ff79b0c4dd91ed
[]
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,408
java
// ======================================================================== // Copyright 2010 NEXCOM Systems // ------------------------------------------------------------------------ // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // ======================================================================== package org.cipango.snmp; import java.lang.management.ManagementFactory; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import javax.management.MBeanServerConnection; import javax.management.Notification; import javax.management.NotificationListener; import javax.management.ObjectName; import org.cipango.log.event.Events; import org.eclipse.jetty.util.log.Log; import org.snmp4j.agent.DuplicateRegistrationException; import org.snmp4j.agent.MOAccess; import org.snmp4j.agent.MOGroup; import org.snmp4j.agent.MOServer; import org.snmp4j.agent.NotificationOriginator; import org.snmp4j.agent.mo.MOAccessImpl; import org.snmp4j.agent.mo.MOFactory; import org.snmp4j.agent.mo.MOScalar; import org.snmp4j.agent.mo.jmx.JMXDefaultMOFactory; import org.snmp4j.agent.mo.jmx.MBeanAttributeMOScalarSupport; import org.snmp4j.mp.SnmpConstants; import org.snmp4j.smi.Counter32; import org.snmp4j.smi.OID; import org.snmp4j.smi.OctetString; import org.snmp4j.smi.VariableBinding; public class CipangoMib implements Mib, NotificationListener { public static final OID OID_MESSAGES_RECEIVED = new OID("1.3.6.1.4.26588.1.10.1.0"), OID_MESSAGES_SENT = new OID("1.3.6.1.4.26588.1.10.2.0"), OID_SIP_VERSION = new OID("1.3.6.1.4.26588.1.10.3.0"), OID_NB_SESSIONS = new OID("1.3.6.1.4.26588.1.100.1.0"), OID_THRESHOLD_SESSIONS = new OID("1.3.6.1.4.26588.1.100.2.0"); public static final ObjectName CONNECTOR_MANAGER = ObjectNameFactory.create("org.cipango.server:type=connectormanager,id=0"), SERVER = ObjectNameFactory.create("org.cipango.server:type=server,id=0"), JMX_EVENT_LOGGER = ObjectNameFactory.create("org.cipango.log:type=jmxeventlogger,id=0"); private static final Object[][] CONNECTOR_MANAGER_ATTR = { { OID_MESSAGES_RECEIVED, "messagesReceived", Long.class }, { OID_MESSAGES_SENT, "messagesSent", Long.class } }; private static final Object[][] SERVER_ATTR = { { OID_SIP_VERSION, "sipVersion", String.class }, }; private List<MOScalar> _scalars = new ArrayList<MOScalar>(); private SnmpAgent _agent; public CipangoMib() { super(); addJvmManagementMibInstrumentaton(); } protected void createMO(MOFactory moFactory) { MOAccess readOnly = moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY); _scalars.add(moFactory.createScalar(OID_MESSAGES_RECEIVED, readOnly, new Counter32())); _scalars.add(moFactory.createScalar(OID_MESSAGES_SENT, readOnly, new Counter32())); _scalars.add(moFactory.createScalar(OID_SIP_VERSION, readOnly, new OctetString())); } private void addJvmManagementMibInstrumentaton() { try { MBeanServerConnection server = ManagementFactory.getPlatformMBeanServer(); MBeanAttributeMOScalarSupport scalarSupport = new MBeanAttributeMOScalarSupport(server); JMXDefaultMOFactory jmxFactory = new JMXDefaultMOFactory(server, scalarSupport); createMO(jmxFactory); scalarSupport.addAll(CONNECTOR_MANAGER, CONNECTOR_MANAGER_ATTR); scalarSupport.addAll(SERVER, SERVER_ATTR); server.addNotificationListener(JMX_EVENT_LOGGER, this, null, JMX_EVENT_LOGGER); } catch (Exception e) { Log.warn(e); } } public void registerMOs(MOServer server, OctetString context) throws DuplicateRegistrationException { Iterator<MOScalar> it = _scalars.iterator(); while (it.hasNext()) server.register(it.next(), context); } public void unregisterMOs(MOServer server, OctetString context) { Iterator<MOScalar> it = _scalars.iterator(); while (it.hasNext()) server.unregister(it.next(), context); } public void handleNotification(Notification notification, Object handback) { if (JMX_EVENT_LOGGER.equals(handback)) { int event = Integer.parseInt(notification.getType()); switch (event) { case Events.START: _agent.getNotificationOriginator().notify(new OctetString(), SnmpConstants.coldStart, new VariableBinding[0]); break; case Events.DEPLOY_FAIL: break; case Events.CALLS_THRESHOLD_READCHED: _agent.getNotificationOriginator().notify(new OctetString(), OID_THRESHOLD_SESSIONS, new VariableBinding[0]); break; default: break; } } } public void setSnmpAgent(SnmpAgent agent) { _agent = agent; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
61323af8018cc599856b9b39d3e7fa291531cd81
0031716e70b380c4564a9ba506df3c01673e4dc5
/app/src/main/java/com/douban/book/reader/view/card/WorksInfoCard.java
9be0581d24c0a64d1dc43bf805bda86ba29a8b35
[]
no_license
sridhar191986/DouBanYueDu
fc08c583f4ef53bb293f967de2a2772eb5b55719
fd126db0e3ed684f27a498eda7eaedb06e6c396c
refs/heads/master
2020-09-07T14:32:40.823864
2016-02-18T10:22:58
2016-02-18T10:22:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,372
java
package com.douban.book.reader.view.card; import android.content.Context; import android.widget.RatingBar; import android.widget.TextView; import com.douban.book.reader.R; import com.douban.book.reader.entity.Works; import com.douban.book.reader.manager.WorksManager; import com.douban.book.reader.manager.exception.DataLoadException; import com.douban.book.reader.util.Logger; import com.douban.book.reader.util.ViewUtils; import com.douban.book.reader.view.ParagraphView; import com.douban.book.reader.view.ParagraphView.Indent; import org.androidannotations.annotations.Background; import org.androidannotations.annotations.Bean; import org.androidannotations.annotations.EViewGroup; import org.androidannotations.annotations.UiThread; import org.androidannotations.annotations.ViewById; @EViewGroup public class WorksInfoCard extends Card<WorksInfoCard> { @ViewById(2131558548) ParagraphView mAbstract; @ViewById(2131558549) RatingBar mRatingBar; @ViewById(2131558550) TextView mRatingInfo; @ViewById(2131558547) TextView mSubTitle; @ViewById(2131558546) TextView mTitle; @ViewById(2131558541) TextView mWorksBasicInfo; @Bean WorksManager mWorksManager; public WorksInfoCard(Context context) { super(context); content((int) R.layout.card_works_info); } public WorksInfoCard worksId(int worksId) { loadWorks(worksId); return this; } @Background void loadWorks(int worksId) { try { updateViews(this.mWorksManager.getWorks(worksId)); } catch (DataLoadException e) { Logger.e(this.TAG, e); } } @UiThread void updateViews(Works works) { works(works); } public WorksInfoCard works(Works works) { if (works != null) { ViewUtils.showTextIfNotEmpty(this.mTitle, works.title); ViewUtils.showTextIfNotEmpty(this.mSubTitle, works.subtitle); ViewUtils.showTextIfNotEmpty(this.mWorksBasicInfo, works.formatBasicInfo()); ViewUtils.showTextIfNotEmpty(this.mAbstract, works.abstractText); this.mAbstract.setFirstLineIndent(Indent.NONE); this.mRatingBar.setRating(works.averageRating); ViewUtils.showTextIfNotEmpty(this.mRatingInfo, works.formatRatingInfo()); } return this; } }
[ "blankeeee@gmail.com" ]
blankeeee@gmail.com
deb5fa22e33559d4a66430d23fe0fc1ff6a61e80
e8fc320e35fd8442b8a68b77db9ca55fb411a567
/tmp/java/BasicEspecialidadeValidator.java
5db7dfe6e4c051f7502231336b086211a5e0a2d8
[]
no_license
pedroalmir/regressionTestingPriorization
0500b477ba9005e61204b62d09488824c5fbf0db
62372a83fa8b7c062cb861225bda750d655401fa
refs/heads/master
2020-04-06T04:22:35.207449
2013-11-04T21:31:39
2013-11-04T21:31:39
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
2,334
java
package br.com.infowaypi.ecarebc.atendimentos.validators; import br.com.infowaypi.ecarebc.associados.Prestador; import br.com.infowaypi.ecarebc.associados.Profissional; import br.com.infowaypi.ecarebc.atendimentos.GuiaSimples; import br.com.infowaypi.ecarebc.enums.MensagemErroEnum; import br.com.infowaypi.ecarebc.enums.SexoEnum; import br.com.infowaypi.molecular.ImplDAO; import br.com.infowaypi.msr.exceptions.ValidateException; import br.com.infowaypi.msr.utils.Assert; /** * Classe para validação de especialidade nas guias * @author root * @changes Danilo Nogueira Portela */ @SuppressWarnings("unchecked") public class BasicEspecialidadeValidator extends AbstractGuiaValidator<GuiaSimples> { public boolean templateValidator(GuiaSimples guia) throws ValidateException { Boolean isEspecialidadeNula = guia.getEspecialidade() == null; Boolean isMesmoSexo = guia.getSegurado().getPessoaFisica().getSexo().equals(guia.getEspecialidade().getSexo()); Boolean isSexoAmbos = guia.getEspecialidade().getSexo().intValue() == SexoEnum.AMBOS.value(); Assert.isTrue(isSexoAmbos || isMesmoSexo, MensagemErroEnum.SEGURADO_COM_SEXO_INVALIDO_PARA_ESPECIALIDADE.getMessage(guia.getEspecialidade().getDescricao())); Boolean isProfissionalNulo = guia.getProfissional() == null; Boolean isPrestadorNulo = guia.getPrestador() == null; if(!isPrestadorNulo){ Prestador prest = (Prestador)ImplDAO.findById(guia.getPrestador().getIdPrestador(), Prestador.class); Boolean isPrestadorComMesmaEspecialidade = prest.getEspecialidades().contains(guia.getEspecialidade()); if(!isEspecialidadeNula && !isPrestadorComMesmaEspecialidade) throw new ValidateException(MensagemErroEnum.ESPECIALIDADE_NAO_CADASTRADA_PARA_O_PRESTADOR.getMessage(guia.getEspecialidade().getDescricao())); } if(!isProfissionalNulo){ Profissional prof = (Profissional)ImplDAO.findById(guia.getProfissional().getIdProfissional(), Profissional.class); Boolean isProfissionalComMesmaEspecialidade = prof.getEspecialidades().contains(guia.getEspecialidade()); if(!isEspecialidadeNula && !isProfissionalComMesmaEspecialidade) throw new ValidateException(MensagemErroEnum.ESPECIALIDADE_NAO_CADASTRADA_PARA_O_PROFISSIONAL.getMessage(prof.getPessoaFisica().getNome(),guia.getEspecialidade().getDescricao())); } return true; } }
[ "petrus.cc@gmail.com" ]
petrus.cc@gmail.com
02eb42a2bf381ecb088b4077d46f063eda641dc1
166f40955437dfa52ce1d71ced86d2efe42e4878
/trunk/itali_gestionale_web/src/com/italigestionaleweb/tree/AdvancedTreeModel.java
f10ef3d2c4ea10cddfcf3f42da8376fd59d46e30
[]
no_license
BGCX261/zk-my-project-svn-to-git
28fbb034c9982be0e1c07047f3628d674046f715
3081ff76216d10fc5cc4073b486edd3cadc9055d
refs/heads/master
2020-04-30T03:25:15.207147
2015-08-25T15:37:47
2015-08-25T15:37:47
41,486,725
0
0
null
null
null
null
UTF-8
Java
false
false
1,200
java
package com.italigestionaleweb.tree; import org.zkoss.zul.DefaultTreeModel; import org.zkoss.zul.DefaultTreeNode; import com.italigestionale.bean.Categoria; public class AdvancedTreeModel extends DefaultTreeModel<Categoria>{ /** * */ private static final long serialVersionUID = 4643536167425522181L; DefaultTreeNode<Categoria> _root; public AdvancedTreeModel(CategoriaTreeNode categoriaTreeNode) { super(categoriaTreeNode); _root = categoriaTreeNode; } public void remove(){} public void remove2(){} public void insert(DefaultTreeNode<Categoria> parent, int indexFrom, int indexTo, DefaultTreeNode<Categoria>[] newNodes){ DefaultTreeNode<Categoria> stn = parent; for (int i = indexFrom; i <= indexTo; i++){ try { stn.getChildren().add(i, newNodes[i - indexFrom]); } catch (Exception e) { // TODO: handle exception } } } public void add(DefaultTreeNode<Categoria> parent, DefaultTreeNode<Categoria>[] newNodes){ DefaultTreeNode<Categoria> stn = (DefaultTreeNode<Categoria>) parent; for(int i = 0; i < newNodes.length; i++){ stn.getChildren().add(newNodes[i]); } } }
[ "you@example.com" ]
you@example.com
9f62ad423b1dc42b962c9ae96740843fd3d2343a
9ba25fe7c2c4c7eebe4746857577f2936e670f96
/EngineManagementSystemModules/models/src/main/java/pl/com/app/model/Engine.java
6a2f2a950253e4f3c7747b2aca80b3582b5dc5bc
[]
no_license
Tomek91/Programming-basics
728ffb713f4d7394eadb70a09f6a1e2808cebe4d
b474e5d57f3d4a0c087557712784d26d18ba5359
refs/heads/master
2022-05-29T05:50:27.168641
2020-01-05T15:54:36
2020-01-05T15:54:36
229,479,869
0
0
null
2022-05-20T21:21:58
2019-12-21T20:31:05
Java
UTF-8
Java
false
false
1,432
java
package pl.com.app.model; import pl.com.app.exceptions.MyException; import pl.com.app.model.enums.EngineType; import java.util.Objects; public class Engine { private EngineType eType; private Double power; public Engine(EngineType eType, Double power) { this.eType = eType; setPower(power); } public Engine() { } public EngineType geteType() { return eType; } public void seteType(EngineType eType) { this.eType = eType; } public Double getPower() { return power; } public void setPower(Double power) { try { if (power == null || power < 0) { throw new NullPointerException("POWER IS NULL"); } this.power = power; } catch (Exception e) { throw new MyException(e.getMessage()); } } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Engine engine = (Engine) o; return eType == engine.eType && Objects.equals(power, engine.power); } @Override public int hashCode() { return Objects.hash(eType, power); } @Override public String toString() { return "Engine{" + "eType=" + eType + ", power=" + power + '}'; } }
[ "tomek.r9@wp.pl" ]
tomek.r9@wp.pl
ea05ba59e7601870fb995598a5c84242db83d8ae
d98ed4986ecdd7df4c04e4ad09f38fdb7a7043e8
/Hero_Charms/src/main/java/net/sf/anathema/hero/charms/compiler/CharmCacheImpl.java
f828fab2dc6eddb7cc4084cb8693d326a41ee447
[]
no_license
bjblack/anathema_3e
3d1d42ea3d9a874ac5fbeed506a1a5800e2a99ac
963f37b64d7cf929f086487950d4870fd40ac67f
refs/heads/master
2021-01-19T07:12:42.133946
2018-12-18T23:57:41
2018-12-18T23:57:41
67,353,965
0
0
null
2016-09-04T15:47:48
2016-09-04T15:47:48
null
UTF-8
Java
false
false
3,876
java
package net.sf.anathema.hero.charms.compiler; import net.sf.anathema.magic.data.Charm; import net.sf.anathema.magic.data.reference.CategoryReference; import net.sf.anathema.magic.data.reference.CharmName; import net.sf.anathema.hero.charms.model.special.CharmSpecialLearning; import net.sf.anathema.hero.charms.model.special.CharmSpecialMechanic; import net.sf.anathema.library.collection.MultiEntryMap; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import static java.util.Collections.singletonList; public class CharmCacheImpl implements CharmCache { private MultiEntryMap<CategoryReference, Charm> charmsByCategory = new MultiEntryMap<> (); private Map<CategoryReference, List<CharmSpecialLearning>> specialCharmsByCategory = new HashMap<> (); private Map<CharmName, Charm> charmsById = new HashMap<> (); private Multimap<CharmName, CharmSpecialMechanic> mechanics = ArrayListMultimap.create (); @Override public Charm getCharmById (CharmName charmName) { return charmsById.get (charmName); } @Override public boolean exists (CharmName charmId) { return charmsById.containsKey (charmId); } @Override public List<Charm> getCharms (CategoryReference type) { if (!charmsByCategory.containsKey (type)) { return Collections.emptyList (); } List<Charm> charmList = charmsByCategory.get (type); return new ArrayList<> (charmList); } @Override public List<CategoryReference> getAllCategories () { return new ArrayList<> (charmsByCategory.keySet ()); } @Override public List<CharmSpecialLearning> getSpecialLearningCharms (CategoryReference type) { if (specialCharmsByCategory.containsKey (type)) { List<CharmSpecialLearning> specials = specialCharmsByCategory.get (type); return new ArrayList<> (specials); } return Collections.emptyList (); } public Iterable<Charm> getCharms () { List<Charm> allCharms = new ArrayList<> (); for (CategoryReference type : charmsByCategory.keySet ()) { for (Charm charm : charmsByCategory.get (type)) { allCharms.add (charm); } } return allCharms; } public void addCharm (Charm charm) { charmsByCategory.replace (charm.getTreeReference ().category, charm, charm); charmsById.put (charm.getName (), charm); } public void addSpecialLearning (CategoryReference type, List<CharmSpecialLearning> specialCharms) { if (specialCharms == null) { return; } List<CharmSpecialLearning> cachedList = getCachedSpecialLearningCharmList (type); cachedList.addAll (specialCharms); } public void addSpecialMechanics (String charmName, Collection<CharmSpecialMechanic> mechanics) { this.mechanics.putAll (new CharmName (charmName), mechanics); } private List<CharmSpecialLearning> getCachedSpecialLearningCharmList (CategoryReference type) { if (!specialCharmsByCategory.containsKey (type)) { specialCharmsByCategory.put (type, new ArrayList<> ()); } return specialCharmsByCategory.get (type); } public void addSpecialLearning (CharmSpecialLearning specialCharm) { Charm charm = getCharmById (specialCharm.getCharmName ()); addSpecialLearning (charm.getTreeReference ().category, singletonList (specialCharm)); } @Override public Collection<CharmSpecialMechanic> getSpecialMechanicsForCharm (CharmName name) { return mechanics.get (name); } @Override public List<Charm> getCharmsWithSpecialMechanics () { return mechanics.keySet ().stream ().collect (Collectors.mapping (this::getCharmById, Collectors.toList ())); } }
[ "BJ@BJ-PC" ]
BJ@BJ-PC
7fbf86629e0cdfaf4be7ed408dac7919a96a54f2
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
/src_fernflower/com/google/protobuf/TextFormat$Printer.java
aa646e26c5cd27470e5f57089379007c16a99aea
[]
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
7,894
java
package com.google.protobuf; import com.google.protobuf.ByteString; import com.google.protobuf.Descriptors$EnumValueDescriptor; import com.google.protobuf.Descriptors$FieldDescriptor; import com.google.protobuf.Descriptors$FieldDescriptor$JavaType; import com.google.protobuf.Descriptors$FieldDescriptor$Type; import com.google.protobuf.Message; import com.google.protobuf.MessageOrBuilder; import com.google.protobuf.TextFormat; import com.google.protobuf.TextFormat$1; import com.google.protobuf.TextFormat$3; import com.google.protobuf.TextFormat$TextGenerator; import com.google.protobuf.UnknownFieldSet; import com.google.protobuf.UnknownFieldSet$Field; import java.util.Iterator; import java.util.List; import java.util.Map.Entry; final class TextFormat$Printer { boolean singleLineMode; boolean escapeNonAscii; private TextFormat$Printer() { this.singleLineMode = false; this.escapeNonAscii = true; } private TextFormat$Printer setSingleLineMode(boolean var1) { this.singleLineMode = var1; return this; } private TextFormat$Printer setEscapeNonAscii(boolean var1) { this.escapeNonAscii = var1; return this; } private void print(MessageOrBuilder var1, TextFormat$TextGenerator var2) { Iterator var3 = var1.getAllFields().entrySet().iterator(); while(var3.hasNext()) { Entry var4 = (Entry)var3.next(); this.printField((Descriptors$FieldDescriptor)var4.getKey(), var4.getValue(), var2); } this.printUnknownFields(var1.getUnknownFields(), var2); } private void printField(Descriptors$FieldDescriptor var1, Object var2, TextFormat$TextGenerator var3) { if(var1.isRepeated()) { Iterator var4 = ((List)var2).iterator(); while(var4.hasNext()) { Object var5 = var4.next(); this.printSingleField(var1, var5, var3); } } else { this.printSingleField(var1, var2, var3); } } private void printSingleField(Descriptors$FieldDescriptor var1, Object var2, TextFormat$TextGenerator var3) { if(var1.isExtension()) { var3.print("["); if(var1.getContainingType().getOptions().getMessageSetWireFormat() && var1.getType() == Descriptors$FieldDescriptor$Type.MESSAGE && var1.isOptional() && var1.getExtensionScope() == var1.getMessageType()) { var3.print(var1.getMessageType().getFullName()); } else { var3.print(var1.getFullName()); } var3.print("]"); } else if(var1.getType() == Descriptors$FieldDescriptor$Type.GROUP) { var3.print(var1.getMessageType().getName()); } else { var3.print(var1.getName()); } if(var1.getJavaType() == Descriptors$FieldDescriptor$JavaType.MESSAGE) { if(this.singleLineMode) { var3.print(" { "); } else { var3.print(" {\n"); var3.indent(); } } else { var3.print(": "); } this.printFieldValue(var1, var2, var3); if(var1.getJavaType() == Descriptors$FieldDescriptor$JavaType.MESSAGE) { if(this.singleLineMode) { var3.print("} "); } else { var3.outdent(); var3.print("}\n"); } } else if(this.singleLineMode) { var3.print(" "); } else { var3.print("\n"); } } private void printFieldValue(Descriptors$FieldDescriptor var1, Object var2, TextFormat$TextGenerator var3) { switch(TextFormat$3.$SwitchMap$com$google$protobuf$Descriptors$FieldDescriptor$Type[var1.getType().ordinal()]) { case 1: case 2: case 3: var3.print(((Integer)var2).toString()); break; case 4: case 5: case 6: var3.print(((Long)var2).toString()); break; case 7: var3.print(((Boolean)var2).toString()); break; case 8: var3.print(((Float)var2).toString()); break; case 9: var3.print(((Double)var2).toString()); break; case 10: case 11: var3.print(TextFormat.unsignedToString(((Integer)var2).intValue())); break; case 12: case 13: var3.print(TextFormat.unsignedToString(((Long)var2).longValue())); break; case 14: var3.print("\""); var3.print(this.escapeNonAscii?TextFormat.escapeText((String)var2):TextFormat.escapeDoubleQuotesAndBackslashes((String)var2).replace("\n", "\\n")); var3.print("\""); break; case 15: var3.print("\""); if(var2 instanceof ByteString) { var3.print(TextFormat.escapeBytes((ByteString)var2)); } else { var3.print(TextFormat.escapeBytes((byte[])((byte[])var2))); } var3.print("\""); break; case 16: var3.print(((Descriptors$EnumValueDescriptor)var2).getName()); break; case 17: case 18: this.print((Message)var2, var3); } } private void printUnknownFields(UnknownFieldSet var1, TextFormat$TextGenerator var2) { Iterator var3 = var1.asMap().entrySet().iterator(); while(var3.hasNext()) { Entry var4 = (Entry)var3.next(); int var5 = ((Integer)var4.getKey()).intValue(); UnknownFieldSet$Field var6 = (UnknownFieldSet$Field)var4.getValue(); this.printUnknownField(var5, 0, var6.getVarintList(), var2); this.printUnknownField(var5, 5, var6.getFixed32List(), var2); this.printUnknownField(var5, 1, var6.getFixed64List(), var2); this.printUnknownField(var5, 2, var6.getLengthDelimitedList(), var2); Iterator var7 = var6.getGroupList().iterator(); while(var7.hasNext()) { UnknownFieldSet var8 = (UnknownFieldSet)var7.next(); var2.print(((Integer)var4.getKey()).toString()); if(this.singleLineMode) { var2.print(" { "); } else { var2.print(" {\n"); var2.indent(); } this.printUnknownFields(var8, var2); if(this.singleLineMode) { var2.print("} "); } else { var2.outdent(); var2.print("}\n"); } } } } private void printUnknownField(int var1, int var2, List var3, TextFormat$TextGenerator var4) { Iterator var5 = var3.iterator(); while(var5.hasNext()) { Object var6 = var5.next(); var4.print(String.valueOf(var1)); var4.print(": "); TextFormat.access$800(var2, var6, var4); var4.print(this.singleLineMode?" ":"\n"); } } // $FF: synthetic method TextFormat$Printer(TextFormat$1 var1) { this(); } // $FF: synthetic method static TextFormat$Printer access$100(TextFormat$Printer var0, boolean var1) { return var0.setSingleLineMode(var1); } // $FF: synthetic method static TextFormat$Printer access$200(TextFormat$Printer var0, boolean var1) { return var0.setEscapeNonAscii(var1); } // $FF: synthetic method static void access$400(TextFormat$Printer var0, MessageOrBuilder var1, TextFormat$TextGenerator var2) { var0.print(var1, var2); } // $FF: synthetic method static void access$500(TextFormat$Printer var0, UnknownFieldSet var1, TextFormat$TextGenerator var2) { var0.printUnknownFields(var1, var2); } // $FF: synthetic method static void access$600(TextFormat$Printer var0, Descriptors$FieldDescriptor var1, Object var2, TextFormat$TextGenerator var3) { var0.printField(var1, var2, var3); } // $FF: synthetic method static void access$700(TextFormat$Printer var0, Descriptors$FieldDescriptor var1, Object var2, TextFormat$TextGenerator var3) { var0.printFieldValue(var1, var2, var3); } }
[ "manouchehri@riseup.net" ]
manouchehri@riseup.net
b0c0caeb3851897db196dee92863e78014b70ea5
2ac74657de3cb81bab734d18094e945a442a167d
/sechub-testframework/src/main/java/com/mercedesbenz/sechub/test/executorconfig/TestCredentials.java
3fae8a348e22fb65eafd5d5fdf93671f3bfce73a
[ "MIT", "ANTLR-PD", "LicenseRef-scancode-generic-exception", "BSD-3-Clause", "LGPL-2.0-or-later", "LGPL-2.1-only", "GPL-1.0-or-later", "LicenseRef-scancode-oracle-openjdk-exception-2.0", "MPL-1.1", "MPL-2.0", "CC-PDDC", "LicenseRef-scancode-warranty-disclaimer", "EPL-2.0", "GPL-2.0-only", ...
permissive
de-jcup/sechub
64055bb7ccd5496e32207c140e5812997e97583b
488d2d23b9ae74043e8747467623d291c7371b38
refs/heads/develop
2023-07-22T18:01:47.280074
2023-07-18T15:50:27
2023-07-18T15:50:27
199,480,695
0
1
MIT
2023-03-20T03:00:02
2019-07-29T15:37:19
Java
UTF-8
Java
false
false
172
java
// SPDX-License-Identifier: MIT package com.mercedesbenz.sechub.test.executorconfig; public class TestCredentials { public String user; public String password; }
[ "albert.tregnaghi@daimler.com" ]
albert.tregnaghi@daimler.com
3ce118583169db66be6c091ea44559c50716f4e1
0814b1d0f73c177695e958062e656a954a085e36
/app/src/main/java/com/scy/dingtu_handset/mvp/contract/ScanTakeFoodContract.java
343a811cd3a5dfbee8694c18e98ff38a912b571a
[]
no_license
scygh/DingTu_Handset
36faf2237092a02c1fa563523ef8b8af4d45c6de
976066b4a7be6feec48026654c109625ec42fe64
refs/heads/master
2023-02-22T09:28:53.018538
2021-01-20T08:30:08
2021-01-20T08:30:08
276,780,846
0
0
null
null
null
null
UTF-8
Java
false
false
1,564
java
package com.scy.dingtu_handset.mvp.contract; import com.jess.arms.mvp.IView; import com.jess.arms.mvp.IModel; import com.scy.dingtu_handset.app.entity.OrderDetailGet; import com.scy.dingtu_handset.app.entity.OrderGoodsDetailList; import com.scy.dingtu_handset.app.entity.OrderTake; import io.reactivex.Observable; /** * ================================================ * Description: * <p> * Created by MVPArmsTemplate on 06/12/2020 10:11 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a> * <a href="https://github.com/JessYanCoding">Follow me</a> * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a> * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a> * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a> * ================================================ */ public interface ScanTakeFoodContract { //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息 interface View extends IView { void onOrderGet(OrderDetailGet get); void onOrderGoodsDetailList(OrderGoodsDetailList list); void onOrderTake(OrderTake take); } //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存 interface Model extends IModel { Observable<OrderDetailGet> getOrderDetailGet(String orderId); Observable<OrderGoodsDetailList> getOrderGoodsDetailList(String orderId); Observable<OrderTake> orderTake(String orderId); } }
[ "1797484636@qq.com" ]
1797484636@qq.com
05e561a00dbe85022e5d1e84bc00043848c32ab9
54294d6cb821fa2797db7cb2738b2a8b1f0a292d
/src/Java0512/ex08_loopFor.java
281a893da64b7985bc0a0aa1ac11517b3d5a0723
[]
no_license
kimhyeongkyeom/nothing
d62bf678126db9e8f1e4b5374ec9507223855796
6bc7fcac816773b5af8ae9432451c5377e4c3b26
refs/heads/master
2023-03-15T10:59:04.640436
2020-06-22T01:04:34
2020-06-22T01:04:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
521
java
/* Date : 2020.05.12 Author : 구민성 Description : loopFor Version : 1.0 */ package Java0512; public class ex08_loopFor { public static void main(String[] args) { //안녕하세요 10번 출력 //반복문 for /* for(초기화식; 조건식; 증감식) { 반복할 내용 } */ //1에서 10까지의 합 int i; int sum = 0; for(i=1; i<=10; i++) { sum = sum+i; // sum += i; 와 같은 의미 } System.out.println("결과 : " + sum); } }
[ "1@1-PC" ]
1@1-PC
f92e2fda8ad1f6f53f2428f8bc37bacd80671b28
06e34596185c90f3c1cce7cbca5cfb4f2594782c
/xgen4j/src/test-gen/java/com/rodrigodev/xgen4j/test/generation_options/java8OptionalClassIsUsedWhenCorrespondingOptionIsSet/e1/e2/e3_1/E3_1Exception.java
18a88ac6be91f81f741e8cf045bb5af8f2f3e8a8
[ "MIT" ]
permissive
RodrigoQuesadaDev/XGen4J
3e45593c1de9f842b2e2de682bec6b59c34d5ab7
8d7791494521f54cbf8d89b5e12001e295cff3f4
refs/heads/master
2021-01-21T05:00:42.559899
2015-07-28T10:11:13
2015-07-28T10:11:13
39,287,751
0
0
null
null
null
null
UTF-8
Java
false
false
1,355
java
package com.rodrigodev.xgen4j.test.generation_options.java8OptionalClassIsUsedWhenCorrespondingOptionIsSet.e1.e2.e3_1; import com.rodrigodev.xgen4j.test.generation_options.java8OptionalClassIsUsedWhenCorrespondingOptionIsSet.e1.e2.E2Exception; import com.rodrigodev.xgen4j.test.generation_options.java8OptionalClassIsUsedWhenCorrespondingOptionIsSet.RootException; import com.rodrigodev.xgen4j.test.generation_options.java8OptionalClassIsUsedWhenCorrespondingOptionIsSet.ErrorCode; /** * Autogenerated by XGen4J on January 1, 0001. */ public class E3_1Exception extends E2Exception { public static final ExceptionType TYPE = new ExceptionType(); protected E3_1Exception(ErrorCode errorCode, String message) { super(errorCode, message); } protected E3_1Exception(ErrorCode errorCode, String message, Throwable cause) { super(errorCode, message, cause); } private static class ExceptionType extends RootException.ExceptionType { @Override protected RootException createException(ErrorCode errorCode, String message) { return new E3_1Exception(errorCode, message); } @Override protected RootException createException(ErrorCode errorCode, String message, Throwable cause) { return new E3_1Exception(errorCode, message, cause); } } }
[ "rodrigoquesada@gmail.com" ]
rodrigoquesada@gmail.com
b0c9a20d49bae086661ef1ef2257063b272c5f19
af846ab7ffc148cd3207f3e65cfb2dde6d92c767
/sparrow-search/sparrow-search-crawl/src/main/java/com/sparrow/collect/orm/named/DynaSqlParameterSource.java
ca2cb91d5e83ef06f457cd0b59445cd10348030e
[ "Apache-2.0" ]
permissive
aniu2002/myself-toolkit
aaf5f71948bb45d331b206d806de85c84bafadcc
aea640b4339ea24d7bfd32311f093560573635d3
refs/heads/master
2022-12-24T20:25:43.702167
2019-03-11T14:42:14
2019-03-11T14:42:14
99,811,298
1
0
Apache-2.0
2022-12-12T21:42:45
2017-08-09T13:26:46
Java
UTF-8
Java
false
false
1,115
java
package com.sparrow.collect.orm.named; import com.sparrow.collect.orm.SqlParameterValue; import com.sparrow.collect.orm.utils.JdbcUtil; import java.util.HashMap; import java.util.Map; public class DynaSqlParameterSource implements SqlParameterSource { final Map<String, Object> map = new HashMap<String, Object>(); public DynaSqlParameterSource() { } public DynaSqlParameterSource(String name, Object value) { this.map.put(name, value); } public void addValue(String name, Object value) { this.map.put(name, value); } public void addValue(String name, Object value, int sqlType) { SqlParameterValue v = new SqlParameterValue(sqlType, value); this.map.put(name, v); } @Override public int getSqlType(String paramName) { return JdbcUtil.getSqlType(map.get(paramName)); } @Override public Object getValue(String paramName) throws IllegalArgumentException { return map.get(paramName); } @Override public boolean hasValue(String paramName) { return map.containsKey(paramName); } }
[ "yuanzhengchu2002@163.com" ]
yuanzhengchu2002@163.com
24007c588dfe56ac7e3f78e7d5cd628418ca5235
b23f4fb8323a223abb26da107b589245142fce33
/Java编程思想【第4版】习题答案/initialization/DogTalk.java
d1adedab2bdccbf902ffd02050965cb2efc784cd
[]
no_license
leozhiyu/thinking-in-java
d9f61ccf6657026ae223c36aeb2a5e9a62c24b20
72440f4b4a11022adfa14dd839770843f59079db
refs/heads/master
2021-09-08T02:27:34.035030
2018-03-06T00:54:58
2018-03-06T00:54:58
112,142,580
1
0
null
null
null
null
UTF-8
Java
false
false
955
java
// initialization/DogTalk.java // TIJ4 Chapter Initialization, Exercise 5, page 167 /* Create a class with a default constructor (one that takes no arguments) that * prints a message. Create an object of this class. */ class Dog { void bark() {System.out.println("quiet");} void bark(char c) {System.out.println("cawcaw");} void bark(byte b) {System.out.println("barkbark");} void bark(short s) {System.out.println("slurpslurp");} void bark(int i) {System.out.println("iyow");} void bark(long L) {System.out.println("lalala");} void bark(float f) {System.out.println("fififoofum");} void bark(double d) {System.out.println("dodo");} } public class DogTalk { public static void main(String[] args) { Dog d = new Dog(); char c = 'c'; byte b = 0; short s = 0; d.bark(); d.bark((char)c); d.bark((byte)b); d.bark((short)s); d.bark(1); d.bark(1L); d.bark(1.0f); d.bark(1.0); } }
[ "18779775257@163.com" ]
18779775257@163.com
8242e5c99945c342a0937cfcc1880429a5839815
9230d7aa46164a43308e4ccf3d5b50ffccabbf67
/app/src/main/java/com/example/administrator/phanmemqlbhonline/model/Item_DanhSachHang.java
b25af94c8788205dc17ff3d4a481e60457299058
[]
no_license
thinhkaku/appbanhang
8ba8b20e440cb458ebd986baea7d1555c6bc570d
0318ecd4fb0bde13d5d04fa8c117a93216759357
refs/heads/master
2021-04-06T03:04:01.233141
2018-03-12T13:09:10
2018-03-12T13:09:10
124,890,284
0
0
null
null
null
null
UTF-8
Java
false
false
2,592
java
package com.example.administrator.phanmemqlbhonline.model; import java.io.Serializable; /** * Created by Administrator on 11/1/2017. */ public class Item_DanhSachHang implements Serializable { private int id; private String hinh; private String tenSp; private int giasp; private int soluong; private String mauSac; private String sizeSp; private String tenKhachHang; private String sDTKhachHang; private String diaChiKhachHang; public Item_DanhSachHang(int id,String hinh, String tenSp, int giasp, int soluong, String mauSac, String sizeSp, String tenKhachHang, String sDTKhachHang, String diaChiKhachHang) { this.hinh = hinh; this.id=id; this.tenSp = tenSp; this.giasp = giasp; this.soluong = soluong; this.mauSac = mauSac; this.sizeSp = sizeSp; this.tenKhachHang = tenKhachHang; this.sDTKhachHang = sDTKhachHang; this.diaChiKhachHang = diaChiKhachHang; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getHinh() { return hinh; } public void setHinh(String hinh) { this.hinh = hinh; } public String getTenSp() { return tenSp; } public void setTenSp(String tenSp) { this.tenSp = tenSp; } public int getGiasp() { return giasp; } public void setGiasp(int giasp) { this.giasp = giasp; } public int getSoluong() { return soluong; } public void setSoluong(int soluong) { this.soluong = soluong; } public String getMauSac() { return mauSac; } public void setMauSac(String mauSac) { this.mauSac = mauSac; } public String getSizeSp() { return sizeSp; } public void setSizeSp(String sizeSp) { this.sizeSp = sizeSp; } public String getTenKhachHang() { return tenKhachHang; } public void setTenKhachHang(String tenKhachHang) { this.tenKhachHang = tenKhachHang; } public String getsDTKhachHang() { return sDTKhachHang; } public void setsDTKhachHang(String sDTKhachHang) { this.sDTKhachHang = sDTKhachHang; } public String getDiaChiKhachHang() { return diaChiKhachHang; } public void setDiaChiKhachHang(String diaChiKhachHang) { this.diaChiKhachHang = diaChiKhachHang; } }
[ "you@example.com" ]
you@example.com
89c1fcdeda838e7b414aea365ed4dd51106d8e74
d55fd3ab68565cf8818a4b29b7d4bcc46bb947c6
/server/src/main/java/com/autonomous/pm/service/restful/RateService.java
e8801f799a92b3fc0490c3827a5d996322adfa68
[]
no_license
VAIP-foundation/autonomous-driving-control
1ed1fe77bf4284e80a2aa0c71c054cde503ec3c3
7cbe5aef7fe6a5f018f4780cd6e3ccb7dd2d5006
refs/heads/master
2023-03-05T23:29:40.470438
2021-02-15T07:00:12
2021-02-15T07:00:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
403
java
package com.autonomous.pm.service.restful; import java.util.List; import com.autonomous.pm.model.Do.TCsSurveyHst; import com.autonomous.pm.model.Dto.ReqAdminRate; import com.autonomous.pm.model.Dto.ReqFromToDay; import com.autonomous.pm.model.Dto.ResAdminRate; public interface RateService { List<ResAdminRate> getAdminRateLs(ReqAdminRate reqParam); int postAdminRateLs(TCsSurveyHst reqParam); }
[ "richard@aivision.co.kr" ]
richard@aivision.co.kr
291f6da50b0d1ab2373fd867bcb6127c72a4adf2
3dcbf4da0aedbcaebaa902b96dd149221bb8fb5f
/solar-dashboard/src/test/java/com/mss/solar/dashboard/test/DriverServiceTest.java
b941123d896eccca506911817abb56d771c85070
[]
no_license
bharathichikkala/master
5d4c594aa8d9fd44d36c58464c9705998ea1a21f
b04c0d2eaf829416232686e63352bd5a88c484eb
refs/heads/master
2023-01-21T13:52:10.502961
2019-09-30T08:36:37
2019-09-30T08:36:37
132,092,849
1
1
null
2023-01-19T20:28:47
2018-05-04T05:41:29
JavaScript
UTF-8
Java
false
false
7,947
java
package com.mss.solar.dashboard.test; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; import com.mss.solar.dashboard.SolarDashboardApplicationTests; import com.mss.solar.dashboard.domain.Driver; import com.mss.solar.dashboard.repos.DriverRepository; import net.minidev.json.JSONObject; import net.minidev.json.parser.JSONParser; public class DriverServiceTest extends SolarDashboardApplicationTests { @Autowired private WebApplicationContext wac; @Autowired private DriverRepository driverRepo; private MockMvc mockMvc; @Before public void setup() { this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); } /** * Junit test case for getAllDrivers * * @throws Exception */ @Test public void getAllDriversTest() throws Exception { Integer id = addDriver(); this.mockMvc.perform(get("/api/drivers/getDrivers")).andExpect(status().isOk()) .andExpect(content().contentType("application/json;charset=UTF-8")) .andExpect(jsonPath("$.data").exists()).andExpect(jsonPath("$.code").value(0)); deleteDriver(id); } /** * Junit test case for addDriver * * @throws Exception */ @Test public void addDriverTest() throws Exception { JSONObject driverData = new JSONObject(); driverData.put("dateOfBirth", "2015-03-17T06:06:51.365Z"); driverData.put("firstName", "bharathi"); driverData.put("lastName", "chikkala"); driverData.put("email", "bharathich123@metanoiasolutions.net"); driverData.put("phoneNumber", "9999955555"); driverData.put("password", "Test@123"); MvcResult mvcResult = mockMvc .perform(post("/api/drivers/addDriver").contentType("application/json;charset=UTF-8") .content(TestUtil.convertObjectToJsonString(driverData))) .andExpect(status().isOk()).andExpect(content().contentType("application/json;charset=UTF-8")) .andExpect(jsonPath("$.code").value(0)).andReturn(); String result = mvcResult.getResponse().getContentAsString(); JSONParser parser = new JSONParser(); JSONObject json = (JSONObject) parser.parse(result); JSONObject jObj = new JSONObject(json); String dataResult = jObj.getAsString("data"); JSONObject jsonData = (JSONObject) parser.parse(dataResult); JSONObject dataObj = new JSONObject(jsonData); Integer id = (Integer) dataObj.getAsNumber("id"); deleteDriver(id); } /** * Junit test case for deleteDriver * * @throws Exception * * @PathParam id */ @Test public void deleteDriverTest() throws Exception { Integer id = addDriver(); this.mockMvc.perform(delete("/api/drivers/deleteDriver/{id}", id)).andExpect(status().isOk()) .andExpect(content().contentType("application/json;charset=UTF-8")) .andExpect(jsonPath("$.code").value(0)); } /** * Junit test case for updateDriver * * @throws Exception */ @Test public void updateDriverTest() throws Exception { Integer id = addDriver(); JSONObject driverData = new JSONObject(); driverData.put("id", id); driverData.put("dateOfBirth", "2015-03-17T06:06:51.365Z"); driverData.put("firstName", "bharathich"); driverData.put("lastName", "chikkala"); driverData.put("email", "bharathich123@metanoiasolutions.net"); driverData.put("phoneNumber", "9999955555"); driverData.put("password", "Test@123"); this.mockMvc .perform(put("/api/drivers/updateDriver").content((TestUtil.convertObjectToJsonString(driverData))) .contentType("application/json;charset=UTF-8")) .andExpect(status().isOk()).andExpect(content().contentType("application/json;charset=UTF-8")); deleteDriver(id); } /** * Junit test case for getDriverById * * @throws Exception * * @PathParam id */ @Test public void getDriverByIdTest() throws Exception { Integer id = addDriver(); this.mockMvc.perform(get("/api/drivers/getDriver/{id}", id)).andExpect(status().isOk()) .andExpect(content().contentType("application/json;charset=UTF-8")) .andExpect(jsonPath("$.data").exists()).andExpect(jsonPath("$.code").value(0)); deleteDriver(id); } /** * Junit test case for updateDriverById * * @throws Exception */ @Test public void updateDriverByIdTest() throws Exception { Integer id = addDriver(); this.mockMvc .perform(put("/api/drivers/updateDriver/{id}/222.222/33.3333/", id) .contentType("application/json;charset=UTF-8")) .andExpect(status().isOk()).andExpect(content().contentType("application/json;charset=UTF-8")) .andExpect(jsonPath("$.data").exists()).andExpect(jsonPath("$.code").value(0)); deleteDriver(id); } /** * Junit test case for getDriverByUserId * * @throws Exception * * @PathParam userid */ @Test public void getDriverByUserIdTest() throws Exception { Integer id = addDriver(); long driverId = (long) id; Driver driver = driverRepo.findById(driverId); long userId = driver.getUser().getId(); this.mockMvc.perform(get("/api/drivers/getDriverByUserID/{userId}", userId)).andExpect(status().isOk()) .andExpect(content().contentType("application/json;charset=UTF-8")) .andExpect(jsonPath("$.data").exists()).andExpect(jsonPath("$.code").value(0)); deleteDriver(id); } /** * addDriver method * * @throws Exception */ public Integer addDriver() throws Exception { JSONObject driverData = new JSONObject(); driverData.put("dateOfBirth", "2015-03-17T06:06:51.365Z"); driverData.put("firstName", "bharathi"); driverData.put("lastName", "chikkala"); driverData.put("email", "bharathich123@metanoiasolutions.net"); driverData.put("phoneNumber", "9999955555"); driverData.put("password", "Test@123"); driverData.put("latitude", "22.2222"); driverData.put("longitude", "33.3333"); MvcResult mvcResult = mockMvc.perform(post("/api/drivers/addDriver") .contentType("application/json;charset=UTF-8").content(TestUtil.convertObjectToJsonString(driverData))) .andReturn(); String result = mvcResult.getResponse().getContentAsString(); JSONParser parser = new JSONParser(); JSONObject json = (JSONObject) parser.parse(result); JSONObject jObj = new JSONObject(json); String dataResult = jObj.getAsString("data"); JSONObject jsonData = (JSONObject) parser.parse(dataResult); JSONObject dataObj = new JSONObject(jsonData); Integer id = (Integer) dataObj.getAsNumber("id"); return id; } /** * method for deleteDriver * * @throws Exception * * @PathParam id */ public void deleteDriver(Integer id) throws Exception { this.mockMvc.perform(delete("/api/drivers/deleteDriver/{id}", id)).andExpect(status().isOk()) .andExpect(content().contentType("application/json;charset=UTF-8")) .andExpect(jsonPath("$.code").value(0)); } /** * Junit test case for getDriverByVendorNbr * * @throws Exception * * @PathParam vendorNbr */ @Test public void getDriverByVendorNbrTest() throws Exception { this.mockMvc.perform(get("/api/drivers/getDriversByVendorNum/000000")).andExpect(status().isOk()) .andExpect(content().contentType("application/json;charset=UTF-8")); } }
[ "bchikkala@metanoiasolutions.net" ]
bchikkala@metanoiasolutions.net
ca3c2fc2ee7d4b5580d98bc76f5f96e724aee6f2
31e1ef2dab5cce50ec776329ef7b62d2088a654c
/RuleLoaders/Loaders-Common/src/main/java/edu/asu/bmi/hed/repo/converters/RuleProviderFactory.java
178c18a8ecc09261fa4dc3601b286ea43071a083
[]
no_license
sotty/SemanticQueries
18dd03ef7b5bb1e5619da936285bb513f6cce47f
bb950e6fc4c0e4844949cd57c196f856e83951e4
refs/heads/master
2021-01-20T10:13:52.836708
2015-04-12T02:23:53
2015-04-12T02:23:53
26,246,145
0
0
null
null
null
null
UTF-8
Java
false
false
404
java
package edu.asu.bmi.hed.repo.converters; public class RuleProviderFactory { public static RuleProvider getProvider( Class callerType ) { if ( ArtifactLoader.class.isAssignableFrom( callerType ) ) { return new RuleFolderHunter(); } else { throw new UnsupportedOperationException( "No way to create a provider for class " + callerType ); } } }
[ "dsotty@gmail.com" ]
dsotty@gmail.com
4897f26b1057d3a444515df48927d1f5b449db22
f6ad7caefc36c7dce303a65f3a2c7ce3352992e6
/src/main/java/nl/jqno/equalsverifier/internal/reflection/FieldAccessor.java
24ef39545eb240c18c1993639d1d87c786b9de95
[ "Apache-2.0" ]
permissive
khmarbaise/equalsverifier
cf9ed8d3d19ed2fc2d9b7759e9cda1a521b8f3b8
60506d778c319f3c0095a4357ebd8c651d09386c
refs/heads/master
2022-06-20T08:24:17.460201
2020-05-10T11:07:02
2020-05-10T11:12:00
262,777,653
0
0
Apache-2.0
2020-05-10T12:02:12
2020-05-10T12:02:12
null
UTF-8
Java
false
false
6,902
java
package nl.jqno.equalsverifier.internal.reflection; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import nl.jqno.equalsverifier.internal.exceptions.ReflectionException; import nl.jqno.equalsverifier.internal.prefabvalues.PrefabValues; import nl.jqno.equalsverifier.internal.prefabvalues.TypeTag; /** Provides reflective access to one field of an object. */ public class FieldAccessor { private final Object object; private final Field field; /** * Constructor. * * @param object The object that contains the field we want to access. * @param field A field of object. */ public FieldAccessor(Object object, Field field) { this.object = object; this.field = field; } /** @return The object that contains the field. */ public Object getObject() { return object; } /** @return The field itself. */ public Field getField() { return field; } /** @return The field's type. */ public Class<?> getFieldType() { return field.getType(); } /** @return The field's name. */ public String getFieldName() { return field.getName(); } /** @return Whether the field is of a primitive type. */ public boolean fieldIsPrimitive() { return getFieldType().isPrimitive(); } /** @return Whether the field is marked with the final modifier. */ public boolean fieldIsFinal() { return Modifier.isFinal(field.getModifiers()); } /** @return Whether the field is marked with the static modifier. */ public boolean fieldIsStatic() { return Modifier.isStatic(field.getModifiers()); } /** @return Whether the field is marked with the transient modifier. */ public boolean fieldIsTransient() { return Modifier.isTransient(field.getModifiers()); } /** @return Whether the field is an enum with a single value. */ public boolean fieldIsEmptyOrSingleValueEnum() { Class<?> type = field.getType(); return type.isEnum() && type.getEnumConstants().length <= 1; } /** * Tries to get the field's value. * * @return The field's value. * @throws ReflectionException If the operation fails. */ @SuppressFBWarnings( value = "DP_DO_INSIDE_DO_PRIVILEGED", justification = "Only called in test code, not production.") public Object get() { field.setAccessible(true); try { return field.get(object); } catch (IllegalAccessException e) { throw new ReflectionException(e); } } /** * Tries to set the field to the specified value. * * <p>Includes static fields but ignores fields that can't be modified reflectively. * * @param value The value that the field should get. * @throws ReflectionException If the operation fails. */ public void set(Object value) { modify(() -> field.set(object, value), true); } /** * Tries to make the field null. Ignores static fields and fields that can't be modified * reflectively. * * @throws ReflectionException If the operation fails. */ public void defaultField() { modify(this::setFieldToDefault, false); } /** * Tries to make the field null. Includes static fields but ignores fields that can't be * modified reflectively. * * @throws ReflectionException If the operation fails. */ public void defaultStaticField() { modify(this::setFieldToDefault, true); } private void setFieldToDefault() throws IllegalAccessException { Class<?> type = field.getType(); if (type == boolean.class) { field.setBoolean(object, false); } else if (type == byte.class) { field.setByte(object, (byte) 0); } else if (type == char.class) { field.setChar(object, '\u0000'); } else if (type == double.class) { field.setDouble(object, 0.0); } else if (type == float.class) { field.setFloat(object, 0.0f); } else if (type == int.class) { field.setInt(object, 0); } else if (type == long.class) { field.setLong(object, 0); } else if (type == short.class) { field.setShort(object, (short) 0); } else { field.set(object, null); } } /** * Copies field's value to the corresponding field in the specified object. * * <p>Ignores static fields and fields that can't be modified reflectively. * * @param to The object into which to copy the field. * @throws ReflectionException If the operation fails. */ public void copyTo(Object to) { modify(() -> field.set(to, field.get(object)), false); } /** * Changes the field's value to something else. The new value will never be null. Other than * that, the precise value is undefined. * * <p>Ignores static fields and fields that can't be modified reflectively. * * @param prefabValues If the field is of a type contained within prefabValues, the new value * will be taken from it. * @param enclosingType A tag for the type that contains the field. Needed to determine a * generic type, if it has one.. * @throws ReflectionException If the operation fails. */ public void changeField(PrefabValues prefabValues, TypeTag enclosingType) { modify( () -> { Object newValue = prefabValues.giveOther( TypeTag.of(field, enclosingType), field.get(object)); field.set(object, newValue); }, false); } private void modify(FieldModifier modifier, boolean includeStatic) { if (!canBeModifiedReflectively()) { return; } if (!includeStatic && fieldIsStatic()) { return; } field.setAccessible(true); try { modifier.modify(); } catch (IllegalAccessException e) { throw new ReflectionException(e); } } @FunctionalInterface private interface FieldModifier { void modify() throws IllegalAccessException; } /** * Determines whether the field can be modified using reflection. * * @return Whether or not the field can be modified reflectively. */ public boolean canBeModifiedReflectively() { if (field.isSynthetic()) { return false; } int modifiers = field.getModifiers(); if (Modifier.isFinal(modifiers) && Modifier.isStatic(modifiers)) { return false; } return true; } }
[ "jan.ouwens@gmail.com" ]
jan.ouwens@gmail.com
6cad36013f88896c036ebf93c7d024bb4a24870c
d314f4b6ad9715b12ca05b0966e6095c7053c5a0
/core/src/gwtcog/core/mathutil/matrices/hessian/BasicHessian.java
92d5a214ff15d74866e6f3bd968ef3b7462efdb1
[]
no_license
MichielVdAnker/gwtcog
d2b46be0f27413e50b829b6d9cbcd16b5a2d2e54
795047ced68048e142561f7f4ad99a3dde9b63ee
refs/heads/master
2021-01-23T12:34:45.840098
2013-05-11T14:27:40
2013-05-11T14:27:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,324
java
/* * Encog(tm) Core v3.2 - Java Version * http://www.heatonresearch.com/encog/ * https://github.com/encog/encog-java-core * Copyright 2008-2013 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 gwtcog.core.mathutil.matrices.hessian; import gwtcog.core.mathutil.matrices.Matrix; import gwtcog.core.ml.data.MLDataSet; import gwtcog.core.neural.flat.FlatNetwork; import gwtcog.core.neural.networks.BasicNetwork; import gwtcog.core.util.EngineArray; /** * Some basic code used to calculate Hessian matrixes. */ public abstract class BasicHessian implements ComputeHessian { /** * The training data that provides the ideal values. */ protected MLDataSet training; /** * The neural network that we would like to train. */ protected BasicNetwork network; /** * The sum of square error. */ protected double sse; /** * The gradients of the Hessian. */ protected double[] gradients; /** * The Hessian matrix. */ protected Matrix hessianMatrix; /** * The Hessian 2d array. */ protected double[][] hessian; /** * The derivatives. */ protected double[] derivative; /** * The flat network. */ protected FlatNetwork flat; /** * {@inheritDoc} */ public void init(BasicNetwork theNetwork, MLDataSet theTraining) { int weightCount = theNetwork.getStructure().getFlat().getWeights().length; this.flat = theNetwork.getFlat(); this.training = theTraining; this.network = theNetwork; this.gradients = new double[weightCount]; this.hessianMatrix = new Matrix(weightCount,weightCount); this.hessian = this.hessianMatrix.getData(); this.derivative = new double[weightCount]; } /** * {@inheritDoc} */ public double[] getGradients() { return gradients; } /** * {@inheritDoc} */ public Matrix getHessianMatrix() { return hessianMatrix; } /** * {@inheritDoc} */ public double[][] getHessian() { return hessian; } /** * {@inheritDoc} */ public void clear() { EngineArray.fill(this.gradients, 0); this.hessianMatrix.clear(); } /** * {@inheritDoc} */ public double getSSE() { return sse; } /** * Update the Hessian, sum's with what is in the Hessian already. Call clear to clear out old Hessian. * @param d */ public void updateHessian(double[] d) { // update the hessian int weightCount = this.network.getFlat().getWeights().length; for(int i=0;i<weightCount;i++) { for(int j=0;j<weightCount;j++) { this.hessian[i][j]+=2*d[i]*d[j]; } } } }
[ "michiel.van.den.anker@gmail.com" ]
michiel.van.den.anker@gmail.com
57d0b3afe417a2c809432695d4457f4aade4f363
4bfedfe1ef1cd14f03cfaa2b76a54cc307cb75a3
/cs179e/cs179e/Compiler/src/lesani/image/segmentation/deformable/serial/base/MultiStepMeshProcessor.java
b2cbe8afe9a06e98a076acc23d03a4e8edd36b14
[]
no_license
XiaoLi0614/Secure_Partition
ad2c2b57c2eeb876bbc76214af2b09fbcd41acd9
5e5c519b9a9f2e924d647507d0049a8b2a38b268
refs/heads/master
2023-08-22T01:06:59.272088
2021-09-21T19:06:27
2021-09-21T19:06:27
303,326,552
0
0
null
null
null
null
UTF-8
Java
false
false
1,880
java
package lesani.image.segmentation.deformable.serial.base; import lesani.image.core.image.GSImage; import lesani.image.core.op.core.Imposer; import lesani.image.gui.environment.MultiStepProcessor; import lesani.image.segmentation.deformable.serial.Segmenter; import lesani.image.segmentation.deformable.serial.mesh.Node; import lesani.image.segmentation.deformable.serial.mesh.NodePointer; /** * Created by IntelliJ IDEA. * User: lesani * Date: Mar 15, 2010 * Time: 6:48:37 PM */ public abstract class MultiStepMeshProcessor extends MeshProcessor implements MultiStepProcessor { private static final int POINT_RADIUS = Segmenter.POINT_RADIUS; protected MultiStepMeshProcessor() { } protected MultiStepMeshProcessor(GSImage image, NodePointer first) { super(image, first); } @Override public void setImage(GSImage image) { super.setImage(image); } public GSImage current() { final int width = image.getWidth(); final int height = image.getHeight(); GSImage modelImage = new GSImage(width, height); Node node = first.node; do { // System.out.println("Drawing"); modelImage.drawCircle( POINT_RADIUS, node.getX(), node.getY(), 255); modelImage.drawLine( node.getX(), node.next.getX(), node.getY(), node.next.getY(), 255); node = node.next; } while (node != first.node); /* if (!forced) return AdderScaler.instance().compute(image, modelImage); else return modelImage; */ // return AdderScaler.instance().compute(image, modelImage); return Imposer.process(image, modelImage); } @Override public void process() { step(); } }
[ "xli289@ucr.edu" ]
xli289@ucr.edu
5f6a4acb858be2d402bba7be455ed51c04320141
a3e9de23131f569c1632c40e215c78e55a78289a
/alipay/alipay_sdk/src/main/java/com/alipay/api/domain/AlipayOpenServicemarketYcstestQueryModel.java
1a0e627d59cc60c4f3133b46be5dcfc832ee7095
[]
no_license
P79N6A/java_practice
80886700ffd7c33c2e9f4b202af7bb29931bf03d
4c7abb4cde75262a60e7b6d270206ee42bb57888
refs/heads/master
2020-04-14T19:55:52.365544
2019-01-04T07:39:40
2019-01-04T07:39:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,368
java
package com.alipay.api.domain; import java.util.Date; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 时劼的测试api * * @author auto create * @since 1.0, 2018-10-18 18:56:08 */ public class AlipayOpenServicemarketYcstestQueryModel extends AlipayObject { private static final long serialVersionUID = 8689662561544979387L; /** * aaaa */ @ApiField("in_1") private String in1; /** * 222 */ @ApiField("in_2") private Boolean in2; /** * 333 */ @ApiField("in_3") private Date in3; /** * 444 */ @ApiField("in_4") private Long in4; /** * 55 */ @ApiField("in_5") private String in5; /** * 66666 */ @ApiField("in_6") private XwbTestData in6; public String getIn1() { return this.in1; } public void setIn1(String in1) { this.in1 = in1; } public Boolean getIn2() { return this.in2; } public void setIn2(Boolean in2) { this.in2 = in2; } public Date getIn3() { return this.in3; } public void setIn3(Date in3) { this.in3 = in3; } public Long getIn4() { return this.in4; } public void setIn4(Long in4) { this.in4 = in4; } public String getIn5() { return this.in5; } public void setIn5(String in5) { this.in5 = in5; } public XwbTestData getIn6() { return this.in6; } public void setIn6(XwbTestData in6) { this.in6 = in6; } }
[ "jiaojianjun1991@gmail.com" ]
jiaojianjun1991@gmail.com
02f90c60ad84424939aeb96d50853bb29496d688
50c5528e1ef3a17e9ca30cc4491a185dcbc73b97
/java/org/apache/tomcat/dbcp/dbcp2/datasources/PooledConnectionManager.java
de24e358814dd6f993b970ee663a4fdd9fa386b4
[ "bzip2-1.0.6", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "CPL-1.0", "CDDL-1.0", "Zlib", "EPL-1.0", "LZMA-exception" ]
permissive
jiafangtao/tomcat
de745a2fe74a0d29408e212613f8dcd19b32acb0
578aab06ddf096a03be4555352db8f57801c12a3
refs/heads/annotated_8.5.x
2022-06-08T13:15:48.469882
2021-12-27T14:57:10
2021-12-27T14:57:10
147,180,838
0
0
Apache-2.0
2018-09-03T09:16:56
2018-09-03T09:16:56
null
UTF-8
Java
false
false
2,197
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.tomcat.dbcp.dbcp2.datasources; import java.sql.SQLException; import javax.sql.PooledConnection; /** * Methods to manage PoolableConnections and the connection pools that source them. * * @since 2.0 */ interface PooledConnectionManager { /** * Closes the PooledConnection and remove it from the connection pool to which it belongs, adjusting pool counters. * * @param pc * PooledConnection to be invalidated * @throws SQLException * if an SQL error occurs closing the connection */ void invalidate(PooledConnection pc) throws SQLException; // /** // * Sets the database password used when creating connections. // * // * @param password password used when authenticating to the database // * @since 3.0.0 // */ // void setPassword(char[] password); /** * Sets the database password used when creating connections. * * @param password * password used when authenticating to the database */ void setPassword(String password); /** * Closes the connection pool associated with the given user. * * @param userName * user name * @throws SQLException * if an error occurs closing idle connections in the pool */ void closePool(String userName) throws SQLException; }
[ "markt@apache.org" ]
markt@apache.org
50bfadb20ca566b182f999ce86877275506d1a18
f1a85ae8b9d5d9d9a848c4c8d9c2410b9726e194
/driver/app/src/main/java/com/yaoguang/driver/order/chooseaddress/PutOrderAddressFragment.java
17053c1dd1e826a1ef589930340c78aa162d6db1
[]
no_license
P79N6A/as
45dc7c76d58cdc62e3e403c9da4a1c16c4234568
a57ee2a3eb2c73cc97c3fb130b8e389899b19d99
refs/heads/master
2020-04-20T05:55:10.175425
2019-02-01T08:49:15
2019-02-01T08:49:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,201
java
package com.yaoguang.driver.order.chooseaddress; import android.databinding.DataBindingUtil; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.amap.api.maps.model.LatLng; import com.yaoguang.appcommon.common.utils.PhoneUtils; import com.yaoguang.common.common.AppClickUtil; import com.yaoguang.common.common.SpanUtils; import com.yaoguang.common.common.ULog; import com.yaoguang.common.common.UiUtils; import com.yaoguang.driver.databinding.ToolbarCommonBinding; import com.yaoguang.driver.R; import com.yaoguang.driver.base.baseview.BaseFragmentListV2; import com.yaoguang.driver.databinding.FragmentChooseOrderAddressBinding; import com.yaoguang.driver.order.chooseaddress.adapter.PutOrderAddressAdapter; import com.yaoguang.driver.order.map.MapFragment; import com.yaoguang.greendao.entity.InfoPutorderPlace; import com.yaoguang.greendao.entity.Order; import java.util.ArrayList; import static com.yaoguang.driver.order.child.OrderChildFragment.ORDER_ACCEPT; /** * 选择订单存放地点 * Created by wly on 2017/12/28 0028. */ public class PutOrderAddressFragment extends BaseFragmentListV2<InfoPutorderPlace, PutOrderAddressPresenter, FragmentChooseOrderAddressBinding> { public static final String ORDER = "order"; public static final String POSITION = "position"; public static final String PLACE_ID = "place_id"; private static String INFO_PUT_ORDER_PLACES = "info_put_order_places"; PutOrderAddressAdapter mPutOrderAddressAdapter; private ArrayList<InfoPutorderPlace> mInfoPutorderPlaces; private Order mOrder; private int mPosition; private String mPlaceId; MapFragment mMapFragment; @Override public void onCreate(@Nullable Bundle savedInstanceState) { if (getArguments() != null && getArguments().getParcelable(ORDER) != null) { mOrder = getArguments().getParcelable(ORDER); mPosition = getArguments().getInt(POSITION); mInfoPutorderPlaces = getArguments().getParcelableArrayList(INFO_PUT_ORDER_PLACES); } super.onCreate(savedInstanceState); } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { if (savedInstanceState != null) { mOrder = savedInstanceState.getParcelable(ORDER); mPosition = savedInstanceState.getInt(POSITION); mInfoPutorderPlaces = savedInstanceState.getParcelableArrayList(INFO_PUT_ORDER_PLACES); } return super.onCreateView(inflater, container, savedInstanceState); } @Override protected void initView(View view) { mToolbarCommonBinding = DataBindingUtil.bind(view.findViewById(R.id.toolbarCommon)); mToolbarCommonBinding.toolbarTitle.setText("选择放单地点"); mDataBinding.tvAlert.setText(new SpanUtils().append("*") .setForegroundColor(UiUtils.getColor(R.color.orange500) ).append(" 选择放单地点后方可完成接单") .setForegroundColor(UiUtils.getColor(R.color.black666)) .create()); mPutOrderAddressAdapter = new PutOrderAddressAdapter(); initSwipeRecyclerView(view, mPutOrderAddressAdapter); recyclerView.setNestedScrollingEnabled(false); // 加载地图 mMapFragment = MapFragment.newInstance(false); getChildFragmentManager().beginTransaction().add(R.id.fragmentLayout, mMapFragment).show(mMapFragment).commit(); setData(mInfoPutorderPlaces); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putParcelable(ORDER, mOrder); outState.putParcelableArrayList(INFO_PUT_ORDER_PLACES, mInfoPutorderPlaces); outState.putInt(POSITION, mPosition); } @Override protected int getLayoutId() { return R.layout.fragment_choose_order_address; } @Override protected void initListener() { mToolbarCommonBinding.imgReturn.setOnClickListener(v -> pop()); // 打开详情 暂时不要 mPutOrderAddressAdapter.setOnItemClickListener((itemView, item, position) -> { mPlaceId = ((InfoPutorderPlace) item).getId(); // start(PutOrderAddressDetailFragment.newInstance(place)); }); // 显示地址地图 mPutOrderAddressAdapter.setComeback(new PutOrderAddressAdapter.Comeback() { @Override public void showLocation(LatLng latLng, String name, String address) { // 添加图标并移动 mMapFragment.movePoint(latLng); mMapFragment.addMarkersToMap(latLng, name, address); } @Override public void myLocation(InfoPutorderPlace item) { // 移到我的位置 mMapFragment.moveMyLocation(); } // 思明说暂时不用监听电话 @Override public void callMobile(InfoPutorderPlace place) { if (AppClickUtil.isDuplicateClick() || TextUtils.isEmpty(place.getPhone())) return; // 打电话 PhoneUtils.nodeCallPhone(getActivity(), getFragmentManager(), new String[]{place.getPhone()}); } }); // 确认存放点 mDataBinding.btnComplete.setOnClickListener(v -> { // 返回订单页并设置接受订单 Bundle bundle = new Bundle(); bundle.putParcelable(ORDER, mOrder); bundle.putInt(POSITION, mPosition); bundle.putString(PLACE_ID, mPlaceId); setFragmentResult(ORDER_ACCEPT, bundle); pop(); }); } @Override public void onDestroyView() { super.onDestroyView(); mMapFragment.onDestroyView(); } /** * 打开存放点 * * @param order 订单 * @param infoPutorderPlaces 存放点数据 * @param position 订单列表位置 * @return fragment */ public static PutOrderAddressFragment newInstance(Order order, ArrayList<InfoPutorderPlace> infoPutorderPlaces, int position) { Bundle args = new Bundle(); args.putParcelable(ORDER, order); args.putParcelableArrayList(INFO_PUT_ORDER_PLACES, infoPutorderPlaces); args.putInt(POSITION, position); PutOrderAddressFragment fragment = new PutOrderAddressFragment(); fragment.setArguments(args); return fragment; } public void setData(ArrayList<InfoPutorderPlace> infoPutorderPlaces) { ULog.d("choose order address set data size = " + infoPutorderPlaces.size()); mPutOrderAddressAdapter.appendToList(infoPutorderPlaces); mPutOrderAddressAdapter.notifyDataSetChanged(); mDataBinding.tvAlert.setVisibility(View.VISIBLE); } @Override public void refreshData() { } }
[ "254191389@qq.com" ]
254191389@qq.com
8e456f03603b4d40e9515369ba25a3da39a03524
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/kotlin/g/a/k.java
ab5db92946b9b1c28ec98c42f40c5a5c74a1de97
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
1,079
java
package kotlin.g.a; import kotlin.Metadata; import kotlin.d; @Metadata(d1={""}, d2={"Lkotlin/jvm/functions/Function18;", "P1", "P2", "P3", "P4", "P5", "P6", "P7", "P8", "P9", "P10", "P11", "P12", "P13", "P14", "P15", "P16", "P17", "P18", "R", "Lkotlin/Function;", "invoke", "p1", "p2", "p3", "p4", "p5", "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", "p16", "p17", "p18", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "kotlin-stdlib"}, k=1, mv={1, 5, 1}) public abstract interface k<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> extends d<R> {} /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes3.jar * Qualified Name: kotlin.g.a.k * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
951abad72ce046c80be7233adb12d52de6acac4f
710f0a0d5d829372a358b2959b50cebf3a56ce1b
/plugins/analyzer-plugin-api/src/main/java/org/wickedsource/coderadar/analyzer/api/SourceCodeFileAnalyzerPlugin.java
201ffbe7e2e7b8dd436b796fe7a8173e44a1d1fe
[ "MIT" ]
permissive
matthiasbalke/coderadar
6262b156f0e5f01cd7191d0efb931f567feeec19
9960ff7463e00ad301bffab2f98176323c753599
refs/heads/master
2020-12-24T10:03:20.151365
2016-10-19T21:10:42
2016-10-19T21:10:42
61,663,646
0
0
null
2016-06-21T20:06:55
2016-06-21T20:06:55
null
UTF-8
Java
false
false
742
java
package org.wickedsource.coderadar.analyzer.api; /** * Interface for analyzer plugins that analyze source code files. */ public interface SourceCodeFileAnalyzerPlugin extends AnalyzerPlugin { /** * Returns a filter that defines which files the analyzer is interested in. Only the files that pass this filter * will be passed into analyzeFile(). * * @return a filter defining which files the analyzer wants to analyze. */ AnalyzerFileFilter getFilter(); /** * Analyzes a single file. * * @param fileContent the content of the file. * @return a set of metric values calculated for the given file. */ FileMetrics analyzeFile(byte[] fileContent) throws AnalyzerException; }
[ "tom.hombergs@gmail.com" ]
tom.hombergs@gmail.com
aeedbb3a66aaf3187eda38a3fa93880b3ee1d6a0
02001273d64d7f68f1628cbd581205d0788398d9
/app/src/main/java/com/example/ok2/ui/map/MapFragment.java
f8efa919db8b1359eb3f655b0944371e6520ba48
[]
no_license
jaapieaapie/terr-app
b62771bc3655b5088b8db745865787ead3170736
5347c91eb0a7dc11e45723a884a93fa125829fea
refs/heads/master
2020-12-18T13:27:46.703223
2020-01-21T17:44:13
2020-01-21T17:44:13
235,379,050
0
0
null
null
null
null
UTF-8
Java
false
false
1,618
java
package com.example.ok2.ui.map; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.Nullable; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProviders; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; import com.example.ok2.R; public class MapFragment extends Fragment implements OnMapReadyCallback { private GoogleMap mMap; private MapViewModel mapViewModel; public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mapViewModel = ViewModelProviders.of(this).get(MapViewModel.class); View root = inflater.inflate(R.layout.fragment_map, container, false); //AIzaSyCjEzyMwtM1b8tUbtBR4urMXmiwbI7QD9I return root; } @Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; // Add a marker in Sydney, Australia, and move the camera. LatLng sydney = new LatLng(-34, 151); mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney")); mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney)); } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
e94422cfdf1f2d20e07e9d3afd6dee89464f922d
39e0886a50567d83f81f0645a48cae0b557ca044
/Project/kindergartenapp/src/main/java/com/yijie/com/kindergartenapp/utils/ViewUtils.java
b1728ef692d564eca29e2e6a5a2aff30cfbf3f5c
[]
no_license
xiaobaichaosen/project
d2153fdcf0c0668587ba9d33391432e43260c2f4
230b9fc4a0ea2d3d193190c17c5a30a68a1c786d
refs/heads/master
2021-09-26T17:54:13.089290
2018-11-01T02:45:28
2018-11-01T02:45:28
115,373,077
0
0
null
null
null
null
UTF-8
Java
false
false
3,470
java
package com.yijie.com.kindergartenapp.utils; import android.app.ProgressDialog; import android.content.Context; import android.view.View; import com.lvfq.pickerview.TimePickerView; import com.yijie.com.kindergartenapp.R; import com.yijie.com.kindergartenapp.view.CommomDialog; import com.yijie.com.kindergartenapp.view.CustomDialog; import com.yijie.com.kindergartenapp.view.MyPopuList; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; public class ViewUtils { /** * 获取控件的高度 */ public static int getViewMeasuredHeight(View view) { calculateViewMeasure(view); return view.getMeasuredHeight(); } /** * 获取控件的宽度 */ public static int getViewMeasuredWidth(View view) { calculateViewMeasure(view); return view.getMeasuredWidth(); } /** * 测量控件的尺寸 */ private static void calculateViewMeasure(View view) { int w = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); int h = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); view.measure(w, h); } /** * 弹出底部滚轮选择 * * @param context * @param list * @param click */ public static void alertBottomWheelOption(final Context context, ArrayList<?> list, final OnWheelViewClick click) { MyPopuList myPopuList = new MyPopuList(context, (ArrayList<String>) list,click); myPopuList.show(); } /** * 弹出时间选择 * * @param context * @param type TimerPickerView 中定义的 选择时间类型 * @param format 时间格式化 * @param callBack 时间选择回调 */ public static void alertTimerPicker(Context context, TimePickerView.Type type, final String format, final TimerPickerCallBack callBack) { TimePickerView pvTime = new TimePickerView(context, type); //控制时间范围 // Calendar calendar = Calendar.getInstance(); // pvTime.setRange(calendar.get(Calendar.YEAR) - 20, calendar.get(Calendar.YEAR)); pvTime.setTime(new Date()); pvTime.setCyclic(true); pvTime.setCancelable(true); //时间选择后回调 pvTime.setOnTimeSelectListener(new TimePickerView.OnTimeSelectListener() { @Override public void onTimeSelect(Date date) { // tvTime.setText(getTime(date)); SimpleDateFormat sdf = new SimpleDateFormat(format); callBack.onTimeSelect(sdf.format(date)); } }); pvTime.setTextSize(16); //弹出时间选择器 pvTime.show(); } /** * 底部滚轮点击事件回调 */ public interface OnWheelViewClick { void onClick(View view, int postion); } /** * 时间选择回调 */ public interface TimerPickerCallBack { void onTimeSelect(String date); } public static ProgressDialog getProgressDialog(Context context){ ProgressDialog progressDialog=new ProgressDialog(context); progressDialog.setMessage("拼命加载中,请稍后。。。"); return progressDialog; } public static CustomDialog getCustomDialog (Context context){ CustomDialog progressDialog=new CustomDialog(context, R.style.CustomDialog); return progressDialog; } }
[ "hljqqhryd@163.com" ]
hljqqhryd@163.com
d7342c735534b4297237e75d0611dc2df1f60d5c
fd50ef565747ebf7cf8454bc3c5c9ded02c50da0
/spring-sms/src/main/java/util/sendSMS/SmsSender.java
e1b0f06de801a3b04f8517a33219060cdefeb7c4
[]
no_license
q258523454/spring-test
f145f5f14b74b3abbeb68ab900fbc227677ab2a6
8cb9824952525dcded69919a364c03d8f150e0b7
refs/heads/master
2022-03-09T10:31:16.032282
2022-02-22T07:05:55
2022-02-22T07:05:55
156,847,980
0
0
null
null
null
null
UTF-8
Java
false
false
211
java
package util.sendSMS; /** * Created By * * @author : zhangj * @date : 2019-01-25 */ public interface SmsSender { boolean sendSMS(String telephone, String code, String timeout) throws Exception; }
[ "258523454@qq.com" ]
258523454@qq.com
5fe2667a009c30b187221b154afb20442df46954
e78524f7bde2dc64056a7173982fc49146cb06ee
/apps/arcgis-runtime-samples-android/GeometryEditor/src/main/java/com/esri/arcgis/android/samples/geometryeditor/ConfirmDiscardDialogFragment.java
d0e74d309a9e30e3e90550c8b7feb1cfa06afea2
[ "Apache-2.0" ]
permissive
ben-kenobi/android_lagacy
90b417538a94c1643ef8b70998c478ec508eb217
ecaf31f82a8245f9c0a3702870cfa84ac747b6e1
refs/heads/master
2020-12-24T08:08:36.967953
2017-06-06T16:12:21
2017-06-06T16:12:21
73,343,156
1
0
null
null
null
null
UTF-8
Java
false
false
2,164
java
/* Copyright 2015 Esri * * 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.esri.arcgis.android.samples.geometryeditor; import android.app.DialogFragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; /** * This class implements a DialogFragment that asks the user to confirm that the feature being added is to be discarded. */ public class ConfirmDiscardDialogFragment extends DialogFragment { View.OnClickListener mYesListener; // Mandatory empty constructor for fragment manager to recreate fragment after it's destroyed. public ConfirmDiscardDialogFragment() { } /** * Sets listener for click on yes button. * * @param listener */ public void setYesListener(View.OnClickListener listener) { mYesListener = listener; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setStyle(DialogFragment.STYLE_NORMAL, 0); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.confirm_discard, container, false); getDialog().setTitle(R.string.title_confirm_discard); Button button = (Button) view.findViewById(R.id.no_key); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); button = (Button) view.findViewById(R.id.yes_key); if (mYesListener != null) { button.setOnClickListener(mYesListener); } return view; } }
[ "whatelsecani@gmail.com" ]
whatelsecani@gmail.com
4ade3a1e1481cdb595617bed1c8da6d4538b785e
4da9097315831c8639a8491e881ec97fdf74c603
/src/StockIT-v1-release_source_from_JADX/sources/com/oblador/performance/PerformancePackage.java
4d7f119e9893455f521dd18151ef62715f4046b3
[ "Apache-2.0" ]
permissive
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
refs/heads/main
2023-08-11T06:17:05.659651
2021-10-01T08:48:06
2021-10-01T08:48:06
410,595,708
1
1
null
null
null
null
UTF-8
Java
false
false
1,020
java
package com.oblador.performance; import com.facebook.react.ReactPackage; import com.facebook.react.bridge.JavaScriptModule; import com.facebook.react.bridge.NativeModule; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.uimanager.ViewManager; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class PerformancePackage implements ReactPackage { public PerformancePackage() { PerformanceModule.setupListener(); } public List<NativeModule> createNativeModules(ReactApplicationContext reactApplicationContext) { ArrayList arrayList = new ArrayList(); arrayList.add(new PerformanceModule(reactApplicationContext)); return arrayList; } public List<Class<? extends JavaScriptModule>> createJSModules() { return Collections.emptyList(); } public List<ViewManager> createViewManagers(ReactApplicationContext reactApplicationContext) { return Collections.emptyList(); } }
[ "57108396+atul-vyshnav@users.noreply.github.com" ]
57108396+atul-vyshnav@users.noreply.github.com
0bd854be6fd4f4f81c9dd2136c89c545a88ca682
d981c09258ddfee200e887455f4d7fbb5f55da90
/contabilidad/src/test/java/com/facturacion/contabilidad/ContabilidadApplicationTests.java
2cbecd533604100e87c2ccdad70120fc785eb4c1
[]
no_license
luismg8812/moduloContable
4fdca7d104a3d6aa0e6d8005b68203267ffa3ba5
e92636cbcef675c43e799e5bd1407fd509def803
refs/heads/master
2020-04-04T15:24:54.210646
2018-11-06T22:50:01
2018-11-06T22:50:01
156,036,935
0
0
null
null
null
null
UTF-8
Java
false
false
351
java
package com.facturacion.contabilidad; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class ContabilidadApplicationTests { @Test public void contextLoads() { } }
[ "luis.gonzalez@expertla.com" ]
luis.gonzalez@expertla.com
24052fce645e96f2081126a5dc3586e8ac84ddb1
59999d306075d381015f84b7be31cbbf2b509000
/src/main/java/designpattern/decorator/Rectangle.java
72543d3360d0c1c3616c1155c1a6c4d66837f2c9
[]
no_license
LuckyShawn/studyDemo
dfee6f7bc97e2890a7db683ec22e9522eaa048d9
1c1c4f9e48d44bd50d178f4ee0371b94bd17c8da
refs/heads/master
2022-08-16T04:18:45.777236
2022-08-05T07:46:51
2022-08-05T07:46:51
164,975,245
1
0
null
2022-06-17T03:37:26
2019-01-10T02:32:18
JavaScript
UTF-8
Java
false
false
243
java
package designpattern.decorator; /** * @Description TODO * @Author shawn * @create 2019/1/21 0021 */ public class Rectangle implements Shape { @Override public void draw() { System.out.println("Shape: Rectangle"); } }
[ "LuckyShawn@foxmail.com" ]
LuckyShawn@foxmail.com
9ebc1f8792ff379a4c997a0b2d53c4cd7dc46622
1616e3fadcc6a57591e628342149bbae249dabb1
/spring-boot-data/src/main/java/com/andy/data/json/gson/GsonSerialize.java
b544ab6073ac9a3edfd112bf9f052811fb794575
[ "Apache-2.0" ]
permissive
martowu/spring-boot-examples
844073e5e3f379bdcecbeef274eafc72d4bd98a2
90d7034fb7713f68e7614db80992cb2df285526e
refs/heads/master
2020-04-18T06:27:13.733004
2019-01-22T04:01:50
2019-01-22T04:01:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
952
java
package com.andy.data.json.gson; import com.andy.data.entity.User; import com.andy.data.util.EntityFactory; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import java.util.List; /** * @author Leone * @since 2018-05-11 **/ public class GsonSerialize { public static void main(String[] args) { long start = System.currentTimeMillis(); Gson gson = new Gson(); // serialize simple pojo String userJson = gson.toJson(EntityFactory.getUsers(1).get(0)); System.out.println(userJson); User user = gson.fromJson(userJson, User.class); System.out.println(user); String listJson = gson.toJson(EntityFactory.getUsers(1000)); List<User> users = gson.fromJson(listJson, new TypeToken<List<User>>() { }.getType()); long end = System.currentTimeMillis(); System.out.println("一共用了:" + (end - start) + "豪秒!"); } }
[ "exklin@gmail.com" ]
exklin@gmail.com
f7f877c6e0e72e8404f403d8a2acc56bdf176d4d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_a5d051cb7a54199ab8ad0313c9c4d7036374f7b9/GroovyImportsCleanUp/5_a5d051cb7a54199ab8ad0313c9c4d7036374f7b9_GroovyImportsCleanUp_t.java
b5ab0efe109025383a6c7e06f4b198f7635dbb7e
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,534
java
/* * Copyright 2009-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.codehaus.groovy.eclipse.refactoring.actions; import org.codehaus.jdt.groovy.model.GroovyCompilationUnit; import org.eclipse.core.runtime.CoreException; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.ISourceRange; import org.eclipse.jdt.core.search.TypeNameMatch; import org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.IChooseImportQuery; import org.eclipse.jdt.internal.corext.fix.FixMessages; import org.eclipse.jdt.internal.corext.fix.ImportsFix; import org.eclipse.jdt.internal.corext.util.Messages; import org.eclipse.jdt.internal.ui.actions.ActionMessages; import org.eclipse.jdt.internal.ui.fix.MultiFixMessages; import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels; import org.eclipse.jdt.ui.cleanup.CleanUpContext; import org.eclipse.jdt.ui.cleanup.ICleanUpFix; import org.eclipse.ltk.core.refactoring.RefactoringStatus; import org.eclipse.text.edits.MultiTextEdit; import org.eclipse.text.edits.TextEdit; /** * @author Andrew Eisenberg * @created Aug 17, 2009 */ public class GroovyImportsCleanUp extends AbstractGroovyCleanUp { @Override public ICleanUpFix createFix(CleanUpContext context) throws CoreException { ICompilationUnit unit = context.getCompilationUnit(); if (!(unit instanceof GroovyCompilationUnit)) { return null; } final boolean hasAmbiguity[] = new boolean[] { false }; IChooseImportQuery query = new IChooseImportQuery() { public TypeNameMatch[] chooseImports(TypeNameMatch[][] openChoices, ISourceRange[] ranges) { hasAmbiguity[0] = true; return new TypeNameMatch[0]; } }; OrganizeGroovyImports op = new OrganizeGroovyImports((GroovyCompilationUnit) unit, query); final TextEdit edit = op.calculateMissingImports(); if (status == null) { status = new RefactoringStatus(); } if (hasAmbiguity[0]) { status.addInfo(Messages.format(ActionMessages.OrganizeImportsAction_multi_error_unresolvable, getLocationString(unit))); } else if (edit == null) { status.addInfo(Messages.format(ActionMessages.OrganizeImportsAction_multi_error_parse, getLocationString(unit))); } if (edit == null || (edit instanceof MultiTextEdit && edit.getChildrenSize() == 0)) { return null; } return new ImportsFix(edit, unit, FixMessages.ImportsFix_OrganizeImports_Description); } @Override public String[] getStepDescriptions() { return new String[] { MultiFixMessages.ImportsCleanUp_OrganizeImports_Description }; } private static String getLocationString(final ICompilationUnit unit) { return BasicElementLabels.getPathLabel(unit.getPath(), false); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
28b8dccdec31584d4e6a052a6bfe53fe4ac8ee36
cd3365b57eb838228e59d834018a68ef4b9c2aef
/DBPopulatorService/src/main/java/com/dbpopulator/app/models/History.java
7c8d6bcda51b717529171bb1a41ae10e8fa12e1b
[]
no_license
nislamovs/BookLibrary
b6d0e6ffa71b547e9d7d4e0c2d2f15cb6411370a
99f86b43e0b0652e56f8b32cd58fd1873bdf0d30
refs/heads/master
2020-08-07T05:00:29.332581
2020-01-20T07:25:55
2020-01-20T07:25:55
213,307,560
0
0
null
null
null
null
UTF-8
Java
false
false
1,474
java
package com.dbpopulator.app.models; import com.dbpopulator.app.models.audit.AbstractDocument; import com.fasterxml.jackson.annotation.JsonFormat; import io.github.kaiso.relmongo.annotation.CascadeType; import io.github.kaiso.relmongo.annotation.FetchType; import io.github.kaiso.relmongo.annotation.JoinProperty; import io.github.kaiso.relmongo.annotation.OneToOne; import lombok.*; import org.springframework.data.mongodb.core.mapping.Document; import org.springframework.data.mongodb.core.mapping.Field; import java.util.Date; @EqualsAndHashCode(callSuper = true) @Builder @Data @AllArgsConstructor @NoArgsConstructor @Document(collection = "history") public class History extends AbstractDocument { @Field(name="historyId") private String historyId; @Field(name="visitorId") private String visitorId; @Field(name="bookNumber") private String bookNumber; @Field(name="bookPickDate") private Date bookPickDate; @Field(name="bookExpectedReturnDate") private Date bookExpectedReturnDate; @Field(name="bookActualReturnDate") private Date bookActualReturnDate; @Field(name="isFailedBookReturn") private Boolean isFailedBookReturn; @Field(name="debt") @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true) @JoinProperty(name="debt") private Debt debt; @Field(name="feedback") private int feedback; @Field(name="comment") private String comment; }
[ "nizamiislamovs@gmail.com" ]
nizamiislamovs@gmail.com
4245e96ccbcce730e0f8ebc4b19be8147007e786
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/neo4j--neo4j/a45af2a7c3e37292a4fb1f545467b7d06d263e7b/after/ForsetiLocksFactory.java
1021201e3b8c247aa2ec165ea65f834371b2a36f
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,326
java
/** * Copyright (c) 2002-2014 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.ha.lock.forseti; import org.neo4j.helpers.Service; import org.neo4j.kernel.impl.locking.Locks; import org.neo4j.kernel.impl.locking.ResourceTypes; @Service.Implementation(Locks.Factory.class) public class ForsetiLocksFactory extends Locks.Factory { public ForsetiLocksFactory() { super( "forseti" ); } @Override public Locks newInstance( Locks.ResourceType[] resourceTypes ) { return new ForsetiLockManager( ResourceTypes.values() ); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
84699000df3f5f9af532350dba7cb35005984a65
ec9bf57a07b7b06134ec7a21407a11f69cc644f7
/src/cin.java
ff12b95e0b0481d2d26051ddbf0ae5b257870abf
[]
no_license
jzarca01/com.ubercab
f95c12cab7a28f05e8f1d1a9d8a12a5ac7fbf4b1
e6b454fb0ad547287ae4e71e59d6b9482369647a
refs/heads/master
2020-06-21T04:37:43.723581
2016-07-19T16:30:34
2016-07-19T16:30:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
755
java
import android.graphics.Bitmap; final class cin extends chw<Object> { private final Object m = new Object(); private cib n; cin(cja paramcja, cjk paramcjk, int paramInt1, int paramInt2, Object paramObject, String paramString, cib paramcib) { super(paramcja, null, paramcjk, paramInt1, paramInt2, 0, null, paramString, paramObject, false); n = paramcib; } final void a() { if (n != null) { n.b(); } } final void a(Bitmap paramBitmap, cje paramcje) { if (n != null) { n.a(); } } final void b() { super.b(); n = null; } final Object d() { return m; } } /* Location: * Qualified Name: cin * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
aa2290dde24f4e1e564909abe91c98f3b7422c8f
354f9bb6cba05fe1837f4409a5c3b41ecd443791
/testprograms/gello-compilersource/Client/src/org/gello/client/actions/contextMenu/DeleteIndicationMenuAction.java
04cc4eace56ddfce47589b106388af8daeb8eee3
[]
no_license
ingoha/pwdt-ss10
915fe8279657a4f7e0de6750fded85d3a0165a12
fb40efa326cdda9051a28a09ce55b4d531e72813
refs/heads/master
2016-08-07T10:22:31.482185
2010-06-24T08:18:52
2010-06-24T08:18:52
32,255,798
0
0
null
null
null
null
UTF-8
Java
false
false
3,013
java
/******************************************************************************* * Copyright (c) 2006, 2007 Pfizer, Inc. * 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: * Jacob Brauer (WebReach, Inc.) - initial implementation *******************************************************************************/ package org.gello.client.actions.contextMenu; import org.eclipse.jface.action.Action; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.ISelectionListener; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.actions.ActionFactory; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.gello.client.Application; import org.gello.client.IImageKeys; import org.gello.client.manager.GelloNode; import org.gello.client.manager.ServerException_Exception; import org.gello.client.model.BrowserViewContentProvider; import org.gello.client.views.Browser; public class DeleteIndicationMenuAction extends Action implements ISelectionListener, ActionFactory.IWorkbenchAction { private final IWorkbenchWindow window; public final static String ID = "org.gello.client.actions.contextMenu.DeleteIndication"; private IStructuredSelection selection; public DeleteIndicationMenuAction(IWorkbenchWindow window) { this.window = window; setId(ID); setText("&Delete Indication"); setToolTipText("Delete Indication."); setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(Application.PLUGIN_ID, IImageKeys.DELETE_INDICATION)); window.getSelectionService().addSelectionListener(this); } public void selectionChanged(IWorkbenchPart part, ISelection incoming) { if (part instanceof Browser) { if (incoming instanceof IStructuredSelection) { selection = (IStructuredSelection) incoming; setEnabled(true); } else setEnabled(false); } } public void dispose() { window.getSelectionService().removeSelectionListener(this); } /** * Deletes a structure from the svn repository, and if successful, * also removes it from the browser tree. * */ public void run() { GelloNode gelloNode = (GelloNode) selection.getFirstElement(); try { boolean success = Application.getManager().remove(gelloNode.getPath()); if (success) { GelloNode parentNode = ((BrowserViewContentProvider) Browser.viewer.getContentProvider()).getParentFromPath((GelloNode) Browser.viewer.getInput(), gelloNode.getPath()); int i = 0; while (!parentNode.getChildren().get(i).getPath().equals(gelloNode.getPath())) i++; parentNode.getChildren().remove(i); } } catch (ServerException_Exception e) { e.printStackTrace(); } Browser.viewer.setSelection(null); Browser.viewer.refresh(); } }
[ "ingoha@users.noreply.github.com" ]
ingoha@users.noreply.github.com
f97ded382994f58310cf5cdd374a9e9b2e604083
a08d7307a73d77987d8d987444dd88719ed057d7
/java/src/basic/ocean/thread/volatile01/VolatileTest.java
3c315005264c05652eaf872d2ed8fc378ed547a2
[]
no_license
oweson/java--basic
4a5f419645b03373fc8174173a74e65984640661
31a827b6b3ca369b604d6ae52bc5de4acf7af33d
refs/heads/master
2021-06-12T13:17:19.357280
2021-04-12T13:57:24
2021-04-12T13:57:24
128,645,622
2
0
null
null
null
null
UTF-8
Java
false
false
2,918
java
package basic.ocean.thread.volatile01; /** * the class is create by @Author:oweson * * @Date:2019/1/10 0010 14:25 */ public class VolatileTest { /** * 在多线程环境下,某个共享变量如果被其中一个线程给修改了, * 其他线程能够立即知道这个共享变量已经被修改了,当其他线程要读取这个变量的时候, * 最终会去内存中读取,而不是从自己的 工作空间中读取。 * 例如我们上面说的,当线程1对t进行了加1操作并把数据写回到主存之后, * 线程2就会知道它自己工作空间内的t已经被修改了,当它要执行加1操作之后, * 就会去主存中读取。这样,两边的数据就能一致了。 * 假如一个变量被声明为volatile,那么这个变量就具有了可见性的性质了。 * 这就是volatile关键的作用之一了。 */ public static volatile int a = 100; /* * 1 第一:保证在内存的可见性,第二:防止指令的重排; * */ /* 2 有序性; 实际上,当我们把代码写好之后,虚拟机不一定会按照我们写的代码的顺序来执行。例如对于下面的两句代码: int a = 1; int b = 2; 对于这两句代码,你会发现无论是先执行a = 1还是执行b = 2,都不会对a,b最终的值造成影响。 所以虚拟机在编译的时候,是有可能把他们进行重排序的。 为什么要进行重排序呢? 你想啊,假如执行 int a = 1这句代码需要100ms的时间,但执行int b = 2这句代码需要1ms的时间, 并且先执行哪句代码并不会对a,b最终的值造成影响。那当然是先执行int b = 2这句代码了。 所以,虚拟机在进行代码编译优化的时候,对于那些改变顺序之后不会对最终变量的值造成影响的代码, 是有可能将他们进行重排序的。*/ /* * 3 缓存一致性协议:说“如果一个共享变量被一个线程修改了之后, * 当其他线程要读取这个变量的时候,最终会去内存中读取, * 而不是从自己的工作空间中读取”,实际上是这样的: * 线程中的处理器会一直在总线上嗅探其内部缓存中的内存地址在其他处理器的操作情况, * 一旦嗅探到某处处理器打算修改其内存地址中的值,而该内存地址刚好也在自己的内部缓存中, * 那么处理器就会强制让自己对该缓存地址的无效。所以当该处理器要访问该数据的时候, * 由于发现自己缓存的数据无效了,就会去主存中访问。 */ /** * 4 volatile保证变量可见性的原理 */ public static void main(String[] args) { System.out.println(3900 / 24); a++; ++a; System.out.println(a); } }
[ "570347720@qq.com" ]
570347720@qq.com
22ef2546ce6518bd36dc6156fcccad82323bb130
59df56858598358205e69560a8d178e2601ad666
/byte-buddy-dep/src/test/java/net/bytebuddy/description/type/TypeDescriptionGenericOfParameterizedTypeRenderingDelegateTest.java
5ee1f155493216afe37bbad67a30284708ae7b1e
[ "Apache-2.0" ]
permissive
satnami/byte-buddy
6e564c75100145b62b48f8ef2faa9803b8b5cf24
60b1cf1cf2572942c0dd974e8c4509f341997542
refs/heads/master
2020-12-25T22:47:42.902796
2016-09-15T12:19:56
2016-09-15T12:19:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,720
java
package net.bytebuddy.description.type; import net.bytebuddy.ClassFileVersion; import net.bytebuddy.test.utility.MockitoRule; import net.bytebuddy.test.utility.ObjectPropertyAssertion; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestRule; import org.mockito.Mock; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.when; public class TypeDescriptionGenericOfParameterizedTypeRenderingDelegateTest { private static final String FOO = "foo", BAR = "bar"; @Rule public TestRule mockitoRule = new MockitoRule(this); @Mock private TypeDescription typeDescription; @Mock private TypeDescription.Generic ownerType; @Before public void setUp() throws Exception { when(typeDescription.getName()).thenReturn(FOO + "." + BAR); when(typeDescription.getSimpleName()).thenReturn(BAR); } @Test public void testJava9Capable() throws Exception { StringBuilder stringBuilder = new StringBuilder(); TypeDescription.Generic.OfParameterizedType.RenderingDelegate.JAVA_9_CAPABLE_VM.apply(stringBuilder, typeDescription, ownerType); assertThat(stringBuilder.toString(), is("$" + BAR)); } @Test public void testLegacyParameterized() throws Exception { when(ownerType.getSort()).thenReturn(TypeDefinition.Sort.PARAMETERIZED); StringBuilder stringBuilder = new StringBuilder(); TypeDescription.Generic.OfParameterizedType.RenderingDelegate.LEGACY_VM.apply(stringBuilder, typeDescription, ownerType); assertThat(stringBuilder.toString(), is("." + BAR)); } @Test public void testLegacyNonParameterized() throws Exception { when(ownerType.getSort()).thenReturn(TypeDefinition.Sort.NON_GENERIC); StringBuilder stringBuilder = new StringBuilder(); TypeDescription.Generic.OfParameterizedType.RenderingDelegate.LEGACY_VM.apply(stringBuilder, typeDescription, ownerType); assertThat(stringBuilder.toString(), is("." + FOO + "." + BAR)); } @Test public void testCurrent() throws Exception { assertThat(TypeDescription.Generic.OfParameterizedType.RenderingDelegate.CURRENT, is(ClassFileVersion.ofThisVm().isAtLeast(ClassFileVersion.JAVA_V9) ? TypeDescription.Generic.OfParameterizedType.RenderingDelegate.JAVA_9_CAPABLE_VM : TypeDescription.Generic.OfParameterizedType.RenderingDelegate.LEGACY_VM)); } @Test public void testObjectProperties() throws Exception { ObjectPropertyAssertion.of(TypeDescription.Generic.OfParameterizedType.RenderingDelegate.class).apply(); } }
[ "rafael.wth@gmail.com" ]
rafael.wth@gmail.com
eec0af42e30feb21a1ed1186eb3c3b465393dd43
e89dc01c95b8b45404f971517c2789fd21657749
/src/main/java/com/alipay/api/domain/CreditPayGuideVO.java
6663a5187fdfec5234c56e0f0fa15cf1211df41a
[ "Apache-2.0" ]
permissive
guoweiecust/alipay-sdk-java-all
3370466eec70c5422c8916c62a99b1e8f37a3f46
bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9
refs/heads/master
2023-05-05T07:06:47.823723
2021-05-25T15:26:21
2021-05-25T15:26:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
861
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 信用支付引导视图 * * @author auto create * @since 1.0, 2020-08-06 10:50:10 */ public class CreditPayGuideVO extends AlipayObject { private static final long serialVersionUID = 7579869621668892863L; /** * json字符串,表示引导信息 */ @ApiField("guide_param") private String guideParam; /** * 是否需要引导 */ @ApiField("need_guide") private Boolean needGuide; public String getGuideParam() { return this.guideParam; } public void setGuideParam(String guideParam) { this.guideParam = guideParam; } public Boolean getNeedGuide() { return this.needGuide; } public void setNeedGuide(Boolean needGuide) { this.needGuide = needGuide; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
ffefbf60f51be45494cf3706bc8445e0baf27a90
3441de0b93c9bc4dc40e1a46abd7d36cafe51c2d
/paascloud-provider/paascloud-provider-opc/src/main/java/com/paascloud/provider/model/dto/mail/MailEntity.java
3e5d7b7f2998e83055ff56deb7ca1cc19a81bad2
[]
no_license
XinxiJiang/passcloud-master
23baeb1c4360432585c07e49e7e2366dc2955398
212c2d7c2c173a788445c21de4775c4792a11242
refs/heads/master
2023-04-11T21:31:27.208057
2018-12-11T04:42:18
2018-12-11T04:44:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,780
java
package com.paascloud.provider.model.dto.mail; import com.google.common.base.Preconditions; import com.google.common.collect.Sets; import com.passcloud.common.util.PubUtils; import com.passcloud.common.util.PublicUtil; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.springframework.mail.SimpleMailMessage; import java.util.Date; import java.util.Set; /** * The class Mail entity. * * @author liyuzhang */ @Slf4j @Data public class MailEntity { /** * 获取或设置电子邮件的回复地址。 */ private String replyTo; /** * 获取包含此电子邮件的收件人的地址集合。 */ private Set<String> to; /** * 获取包含此电子邮件的抄送 (CC) 收件人的地址集合。 */ private Set<String> cc; /** * 获取包含此电子邮件的密件抄送 (BCC) 收件人的地址集合。 */ private Set<String> bcc; /** * 发送时间 */ private Date sentDate; /** * 获取或设置此电子邮件的主题行。 */ private String subject; /** * 内容 */ private String text; /** * Instantiates a new Mail entity. * * @param subject the subject * @param text the text * @param to the to */ public MailEntity(String subject, String text, Set<String> to) { this.subject = subject; this.text = text; this.to = to; this.sentDate = new Date(); } /** * Instantiates a new Mail entity. * * @param subject the subject * @param text the text * @param to the to * @param cc the cc */ public MailEntity(String subject, String text, Set<String> to, Set<String> cc) { this.subject = subject; this.text = text; this.to = to; this.cc = cc; this.sentDate = new Date(); } /** * Create simple mail message simple mail message. * * @param subject the subject * @param text the text * @param to the to * * @return the simple mail message */ public static SimpleMailMessage createSimpleMailMessage(String subject, String text, Set<String> to) { log.info("参数异常, 邮件信息不完整 subject={}, text={}, to={}", subject, text, to); Preconditions.checkArgument(!PubUtils.isNull(subject, text, to), "参数异常, 邮件信息不完整"); String[] toArray = setToArray(to); SimpleMailMessage simpleMailMessage = new SimpleMailMessage(); simpleMailMessage.setSubject(subject); simpleMailMessage.setText(text); simpleMailMessage.setTo(toArray); return simpleMailMessage; } private static String[] setToArray(Set<String> to) { Set<String> toSet = Sets.newHashSet(); for (String toStr : to) { toStr = toStr.trim(); if (PubUtils.isEmail(toStr)) { toSet.add(toStr); } } if (PublicUtil.isEmpty(toSet)) { return null; } return toSet.toArray(new String[toSet.size()]); } }
[ "35205889+mliyz@users.noreply.github.com" ]
35205889+mliyz@users.noreply.github.com
35fb3d7028925e1f6982b67ff31c6c0c4597dda8
855b4041b6a7928988a41a5f3f7e7c7ae39565e4
/iwant/src/main/java/iwant/dao/ProjectSearchCdn.java
51bd2ef8231a8db8de563d2d0a02a575423cc20a
[]
no_license
mestatrit/newbyakwei
60dca96c4c21ae5fcf6477d4627a0eac0f76df35
ea9a112ac6fcbc2a51dbdc79f417a1d918aa4067
refs/heads/master
2021-01-10T06:29:50.466856
2013-03-07T08:09:58
2013-03-07T08:09:58
36,559,185
0
1
null
null
null
null
UTF-8
Java
false
false
809
java
package iwant.dao; import halo.util.DataUtil; import iwant.bean.enumtype.ActiveType; public class ProjectSearchCdn { private String name; private int did; private ActiveType activeType; public void setDid(int did) { this.did = did; } public int getDid() { return did; } public String getName() { return name; } public void setName(String name) { this.name = name; } public ActiveType getActiveType() { return activeType; } public void setActiveType(ActiveType activeType) { this.activeType = activeType; } private String encName; public String getEncName() { if (encName == null) { this.encName = DataUtil.urlEncoder(this.name); if (this.encName == null) { this.encName = ""; } } return encName; } }
[ "ak478288@gmail.com" ]
ak478288@gmail.com
6b32b87393a538905b0c862c72ebf6774398f9ab
0907c886f81331111e4e116ff0c274f47be71805
/sources/com/google/android/material/internal/TextScale.java
68948431d733de4b7b662ff4fe9e3b777ab7c9b0
[ "MIT" ]
permissive
Minionguyjpro/Ghostly-Skills
18756dcdf351032c9af31ec08fdbd02db8f3f991
d1a1fb2498aec461da09deb3ef8d98083542baaf
refs/heads/Android-OS
2022-07-27T19:58:16.442419
2022-04-15T07:49:53
2022-04-15T07:49:53
415,272,874
2
0
MIT
2021-12-21T10:23:50
2021-10-09T10:12:36
Java
UTF-8
Java
false
false
2,220
java
package com.google.android.material.internal; import android.animation.Animator; import android.animation.ValueAnimator; import android.view.ViewGroup; import android.widget.TextView; import androidx.transition.Transition; import androidx.transition.TransitionValues; import java.util.Map; public class TextScale extends Transition { public void captureStartValues(TransitionValues transitionValues) { captureValues(transitionValues); } public void captureEndValues(TransitionValues transitionValues) { captureValues(transitionValues); } private void captureValues(TransitionValues transitionValues) { if (transitionValues.view instanceof TextView) { transitionValues.values.put("android:textscale:scale", Float.valueOf(((TextView) transitionValues.view).getScaleX())); } } public Animator createAnimator(ViewGroup viewGroup, TransitionValues transitionValues, TransitionValues transitionValues2) { if (transitionValues == null || transitionValues2 == null || !(transitionValues.view instanceof TextView) || !(transitionValues2.view instanceof TextView)) { return null; } final TextView textView = (TextView) transitionValues2.view; Map<String, Object> map = transitionValues.values; Map<String, Object> map2 = transitionValues2.values; float f = 1.0f; float floatValue = map.get("android:textscale:scale") != null ? ((Float) map.get("android:textscale:scale")).floatValue() : 1.0f; if (map2.get("android:textscale:scale") != null) { f = ((Float) map2.get("android:textscale:scale")).floatValue(); } if (floatValue == f) { return null; } ValueAnimator ofFloat = ValueAnimator.ofFloat(new float[]{floatValue, f}); ofFloat.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { public void onAnimationUpdate(ValueAnimator valueAnimator) { float floatValue = ((Float) valueAnimator.getAnimatedValue()).floatValue(); textView.setScaleX(floatValue); textView.setScaleY(floatValue); } }); return ofFloat; } }
[ "66115754+Minionguyjpro@users.noreply.github.com" ]
66115754+Minionguyjpro@users.noreply.github.com
622abec354eee912e94b22f4b5aaf8881d38f961
f567c98cb401fc7f6ad2439cd80c9bcb45e84ce9
/src/main/java/com/alipay/api/domain/OpenPromoPrizeDimension.java
cea6586f144b49aa7ac8dcd0c0f2390e7007aa16
[ "Apache-2.0" ]
permissive
XuYingJie-cmd/alipay-sdk-java-all
0887fa02f857dac538e6ea7a72d4d9279edbe0f3
dd18a679f7543a65f8eba2467afa0b88e8ae5446
refs/heads/master
2023-07-15T23:01:02.139231
2021-09-06T07:57:09
2021-09-06T07:57:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,001
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 周期性使用时段规则 * * @author auto create * @since 1.0, 2016-03-14 15:03:10 */ public class OpenPromoPrizeDimension extends AlipayObject { private static final long serialVersionUID = 3314683455239498922L; /** * 时间维度, W:表示 周[1,4,5] MIOD:表示 每天X分钟[0,1439] */ @ApiField("dimension") private String dimension; /** * 参考dimension 后面的值 */ @ApiListField("values") @ApiField("number") private List<Long> values; public String getDimension() { return this.dimension; } public void setDimension(String dimension) { this.dimension = dimension; } public List<Long> getValues() { return this.values; } public void setValues(List<Long> values) { this.values = values; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
be4bb20e0d954f3f5d9d14a911f16672e0617990
130179d1b47e89efb82c0d0e691b113397270e07
/netlibrary/src/main/java/com/saint/netlibrary/model/ShopDetails.java
a9a8ab69c57c147cab8149f05f72feae92be0cc0
[]
no_license
DavyJohn/Qb
a251218f7c89f4c003293f6570ea6065f7cdeb9e
b7338a330e3c6f6dd1104e2ec9e9d01d93386e8c
refs/heads/master
2021-01-11T14:10:09.222899
2017-06-21T09:32:43
2017-06-21T09:32:43
94,987,445
0
0
null
null
null
null
UTF-8
Java
false
false
2,979
java
package com.saint.netlibrary.model; import java.util.List; /** * Created by 志浩 on 2016/6/21. */ public class ShopDetails { private ShopDetailsItem item; private ShopDetailsGorecode lastgorecode; private List<ShopDetailsQData> loopqishu; private ShopDetailsCategory category; private SHopDetailBrand brand; private String user_shop_time; private String user_shop_number; private String user_shop_codes; public ShopDetails(ShopDetailsItem item, ShopDetailsGorecode lastgorecode, List<ShopDetailsQData> loopqishu, ShopDetailsCategory category, SHopDetailBrand brand, String user_shop_time, String user_shop_number, String user_shop_codes) { this.item = item; this.lastgorecode = lastgorecode; this.loopqishu = loopqishu; this.category = category; this.brand = brand; this.user_shop_time = user_shop_time; this.user_shop_number = user_shop_number; this.user_shop_codes = user_shop_codes; } public ShopDetailsItem getItem() { return item; } public void setItem(ShopDetailsItem item) { this.item = item; } public ShopDetailsGorecode getLastgorecode() { return lastgorecode; } public void setLastgorecode(ShopDetailsGorecode lastgorecode) { this.lastgorecode = lastgorecode; } public List<ShopDetailsQData> getLoopqishu() { return loopqishu; } public void setLoopqishu(List<ShopDetailsQData> loopqishu) { this.loopqishu = loopqishu; } public ShopDetailsCategory getCategory() { return category; } public void setCategory(ShopDetailsCategory category) { this.category = category; } public SHopDetailBrand getBrand() { return brand; } public void setBrand(SHopDetailBrand brand) { this.brand = brand; } public String getUser_shop_time() { return user_shop_time; } public void setUser_shop_time(String user_shop_time) { this.user_shop_time = user_shop_time; } public String getUser_shop_number() { return user_shop_number; } public void setUser_shop_number(String user_shop_number) { this.user_shop_number = user_shop_number; } public String getUser_shop_codes() { return user_shop_codes; } public void setUser_shop_codes(String user_shop_codes) { this.user_shop_codes = user_shop_codes; } @Override public String toString() { return "ShopDetails{" + "item=" + item + ", lastgorecode=" + lastgorecode + ", loopqishu=" + loopqishu + ", category=" + category + ", brand=" + brand + ", user_shop_time='" + user_shop_time + '\'' + ", user_shop_number='" + user_shop_number + '\'' + ", user_shop_codes='" + user_shop_codes + '\'' + '}'; } }
[ "1139099003@qq.com" ]
1139099003@qq.com
ca4ca901cb3021bc1fe7de9a58d3bea13a363902
547d85eb056c05564cf6b5d96009a15e113900c1
/app/src/androidTest/java/tutorial/lorence/improveskillandroid/ExampleInstrumentedTest.java
f073413b62d4800ae4d435208e2625fa1414f742
[]
no_license
danisluis6/Ira-Picture
06bdb144f622e8049f65b3c178654708985d2cd2
b05ee644ce8e976eeff594eb19c4ce13ea7f8401
refs/heads/master
2020-03-18T18:32:05.626452
2018-05-28T04:49:39
2018-05-28T04:49:39
135,099,177
0
0
null
2018-05-29T03:08:51
2018-05-28T02:16:42
Java
UTF-8
Java
false
false
773
java
package tutorial.lorence.improveskillandroid; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("tutorial.lorence.improveskillandroid", appContext.getPackageName()); } }
[ "lorence@enclave.vn" ]
lorence@enclave.vn
39ec08e6c86030adce9ac1dfebd93654647c8e43
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/hidroh_materialistic/app/src/test/java/io/github/hidroh/materialistic/test/TestWebItem.java
186f8ac53dd0d1e82ef434964e75d16c81b814a9
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,498
java
// isComment package io.github.hidroh.materialistic.test; import android.content.Context; import android.os.Parcel; import android.support.annotation.NonNull; import android.text.Spannable; import android.text.SpannableString; import io.github.hidroh.materialistic.data.WebItem; public abstract class isClassOrIsInterface implements WebItem { @Override public String isMethod() { return null; } @Override public String isMethod() { return null; } @Override public boolean isMethod() { return true; } @Override public String isMethod() { return null; } @Override public long isMethod() { return isIntegerConstant; } @Override public String isMethod() { return null; } @Override public Spannable isMethod(Context isParameter, boolean isParameter, int isParameter) { return new SpannableString("isStringConstant"); } @Override public Spannable isMethod(Context isParameter) { return new SpannableString("isStringConstant"); } @Override public boolean isMethod() { return true; } @Override public void isMethod(boolean isParameter) { } @NonNull @Override public String isMethod() { return isNameExpr; } @Override public int isMethod() { return isIntegerConstant; } @Override public void isMethod(Parcel isParameter, int isParameter) { } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
feaa71480f00aeae1ee8b324c5c159cb713237e7
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/MATH-89b-1-23-Single_Objective_GGA-WeightedSum-BasicBlockCoverage-opt/org/apache/commons/math/stat/Frequency_ESTest.java
dfc49cf5f1b8987d492e512ba45cce5b9c7142fe
[ "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
1,215
java
/* * This file was automatically generated by EvoSuite * Tue Oct 26 10:02:44 UTC 2021 */ package org.apache.commons.math.stat; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import java.util.Comparator; import org.apache.commons.math.stat.Frequency; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class Frequency_ESTest extends Frequency_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { Comparator<Integer> comparator0 = (Comparator<Integer>) mock(Comparator.class, new ViolatedAssumptionAnswer()); doReturn(0, 0, 0).when(comparator0).compare(anyInt() , anyInt()); Frequency frequency0 = new Frequency(comparator0); frequency0.addValue(1); frequency0.getCount(0L); frequency0.getCount('d'); Object object0 = new Object(); // Undeclared exception! frequency0.addValue(object0); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
302977dc612015289dd3dee27f768cda875887cf
ed53c4d93e851d46e963cafb26cb6a3f468dd47c
/extensions/ecs/ecs-weaver/src/arc/ecs/weaver/impl/EntityLinkGenerator.java
cb20423ac92cf922843820bf6515639ce8478942
[]
no_license
zonesgame/Arc
0a4ea8cf1c44066e85ffd95cfe52eb1ece1488e7
ea8a0be1642befa535fba717e94c4fc03bd6f8a0
refs/heads/main
2023-06-28T04:21:06.146553
2021-07-26T14:02:35
2021-07-26T14:02:35
384,278,749
0
0
null
null
null
null
UTF-8
Java
false
false
7,720
java
package arc.ecs.weaver.impl; import arc.ecs.weaver.*; import arc.ecs.weaver.meta.*; import arc.ecs.weaver.impl.transplant.*; import org.objectweb.asm.*; import java.util.*; public class EntityLinkGenerator extends CallableTransmuter<Void> implements Opcodes{ private ClassMetadata meta; private ClassReader cr; public EntityLinkGenerator(String file, ClassReader cr, ClassMetadata meta){ super(file); this.cr = cr; this.meta = meta; } @Override protected Void process(String file){ final List<FieldDescriptor> mutators = new ArrayList<FieldDescriptor>(); for(FieldDescriptor fd : meta.fields()){ if(fd.entityLinkMutator != null){ String mutatorFile = file.replaceAll("\\.class", "\\$Mutator_" + fd.name + ".class"); generateMutator(fd, mutatorFile); mutators.add(fd); } } ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES); ClassVisitor cv = cw; cv = new ClassVisitor(ASM5, cv){ boolean injectedMutatorsReferences; private void injectMutators(){ injectedMutatorsReferences = true; String internalName = meta.type.getInternalName(); for(FieldDescriptor mutator : mutators){ super.visitInnerClass( internalName + getMutatorName(mutator), internalName, getMutatorName(mutator), ACC_PUBLIC | ACC_STATIC); } } @Override public void visitInnerClass(String name, String outerName, String innerName, int access){ super.visitInnerClass(name, outerName, innerName, access); injectMutators(); } @Override public FieldVisitor visitField(int access, String name, String desc, String signature, Object value){ if(!injectedMutatorsReferences) injectMutators(); return super.visitField(access, name, desc, signature, value); } @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions){ if(!injectedMutatorsReferences) injectMutators(); return super.visitMethod(access, name, desc, signature, exceptions); } @Override public void visitEnd(){ if(!injectedMutatorsReferences) injectMutators(); super.visitEnd(); } }; try{ cr.accept(cv, ClassReader.EXPAND_FRAMES); if(file != null) ClassUtil.writeClass(cw, file); }catch(Exception e){ throw new WeaverException(e); } return null; } private void generateMutator(final FieldDescriptor fd, final String file){ final ClassReader sourceClassReader = Weaver.toClassReader(fd.entityLinkMutator); ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES); ClassVisitor cv = cw; final String className = meta.type.getInternalName() + getMutatorName(fd); cv = new ClassVisitor(ASM5, cv){ @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions){ final MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); Class<?> enclosingClass = fd.entityLinkMutator.getEnclosingClass(); return new MethodBodyTransplanter(enclosingClass, meta.type, mv); } }; cv = new ClassVisitor(ASM5, cv){ @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions){ final MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); return new MethodBodyTransplanter(fd.entityLinkMutator, Type.getObjectType(className), mv); } }; cv = new ClassVisitor(ASM5, cv){ @Override public void visit(int version, int access, String name, String signature, String superName, String[] interfaces){ Type outerClass = Type.getType(fd.entityLinkMutator.getDeclaringClass()); String originalOuter = outerClass.getInternalName(); if(signature != null && signature.contains(originalOuter)){ String newOuter = meta.type.getInternalName(); signature = signature.replaceAll(originalOuter, newOuter); } super.visit(version, access, name, signature, superName, interfaces); } @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions){ final Type outerClass = Type.getType(fd.entityLinkMutator.getDeclaringClass()); final String originalOuter = outerClass.getInternalName(); if(desc.contains(originalOuter)){ desc = desc.replaceAll(originalOuter, meta.type.getInternalName()); } if(signature != null && signature.contains(originalOuter)){ signature = signature.replaceAll(originalOuter, meta.type.getInternalName()); } MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); return new MethodVisitor(ASM5, mv){ @Override public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf){ if(owner != null && owner.contains(originalOuter)){ owner = owner.replaceAll(originalOuter, meta.type.getInternalName()); } if(desc != null && desc.contains(originalOuter)){ desc = desc.replaceAll(originalOuter, meta.type.getInternalName()); } super.visitMethodInsn(opcode, owner, name, desc, itf); } @Override public void visitFieldInsn(int opcode, String owner, String name, String desc){ if("field".equals(name)) // see template classes name = fd.name; super.visitFieldInsn(opcode, owner, name, desc); } }; } }; cv = new ClassVisitor(ASM5, cv){ @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions){ MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); Type target = Type.getObjectType(meta.type.getInternalName() + "$Mutator_" + fd.name); return new MethodBodyTransplanter(sourceClassReader.getClassName(), target, mv); } }; cv = new ClassTransplantVisitor(sourceClassReader, cv, Weaver.scan(fd.entityLinkMutator), className); try{ sourceClassReader.accept(cv, ClassReader.EXPAND_FRAMES); if(file != null) ClassUtil.writeClass(cw, file); }catch(Exception e){ e.printStackTrace(); throw new WeaverException(e); } } static String getMutatorName(FieldDescriptor fd){ return "$Mutator_" + fd.name; } }
[ "32406374+zonesgame@users.noreply.github.com" ]
32406374+zonesgame@users.noreply.github.com
31fd2d8d50efce07ded946874d6a465740a52075
0abef3758ae8969f190b54718d066bcb64f16072
/src/test/java/com/kass/jh/web/rest/UserJWTControllerIntTest.java
cd4221cdef145ac4298375aa59263d2c0a9a6cab
[]
no_license
KassemAlsayedAli/jhipsterSampleApp
614043c45ec9cfa1a61734891698319ed0355ce3
3640eb2c78e46f4b9b4961b589dcd60056480b0f
refs/heads/master
2021-07-14T03:13:28.139484
2017-10-20T10:14:00
2017-10-20T10:14:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,052
java
package com.kass.jh.web.rest; import com.kass.jh.JhipsterSampleApp; import com.kass.jh.domain.User; import com.kass.jh.repository.UserRepository; import com.kass.jh.security.jwt.TokenProvider; import com.kass.jh.web.rest.vm.LoginVM; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.crypto.password.PasswordEncoder; 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 static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; /** * Test class for the UserJWTController REST controller. * * @see UserJWTController */ @RunWith(SpringRunner.class) @SpringBootTest(classes = JhipsterSampleApp.class) public class UserJWTControllerIntTest { @Autowired private TokenProvider tokenProvider; @Autowired private AuthenticationManager authenticationManager; @Autowired private UserRepository userRepository; @Autowired private PasswordEncoder passwordEncoder; private MockMvc mockMvc; @Before public void setup() { UserJWTController userJWTController = new UserJWTController(tokenProvider, authenticationManager); this.mockMvc = MockMvcBuilders.standaloneSetup(userJWTController) .build(); } @Test @Transactional public void testAuthorize() throws Exception { User user = new User(); user.setLogin("user-jwt-controller"); user.setEmail("user-jwt-controller@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.saveAndFlush(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller"); login.setPassword("test"); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()); } @Test @Transactional public void testAuthorizeWithRememberMe() throws Exception { User user = new User(); user.setLogin("user-jwt-controller-remember-me"); user.setEmail("user-jwt-controller-remember-me@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.saveAndFlush(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller-remember-me"); login.setPassword("test"); login.setRememberMe(true); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()); } @Test @Transactional public void testAuthorizeFails() throws Exception { LoginVM login = new LoginVM(); login.setUsername("wrong-user"); login.setPassword("wrong password"); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isUnauthorized()) .andExpect(jsonPath("$.id_token").doesNotExist()); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
47aa013759216d24ac47cd807da31a395ce28e19
9b3cfee564ff3065f3ed2acb804a7791f306670c
/src/main/java/org/ylgjj/loan/history_stream/S_191_SEQ_历史累计回收额__提前还清___AND_0302010206_HistoryServiceImpl.java
62d8af4657bbec3aeccd9e733322c350b738ca7c
[]
no_license
1026957152/supervision
ebbb40a8efddfee9f70f1e298d7562fc65fe222c
b150682d17d7f71095f02b6143c9a94f0862be1e
refs/heads/master
2020-09-16T08:23:48.320281
2020-01-03T08:16:03
2020-01-03T08:16:03
223,709,916
0
4
null
2019-12-09T07:23:35
2019-11-24T07:48:22
Java
UTF-8
Java
false
false
8,942
java
package org.ylgjj.loan.history_stream; import org.javatuples.Triplet; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.ylgjj.loan.domain.*; import org.ylgjj.loan.domain_flow.CollectHistory; import org.ylgjj.loan.domain_flow.TargetHistory; import org.ylgjj.loan.enumT.E_DP021_单位缴存登记簿_缴存类型; import org.ylgjj.loan.outputenum.StatisticalIndexCodeEnum; import org.ylgjj.loan.repository.CM001_单位基本资料表Repository; import org.ylgjj.loan.repository.DP005_单位分户账_Repository; import org.ylgjj.loan.repository.DP021_单位缴存登记薄Repository; import java.time.LocalDate; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.stream.Collectors; /** * Created by silence yuan on 2015/7/25. */ @Service public class S_191_SEQ_历史累计回收额__提前还清___AND_0302010206_HistoryServiceImpl extends HistoryServiceImpl{ StatisticalIndexCodeEnum statisticalIndexCodeEnum = StatisticalIndexCodeEnum.S_191_SEQ_历史累计回收额__提前还清___AND_0302010206; @Autowired private DP021_单位缴存登记薄Repository dp021_单位缴存登记薄Repository; @Autowired private DP005_单位分户账_Repository dp005__单位分户账_repository; @Autowired private CM001_单位基本资料表Repository cm001单位基本资料表Repository; public void test() { List<Triplet<Long,LocalDate,LocalDate>> t = run统计周期编码( LocalDate.now().minusDays(3),LocalDate.now(),StatisticalIndexCodeEnum.S_66_SEQ_暂存款余额_AND_0301008102); System.out.println( t+"dddddddddddddddddd"); } public void process() { //流水_单位缴存spanTimeSpan( LocalDate.now().minusDays(20000),LocalDate.now()); targetHistory( LocalDate.now().minusDays(20000),LocalDate.now()); } public void 流水_单位缴存spanTimeSpan(LocalDate beginDateTotal, LocalDate endDateTotal) { Map<String, CM001_单位基本资料表> cm001_单位基本资料表Map = null; Map<String, DP005_单位分户账> dp005_work_unit_单位分户账Map = null; List<DP021_单位缴存登记簿> dp021_单位缴存登记簿s = dp021_单位缴存登记薄Repository.findByRegdate不可为空登记日期Between(beginDateTotal.minusDays(1),endDateTotal.plusDays(1)); System.out.println("beginDate----------"+ beginDateTotal+"----------endDate----"+endDateTotal); List<String> dp = dp021_单位缴存登记簿s.stream().map(e->e.getUnitaccnum单位账号()).distinct().collect(Collectors.toList()); cm001_单位基本资料表Map = cm001_单位基本资料表Map(dp); dp005_work_unit_单位分户账Map = dp005_单位分户账Map(dp); List<Triplet<Long,LocalDate,LocalDate>> triplets = run统计周期编码(beginDateTotal,endDateTotal,statisticalIndexCodeEnum); Map<String, CM001_单位基本资料表> finalCm001_单位基本资料表Map = cm001_单位基本资料表Map; Map<String, DP005_单位分户账> finalDp005_work_unit_单位分户账Map = dp005_work_unit_单位分户账Map; triplets.stream().forEach(t->{ LocalDate beginDate = t.getValue1(); LocalDate endDate = t.getValue2(); dp021_单位缴存登记簿s .stream() .filter(x->x.getInaccdate不可为空入账日期().isAfter(beginDate) && x.getInaccdate不可为空入账日期().isBefore(endDate)) .collect(Collectors.toList()).stream().map(e -> { //TODO 获得某一日的缴存列表; DP005_单位分户账 dp005_单位分户账 = finalDp005_work_unit_单位分户账Map.get(e.getUnitaccnum单位账号()); CM001_单位基本资料表 cm001_单位基本资料表 = finalCm001_单位基本资料表Map.get(dp005_单位分户账.getUnitcustid_单位客户号()); return Triplet.with(e, cm001_单位基本资料表, dp005_单位分户账); }) .collect(Collectors.groupingBy(e -> e.getValue1().getAgentinstcode_经办机构())).entrySet().forEach(eee -> { // TODO 按照 经济类型 eee.getValue().stream().collect(Collectors.groupingBy(e -> e.getValue1().getUnitkind_单位性质())).entrySet().forEach(o -> { CollectHistory loanHistory = new CollectHistory(beginDate,statisticalIndexCodeEnum); loanHistory.setIndexNo(eee.getKey()); // 机构名称 loanHistory.setDimension1(eee.getKey()); // 机构名称 loanHistory.setDimension2(o.getKey()); // 银行名称 loanHistory.setBeginDate(beginDate); loanHistory.setEndDate(endDate); loanHistory.setSeqNum(t.getValue0()); loanHistory.setLongValue(o.getValue().stream() // .filter(x->x.getValue0().getEndym_截止年月().equals(beginDate.with(TemporalAdjusters.firstDayOfMonth()))) // .filter(x->x.getValue0().getBegym_开始年月().equals(beginDate.with(TemporalAdjusters.lastDayOfMonth()))) .filter(x->x.getValue0().getDptype_缴存类型().equals(E_DP021_单位缴存登记簿_缴存类型.预缴.getText())) .count()); // collectHistoryRepository.save(loanHistory); }); }); }); } public void targetHistory(LocalDate beginDateTotal, LocalDate endDateTotal) { Map<String, CM001_单位基本资料表> cm001_单位基本资料表Map = null; Map<String, DP005_单位分户账> dp005_work_unit_单位分户账Map = null; List<DW025_公积金提取审核登记表> dw145_提取结算登记簿s = dw025_公积金提取审核登记表_repository.findAll(); System.out.println("beginDate----------"+ beginDateTotal+"----------endDate----"+endDateTotal); List<String> dp = dw145_提取结算登记簿s.stream().map(e->e.getUnitaccnum单位账号()).distinct().collect(Collectors.toList()); cm001_单位基本资料表Map = cm001_单位基本资料表Map(dp); dp005_work_unit_单位分户账Map = dp005_单位分户账Map(dp); Map<String, List<DP202_单位缴存变更登记簿>> dp202_单位缴存变更登记簿Map = dp202_单位缴存变更登记簿Map(dp); List<Triplet<Long,LocalDate,LocalDate>> triplets = run统计周期编码(beginDateTotal,endDateTotal,statisticalIndexCodeEnum); Map<String, CM001_单位基本资料表> finalCm001_单位基本资料表Map = cm001_单位基本资料表Map; Map<String, DP005_单位分户账> finalDp005_work_unit_单位分户账Map = dp005_work_unit_单位分户账Map; triplets.stream().forEach(t->{ LocalDate beginDate = t.getValue1(); LocalDate endDate = t.getValue2(); dw145_提取结算登记簿s .stream() //.filter(x->x.getTransdate不可为空交易日期().isAfter(beginDate) && x.getTransdate不可为空交易日期().isBefore(endDate)) .collect(Collectors.toList()).stream().map(e -> { //TODO 获得某一日的缴存列表; DP005_单位分户账 dp005_单位分户账 = finalDp005_work_unit_单位分户账Map.get(e.getUnitaccnum单位账号()); CM001_单位基本资料表 cm001_单位基本资料表 = finalCm001_单位基本资料表Map.get(dp005_单位分户账.getUnitcustid_单位客户号()); return Triplet.with(e, cm001_单位基本资料表, dp005_单位分户账); }).collect(Collectors.groupingBy(e->e.getValue0().getTransdate交易日期())) .entrySet() .stream() .sorted(Comparator.comparingLong(e->e.getKey().toEpochDay())) .forEach(e -> { TargetHistory loanHistory = new TargetHistory(e.getKey(), statisticalIndexCodeEnum); Long value= e.getValue().stream() .filter(i->i.getValue0().getApprstate_审批状态().equals("d")) .filter(i->i.getValue0().getTransdate交易日期().equals(beginDate)) // .filter(x->x.get().equals(n)) .count(); loanHistory.setDeltaLongValue(value.longValue()); targetHistoryRepository.save(loanHistory); }); }); } }
[ "1026957152@qq.com" ]
1026957152@qq.com
243031007a1ae7e0a6c2984ffc105571a281b804
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/baike/sources/qsbk/app/core/widget/ae.java
e10bcdb5e8036af687afd2a76a123695edd8d87a
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
343
java
package qsbk.app.core.widget; class ae implements Runnable { final /* synthetic */ VolumeControllerView a; ae(VolumeControllerView volumeControllerView) { this.a = volumeControllerView; } public void run() { this.a.a(); this.a.postInvalidate(); this.a.postDelayed(new af(this), 300); } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
954b3286267ac231051be8fde0338b586ef681f3
b263c4ecc2574234767ca61fbc6f2c5049569770
/egg_32_stack_overflow_45600351/com.allstate.jigsaw/src/main/java/com/allstate/jigsaw/JigsawTest.java
4afa9f956951ce49465e5d48259909dacfef9095
[ "Apache-2.0" ]
permissive
codetojoy/easter_eggs_for_java_9
2716c2fcea308783112657ffd9635caef4f59c65
d4ab32a6151a7ee5f93a21a8cda6bbc0d78b636e
refs/heads/master
2022-06-25T12:28:53.917672
2022-06-15T20:02:40
2022-06-15T20:02:40
85,390,185
29
16
null
null
null
null
UTF-8
Java
false
false
566
java
package com.allstate.jigsaw; import org.springframework.boot.autoconfigure.SpringBootApplication; import java.util.logging.Level; import java.util.logging.Logger; @SpringBootApplication public class JigsawTest { private static Logger logger = Logger.getLogger("JigsawTest"); public static void main(String[] args) { System.out.println("test hello world"); logger.log(Level.INFO,"testing hello world for {0}","Jay"); } //Error:java: the unnamed module reads package org.apache.commons.logging from both jcl.over.slf4j and spring.jcl }
[ "codetojoy@gmail.com" ]
codetojoy@gmail.com
12c5a24f59a7fbb560b4fad32ab29b7618db9dc6
dfd41710fb20bd684b3bd879b5458e278f00230e
/Node1.java
9f63a3b513335b361bdb2ea3e70cc9b656858522
[]
no_license
Nisha556/JTree
9ef273f9c692342dcaad1a36a4265ac411c6e2e9
b313027d30712bffb4188281d3b0777044c31195
refs/heads/master
2022-12-02T06:05:02.371635
2020-08-23T17:01:36
2020-08-23T17:01:36
285,636,155
0
0
null
null
null
null
UTF-8
Java
false
false
639
java
package Tree; public class Node1 { int key; Node1 left , right; public Node1(int item) { key = item; left = right = null; } } class BinaryTree1 { Node1 root; BinaryTree1(int key) { root = new Node1(key); } BinaryTree1() { root = null; } public static void main(String args[]) { BinaryTree1 tree = new BinaryTree1(); tree.root= new Node1(1); tree.root.left= new Node1(2); tree.root.right= new Node1(3); tree.root.left.left= new Node1(4); System.out.println(tree.root); System.out.println(tree.root.left); System.out.println(tree.root.right); System.out.println(tree.root.left.left); } }
[ "shandilyanisha1@gmail.com" ]
shandilyanisha1@gmail.com
c0e434bbc0ace77dba4b3d19195ab3da5d05fa2b
9ab5bdb918b886f1f2d09d81efb63ff83a86bfb0
/core/src/test/java/com/jdt/fedlearn/core/integratedTest/verticalLogistic/TestVerticalLROnlyLabel.java
cf674e23ccaaa4cbe578d8843393fda031cf0f91
[ "Apache-2.0" ]
permissive
BestJex/fedlearn
75a795ec51c4a37af34886c551874df419da3a9c
15395f77ac3ddd983ae3affb1c1a9367287cc125
refs/heads/master
2023-06-17T01:27:36.143351
2021-07-19T10:43:09
2021-07-19T10:43:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,061
java
package com.jdt.fedlearn.core.integratedTest.verticalLogistic; import com.jdt.fedlearn.core.dispatch.VerticalLogisticRegression; import com.jdt.fedlearn.core.entity.ClientInfo; import com.jdt.fedlearn.core.entity.common.CommonRequest; import com.jdt.fedlearn.core.entity.feature.Features; import com.jdt.fedlearn.core.example.CommonRun; import com.jdt.fedlearn.core.model.Model; import com.jdt.fedlearn.core.model.VerticalLRModel; import com.jdt.fedlearn.core.parameter.VerticalLRParameter; import com.jdt.fedlearn.core.psi.MappingReport; import com.jdt.fedlearn.core.psi.MatchResult; import com.jdt.fedlearn.core.type.MappingType; import com.jdt.fedlearn.core.type.MetricType; import com.jdt.fedlearn.core.type.OptimizerType; import com.jdt.fedlearn.core.type.data.Tuple2; import com.jdt.fedlearn.core.util.DataParseUtil; import com.jdt.fedlearn.core.util.FileUtil; import java.io.IOException; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 线性回归集成测试,包含除了网络以外的所有 * 主要是测试了 序列化/反序列化,模型的保存和加载 */ public class TestVerticalLROnlyLabel { //服务端维护 private static final String trainId = "19"; private static final String modelToken = trainId + "_123456_only_label"; private static final MetricType[] metrics = new MetricType[]{MetricType.CROSS_ENTRO, MetricType.G_L2NORM}; private static final VerticalLRParameter parameter = new VerticalLRParameter(0.1, 1, metrics, OptimizerType.BatchGD, 0, 2, "L1", 0.0); private static final VerticalLogisticRegression regression = new VerticalLogisticRegression(parameter); private ClientInfo[] clientInfos; private static final Map<ClientInfo, String[][]> rawDataMap = new HashMap<>(); private static final Map<ClientInfo, String[][]> inferenceRawData = new HashMap<>(); // private Map<ClientInfo, Features> featuresMap = new HashMap<>(); //此处为需要手动配置的四个选项,分别是数据文件夹目录,参与方个数,有label的参与方id,label的名字。 private final String baseDir = "/home/fan/Data/bank_market/onlylabel/"; private static final int partnerSize = 2; private static final int labelIndex = 0; private static final String labelName = "y"; // private final String baseDir = "./src/test/resources/bank/class"; // private static final int partnerSize = 3; // private static final int labelIndex = 0; // private static final String labelName = "y"; public void init() { //---------------------------下面不需要手动设置-------------------------------------// this.clientInfos = new ClientInfo[partnerSize]; for (int i = 0; i < partnerSize; i++) { this.clientInfos[i] = new ClientInfo("127.0.0.1", 80 + i, "http"); String fileName = "train"+i + ".csv"; String[][] data1 = DataParseUtil.loadTrainFromFile(baseDir + fileName); rawDataMap.put(clientInfos[i], data1); String inferenceFileName = "inference" + (i+1) + ".csv"; String[][] inferenceData = DataParseUtil.loadTrainFromFile(baseDir + inferenceFileName); inferenceRawData.put(clientInfos[i], inferenceData); } //设置客户端是否有label // clientInfos[labelIndex].setHasLabel(true); } public void testTrainAndTest() throws IOException { ////-----------id match and feature process-------------//////////////// Tuple2<MappingReport, String[]> mappingOutput = CommonRun.match(MappingType.VERTICAL_MD5, Arrays.asList(clientInfos.clone()), rawDataMap); String[] commonIds = mappingOutput._2(); MatchResult matchResult = new MatchResult(mappingOutput._1().getSize()); Map<ClientInfo, Features> featuresMap = new HashMap<>(); for (Map.Entry<ClientInfo, String[][]> entry : rawDataMap.entrySet()) { Features features = DataParseUtil.fetchFeatureFromData(entry.getValue()); featuresMap.put(entry.getKey(), features); } //设置哪方那个特征是label featuresMap.get(clientInfos[labelIndex]).setLabel(labelName); ////----------id match end------------///////////////// Map<ClientInfo, Model> modelMap = new HashMap<>(); //每个客户端维护自己的,所以此处有n份 for (ClientInfo client : clientInfos) { modelMap.put(client, new VerticalLRModel()); } List<CommonRequest> initRequests = regression.initControl(Arrays.asList(clientInfos.clone()), matchResult, featuresMap, new HashMap<>()); CommonRun.train(regression, initRequests, modelMap, rawDataMap, commonIds); //model save for (Map.Entry<ClientInfo, Model> x : modelMap.entrySet()) { VerticalLRModel verticalLinearModel = (VerticalLRModel) x.getValue(); System.out.println(x.getKey().url()); System.out.println(x.getKey().url()); System.out.println(x.getKey().url()); String key = x.getKey().getPort() + ""; String content = verticalLinearModel.serialize(); FileUtil.saveModel(content, "./" + modelToken + "_" + key + ".model"); } } public void testInference() throws IOException { // 加载模型 Map<ClientInfo, Model> modelMap = new HashMap<>(); for (ClientInfo clientInfo : clientInfos) { String path = "./" + modelToken + "_" + clientInfo.getPort() + ".model"; String content = FileUtil.loadModel(path); VerticalLRModel tmp = new VerticalLRModel(); tmp.deserialize(content); modelMap.put(clientInfo, tmp); } //根据需要预测的id,和任务id,生成预测请求 // String[] predictUid = DataParseUtil.loadInferenceUidList(baseDir + "inference0_onlyLabel.csv"); String[] predictUid = new String[]{"0kU", "1mX" ,"3PA" , "4oX" ,"5Ng"}; System.out.println("predictUid.length " + predictUid.length); long start = System.currentTimeMillis(); List<CommonRequest> requests = regression.initInference(Arrays.asList(clientInfos.clone()), predictUid); //initial request double[][] result = CommonRun.inference(regression, requests, modelMap, inferenceRawData).getPredicts(); System.out.println((System.currentTimeMillis() - start) + " ms"); System.out.println("inference result is " + Arrays.toString(result)); // double[] tmp = DataLoad.loadInferenceYList(baseDir + "0_ori.csv"); // System.out.println("inference auc is " + Metric.auc(result, tmp)); // System.out.println("inference accuracy is " + Metric.accuracy(result, tmp)); // return result; } public static void main(String[] args) throws IOException { TestVerticalLROnlyLabel verticalLR = new TestVerticalLROnlyLabel(); verticalLR.init(); verticalLR.testTrainAndTest(); verticalLR.testInference(); } }
[ "wangpeiqi@jd.com" ]
wangpeiqi@jd.com
ca0a9c1cd12fe2d09f5aa67853317a4d8c8f7bc7
42c6b3676bb3f3e228555ef89ce937d0269d75aa
/app/src/main/java/com/qixiu/newoulingzhu/mvp/view/activity/guidepage/GuidePageActivity.java
6b82d97ed0e54de3c97c848b26715860fe8b1011
[]
no_license
q37141826/new_wangchang
61ee67af4ab07cf24e897e5d0848d74e091ba3f2
252a5418759e8d5d3d2369ff24eac7382bc5ffc2
refs/heads/master
2020-04-03T14:03:17.847515
2019-04-01T03:43:46
2019-04-01T03:44:46
155,309,950
0
1
null
null
null
null
UTF-8
Java
false
false
3,120
java
package com.qixiu.newoulingzhu.mvp.view.activity.guidepage; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.ImageView; import com.qixiu.newoulingzhu.constant.ConstantString; import com.qixiu.newoulingzhu.mvp.view.activity.LoginActivity; import com.qixiu.newoulingzhu.mvp.view.activity.MainActivity; import com.qixiu.newoulingzhu.utils.Preference; import com.qixiu.wanchang.R; import java.util.ArrayList; import java.util.List; public class GuidePageActivity extends AppCompatActivity { private ViewPager viewPager_guidepage; PagerAdapter adapter; List<View> images=new ArrayList<>(); int currentPosition; int imageresourses[]={R.mipmap.guide01, R.mipmap.guide02, R.mipmap.guide03}; public static void start(Context context){ Intent intent =new Intent(context,GuidePageActivity.class); context.startActivity(intent); } @Override protected void onCreate(Bundle savedInstanceState) { //隐藏状态栏 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); super.onCreate(savedInstanceState); setContentView(R.layout.activity_guide_page2); viewPager_guidepage = (ViewPager) findViewById(R.id.viewPager_guidepage); for (int i = 0; i < 3; i++) { ImageView imageView = new ImageView(this); ViewGroup.LayoutParams param = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); imageView.setLayoutParams(param); imageView.setImageResource(imageresourses[i]); images.add(imageView); imageView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(currentPosition==2){ if (Preference.get(ConstantString.USERID,"").equals("")) { LoginActivity.start(getApplication(),true); }else { MainActivity.start(GuidePageActivity.this); } GuidePageActivity.this.finish(); } } }); } adapter=new VpAdapter(images); viewPager_guidepage.setAdapter(adapter); viewPager_guidepage.setOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { currentPosition=position; } @Override public void onPageScrollStateChanged(int state) { } }); } }
[ "272670440@qq.com" ]
272670440@qq.com
3cc16b6973466d9db49d2ec8800c451427797020
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project90/src/main/java/org/gradle/test/performance90_2/Production90_165.java
8c32f134bedec00527ef7f5ed1f2a16548ef8b0a
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance90_2; public class Production90_165 extends org.gradle.test.performance16_2.Production16_165 { private final String property; public Production90_165() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
38340d2149774430437c489672b1509b356c5517
eb5f5353f49ee558e497e5caded1f60f32f536b5
/javax/swing/AbstractCellEditor.java
d9b6275df5a7d6bb30f236f563579598c37b6abd
[]
no_license
mohitrajvardhan17/java1.8.0_151
6fc53e15354d88b53bd248c260c954807d612118
6eeab0c0fd20be34db653f4778f8828068c50c92
refs/heads/master
2020-03-18T09:44:14.769133
2018-05-23T14:28:24
2018-05-23T14:28:24
134,578,186
0
2
null
null
null
null
UTF-8
Java
false
false
2,317
java
package javax.swing; import java.io.Serializable; import java.util.EventObject; import javax.swing.event.CellEditorListener; import javax.swing.event.ChangeEvent; import javax.swing.event.EventListenerList; public abstract class AbstractCellEditor implements CellEditor, Serializable { protected EventListenerList listenerList = new EventListenerList(); protected transient ChangeEvent changeEvent = null; public AbstractCellEditor() {} public boolean isCellEditable(EventObject paramEventObject) { return true; } public boolean shouldSelectCell(EventObject paramEventObject) { return true; } public boolean stopCellEditing() { fireEditingStopped(); return true; } public void cancelCellEditing() { fireEditingCanceled(); } public void addCellEditorListener(CellEditorListener paramCellEditorListener) { listenerList.add(CellEditorListener.class, paramCellEditorListener); } public void removeCellEditorListener(CellEditorListener paramCellEditorListener) { listenerList.remove(CellEditorListener.class, paramCellEditorListener); } public CellEditorListener[] getCellEditorListeners() { return (CellEditorListener[])listenerList.getListeners(CellEditorListener.class); } protected void fireEditingStopped() { Object[] arrayOfObject = listenerList.getListenerList(); for (int i = arrayOfObject.length - 2; i >= 0; i -= 2) { if (arrayOfObject[i] == CellEditorListener.class) { if (changeEvent == null) { changeEvent = new ChangeEvent(this); } ((CellEditorListener)arrayOfObject[(i + 1)]).editingStopped(changeEvent); } } } protected void fireEditingCanceled() { Object[] arrayOfObject = listenerList.getListenerList(); for (int i = arrayOfObject.length - 2; i >= 0; i -= 2) { if (arrayOfObject[i] == CellEditorListener.class) { if (changeEvent == null) { changeEvent = new ChangeEvent(this); } ((CellEditorListener)arrayOfObject[(i + 1)]).editingCanceled(changeEvent); } } } } /* Location: C:\Program Files (x86)\Java\jre1.8.0_151\lib\rt.jar!\javax\swing\AbstractCellEditor.class * Java compiler version: 8 (52.0) * JD-Core Version: 0.7.1 */
[ "mohit.rajvardhan@ericsson.com" ]
mohit.rajvardhan@ericsson.com
9a226c6983046a9b001b565ef8ea5984f38ab331
419d8ddce5a33e2025a906638fb1ab4918464cd2
/spring-data-redis-2.2.12.RELEASE/src/main/java/org/springframework/data/redis/connection/ReactiveSubscription.java
0f5b420c14a2685d2974cc040e7bf3e55041c78d
[ "Apache-2.0" ]
permissive
ynan1213/Java-Study
43ac8ba546fc5a6188ee8872767fa316dfea4a32
1d933138e79ef2cb8ea4de57abc84ac12d883a0a
refs/heads/master
2022-06-30T11:54:23.245439
2021-12-05T01:43:03
2021-12-05T01:43:03
152,955,095
1
0
null
2022-06-21T04:21:49
2018-10-14T08:44:55
Java
UTF-8
Java
false
false
7,529
java
/* * Copyright 2018-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.data.redis.connection; import lombok.EqualsAndHashCode; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import java.nio.ByteBuffer; import java.util.Set; import org.springframework.util.Assert; /** * Subscription for Redis channels using reactive infrastructure. A {@link ReactiveSubscription} allows subscribing to * {@link #subscribe(ByteBuffer...) channels} and {@link #pSubscribe(ByteBuffer...) patterns}. It provides access to the * {@link ChannelMessage} {@link #receive() stream} that emits only messages for channels and patterns registered in * this {@link ReactiveSubscription}. * <p /> * A reactive Redis connection can have multiple subscriptions. If two or more subscriptions subscribe to the same * target (channel/pattern) and one unsubscribes, then the other one will no longer receive messages for the target due * to how Redis handled Pub/Sub subscription. * * @author Mark Paluch * @author Christoph Strobl * @since 2.1 */ public interface ReactiveSubscription { /** * Subscribes to the {@code channels} and adds these to the current subscription. * * @param channels channel names. Must not be empty. * @return empty {@link Mono} that completes once the channel subscription is registered. */ Mono<Void> subscribe(ByteBuffer... channels); /** * Subscribes to the channel {@code patterns} and adds these to the current subscription. * * @param patterns channel patterns. Must not be empty. * @return empty {@link Mono} that completes once the pattern subscription is registered. */ Mono<Void> pSubscribe(ByteBuffer... patterns); /** * Cancels the current subscription for all {@link #getChannels() channels}. * * @return empty {@link Mono} that completes once the channel subscriptions are unregistered. */ Mono<Void> unsubscribe(); /** * Cancels the current subscription for all given channels. * * @param channels channel names. Must not be empty. * @return empty {@link Mono} that completes once the channel subscriptions are unregistered. */ Mono<Void> unsubscribe(ByteBuffer... channels); /** * Cancels the subscription for all channels matched by {@link #getPatterns()} patterns}. * * @return empty {@link Mono} that completes once the patterns subscriptions are unregistered. */ Mono<Void> pUnsubscribe(); /** * Cancels the subscription for all channels matching the given patterns. * * @param patterns must not be empty. * @return empty {@link Mono} that completes once the patterns subscriptions are unregistered. */ Mono<Void> pUnsubscribe(ByteBuffer... patterns); /** * Returns the (named) channels for this subscription. * * @return {@link Set} of named channels. */ Set<ByteBuffer> getChannels(); /** * Returns the channel patters for this subscription. * * @return {@link Set} of channel patterns. */ Set<ByteBuffer> getPatterns(); /** * Retrieve the message stream emitting {@link Message messages}. The resulting message stream contains only messages * for subscribed and registered {@link #getChannels() channels} and {@link #getPatterns() patterns}. * <p /> * Stream publishing uses {@link reactor.core.publisher.ConnectableFlux} turning the stream into a hot sequence. * Emission is paused if there is no demand. Messages received in that time are buffered. This stream terminates * either if all subscribers unsubscribe or if this {@link Subscription} is {@link #cancel() is terminated}. * * @return {@link Flux} emitting the {@link Message} stream. */ Flux<Message<ByteBuffer, ByteBuffer>> receive(); /** * Unsubscribe from all {@link #getChannels() channels} and {@link #getPatterns() patterns} and request termination of * all active {@link #receive() message streams}. Active streams will terminate with a * {@link java.util.concurrent.CancellationException}. * * @return a {@link Mono} that completes once termination is finished. */ Mono<Void> cancel(); /** * {@link Message} represents a Redis channel message within Redis pub/sub. * * @param <C> channel representation type. * @param <M> message representation type. * @author Christoph Strobl * @since 2.1 */ interface Message<C, M> { /** * Get the channel the message published to. * * @return never {@literal null}. */ C getChannel(); /** * Get the actual message body. * * @return never {@literal null}. */ M getMessage(); } /** * Value object for a Redis channel message. * * @param <C> type of how the channel name is represented. * @param <M> type of how the message is represented. * @author Mark Paluch * @author Christoph Strobl * @since 2.1 */ @EqualsAndHashCode class ChannelMessage<C, M> implements Message<C, M> { private final C channel; private final M message; /** * Create a new {@link ChannelMessage}. * * @param channel must not be {@literal null}. * @param message must not be {@literal null}. */ public ChannelMessage(C channel, M message) { Assert.notNull(channel, "Channel must not be null!"); Assert.notNull(message, "Message must not be null!"); this.channel = channel; this.message = message; } /* * (non-Javadoc) * @see org.springframework.data.redis.connection.ReactiveSubscription.Message#getChannel() */ @Override public C getChannel() { return channel; } /* * (non-Javadoc) * @see org.springframework.data.redis.connection.ReactiveSubscription.Message#getMessage() */ @Override public M getMessage() { return message; } @Override public String toString() { return "ChannelMessage {" + "channel=" + channel + ", message=" + message + '}'; } } /** * Value object for a Redis channel message received from a pattern subscription. * * @param <P> type of how the pattern is represented. * @param <C> type of how the channel name is represented. * @param <M> type of how the message is represented. * @author Mark Paluch * @author Christoph Strobl * @since 2.1 */ @EqualsAndHashCode(callSuper = true) class PatternMessage<P, C, M> extends ChannelMessage<C, M> { private final P pattern; /** * Create a new {@link PatternMessage}. * * @param pattern must not be {@literal null}. * @param channel must not be {@literal null}. * @param message must not be {@literal null}. */ public PatternMessage(P pattern, C channel, M message) { super(channel, message); Assert.notNull(pattern, "Pattern must not be null!"); this.pattern = pattern; } /** * Get the pattern that matched the channel. * * @return never {@literal null}. */ public P getPattern() { return pattern; } @Override public String toString() { return "PatternMessage{" + "channel=" + getChannel() + ", pattern=" + pattern + ", message=" + getMessage() + '}'; } } }
[ "452245790@qq.com" ]
452245790@qq.com
4f2c0e24d416c3acec93fb636dcc58784cac580f
a919b8da8bc1564aa48497250d22cd32796dce8c
/aeron-cluster/src/main/java/io/aeron/cluster/LogAppender.java
c31a303d0138da997d4275382767d15bcbae9278
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
AlexxNica/aeron
85b0c3c61ad899fd220130e2f48115a454dee86e
352880c5ca75ded7dc6fb5cf69aa830bdba57ab7
refs/heads/master
2021-08-24T10:58:48.817721
2017-12-09T11:07:27
2017-12-09T11:07:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,789
java
/* * Copyright 2017 Real Logic Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.aeron.cluster; import io.aeron.Publication; import io.aeron.cluster.codecs.*; import io.aeron.logbuffer.BufferClaim; import org.agrona.CloseHelper; import org.agrona.DirectBuffer; import org.agrona.concurrent.UnsafeBuffer; class LogAppender implements AutoCloseable { private static final int SEND_ATTEMPTS = 3; private final MessageHeaderEncoder messageHeaderEncoder = new MessageHeaderEncoder(); private final SessionHeaderEncoder sessionHeaderEncoder = new SessionHeaderEncoder(); private final SessionOpenEventEncoder connectEventEncoder = new SessionOpenEventEncoder(); private final SessionCloseEventEncoder closeEventEncoder = new SessionCloseEventEncoder(); private final TimerEventEncoder timerEventEncoder = new TimerEventEncoder(); private final BufferClaim bufferClaim = new BufferClaim(); private final Publication publication; LogAppender(final Publication publication) { this.publication = publication; } public void close() { CloseHelper.close(publication); } public boolean appendMessage(final DirectBuffer buffer, final int offset, final int length, final long nowMs) { sessionHeaderEncoder .wrap((UnsafeBuffer)buffer, offset + MessageHeaderEncoder.ENCODED_LENGTH) .timestamp(nowMs); int attempts = SEND_ATTEMPTS; do { if (publication.offer(buffer, offset, length) > 0) { return true; } } while (--attempts > 0); return false; } public boolean appendConnectedSession(final ClusterSession session, final long timestampMs) { final String channel = session.responsePublication().channel(); final int length = MessageHeaderEncoder.ENCODED_LENGTH + SessionOpenEventEncoder.BLOCK_LENGTH + SessionOpenEventEncoder.responseChannelHeaderLength() + channel.length(); int attempts = SEND_ATTEMPTS; do { if (publication.tryClaim(length, bufferClaim) > 0) { connectEventEncoder .wrapAndApplyHeader(bufferClaim.buffer(), bufferClaim.offset(), messageHeaderEncoder) .clusterSessionId(session.id()) .correlationId(session.lastCorrelationId()) .timestamp(timestampMs) .responseStreamId(session.responsePublication().streamId()) .responseChannel(channel); bufferClaim.commit(); return true; } } while (--attempts > 0); return false; } public boolean appendClosedSession(final ClusterSession session, final CloseReason closeReason, final long nowMs) { final int length = MessageHeaderEncoder.ENCODED_LENGTH + SessionCloseEventEncoder.BLOCK_LENGTH; int attempts = SEND_ATTEMPTS; do { if (publication.tryClaim(length, bufferClaim) > 0) { closeEventEncoder .wrapAndApplyHeader(bufferClaim.buffer(), bufferClaim.offset(), messageHeaderEncoder) .clusterSessionId(session.id()) .timestamp(nowMs) .closeReason(closeReason); bufferClaim.commit(); return true; } } while (--attempts > 0); return false; } public boolean appendTimerEvent(final long correlationId, final long nowMs) { final int length = MessageHeaderEncoder.ENCODED_LENGTH + TimerEventEncoder.BLOCK_LENGTH; int attempts = SEND_ATTEMPTS; do { if (publication.tryClaim(length, bufferClaim) > 0) { timerEventEncoder .wrapAndApplyHeader(bufferClaim.buffer(), bufferClaim.offset(), messageHeaderEncoder) .correlationId(correlationId) .timestamp(nowMs); bufferClaim.commit(); return true; } } while (--attempts > 0); return false; } }
[ "mjpt777@gmail.com" ]
mjpt777@gmail.com
fdeaaa25836d86e0269dbf028cb0923942c49d4c
863acb02a064a0fc66811688a67ce3511f1b81af
/sources/com/mopub/common/LocationService.java
544b3f7ba17254d2a579c6c805f27bced65ec52f
[ "MIT" ]
permissive
Game-Designing/Custom-Football-Game
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
47283462b2066ad5c53b3c901182e7ae62a34fc8
refs/heads/master
2020-08-04T00:02:04.876780
2019-10-06T06:55:08
2019-10-06T06:55:08
211,914,568
1
1
null
null
null
null
UTF-8
Java
false
false
7,065
java
package com.mopub.common; import android.content.Context; import android.location.Location; import android.location.LocationManager; import android.os.SystemClock; import com.mopub.common.logging.MoPubLog; import com.mopub.common.logging.MoPubLog.SdkLogEvent; import com.mopub.common.util.DeviceUtils; import java.math.BigDecimal; public class LocationService { /* renamed from: a */ private static volatile LocationService f34333a; @VisibleForTesting /* renamed from: b */ Location f34334b; @VisibleForTesting /* renamed from: c */ long f34335c; public enum LocationAwareness { NORMAL, TRUNCATED, DISABLED; @Deprecated public com.mopub.common.MoPub.LocationAwareness getNewLocationAwareness() { if (this == TRUNCATED) { return com.mopub.common.MoPub.LocationAwareness.TRUNCATED; } if (this == DISABLED) { return com.mopub.common.MoPub.LocationAwareness.DISABLED; } return com.mopub.common.MoPub.LocationAwareness.NORMAL; } @Deprecated public static LocationAwareness fromMoPubLocationAwareness(com.mopub.common.MoPub.LocationAwareness awareness) { if (awareness == com.mopub.common.MoPub.LocationAwareness.DISABLED) { return DISABLED; } if (awareness == com.mopub.common.MoPub.LocationAwareness.TRUNCATED) { return TRUNCATED; } return NORMAL; } } public enum ValidLocationProvider { NETWORK("network"), GPS("gps"); /* renamed from: b */ final String f34338b; private ValidLocationProvider(String name) { this.f34338b = name; } public String toString() { return this.f34338b; } /* access modifiers changed from: private */ /* renamed from: a */ public boolean m37022a(Context context) { int i = C11255o.f34429a[ordinal()]; String str = "android.permission.ACCESS_FINE_LOCATION"; boolean z = false; if (i == 1) { if (DeviceUtils.isPermissionGranted(context, str) || DeviceUtils.isPermissionGranted(context, "android.permission.ACCESS_COARSE_LOCATION")) { z = true; } return z; } else if (i != 2) { return false; } else { return DeviceUtils.isPermissionGranted(context, str); } } } private LocationService() { } @VisibleForTesting /* renamed from: a */ static LocationService m37019a() { LocationService locationService = f34333a; if (locationService == null) { synchronized (LocationService.class) { locationService = f34333a; if (locationService == null) { locationService = new LocationService(); f34333a = locationService; } } } return locationService; } public static Location getLastKnownLocation(Context context, int locationPrecision, com.mopub.common.MoPub.LocationAwareness locationAwareness) { if (!MoPub.canCollectPersonalInformation()) { return null; } Preconditions.checkNotNull(context); Preconditions.checkNotNull(locationAwareness); if (locationAwareness == com.mopub.common.MoPub.LocationAwareness.DISABLED) { return null; } LocationService locationService = m37019a(); if (m37021b()) { return locationService.f34334b; } Location result = m37018a(m37017a(context, ValidLocationProvider.GPS), m37017a(context, ValidLocationProvider.NETWORK)); if (locationAwareness == com.mopub.common.MoPub.LocationAwareness.TRUNCATED) { m37020a(result, locationPrecision); } locationService.f34334b = result; locationService.f34335c = SystemClock.elapsedRealtime(); return result; } @VisibleForTesting /* renamed from: a */ static Location m37017a(Context context, ValidLocationProvider provider) { String str = " location provider."; String str2 = "Failed to retrieve location: device has no "; Preconditions.checkNotNull(context); Preconditions.checkNotNull(provider); if (!MoPub.canCollectPersonalInformation() || !provider.m37022a(context)) { return null; } try { return ((LocationManager) context.getSystemService("location")).getLastKnownLocation(provider.toString()); } catch (SecurityException e) { SdkLogEvent sdkLogEvent = SdkLogEvent.CUSTOM; StringBuilder sb = new StringBuilder(); sb.append("Failed to retrieve location from "); sb.append(provider.toString()); sb.append(" provider: access appears to be disabled."); MoPubLog.log(sdkLogEvent, sb.toString()); return null; } catch (IllegalArgumentException e2) { SdkLogEvent sdkLogEvent2 = SdkLogEvent.CUSTOM; StringBuilder sb2 = new StringBuilder(); sb2.append(str2); sb2.append(provider.toString()); sb2.append(str); MoPubLog.log(sdkLogEvent2, sb2.toString()); return null; } catch (NullPointerException e3) { SdkLogEvent sdkLogEvent3 = SdkLogEvent.CUSTOM; StringBuilder sb3 = new StringBuilder(); sb3.append(str2); sb3.append(provider.toString()); sb3.append(str); MoPubLog.log(sdkLogEvent3, sb3.toString()); return null; } } @VisibleForTesting /* renamed from: a */ static Location m37018a(Location a, Location b) { if (a == null) { return b; } if (b == null) { return a; } return a.getTime() > b.getTime() ? a : b; } @VisibleForTesting /* renamed from: a */ static void m37020a(Location location, int precision) { if (location != null && precision >= 0) { location.setLatitude(BigDecimal.valueOf(location.getLatitude()).setScale(precision, 5).doubleValue()); location.setLongitude(BigDecimal.valueOf(location.getLongitude()).setScale(precision, 5).doubleValue()); } } /* renamed from: b */ private static boolean m37021b() { LocationService locationService = m37019a(); boolean z = false; if (locationService.f34334b == null) { return false; } if (SystemClock.elapsedRealtime() - locationService.f34335c <= MoPub.getMinimumLocationRefreshTimeMillis()) { z = true; } return z; } @Deprecated @VisibleForTesting public static void clearLastKnownLocation() { m37019a().f34334b = null; } }
[ "tusharchoudhary0003@gmail.com" ]
tusharchoudhary0003@gmail.com
4f8d71a47b54060cda3ddb22e64105f68e360811
8a6601a873d103de74a714ff194ea1fa088639fe
/src/main/java/com/ast/eom/service/MainPageService.java
55be0f9b874811d7327f5107679310357c287867
[]
no_license
elliotyim/asterisk
12f797174d5b5663942e3fd8cd4ce7fa11cc9e86
a515beabed2aabc8437f5bbae11570be616ffdb4
refs/heads/master
2022-02-28T20:27:49.032149
2019-11-26T03:10:36
2019-11-26T03:10:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
144
java
package com.ast.eom.service; import java.util.Map; public interface MainPageService { Map<String, Object> getReviews() throws Exception; }
[ "yimsb02@naver.com" ]
yimsb02@naver.com
e4e3cd78cd197d06dcdf2e374f2ea7e5fdae7bda
17567c6b5b076021af735237c7e1925eee18f4ee
/android/app/src/main/java/com/blusteak_messenger_23606/MainActivity.java
aabb91a956b7f62434b7b7856de0ecc8f6b49ab8
[]
no_license
crowdbotics-apps/blusteak-messenger-23606
988220a0ffc44add2ee676d545c354ab276edf59
8f6450b95df28eae98726a97a108b10334c5ad0b
refs/heads/master
2023-06-28T09:26:51.999649
2020-12-30T06:52:10
2020-12-30T06:52:10
325,475,914
0
0
null
2021-08-03T20:07:34
2020-12-30T06:41:47
Python
UTF-8
Java
false
false
390
java
package com.blusteak_messenger_23606; import com.facebook.react.ReactActivity; public class MainActivity extends ReactActivity { /** * Returns the name of the main component registered from JavaScript. This is used to schedule * rendering of the component. */ @Override protected String getMainComponentName() { return "blusteak_messenger_23606"; } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
5530a0bd676d0c1b81a78554629921844db38e8c
c15b74e50f249df767047dcb2564faf6b8166c51
/src/main/java/com/xwy/one/wangwenjun/two/chapter5/Client.java
10493ee4ac806aa173ae3884c8448bf6c9b19077
[]
no_license
never123450/thread
09c469e97ea1e81d1fdec96bd0784808982540ca
d5727a1643de3a10130166b3b396bac0d294ca63
refs/heads/master
2022-07-22T20:06:05.124971
2022-07-21T02:33:41
2022-07-21T02:33:41
204,009,094
0
0
null
2022-07-11T21:09:34
2019-08-23T13:57:56
Java
UTF-8
Java
false
false
440
java
package com.xwy.one.wangwenjun.two.chapter5; /** * @description: * @author: xwy * @create: 3:24 PM 2020/5/19 **/ public class Client { public static void main(String[] args) { Gate gate = new Gate(); User bj = new User(gate, "bj", "beiJing"); User sh = new User(gate, "sh", "shangHai"); User gz = new User(gate, "gz", "guanZhou"); bj.start(); sh.start(); gz.start(); } }
[ "845619585@qq.com" ]
845619585@qq.com
a603d60697b928d690df28b01e567ee4f6b06da1
ca425bace580d7ec043cd7b0c3e586db52538a3b
/Algorithms2018/src/interview_bit/NextGreaterNumberBST.java
9c45e86a3c2fc7ca7a28210a0c8c277e16931bef
[]
no_license
mrincodi/Algorithms2018
78ba537b7ce4cbb43dffb7ecbb89f920d0c8134b
12ae6c0c75de5578ae47a62cf29bd8d6113c5034
refs/heads/master
2021-05-11T15:22:02.791798
2018-09-07T00:23:01
2018-09-07T00:23:01
117,728,320
0
0
null
null
null
null
UTF-8
Java
false
false
1,715
java
package interview_bit; //https://www.interviewbit.com/problems/next-greater-number-bst/ // This works, but is very wordy! // InterviewBit's solution goes down the tree until b is found, // but keeping a pointer to the node found with the smallest value greater than b. public class NextGreaterNumberBST { /** * Definition for binary tree * class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; } } public TreeNode getSuccessor(TreeNode a, int b) { TreeNode root = a; TreeNode pointer = a; while (root != null){ if (root.val == b){ // Return node to the right and all the way to the left. if ( root.right == null) return null; //It's the largest value in the tree. pointer = root.right; while (pointer.left != null){ pointer = pointer.left; } return pointer; } else if (root.val < b){ root = root.right; //The value is there, so it is never going to be null. } else { if (root.left.val > b) root = root.left; else if (root.left.val == b){ if (root.left.right == null) return root; else root = root.left; } else { //root.left.val < b. pointer = root.left; while (pointer.val < b) pointer = pointer.right; if ( pointer.val == b){ if (pointer.right == null) return root; else root = pointer; } else //pointer.val > b root = pointer; // It must be this node or one to the left of pointer. } } } return null; } public static void main(String[] args) { // TODO Auto-generated method stub } }
[ "mrincodi@gmail.com" ]
mrincodi@gmail.com
c1373ba9cda6146f5f3a0a547b8a343d8e2a3d33
e47fdf4b225402f6176d6ce7f21dc5421b47f98a
/src/main/java/com/example/demo/chapter_03/MainApplication.java
e4fd08aca1745ad688b371fc0ff2d90625fe5ad9
[]
no_license
umanking/java-realworld-software
4063da9f8d5801d2ef563ec21ef1269d2c2698c4
9d94873db45a6381f1b6db182a32048185803c6a
refs/heads/master
2023-05-06T19:28:34.385487
2021-05-29T06:00:15
2021-05-29T06:00:15
370,347,980
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
package com.example.demo.chapter_03; import java.io.IOException; public class MainApplication { public static void main(String[] args) throws IOException { BankStatementAnalyzer bankStatementAnalyzer = new BankStatementAnalyzer(); bankStatementAnalyzer.analyze("file", new BankStatementCSVParser()); } }
[ "umanking@gmail.com" ]
umanking@gmail.com
90b3f779e94a2d14f4072b6bf26f089501eda965
76852b1b29410436817bafa34c6dedaedd0786cd
/sources-2020-07-19-tempmail/sources/com/google/android/gms/internal/ads/zzbuo.java
3ef95ba5142ab5112bb7902e99579cc5d5c78e34
[]
no_license
zteeed/tempmail-apks
040e64e07beadd8f5e48cd7bea8b47233e99611c
19f8da1993c2f783b8847234afb52d94b9d1aa4c
refs/heads/master
2023-01-09T06:43:40.830942
2020-11-04T18:55:05
2020-11-04T18:55:05
310,075,224
0
0
null
null
null
null
UTF-8
Java
false
false
1,281
java
package com.google.android.gms.internal.ads; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; /* compiled from: com.google.android.gms:play-services-ads@@19.2.0 */ public final class zzbuo extends zzbwv<zzbup> implements zzbtd, zzbuf { /* renamed from: c reason: collision with root package name */ private final zzdkk f6642c; /* renamed from: d reason: collision with root package name */ private AtomicBoolean f6643d = new AtomicBoolean(); public zzbuo(Set<zzbyg<zzbup>> set, zzdkk zzdkk) { super(set); this.f6642c = zzdkk; } private final void D0() { zzvj zzvj; if (((Boolean) zzwg.e().c(zzaav.K3)).booleanValue() && this.f6643d.compareAndSet(false, true) && (zzvj = this.f6642c.X) != null && zzvj.f9194b == 3) { k0(new de(this)); } } /* access modifiers changed from: package-private */ public final /* synthetic */ void C0(zzbup zzbup) throws Exception { zzbup.a(this.f6642c.X); } public final void U0() { if (this.f6642c.f8132b == 1) { D0(); } } public final void onAdImpression() { int i = this.f6642c.f8132b; if (i == 2 || i == 5 || i == 4) { D0(); } } }
[ "zteeed@minet.net" ]
zteeed@minet.net
c3ff4c7908b7e8cc64762eeb1bcad63d41012a9c
9ab91b074703bcfe9c9407e1123e2b551784a680
/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/condition/ChangesCondition.java
9fafabd28dd9bfdae1e575e232c8876e21e8c781
[]
no_license
pkdevbox/osee
7ad9c083c3df8a7e9ef6185a419680cc08e21769
7e31f80f43d6d0b661af521fdd93b139cb694001
refs/heads/master
2021-01-22T00:30:05.686402
2015-06-08T21:19:57
2015-06-09T18:42:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,400
java
/******************************************************************************* * Copyright (c) 2004, 2007 Boeing. * 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: * Boeing - initial API and implementation *******************************************************************************/ package org.eclipse.osee.ote.message.condition; import org.eclipse.osee.ote.message.elements.DiscreteElement; /** * @author Ken J. Aguilar */ public class ChangesCondition<T extends Comparable<T>> extends AbstractCondition implements IDiscreteElementCondition<T> { private final DiscreteElement<T> element; private T lastValue = null; public ChangesCondition(DiscreteElement<T> element) { this.element = element; } @Override public T getLastCheckValue() { return lastValue; } @Override public boolean check() { T currentValue = element.getValue(); if (lastValue == null) { lastValue = currentValue; return false; } boolean result = !currentValue.equals(lastValue); lastValue = currentValue; return result; } public DiscreteElement<T> getElement() { return element; } }
[ "rbrooks@ee007c2a-0a25-0410-9ab9-bf268980928c" ]
rbrooks@ee007c2a-0a25-0410-9ab9-bf268980928c
3b772598aa52ea23cc2045944ded6ba290c0e4a4
03d61086047f041168f9a77b02a63a9af83f0f3f
/newrelic/src/main/java/com/newrelic/agent/deps/org/apache/http/impl/pool/BasicPoolEntry.java
7e8afae1fcaaf029108cd9e084fabba701bde370
[]
no_license
masonmei/mx2
fa53a0b237c9e2b5a7c151999732270b4f9c4f78
5a4adc268ac1e52af1adf07db7a761fac4c83fbf
refs/heads/master
2021-01-25T10:16:14.807472
2015-07-30T21:49:33
2015-07-30T21:49:35
39,944,476
1
0
null
null
null
null
UTF-8
Java
false
false
849
java
// // Decompiled by Procyon v0.5.29 // package com.newrelic.agent.deps.org.apache.http.impl.pool; import java.io.IOException; import com.newrelic.agent.deps.org.apache.http.annotation.ThreadSafe; import com.newrelic.agent.deps.org.apache.http.HttpClientConnection; import com.newrelic.agent.deps.org.apache.http.HttpHost; import com.newrelic.agent.deps.org.apache.http.pool.PoolEntry; @ThreadSafe public class BasicPoolEntry extends PoolEntry<HttpHost, HttpClientConnection> { public BasicPoolEntry(final String id, final HttpHost route, final HttpClientConnection conn) { super(id, route, conn); } public void close() { try { this.getConnection().close(); } catch (IOException ex) {} } public boolean isClosed() { return !this.getConnection().isOpen(); } }
[ "dongxu.m@gmail.com" ]
dongxu.m@gmail.com