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
70b6f1f8e99dcd2fe5655189c0e8bc5ce6cfee73
f2b7d1a2352a1e3e5ffb819b9f2f34b642ad775b
/src/main/java/guda/ball/biz/impl/SessionBizImpl.java
d070065cd0676fd99b5b9fb3b69770baba9e5c0e
[]
no_license
foodoon/ball
87267e785241a53cda5b627bab48908f00397404
21270874b11f4725dc13b98a30fdec9a52ffb5a2
refs/heads/master
2021-01-21T11:46:15.667282
2015-02-01T13:42:18
2015-02-01T13:42:18
32,434,789
0
0
null
null
null
null
UTF-8
Java
false
false
4,300
java
package guda.ball.biz.impl; import guda.tools.web.page.BaseQuery; import guda.tools.web.page.BizResult; import guda.ball.biz.SessionBiz; import guda.ball.dao.SessionDOMapper; import guda.ball.dao.domain.SessionDO; import guda.ball.dao.domain.SessionDOCriteria; import guda.ball.util.BizResultHelper; import guda.ball.util.CommonResultCode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import java.util.Date; import java.util.List; public class SessionBizImpl implements SessionBiz{ private final static Logger logger = LoggerFactory.getLogger(SessionBizImpl.class); @Autowired private SessionDOMapper sessionDOMapper; public BizResult detail(int id) { BizResult bizResult = new BizResult(); try{ SessionDO sessionDO = sessionDOMapper.selectByPrimaryKey(id); bizResult.data.put("sessionDO", sessionDO); bizResult.success = true; }catch(Exception e){ logger.error("query Session error",e); } return bizResult; } public BizResult list(BaseQuery baseQuery) { BizResult bizResult = new BizResult(); try { SessionDOCriteria sessionDOCriteria = new SessionDOCriteria(); sessionDOCriteria.setStartRow(baseQuery.getStartRow()); sessionDOCriteria.setPageSize(baseQuery.getPageSize()); int totalCount = sessionDOMapper.countByExample(sessionDOCriteria); baseQuery.setTotalCount(totalCount); List<SessionDO> sessionDOList = sessionDOMapper.selectByExample(sessionDOCriteria); bizResult.data.put("sessionDOList", sessionDOList); bizResult.data.put("query", baseQuery); bizResult.success = true; } catch (Exception e) { logger.error("view Session list error", e); } return bizResult; } public BizResult delete(int id) { BizResult bizResult = new BizResult(); try { sessionDOMapper.deleteByPrimaryKey(id); bizResult.success = true; } catch (Exception e) { logger.error("delete session error", e); } return bizResult; } public BizResult create(SessionDO sessionDO) { BizResult bizResult = new BizResult(); try { int id = sessionDOMapper.insert(sessionDO); bizResult.data.put("id", id); bizResult.success = true; } catch (Exception e) { logger.error("create Session error", e); } return bizResult; } public BizResult update(SessionDO sessionDO) { BizResult bizResult = new BizResult(); try { int id = sessionDOMapper.updateByPrimaryKeySelective(sessionDO); bizResult.data.put("id", id); bizResult.success = true; } catch (Exception e) { logger.error("update Session error", e); } return bizResult; } public SessionDO querySessionBySID(String sid) { try { SessionDOCriteria sessionDOCriteria = new SessionDOCriteria(); sessionDOCriteria.setStartRow(0); sessionDOCriteria.setPageSize(2); SessionDOCriteria.Criteria criteria = sessionDOCriteria.createCriteria(); criteria.andSIdEqualTo(sid); List<SessionDO> sessionDOList = sessionDOMapper.selectByExample(sessionDOCriteria); if(sessionDOList.size()>1){ throw new RuntimeException("数据库记录多于一条:"+sid); }else if(sessionDOList.size() == 1){ return sessionDOList.get(0); } return null; } catch (Exception e) { logger.error("view Session list error", e); } return null; } public BizResult checkSession(String sid) { SessionDO sessionDO = querySessionBySID(sid); if(sessionDO == null || (new Date()).after(sessionDO.getExpireTime())){ return BizResultHelper.newResultCode(CommonResultCode.SESSION_EXPIRE); } BizResult bizResult = new BizResult(); bizResult.success = true; bizResult.data.put("sessionDO",sessionDO); return bizResult; } }
[ "foodoon@qq.com" ]
foodoon@qq.com
11a56bc15ac10ed13027fe6c3ad80f327bb20246
109fd119a50b30ab0668903b9c44c8297f44f7b2
/antlr-plugin/src/main/java/org/nemesis/antlr/v4/netbeans/v8/grammar/file/tool/extract/ParseProxyBuilder.java
34ccf47ef5e85cb74ef98f23fc71547de646b7d8
[ "BSD-3-Clause", "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
timboudreau/ANTLR4-Plugins-for-NetBeans
d9462bbcd77e9c01788d349b0af2dd31eeb4a183
29c3fc648e833c8d45abd8b2ceb68eee19c76b70
refs/heads/master
2023-05-11T05:28:47.232422
2023-04-29T22:42:03
2023-04-29T22:42:37
156,080,858
1
2
null
2018-11-04T12:40:57
2018-11-04T12:40:57
null
UTF-8
Java
false
false
1,464
java
/* * Copyright 2016-2019 Tim Boudreau, Frédéric Yvon Vinet * * 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.nemesis.antlr.v4.netbeans.v8.grammar.file.tool.extract; import java.io.IOException; import java.util.function.Consumer; import org.openide.util.NbBundle; /** * * @author Tim Boudreau */ public interface ParseProxyBuilder { GenerateBuildAndRunGrammarResult buildNoParse() throws IOException; GenerateBuildAndRunGrammarResult parse(String text) throws IOException; @NbBundle.Messages(value = {"# {0} - grammar file ", "GENERATING_ANTLR_SOURCES=Running antlr on {0}", "# {0} - grammar file ", "COMPILING_ANTLR_SOURCES=Compiling generated sources for {0}", "# {0} - grammar file ", "EXTRACTING_PARSE=Extracting parse for {0}", "CANCELLED=Cancelled."}) GenerateBuildAndRunGrammarResult parse(String text, Consumer<String> status) throws IOException; ParseProxyBuilder regenerateAntlrCodeOnNextCall(); }
[ "tim@timboudreau.com" ]
tim@timboudreau.com
e81560ff7b6a092ceb3e46e62c5327f4233a994e
128eb90ce7b21a7ce621524dfad2402e5e32a1e8
/laravel-converted/src/main/java/com/project/convertedCode/includes/vendor/laravel/framework/src/Illuminate/Console/file_Application_php.java
e5f05c261064a3c761a8ff8f5efdd492b5a64906
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
RuntimeConverter/RuntimeConverterLaravelJava
657b4c73085b4e34fe4404a53277e056cf9094ba
7ae848744fbcd993122347ffac853925ea4ea3b9
refs/heads/master
2020-04-12T17:22:30.345589
2018-12-22T10:32:34
2018-12-22T10:32:34
162,642,356
0
0
null
null
null
null
UTF-8
Java
false
false
2,589
java
package com.project.convertedCode.includes.vendor.laravel.framework.src.Illuminate.Console; import com.runtimeconverter.runtime.RuntimeStack; import com.runtimeconverter.runtime.interfaces.ContextConstants; import com.runtimeconverter.runtime.includes.RuntimeIncludable; import com.runtimeconverter.runtime.includes.IncludeEventException; import com.runtimeconverter.runtime.classes.RuntimeClassBase; import com.runtimeconverter.runtime.RuntimeEnv; import com.runtimeconverter.runtime.interfaces.UpdateRuntimeScopeInterface; import com.runtimeconverter.runtime.arrays.ZPair; /* Converted with The Runtime Converter (runtimeconverter.com) vendor/laravel/framework/src/Illuminate/Console/Application.php */ public class file_Application_php implements RuntimeIncludable { public static final file_Application_php instance = new file_Application_php(); public final void include(RuntimeEnv env, RuntimeStack stack) throws IncludeEventException { Scope958 scope = new Scope958(); stack.pushScope(scope); this.include(env, stack, scope); stack.popScope(); } public final void include(RuntimeEnv env, RuntimeStack stack, Scope958 scope) throws IncludeEventException { // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Namespace import was here // Conversion Note: class named Application was here in the source code env.addManualClassLoad("Illuminate\\Console\\Application"); } private static final ContextConstants runtimeConverterContextContantsInstance = new ContextConstants() .setDir("/vendor/laravel/framework/src/Illuminate/Console") .setFile("/vendor/laravel/framework/src/Illuminate/Console/Application.php"); public ContextConstants getContextConstants() { return runtimeConverterContextContantsInstance; } private static class Scope958 implements UpdateRuntimeScopeInterface { public void updateStack(RuntimeStack stack) {} public void updateScope(RuntimeStack stack) {} } }
[ "git@runtimeconverter.com" ]
git@runtimeconverter.com
e394c2387a0fc327dc29f5855a45a17654b8edc0
8a47f57c1f0c029f1cd94a2c48c7fa68ec7d2e6a
/src/main/java/com/shimizukenta/secs/gem/AbstractGemConfig.java
d3b16e38d0c561851fc0b73a8095db3b05c699bb
[ "Apache-2.0" ]
permissive
prliu/secs4java8
5caf5fe0ac03f9665420aa1c39869d5e045e9c37
aa36d26a55d1063d0c4c8f075a7dd21acc076db3
refs/heads/master
2021-07-01T06:27:37.399412
2021-06-17T13:07:16
2021-06-17T13:07:16
231,622,467
0
0
Apache-2.0
2020-01-03T16:14:45
2020-01-03T16:14:45
null
UTF-8
Java
false
false
4,799
java
package com.shimizukenta.secs.gem; import java.io.Serializable; import java.util.Objects; import com.shimizukenta.secs.AbstractProperty; import com.shimizukenta.secs.Property; import com.shimizukenta.secs.ReadOnlyProperty; import com.shimizukenta.secs.StringProperty; import com.shimizukenta.secs.secs2.Secs2Item; /** * This abstract class is GEM config. * * <p> * To set Model-Number, {@link #mdln(CharSequence)}<br /> * To set Software-Revision, {@link #softrev(CharSequence)}<br /> * To set Clock-type, {@link #clockType(ClockType)}<br /> * </p> * * @author kenta-shimizu * */ public abstract class AbstractGemConfig implements Serializable { private static final long serialVersionUID = 1130854092113358850L; protected class Secs2NumberItemProperty extends AbstractProperty<Secs2Item> { private static final long serialVersionUID = 3803548762155640142L; public Secs2NumberItemProperty(Secs2Item initial) { super(Objects.requireNonNull(initial)); } @Override public void set(Secs2Item v) { Objects.requireNonNull(v); switch ( v ) { case INT1: case INT2: case INT4: case INT8: case UINT1: case UINT2: case UINT4: case UINT8: { super.set(v); break; } default: { throw new IllegalArgumentException("Not support " + v.toString()); } } } } private final StringProperty mdln = StringProperty.newInstance(" "); private final StringProperty softrev = StringProperty.newInstance(" "); private final Property<ClockType> clockType = Property.newInstance(ClockType.A16); private final Secs2NumberItemProperty dataIdSecs2Item = new Secs2NumberItemProperty(Secs2Item.UINT4); private final Secs2NumberItemProperty vIdSecs2Item = new Secs2NumberItemProperty(Secs2Item.UINT4); private final Secs2NumberItemProperty reportIdSecs2Item = new Secs2NumberItemProperty(Secs2Item.UINT4); private final Secs2NumberItemProperty collectionEventIdSecs2Item = new Secs2NumberItemProperty(Secs2Item.UINT4); public AbstractGemConfig() { /* Nothing */ } /** * Model-Number setter. * * <p> * use S1F2, S1F13, S1F14 * </p> * * @param cs MODEL-NUMBER */ public void mdln(CharSequence cs) { this.mdln.set(Objects.requireNonNull(cs)); } /** * Model-Number getter. * * @return Model-Number */ public ReadOnlyProperty<String> mdln() { return mdln; } /** * Software-Revision setter. * * <p> * use S1F2, S1F13, S1F14 * </p> * * @param cs SOFTWARE-RESION */ public void softrev(CharSequence cs) { this.softrev.set(Objects.requireNonNull(cs)); } /** * Software-Revision getter. * * @return Software-Revision */ public ReadOnlyProperty<String> softrev() { return softrev; } /** * Clock-type setter. * * <p> * use S2F18, S2F31 * </p> * * @param type A16 or A12 */ public void clockType(ClockType type) { this.clockType.set(Objects.requireNonNull(type)); } /** * Clock-type getter. * * @return Clock-type */ public ReadOnlyProperty<ClockType> clockType() { return this.clockType; } /** * DATA-ID Secs2Item type setter. * * <p> * type: INT1, INT2, INT4, INT8, UINT1, UINT2, UINT4, UINT8 * </p> * * @param item item-type */ public void dataIdSecs2Item(Secs2Item item) { this.dataIdSecs2Item.set(item); } /** * DATA-ID Secs2Item type getter. * * @return Secs2Item */ public ReadOnlyProperty<Secs2Item> dataIdSecs2Item() { return this.dataIdSecs2Item; } /** * V-ID Secs2Item type setter. * * <p> * type: INT1, INT2, INT4, INT8, UINT1, UINT2, UINT4, UINT8 * </p> * * @param item item-type */ public void vIdSecs2Item(Secs2Item item) { this.vIdSecs2Item.set(item); } /** * V-ID Secs2Item type getter. * * @return Secs2Item */ public ReadOnlyProperty<Secs2Item> vIdSecs2Item() { return this.vIdSecs2Item; } /** * REPORT-ID Secs2Item type setter. * * <p> * type: INT1, INT2, INT4, INT8, UINT1, UINT2, UINT4, UINT8 * </p> * * @param item item-type */ public void reportIdSecs2Item(Secs2Item item) { this.reportIdSecs2Item.set(item); } /** * REPORT-ID Secs2Item type getter. * * @return Secs2Item */ public ReadOnlyProperty<Secs2Item> reportIdSecs2Item() { return this.reportIdSecs2Item; } /** * COLLECTION-EVENT-ID Secs2Item type setter. * * <p> * type: INT1, INT2, INT4, INT8, UINT1, UINT2, UINT4, UINT8 * </p> * * @param item item-type */ public void collectionEventIdSecs2Item(Secs2Item item) { this.collectionEventIdSecs2Item.set(item); } /** * COLLECTION-EVENT-ID Secs2Item type getter. * * @return Secs2Item */ public ReadOnlyProperty<Secs2Item> collectionEventIdSecs2Item() { return this.collectionEventIdSecs2Item; } }
[ "shimizukentagm1@gmail.com" ]
shimizukentagm1@gmail.com
3f3fa7e0e52b93ab1c8462f00a3acaf1884180ee
ff23e5c890216a1a63278ecb40cd7ac79ab7a4cd
/clients/keto/java/src/test/java/sh/ory/keto/model/HealthNotReadyStatusTest.java
d962de2d56da43f4320557a9fec2cb94df7ff264
[ "Apache-2.0" ]
permissive
ory/sdk
fcc212166a92de9d27b2dc8ff587dcd6919e53a0
7184e13464948d68964f9b605834e56e402ec78a
refs/heads/master
2023-09-01T10:04:39.547228
2023-08-31T08:46:23
2023-08-31T08:46:23
230,928,630
130
85
Apache-2.0
2023-08-14T11:09:31
2019-12-30T14:21:17
C#
UTF-8
Java
false
false
1,298
java
/* * Ory Keto API * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. * * The version of the OpenAPI document: v0.11.0-alpha.0 * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package sh.ory.keto.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** * Model tests for HealthNotReadyStatus */ public class HealthNotReadyStatusTest { private final HealthNotReadyStatus model = new HealthNotReadyStatus(); /** * Model tests for HealthNotReadyStatus */ @Test public void testHealthNotReadyStatus() { // TODO: test HealthNotReadyStatus } /** * Test the property 'errors' */ @Test public void errorsTest() { // TODO: test errors } }
[ "3372410+aeneasr@users.noreply.github.com" ]
3372410+aeneasr@users.noreply.github.com
5057c61439e5cb685b7c012e6c8c60acb5aa3480
59edd26866e43fd9d7451884060cad84f7c92f2f
/src/main/java/com/xthena/sckf/manager/NianduManager.java
5d8694c34174ec25202ec393a0cc4038ba25e2da
[ "Apache-2.0" ]
permissive
jianbingfang/xhf
fd61f49438721df84df4e009b1208622fca9f137
a9f008c904943e8a2cbed9c67e03e5c18c659444
refs/heads/master
2021-01-18T14:41:04.209961
2015-09-07T17:17:08
2015-09-07T17:17:08
33,782,876
2
5
null
null
null
null
UTF-8
Java
false
false
1,317
java
package com.xthena.sckf.manager; import java.util.Date; import com.xthena.sckf.domain.NdFile; import com.xthena.sckf.domain.Niandu; import com.xthena.sckf.domain.NianduGroup; import com.xthena.core.hibernate.HibernateEntityDao; import com.xthena.core.mapper.BeanMapper; import com.xthena.jl.domain.JlFujian; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class NianduManager extends HibernateEntityDao<Niandu> { @Autowired private NdFileManager ndFileManager; public void saveGroup(NianduGroup nianduGroup) { Niandu dest = null; Long id = nianduGroup.getNiandu().getFid(); BeanMapper beanMapper=new BeanMapper(); if (id != null) { dest = get(id); beanMapper.copy(nianduGroup.getNiandu(), dest); } else { dest = nianduGroup.getNiandu(); dest.setFcreatedate(new Date()); } save(dest); NdFile[] ndFiles=nianduGroup.getNdFiles(); if(ndFiles!=null){ for(NdFile ndFile:ndFiles){ if(ndFile.getFid()!=null){ ndFileManager.removeById(ndFile.getFid()); } ndFile.setFyear(dest.getFid()); ndFileManager.save(ndFile); } } } }
[ "jianbingfang@gmail.com" ]
jianbingfang@gmail.com
5f7de312f185c3ba0e778530386c8b144f29ba56
f8ed70f6b1e18f11aa465666adcee0d8760260cc
/RestWithSpringBootUdemy/src/main/java/br/com/lassulfi/exceptions/MyFileNotFoundException.java
b49fc9ccd0aafbaaedf2f1aad0a7c3678e2f1d94
[]
no_license
lassulfi/RestWithSpringBootUdemy
57ced4aa96986c155c3f5a1104f0dcdd50b7b0fc
6608de4a57aeaacdc24cd2c5a31c56e461cf19d4
refs/heads/master
2020-07-24T13:05:06.968218
2020-01-02T18:17:47
2020-01-02T18:17:47
207,938,084
0
0
null
null
null
null
UTF-8
Java
false
false
468
java
package br.com.lassulfi.exceptions; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; @ResponseStatus(HttpStatus.NOT_FOUND) public class MyFileNotFoundException extends RuntimeException { private static final long serialVersionUID = 1L; public MyFileNotFoundException(String message) { super(message); } public MyFileNotFoundException(String message, Throwable cause) { super(message, cause); } }
[ "lassulfi@gmail.com" ]
lassulfi@gmail.com
409ff1d5a2482f03747c8f4af02bad8d02894b5f
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/LibriVox_app.librivox.android/javafiles/biz/bookdesign/librivox/ci.java
8ab1ec34711214e8da07fb738894afdda7fe8817
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
6,889
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package biz.bookdesign.librivox; import android.view.ViewGroup; import biz.bookdesign.catalogbase.i; // Referenced classes of package biz.bookdesign.librivox: // LibriVoxDetailsActivity, bw, cg class ci extends i { ci(LibriVoxDetailsActivity librivoxdetailsactivity, ViewGroup viewgroup) { a = librivoxdetailsactivity; // 0 0:aload_0 // 1 1:aload_1 // 2 2:putfield #10 <Field LibriVoxDetailsActivity a> super(((biz.bookdesign.catalogbase.bm) (librivoxdetailsactivity.e)), LibriVoxDetailsActivity.c(librivoxdetailsactivity), ((android.support.v4.app.x) (librivoxdetailsactivity)), viewgroup, true, LibriVoxDetailsActivity.e(librivoxdetailsactivity)); // 3 5:aload_0 // 4 6:aload_1 // 5 7:getfield #16 <Field biz.bookdesign.librivox.client.o LibriVoxDetailsActivity.e> // 6 10:aload_1 // 7 11:invokestatic #20 <Method biz.bookdesign.catalogbase.u LibriVoxDetailsActivity.c(LibriVoxDetailsActivity)> // 8 14:aload_1 // 9 15:aload_2 // 10 16:iconst_1 // 11 17:aload_1 // 12 18:invokestatic #23 <Method biz.bookdesign.catalogbase.q LibriVoxDetailsActivity.e(LibriVoxDetailsActivity)> // 13 21:invokespecial #26 <Method void i(biz.bookdesign.catalogbase.bm, biz.bookdesign.catalogbase.u, android.support.v4.app.x, ViewGroup, boolean, biz.bookdesign.catalogbase.q)> // 14 24:return } public int getItemCount() { int j = super.getItemCount(); // 0 0:aload_0 // 1 1:invokespecial #31 <Method int i.getItemCount()> // 2 4:istore_1 if(LibriVoxDetailsActivity.f(a)) //* 3 5:aload_0 //* 4 6:getfield #10 <Field LibriVoxDetailsActivity a> //* 5 9:invokestatic #35 <Method boolean LibriVoxDetailsActivity.f(LibriVoxDetailsActivity)> //* 6 12:ifeq 17 return j; // 7 15:iload_1 // 8 16:ireturn else return j + (j / (LibriVoxDetailsActivity.g(a) - 1) + 1); // 9 17:iload_1 // 10 18:iload_1 // 11 19:aload_0 // 12 20:getfield #10 <Field LibriVoxDetailsActivity a> // 13 23:invokestatic #39 <Method int LibriVoxDetailsActivity.g(LibriVoxDetailsActivity)> // 14 26:iconst_1 // 15 27:isub // 16 28:idiv // 17 29:iconst_1 // 18 30:iadd // 19 31:iadd // 20 32:ireturn } public int getItemViewType(int j) { return !LibriVoxDetailsActivity.c(a, j) ? 0 : 1; // 0 0:aload_0 // 1 1:getfield #10 <Field LibriVoxDetailsActivity a> // 2 4:iload_1 // 3 5:invokestatic #44 <Method boolean LibriVoxDetailsActivity.c(LibriVoxDetailsActivity, int)> // 4 8:ifeq 13 // 5 11:iconst_1 // 6 12:ireturn // 7 13:iconst_0 // 8 14:ireturn } public void onBindViewHolder(android.support.v7.widget.RecyclerView.ViewHolder viewholder, int j) { if(!LibriVoxDetailsActivity.c(a, j)) //* 0 0:aload_0 //* 1 1:getfield #10 <Field LibriVoxDetailsActivity a> //* 2 4:iload_2 //* 3 5:invokestatic #44 <Method boolean LibriVoxDetailsActivity.c(LibriVoxDetailsActivity, int)> //* 4 8:ifne 24 super.onBindViewHolder(viewholder, LibriVoxDetailsActivity.d(a, j)); // 5 11:aload_0 // 6 12:aload_1 // 7 13:aload_0 // 8 14:getfield #10 <Field LibriVoxDetailsActivity a> // 9 17:iload_2 // 10 18:invokestatic #50 <Method int LibriVoxDetailsActivity.d(LibriVoxDetailsActivity, int)> // 11 21:invokespecial #52 <Method void i.onBindViewHolder(android.support.v7.widget.RecyclerView$ViewHolder, int)> // 12 24:return } public android.support.v7.widget.RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewgroup, int j) { switch(j) //* 0 0:iload_2 { //* 1 1:tableswitch 0 1: default 24 // 0 85 // 1 57 default: viewgroup = ((ViewGroup) (new StringBuilder())); // 2 24:new #56 <Class StringBuilder> // 3 27:dup // 4 28:invokespecial #59 <Method void StringBuilder()> // 5 31:astore_1 ((StringBuilder) (viewgroup)).append("Unexpected view type "); // 6 32:aload_1 // 7 33:ldc1 #61 <String "Unexpected view type "> // 8 35:invokevirtual #65 <Method StringBuilder StringBuilder.append(String)> // 9 38:pop ((StringBuilder) (viewgroup)).append(j); // 10 39:aload_1 // 11 40:iload_2 // 12 41:invokevirtual #68 <Method StringBuilder StringBuilder.append(int)> // 13 44:pop throw new IllegalStateException(((StringBuilder) (viewgroup)).toString()); // 14 45:new #70 <Class IllegalStateException> // 15 48:dup // 16 49:aload_1 // 17 50:invokevirtual #74 <Method String StringBuilder.toString()> // 18 53:invokespecial #77 <Method void IllegalStateException(String)> // 19 56:athrow case 1: // '\001' viewgroup = ((ViewGroup) (((bw)bw.g()).a(((android.support.v4.app.x) (a)), viewgroup))); // 20 57:invokestatic #82 <Method biz.bookdesign.catalogbase.a bw.g()> // 21 60:checkcast #79 <Class bw> // 22 63:aload_0 // 23 64:getfield #10 <Field LibriVoxDetailsActivity a> // 24 67:aload_1 // 25 68:invokevirtual #85 <Method android.view.View bw.a(android.support.v4.app.x, ViewGroup)> // 26 71:astore_1 return ((android.support.v7.widget.RecyclerView.ViewHolder) (new cg(a, ((android.view.View) (viewgroup))))); // 27 72:new #87 <Class cg> // 28 75:dup // 29 76:aload_0 // 30 77:getfield #10 <Field LibriVoxDetailsActivity a> // 31 80:aload_1 // 32 81:invokespecial #90 <Method void cg(LibriVoxDetailsActivity, android.view.View)> // 33 84:areturn case 0: // '\0' return super.onCreateViewHolder(viewgroup, j); // 34 85:aload_0 // 35 86:aload_1 // 36 87:iload_2 // 37 88:invokespecial #92 <Method android.support.v7.widget.RecyclerView$ViewHolder i.onCreateViewHolder(ViewGroup, int)> // 38 91:areturn } } final LibriVoxDetailsActivity a; }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
2c82c7c9e2a584821812ecfa41120e048b448fc2
fd3ffd71e8856a9634a6eab46303b391bf1e5f32
/app/src/main/java/com/doctoror/fuckoffmusicplayer/library/genres/GenresRecyclerAdapter.java
840db7259087c00395aa6171e688960df9e93b2c
[ "Apache-2.0" ]
permissive
zhiqiang115/PainlessMusicPlayer
8047c156c68ebe1d938e8d05ec99c7830e82ff77
84802048a7e8538a5e55d512125807f4c4285f83
refs/heads/master
2021-05-15T04:51:10.988128
2017-05-07T08:05:11
2017-05-07T08:05:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,013
java
/* * Copyright (C) 2016 Yaroslav Mytkalyk * * 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.doctoror.fuckoffmusicplayer.library.genres; import com.doctoror.fuckoffmusicplayer.R; import com.doctoror.fuckoffmusicplayer.db.genres.GenresProvider; import com.doctoror.fuckoffmusicplayer.util.DrawableUtils; import com.doctoror.fuckoffmusicplayer.util.ThemeUtils; import com.doctoror.fuckoffmusicplayer.widget.CursorRecyclerViewAdapter; import com.doctoror.fuckoffmusicplayer.widget.viewholder.SingleLineItemIconViewHolder; import com.l4digital.fastscroll.FastScroller; import android.content.Context; import android.database.Cursor; import android.graphics.drawable.Drawable; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.ViewGroup; /** * Created by Yaroslav Mytkalyk on 17.10.16. */ final class GenresRecyclerAdapter extends CursorRecyclerViewAdapter<SingleLineItemIconViewHolder> implements FastScroller.SectionIndexer { interface OnGenreClickListener { void onGenreClick(int position, long id, @Nullable String genre); } @NonNull private final LayoutInflater mLayoutInflater; private final Drawable mIcon; private OnGenreClickListener mClickListener; GenresRecyclerAdapter(final Context context) { super(null); mLayoutInflater = LayoutInflater.from(context); mIcon = DrawableUtils.getTintedDrawable(context, R.drawable.ic_library_music_black_40dp, ThemeUtils.getColorStateList(context.getTheme(), android.R.attr.textColorPrimary)); } void setOnGenreClickListener(@Nullable final OnGenreClickListener clickListener) { mClickListener = clickListener; } private void onItemClick(final int position) { final Cursor item = getCursor(); if (item != null && item.moveToPosition(position)) { onGenreClick( position, item.getLong(GenresProvider.COLUMN_ID), item.getString(GenresProvider.COLUMN_NAME)); } } private void onGenreClick(final int position, final long id, @NonNull final String genre) { if (mClickListener != null) { mClickListener.onGenreClick(position, id, genre); } } @Override public void onBindViewHolder(final SingleLineItemIconViewHolder viewHolder, final Cursor cursor) { viewHolder.text.setText(cursor.getString(GenresProvider.COLUMN_NAME)); } @Override public SingleLineItemIconViewHolder onCreateViewHolder(final ViewGroup parent, final int viewType) { final SingleLineItemIconViewHolder vh = new SingleLineItemIconViewHolder( mLayoutInflater.inflate(R.layout.list_item_single_line_icon, parent, false)); vh.icon.setImageDrawable(mIcon); vh.itemView.setOnClickListener(v -> onItemClick(vh.getAdapterPosition())); return vh; } @Override public String getSectionText(final int position) { final Cursor c = getCursor(); if (c != null && c.moveToPosition(position)) { final String genre = c.getString(GenresProvider.COLUMN_NAME); if (!TextUtils.isEmpty(genre)) { return String.valueOf(genre.charAt(0)); } } return null; } }
[ "docd1990@gmail.com" ]
docd1990@gmail.com
573e9b7438e2d45234060b724cc61a8e0aa81f16
2ca93846ab8f638a7d8cd80f91566ee3632cf186
/Variant Programs/2/2-33/TrilledServer.java
56bd65299bd4c946830b036de4b402959518b5ad
[ "MIT" ]
permissive
hjc851/SourceCodePlagiarismDetectionDataset
729483c3b823c455ffa947fc18d6177b8a78a21f
f67bc79576a8df85e8a7b4f5d012346e3a76db37
refs/heads/master
2020-07-05T10:48:29.980984
2019-08-15T23:51:55
2019-08-15T23:51:55
202,626,196
0
0
null
null
null
null
UTF-8
Java
false
false
3,002
java
import java.util.ArrayDeque; import java.util.LinkedList; import java.util.List; import java.util.stream.Collectors; public class TrilledServer extends Parser { public ArrayDeque<Act> preparingReaper = null; public ArrayDeque<Shortcoming> responsibleRow = null; public int hourStay = 0; public TrilledServer() { this.preparingReaper = (new ArrayDeque<>()); this.responsibleRow = (new ArrayDeque<>()); hourStay = (MomentAmounts); } public synchronized void ourTicktack() { List<Shortcoming> anomalies = new LinkedList<>(); for (Shortcoming f : responsibleRow) synx269(f, anomalies); for (Shortcoming shortcoming : anomalies) synx270(shortcoming); if (latestOperation != null) synx271(); if (latestOperation == null && !preparingReaper.isEmpty()) synx272(); this.workExpectedMotion(); } public synchronized void outboundProceeding(Act methods) { preparingReaper.addLast(methods); } public synchronized Act wantMechanisms() { return preparingReaper.removeFirst(); } public synchronized void workExpectedMotion() { if (this.latestOperation == null) { return; } while (!replaceAgenda.ensureAppeals(this.latestOperation)) { this.getTableCriticize(); hourStay = (MomentAmounts); if (!preparingReaper.isEmpty()) synx273(); else { latestOperation = (null); return; } } latestOperation.mechanismsEarlyWishes(); } public synchronized void getTableCriticize() { Shortcoming f = new Shortcoming(this.generateUnderwayWalk(), latestOperation); responsibleRow.add(f); latestOperation.fetchMistakes().add(f); } private synchronized void synx269(Shortcoming f, java.util.List<Shortcoming> anomalies) { if (f.arriveFixMonth() == this.generateUnderwayWalk()) anomalies.add(f); } private synchronized void synx270(Shortcoming shortcoming) { responsibleRow.remove(shortcoming); replaceAgenda.introduceChapter( new Layouts( shortcoming.makeMarch().sustainWishes().peek(), shortcoming.makeMarch().sustainSelf(), 0), shortcoming.makeMarch()); if (!preparingReaper.contains(shortcoming.makeMarch())) { this.outboundProceeding(shortcoming.makeMarch()); } } private synchronized void synx271() { hourStay--; if (latestOperation.isEnded()) { latestOperation.putDepartureClock(this.generateUnderwayWalk()); this.finalizeSue.addLast(latestOperation); latestOperation = (null); } if (hourStay == 0 && latestOperation != null) { if (preparingReaper.isEmpty()) { hourStay = (MomentAmounts); } else { this.outboundProceeding(latestOperation); latestOperation = (null); } } } private synchronized void synx272() { latestOperation = (this.wantMechanisms()); hourStay = (MomentAmounts); } private synchronized void synx273() { latestOperation = (wantMechanisms()); } }
[ "hayden.cheers@me.com" ]
hayden.cheers@me.com
4cfd3949b40566a292dfa16ba90b1a347bdb8923
b4b69177be55e97d31a8b3400e77a6d59826d4f9
/src/main/java/net/zerotodev/api/security/aop/SecurityExceptionHandler.java
278eea89c648f40f4f3813c79b344a140c72adfc
[]
no_license
parkjungkwan/bithumb-tech-3-spring-boot-jpa-security
d6af369fd695331244ed3ba53281350d3d84efc4
c6bba11f6bfcf96015c4e4b5542f5012aa2691e0
refs/heads/main
2023-07-15T09:09:20.334659
2021-08-26T04:58:39
2021-08-26T04:58:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,916
java
package net.zerotodev.api.security.aop; import lombok.extern.slf4j.Slf4j; import net.zerotodev.api.security.exception.ErrorCode; import net.zerotodev.api.security.exception.LoginRunnerException; import net.zerotodev.api.util.Messenger; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.InsufficientAuthenticationException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import java.nio.file.AccessDeniedException; @Slf4j @ControllerAdvice public class SecurityExceptionHandler { @ExceptionHandler(RuntimeException.class) protected ResponseEntity<Messenger> handleRuntimeException(RuntimeException e){ log.info("handleRuntimeException",e); Messenger response = Messenger.builder() .code("test") .message(e.getMessage()) .status(HttpStatus.INTERNAL_SERVER_ERROR.value()) .build(); return new ResponseEntity<>(response, HttpStatus.INTERNAL_SERVER_ERROR); } @ExceptionHandler(SecurityException.class) protected ResponseEntity<Messenger> handleSecurityException(SecurityException e){ log.info("handleSecurityException",e); Messenger response = Messenger.builder() .code(ErrorCode.AUTHENTICATION_FAILED.getCode()) .message(e.getMessage()) .status(ErrorCode.AUTHENTICATION_FAILED.getStatus()) .build(); return new ResponseEntity<>(response, HttpStatus.UNAUTHORIZED); } @ExceptionHandler(LoginRunnerException.class) protected ResponseEntity<Messenger> handleLoginRunnerException(LoginRunnerException e){ log.info("handleLoginRunnerException",e); Messenger response = Messenger.builder() .code(ErrorCode.LOGIN_FAILED.getCode()) .message(ErrorCode.LOGIN_FAILED.getMsg()) .status(ErrorCode.LOGIN_FAILED.getStatus()) .build(); return new ResponseEntity<>(response, HttpStatus.UNAUTHORIZED); } @ExceptionHandler(BadCredentialsException.class) protected ResponseEntity<Messenger> handleBadCredentialsException(BadCredentialsException e){ log.info("handleBadCredentialsException",e); Messenger response = Messenger.builder() .code(ErrorCode.ACCESS_DENIED.getCode()) .message(ErrorCode.ACCESS_DENIED.getMsg()) .status(ErrorCode.ACCESS_DENIED.getStatus()) .build(); return new ResponseEntity<>(response, HttpStatus.UNAUTHORIZED); } @ExceptionHandler(AccessDeniedException.class) protected ResponseEntity<Messenger> handleAccessDeniedException(AccessDeniedException e){ log.info("handleAccessDeniedException",e); Messenger response = Messenger.builder() .code(ErrorCode.ACCESS_DENIED.getCode()) .message(ErrorCode.ACCESS_DENIED.getMsg()) .status(ErrorCode.ACCESS_DENIED.getStatus()) .build(); return new ResponseEntity<>(response, HttpStatus.UNAUTHORIZED); } @ExceptionHandler(InsufficientAuthenticationException.class) protected ResponseEntity<Messenger> handleInsufficientAuthenticationException(InsufficientAuthenticationException e){ log.info("handleAInsufficientAuthenticationException",e); Messenger response = Messenger.builder() .code(ErrorCode.AUTHENTICATION_FAILED.getCode()) .message(ErrorCode.AUTHENTICATION_FAILED.getMsg()) .status(ErrorCode.AUTHENTICATION_FAILED.getStatus()) .build(); return new ResponseEntity<>(response, HttpStatus.UNAUTHORIZED); } }
[ "pakjkwan@gmail.com" ]
pakjkwan@gmail.com
ba32a3ac74a03b98d644694884ed48704e6cf3bd
f821306e4369d9f908aab560e142653645539f4b
/simplehttp/src/main/java/com/cz/android/simplehttp/io/remote/FileMetaData.java
03d70bbb8ab088620ff91659ec1e0e27e4d92f2b
[]
no_license
JackChen365/AndroidSampleProjects
4ec697a65681aa2a7777035490a9844235a8d653
edfb44a17e8bfe9b8e5afed79d7bc95347fe6ab2
refs/heads/master
2023-03-27T05:30:26.853409
2021-03-25T04:04:59
2021-03-25T04:04:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
843
java
package com.cz.android.simplehttp.io.remote; import com.cz.android.simplehttp.io.Constants; import com.cz.android.simplehttp.io.StringUtils; final class FileMetaData { private final String fileName; private final long size; static FileMetaData from(final String request) { assert StringUtils.isNotEmpty(request); final String[] contents = request.replace(Constants.END_MESSAGE_MARKER, "").split(Constants.MESSAGE_DELIMITTER); return new FileMetaData(contents[0], Long.valueOf(contents[1])); } private FileMetaData(final String fileName, final long size) { assert StringUtils.isNotEmpty(fileName); this.fileName = fileName; this.size = size; } String getFileName() { return this.fileName; } long getSize() { return this.size; } }
[ "bingo110@126.com" ]
bingo110@126.com
4428a1c51075c256d15f029a1e70f7202b72a6c3
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/dds-20151201/src/main/java/com/aliyun/dds20151201/models/CreateBackupResponseBody.java
2050681735d0ed742cea9c9389cb2cb18ece86a5
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,026
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.dds20151201.models; import com.aliyun.tea.*; public class CreateBackupResponseBody extends TeaModel { /** * <p>The ID of the backup set.</p> */ @NameInMap("BackupId") public String backupId; /** * <p>The ID of the request.</p> */ @NameInMap("RequestId") public String requestId; public static CreateBackupResponseBody build(java.util.Map<String, ?> map) throws Exception { CreateBackupResponseBody self = new CreateBackupResponseBody(); return TeaModel.build(map, self); } public CreateBackupResponseBody setBackupId(String backupId) { this.backupId = backupId; return this; } public String getBackupId() { return this.backupId; } public CreateBackupResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
0460d0c856e9f7c747c307860d9ebd538b0886d1
e15ec317848d1536e908414eacc5e6ccc4f99ae6
/app/src/main/java/app/laundrydelegate/models/notifications/Notifications.java
ea0a970578987d922ec3296ffee696af67591e94
[]
no_license
Mostafaelnagar/Laundry-Station-Delegate-
cc86bbf06cb5015d388573f857b8062fdef400eb
9a54dfe5013be152c65ca124329952dc4244b808
refs/heads/master
2020-07-01T23:36:58.527333
2019-08-08T22:32:16
2019-08-08T22:32:16
201,345,173
0
0
null
null
null
null
UTF-8
Java
false
false
986
java
package app.laundrydelegate.models.notifications; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class Notifications { @SerializedName("id") @Expose public String id; @SerializedName("title") @Expose public String title; @SerializedName("body") @Expose public String body; @SerializedName("created_at") @Expose public String createdAt; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getBody() { return body; } public void setBody(String body) { this.body = body; } public String getCreatedAt() { return createdAt; } public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } }
[ "melnagar271@gmail.com" ]
melnagar271@gmail.com
d3b6c61f5b47a64b48c3fe06b5c3c2977e43f353
3745b8350de17f9bb0b9eb5b931e0312e03d4f14
/app/src/main/java/com/qlzs/sjt/settings/Const.java
63818254bf5f49539d1f80f1f0697f409fbeb64e
[]
no_license
fuqingming/SJT-master
6baf11d438c08008f38eee9eb594fc91fbdedf67
91269059a5ed0055fdd2bb6578c8f71c735f777b
refs/heads/master
2020-03-19T13:51:25.882201
2018-06-11T08:47:48
2018-06-11T08:47:48
136,597,897
0
0
null
null
null
null
UTF-8
Java
false
false
3,900
java
package com.qlzs.sjt.settings; /** * Created by asus on 2018/4/17. */ public class Const { // 默认密匙,在签到时使用 public static final String DEFAULT_WORK_KEY = "a123456789012345678901234567890b"; public class ErrorCode { public static final String SJT_SIGN_INVALID = "未授权的请求"; // 签名错误 } public class FieldRange { public static final int PASSWORD_MIN_LEN = 6; // 密码最小长度 public static final int PASSWORD_MAX_LEN = 18; // 密码最大长度 } public class Phone { public static final String CUSTOMER_SERVICE_PHONE = "021-64183359"; // 客服 } public class ActivityType { public static final int ACTIVITY_IS_PAYMENT = 1; // 等待支付 public static final int ACTIVITY_IS_EXAMINE = 5; // 等待审核 public static final int ACTIVITY_IS_BIDDING = 8; // 竞标中 public static final int ACTIVITY_IS_BEGINING = 10; // 进行中 public static final int ACTIVITY_IS_FINISH = 20; // 已完成 } public class EnrollStatus { public static final int ACTIVITY_IS_PAYMENT = 1; // 等待支付 public static final int ACTIVITY_IS_BEGINING = 5; // 参与中 public static final int ACTIVITY_IS_FINISH = 20; // 已结束 } public class CloseType { public static final String CLOSE_TYPE_SUCCESS = "1"; // 成功 public static final String CLOSE_TYPE_DEFAIL = "2"; // 失败 public static final String CLOSE_TYPE_NOT_THROUGH = "8";// 审核未通过 public static final String CLOSE_TYPE_NO_DEAL = "10"; // 未成交 public static final String CLOSE_TYPE_REVOKE = "15"; // 已撤销 public static final String CLOSE_TYPE_CLOSE = "26"; // 超时关闭 } public class MyCloseType { public static final String CLOSE_TYPE_SUCCESS = "1"; // 成功 public static final String CLOSE_TYPE_DEFAIL = "5"; // 失败 public static final String CLOSE_TYPE_NOT_THROUGH = "8";// 审核未通过 public static final String CLOSE_TYPE_NO_DEAL = "10"; // 未成交 public static final String CLOSE_TYPE_REVOKE = "15"; // 已撤销 public static final String CLOSE_TYPE_CLOSE = "26"; // 超时关闭 } public class ScopeType { public static final int ALL_CITY = 1; // 全国 public static final int INDEX_CITY = 2; // 指定城市 } public class ActionType { public static final int ACTIVITY_RELEASE = 1; // 发布 public static final int ACTIVITY_TRUSTEESHIP = 5; // 托管资金 public static final int ACTIVITY_EXAMINE = 10; // 审核 public static final int ACTIVITY_BIDDING = 15; // 竞标 public static final int ACTIVITY_BEGINING = 25; // 进行 } public class RoleType{ public static final int DESIGNER_ENTREPRENEURSHIP = 2; // 设计师 public static final int MANAGER_ENTREPRENEURSHIP = 8; // 项目经理 } public class CategoryNo{ public static final String TYPE_RENOVATION = "18066244377801"; //装修量房 public static final String TYPE_BUILDING = "18066244772511"; //买建材 public static final String TYPE_REDUCE_WEIGHT = "18066249534541"; //减肥 public static final String DESIGNER_ENTREPRENEURSHIP = "18090484592661"; //设计师创业 public static final String MANAGER_ENTREPRENEURSHIP = "18100862440751"; //项目经理创业 public static final String TYPE_QUIT_SMOKING = "18058329388341"; //戒烟 public static final String TYPE_QUIT_DRINKING = "18058329101091"; //戒酒 public static final String TYPE_GIVE_UP_GAMBLING = "18058328920311"; //戒赌 } }
[ "3024097031@qq.com" ]
3024097031@qq.com
b471f7f1fc2f7a5742167b8c0071bd8f5ccdd8d0
fe3b1b73172fad6af5fdf30b314d432e05eb8f6b
/vitro-core/webapp/src/edu/cornell/mannlib/vitro/webapp/utils/SparqlQueryUtils.java
f81a1b8885a901250329cd66edfd5a4e598e0cf8
[]
no_license
zahrahariry/VIVO-OpenSocial
4921d2d9698bca4a81d576e11750df86da860332
c031938459c2ac09d36b579c660878756643f4c9
refs/heads/master
2020-04-09T03:14:39.287107
2012-09-28T19:33:33
2012-09-28T19:33:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,855
java
/* Copyright (c) 2012, Cornell University All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Cornell University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package edu.cornell.mannlib.vitro.webapp.utils; import java.util.Arrays; import java.util.Iterator; import java.util.List; import com.hp.hpl.jena.query.Query; import com.hp.hpl.jena.query.QueryFactory; import com.hp.hpl.jena.query.QueryParseException; import com.hp.hpl.jena.query.Syntax; /** * Some utility methods that help when dealing with SPARQL queries. */ public class SparqlQueryUtils { /** * If the user enters any of these characters in a search term, escape it * with a backslash. */ private static final char[] REGEX_SPECIAL_CHARACTERS = "[\\^$.|?*+()]" .toCharArray(); /** * A list of SPARQL syntaxes to try when parsing queries */ public static final List<Syntax> SUPPORTED_SYNTAXES = Arrays.asList( Syntax.syntaxARQ , Syntax.syntaxSPARQL_11); /** * Escape any regex special characters in the string. * * Note that the SPARQL parser requires two backslashes, in order to pass a * single backslash to the REGEX function. * * Also escape a single quote ('), but only with a single backslash, since * this one is for the SPARQL parser itself (single quote is not a special * character to REGEX). */ public static String escapeForRegex(String raw) { StringBuilder clean = new StringBuilder(); outer: for (char c : raw.toCharArray()) { for (char special : REGEX_SPECIAL_CHARACTERS) { if (c == special) { clean.append('\\').append('\\').append(c); continue outer; } } if (c == '\'') { clean.append('\\').append(c); continue outer; } clean.append(c); } return clean.toString(); } /** * A convenience method to attempt parsing a query string with various syntaxes * @param queryString * @return Query */ public static Query create(String queryString) { boolean parseSuccess = false; Iterator<Syntax> syntaxIt = SUPPORTED_SYNTAXES.iterator(); Query query = null; while (!parseSuccess && syntaxIt.hasNext()) { Syntax syntax = syntaxIt.next(); try { query = QueryFactory.create(queryString, syntax); parseSuccess = true; } catch (QueryParseException e) { if (!syntaxIt.hasNext()) { throw e; } } } return query; } }
[ "eric.meeks@ucsf.edu" ]
eric.meeks@ucsf.edu
780daeb37a06dde9e769cbd6000606d3e6b3e38a
078e34aeae4de760d083291f2921fd0e5dc35310
/src/test/java/com/jazz/myapp/web/rest/AuditResourceIT.java
5989b67f746feb477a6cf83052f15a007715171f
[]
no_license
JasmineHAPI/jhipster-sample-application
e14282cc866a99be492075c3d0d5907d395feac8
87f54729e049722b190ede6557e44f25eae56e6c
refs/heads/master
2022-12-24T01:58:47.020689
2020-01-20T07:04:19
2020-01-20T07:04:19
235,038,986
0
0
null
2022-12-16T04:43:32
2020-01-20T07:04:04
Java
UTF-8
Java
false
false
6,773
java
package com.jazz.myapp.web.rest; import com.jazz.myapp.JhipsterSampleApplicationApp; import io.github.jhipster.config.JHipsterProperties; import com.jazz.myapp.config.audit.AuditEventConverter; import com.jazz.myapp.domain.PersistentAuditEvent; import com.jazz.myapp.repository.PersistenceAuditEventRepository; import com.jazz.myapp.service.AuditEventService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.MockitoAnnotations; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import org.springframework.format.support.FormattingConversionService; import org.springframework.http.MediaType; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import java.time.Instant; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; import static org.hamcrest.Matchers.hasItem; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; /** * Integration tests for the {@link AuditResource} REST controller. */ @SpringBootTest(classes = JhipsterSampleApplicationApp.class) @Transactional public class AuditResourceIT { private static final String SAMPLE_PRINCIPAL = "SAMPLE_PRINCIPAL"; private static final String SAMPLE_TYPE = "SAMPLE_TYPE"; private static final Instant SAMPLE_TIMESTAMP = Instant.parse("2015-08-04T10:11:30Z"); private static final long SECONDS_PER_DAY = 60 * 60 * 24; @Autowired private PersistenceAuditEventRepository auditEventRepository; @Autowired private AuditEventConverter auditEventConverter; @Autowired private JHipsterProperties jhipsterProperties; @Autowired private MappingJackson2HttpMessageConverter jacksonMessageConverter; @Autowired @Qualifier("mvcConversionService") private FormattingConversionService formattingConversionService; @Autowired private PageableHandlerMethodArgumentResolver pageableArgumentResolver; private PersistentAuditEvent auditEvent; private MockMvc restAuditMockMvc; @BeforeEach public void setup() { MockitoAnnotations.initMocks(this); AuditEventService auditEventService = new AuditEventService(auditEventRepository, auditEventConverter, jhipsterProperties); AuditResource auditResource = new AuditResource(auditEventService); this.restAuditMockMvc = MockMvcBuilders.standaloneSetup(auditResource) .setCustomArgumentResolvers(pageableArgumentResolver) .setConversionService(formattingConversionService) .setMessageConverters(jacksonMessageConverter).build(); } @BeforeEach public void initTest() { auditEventRepository.deleteAll(); auditEvent = new PersistentAuditEvent(); auditEvent.setAuditEventType(SAMPLE_TYPE); auditEvent.setPrincipal(SAMPLE_PRINCIPAL); auditEvent.setAuditEventDate(SAMPLE_TIMESTAMP); } @Test public void getAllAudits() throws Exception { // Initialize the database auditEventRepository.save(auditEvent); // Get all the audits restAuditMockMvc.perform(get("/management/audits")) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL))); } @Test public void getAudit() throws Exception { // Initialize the database auditEventRepository.save(auditEvent); // Get the audit restAuditMockMvc.perform(get("/management/audits/{id}", auditEvent.getId())) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.principal").value(SAMPLE_PRINCIPAL)); } @Test public void getAuditsByDate() throws Exception { // Initialize the database auditEventRepository.save(auditEvent); // Generate dates for selecting audits by date, making sure the period will contain the audit String fromDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10); String toDate = SAMPLE_TIMESTAMP.plusSeconds(SECONDS_PER_DAY).toString().substring(0, 10); // Get the audit restAuditMockMvc.perform(get("/management/audits?fromDate="+fromDate+"&toDate="+toDate)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL))); } @Test public void getNonExistingAuditsByDate() throws Exception { // Initialize the database auditEventRepository.save(auditEvent); // Generate dates for selecting audits by date, making sure the period will not contain the sample audit String fromDate = SAMPLE_TIMESTAMP.minusSeconds(2*SECONDS_PER_DAY).toString().substring(0, 10); String toDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10); // Query audits but expect no results restAuditMockMvc.perform(get("/management/audits?fromDate=" + fromDate + "&toDate=" + toDate)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(header().string("X-Total-Count", "0")); } @Test public void getNonExistingAudit() throws Exception { // Get the audit restAuditMockMvc.perform(get("/management/audits/{id}", Long.MAX_VALUE)) .andExpect(status().isNotFound()); } @Test @Transactional public void testPersistentAuditEventEquals() throws Exception { TestUtil.equalsVerifier(PersistentAuditEvent.class); PersistentAuditEvent auditEvent1 = new PersistentAuditEvent(); auditEvent1.setId(1L); PersistentAuditEvent auditEvent2 = new PersistentAuditEvent(); auditEvent2.setId(auditEvent1.getId()); assertThat(auditEvent1).isEqualTo(auditEvent2); auditEvent2.setId(2L); assertThat(auditEvent1).isNotEqualTo(auditEvent2); auditEvent1.setId(null); assertThat(auditEvent1).isNotEqualTo(auditEvent2); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
d69614d836ecce170ec12cbee0f42531e35aad3d
35f60505133c66bd1782a89151ff6c03920b509c
/src/main/java/org/drip/execution/parameters/PriceMarketImpact.java
eed6e124b8c1b82cdfafa48e78805aa3f96dec8b
[ "Apache-2.0" ]
permissive
YasserKarim/DROP
28baba9993ebf3f4bc8a104d54f90cbbddb0d36e
b2bd4f22c500ea92676babe9915f3a6b507ea26a
refs/heads/master
2020-07-15T05:17:12.835806
2019-08-23T06:50:02
2019-08-23T06:50:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,795
java
package org.drip.execution.parameters; /* * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*! * Copyright (C) 2019 Lakshmi Krishnamurthy * Copyright (C) 2018 Lakshmi Krishnamurthy * Copyright (C) 2017 Lakshmi Krishnamurthy * Copyright (C) 2016 Lakshmi Krishnamurthy * * This file is part of DROP, an open-source library targeting risk, transaction costs, exposure, margin * calculations, valuation adjustment, and portfolio construction within and across fixed income, * credit, commodity, equity, FX, and structured products. * * https://lakshmidrip.github.io/DROP/ * * DROP is composed of three modules: * * - DROP Analytics Core - https://lakshmidrip.github.io/DROP-Analytics-Core/ * - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/ * - DROP Numerical Core - https://lakshmidrip.github.io/DROP-Numerical-Core/ * * DROP Analytics Core implements libraries for the following: * - Fixed Income Analytics * - Asset Backed Analytics * - XVA Analytics * - Exposure and Margin Analytics * * DROP Portfolio Core implements libraries for the following: * - Asset Allocation Analytics * - Transaction Cost Analytics * * DROP Numerical Core implements libraries for the following: * - Statistical Learning * - Numerical Optimizer * - Spline Builder * - Algorithm Support * * Documentation for DROP is Spread Over: * * - Main => https://lakshmidrip.github.io/DROP/ * - Wiki => https://github.com/lakshmiDRIP/DROP/wiki * - GitHub => https://github.com/lakshmiDRIP/DROP * - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md * - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html * - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal * - Release Versions => https://lakshmidrip.github.io/DROP/version.html * - Community Credits => https://lakshmidrip.github.io/DROP/credits.html * - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues * - JUnit => https://lakshmidrip.github.io/DROP/junit/index.html * - Jacoco => https://lakshmidrip.github.io/DROP/jacoco/index.html * * 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. */ /** * <i>PriceMarketImpact</i> contains the Price Market Impact Inputs used in the Construction of the Impact * Parameters for the Almgren and Chriss (2000) Optimal Trajectory Generation Scheme. The References are: * * <br><br> * <ul> * <li> * Almgren, R., and N. Chriss (1999): Value under Liquidation <i>Risk</i> <b>12 (12)</b> * </li> * <li> * Almgren, R., and N. Chriss (2000): Optimal Execution of Portfolio Transactions <i>Journal of * Risk</i> <b>3 (2)</b> 5-39 * </li> * <li> * Bertsimas, D., and A. W. Lo (1998): Optimal Control of Execution Costs <i>Journal of Financial * Markets</i> <b>1</b> 1-50 * </li> * <li> * Chan, L. K. C., and J. Lakonishak (1995): The Behavior of Stock Prices around Institutional * Trades <i>Journal of Finance</i> <b>50</b> 1147-1174 * </li> * <li> * Keim, D. B., and A. Madhavan (1997): Transaction Costs and Investment Style: An Inter-exchange * Analysis of Institutional Equity Trades <i>Journal of Financial Economics</i> <b>46</b> * 265-292 * </li> * </ul> * * <br><br> * <ul> * <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/PortfolioCore.md">Portfolio Core Module</a></li> * <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/TransactionCostAnalyticsLibrary.md">Transaction Cost Analytics</a></li> * <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/execution/README.md">Execution</a></li> * <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/execution/parameters/README.md">Parameters</a></li> * </ul> * * @author Lakshmi Krishnamurthy */ public abstract class PriceMarketImpact { private double _dblPermanentImpactFactor = java.lang.Double.NaN; private double _dblTemporaryImpactFactor = java.lang.Double.NaN; private org.drip.execution.parameters.AssetTransactionSettings _ats = null; protected PriceMarketImpact ( final org.drip.execution.parameters.AssetTransactionSettings ats, final double dblPermanentImpactFactor, final double dblTemporaryImpactFactor) throws java.lang.Exception { if (null == (_ats = ats) || !org.drip.numerical.common.NumberUtil.IsValid (_dblPermanentImpactFactor = dblPermanentImpactFactor) || 0. > _dblPermanentImpactFactor || !org.drip.numerical.common.NumberUtil.IsValid (_dblTemporaryImpactFactor = dblTemporaryImpactFactor) || 0. >= _dblTemporaryImpactFactor) throw new java.lang.Exception ("PriceMarketImpact Constructor => Invalid Inputs"); } /** * Retrieve the AssetTransactionSettings Instance * * @return The AssetTransactionSettings Instance */ public org.drip.execution.parameters.AssetTransactionSettings ats() { return _ats; } /** * Retrieve the Fraction of the Daily Volume that triggers One Bid-Ask of Permanent Impact Cost * * @return The Fraction of the Daily Volume that triggers One Bid-Ask of Permanent Impact Cost */ public double permanentImpactFactor() { return _dblPermanentImpactFactor; } /** * Retrieve the Fraction of the Daily Volume that triggers One Bid-Ask of Temporary Impact Cost * * @return The Fraction of the Daily Volume that triggers One Bid-Ask of Temporary Impact Cost */ public double temporaryImpactFactor() { return _dblTemporaryImpactFactor; } /** * Generate the Permanent Impact Transaction Function * * @return The Permanent Impact Transaction Function */ abstract public org.drip.execution.impact.TransactionFunction permanentTransactionFunction(); /** * Generate the Temporary Impact Transaction Function * * @return The Temporary Impact Transaction Function */ abstract public org.drip.execution.impact.TransactionFunction temporaryTransactionFunction(); }
[ "lakshmimv7977@gmail.com" ]
lakshmimv7977@gmail.com
f35a09e81074ddc8088b94f3461dc50f8b6ecff7
7edaf0a19ea05fe61d466e58a8f13ff802f4caaf
/app/src/main/java/com/example/androidview/liveBus/LiveDataBusTestActivity1.java
5a54d1605241f52185d390a6d20e2f1c222c6d7c
[]
no_license
heliguo/androidview
42012756fe9f16fe25e47d1d03280ebd1b7fc135
df9a7f3b57a7c7c155e57865f96b669c160cff14
refs/heads/master
2023-08-21T09:08:15.448147
2021-10-23T06:45:03
2021-10-23T06:45:03
263,242,127
0
0
null
2021-06-03T08:26:32
2020-05-12T05:32:35
Java
UTF-8
Java
false
false
1,597
java
package com.example.androidview.liveBus; import android.content.Intent; import android.os.Bundle; import android.util.Log; import androidx.annotation.Nullable; import com.example.androidview.BaseActivity; import com.example.androidview.databinding.ActivityLivedataBusBinding; /** * @author lgh on 2021/10/22 14:43 * @description */ public class LiveDataBusTestActivity1 extends BaseActivity { ActivityLivedataBusBinding mBinding; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); mBinding = ActivityLivedataBusBinding.inflate(getLayoutInflater()); setContentView(mBinding.getRoot()); mBinding.jump.setOnClickListener(v -> startActivity(new Intent(this, LiveDataBusTestActivity2.class))); LiveDataBus.get().with("555", Integer.class).observe(this, integer -> { Log.e("LiveEvent", "onChanged2222: " + integer); // finish(); }); LiveDataBus.get().with("555", Integer.class).postValue(2); } @Override protected void onRestart() { super.onRestart(); Log.e("LiveEvent", "onRestart"); } @Override protected void onStart() { super.onStart(); Log.e("LiveEvent", "onStart"); } protected void onResume() { super.onResume(); Log.e("LiveEvent", "onResume"); // LiveDataBus.get().with("555", Integer.class).postValue(3); } @Override protected void onStop() { super.onStop(); Log.e("LiveEvent", "onStop1111"); } }
[ "ysulgh@163.com" ]
ysulgh@163.com
f1060953f016a683c42440b41d902aef043288ee
ea8dddf3fe1ff80df149b200536c4db921569e38
/src/com/mss/shtoone/domain/TopRealTjjdataView.java
73b5b275a83482d854ae746b5b83a65b99cab058
[]
no_license
Time-Boat/SW-LQAppInterface
98cded50d91866c85cea76df67a2e618b0eb0691
ff884caba2b9bc495e0d16ca1b5b2acf37acc783
refs/heads/master
2020-05-24T00:45:11.369987
2017-04-06T10:30:52
2017-04-06T10:30:52
84,807,264
0
0
null
null
null
null
UTF-8
Java
false
false
3,590
java
package com.mss.shtoone.domain; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class TopRealTjjdataView implements Serializable { /** * */ private static final long serialVersionUID = 2327064209475623765L; @Id private Integer tjjid; private String tjjno; private String tjjdata; private String tjjshijian; private Integer tjjconfirm; private int id; private Integer biaoduanid; private Integer xiangmubuid; private Integer zuoyeduiid; private String smsbaojin; private String smssettype; private String smstype; private String sendtype; private String panshu; private String ambegin; private String amend; private String pmbegin; private String pmend; private String banhezhanminchen; private String jianchen; private String gprsbianhao; public int getId() { return id; } public void setId(int id) { this.id = id; } public Integer getBiaoduanid() { return biaoduanid; } public void setBiaoduanid(Integer biaoduanid) { this.biaoduanid = biaoduanid; } public Integer getXiangmubuid() { return xiangmubuid; } public void setXiangmubuid(Integer xiangmubuid) { this.xiangmubuid = xiangmubuid; } public Integer getZuoyeduiid() { return zuoyeduiid; } public void setZuoyeduiid(Integer zuoyeduiid) { this.zuoyeduiid = zuoyeduiid; } public String getSmsbaojin() { return smsbaojin; } public void setSmsbaojin(String smsbaojin) { this.smsbaojin = smsbaojin; } public String getSmssettype() { return smssettype; } public void setSmssettype(String smssettype) { this.smssettype = smssettype; } public String getSmstype() { return smstype; } public void setSmstype(String smstype) { this.smstype = smstype; } public String getSendtype() { return sendtype; } public void setSendtype(String sendtype) { this.sendtype = sendtype; } public String getPanshu() { return panshu; } public void setPanshu(String panshu) { this.panshu = panshu; } public String getAmbegin() { return ambegin; } public void setAmbegin(String ambegin) { this.ambegin = ambegin; } public String getAmend() { return amend; } public void setAmend(String amend) { this.amend = amend; } public String getPmbegin() { return pmbegin; } public void setPmbegin(String pmbegin) { this.pmbegin = pmbegin; } public String getPmend() { return pmend; } public void setPmend(String pmend) { this.pmend = pmend; } public String getBanhezhanminchen() { return banhezhanminchen; } public void setBanhezhanminchen(String banhezhanminchen) { this.banhezhanminchen = banhezhanminchen; } public String getJianchen() { return jianchen; } public void setJianchen(String jianchen) { this.jianchen = jianchen; } public String getGprsbianhao() { return gprsbianhao; } public void setGprsbianhao(String gprsbianhao) { this.gprsbianhao = gprsbianhao; } public Integer getTjjid() { return tjjid; } public void setTjjid(Integer tjjid) { this.tjjid = tjjid; } public String getTjjno() { return tjjno; } public void setTjjno(String tjjno) { this.tjjno = tjjno; } public String getTjjdata() { return tjjdata; } public void setTjjdata(String tjjdata) { this.tjjdata = tjjdata; } public String getTjjshijian() { return tjjshijian; } public void setTjjshijian(String tjjshijian) { this.tjjshijian = tjjshijian; } public Integer getTjjconfirm() { return tjjconfirm; } public void setTjjconfirm(Integer tjjconfirm) { this.tjjconfirm = tjjconfirm; } }
[ "770164810@qq.com" ]
770164810@qq.com
8ba765a584c8745b7f0bba9242942db572ece841
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
/DrJava/rev5266-5336-compilers-hj/left-branch-5336/dynamicjava/src/koala/dynamicjava/tree/GreaterOrEqualExpression.java
61812dfd9450c057d113a1d0a89830c98a5af787
[]
no_license
joliebig/featurehouse_fstmerge_examples
af1b963537839d13e834f829cf51f8ad5e6ffe76
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
refs/heads/master
2016-09-05T10:24:50.974902
2013-03-28T16:28:47
2013-03-28T16:28:47
9,080,611
3
2
null
null
null
null
UTF-8
Java
false
false
512
java
package koala.dynamicjava.tree; import koala.dynamicjava.tree.visitor.*; public class GreaterOrEqualExpression extends BinaryExpression { public GreaterOrEqualExpression(Expression lexp, Expression rexp) { this(lexp, rexp, SourceInfo.NONE); } public GreaterOrEqualExpression(Expression lexp, Expression rexp, SourceInfo si) { super(lexp, rexp, si); } public <T> T acceptVisitor(Visitor<T> visitor) { return visitor.visit(this); } }
[ "joliebig@fim.uni-passau.de" ]
joliebig@fim.uni-passau.de
e63261c7d3df1d1871e88692108de0c2271a0f1f
5ca4b1ada88d7dd60186223ff21d16572eca44bd
/jflow-core/src/main/java/BP/WF/Data/Eval.java
f04bc55ff5b7cf6124f6f219d2535bff660d4d37
[]
no_license
swmwlm/skoa-product
5f61a3d4657d803adc1b0e8e3d1db754b8daf73b
cc52de1950a651df335ca64f554a5aafa86ff6d6
refs/heads/master
2021-01-22T07:06:18.440340
2017-03-14T03:35:01
2017-03-14T03:35:01
81,800,503
0
0
null
null
null
null
UTF-8
Java
false
false
5,687
java
package BP.WF.Data; import java.util.*; import BP.DA.*; import BP.En.*; import BP.En.Map; import BP.WF.*; import BP.Port.*; /** 工作质量评价 */ public class Eval extends EntityMyPK { ///#region 基本属性 /** 流程标题 */ public final String getTitle() { return this.GetValStringByKey(EvalAttr.Title); } public final void setTitle(String value) { this.SetValByKey(EvalAttr.Title, value); } /** 工作ID */ public final long getWorkID() { return this.GetValInt64ByKey(EvalAttr.WorkID); } public final void setWorkID(long value) { this.SetValByKey(EvalAttr.WorkID,value); } /** 节点编号 */ public final int getFK_Node() { return this.GetValIntByKey(EvalAttr.FK_Node); } public final void setFK_Node(int value) { this.SetValByKey(EvalAttr.FK_Node,value); } /** 节点名称 */ public final String getNodeName() { return this.GetValStringByKey(EvalAttr.NodeName); } public final void setNodeName(String value) { this.SetValByKey(EvalAttr.NodeName, value); } /** 被评估人员名称 */ public final String getEvalEmpName() { return this.GetValStringByKey(EvalAttr.EvalEmpName); } public final void setEvalEmpName(String value) { this.SetValByKey(EvalAttr.EvalEmpName,value); } /** 记录日期 */ public final String getRDT() { return this.GetValStringByKey(EvalAttr.RDT); } public final void setRDT(String value) { this.SetValByKey(EvalAttr.RDT,value); } /** 流程隶属部门 */ public final String getFK_Dept() { return this.GetValStringByKey(EvalAttr.FK_Dept); } public final void setFK_Dept(String value) { this.SetValByKey(EvalAttr.FK_Dept,value); } /** 部门名称 */ public final String getDeptName() { return this.GetValStringByKey(EvalAttr.DeptName); } public final void setDeptName(String value) { this.SetValByKey(EvalAttr.DeptName, value); } /** 隶属年月 */ public final String getFK_NY() { return this.GetValStringByKey(EvalAttr.FK_NY); } public final void setFK_NY(String value) { this.SetValByKey(EvalAttr.FK_NY,value); } /** 流程编号 */ public final String getFK_Flow() { return this.GetValStringByKey(EvalAttr.FK_Flow); } public final void setFK_Flow(String value) { this.SetValByKey(EvalAttr.FK_Flow, value); } /** 流程名称 */ public final String getFlowName() { return this.GetValStringByKey(EvalAttr.FlowName); } public final void setFlowName(String value) { this.SetValByKey(EvalAttr.FlowName, value); } /** 评价人 */ public final String getRec() { return this.GetValStringByKey(EvalAttr.Rec); } public final void setRec(String value) { this.SetValByKey(EvalAttr.Rec,value); } /** 评价人名称 */ public final String getRecName() { return this.GetValStringByKey(EvalAttr.RecName); } public final void setRecName(String value) { this.SetValByKey(EvalAttr.RecName, value); } /** 评价内容 */ public final String getEvalNote() { return this.GetValStringByKey(EvalAttr.EvalNote); } public final void setEvalNote(String value) { this.SetValByKey(EvalAttr.EvalNote, value); } /** 被考核的人员编号 */ public final String getEvalEmpNo() { return this.GetValStringByKey(EvalAttr.EvalEmpNo); } public final void setEvalEmpNo(String value) { this.SetValByKey(EvalAttr.EvalEmpNo, value); } /** 评价分值 */ public final String getEvalCent() { return this.GetValStringByKey(EvalAttr.EvalCent); } public final void setEvalCent(String value) { this.SetValByKey(EvalAttr.EvalCent, value); } ///#endregion ///#region 构造函数 /** 工作质量评价 */ public Eval() { } /** 工作质量评价 @param workid @param FK_Node */ public Eval(int workid, int FK_Node) { this.setWorkID(workid); this.setFK_Node(FK_Node); this.Retrieve(); } /** 重写基类方法 */ @Override public Map getEnMap() { if (this.get_enMap() != null) { return this.get_enMap(); } Map map = new Map("WF_CHEval", "工作质量评价"); map.AddMyPK(); map.AddTBString(EvalAttr.Title, null, "标题", false, true, 0, 500, 10); map.AddTBString(EvalAttr.FK_Flow, null, "流程编号", false, true, 0, 7, 10); map.AddTBString(EvalAttr.FlowName, null, "流程名称", false, true, 0, 100, 10); map.AddTBInt(EvalAttr.WorkID, 0, "工作ID", false, true); map.AddTBInt(EvalAttr.FK_Node, 0, "评价节点", false, true); map.AddTBString(EvalAttr.NodeName, null, "节点名称", false, true, 0, 100, 10); map.AddTBString(EvalAttr.Rec, null, "评价人", false, true, 0, 50, 10); map.AddTBString(EvalAttr.RecName, null, "评价人名称", false, true, 0, 50, 10); map.AddTBDateTime(EvalAttr.RDT, "评价日期", true, true); map.AddTBString(EvalAttr.EvalEmpNo, null, "被考核的人员编号", false, true, 0, 50, 10); map.AddTBString(EvalAttr.EvalEmpName, null, "被考核的人员名称", false, true, 0, 50, 10); map.AddTBString(EvalAttr.EvalCent, null, "评价分值", false, true, 0, 20, 10); map.AddTBString(EvalAttr.EvalNote, null, "评价内容", false, true, 0, 20, 10); map.AddTBString(EvalAttr.FK_Dept, null, "部门", false, true, 0, 50, 10); map.AddTBString(EvalAttr.DeptName, null, "部门名称", false, true, 0, 100, 10); map.AddTBString(EvalAttr.FK_NY, null, "年月", false, true, 0, 7, 10); this.set_enMap(map); return this.get_enMap(); } ///#endregion }
[ "81367070@qq.com" ]
81367070@qq.com
5c24118a41a31316b524f2cccec8f8823242663e
acd9b11687fd0b5d536823daf4183a596d4502b2
/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/ComponentTemplate.java
d5c87acd1bb3e9082e1e1c40e96ea2759a29b39c
[ "Apache-2.0" ]
permissive
szabosteve/elasticsearch-java
75be71df80a4e010abe334a5288b53fa4a2d6d5e
79a1249ae77be2ce9ebd5075c1719f3c8be49013
refs/heads/main
2023-08-24T15:36:51.047105
2021-10-01T14:23:34
2021-10-01T14:23:34
399,091,850
0
0
Apache-2.0
2021-08-23T12:15:19
2021-08-23T12:15:19
null
UTF-8
Java
false
false
4,656
java
/* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ //---------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. //---------------------------------------------------- package co.elastic.clients.elasticsearch.cluster; import co.elastic.clients.json.DelegatingDeserializer; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; import java.lang.String; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; // typedef: cluster._types.ComponentTemplate @JsonpDeserializable public final class ComponentTemplate implements JsonpSerializable { private final String name; private final ComponentTemplateNode componentTemplate; // --------------------------------------------------------------------------------------------- public ComponentTemplate(Builder builder) { this.name = Objects.requireNonNull(builder.name, "name"); this.componentTemplate = Objects.requireNonNull(builder.componentTemplate, "component_template"); } public ComponentTemplate(Function<Builder, Builder> fn) { this(fn.apply(new Builder())); } /** * API name: {@code name} */ public String name() { return this.name; } /** * API name: {@code component_template} */ public ComponentTemplateNode componentTemplate() { return this.componentTemplate; } /** * Serialize this object to JSON. */ public void serialize(JsonGenerator generator, JsonpMapper mapper) { generator.writeStartObject(); serializeInternal(generator, mapper); generator.writeEnd(); } protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("name"); generator.write(this.name); generator.writeKey("component_template"); this.componentTemplate.serialize(generator, mapper); } // --------------------------------------------------------------------------------------------- /** * Builder for {@link ComponentTemplate}. */ public static class Builder implements ObjectBuilder<ComponentTemplate> { private String name; private ComponentTemplateNode componentTemplate; /** * API name: {@code name} */ public Builder name(String value) { this.name = value; return this; } /** * API name: {@code component_template} */ public Builder componentTemplate(ComponentTemplateNode value) { this.componentTemplate = value; return this; } /** * API name: {@code component_template} */ public Builder componentTemplate( Function<ComponentTemplateNode.Builder, ObjectBuilder<ComponentTemplateNode>> fn) { return this.componentTemplate(fn.apply(new ComponentTemplateNode.Builder()).build()); } /** * Builds a {@link ComponentTemplate}. * * @throws NullPointerException * if some of the required fields are null. */ public ComponentTemplate build() { return new ComponentTemplate(this); } } // --------------------------------------------------------------------------------------------- /** * Json deserializer for {@link ComponentTemplate} */ public static final JsonpDeserializer<ComponentTemplate> _DESERIALIZER = ObjectBuilderDeserializer .lazy(Builder::new, ComponentTemplate::setupComponentTemplateDeserializer, Builder::build); protected static void setupComponentTemplateDeserializer(DelegatingDeserializer<ComponentTemplate.Builder> op) { op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); op.add(Builder::componentTemplate, ComponentTemplateNode._DESERIALIZER, "component_template"); } }
[ "sylvain@elastic.co" ]
sylvain@elastic.co
37a08a93350bbf772dd6a497fa1781279ae807cf
047cbf6544f4f15b9857e43ea7844da239e1fde6
/solon/src/main/java/org/noear/solon/core/XMap.java
461f35ebf46376d558c8d1aa32a973ac903e8422
[ "Apache-2.0" ]
permissive
Coder-Playground/solon
11c4ec3ca46931ae7ae9873ac6aa884892dd9b45
425fe57b89cfff5b3faf5bc702994c0e93984322
refs/heads/master
2022-12-28T20:08:09.713870
2020-10-15T12:23:38
2020-10-15T12:23:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,839
java
package org.noear.solon.core; import org.noear.solon.XUtil; import org.noear.solon.ext.LinkedCaseInsensitiveMap; import java.util.Arrays; import java.util.List; import java.util.Map; /** * 可排序,不区分大小写 * * 用于:参数解析,Header,Param 处理 * * @author noear * @since 1.0 * */ public class XMap extends LinkedCaseInsensitiveMap<String> { public XMap() { super(); } public XMap(Map<String, String> map) { super(); putAll(map); } public static XMap from(String[] args) { return from(Arrays.asList(args)); } public static XMap from(List<String> args) { XMap d = new XMap(); if (args != null) { int len = args.size(); for (int i = 0; i < len; i++) { String arg = args.get(i).replaceAll("-*", ""); if (arg.indexOf("=") > 0) { String[] ss = arg.split("="); d.put(ss[0], ss[1]); } else { if (i + 1 < len) { d.put(arg, args.get(i + 1)); } i++; } } } return d; } public int getInt(String key) { String temp = get(key); if (XUtil.isEmpty(temp)) { return 0; } else { return Integer.parseInt(temp); } } public long getLong(String key) { String temp = get(key); if (XUtil.isEmpty(temp)) { return 0l; } else { return Long.parseLong(temp); } } public double getDouble(String key) { String temp = get(key); if (XUtil.isEmpty(temp)) { return 0d; } else { return Double.parseDouble(temp); } } }
[ "noear@live.cn" ]
noear@live.cn
c1e6493fe2aebcbb5f7e3a3119af7459b9ef8fc0
57c35ae26ad36013dc6473fcb1b0b64dd8348622
/eclip_22_6_2018/javacore/src/com/baitap/BangCuuChuong.java
8f8774ee0eaab0a36f378e25211c8ef33e0522d3
[]
no_license
Trongphamsr/eclip-crud-ss-date-jsp
e99e877ab158591ab2c642f1e71fd12bf2e48cd8
6e3e5d811fc1228bff792de7b299ef1756c3d834
refs/heads/master
2020-04-26T09:57:06.400290
2019-03-03T07:47:32
2019-03-03T07:47:32
173,473,097
0
0
null
null
null
null
UTF-8
Java
false
false
246
java
package com.baitap; public class BangCuuChuong { public static void main(String[] args) { for (int i = 1; i < 10; i++) { for (int j = 1; j < 10; j++) { System.out.print(i+"x"+j+"="+i*j+"\n"); } System.out.println(" "); } } }
[ "=" ]
=
a9632cb7102a9cd0436d281be14e9343590cc362
5d32348ec4ae9b871751662ba2735fc196eeb5e5
/datastructure_imook/src/main/java/datastructure/u_06_BinarySearchTree/t_04_Improved_Add_Elements_in_BST/src/Solution.java
019ac9fe0c8e3ca88ecc2f04f3d2535af7396512
[]
no_license
kingdelee/JDK11_Lee_Mvn_20181213
0060e4a3269dcf7a635ba20871fb6077aa47a790
c106c2b98ac466dba85756827fa26c0b2302550a
refs/heads/master
2020-04-13T11:56:27.280624
2019-03-28T10:06:20
2019-03-28T10:06:20
163,188,239
0
0
null
null
null
null
UTF-8
Java
false
false
2,142
java
package datastructure.u_06_BinarySearchTree.t_04_Improved_Add_Elements_in_BST.src; /// Leetcode 804. Unique Morse Code Words /// https://leetcode.com/problems/unique-morse-code-words/description/ /// /// 课程中在这里暂时没有介绍这个问题 /// 该代码主要用于使用Leetcode上的问题测试我们的BST类 public class Solution { private class BST<E extends Comparable<E>> { private class Node { public E e; public Node left, right; public Node(E e) { this.e = e; left = null; right = null; } } private Node root; private int size; public BST() { root = null; size = 0; } public int size() { return size; } public boolean isEmpty() { return size == 0; } // 向二分搜索树中添加新的元素e public void add(E e) { root = add(root, e); } // 向以node为根的二分搜索树中插入元素e,递归算法 // 返回插入新节点后二分搜索树的根 private Node add(Node node, E e) { if (node == null) { size++; return new Node(e); } if (e.compareTo(node.e) < 0) node.left = add(node.left, e); else if (e.compareTo(node.e) > 0) node.right = add(node.right, e); return node; } } public int uniqueMorseRepresentations(String[] words) { String[] codes = {".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", ".-..", "--", "-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--.."}; BST<String> bst = new BST<>(); for (String word : words) { StringBuilder res = new StringBuilder(); for (int i = 0; i < word.length(); i++) res.append(codes[word.charAt(i) - 'a']); bst.add(res.toString()); } return bst.size(); } }
[ "137211319@qq.com" ]
137211319@qq.com
49f8263732f52ade71745d55fd89d4fd87209602
4686dd88101fa2c7bf401f1338114fcf2f3fc28e
/client/rest-high-level/src/main/java/org/elasticsearch/client/core/ShardsAcknowledgedResponse.java
50d9f46b760ae4af142a159e7d47d22d8eaf17a1
[ "Apache-2.0", "LicenseRef-scancode-elastic-license-2018" ]
permissive
strapdata/elassandra
55f25be97533435d7d3ebaf9fa70d985020163e2
b90667791768188a98641be0f758ff7cd9f411f0
refs/heads/v6.8.4-strapdata
2023-08-27T18:06:35.023045
2022-01-03T14:21:32
2022-01-03T14:21:32
41,209,174
1,199
203
Apache-2.0
2022-12-08T00:38:37
2015-08-22T13:52:08
Java
UTF-8
Java
false
false
2,360
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch 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.elasticsearch.client.core; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.XContentParser; import java.io.IOException; import static org.elasticsearch.common.xcontent.ConstructingObjectParser.constructorArg; public class ShardsAcknowledgedResponse extends AcknowledgedResponse { protected static final String SHARDS_PARSE_FIELD_NAME = "shards_acknowledged"; private static ConstructingObjectParser<ShardsAcknowledgedResponse, Void> buildParser() { ConstructingObjectParser<ShardsAcknowledgedResponse, Void> p = new ConstructingObjectParser<>("freeze", true, args -> new ShardsAcknowledgedResponse((boolean) args[0], (boolean) args[1])); p.declareBoolean(constructorArg(), new ParseField(AcknowledgedResponse.PARSE_FIELD_NAME)); p.declareBoolean(constructorArg(), new ParseField(SHARDS_PARSE_FIELD_NAME)); return p; } private static final ConstructingObjectParser<ShardsAcknowledgedResponse, Void> PARSER = buildParser(); private final boolean shardsAcknowledged; public ShardsAcknowledgedResponse(boolean acknowledged, boolean shardsAcknowledged) { super(acknowledged); this.shardsAcknowledged = shardsAcknowledged; } public boolean isShardsAcknowledged() { return shardsAcknowledged; } public static ShardsAcknowledgedResponse fromXContent(XContentParser parser) throws IOException { return PARSER.parse(parser, null); } }
[ "simonw@apache.org" ]
simonw@apache.org
5acbd137987d32f551fd9105dee6ff65b7c330b0
1e9d9f2a1f49fe6ad543f9c199bbfbfaa05b75f7
/src/main/java/org/mitre/stix/ttp_1/VictimTargetingType.java
d2115770c9066946d435516c95d9bf9d7a082244
[]
no_license
raydogg779/Java_Stix
7ceec4bbc92d95fe04b7684070c7b407e5f62366
0df279a4f2a5dab3567d34842e58fcd13c41f286
refs/heads/master
2021-01-20T21:56:54.967406
2014-04-09T21:21:28
2014-04-09T21:21:28
23,079,250
1
0
null
null
null
null
UTF-8
Java
false
false
5,356
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2014.04.08 at 09:40:17 PM EDT // package org.mitre.stix.ttp_1; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import org.mitre.cybox.cybox_2.ObservablesType; import org.mitre.stix.common_1.ControlledVocabularyStringType; import org.mitre.stix.common_1.IdentityType; /** * <p>Java class for VictimTargetingType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="VictimTargetingType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Identity" type="{http://stix.mitre.org/common-1}IdentityType" minOccurs="0"/> * &lt;element name="Targeted_Systems" type="{http://stix.mitre.org/common-1}ControlledVocabularyStringType" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="Targeted_Information" type="{http://stix.mitre.org/common-1}ControlledVocabularyStringType" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="Targeted_Technical_Details" type="{http://cybox.mitre.org/cybox-2}ObservablesType" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "VictimTargetingType", propOrder = { "identity", "targetedSystems", "targetedInformation", "targetedTechnicalDetails" }) public class VictimTargetingType { @XmlElement(name = "Identity") protected IdentityType identity; @XmlElement(name = "Targeted_Systems") protected List<ControlledVocabularyStringType> targetedSystems; @XmlElement(name = "Targeted_Information") protected List<ControlledVocabularyStringType> targetedInformation; @XmlElement(name = "Targeted_Technical_Details") protected ObservablesType targetedTechnicalDetails; /** * Gets the value of the identity property. * * @return * possible object is * {@link IdentityType } * */ public IdentityType getIdentity() { return identity; } /** * Sets the value of the identity property. * * @param value * allowed object is * {@link IdentityType } * */ public void setIdentity(IdentityType value) { this.identity = value; } /** * Gets the value of the targetedSystems property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the targetedSystems property. * * <p> * For example, to add a new item, do as follows: * <pre> * getTargetedSystems().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link ControlledVocabularyStringType } * * */ public List<ControlledVocabularyStringType> getTargetedSystems() { if (targetedSystems == null) { targetedSystems = new ArrayList<ControlledVocabularyStringType>(); } return this.targetedSystems; } /** * Gets the value of the targetedInformation property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the targetedInformation property. * * <p> * For example, to add a new item, do as follows: * <pre> * getTargetedInformation().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link ControlledVocabularyStringType } * * */ public List<ControlledVocabularyStringType> getTargetedInformation() { if (targetedInformation == null) { targetedInformation = new ArrayList<ControlledVocabularyStringType>(); } return this.targetedInformation; } /** * Gets the value of the targetedTechnicalDetails property. * * @return * possible object is * {@link ObservablesType } * */ public ObservablesType getTargetedTechnicalDetails() { return targetedTechnicalDetails; } /** * Sets the value of the targetedTechnicalDetails property. * * @param value * allowed object is * {@link ObservablesType } * */ public void setTargetedTechnicalDetails(ObservablesType value) { this.targetedTechnicalDetails = value; } }
[ "tscheponik@gmail.com" ]
tscheponik@gmail.com
d449aeeec95f93a43bdd41b55bc0d0f204a39454
27af8b567523f2bb937cde179c0a3d3e89459e81
/src/main/java/com/qthegamep/diploma/project/back/dto/GenerationRequestDTO.java
5a30e01020882f5eb2bf6e738da94fcbd043acaa
[]
no_license
nikitakoliadin/diploma.project.back
ff89ab96ac972ad59914b5a3da7de5d82ab84994
ce69e5663df974514948009e9cd0cc2cbe81ee85
refs/heads/master
2023-07-09T17:13:43.576069
2021-08-21T08:44:12
2021-08-21T08:44:12
392,701,545
0
0
null
null
null
null
UTF-8
Java
false
false
1,047
java
package com.qthegamep.diploma.project.back.dto; import java.util.Objects; public class GenerationRequestDTO { private String alias; private String pass; @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GenerationRequestDTO that = (GenerationRequestDTO) o; return Objects.equals(alias, that.alias) && Objects.equals(pass, that.pass); } @Override public int hashCode() { return Objects.hash(alias, pass); } @Override public String toString() { return "GenerationRequestDTO{" + "alias='" + alias + '\'' + ", pass='" + pass + '\'' + '}'; } public String getAlias() { return alias; } public void setAlias(String alias) { this.alias = alias; } public String getPass() { return pass; } public void setPass(String pass) { this.pass = pass; } }
[ "qThegamEp@gmail.com" ]
qThegamEp@gmail.com
eae39b2bab70b15151805edda7242ce25db665cb
d89f77bcbcd3474cbb038d79a407c912c6e00cf9
/src/main/java/com/tencentcloudapi/apigateway/v20180808/models/ServiceEnvironmentSet.java
7e0a9c6b8edc31e958dd294075941df3d36b614d
[ "Apache-2.0" ]
permissive
victoryckl/tencentcloud-sdk-java
23e5486445d7e4316f85247b35a2e2ba69b92546
73a6e6632e0273cfdebd5487cc7ecff920c5e89c
refs/heads/master
2022-11-20T16:14:11.452984
2020-07-28T01:08:50
2020-07-28T01:08:50
283,146,154
0
1
Apache-2.0
2020-07-28T08:14:10
2020-07-28T08:14:09
null
UTF-8
Java
false
false
3,014
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.apigateway.v20180808.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class ServiceEnvironmentSet extends AbstractModel{ /** * 服务绑定环境总数。 注意:此字段可能返回 null,表示取不到有效值。 */ @SerializedName("TotalCount") @Expose private Long TotalCount; /** * 服务绑定环境列表。 注意:此字段可能返回 null,表示取不到有效值。 */ @SerializedName("EnvironmentList") @Expose private Environment [] EnvironmentList; /** * Get 服务绑定环境总数。 注意:此字段可能返回 null,表示取不到有效值。 * @return TotalCount 服务绑定环境总数。 注意:此字段可能返回 null,表示取不到有效值。 */ public Long getTotalCount() { return this.TotalCount; } /** * Set 服务绑定环境总数。 注意:此字段可能返回 null,表示取不到有效值。 * @param TotalCount 服务绑定环境总数。 注意:此字段可能返回 null,表示取不到有效值。 */ public void setTotalCount(Long TotalCount) { this.TotalCount = TotalCount; } /** * Get 服务绑定环境列表。 注意:此字段可能返回 null,表示取不到有效值。 * @return EnvironmentList 服务绑定环境列表。 注意:此字段可能返回 null,表示取不到有效值。 */ public Environment [] getEnvironmentList() { return this.EnvironmentList; } /** * Set 服务绑定环境列表。 注意:此字段可能返回 null,表示取不到有效值。 * @param EnvironmentList 服务绑定环境列表。 注意:此字段可能返回 null,表示取不到有效值。 */ public void setEnvironmentList(Environment [] EnvironmentList) { this.EnvironmentList = EnvironmentList; } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "TotalCount", this.TotalCount); this.setParamArrayObj(map, prefix + "EnvironmentList.", this.EnvironmentList); } }
[ "tencentcloudapi@tenent.com" ]
tencentcloudapi@tenent.com
7addae5370e09c52fa3d7c065b00747b2faf6fd7
1dfa9b04f377a7ac2a1ecd8a844817c3882482f8
/src/main/java/br/com/github/guilhermealvessilve/blockchainmining/akka/exercise3/BlockChainMiner.java
389fcff5b49b1a0abfd3948df6d4c0436982beaa
[]
no_license
guilherme-alves-silve/akka-study
50fadf91ed8d5cf8ae696977f442010117046a63
ba3c39e66c6012fc51412dbb2633f2794f013afd
refs/heads/master
2023-07-15T22:35:56.747803
2021-09-05T04:09:23
2021-09-05T04:09:23
397,068,513
0
0
null
null
null
null
UTF-8
Java
false
false
2,816
java
package br.com.github.guilhermealvessilve.blockchainmining.akka.exercise3; import akka.actor.typed.ActorSystem; import akka.actor.typed.javadsl.AskPattern; import br.com.github.guilhermealvessilve.blockchainmining.model.Block; import br.com.github.guilhermealvessilve.blockchainmining.model.BlockChain; import br.com.github.guilhermealvessilve.blockchainmining.model.BlockValidationException; import br.com.github.guilhermealvessilve.blockchainmining.model.HashResult; import br.com.github.guilhermealvessilve.blockchainmining.utils.BlocksData; import java.time.Duration; import java.util.concurrent.CompletionStage; public class BlockChainMiner { private final int difficultyLevel = 5; private final long start = System.currentTimeMillis(); private final BlockChain blocks = new BlockChain(); private ActorSystem<ManagerBehavior.Command> actorSystem; private void mineNextBlock() { int nextBlockId = blocks.getSize(); if (nextBlockId < 10) { final String lastHash = nextBlockId > 0 ? blocks.getLastHash() : "0"; final Block block = BlocksData.getNextBlock(nextBlockId, lastHash); final CompletionStage<HashResult> results = AskPattern.ask(actorSystem, me -> new ManagerBehavior.MineBlockCommand(difficultyLevel, block, me), Duration.ofSeconds(30), actorSystem.scheduler()); results.whenComplete((reply, failure) -> { if (reply == null || reply.isRunning()) { System.out.println("ERROR: No valid hash was found for a block"); return; } block.setHash(reply.getHash()); block.setNonce(reply.getNonce()); try { blocks.addBlock(block); System.out.println("Block added with hash : " + block.getHash()); System.out.println("Block added with nonce: " + block.getNonce()); mineNextBlock(); } catch (BlockValidationException e) { System.out.println("ERROR: No valid hash was found for a block"); } }); } else { long end = System.currentTimeMillis(); actorSystem.terminate(); blocks.printAndValidate(); System.out.println("Time taken " + (end - start) + " ms."); } } public void mineBlocks() { actorSystem = ActorSystem.create(ManagerBehavior.newInstance(), "BlockChainMiner"); mineNextBlock(); miniAnIndependentBlock(); } public void miniAnIndependentBlock() { final var block = BlocksData.getNextBlock(7, "123456"); final CompletionStage<HashResult> results = AskPattern.ask(actorSystem, me -> new ManagerBehavior.MineBlockCommand(difficultyLevel, block, me), Duration.ofSeconds(30), actorSystem.scheduler()); results.whenComplete((reply, failure) -> { if (reply == null || reply.isRunning()) { System.out.println("ERROR: No valid hash was found for a block"); return; } System.out.println("Everything is okay!"); }); } }
[ "guilherme_alves_silve@hotmail.com" ]
guilherme_alves_silve@hotmail.com
2191a372b55431c51e51729b875cf9642f1494e9
d5e596b9f61a7bb8474d16d00f53041ee91c7d56
/sdk/JN-SW-4170/Tools/Eclipse_plugins/Source/com.jennic.zps.configeditor/src/com/jennic/ZPSConfiguration/impl/TCKeyImpl.java
968f45ce97ceef252a1fbc24099f9e673ce526ac
[ "BSD-3-Clause" ]
permissive
grostim/JN5169-for-xiaomi-wireless-switch
3134408d7a1b89eca979167b915df45865573a20
06a771795d3b2ab4095eb4d950244ee5f94690f4
refs/heads/master
2020-12-11T09:49:54.123791
2019-07-09T02:24:32
2019-07-09T02:24:32
233,812,882
1
1
NOASSERTION
2020-01-14T10:10:46
2020-01-14T10:10:45
null
UTF-8
Java
false
false
999
java
/** * (C) Jennic Ltd * * $Id: TCKeyImpl.java 78102 2016-03-24 15:35:29Z nxp29741 $ */ package com.jennic.ZPSConfiguration.impl; import com.jennic.ZPSConfiguration.TCKey; import com.jennic.ZPSConfiguration.ZPSConfigurationPackage; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.EObjectImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>TC Key</b></em>'. * <!-- end-user-doc --> * <p> * </p> * * @generated */ public abstract class TCKeyImpl extends EObjectImpl implements TCKey { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final String copyright = "(C) NXP B.V"; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected TCKeyImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return ZPSConfigurationPackage.Literals.TC_KEY; } } //TCKeyImpl
[ "248668342@qq.com" ]
248668342@qq.com
4c0e5e673a2c07e5af9c03f1df96e111b86cfe66
68047d2f520ab586f16faa8fd3e4287ea478b26d
/android/src/main/java/com/facebook/flipper/nativeplugins/table/TableRow.java
d3fd5568096a1b970761f8e3dffc357195fd9c4f
[ "MIT" ]
permissive
s1rius/flipper
34bf8523af1bee09a8bd28fcb61c4cf3981692ab
082daa57eadb05f9455bf62cdd832974e54348b3
refs/heads/master
2020-08-05T14:56:44.613410
2019-10-03T14:10:37
2019-10-03T14:10:37
186,237,175
3
0
MIT
2019-05-12T09:50:23
2019-05-12T09:50:22
null
UTF-8
Java
false
false
2,963
java
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the LICENSE * file in the root directory of this source tree. */ package com.facebook.flipper.nativeplugins.table; import com.facebook.flipper.core.FlipperObject; import com.facebook.flipper.nativeplugins.components.Sidebar; import java.util.Map; public abstract class TableRow { public interface Value { FlipperObject serialize(); } public static class StringValue implements Value { private String val; public StringValue(String s) { this.val = s; } @Override public FlipperObject serialize() { return new FlipperObject.Builder().put("type", "string").put("value", val).build(); } } public static class IntValue implements Value { private int val; public IntValue(int i) { this.val = i; } @Override public FlipperObject serialize() { return new FlipperObject.Builder().put("type", "int").put("value", val).build(); } } public static class BooleanValue implements Value { private boolean val; public BooleanValue(boolean i) { this.val = i; } @Override public FlipperObject serialize() { return new FlipperObject.Builder().put("type", "boolean").put("value", val).build(); } } public static class TimeValue implements Value { private long millis; public TimeValue(long millis) { this.millis = millis; } @Override public FlipperObject serialize() { return new FlipperObject.Builder().put("type", "time").put("value", millis).build(); } } public static class DurationValue implements Value { private long millis; public DurationValue(long millis) { this.millis = millis; } @Override public FlipperObject serialize() { return new FlipperObject.Builder().put("type", "duration").put("value", millis).build(); } } final String id; final Map<Column, ? extends Value> values; final Sidebar sidebar; public TableRow(String id, Map<Column, ? extends Value> values, Sidebar sidebar) { this.id = id; this.values = values; this.sidebar = sidebar; } final FlipperObject serialize() { FlipperObject.Builder columnsObject = new FlipperObject.Builder(); for (Map.Entry<Column, ? extends Value> e : values.entrySet()) { columnsObject.put(e.getKey().id, e.getValue().serialize()); } columnsObject.put("id", id); return new FlipperObject.Builder() .put("columns", columnsObject.build()) .put("sidebar", sidebar != null ? sidebar.serialize() : null) .put("id", id) .build(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null) { return false; } if (getClass() != o.getClass()) { return false; } return serialize().equals(((TableRow) o).serialize()); } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
e0b6d55b980e15346563fde99b01c8b11ce12d68
39b7e86a2b5a61a1f7befb47653f63f72e9e4092
/src/main/java/com/alipay/api/domain/KbAdvertSubjectVoucherResponse.java
875eb15711020c144d4ff1a5ed7d8aaf08ef375e
[ "Apache-2.0" ]
permissive
slin1972/alipay-sdk-java-all
dbec0604c2d0b76d8a1ebf3fd8b64d4dd5d21708
63095792e900bbcc0e974fc242d69231ec73689a
refs/heads/master
2020-08-12T14:18:07.203276
2019-10-13T09:00:11
2019-10-13T09:00:11
214,782,009
0
0
Apache-2.0
2019-10-13T07:56:34
2019-10-13T07:56:34
null
UTF-8
Java
false
false
5,297
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, 2017-07-11 13:44:23 */ public class KbAdvertSubjectVoucherResponse extends AlipayObject { private static final long serialVersionUID = 5352596224371173399L; /** * 品牌名称 */ @ApiField("brand_name") private String brandName; /** * 适用城市ID列表 */ @ApiListField("city_ids") @ApiField("string") private List<String> cityIds; /** * 背景图片 */ @ApiField("cover") private String cover; /** * 日库存 */ @ApiField("daily_inventory") private String dailyInventory; /** * 结束时间 */ @ApiField("gmt_end") private String gmtEnd; /** * 上架时间 */ @ApiField("gmt_start") private String gmtStart; /** * logo图片 */ @ApiField("logo") private String logo; /** * 使用须知 */ @ApiListField("manuals") @ApiField("kbadvert_voucher_manual") private List<KbadvertVoucherManual> manuals; /** * 商家名称 */ @ApiField("merchant_name") private String merchantName; /** * 商户ID */ @ApiField("partner_id") private String partnerId; /** * BUY:购买模式 OBTAIN:认领 */ @ApiField("purchase_mode") private String purchaseMode; /** * 门店ID列表 */ @ApiListField("shop_ids") @ApiField("string") private List<String> shopIds; /** * 起步金额 */ @ApiField("threshold_amount") private String thresholdAmount; /** * 总库存 */ @ApiField("total_inventory") private String totalInventory; /** * 券ID */ @ApiField("voucher_id") private String voucherId; /** * 券名称 */ @ApiField("voucher_name") private String voucherName; /** * 以元为单位 */ @ApiField("voucher_org_value") private String voucherOrgValue; /** * 券类型 LIMIT-单品券 NO_LIMIT_DISCOUNT-全场折扣券 NO_LIMIT_CASH-全场代金券 */ @ApiField("voucher_type") private String voucherType; /** * 券价值 */ @ApiField("voucher_value") private String voucherValue; public String getBrandName() { return this.brandName; } public void setBrandName(String brandName) { this.brandName = brandName; } public List<String> getCityIds() { return this.cityIds; } public void setCityIds(List<String> cityIds) { this.cityIds = cityIds; } public String getCover() { return this.cover; } public void setCover(String cover) { this.cover = cover; } public String getDailyInventory() { return this.dailyInventory; } public void setDailyInventory(String dailyInventory) { this.dailyInventory = dailyInventory; } public String getGmtEnd() { return this.gmtEnd; } public void setGmtEnd(String gmtEnd) { this.gmtEnd = gmtEnd; } public String getGmtStart() { return this.gmtStart; } public void setGmtStart(String gmtStart) { this.gmtStart = gmtStart; } public String getLogo() { return this.logo; } public void setLogo(String logo) { this.logo = logo; } public List<KbadvertVoucherManual> getManuals() { return this.manuals; } public void setManuals(List<KbadvertVoucherManual> manuals) { this.manuals = manuals; } public String getMerchantName() { return this.merchantName; } public void setMerchantName(String merchantName) { this.merchantName = merchantName; } public String getPartnerId() { return this.partnerId; } public void setPartnerId(String partnerId) { this.partnerId = partnerId; } public String getPurchaseMode() { return this.purchaseMode; } public void setPurchaseMode(String purchaseMode) { this.purchaseMode = purchaseMode; } public List<String> getShopIds() { return this.shopIds; } public void setShopIds(List<String> shopIds) { this.shopIds = shopIds; } public String getThresholdAmount() { return this.thresholdAmount; } public void setThresholdAmount(String thresholdAmount) { this.thresholdAmount = thresholdAmount; } public String getTotalInventory() { return this.totalInventory; } public void setTotalInventory(String totalInventory) { this.totalInventory = totalInventory; } public String getVoucherId() { return this.voucherId; } public void setVoucherId(String voucherId) { this.voucherId = voucherId; } public String getVoucherName() { return this.voucherName; } public void setVoucherName(String voucherName) { this.voucherName = voucherName; } public String getVoucherOrgValue() { return this.voucherOrgValue; } public void setVoucherOrgValue(String voucherOrgValue) { this.voucherOrgValue = voucherOrgValue; } public String getVoucherType() { return this.voucherType; } public void setVoucherType(String voucherType) { this.voucherType = voucherType; } public String getVoucherValue() { return this.voucherValue; } public void setVoucherValue(String voucherValue) { this.voucherValue = voucherValue; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
8c9a588a29af2a4ccf9564128fd2dd42c73fe04e
a80b14012b0b654f44895e3d454cccf23f695bdb
/corejava/doc/javatuning/CH4/kilim_project/test/kilim/test/ex/ExLoop.java
8fa8975a34a758bca7d4d6b5a357f413564c5eac
[]
no_license
azhi365/lime-java
7a9240cb5ce88aefeb57baeb1283872b549bcab9
11b326972d0a0b6bb010a4328f374a3249ee4520
refs/heads/master
2023-03-31T19:08:28.736443
2018-03-02T14:40:29
2018-03-02T14:40:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
834
java
package kilim.test.ex; import kilim.Pausable; import kilim.Task; public class ExLoop extends Task { public String foo[] = new String[5]; String dummy() throws Pausable { Task.yield(); return "dummy"; } @Override public void execute() throws Pausable, Exception { for (int i = 0; i < foo.length; i++) { // foo and i are on the operand Stack before dummy gets called. This // test checks that the operand Stack is correctly restored. foo[i] = dummy(); } } public boolean verify() { // Call after ExLoop task has finished. foo[1..n] must have "dummy". for (int i = 0; i < foo.length; i++) { if (! "dummy".equals(foo[i])) { return false; } } return true; } }
[ "yangzhi365@163.com" ]
yangzhi365@163.com
1479bfd6381461cce051ef8bb577dbd7331de309
5c6d7209ded8856924103fce936ca03fb8d69c94
/src/test/java/ma/ump/plant/service/UserServiceIT.java
5482d893ca2c5de4c89c9924978952dd2a8c5c38
[]
no_license
anas-elallali/plant-application
c6da7c39f97fee8d00e61afafc0e2be1072fba08
3ecce2ef928b15e5b6dc378d52ae886149b667c0
refs/heads/main
2023-04-17T05:59:27.562360
2021-05-01T21:44:39
2021-05-01T21:44:39
356,863,223
0
0
null
2021-04-11T13:12:31
2021-04-11T12:35:30
Java
UTF-8
Java
false
false
6,981
java
package ma.ump.plant.service; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.when; import java.time.Instant; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; import java.util.List; import java.util.Optional; import ma.ump.plant.IntegrationTest; import ma.ump.plant.config.Constants; import ma.ump.plant.domain.User; import ma.ump.plant.repository.UserRepository; import ma.ump.plant.service.dto.AdminUserDTO; import org.apache.commons.lang3.RandomStringUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.data.auditing.AuditingHandler; import org.springframework.data.auditing.DateTimeProvider; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.transaction.annotation.Transactional; import tech.jhipster.security.RandomUtil; /** * Integration tests for {@link UserService}. */ @IntegrationTest @Transactional class UserServiceIT { private static final String DEFAULT_LOGIN = "johndoe"; private static final String DEFAULT_EMAIL = "johndoe@localhost"; private static final String DEFAULT_FIRSTNAME = "john"; private static final String DEFAULT_LASTNAME = "doe"; private static final String DEFAULT_IMAGEURL = "http://placehold.it/50x50"; private static final String DEFAULT_LANGKEY = "dummy"; @Autowired private UserRepository userRepository; @Autowired private UserService userService; @Autowired private AuditingHandler auditingHandler; @MockBean private DateTimeProvider dateTimeProvider; private User user; @BeforeEach public void init() { user = new User(); user.setLogin(DEFAULT_LOGIN); user.setPassword(RandomStringUtils.random(60)); user.setActivated(true); user.setEmail(DEFAULT_EMAIL); user.setFirstName(DEFAULT_FIRSTNAME); user.setLastName(DEFAULT_LASTNAME); user.setImageUrl(DEFAULT_IMAGEURL); user.setLangKey(DEFAULT_LANGKEY); when(dateTimeProvider.getNow()).thenReturn(Optional.of(LocalDateTime.now())); auditingHandler.setDateTimeProvider(dateTimeProvider); } @Test @Transactional void assertThatUserMustExistToResetPassword() { userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.requestPasswordReset("invalid.login@localhost"); assertThat(maybeUser).isNotPresent(); maybeUser = userService.requestPasswordReset(user.getEmail()); assertThat(maybeUser).isPresent(); assertThat(maybeUser.orElse(null).getEmail()).isEqualTo(user.getEmail()); assertThat(maybeUser.orElse(null).getResetDate()).isNotNull(); assertThat(maybeUser.orElse(null).getResetKey()).isNotNull(); } @Test @Transactional void assertThatOnlyActivatedUserCanRequestPasswordReset() { user.setActivated(false); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.requestPasswordReset(user.getLogin()); assertThat(maybeUser).isNotPresent(); userRepository.delete(user); } @Test @Transactional void assertThatResetKeyMustNotBeOlderThan24Hours() { Instant daysAgo = Instant.now().minus(25, ChronoUnit.HOURS); String resetKey = RandomUtil.generateResetKey(); user.setActivated(true); user.setResetDate(daysAgo); user.setResetKey(resetKey); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); assertThat(maybeUser).isNotPresent(); userRepository.delete(user); } @Test @Transactional void assertThatResetKeyMustBeValid() { Instant daysAgo = Instant.now().minus(25, ChronoUnit.HOURS); user.setActivated(true); user.setResetDate(daysAgo); user.setResetKey("1234"); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); assertThat(maybeUser).isNotPresent(); userRepository.delete(user); } @Test @Transactional void assertThatUserCanResetPassword() { String oldPassword = user.getPassword(); Instant daysAgo = Instant.now().minus(2, ChronoUnit.HOURS); String resetKey = RandomUtil.generateResetKey(); user.setActivated(true); user.setResetDate(daysAgo); user.setResetKey(resetKey); userRepository.saveAndFlush(user); Optional<User> maybeUser = userService.completePasswordReset("johndoe2", user.getResetKey()); assertThat(maybeUser).isPresent(); assertThat(maybeUser.orElse(null).getResetDate()).isNull(); assertThat(maybeUser.orElse(null).getResetKey()).isNull(); assertThat(maybeUser.orElse(null).getPassword()).isNotEqualTo(oldPassword); userRepository.delete(user); } @Test @Transactional void assertThatNotActivatedUsersWithNotNullActivationKeyCreatedBefore3DaysAreDeleted() { Instant now = Instant.now(); when(dateTimeProvider.getNow()).thenReturn(Optional.of(now.minus(4, ChronoUnit.DAYS))); user.setActivated(false); user.setActivationKey(RandomStringUtils.random(20)); User dbUser = userRepository.saveAndFlush(user); dbUser.setCreatedDate(now.minus(4, ChronoUnit.DAYS)); userRepository.saveAndFlush(user); Instant threeDaysAgo = now.minus(3, ChronoUnit.DAYS); List<User> users = userRepository.findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore(threeDaysAgo); assertThat(users).isNotEmpty(); userService.removeNotActivatedUsers(); users = userRepository.findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore(threeDaysAgo); assertThat(users).isEmpty(); } @Test @Transactional void assertThatNotActivatedUsersWithNullActivationKeyCreatedBefore3DaysAreNotDeleted() { Instant now = Instant.now(); when(dateTimeProvider.getNow()).thenReturn(Optional.of(now.minus(4, ChronoUnit.DAYS))); user.setActivated(false); User dbUser = userRepository.saveAndFlush(user); dbUser.setCreatedDate(now.minus(4, ChronoUnit.DAYS)); userRepository.saveAndFlush(user); Instant threeDaysAgo = now.minus(3, ChronoUnit.DAYS); List<User> users = userRepository.findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore(threeDaysAgo); assertThat(users).isEmpty(); userService.removeNotActivatedUsers(); Optional<User> maybeDbUser = userRepository.findById(dbUser.getId()); assertThat(maybeDbUser).contains(dbUser); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
8bff85fea7e94b51399fb0e3cc066ff1637596c0
a16b2a58625081530c089568e2b29f74e23f95a9
/doolin/Doolin-Application/src/main/java/net/sf/doolin/gui/core/icon/SimpleIconManager.java
0a8f734f4b4dbed2e5e9674305bd11574bcd3da3
[]
no_license
dcoraboeuf/orbe
440335b109dee2ee3db9ee2ab38430783e7a3dfb
dae644da030e5a5461df68936fea43f2f31271dd
refs/heads/master
2022-01-27T10:18:43.222802
2022-01-01T11:45:35
2022-01-01T11:45:35
178,600,867
0
0
null
2022-01-01T11:46:01
2019-03-30T19:13:13
Java
UTF-8
Java
false
false
1,371
java
/* * Created on Sep 10, 2007 */ package net.sf.doolin.gui.core.icon; import java.util.HashMap; import java.util.Map; import net.sf.doolin.gui.annotation.Configurable; import org.springframework.beans.factory.InitializingBean; /** * This icon manager is using a property file that maps the icon ids to a * resource path. No size is taken into account. * * @author BE05735 * @version $Id$ */ public class SimpleIconManager extends DefaultIconManager implements InitializingBean { private Map<String, String> properties = new HashMap<String, String>(); private String prefix; public String getPrefix() { return prefix; } @Configurable(mandatory = true, description = "Resource path prefix") public void setPrefix(String prefix) { this.prefix = prefix; } public Map<String, String> getProperties() { return properties; } @Configurable(mandatory = true, description = "Index of icon paths per icon id") public void setProperties(Map<String, String> properties) { this.properties = properties; } public void afterPropertiesSet() throws Exception { for (Map.Entry<String, String> entry : properties.entrySet()) { String id = entry.getKey(); String suffix = entry.getValue(); IconDefinition definition = new IconDefinition(prefix, suffix, suffix, suffix, suffix, suffix); getIconDefinitions().put(id, definition); } } }
[ "damien.coraboeuf@gmail.com" ]
damien.coraboeuf@gmail.com
f363f28b47a3d1538b1bbede83881331da817987
b1fd1480e2382ca87e55cecb8fb054b2224e4d25
/red-triplane-physics-red/src/com/jfixby/r3/physics/duplex/DuplexPolyShape.java
25f818fd8d3cf31c25ad11b8e8c2d45f030f701d
[]
no_license
JFixby/RedTriplane
34e7faa05c92cc403a74e3e151c1daa795342bd2
7f448eccf9d26e9bcb63aab5bb55bd245492a78a
refs/heads/master
2021-01-22T08:27:44.341474
2017-07-01T14:54:52
2017-07-01T14:54:52
44,493,313
0
1
null
null
null
null
UTF-8
Java
false
false
241
java
package com.jfixby.r3.physics.duplex; import com.jfixby.r3.api.physics.PolyShape; import com.jfixby.scarabei.api.collections.List; public class DuplexPolyShape implements PolyShape { public DuplexPolyShape (List<PolyShape> sh) { } }
[ "github@jfixby.com" ]
github@jfixby.com
26b6d1231d169aff0f6e43eb9cba09b44580a8e9
e962132c31220ba04aa0e96bea0f518c6e743836
/src/Accepted/Restaurant.java
ed5fc5c1ce06f1a0d0955509dbeee9f23ffcf8ba
[]
no_license
lizhieffe/HackerRank
31b910ca59c18f703e84aa23a6cee3186def9ff3
72e088740b087f71ae2ed7d5309b0d0b869a2b2b
refs/heads/master
2020-05-19T07:24:53.573724
2015-02-22T15:55:03
2015-02-22T15:55:03
25,135,347
0
0
null
null
null
null
UTF-8
Java
false
false
762
java
package Accepted; import java.util.Scanner; public class Restaurant { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for (int i = 0; i < n; i++) { int l = sc.nextInt(); int b = sc.nextInt(); int size = gcd(l, b); System.out.println(l * b / size / size); } } private static int gcd(int i, int j) { if (i < j) { int tmp = i; i = j; j = i; } if (i % j == 0) return j; else return gcd(j, i % j); } }
[ "lizhieffe@gmail.com" ]
lizhieffe@gmail.com
b7827f57db58b853b0b84c4d740cad0f42e637d3
6d6a2896e206089fed182d93f60e0691126d889c
/terrier3/core/org/terrier/structures/SimpleDocumentIndexEntry.java
fe6dd13fd22aabf7633d3cdb76d8a41ccad16282
[]
no_license
azizisya/benhesrc
2291c9d9cb22171f4e382968c14721d440bbabf2
4bd27c1f6e91b2aec1bd71f0810d1bbd0db902b5
refs/heads/master
2020-05-18T08:53:54.800452
2011-02-24T09:41:17
2011-02-24T09:41:17
34,458,592
2
0
null
null
null
null
UTF-8
Java
false
false
2,354
java
/* * Terrier - Terabyte Retriever * Webpage: http://terrier.org/ * Contact: terrier{a.}dcs.gla.ac.uk * University of Glasgow - Department of Computing Science * http://www.gla.ac.uk/ * * The contents of this file are subject to the Mozilla Public License * Version 1.1 (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.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. * * The Original Code is SimpleDocumentIndexEntry.java * * The Original Code is Copyright (C) 2004-2010 the University of Glasgow. * All Rights Reserved. * * Contributor(s): * Craig Macdonald <craigm{a.}dcs.gla.ac.uk> (original contributor) */ package org.terrier.structures; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.terrier.structures.seralization.FixedSizeWriteableFactory; /** A document index entry that doesn't write out direct index offset. */ public class SimpleDocumentIndexEntry extends DocumentIndexEntry { public static class Factory implements FixedSizeWriteableFactory<DocumentIndexEntry> { public int getSize() { return 4 + 4; } public DocumentIndexEntry newInstance() { return new SimpleDocumentIndexEntry(); } } //TODO: it doesn't need entries? public SimpleDocumentIndexEntry(){} public SimpleDocumentIndexEntry(DocumentIndexEntry die) { super.entries = die.getNumberOfEntries(); super.doclength = die.getDocumentLength(); } public void setNumberOfEntries(int n) { super.entries = n; } public void setOffset(BitFilePosition pos) {} public void setBitIndexPointer(BitIndexPointer pointer) {} public void readFields(DataInput in) throws IOException { super.entries = in.readInt(); super.doclength = in.readInt(); } public void write(DataOutput out) throws IOException { out.writeInt(super.entries); out.writeInt(super.doclength); } public String pointerToString() { return super.entries + "@{}"; } public void setPointer(Pointer p) { return; } public byte getFileNumber() { return 0; } public void setFileNumber(byte fileId) { } }
[ "ben.he.src@f3485be4-0bd3-11df-ad0c-0fb4090ca1bc" ]
ben.he.src@f3485be4-0bd3-11df-ad0c-0fb4090ca1bc
0a327a60af72377acb5e801568484395d141cecf
cbb75ebbee3fb80a5e5ad842b7a4bb4a5a1ec5f5
/org/apache/http/client/utils/HttpClientUtils.java
89110fa20ed8297967386ea9ba7a45458240c64c
[]
no_license
killbus/jd_decompile
9cc676b4be9c0415b895e4c0cf1823e0a119dcef
50c521ce6a2c71c37696e5c131ec2e03661417cc
refs/heads/master
2022-01-13T03:27:02.492579
2018-05-14T11:21:30
2018-05-14T11:21:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,455
java
package org.apache.http.client.utils; import java.io.Closeable; import java.io.IOException; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.util.EntityUtils; /* compiled from: TbsSdkJava */ public class HttpClientUtils { private HttpClientUtils() { } public static void closeQuietly(HttpResponse httpResponse) { if (httpResponse != null) { HttpEntity entity = httpResponse.getEntity(); if (entity != null) { try { EntityUtils.consume(entity); } catch (IOException e) { } } } } public static void closeQuietly(CloseableHttpResponse closeableHttpResponse) { if (closeableHttpResponse != null) { try { EntityUtils.consume(closeableHttpResponse.getEntity()); closeableHttpResponse.close(); } catch (IOException e) { } catch (Throwable th) { closeableHttpResponse.close(); } } } public static void closeQuietly(HttpClient httpClient) { if (httpClient != null && (httpClient instanceof Closeable)) { try { ((Closeable) httpClient).close(); } catch (IOException e) { } } } }
[ "13511577582@163.com" ]
13511577582@163.com
501b61deb198f1dcb4a879fa5dad0662cd0053e9
894927bf0fc36549955be6fb781974c12bb449eb
/osp/common/api/src/java/org/theospi/portfolio/review/mgt/ReviewManager.java
682867c666a5f13e34fd36a8bdf862d45547741e
[ "LicenseRef-scancode-generic-cla", "ECL-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
sadupally/Dev
cd32fa3b753e8d20dd80e794618a8e97d1ff1c79
ead9de3993b7a805199ac254c6fa99d3dda48adf
refs/heads/master
2020-03-24T08:15:12.732481
2018-07-27T12:54:29
2018-07-27T12:54:29
142,589,852
0
0
ECL-2.0
2018-07-27T14:49:51
2018-07-27T14:49:50
null
UTF-8
Java
false
false
3,934
java
/********************************************************************************** * $URL: https://source.sakaiproject.org/svn/osp/branches/sakai-10.x/common/api/src/java/org/theospi/portfolio/review/mgt/ReviewManager.java $ * $Id: ReviewManager.java 130580 2013-10-17 17:43:15Z dsobiera@indiana.edu $ *********************************************************************************** * * Copyright (c) 2005, 2006, 2007, 2008 The Sakai Foundation * * Licensed under the Educational Community License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/ECL-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.theospi.portfolio.review.mgt; import java.util.List; import org.sakaiproject.entity.api.Reference; import org.sakaiproject.metaobj.shared.model.Id; import org.theospi.portfolio.review.model.Review; import org.theospi.portfolio.shared.model.Node; public interface ReviewManager { public final static String CURRENT_REVIEW = "org.theospi.portfolio.review.currentReview"; public final static String CURRENT_REVIEW_ID = "org.theospi.portfolio.review.currentReviewId"; public final static String CANCEL_REVIEW = "org.theospi.portfolio.review.cancelReview"; public Review createNew(String description, String siteId); public Review getReview(Id reviewId); public Review saveReview(Review review); public void deleteReview(Review review); public List listReviews(String siteId); public Review getReview(String id); public Node getNode(Reference ref); public List getReviews(); public List getReviewsByParent(String parentId); /** * the top function for getting the reviews. This pushes these review content * into the security advisor. * * @param parentId * @param siteId * @param producer * @return List of Review */ public List getReviewsByParent(String parentId, String siteId, String producer); /** * the top function for getting the reviews. This pushes these review content * into the security advisor. * * @param parentId * @param type * @param siteId * @param producer * @return List of Review */ public List getReviewsByParentAndType(String parentId, int type, String siteId, String producer); /** * Returns a list of reviews for the given criteria * * @param parentId - the parentId of the review * @param types - array of types to search for * @param siteId - the siteId of the review * @param producer * @return List of Review */ public List getReviewsByParentAndTypes(String parentId, int[] types, String siteId, String producer); /** * Retrieve all reviews for all cells in a user's matrix. This does not push the * content to the security advisor since its purpose is bulk list efficiency. * * @param matrixId - the ID of the user's matrix * @return List of Review of all types */ public List<Review> getReviewsByMatrix(String matrixId); /** * Retrieve all reviews of a given type for all cells in a user's matrix. This does not push the * content to the security advisor since its purpose is bulk list efficiency. * * @param matrixId the ID of the user's matrix * @param type the desired type of review * @return List of Review of all types */ public List<Review> getReviewsByMatrixAndType(String matrixId, int type); }
[ "UdcsWeb@unisa.ac.za" ]
UdcsWeb@unisa.ac.za
4ca5a1bcdf555cfd94bd5d6ff2279a3aa1cc507f
5638a4d62380f7bfc7bbe7fe60a4cbcd8eec0bac
/util/src/main/java/org/openfuxml/factory/xml/table/XmlRowFactory.java
8d4e152195f8e5259d1697988ada53983f264181
[]
no_license
aht-group/ofx
adab176f64c6acb0ca603feac5499a3b15ce956a
dab1fc3afe2a82c6be3950ad58fc87c32737a1ac
refs/heads/master
2023-09-05T22:42:19.468397
2023-08-27T15:23:03
2023-08-27T15:23:03
39,813,039
0
1
null
2023-08-23T17:54:15
2015-07-28T04:28:04
Java
UTF-8
Java
false
false
294
java
package org.openfuxml.factory.xml.table; import org.openfuxml.content.table.Row; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class XmlRowFactory { final static Logger logger = LoggerFactory.getLogger(XmlRowFactory.class); public static Row build(){return new Row();} }
[ "t.kisner@web.de" ]
t.kisner@web.de
97753204732e8151e0f741c2f40979bcc290989b
a729896c5f8b69d0d9b75cdcad943fcf9ec43de9
/src/main/java/epicsquid/gossamer/RegistryManager.java
86e2bf1d3caa391ed7bfb39df5850bf0a8fc3e28
[ "MIT" ]
permissive
EpicSquid/Gossamer
71bf2b78e8a8c63c120120a7bdfee8a129f448c8
192a988fc01339cbf77003b451169da2d50e1358
refs/heads/master
2020-03-30T11:47:07.302834
2018-10-02T03:06:21
2018-10-02T03:06:21
151,192,680
1
1
null
null
null
null
UTF-8
Java
false
false
1,352
java
package epicsquid.gossamer; import javax.annotation.Nonnull; import epicsquid.mysticallib.LibRegistry; import epicsquid.mysticallib.event.RegisterContentEvent; import epicsquid.mysticallib.event.RegisterModRecipesEvent; import epicsquid.gossamer.init.ModBlocks; import epicsquid.gossamer.init.ModEntities; import epicsquid.gossamer.init.ModItems; import epicsquid.gossamer.init.ModRecipes; import net.minecraft.item.Item; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class RegistryManager { @SubscribeEvent public void init(@Nonnull RegisterContentEvent event) { LibRegistry.setActiveMod(Gossamer.MODID, Gossamer.CONTAINER); ModBlocks.registerBlocks(event); ModItems.registerItems(event); ModEntities.registerMobs(); ModEntities.registerMobSpawn(); } @SubscribeEvent public void initRecipes(@Nonnull RegisterModRecipesEvent event) { LibRegistry.setActiveMod(Gossamer.MODID, Gossamer.CONTAINER); ModRecipes.initRecipes(event); } @SubscribeEvent(priority = EventPriority.LOWEST) public void registerOredict(@Nonnull RegistryEvent.Register<Item> event) { LibRegistry.setActiveMod(Gossamer.MODID, Gossamer.CONTAINER); ModItems.registerOredict(); } }
[ "epicsquid315@gmail.com" ]
epicsquid315@gmail.com
150914355f30f992238ffe972f9e5c73f5aa1ab7
29944e1d533a50f9d79c408519f5a11770c9c1ae
/src/main/java/com/frostwire/jlibtorrent/SessionHandle.java
771cd0709c610dfeb00d06bd1aaf074ca1af76d4
[ "MIT" ]
permissive
linlinname36/frostwire-jlibtorrent
e99a1d4524269eb4977c9ef1dd2a17f5c929b6b0
f068c5fb1727ada5f73963bbce241dd8e081b0a5
refs/heads/master
2020-12-27T15:16:01.560728
2016-04-12T16:59:57
2016-04-13T03:31:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,352
java
package com.frostwire.jlibtorrent; import com.frostwire.jlibtorrent.plugins.DhtStorageConstructor; import com.frostwire.jlibtorrent.plugins.SwigDhtStorageConstructor; import com.frostwire.jlibtorrent.swig.*; import java.util.ArrayList; /** * @author gubatron * @author aldenml */ public class SessionHandle { private static final Logger LOG = Logger.getLogger(SessionHandle.class); protected final session_handle s; private SwigDhtStorageConstructor dhtSC; public SessionHandle(session_handle s) { this.s = s; } public session_handle swig() { return s; } public boolean isValid() { return s.is_valid(); } /** * Loads and saves all session settings, including dht settings, * encryption settings and proxy settings. {@link #saveState(long)} * internally writes all keys to an {@link entry} that's passed in, * which needs to either not be initialized, or initialized as a dictionary. * <p/> * The {@code flags} argument passed in to this method can be used to * filter which parts of the session state to save. By default, all state * is saved (except for the individual torrents). * * @return * @see {@link com.frostwire.jlibtorrent.swig.session_handle.save_state_flags_t} */ public byte[] saveState(long flags) { entry e = new entry(); s.save_state(e); return Vectors.byte_vector2bytes(e.bencode()); } /** * Same as calling {@link #saveState(long)} with all save state flags. * * @return * @see #saveState(long) */ public byte[] saveState() { entry e = new entry(); s.save_state(e); return Vectors.byte_vector2bytes(e.bencode()); } /** * Loads all session settings, including DHT settings, * encryption settings and proxy settings. * <p/> * {@link #loadState(byte[], long)} expects a byte array that it is a * bencoded buffer. * <p/> * The {@code flags} argument passed in to this method can be used to * filter which parts of the session state to load. By default, all state * is restored (except for the individual torrents). * * @param data * @see {@link com.frostwire.jlibtorrent.swig.session_handle.save_state_flags_t} */ public void loadState(byte[] data, long flags) { byte_vector buffer = Vectors.bytes2byte_vector(data); bdecode_node n = new bdecode_node(); error_code ec = new error_code(); int ret = bdecode_node.bdecode(buffer, n, ec); if (ret == 0) { s.load_state(n, flags); } else { LOG.error("failed to decode bencoded data: " + ec.message()); } } /** * Same as calling {@link #loadState(byte[], long)} with all save state flags. * * @return * @see #loadState(byte[], long) */ public void loadState(byte[] data) { byte_vector buffer = Vectors.bytes2byte_vector(data); bdecode_node n = new bdecode_node(); error_code ec = new error_code(); int ret = bdecode_node.bdecode(buffer, n, ec); if (ret == 0) { s.load_state(n); } else { LOG.error("failed to decode bencoded data: " + ec.message()); } } /** * Looks for a torrent with the given info-hash. In case there is such * a torrent in the session, a {@link TorrentHandle} to that torrent * is returned. * <p/> * In case the torrent cannot be found, a null is returned. * * @param infoHash * @return */ public TorrentHandle findTorrent(Sha1Hash infoHash) { torrent_handle th = s.find_torrent(infoHash.swig()); return th != null && th.is_valid() ? new TorrentHandle(th) : null; } /** * Returns a list of torrent handles to all the * torrents currently in the session. * * @return */ public ArrayList<TorrentHandle> getTorrents() { torrent_handle_vector v = s.get_torrents(); int size = (int) v.size(); ArrayList<TorrentHandle> l = new ArrayList<>(size); for (int i = 0; i < size; i++) { l.add(new TorrentHandle(v.get(i))); } return l; } /** * You add torrents through the {@link #addTorrent(AddTorrentParams, ErrorCode)} * function where you give an object with all the parameters. * The {@code addTorrent} overloads will block * until the torrent has been added (or failed to be added) and returns * an error code and a {@link TorrentHandle}. In order to add torrents more * efficiently, consider using {@link #asyncAddTorrent(AddTorrentParams)} * which returns immediately, without waiting for the torrent to add. * Notification of the torrent being added is sent as * {@link com.frostwire.jlibtorrent.alerts.AddTorrentAlert}. * <p> * The {@link TorrentHandle} returned by this method can be used to retrieve * information about the torrent's progress, its peers etc. It is also * used to abort a torrent. * <p> * If the torrent you are trying to add already exists in the session (is * either queued for checking, being checked or downloading) * the error code will be set to {@link libtorrent_errors#duplicate_torrent} * unless {@link com.frostwire.jlibtorrent.swig.add_torrent_params.flags_t#flag_duplicate_is_error} * is set to false. In that case, {@code addTorrent} will return the handle * to the existing torrent. * <p> * All torrent handles must be destructed before the session is destructed! * * @param params * @param ec * @return */ public TorrentHandle addTorrent(AddTorrentParams params, ErrorCode ec) { return new TorrentHandle(s.add_torrent(params.swig(), ec.swig())); } public void asyncAddTorrent(AddTorrentParams params) { s.async_add_torrent(params.swig()); } /** * Set a dht custom storage constructor function * to be used internally when the dht is created. * <p> * Since the dht storage is a critical component for the dht behavior, * this function will only be effective the next time the dht is started. * If you never touch this feature, a default map-memory based storage * is used. * <p> * If you want to make sure the dht is initially created with your * custom storage, create a session with the setting * {@link com.frostwire.jlibtorrent.swig.settings_pack.bool_types#enable_dht} * to false, set your constructor function * and call {@link #applySettings(SettingsPack)} with * {@link com.frostwire.jlibtorrent.swig.settings_pack.bool_types#enable_dht} * to true. * * @param sc */ public void setDhtStorage(DhtStorageConstructor sc) { dhtSC = new SwigDhtStorageConstructor(sc); s.set_swig_dht_storage(dhtSC); } /** * Applies the settings specified by the settings pack {@code sp}. This is an * asynchronous operation that will return immediately and actually apply * the settings to the main thread of libtorrent some time later. * * @param sp */ public void applySettings(SettingsPack sp) { s.apply_settings(sp.getSwig()); } }
[ "aldenml@gmail.com" ]
aldenml@gmail.com
6e4bb0b0b6ccd54b659d2e1bba637f538e807f12
4480db5f737c02ab52f72a8c1acd9180afd624ee
/net/minecraft/server/Packet23VehicleSpawn.java
a35f0a69a8eb1bdf69973d918e24df664f86bc2e
[]
no_license
CollinJ/mc-dev
61850bb8ae68e57b5bef35f847ba5979ce2b66df
3dcb2867b9995dba1f06ec51ffaa31c2f61ee5c1
refs/heads/master
2020-12-25T07:16:56.461543
2011-01-27T03:20:05
2011-01-27T03:20:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,149
java
package net.minecraft.server; import java.io.DataInputStream; import java.io.DataOutputStream; public class Packet23VehicleSpawn extends Packet { public int a; public int b; public int c; public int d; public int e; public Packet23VehicleSpawn() {} public Packet23VehicleSpawn(Entity entity, int i) { a = entity.g; b = MathHelper.b(entity.p * 32D); c = MathHelper.b(entity.q * 32D); d = MathHelper.b(entity.r * 32D); e = i; } public void a(DataInputStream datainputstream) { a = datainputstream.readInt(); e = ((int) (datainputstream.readByte())); b = datainputstream.readInt(); c = datainputstream.readInt(); d = datainputstream.readInt(); } public void a(DataOutputStream dataoutputstream) { dataoutputstream.writeInt(a); dataoutputstream.writeByte(e); dataoutputstream.writeInt(b); dataoutputstream.writeInt(c); dataoutputstream.writeInt(d); } public void a(NetHandler nethandler) { nethandler.a(this); } public int a() { return 17; } }
[ "erikbroes@grum.nl" ]
erikbroes@grum.nl
faddc02d8a9c31f30adbac35560258ffb2ec47e7
000e9ddd9b77e93ccb8f1e38c1822951bba84fa9
/java/classes2/com/ziroom/datacenter/remote/responsebody/financial/clean/j.java
90f8bd4992df83705de1295fce02f9aeaf6ea867
[ "Apache-2.0" ]
permissive
Paladin1412/house
2bb7d591990c58bd7e8a9bf933481eb46901b3ed
b9e63db1a4975b614c422fed3b5b33ee57ea23fd
refs/heads/master
2021-09-17T03:37:48.576781
2018-06-27T12:39:38
2018-06-27T12:41:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,002
java
package com.ziroom.datacenter.remote.responsebody.financial.clean; public class j { private String a; private String b; private Long c; private String d; public String getAmount() { return this.a; } public String getPromotionReminderDocument() { return this.b; } public Long getWillExpireAmount() { return this.c; } public String getWillExpireTime() { return this.d; } public void setAmount(String paramString) { this.a = paramString; } public void setPromotionReminderDocument(String paramString) { this.b = paramString; } public void setWillExpireAmount(Long paramLong) { this.c = paramLong; } public void setWillExpireTime(String paramString) { this.d = paramString; } } /* Location: /Users/gaoht/Downloads/zirom/classes2-dex2jar.jar!/com/ziroom/datacenter/remote/responsebody/financial/clean/j.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "ght163988@autonavi.com" ]
ght163988@autonavi.com
54508cb68e135711994931fe60f86af71626e52e
c9106d023a926f5968808a9958449e56a4170612
/jenax-arq-parent/jenax-arq-views/src/main/java/org/aksw/jena_sparql_api/views/PrefixSet.java
9936c9dbc37a086105847b8c224fb271e6463f79
[]
no_license
Scaseco/jenax
c6f726fa25fd4b15e05119d05dbafaf44c8f5411
58a8dec0b055eaca3f6848cab4b552c9fd19a6ec
refs/heads/develop
2023-08-24T13:37:16.574857
2023-08-24T11:53:24
2023-08-24T11:53:24
416,700,558
5
0
null
2023-08-03T14:41:53
2021-10-13T10:54:14
Java
UTF-8
Java
false
false
3,537
java
package org.aksw.jena_sparql_api.views; import java.util.Collection; import java.util.NavigableSet; import java.util.Set; import java.util.TreeSet; import org.aksw.commons.util.string.StringUtils; /** * TODO Switch to a trie data structure * * @author Claus Stadler <cstadler@informatik.uni-leipzig.de> * */ public class PrefixSet { private NavigableSet<String> prefixes; public PrefixSet() { this.prefixes = new TreeSet<String>(); } public PrefixSet(String ... strings) { this.prefixes = new TreeSet<String>(); for(String string : strings) { prefixes.add(string); } } public PrefixSet(NavigableSet<String> prefixes) { this.prefixes = prefixes; } public PrefixSet(PrefixSet uriPrefixes) { this(new TreeSet<String>(uriPrefixes.prefixes)); } public void addAll(Collection<String> prefixes) { this.prefixes.addAll(prefixes); } public void addAll(PrefixSet other) { addAll(other.getSet()); } public NavigableSet<String> getSet() { return prefixes; } public boolean isEmpty() { return prefixes.isEmpty(); } @Override public String toString() { return "PrefixSet [prefixes=" + prefixes + "]"; } /** * Tests whether the set constains a prefix for the given argument * * @param value * @return */ public boolean containsPrefixOf(String value) { return StringUtils.longestPrefixLookup(value, prefixes) != null; } /** * Tests whether the argument is a prefix of one of the items * * @param value * @return */ public boolean isPrefixForItem(String prefix) { return getShortestMatch(prefix) != null; } /* public Set<String> getShortestMatches(String prefix) { }*/ public String getShortestMatch(String prefix) { return StringUtils.shortestMatchLookup(prefix, true, prefixes); } public static void main(String[] args) { PrefixSet x = new PrefixSet(); x.getSet().add("aaa"); x.getSet().add("bbb"); x.getSet().add("b"); x.getSet().add("ccc"); x.getSet().add("cccd"); x.getSet().add("cccde"); //TODO Creata JUNIT Test case //Assert.assertTrue(x.containsPrefixOf("cccd")); //Assert.assertTrue(x.isPrefixForItem("bb")); } public void removeAll(Collection<String> ps) { prefixes.removeAll(ps); } public void add(String s) { prefixes.add(s); } public Set<String> getPrefixesOf(String s) { return StringUtils.getAllPrefixes(s, true, prefixes); } public Set<String> getPrefixesOf(String s, boolean inclusive) { return StringUtils.getAllPrefixes(s, inclusive, prefixes); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((prefixes == null) ? 0 : prefixes.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PrefixSet other = (PrefixSet) obj; if (prefixes == null) { if (other.prefixes != null) return false; } else if (!prefixes.equals(other.prefixes)) return false; return true; } }
[ "RavenArkadon@googlemail.com" ]
RavenArkadon@googlemail.com
ecd0628aa7dcd4e76eb44f5481602857363dba3b
00d49432390d191a05797e5f301304e6afaf852c
/src/main/java/org/vietj/vertx/eventloop/ServerStartingFromWorker.java
d3eb61acc28524ff41e771c72eca2cf254afd1f3
[]
no_license
mxmind/vertx-materials
b4200a4056ed0d6e00ac846549b695ef150f2519
a30db6f2e0a2ce544c5994a9cfe3e42792d0b26b
refs/heads/master
2021-01-22T15:35:25.748107
2015-06-25T08:32:34
2015-06-25T08:32:34
46,638,677
1
0
null
2015-11-21T23:40:05
2015-11-21T23:40:04
null
UTF-8
Java
false
false
566
java
package org.vietj.vertx.eventloop; import io.vertx.core.AbstractVerticle; import io.vertx.core.DeploymentOptions; import io.vertx.core.Vertx; import io.vertx.docgen.Source; /** * @author <a href="mailto:julien@julienviet.com">Julien Viet</a> */ @Source public class ServerStartingFromWorker { public static void main(String[] args) { Vertx vertx = Vertx.vertx(); vertx.deployVerticle(new AbstractVerticle() { public void start() throws Exception { vertx.createHttpServer(); } }, new DeploymentOptions().setWorker(true)); } }
[ "julien@julienviet.com" ]
julien@julienviet.com
4de72c891856f4c1522948c2ff4c051eedc621a1
08d2717c64c7e2b4b440fc3dc702e33705254c85
/swim-core-java/swim.io/src/test/java/swim/io/TcpModemSpec.java
695dbf357bd4b6414139c09de1202188841e8605
[ "Apache-2.0" ]
permissive
SirCipher/swimci
5e48b5cfbd154a270a766affc796ffec0ed5b721
ddef2f506ddff7943e6ff2e2ab50843ec7adcb56
refs/heads/master
2020-09-14T02:24:47.503873
2019-12-12T11:12:42
2019-12-12T11:12:42
222,979,003
1
0
null
2019-11-28T11:56:25
2019-11-20T16:20:58
Java
UTF-8
Java
false
false
1,056
java
// Copyright 2015-2019 SWIM.AI inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package swim.io; public class TcpModemSpec extends IpModemBehaviors { final IpSettings ipSettings = IpSettings.standard(); @Override protected IpServiceRef bind(IpEndpoint endpoint, IpService service) { return endpoint.bindTcp("127.0.0.1", 53554, service, this.ipSettings); } @Override protected IpSocketRef connect(IpEndpoint endpoint, IpModem<?, ?> modem) { return endpoint.connectTcp("127.0.0.1", 53554, modem, this.ipSettings); } }
[ "tklapwijk92@gmail.com" ]
tklapwijk92@gmail.com
ef4c1778601f37fd99bb24be5a65ee8f49cfe536
3be2a73d2e612d7126ed913d181967ec71c62987
/challenge/challenge/RemoveDuplicateLetters.java
c5876014b3dbaf33399e06861a69d29e774a9ae6
[]
no_license
eclipsegst/coding
11e2cb6ac0808a5cda51c1360f49b49b65974734
39e96906d42cc91a73333bd421d678127220ba12
refs/heads/master
2021-03-27T20:20:32.143054
2016-10-04T04:11:51
2016-10-04T04:11:51
16,677,377
2
0
null
2015-01-24T21:08:57
2014-02-09T22:25:05
Java
UTF-8
Java
false
false
1,486
java
package challenge; import java.util.Stack; /** * @author Zhaolong Zhong Jul 17, 2016 * * Remove Duplicate Letters * * Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. * You must make sure your result is the smallest in lexicographical order among all possible results. * * Example: * Given "bcabc" * Return "abc" * Given "cbacdcbc" * Return "acdb" * * Reference: * https://discuss.leetcode.com/topic/31404 * https://discuss.leetcode.com/topic/31413 * https://discuss.leetcode.com/topic/31424 * https://discuss.leetcode.com/topic/43469 */ public class RemoveDuplicateLetters { public String removeDuplicateLetters(String s) { Stack<Character> stack = new Stack<Character>(); int[] count = new int[26]; char[] array = s.toCharArray(); for (char c : array) count[c - 'a']++; boolean[] visited = new boolean[26]; for(char c : array) { count[c - 'a']--; if (visited[c - 'a']) continue; while(!stack.isEmpty() && stack.peek() > c && count[stack.peek() - 'a'] > 0) { visited[stack.peek() - 'a'] = false; stack.pop(); } stack.push(c); visited[c - 'a'] = true; } StringBuilder sb = new StringBuilder(); for (char c : stack) sb.append(c); return sb.toString(); } }
[ "zztg2@mail.missouri.edu" ]
zztg2@mail.missouri.edu
0af4e06bfe420425c99bdce03002b17eccb60f8d
0d6dc1e8c0161d5028a81730523dc50e0ff50486
/src/test/java/vb0115/application/security/jwt/JWTFilterTest.java
772a7665b08d9e461508d378727dde1f9e86d182
[]
no_license
BulkSecurityGeneratorProject/vb-0115-application
c72f21cd2e3701de505ee983dc8fa50eeabe1df8
7281d02866cd1108086d1b40a4dc8af8a2ffa5e9
refs/heads/master
2022-12-16T00:16:54.246232
2018-07-23T18:01:27
2018-07-23T18:01:27
296,643,152
0
0
null
2020-09-18T14:23:42
2020-09-18T14:23:41
null
UTF-8
Java
false
false
4,924
java
package vb0115.application.security.jwt; import vb0115.application.security.AuthoritiesConstants; import io.github.jhipster.config.JHipsterProperties; import org.junit.Before; import org.junit.Test; import org.springframework.http.HttpStatus; import org.springframework.mock.web.MockFilterChain; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.test.util.ReflectionTestUtils; import java.util.Collections; import static org.assertj.core.api.Assertions.assertThat; public class JWTFilterTest { private TokenProvider tokenProvider; private JWTFilter jwtFilter; @Before public void setup() { JHipsterProperties jHipsterProperties = new JHipsterProperties(); tokenProvider = new TokenProvider(jHipsterProperties); ReflectionTestUtils.setField(tokenProvider, "secretKey", "test secret"); ReflectionTestUtils.setField(tokenProvider, "tokenValidityInMilliseconds", 60000); jwtFilter = new JWTFilter(tokenProvider); SecurityContextHolder.getContext().setAuthentication(null); } @Test public void testJWTFilter() throws Exception { UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken( "test-user", "test-password", Collections.singletonList(new SimpleGrantedAuthority(AuthoritiesConstants.USER)) ); String jwt = tokenProvider.createToken(authentication, false); MockHttpServletRequest request = new MockHttpServletRequest(); request.addHeader(JWTConfigurer.AUTHORIZATION_HEADER, "Bearer " + jwt); request.setRequestURI("/api/test"); MockHttpServletResponse response = new MockHttpServletResponse(); MockFilterChain filterChain = new MockFilterChain(); jwtFilter.doFilter(request, response, filterChain); assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); assertThat(SecurityContextHolder.getContext().getAuthentication().getName()).isEqualTo("test-user"); assertThat(SecurityContextHolder.getContext().getAuthentication().getCredentials().toString()).isEqualTo(jwt); } @Test public void testJWTFilterInvalidToken() throws Exception { String jwt = "wrong_jwt"; MockHttpServletRequest request = new MockHttpServletRequest(); request.addHeader(JWTConfigurer.AUTHORIZATION_HEADER, "Bearer " + jwt); request.setRequestURI("/api/test"); MockHttpServletResponse response = new MockHttpServletResponse(); MockFilterChain filterChain = new MockFilterChain(); jwtFilter.doFilter(request, response, filterChain); assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull(); } @Test public void testJWTFilterMissingAuthorization() throws Exception { MockHttpServletRequest request = new MockHttpServletRequest(); request.setRequestURI("/api/test"); MockHttpServletResponse response = new MockHttpServletResponse(); MockFilterChain filterChain = new MockFilterChain(); jwtFilter.doFilter(request, response, filterChain); assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull(); } @Test public void testJWTFilterMissingToken() throws Exception { MockHttpServletRequest request = new MockHttpServletRequest(); request.addHeader(JWTConfigurer.AUTHORIZATION_HEADER, "Bearer "); request.setRequestURI("/api/test"); MockHttpServletResponse response = new MockHttpServletResponse(); MockFilterChain filterChain = new MockFilterChain(); jwtFilter.doFilter(request, response, filterChain); assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull(); } @Test public void testJWTFilterWrongScheme() throws Exception { UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken( "test-user", "test-password", Collections.singletonList(new SimpleGrantedAuthority(AuthoritiesConstants.USER)) ); String jwt = tokenProvider.createToken(authentication, false); MockHttpServletRequest request = new MockHttpServletRequest(); request.addHeader(JWTConfigurer.AUTHORIZATION_HEADER, "Basic " + jwt); request.setRequestURI("/api/test"); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
ca1ca7da5755dbfd8ffd484ea5541f393048d6f9
599adceef8bb0c314182a0a38d0afa936bdafaf5
/yugandhar-open-mdmhub-jeec/yugandhar-mdmhub-component-jeec/src/main/java/com/yugandhar/mdm/corecomponent/CorporationnamesService.java
0b748227a0f2f27d716c9f914524146db54a0d5b
[ "Apache-2.0" ]
permissive
yugandharproject/yugandhar-open-mdmhub
7631c4dc77e9d72921d5c63351378208a9fec9d2
1672a6e0551d94a857366d5393603175020c7297
refs/heads/master
2020-03-20T12:55:55.943439
2018-07-27T05:34:41
2018-07-27T05:34:41
137,443,949
1
0
null
null
null
null
UTF-8
Java
false
false
6,027
java
package com.yugandhar.mdm.corecomponent; /* Generated Jul 1, 2017 2:56:24 PM by Hibernate Tools 5.2.1.Final using Yugandhar custom templates. Generated and to be used in accordance with Yugandhar Licensing Terms. */ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.yugandhar.common.constant.yugandharConstants; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.yugandhar.common.transobj.TxnTransferObj; import com.yugandhar.common.util.CommonValidationUtil; import com.yugandhar.common.exception.YugandharCommonException; /** *@author Yugandhar *@version 1.0 *@since 1.0 *@see Documentation */ @Service("com.yugandhar.mdm.corecomponent.CorporationnamesService") public class CorporationnamesService { private static final Logger logger = LoggerFactory.getLogger(yugandharConstants.YUGANDHAR_COMMON_LOGGER); TxnTransferObj txnTransferObjResponse; @Autowired CommonValidationUtil commonValidationUtil; @Autowired private CorporationnamesComponent theCorporationnamesComponent; public CorporationnamesService() { txnTransferObjResponse = new TxnTransferObj(); } /** *This service creates a record in database. generates the idpk if not provided in the request and *populate the updatedByUser, updatedTxnRefId, createdTsString, updatedTsString attributes. *@since 1.0 *@param txnTransferObj Transfer Object TxnTransferObj instance *@return txnTransferObj Returns the Transfer Object TxnTransferObj instance populated with persisted instance *@throws YugandharCommonException if CorporationnamesDO object is not present in the request or other mandatory attributes not present * */ @Transactional public TxnTransferObj add(TxnTransferObj txnTransferObj) throws YugandharCommonException { TxnTransferObj respTxnTransferObj; try { respTxnTransferObj = theCorporationnamesComponent.persist(txnTransferObj); } catch (YugandharCommonException yce) { logger.error("CorporationnamesService.add failed", yce); throw yce; } catch (Exception e) { //write the logic to get error message based on error code. Error code is hard-coded here logger.error("CorporationnamesService.add failed", e); e.printStackTrace(); throw commonValidationUtil.populateErrorResponse(txnTransferObj, "1", e, "CorporationnamesService.add failed unexpectedly"); } return respTxnTransferObj; } /**This service updates the record in database. populate the updatedByUser, updatedTxnRefId, updatedTsString attributes *@since 1.0 *@param txnTransferObj Transfer Object TxnTransferObj instance *@return txnTransferObj Returns the Transfer Object TxnTransferObj instance populated with database instance *@throws YugandharCommonException if CorporationnamesDO object is not present in the request or mandatory attributes primary key is not present */ @Transactional public TxnTransferObj merge(TxnTransferObj txnTransferObj) throws YugandharCommonException { TxnTransferObj respTxnTransferObj; try { respTxnTransferObj = theCorporationnamesComponent.merge(txnTransferObj); } catch (YugandharCommonException yce) { logger.error("CorporationnamesService.merge failed", yce); throw yce; } catch (Exception e) { //write the logic to get error message based on error code. Error code is hard-coded here logger.error("CorporationnamesService.merge failed", e); e.printStackTrace(); throw commonValidationUtil.populateErrorResponse(txnTransferObj, "1", e, "CorporationnamesService.merge failed unexpectedly"); } return respTxnTransferObj; } /** * This method search the database record based on primary key. *@since 1.0 *@param txnTransferObj Transfer Object TxnTransferObj instance *@return txnTransferObj Returns the Transfer Object TxnTransferObj instance populated with database instance *@throws YugandharCommonException if CorporationnamesDO object is not present in the request or mandatory attributes primary key is not present */ @Transactional(readOnly = true) public TxnTransferObj findById(TxnTransferObj txnTransferObj) throws YugandharCommonException { TxnTransferObj respTxnTransferObj; try { respTxnTransferObj = theCorporationnamesComponent.findById(txnTransferObj); } catch (YugandharCommonException yce) { logger.error("CorporationnamesService.findById failed", yce); throw yce; } catch (Exception e) { //write the logic to get error message based on error code. Error code is hard-coded here logger.error("CorporationnamesService.findById failed", e); e.printStackTrace(); throw commonValidationUtil.populateErrorResponse(txnTransferObj, "1", e, "CorporationnamesService.findById failed unexpectedly"); } return respTxnTransferObj; } /** * This method search the database record based on LegalEntityIdPk. *@since 1.0 *@param txnTransferObj Transfer Object TxnTransferObj instance *@return txnTransferObj Returns the Transfer Object TxnTransferObj instance populated with database instance *@throws YugandharCommonException if CorporationnamesDO object is not present in the request or LegalEntityIdPk is not present */ @Transactional(readOnly = true) public TxnTransferObj findByLegalEntityIdPk(TxnTransferObj txnTransferObj) throws YugandharCommonException { TxnTransferObj respTxnTransferObj; try { respTxnTransferObj = theCorporationnamesComponent.findByLegalEntityIdPk(txnTransferObj); } catch (YugandharCommonException yce) { logger.error("findByLegalEntityIdPk failed", yce); throw yce; } catch (Exception e) { //write the logic to get error message based on error code. Error code is hard-coded here logger.error("findByLegalEntityIdPk failed", e); e.printStackTrace(); throw commonValidationUtil.populateErrorResponse(txnTransferObj, "1", e, "CorporationnamesService.findByLegalEntityIdPk failed unexpectedly"); } return respTxnTransferObj; } }
[ "rakeshvikharblogger@gmail.com" ]
rakeshvikharblogger@gmail.com
97180e0a1fd3730f40780155a58716285e9b7c63
108dc17e407b69c4e0fe29801de3d0d919e00ea6
/com.carrotgarden.m2e/com.carrotgarden.m2e.scr/com.carrotgarden.m2e.scr.testing/src/main/java/root00/branch04/DummyComp_12.java
a562343199f2cf8dba2b404bd109fd86d6f8be73
[ "BSD-3-Clause" ]
permissive
barchart/carrot-eclipse
c017013e4913a1ba9b1f651778026be329802809
50f4433c0996646fd96593cabecaeeb1de798426
refs/heads/master
2023-08-31T05:54:26.725744
2013-06-23T21:18:15
2013-06-23T21:18:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,169
java
/** * Copyright (C) 2010-2012 Andrei Pozolotin <Andrei.Pozolotin@gmail.com> * * All rights reserved. Licensed under the OSI BSD License. * * http://www.opensource.org/licenses/bsd-license.php */ package root00.branch04; import java.util.concurrent.Executor; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Property; import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; import org.osgi.service.component.annotations.ReferencePolicy; // // should ignore runnable @Component(property={"first-name=carrot", "last-name=garden"}) public class DummyComp_12 implements Cloneable, Runnable { @Property static final String HELLO= "hello"; @Property static final String HELLO_AGAIN= "hello-again"; @Property static final String THANK_YOU= "thank-yours"; @Property static final String PROP_01= "property with index"; @Property static final String PROP_02= "property with index"; @Property static final String PROP_03= "property with index"; @Property static final String PROP_04= "property with index"; @Property static final String PROP_05= "property with index"; @Reference(name = "1133-1") void bind1(final Executor executor) { } void unbind1(final Executor executor) { } @Reference(name = "1133-2") void bind2(final Executor executor) { } void unbind2(final Executor executor) { } @Reference(name = "1133-3") void bind3(final Executor executor) { } void unbind3(final Executor executor) { } @Reference(name = "1133-4") void bind4(final Executor executor) { } void unbind4(final Executor executor) { } @Reference(name = "1133-5") void bind(final Executor executor) { } void unbind(final Executor executor) { } @Reference(name = "1133-add/remove") void addExec(final Executor executor) { } void removeExec(final Executor executor) { } @Reference(name = "113311", policy=ReferencePolicy.DYNAMIC, cardinality=ReferenceCardinality.MULTIPLE) void bind(final Runnable tasker) { } void unbind(final Runnable tasker) { } //////////////// @Override public void run() { } }
[ "Andrei.Pozolotin@gmail.com" ]
Andrei.Pozolotin@gmail.com
62899bcb4ae1d5fb75d6dee0e9c95870c104b331
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_131/Testnull_13024.java
b415f735931523a7fa99c435cb84c9c6911f62b4
[]
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
308
java
package org.gradle.test.performancenull_131; import static org.junit.Assert.*; public class Testnull_13024 { private final Productionnull_13024 production = new Productionnull_13024("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
215d4465f41b8e15358c4ab958c3b04a9f35ae98
5c709a50e072068957a3e213f2e0108c7d16ca83
/business-api/src/main/java/br/com/rft/peculium/models/Role.java
9543b3c68c3db1533b51866c3b46e8f762edd0bb
[ "MIT" ]
permissive
rogeriofontes/peculium
7f42413bd829e22df7c8c6d393dade9ca32804da
dc58dc9c880abe143c1e3700b3ae1cc3f240ab25
refs/heads/master
2021-03-19T17:24:40.476303
2018-02-19T00:53:30
2018-02-19T00:53:30
48,907,812
0
0
null
null
null
null
UTF-8
Java
false
false
246
java
package br.com.rft.peculium.models; public enum Role { ADMIN("ADMIN"), USER("USER"); private String roleDescription; private Role(String role) { this.roleDescription = role; } public String getRole() { return roleDescription; } }
[ "fontestz@gmail.com" ]
fontestz@gmail.com
3c739cc2a794fc6ba151cbbdc97ab7bbc1240e56
a7cfa3c98c857224bbb024debe5c5890bc6ab356
/app/src/main/java/com/gh4a/model/TrendService.java
df918a2a7ae3f8951b41759b58dec0321ee2834a
[ "Apache-2.0" ]
permissive
slapperwan/gh4a
0601176f1b985f4e0bdca08d87d2e75320c6408e
c8e68091fd4be04e35cca46a1ebf767db5cdc01b
refs/heads/master
2023-08-25T21:33:35.875379
2023-05-29T18:08:48
2023-05-29T19:30:47
1,388,190
1,740
286
Apache-2.0
2023-09-01T12:30:43
2011-02-20T02:47:49
Java
UTF-8
Java
false
false
310
java
package com.gh4a.model; import java.util.List; import io.reactivex.Single; import retrofit2.Response; import retrofit2.http.GET; import retrofit2.http.Path; public interface TrendService { @GET("trends/trending_{type}-all.json") Single<Response<List<Trend>>> getTrends(@Path("type") String type); }
[ "dannybaumann@web.de" ]
dannybaumann@web.de
79d71e8b6497ea88a8dfb4488c3ec4c4a9753bd9
523584d00978ce9398d0d4b5cf33a318110ddadb
/src-data/uk/chromis/data/gui/NullIcon.java
24aaa5e405247893196417180cbe9c1b4850ee7d
[]
no_license
zenonarg/Chromis
8bbd687d763f4bf258984e46825257486bc49265
8211d7e1f3aa0e5d858e105a392795bf05c39924
refs/heads/master
2023-04-26T09:31:06.394569
2021-01-12T15:26:15
2021-01-12T15:26:15
312,036,399
1
0
null
2021-01-12T14:57:42
2020-11-11T17:06:35
null
UTF-8
Java
false
false
1,587
java
/* ** Chromis POS - The New Face of Open Source POS ** Copyright (c)2015-2016 ** http://www.chromis.co.uk ** ** This file is part of Chromis POS Version V0.60.2 beta ** ** Chromis POS 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. ** ** Chromis POS 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 Chromis POS. If not, see <http://www.gnu.org/licenses/> ** ** */ package uk.chromis.data.gui; import javax.swing.Icon; /** * * @author adrian */ public class NullIcon implements Icon { private int m_iWidth; private int m_iHeight; /** Creates a new instance of NullIcon * @param width * @param height */ public NullIcon(int width, int height) { m_iWidth = width; m_iHeight = height; } @Override public int getIconHeight() { return m_iHeight; } @Override public int getIconWidth() { return m_iWidth; } @Override public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y) { } }
[ "john@chromis.co.uk" ]
john@chromis.co.uk
011b5bab961a78ee04bc5e698d6d105710eb4d06
1a83a3737292b48cd16158d2aa6a8389d6c4f38e
/bin/platform/ext/catalog/testsrc/de/hybris/platform/catalog/jalo/ItemRemoveTest.java
db92f9cdd8756b39a1783854cc6f59e4e5ea5ccb
[]
no_license
NathanKun/Hybris123
026803ba53302a1e56f2e4c79dec33948021d24c
7b52d802856bd265403548924f40cff1ed8d9658
refs/heads/master
2021-01-25T00:48:23.674949
2018-03-01T10:41:30
2018-03-01T10:41:30
123,303,717
0
1
null
null
null
null
UTF-8
Java
false
false
6,114
java
/* * [y] hybris Platform * * Copyright (c) 2017 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("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 SAP. */ package de.hybris.platform.catalog.jalo; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import de.hybris.bootstrap.annotations.IntegrationTest; import de.hybris.platform.category.jalo.Category; import de.hybris.platform.category.jalo.CategoryManager; import de.hybris.platform.jalo.ConsistencyCheckException; import de.hybris.platform.jalo.Item; import de.hybris.platform.jalo.JaloSession; import de.hybris.platform.jalo.SessionContext; import de.hybris.platform.jalo.product.Product; import de.hybris.platform.jalo.product.ProductManager; import de.hybris.platform.testframework.HybrisJUnit4TransactionalTest; import java.util.Collections; import org.junit.Before; import org.junit.Test; @IntegrationTest public class ItemRemoveTest extends HybrisJUnit4TransactionalTest { private final CategoryManager catman = CategoryManager.getInstance(); private final ProductManager prodman = ProductManager.getInstance(); private final CatalogManager cman = CatalogManager.getInstance(); private Category root, sub; private Product prod; private Catalog catalog; private CatalogVersion catver; @Before public void setUp() throws Exception { root = catman.createCategory("root"); sub = catman.createCategory("sub"); sub.setSupercategories(root); prod = prodman.createProduct("prod"); sub.setProducts(Collections.singletonList(prod)); catalog = cman.createCatalog("catalog"); catver = cman.createCatalogVersion(catalog, "catver", null); cman.setCatalogVersion(prod, catver); cman.setCatalogVersion(root, catver); cman.setCatalogVersion(sub, catver); catver.setActive(true); } @Test public void testDefaultBehaviour() throws Exception { try { root.remove(); //exception fail("root contains a subcat. Therfore a ConsistencyCheckException should be thrown"); } catch (final ConsistencyCheckException e) { // DOCTODO document reason why this is empty } catch (final Exception e) { fail("unknown exception. Shouldn't happen"); throw e; } } @Test public void testDisableFlagForCategory() throws Exception { final SessionContext ctx = JaloSession.getCurrentSession().createLocalSessionContext(); ctx.setAttribute(Category.DISABLE_SUBCATEGORY_REMOVALCHECK, Boolean.TRUE); ctx.setAttribute(Item.DISABLE_ITEMCHECK_BEFORE_REMOVABLE, Boolean.FALSE); try { root.remove(); //exception assertTrue("subcat isn't alive, but only root cat was deleted", sub.isAlive()); assertFalse("rootcat is still alive but should be deleted", root.isAlive()); } catch (final Exception e) { fail("unknown exception. Shouldn't happen"); throw e; } finally { JaloSession.getCurrentSession().removeLocalSessionContext(); } } @Test public void testDisableFlagForItem() throws Exception { final SessionContext ctx = JaloSession.getCurrentSession().createLocalSessionContext(); ctx.setAttribute(Category.DISABLE_SUBCATEGORY_REMOVALCHECK, Boolean.FALSE); ctx.setAttribute(Item.DISABLE_ITEMCHECK_BEFORE_REMOVABLE, Boolean.TRUE); try { root.remove(); assertTrue("subcat isn't alive, but only root cat was deleted", sub.isAlive()); assertFalse("rootcat is still alive but should be deleted", root.isAlive()); } catch (final Exception e) { fail("unknown exception. Shouldn't happen"); throw e; } finally { JaloSession.getCurrentSession().removeLocalSessionContext(); } } @Test public void testFlagSetToFalse() throws Exception { final SessionContext ctx = JaloSession.getCurrentSession().createLocalSessionContext(); ctx.setAttribute(Item.DISABLE_ITEMCHECK_BEFORE_REMOVABLE, Boolean.FALSE); try { root.remove(); //exception fail("root contains a subcat. Therfore a ConsistencyCheckException should be thrown"); } catch (final ConsistencyCheckException e) { // document why this is empty } catch (final Exception e) { fail("unknown exception. Shouldn't happen"); throw e; } finally { JaloSession.getCurrentSession().removeLocalSessionContext(); } } @Test public void testDisableFlagForOtherItem() throws Exception { assertTrue("catalog does not exist", catalog.isAlive()); assertTrue("catalogversion does not exist", catver.isAlive()); try { catalog.remove(); //exception fail("catalog contains active catalogversion. Therfore a ConsistencyCheckException should be thrown"); } catch (final ConsistencyCheckException e) { // fine } catch (final Exception e) { fail("unknown exception " + e + ". Shouldn't happen"); } } @Test public void testDisableFlagForOtherItem2() throws Exception { assertTrue("catalog does not exist", catalog.isAlive()); assertTrue("catalogversion does not exist", catver.isAlive()); assertTrue("category does not exist", root.isAlive()); assertTrue("product does not exist", prod.isAlive()); // disable consistency checks final SessionContext ctx = JaloSession.getCurrentSession().createLocalSessionContext(); ctx.setAttribute(Item.DISABLE_ITEMCHECK_BEFORE_REMOVABLE, Boolean.TRUE); try { catalog.remove(); //exception assertFalse("catalog was not deleted", catalog.isAlive()); assertFalse("catver was not deleted", catver.isAlive()); // deleted recursively assertFalse("category was not deleted", root.isAlive()); // deleted recursively assertTrue("product was deleted", prod.isAlive()); } catch (final ConsistencyCheckException e) { fail("consistency exception shouldn't happen here"); } catch (final Exception e) { fail("unknown exception " + e + ". Shouldn't happen"); } finally { JaloSession.getCurrentSession().removeLocalSessionContext(); } } }
[ "nathanhejunyang@gmail.com" ]
nathanhejunyang@gmail.com
eaa27e74c5a1936c4c578ca087527b4e925fc560
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/Alluxio--alluxio/7977bd0e710f3dffae1782353ffde40532e2a52d/before/BasicOperations.java
0e58b5d6797ca265e6f100dd8bcba6e5e83f7d64
[]
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
4,110
java
/* * Licensed to the University of California, Berkeley 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 tachyon.examples; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.concurrent.Callable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import tachyon.Constants; import tachyon.TachyonURI; import tachyon.Version; import tachyon.client.OutStream; import tachyon.client.TachyonByteBuffer; import tachyon.client.TachyonFile; import tachyon.client.TachyonFS; import tachyon.client.WriteType; import tachyon.conf.TachyonConf; import tachyon.util.CommonUtils; import tachyon.util.FormatUtils; public class BasicOperations implements Callable<Boolean> { private static final Logger LOG = LoggerFactory.getLogger(Constants.LOGGER_TYPE); private final TachyonURI mMasterLocation; private final TachyonURI mFilePath; private final WriteType mWriteType; private final int mNumbers = 20; public BasicOperations(TachyonURI masterLocation, TachyonURI filePath, WriteType writeType) { mMasterLocation = masterLocation; mFilePath = filePath; mWriteType = writeType; } @Override public Boolean call() throws Exception { TachyonFS tachyonClient = TachyonFS.get(mMasterLocation, new TachyonConf()); createFile(tachyonClient); writeFile(tachyonClient); return readFile(tachyonClient); } private void createFile(TachyonFS tachyonClient) throws IOException { LOG.debug("Creating file..."); long startTimeMs = CommonUtils.getCurrentMs(); int fileId = tachyonClient.createFile(mFilePath); FormatUtils.printTimeTakenMs(startTimeMs, LOG, "createFile with fileId " + fileId); } private void writeFile(TachyonFS tachyonClient) throws IOException { ByteBuffer buf = ByteBuffer.allocate(mNumbers * 4); buf.order(ByteOrder.nativeOrder()); for (int k = 0; k < mNumbers; k ++) { buf.putInt(k); } buf.flip(); LOG.debug("Writing data..."); buf.flip(); long startTimeMs = CommonUtils.getCurrentMs(); TachyonFile file = tachyonClient.getFile(mFilePath); OutStream os = file.getOutStream(mWriteType); os.write(buf.array()); os.close(); FormatUtils.printTimeTakenMs(startTimeMs, LOG, "writeFile to file " + mFilePath); } private boolean readFile(TachyonFS tachyonClient) throws IOException { boolean pass = true; LOG.debug("Reading data..."); final long startTimeMs = CommonUtils.getCurrentMs(); TachyonFile file = tachyonClient.getFile(mFilePath); TachyonByteBuffer buf = file.readByteBuffer(0); if (buf == null) { file.recache(); buf = file.readByteBuffer(0); } buf.mData.order(ByteOrder.nativeOrder()); for (int k = 0; k < mNumbers; k ++) { pass = pass && (buf.mData.getInt() == k); } buf.close(); FormatUtils.printTimeTakenMs(startTimeMs, LOG, "readFile file " + mFilePath); return pass; } public static void main(String[] args) throws IllegalArgumentException { if (args.length != 3) { System.out.println("java -cp target/tachyon-" + Version.VERSION + "-jar-with-dependencies.jar " + "tachyon.examples.BasicOperations <TachyonMasterAddress> <FilePath> <WriteType>"); System.exit(-1); } Utils.runExample(new BasicOperations(new TachyonURI(args[0]), new TachyonURI(args[1]), WriteType.valueOf(args[2]))); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
f5e2e73dc545f2505fc9ce8d68d0bc1441c8b4e9
471a1d9598d792c18392ca1485bbb3b29d1165c5
/jadx-MFP/src/main/java/com/google/android/gms/internal/ads/zzbfj.java
1cf1076f9f568e2a8dffe7749e20903556f9b95e
[]
no_license
reed07/MyPreferencePal
84db3a93c114868dd3691217cc175a8675e5544f
365b42fcc5670844187ae61b8cbc02c542aa348e
refs/heads/master
2020-03-10T23:10:43.112303
2019-07-08T00:39:32
2019-07-08T00:39:32
129,635,379
2
0
null
null
null
null
UTF-8
Java
false
false
1,091
java
package com.google.android.gms.internal.ads; import com.google.android.gms.ads.internal.zzbv; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @zzark public final class zzbfj implements Iterable<zzbfh> { private final List<zzbfh> zzewn = new ArrayList(); public static boolean zzc(zzbdz zzbdz) { zzbfh zzd = zzd(zzbdz); if (zzd == null) { return false; } zzd.zzewk.abort(); return true; } static zzbfh zzd(zzbdz zzbdz) { Iterator it = zzbv.zzmd().iterator(); while (it.hasNext()) { zzbfh zzbfh = (zzbfh) it.next(); if (zzbfh.zzerw == zzbdz) { return zzbfh; } } return null; } public final void zza(zzbfh zzbfh) { this.zzewn.add(zzbfh); } public final void zzb(zzbfh zzbfh) { this.zzewn.remove(zzbfh); } public final Iterator<zzbfh> iterator() { return this.zzewn.iterator(); } public final int zzada() { return this.zzewn.size(); } }
[ "anon@ymous.email" ]
anon@ymous.email
d8821f63cec1f5a5bc0d3ddea6e1be8958e95ab2
b111b77f2729c030ce78096ea2273691b9b63749
/db-example-large-multi-project/project86/src/test/java/org/gradle/test/performance/mediumjavamultiproject/project86/p434/Test8681.java
4ee51eb0350edfd201364003ceee8f623039d719
[]
no_license
WeilerWebServices/Gradle
a1a55bdb0dd39240787adf9241289e52f593ccc1
6ab6192439f891256a10d9b60f3073cab110b2be
refs/heads/master
2023-01-19T16:48:09.415529
2020-11-28T13:28:40
2020-11-28T13:28:40
256,249,773
1
0
null
null
null
null
UTF-8
Java
false
false
2,556
java
package org.gradle.test.performance.mediumjavamultiproject.project86.p434; import org.junit.Test; import static org.junit.Assert.*; public class Test8681 { Production8681 objectUnderTest = new Production8681(); @Test public void testProperty0() throws Exception { String value = "value"; objectUnderTest.setProperty0(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty0()); } @Test public void testProperty1() throws Exception { String value = "value"; objectUnderTest.setProperty1(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty1()); } @Test public void testProperty2() throws Exception { String value = "value"; objectUnderTest.setProperty2(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty2()); } @Test public void testProperty3() throws Exception { String value = "value"; objectUnderTest.setProperty3(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty3()); } @Test public void testProperty4() throws Exception { String value = "value"; objectUnderTest.setProperty4(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty4()); } @Test public void testProperty5() throws Exception { String value = "value"; objectUnderTest.setProperty5(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty5()); } @Test public void testProperty6() throws Exception { String value = "value"; objectUnderTest.setProperty6(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty6()); } @Test public void testProperty7() throws Exception { String value = "value"; objectUnderTest.setProperty7(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty7()); } @Test public void testProperty8() throws Exception { String value = "value"; objectUnderTest.setProperty8(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty8()); } @Test public void testProperty9() throws Exception { String value = "value"; objectUnderTest.setProperty9(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty9()); } }
[ "nateweiler84@gmail.com" ]
nateweiler84@gmail.com
76d4f618efbd5a1c599ba324cf7de4bdebb0751a
23fde694c7701b99996a4853a5d48aaa5183cafa
/src/main/java/biweekly/ICalDataType.java
1b004833683dfc5cb05e029ce9f1c0ddc2f0931a
[ "BSD-2-Clause-Views", "BSD-2-Clause" ]
permissive
Jenner4S/biweekly
9590ff2db027ff706036f8dfbc0783f91168f22b
10aff5e530912f5ae71364a833d58ddf621a2f28
refs/heads/master
2021-01-22T13:23:48.365138
2017-08-12T18:11:56
2017-08-12T18:11:56
100,660,651
1
0
null
2017-08-18T01:37:20
2017-08-18T01:37:19
null
UTF-8
Java
false
false
7,176
java
package biweekly; import java.util.Collection; import biweekly.util.CaseClasses; /* Copyright (c) 2013-2017, Michael Angstadt All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * Defines the data type of a property's value. * @author Michael Angstadt * @see <a href="http://tools.ietf.org/html/rfc5545#page-29">RFC 5545 * p.29-50</a> */ public class ICalDataType { private static final CaseClasses<ICalDataType, String> enums = new CaseClasses<ICalDataType, String>(ICalDataType.class) { @Override protected ICalDataType create(String value) { return new ICalDataType(value); } @Override protected boolean matches(ICalDataType dataType, String value) { return dataType.name.equalsIgnoreCase(value); } }; /** * Binary data (such as an image or word-processing document). * @see <a href="http://tools.ietf.org/html/rfc5545#page-30">RFC 5545 * p.30-1</a> * @see <a href="http://www.imc.org/pdi/vcal-10.doc">vCal 1.0 p.18</a> */ public static final ICalDataType BINARY = new ICalDataType("BINARY"); /** * Boolean value ("true" or "false"). * @see <a href="http://tools.ietf.org/html/rfc5545#page-31">RFC 5545 * p.31</a> */ public static final ICalDataType BOOLEAN = new ICalDataType("BOOLEAN"); /** * A URI containing a calendar user address (typically, a "mailto" URI). * @see <a href="http://tools.ietf.org/html/rfc5545#page-30">RFC 5545 * p.30-1</a> */ public static final ICalDataType CAL_ADDRESS = new ICalDataType("CAL-ADDRESS"); /** * The property value is located in a separate MIME entity (vCal 1.0 only). * @see <a href="http://www.imc.org/pdi/vcal-10.doc">vCal 1.0 p.17</a> */ public static final ICalDataType CONTENT_ID = new ICalDataType("CONTENT-ID"); //1.0 only /** * A date (for example, "2014-03-12"). * @see <a href="http://tools.ietf.org/html/rfc5545#page-32">RFC 5545 * p.32</a> * @see <a href="http://www.imc.org/pdi/vcal-10.doc">vCal 1.0 p.16-7</a> */ public static final ICalDataType DATE = new ICalDataType("DATE"); /** * A date/time value (for example, "2014-03-12 13:30:00"). * @see <a href="http://tools.ietf.org/html/rfc5545#page-32">RFC 5545 * p.32-4</a> * @see <a href="http://www.imc.org/pdi/vcal-10.doc">vCal 1.0 p.16-7</a> */ public static final ICalDataType DATE_TIME = new ICalDataType("DATE-TIME"); /** * A duration of time (for example, "2 hours, 30 minutes"). * @see <a href="http://tools.ietf.org/html/rfc5545#page-35">RFC 5545 * p.35-6</a> * @see <a href="http://www.imc.org/pdi/vcal-10.doc">vCal 1.0 p.17</a> */ public static final ICalDataType DURATION = new ICalDataType("DURATION"); /** * A floating point value (for example, "3.14") * @see <a href="http://tools.ietf.org/html/rfc5545#page-36">RFC 5545 * p.36</a> */ public static final ICalDataType FLOAT = new ICalDataType("FLOAT"); /** * An integer value (for example, "42") * @see <a href="http://tools.ietf.org/html/rfc5545#page-37">RFC 5545 * p.37</a> */ public static final ICalDataType INTEGER = new ICalDataType("INTEGER"); /** * A period of time (for example, "October 3 through October 5"). * @see <a href="http://tools.ietf.org/html/rfc5545#page-37-8">RFC 5545 * p.37-8</a> */ public static final ICalDataType PERIOD = new ICalDataType("PERIOD"); /** * A recurrence rule (for example, "every Monday at 2pm"). * @see <a href="http://tools.ietf.org/html/rfc5545#page-38">RFC 5545 * p.38-45</a> * @see <a href="http://www.imc.org/pdi/vcal-10.doc">vCal 1.0 p.18-23</a> */ public static final ICalDataType RECUR = new ICalDataType("RECUR"); /** * A plain text value. * @see <a href="http://tools.ietf.org/html/rfc5545#page-45">RFC 5545 * p.45-6</a> */ public static final ICalDataType TEXT = new ICalDataType("TEXT"); /** * A time value (for example, "2pm"). * @see <a href="http://tools.ietf.org/html/rfc5545#page-47">RFC 5545 * p.47-8</a> */ public static final ICalDataType TIME = new ICalDataType("TIME"); /** * A URI value. * @see <a href="http://tools.ietf.org/html/rfc5545#page-49">RFC 5545 * p.49</a> */ public static final ICalDataType URI = new ICalDataType("URI"); /** * A URL (for example, "http://example.com/picture.jpg") (vCal 1.0 only). * @see <a href="http://www.imc.org/pdi/vcal-10.doc">vCal 1.0 p.17-8</a> */ public static final ICalDataType URL = new ICalDataType("URL"); /** * A UTC-offset (for example, "+0500"). * @see <a href="http://tools.ietf.org/html/rfc5545#page-49">RFC 5545 * p.49-50</a> */ public static final ICalDataType UTC_OFFSET = new ICalDataType("UTC-OFFSET"); private final String name; private ICalDataType(String name) { this.name = name; } /** * Gets the name of the data type. * @return the name of the data type (e.g. "TEXT") */ public String getName() { return name; } @Override public String toString() { return name; } /** * Searches for a parameter value that is defined as a static constant in * this class. * @param value the parameter value * @return the object or null if not found */ public static ICalDataType find(String value) { if ("CID".equalsIgnoreCase(value)) { //"CID" is an alias for "CONTENT-ID" (vCal 1.0, p.17) return CONTENT_ID; } return enums.find(value); } /** * Searches for a parameter value and creates one if it cannot be found. All * objects are guaranteed to be unique, so they can be compared with * {@code ==} equality. * @param value the parameter value * @return the object */ public static ICalDataType get(String value) { if ("CID".equalsIgnoreCase(value)) { //"CID" is an alias for "CONTENT-ID" (vCal 1.0, p.17) return CONTENT_ID; } return enums.get(value); } /** * Gets all of the parameter values that are defined as static constants in * this class. * @return the parameter values */ public static Collection<ICalDataType> all() { return enums.all(); } }
[ "mike.angstadt@gmail.com" ]
mike.angstadt@gmail.com
39b9d81cffc081ed79c8ddbe59d067572f6fb3bd
5bfdd3e3e61e046a56f5e4714bd13e4bf0bf359d
/algorithm/src/boj/SquareEyesightTest18242.java
30ce8ed655145e1c84807528138e971489d431ed
[ "MIT" ]
permissive
Oraindrop/algorithm
e40b0c36a6728bc3f3599b7769d581cc3e59e9d8
7081464a4153c307c5ad6e92523b7d6f74fce332
refs/heads/master
2022-01-18T15:11:13.959202
2021-12-30T14:39:17
2021-12-30T14:39:17
146,498,419
0
1
null
null
null
null
UTF-8
Java
false
false
1,404
java
package boj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Collections; import java.util.HashSet; import java.util.Set; import java.util.StringTokenizer; public class SquareEyesightTest18242 { public static void main(String[] args) throws IOException { // TODO Auto-generated method stub BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int a = Integer.parseInt(st.nextToken()); int b = Integer.parseInt(st.nextToken()); String[][] arr = new String[a][b]; Set<Integer> xSet = new HashSet<>(); Set<Integer> ySet = new HashSet<>(); for (int i = 0; i < a; i++) { arr[i] = br.readLine().split(""); } for (int i = 0; i < a; i++) { for (int j = 0; j < b; j++) { if (arr[i][j].equals("#")) { xSet.add(i); ySet.add(j); } } } int xMin = Collections.min(xSet); int xMax = Collections.max(xSet); int yMin = Collections.min(ySet); int length = Collections.max(xSet) - Collections.min(xSet) + 1; if (arr[xMin][yMin+(length/2)].equals(".")) { System.out.println("UP"); } else if (arr[xMin+(length/2)][yMin].equals(".")) { System.out.println("LEFT"); } else if (arr[xMax][yMin+(length/2)].equals(".")) { System.out.println("DOWN"); } else { System.out.println("RIGHT"); } } }
[ "chltmdals115@gmail.com" ]
chltmdals115@gmail.com
1ca96a759fddb175b4b087729c61cb743a327651
66c766517e47b855af27641ed1334e1e3576922b
/car-server/web/CarEye/src/com/careye/transaction/action/DriverEvaluationAction.java
8ad2974b41f49497f55819771c16210f0d36096a
[]
no_license
vincenlee/Car-eye-server
21a6c2eda0fd3f096c842fdae6eea4c5af84d22e
47f45a0596fddf65cda6fb7cf657aa716244e5b5
refs/heads/master
2022-05-04T22:09:50.411646
2018-09-28T08:03:03
2018-09-28T08:03:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,799
java
package com.careye.transaction.action; import java.io.IOException; import java.net.URLDecoder; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import com.careye.base.action.BasePageAction; import com.careye.transaction.domain.DriverEvaluation; import com.careye.transaction.domain.PassageStatistic; import com.careye.transaction.domain.Transaction; import com.careye.transaction.service.DriverEvaluationService; import com.careye.utils.ExcelDownWay; import com.careye.utils.SessionUtils; import com.careye.utils.StringUtils; import common.Logger; /** * * @项目名称:car-eye * @类名称: * @类描述: * @创建人:ll * @创建时间:2015-11-25 下午06:48:00 * @修改人:ll * @修改时间:2015-11-25 下午06:48:00 * @修改备注: * @version 1.0 */ public class DriverEvaluationAction extends BasePageAction { private static final long serialVersionUID = 1L; private static final Logger logger = Logger.getLogger(DriverEvaluationAction.class); private DriverEvaluationService driverEvaluationService; private DriverEvaluation driverEvaluation; private String dname; private String cname; private String slevel; private String stime; private String etime; private String fileName; private Map result; public void initMap() { if (result == null) { result = new HashMap(); } } /** * 查询司机评价客户信息列表 * * @return */ public String getDriverEvaluationList() { try { initMap(); if (driverEvaluation == null) { driverEvaluation = new DriverEvaluation(); } if (StringUtils.isNotEmty(dname)) { driverEvaluation.setDname(URLDecoder.decode(dname, "UTF-8")); } if (StringUtils.isNotEmty(cname)) { driverEvaluation.setCname(URLDecoder.decode(cname, "UTF-8")); } if (StringUtils.isNotEmty(slevel)) { driverEvaluation.setSlevel(Integer.parseInt(slevel)); } if (StringUtils.isNotEmty(stime)) { driverEvaluation.setStime(URLDecoder.decode(stime, "UTF-8")); } if (StringUtils.isNotEmty(etime)) { driverEvaluation.setEtime(URLDecoder.decode(etime, "UTF-8")); } result = driverEvaluationService.getDriverEvaluationList(this.getPage(), this .getLimit(), driverEvaluation); return SUCCESS; } catch (Exception e) { logger.error("DriverEvaluationAction 的方法 getDriverEvaluationList 执行出错,原因:" + e, e); return ERROR; } } /** * Excel导出 * * @throws IOException */ public void exportExcel() { try { // 1.设置名字 fileName = "司机评价乘客"; HSSFWorkbook book = new HSSFWorkbook(); Sheet sheet = book.createSheet(fileName); // sheet.setDefaultColumnWidth(15); ExcelDownWay exceldownway = new ExcelDownWay(); // 2.设置列宽(列数要对应上) String str = "7,25,25,15,25,25,45,35,35,25"; List<String> numberList = Arrays.asList(str.split(",")); sheet = exceldownway.setColumnWidth(sheet, numberList); sheet.setDefaultRowHeight((short) 18); Row titleRow = sheet.createRow(0); titleRow.setHeightInPoints(20); if (driverEvaluation == null) { driverEvaluation = new DriverEvaluation(); } if (driverEvaluation == null) { driverEvaluation = new DriverEvaluation(); } if (StringUtils.isNotEmty(dname)) { driverEvaluation.setDname(new String(dname.getBytes("ISO-8859-1"),"utf-8").trim()); } if (StringUtils.isNotEmty(cname)) { driverEvaluation.setCname(new String(cname.getBytes("ISO-8859-1"),"utf-8").trim()); } if (StringUtils.isNotEmty(slevel)) { driverEvaluation.setSlevel(Integer.parseInt(slevel)); } if (StringUtils.isNotEmty(stime)) { driverEvaluation.setStime(URLDecoder.decode(stime, "UTF-8")); } if (StringUtils.isNotEmty(etime)) { driverEvaluation.setEtime(URLDecoder.decode(etime, "UTF-8")); } List<DriverEvaluation> list = driverEvaluationService.exportExcel(driverEvaluation); titleRow.createCell(0).setCellValue("序号");// titleRow.setHeight((short)(20 // * 15)); titleRow.createCell(1).setCellValue("司机姓名"); titleRow.createCell(2).setCellValue("司机手机号"); titleRow.createCell(3).setCellValue("星级"); titleRow.createCell(4).setCellValue("客户姓名"); titleRow.createCell(5).setCellValue("客户手机号"); titleRow.createCell(6).setCellValue("评价内容"); titleRow.createCell(7).setCellValue("上车地址"); titleRow.createCell(8).setCellValue("下车地址"); titleRow.createCell(9).setCellValue("创建时间"); for (int i = 0; i < titleRow.getLastCellNum(); i++) { titleRow.getCell(i).setCellStyle( exceldownway.setBookHeadStyle(book)); } if (list.size() > 0) { for (int i = 0; i < list.size(); i++) { int index = i + 1; Row contentRow = sheet.createRow(index); contentRow.createCell(0).setCellValue(index); DriverEvaluation data = (DriverEvaluation) list.get(i); contentRow.createCell(1).setCellValue(data.getDname()); contentRow.createCell(2).setCellValue(data.getDphone()); Integer slevel = data.getSlevel(); String slevelStr = ""; if(slevel == null){ }else if(slevel == 1){ slevelStr = "一星"; }else if(slevel == 2){ slevelStr = "二星"; }else if(slevel == 3){ slevelStr = "三星"; }else if(slevel == 4){ slevelStr = "四星"; }else if(slevel == 5){ slevelStr = "五星"; } contentRow.createCell(3).setCellValue(slevelStr); contentRow.createCell(4).setCellValue(data.getCname()); contentRow.createCell(5).setCellValue(data.getCphone()); contentRow.createCell(6).setCellValue(data.getContent()); contentRow.createCell(7).setCellValue(data.getSaddress()); contentRow.createCell(8).setCellValue(data.getEaddress()); contentRow.createCell(9).setCellValue(data.getCreatetime()); // for (int m = 0; m < contentRow.getLastCellNum(); m++) { // contentRow.getCell(m).setCellStyle( // exceldownway.setBookListStyle(book)); // } } } exceldownway.getCommonExcelListWay(book, fileName); } catch (Exception e) { try { getResponse() .getWriter() .print( "<script language=javascript>alert('Error!');history.back();</script>"); } catch (IOException e1) { e1.printStackTrace(); } } } public DriverEvaluationService getDriverEvaluationService() { return driverEvaluationService; } public void setDriverEvaluationService( DriverEvaluationService driverEvaluationService) { this.driverEvaluationService = driverEvaluationService; } public DriverEvaluation getDriverEvaluation() { return driverEvaluation; } public void setDriverEvaluation(DriverEvaluation driverEvaluation) { this.driverEvaluation = driverEvaluation; } public String getDname() { return dname; } public void setDname(String dname) { this.dname = dname; } public String getCname() { return cname; } public void setCname(String cname) { this.cname = cname; } public String getSlevel() { return slevel; } public void setSlevel(String slevel) { this.slevel = slevel; } public String getStime() { return stime; } public void setStime(String stime) { this.stime = stime; } public String getEtime() { return etime; } public void setEtime(String etime) { this.etime = etime; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public Map getResult() { return result; } public void setResult(Map result) { this.result = result; } }
[ "dengtieshan@shenghong-technology.com" ]
dengtieshan@shenghong-technology.com
69084abb65ae409d39e20e7658760da85b6f3c2f
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/a2/a/a/c2/f/d.java
7a29024e83096711d77599e507b00df1e954f794
[]
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
1,091
java
package a2.a.a.c2.f; import com.avito.android.profile_phones.phones_list.PhonesListFragment; import com.avito.android.profile_phones.phones_list.PhonesListViewModel; import com.avito.android.profile_phones.phones_list.list_item.PhoneListItem; import io.reactivex.rxjava3.functions.Consumer; import kotlin.jvm.internal.Intrinsics; public final class d<T> implements Consumer<PhoneListItem> { public final /* synthetic */ PhonesListFragment a; public d(PhonesListFragment phonesListFragment) { this.a = phonesListFragment; } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */ @Override // io.reactivex.rxjava3.functions.Consumer public void accept(PhoneListItem phoneListItem) { PhoneListItem phoneListItem2 = phoneListItem; PhonesListViewModel access$getPhonesListViewModel$p = PhonesListFragment.access$getPhonesListViewModel$p(this.a); Intrinsics.checkNotNullExpressionValue(phoneListItem2, "it"); access$getPhonesListViewModel$p.onPhoneClicked(phoneListItem2); } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
401aebeec6d3a964b64bed7bae519dc4d2649202
0a12bd827c3c48add9f5f400763a87ea69631faf
/aop/src/main/java/bboss/org/jgroups/protocols/BasicTCP.java
49a5046768a666aafb83757f1e9decf8cba52d02
[]
no_license
sqidea/bboss
76c64dea2e0ecd2c8d4b7269021e37f58a5b4071
d889e252d2bbf57681072fcd250a9e4da42f5938
refs/heads/master
2021-01-18T18:50:21.077011
2013-10-15T15:31:53
2013-10-15T15:31:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,488
java
package bboss.org.jgroups.protocols; import java.net.InetAddress; import java.util.Collection; import java.util.HashSet; import java.util.Set; import bboss.org.jgroups.Address; import bboss.org.jgroups.Event; import bboss.org.jgroups.PhysicalAddress; import bboss.org.jgroups.annotations.DeprecatedProperty; import bboss.org.jgroups.annotations.Property; import bboss.org.jgroups.stack.Protocol; /** * Shared base class for tcpip protocols * @author Scott Marlow */ @DeprecatedProperty(names={"suspect_on_send_failure", "skip_suspected_members"}) public abstract class BasicTCP extends TP { /* ----------------------------------------- Properties -------------------------------------------------- */ @Property(description="Reaper interval in msec. Default is 0 (no reaping)") protected long reaper_interval=0; // time in msecs between connection reaps @Property(description="Max time connection can be idle before being reaped (in ms)") protected long conn_expire_time=0; // max time a conn can be idle before being reaped @Property(description="Should separate send queues be used for each connection") boolean use_send_queues=true; @Property(description="Max number of messages in a send queue") int send_queue_size=10000; @Property(description="Receiver buffer size in bytes") int recv_buf_size=150000; @Property(description="Send buffer size in bytes") int send_buf_size=150000; @Property(description="Max time allowed for a socket creation in ConnectionTable") int sock_conn_timeout=2000; // max time in millis for a socket creation in ConnectionTable @Property(description="Max time to block on reading of peer address") int peer_addr_read_timeout=1000; // max time to block on reading of peer address @Property(description="Should TCP no delay flag be turned on") boolean tcp_nodelay=true; @Property(description="SO_LINGER in msec. Default of -1 disables it") int linger=-1; // SO_LINGER (number of ms, -1 disables it) @Property(description="Use \"external_addr\" if you have hosts on different networks, behind " + "firewalls. On each firewall, set up a port forwarding rule (sometimes called \"virtual server\") to " + "the local IP (e.g. 192.168.1.100) of the host then on each host, set \"external_addr\" TCP transport " + "parameter to the external (public IP) address of the firewall.") InetAddress external_addr = null ; /* --------------------------------------------- Fields ------------------------------------------------------ */ protected BasicTCP() { super(); } public boolean supportsMulticasting() { return false; } public long getReaperInterval() {return reaper_interval;} public void setReaperInterval(long reaper_interval) {this.reaper_interval=reaper_interval;} public long getConnExpireTime() {return conn_expire_time;} public void setConnExpireTime(long conn_expire_time) {this.conn_expire_time=conn_expire_time;} public void init() throws Exception { super.init(); if(!isSingleton() && bind_port <= 0) { Protocol dynamic_discovery_prot=stack.findProtocol("MPING"); if(dynamic_discovery_prot == null) dynamic_discovery_prot=stack.findProtocol("TCPGOSSIP"); if(dynamic_discovery_prot != null) { if(log.isDebugEnabled()) log.debug("dynamic discovery is present (" + dynamic_discovery_prot + "), so start_port=" + bind_port + " is okay"); } else { throw new IllegalArgumentException("start_port cannot be set to " + bind_port + ", as no dynamic discovery protocol (e.g. MPING or TCPGOSSIP) has been detected."); } } } public void sendMulticast(byte[] data, int offset, int length) throws Exception { sendToAllPhysicalAddresses(data, offset, length); } public void sendUnicast(PhysicalAddress dest, byte[] data, int offset, int length) throws Exception { if(log.isTraceEnabled()) log.trace("dest=" + dest + " (" + length + " bytes)"); send(dest, data, offset, length); } public String getInfo() { StringBuilder sb=new StringBuilder(); sb.append("connections: ").append(printConnections()).append("\n"); return sb.toString(); } public abstract String printConnections(); public abstract void send(Address dest, byte[] data, int offset, int length) throws Exception; public abstract void retainAll(Collection<Address> members); /** ConnectionMap.Receiver interface */ public void receive(Address sender, byte[] data, int offset, int length) { super.receive(sender, data, offset, length); } protected Object handleDownEvent(Event evt) { Object ret=super.handleDownEvent(evt); if(evt.getType() == Event.VIEW_CHANGE) { Set<Address> physical_mbrs=new HashSet<Address>(); for(Address addr: members) { PhysicalAddress physical_addr=getPhysicalAddressFromCache(addr); if(physical_addr != null) physical_mbrs.add(physical_addr); } retainAll(physical_mbrs); // remove all connections from the ConnectionTable which are not members } return ret; } }
[ "gao.tang@oceanwing.com" ]
gao.tang@oceanwing.com
48644ceeee54aa9bc7e9a08ac41d3090c571c4b9
a7e0488a42a781a30c5e418d451064898d4717c1
/nest-plus-demo/src/main/java/com/zhaofujun/nest/demo/adapter/rest/UserController.java
6080864bd4b85b9d39d3602ceb6f26696fed6e85
[]
no_license
455586841/nest-plus
89056f9b6e37b1fe687b58cce72a6348557a9e9d
1e1ef483635595ae4ea87e629694352ae6542986
refs/heads/master
2023-06-14T21:56:39.595522
2021-07-12T10:15:07
2021-07-12T10:15:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
737
java
package com.zhaofujun.nest.demo.adapter.rest; import com.zhaofujun.nest.demo.application.UserAppService; import com.zhaofujun.nest.demo.contract.UserDto; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @RestController @RequestMapping("/user") public class UserController { @Resource private UserAppService userAppService; @PostMapping("/create") public UserDto create() { return userAppService.create("name", "tel"); } @PostMapping("/update") public UserDto udpate() { return userAppService.changeAddress(); } }
[ "jovezhao@foxmail.com" ]
jovezhao@foxmail.com
0537f88f8e0aab27a31794949009f275ad3066ca
36bf98918aebe18c97381705bbd0998dd67e356f
/projects/castor-1.3.3/xmlctf-framework/src/main/java/org/castor/xmlctf/CompareHelper.java
08d19d49034ab78b0c9d1354fed3b151428aaa5b
[]
no_license
ESSeRE-Lab/qualitas.class-corpus
cb9513f115f7d9a72410b3f5a72636d14e4853ea
940f5f2cf0b3dc4bd159cbfd49d5c1ee4d06d213
refs/heads/master
2020-12-24T21:22:32.381385
2016-05-17T14:03:21
2016-05-17T14:03:21
59,008,169
2
1
null
null
null
null
UTF-8
Java
false
false
7,296
java
/* * Redistribution and use of this software and associated documentation * ("Software"), with or without modification, are permitted provided * that the following conditions are met: * * 1. Redistributions of source code must retain copyright * statements and notices. Redistributions must also contain a * copy of this document. * * 2. Redistributions in binary form must reproduce the * above copyright notice, this list of conditions and the * following disclaimer in the documentation and/or other * materials provided with the distribution. * * 3. The name "Exolab" must not be used to endorse or promote * products derived from this Software without prior written * permission of Intalio, Inc. For written permission, * please contact info@exolab.org. * * 4. Products derived from this Software may not be called "Exolab" * nor may "Exolab" appear in their names without prior written * permission of Intalio, Inc. Exolab is a registered * trademark of Intalio, Inc. * * 5. Due credit should be given to the Exolab Project * (http://www.exolab.org/). * * THIS SOFTWARE IS PROVIDED BY INTALIO, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * INTALIO, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Copyright 1999 (C) Intalio, Inc. All Rights Reserved. * * $Id: CompareHelper.java 6785 2007-01-29 05:09:59Z ekuns $ */ package org.castor.xmlctf; import java.lang.reflect.Array; /** * Assists in the comparison of objects. This method is used by generated * code but is not used within the CTF directly. * * @author <a href="mailto:gignoux@intalio.com">Sebastien Gignoux</a> * @version $Revision: 6785 $ $Date: 2003-10-15 09:17:49 -0600 (Wed, 15 Oct 2003) $ */ public class CompareHelper { /** * Compare two objects. Return true if they are both null or if they are * equal. This comparison method has special handling for arrays: For * arrays, each element is compared. * <p> * Warning: We will throw a NullPointerException if any element of either * array is null. * * @param o1 first object * @param o2 second object * @return true if both objects are both null or otherwise are equal */ public static boolean equals(Object o1, Object o2) { if (o1 == null && o2 == null) { return true; } if ((o1 != null && o2 == null) || (o1 == null && o2 != null)) { return false; } // From now we can safely assume (o1 != null && o2 != null) if (! o1.getClass().equals(o2.getClass())) { return false; } if (o1.getClass().isArray()) { return compareArray(o1, o2); } return o1.equals(o2); } /** * Compares two arrays, returning true if the arrays contain the same * values. * <p> * Warning: We will throw a NullPointerException if any element of either * array is null. * * @param o1 The first array * @param o2 The second array * @return true if the two objects represent arrays with the same values */ private static boolean compareArray(Object o1, Object o2) { int size = Array.getLength(o1); if (size != Array.getLength(o2)) return false; Class component = o1.getClass().getComponentType(); if ( ! component.equals(o2.getClass().getComponentType())) return false; if (component.isPrimitive()) { return comparePrimitiveArray(o1, o2); } for (int i=0; i < size; ++i) { if (! Array.get(o1, i).equals(Array.get(o2, i))) { return false; } } return true; } /** * Compares two arrays of primitive values. The caller should have tested * that the two array have the same length and that the component type are * equal. * * @param o1 The first array * @param o2 The second array * @return true if the two objects represent arrays of the same primitive * values */ public static boolean comparePrimitiveArray(Object o1, Object o2) { Class component = o1.getClass().getComponentType(); int size = Array.getLength(o1); if (component.equals(Boolean.TYPE)) { for (int i=0; i<size; ++i) { if (Array.getBoolean(o1, i) != Array.getBoolean(o2, i)) { return false; } } return true; } else if (component.equals(Byte.TYPE)) { for (int i=0; i<size; ++i) { if (Array.getByte(o1, i) != Array.getByte(o2, i)) { return false; } } return true; } else if (component.equals(Character.TYPE)) { for (int i=0; i<size; ++i) { if (Array.getChar(o1, i) != Array.getChar(o2, i)) { return false; } } return true; } else if (component.equals(Double.TYPE)) { for (int i=0; i<size; ++i) { if (Array.getDouble(o1, i) != Array.getDouble(o2, i)) { return false; } } return true; } else if (component.equals(Float.TYPE)) { for (int i=0; i<size; ++i) { if (Array.getFloat(o1, i) != Array.getFloat(o2, i)) { return false; } } return true; } else if (component.equals(Integer.TYPE)) { for (int i=0; i<size; ++i) { if (Array.getInt(o1, i) != Array.getInt(o2, i)) { return false; } } return true; } else if (component.equals(Long.TYPE)) { for (int i=0; i<size; ++i) { if (Array.getLong(o1, i) != Array.getLong(o2, i)) { return false; } } return true; } else if (component.equals(Short.TYPE)) { for (int i=0; i<size; ++i) { if (Array.getShort(o1, i) != Array.getShort(o2, i)) { return false; } } return true; } else { throw new IllegalArgumentException("Unexpected primitive type " + component.toString()); } } }
[ "marco.zanoni@disco.unimib.it" ]
marco.zanoni@disco.unimib.it
ed8f549b270b91813910fd870e72c2cf7a537ea9
468efd78d210a62ecf46091566c031016482a898
/spring-cloud/spring-cloud-zookeeper/spring-cloud-zookeeper-consumer/src/test/java/com/example/spring/cloud/zookeeper/consumer/SpringCloudZookeeperConsumerApplicationTests.java
a5d51741fbcf768d58b78c7ed3dcd1ccff48449b
[]
no_license
jhkim105/tutorials
f820bf871bcebe64184e5dcb4e648daf93801490
1615ccdaa9cec5e17fc96320d651789ee1390d33
refs/heads/master
2023-08-14T05:21:56.811183
2023-08-04T00:00:52
2023-08-04T00:13:12
222,575,910
3
1
null
2023-06-14T22:55:39
2019-11-19T00:55:48
Java
UTF-8
Java
false
false
260
java
package com.example.spring.cloud.zookeeper.consumer; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class SpringCloudZookeeperConsumerApplicationTests { @Test void contextLoads() { } }
[ "jhkim105@gmail.com" ]
jhkim105@gmail.com
1b15247489cca1f73fc0fdab230e64d73a3a50de
06bb1087544f7252f6a83534c5427975f1a6cfc7
/modules/ejbca-common/src/org/ejbca/core/model/validation/PublicKeyBlacklistEntryCache.java
16fa46e126c437f83df4ace60e9bc75e7e943e04
[]
no_license
mvilche/ejbca-ce
65f2b54922eeb47aa7a132166ca5dfa862cee55b
a89c66218abed47c7b310c3999127409180969dd
refs/heads/master
2021-03-08T08:51:18.636030
2020-03-12T18:53:18
2020-03-12T18:53:18
246,335,702
1
0
null
null
null
null
UTF-8
Java
false
false
3,366
java
/************************************************************************* * * * EJBCA Community: The OpenSource Certificate Authority * * * * This software is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or any later version. * * * * See terms of license at gnu.org. * * * *************************************************************************/ package org.ejbca.core.model.validation; import java.util.List; import java.util.Map; import org.cesecore.config.CesecoreConfiguration; import org.cesecore.internal.CommonCache; import org.cesecore.internal.CommonCacheBase; /** * Public key blacklist entry (see {@link PublicKeyBlacklistEntry}) and name to id lookup cache. * Configured through CesecoreConfiguration.getCachePublicKeyBlacklistTime(). * * @version $Id: PublicKeyBlacklistEntryCache.java 28332 2018-02-20 14:40:52Z anatom $ */ public enum PublicKeyBlacklistEntryCache implements CommonCache<PublicKeyBlacklistEntry> { INSTANCE; private final CommonCache<PublicKeyBlacklistEntry> cache = new CommonCacheBase<PublicKeyBlacklistEntry>() { @Override protected long getCacheTime() { return Math.max(CesecoreConfiguration.getCachePublicKeyBlacklistTime(), 0); }; @Override protected long getMaxCacheLifeTime() { // We never purge PublicKeyBlacklist unless a database select discovers a missing object. return 0L; } }; @Override public PublicKeyBlacklistEntry getEntry(final Integer id) { if (id == null) { return null; } return cache.getEntry(id); } @Override public PublicKeyBlacklistEntry getEntry(final int id) { return cache.getEntry(id); } @Override public boolean shouldCheckForUpdates(final int id) { return cache.shouldCheckForUpdates(id); } /** * @param id entry ID * @param digest Data.getProtectString(0).hashCode() * @param name the fingerprint of the entry object * @param object black list entry */ @Override public void updateWith(int id, int digest, String name, PublicKeyBlacklistEntry object) { cache.updateWith(id, digest, name, object); } @Override public void removeEntry(int id) { cache.removeEntry(id); } @Override public String getName(int id) { return cache.getName(id); } @Override public Map<String, Integer> getNameToIdMap() { return cache.getNameToIdMap(); } @Override public void flush() { cache.flush(); } @Override public void replaceCacheWith(List<Integer> keys) { cache.replaceCacheWith(keys); } @Override public boolean willUpdate(int id, int digest) { return cache.willUpdate(id, digest); } }
[ "mfvilche@gmail.com" ]
mfvilche@gmail.com
0e281fc906b2f2e44310623727e83b6edee11584
3f39ca215ccfb2398e57b5c4fe721bbfe538dc97
/src/main/java/io/github/jhipster/consumer/config/LoggingAspectConfiguration.java
c3c806f3ed1b85e50fb0da5e17a5e7da353f26c7
[]
no_license
pascalgrimaud/jhipster-kafka-consumer
0023871a54e25364f88717ca95d66fb052b51674
2eec3ecf21a8fc19328d0613dccf8b9c15fa084f
refs/heads/master
2022-12-21T19:22:07.340129
2019-11-15T09:31:38
2019-11-15T09:31:38
221,889,137
0
0
null
2022-12-16T04:41:01
2019-11-15T09:22:51
Java
UTF-8
Java
false
false
516
java
package io.github.jhipster.consumer.config; import io.github.jhipster.consumer.aop.logging.LoggingAspect; import io.github.jhipster.config.JHipsterConstants; import org.springframework.context.annotation.*; import org.springframework.core.env.Environment; @Configuration @EnableAspectJAutoProxy public class LoggingAspectConfiguration { @Bean @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) public LoggingAspect loggingAspect(Environment env) { return new LoggingAspect(env); } }
[ "pascalgrimaud@gmail.com" ]
pascalgrimaud@gmail.com
87f29ee547def672ad1195879ca423e9eef72836
c3afa6b7ba1f507d4323765a98451619d2e000a2
/lib-base-server/src/main/java/id/co/sigma/common/server/service/dualcontrol/ICustomBulkFieldIntegrityValidator.java
d61561a25b7e9e3769df25d84528b2b4273fcb1a
[ "Apache-2.0" ]
permissive
palawindu/bc-core
608371c410bc00e53381d6939c828b2c63a309e3
49f8f9e7d0b61a35014a5ae42d5a2043f9afa77d
refs/heads/master
2020-12-24T13:35:25.080633
2014-08-19T07:49:50
2014-08-19T07:49:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
519
java
package id.co.sigma.common.server.service.dualcontrol; import id.co.sigma.common.exception.DataDuplicationOnUploadedDataException; import java.util.List; /** * Validasi untuk nilai field yg belum ada di database. * * @author wayan * * @param <T> */ public interface ICustomBulkFieldIntegrityValidator<T> { public void validateFields(List<T> updatedData, List<T> newData) throws DataDuplicationOnUploadedDataException, Exception; public Class<T> getHandledClass(); public boolean isAfterClone(); }
[ "gede.sutarsa@gmail.com" ]
gede.sutarsa@gmail.com
bc4c82155ef07b5b32ad9d43a69b884713df4235
ede1fd0d934af8aaf82b0a8c081913a8dfe1416e
/src/com/class20/Palidrome.java
22c6384894854799476653bc10263131fe4687eb
[]
no_license
DannySorto1/eclipse-workSpace
9a79f007aa963c8230aa98e7944a732f7345b1a7
ebd93aa5d2b3ee19f757582f341a4c5e9bdc9d77
refs/heads/master
2020-05-03T09:59:25.374759
2019-07-30T20:34:56
2019-07-30T20:34:56
178,568,362
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package com.class20; public class Palidrome { public static void main(String[] args) { // TODO Auto-generated method stub } }
[ "Dannysorto1@gmail.com" ]
Dannysorto1@gmail.com
e8e5007681ba0623c968098be28e701f51b78c50
54f352a242a8ad6ff5516703e91da61e08d9a9e6
/Source Codes/AtCoder/agc001/A/4048032.java
095ffd9b367d40865a297b6bc0b831dd18fec2b3
[]
no_license
Kawser-nerd/CLCDSA
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
aee32551795763b54acb26856ab239370cac4e75
refs/heads/master
2022-02-09T11:08:56.588303
2022-01-26T18:53:40
2022-01-26T18:53:40
211,783,197
23
9
null
null
null
null
UTF-8
Java
false
false
3,024
java
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; import java.io.IOException; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; FastScanner in = new FastScanner(inputStream); PrintWriter out = new PrintWriter(outputStream); TaskA solver = new TaskA(); solver.solve(1, in, out); out.close(); } static class TaskA { public void solve(int testNumber, FastScanner in, PrintWriter out) { int n = in.nextInt(); int[] l = in.nextIntArray(n * 2); Arrays.sort(l); int ans = 0; for (int i = 0; i < 2 * n; i += 2) { ans += l[i]; } out.println(ans); } } static class FastScanner { private InputStream in; private byte[] buffer = new byte[1024]; private int bufPointer; private int bufLength; public FastScanner(InputStream in) { this.in = in; } private int readByte() { if (bufPointer >= bufLength) { if (bufLength == -1) throw new InputMismatchException(); bufPointer = 0; try { bufLength = in.read(buffer); } catch (IOException e) { throw new InputMismatchException(); } if (bufLength <= 0) return -1; } return buffer[bufPointer++]; } private static boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public long nextLong() { long n = 0; int b = readByte(); while (isSpaceChar(b)) b = readByte(); boolean minus = (b == '-'); if (minus) b = readByte(); while (b >= '0' && b <= '9') { n *= 10; n += b - '0'; b = readByte(); } if (!isSpaceChar(b)) throw new NumberFormatException(); return minus ? -n : n; } public int nextInt() { long n = nextLong(); if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE) throw new NumberFormatException(); return (int) n; } public int[] nextIntArray(int n) { int[] a = new int[n]; for (int i = 0; i < n; i++) a[i] = nextInt(); return a; } } }
[ "kwnafi@yahoo.com" ]
kwnafi@yahoo.com
b003a125c4e01dd1ec54ec8c0146f6f7583ba59a
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/jaxrs-cxf/generated/src/gen/java/org/openapitools/model/ComAdobeGraniteCompatrouterImplCompatSwitchingServiceImplInfo.java
3e627196bc47a05f9dc11541d94b15b7b023f340
[ "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
3,495
java
package org.openapitools.model; import org.openapitools.model.ComAdobeGraniteCompatrouterImplCompatSwitchingServiceImplProperties; import javax.validation.constraints.*; import javax.validation.Valid; import io.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonProperty; public class ComAdobeGraniteCompatrouterImplCompatSwitchingServiceImplInfo { @ApiModelProperty(value = "") private String pid = null; @ApiModelProperty(value = "") private String title = null; @ApiModelProperty(value = "") private String description = null; @ApiModelProperty(value = "") @Valid private ComAdobeGraniteCompatrouterImplCompatSwitchingServiceImplProperties properties = null; /** * Get pid * @return pid **/ @JsonProperty("pid") public String getPid() { return pid; } public void setPid(String pid) { this.pid = pid; } public ComAdobeGraniteCompatrouterImplCompatSwitchingServiceImplInfo pid(String pid) { this.pid = pid; return this; } /** * Get title * @return title **/ @JsonProperty("title") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public ComAdobeGraniteCompatrouterImplCompatSwitchingServiceImplInfo title(String title) { this.title = title; return this; } /** * Get description * @return description **/ @JsonProperty("description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public ComAdobeGraniteCompatrouterImplCompatSwitchingServiceImplInfo description(String description) { this.description = description; return this; } /** * Get properties * @return properties **/ @JsonProperty("properties") public ComAdobeGraniteCompatrouterImplCompatSwitchingServiceImplProperties getProperties() { return properties; } public void setProperties(ComAdobeGraniteCompatrouterImplCompatSwitchingServiceImplProperties properties) { this.properties = properties; } public ComAdobeGraniteCompatrouterImplCompatSwitchingServiceImplInfo properties(ComAdobeGraniteCompatrouterImplCompatSwitchingServiceImplProperties properties) { this.properties = properties; return this; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComAdobeGraniteCompatrouterImplCompatSwitchingServiceImplInfo {\n"); sb.append(" pid: ").append(toIndentedString(pid)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private static String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
b84c3a5511a5b6baa14612aca166776e02e06621
58a961999c259d7fc9e0b8c17a0990f4247f29bf
/CDM/Desafio/Desensamblado/CDM-CTF.apk-decompiled/sources/android/support/v4/os/IResultReceiver.java
d38e83158c2ef75dbf43fe54f766071457faa5e3
[]
no_license
Lulocu/4B-ETSINF
c50b4ca70ad14b9ec9af6a199c82fad333f7bc8c
65d492d0fbeb630c7bbe25d92dfbfd9e5f41bcd8
refs/heads/master
2023-06-05T23:41:02.297413
2021-06-20T10:53:30
2021-06-20T10:53:30
339,157,412
0
1
null
null
null
null
UTF-8
Java
false
false
2,881
java
package android.support.v4.os; import android.os.Binder; import android.os.Bundle; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; public interface IResultReceiver extends IInterface { void send(int i, Bundle bundle) throws RemoteException; public static abstract class Stub extends Binder implements IResultReceiver { private static final String DESCRIPTOR = "android.support.v4.os.IResultReceiver"; static final int TRANSACTION_send = 1; public IBinder asBinder() { return this; } public Stub() { attachInterface(this, DESCRIPTOR); } public static IResultReceiver asInterface(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface(DESCRIPTOR); if (queryLocalInterface == null || !(queryLocalInterface instanceof IResultReceiver)) { return new Proxy(iBinder); } return (IResultReceiver) queryLocalInterface; } @Override // android.os.Binder public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException { if (i == 1) { parcel.enforceInterface(DESCRIPTOR); send(parcel.readInt(), parcel.readInt() != 0 ? (Bundle) Bundle.CREATOR.createFromParcel(parcel) : null); return true; } else if (i != 1598968902) { return super.onTransact(i, parcel, parcel2, i2); } else { parcel2.writeString(DESCRIPTOR); return true; } } private static class Proxy implements IResultReceiver { private IBinder mRemote; public String getInterfaceDescriptor() { return Stub.DESCRIPTOR; } Proxy(IBinder iBinder) { this.mRemote = iBinder; } public IBinder asBinder() { return this.mRemote; } @Override // android.support.v4.os.IResultReceiver public void send(int i, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); try { obtain.writeInterfaceToken(Stub.DESCRIPTOR); obtain.writeInt(i); if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.mRemote.transact(1, obtain, null, 1); } finally { obtain.recycle(); } } } } }
[ "lulocu99@gmail.com" ]
lulocu99@gmail.com
4c18c5e262236f7b86e269352f95c106ee2851e7
1a3bdc91a7bbed040366db5195ab4e846292e1b0
/jfinal-sog/jfinal-app/src/main/java/com/github/sog/kit/Tuple.java
6373d27ca647a319ee1292f2fd72865b6bfad689
[ "Apache-2.0" ]
permissive
swordson/jfinal-app
3744b64e5b0aabac8c7dd53670353ad3df9f1ac4
b7cb7925d145ad744a138880b3d605530fc7135a
refs/heads/master
2021-01-20T22:39:57.032696
2014-06-24T15:34:05
2014-06-24T15:34:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,283
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 2013-2014 sagyf Yang. The Four Group. */ package com.github.sog.kit; import com.google.common.base.Objects; /** * <p> * . * </p> * * @author sagyf yang * @version 1.0 2014-03-27 14:13 * @since JDK 1.6 */ public class Tuple<X, Y> { public final X x; public final Y y; public Tuple(X x, Y y) { this.x = x; this.y = y; } public X getX() { return x; } public Y getY() { return y; } @Override public String toString() { return Objects.toStringHelper(this) .add("x", x) .add("y", y) .toString(); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Tuple tuple = (Tuple) o; if (x != null ? !x.equals(tuple.x) : tuple.x != null) return false; if (y != null ? !y.equals(tuple.y) : tuple.y != null) return false; return true; } @Override public int hashCode() { int result = x != null ? x.hashCode() : 0; result = 31 * result + (y != null ? y.hashCode() : 0); return result; } }
[ "poplar1123@gmail.com" ]
poplar1123@gmail.com
303bdd4eef9f07e0bb1cff84630f297de26bef21
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-2.0.0-M1/examples/voipservice/src/test/java/org/mule/samples/voipservice/VoipConfigurationTestCase.java
76eedd8423b3f2c17c6c2dab8968f93bc2d55a17
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
682
java
/* * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the MuleSource MPL * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.samples.voipservice; import org.mule.tck.FunctionalTestCase; public class VoipConfigurationTestCase extends FunctionalTestCase { protected String getConfigResources() { return "voip-broker-sync-config.xml"; } public void testParse() { // no-op } }
[ "tcarlson@bf997673-6b11-0410-b953-e057580c5b09" ]
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
237a28191c00a26af09d98137b987be296fe11ea
f960616b9c42edc0e5e5449980ddcf3165d7c3fa
/kodilla-patterns2/src/main/java/com/kodilla/kodillapatterns2/decorator/pizza/NoItalianoPizza.java
ce16f58b67e7f897adb68597facd3f3ff843ae01
[]
no_license
Ksennia/RepozytoriumKodilla
8a159e17bff8cbcb0ef99aa6eaa4646350cb6efa
56645d3ee354cf1808b16018cea83fb0600913f1
refs/heads/master
2021-01-04T13:47:08.119524
2020-08-19T11:10:05
2020-08-19T11:10:05
240,580,092
0
1
null
null
null
null
UTF-8
Java
false
false
456
java
package com.kodilla.kodillapatterns2.decorator.pizza; import java.math.BigDecimal; public class NoItalianoPizza extends AbstractPizzaOrderDecorator{ public NoItalianoPizza(PizzaOrder basicPizza) { super(basicPizza); } @Override public BigDecimal theCost() { return super.theCost().add(new BigDecimal(2)); } @Override public String description() { return super.description() + ", pineapple"; } }
[ "nasz_email_do_github" ]
nasz_email_do_github
34cb2a0fd36ebbe42e92109cc2398bf5da59a9fb
3fc7c3d4a697c418bad541b2ca0559b9fec03db7
/TestResult/javasource/com/google/android/gms/internal/zzdp.java
de098b336f8b13a88a783d81f0688831e8e523c2
[]
no_license
songxingzai/APKAnalyserModules
59a6014350341c186b7788366de076b14b8f5a7d
47cf6538bc563e311de3acd3ea0deed8cdede87b
refs/heads/master
2021-12-15T02:43:05.265839
2017-07-19T14:44:59
2017-07-19T14:44:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
693
java
package com.google.android.gms.internal; import android.os.Handler; import com.google.android.gms.ads.internal.zzp; @zzgk public class zzdp extends zzhq { final zzip zzoL; final zzdr zzxr; private final String zzxs; zzdp(zzip paramZzip, zzdr paramZzdr, String paramString) { zzoL = paramZzip; zzxr = paramZzdr; zzxs = paramString; zzp.zzbK().zza(this); } public void onStop() { zzxr.abort(); } public void zzdG() { try { zzxr.zzZ(zzxs); return; } finally { zzhu.zzHK.post(new Runnable() { public void run() { zzp.zzbK().zzb(zzdp.this); } }); } } }
[ "leehdsniper@gmail.com" ]
leehdsniper@gmail.com
7cfc3e72cd8ba2861b9cb3b038e97cda0dc6c519
ad0de21411cde5f696d7b1fc73f00b60fd54730b
/application/src/lib/own/Rowsets/test/com/bearsoft/rowset/metadata/DataTypeInfoTest.java
f89902aee0610308248b622c682eb1cea0622acd
[]
no_license
Drunik01/PlatypusJS
135070c2e6041a54df2380005a402ba99624f5b3
cb972fb637baf783c7b6e19d048dfdc099f5661c
refs/heads/master
2021-01-17T12:01:58.683964
2015-04-22T12:30:18
2015-04-22T12:30:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,306
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.bearsoft.rowset.metadata; import com.bearsoft.rowset.utils.RowsetUtils; import java.sql.Types; import org.junit.Test; import static org.junit.Assert.*; /** * * @author mg */ public class DataTypeInfoTest { @Test public void compareTest() { System.out.println("compareTest"); DataTypeInfo typeInfo1 = new DataTypeInfo(Types.ARRAY, RowsetUtils.getTypeName(Types.ARRAY), ""); DataTypeInfo typeInfo2 = new DataTypeInfo(Types.ARRAY, RowsetUtils.getTypeName(Types.ARRAY), java.sql.Array.class.getName()); assertFalse(typeInfo1.equals(typeInfo2)); typeInfo1.setJavaClassName(java.sql.Array.class.getName()); assertEquals(typeInfo1, typeInfo2); } @Test public void copyTest() { System.out.println("copyTest"); DataTypeInfo typeInfo1 = new DataTypeInfo(Types.ARRAY, RowsetUtils.getTypeName(Types.ARRAY), java.sql.Array.class.getName()); DataTypeInfo typeInfo2 = typeInfo1.copy(); assertEquals(typeInfo1.getSqlType(), Types.ARRAY); assertEquals(typeInfo1.getSqlTypeName(), RowsetUtils.getTypeName(Types.ARRAY)); assertEquals(typeInfo1.getJavaClassName(), java.sql.Array.class.getName()); assertEquals(typeInfo2.getSqlType(), Types.ARRAY); assertEquals(typeInfo2.getSqlTypeName(), RowsetUtils.getTypeName(Types.ARRAY)); assertEquals(typeInfo2.getJavaClassName(), java.sql.Array.class.getName()); } @Test public void nullTypeNameTest() { System.out.println("nullTypeNameTest"); DataTypeInfo typeInfo1 = new DataTypeInfo(Types.ARRAY, null, java.sql.Array.class.getName()); assertEquals(typeInfo1.getSqlTypeName(), RowsetUtils.getTypeName(Types.ARRAY)); DataTypeInfo typeInfo2 = new DataTypeInfo(Types.VARCHAR, null, String.class.getName()); assertEquals(typeInfo2.getSqlTypeName(), RowsetUtils.getTypeName(Types.VARCHAR)); typeInfo2.setSqlTypeName("Some string type"); assertEquals(typeInfo2.getSqlTypeName(), "Some string type"); typeInfo2.setSqlType(Types.NVARCHAR); assertEquals(typeInfo2.getSqlTypeName(), RowsetUtils.getTypeName(Types.NVARCHAR)); } }
[ "mg@altsoft.biz" ]
mg@altsoft.biz
f03676b695799e937b8a15b273757bdf7a5d92df
52c36ce3a9d25073bdbe002757f08a267abb91c6
/src/main/java/com/alipay/api/response/KoubeiMarketingCampaignMerchantActivityCreateResponse.java
fd266eb7bc0d3f5694913fa616873a859539c32c
[ "Apache-2.0" ]
permissive
itc7/alipay-sdk-java-all
d2f2f2403f3c9c7122baa9e438ebd2932935afec
c220e02cbcdda5180b76d9da129147e5b38dcf17
refs/heads/master
2022-08-28T08:03:08.497774
2020-05-27T10:16:10
2020-05-27T10:16:10
267,271,062
0
0
Apache-2.0
2020-05-27T09:02:04
2020-05-27T09:02:04
null
UTF-8
Java
false
false
952
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.domain.MActivityDetailInfo; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.marketing.campaign.merchant.activity.create response. * * @author auto create * @since 1.0, 2019-05-16 14:59:18 */ public class KoubeiMarketingCampaignMerchantActivityCreateResponse extends AlipayResponse { private static final long serialVersionUID = 4553648846531872316L; /** * 创建成功之后返回活动详情信息,包含活动activity_id和活动当前状态activity_status等信息。 */ @ApiField("activity_detail_info") private MActivityDetailInfo activityDetailInfo; public void setActivityDetailInfo(MActivityDetailInfo activityDetailInfo) { this.activityDetailInfo = activityDetailInfo; } public MActivityDetailInfo getActivityDetailInfo( ) { return this.activityDetailInfo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
5dc591223e8c6202ccf2dcb2889e2129ef936098
af81db1ed7fff1b1ce92472a54fe987883b8174c
/spring-beans/src/main/java/org/springframework/beans/factory/NoUniqueBeanDefinitionException.java
9544bd9cad4e55f36a5a79d060870b7c9693765d
[ "Apache-2.0" ]
permissive
xd1810232299/spring-5.1.x
e14f000caa6c62f5706b16453981e92b6596664d
9aa43536793aa40db671d6ce6071e3e35bf29996
refs/heads/master
2023-05-09T15:20:49.500578
2021-06-03T03:22:00
2021-06-03T03:22:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,494
java
package org.springframework.beans.factory; import java.util.Arrays; import java.util.Collection; import org.springframework.core.ResolvableType; import org.springframework.lang.Nullable; import org.springframework.util.StringUtils; /** * Exception thrown when a {@code BeanFactory} is asked for a bean instance for which * multiple matching candidates have been found when only one matching bean was expected. * * @since 3.2.1 * @see BeanFactory#getBean(Class) */ @SuppressWarnings("serial") public class NoUniqueBeanDefinitionException extends NoSuchBeanDefinitionException { private final int numberOfBeansFound; @Nullable private final Collection<String> beanNamesFound; /** * Create a new {@code NoUniqueBeanDefinitionException}. * @param type required type of the non-unique bean * @param numberOfBeansFound the number of matching beans * @param message detailed message describing the problem */ public NoUniqueBeanDefinitionException(Class<?> type, int numberOfBeansFound, String message) { super(type, message); this.numberOfBeansFound = numberOfBeansFound; this.beanNamesFound = null; } /** * Create a new {@code NoUniqueBeanDefinitionException}. * @param type required type of the non-unique bean * @param beanNamesFound the names of all matching beans (as a Collection) */ public NoUniqueBeanDefinitionException(Class<?> type, Collection<String> beanNamesFound) { super(type, "expected single matching bean but found " + beanNamesFound.size() + ": " + StringUtils.collectionToCommaDelimitedString(beanNamesFound)); this.numberOfBeansFound = beanNamesFound.size(); this.beanNamesFound = beanNamesFound; } /** * Create a new {@code NoUniqueBeanDefinitionException}. * @param type required type of the non-unique bean * @param beanNamesFound the names of all matching beans (as an array) */ public NoUniqueBeanDefinitionException(Class<?> type, String... beanNamesFound) { this(type, Arrays.asList(beanNamesFound)); } /** * Create a new {@code NoUniqueBeanDefinitionException}. * @param type required type of the non-unique bean * @param beanNamesFound the names of all matching beans (as a Collection) * @since 5.1 */ public NoUniqueBeanDefinitionException(ResolvableType type, Collection<String> beanNamesFound) { super(type, "expected single matching bean but found " + beanNamesFound.size() + ": " + StringUtils.collectionToCommaDelimitedString(beanNamesFound)); this.numberOfBeansFound = beanNamesFound.size(); this.beanNamesFound = beanNamesFound; } /** * Create a new {@code NoUniqueBeanDefinitionException}. * @param type required type of the non-unique bean * @param beanNamesFound the names of all matching beans (as an array) * @since 5.1 */ public NoUniqueBeanDefinitionException(ResolvableType type, String... beanNamesFound) { this(type, Arrays.asList(beanNamesFound)); } /** * Return the number of beans found when only one matching bean was expected. * For a NoUniqueBeanDefinitionException, this will usually be higher than 1. * @see #getBeanType() */ @Override public int getNumberOfBeansFound() { return this.numberOfBeansFound; } /** * Return the names of all beans found when only one matching bean was expected. * Note that this may be {@code null} if not specified at construction time. * @since 4.3 * @see #getBeanType() */ @Nullable public Collection<String> getBeanNamesFound() { return this.beanNamesFound; } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
f0298ef023c926e6242ca6e6c2de37b64b9a8fb1
ab161dcbc79f1902dd7fdc6fd3899435f5927642
/src/main/java/com/buit/his/dic/controller/DicDeviceTypeCtr.java
9fe68e9d87391e58570f183fe58574a90de9c1db
[]
no_license
gfz1103/system
88d7feec0dd84a6c77524f579496520c56901681
b48533c6a5bafe49f22f57c92996dbf53a11a8c7
refs/heads/master
2023-06-27T15:18:51.885391
2021-07-16T09:38:16
2021-07-16T09:38:16
386,574,567
0
0
null
null
null
null
UTF-8
Java
false
false
2,983
java
package com.buit.his.dic.controller; import com.buit.commons.BaseSpringController; import com.buit.commons.PageQuery; import com.buit.his.dic.model.DicDeviceType; import com.buit.his.dic.request.DicDeviceTypeAddReq; import com.buit.his.dic.service.DicDeviceTypeSer; import com.buit.utill.ReturnEntity; import com.buit.utill.ReturnEntityUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import javax.validation.Valid; import java.util.List; /** * @Auther jiangwei * @CreateDate 2021.3.11 */ @Api(tags = "办公设备类型字典") @Controller @RequestMapping("/sys/deviceType") public class DicDeviceTypeCtr extends BaseSpringController { static final Logger logger = LoggerFactory.getLogger(DicDeviceTypeCtr.class); @Autowired private DicDeviceTypeSer dicDeviceTypeSer; @RequestMapping("/queryPage") @ResponseBody @ApiOperationSupport(author = "jiangwei") @ApiOperation(value = "办公设备类型分页条件查询", httpMethod = "POST", notes = "办公设备类型分页条件查询") public ReturnEntity<PageInfo<DicDeviceType>> queryPage( @ApiParam(name = "name", value = "设备名称") @RequestParam(value = "name", required = false) String name, PageQuery page) { DicDeviceType deviceType = new DicDeviceType(); deviceType.setTypeName(name); PageInfo<DicDeviceType> pageInfo = PageHelper.startPage(page.getPageNum(), page.getPageSize()) .doSelectPageInfo(() -> dicDeviceTypeSer.findByEntity(deviceType)); return ReturnEntityUtil.success(pageInfo); } @RequestMapping("/findList") @ResponseBody @ApiOperationSupport(author = "jiangwei") @ApiOperation(value = "办公设备类型列表", httpMethod = "POST", notes = "办公设备类型列表") public ReturnEntity<List<DicDeviceType>> findList() { DicDeviceType query = new DicDeviceType(); return ReturnEntityUtil.success(dicDeviceTypeSer.findByEntity(query)); } @RequestMapping("/add") @ResponseBody @ApiOperationSupport(author = "jiangwei") @ApiOperation(value = "办公设备类型新增", httpMethod = "POST", notes = "办公设备类型新增") public ReturnEntity add(@Valid @RequestBody DicDeviceTypeAddReq req) { dicDeviceTypeSer.save(req); return ReturnEntityUtil.success(); } }
[ "gongfangzhou" ]
gongfangzhou
3241c148d487f87942b0c82105247513bb67b9aa
7e3a7f5d9cd4d98bba4ea68b399fb883d96cd50b
/JavaOOPAdvanced/src/I_ObjectCommAndEvents_Exercise/A_EventImplementation/NameChangeListener.java
89e12c7952ee15f8c69c5a37585f81ec8d11c52e
[]
no_license
ISpectruM/Java-fundamentals
9f51b3658dd55326c4b817d9f62b76d001eb3244
ac3ea51a4edf0ca430f23655a37c3417ac9afb95
refs/heads/master
2021-01-21T11:30:08.901909
2017-05-15T14:09:57
2017-05-15T14:09:57
83,553,470
0
0
null
null
null
null
UTF-8
Java
false
false
150
java
package I_ObjectCommAndEvents_Exercise.A_EventImplementation; public interface NameChangeListener { void handleChangedName(NameChange event); }
[ "ispectrumcode@gmail.com" ]
ispectrumcode@gmail.com
5a37ec7ca995bcd897076282abd86637172ca626
793df459501d0113d6acdd41faf590122a242796
/confu-master/benchmarks/xalan/original_source_from_jdcore/org/apache/bcel/generic/LCMP.java
620d4e5b3b0693fe67c7c59993decec4a4b94233
[ "Apache-2.0" ]
permissive
tsmart-date/nasac-2017-demo
fc9c927eb6cc88e090066fc351b58c74a79d936e
07f2d3107f1b40984ffda9e054fa744becd8c8a3
refs/heads/master
2021-07-15T21:29:42.245245
2017-10-24T14:28:14
2017-10-24T14:28:14
105,340,725
0
1
null
null
null
null
UTF-8
Java
false
false
268
java
package org.apache.bcel.generic; public class LCMP extends Instruction { public LCMP() { super((short)148, (short)1); } public void accept(Visitor v) { v.visitLCMP(this); } }
[ "liuhan0518@gmail.com" ]
liuhan0518@gmail.com
91e8dcc0370f7c5287f034573d3d3234ecfd4355
a0dea239e224b8491fe8571de116b99a530b9b22
/source/src/com/umeng/message/proguard/S.java
db84a58764cfcbf8f3e500767f4e51f1a1faa8b8
[]
no_license
parth12/ProgrammingClubDAIICT
c413efecdce57839abc75602aa727730197c7a90
979b97222efcdf28607146df422772d83d3d5570
refs/heads/master
2021-01-10T05:22:28.079352
2015-12-22T18:40:28
2015-12-22T18:40:28
48,445,901
0
2
null
null
null
null
UTF-8
Java
false
false
5,202
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 com.umeng.message.proguard; // Referenced classes of package com.umeng.message.proguard: // g public final class S { public static class a extends Enum { public static final a a; public static final a b; public static final a c; public static final a d; public static final a e; public static final a f; public static final a g; public static final a h; public static final a i; public static final a j; public static final a k; public static final a l; public static final a m; public static final a n; public static final a o; public static final a p; public static final a q; public static final a r; private static final a u[]; private final b s; private final int t; public static a valueOf(String s1) { return (a)Enum.valueOf(com/umeng/message/proguard/S$a, s1); } public static a[] values() { return (a[])u.clone(); } public b a() { return s; } public int b() { return t; } public boolean c() { return true; } static { a = new a("DOUBLE", 0, b.d, 1); b = new a("FLOAT", 1, b.c, 5); c = new a("INT64", 2, b.b, 0); d = new a("UINT64", 3, b.b, 0); e = new a("INT32", 4, b.a, 0); f = new a("FIXED64", 5, b.b, 1); g = new a("FIXED32", 6, b.a, 5); h = new a("BOOL", 7, b.e, 0); i = new a("STRING", 8, b.f, 2) { public boolean c() { return false; } }; j = new a("GROUP", 9, b.i, 3) { public boolean c() { return false; } }; k = new a("MESSAGE", 10, b.i, 2) { public boolean c() { return false; } }; l = new a("BYTES", 11, b.g, 2) { public boolean c() { return false; } }; m = new a("UINT32", 12, b.a, 0); n = new a("ENUM", 13, b.h, 0); o = new a("SFIXED32", 14, b.a, 5); p = new a("SFIXED64", 15, b.b, 1); q = new a("SINT32", 16, b.a, 0); r = new a("SINT64", 17, b.b, 0); u = (new a[] { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r }); } private a(String s1, int i1, b b1, int j1) { super(s1, i1); s = b1; t = j1; } } public static final class b extends Enum { public static final b a; public static final b b; public static final b c; public static final b d; public static final b e; public static final b f; public static final b g; public static final b h; public static final b i; private static final b k[]; private final Object j; public static b valueOf(String s) { return (b)Enum.valueOf(com/umeng/message/proguard/S$b, s); } public static b[] values() { return (b[])k.clone(); } Object a() { return j; } static { a = new b("INT", 0, Integer.valueOf(0)); b = new b("LONG", 1, Long.valueOf(0L)); c = new b("FLOAT", 2, Float.valueOf(0.0F)); d = new b("DOUBLE", 3, Double.valueOf(0.0D)); e = new b("BOOLEAN", 4, Boolean.valueOf(false)); f = new b("STRING", 5, ""); g = new b("BYTE_STRING", 6, g.d); h = new b("ENUM", 7, null); i = new b("MESSAGE", 8, null); k = (new b[] { a, b, c, d, e, f, g, h, i }); } private b(String s, int i1, Object obj) { super(s, i1); j = obj; } } public static final int a = 0; public static final int b = 1; public static final int c = 2; public static final int d = 3; public static final int e = 4; public static final int f = 5; static final int g = 3; static final int h = 7; static final int i = 1; static final int j = 2; static final int k = 3; static final int l = a(1, 3); static final int m = a(1, 4); static final int n = a(2, 0); static final int o = a(3, 2); private S() { } static int a(int i1) { return i1 & 7; } static int a(int i1, int j1) { return i1 << 3 | j1; } public static int b(int i1) { return i1 >>> 3; } }
[ "parthpanchal12196@gmail.com" ]
parthpanchal12196@gmail.com
cd9b06d8255773f9f59ab0015b00d71829285aa3
b00ed0587027502bf534af738076f135034b27a7
/src/main/java/com/github/davidmoten/rx/jdbc/QueryUpdateOperatorFromObservable.java
6f7ae7362aa082f03a319a5d1cfa991e03d285cd
[ "Apache-2.0" ]
permissive
archie2010/rxjava-jdbc
3a0436719115b96423781165563358aa813112c2
0b2be746f19c81830b62573d465102730fb6fa42
refs/heads/master
2021-01-19T10:00:52.208998
2015-10-24T06:51:30
2015-10-24T06:51:30
44,949,448
1
0
null
2015-10-26T06:10:35
2015-10-26T06:10:34
null
UTF-8
Java
false
false
1,502
java
package com.github.davidmoten.rx.jdbc; import rx.Observable; import rx.Observable.Operator; import rx.Subscriber; import rx.functions.Func1; import com.github.davidmoten.rx.RxUtil; /** * {@link Operator} corresonding to {@link QueryUpdateOperation}. */ class QueryUpdateOperatorFromObservable<R> implements Operator<Observable<Integer>, Observable<R>> { private final Operator<Observable<Integer>, Observable<R>> operator; /** * Constructor. * * @param builder * @param operatorType */ QueryUpdateOperatorFromObservable(final QueryUpdate.Builder builder) { operator = RxUtil.toOperator( new Func1<Observable<Observable<R>>, Observable<Observable<Integer>>>() { @Override public Observable<Observable<Integer>> call( Observable<Observable<R>> observable) { return observable.map(new Func1<Observable<R>, Observable<Integer>>() { @Override public Observable<Integer> call(Observable<R> parameters) { return builder.clearParameters().parameters(parameters).count(); } }); } }); } @Override public Subscriber<? super Observable<R>> call( Subscriber<? super Observable<Integer>> subscriber) { return operator.call(subscriber); } }
[ "davidmoten@gmail.com" ]
davidmoten@gmail.com
0926badc30a158c9d3fbe5683a2b7f6af8a2424b
3e32c6bd71577217b4b5db4890d314dfd17d6593
/hcms-core/src/main/java/com/abminvestama/hcms/core/service/impl/business/command/IT0002CommandServiceImpl.java
176f47dbb43609c4c37e914bb956b3665e3fd66d
[]
no_license
yauritux/hcms-api
d6e7fd3ac450a170c8065cda6c76224a4ce3c404
2e4538e9bc6f4dde70d894295197c00c9c82fe00
refs/heads/master
2021-01-10T01:15:00.935233
2016-02-03T07:09:54
2016-02-03T07:09:54
50,981,095
0
0
null
null
null
null
UTF-8
Java
false
false
2,182
java
package com.abminvestama.hcms.core.service.impl.business.command; import java.util.Optional; import javax.validation.ConstraintViolationException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import com.abminvestama.hcms.core.exception.CannotPersistException; import com.abminvestama.hcms.core.model.entity.IT0002; import com.abminvestama.hcms.core.model.entity.User; import com.abminvestama.hcms.core.repository.IT0002Repository; import com.abminvestama.hcms.core.service.api.business.command.IT0002CommandService; /** * * @author yauri (yauritux@gmail.com) * @version 1.0.0 * @since 1.0.0 * */ @Service("it0002CommandService") @Transactional(readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class IT0002CommandServiceImpl implements IT0002CommandService { private IT0002Repository it0002Repository; @Autowired IT0002CommandServiceImpl(IT0002Repository it0002Repository) { this.it0002Repository = it0002Repository; } @Override public Optional<IT0002> save(IT0002 entity, User user) throws CannotPersistException, NoSuchMethodException, ConstraintViolationException { if (user != null) { entity.setUname(user.getId()); } try { return Optional.ofNullable(it0002Repository.save(entity)); } catch (Exception e) { throw new CannotPersistException("Cannot persist IT0002 (Personal Information).Reason=" + e.getMessage()); } } @Override public boolean delete(IT0002 entity, User user) throws NoSuchMethodException, ConstraintViolationException { // no delete at this version. throw new NoSuchMethodException("There's no deletion on this version. Please consult to your Consultant."); } @Override public boolean restore(IT0002 entity, User user) throws NoSuchMethodException, ConstraintViolationException { // since we don't have delete operation, then we don't need the 'restore' as well throw new NoSuchMethodException("Invalid Operation. Please consult to your Consultant."); } }
[ "yauritux@gmail.com" ]
yauritux@gmail.com
fb4440c363423c09596d20723cd31ffac1d177a0
2c7bbc8139c4695180852ed29b229bb5a0f038d7
/com/google/android/gms/common/zzc$zzai.java
7ba134116f476c8f56b2f55c80a0c78aac4ad602
[]
no_license
suliyu/evolucionNetflix
6126cae17d1f7ea0bc769ee4669e64f3792cdd2f
ac767b81e72ca5ad636ec0d471595bca7331384a
refs/heads/master
2020-04-27T05:55:47.314928
2017-05-08T17:08:22
2017-05-08T17:08:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
472
java
// // Decompiled by Procyon v0.5.30 // package com.google.android.gms.common; final class zzc$zzai { static final zzc$zza[] zzaak; static { zzaak = new zzc$zza[] { new zzc$zzai$1(zzc$zza.zzbX("0\u0082\u0003½0\u0082\u0002¥ \u0003\u0002\u0001\u0002\u0002\t\u0000\u00ad\u00c8Y\u00cd\u001f¹\b(0")), new zzc$zzai$2(zzc$zza.zzbX("0\u0082\u0003½0\u0082\u0002¥ \u0003\u0002\u0001\u0002\u0002\t\u0000\u0098\u00f4\u0085\u00f7+ 5\u009d0")) }; } }
[ "sy.velasquez10@uniandes.edu.co" ]
sy.velasquez10@uniandes.edu.co
7138285b8eefdc801ed6920f1804e239893cf6aa
25181b803a6da5fa748bc8ec353cd2f3a3a836ed
/clientAndServer/circle/model/model-common/java/g/model/admin/so/BetLimitUserGroupMultipleSo.java
0a437181bee5674c5504355619fa012680f41ab1
[]
no_license
primary10/bullCard
991ed8619cac7a75fa56ce8cb6879f6c0bba2d62
39f4e36624a692b8fb6d991b791e0e2e9e8d7722
refs/heads/master
2022-11-08T02:20:57.135154
2019-10-12T01:15:52
2019-10-12T01:15:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
484
java
package g.model.admin.so; import g.model.admin.po.BetLimitUserGroupMultiple; /** * 用户组与综合投注限额关系表查询对象 * * @author tom * @time 2016-4-20 11:43:03 */ //region your codes 1 public class BetLimitUserGroupMultipleSo extends BetLimitUserGroupMultiple { //endregion your codes 1 //region your codes 3 private static final long serialVersionUID = -3354944139975959610L; //endregion your codes 3 //region your codes 2 //endregion your codes 2 }
[ "1406733029@qq.com" ]
1406733029@qq.com
e326024bed2594fd68e28fc7be9d7a652e24ba49
18ff500be79ac689bd8523ff992ff8e7769379c7
/actors/buffs/Roots.java
451c6b7ee2a5e744a8cfd4e5e576162bdc3af95a
[]
no_license
Mochiee/deep-pixel-dungeon
457894e5eeaed7dbb58b884317d5786adae7d107
d85ea5047f6914d56279a1e7ddb33c0f524c8300
refs/heads/master
2020-06-25T22:02:02.310604
2017-07-12T09:46:37
2017-07-12T09:46:37
96,987,477
1
0
null
null
null
null
UTF-8
Java
false
false
1,646
java
/* * Pixel Dungeon * Copyright (C) 2012-2015 Oleg Dolya * * Shattered Pixel Dungeon * Copyright (C) 2014-2016 Evan Debenham * * 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 com.mochi.deeppixeldungeon.buffs; import com.mochi.deeppixeldungeon.actors.Char; import com.mochi.deeppixeldungeon.messages.Messages; import com.mochi.deeppixeldungeon.ui.BuffIndicator; public class Roots extends FlavourBuff { { type = buffType.NEGATIVE; } @Override public boolean attachTo( Char target ) { if (!target.flying && super.attachTo( target )) { target.rooted = true; return true; } else { return false; } } @Override public void detach() { target.rooted = false; super.detach(); } @Override public int icon() { return BuffIndicator.ROOTS; } @Override public String toString() { return Messages.get(this, "name"); } @Override public String heroMessage() { return Messages.get(this, "heromsg"); } @Override public String desc() { return Messages.get(this, "desc", dispTurns()); } }
[ "keithloh1004@gmail.com" ]
keithloh1004@gmail.com
f0ccc7afee9f23a133b71ed3dabb1ead4b9850a1
c156bf50086becbca180f9c1c9fbfcef7f5dc42c
/src/main/java/com/waterelephant/sxyDrainage/service/BwJdqDeviceInfoService.java
e8737bfd12d337972b430d8bb5b7e7fea8af72db
[]
no_license
zhanght86/beadwalletloanapp
9e3def26370efd327dade99694006a6e8b18a48f
66d0ae7b0861f40a75b8228e3a3b67009a1cf7b8
refs/heads/master
2020-12-02T15:01:55.982023
2019-11-20T09:27:24
2019-11-20T09:27:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
374
java
//package com.waterelephant.sxyDrainage.service; // //import com.waterelephant.sxyDrainage.entity.jdq.DeviceInfo; // ///** // * 设备信息 // * // * @author xanthuim // */ //public interface BwJdqDeviceInfoService { // // /** // * 保存或更新设备信息 // * // * @param data // * @return // */ // Integer saveOrUpdate(DeviceInfo data); //}
[ "wurenbiao@beadwallet.com" ]
wurenbiao@beadwallet.com
62b0ab31ea70347eecf5d21ff43cc1d8bddf6407
b327a374de29f80d9b2b3841db73f3a6a30e5f0d
/out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/main_files/dot/junit/opcodes/invoke_static_range/Main_testVFE13.java
5167f460f5fdaed1e8516132b69c7afa950245f1
[]
no_license
nikoltu/aosp
6409c386ed6d94c15d985dd5be2c522fefea6267
f99d40c9d13bda30231fb1ac03258b6b6267c496
refs/heads/master
2021-01-22T09:26:24.152070
2011-09-27T15:10:30
2011-09-27T15:10:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
552
java
//autogenerated by util.build.BuildDalvikSuite, do not change package dot.junit.opcodes.invoke_static_range; import dot.junit.opcodes.invoke_static_range.d.*; import dot.junit.*; public class Main_testVFE13 extends DxAbstractMain { public static void main(String[] args) throws Exception { try { Class.forName("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_16"); fail("expected a verification exception"); } catch (Throwable t) { DxUtil.checkVerifyException(t); } } }
[ "fred.faust@gmail.com" ]
fred.faust@gmail.com
44d6f0c1dcfe7b2c521736718390f8be37a09e4e
689cdf772da9f871beee7099ab21cd244005bfb2
/classes/com/android/dazhihui/ui/delegate/screen/otc/k.java
7a47ac3ad21984a959f54fab54eb930cde31258b
[]
no_license
waterwitness/dazhihui
9353fd5e22821cb5026921ce22d02ca53af381dc
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
refs/heads/master
2020-05-29T08:54:50.751842
2016-10-08T08:09:46
2016-10-08T08:09:46
70,314,359
2
4
null
null
null
null
UTF-8
Java
false
false
568
java
package com.android.dazhihui.ui.delegate.screen.otc; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; class k implements DialogInterface.OnClickListener { k(OtcEntrust paramOtcEntrust) {} public void onClick(DialogInterface paramDialogInterface, int paramInt) { OtcEntrust.n(this.a); OtcEntrust.b(this.a); } } /* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\android\dazhihui\ui\delegate\screen\otc\k.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
7fb840098b6e8fabebbeed39cfc81962011a8471
d531fc55b08a0cd0f71ff9b831cfcc50d26d4e15
/java/org/hl7/fhir/MedicationContent.java
5242687871d231c7a38cf79d0451d5ecb50ef3eb
[]
no_license
threadedblue/fhir.emf
f2abc3d0ccce6dcd5372874bf1664113d77d3fad
82231e9ce9ec559013b9dc242766b0f5b4efde13
refs/heads/master
2021-12-04T08:42:31.542708
2021-08-31T14:55:13
2021-08-31T14:55:13
104,352,691
0
0
null
null
null
null
UTF-8
Java
false
false
3,999
java
/** */ package org.hl7.fhir; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Medication Content</b></em>'. * <!-- end-user-doc --> * * <!-- begin-model-doc --> * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication. * <!-- end-model-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link org.hl7.fhir.MedicationContent#getItemCodeableConcept <em>Item Codeable Concept</em>}</li> * <li>{@link org.hl7.fhir.MedicationContent#getItemReference <em>Item Reference</em>}</li> * <li>{@link org.hl7.fhir.MedicationContent#getAmount <em>Amount</em>}</li> * </ul> * * @see org.hl7.fhir.FhirPackage#getMedicationContent() * @model extendedMetaData="name='Medication.Content' kind='elementOnly'" * @generated */ public interface MedicationContent extends BackboneElement { /** * Returns the value of the '<em><b>Item Codeable Concept</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Identifies one of the items in the package. (choose any one of item*, but only one) * <!-- end-model-doc --> * @return the value of the '<em>Item Codeable Concept</em>' containment reference. * @see #setItemCodeableConcept(CodeableConcept) * @see org.hl7.fhir.FhirPackage#getMedicationContent_ItemCodeableConcept() * @model containment="true" * extendedMetaData="kind='element' name='itemCodeableConcept' namespace='##targetNamespace'" * @generated */ CodeableConcept getItemCodeableConcept(); /** * Sets the value of the '{@link org.hl7.fhir.MedicationContent#getItemCodeableConcept <em>Item Codeable Concept</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Item Codeable Concept</em>' containment reference. * @see #getItemCodeableConcept() * @generated */ void setItemCodeableConcept(CodeableConcept value); /** * Returns the value of the '<em><b>Item Reference</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Identifies one of the items in the package. (choose any one of item*, but only one) * <!-- end-model-doc --> * @return the value of the '<em>Item Reference</em>' containment reference. * @see #setItemReference(Reference) * @see org.hl7.fhir.FhirPackage#getMedicationContent_ItemReference() * @model containment="true" * extendedMetaData="kind='element' name='itemReference' namespace='##targetNamespace'" * @generated */ Reference getItemReference(); /** * Sets the value of the '{@link org.hl7.fhir.MedicationContent#getItemReference <em>Item Reference</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Item Reference</em>' containment reference. * @see #getItemReference() * @generated */ void setItemReference(Reference value); /** * Returns the value of the '<em><b>Amount</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * The amount of the product that is in the package. * <!-- end-model-doc --> * @return the value of the '<em>Amount</em>' containment reference. * @see #setAmount(Quantity) * @see org.hl7.fhir.FhirPackage#getMedicationContent_Amount() * @model containment="true" * extendedMetaData="kind='element' name='amount' namespace='##targetNamespace'" * @generated */ Quantity getAmount(); /** * Sets the value of the '{@link org.hl7.fhir.MedicationContent#getAmount <em>Amount</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Amount</em>' containment reference. * @see #getAmount() * @generated */ void setAmount(Quantity value); } // MedicationContent
[ "roberts_geoffry@bah.com" ]
roberts_geoffry@bah.com
b93e34568c03f1c1a6af20fc501eab9f61b41273
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
/DecompiledViberSrc/app/src/main/java/com/viber/voip/g/a/a/bq.java
5847a5d94737174d571ce3ea430e1c91b517166f
[]
no_license
cga2351/code
703f5d49dc3be45eafc4521e931f8d9d270e8a92
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
refs/heads/master
2021-07-08T15:11:06.299852
2021-05-06T13:22:21
2021-05-06T13:22:21
60,314,071
1
3
null
null
null
null
UTF-8
Java
false
false
529
java
package com.viber.voip.g.a.a; import com.viber.voip.messages.ui.forward.sharelink.ShareLinkActivity; import dagger.android.b; import dagger.android.b.a; public abstract class bq { public static abstract interface a extends b<ShareLinkActivity> { public static abstract class a extends b.a<ShareLinkActivity> { } } } /* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_3_dex2jar.jar * Qualified Name: com.viber.voip.g.a.a.bq * JD-Core Version: 0.6.2 */
[ "yu.liang@navercorp.com" ]
yu.liang@navercorp.com
ee4ca7a9360f7d853db75ed7d4123da4281f807b
84f57a43b7fdb93d7a8a863e1164df44bf54c69e
/apache/cxf/cxf-openaz/src/test/java/org/apache/coheigea/cxf/openaz/common/SamlRoleCallbackHandler.java
97d8e33327c91f28549fdd9463e71d7b2c7b7481
[]
no_license
git4ajay/testcases
513a0d5b71ca5487419d3087f392dfb882e8d286
282b103393eed74a75df58c487dfc54d05dedf47
refs/heads/master
2021-01-24T03:08:09.583144
2015-08-11T10:21:41
2015-08-11T10:21:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,391
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.coheigea.cxf.openaz.common; import java.io.IOException; import java.security.cert.X509Certificate; import java.util.Collections; import javax.security.auth.callback.Callback; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.UnsupportedCallbackException; import org.apache.wss4j.common.crypto.Crypto; import org.apache.wss4j.common.crypto.CryptoFactory; import org.apache.wss4j.common.crypto.CryptoType; import org.apache.wss4j.common.saml.SAMLCallback; import org.apache.wss4j.common.saml.bean.AttributeBean; import org.apache.wss4j.common.saml.bean.AttributeStatementBean; import org.apache.wss4j.common.saml.bean.KeyInfoBean; import org.apache.wss4j.common.saml.bean.KeyInfoBean.CERT_IDENTIFIER; import org.apache.wss4j.common.saml.bean.SubjectBean; import org.apache.wss4j.common.saml.bean.Version; import org.apache.wss4j.common.saml.builder.SAML1Constants; import org.apache.wss4j.common.saml.builder.SAML2Constants; /** * A CallbackHandler instance that is used by the STS to mock up a SAML Attribute Assertion. */ public class SamlRoleCallbackHandler implements CallbackHandler { private static final String ROLE_URI = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role"; private boolean saml2 = true; private String confirmationMethod = SAML2Constants.CONF_BEARER; private CERT_IDENTIFIER keyInfoIdentifier = CERT_IDENTIFIER.X509_CERT; private String roleName; private boolean signAssertion; private String cryptoAlias = "myclientkey"; private String cryptoPassword = "ckpass"; private String cryptoPropertiesFile = "clientKeystore.properties"; public SamlRoleCallbackHandler() { // } public SamlRoleCallbackHandler(boolean saml2) { this.saml2 = saml2; } public void setConfirmationMethod(String confirmationMethod) { this.confirmationMethod = confirmationMethod; } public void setKeyInfoIdentifier(CERT_IDENTIFIER keyInfoIdentifier) { this.keyInfoIdentifier = keyInfoIdentifier; } public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { if (callbacks[i] instanceof SAMLCallback) { SAMLCallback callback = (SAMLCallback) callbacks[i]; if (saml2) { callback.setSamlVersion(Version.SAML_20); } else { callback.setSamlVersion(Version.SAML_11); } callback.setIssuer("sts"); String subjectName = "uid=sts-client,o=mock-sts.com"; String subjectQualifier = "www.mock-sts.com"; if (!saml2 && SAML2Constants.CONF_SENDER_VOUCHES.equals(confirmationMethod)) { confirmationMethod = SAML1Constants.CONF_SENDER_VOUCHES; } SubjectBean subjectBean = new SubjectBean( subjectName, subjectQualifier, confirmationMethod ); if (SAML2Constants.CONF_HOLDER_KEY.equals(confirmationMethod) || SAML1Constants.CONF_HOLDER_KEY.equals(confirmationMethod)) { try { KeyInfoBean keyInfo = createKeyInfo(); subjectBean.setKeyInfo(keyInfo); } catch (Exception ex) { throw new IOException("Problem creating KeyInfo: " + ex.getMessage()); } } callback.setSubject(subjectBean); AttributeStatementBean attrBean = new AttributeStatementBean(); attrBean.setSubject(subjectBean); AttributeBean attributeBean = new AttributeBean(); attributeBean.setNameFormat(SAML2Constants.ATTRNAME_FORMAT_UNSPECIFIED); if (saml2) { attributeBean.setQualifiedName(ROLE_URI); attributeBean.setNameFormat(SAML2Constants.ATTRNAME_FORMAT_UNSPECIFIED); } else { String uri = ROLE_URI.toString(); int lastSlash = uri.lastIndexOf("/"); if (lastSlash == (uri.length() - 1)) { uri = uri.substring(0, lastSlash); lastSlash = uri.lastIndexOf("/"); } String namespace = uri.substring(0, lastSlash); String name = uri.substring(lastSlash + 1, uri.length()); attributeBean.setSimpleName(name); attributeBean.setQualifiedName(namespace); } attributeBean.addAttributeValue(roleName); attrBean.setSamlAttributes(Collections.singletonList(attributeBean)); callback.setAttributeStatementData(Collections.singletonList(attrBean)); try { Crypto crypto = CryptoFactory.getInstance(cryptoPropertiesFile); callback.setIssuerCrypto(crypto); callback.setIssuerKeyName(cryptoAlias); callback.setIssuerKeyPassword(cryptoPassword); callback.setSignAssertion(signAssertion); } catch (Exception ex) { throw new IOException("Problem creating KeyInfo: " + ex.getMessage()); } } } } protected KeyInfoBean createKeyInfo() throws Exception { Crypto crypto = CryptoFactory.getInstance("clientKeystore.properties"); CryptoType cryptoType = new CryptoType(CryptoType.TYPE.ALIAS); cryptoType.setAlias("myclientkey"); X509Certificate[] certs = crypto.getX509Certificates(cryptoType); KeyInfoBean keyInfo = new KeyInfoBean(); keyInfo.setCertIdentifer(keyInfoIdentifier); if (keyInfoIdentifier == CERT_IDENTIFIER.X509_CERT) { keyInfo.setCertificate(certs[0]); } else if (keyInfoIdentifier == CERT_IDENTIFIER.KEY_VALUE) { keyInfo.setPublicKey(certs[0].getPublicKey()); } return keyInfo; } public String getRoleName() { return roleName; } public void setRoleName(String roleName) { this.roleName = roleName; } public void setSignAssertion(boolean signAssertion) { this.signAssertion = signAssertion; } }
[ "coheigea@apache.org" ]
coheigea@apache.org
f914e729257128e8c3a2962a7c416f91036c62a2
a868f8a41c48e9359fde890a521e9ed6d2ba611a
/MngJsl_1/app/src/main/java/com/jsw/MngProductDatabase/Adapter/ProductAdapter.java
b91fef096484992023a411a320420339edc2a7b8
[ "Apache-2.0" ]
permissive
JMedinilla/deint_ManageProducts
dea066dec3e7d68c7e9bdf36a714ecb7e8e8ba20
a91dfcfc4fdb652022f2601c4d7c26a2bc1fffca
refs/heads/master
2021-01-11T09:17:34.416680
2017-02-10T12:57:57
2017-02-10T12:57:57
77,189,503
0
0
null
null
null
null
UTF-8
Java
false
false
4,046
java
package com.jsw.MngProductDatabase.Adapter; /* * Copyright (c) 2016 José Luis del Pino Gallardo. * * 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. * * jose.gallardo994@gmail.com */ import android.content.Context; import android.support.annotation.NonNull; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; import com.jsw.MngProductDatabase.Model.Product; import com.jsw.MngProductDatabase.R; import com.jsw.MngProductDatabase.database.DatabaseManager; import com.squareup.picasso.Picasso; import java.io.Serializable; import java.util.Collections; public class ProductAdapter extends ArrayAdapter<Product> implements Serializable { private Context contexto; private boolean ASC = true; public ProductAdapter(Context context) { //Cuando aqui ponemos un tercer parametro, teneos que entener que el array interno es igual a este. //Por eso cuando hacia un clear se borraba el del DAO. //Para evitarlo o le hacemos un new ArayList (Lourdes) o a this le hacemos un addAll (Yo) super(context, R.layout.item_product); this.contexto = context; this.addAll(DatabaseManager.getInstance().getAllProducts()); refreshView(); } @NonNull @Override public View getView(int position, View convertView, ViewGroup parent) { View item = convertView; ProductHolder p; if (convertView == null){ LayoutInflater inflater = LayoutInflater.from(contexto); item = inflater.inflate(R.layout.item_product, null); p = new ProductHolder(); p.img = (ImageView)item.findViewById(R.id.iv_img); p.name = (TextView)item.findViewById(R.id.tv_nombre); p.stock = (TextView)item.findViewById(R.id.tv_stock); p.precio = (TextView)item.findViewById(R.id.tv_precio); item.setTag(p); }else p = (ProductHolder) item.getTag(); Picasso.with(contexto).load(getItem(position).getImage()).into(p.img); p.name.setText(getItem(position).getName()); p.stock.setText(String.valueOf(getItem(position).getStock())); p.precio.setText(String.valueOf(getItem(position).getPrice())); return item; } public void sortAlphabetically(){ ASC = !ASC; if(ASC) sort(Product.NAME_COMPARATOR); else sort(Collections.reverseOrder()); notifyDataSetChanged(); } public void addProduct(Product product){ add(product); refreshView(); } public void removeProduct(Product product){ remove(product); refreshView(); notifyDataSetChanged(); } public void updateListProduct(){ this.clear(); this.addAll(DatabaseManager.getInstance().getAllProducts()); refreshView(); } private void hideList(boolean hide){ } public void addAt(Product product, int position){ insert(product, position); notifyDataSetChanged(); refreshView(); } public void deleteProduct(Product product){ remove(product); notifyDataSetChanged(); refreshView(); } private void refreshView(){ ASC = !ASC; sortAlphabetically(); } class ProductHolder{ ImageView img; TextView name; TextView stock; TextView precio; } }
[ "javimedinilla@gmail.com" ]
javimedinilla@gmail.com