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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
013b8a7fad3850f714f1acf060c7cb4cce780aaf
|
4c6adf0ce6ef3f02dcef9c345e0e5e4ff139d886
|
/Core/fi-webgate/src/main/java/com/pay/gateway/validate/crosspay/rule/ReturnUrlCheckRule.java
|
f0e594e7b650adde3ff7bb3af13676e884dce0ea
|
[] |
no_license
|
happyjianguo/pay-1
|
8631906be62707316f0ed3eb6b2337c90d213bc0
|
40ae79738cfe4e5d199ca66468f3a33e9d8f2007
|
refs/heads/master
| 2020-07-27T19:51:54.958859
| 2016-12-19T07:34:24
| 2016-12-19T07:34:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,227
|
java
|
package com.pay.gateway.validate.crosspay.rule;
import com.pay.fi.commons.TradeTypeEnum;
import com.pay.gateway.dto.CrosspayRequest;
import com.pay.gateway.dto.CrosspayResponse;
import com.pay.inf.rule.MessageRule;
import com.pay.util.StringUtil;
public class ReturnUrlCheckRule extends MessageRule {
/*
* (non-Javadoc)
*
* @see com.pay.ruleengine.AbstractRule#makeDecision(java.lang.Object)
*/
@Override
protected boolean makeDecision(Object validateBean) throws Exception {
CrosspayRequest crosspayApiRequest = (CrosspayRequest) validateBean;
CrosspayResponse crosspayApiResponse = crosspayApiRequest.getCrosspayResponse();
String returnUrl = crosspayApiRequest.getReturnUrl();
String tradeType = crosspayApiRequest.getTradeType();
if(TradeTypeEnum.REALTIME_CASH.getCode().equals(tradeType)){
if(StringUtil.isEmpty(returnUrl)) {
crosspayApiResponse.setResultCode(getMessageId());
crosspayApiResponse.setResultMsg(getMessage());//商户回调地址为空
return false;
}else{
if(returnUrl.trim().length()>256) {
crosspayApiResponse.setResultCode(getMessageId());
crosspayApiResponse.setResultMsg(getMessage());
return false;
}
}
}
return true;
}
}
|
[
"stanley.zou@hrocloud.com"
] |
stanley.zou@hrocloud.com
|
da50d2b25ad1ba500620eb134f230b6326dc99f0
|
fba8af31d5d36d8a6cf0c341faed98b6cd5ec0cb
|
/src/main/java/com/alipay/api/response/AlipaySecurityRiskAuthenticationQueryResponse.java
|
eaee47538ceceb1b0dc67e331282bb51b5fb6ef9
|
[
"Apache-2.0"
] |
permissive
|
planesweep/alipay-sdk-java-all
|
b60ea1437e3377582bd08c61f942018891ce7762
|
637edbcc5ed137c2b55064521f24b675c3080e37
|
refs/heads/master
| 2020-12-12T09:23:19.133661
| 2020-01-09T11:04:31
| 2020-01-09T11:04:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 698
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.security.risk.authentication.query response.
*
* @author auto create
* @since 1.0, 2019-06-28 15:19:58
*/
public class AlipaySecurityRiskAuthenticationQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 3757269447329382333L;
/**
* 身份安全业务相关查询业务信息
*/
@ApiField("biz_result")
private String bizResult;
public void setBizResult(String bizResult) {
this.bizResult = bizResult;
}
public String getBizResult( ) {
return this.bizResult;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
4d90eb64b5e2624e6770aaabbe15a0e3066f41d8
|
4332dd4c50894ffe77c2fd8d75f727abfa3697fc
|
/src/com/akjava/gwt/gthapetest/client/cardemo/SwingDoor.java
|
c57eeda5f3c994c8e72e5d218ed9c910282d0122
|
[
"MIT"
] |
permissive
|
akjava/gthape
|
9cadcc776a5b3723a55ec22bf49cce6013acc10f
|
2538a704d8e69a9999dcc1b21854770c518574f3
|
refs/heads/master
| 2021-01-01T15:58:58.073657
| 2014-01-14T07:08:46
| 2014-01-14T07:08:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,482
|
java
|
package com.akjava.gwt.gthapetest.client.cardemo;
import com.akjava.gwt.gthape.client.ape.CircleParticle;
import com.akjava.gwt.gthape.client.ape.Group;
import com.akjava.gwt.gthape.client.ape.RectangleParticle;
import com.akjava.gwt.gthape.client.ape.SpringConstraint;
public class SwingDoor extends Group{
public SwingDoor(){
super(false);
collideInternal ( true );
CircleParticle swingDoorP1 = new CircleParticle( 543,55,7, false, 1, 0.3, 0);
swingDoorP1.mass ( 0.001 );
addParticle(swingDoorP1);
CircleParticle swingDoorP2 = new CircleParticle( 620,55,7,true, 1, 0.3, 0);
addParticle(swingDoorP2);
SpringConstraint swingDoor = new SpringConstraint( swingDoorP1, swingDoorP2, 1, true, 13, 1, false);
addConstraint(swingDoor);
CircleParticle swingDoorAnchor = new CircleParticle( 543,5,2,true, 1, 0.3, 0);
swingDoorAnchor.visible ( false );
swingDoorAnchor.collidable ( false );
addParticle(swingDoorAnchor);
SpringConstraint swingDoorSpring = new SpringConstraint( swingDoorP1, swingDoorAnchor, 0.02, false, 1, 1, false);
swingDoorSpring.restLength ( 40 );
swingDoorSpring.visible ( false );
addConstraint(swingDoorSpring);
CircleParticle stopperA = new CircleParticle( 550,-60,70,true, 1, 0.3, 0);
stopperA.visible ( false );
addParticle(stopperA);
RectangleParticle stopperB = new RectangleParticle( 650,130,42,70,0,true, 1, 0.3, 0);
stopperB.visible ( false );
addParticle(stopperB);
}
}
|
[
"aki@xps"
] |
aki@xps
|
6cbd2ed521898d3c37df8dd2241073137d799101
|
f6539477076aad7a37a18915531f6cae701d0484
|
/java/config/config-service-client/src/main/java/org/nhind/config/provider/DefaultRESTServiceProvider.java
|
ade378d2aa77b3d12a2a6a6b6b9daec509e4cabc
|
[] |
no_license
|
ssavarala/nhin-d
|
bf3a4f4773479875972fb52f4b3aae434d7665f8
|
4208b12ba138d50c25d80849585d4b18dd5df491
|
refs/heads/master
| 2020-05-29T11:40:19.748872
| 2016-09-15T18:45:34
| 2016-09-15T18:45:34
| 67,622,081
| 1
| 1
| null | 2016-09-07T15:56:12
| 2016-09-07T15:56:12
| null |
UTF-8
|
Java
| false
| false
| 2,796
|
java
|
package org.nhind.config.provider;
import java.lang.reflect.Constructor;
import org.apache.http.client.HttpClient;
import org.nhindirect.common.rest.AbstractSecuredService;
import org.nhindirect.common.rest.HttpClientFactory;
import org.nhindirect.common.rest.ServiceSecurityManager;
import com.google.inject.Provider;
public class DefaultRESTServiceProvider<T> implements Provider<T>
{
protected final String serviceURL;
protected final HttpClient client;
protected final ServiceSecurityManager securityManager;
protected final Class<? extends AbstractSecuredService> clazz;
protected static ServiceSecurityManager getInitiziedSecurityManager(Provider<ServiceSecurityManager> securityManagerProvider)
{
final ServiceSecurityManager retVal = securityManagerProvider.get();
retVal.init();
return retVal;
}
public DefaultRESTServiceProvider(String serviceURL, Provider<ServiceSecurityManager> securityManagerProvider, Class<? extends AbstractSecuredService> clazz)
{
this(serviceURL, HttpClientFactory.createHttpClient(), getInitiziedSecurityManager(securityManagerProvider), clazz);
}
public DefaultRESTServiceProvider(String serviceURL, ServiceSecurityManager securityManager, Class<? extends AbstractSecuredService> clazz)
{
this(serviceURL, HttpClientFactory.createHttpClient(), securityManager, clazz);
}
@SuppressWarnings("static-access")
public DefaultRESTServiceProvider(String serviceURL, HttpClientFactory factory, Provider<ServiceSecurityManager> securityManagerProvider,
Class<? extends AbstractSecuredService> clazz)
{
this(serviceURL, factory.createHttpClient(), getInitiziedSecurityManager(securityManagerProvider), clazz);
}
@SuppressWarnings("static-access")
public DefaultRESTServiceProvider(String serviceURL, HttpClientFactory factory, ServiceSecurityManager securityManager,
Class<? extends AbstractSecuredService> clazz)
{
this(serviceURL, factory.createHttpClient(), securityManager, clazz);
}
public DefaultRESTServiceProvider(String serviceURL, HttpClient client, ServiceSecurityManager securityManager,
Class<? extends AbstractSecuredService> clazz)
{
this.serviceURL = serviceURL;
this.client = client;
this.securityManager = securityManager;
this.clazz = clazz;
}
@SuppressWarnings("unchecked")
@Override
public T get()
{
AbstractSecuredService retVal = null;
try
{
final Constructor<?> ctr = clazz.getDeclaredConstructor(String.class, HttpClient.class, ServiceSecurityManager.class);
retVal = (AbstractSecuredService)ctr.newInstance(serviceURL, client, securityManager);
}
catch (Exception e)
{
throw new IllegalStateException("REST service provider is not configured correctly.");
}
return (T)retVal;
}
}
|
[
"marcusm@localhost"
] |
marcusm@localhost
|
56e71bff9cdc9fd188425109f3d9f2aac9138b7c
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/neo4j/2018/4/DbStructureVisitor.java
|
5b5fc716bb9120a335ef8a890e45a56074ac9d9e
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 2,274
|
java
|
/*
* Copyright (c) 2002-2018 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.impl.util.dbstructure;
import org.neo4j.kernel.api.schema.constaints.NodeExistenceConstraintDescriptor;
import org.neo4j.kernel.api.schema.constaints.NodeKeyConstraintDescriptor;
import org.neo4j.kernel.api.schema.constaints.RelExistenceConstraintDescriptor;
import org.neo4j.kernel.api.schema.constaints.UniquenessConstraintDescriptor;
import org.neo4j.kernel.api.schema.index.SchemaIndexDescriptor;
public interface DbStructureVisitor
{
void visitLabel( int labelId, String labelName );
void visitPropertyKey( int propertyKeyId, String propertyKeyName );
void visitRelationshipType( int relTypeId, String relTypeName );
void visitIndex( SchemaIndexDescriptor descriptor, String userDescription, double uniqueValuesPercentage, long size );
void visitUniqueConstraint( UniquenessConstraintDescriptor constraint, String userDescription );
void visitNodePropertyExistenceConstraint( NodeExistenceConstraintDescriptor constraint, String userDescription );
void visitRelationshipPropertyExistenceConstraint( RelExistenceConstraintDescriptor constraint,
String userDescription );
void visitNodeKeyConstraint( NodeKeyConstraintDescriptor constraint, String userDescription );
void visitAllNodesCount( long nodeCount );
void visitNodeCount( int labelId, String labelName, long nodeCount );
void visitRelCount( int startLabelId, int relTypeId, int endLabelId, String relCountQuery, long relCount );
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
a248dbb2a9c6c07337d00fdaf2c978f02cf7d9cf
|
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
|
/schemaOrgGson/src/org/kyojo/schemaOrg/m3n3/gson/core/clazz/ChildCareDeserializer.java
|
3a385e2ae0db0b29fd6bd8b636459d4c457398f0
|
[
"Apache-2.0"
] |
permissive
|
nagaikenshin/schemaOrg
|
3dec1626781913930da5585884e3484e0b525aea
|
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
|
refs/heads/master
| 2021-06-25T04:52:49.995840
| 2019-05-12T06:22:37
| 2019-05-12T06:22:37
| 134,319,974
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,044
|
java
|
package org.kyojo.schemaorg.m3n3.gson.core.clazz;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
import org.kyojo.gson.JsonDeserializationContext;
import org.kyojo.gson.JsonDeserializer;
import org.kyojo.gson.JsonElement;
import org.kyojo.gson.JsonObject;
import org.kyojo.gson.JsonParseException;
import org.kyojo.gson.reflect.TypeToken;
import org.kyojo.schemaorg.m3n3.core.impl.CHILD_CARE;
import org.kyojo.schemaorg.m3n3.core.Clazz.ChildCare;
public class ChildCareDeserializer implements JsonDeserializer<ChildCare> {
@Override
public ChildCare deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context)
throws JsonParseException {
if(jsonElement.isJsonPrimitive()) {
return new CHILD_CARE(jsonElement.getAsString());
}
JsonObject jsonObject = jsonElement.getAsJsonObject();
ChildCare obj = new CHILD_CARE();
HashMap<String, Field> fldMap = new HashMap<>();
Field[] flds = CHILD_CARE.class.getFields();
for(Field fld : flds) {
fldMap.put(fld.getName(), fld);
}
for(Entry<String, JsonElement> ent : jsonObject.entrySet()) {
if(fldMap.containsKey(ent.getKey())) {
Field fld = fldMap.get(ent.getKey());
JsonElement elm = ent.getValue();
try {
if(fld.getType().equals(List.class)) {
ParameterizedType gType = (ParameterizedType)fld.getGenericType();
Type[] aTypes = gType.getActualTypeArguments();
Type listType = TypeToken.getParameterized(ArrayList.class, (Class<?>)aTypes[0]).getType();
List<?> list = context.deserialize(elm, listType);
fld.set(obj, list);
} else {
Object val = context.deserialize(elm, fld.getType());
fld.set(obj, val);
}
} catch(IllegalArgumentException iae) {
throw new JsonParseException(iae);
} catch(IllegalAccessException iae) {
throw new JsonParseException(iae);
}
}
}
return obj;
}
}
|
[
"nagai@nagaikenshin.com"
] |
nagai@nagaikenshin.com
|
500c0e39f8071a35cb2d9279709c76cb660bb3e0
|
2b5d790da7cc5775326ab48dd31aea2a333dbab4
|
/src/esocial-jt-service/src/test/java/br/jus/tst/esocialjt/xml/XmlToolsTest.java
|
a094e4dd840dcd23acd5af8bd54d2dbfddbd6002
|
[] |
no_license
|
edipojuan/esocial
|
93854a78b7d25cd524d1b5ac71bf97940ce143d6
|
b5dbbd48e3266f5344c06706fc770250e5d8707a
|
refs/heads/master
| 2020-03-27T01:54:41.540941
| 2018-08-17T20:46:32
| 2018-08-17T20:46:32
| 145,753,063
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,056
|
java
|
package br.jus.tst.esocialjt.xml;
import static org.junit.Assert.assertEquals;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.junit.Test;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
public class XmlToolsTest {
@Test
public void deveRetornarTextoEntreTags() {
String texto = "<inicio>RESPOSTA TESTE</inicio>";
String retorno = XmlTools.retornaValor("<inicio>", "</inicio>", texto);
assertEquals("RESPOSTA TESTE", retorno);
}
public void deveTransformarXmlemString() {
Element node = null;
try {
node = DocumentBuilderFactory.newInstance().newDocumentBuilder()
.parse(new ByteArrayInputStream("<inicio>RESPOSTA TESTE</inicio>".getBytes())).getDocumentElement();
} catch (SAXException | IOException | ParserConfigurationException e) {
e.printStackTrace();
}
String retorno = XmlTools.asString(node);
assertEquals("<inicio>RESPOSTA TESTE</inicio>", retorno);
}
}
|
[
"calimaborges@gmail.com"
] |
calimaborges@gmail.com
|
d90400781e69cae038dc5263699019ae119044a3
|
02533ed4e8c8e15d4b60d9804a57a29c8c82825b
|
/olaf/app/src/main/java/com/hq/app/olaf/push/Helper.java
|
dadfb48f81d5419b1543834827427b89458fc604
|
[] |
no_license
|
douglashu/hq-forecast
|
804449d11c5e39f0cfa110214b6431d1d7ac8e23
|
7aa8d9c459d4aa1e62ed3827e1f951773ac249a9
|
refs/heads/master
| 2021-06-15T15:19:14.566905
| 2017-04-12T07:54:17
| 2017-04-12T07:54:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 852
|
java
|
package com.hq.app.olaf.push;
import android.app.ActivityManager;
import android.content.Context;
import android.text.TextUtils;
import java.util.List;
public class Helper {
public static boolean isServiceRunning(Context context, String className) {
boolean isRunning = false;
ActivityManager activityManager = (ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE);
List<ActivityManager.RunningServiceInfo> serviceList = activityManager.getRunningServices(Integer.MAX_VALUE);
if(serviceList == null || serviceList.isEmpty())
return false;
for(int i = 0; i < serviceList.size(); i++) {
if(serviceList.get(i).service.getClassName().equals(className) && TextUtils.equals(
serviceList.get(i).service.getPackageName(), context.getPackageName())) {
isRunning = true;
break;
}
}
return isRunning;
}
}
|
[
"46773109@qq.com"
] |
46773109@qq.com
|
bba77b998af644f6849c87ba93ef2beb9404d6fc
|
cf73b0c9f93a0a96f8f676b42c8e2a6016822b05
|
/protocol/src/main/java/io/atomix/copycat/client/request/KeepAliveRequest.java
|
465f58b8ace88e91717c519ec3f10577670b29ad
|
[
"Apache-2.0"
] |
permissive
|
moyun/copycat
|
2a09b8456bf2d313173df10bb805bb092b908273
|
59be863d31c30f7df9d47a105bc175e3a44256a9
|
refs/heads/master
| 2021-01-21T15:26:50.273978
| 2015-09-29T09:13:45
| 2015-09-29T09:13:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,901
|
java
|
/*
* Copyright 2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.atomix.copycat.client.request;
import io.atomix.catalyst.buffer.BufferInput;
import io.atomix.catalyst.buffer.BufferOutput;
import io.atomix.catalyst.serializer.SerializeWith;
import io.atomix.catalyst.serializer.Serializer;
import io.atomix.catalyst.util.Assert;
import io.atomix.catalyst.util.BuilderPool;
import io.atomix.catalyst.util.ReferenceManager;
import java.util.Objects;
/**
* Protocol keep alive request.
*
* @author <a href="http://github.com/kuujo">Jordan Halterman</a>
*/
@SerializeWith(id=262)
public class KeepAliveRequest extends SessionRequest<KeepAliveRequest> {
private static final BuilderPool<Builder, KeepAliveRequest> POOL = new BuilderPool<>(Builder::new);
/**
* Returns a new keep alive request builder.
*
* @return A new keep alive request builder.
*/
public static Builder builder() {
return POOL.acquire();
}
/**
* Returns a keep alive request builder for an existing request.
*
* @param request The request to build.
* @return The keep alive request builder.
* @throws NullPointerException if {@code request} is null
*/
public static Builder builder(KeepAliveRequest request) {
return POOL.acquire(Assert.notNull(request, "request"));
}
private long commandSequence;
private long eventVersion;
private long eventSequence;
/**
* @throws NullPointerException if {@code referenceManager} is null
*/
public KeepAliveRequest(ReferenceManager<KeepAliveRequest> referenceManager) {
super(referenceManager);
}
/**
* Returns the command sequence number.
*
* @return The command sequence number.
*/
public long commandSequence() {
return commandSequence;
}
/**
* Returns the event version number.
*
* @return The event version number.
*/
public long eventVersion() {
return eventVersion;
}
/**
* Returns the event sequence number.
*
* @return The event sequence number.
*/
public long eventSequence() {
return eventSequence;
}
@Override
public void readObject(BufferInput buffer, Serializer serializer) {
super.readObject(buffer, serializer);
commandSequence = buffer.readLong();
eventVersion = buffer.readLong();
eventSequence = buffer.readLong();
}
@Override
public void writeObject(BufferOutput buffer, Serializer serializer) {
super.writeObject(buffer, serializer);
buffer.writeLong(commandSequence);
buffer.writeLong(eventVersion);
buffer.writeLong(eventSequence);
}
@Override
public int hashCode() {
return Objects.hash(getClass(), session, commandSequence);
}
@Override
public boolean equals(Object object) {
if (object instanceof KeepAliveRequest) {
KeepAliveRequest request = (KeepAliveRequest) object;
return request.session == session
&& request.commandSequence == commandSequence
&& request.eventVersion == eventVersion
&& request.eventSequence == eventSequence;
}
return false;
}
@Override
public String toString() {
return String.format("%s[session=%d, commandSequence=%d, eventVersion=%d, eventSequence=%d]", getClass().getSimpleName(), session, commandSequence, eventVersion, eventSequence);
}
/**
* Keep alive request builder.
*/
public static class Builder extends SessionRequest.Builder<Builder, KeepAliveRequest> {
/**
* @throws NullPointerException if {@code pool} is null
*/
protected Builder(BuilderPool<Builder, KeepAliveRequest> pool) {
super(pool, KeepAliveRequest::new);
}
@Override
protected void reset() {
super.reset();
request.commandSequence = 0;
request.eventVersion = 0;
request.eventSequence = 0;
}
/**
* Sets the command sequence number.
*
* @param commandSequence The command sequence number.
* @return The request builder.
* @throws IllegalArgumentException if {@code commandSequence} is less than 0
*/
public Builder withCommandSequence(long commandSequence) {
request.commandSequence = Assert.argNot(commandSequence, commandSequence < 0, "commandSequence cannot be negative");
return this;
}
/**
* Sets the event version number.
*
* @param eventVersion The event version number.
* @return The request builder.
* @throws IllegalArgumentException if {@code eventVersion} is less than 0
*/
public Builder withEventVersion(long eventVersion) {
request.eventVersion = Assert.argNot(eventVersion, eventVersion < 0, "eventSequence cannot be negative");
return this;
}
/**
* Sets the event sequence number.
*
* @param eventSequence The event sequence number.
* @return The request builder.
* @throws IllegalArgumentException if {@code eventSequence} is less than 0
*/
public Builder withEventSequence(long eventSequence) {
request.eventSequence = Assert.argNot(eventSequence, eventSequence < 0, "eventSequence cannot be negative");
return this;
}
/**
* @throws IllegalStateException is session is not positive
*/
@Override
public KeepAliveRequest build() {
super.build();
Assert.state(request.session > 0, "session must be positive");
return request;
}
}
}
|
[
"jordan.halterman@gmail.com"
] |
jordan.halterman@gmail.com
|
85a5b0c43e91ed6cb90d2f3a3f29abfc81bcc21c
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/dev/morphia/mapping/lazy/TestLazyCollectionReference.java
|
e3ba2e04aa455b6d6f46aaa9e5c95d36e0a693d1
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 2,728
|
java
|
package dev.morphia.mapping.lazy;
import dev.morphia.annotations.Reference;
import dev.morphia.mapping.lazy.proxy.LazyReferenceFetchingException;
import dev.morphia.testutil.TestEntity;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
public class TestLazyCollectionReference extends ProxyTestBase {
@Test(expected = LazyReferenceFetchingException.class)
public final void testCreateProxy() {
if (!(LazyFeatureDependencies.testDependencyFullFilled())) {
return;
}
// Create a root entity with 2 referenced entities
TestLazyCollectionReference.RootEntity root = new TestLazyCollectionReference.RootEntity();
final TestLazyCollectionReference.ReferencedEntity referenced1 = new TestLazyCollectionReference.ReferencedEntity();
referenced1.setFoo("bar1");
final TestLazyCollectionReference.ReferencedEntity referenced2 = new TestLazyCollectionReference.ReferencedEntity();
referenced2.setFoo("bar2");
List<TestLazyCollectionReference.ReferencedEntity> references = new ArrayList<TestLazyCollectionReference.ReferencedEntity>();
references.add(referenced1);
references.add(referenced2);
root.references = references;
// save to DB
getDs().save(referenced1);
getDs().save(referenced2);
getDs().save(root);
// read root entity from DB
root = getDs().get(root);
assertNotFetched(root.references);
// use the lazy collection
Collection<TestLazyCollectionReference.ReferencedEntity> retrievedReferences = root.references;
Assert.assertEquals(2, retrievedReferences.size());
assertFetched(root.references);
Iterator<TestLazyCollectionReference.ReferencedEntity> it = retrievedReferences.iterator();
Assert.assertEquals("bar1", it.next().getFoo());
Assert.assertEquals("bar2", it.next().getFoo());
// read root entity from DB again
root = getDs().get(root);
assertNotFetched(root.references);
// remove the first referenced entity from DB
getDs().delete(referenced1);
// must fail
root.references.size();
}
public static class RootEntity extends TestEntity {
@Reference(lazy = true)
private Collection<TestLazyCollectionReference.ReferencedEntity> references;
}
public static class ReferencedEntity extends TestEntity {
private String foo;
public void setFoo(final String string) {
foo = string;
}
public String getFoo() {
return foo;
}
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
a3b4647db974eb8cfd9c9432aacea582fe89bd2a
|
dd75cc973206d37731a851b35a518a6630876555
|
/kv5.1.8_oct5.0/src/main/java/com/openkm/frontend/client/util/QueryParamsComparator.java
|
3de034c2a659a3c016312df6e856d6991d94d84d
|
[] |
no_license
|
itxingqing/knowledge_vault
|
553b50573045a7b2bba78ac4c2550f04d27682c4
|
92fc2781fa1feb2a1ee25d098d859f38569902de
|
refs/heads/master
| 2020-04-05T07:39:19.730689
| 2012-05-23T05:46:08
| 2012-05-23T05:46:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,538
|
java
|
/**
* OpenKM, Open Document Management System (http://www.openkm.com)
* Copyright (c) 2006-2011 Paco Avila & Josep Llort
*
* No bytes were intentionally harmed during the development of this application.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package com.openkm.frontend.client.util;
import java.util.Comparator;
import com.openkm.frontend.client.bean.GWTQueryParams;
/**
* QueryParamsComparator
*
* @author jllort
*
*/
public class QueryParamsComparator implements Comparator<GWTQueryParams> {
private static final Comparator<GWTQueryParams> INSTANCE = new QueryParamsComparator();
public static Comparator<GWTQueryParams> getInstance() {
return INSTANCE;
}
public int compare(GWTQueryParams arg0, GWTQueryParams arg1) {
return arg1.getQueryName().compareTo(arg0.getQueryName()); // inverse comparation
}
}
|
[
"viswanadh.sripada@realution.in"
] |
viswanadh.sripada@realution.in
|
abd5cefdf8539c162a4394142af8a79d79908336
|
0dfdc585caccc458fb8ca583ebb4bf41f102726b
|
/ucenter-api/src/main/java/cn/ztuo/bitrade/config/HttpSessionConfig.java
|
e8de3af082078c6d6b077adde84fc96b3ba06207
|
[] |
no_license
|
q-exchange/framework
|
1f016a642eff09840b802dfb62b542d76f87dc2c
|
d2e488c52ccaa93f862c10f935d5d2cd9ec59af2
|
refs/heads/master
| 2022-11-17T06:52:16.693355
| 2020-01-10T08:37:46
| 2020-01-10T08:37:46
| 233,000,909
| 1
| 4
| null | 2022-11-16T08:56:17
| 2020-01-10T08:26:56
|
Java
|
UTF-8
|
Java
| false
| false
| 984
|
java
|
package cn.ztuo.bitrade.config;
import cn.ztuo.bitrade.ext.SmartHttpSessionStrategy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.session.web.http.CookieHttpSessionStrategy;
import org.springframework.session.web.http.HeaderHttpSessionStrategy;
import org.springframework.session.web.http.HttpSessionStrategy;
/**
* 一个小时过期
*/
@Configuration
@EnableRedisHttpSession(maxInactiveIntervalInSeconds =3600)
public class HttpSessionConfig {
@Bean
public HttpSessionStrategy httpSessionStrategy(){
HeaderHttpSessionStrategy headerSession = new HeaderHttpSessionStrategy();
CookieHttpSessionStrategy cookieSession = new CookieHttpSessionStrategy();
headerSession.setHeaderName("x-auth-token");
return new SmartHttpSessionStrategy(cookieSession,headerSession);
}
}
|
[
"3402309136@qq.com"
] |
3402309136@qq.com
|
bfd36a5842e1da6cdb3074c55c70d9c819ba5a54
|
56ae790ef1b0a65643a5e8c7e14a6f5d2e88cbdd
|
/ged/web/src/main/java/com/t2tierp/model/bean/tributacao/TributPisCodApuracao.java
|
e82914a5ec70b70bed68b3a94a34d33d7080c08b
|
[
"MIT"
] |
permissive
|
herculeshssj/T2Ti-ERP-2.0-Java-WEB
|
6751db19b82954116f855fe107c4ac188524d7d5
|
275205e05a0522a2ba9c36d36ba577230e083e72
|
refs/heads/master
| 2023-01-04T21:06:24.175662
| 2020-10-30T11:00:46
| 2020-10-30T11:00:46
| 286,570,333
| 0
| 0
| null | 2020-08-10T20:16:56
| 2020-08-10T20:16:56
| null |
UTF-8
|
Java
| false
| false
| 4,923
|
java
|
/*
* The MIT License
*
* Copyright: Copyright (C) 2014 T2Ti.COM
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* The author may be contacted at: t2ti.com@gmail.com
*
* @author Claudio de Barros (T2Ti.com)
* @version 2.0
*/
package com.t2tierp.model.bean.tributacao;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name = "TRIBUT_PIS_COD_APURACAO")
public class TributPisCodApuracao implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "ID")
private Integer id;
@Column(name = "CST_PIS")
private String cstPis;
@Column(name = "EFD_TABELA_435")
private String efdTabela435;
@Column(name = "MODALIDADE_BASE_CALCULO")
private String modalidadeBaseCalculo;
@Column(name = "PORCENTO_BASE_CALCULO")
private BigDecimal porcentoBaseCalculo;
@Column(name = "ALIQUOTA_PORCENTO")
private BigDecimal aliquotaPorcento;
@Column(name = "ALIQUOTA_UNIDADE")
private BigDecimal aliquotaUnidade;
@Column(name = "VALOR_PRECO_MAXIMO")
private BigDecimal valorPrecoMaximo;
@Column(name = "VALOR_PAUTA_FISCAL")
private BigDecimal valorPautaFiscal;
@JoinColumn(name = "ID_TRIBUT_CONFIGURA_OF_GT", referencedColumnName = "ID")
@ManyToOne(optional = false)
private TributConfiguraOfGt tributConfiguraOfGt;
public TributPisCodApuracao() {
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getCstPis() {
return cstPis;
}
public void setCstPis(String cstPis) {
this.cstPis = cstPis;
}
public String getEfdTabela435() {
return efdTabela435;
}
public void setEfdTabela435(String efdTabela435) {
this.efdTabela435 = efdTabela435;
}
public String getModalidadeBaseCalculo() {
return modalidadeBaseCalculo;
}
public void setModalidadeBaseCalculo(String modalidadeBaseCalculo) {
this.modalidadeBaseCalculo = modalidadeBaseCalculo;
}
public BigDecimal getPorcentoBaseCalculo() {
return porcentoBaseCalculo;
}
public void setPorcentoBaseCalculo(BigDecimal porcentoBaseCalculo) {
this.porcentoBaseCalculo = porcentoBaseCalculo;
}
public BigDecimal getAliquotaPorcento() {
return aliquotaPorcento;
}
public void setAliquotaPorcento(BigDecimal aliquotaPorcento) {
this.aliquotaPorcento = aliquotaPorcento;
}
public BigDecimal getAliquotaUnidade() {
return aliquotaUnidade;
}
public void setAliquotaUnidade(BigDecimal aliquotaUnidade) {
this.aliquotaUnidade = aliquotaUnidade;
}
public BigDecimal getValorPrecoMaximo() {
return valorPrecoMaximo;
}
public void setValorPrecoMaximo(BigDecimal valorPrecoMaximo) {
this.valorPrecoMaximo = valorPrecoMaximo;
}
public BigDecimal getValorPautaFiscal() {
return valorPautaFiscal;
}
public void setValorPautaFiscal(BigDecimal valorPautaFiscal) {
this.valorPautaFiscal = valorPautaFiscal;
}
public TributConfiguraOfGt getTributConfiguraOfGt() {
return tributConfiguraOfGt;
}
public void setTributConfiguraOfGt(TributConfiguraOfGt tributConfiguraOfGt) {
this.tributConfiguraOfGt = tributConfiguraOfGt;
}
@Override
public String toString() {
return "com.t2tierp.model.bean.tributacao.TributPisCodApuracao[id=" + id + "]";
}
}
|
[
"claudiobsi@gmail.com"
] |
claudiobsi@gmail.com
|
99d1e33051119073b0c9c09d37c2fc8c5fb1d84c
|
58ce44ff5fcc13be7876dd903e700b5be989ab19
|
/JavaWork/Jungol_기초다지기/src/입력/자가진단01/Main.java
|
984671e542ba598b5d1747eb43c2db38d6f2cb4f
|
[] |
no_license
|
binna/full-stack
|
eb78836414a8d60d5dc5e78f5abc57b9348af48d
|
9e6990e1ce7eff8a515603b1cd71b25660b40f80
|
refs/heads/main
| 2023-04-23T08:50:52.441080
| 2021-05-15T15:33:05
| 2021-05-15T15:33:05
| 320,798,523
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 152
|
java
|
package 입력.자가진단01;
public class Main {
public static void main(String[] args) {
int num = -100;
System.out.println(num);
}
}
|
[
"every5116@naver.com"
] |
every5116@naver.com
|
9ee151261a61bf02aa423a05096e5038c27b5adc
|
8a64a7b7910bf5679daf0f70fd0ac409df5bad72
|
/jspackage-maven-plugin/src/main/java/org/slieb/tools/jspackage/internal/SourceSet.java
|
2a5ff553fb583ffa97375d3e370899f8c38ff037
|
[] |
no_license
|
StefanLiebenberg/jspackage
|
e87f95ef2a5ba73f379f2a397064c49660a69467
|
e52bae1d8f0236ab40cf4b999cf9a6e9379d25d5
|
refs/heads/master
| 2021-01-20T09:01:39.140173
| 2016-02-27T10:59:31
| 2016-02-27T10:59:31
| 33,916,604
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 827
|
java
|
package org.slieb.tools.jspackage.internal;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.Collections;
import java.util.Set;
import static java.util.Collections.unmodifiableSet;
import static java.util.Optional.ofNullable;
public interface SourceSet {
@Nonnull
default Set<String> getSources() {
return unmodifiableSet(Collections.emptySet());
}
@Nonnull
default Set<String> getIncludes() {
return unmodifiableSet(Collections.emptySet());
}
@Nonnull
default Set<String> getExcludes() {
return unmodifiableSet(Collections.emptySet());
}
@Nonnull
static Set<String> populatedSetOrEmpty(@Nullable Set<String> sources) {
return unmodifiableSet(ofNullable(sources).orElseGet(Collections::emptySet));
}
}
|
[
"siga.fredo@gmail.com"
] |
siga.fredo@gmail.com
|
5e091f556e0bd4e514b3c0bba677501a6e2d7af1
|
67984d7d945b67709b24fda630efe864b9ae9c72
|
/core/src/main/java/com/ey/piit/core/paginator/dialect/OracleDialect.java
|
443d7ac151d52361aecc8647d70d9240e5765630
|
[] |
no_license
|
JackPaiPaiNi/Piit
|
76c7fb6762912127a665fa0638ceea1c76893fc6
|
89b8d79487e6d8ff21319472499b6e255104e1f6
|
refs/heads/master
| 2020-04-07T22:30:35.105370
| 2018-11-23T02:58:31
| 2018-11-23T02:58:31
| 158,773,760
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,482
|
java
|
package com.ey.piit.core.paginator.dialect;
import com.ey.piit.core.paginator.domain.PageBounds;
import com.ey.piit.core.paginator.dialect.Dialect;
import org.apache.ibatis.mapping.MappedStatement;
/**
* @author badqiu
* @author miemiedev
*/
public class OracleDialect extends Dialect{
public OracleDialect(MappedStatement mappedStatement, Object parameterObject, PageBounds pageBounds) {
super(mappedStatement, parameterObject, pageBounds);
}
protected String getLimitString(String sql, String offsetName,int offset, String limitName, int limit) {
sql = sql.trim();
boolean isForUpdate = false;
if ( sql.toLowerCase().endsWith(" for update") ) {
sql = sql.substring( 0, sql.length()-11 );
isForUpdate = true;
}
StringBuffer pagingSelect = new StringBuffer( sql.length()+100 );
if (offset > 0) {
pagingSelect.append("select * from ( select row_.*, rownum rownum_ from ( ");
}
else {
pagingSelect.append("select * from ( ");
}
pagingSelect.append(sql);
if (offset > 0) {
pagingSelect.append(" ) row_ ) where rownum_ <= ? and rownum_ > ?");
setPageParameter("__offsetEnd",offset+limit,Integer.class);
setPageParameter(offsetName,offset,Integer.class);
}
else {
pagingSelect.append(" ) where rownum <= ?");
setPageParameter(limitName,limit,Integer.class);
}
if ( isForUpdate ) {
pagingSelect.append( " for update" );
}
return pagingSelect.toString();
}
}
|
[
"1210287515@master"
] |
1210287515@master
|
5682797cda73dc98dda200654f6494e60022e348
|
d1199af17c9a3061be50b0f167ff2afa0e943004
|
/FastBiz/core/com/fastbiz/core/web/spring/security/authentication/MultiTenantAuthentication.java
|
7535566a8af693134b30749708abfc8aee4b131e
|
[] |
no_license
|
sala223/FastBiz
|
7259bdbf3ee46f6c26d5bc67c276e030e49c4305
|
031b445f3b11ac38f594aad48ad6557ae356031d
|
refs/heads/master
| 2021-01-19T21:28:30.434797
| 2012-12-18T11:24:14
| 2012-12-18T11:24:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 232
|
java
|
package com.fastbiz.core.web.spring.security.authentication;
import org.springframework.security.core.Authentication;
public interface MultiTenantAuthentication extends Authentication{
public String getTenantId();
}
|
[
"sala223@msn.com"
] |
sala223@msn.com
|
ce197f670b59fd5be45883a210abdcfda22e87fd
|
9396d84d6fc23c88f23809c1a30c6ff20b0ce19f
|
/svision/src/main/java/com/rmbank/supervision/service/impl/PermissionServiceimpl.java
|
4284e719332d1972ff7e109518a49ad61c601d55
|
[] |
no_license
|
supervisions/supervision-manager
|
9e6882676f6dd104e0d5254647a11b2f045fff81
|
6f2cbf1dec77c79a7e8d508b2c75b2263922037f
|
refs/heads/master
| 2021-01-19T21:58:37.623434
| 2018-05-17T03:18:19
| 2018-05-17T03:18:19
| 88,729,267
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,451
|
java
|
package com.rmbank.supervision.service.impl;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.rmbank.supervision.dao.PermissionMapper;
import com.rmbank.supervision.model.Permission;
import com.rmbank.supervision.service.PermissionService;
@Service("PermissionService")
public class PermissionServiceimpl implements PermissionService {
@Resource
private PermissionMapper permissionMapper;
@Override
public int deleteByPrimaryKey(Integer id) {
// TODO Auto-generated method stub
return 0;
}
@Override
public int insert(Permission record) {
// TODO Auto-generated method stub
return 0;
}
@Override
public int insertSelective(Permission record) {
// TODO Auto-generated method stub
return 0;
}
@Override
public Permission selectByPrimaryKey(Integer id) {
// TODO Auto-generated method stub
return permissionMapper.selectByPrimaryKey(id);
}
@Override
public int updateByPrimaryKeySelective(Permission record) {
// TODO Auto-generated method stub
return 0;
}
@Override
public int updateByPrimaryKey(Permission record) {
// TODO Auto-generated method stub
return 0;
}
@Override
public List<Permission> getPermissionList(Permission permission) {
// TODO Auto-generated method stub
return permissionMapper.getPermissionList(permission);
}
@Override
public int getPermissionCount(Permission permission) {
// TODO Auto-generated method stub
return permissionMapper.getPermissionCount(permission);
}
@Override
public boolean saveOrUpdatePermission(Permission permission) {
// TODO Auto-generated method stub
boolean isSuccess = false;
try{
//id存在则为修改操作
if(permission.getId()>0){
permissionMapper.updateByPrimaryKeySelective(permission);
isSuccess = true;
}else{
permissionMapper.insert(permission);
isSuccess = true;
}
}catch(Exception ex){
ex.printStackTrace();
}
return isSuccess;
}
@Override
public List<Permission> getExistPermission(Permission per) {
// TODO Auto-generated method stub
return permissionMapper.getExistPermission(per);
}
@Override
public boolean deletePermissionById(Integer id) {
// TODO Auto-generated method stub
boolean isSuccess = false;
try{
permissionMapper.deleteByPrimaryKey(id);
isSuccess=true;
}catch(Exception ex){
ex.printStackTrace();
}
return isSuccess;
}
}
|
[
"xiaohutuxian5212@163.com"
] |
xiaohutuxian5212@163.com
|
49aa8c81a97f0183f95dba25200b774059f555b1
|
f5c30fd4998304cc35cdecebf9294fe3628323b7
|
/codjo-broadcast-common/src/main/java/net/codjo/broadcast/common/columns/GeneratorExpression.java
|
28230b81597e5027e34a2003501f045d8b3d747e
|
[] |
no_license
|
codjo-sandbox/codjo-broadcast
|
44f5374ccd807e5f83f470a1b67cc5f8af252afb
|
617654a9e0b497f5b8d5f4ca69ce9b337540d6ee
|
refs/heads/master
| 2021-01-14T08:51:56.160462
| 2014-02-11T10:04:09
| 2014-02-11T10:04:09
| 3,590,536
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,532
|
java
|
/*
* codjo.net
*
* Common Apache License 2.0
*/
package net.codjo.broadcast.common.columns;
import net.codjo.expression.Expression;
import net.codjo.expression.ExpressionException;
import java.sql.Types;
import java.util.ArrayList;
import java.util.List;
/**
* Gestionnaire d'expression pour l'export.
*
* @author $Author: galaber $
* @version $Revision: 1.2 $
*/
class GeneratorExpression {
private AbstractFileColumnGenerator generator;
private Expression expression;
GeneratorExpression(String expressionString, int inputSqlType, FunctionHolder funcs) {
Expression.Variable[] inputs = new Expression.Variable[1];
inputs[0] =
new Expression.Variable(Expression.DEFAULT_STRING_VALUE, inputSqlType);
FunctionHolder[] funcHolders = new FunctionHolder[2];
funcHolders[0] = funcs;
funcHolders[1] = new GeneratorFunctions();
String[] st = {Expression.DEFAULT_STRING_NULL_VALUE};
expression =
new Expression(expressionString, inputs, funcHolders, Types.VARCHAR, st);
}
GeneratorExpression(String expressionString, int inputSqlType) {
expression =
new Expression(expressionString, inputSqlType, new GeneratorFunctions(),
Types.VARCHAR);
}
public String computeToString(Object value) throws GenerationException {
try {
Object result = expression.compute(value);
if (result == null) {
return "";
}
else {
return result.toString();
}
}
catch (ExpressionException ex) {
throw new GenerationException("Evaluation de l'expression impossible :"
+ expression, ex);
}
}
public void init(AbstractFileColumnGenerator columnGenerator) {
this.generator = columnGenerator;
}
/**
* Transfert l'appel de formattage sur le generateur.
*
* @author $Author: galaber $
* @version $Revision: 1.2 $
*/
public class GeneratorFunctions implements FunctionHolder {
public List<String> getAllFunctions() {
List<String> allFunction = new ArrayList<String>();
allFunction.add("outil.format(value)");
return allFunction;
}
public String getName() {
return "outil";
}
public String format(Object obj) {
return generator.format(obj);
}
}
}
|
[
"admin@codjo.net"
] |
admin@codjo.net
|
5c40f13bc584b6835b173b253860768e8264e9bc
|
0fb7a2ed774983f2ac12c8403b6269808219e9bc
|
/yikatong-core/src/main/java/com/alipay/api/domain/AlipaySecurityProdXwbtestprodQueryModel.java
|
d07c4a5682e9e29c431bedb812c3edfcd14a230c
|
[] |
no_license
|
zhangzh56/yikatong-parent
|
e605b4025c934fb4099d5c321faa3a48703f8ff7
|
47e8f627ba3471eff71f593189e82c6f08ceb1a3
|
refs/heads/master
| 2020-03-19T11:23:47.000077
| 2018-04-26T02:26:48
| 2018-04-26T02:26:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 859
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 徐伟波测试用
*
* @author auto create
* @since 1.0, 2018-03-08 16:41:07
*/
public class AlipaySecurityProdXwbtestprodQueryModel extends AlipayObject {
private static final long serialVersionUID = 4189595611251515955L;
/**
* 省份编码,国标码
*/
@ApiField("province_code")
private String provinceCode;
/**
* wert
*/
@ApiField("qwe_dfgfd")
private String qweDfgfd;
public String getProvinceCode() {
return this.provinceCode;
}
public void setProvinceCode(String provinceCode) {
this.provinceCode = provinceCode;
}
public String getQweDfgfd() {
return this.qweDfgfd;
}
public void setQweDfgfd(String qweDfgfd) {
this.qweDfgfd = qweDfgfd;
}
}
|
[
"xiangyu.zhang@foxmail.com"
] |
xiangyu.zhang@foxmail.com
|
ac7b53e428cd029214f77bae57839ca0ca3be8db
|
2e5ce97698373b43df7fefa2fd7bcc762530a972
|
/SLOTGAMES_WEB/src/test/java/stepDefinition_SkinfiriLotto/SkinfiriLotto_Web_Balance_Deduction_AccordingToBetType1_4.java
|
5373c7c862e38f0bf1c8bcf7107dc34173ae402b
|
[] |
no_license
|
pavanysecit/SLOTGAMES_WEB
|
c44795d43b2b844f988dbf4c9c665985fc59a9e4
|
ad2f40ca04441651b159da8f812b069c92d52d00
|
refs/heads/master
| 2021-02-17T20:50:31.356696
| 2020-08-18T06:00:49
| 2020-08-18T06:00:49
| 245,126,975
| 0
| 0
| null | 2020-10-13T20:05:13
| 2020-03-05T09:59:12
|
Java
|
UTF-8
|
Java
| false
| false
| 4,617
|
java
|
package stepDefinition_SkinfiriLotto;
import java.io.File;
import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.sikuli.script.Finder;
import org.sikuli.script.Match;
import org.sikuli.script.Pattern;
import org.sikuli.script.Screen;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
public class SkinfiriLotto_Web_Balance_Deduction_AccordingToBetType1_4 {
WebDriver driver;
@Given("^Chrome browser, valid URL, valid login details, Skinfiri Lotto slot game, bet type as (\\d+)\\.(\\d+), bet value as TWO, balance and spin button$")
public void chrome_browser_valid_URL_valid_login_details_Skinfiri_Lotto_slot_game_bet_type_as_bet_value_as_TWO_balance_and_spin_button(int arg1, int arg2) throws Throwable {
this.driver = SkinfiriLotto_URL_Login.getDriver();
}
@When("^Open the Skinfiri Lotto slot game by entering the valid URL in browser, enter the valid login details, select the bet type as (\\d+)\\.(\\d+), select the bet value as TWO, click on spin button and check the balance$")
public void open_the_Skinfiri_Lotto_slot_game_by_entering_the_valid_URL_in_browser_enter_the_valid_login_details_select_the_bet_type_as_select_the_bet_value_as_TWO_click_on_spin_button_and_check_the_balance(int arg1, int arg2) throws Throwable {
WebDriverWait wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("transferInput")));
WebElement balT = driver.findElement(By.id("transferInput"));
balT.clear();
Thread.sleep(1000);
balT.sendKeys("300");
Thread.sleep(2000);
driver.findElement(By.className("Transfer_Ok_but")).click();
Screen screen=new Screen();
Pattern spin1=new Pattern("E:/Sikuli Images/SkinfiriLotto/spin.png");
screen.wait(spin1, 60);
TakesScreenshot tsc=(TakesScreenshot)driver;
File sct = driver.findElement(By.xpath("//*[@id='iframeSlotGame']")).getScreenshotAs(OutputType.FILE);
String path = System.getProperty("user.dir")+"E:\\Sikuli Images\\firstBetvalue.PNG";
Pattern pat1=new Pattern("E:/Sikuli Images/SkinfiriLotto/betvalue_1_4.png");
Pattern spin=new Pattern("E:/Sikuli Images/SkinfiriLotto/spin.png");
//clicking on Bet VALUE
screen.click(pat1);
Thread.sleep(2000);
screen.click(spin);
Thread.sleep(6000);
//comparing the credit value should be 0.01
Pattern credit1=new Pattern("E:/Sikuli Images/SkinfiriLotto/creditvalue_1.png");
Finder finder =new Finder(screen.capture().getImage());
String ht = finder.find(credit1);
double score=20;
System.out.println("the value of ht"+" "+ht);
if(finder.hasNext())
{
Match m=finder.next();
System.out.println("Match Found with: "+(m.getScore())*100+"%");
score=(m.getScore())*100;
System.out.println("Credit value comparision happened successfully. Test case passed");
finder.destroy();
}
else
{
System.out.println("Comparision failed. Test case failed");
}
System.out.println("Credit comparision value equals to: "+" "+score +"%");
Assert.assertTrue(score > 97);
//comparing the balance after spinning should be deducted by 2 value
Pattern pat=new Pattern("E:/Sikuli Images/SkinfiriLotto/balance1_4.png");
Finder finder1 =new Finder(screen.capture().getImage());
String ht1 = finder1.find(pat);
double score1=20;
System.out.println("the value of ht"+" "+ht1);
if(finder1.hasNext())
{
Match m1=finder1.next();
System.out.println("Match Found with: "+(m1.getScore())*100+"%");
score1=(m1.getScore())*100;
System.out.println("Comparision happened successfully. Test case passed");
finder1.destroy();
}
else
{
System.out.println("Comparision failed. Test case failed");
}
System.out.println("Comparision value equals to: "+" "+score1 +"%");
Assert.assertTrue(score1 > 97);
}
@Then("^Current Balance should get deducted by TWO as bet type is selected as (\\d+)\\.(\\d+) and bet value as (\\d+) in Skinfiri Lotto game$")
public void current_Balance_should_get_deducted_by_TWO_as_bet_type_is_selected_as_and_bet_value_as_in_Skinfiri_Lotto_game(int arg1, int arg2, int arg3) throws Throwable {
Thread.sleep(3000);
driver.quit();
}
}
|
[
"pavan.kumar@ysecit.com"
] |
pavan.kumar@ysecit.com
|
52e92b4b0ca873d4754bd9a953e45e34158f8597
|
58df55b0daff8c1892c00369f02bf4bf41804576
|
/src/um.java
|
b099073d98c326790180d11311d4db32157d755a
|
[] |
no_license
|
gafesinremedio/com.google.android.gm
|
0b0689f869a2a1161535b19c77b4b520af295174
|
278118754ea2a262fd3b5960ef9780c658b1ce7b
|
refs/heads/master
| 2020-05-04T15:52:52.660697
| 2016-07-21T03:39:17
| 2016-07-21T03:39:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,573
|
java
|
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
import android.view.accessibility.AccessibilityNodeInfo.CollectionInfo;
import android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo;
class um
extends ut
{
public final Object a(int paramInt1, int paramInt2, int paramInt3, int paramInt4, boolean paramBoolean1, boolean paramBoolean2)
{
return AccessibilityNodeInfo.CollectionItemInfo.obtain(paramInt1, paramInt2, paramInt3, paramInt4, paramBoolean1, false);
}
public final Object a(int paramInt1, int paramInt2, boolean paramBoolean, int paramInt3)
{
return AccessibilityNodeInfo.CollectionInfo.obtain(paramInt1, paramInt2, false, 0);
}
public final Object a(int paramInt, CharSequence paramCharSequence)
{
return new AccessibilityNodeInfo.AccessibilityAction(paramInt, paramCharSequence);
}
public final void a(Object paramObject, CharSequence paramCharSequence)
{
((AccessibilityNodeInfo)paramObject).setError(paramCharSequence);
}
public final void a(Object paramObject1, Object paramObject2)
{
((AccessibilityNodeInfo)paramObject1).addAction((AccessibilityNodeInfo.AccessibilityAction)paramObject2);
}
public final boolean b(Object paramObject1, Object paramObject2)
{
return ((AccessibilityNodeInfo)paramObject1).removeAction((AccessibilityNodeInfo.AccessibilityAction)paramObject2);
}
}
/* Location:
* Qualified Name: um
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
b23129e73f3160c8633c0ae5a036544018b5e8bc
|
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
|
/MarketBusinessInterface/src/main/java/com/newco/marketplace/business/iBusiness/api/beans/leadsmanagement/EligibleProviderForLead.java
|
f6dba4cf604736ed9fe77f304d3f03274b692763
|
[] |
no_license
|
ssriha0/sl-b2b-platform
|
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
|
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
|
refs/heads/master
| 2023-01-06T18:32:24.623256
| 2020-11-05T12:23:26
| 2020-11-05T12:23:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,157
|
java
|
package com.newco.marketplace.business.iBusiness.api.beans.leadsmanagement;
import com.thoughtworks.xstream.annotations.XStreamAlias;
@XStreamAlias("EligibleProvider")
public class EligibleProviderForLead {
@XStreamAlias("ResourceId")
private Integer resourceId;
@XStreamAlias("ProviderDistance")
private double providerDistance;
@XStreamAlias("ResourceFirstName")
private String resFirstName;
@XStreamAlias("ResourceLastName")
private String resLastName;
public Integer getResourceId() {
return resourceId;
}
public void setResourceId(Integer resourceId) {
this.resourceId = resourceId;
}
public double getProviderDistance() {
return providerDistance;
}
public void setProviderDistance(double providerDistance) {
this.providerDistance = providerDistance;
}
public String getResFirstName() {
return resFirstName;
}
public void setResFirstName(String resFirstName) {
this.resFirstName = resFirstName;
}
public String getResLastName() {
return resLastName;
}
public void setResLastName(String resLastName) {
this.resLastName = resLastName;
}
}
|
[
"Kunal.Pise@transformco.com"
] |
Kunal.Pise@transformco.com
|
9cb703e2d0be20cfa46f6d47a77f49ee8239b386
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/10/10_9ec7597df58dedf459ad57e96884df37c196a943/DebugSwingMqlEditor/10_9ec7597df58dedf459ad57e96884df37c196a943_DebugSwingMqlEditor_s.java
|
4fce193d5e9932142df89ea3e4b766e53415e7bf
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,264
|
java
|
package org.pentaho.commons.metadata.mqleditor;
import java.io.InputStream;
import org.pentaho.commons.metadata.mqleditor.editor.SwingMqlEditor;
import org.pentaho.metadata.repository.FileBasedMetadataDomainRepository;
import org.pentaho.metadata.repository.IMetadataDomainRepository;
import org.pentaho.metadata.util.XmiParser;
import org.pentaho.platform.api.data.IDatasourceService;
import org.pentaho.platform.api.engine.ISolutionEngine;
import org.pentaho.platform.api.engine.IPentahoDefinableObjectFactory.Scope;
import org.pentaho.platform.api.repository.ISolutionRepository;
import org.pentaho.platform.engine.core.system.PentahoSystem;
import org.pentaho.platform.engine.core.system.StandaloneSession;
import org.pentaho.platform.engine.services.connection.datasource.dbcp.JndiDatasourceService;
import org.pentaho.platform.engine.services.solution.SolutionEngine;
import org.pentaho.platform.plugin.services.connections.sql.SQLConnection;
import org.pentaho.platform.repository.solution.filebased.FileBasedSolutionRepository;
import org.pentaho.test.platform.engine.core.MicroPlatform;
/**
* Default Swing implementation. This class requires a concreate Service
* implemetation
*/
public class DebugSwingMqlEditor {
public static void main(String[] args) {
// initialize micro platorm
MicroPlatform microPlatform = new MicroPlatform("resources/solution1/"); //$NON-NLS-1$
microPlatform.define(ISolutionEngine.class, SolutionEngine.class);
microPlatform.define(ISolutionRepository.class, FileBasedSolutionRepository.class);
microPlatform.define(IMetadataDomainRepository.class, FileBasedMetadataDomainRepository.class, Scope.GLOBAL);
microPlatform.define("connection-SQL", SQLConnection.class); //$NON-NLS-1$
microPlatform.define(IDatasourceService.class, JndiDatasourceService.class, Scope.GLOBAL);
// JNDI
System.setProperty("java.naming.factory.initial", "org.osjava.sj.SimpleContextFactory"); //$NON-NLS-1$ //$NON-NLS-2$
System.setProperty("org.osjava.sj.root", "resources/solution1/simple-jndi"); //$NON-NLS-1$ //$NON-NLS-2$
System.setProperty("org.osjava.sj.delimiter", "/"); //$NON-NLS-1$ //$NON-NLS-2$
microPlatform.init();
new StandaloneSession();
FileBasedMetadataDomainRepository repo = (FileBasedMetadataDomainRepository) PentahoSystem.get(IMetadataDomainRepository.class, null);
repo.setDomainFolder("resources/solution1/system/metadata/domains"); //$NON-NLS-1$
// Parse and add legacy CWM domain for testing purposes.
XmiParser parser = new XmiParser();
try {
InputStream inStr = SwingMqlEditor.class.getResourceAsStream("/metadata_steelwheels.xmi"); //$NON-NLS-1$
if(inStr == null){
System.out.println("error with XMI input"); //$NON-NLS-1$
org.pentaho.metadata.model.Domain d = parser.parseXmi(inStr);
d.setId("Steel-Wheels"); //$NON-NLS-1$
repo.storeDomain(d, false);
repo.reloadDomains();
}
} catch (Exception e) {
System.out.println("error with XMI input"); //$NON-NLS-1$
}
SwingMqlEditor editor = new SwingMqlEditor(repo);
editor.hidePreview();
editor.show();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d76553cac622312931832772d4c945f1ea45c74f
|
6831a854ade3b85888b29298270b2371ba2221f1
|
/api/b2b-mybatis/src/main/java/com/jdy/b2b/api/model/user/AgentUserDO.java
|
87939ba6dae77e13495e23dcd48943ce772248c3
|
[] |
no_license
|
meiwulang/spring-boot-distributed
|
709787c98c47059dfea36130f09b864970101246
|
428a3152e260299e09bfe7657290af3384a2f8b7
|
refs/heads/master
| 2020-03-18T05:40:31.678087
| 2018-05-28T08:57:30
| 2018-05-28T08:57:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 287
|
java
|
package com.jdy.b2b.api.model.user;
/**
* Created by yangcheng on 2017/11/10.
*/
public class AgentUserDO extends User{
private String dName;
public String getdName() {
return dName;
}
public void setdName(String dName) {
this.dName = dName;
}
}
|
[
"418180062@qq.com"
] |
418180062@qq.com
|
1c2f11ee2c5edc5ae47751725d4d336dc636715a
|
2b9d327741894ba0c5bf48ed6efff00fdadb67ef
|
/ratpack-core/src/main/java/ratpack/server/internal/ServerCapturer.java
|
1890446752c8dba42ac1728e60aea7ae759f6028
|
[
"Apache-2.0"
] |
permissive
|
rhart/ratpack
|
c1896c3871e7fde2b82e7a590ceadf4d64e75882
|
e88ae09f4de1a6c03d509408107c2ad7b223f35d
|
refs/heads/master
| 2021-01-24T23:34:27.559874
| 2015-04-13T10:33:28
| 2015-04-13T10:33:28
| 33,863,377
| 1
| 0
| null | 2015-04-13T10:56:44
| 2015-04-13T10:56:44
| null |
UTF-8
|
Java
| false
| false
| 2,603
|
java
|
/*
* Copyright 2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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 ratpack.server.internal;
import ratpack.func.Function;
import ratpack.func.Block;
import ratpack.registry.Registries;
import ratpack.registry.Registry;
import ratpack.server.RatpackServer;
import java.util.Optional;
public abstract class ServerCapturer {
private static final ThreadLocal<Overrides> OVERRIDES_HOLDER = ThreadLocal.withInitial(Overrides::new);
private static final ThreadLocal<RatpackServer> SERVER_HOLDER = new ThreadLocal<>();
private ServerCapturer() {
}
public static class Overrides {
private int port = -1;
private Function<? super Registry, ? extends Registry> registryFunction = Function.constant(Registries.empty());
private Boolean development;
public Overrides port(int port) {
this.port = port;
return this;
}
public Overrides registry(Function<? super Registry, ? extends Registry> registryFunction) {
this.registryFunction = registryFunction;
return this;
}
public Overrides development(boolean development) {
this.development = development;
return this;
}
public int getPort() {
return port;
}
public Function<? super Registry, ? extends Registry> getRegistryFunction() {
return registryFunction;
}
public Boolean isDevelopment() {
return development;
}
}
public static Optional<RatpackServer> capture(Block bootstrap) throws Exception {
return capture(new Overrides(), bootstrap);
}
public static Optional<RatpackServer> capture(Overrides overrides, Block bootstrap) throws Exception {
OVERRIDES_HOLDER.set(overrides);
try {
bootstrap.execute();
} finally {
OVERRIDES_HOLDER.remove();
}
RatpackServer ratpackServer = SERVER_HOLDER.get();
SERVER_HOLDER.remove();
return Optional.ofNullable(ratpackServer);
}
public static Overrides capture(RatpackServer server) throws Exception {
SERVER_HOLDER.set(server);
return OVERRIDES_HOLDER.get();
}
}
|
[
"ld@ldaley.com"
] |
ld@ldaley.com
|
2de585600d8b709c505b91775d074a3444ad27d3
|
14eeb49612d4b4bbdf30491889f5f8a5adc748c8
|
/src/service/InsertDealService.java
|
77aa3d8288cf1d03c79270c75e5d883abba358d4
|
[] |
no_license
|
wangnaiwen/BabyTest
|
c2e4521f5bc7561c9bed8b0477c9092a8330e9e9
|
8c331b53fd7d27deb0b4b90185dedc18ce708678
|
refs/heads/master
| 2020-06-16T23:37:10.145824
| 2017-06-03T16:52:23
| 2017-06-03T16:52:23
| 75,057,758
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 357
|
java
|
package service;
import dao.DealDAO;
import domain.Deal;
import service.dao.BaseDealServiceDAO;
import service.dao.InsertDealServiceDAO;
public class InsertDealService extends BaseDealServiceDAO implements InsertDealServiceDAO{
@Override
public boolean insertDeal(Deal deal) {
DealDAO dealDAO = getDealDAO();
return dealDAO.insertDeal(deal);
}
}
|
[
"1464524269@qq.com"
] |
1464524269@qq.com
|
b80f9ae1460c1905303c0168be14d5290d9fba15
|
66b0b2dbdf000affc0411a8019d64dda8990d6c3
|
/and/hardware/SoundBasic/SoundBasic/app/src/test/java/to/msn/wings/soundbasic/ExampleUnitTest.java
|
2e4d6455df23f531a6ac952654fce6ac7cbe7222
|
[] |
no_license
|
takagotch/and
|
e6bf811e194f47d7e2b30079c308380f7d118929
|
dfba108b0a1eb965a71ee2c559ac1666a7a6af57
|
refs/heads/master
| 2021-09-15T20:02:34.048548
| 2018-06-09T18:43:20
| 2018-06-09T18:43:20
| 109,402,630
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 316
|
java
|
package to.msn.wings.soundbasic;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}
|
[
"dyaccb@gmail.com"
] |
dyaccb@gmail.com
|
9a906d71c1e2f8fff673dd51fb905f70d5247707
|
e60d7652bacb7a2cff2c40f60b5544b2fb9aab10
|
/target/generated-sources/entity-codegen/extensions/pc/internal/domain/policy/period/impl/PolicyPeriodExtImpl.java
|
708dafdbcbfc8d5011123aa1ce1436285b0b54da
|
[] |
no_license
|
ezsaidi/configuration
|
19fa3bf70982529e5cdf5d7f3d99eb7b0d7971d5
|
e22a485d1f5376005c72fd073a474fa685fcf6a6
|
refs/heads/master
| 2022-04-12T05:15:58.490259
| 2018-07-11T00:18:50
| 2018-07-11T00:18:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 208
|
java
|
package extensions.pc.internal.domain.policy.period.impl;
import extensions.pc.internal.domain.policy.period.gen.PolicyPeriodExtStub;
public class PolicyPeriodExtImpl
extends PolicyPeriodExtStub
{
}
|
[
"riteshvishu@hotmail.com"
] |
riteshvishu@hotmail.com
|
c839ab83bda9f2e317f06a783a8153139c20bdcd
|
37c5d3869e8b329f8b6cd0e1b94c069632858f41
|
/src/main/java/com/adsizzler/mangolaa/commons/json/jackson/deserializers/ApiFrameworkDeserializer.java
|
412e0e7a4a09209a3fe1f6938ba585eb46ea3b6e
|
[
"MIT"
] |
permissive
|
tansydev/mangolaa-commons
|
2913a3ce68756fc6d887d997b2ba4eb0b00936b5
|
203e385a3ed2867134850332112bd7145365a13a
|
refs/heads/master
| 2021-04-09T17:22:41.304990
| 2017-10-08T18:31:29
| 2017-10-08T18:31:29
| 125,805,948
| 1
| 0
| null | 2018-03-19T05:30:57
| 2018-03-19T05:30:57
| null |
UTF-8
|
Java
| false
| false
| 692
|
java
|
package com.adsizzler.mangolaa.commons.json.jackson.deserializers;
import com.adsizzler.mangolaa.commons.domain.openrtb.enums.ApiFrameworks;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import java.io.IOException;
/**
* Created by Ankush on 26/07/17.
*/
public class ApiFrameworkDeserializer extends JsonDeserializer<ApiFrameworks> {
@Override
public ApiFrameworks deserialize(
final JsonParser parser,
final DeserializationContext ctxt
) throws IOException
{
return ApiFrameworks.from(parser.getValueAsInt());
}
}
|
[
"ankush.s@adsizzlergroup.com"
] |
ankush.s@adsizzlergroup.com
|
61ea36606f5cda1cc0a70f4d2591a7b0e9975b5a
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/accessibility/AccessibilityCapture$IAccessibilityManagerClientInvocationHandler.java
|
c0b4dc4995a924ee0226a609b5300013c17d9f76
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,365
|
java
|
package com.tencent.mm.accessibility;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
class AccessibilityCapture$IAccessibilityManagerClientInvocationHandler
implements InvocationHandler
{
public Object invoke(Object paramObject, Method paramMethod, Object[] paramArrayOfObject)
{
AppMethodBeat.i(118624);
paramObject = paramMethod.getName();
paramMethod = paramMethod.getParameterTypes();
if ((paramObject.equals("setState")) && (paramMethod.length == 1) && (paramMethod[0].equals(Integer.TYPE)))
{
paramObject = paramArrayOfObject[0];
if ((paramObject == null) || (!(paramObject instanceof Integer)))
AppMethodBeat.o(118624);
}
while (true)
{
return null;
int i = ((Integer)paramObject).intValue();
AccessibilityCapture.access$600().i("MicroMsg.AccessibilityCapture", "setState %d", new Object[] { Integer.valueOf(i) });
AccessibilityCapture.access$700(i);
AppMethodBeat.o(118624);
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes3-dex2jar.jar
* Qualified Name: com.tencent.mm.accessibility.AccessibilityCapture.IAccessibilityManagerClientInvocationHandler
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
1cd2dd1e06fec7c3a1ff4d5ba0135bfa1ddc11b2
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/14/14_13514fe5ece7ba837434342eb15b0f5237d257c8/InputNumber/14_13514fe5ece7ba837434342eb15b0f5237d257c8_InputNumber_t.java
|
b6ee83a577b35cb40d3bf55fa61bc5e3eebc7326
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,958
|
java
|
/*
* Copyright 2012 PrimeFaces Extensions.
*
* 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.
*
* $Id$
*/
package org.primefaces.extensions.component.inputnumber;
import java.util.ArrayList;
import java.util.List;
import javax.el.ValueExpression;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UINamingContainer;
import javax.faces.component.html.HtmlInputText;
import javax.faces.context.FacesContext;
import org.primefaces.component.api.Widget;
/**
* InputNumber
*
* @author Mauricio Fenoglio / last modified by $Author$
* @version $Revision$
* @since 0.3
*/
@ResourceDependencies({
@ResourceDependency(library = "primefaces", name = "primefaces.css"),
@ResourceDependency(library = "primefaces", name = "jquery/jquery.js"),
@ResourceDependency(library = "primefaces", name = "primefaces.js"),
@ResourceDependency(library = "primefaces-extensions", name = "primefaces-extensions.js"),
@ResourceDependency(library = "primefaces-extensions", name = "inputnumber/inputnumber.js")
})
public class InputNumber extends HtmlInputText implements Widget {
public static final String COMPONENT_FAMILY = "org.primefaces.extensions.component";
private static final String DEFAULT_RENDERER = "org.primefaces.extensions.component.InputNumberRenderer";
private static final String OPTIMIZED_PACKAGE = "org.primefaces.extensions.component.";
public final static String INPUTNUMBER_INPUT_WRAPPER_CLASS = "ui-helper-hidden";
public final static String INPUTNUMBER_CLASS = "ui-inputNum ui-widget";
/**
* PropertyKeys
*
* @author Mauricio Fenoglio / last modified by $Author:
* fenoloco@gmail.com $
* @version $Revision$
* @since 0.3
*/
protected enum PropertyKeys {
widgetVar,
decimalSeparator,
thousandSeparator,
symbol,
symbolPosition,
minValue,
maxValue,
roundMethod,
decimalPlaces;
String toString;
PropertyKeys(String toString) {
this.toString = toString;
}
PropertyKeys() {
}
@Override
public String toString() {
return ((this.toString != null) ? this.toString : super.toString());
}
}
public InputNumber() {
setRendererType(DEFAULT_RENDERER);
}
@Override
public String getFamily() {
return COMPONENT_FAMILY;
}
public String getWidgetVar() {
return (String) getStateHelper().eval(PropertyKeys.widgetVar, null);
}
public void setWidgetVar(final String widgetVar) {
setAttribute(PropertyKeys.widgetVar, widgetVar);
}
public String getDecimalSeparator() {
return (String) getStateHelper().eval(PropertyKeys.decimalSeparator, "");
}
public void setDecimalSeparator(final String decimalSeparator) {
setAttribute(PropertyKeys.decimalSeparator, decimalSeparator);
}
public String getThousandSeparator() {
return (String) getStateHelper().eval(PropertyKeys.thousandSeparator, null);
}
public void setThousandSeparator(final String thousandSeparator) {
setAttribute(PropertyKeys.thousandSeparator, thousandSeparator);
}
public String getSymbol() {
return (String) getStateHelper().eval(PropertyKeys.symbol, "");
}
public void setSymbol(final String symbol) {
setAttribute(PropertyKeys.symbol, symbol);
}
public String getSymbolPosition() {
return (String) getStateHelper().eval(PropertyKeys.symbolPosition, "");
}
public void setSymbolPosition(final String symbolPosition) {
setAttribute(PropertyKeys.symbolPosition, symbolPosition);
}
public String getMinValue() {
return (String) getStateHelper().eval(PropertyKeys.minValue, "");
}
public void setMinValue(final String minValue) {
setAttribute(PropertyKeys.minValue, minValue);
}
public String getMaxValue() {
return (String) getStateHelper().eval(PropertyKeys.maxValue, "");
}
public void setMaxValue(final String maxValue) {
setAttribute(PropertyKeys.maxValue, maxValue);
}
public String getRoundMethod() {
return (String) getStateHelper().eval(PropertyKeys.roundMethod, "");
}
public void setRoundMethod(final String roundMethod) {
setAttribute(PropertyKeys.roundMethod, roundMethod);
}
public String getDecimalPlaces() {
return (String) getStateHelper().eval(PropertyKeys.decimalPlaces, "");
}
public void setDecimalPlaces(final String decimalPlaces) {
setAttribute(PropertyKeys.decimalPlaces, decimalPlaces);
}
public String resolveWidgetVar() {
final FacesContext context = FacesContext.getCurrentInstance();
final String userWidgetVar = (String) getAttributes().get(org.primefaces.extensions.component.inputnumber.InputNumber.PropertyKeys.widgetVar.toString());
if (userWidgetVar != null) {
return userWidgetVar;
}
return "widget_" + getClientId(context).replaceAll("-|" + UINamingContainer.getSeparatorChar(context), "_");
}
public void setAttribute(final org.primefaces.extensions.component.inputnumber.InputNumber.PropertyKeys property, final Object value) {
getStateHelper().put(property, value);
@SuppressWarnings("unchecked")
List<String> setAttributes =
(List<String>) this.getAttributes().get("javax.faces.component.UIComponentBase.attributesThatAreSet");
if (setAttributes == null) {
final String cname = this.getClass().getName();
if (cname != null && cname.startsWith(OPTIMIZED_PACKAGE)) {
setAttributes = new ArrayList<String>(6);
this.getAttributes().put("javax.faces.component.UIComponentBase.attributesThatAreSet", setAttributes);
}
}
if (setAttributes != null && value == null) {
final String attributeName = property.toString();
final ValueExpression ve = getValueExpression(attributeName);
if (ve == null) {
setAttributes.remove(attributeName);
} else if (!setAttributes.contains(attributeName)) {
setAttributes.add(attributeName);
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
44f6159d9ea92907f048b3e2d851a00111e6181c
|
dc54f3bff7c875d361f363b1a17b205ae8faad2f
|
/OpenGLCamera/app/src/main/java/org/huihui/openglcamera/filter/ScreenOutputFilter.java
|
4e63715045d88f9e75e44e984ee6547ff8bfe239
|
[] |
no_license
|
ab503044120/OPENGL-Demo
|
33af164d0a6e48d43befedf81350e5c03a96bddc
|
ddbafa87e7aad862e351bb144db4a80d91d7c158
|
refs/heads/master
| 2021-01-20T00:53:38.568380
| 2017-09-29T10:21:30
| 2017-09-29T10:21:30
| 89,209,148
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 451
|
java
|
package org.huihui.openglcamera.filter;
import android.content.Context;
import org.huihui.openglcamera.utils.MatrixUtils;
/**
* 输出到屏幕滤镜
* Created by Administrator on 2017/5/24.
*/
public class ScreenOutputFilter extends Filter {
public ScreenOutputFilter(Context context) {
super(context);
}
@Override
public void init() {
mPositionMatrix = MatrixUtils.IdentityM(16);
super.init();
}
}
|
[
"503044120@qq.com"
] |
503044120@qq.com
|
acbb725766e2357d22c7ce4c4732ca5ef0b769bc
|
cbdf94efc7b3c9481d8bedc37177b9e6e475281f
|
/src/main/java/io/atomix/client/utils/concurrent/BlockingAwareSingleThreadContext.java
|
ec5271af7a2b8501918c40cfc83c2396319d763b
|
[
"Apache-2.0"
] |
permissive
|
adibrastegarnia/java-client
|
6bc9b3d00e4e16bd2d5307306d0fd27bf4ec1234
|
94f7ab76de594132e1e375bda8ab78a595c185a1
|
refs/heads/master
| 2022-06-01T15:03:04.968970
| 2020-02-19T01:10:33
| 2020-02-19T01:10:33
| 255,681,404
| 0
| 0
|
Apache-2.0
| 2020-04-14T17:43:28
| 2020-04-14T17:43:27
| null |
UTF-8
|
Java
| false
| false
| 1,545
|
java
|
/*
* Copyright 2019-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.atomix.client.utils.concurrent;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadFactory;
import static io.atomix.client.utils.concurrent.Threads.namedThreads;
/**
* Blocking aware single thread context.
*/
public class BlockingAwareSingleThreadContext extends SingleThreadContext {
private final Executor threadPoolExecutor;
public BlockingAwareSingleThreadContext(String nameFormat, Executor threadPoolExecutor) {
this(namedThreads(nameFormat, LOGGER), threadPoolExecutor);
}
public BlockingAwareSingleThreadContext(ThreadFactory factory, Executor threadPoolExecutor) {
super(factory);
this.threadPoolExecutor = threadPoolExecutor;
}
@Override
public void execute(Runnable command) {
if (isBlocked()) {
threadPoolExecutor.execute(command);
} else {
super.execute(command);
}
}
}
|
[
"jordan.halterman@gmail.com"
] |
jordan.halterman@gmail.com
|
1288c68962c2d9d9ac604092d4f554c590cad040
|
182c89dc4ff66ac4e41800268dc48c51cd8490a6
|
/AgentDevelopmentTools/VisualSoar/src/main/java/edu/umich/soar/visualsoar/dialogs/AgentNamePanel.java
|
22effe48f21c84b7cff395215fd195fba4fc6476
|
[
"BSD-3-Clause",
"BSD-2-Clause"
] |
permissive
|
sleyzerzon/soar
|
9e48cffb21679a74fed6d4c9ea34cf1f29189cf9
|
74a6f32ba1be3a7b3ed4eac0b44b0f4b2e981f71
|
refs/heads/master
| 2021-01-10T03:22:06.869609
| 2014-06-18T03:09:10
| 2014-06-18T03:09:10
| 43,619,714
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,070
|
java
|
package edu.umich.soar.visualsoar.dialogs;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.text.*;
import javax.swing.border.*;
/**
* Panel that contians the input field for the name of the agent
* in the new agent dialog
* @author Jon Bauman
* @see NewAgentDialog
*/
class AgentNamePanel extends JPanel {
JTextField nameField = new JTextField("untitled-agent", 20);
public AgentNamePanel() {
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
add(nameField);
setBorder(new CompoundBorder(
BorderFactory.createTitledBorder("Agent Name"),
BorderFactory.createEmptyBorder(10,10,10,10)));
nameField.select(0, 14);
// So that enter can affirmatively dismiss the dialog
nameField.getKeymap().removeKeyStrokeBinding(
KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));
}
/**
* @return the inputted name for the new agent
*/
public String getName() {
return nameField.getText();
}
public void requestFocus() {
nameField.requestFocus();
}
}
|
[
"mazzin@915bf4ee-6d5f-11de-9cf4-4bf9f06b8206"
] |
mazzin@915bf4ee-6d5f-11de-9cf4-4bf9f06b8206
|
ae31878e47400ab5df7d8e3e8e4a8c86e3da20b0
|
db97ce70bd53e5c258ecda4c34a5ec641e12d488
|
/src/main/java/com/alipay/api/response/KoubeiQualityTestShieldCaselaunchApplyResponse.java
|
1282cafb513d71b56ec19f9a37eae1042ec04da1
|
[
"Apache-2.0"
] |
permissive
|
smitzhang/alipay-sdk-java-all
|
dccc7493c03b3c937f93e7e2be750619f9bed068
|
a835a9c91e800e7c9350d479e84f9a74b211f0c4
|
refs/heads/master
| 2022-11-23T20:32:27.041116
| 2020-08-03T13:03:02
| 2020-08-03T13:03:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 663
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.quality.test.shield.caselaunch.apply response.
*
* @author auto create
* @since 1.0, 2020-01-08 14:48:06
*/
public class KoubeiQualityTestShieldCaselaunchApplyResponse extends AlipayResponse {
private static final long serialVersionUID = 6262457412877527591L;
/**
* 拓展信息
*/
@ApiField("ext_infos")
private String extInfos;
public void setExtInfos(String extInfos) {
this.extInfos = extInfos;
}
public String getExtInfos( ) {
return this.extInfos;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
e037b053a9f638e428e08642944021ea47c605ab
|
2b1821134bb02ec32f71ddbc63980d6e9c169b65
|
/algorithms/src/main/java/com/github/mdssjc/algorithms/sort/concrete/ShellSort.java
|
c7b92586bff830c49c37f30ed788c359916c43ca
|
[] |
no_license
|
mdssjc/study
|
a52f8fd6eb1f97db0ad523131f45d5caf914f01b
|
2ca51a968e254a01900bffdec76f1ead2acc8912
|
refs/heads/master
| 2023-04-04T18:24:06.091047
| 2023-03-17T00:55:50
| 2023-03-17T00:55:50
| 39,316,435
| 3
| 1
| null | 2023-03-04T00:50:33
| 2015-07-18T23:53:39
|
Java
|
UTF-8
|
Java
| false
| false
| 540
|
java
|
package com.github.mdssjc.algorithms.sort.concrete;
import com.github.mdssjc.algorithms.sort.Sort;
/**
* ShellSort.
*
* @author Marcelo dos Santos
*
*/
public class ShellSort implements Sort {
public void sort(final Comparable[] a) {
final int n = a.length;
int h = 1;
while (h < n / 3) {
h = 3 * h + 1;
}
while (h >= 1) {
for (int i = h; i < n; i++) {
for (int j = i; j >= h && less(a[j], a[j - h]); j -= h) {
exch(a, j, j - h);
}
}
h = h / 3;
}
}
}
|
[
"mdssjc@gmail.com"
] |
mdssjc@gmail.com
|
0e1e7bb97baff9c813a017772e23ffe1443663bf
|
21bbdb608191c2e174015d8476c1a08d65a91c24
|
/src/main/java/com/jbm/game/engine/thread/queue/IActionQueue.java
|
afbad2235a261bfdfff2fbc1295cdcc56b025038
|
[] |
no_license
|
Ox0400/game-service-engine
|
19eca65125d6f4d23ac2984b5c849a00ce920528
|
229115a1e849cc9bf0be3639dc8ea8e14cfd050e
|
refs/heads/master
| 2023-03-22T13:35:11.228908
| 2018-08-16T07:26:49
| 2018-08-16T07:26:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 735
|
java
|
package com.jbm.game.engine.thread.queue;
import java.util.Queue;
import com.jbm.game.engine.thread.queue.action.Action;
import com.jbm.game.engine.thread.queue.action.DelayAction;
/**
* action 队列接口
* @author JiangBangMing
*
* 2018年7月13日 下午9:34:50
*/
public interface IActionQueue<T extends Action,E extends DelayAction> {
/**
* 添加延时执行任务
* @param delayAction
*/
public void enDelayQueue(E delayAction);
/**
* 清空队列
*/
public void clear();
/**
* 获取队列
* @return
*/
public Queue<T> getActionQueue();
/**
* 入队列
* @param action
*/
public void enqueue(T action);
/**
* 出队列
* @param action
*/
public void dequeue(T action);
}
|
[
"jiangbang617@sina.cn"
] |
jiangbang617@sina.cn
|
d04b9ba8abeda1e8693fd8a334c9b0b6b0a828f9
|
b5502ea9580e882a1c530f6e5914ce090e2d00a6
|
/experiment/CASSANDRA/cassandra/src/java/org/apache/cassandra/db/transform/BaseRows.java
|
b9a93a7ee39e5949ee462b6d78fe7bb7b8794979
|
[
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-public-domain"
] |
permissive
|
Lingzhi-Ouyang/Almost-Strong-Consistency-Cassandra
|
a3fb54a8c35805a6810532719d7a8da99998f997
|
2b9aa8e78e134fc8811ea6caff3daca1f4a92936
|
refs/heads/master
| 2021-07-09T01:13:04.424482
| 2020-11-03T03:12:13
| 2020-11-03T03:12:13
| 205,116,322
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,754
|
java
|
package org.apache.cassandra.db.transform;
import org.apache.cassandra.config.CFMetaData;
import org.apache.cassandra.db.DecoratedKey;
import org.apache.cassandra.db.PartitionColumns;
import org.apache.cassandra.db.rows.*;
import static org.apache.cassandra.utils.Throwables.merge;
public abstract class BaseRows<R extends Unfiltered, I extends BaseRowIterator<? extends Unfiltered>>
extends BaseIterator<Unfiltered, I, R>
implements BaseRowIterator<R>
{
private Row staticRow;
private DecoratedKey partitionKey;
public BaseRows(I input)
{
super(input);
staticRow = input.staticRow();
partitionKey = input.partitionKey();
}
// swap parameter order to avoid casting errors
BaseRows(BaseRows<?, ? extends I> copyFrom)
{
super(copyFrom);
staticRow = copyFrom.staticRow;
partitionKey = copyFrom.partitionKey();
}
public CFMetaData metadata()
{
return input.metadata();
}
public boolean isReverseOrder()
{
return input.isReverseOrder();
}
public PartitionColumns columns()
{
return input.columns();
}
public DecoratedKey partitionKey()
{
return input.partitionKey();
}
public Row staticRow()
{
return staticRow;
}
// **************************
@Override
protected Throwable runOnClose(int length)
{
Throwable fail = null;
Transformation[] fs = stack;
for (int i = 0 ; i < length ; i++)
{
try
{
fs[i].onPartitionClose();
}
catch (Throwable t)
{
fail = merge(fail, t);
}
}
return fail;
}
@Override
void add(Transformation transformation)
{
transformation.attachTo(this);
super.add(transformation);
// transform any existing data
staticRow = transformation.applyToStatic(staticRow);
next = applyOne(next, transformation);
partitionKey = transformation.applyToPartitionKey(partitionKey);
}
@Override
protected Unfiltered applyOne(Unfiltered value, Transformation transformation)
{
return value == null
? null
: value instanceof Row
? transformation.applyToRow((Row) value)
: transformation.applyToMarker((RangeTombstoneMarker) value);
}
@Override
public final boolean hasNext()
{
Stop stop = this.stop;
while (this.next == null)
{
Transformation[] fs = stack;
int len = length;
while (!stop.isSignalled && input.hasNext())
{
Unfiltered next = input.next();
if (next.isRow())
{
Row row = (Row) next;
for (int i = 0 ; row != null && i < len ; i++)
row = fs[i].applyToRow(row);
next = row;
}
else
{
RangeTombstoneMarker rtm = (RangeTombstoneMarker) next;
for (int i = 0 ; rtm != null && i < len ; i++)
rtm = fs[i].applyToMarker(rtm);
next = rtm;
}
if (next != null)
{
this.next = next;
return true;
}
}
if (stop.isSignalled || !hasMoreContents())
return false;
}
return true;
}
}
|
[
"lingzhi.ouyang@outlook.com"
] |
lingzhi.ouyang@outlook.com
|
6eace6b7ebb5ce165c0c03d20cd65e98c55120c8
|
73cc3242200fbead9fc36c21a8f80f4246628d6b
|
/basetool/src/main/java/com/zhuyongdi/basetool/widget/WaveView.java
|
8cda66b1cbd3b7cee58d8b8b8530e33e5be7c516
|
[] |
no_license
|
zhuyongdi/base-tool
|
6338f562dd54fa1fb790a75da34aa5ec3096aed5
|
7c1a97c216058f4318076bbf5df58ad0cdb80420
|
refs/heads/master
| 2020-04-29T04:07:43.041059
| 2019-05-10T09:11:42
| 2019-05-10T09:11:42
| 175,837,141
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,477
|
java
|
package com.zhuyongdi.basetool.widget;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.Interpolator;
import android.view.animation.LinearInterpolator;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* 水波纹View,仿网易云音乐鲸云特效
* Created by Administrator on 2018/10/16.
*/
public class WaveView extends View {
private float mInitialRadius; // 初始波纹半径
private float mMaxRadiusRate = 0.85f; // 如果没有设置mMaxRadius,可mMaxRadius = 最小长度 * mMaxRadiusRate;
private float mMaxRadius; // 最大波纹半径
private long mDuration = 2000; // 一个波纹从创建到消失的持续时间
private int mSpeed = 500; // 波纹的创建速度,每500ms创建一个
private Interpolator mInterpolator = new LinearInterpolator();
private List<Circle> mCircleList = new ArrayList<>();
private boolean mIsRunning;
private boolean mMaxRadiusSet;
private Paint mPaint;
private long mLastCreateTime;
private Runnable mCreateCircle = new Runnable() {
@Override
public void run() {
if (mIsRunning) {
newCircle();
postDelayed(mCreateCircle, mSpeed);
}
}
};
public WaveView(Context context) {
this(context, null);
}
public WaveView(Context context, AttributeSet attrs) {
super(context, attrs);
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
setStyle(Paint.Style.FILL);
}
public void setStyle(Paint.Style style) {
mPaint.setStyle(style);
}
@Override
protected void onSizeChanged(int w, int h, int oldW, int oldH) {
if (!mMaxRadiusSet) {
mMaxRadius = Math.min(w, h) * mMaxRadiusRate / 2.0f;
}
}
public void setMaxRadiusRate(float maxRadiusRate) {
this.mMaxRadiusRate = maxRadiusRate;
}
public void setColor(int color) {
mPaint.setColor(color);
}
/**
* 开始
*/
public void start() {
if (!mIsRunning) {
mIsRunning = true;
mCreateCircle.run();
}
}
/**
* 停止
*/
public void stop() {
mIsRunning = false;
}
protected void onDraw(Canvas canvas) {
Iterator<Circle> iterator = mCircleList.iterator();
while (iterator.hasNext()) {
Circle circle = iterator.next();
if (System.currentTimeMillis() - circle.mCreateTime < mDuration) {
mPaint.setAlpha(circle.getAlpha());
canvas.drawCircle(getWidth() / 2f, getHeight() / 2f, circle.getCurrentRadius(), mPaint);
} else {
iterator.remove();
}
}
if (mCircleList.size() > 0) {
postInvalidateDelayed(5);
}
}
public void setInitialRadius(float radius) {
mInitialRadius = radius;
}
public void setDuration(long duration) {
this.mDuration = duration;
}
public void setMaxRadius(float maxRadius) {
this.mMaxRadius = maxRadius;
mMaxRadiusSet = true;
}
public void setSpeed(int speed) {
mSpeed = speed;
}
private void newCircle() {
long currentTime = System.currentTimeMillis();
if (currentTime - mLastCreateTime < mSpeed) {
return;
}
Circle circle = new Circle();
mCircleList.add(circle);
invalidate();
mLastCreateTime = currentTime;
}
private class Circle {
private long mCreateTime;
Circle() {
this.mCreateTime = System.currentTimeMillis();
}
int getAlpha() {
float percent = (System.currentTimeMillis() - mCreateTime) * 1.0f / mDuration;
return (int) ((1.0f - mInterpolator.getInterpolation(percent)) * 255);
}
float getCurrentRadius() {
float percent = (System.currentTimeMillis() - mCreateTime) * 1.0f / mDuration;
return mInitialRadius + mInterpolator.getInterpolation(percent) * (mMaxRadius - mInitialRadius);
}
}
public void setInterpolator(Interpolator interpolator) {
mInterpolator = interpolator;
if (mInterpolator == null) {
mInterpolator = new LinearInterpolator();
}
}
}
|
[
"904507761@qq.com"
] |
904507761@qq.com
|
3617c815a7e83fb5b96b72424687cd29f0fc7e52
|
52c36ce3a9d25073bdbe002757f08a267abb91c6
|
/src/main/java/com/alipay/api/domain/KbVirtualShopInfo.java
|
eecd2f1e2a19ed9231de6b251e0e71537614ff98
|
[
"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
| 1,022
|
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, 2020-03-31 21:59:15
*/
public class KbVirtualShopInfo extends AlipayObject {
private static final long serialVersionUID = 1633525661464569263L;
/**
* 门店信息
*/
@ApiListField("catetory_list")
@ApiField("kbdish_virtual_category_info")
private List<KbdishVirtualCategoryInfo> catetoryList;
/**
* 口碑门店id
*/
@ApiField("shop_id")
private String shopId;
public List<KbdishVirtualCategoryInfo> getCatetoryList() {
return this.catetoryList;
}
public void setCatetoryList(List<KbdishVirtualCategoryInfo> catetoryList) {
this.catetoryList = catetoryList;
}
public String getShopId() {
return this.shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
841a904bc7d367b8c209203e61b2c521be26ce95
|
6c52903f326b43f5339b18b1525a6623a4f9de0f
|
/src/leetcode/datastructure/array/SearchRange34.java
|
40be49cd82c96d01032fcba4d3ec54dafb86a73c
|
[] |
no_license
|
underwindfall/Algorithme
|
19f31710cc2a6bf2f4e3f0652225c7ab8858e5ac
|
2284b7791c99354a3132366131290e2f37aae6dc
|
refs/heads/master
| 2022-10-17T14:25:52.815940
| 2022-09-29T08:32:20
| 2022-09-29T08:32:20
| 203,821,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,718
|
java
|
package leetcode.datastructure.array;
// https://leetcode-cn.com/problems/find-first-and-last-position-of-element-in-sorted-array/
public class SearchRange34 {
/**
* 思路通过调换nums[mid] < target 是判断前面的数字,nums[mid] > target 判断后面的数字
* @param nums
* @param target
* @return
*/
public int[] searchRange(int[] nums, int target) {
int len = nums.length;
if (len == 0) {
return new int[] { -1, -1 };
}
int leftIndex = findLeftIndex(nums, target);
if (leftIndex == -1) {
return new int[] { -1, -1 };
}
int rightIndex = findRightIndex(nums, target);
return new int[] { leftIndex, rightIndex };
}
private int findLeftIndex(int[] nums, int target) {
int left = 0, right = nums.length - 1;
while (left < right) {
int mid = (right - left) / 2 + left;
if (nums[mid] < target) {
left = mid + 1;
} else if (nums[mid] == target) {
right = mid;
} else {
right = mid - 1;
}
}
if (nums[left] == target) {
return left;
} else {
return -1;
}
}
private int findRightIndex(int[] nums, int target) {
int left = 0, right = nums.length - 1;
while (left < right) {
int mid = (right - left + 1) / 2 + left;
if (nums[mid] > target) {
right = mid - 1;
} else if (nums[mid] == target) {
left = mid;
} else {
left = mid + 1;
}
}
return left;
}
}
|
[
"14819756+underwindfall@users.noreply.github.com"
] |
14819756+underwindfall@users.noreply.github.com
|
d6845b15314b7cffd87c9ea338036d1ac84fdd9c
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes10.dex_source_from_JADX/com/facebook/events/permalink/about/DetailsTextView.java
|
3182c9c4ea8f3f0dfbe3c73bde8ac69f2b71234e
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,559
|
java
|
package com.facebook.events.permalink.about;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.LinearGradient;
import android.graphics.Rect;
import android.graphics.Shader.TileMode;
import android.text.Layout.Alignment;
import android.text.Spannable;
import android.text.StaticLayout;
import android.text.method.LinkMovementMethod;
import android.util.AttributeSet;
import android.util.SparseIntArray;
import android.view.MotionEvent;
import com.facebook.loom.logger.LogEntry.EntryType;
import com.facebook.loom.logger.Logger;
import com.facebook.resources.ui.FbTextView;
import com.facebook.tools.dextr.runtime.LogUtils;
/* compiled from: cancelnag_ */
public class DetailsTextView extends FbTextView {
private float f17896a = 1.0f;
private float f17897b = 0.0f;
private boolean f17898c;
private boolean f17899d;
public boolean f17900e;
private int f17901f;
private int f17902g;
private int f17903h;
private int f17904i;
private int f17905j;
private Rect f17906k;
public DetailsTextViewListener f17907l;
private SparseIntArray f17908m;
private SparseIntArray f17909n;
/* compiled from: cancelnag_ */
public interface DetailsTextViewListener {
void mo817a();
void mo818b();
}
public DetailsTextView(Context context) {
super(context);
}
public DetailsTextView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
m18312b();
}
public DetailsTextView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
m18312b();
}
private void m18312b() {
Resources resources = getResources();
this.f17904i = resources.getColor(2131363341);
this.f17903h = resources.getDimensionPixelSize(2131431167);
this.f17902g = 12;
setMaxLines(this.f17902g);
this.f17906k = new Rect();
this.f17909n = new SparseIntArray();
this.f17908m = new SparseIntArray();
this.f17905j = getResources().getConfiguration().orientation;
setFocusable(false);
}
public boolean onTouchEvent(MotionEvent motionEvent) {
int a = Logger.a(2, EntryType.UI_INPUT_START, 1699243285);
if (motionEvent.getAction() != 1) {
Logger.a(2, EntryType.UI_INPUT_END, 101834885, a);
} else if (this.f17898c && (getText() instanceof Spannable) && getMovementMethod().onTouchEvent(this, (Spannable) getText(), motionEvent)) {
LogUtils.a(-547447938, a);
} else {
m18313c();
LogUtils.a(-353157975, a);
}
return true;
}
public void setOnExpandCollapseListener(DetailsTextViewListener detailsTextViewListener) {
this.f17907l = detailsTextViewListener;
}
private void m18313c() {
if (this.f17898c) {
m18314d();
} else {
m18315e();
}
}
private void m18315e() {
if (this.f17901f < this.f17902g) {
this.f17902g = this.f17901f;
}
this.f17898c = true;
setMaxLines(Integer.MAX_VALUE);
m18316f();
if (this.f17907l != null) {
this.f17907l.mo817a();
}
}
private void setFadingGradient(int i) {
getPaint().setShader(new LinearGradient(0.0f, (float) (i - this.f17903h), 0.0f, (float) i, getCurrentTextColor(), this.f17904i, TileMode.CLAMP));
}
private void m18316f() {
getPaint().setShader(null);
}
protected void onLayout(boolean z, int i, int i2, int i3, int i4) {
if (this.f17899d) {
if (!this.f17898c && getLineCount() <= this.f17901f) {
this.f17898c = true;
this.f17900e = true;
m18316f();
} else if (getLineCount() > this.f17901f) {
this.f17898c = false;
this.f17900e = false;
setFadingGradient(getHeight());
}
this.f17899d = false;
}
super.onLayout(z, i, i2, i3, i4);
}
protected void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
this.f17899d = true;
if (getLayoutParams() != null) {
getLayoutParams().height = -2;
}
if (this.f17908m != null) {
this.f17908m.clear();
}
if (this.f17909n != null) {
this.f17909n.clear();
}
super.onTextChanged(charSequence, i, i2, i3);
}
public void setMaxLines(int i) {
this.f17901f = i;
super.setMaxLines(i);
}
public void setLineSpacing(float f, float f2) {
super.setLineSpacing(f, f2);
this.f17896a = f2;
this.f17897b = f;
}
private void m18314d() {
if (!this.f17900e) {
getLocalVisibleRect(this.f17906k);
this.f17898c = false;
setMaxLines(this.f17902g);
setFadingGradient(getCollapsedStateHeight());
if (this.f17907l != null) {
this.f17907l.mo818b();
}
}
}
private boolean m18317g() {
return this.f17900e;
}
private void setIsRigid(boolean z) {
this.f17900e = z;
}
public final void m18319a() {
setMovementMethod(LinkMovementMethod.getInstance());
setFocusable(false);
}
private void m18318h() {
if (this.f17909n.indexOfKey(this.f17905j) <= 0 || this.f17908m.indexOfKey(this.f17905j) <= 0) {
StaticLayout staticLayout = new StaticLayout(getText(), getPaint(), (getWidth() - getCompoundPaddingLeft()) - getCompoundPaddingRight(), Alignment.ALIGN_NORMAL, this.f17896a, this.f17897b, true);
this.f17908m.put(this.f17905j, (staticLayout.getHeight() + getCompoundPaddingBottom()) + getCompoundPaddingTop());
this.f17909n.put(this.f17905j, (staticLayout.getLineTop(this.f17902g) + getCompoundPaddingTop()) + getCompoundPaddingBottom());
}
}
private int getExpandedStateHeight() {
m18318h();
return this.f17908m.get(this.f17905j);
}
private int getCollapsedStateHeight() {
m18318h();
return this.f17909n.get(this.f17905j);
}
protected void onConfigurationChanged(Configuration configuration) {
if (this.f17905j != configuration.orientation) {
this.f17905j = configuration.orientation;
getLayoutParams().height = -2;
}
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
7f96b3d40bfef7119fe535a2a435b5013ff6f54e
|
04993ec330462593a8d64d3cbda0275053420ace
|
/JHCreditCardApplyFor/src/main/java/com/juhe/creditcardapplyfor/bo/Message.java
|
9899182590c2740f1df1e79eebf333b02d8f447c
|
[] |
no_license
|
jsy579579/jh
|
60af71fada0462c45f527943f22c1a9ccd8268fd
|
44858ab7fbf461cd382efe436473d9581d4c067a
|
refs/heads/master
| 2022-05-13T22:28:16.095115
| 2020-04-29T03:20:14
| 2020-04-29T03:20:14
| 259,813,186
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,205
|
java
|
package com.juhe.creditcardapplyfor.bo;
import java.io.Serializable;
/**
* @author Administrator
* @title: Message
* @projectName creditcard
* @description: TODO
* @date 2019/7/26 17:30
*/
public class Message implements Serializable {
private static final long serialVersionUID = 1L;
private String errCode;
private String message;
private Object data;
public Message(String errCode, String message, Object data) {
this.errCode = errCode;
this.message = message;
this.data = data;
}
public String getErrCode() {
return errCode;
}
public void setErrCode(String errCode) {
this.errCode = errCode;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
@Override
public String toString() {
return "Message{" +
"errCode='" + errCode + '\'' +
", message='" + message + '\'' +
", data=" + data +
'}';
}
}
|
[
"593380806@qq.com"
] |
593380806@qq.com
|
6dc38a54d00862ab80e753542af44efff7456d86
|
f4ca8ac58134e13070039fbb4022b6de544ebb2a
|
/Algorithm/LeetCode/_977_SquaresOfASortedArray.java
|
210651f95c636f6eea3f2f2e6a58c7542e1105ab
|
[] |
no_license
|
Jihannn/Algorithm
|
cc86afaeb316fc3e8cd4338065bbbbfcb008e45d
|
216fe0114858b0efab4aa9443ce7130e02e11aa2
|
refs/heads/master
| 2022-08-14T13:03:43.411037
| 2022-08-05T14:36:00
| 2022-08-05T14:36:00
| 193,438,998
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 699
|
java
|
/*
* @Author: Jihan
* @Date: 2022-07-31 22:47:05
* @Description: https://leetcode.cn/problems/squares-of-a-sorted-array/
*/
public class _977_SquaresOfASortedArray {
public int[] sortedSquares(int[] nums) {
int N = nums.length;
int[] res = new int[N];
int resIndex = N - 1;
int left = 0;
int right = N - 1;
while (left <= right) {
if (nums[left] * nums[left] > nums[right] * nums[right]) {
res[resIndex--] = nums[left] * nums[left];
left++;
} else {
res[resIndex--] = nums[right] * nums[right];
right--;
}
}
return res;
}
}
|
[
"gjihan97@gmail.com"
] |
gjihan97@gmail.com
|
80ccf3f6c0dee07991e65f9c2df1c577b25c4166
|
144044f9282c50253a75bd8d5c23f619ad38fdf8
|
/biao-boss/src/main/java/com/thinkgem/jeesite/modules/market/web/MkAutoTradeUserController.java
|
ef8941e18a9f8ccea39a1ace44095c97fe2e7718
|
[] |
no_license
|
clickear/biao
|
ba645de06b4e92b0539b05404c061194669f4570
|
af71fd055c4ff3aa0b767a0a8b4eb74328e00f6f
|
refs/heads/master
| 2020-05-16T15:47:33.675136
| 2019-09-25T08:20:28
| 2019-09-25T08:20:28
| 183,143,104
| 0
| 0
| null | 2019-04-24T03:46:28
| 2019-04-24T03:46:28
| null |
UTF-8
|
Java
| false
| false
| 3,317
|
java
|
/**
* Copyright © 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package com.thinkgem.jeesite.modules.market.web;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.market.entity.MkAutoTradeUser;
import com.thinkgem.jeesite.modules.market.service.MkAutoTradeUserService;
/**
* 自动交易用户Controller
* @author zhangzijun
* @version 2018-08-17
*/
@Controller
@RequestMapping(value = "${adminPath}/market/mkAutoTradeUser")
public class MkAutoTradeUserController extends BaseController {
@Autowired
private MkAutoTradeUserService mkAutoTradeUserService;
@ModelAttribute
public MkAutoTradeUser get(@RequestParam(required=false) String id) {
MkAutoTradeUser entity = null;
if (StringUtils.isNotBlank(id)){
entity = mkAutoTradeUserService.get(id);
}
if (entity == null){
entity = new MkAutoTradeUser();
}
return entity;
}
@RequiresPermissions("market:mkAutoTradeUser:view")
@RequestMapping(value = {"list", ""})
public String list(MkAutoTradeUser mkAutoTradeUser, HttpServletRequest request, HttpServletResponse response, Model model) {
Page<MkAutoTradeUser> page = mkAutoTradeUserService.findPage(new Page<MkAutoTradeUser>(request, response), mkAutoTradeUser);
model.addAttribute("page", page);
return "modules/market/mkAutoTradeUserList";
}
@RequiresPermissions("market:mkAutoTradeUser:view")
@RequestMapping(value = "form")
public String form(MkAutoTradeUser mkAutoTradeUser, Model model) {
model.addAttribute("mkAutoTradeUser", mkAutoTradeUser);
return "modules/market/mkAutoTradeUserForm";
}
@RequiresPermissions("market:mkAutoTradeUser:edit")
@RequestMapping(value = "save")
public String save(MkAutoTradeUser mkAutoTradeUser, Model model, RedirectAttributes redirectAttributes) {
if (!beanValidator(model, mkAutoTradeUser)){
return form(mkAutoTradeUser, model);
}
if(mkAutoTradeUser.getIsNewRecord()){
mkAutoTradeUser.setSource("add");
}
mkAutoTradeUserService.save(mkAutoTradeUser);
addMessage(redirectAttributes, "保存自动交易用户成功");
return "redirect:"+Global.getAdminPath()+"/market/mkAutoTradeUser/?repage";
}
@RequiresPermissions("market:mkAutoTradeUser:edit")
@RequestMapping(value = "delete")
public String delete(MkAutoTradeUser mkAutoTradeUser, RedirectAttributes redirectAttributes) {
mkAutoTradeUserService.delete(mkAutoTradeUser);
addMessage(redirectAttributes, "删除自动交易用户成功");
return "redirect:"+Global.getAdminPath()+"/market/mkAutoTradeUser/?repage";
}
}
|
[
"1072163919@qq.com"
] |
1072163919@qq.com
|
68e07fd4f246cc1ce753e5aef36976047a29f05d
|
04bc5d81cf74251eae7e82f2d813c1f6ff0a39c5
|
/src/main/java/me/rabrg/paragon/ParagonApi.java
|
9eb5095c08a43f4de74a7c208e80c65df5264ec5
|
[] |
no_license
|
Rabrg/paragon-api
|
5d690bec49d626dcd10af44c9599de30375e4139
|
6f4923f23255cf9a41dd0855a8ab2350c78a0d7f
|
refs/heads/master
| 2021-06-16T18:38:41.469589
| 2017-05-17T22:13:10
| 2017-05-17T22:13:10
| 91,619,489
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,421
|
java
|
package me.rabrg.paragon;
import me.rabrg.paragon.model.account.Account;
import me.rabrg.paragon.model.account.AccountFind;
import me.rabrg.paragon.model.account.AccountHeroStats;
import me.rabrg.paragon.model.account.AccountStats;
import me.rabrg.paragon.model.card.Card;
import me.rabrg.paragon.model.card.CardComplete;
import me.rabrg.paragon.model.hero.Hero;
import me.rabrg.paragon.model.hero.HeroComplete;
import me.rabrg.paragon.service.AccountService;
import me.rabrg.paragon.service.CardService;
import me.rabrg.paragon.service.HeroService;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import java.io.IOException;
import java.util.List;
public class ParagonApi {
private final OkHttpClient client;
private final Retrofit retrofit;
private final AccountService accountService;
private final CardService cardService;
private final HeroService heroService;
public ParagonApi(final String apiKey) {
final OkHttpClient.Builder httpClient = new OkHttpClient.Builder();
httpClient.addInterceptor((chain) -> {
final Request original = chain.request();
final Request.Builder requestBuilder = original.newBuilder()
.addHeader("X-Epic-ApiKey", apiKey)
.addHeader("Accept", "application/json; charset=utf-8");
final Request request = requestBuilder.build();
return chain.proceed(request);
});
client = httpClient.build();
retrofit = new Retrofit.Builder()
.baseUrl("https://developer-paragon.epicgames.com")
.client(client)
.addConverterFactory(GsonConverterFactory.create())
.build();
accountService = retrofit.create(AccountService.class);
cardService = retrofit.create(CardService.class);
heroService = retrofit.create(HeroService.class);
}
public Account account(final String accountId) throws IOException {
return body(accountService.account(accountId));
}
public AccountStats accountStats(final String accountId) throws IOException {
return body(accountService.accountStats(accountId));
}
public AccountHeroStats accountHeroStats(final String accountId, final String heroId) throws IOException {
return body(accountService.accountHeroStats(accountId, heroId));
}
public String accountFind(final String accountId) throws IOException {
return body(accountService.accountFind(accountId)).getAccountId();
}
public Card card(final String id) throws IOException {
return body(cardService.card(id));
}
public List<Card> cards() throws IOException {
return body(cardService.cards());
}
public List<CardComplete> cardsComplete() throws IOException {
return body(cardService.cardsComplete());
}
public Hero hero(final String id) throws IOException {
return body(heroService.hero(id));
}
public List<Hero> heroes() throws IOException {
return body(heroService.heroes());
}
public List<HeroComplete> heroesComplete() throws IOException {
return body(heroService.heroesComplete());
}
private <T> T body(final Call<T> call) throws IOException {
return call.execute().body();
}
}
|
[
"rabrg96@gmail.com"
] |
rabrg96@gmail.com
|
d481ae325937b196799b04037b14d23a441785b0
|
d98ff85991810e3cdf8f3cd53becb7ad29c1a909
|
/src/main/java/com/github/slamdunk/javabase/designpattern/structure/proxy/Proxy.java
|
e6418f0a5e9d250b5782b46c1c8ba059ba302f3f
|
[] |
no_license
|
SlumDunk/javabase
|
0e0136404a9cc76e70997599fb28d7b0df825b56
|
5c5aa4c278ff06db09171b79478a90c4f7cdba39
|
refs/heads/master
| 2021-04-27T02:35:23.111927
| 2018-02-25T08:45:31
| 2018-02-25T08:45:31
| 122,697,144
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 841
|
java
|
package com.github.slamdunk.javabase.designpattern.structure.proxy;
import com.github.slamdunk.javabase.designpattern.claz.SourceableImpl;
import com.github.slamdunk.javabase.designpattern.interfaces.Sourceable;
/**
* a proxy class
*
* @author liuzhongda
*
*/
public class Proxy implements Sourceable {
private SourceableImpl source;
public Proxy() {
super();
this.source = new SourceableImpl();
}
public void methodC() {
// TODO Auto-generated method stub
before();
source.methodC();
after();
}
public void methodD() {
// TODO Auto-generated method stub
before();
source.methodD();
after();
}
private void before() {
// TODO Auto-generated method stub
System.out.println("before proxy");
}
private void after() {
// TODO Auto-generated method stub
System.out.println("after proxy");
}
}
|
[
"1430701240@qq.com"
] |
1430701240@qq.com
|
afd3ee06e3e13ccbca86b8c47bb20beff182519e
|
53189efbfed5423821a84f631da404d07a80e404
|
/storage/app/Al-QuranIndonesia_com.andi.alquran.id_source_from_JADX/com/google/android/gms/internal/C1701k.java
|
8c0df88b219282fcd8e1b4d79f5cc1db57330846
|
[
"MIT"
] |
permissive
|
dwijpr/islam
|
0c9b77028d34862b6d06858c5b0d6ffec91b5014
|
6077291a619ac2f5b30a77e284c0a7361e7c8ad4
|
refs/heads/master
| 2021-01-19T17:16:49.818251
| 2017-03-13T23:00:08
| 2017-03-13T23:00:08
| 82,430,213
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,157
|
java
|
package com.google.android.gms.internal;
import android.os.Bundle;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.C1263g;
import com.google.android.gms.common.api.C1274a;
import com.google.android.gms.common.api.C1274a.C1267c;
import com.google.android.gms.internal.wm.C1475a;
import java.util.Collections;
/* renamed from: com.google.android.gms.internal.k */
public class C1701k implements C1639m {
private final C1829n f4588a;
public C1701k(C1829n c1829n) {
this.f4588a = c1829n;
}
public <A extends C1267c, T extends C1475a<? extends C1263g, A>> T m7057a(T t) {
throw new IllegalStateException("GoogleApiClient is not connected yet.");
}
public void m7058a() {
this.f4588a.m7755g();
this.f4588a.f5075g.f4687d = Collections.emptySet();
}
public void m7059a(int i) {
}
public void m7060a(Bundle bundle) {
}
public void m7061a(ConnectionResult connectionResult, C1274a<?> c1274a, int i) {
}
public boolean m7062b() {
return true;
}
public void m7063c() {
this.f4588a.m7753e();
}
}
|
[
"dwijpr@gmail.com"
] |
dwijpr@gmail.com
|
32453759748df7f03fb6efd4a0e4b3d25f67ccb5
|
af0048b7c1fddba3059ae44cd2f21c22ce185b27
|
/springframework/src/main/java/org/springframework/web/context/support/RequestHandledEvent.java
|
6b6ea54770726880e026e02c65183ca79733e8b8
|
[] |
no_license
|
P79N6A/whatever
|
4b51658fc536887c870d21b0c198738ed0d1b980
|
6a5356148e5252bdeb940b45d5bbeb003af2f572
|
refs/heads/master
| 2020-07-02T19:58:14.366752
| 2019-08-10T14:45:17
| 2019-08-10T14:45:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,345
|
java
|
package org.springframework.web.context.support;
import org.springframework.context.ApplicationEvent;
import org.springframework.lang.Nullable;
@SuppressWarnings("serial")
public class RequestHandledEvent extends ApplicationEvent {
@Nullable
private String sessionId;
@Nullable
private String userName;
private final long processingTimeMillis;
@Nullable
private Throwable failureCause;
public RequestHandledEvent(Object source, @Nullable String sessionId, @Nullable String userName, long processingTimeMillis) {
super(source);
this.sessionId = sessionId;
this.userName = userName;
this.processingTimeMillis = processingTimeMillis;
}
public RequestHandledEvent(Object source, @Nullable String sessionId, @Nullable String userName, long processingTimeMillis, @Nullable Throwable failureCause) {
this(source, sessionId, userName, processingTimeMillis);
this.failureCause = failureCause;
}
public long getProcessingTimeMillis() {
return this.processingTimeMillis;
}
@Nullable
public String getSessionId() {
return this.sessionId;
}
@Nullable
public String getUserName() {
return this.userName;
}
public boolean wasFailure() {
return (this.failureCause != null);
}
@Nullable
public Throwable getFailureCause() {
return this.failureCause;
}
public String getShortDescription() {
StringBuilder sb = new StringBuilder();
sb.append("session=[").append(this.sessionId).append("]; ");
sb.append("user=[").append(this.userName).append("]; ");
return sb.toString();
}
public String getDescription() {
StringBuilder sb = new StringBuilder();
sb.append("session=[").append(this.sessionId).append("]; ");
sb.append("user=[").append(this.userName).append("]; ");
sb.append("time=[").append(this.processingTimeMillis).append("ms]; ");
sb.append("status=[");
if (!wasFailure()) {
sb.append("OK");
} else {
sb.append("failed: ").append(this.failureCause);
}
sb.append(']');
return sb.toString();
}
@Override
public String toString() {
return ("RequestHandledEvent: " + getDescription());
}
}
|
[
"heavenlystate@163.com"
] |
heavenlystate@163.com
|
3d929878cba418c49284fad3ca587a8cb790a15a
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/test_apks/insecurebank/source/com/google/android/gms/wearable/internal/zzb.java
|
f893a9d4877a2049843262a488fa8b3af62a5dd5
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 2,403
|
java
|
package com.google.android.gms.wearable.internal;
import android.content.IntentFilter;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.zza;
import com.google.android.gms.common.internal.safeparcel.zza.zza;
public class zzb
implements Parcelable.Creator<AddListenerRequest>
{
public zzb() {}
static void zza(AddListenerRequest paramAddListenerRequest, Parcel paramParcel, int paramInt)
{
int i = com.google.android.gms.common.internal.safeparcel.zzb.zzac(paramParcel);
com.google.android.gms.common.internal.safeparcel.zzb.zzc(paramParcel, 1, paramAddListenerRequest.zzCY);
com.google.android.gms.common.internal.safeparcel.zzb.zza(paramParcel, 2, paramAddListenerRequest.zzAT(), false);
com.google.android.gms.common.internal.safeparcel.zzb.zza(paramParcel, 3, paramAddListenerRequest.zzaTr, paramInt, false);
com.google.android.gms.common.internal.safeparcel.zzb.zza(paramParcel, 4, paramAddListenerRequest.zzaTs, false);
com.google.android.gms.common.internal.safeparcel.zzb.zza(paramParcel, 5, paramAddListenerRequest.zzaTt, false);
com.google.android.gms.common.internal.safeparcel.zzb.zzH(paramParcel, i);
}
public AddListenerRequest zzgK(Parcel paramParcel)
{
String str1 = null;
int j = zza.zzab(paramParcel);
int i = 0;
String str2 = null;
IntentFilter[] arrayOfIntentFilter = null;
IBinder localIBinder = null;
while (paramParcel.dataPosition() < j)
{
int k = zza.zzaa(paramParcel);
switch (zza.zzbA(k))
{
default:
zza.zzb(paramParcel, k);
break;
case 1:
i = zza.zzg(paramParcel, k);
break;
case 2:
localIBinder = zza.zzp(paramParcel, k);
break;
case 3:
arrayOfIntentFilter = (IntentFilter[])zza.zzb(paramParcel, k, IntentFilter.CREATOR);
break;
case 4:
str2 = zza.zzo(paramParcel, k);
break;
case 5:
str1 = zza.zzo(paramParcel, k);
}
}
if (paramParcel.dataPosition() != j) {
throw new zza.zza("Overread allowed size end=" + j, paramParcel);
}
return new AddListenerRequest(i, localIBinder, arrayOfIntentFilter, str2, str1);
}
public AddListenerRequest[] zzjP(int paramInt)
{
return new AddListenerRequest[paramInt];
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
80ea8630386af2642ce89517137f4f9f79ea42b9
|
c8481097025c0e6d99b8ba85c6ea84134f333d39
|
/api/src/main/java/com/yanzhenjie/andserver/framework/ModifiedInterceptor.java
|
e800e1d429699b756d77d491aaaba76e832f7ea8
|
[
"Apache-2.0"
] |
permissive
|
yangxiaoge/AndServer
|
bea3546771693e88adcfbad9d09c4328bd76e179
|
9a5830d0aa0160a1536c4aaa9440ec4bb809595e
|
refs/heads/master
| 2021-08-06T17:13:27.236187
| 2020-05-14T05:07:21
| 2020-05-14T05:07:21
| 174,468,521
| 1
| 0
|
Apache-2.0
| 2019-03-08T04:22:47
| 2019-03-08T04:22:47
| null |
UTF-8
|
Java
| false
| false
| 2,080
|
java
|
/*
* Copyright 2018 Yan Zhenjie.
*
* 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.yanzhenjie.andserver.framework;
import android.support.annotation.NonNull;
import android.util.Log;
import com.yanzhenjie.andserver.AndServer;
import com.yanzhenjie.andserver.framework.handler.RequestHandler;
import com.yanzhenjie.andserver.http.HttpMethod;
import com.yanzhenjie.andserver.http.HttpRequest;
import com.yanzhenjie.andserver.http.HttpResponse;
import com.yanzhenjie.andserver.http.Modified;
import java.io.IOException;
/**
* Created by YanZhenjie on 2018/9/14.
*/
public class ModifiedInterceptor implements HandlerInterceptor {
@Override
public boolean onIntercept(@NonNull HttpRequest request, @NonNull HttpResponse response,
@NonNull RequestHandler handler) throws Exception {
// Process cache header, if supported by the handler.
HttpMethod method = request.getMethod();
if (method == HttpMethod.GET || method == HttpMethod.HEAD) {
String eTag = null;
try {
eTag = handler.getETag(request);
} catch (IOException ignored) {
Log.w(AndServer.TAG, ignored.getMessage());
}
long lastModified = -1;
try {
lastModified = handler.getLastModified(request);
} catch (IOException ignored) {
Log.w(AndServer.TAG, ignored.getMessage());
}
return new Modified(request, response).process(eTag, lastModified);
}
return false;
}
}
|
[
"im.yanzhenjie@gmail.com"
] |
im.yanzhenjie@gmail.com
|
8da1b3e0c33b2424c5e46decbf31d47b862310c4
|
a5491b14e36b3a4d308b392f3b17a85fe6c1c17c
|
/app/src/main/java/com/fenazola/mxcome/entry/CommentDatailEntry.java
|
6cd49f3e2335da5564bbd2088480ced0a2e3535a
|
[] |
no_license
|
Xdone111/mxcome_android
|
c3ef8ea1d993afe8fd6aa07295562c790e0d804c
|
7e56d1777a0de0135e9b3eb46ae8a36d9369c372
|
refs/heads/master
| 2020-03-17T04:57:43.940130
| 2018-05-14T02:42:56
| 2018-05-14T02:42:56
| 133,296,442
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 671
|
java
|
package com.fenazola.mxcome.entry;
import java.io.Serializable;
/**
* Created by XDONE on 2017/5/23.
*/
public class CommentDatailEntry implements Serializable {
public String getNikeName() {
return nikeName;
}
public void setNikeName(String nikeName) {
this.nikeName = nikeName;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
private String nikeName;
private String time;
private String label;
}
|
[
"502180980@qq.com"
] |
502180980@qq.com
|
a7005056994c07b006682d1dba8106d6e2e59d47
|
b97bc0706448623a59a7f11d07e4a151173b7378
|
/src/main/java/com/tcmis/ws/scanner/beans/Sample.java
|
11d7f1263641aa608abb956196ea9f36132c06bd
|
[] |
no_license
|
zafrul-ust/tcmISDev
|
576a93e2cbb35a8ffd275fdbdd73c1f9161040b5
|
71418732e5465bb52a0079c7e7e7cec423a1d3ed
|
refs/heads/master
| 2022-12-21T15:46:19.801950
| 2020-02-07T21:22:50
| 2020-02-07T21:22:50
| 241,601,201
| 0
| 0
| null | 2022-12-13T19:29:34
| 2020-02-19T11:08:43
|
Java
|
UTF-8
|
Java
| false
| false
| 144
|
java
|
package com.tcmis.ws.scanner.beans;
public class Sample extends PickingUnit {
// Empty class just to make things easier for the BeanHandler
}
|
[
"julio.rivero@wescoair.com"
] |
julio.rivero@wescoair.com
|
3de67e3a3232d80e334847555b27e79575fff43a
|
f0cba7b74f4379819fb8d0d171a283479babe884
|
/src/main/java/com/alipay/api/domain/AlipayFundAuthOrderVoucherCreateModel.java
|
d59a29321824bdcc839f517bf955589ee89476e7
|
[
"Apache-2.0"
] |
permissive
|
kenhuang/alipay-sdk
|
48f7b2dfa7566ec95b01c6e68cdefa8321312a5a
|
2ecf9116a96be52442ce040a15b9d09ef06043f6
|
refs/heads/master
| 2021-05-07T05:00:47.286551
| 2017-11-20T11:31:33
| 2017-11-20T11:31:33
| 111,361,108
| 0
| 0
| null | 2017-11-20T04:20:09
| 2017-11-20T04:20:09
| null |
UTF-8
|
Java
| false
| false
| 3,720
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 资金授权发码接口
*
* @author auto create
* @since 1.0, 2017-09-07 13:48:40
*/
public class AlipayFundAuthOrderVoucherCreateModel extends AlipayObject {
private static final long serialVersionUID = 8247577242846267563L;
/**
* 需要冻结的金额,单位为:元(人民币),精确到小数点后两位
取值范围:[0.01,100000000.00]
*/
@ApiField("amount")
private String amount;
/**
* 业务扩展参数,用于商户的特定业务信息的传递,json格式
*/
@ApiField("extra_param")
private String extraParam;
/**
* 业务订单的简单描述,如商品名称等
长度不超过100个字母或50个汉字
*/
@ApiField("order_title")
private String orderTitle;
/**
* 商户授权资金订单号,创建后不能修改,需要保证在商户端不重复。
*/
@ApiField("out_order_no")
private String outOrderNo;
/**
* 商户本次资金操作的请求流水号,用于标示请求流水的唯一性,需要保证在商户端不重复。
*/
@ApiField("out_request_no")
private String outRequestNo;
/**
* 该笔订单允许的最晚付款时间,逾期将关闭该笔订单
取值范围:1m~15d。m-分钟,h-小时,d-天。 该参数数值不接受小数点, 如 1.5h,可转换为90m
如果为空,默认15m
*/
@ApiField("pay_timeout")
private String payTimeout;
/**
* 收款方支付宝账号(Email或手机号),如果收款方支付宝登录号(payee_logon_id)和用户号(payee_user_id)同时传递,则以用户号(payee_user_id)为准,如果商户有勾选花呗渠道,收款方支付宝登录号(payee_logon_id)和用户号(payee_user_id)不能同时为空。
*/
@ApiField("payee_logon_id")
private String payeeLogonId;
/**
* 收款方的支付宝唯一用户号,以2088开头的16位纯数字组成,如果非空则会在支付时校验交易的的收款方与此是否一致,如果商户有勾选花呗渠道,收款方支付宝登录号(payee_logon_id)和用户号(payee_user_id)不能同时为空。
*/
@ApiField("payee_user_id")
private String payeeUserId;
/**
* 销售产品码,后续新接入预授权当面付的业务,本字段取值固定为PRE_AUTH。
*/
@ApiField("product_code")
private String productCode;
public String getAmount() {
return this.amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getExtraParam() {
return this.extraParam;
}
public void setExtraParam(String extraParam) {
this.extraParam = extraParam;
}
public String getOrderTitle() {
return this.orderTitle;
}
public void setOrderTitle(String orderTitle) {
this.orderTitle = orderTitle;
}
public String getOutOrderNo() {
return this.outOrderNo;
}
public void setOutOrderNo(String outOrderNo) {
this.outOrderNo = outOrderNo;
}
public String getOutRequestNo() {
return this.outRequestNo;
}
public void setOutRequestNo(String outRequestNo) {
this.outRequestNo = outRequestNo;
}
public String getPayTimeout() {
return this.payTimeout;
}
public void setPayTimeout(String payTimeout) {
this.payTimeout = payTimeout;
}
public String getPayeeLogonId() {
return this.payeeLogonId;
}
public void setPayeeLogonId(String payeeLogonId) {
this.payeeLogonId = payeeLogonId;
}
public String getPayeeUserId() {
return this.payeeUserId;
}
public void setPayeeUserId(String payeeUserId) {
this.payeeUserId = payeeUserId;
}
public String getProductCode() {
return this.productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
}
|
[
"howechiang@gmail.com"
] |
howechiang@gmail.com
|
746f8d91c1b38ce97aca9a64c5bffd449e7e5ffe
|
8247e9a4b3994260b35b69f0960e74d4baddef73
|
/amrProject/src/main/java/com/sun/amr/service/IDetailsService.java
|
af9f6139824fcd78fb8ee5ac434b2affead00228
|
[] |
no_license
|
venwhere/amrProject
|
2bec0cadfa484bab8ac563f26bdba738522b6366
|
257d045966f1ecf43d1d3c1e17acd4ee41912547
|
refs/heads/master
| 2021-08-31T12:47:08.038193
| 2017-12-21T10:13:22
| 2017-12-21T10:13:22
| 114,751,349
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,722
|
java
|
package com.sun.amr.service;
import java.util.List;
import java.util.Map;
import com.sun.amr.vo.Details;
public interface IDetailsService {
/**
* 增加前的准备操作
* @param eid 雇员的编号(权限验证)
* @return
* @throws Exception
*/
public Map<String, Object> addPre(int eid) throws Exception;
/**
* 进行数据的插入操作
* @param vo 保存具体信息的vo类
* @param eid 雇员的编号(权限验证)
* @return
* @throws Exception
*/
public boolean add(Details vo,int eid) throws Exception;
/**
* 实现待购清单的查询,调用数据层的findAllPrebuy()方法
* @param eid 当前用户的编号
* @return
* @throws Exception
*/
public List<Details> listDetails(int eid) throws Exception;
/**
* 实现根据编号进行批量删除,调用了数据层的findAllByPhoto()和doRemoveBatch()
* @param eid 操作人的编号,权限验证
* @param ids 被删除的清单编号的集合
* @return
* @throws Exception
*/
public Map<String, Object> rm(int eid,List<Integer> ids) throws Exception;
/**
* 实现数量的修改,调用数据层的doUpdateAmount()和findAllByPhoto()方法
* @param eid 操作人的编号
* @param dinfo 保存的编号和数量:key是编号,value是数量
* @param ids 保存了要删除的清单的编号的集合
* @return 返回数据:
* 1、要被删除清单的信息,目的是返回控制层中进行对应的的照片删除
* 2、最终修改的标记:false或者true
* @throws Exception
*/
public Map<String, Object> editAmount(int eid,Map<Integer, Integer> dinfo,List<Integer> ids)
throws Exception;
/**
* 实现修改前的数据回显,需要回显一级类别信息、二级信息、基本信息
* @param eid 操作人的编号
* @param did 清单的编号
* @return 返回的数据是一个Map集合,集合中的数据有:<br>
* <li>key="allTypes",value=ITypeDAO.findAll()</li>
* <li>key="allSubtypes",value=ISubTypeDAO.findAllByType()</li>
* <li>key="details",value=IDetailsDAO.findByIdForPrebuy</li>
* @throws Exception
*/
public Map<String, Object> editPre(int eid,int did) throws Exception;
/**
* 实现清单的真正编辑,调用数据层的doUpdatePrebuy()
* @param eid 操作人员的编号
* @param vo 包含了修改信息的vo对象
* @return 返回执行的状态值
* @throws Exception
*/
public boolean edit(int eid,Details vo) throws Exception;
/**
* 实现已有办公用品的追加购买处理操作
* @param eid 雇员编号
* @param rid 办公用品的编号
* @return
* @throws Exception
*/
public boolean addAppend(int eid,int rid) throws Exception;
}
|
[
"123456@qq.com"
] |
123456@qq.com
|
797a5293dc963a892381a3e4726ed3eb5dcc6ec6
|
97fd02f71b45aa235f917e79dd68b61c62b56c1c
|
/src/main/java/com/tencentcloudapi/essbasic/v20201222/models/ModifySealResponse.java
|
c618683b71cb50a8721ed30eac45508082c8b964
|
[
"Apache-2.0"
] |
permissive
|
TencentCloud/tencentcloud-sdk-java
|
7df922f7c5826732e35edeab3320035e0cdfba05
|
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
|
refs/heads/master
| 2023-09-04T10:51:57.854153
| 2023-09-01T03:21:09
| 2023-09-01T03:21:09
| 129,837,505
| 537
| 317
|
Apache-2.0
| 2023-09-13T02:42:03
| 2018-04-17T02:58:16
|
Java
|
UTF-8
|
Java
| false
| false
| 2,441
|
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.essbasic.v20201222.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class ModifySealResponse extends AbstractModel{
/**
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
@SerializedName("RequestId")
@Expose
private String RequestId;
/**
* Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public String getRequestId() {
return this.RequestId;
}
/**
* Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public void setRequestId(String RequestId) {
this.RequestId = RequestId;
}
public ModifySealResponse() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public ModifySealResponse(ModifySealResponse source) {
if (source.RequestId != null) {
this.RequestId = new String(source.RequestId);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
|
[
"tencentcloudapi@tencent.com"
] |
tencentcloudapi@tencent.com
|
7bbec284f9546f0c03911df6f162dc112d465c31
|
842a417608acb4e324ab3301b5d6ddfb72ec6d3c
|
/app/src/main/java/com/kingja/trainingday/greendao/DaoMaster.java
|
91d2f42346ce5bbaafe9a4a3ddbd8eaed5f6b671
|
[] |
no_license
|
KingJA/TrainingDay
|
fb60b108beaad1c21f624359f8527ee12a7681a1
|
f8fc7eb25233bea6dc1b1d4ae2f8b14fdc3aa74e
|
refs/heads/master
| 2021-01-23T10:07:51.013091
| 2017-06-20T09:12:11
| 2017-06-20T09:12:11
| 93,040,398
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,520
|
java
|
package com.kingja.trainingday.greendao;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.util.Log;
import org.greenrobot.greendao.AbstractDaoMaster;
import org.greenrobot.greendao.database.StandardDatabase;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.database.DatabaseOpenHelper;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* Master of DAO (schema version 1): knows all DAOs.
*/
public class DaoMaster extends AbstractDaoMaster {
public static final int SCHEMA_VERSION = 1;
/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
PlanDao.createTable(db, ifNotExists);
PlanClockDao.createTable(db, ifNotExists);
PlanDayDao.createTable(db, ifNotExists);
}
/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
PlanDao.dropTable(db, ifExists);
PlanClockDao.dropTable(db, ifExists);
PlanDayDao.dropTable(db, ifExists);
}
/**
* WARNING: Drops all table on Upgrade! Use only during development.
* Convenience method using a {@link DevOpenHelper}.
*/
public static DaoSession newDevSession(Context context, String name) {
Database db = new DevOpenHelper(context, name).getWritableDb();
DaoMaster daoMaster = new DaoMaster(db);
return daoMaster.newSession();
}
public DaoMaster(SQLiteDatabase db) {
this(new StandardDatabase(db));
}
public DaoMaster(Database db) {
super(db, SCHEMA_VERSION);
registerDaoClass(PlanDao.class);
registerDaoClass(PlanClockDao.class);
registerDaoClass(PlanDayDao.class);
}
public DaoSession newSession() {
return new DaoSession(db, IdentityScopeType.Session, daoConfigMap);
}
public DaoSession newSession(IdentityScopeType type) {
return new DaoSession(db, type, daoConfigMap);
}
/**
* Calls {@link #createAllTables(Database, boolean)} in {@link #onCreate(Database)} -
*/
public static abstract class OpenHelper extends DatabaseOpenHelper {
public OpenHelper(Context context, String name) {
super(context, name, SCHEMA_VERSION);
}
public OpenHelper(Context context, String name, CursorFactory factory) {
super(context, name, factory, SCHEMA_VERSION);
}
@Override
public void onCreate(Database db) {
Log.i("greenDAO", "Creating tables for schema version " + SCHEMA_VERSION);
createAllTables(db, false);
}
}
/** WARNING: Drops all table on Upgrade! Use only during development. */
public static class DevOpenHelper extends OpenHelper {
public DevOpenHelper(Context context, String name) {
super(context, name);
}
public DevOpenHelper(Context context, String name, CursorFactory factory) {
super(context, name, factory);
}
@Override
public void onUpgrade(Database db, int oldVersion, int newVersion) {
Log.i("greenDAO", "Upgrading schema from version " + oldVersion + " to " + newVersion + " by dropping all tables");
dropAllTables(db, true);
onCreate(db);
}
}
}
|
[
"kingjavip@gmail.com"
] |
kingjavip@gmail.com
|
c4db443a3bfa540598ebce2a5cb1636aa83babff
|
0ab16e405f2540554db89d36d49fae3486e118a4
|
/src/main/java/io/webfolder/cdp/JsFunction.java
|
0c201818a97a47aa94f07e62dae48b5473ef73f1
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
chrisp-d/cdp4j
|
900f8ea9e44699afb48742a0380b469f7057415f
|
0b12df9f58107baeb797732ff4944cfcc16dcd11
|
refs/heads/master
| 2020-03-30T19:04:50.227218
| 2018-09-21T17:19:04
| 2018-09-21T17:19:04
| 151,526,975
| 1
| 0
|
NOASSERTION
| 2018-10-04T06:16:51
| 2018-10-04T06:16:51
| null |
UTF-8
|
Java
| false
| false
| 1,415
|
java
|
/**
* cdp4j Commercial License
*
* Copyright 2018 WebFolder OÜ
*
* Permission is hereby granted, to "____"
* obtaining a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
* merge, publish, distribute and sublicense of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package io.webfolder.cdp;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* JsFunction marks a functional interface as being the definition of a JavaScript function.
*/
@Retention(RUNTIME)
@Target({METHOD})
public @interface JsFunction {
/**
* javascript function body
*/
String value();
}
|
[
"support@webfolder.io"
] |
support@webfolder.io
|
92ee7ee9e7938569b3b28f850115adaeb37ec4ed
|
0deedda003b0052394db2e3e219ec79f487b3fa4
|
/src/com/zone/vchest/commands/SetChestLimit.java
|
24696988de04c5b9ea5583b261334ed34db6aa09
|
[] |
no_license
|
ericpauley/VirtualChest
|
7ce5d5c46547f513cdde21f479fbfbc33a1f8931
|
ef8b6bca79c93177e6741959b538197ccb7ac22d
|
refs/heads/master
| 2021-01-01T08:53:32.905307
| 2012-08-20T06:30:04
| 2012-08-20T06:30:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,476
|
java
|
/************************************************************************
* This file is part of GiftPost.
*
* GiftPost 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.
*
* GiftPost 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 GiftPost. If not, see <http://www.gnu.org/licenses/>.
************************************************************************/
package com.zone.vchest.commands;
import static com.zone.vchest.utils.Display.chestKeeper;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.zone.vchest.VirtualChestWorker;
/**
* @author Balor (aka Antoine Aflalo)
*
*/
public class SetChestLimit implements GPCommand {
/*
* (non-Javadoc)
*
* @see
* com.Balor.commands.GPCommand#execute(com.Balor.bukkit.GiftPost.GiftPostWorker
* , org.bukkit.command.CommandSender, java.lang.String[])
*/
public void execute(VirtualChestWorker gpw, CommandSender sender, String[] args) {
if (args.length != 3) {
sender.sendMessage(getHelp());
return;
}
gpw.getFileManager().createChestLimitFile(args[1], Integer.parseInt(args[2]));
sender.sendMessage(chestKeeper() + args[1] + " chest's limit is now " + args[2]);
}
/*
* (non-Javadoc)
*
* @see com.Balor.commands.GPCommand#validate(com.Balor.bukkit.GiftPost.
* GiftPostWorker, org.bukkit.command.CommandSender, java.lang.String[])
*/
public boolean validate(VirtualChestWorker gpw, CommandSender sender, String[] args) {
return (gpw.hasFlag(args, "lim") || gpw.hasFlag(args, "limit"))
&& gpw.hasPerm((Player) sender, getPermName());
}
/*
* (non-Javadoc)
*
* @see com.Balor.commands.GPCommand#getPermName()
*/
public String getPermName() {
return "giftpost.admin.limit";
}
public String getHelp() {
return ChatColor.GOLD + "/gp lim PlayerName limit" + ChatColor.WHITE
+ ": set the chest's limit for the PlayerName(case sensitive)";
}
}
|
[
"zonedabone@gmail.com"
] |
zonedabone@gmail.com
|
db3544c2f3e278834da1607f4a2fb375f890a2dd
|
f822e4abb0ca705bb0ed3d4cf0ed4a3bf9be11ed
|
/src/test/java_/org/zmlx/hg4idea/test/HgRevertTest.java
|
5ee6e00e12c033c58d1ac16de9504fa739d50b78
|
[
"Apache-2.0"
] |
permissive
|
consulo/consulo-mercurial
|
4c642efb28bb7ef2809df1d3bd827d75221cf40e
|
58bc2eb6353f348254be1e716c05156040e6acae
|
refs/heads/master
| 2023-07-20T06:35:47.330892
| 2023-06-05T13:32:57
| 2023-06-05T13:32:57
| 19,280,973
| 0
| 0
| null | 2015-02-20T22:20:22
| 2014-04-29T15:14:40
|
Python
|
UTF-8
|
Java
| false
| false
| 2,162
|
java
|
package org.zmlx.hg4idea.test;
import org.junit.Test;
import org.zmlx.hg4idea.HgRevisionNumber;
import org.zmlx.hg4idea.command.HgCatCommand;
import org.zmlx.hg4idea.command.HgRevertCommand;
import org.zmlx.hg4idea.execution.HgCommandResult;
import java.io.File;
import java.nio.charset.Charset;
import java.util.Collections;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
public abstract class HgRevertTest extends HgSingleUserTest {
@Test
public void testRevertToCurrentRevision() throws Exception {
fillFile(myProjectDir, new String[]{"file.txt"}, "initial contents");
runHgOnProjectRepo("add", ".");
runHgOnProjectRepo("commit", "-m", "initial contents");
fillFile(myProjectDir, new String[]{"file.txt"}, "new contents");
HgRevertCommand revertCommand = new HgRevertCommand(myProject);
revertCommand.execute(myRepo.getDir(), Collections.singleton(new File(myProjectDir, "file.txt").getPath()), null, false);
HgCatCommand catCommand = new HgCatCommand(myProject);
HgCommandResult result = catCommand.execute(getHgFile("file.txt"), null, Charset.defaultCharset());
assertNotNull(result);
assertEquals(result.getRawOutput(), "initial contents");
}
@Test
public void testRevertToGivenRevision() throws Exception {
fillFile(myProjectDir, new String[]{"file.txt"}, "initial contents");
runHgOnProjectRepo("add", ".");
runHgOnProjectRepo("commit", "-m", "initial contents");
fillFile(myProjectDir, new String[]{"file.txt"}, "new contents");
runHgOnProjectRepo("commit", "-m", "new contents");
HgRevertCommand revertCommand = new HgRevertCommand(myProject);
revertCommand.execute(myRepo.getDir(), Collections.singleton(new File(myProjectDir, "file.txt").getPath()),
HgRevisionNumber.getLocalInstance("0"), false);
HgCatCommand catCommand = new HgCatCommand(myProject);
HgCommandResult result = catCommand.execute(getHgFile("file.txt"), HgRevisionNumber.getLocalInstance("0"), Charset.defaultCharset());
assertNotNull(result);
assertEquals(result.getRawOutput(), "initial contents");
}
}
|
[
"vistall.valeriy@gmail.com"
] |
vistall.valeriy@gmail.com
|
81c55b7f3320b4f5a4c0fe59b71a59a8e4d45281
|
b9a14875c2c2983bf940a63c66d46e9580b8eabe
|
/modules/model/src/main/java/io/cattle/platform/core/addon/StackConfiguration.java
|
bb31180e4c4661c76a38c2e9113fbbee1ad80266
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
bartoszcisek/cattle
|
a341d93dc4feb010c9b1efe07b4ddb665f952391
|
f59058d70fdb139f9259c2e3d697c0f57b615862
|
refs/heads/master
| 2020-03-21T17:37:16.010693
| 2017-10-17T19:01:18
| 2017-10-17T19:01:18
| 138,843,076
| 0
| 0
|
Apache-2.0
| 2018-06-27T07:05:59
| 2018-06-27T07:05:58
| null |
UTF-8
|
Java
| false
| false
| 1,375
|
java
|
package io.cattle.platform.core.addon;
import io.github.ibuildthecloud.gdapi.annotation.Field;
import io.github.ibuildthecloud.gdapi.annotation.Type;
@Type(list=false)
public class StackConfiguration {
String name;
Object templates;
String externalId;
String project;
Object answers;
public StackConfiguration() {
}
public StackConfiguration(Object templates, String externalId, Object answers) {
this.templates = templates;
this.externalId = externalId;
this.answers = answers;
}
@Field(typeString = "map[string]")
public Object getTemplates() {
return templates;
}
public void setTemplates(Object templates) {
this.templates = templates;
}
public String getExternalId() {
return externalId;
}
public void setExternalId(String externalId) {
this.externalId = externalId;
}
@Field(typeString = "map[json]")
public Object getAnswers() {
return answers;
}
public void setAnswers(Object answers) {
this.answers = answers;
}
public String getProject() {
return project;
}
public void setProject(String project) {
this.project = project;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"darren@rancher.com"
] |
darren@rancher.com
|
c5fc6930b1b1c40983871e585682dcd08e1b2433
|
53073a648fc85aee29d3d3080a2cc87937eb8cd9
|
/src/com/iskyshop/foundation/service/IStoreSlideService.java
|
9a27955add8ddd3171f3f49ac6455adf81846df4
|
[] |
no_license
|
Arlinlol/UziShop
|
850e1ac3a156339d0b6914934813502406e423f8
|
0a1a112638ac15341502f78d124683d2699e6de7
|
refs/heads/master
| 2021-01-19T07:19:03.808599
| 2014-03-28T07:56:42
| 2014-03-28T07:56:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 929
|
java
|
/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.iskyshop.foundation.service;
import com.iskyshop.core.query.support.IPageList;
import com.iskyshop.core.query.support.IQueryObject;
import com.iskyshop.foundation.domain.StoreSlide;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
public abstract interface IStoreSlideService {
public abstract boolean save(StoreSlide paramStoreSlide);
public abstract StoreSlide getObjById(Long paramLong);
public abstract boolean delete(Long paramLong);
public abstract boolean batchDelete(List<Serializable> paramList);
public abstract IPageList list(IQueryObject paramIQueryObject);
public abstract boolean update(StoreSlide paramStoreSlide);
public abstract List<StoreSlide> query(String paramString, Map paramMap, int paramInt1, int paramInt2);
}
|
[
"suhao@55317.com.cn"
] |
suhao@55317.com.cn
|
09863bf59bb67a9dcc363b6266aae8928a34299f
|
5dc3650814f32e89fa7b1ce3f35e852c56c7aff8
|
/src/com/proteus/cgen/verilogprime/ext/Seq_input_listContextExt.java
|
4290e2964ae3e16a3f61ff02b4e1ec6791c8c740
|
[] |
no_license
|
sureshgl/Verilog-Parser
|
3beda56a12f9d8e8110b225a090c73c8e7d6a850
|
6981223d8e5dc6b3da56acc6f17c28e12c7e6d47
|
refs/heads/master
| 2020-12-24T11:47:11.340855
| 2017-03-21T19:22:58
| 2017-03-21T19:22:58
| 85,744,141
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,036
|
java
|
package com.proteus.cgen.verilogprime.ext;
import org.antlr.v4.runtime.ParserRuleContext;
import lombok.Getter;
import com.proteus.cgen.verilogprime.PopulateExtendedContextVisitor;
import com.proteus.cgen.verilogprime.gen.VerilogPrimeParser.Seq_input_listContext;
public class Seq_input_listContextExt extends AbstractBaseExt{
@Getter private Seq_input_listContext ctx;
public Seq_input_listContextExt(Seq_input_listContext ctx) {
this.ctx = ctx;
}
@Override
public ParserRuleContext getContext(){
return ctx;
}
@Override
public ParserRuleContext getContext(String str){
return new PopulateExtendedContextVisitor().visit(getPrimeParser(str).seq_input_list());
}
@Override
public void setContext(ParserRuleContext ctx){
if(ctx != null){
if(ctx instanceof Seq_input_listContext){
this.ctx = (Seq_input_listContext) ctx;
} else {
throw new ClassCastException(ctx.getClass().getSimpleName() + " cannot be cased to "+Seq_input_listContext.class.getName());
}
} else {
this.ctx= null;
}
}
}
|
[
"suresh.goduguluru@gmail.com"
] |
suresh.goduguluru@gmail.com
|
948b399c0fac7ad7d585c4d9ac11736e1bd6673b
|
b9caa8b9e35781d82334e4c18d593307dfca1594
|
/TurkcellDesignPatterns/src/com/training/turkcell/dp/behavioral/strategy/bad/DusmanGelismisKaravan.java
|
b4562a8cd19a3e4f431ff4b751a3eab630e61da9
|
[] |
no_license
|
burhanorkun/tdesignpatterns
|
a34c27a3687bf40c83f4b3a33abc62970d5f798f
|
0202aa0ec1d983ac917bcef486a069b494d97e7a
|
refs/heads/master
| 2020-09-13T12:30:17.901599
| 2019-11-19T13:35:47
| 2019-11-19T13:35:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 173
|
java
|
package com.training.turkcell.dp.behavioral.strategy.bad;
public class DusmanGelismisKaravan extends DusmanGelismis {
public DusmanGelismisKaravan() {
super(20);
}
}
|
[
"osman.yaycioglu@gmail.com"
] |
osman.yaycioglu@gmail.com
|
3ba2139dcba5430c8c0e6e499fb9914094b5bcbd
|
1a132432388f4d8eee6fb9c74da8a88b99707c74
|
/src/main/java/com/belk/car/app/webapp/controller/security/ChangePasswordFormController.java
|
5742b79fa3229114c4a11200455b40d3b27941e1
|
[] |
no_license
|
Subbareddyg/CARS_new
|
7ed525e6f5470427e6343becd62e645e43558a6c
|
3024c932b54a7e0d808d887210b819bba2ccd1c1
|
refs/heads/master
| 2020-03-14T14:27:02.793772
| 2018-04-30T23:25:40
| 2018-04-30T23:25:40
| 131,653,774
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,280
|
java
|
package com.belk.car.app.webapp.controller.security;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.appfuse.model.User;
import org.json.JSONObject;
import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;
import com.belk.car.app.exceptions.SendEmailException;
import com.belk.car.app.model.NotificationType;
import com.belk.car.app.service.EmailManager;
import com.belk.car.app.webapp.controller.BaseFormController;
import com.belk.car.app.webapp.forms.ChangePasswordForm;
public class ChangePasswordFormController extends BaseFormController {
private EmailManager emailManager ;
public void setEmailManager(EmailManager emailManager) {
this.emailManager = emailManager;
}
public ChangePasswordFormController() {
setCommandName("changePasswordForm");
setCommandClass(ChangePasswordForm.class);
}
protected void onBindAndValidate(HttpServletRequest request,
Object command, BindException errors) throws Exception {
super.onBindAndValidate(request, command, errors);
if (isFormSubmission(request)) {
if (!errors.hasErrors()) {
ChangePasswordForm form = (ChangePasswordForm) command;
User user = this.getLoggedInUser();
if (!user.getEmailAddress().equals(form.getEmailAddress())) {
user = this.getUserManager().getUserByUsername(form.getEmailAddress());
}
form.setUser(user);
}
}
}
public ModelAndView onSubmit(HttpServletRequest request,
HttpServletResponse response, Object command, BindException errors)
throws Exception {
if (log.isDebugEnabled())
log.debug("entering forgotPasswordForm 'onSubmit' method...");
ChangePasswordForm form = (ChangePasswordForm) command;
User user = form.getUser();
if (user != null) {
//Reset the Users Password
user.setPassword(form.getPassword());
//Update User with the new password
this.getUserManager().saveUser(user);
// Send Email with the new password
NotificationType type = getCarLookupManager().getNotificationType(NotificationType.CHANGE_PASSWORD);
HashMap model = new HashMap() ;
model.put("newPassword", form.getPassword());
try {
emailManager.sendEmail(type, user, model);
} catch (SendEmailException see) {
log.debug("Error in sending password!!!");
}
}
String nextView = this.getSuccessView();
Map<String, Object> model = new HashMap<String, Object>();
if (isAjax(request)) {
model.put("success",true); //Fixed the PMD issue.
request.setAttribute("jsonObj", new JSONObject(model));
nextView = getAjaxView() ;
}
return new ModelAndView(nextView, model);
}
protected Object formBackingObject(HttpServletRequest request)
throws Exception {
String userId = request.getParameter("id");
ChangePasswordForm form = new ChangePasswordForm() ;
if (form == null) {
form = new ChangePasswordForm() ;
}
User user = null;
if (StringUtils.isNotBlank(userId)){
user = this.getUserManager().getUser(userId);
} else {
user = this.getLoggedInUser();
}
if (user != null) {
form.setEmailAddress(user.getUsername());
}
return form;
}
}
|
[
"subba_gunjikunta@belk.com"
] |
subba_gunjikunta@belk.com
|
bb414a4085b7a88704aa78e60885bfc581adce58
|
e369d9879042675c259345e9d83c99fabb27de64
|
/NS_Client201802/src/com/netsuite/webservices/transactions/sales_2018_2/types/AccountingTransactionRevenueStatus.java
|
8cbcf7c9ed2475f4b222258155e9e5f5b8445421
|
[] |
no_license
|
zbansi/intretech_netsuite
|
609d59949a36e080841a5341812005df414a79d6
|
17d56760fd8b920a378e373c4ab021877ece7315
|
refs/heads/master
| 2021-06-26T00:31:19.500230
| 2019-06-06T01:59:49
| 2019-06-06T01:59:49
| 154,297,224
| 0
| 0
| null | 2020-10-13T10:51:34
| 2018-10-23T09:06:33
|
Java
|
UTF-8
|
Java
| false
| false
| 3,452
|
java
|
/**
* AccountingTransactionRevenueStatus.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Jul 28, 2010 (04:07:04 PDT) WSDL2Java emitter.
*/
package com.netsuite.webservices.transactions.sales_2018_2.types;
public class AccountingTransactionRevenueStatus implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected AccountingTransactionRevenueStatus(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String __completed = "_completed";
public static final java.lang.String __inProgress = "_inProgress";
public static final java.lang.String __onRevCommitment = "_onRevCommitment";
public static final java.lang.String __pending = "_pending";
public static final AccountingTransactionRevenueStatus _completed = new AccountingTransactionRevenueStatus(__completed);
public static final AccountingTransactionRevenueStatus _inProgress = new AccountingTransactionRevenueStatus(__inProgress);
public static final AccountingTransactionRevenueStatus _onRevCommitment = new AccountingTransactionRevenueStatus(__onRevCommitment);
public static final AccountingTransactionRevenueStatus _pending = new AccountingTransactionRevenueStatus(__pending);
public java.lang.String getValue() { return _value_;}
public static AccountingTransactionRevenueStatus fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
AccountingTransactionRevenueStatus enumeration = (AccountingTransactionRevenueStatus)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static AccountingTransactionRevenueStatus fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumSerializer(
_javaType, _xmlType);
}
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumDeserializer(
_javaType, _xmlType);
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(AccountingTransactionRevenueStatus.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("urn:types.sales_2018_2.transactions.webservices.netsuite.com", "AccountingTransactionRevenueStatus"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
|
[
"alonjune@gmail.com"
] |
alonjune@gmail.com
|
0be6c7f94d95fa63dd6974db886d8eb933d871bf
|
cf18c1d3e78706b95120a37f5c30a802e39efde7
|
/syh_mall/src/main/java/com/visionet/syh_mall/service/mobile/RegisterService.java
|
f0df92345b777b968c2b2f630bac1165023e5e0c
|
[] |
no_license
|
JavaLeeLi/shscce_syh
|
c31447ebc4aa5b1a555a7e99567ffe8459664e87
|
2ccc815aabfe23051a305964170310a1e8a9f4c1
|
refs/heads/master
| 2021-04-15T09:47:24.389650
| 2018-03-27T03:07:08
| 2018-03-27T03:07:08
| 126,915,503
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,919
|
java
|
package com.visionet.syh_mall.service.mobile;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.visionet.syh_mall.common.utils.MessageUtils;
import com.visionet.syh_mall.entity.VerifyCode;
import com.visionet.syh_mall.repository.VerifyCodeRepository;
import com.visionet.syh_mall.vo.SMSVO;
/**
* @Author DM
* @version :2017年8月22日下午5:59:10 获取验证码service
*/
@Service
public class RegisterService {
@Autowired
private VerifyCodeRepository verifyCodeDao;
/**
* 验证码获取
*
* @return
* @author dm
* @throws Exception
*/
public SMSVO sendMessage(SMSVO smsvo) throws Exception {
String contentTemp = "用户注册验证码为:{verifyCode} (30分钟内有效)";
String code = MessageUtils.sendMessage(smsvo.getTelephone(), contentTemp);
addCode(smsvo.getTelephone(), code);
smsvo.setCode(code);
return smsvo;
}
/**
* 短信通知获取
*
* @return
* @author dm
* @throws Exception
*/
@SuppressWarnings("unused")
public SMSVO sendText(SMSVO smsvo) throws Exception {
String contentTemp = "您的认证申请已被拒绝,拒绝理由为:{text}";
String text = smsvo.getCode();
String code = MessageUtils.sendText(smsvo.getTelephone(), contentTemp, text);
return smsvo;
}
public void addCode(String phone, String verifyCode) throws Exception {
VerifyCode code = new VerifyCode();
code.setPhone(phone);
code.setVerifyCode(verifyCode);
code.setHasSent(1);
code.setHasValidated("unValidated");
Calendar now = Calendar.getInstance();
now.add(Calendar.MINUTE, 30);
SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateStr = sdft.format(now.getTimeInMillis());
code.setExpireTime(sdft.parse(dateStr));// 过期时间
code = verifyCodeDao.save(code);
}
}
|
[
"liym@visionet.com.cn"
] |
liym@visionet.com.cn
|
f3cc429940106c2cc4b175382efddbc1613651e2
|
5b94a1004c8a7678d355b71bd2daa0970bc4c027
|
/src/org/processmining/plugins/epml/EpmlXorConfiguration.java
|
c227d54ed50984ce88e46bde83426e3ca93efbbb
|
[] |
no_license
|
Ghazibenslama/SMD-master
|
2bed3f99810e83dbde492f3ae372d161b3886530
|
a7312e8dd367234046ba5fae1c5790ef9f303a8a
|
refs/heads/master
| 2020-05-17T20:06:07.313487
| 2018-07-18T02:33:28
| 2018-07-18T02:33:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,636
|
java
|
package org.processmining.plugins.epml;
import java.util.Arrays;
import org.xmlpull.v1.XmlPullParser;
/**
* @author hverbeek
*
* <xs:complexType name="typeCXOR"> <xs:choice minOccurs="0">
* <xs:element name="configuration"> <xs:complexType> <xs:attribute
* name="value"> <xs:simpleType> <xs:restriction base="xs:string">
* <xs:enumeration value="xor"/> <xs:enumeration value="seq"/>
* </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute
* name="goto" type="xs:positiveInteger" use="optional"/>
* </xs:complexType> </xs:element> </xs:choice> </xs:complexType>
*/
public class EpmlXorConfiguration extends EpmlElement {
public final static String TAG = "configuration";
/*
* Attributes
*/
private String value;
private String go2;
public EpmlXorConfiguration() {
super(TAG);
value = null;
go2 = null;
}
protected void importAttributes(XmlPullParser xpp, Epml epml) {
super.importAttributes(xpp, epml);
String value = xpp.getAttributeValue(null, "value");
if (value != null) {
this.value = value;
}
value = xpp.getAttributeValue(null, "goto");
if (value != null) {
go2 = value;
}
}
protected String exportAttributes() {
String s = super.exportAttributes();
if (value != null) {
s += exportAttribute("value", value);
}
if (go2 != null) {
s += exportAttribute("goto", go2);
}
return s;
}
protected void checkValidity(Epml epml) {
super.checkValidity(epml);
checkRestriction(epml, "value", value, Arrays.asList("xor", "seq"), false);
checkPositiveInteger(epml, "goto", go2, false);
}
}
|
[
"zandrea418@gmail.com"
] |
zandrea418@gmail.com
|
c62d926e335ccdc444e73b37d7845a1d1456909c
|
17c30fed606a8b1c8f07f3befbef6ccc78288299
|
/P9_8_0_0/src/main/java/android/os/HwParcel.java
|
72f6596a505fef5b4258ae96d72c2971bdb440c9
|
[] |
no_license
|
EggUncle/HwFrameWorkSource
|
4e67f1b832a2f68f5eaae065c90215777b8633a7
|
162e751d0952ca13548f700aad987852b969a4ad
|
refs/heads/master
| 2020-04-06T14:29:22.781911
| 2018-11-09T05:05:03
| 2018-11-09T05:05:03
| 157,543,151
| 1
| 0
| null | 2018-11-14T12:08:01
| 2018-11-14T12:08:01
| null |
UTF-8
|
Java
| false
| false
| 6,565
|
java
|
package android.os;
import java.util.ArrayList;
import java.util.Arrays;
import libcore.util.NativeAllocationRegistry;
public class HwParcel {
public static final int STATUS_ERROR = -1;
public static final int STATUS_SUCCESS = 0;
private static final String TAG = "HwParcel";
private static final NativeAllocationRegistry sNativeRegistry = new NativeAllocationRegistry(HwParcel.class.getClassLoader(), native_init(), 128);
private long mNativeContext;
private static final native long native_init();
private final native void native_setup(boolean z);
private final native boolean[] readBoolVectorAsArray();
private final native double[] readDoubleVectorAsArray();
private final native float[] readFloatVectorAsArray();
private final native short[] readInt16VectorAsArray();
private final native int[] readInt32VectorAsArray();
private final native long[] readInt64VectorAsArray();
private final native byte[] readInt8VectorAsArray();
private final native String[] readStringVectorAsArray();
private final native void writeBoolVector(boolean[] zArr);
private final native void writeDoubleVector(double[] dArr);
private final native void writeFloatVector(float[] fArr);
private final native void writeInt16Vector(short[] sArr);
private final native void writeInt32Vector(int[] iArr);
private final native void writeInt64Vector(long[] jArr);
private final native void writeInt8Vector(byte[] bArr);
private final native void writeStringVector(String[] strArr);
public final native void enforceInterface(String str);
public final native boolean readBool();
public final native HwBlob readBuffer(long j);
public final native double readDouble();
public final native HwBlob readEmbeddedBuffer(long j, long j2, long j3, boolean z);
public final native float readFloat();
public final native short readInt16();
public final native int readInt32();
public final native long readInt64();
public final native byte readInt8();
public final native String readString();
public final native IHwBinder readStrongBinder();
public final native void release();
public final native void releaseTemporaryStorage();
public final native void send();
public final native void verifySuccess();
public final native void writeBool(boolean z);
public final native void writeBuffer(HwBlob hwBlob);
public final native void writeDouble(double d);
public final native void writeFloat(float f);
public final native void writeInt16(short s);
public final native void writeInt32(int i);
public final native void writeInt64(long j);
public final native void writeInt8(byte b);
public final native void writeInterfaceToken(String str);
public final native void writeStatus(int i);
public final native void writeString(String str);
public final native void writeStrongBinder(IHwBinder iHwBinder);
private HwParcel(boolean allocate) {
native_setup(allocate);
sNativeRegistry.registerNativeAllocation(this, this.mNativeContext);
}
public HwParcel() {
native_setup(true);
sNativeRegistry.registerNativeAllocation(this, this.mNativeContext);
}
public final void writeBoolVector(ArrayList<Boolean> val) {
int n = val.size();
boolean[] array = new boolean[n];
for (int i = 0; i < n; i++) {
array[i] = ((Boolean) val.get(i)).booleanValue();
}
writeBoolVector(array);
}
public final void writeInt8Vector(ArrayList<Byte> val) {
int n = val.size();
byte[] array = new byte[n];
for (int i = 0; i < n; i++) {
array[i] = ((Byte) val.get(i)).byteValue();
}
writeInt8Vector(array);
}
public final void writeInt16Vector(ArrayList<Short> val) {
int n = val.size();
short[] array = new short[n];
for (int i = 0; i < n; i++) {
array[i] = ((Short) val.get(i)).shortValue();
}
writeInt16Vector(array);
}
public final void writeInt32Vector(ArrayList<Integer> val) {
int n = val.size();
int[] array = new int[n];
for (int i = 0; i < n; i++) {
array[i] = ((Integer) val.get(i)).intValue();
}
writeInt32Vector(array);
}
public final void writeInt64Vector(ArrayList<Long> val) {
int n = val.size();
long[] array = new long[n];
for (int i = 0; i < n; i++) {
array[i] = ((Long) val.get(i)).longValue();
}
writeInt64Vector(array);
}
public final void writeFloatVector(ArrayList<Float> val) {
int n = val.size();
float[] array = new float[n];
for (int i = 0; i < n; i++) {
array[i] = ((Float) val.get(i)).floatValue();
}
writeFloatVector(array);
}
public final void writeDoubleVector(ArrayList<Double> val) {
int n = val.size();
double[] array = new double[n];
for (int i = 0; i < n; i++) {
array[i] = ((Double) val.get(i)).doubleValue();
}
writeDoubleVector(array);
}
public final void writeStringVector(ArrayList<String> val) {
writeStringVector((String[]) val.toArray(new String[val.size()]));
}
public final ArrayList<Boolean> readBoolVector() {
return new ArrayList(Arrays.asList(HwBlob.wrapArray(readBoolVectorAsArray())));
}
public final ArrayList<Byte> readInt8Vector() {
return new ArrayList(Arrays.asList(HwBlob.wrapArray(readInt8VectorAsArray())));
}
public final ArrayList<Short> readInt16Vector() {
return new ArrayList(Arrays.asList(HwBlob.wrapArray(readInt16VectorAsArray())));
}
public final ArrayList<Integer> readInt32Vector() {
return new ArrayList(Arrays.asList(HwBlob.wrapArray(readInt32VectorAsArray())));
}
public final ArrayList<Long> readInt64Vector() {
return new ArrayList(Arrays.asList(HwBlob.wrapArray(readInt64VectorAsArray())));
}
public final ArrayList<Float> readFloatVector() {
return new ArrayList(Arrays.asList(HwBlob.wrapArray(readFloatVectorAsArray())));
}
public final ArrayList<Double> readDoubleVector() {
return new ArrayList(Arrays.asList(HwBlob.wrapArray(readDoubleVectorAsArray())));
}
public final ArrayList<String> readStringVector() {
return new ArrayList(Arrays.asList(readStringVectorAsArray()));
}
}
|
[
"lygforbs0@mail.com"
] |
lygforbs0@mail.com
|
5dcbf5878174ad2ddc0ecbdf47e921686bf7f51c
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE191_Integer_Underflow/s05/CWE191_Integer_Underflow__int_Property_predec_67b.java
|
8ad61d55caab4c32a1c90263d4bdbd743c9a2fce
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,191
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE191_Integer_Underflow__int_Property_predec_67b.java
Label Definition File: CWE191_Integer_Underflow__int.label.xml
Template File: sources-sinks-67b.tmpl.java
*/
/*
* @description
* CWE: 191 Integer Underflow
* BadSource: Property Read data from a system property
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: decrement
* GoodSink: Ensure there will not be an underflow before decrementing data
* BadSink : Decrement data, which can cause an Underflow
* Flow Variant: 67 Data flow: data passed in a class from one method to another in different source files in the same package
*
* */
package testcases.CWE191_Integer_Underflow.s05;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE191_Integer_Underflow__int_Property_predec_67b
{
public void badSink(CWE191_Integer_Underflow__int_Property_predec_67a.Container dataContainer ) throws Throwable
{
int data = dataContainer.containerOne;
/* POTENTIAL FLAW: if data == Integer.MIN_VALUE, this will overflow */
int result = (int)(--data);
IO.writeLine("result: " + result);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(CWE191_Integer_Underflow__int_Property_predec_67a.Container dataContainer ) throws Throwable
{
int data = dataContainer.containerOne;
/* POTENTIAL FLAW: if data == Integer.MIN_VALUE, this will overflow */
int result = (int)(--data);
IO.writeLine("result: " + result);
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(CWE191_Integer_Underflow__int_Property_predec_67a.Container dataContainer ) throws Throwable
{
int data = dataContainer.containerOne;
/* FIX: Add a check to prevent an underflow from occurring */
if (data > Integer.MIN_VALUE)
{
int result = (int)(--data);
IO.writeLine("result: " + result);
}
else
{
IO.writeLine("data value is too small to decrement.");
}
}
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
ae9b125fed720176b681bbb246ac46cb70a1a840
|
51c5f043945cfa8ed885b3cb7bbac1d68d4f1a6a
|
/sampleB_5_3_V1/src/main/java/com/bn/Sample5_3_V1/Sample5_3_V1_Activity.java
|
173f25dba9ec0d71c382a4e065761bca4fe0d3f1
|
[
"Apache-2.0"
] |
permissive
|
zoozooll/glsamples
|
dcb162c6d3d5410930b2b3ddceb97d4248f59ecd
|
64cb315d57d172ec69d0cb8443649cdcc56bd3c5
|
refs/heads/master
| 2023-07-13T10:15:05.771334
| 2023-06-08T06:47:22
| 2023-06-08T06:47:22
| 200,009,486
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,211
|
java
|
package com.bn.Sample5_3_V1;
import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
public class Sample5_3_V1_Activity extends Activity
{
private MySurfaceView mGLSurfaceView;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
//设置为全屏
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN ,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
//设置为横屏模式
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
//初始化GLSurfaceView
mGLSurfaceView = new MySurfaceView(this);
setContentView(mGLSurfaceView);
mGLSurfaceView.requestFocus();//获取焦点
mGLSurfaceView.setFocusableInTouchMode(true);//设置为可触控
}
@Override
protected void onResume() {
super.onResume();
mGLSurfaceView.onResume();
}
@Override
protected void onPause() {
super.onPause();
mGLSurfaceView.onPause();
}
}
|
[
"kangkang365@gmail.com"
] |
kangkang365@gmail.com
|
b54fdb7784977b1c82515bdf0d3ac9cf883b2536
|
8020e79b602427f22feafc1d7d40f7db7bc81332
|
/rolling-upgrade-ispn/rolling-upgrade-ispn-new/src/main/java/org/mposolda/ispn/v2/AbstractCommand.java
|
42fa9fef8dc61f6984f22bac92f8be72e41ec485
|
[] |
no_license
|
mposolda/misc
|
b409101f80802d4e279c085a76cce680a57397d8
|
821ad4252acdbe8e99ce993846bc3e464179c57d
|
refs/heads/master
| 2023-07-25T02:00:58.262842
| 2022-12-05T11:34:34
| 2022-12-05T11:34:34
| 10,410,754
| 4
| 2
| null | 2023-07-07T21:20:50
| 2013-05-31T18:33:41
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,753
|
java
|
package org.mposolda.ispn.v2;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
import java.util.List;
import org.infinispan.Cache;
import org.jboss.logging.Logger;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public abstract class AbstractCommand<K, V> {
protected final Logger log = Logger.getLogger(this.getClass().getName());
protected TestsuiteCLI<K, V> cli;
private List<String> args;
private Cache<K, V> cache;
public void injectProperties(List<String> args, TestsuiteCLI<K, V> cli, Cache<K, V> cache) {
this.cli = cli;
this.args = args;
this.cache = cache;
}
public void runCommand() {
try {
doRunCommand(cache);
} catch (HandledException handled) {
// Fine to ignore. Was handled already
} catch (RuntimeException e) {
log.error("Error occured during command. ", e);
}
}
public abstract String getName();
protected abstract void doRunCommand(Cache<K, V> cache);
protected String getArg(int index) {
try {
return args.get(index);
} catch (IndexOutOfBoundsException ex) {
log.errorf("Usage: %s", printUsage());
throw new HandledException();
}
}
protected Integer getIntArg(int index) {
String str = getArg(index);
try {
return Integer.parseInt(str);
} catch (NumberFormatException nex) {
log.errorf("Usage: %s", printUsage());
throw new HandledException();
}
}
public String printUsage() {
return getName();
}
public static class HandledException extends RuntimeException {
}
}
|
[
"mposolda@gmail.com"
] |
mposolda@gmail.com
|
289fa4232851f0a73c392753759c3275b7435bf2
|
9d93eadf80abc6f6e441451bbc1594161eedced6
|
/src/java/hrms/model/payroll/schedule/ItScheduleBean.java
|
1c6ec11d4f037f386de1e0a66f91d4588ca96a3e
|
[] |
no_license
|
durgaprasad2882/HRMSOpenSourceFor466anydesk
|
1bac7eb2e231a4fb3389b6b1cb8fb4384a757522
|
e7ef76f77d7ecf98464e9bcccc2246b2091efeb4
|
refs/heads/main
| 2023-06-29T16:26:04.663376
| 2021-08-05T09:19:02
| 2021-08-05T09:19:02
| 392,978,868
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,724
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package hrms.model.payroll.schedule;
import java.util.List;
public class ItScheduleBean extends ScheduleHelper{
private String empDedutAmount;
private String btId;
private String montYear;
private String schedule;
private String scheduleName;
private String aqmonth;
private String aqyear;
private String tanno;
private List ITScheduleDtls = null;
private String deptName;
private String officeName;
private String ddoDegn;
private String billNo;
private String billDesc;
private String carryForward;
private String total;
private String pagebreakIT;
private String pageHeaderIT;
public String getPagebreakIT() {
return pagebreakIT;
}
public void setPagebreakIT(String pagebreakIT) {
this.pagebreakIT = pagebreakIT;
}
public String getPageHeaderIT() {
return pageHeaderIT;
}
public void setPageHeaderIT(String pageHeaderIT) {
this.pageHeaderIT = pageHeaderIT;
}
public String getEmpDedutAmount() {
return empDedutAmount;
}
public void setEmpDedutAmount(String empDedutAmount) {
this.empDedutAmount = empDedutAmount;
}
public String getBtId() {
return btId;
}
public void setBtId(String btId) {
this.btId = btId;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public String getOfficeName() {
return officeName;
}
public void setOfficeName(String officeName) {
this.officeName = officeName;
}
public String getDdoDegn() {
return ddoDegn;
}
public void setDdoDegn(String ddoDegn) {
this.ddoDegn = ddoDegn;
}
public String getBillNo() {
return billNo;
}
public void setBillNo(String billNo) {
this.billNo = billNo;
}
public String getBillDesc() {
return billDesc;
}
public void setBillDesc(String billDesc) {
this.billDesc = billDesc;
}
public String getMontYear() {
return montYear;
}
public void setMontYear(String montYear) {
this.montYear = montYear;
}
public String getScheduleName() {
return scheduleName;
}
public void setScheduleName(String scheduleName) {
this.scheduleName = scheduleName;
}
public String getAqmonth() {
return aqmonth;
}
public void setAqmonth(String aqmonth) {
this.aqmonth = aqmonth;
}
public String getAqyear() {
return aqyear;
}
public void setAqyear(String aqyear) {
this.aqyear = aqyear;
}
public String getTanno() {
return tanno;
}
public void setTanno(String tanno) {
this.tanno = tanno;
}
public List getITScheduleDtls() {
return ITScheduleDtls;
}
public void setITScheduleDtls(List ITScheduleDtls) {
this.ITScheduleDtls = ITScheduleDtls;
}
public String getCarryForward() {
return carryForward;
}
public void setCarryForward(String carryForward) {
this.carryForward = carryForward;
}
public String getTotal() {
return total;
}
public void setTotal(String total) {
this.total = total;
}
public String getSchedule() {
return schedule;
}
public void setSchedule(String schedule) {
this.schedule = schedule;
}
}
|
[
"dm.prasad@hotmail.com"
] |
dm.prasad@hotmail.com
|
513fe65c4c6b071a6bb762a14a1f921e34b93513
|
853f7c69197b796ac009d0f5729fdfb2c20e970f
|
/src/main/java/com/ts/cpfr/controller/base/LogAop.java
|
0192704f0c8fe16bb594761f7a388b3d59b28a06
|
[] |
no_license
|
cjw363/cpfr
|
3a5f57f1cb6f4c4c024abe65ee3166bafefa1989
|
42cc7744227f9e6071907f5832668ff6e5273b73
|
refs/heads/master
| 2022-11-21T08:29:30.687649
| 2019-06-22T12:47:03
| 2019-06-22T12:47:03
| 153,128,208
| 0
| 1
| null | 2022-11-16T11:31:38
| 2018-10-15T14:29:58
|
Java
|
UTF-8
|
Java
| false
| false
| 3,535
|
java
|
package com.ts.cpfr.controller.base;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.Date;
@Component
@Aspect
public class LogAop {
@Autowired
private HttpServletRequest request;
private Class clazz; //访问的类
private Method method;//访问的方法
//前置通知 主要是获取开始时间,执行的类是哪一个,执行的是哪一个方法
@Before("execution(* com.ts.cpfr.controller.*.*(..))")
public void doBefore(JoinPoint jp) {
try {
clazz = jp.getTarget().getClass(); //具体要访问的类
String methodName = jp.getSignature().getName(); //获取访问的方法的名称
// Object[] args = jp.getArgs();//获取访问的方法的参数
//获取具体执行的方法的Method对象
// if (args == null || args.length == 0) {
// method = clazz.getMethod(methodName); //只能获取无参数的方法
// } else {
// Class[] classArgs = new Class[args.length];
// for (int i = 0; i < args.length; i++) {
// classArgs[i] = args[i].getClass();
// }
// method = clazz.getDeclaredMethod(methodName, classArgs);
// }
String ip = request.getRemoteAddr();
String url = request.getContextPath() + request.getServletPath();
System.out.println(">>>>>>>>>>>>>>>>>>开始>>>>>>>>>>>>>>>>>");
System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "-[Ip]" + ip + "-[Mapping]" + url + "-[类名]" + clazz.getName() + "-[方法]" + methodName);
} catch (Exception e) {
e.printStackTrace();
}
}
//后置通知
@After("execution(* com.ts.cpfr.controller.*.*(..))")
public void doAfter(JoinPoint jp) {
try {
// String url = "";
// //获取url
// if (clazz != null && method != null && clazz != LogAop.class) {
// //1.获取类上的@RequestMapping("/orders")
// RequestMapping classAnnotation = (RequestMapping) clazz.getAnnotation(RequestMapping.class);
// if (classAnnotation != null) {
// String[] classValue = classAnnotation.value();
// //2.获取方法上的@RequestMapping(xxx)
// RequestMapping methodAnnotation = method.getAnnotation(RequestMapping.class);
// if (methodAnnotation != null) {
// String[] methodValue = methodAnnotation.value();
// url = classValue[0] + methodValue[0];
// }
// }
// //获取当前操作的用户
// SecurityContext context = SecurityContextHolder.getContext();//从上下文中获了当前登录的用户
// User user = (User) context.getAuthentication().getPrincipal();
// String username = user.getUsername();
//
// }
System.out.println(">>>>>>>>>>>>>>>>>>结束>>>>>>>>>>>>>>>>>");
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"771613512@qq.com"
] |
771613512@qq.com
|
09647f9cb2a37e5325e90115144b583d23ca661f
|
dcde031e6577be47c4ead1fb2c6e317e94253838
|
/src/rosetta/MDC_CONC_HCO3_GEN.java
|
1c751f476cb92bc58d4f3cbcc4630bd31d6dbaea
|
[
"BSD-2-Clause"
] |
permissive
|
EDS-APHP-legacy/LightICE
|
6ab49e920405b6ac9616de6c1eb48704e6046a39
|
04d1c27bccd5c64df46d8182b8f4490b98540b3e
|
refs/heads/master
| 2022-06-12T21:22:31.131234
| 2018-05-31T09:53:16
| 2018-05-31T09:53:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 132
|
java
|
package rosetta;
public class MDC_CONC_HCO3_GEN {
public static final String VALUE = "MDC_CONC_HCO3_GEN";
}
|
[
"julien.dubiel@aphp.fr"
] |
julien.dubiel@aphp.fr
|
2cf2a7082ace08efc450fea4bd858990a96ad59a
|
c75e6df08eb4065ab80fcc1dcc1cb38ac1256f72
|
/web/plugins/com.seekon.bicp.portal/src/main/java/org/jasig/portal/portlet/container/PortletStateAwareResponseContextImpl.java
|
3b77fe98f282f09fdf89b84533ca8f9a3c801360
|
[] |
no_license
|
jerome-nexedi/nextbi
|
7b219c1ec64b21bebf4ccf77c730e15a8ad1c6de
|
0179b30bf6a86ae6a070434a3161d7935f166b42
|
refs/heads/master
| 2021-01-10T09:06:15.838199
| 2012-11-14T11:59:53
| 2012-11-14T11:59:53
| 36,644,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,849
|
java
|
/**
* Licensed to Jasig under one or more contributor license
* agreements. See the NOTICE file distributed with this work
* for additional information regarding copyright ownership.
* Jasig licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a
* copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jasig.portal.portlet.container;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.portlet.Event;
import javax.portlet.PortletMode;
import javax.portlet.WindowState;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.pluto.container.EventProvider;
import org.apache.pluto.container.PortletContainer;
import org.apache.pluto.container.PortletStateAwareResponseContext;
import org.apache.pluto.container.driver.PortletContextService;
import org.jasig.portal.portlet.container.properties.IRequestPropertiesManager;
import org.jasig.portal.portlet.container.services.IPortletCookieService;
import org.jasig.portal.portlet.om.IPortletWindow;
import org.jasig.portal.url.IPortletUrlBuilder;
/**
* @author Eric Dalquist
* @version $Revision$
*/
public class PortletStateAwareResponseContextImpl extends PortletResponseContextImpl
implements PortletStateAwareResponseContext {
private final List<Event> events = new LinkedList<Event>();
protected final IPortletUrlBuilder portletUrlBuilder;
protected final PortletContextService portletContextService;
public PortletStateAwareResponseContextImpl(PortletContainer portletContainer,
IPortletWindow portletWindow, HttpServletRequest containerRequest,
HttpServletResponse containerResponse,
IRequestPropertiesManager requestPropertiesManager,
IPortletUrlBuilder portletUrlBuilder,
PortletContextService portletContextService,
IPortletCookieService portletCookieService) {
super(portletContainer, portletWindow, containerRequest, containerResponse,
requestPropertiesManager, portletCookieService);
this.portletUrlBuilder = portletUrlBuilder;
this.portletContextService = portletContextService;
}
/*
* (non-Javadoc)
*
* @see
* org.apache.pluto.container.PortletStateAwareResponseContext#getEventProvider
* ()
*/
@Override
public EventProvider getEventProvider() {
return new EventProviderImpl(this.portletWindow, this.portletContextService);
}
/*
* (non-Javadoc)
*
* @see
* org.apache.pluto.container.PortletStateAwareResponseContext#getEvents()
*/
@Override
public List<Event> getEvents() {
return this.events;
}
/*
* (non-Javadoc)
*
* @see
* org.apache.pluto.container.PortletStateAwareResponseContext#getPortletMode
* ()
*/
@Override
public PortletMode getPortletMode() {
this.checkContextStatus();
return this.portletUrlBuilder.getPortletMode();
}
/*
* (non-Javadoc)
*
* @seeorg.apache.pluto.container.PortletStateAwareResponseContext#
* getPublicRenderParameters()
*/
@Override
public Map<String, String[]> getPublicRenderParameters() {
this.checkContextStatus();
return this.portletUrlBuilder.getPublicRenderParameters();
}
/*
* (non-Javadoc)
*
* @see
* org.apache.pluto.container.PortletStateAwareResponseContext#getRenderParameters
* ()
*/
@Override
public Map<String, String[]> getRenderParameters() {
this.checkContextStatus();
return this.portletUrlBuilder.getParameters();
}
/*
* (non-Javadoc)
*
* @see
* org.apache.pluto.container.PortletStateAwareResponseContext#getWindowState
* ()
*/
@Override
public WindowState getWindowState() {
this.checkContextStatus();
return this.portletUrlBuilder.getWindowState();
}
/*
* (non-Javadoc)
*
* @see
* org.apache.pluto.container.PortletStateAwareResponseContext#setPortletMode
* (javax.portlet.PortletMode)
*/
@Override
public void setPortletMode(PortletMode portletMode) {
this.checkContextStatus();
this.portletUrlBuilder.setPortletMode(portletMode);
}
/*
* (non-Javadoc)
*
* @see
* org.apache.pluto.container.PortletStateAwareResponseContext#setWindowState
* (javax.portlet.WindowState)
*/
@Override
public void setWindowState(WindowState windowState) {
this.checkContextStatus();
this.portletUrlBuilder.setWindowState(windowState);
}
}
|
[
"undyliu@126.com"
] |
undyliu@126.com
|
75e2eb373dcfbea854350eb36d81852f7e2536b3
|
08d214aa1a6f523e72a1e7e91a69e6927a299a2b
|
/wx-market-manager/src/main/java/wx/milk/manager/dubbo/impl/UserDubboManagerImpl.java
|
a587ff3e84e30cb960ab145eed1b9e5df1430603
|
[] |
no_license
|
qiufeng001/wx-market
|
6530f124810549fde5f6c69177ce6bfdd015cf92
|
0d0937932fcd88d60be95a44c80380f80291ebe3
|
refs/heads/master
| 2020-04-11T02:35:35.602623
| 2018-12-21T09:30:10
| 2018-12-21T09:30:10
| 161,449,297
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 507
|
java
|
package wx.milk.manager.dubbo.impl;
import com.alibaba.dubbo.config.annotation.Reference;
import com.framework.core.query.Query;
import com.framework.core.security.User;
import org.springframework.stereotype.Service;
import wx.milk.api.server.IUserDubboProvider;
@Service
public class UserDubboManagerImpl implements IUserDubboProvider {
@Reference
private IUserDubboProvider provider;
@Override
public User findByParam(Query query) {
return provider.findByParam(query);
}
}
|
[
"2227052723@qq.com"
] |
2227052723@qq.com
|
04c207be51375fda5cdc1da2bdfc10700cb17f03
|
7d466b2a73721b5cb7dc9992a6527d4c96047781
|
/test/8120-ShortMethodsInliningNonVirtualInvokes-InvokeStaticSObject-001/src/Main.java
|
32c6305d1428a7dc0d54f8bec59659c3b23733d8
|
[
"Apache-2.0",
"NCSA"
] |
permissive
|
projectceladon/vendor_intel_art-extension
|
ce09807c5e11e459cde151be1aa42a3d6958752e
|
4f505f9b7ff1b93add4d97de1d8096816b333b4b
|
refs/heads/master
| 2023-01-22T08:52:43.463644
| 2023-01-10T07:27:40
| 2023-01-10T07:27:40
| 137,192,912
| 3
| 20
|
NOASSERTION
| 2020-06-05T09:57:16
| 2018-06-13T09:23:37
|
C++
|
UTF-8
|
Java
| false
| false
| 668
|
java
|
class Main {
final static int iterations = 10;
static Foo thingies= new Foo();
public static Foo getThingies() {
return thingies;
}
public static void setThingies(Foo newThingies) {
thingies = newThingies;
}
public static void main(String[] args) {
Foo nextThingy = thingies;
System.out.println("Initial nextThingy value is " + nextThingy.getClass().toString());
for(int i = 0; i < iterations; i++) {
nextThingy = getThingies();
setThingies(nextThingy);
}
System.out.println("Final nextThingy value is " + nextThingy.getClass().toString());
}
}
|
[
"jaishankar.rajendran@intel.com"
] |
jaishankar.rajendran@intel.com
|
cc30b159c8aaca9d087a8d190cf07dc9df7c9311
|
d334e9f88870a7af86d582bb5aaf6fd73f545c6c
|
/sdk/vsys/src/main/java/v/systems/Asset.java
|
509c7a610e67fb6a8272da4cec6dc4e4fd1b5689
|
[] |
no_license
|
andnux/chain
|
1d72c64fa425d86343d3d0253e8729b504a6bf1a
|
8e414058dda7d78ad40917bfb464bce2a749dd48
|
refs/heads/master
| 2020-09-27T20:00:09.654738
| 2019-12-30T08:45:15
| 2019-12-30T08:45:15
| 210,501,058
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 515
|
java
|
package v.systems;
public abstract class Asset {
/**
* Constant used to represent VSYS token in asset transactions.
*/
public static final String VSYS = "VSYS";
static String normalize(String assetId) {
return assetId == null || assetId.isEmpty() ? Asset.VSYS : assetId;
}
static boolean isVSYS(String assetId) {
return VSYS.equals(normalize(assetId));
}
static String toJsonObject(String assetId) {
return isVSYS(assetId) ? null : assetId;
}
}
|
[
"1018827187@qq.com"
] |
1018827187@qq.com
|
668470c13edda6eb14ad3aa552d45d00f07d8fd1
|
488a522c86c4c5ce9a58b0bb936e2010462a39b5
|
/smart-utility/src/main/java/org/smartframework/cloud/utility/DateUtil.java
|
a04fa2cd3b674329cff07a2628e1974651f6330e
|
[
"Apache-2.0"
] |
permissive
|
FanWenTao-Felix/smart-cloud
|
0510220afdc2184b9cfd9c9d45bcc17b1842fd5d
|
9075843a4ff2d591dc204fbbce89a6f0bb384918
|
refs/heads/master
| 2023-07-08T05:28:22.674165
| 2021-01-28T15:39:11
| 2021-01-29T07:55:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,755
|
java
|
package org.smartframework.cloud.utility;
import java.lang.reflect.Field;
import java.text.ParseException;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.TimeZone;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.smartframework.cloud.utility.constant.DateFormartConst;
import org.smartframework.cloud.utility.spring.SpringContextUtil;
import org.springframework.context.ApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.util.ClassUtils;
import lombok.extern.slf4j.Slf4j;
/**
* 时间日期工具类
*
* @author liyulin
* @date 2019-03-23
*/
@Slf4j
public class DateUtil {
private DateUtil() {
}
/**
* 获取当前时间
*
* @return
*/
public static Date now() {
return new Date();
}
/**
* 获取当前时间
*
* @return
*/
public static long currentMillis() {
return System.currentTimeMillis();
}
/**
* 获取当前日期(yyyy-MM-dd)
*
* @return
*/
public static String getCurrentDate() {
return LocalDateTime.now().format(DateTimeFormatter.ofPattern(DateFormartConst.DATE));
}
/**
* 获取当前日期(yyyy-MM-dd HH:mm:ss)
*
* @return
*/
public static String getCurrentDateTime() {
return LocalDateTime.now().format(DateTimeFormatter.ofPattern(DateFormartConst.DATETIME));
}
/**
* 获取当前日期
*
* @param format 格式
* @return
*/
public static String getCurrentDateTime(String format) {
return LocalDateTime.now().format(DateTimeFormatter.ofPattern(format));
}
/**
* 格式化日期
*
* @param date
* @param format
* @return
*/
public static String format(Date date, String format) {
return LocalDateTime.ofInstant(date.toInstant(), Holder.getZoneId())
.format(DateTimeFormatter.ofPattern(format));
}
/**
* 格式化日期
*
* @param currentMillis
* @param format
* @return
*/
public static String format(long currentMillis, String format) {
return format(toDate(currentMillis), format);
}
/**
* 格式化日期
*
* @param date
* @return 返回格式:yyyy-MM-dd
*/
public static String formatDate(Date date) {
return format(date, DateFormartConst.DATE);
}
/**
* 格式化日期
*
* @param currentMillis
* @return 返回格式:yyyy-MM-dd
*/
public static String formatDate(long currentMillis) {
return format(toDate(currentMillis), DateFormartConst.DATE);
}
/**
* 格式化日期
*
* @param date
* @return 返回格式:yyyy-MM-dd HH:mm:ss
*/
public static String formatDateTime(Date date) {
return format(date, DateFormartConst.DATETIME);
}
/**
* 格式化日期
*
* @param currentMillis
* @return 返回格式:yyyy-MM-dd HH:mm:ss
*/
public static String formatDateTime(long currentMillis) {
return format(toDate(currentMillis), DateFormartConst.DATETIME);
}
/**
* 日期字符串转Date对象
*
* <h3>支持的字符串格式({@link DateFormartConst})</h3>
* <ul>
* <li>yyyy
* <li>yyyy-MM
* <li>yyyy-MM-dd
* <li>yyyy-MM-dd HH
* <li>yyyy-MM-dd HH:mm
* <li>yyyy-MM-dd HH:mm:ss
* </ul>
*
* @param dateStr 日期字符串
* @return
*/
public static Date toDate(String dateStr) {
if (StringUtils.isBlank(dateStr)) {
return null;
}
int length = dateStr.length();
String format = Holder.getDateTimeFormatterRouter().get(length);
if (Objects.isNull(format)) {
throw new IllegalArgumentException(String.format("The format of [%s] is not supported!", format));
}
Date date = null;
try {
date = DateUtils.parseDate(dateStr, format);
} catch (ParseException e) {
log.error("data string parse error", e);
}
return date;
}
/**
* 日期字符串转Date对象
*
* <h3>支持的字符串格式({@link DateFormartConst})</h3>
* <ul>
* <li>yyyy
* <li>yyyy-MM
* <li>yyyy-MM-dd
* <li>yyyy-MM-dd HH
* <li>yyyy-MM-dd HH:mm
* <li>yyyy-MM-dd HH:mm:ss
* <li>yyyy-MM-dd HH:mm:ss.SSS
* </ul>
*
* @param dateStr 日期字符串
* @return
*/
public static Long toCurrentMillis(String dateStr) {
Date date = toDate(dateStr);
if (date == null) {
return null;
}
return date.getTime();
}
/**
* 时间戳转Date
*
* @param currentMillis
* @return
*/
public static Date toDate(long currentMillis) {
return new Date(currentMillis);
}
static class Holder {
/** 所有的日期格式 */
private static final Map<Integer, String> DATETIME_FORMATTER_ROUTER = new HashMap<>();
private static ZoneId zoneId;
private static final String SMART_ZONEID_KEY = "smart.zoneId";
private static final String ENV_NAME = "org.springframework.core.env.ConfigurableEnvironment";
static {
initDatetimeFormatterRouter();
try {
initZoneId();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 初始化时间格式路由器
*/
private static void initDatetimeFormatterRouter() {
// 所有公有
Field[] fields = DateFormartConst.class.getFields();
// 日期格式变量前缀
for (int i = 0; i < fields.length; i++) {
Field field = fields[i];
String format = null;
try {
format = String.valueOf(field.get(field));
} catch (IllegalArgumentException | IllegalAccessException e) {
log.error(e.getMessage(), e);
}
DATETIME_FORMATTER_ROUTER.put(format.length(), format);
}
}
/**
* 初始化ZoneId(优先从配置文件中取时区配置)
*/
private static void initZoneId() {
boolean isPresent = ClassUtils.isPresent(ENV_NAME, Holder.class.getClassLoader());
if (!isPresent) {
zoneId = ZoneId.systemDefault();
return;
}
ApplicationContext applicationContext = SpringContextUtil.getApplicationContext();
if (applicationContext == null) {
log.warn(
"ApplicationContext is null!!! The default zone id will be got instead of the zone id configed!!!");
zoneId = ZoneId.systemDefault();
return;
}
ConfigurableEnvironment environment = applicationContext.getBean(ConfigurableEnvironment.class);
String id = environment.getProperty(SMART_ZONEID_KEY);
if (StringUtils.isBlank(id)) {
log.warn("'{}' is not configed!!! The default zone id will be got instead of the zone id configed!!!",
SMART_ZONEID_KEY);
zoneId = ZoneId.systemDefault();
} else {
zoneId = TimeZone.getTimeZone(id).toZoneId();
}
}
protected static Map<Integer, String> getDateTimeFormatterRouter() {
return DATETIME_FORMATTER_ROUTER;
}
protected static ZoneId getZoneId() {
return zoneId;
}
}
}
|
[
"1634753825@qq.com"
] |
1634753825@qq.com
|
d92d8813b87c8c41946d1afd4db0402938b9d431
|
63efe2652fac0e62c07ee3022010ab62b2a92562
|
/no.hal.pg/bundles/no.hal.pg.osm/src/no/hal/pg/osm/Member.java
|
3e88ecc29e0ee05622e629933700e83e2433f938
|
[] |
no_license
|
henrikmnm/tdt4250-2017
|
b33582cae19a95005c8493c7f836c1c7bf6e1b06
|
c9da094ec6e98742903663b623400c8be91c5272
|
refs/heads/master
| 2021-06-26T16:02:15.436690
| 2017-09-11T07:32:06
| 2017-09-11T07:32:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,905
|
java
|
/**
*/
package no.hal.pg.osm;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Member</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link no.hal.pg.osm.Member#getReference <em>Reference</em>}</li>
* <li>{@link no.hal.pg.osm.Member#getType <em>Type</em>}</li>
* <li>{@link no.hal.pg.osm.Member#getRole <em>Role</em>}</li>
* </ul>
*
* @see no.hal.pg.osm.OsmPackage#getMember()
* @model
* @generated
*/
public interface Member extends EObject {
/**
* Returns the value of the '<em><b>Reference</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Reference</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Reference</em>' reference.
* @see #setReference(OSMElement)
* @see no.hal.pg.osm.OsmPackage#getMember_Reference()
* @model extendedMetaData="name='ref' kind='attribute'"
* @generated
*/
OSMElement getReference();
/**
* Sets the value of the '{@link no.hal.pg.osm.Member#getReference <em>Reference</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Reference</em>' reference.
* @see #getReference()
* @generated
*/
void setReference(OSMElement value);
/**
* Returns the value of the '<em><b>Type</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Type</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Type</em>' attribute.
* @see #setType(String)
* @see no.hal.pg.osm.OsmPackage#getMember_Type()
* @model
* @generated
*/
String getType();
/**
* Sets the value of the '{@link no.hal.pg.osm.Member#getType <em>Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Type</em>' attribute.
* @see #getType()
* @generated
*/
void setType(String value);
/**
* Returns the value of the '<em><b>Role</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Role</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Role</em>' attribute.
* @see #setRole(String)
* @see no.hal.pg.osm.OsmPackage#getMember_Role()
* @model
* @generated
*/
String getRole();
/**
* Sets the value of the '{@link no.hal.pg.osm.Member#getRole <em>Role</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Role</em>' attribute.
* @see #getRole()
* @generated
*/
void setRole(String value);
} // Member
|
[
"hal@ntnu.no"
] |
hal@ntnu.no
|
ef17ad3cfb47034bbf8a74fd2d731251ab1e3e36
|
79595075622ded0bf43023f716389f61d8e96e94
|
/app/src/main/java/sun/nio/ch/AllocatedNativeObject.java
|
05407ea64969bf7ae6c72c3421da884d48cabf50
|
[] |
no_license
|
dstmath/OppoR15
|
96f1f7bb4d9cfad47609316debc55095edcd6b56
|
b9a4da845af251213d7b4c1b35db3e2415290c96
|
refs/heads/master
| 2020-03-24T16:52:14.198588
| 2019-05-27T02:24:53
| 2019-05-27T02:24:53
| 142,840,716
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 359
|
java
|
package sun.nio.ch;
class AllocatedNativeObject extends NativeObject {
AllocatedNativeObject(int size, boolean pageAligned) {
super(size, pageAligned);
}
synchronized void free() {
if (this.allocationAddress != 0) {
unsafe.freeMemory(this.allocationAddress);
this.allocationAddress = 0;
}
}
}
|
[
"toor@debian.toor"
] |
toor@debian.toor
|
5e6cda5faf61524dcd52b632b7cdac30e6b0cea9
|
83c6e015b0b1feba54ff1e14d6bad4dbc0163c1b
|
/com.centurylink.mdw.designer.ui/src/com/centurylink/mdw/plugin/project/WorkflowFacetInstallDelegate.java
|
85a0cdf481048eaacf0b7f7a64b87e9458008581
|
[] |
no_license
|
oakesville/mdw-designer
|
b4d8ae37f992e2f38c033fb469c6796d348b2719
|
0d6dd7c4c55163c5f358c267856d76c57928fa76
|
refs/heads/master
| 2020-03-23T15:44:49.599144
| 2018-07-20T16:49:00
| 2018-07-20T16:49:00
| 141,771,764
| 1
| 0
| null | 2018-07-21T01:31:30
| 2018-07-21T01:31:30
| null |
UTF-8
|
Java
| false
| false
| 1,894
|
java
|
/*
* Copyright (C) 2017 CenturyLink, 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 com.centurylink.mdw.plugin.project;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.wst.common.project.facet.core.IDelegate;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import com.centurylink.mdw.plugin.project.model.WorkflowProject;
public class WorkflowFacetInstallDelegate implements IDelegate {
public void execute(IProject project, IProjectFacetVersion fv, Object config,
IProgressMonitor monitor) throws CoreException {
WorkflowProject workflowProject = (WorkflowProject) config;
if (workflowProject.isCloudProject()) {
WorkflowProjectManager.addProject(workflowProject);
}
else {
workflowProject.setEarProjectName(project.getName()); // may deviate
// from
// convention
WorkflowProjectManager.getInstance().save(workflowProject, project);
}
monitor.done(); // project update happens in
// WorkflowFacetPostInstallDelegate
}
}
|
[
"donald.oakes@centurylink.com"
] |
donald.oakes@centurylink.com
|
82f597b338c17533fe5bb549c16b3540e0b69dbb
|
1ec73a5c02e356b83a7b867580a02b0803316f0a
|
/java/bj/DesignPattern/JavaAndPattern/VISITOR/visitoradapter/Visitor.java
|
542fb431a1e0652915de76bb2ba98d1da0afdc1e
|
[] |
no_license
|
jxsd0084/JavaTrick
|
f2ee8ae77638b5b7654c3fcf9bceea0db4626a90
|
0bb835fdac3c2f6d1a29d1e6e479b553099ece35
|
refs/heads/master
| 2021-01-20T18:54:37.322832
| 2016-06-09T03:22:51
| 2016-06-09T03:22:51
| 60,308,161
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 150
|
java
|
package bj.DesignPattern.JavaAndPattern.VISITOR.visitoradapter;
public interface Visitor {
void visit( NodeA node );
void visit( NodeB node );
}
|
[
"chenlong88882001@163.com"
] |
chenlong88882001@163.com
|
693689d787eb7e81f4dc71a2b7f094ce3e6b8116
|
159ba85ccf6d0484eacd893454ad6a3a4d9af02c
|
/app/src/main/java/ru/ok/android/ui/users/fragments/data/FriendsConversationsOnlineLoader.java
|
7f552752cc2df01890b1d89130a41c719eccaaa3
|
[] |
no_license
|
kronar/OK
|
71cee4639d090a0883767c4a932cc5bab2058482
|
8883fc78bac291f82e96a10215f5071c9d532b89
|
refs/heads/master
| 2021-05-31T19:47:54.639316
| 2016-03-25T11:52:52
| 2016-03-25T11:54:37
| 109,688,978
| 1
| 0
| null | 2017-11-06T11:52:48
| 2017-11-06T11:52:48
| null |
UTF-8
|
Java
| false
| false
| 2,640
|
java
|
package ru.ok.android.ui.users.fragments.data;
import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
import android.support.v4.content.Loader$android.support.v4.content.Loader.ForceLoadContentObserver;
import android.text.TextUtils;
import java.util.HashSet;
import java.util.Set;
import ru.ok.android.app.OdnoklassnikiApplication;
import ru.ok.android.db.access.UsersStorageFacade;
import ru.ok.android.db.provider.OdklContract.Users;
import ru.ok.android.db.provider.OdklProvider;
import ru.ok.android.model.cache.ram.ConversationsCache;
import ru.ok.android.proto.ConversationProto.Conversation;
import ru.ok.android.proto.ConversationProto.Conversation.Type;
import ru.ok.android.proto.ConversationProto.Participant;
public final class FriendsConversationsOnlineLoader extends CursorLoader {
private final ContentResolver cr;
private final ForceLoadContentObserver observer;
public FriendsConversationsOnlineLoader(Context context) {
super(context, OdklProvider.friendsUri(), null, null, null, null);
this.cr = context.getContentResolver();
this.observer = new Loader.ForceLoadContentObserver(this);
}
public Cursor loadInBackground() {
String currentUserId = OdnoklassnikiApplication.getCurrentUser().uid;
Set<String> allBuddies = new HashSet();
for (Conversation c : ConversationsCache.getInstance().getAllConversations()) {
if (c.getType() == Type.PRIVATE) {
for (Participant p : c.getParticipantsList()) {
String id = p.getId();
if (!TextUtils.equals(id, currentUserId)) {
allBuddies.add(id);
}
}
}
}
StringBuilder stringBuilder = new StringBuilder("'");
boolean addComma = false;
for (String buddy : allBuddies) {
if (addComma) {
stringBuilder.append("','");
} else {
addComma = true;
}
stringBuilder.append(buddy);
}
stringBuilder.append("'");
Cursor cursor = this.cr.query(Users.getContentUri().buildUpon().appendQueryParameter("join_conversations", "true").appendQueryParameter("uids", stringBuilder.toString()).build(), UsersStorageFacade.PROJECTION_FRIENDS, null, null, null);
if (cursor != null) {
cursor.getCount();
cursor.registerContentObserver(this.observer);
}
return cursor;
}
}
|
[
"mdzht@mail.ru"
] |
mdzht@mail.ru
|
c15175fbb6ca411f41c8c5c933708f7b7a8d1e21
|
8ca4c6014c397dba1724c4ac7926f9d0118f07aa
|
/springcloud-unit/src/main/java/com/kiiik/web/example/controller/ApiController.java
|
000f2e7ca3b6694fa8fc07369f7264591b642ae2
|
[] |
no_license
|
iezhuhx/cloud
|
927fbe8ee80b3e1abf0a9a5e340610a350fbfaac
|
fdbd01551e1764688d4c119958e1c8ff1da47921
|
refs/heads/master
| 2022-12-22T04:41:38.538829
| 2020-12-14T02:50:46
| 2020-12-14T02:50:46
| 161,440,294
| 3
| 1
| null | 2022-12-16T10:24:20
| 2018-12-12T06:02:50
|
Java
|
UTF-8
|
Java
| false
| false
| 1,288
|
java
|
package com.kiiik.web.example.controller;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
/**
*作者 : iechenyb<br>
*类描述: 说点啥<br>
*创建时间: 2018年9月3日上午9:03:14
*/
@RestController
@RequestMapping("api")
public class ApiController {
Log log = LogFactory.getLog(ApiController.class);
@GetMapping("query")
@ResponseBody
public String getP(String username) {
System.out.println("查看权限和角色");
return "信息列表!";
}
@ResponseBody
@GetMapping("add")
public String add(String name) {
return "添加信息成功!";
}
@ResponseBody
@GetMapping("delete")
public String delete(HttpServletRequest req) {
return "删除信息成功";
}
@ResponseBody
@GetMapping("update")
public String update(String name) {
return "更新信息成功!";
}
@ResponseBody
@GetMapping("free")
public String free(String name) {
return "free!";
}
}
|
[
"zzuchenyb@sina.com"
] |
zzuchenyb@sina.com
|
1529f3a91ad71baabed9481f1b065605cf0db9ab
|
5632f191e3108abff0a5ed9051e22c6a005c6e8f
|
/app/src/main/java/com/company/frame/aop/DebugLogAspect.java
|
9c322850685323ef0f132565c4cc7e2f0c4184d5
|
[] |
no_license
|
ILoveLin/MyUIFrame2021
|
c8fb0194d45bed7aecb1899dda4844086a0fd6ca
|
e9d2019fcd120bf87a4abec828cb4c0402a1ffad
|
refs/heads/main
| 2023-04-20T21:13:46.381212
| 2021-05-14T07:41:06
| 2021-05-14T07:41:06
| 365,153,794
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,634
|
java
|
package com.company.frame.aop;
import android.os.Looper;
import android.os.Trace;
import androidx.annotation.NonNull;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.CodeSignature;
import org.aspectj.lang.reflect.MethodSignature;
import java.util.concurrent.TimeUnit;
import timber.log.Timber;
/**
* author : Android 轮子哥
* github : https://github.com/getActivity/AndroidProject
* time : 2019/12/06
* desc : Debug 日志切面
*/
@Aspect
public class DebugLogAspect {
/**
* 构造方法切入点
*/
@Pointcut("execution(@com.hjq.demo.aop.DebugLog *.new(..))")
public void constructor() {}
/**
* 方法切入点
*/
@Pointcut("execution(@com.hjq.demo.aop.DebugLog * *(..))")
public void method() {}
/**
* 在连接点进行方法替换
*/
@Around("(method() || constructor()) && @annotation(debugLog)")
public Object aroundJoinPoint(ProceedingJoinPoint joinPoint, DebugLog debugLog) throws Throwable {
enterMethod(joinPoint, debugLog);
long startNanos = System.nanoTime();
Object result = joinPoint.proceed();
long stopNanos = System.nanoTime();
exitMethod(joinPoint, debugLog, result, TimeUnit.NANOSECONDS.toMillis(stopNanos - startNanos));
return result;
}
/**
* 方法执行前切入
*/
private void enterMethod(ProceedingJoinPoint joinPoint, DebugLog debugLog) {
CodeSignature codeSignature = (CodeSignature) joinPoint.getSignature();
// 方法所在类
String className = codeSignature.getDeclaringType().getName();
// 方法名
String methodName = codeSignature.getName();
// 方法参数名集合
String[] parameterNames = codeSignature.getParameterNames();
// 方法参数值集合
Object[] parameterValues = joinPoint.getArgs();
//记录并打印方法的信息
StringBuilder builder = getMethodLogInfo(className, methodName, parameterNames, parameterValues);
log(debugLog.value(), builder.toString());
final String section = builder.toString().substring(2);
Trace.beginSection(section);
}
/**
* 获取方法的日志信息
*
* @param className 类名
* @param methodName 方法名
* @param parameterNames 方法参数名集合
* @param parameterValues 方法参数值集合
*/
@NonNull
private StringBuilder getMethodLogInfo(String className, String methodName, String[] parameterNames, Object[] parameterValues) {
StringBuilder builder = new StringBuilder("\u21E2 ");
builder.append(className)
.append(".")
.append(methodName)
.append('(');
for (int i = 0; i < parameterValues.length; i++) {
if (i > 0) {
builder.append(", ");
}
builder.append(parameterNames[i]).append('=');
builder.append(parameterValues[i].toString());
}
builder.append(')');
if (Looper.myLooper() != Looper.getMainLooper()) {
builder.append(" [Thread:\"").append(Thread.currentThread().getName()).append("\"]");
}
return builder;
}
/**
* 方法执行完毕,切出
*
* @param result 方法执行后的结果
* @param lengthMillis 执行方法所需要的时间
*/
private void exitMethod(ProceedingJoinPoint joinPoint, DebugLog debugLog, Object result, long lengthMillis) {
Trace.endSection();
Signature signature = joinPoint.getSignature();
String className = signature.getDeclaringType().getName();
String methodName = signature.getName();
StringBuilder builder = new StringBuilder("\u21E0 ")
.append(className)
.append(".")
.append(methodName)
.append(" [")
.append(lengthMillis)
.append("ms]");
// 判断方法是否有返回值
if (signature instanceof MethodSignature && ((MethodSignature) signature).getReturnType() != void.class) {
builder.append(" = ");
builder.append(result.toString());
}
log(debugLog.value(), builder.toString());
}
private void log(String tag, String msg) {
Timber.tag(tag);
Timber.d(msg);
}
}
|
[
"tongzhengtong@126.com"
] |
tongzhengtong@126.com
|
21b40ce7cf86e83a30a4abf4d4018fd8aa1d2f86
|
15b314cfdbb0eb534593d927e9e82a5e23ba839c
|
/src/main/java/io/r2dbc/h2/codecs/LocalDateTimeCodec.java
|
c80daded41cdc7e0e84c8f7e10b4efdda07fa5cf
|
[
"Apache-2.0"
] |
permissive
|
gmullerb/r2dbc-h2
|
28107a8e25fae846b6a34bc996a06ecef67a2535
|
2a14551f9536e8769ba710e7bc4ed7514e7af72e
|
refs/heads/master
| 2020-06-19T09:00:11.581338
| 2019-10-15T14:35:18
| 2019-10-15T14:35:18
| 196,652,690
| 0
| 0
| null | 2019-07-12T22:23:38
| 2019-07-12T22:23:38
| null |
UTF-8
|
Java
| false
| false
| 762
|
java
|
package io.r2dbc.h2.codecs;
import io.r2dbc.h2.util.Assert;
import org.h2.util.LocalDateTimeUtils;
import org.h2.value.Value;
import java.time.LocalDateTime;
final class LocalDateTimeCodec extends AbstractCodec<LocalDateTime> {
LocalDateTimeCodec() {
super(LocalDateTime.class);
}
@Override
boolean doCanDecode(int dataType) {
return dataType == Value.TIMESTAMP;
}
@Override
LocalDateTime doDecode(Value value, Class<? extends LocalDateTime> type) {
return (LocalDateTime) LocalDateTimeUtils.valueToLocalDateTime(value);
}
@Override
Value doEncode(LocalDateTime value) {
return LocalDateTimeUtils.localDateTimeToValue(Assert.requireNonNull(value, "value must not be null"));
}
}
|
[
"gturnquist@pivotal.io"
] |
gturnquist@pivotal.io
|
85221427de9f55f10108b3ba72448114c4cb170b
|
5f871caf4067af9e608d6f26b59bd99c7a3ede2b
|
/SpringMVC/springmvc-01-serlvet/src/main/java/com/kuang/servlet/HelloServlet.java
|
cf4e5ed114ef92bc73b5e8e033b334b7dc057b89
|
[] |
no_license
|
SkyLoveAngle/JAVA-Framework
|
92c0f436b725099c69736bc088c70549f12ac5ec
|
a9bc3dc3731d1fb1fb6383c7f8aa00e1ec3346d6
|
refs/heads/main
| 2023-06-12T13:58:11.973095
| 2021-07-16T15:48:06
| 2021-07-16T15:48:06
| 384,139,932
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,172
|
java
|
package com.kuang.servlet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
public class HelloServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//1.获取前端参数
String method = req.getParameter("method");
if (method.equals("add")) {
req.getSession().setAttribute("msg", "执行了add方法");
}
if (method.equals("delete")){
req.getSession().setAttribute("msg","执行了delete方法");
//业务逻辑//视图跳转
req.getRequestDispatcher("/WEB-INF/jsp/hello.jsp").forward(req,resp);
}
//2.调用业务层
//3.视图转发或者重定向
req.getRequestDispatcher("/WEB-INF/jsp/test.jsp").forward(req,resp);
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
doGet(req,resp);
}
}
|
[
"1920909528@qq.com"
] |
1920909528@qq.com
|
0ab7815cd14a0f041d32672262aaaa49330f97d0
|
f416a9ebc33605236077999db964197eb6f7ad20
|
/Partition Equal Subset Sum.java
|
a9e8725bd27ac92f07582b08a694d4e632e0a7f3
|
[] |
no_license
|
supermarkion/LeetCode
|
d44fb9f64d7d754f2958b05c97b2337bb2fc8136
|
bbb13975e0728a24e0bd8916c09a4dd020b2f0fa
|
refs/heads/master
| 2020-04-04T04:01:06.979900
| 2017-02-20T08:43:51
| 2017-02-20T08:43:51
| 47,477,689
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,827
|
java
|
/*
Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets
such that the sum of elements in both subsets is equal.
Note:
Both the array size and each of the array element will not exceed 100.
Link: https://leetcode.com/problems/partition-equal-subset-sum/
Example:
Example 1:
Input: [1, 5, 11, 5]
Output: true
Explanation: The array can be partitioned as [1, 5, 5] and [11].
Example 2:
Input: [1, 2, 3, 5]
Output: false
Explanation: The array cannot be partitioned into equal sum subsets.
Solution: None
Source: https://discuss.leetcode.com/topic/62913/38ms-dp-java-solution
*/
public class Solution {
public boolean canPartition(int[] nums) {
int n = nums.length;
if (n == 0) {
return true;
}
int sum = 0;
for (int num: nums) {
sum += num;
}
if (sum % 2 == 1) {
return false;
}
Arrays.sort(nums);
int target = sum / 2;
boolean[][] dp = new boolean[n + 1][target + 1];
dp[0][0] = true;
for (int i = 1; i <= n; i++) {
if (nums[i - 1] == target) {
return true;
}
if (nums[i - 1] > target) {
return false;
}
System.arraycopy(dp[i - 1], 0, dp[i], 0, Math.min(target + 1, nums[i - 1]));
for (int j = nums[i - 1]; j <= target; j++) {
dp[i][j] = dp[i - 1][j - nums[i - 1]];
}
if (dp[i][target]) {
return true;
}
}
return false;
}
}
|
[
"supermarkioner@gmail.com"
] |
supermarkioner@gmail.com
|
95abaf84c2c1fd00bd4ead14009cf85ad5667768
|
67076b662b7ec7f5e81bc657275718a373f27eab
|
/agent/core/src/main/java/org/glowroot/agent/impl/TransactionService.java
|
b20051a09f54d5355c42b109ad63d2476990a8f4
|
[
"Apache-2.0"
] |
permissive
|
justutkarsh/glowroot
|
38f2754146715e0a84ecda813180df31ccb2be26
|
207c19a2241e7000ee48a5519c958c9810cbb57e
|
refs/heads/master
| 2020-03-30T19:24:00.521821
| 2018-11-28T18:12:49
| 2018-11-28T18:12:49
| 151,540,509
| 0
| 0
|
Apache-2.0
| 2018-11-28T18:12:50
| 2018-10-04T08:24:23
|
Java
|
UTF-8
|
Java
| false
| false
| 6,531
|
java
|
/*
* Copyright 2011-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.impl;
import com.google.common.base.Ticker;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.glowroot.agent.bytecode.api.ThreadContextThreadLocal;
import org.glowroot.agent.config.ConfigService;
import org.glowroot.agent.impl.Transaction.CompletionCallback;
import org.glowroot.agent.plugin.api.MessageSupplier;
import org.glowroot.agent.plugin.api.ThreadContext.ServletRequestInfo;
import org.glowroot.agent.plugin.api.TimerName;
import org.glowroot.agent.plugin.api.config.ConfigListener;
import org.glowroot.agent.util.IterableWithSelfRemovableEntries.SelfRemovableEntry;
import org.glowroot.agent.util.ThreadAllocatedBytes;
import org.glowroot.common.config.AdvancedConfig;
import org.glowroot.common.util.Clock;
public class TransactionService implements ConfigListener {
private final TransactionRegistry transactionRegistry;
private final ConfigService configService;
private final TimerNameCache timerNameCache;
private final UserProfileScheduler userProfileScheduler;
private final Clock clock;
private final Ticker ticker;
private final TransactionCompletionCallback transactionCompletionCallback =
new TransactionCompletionCallback();
// cache for fast read access
// visibility is provided by memoryBarrier below
private boolean captureThreadStats;
private int maxTraceEntries;
private int maxQueryAggregates;
private int maxServiceCallAggregates;
private int maxProfileSamples;
// intentionally not volatile for small optimization
private @MonotonicNonNull TransactionProcessor transactionProcessor;
// intentionally not volatile for small optimization
private @Nullable ThreadAllocatedBytes threadAllocatedBytes;
public static TransactionService create(TransactionRegistry transactionRegistry,
ConfigService configService, TimerNameCache timerNameCache,
UserProfileScheduler userProfileScheduler, Ticker ticker, Clock clock) {
TransactionService transactionService = new TransactionService(transactionRegistry,
configService, timerNameCache, userProfileScheduler, ticker, clock);
configService.addConfigListener(transactionService);
return transactionService;
}
private TransactionService(TransactionRegistry transactionRegistry, ConfigService configService,
TimerNameCache timerNameCache, UserProfileScheduler userProfileScheduler, Ticker ticker,
Clock clock) {
this.transactionRegistry = transactionRegistry;
this.configService = configService;
this.timerNameCache = timerNameCache;
this.userProfileScheduler = userProfileScheduler;
this.clock = clock;
this.ticker = ticker;
}
public void setTransactionProcessor(TransactionProcessor transactionProcessor) {
this.transactionProcessor = transactionProcessor;
}
public void setThreadAllocatedBytes(@Nullable ThreadAllocatedBytes threadAllocatedBytes) {
this.threadAllocatedBytes = threadAllocatedBytes;
}
TraceEntryImpl startTransaction(String transactionType, String transactionName,
MessageSupplier messageSupplier, TimerName timerName,
ThreadContextThreadLocal.Holder threadContextHolder, int rootNestingGroupId,
int rootSuppressionKeyId) {
// ensure visibility of recent configuration updates
configService.readMemoryBarrier();
long startTick = ticker.read();
Transaction transaction = new Transaction(clock.currentTimeMillis(), startTick,
transactionType, transactionName, messageSupplier, timerName, captureThreadStats,
maxTraceEntries, maxQueryAggregates, maxServiceCallAggregates, maxProfileSamples,
threadAllocatedBytes, transactionCompletionCallback, ticker, transactionRegistry,
this, configService, userProfileScheduler, threadContextHolder, rootNestingGroupId,
rootSuppressionKeyId);
SelfRemovableEntry transactionEntry = transactionRegistry.addTransaction(transaction);
transaction.setTransactionEntry(transactionEntry);
threadContextHolder.set(transaction.getMainThreadContext());
return transaction.getMainThreadContext().getRootEntry();
}
@Nullable
ThreadContextImpl startAuxThreadContextInternal(Transaction transaction,
@Nullable TraceEntryImpl parentTraceEntry,
@Nullable TraceEntryImpl parentThreadContextPriorEntry,
@Nullable ServletRequestInfo servletRequestInfo,
ThreadContextThreadLocal.Holder threadContextHolder) {
long startTick = ticker.read();
TimerName auxThreadTimerName = timerNameCache.getAuxThreadTimerName();
return transaction.startAuxThreadContext(parentTraceEntry, parentThreadContextPriorEntry,
auxThreadTimerName, startTick, threadContextHolder, servletRequestInfo,
threadAllocatedBytes);
}
@Override
public void onChange() {
AdvancedConfig advancedConfig = configService.getAdvancedConfig();
captureThreadStats = configService.getTransactionConfig().captureThreadStats();
maxQueryAggregates = advancedConfig.maxQueryAggregates();
maxServiceCallAggregates = advancedConfig.maxServiceCallAggregates();
maxTraceEntries = advancedConfig.maxTraceEntriesPerTransaction();
maxProfileSamples = advancedConfig.maxProfileSamplesPerTransaction();
}
private class TransactionCompletionCallback implements CompletionCallback {
@Override
public void completed(Transaction transaction) {
if (transactionProcessor != null) {
transactionProcessor.processOnCompletion(transaction);
}
}
}
}
|
[
"trask.stalnaker@gmail.com"
] |
trask.stalnaker@gmail.com
|
404237611e3eacb44b2b8b16a4d318e07c7d9dad
|
7aa543cad480b2bed32e180c9e82d1903cb80bd5
|
/src/main/java/com/test/effective/treaty13/Clazz.java
|
47d99a6bf7f720a02621dad49e8d92b4efb8271a
|
[] |
no_license
|
18673656092/efftiveJava
|
6e3babba52fc12c1e82898e72cc476e5769cd04a
|
55f0dc8e1fd03c91f9c7ffdc5071a07b1e3156bf
|
refs/heads/master
| 2020-04-05T20:34:13.609367
| 2018-11-21T09:59:27
| 2018-11-21T09:59:27
| 157,186,424
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,380
|
java
|
package com.test.effective.treaty13;
import java.util.Objects;
/**
* Created by zhuran on 2018/11/14 0014
* 类的设计:
* 1.类和成员的可访问性最小化
* 2.在公用类中使用访问方法而非公有域
* 3.使可变性最小化(不可变对象只拥有一种状态,不可变对象中不允许有可以改变对象状态的方法)
*/
public final class Clazz {
private final double re;
private final double rm;
private Clazz(double re, double rm) {
this.re = re;
this.rm = rm;
}
public static Clazz valueOf(double re,double rm){
return new Clazz(re,rm);
}
private double realPart() {
return re;
}
private double imaginaryPart() {
return rm;
}
public Clazz add(Clazz c) {
return new Clazz(re + c.re, rm + c.rm);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Clazz clazz = (Clazz) o;
return Double.compare(clazz.re, re) == 0 &&
Double.compare(clazz.rm, rm) == 0;
}
@Override
public int hashCode() {
return Objects.hash(re, rm);
}
@Override
public String toString() {
return "Clazz{" +
"re=" + re +
", rm=" + rm +
'}';
}
}
|
[
"admin@example.com"
] |
admin@example.com
|
1b67b6e053098ef33b5709e0322474278e7c834d
|
5850100b6cf0849a547aa358f9155fe18e7dcbb2
|
/src/main/java/org/mingle/banana/spring/mvc/dao/SpitterDao.java
|
c4d02f7b70e67dc95ff66d4ab5d9450ef88c9caf
|
[] |
no_license
|
iMingle/Banana
|
27e4f283913b7266d0792cb4489651b65e535ed0
|
67b9da3f07f1fe28d72704439d64c86b9a9090c1
|
refs/heads/master
| 2016-09-06T13:32:02.938634
| 2015-11-20T02:16:07
| 2015-11-20T02:16:07
| 30,149,262
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 578
|
java
|
package org.mingle.banana.spring.mvc.dao;
import java.util.List;
import org.mingle.banana.spring.jdbc.Spitter;
import org.mingle.banana.spring.jdbc.Spittle;
public interface SpitterDao {
void addSpitter(Spitter spitter);
void saveSpitter(Spitter spitter);
Spitter getSpitterById(long id);
List<Spittle> getRecentSpittle();
void saveSpittle(Spittle spittle);
List<Spittle> getSpittlesForSpitter(Spitter spitter);
Spitter getSpitterByUsername(String username);
void deleteSpittle(long id);
Spittle getSpittleById(long id);
List<Spitter> findAllSpitters();
}
|
[
"jinminglei@yeah.net"
] |
jinminglei@yeah.net
|
9b2cf94baaab89560acb0eb86731107894702afa
|
518bf342bc4138982af3e2724e75f1d9ca3ba56c
|
/solutions/2225. Find Players With Zero or One Losses/2225.java
|
3b79c052a3e54bbdf4eb102951510711fb090ed8
|
[
"MIT"
] |
permissive
|
walkccc/LeetCode
|
dae85af7cc689882a84ee5011f0a13a19ad97f18
|
a27be41c174565d365cbfe785f0633f634a01b2a
|
refs/heads/main
| 2023-08-28T01:32:43.384999
| 2023-08-20T19:00:45
| 2023-08-20T19:00:45
| 172,231,974
| 692
| 302
|
MIT
| 2023-08-13T14:48:42
| 2019-02-23T15:46:23
|
C++
|
UTF-8
|
Java
| false
| false
| 638
|
java
|
class Solution {
public List<List<Integer>> findWinners(int[][] matches) {
List<List<Integer>> ans = Arrays.asList(new ArrayList<>(), new ArrayList<>());
Map<Integer, Integer> lossesCount = new TreeMap<>();
for (int[] m : matches) {
final int winner = m[0];
final int loser = m[1];
if (!lossesCount.containsKey(winner))
lossesCount.put(winner, 0);
lossesCount.merge(loser, 1, Integer::sum);
}
for (final int player : lossesCount.keySet()) {
final int nLosses = lossesCount.get(player);
if (nLosses < 2)
ans.get(nLosses).add(player);
}
return ans;
}
}
|
[
"me@pengyuc.com"
] |
me@pengyuc.com
|
73ae66a620ec425ad0d88932d636835062ff4edc
|
53189efbfed5423821a84f631da404d07a80e404
|
/storage/app/Al-QuranIndonesia_com.andi.alquran.id_source_from_JADX/com/google/android/gms/internal/up.java
|
4ea9448a739d8ec84a4b80b63cfea9bc0808e2ed
|
[
"MIT"
] |
permissive
|
dwijpr/islam
|
0c9b77028d34862b6d06858c5b0d6ffec91b5014
|
6077291a619ac2f5b30a77e284c0a7361e7c8ad4
|
refs/heads/master
| 2021-01-19T17:16:49.818251
| 2017-03-13T23:00:08
| 2017-03-13T23:00:08
| 82,430,213
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 189
|
java
|
package com.google.android.gms.internal;
public enum up {
NONE,
GZIP;
public static up m9320a(String str) {
return "GZIP".equalsIgnoreCase(str) ? GZIP : NONE;
}
}
|
[
"dwijpr@gmail.com"
] |
dwijpr@gmail.com
|
b9c4ad943ba86a4edcd22b95e4ab897a9964e95f
|
5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab
|
/app/src/main/wechat6.5.3/com/tencent/mm/e/a/nb.java
|
6d58a22cc79b4a66e120e7c3e8c6b39524e13ff5
|
[] |
no_license
|
newtonker/wechat6.5.3
|
8af53a870a752bb9e3c92ec92a63c1252cb81c10
|
637a69732afa3a936afc9f4679994b79a9222680
|
refs/heads/master
| 2020-04-16T03:32:32.230996
| 2017-06-15T09:54:10
| 2017-06-15T09:54:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 395
|
java
|
package com.tencent.mm.e.a;
import com.tencent.mm.sdk.c.b;
public final class nb extends b {
public a bop;
public static final class a {
public long aYG;
public String bgD;
public String bgE;
}
public nb() {
this((byte) 0);
}
private nb(byte b) {
this.bop = new a();
this.nhx = false;
this.bpT = null;
}
}
|
[
"zhangxhbeta@gmail.com"
] |
zhangxhbeta@gmail.com
|
b8f397349dd37e0cc4f6c15ae02f3b010bbc8908
|
b08a313eeacff04700734840e2146c600f501bc7
|
/guvnor-ng/guvnor-core/guvnor-datamodel/guvnor-datamodel-api/src/main/java/org/kie/guvnor/datamodel/events/InvalidateDMOPackageCacheEvent.java
|
cd2784d996899600614ab00ab7d65c1cd97d6170
|
[
"Apache-2.0"
] |
permissive
|
Brianxia/guvnor
|
4d68bb549a7cb1274aaf49ba17f2c1cadcc6781b
|
cfbd7f763f8c2aad4224397ee4bd73d1644da620
|
refs/heads/master
| 2021-01-17T21:55:31.542359
| 2013-05-10T12:07:26
| 2013-05-10T12:09:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 969
|
java
|
package org.kie.guvnor.datamodel.events;
import org.jboss.errai.common.client.api.annotations.Portable;
import org.kie.commons.validation.PortablePreconditions;
import org.uberfire.backend.vfs.Path;
/**
* Event to invalidate an entry in a DataModelOracleCache. The resource path is used within the Event
* as all editors that could affect the validity of a DataModelOracleCache entry will know their resource's
* Path but not the Project path without performing a server round-trip to resolve such.
*/
@Portable
public class InvalidateDMOPackageCacheEvent {
private Path resourcePath;
public InvalidateDMOPackageCacheEvent() {
}
public InvalidateDMOPackageCacheEvent( final Path resourcePath ) {
PortablePreconditions.checkNotNull( "resourcePath",
resourcePath );
this.resourcePath = resourcePath;
}
public Path getResourcePath() {
return this.resourcePath;
}
}
|
[
"michael.anstis@gmail.com"
] |
michael.anstis@gmail.com
|
800510e1fa2d55a071d044278631585b5172de5b
|
6196b5c10e8b2d8ba4bbd7498585aa37de8b52ac
|
/NettyRPC 1.0/com/netty/rpc/core/RpcRecvSerializeFrame.java
|
7eb9f489898dcd17d2dd78da33c78c45b631258a
|
[] |
no_license
|
lixiongliang/nettyRPC
|
0d0805495d23263dfde3a53f83d4508ab03f7851
|
659435c31c8fba11e8de2580678ec75a2c4ebf35
|
refs/heads/master
| 2020-05-21T14:32:45.415271
| 2017-02-26T03:15:53
| 2017-02-26T03:15:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,708
|
java
|
package com.netty.rpc.core;
import com.netty.rpc.serialize.support.MessageCodecUtil;
import com.netty.rpc.serialize.support.RpcSerializeFrame;
import com.netty.rpc.serialize.support.RpcSerializeProtocol;
import com.netty.rpc.serialize.support.hessian.HessianCodecUtil;
import com.netty.rpc.serialize.support.hessian.HessianDecoder;
import com.netty.rpc.serialize.support.hessian.HessianEncoder;
import com.netty.rpc.serialize.support.kryo.KryoCodecUtil;
import com.netty.rpc.serialize.support.kryo.KryoDecoder;
import com.netty.rpc.serialize.support.kryo.KryoEncoder;
import com.netty.rpc.serialize.support.kryo.KryoPoolFactory;
import io.netty.channel.ChannelPipeline;
import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
import io.netty.handler.codec.LengthFieldPrepender;
import io.netty.handler.codec.serialization.ClassResolvers;
import io.netty.handler.codec.serialization.ObjectDecoder;
import io.netty.handler.codec.serialization.ObjectEncoder;
import java.util.Map;
/**
* RPC 服务端消息序列化协议框架
*/
public class RpcRecvSerializeFrame implements RpcSerializeFrame {
private Map<String, Object> handlerMap = null;
public RpcRecvSerializeFrame(Map<String, Object> handlerMap) {
this.handlerMap = handlerMap;
}
/**
* 根据序列化协议,选择管道的handler
* @param protocol
* @param pipeline
*/
public void select(RpcSerializeProtocol protocol, ChannelPipeline pipeline) {
switch (protocol) {
case JDKSERIALIZE: {
//解码器 inbound 入站数据 解决TCP黏包问题
pipeline.addLast(new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, MessageCodecUtil.MESSAGE_LENGTH, 0, MessageCodecUtil.MESSAGE_LENGTH));
//编码器 outbound 出站数据
pipeline.addLast(new LengthFieldPrepender(MessageCodecUtil.MESSAGE_LENGTH));
//编码器 outbound 出站数据
pipeline.addLast(new ObjectEncoder());
//解码器 inbound 入站数据
pipeline.addLast(new ObjectDecoder(Integer.MAX_VALUE, ClassResolvers.weakCachingConcurrentResolver(this.getClass().getClassLoader())));
//解码器 inbound 入站数据
pipeline.addLast(new MessageRecvHandler(handlerMap));
break;
/**
* 说明:
* 服务端入站时:也就是接收从客户端来的数据字节时:调用的是:
* 首先应该是解码器:LengthFieldBasedFrameDecoder-->ObjectDecoder-->MessageRecvHandler
* 上面这三个handler都是继承自inbound
*
* 服务端出站时:也就是服务端发送字节数据到客户端时:调用的是:
* 首先应该是编码器:LengthFieldPrepender-->ObjectEncoder
* 上面这两个handler都是继承自outbound
*
*/
}
case KRYOSERIALIZE: {
KryoCodecUtil util = new KryoCodecUtil(KryoPoolFactory.getKryoPoolInstance());
pipeline.addLast(new KryoEncoder(util));
pipeline.addLast(new KryoDecoder(util));
pipeline.addLast(new MessageRecvHandler(handlerMap));
break;
}
case HESSIANSERIALIZE: {
HessianCodecUtil util = new HessianCodecUtil();
pipeline.addLast(new HessianEncoder(util));
pipeline.addLast(new HessianDecoder(util));
pipeline.addLast(new MessageRecvHandler(handlerMap));
break;
}
}
}
}
|
[
"1849491904@qq.com"
] |
1849491904@qq.com
|
16da05d390d859f33f3fc43cc59a024f1ed112de
|
4e2f16f2904d75e55cce1b2cef54acf79aa21280
|
/gradle-experimental/src/main/java/com/android/build/gradle/model/internal/DefaultNativeSourceSet.java
|
a0df9655047d2b804f3212d06d4eccf28d704a1c
|
[
"Apache-2.0"
] |
permissive
|
yuweiguocn/build-system
|
0e49a836728614efd30e9bae8c7e92b0d8371f2e
|
bc4c85f7b25770caa4c565176b8f92e1cdd9cf70
|
refs/heads/master
| 2020-09-21T16:20:14.670290
| 2019-11-29T12:07:13
| 2019-11-29T12:07:13
| 224,846,645
| 13
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,076
|
java
|
/*
* Copyright (C) 2015 The Android Open Source Project
*
* 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.android.build.gradle.model.internal;
import com.android.build.gradle.internal.AbstractNativeDependentSourceSet;
import com.android.build.gradle.model.NativeSourceSet;
import org.gradle.api.file.SourceDirectorySet;
import org.gradle.api.internal.file.DefaultSourceDirectorySet;
import org.gradle.api.tasks.util.PatternFilterable;
import org.gradle.api.tasks.util.PatternSet;
/**
* Implementation of {@link NativeSourceSet}
*/
public class DefaultNativeSourceSet extends AbstractNativeDependentSourceSet
implements NativeSourceSet {
private final DefaultSourceDirectorySet exportedHeaders;
private final DefaultSourceDirectorySet implicitHeaders;
private final PatternFilterable cFilter;
private final PatternFilterable cppFilter;
public DefaultNativeSourceSet() {
this.exportedHeaders = sourceDirectorySetFactory.create("exported headers");
this.implicitHeaders = sourceDirectorySetFactory.create("implicit headers");
cFilter = new PatternSet();
cppFilter = new PatternSet();
}
@Override
public SourceDirectorySet getExportedHeaders() {
return exportedHeaders;
}
@Override
public SourceDirectorySet getImplicitHeaders() {
return implicitHeaders;
}
@Override
public PatternFilterable getcFilter() {
return cFilter;
}
@Override
public PatternFilterable getCppFilter() {
return cppFilter;
}
}
|
[
"yuweiguocn@gmail.com"
] |
yuweiguocn@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.