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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5cf6c24414a8414079aeab6110ad9ad5d51ce38c
|
54eae96545a07f15fa0302482c043bc4c35e005f
|
/src/main/java/com/tcf/ms/command/core/operation/StoreRandomArmor.java
|
1b2766f3a2dbd9792d5086beb7ed786d9343e73b
|
[] |
no_license
|
yunwei1237/ms-blade
|
57a4d7942f42d4f74a1879a050a710ed66fb471e
|
da24fa4223e8a2cc9be0a54c4b9c63d7ea18928c
|
refs/heads/master
| 2022-06-21T10:30:14.765505
| 2020-03-05T03:04:55
| 2020-03-05T03:04:55
| 242,106,127
| 0
| 0
| null | 2022-06-17T02:56:51
| 2020-02-21T09:49:22
|
Python
|
UTF-8
|
Java
| false
| false
| 501
|
java
|
package com.tcf.ms.command.core.operation;
import com.tcf.ms.command.Operation;
import com.tcf.ms.command.core.base.var.Variable;
/**
* (store_random_armor,<destination>)
*/
public class StoreRandomArmor implements Operation{
private Variable destination;
public StoreRandomArmor(Variable destination) {
this.destination = destination;
}
@Override
public String toScriptString() {
return String.format("(store_random_armor,%s),",destination);
}
}
|
[
"yunwei1237@163.com"
] |
yunwei1237@163.com
|
27dad555a42df8efb524f4b9bb3856b2d1406a95
|
3b6092df8e75f7f0b5af815c35c55d4cc7084ce5
|
/apache-tomcat-5.5.23-src/container/catalina/src/share/org/apache/catalina/startup/DigesterFactory.java
|
1c9fd18b7fd48a9426fd17fdfb4bd1daf7fce0d1
|
[
"Apache-2.0"
] |
permissive
|
Xiaofeng-Zhang/tomcat-5.5
|
cb48f7b8da48dcc878807065c1f5df0a5a179d50
|
5537619f8e42655acb0e8166c68a15865e7f5228
|
refs/heads/master
| 2021-01-12T01:25:07.702708
| 2017-01-09T01:48:07
| 2017-01-09T01:48:07
| 78,383,253
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,424
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.catalina.startup;
import java.net.URL;
import org.apache.catalina.util.SchemaResolver;
import org.apache.tomcat.util.digester.Digester;
import org.apache.tomcat.util.digester.RuleSet;
/**
* Wrapper class around the Digester that hide Digester's initialization details
*
* @author Jean-Francois Arcand
*/
public class DigesterFactory {
/**
* The log.
*/
protected static org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog(DigesterFactory.class);
/**
* The XML entiry resolver used by the Digester.
*/
private static SchemaResolver schemaResolver;
/**
* Create a <code>Digester</code> parser with no <code>Rule</code>
* associated and XML validation turned off.
*/
public static Digester newDigester(){
return newDigester(false, false, null);
}
/**
* Create a <code>Digester</code> parser with XML validation turned off.
* @param rule an instance of <code>RuleSet</code> used for parsing the xml.
*/
public static Digester newDigester(RuleSet rule){
return newDigester(false,false,rule);
}
/**
* Create a <code>Digester</code> parser.
* @param xmlValidation turn on/off xml validation
* @param xmlNamespaceAware turn on/off namespace validation
* @param rule an instance of <code>RuleSet</code> used for parsing the xml.
*/
public static Digester newDigester(boolean xmlValidation,
boolean xmlNamespaceAware,
RuleSet rule) {
Digester digester = new Digester();
digester.setNamespaceAware(xmlNamespaceAware);
digester.setValidating(xmlValidation);
digester.setUseContextClassLoader(true);
if (xmlValidation || xmlNamespaceAware){
configureSchema(digester);
}
schemaResolver = new SchemaResolver(digester);
registerLocalSchema();
digester.setEntityResolver(schemaResolver);
if ( rule != null ) {
digester.addRuleSet(rule);
}
return (digester);
}
/**
* Utilities used to force the parser to use local schema, when available,
* instead of the <code>schemaLocation</code> XML element.
*/
protected static void registerLocalSchema(){
// J2EE
register(Constants.J2eeSchemaResourcePath_14,
Constants.J2eeSchemaPublicId_14);
// W3C
register(Constants.W3cSchemaResourcePath_10,
Constants.W3cSchemaPublicId_10);
// JSP
register(Constants.JspSchemaResourcePath_20,
Constants.JspSchemaPublicId_20);
// TLD
register(Constants.TldDtdResourcePath_11,
Constants.TldDtdPublicId_11);
register(Constants.TldDtdResourcePath_12,
Constants.TldDtdPublicId_12);
register(Constants.TldSchemaResourcePath_20,
Constants.TldSchemaPublicId_20);
// web.xml
register(Constants.WebDtdResourcePath_22,
Constants.WebDtdPublicId_22);
register(Constants.WebDtdResourcePath_23,
Constants.WebDtdPublicId_23);
register(Constants.WebSchemaResourcePath_24,
Constants.WebSchemaPublicId_24);
// Web Service
register(Constants.J2eeWebServiceSchemaResourcePath_11,
Constants.J2eeWebServiceSchemaPublicId_11);
register(Constants.J2eeWebServiceClientSchemaResourcePath_11,
Constants.J2eeWebServiceClientSchemaPublicId_11);
}
/**
* Load the resource and add it to the resolver.
*/
protected static void register(String resourceURL, String resourcePublicId){
URL url = DigesterFactory.class.getResource(resourceURL);
if(url == null) {
log.warn("Could not get url for " + resourceURL);
} else {
schemaResolver.register(resourcePublicId , url.toString() );
}
}
/**
* Turn on DTD and/or validation (based on the parser implementation)
*/
protected static void configureSchema(Digester digester){
URL url = DigesterFactory.class
.getResource(Constants.WebSchemaResourcePath_24);
if(url == null) {
log.error("Could not get url for "
+ Constants.WebSchemaResourcePath_24);
} else {
digester.setSchema(url.toString());
}
}
}
|
[
"xiaofeng.zhang@sap.com"
] |
xiaofeng.zhang@sap.com
|
3e82365926c60f57245aee3f80b87eaa739d2bd8
|
b309ead2702d7977282cbcb9abaf57911153db42
|
/jdk8/src/main/java/org/omg/DynamicAny/DynAnyFactoryHelper.java
|
8dfd00f2feafc07990350b15e768e4fb8d601489
|
[] |
no_license
|
HenryXi/jdk
|
5774d9a41d913c71e658d7176ace7033313a04a4
|
c376402d2d441141e6b0a484ff685a8fc384e489
|
refs/heads/master
| 2020-05-04T05:15:07.171421
| 2019-04-03T01:31:00
| 2019-04-03T01:35:30
| 178,982,205
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,938
|
java
|
package org.omg.DynamicAny;
/**
* org/omg/DynamicAny/DynAnyFactoryHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u71/5731/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl
* Tuesday, December 22, 2015 6:17:59 PM PST
*/
/**
* DynAny objects can be created by invoking operations on the DynAnyFactory object.
* Generally there are only two ways to create a DynAny object:
* <UL>
* <LI>invoking an operation on an existing DynAny object
* <LI>invoking an operation on a DynAnyFactory object
* </UL>
* A constructed DynAny object supports operations that enable the creation of new DynAny
* objects encapsulating access to the value of some constituent.
* DynAny objects also support the copy operation for creating new DynAny objects.
* A reference to the DynAnyFactory object is obtained by calling ORB.resolve_initial_references()
* with the identifier parameter set to the string constant "DynAnyFactory".
* <P>Dynamic interpretation of an any usually involves creating a DynAny object using create_dyn_any()
* as the first step. Depending on the type of the any, the resulting DynAny object reference can be narrowed
* to a DynFixed, DynStruct, DynSequence, DynArray, DynUnion, DynEnum, or DynValue object reference.
* <P>Dynamic creation of an any involves creating a DynAny object using create_dyn_any_from_type_code(),
* passing the TypeCode associated with the value to be created. The returned reference is narrowed to one of
* the complex types, such as DynStruct, if appropriate. Then, the value can be initialized by means of
* invoking operations on the resulting object. Finally, the to_any operation can be invoked
* to create an any value from the constructed DynAny.
*/
abstract public class DynAnyFactoryHelper
{
private static String _id = "IDL:omg.org/DynamicAny/DynAnyFactory:1.0";
public static void insert (org.omg.CORBA.Any a, DynAnyFactory that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static DynAnyFactory extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
__typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (DynAnyFactoryHelper.id (), "DynAnyFactory");
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static DynAnyFactory read (org.omg.CORBA.portable.InputStream istream)
{
throw new org.omg.CORBA.MARSHAL ();
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, DynAnyFactory value)
{
throw new org.omg.CORBA.MARSHAL ();
}
public static DynAnyFactory narrow (org.omg.CORBA.Object obj)
{
if (obj == null)
return null;
else if (obj instanceof DynAnyFactory)
return (DynAnyFactory)obj;
else if (!obj._is_a (id ()))
throw new org.omg.CORBA.BAD_PARAM ();
else
{
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
_DynAnyFactoryStub stub = new _DynAnyFactoryStub ();
stub._set_delegate(delegate);
return stub;
}
}
public static DynAnyFactory unchecked_narrow (org.omg.CORBA.Object obj)
{
if (obj == null)
return null;
else if (obj instanceof DynAnyFactory)
return (DynAnyFactory)obj;
else
{
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
_DynAnyFactoryStub stub = new _DynAnyFactoryStub ();
stub._set_delegate(delegate);
return stub;
}
}
}
|
[
"xixiaoyong@xiaomi.com"
] |
xixiaoyong@xiaomi.com
|
87ec8a1925ac74d4dabe0fc2a4871ae8c004fb08
|
3a9d983e611e4848af9a4b513da502510ab26e68
|
/src/main/java/org/jhipster/chiffrageprojet/domain/AbstractAuditingEntity.java
|
f5be2fe6c12afb90d05b50c09779b9085c626d1e
|
[] |
no_license
|
tboucaud/application-de-chiffrage-de-projet
|
171942635e6a6bda353d5a7c4685778da75cff0c
|
66432dd863e759f0d206350e41154cde88bce50d
|
refs/heads/main
| 2023-05-14T11:34:33.775222
| 2021-06-03T13:50:14
| 2021-06-03T13:50:14
| 373,523,700
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,181
|
java
|
package org.jhipster.chiffrageprojet.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.io.Serializable;
import java.time.Instant;
import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
/**
* Base abstract class for entities which will hold definitions for created, last modified, created by,
* last modified by attributes.
*/
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
@CreatedBy
@Column(name = "created_by", nullable = false, length = 50, updatable = false)
@JsonIgnore
private String createdBy;
@CreatedDate
@Column(name = "created_date", updatable = false)
@JsonIgnore
private Instant createdDate = Instant.now();
@LastModifiedBy
@Column(name = "last_modified_by", length = 50)
@JsonIgnore
private String lastModifiedBy;
@LastModifiedDate
@Column(name = "last_modified_date")
@JsonIgnore
private Instant lastModifiedDate = Instant.now();
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Instant getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Instant createdDate) {
this.createdDate = createdDate;
}
public String getLastModifiedBy() {
return lastModifiedBy;
}
public void setLastModifiedBy(String lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}
public Instant getLastModifiedDate() {
return lastModifiedDate;
}
public void setLastModifiedDate(Instant lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
58fa88e17a21a528ccb941a1c98a20ade7501f3b
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/boot/svg/a/a/ajm.java
|
0003f5e4c10aa4df8e4836af317cfa41b0f4ff0c
|
[] |
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
| 5,348
|
java
|
package com.tencent.mm.boot.svg.a.a;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Join;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.os.Looper;
import com.tencent.mm.svg.WeChatSVGRenderC2Java;
import com.tencent.mm.svg.c;
public final class ajm extends c
{
private final int height = 24;
private final int width = 120;
public final int a(int paramInt, Object[] paramArrayOfObject)
{
switch (paramInt)
{
default:
case 0:
case 1:
case 2:
}
while (true)
{
paramInt = 0;
while (true)
{
return paramInt;
paramInt = 120;
continue;
paramInt = 24;
}
Canvas localCanvas = (Canvas)paramArrayOfObject[0];
paramArrayOfObject = (Looper)paramArrayOfObject[1];
c.h(paramArrayOfObject);
c.g(paramArrayOfObject);
Object localObject1 = c.k(paramArrayOfObject);
((Paint)localObject1).setFlags(385);
((Paint)localObject1).setStyle(Paint.Style.FILL);
Object localObject2 = c.k(paramArrayOfObject);
((Paint)localObject2).setFlags(385);
((Paint)localObject2).setStyle(Paint.Style.STROKE);
((Paint)localObject1).setColor(-16777216);
((Paint)localObject2).setStrokeWidth(1.0F);
((Paint)localObject2).setStrokeCap(Paint.Cap.BUTT);
((Paint)localObject2).setStrokeJoin(Paint.Join.MITER);
((Paint)localObject2).setStrokeMiter(4.0F);
((Paint)localObject2).setPathEffect(null);
c.a((Paint)localObject2, paramArrayOfObject).setStrokeWidth(1.0F);
localObject1 = c.a((Paint)localObject1, paramArrayOfObject);
((Paint)localObject1).setColor(-1);
Object localObject3 = c.a((Paint)localObject1, paramArrayOfObject);
((Paint)localObject3).setColor(-1);
localObject2 = c.l(paramArrayOfObject);
((Path)localObject2).moveTo(60.0F, 24.0F);
((Path)localObject2).cubicTo(66.627419F, 24.0F, 72.0F, 18.627417F, 72.0F, 12.0F);
((Path)localObject2).cubicTo(72.0F, 5.372583F, 66.627419F, 0.0F, 60.0F, 0.0F);
((Path)localObject2).cubicTo(53.372581F, 0.0F, 48.0F, 5.372583F, 48.0F, 12.0F);
((Path)localObject2).cubicTo(48.0F, 18.627417F, 53.372581F, 24.0F, 60.0F, 24.0F);
((Path)localObject2).close();
((Path)localObject2).moveTo(12.0F, 24.0F);
((Path)localObject2).cubicTo(18.627417F, 24.0F, 24.0F, 18.627417F, 24.0F, 12.0F);
((Path)localObject2).cubicTo(24.0F, 5.372583F, 18.627417F, 0.0F, 12.0F, 0.0F);
((Path)localObject2).cubicTo(5.372583F, 0.0F, 0.0F, 5.372583F, 0.0F, 12.0F);
((Path)localObject2).cubicTo(0.0F, 18.627417F, 5.372583F, 24.0F, 12.0F, 24.0F);
((Path)localObject2).close();
((Path)localObject2).moveTo(108.0F, 24.0F);
((Path)localObject2).cubicTo(114.62742F, 24.0F, 120.0F, 18.627417F, 120.0F, 12.0F);
((Path)localObject2).cubicTo(120.0F, 5.372583F, 114.62742F, 0.0F, 108.0F, 0.0F);
((Path)localObject2).cubicTo(101.37258F, 0.0F, 96.0F, 5.372583F, 96.0F, 12.0F);
((Path)localObject2).cubicTo(96.0F, 18.627417F, 101.37258F, 24.0F, 108.0F, 24.0F);
((Path)localObject2).close();
localCanvas.saveLayerAlpha(null, 76, 4);
localObject3 = c.a((Paint)localObject3, paramArrayOfObject);
WeChatSVGRenderC2Java.setFillType((Path)localObject2, 2);
localCanvas.drawPath((Path)localObject2, (Paint)localObject3);
localCanvas.restore();
localObject2 = c.a((Paint)localObject1, paramArrayOfObject);
((Paint)localObject2).setColor(-1);
localObject3 = c.l(paramArrayOfObject);
((Path)localObject3).moveTo(60.0F, 0.0F);
((Path)localObject3).cubicTo(66.627419F, 0.0F, 72.0F, 5.372582F, 72.0F, 12.0F);
((Path)localObject3).cubicTo(72.0F, 18.627419F, 66.627419F, 24.0F, 60.0F, 24.0F);
((Path)localObject3).cubicTo(53.372581F, 24.0F, 48.0F, 18.627419F, 48.0F, 12.0F);
((Path)localObject3).cubicTo(48.0F, 5.372582F, 53.372581F, 0.0F, 60.0F, 0.0F);
((Path)localObject3).close();
localCanvas.saveLayerAlpha(null, 153, 4);
localCanvas.drawPath((Path)localObject3, c.a((Paint)localObject2, paramArrayOfObject));
localCanvas.restore();
localObject2 = c.a((Paint)localObject1, paramArrayOfObject);
((Paint)localObject2).setColor(-1);
localObject1 = c.l(paramArrayOfObject);
((Path)localObject1).moveTo(12.0F, 0.0F);
((Path)localObject1).cubicTo(18.627419F, 0.0F, 24.0F, 5.372582F, 24.0F, 12.0F);
((Path)localObject1).cubicTo(24.0F, 18.627419F, 18.627419F, 24.0F, 12.0F, 24.0F);
((Path)localObject1).cubicTo(5.372582F, 24.0F, 0.0F, 18.627419F, 0.0F, 12.0F);
((Path)localObject1).cubicTo(0.0F, 5.372582F, 5.372582F, 0.0F, 12.0F, 0.0F);
((Path)localObject1).close();
localCanvas.saveLayerAlpha(null, 76, 4);
localCanvas.drawPath((Path)localObject1, c.a((Paint)localObject2, paramArrayOfObject));
localCanvas.restore();
c.j(paramArrayOfObject);
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar
* Qualified Name: com.tencent.mm.boot.svg.a.a.ajm
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
61ca6c0fbcd48c77312d878fdee9767e3d0374b9
|
26794b8589cc64d84d2092404ec74d8020a02fd0
|
/app/src/main/java/lk/aditi/ecom/models/productdetail/Product.java
|
1d586bed6223d8ea0309a70f5e67baf94d46ee92
|
[] |
no_license
|
technorizenshesh/Aditi_User
|
db53b6d8e659ad4fe8afe75baba00832bc33a837
|
1eef470cda1170bd2ba8d4f0c9cd98ceb615ce23
|
refs/heads/master
| 2023-07-30T05:43:49.755661
| 2021-09-20T13:23:28
| 2021-09-20T13:23:28
| 408,447,324
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,062
|
java
|
package lk.aditi.ecom.models.productdetail;
import com.google.gson.annotations.SerializedName;
public class Product{
@SerializedName("image")
private String image;
@SerializedName("address")
private String address;
@SerializedName("category_id")
private String categoryId;
@SerializedName("date_time")
private String dateTime;
@SerializedName("shop_mobile")
private String shopMobile;
@SerializedName("lon")
private String lon;
@SerializedName("id")
private String id;
@SerializedName("shop_name")
private String shopName;
@SerializedName("lat")
private String lat;
public void setImage(String image){
this.image = image;
}
public String getImage(){
return image;
}
public void setAddress(String address){
this.address = address;
}
public String getAddress(){
return address;
}
public void setCategoryId(String categoryId){
this.categoryId = categoryId;
}
public String getCategoryId(){
return categoryId;
}
public void setDateTime(String dateTime){
this.dateTime = dateTime;
}
public String getDateTime(){
return dateTime;
}
public void setShopMobile(String shopMobile){
this.shopMobile = shopMobile;
}
public String getShopMobile(){
return shopMobile;
}
public void setLon(String lon){
this.lon = lon;
}
public String getLon(){
return lon;
}
public void setId(String id){
this.id = id;
}
public String getId(){
return id;
}
public void setShopName(String shopName){
this.shopName = shopName;
}
public String getShopName(){
return shopName;
}
public void setLat(String lat){
this.lat = lat;
}
public String getLat(){
return lat;
}
@Override
public String toString(){
return
"Product{" +
"image = '" + image + '\'' +
",address = '" + address + '\'' +
",category_id = '" + categoryId + '\'' +
",date_time = '" + dateTime + '\'' +
",shop_mobile = '" + shopMobile + '\'' +
",lon = '" + lon + '\'' +
",id = '" + id + '\'' +
",shop_name = '" + shopName + '\'' +
",lat = '" + lat + '\'' +
"}";
}
}
|
[
"ak4729176@gmail.com"
] |
ak4729176@gmail.com
|
b920fd9808c9a842f5117f14204d9611ba6fb1df
|
e1af7696101f8f9eb12c0791c211e27b4310ecbc
|
/MCP/temp/src/minecraft/net/minecraft/client/renderer/entity/layers/LayerStrayClothing.java
|
7789f9a5af70db129616792998dec92268cb9435
|
[] |
no_license
|
VinmaniaTV/Mania-Client
|
e36810590edf09b1d78b8eeaf5cbc46bb3e2d8ce
|
7a12b8bad1a8199151b3f913581775f50cc4c39c
|
refs/heads/main
| 2023-02-12T10:31:29.076263
| 2021-01-13T02:29:35
| 2021-01-13T02:29:35
| 329,156,099
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,459
|
java
|
package net.minecraft.client.renderer.entity.layers;
import net.minecraft.client.model.ModelSkeleton;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderLivingBase;
import net.minecraft.entity.monster.EntityStray;
import net.minecraft.util.ResourceLocation;
public class LayerStrayClothing implements LayerRenderer<EntityStray> {
private static final ResourceLocation field_190092_a = new ResourceLocation("textures/entity/skeleton/stray_overlay.png");
private final RenderLivingBase<?> field_190093_b;
private final ModelSkeleton field_190094_c = new ModelSkeleton(0.25F, true);
public LayerStrayClothing(RenderLivingBase<?> p_i47183_1_) {
this.field_190093_b = p_i47183_1_;
}
public void func_177141_a(EntityStray p_177141_1_, float p_177141_2_, float p_177141_3_, float p_177141_4_, float p_177141_5_, float p_177141_6_, float p_177141_7_, float p_177141_8_) {
this.field_190094_c.func_178686_a(this.field_190093_b.func_177087_b());
this.field_190094_c.func_78086_a(p_177141_1_, p_177141_2_, p_177141_3_, p_177141_4_);
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
this.field_190093_b.func_110776_a(field_190092_a);
this.field_190094_c.func_78088_a(p_177141_1_, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, p_177141_8_);
}
public boolean func_177142_b() {
return true;
}
}
|
[
"vinmaniamc@gmail.com"
] |
vinmaniamc@gmail.com
|
c0b46334a487bf88dea2036ec4970016c39c0031
|
fc4150290b10e2e331b55e54e628798eabaa47ad
|
/HAL/.svn/pristine/b9/b9e871590d78261c268972423c1ad4454a3e40f0.svn-base
|
64999f206e52e62f314a166337d1c629a6123c98
|
[] |
no_license
|
vadhwa11/newproject2
|
8e40bd4acfd4edc6b721eeca8636f8b7d589af2b
|
fc9bd770fdadf650f004323f85884dc143827f4d
|
refs/heads/master
| 2020-05-05T04:01:05.628775
| 2019-04-05T14:38:10
| 2019-04-05T14:38:10
| 179,694,408
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,006
|
package jkt.hms.physiotherapy.dataservice;
import java.util.Map;
import jkt.hms.masters.business.MasTherapyType;
import jkt.hms.util.Box;
public interface PhysiotherapyDataService {
Map<String, Object> showTherapyTypeJsp();
Map<String, Object> searchTherapyType(String therapyTypeCode,
String therapyTypeName);
boolean addTherapyType(MasTherapyType therapyType);
boolean editTherapyType(Map<String, Object> generalMap);
boolean deleteTherapyType(int therapyTypeId, Map<String, Object> generalMap);
Map<String, Object> getPhyWaitingList(Map<String, Object> mapForDS);
Map<String, Object> getDetailsForPhysiotherapy(Box box);
Map<String, Object> savePhysiotherapyDetails(Box box);
Map<String, Object> getConnectionForReport();
Map<String, Object> getPhysiotherapyVisitDetails(Box box);
Map<String, Object> getHinNoForAppointment(Box box);
Map<String, Object> getDetailsForHinNo(Box box);
Map<String, Object> showPhysiotherapyAppointmentJsp(Box box);
Map<String, Object> savePhysiotherapyAppointment(Box box);
Map<String, Object> searchPhyWaitingListJsp(Box box);
Map<String, Object> getTherapyTypeListForAutoComplete(
Map<String, Object> generalMap);
Map<String, Object> getPhysioAppointmentDetails(Box box);
Map<String, Object> savePhysioTheraphyAppointment(Box box);
Map<String, Object> getDetailsForPhysiotherapyVisitForAppointement(Box box);
Map<String, Object> saveVisitEntryForAppointmentDetails(Box box);
Map<String, Object> getPatientDetailsFordirectVisitEntry(String serviceNo);
Map<String, Object> getPatientDetails(Box box);
Map<String, Object> showDirectTherapyVisitEntryJps(Box box);
Map<String, Object> showPhyTreatmentRegisterJsp(int hospitalId);
Map<String, Object> showPhysioTherapyTreatmentRegiterGraph(Box box);
Map<String, Object> showPhysiotherapyAppointmentRegister(int hospitalId);
Map<String, Object> showPhysiotherapyVisitWaitingList(int hospitalId);
Map<String, Object> showPhyAppointmentRegisterReport(Box box);
}
|
[
"vadhwa11@gmail.com"
] |
vadhwa11@gmail.com
|
|
26f5b792d244f155221cf05ef9e757f8bbd7ed83
|
47fa1f382f5899e61e62834ea8a4368b597321a3
|
/src/main/java/com/noobanidus/hungering/events/Capabilities.java
|
552fc99e749b46293f0bbcf4d59db2b6776f070e
|
[
"MIT"
] |
permissive
|
noobanidus/hungering
|
b4c3c594ac0f91bf4b691413a23c48e2ec97737b
|
8d496d01ef6655aac9fa49f802fde40006f8319f
|
refs/heads/master
| 2021-06-20T13:31:26.172356
| 2021-01-26T07:59:35
| 2021-01-26T07:59:35
| 175,407,970
| 0
| 0
|
MIT
| 2021-01-26T07:59:35
| 2019-03-13T11:33:15
|
Java
|
UTF-8
|
Java
| false
| false
| 839
|
java
|
package com.noobanidus.hungering.events;
import com.noobanidus.hungering.Hungering;
import com.noobanidus.hungering.init.Items;
import com.noobanidus.hungering.compat.baubles.CapabilityHandler;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.AttachCapabilitiesEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@SuppressWarnings("unused")
@Mod.EventBusSubscriber(modid= Hungering.MODID)
public class Capabilities {
@SubscribeEvent
public static void onItemCapability (AttachCapabilitiesEvent<ItemStack> event) {
if (event.getObject().getItem() == Items.torc) {
event.addCapability(new ResourceLocation("hungering", "hunger_charm"), CapabilityHandler.INSTANCE);
}
}
}
|
[
"due@wxwhatever.com"
] |
due@wxwhatever.com
|
40389ad14fe58be34bb706e76359696aad0aa65b
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/dts-20200101/src/main/java/com/aliyun/dts20200101/models/ModifySubscriptionObjectResponse.java
|
e1689f9ebc0f89f1aebc2ce82567f2444182a827
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,457
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dts20200101.models;
import com.aliyun.tea.*;
public class ModifySubscriptionObjectResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public ModifySubscriptionObjectResponseBody body;
public static ModifySubscriptionObjectResponse build(java.util.Map<String, ?> map) throws Exception {
ModifySubscriptionObjectResponse self = new ModifySubscriptionObjectResponse();
return TeaModel.build(map, self);
}
public ModifySubscriptionObjectResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public ModifySubscriptionObjectResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public ModifySubscriptionObjectResponse setBody(ModifySubscriptionObjectResponseBody body) {
this.body = body;
return this;
}
public ModifySubscriptionObjectResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
729e2de0986082d7978d12c863f36995d7a3d83b
|
7b733d7be68f0fa4df79359b57e814f5253fc72d
|
/system/Testing/src/com/percussion/design/objectstore/PSDefaultSelectedTest.java
|
f96ba22be0b10f9eb04c26025202865054abfdff
|
[
"LicenseRef-scancode-dco-1.1",
"Apache-2.0",
"OFL-1.1",
"LGPL-2.0-or-later"
] |
permissive
|
percussion/percussioncms
|
318ac0ef62dce12eb96acf65fc658775d15d95ad
|
c8527de53c626097d589dc28dba4a4b5d6e4dd2b
|
refs/heads/development
| 2023-08-31T14:34:09.593627
| 2023-08-31T14:04:23
| 2023-08-31T14:04:23
| 331,373,975
| 18
| 6
|
Apache-2.0
| 2023-09-14T21:29:25
| 2021-01-20T17:03:38
|
Java
|
UTF-8
|
Java
| false
| false
| 2,988
|
java
|
/*
* Copyright 1999-2023 Percussion Software, 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.percussion.design.objectstore;
import com.percussion.xml.PSXmlDocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
// Test case
public class PSDefaultSelectedTest extends TestCase
{
public PSDefaultSelectedTest(String name)
{
super(name);
}
public void testEquals() throws Exception
{
}
public void testXmlNullEntry() throws Exception
{
Document doc = PSXmlDocumentBuilder.createXmlDocument();
Element root = PSXmlDocumentBuilder.createRoot(doc, "Test");
// create test object
PSDefaultSelected testTo = new PSDefaultSelected();
Element elem = testTo.toXml(doc);
root.appendChild(elem);
// create a new object and populate it from our testTo element
PSDefaultSelected testFrom = new PSDefaultSelected(elem, null, null);
assertTrue(testTo.equals(testFrom));
}
public void testXmlSequence() throws Exception
{
Document doc = PSXmlDocumentBuilder.createXmlDocument();
Element root = PSXmlDocumentBuilder.createRoot(doc, "Test");
// create test object
PSDefaultSelected testTo = new PSDefaultSelected(12);
Element elem = testTo.toXml(doc);
root.appendChild(elem);
// create a new object and populate it from our testTo element
PSDefaultSelected testFrom = new PSDefaultSelected(elem, null, null);
assertTrue(testTo.equals(testFrom));
}
public void testXmlText() throws Exception
{
Document doc = PSXmlDocumentBuilder.createXmlDocument();
Element root = PSXmlDocumentBuilder.createRoot(doc, "Test");
// create test object
PSDefaultSelected testTo = new PSDefaultSelected("text");
Element elem = testTo.toXml(doc);
root.appendChild(elem);
// create a new object and populate it from our testTo element
PSDefaultSelected testFrom = new PSDefaultSelected(elem, null, null);
assertTrue(testTo.equals(testFrom));
}
public static Test suite()
{
TestSuite suite = new TestSuite();
suite.addTest(new PSDefaultSelectedTest("testXmlNullEntry"));
suite.addTest(new PSDefaultSelectedTest("testXmlSequence"));
suite.addTest(new PSDefaultSelectedTest("testXmlText"));
return suite;
}
}
|
[
"nate.chadwick@gmail.com"
] |
nate.chadwick@gmail.com
|
9805bf189a2305dd4a6263caa0097f998e8265c2
|
78f7fd54a94c334ec56f27451688858662e1495e
|
/VoterData/src/main/java/com/itgrids/voterdata/service/ReadMunicipalMobileNumbers.java
|
c85c05fee30bb7a14b82d0f744ab7a3eeb44cab5
|
[] |
no_license
|
hymanath/PA
|
2e8f2ef9e1d3ed99df496761a7b72ec50d25e7ef
|
d166bf434601f0fbe45af02064c94954f6326fd7
|
refs/heads/master
| 2021-09-12T09:06:37.814523
| 2018-04-13T20:13:59
| 2018-04-13T20:13:59
| 129,496,146
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,803
|
java
|
package com.itgrids.voterdata.service;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
public class ReadMunicipalMobileNumbers {
public static void main(String[] args) {
try{
ReadMunicipalMobileNumbers readMunicipalMobileNumbers = new ReadMunicipalMobileNumbers();
File districtFolder = new File(args[0]);
{
if(districtFolder.isDirectory())
{
readMunicipalMobileNumbers.readData(districtFolder.getAbsolutePath());
}
}
}catch(Exception e)
{
e.printStackTrace();
}
}
public int readData(String filePath)
{
int count = 0;
try{
File file2 = new File(filePath);
if(file2.isDirectory())
{
BufferedWriter outwriter = new BufferedWriter(new FileWriter(file2.getAbsolutePath()+"_Mobiles.txt"));
StringBuilder sb = new StringBuilder();
for(File file : file2.listFiles())
{
System.out.println("Reading File -- "+file.getAbsolutePath());
String municipality = file.getName();
if(file.isDirectory())
{
for(File file3 : file.listFiles())
{
if(!file3.isDirectory())
{
BufferedReader br = new BufferedReader(new FileReader(file3));
String line = null;
while((line = br.readLine()) != null)
{
if(line.trim().length() > 0)
{
sb.append(municipality+"\t"+line.trim()+"\n");
}
}
br.close();
}
}
}
}
outwriter.write(sb.toString());
outwriter.close();
}
return count;
}catch(Exception e)
{
e.printStackTrace();
return count;
}
}
/*public int readData(String filePath)
{
int count = 0;
try{
File file2 = new File(filePath);
if(file2.isDirectory())
{
for(File file : file2.listFiles())
{
System.out.println("Reading File -- "+file.getAbsolutePath());
BufferedWriter outwriter = new BufferedWriter(new FileWriter(file.getAbsolutePath()+".txt"));
StringBuilder sb = new StringBuilder();
if(file.isDirectory())
{
for(File file3 : file.listFiles())
{
if(!file3.isDirectory())
{
BufferedReader br = new BufferedReader(new FileReader(file3));
String line = null;
while((line = br.readLine()) != null)
{
if(line.trim().length() > 0)
{
sb.append(line.trim()+"\n");
}
}
br.close();
}
}
}
outwriter.write(sb.toString());
outwriter.close();
}
}
return count;
}catch(Exception e)
{
e.printStackTrace();
return count;
}
}*/
}
|
[
"itgrids@b17b186f-d863-de11-8533-00e0815b4126"
] |
itgrids@b17b186f-d863-de11-8533-00e0815b4126
|
66b27d6c2ffdabf22526729f2c169b1a8d0f4de8
|
1150f16bf7f7391ed7e3d7e1b67c4897008be532
|
/resource/src/main/java/com/exc/street/light/resource/dto/sl/shuncom/SettingModifyDTO.java
|
860382929e9f52a36f59a7d0a83add255bd0d937
|
[] |
no_license
|
dragonxu/street_light_yancheng
|
e0c957214aae2ebbba2470438c16cd1f8bf600ec
|
5d0d4fd4af0eb6b54f7e1ecef9651a3b9208d7f7
|
refs/heads/master
| 2023-01-15T19:36:53.113876
| 2020-11-24T07:37:34
| 2020-11-24T07:37:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,024
|
java
|
package com.exc.street.light.resource.dto.sl.shuncom;
import com.alibaba.fastjson.JSONObject;
import com.exc.street.light.resource.enums.sl.shuncom.SettingOperationTypeEnums;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.Date;
import java.util.List;
/**
* 修改/查询配置 参数类
* @Author: Xiaok
* @Date: 2020/8/24 13:52
*/
@Setter
@Getter
@ToString
public class SettingModifyDTO {
/**
* 序列码,网关不需要关心,原样传回即可
*/
private Long serial;
/**
* 查询或设置类型
*/
private SettingOperationTypeEnums typeEnums;
/**
* 回路设备 id
* 当typeEnums.code()为 0、1时必须包含
*/
private String id;
/**
* 映射关系数组,数组元素为十六进制string类型。 当 当typeEnums.code() 为 0 时必须包含
* 1、数组元素中每两个字节表示一个端口;
* 2、数组元素最开始的那 两个字节表示回路的端口号;
* 3、数组元素第三个字节到最后一个字节,每两个字节表示采集的端口号;
* 例如: a、数组元素"01020406"表示回路端口号 1 与采集端口号 2、4、6 是映射关系;
* b、数组元素"03"表示回路端口号 3 与采集端口没有映射关系;
*/
private List<String> map;
/**
* 回路号数组 当typeEnums.code()为1时必须包含
*/
private List<Integer> loops;
/**
* 应用程序名称。 当typeEnums.code()为2时必须包含
* gateway:网关;
* sz_iot:连接;
* szRules:策略;
* smarthome:家居;
*/
private String app;
/**
* 设定时间,当typeEnums.code()为4时必须包含
*/
private Date setDate;
/**
* 网关需要连接的ap信息,当typeEnums.code()为7时必须包含
*/
private JSONObject apInfo;
/**
* 网关的经纬度,格式:111.222:143.222
*/
private String lal;
}
|
[
"605408609@qq.com"
] |
605408609@qq.com
|
4cd1751658dc40ede1d82a70f94dff4283de7824
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/module0204_public/tests/more/src/java/module0204_public_tests_more/a/IFoo1.java
|
33f2e676f079f4aec2bf42b794f90d51b5305498
|
[
"BSD-3-Clause"
] |
permissive
|
salesforce/bazel-ls-demo-project
|
5cc6ef749d65d6626080f3a94239b6a509ef145a
|
948ed278f87338edd7e40af68b8690ae4f73ebf0
|
refs/heads/master
| 2023-06-24T08:06:06.084651
| 2023-03-14T11:54:29
| 2023-03-14T11:54:29
| 241,489,944
| 0
| 5
|
BSD-3-Clause
| 2023-03-27T11:28:14
| 2020-02-18T23:30:47
|
Java
|
UTF-8
|
Java
| false
| false
| 832
|
java
|
package module0204_public_tests_more.a;
import java.util.zip.*;
import javax.annotation.processing.*;
import javax.lang.model.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.awt.datatransfer.DataFlavor
* @see java.beans.beancontext.BeanContext
* @see java.io.File
*/
@SuppressWarnings("all")
public interface IFoo1<X> extends module0204_public_tests_more.a.IFoo0<X> {
java.rmi.Remote f0 = null;
java.nio.file.FileStore f1 = null;
java.sql.Array f2 = null;
String getName();
void setName(String s);
X get();
void set(X e);
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
47ab6066f331f5f6f4dde710fc7d5cb4a16d5959
|
d654590ad9962cf5a039ed9da7ae892edb01bd2e
|
/reverse-oozie-model/src/main/java/fr/an/tests/reverseoozie/model/BundleJobBean.java
|
18072af34d5ac410b534f7e0498123fca643303b
|
[] |
no_license
|
Arnaud-Nauwynck/test-snippets
|
d3a314f61bddaeb6e6a5ed3fafd1932c72637f1d
|
a088bc1252bc677fbc70ee630da15b0a625d4a46
|
refs/heads/master
| 2023-07-19T15:04:38.067591
| 2023-07-09T14:55:50
| 2023-07-09T14:55:50
| 6,697,535
| 9
| 19
| null | 2023-03-02T00:25:17
| 2012-11-15T00:52:21
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 2,167
|
java
|
package fr.an.tests.reverseoozie.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;
@Entity
@Table(name = "BUNDLE_JOBS")
public class BundleJobBean {
@Id
private String id;
@OneToMany
private List<CoordinatorJobBean> coordJobs;
@Basic
private String appPath;
@Basic
@Column(name = "app_name")
private String appName;
@Basic
@Column(name = "external_id")
private String externalId;
@Basic
@Lob
private String conf;
@Basic
private int timeOut = 0;
@Basic
// @Index
@Column(name = "user_name")
private String user;
@Basic
@Column(name = "group_name")
private String group;
@Transient
private String consoleUrl;
@Basic
// @Index
@Column(name = "status")
private String statusStr; // = Job.Status.PREP.toString();
@Basic
@Column(name = "kickoff_time")
private java.sql.Timestamp kickoffTimestamp;
@Basic
@Column(name = "start_time")
private java.sql.Timestamp startTimestamp;
@Basic
// @Index
@Column(name = "end_time")
private java.sql.Timestamp endTimestamp;
@Basic
@Column(name = "pause_time")
private java.sql.Timestamp pauseTimestamp;
@Basic
// @Index
@Column(name = "created_time")
private java.sql.Timestamp createdTimestamp;
@Basic
@Column(name = "time_unit")
private String timeUnitStr; // = BundleJob.Timeunit.NONE.toString();
@Basic
@Column(name = "pending")
private int pending = 0;
@Basic
// @Index
@Column(name = "last_modified_time")
private java.sql.Timestamp lastModifiedTimestamp;
@Basic
// @Index
@Column(name = "suspended_time")
private java.sql.Timestamp suspendedTimestamp;
@Basic
@Column(name = "job_xml")
@Lob
private String jobXml;
@Basic
@Column(name = "orig_job_xml")
@Lob
private String origJobXml;
}
|
[
"arnaud.nauwynck@gmail.com"
] |
arnaud.nauwynck@gmail.com
|
97e91ea388b95c64a9f3fbe6b5ab05f6856e1fd7
|
6c65a0978d73eda1732bf5c3e11a5a7eeec3e0c5
|
/core/src/main/java/org/cloudfoundry/test/core/AbstractServiceUtils.java
|
c75c00aff5a2cfe74c199e15c4095a9e804c349b
|
[
"Apache-2.0"
] |
permissive
|
cloudfoundry/java-test-applications
|
bb26515730d3605dfcfe76e415d9f0a054196236
|
9e8e5c43eee655384c68e5a45c74a560bbe4507f
|
refs/heads/main
| 2023-08-13T04:47:52.242623
| 2022-04-29T19:25:16
| 2022-04-29T19:25:16
| 10,661,980
| 27
| 62
|
Apache-2.0
| 2022-04-29T19:25:17
| 2013-06-13T08:30:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,244
|
java
|
/*
* Copyright 2014-2019 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.cloudfoundry.test.core;
import org.springframework.util.ReflectionUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
public abstract class AbstractServiceUtils<SC> implements ServiceUtils<SC> {
private final SC serviceConnector;
protected AbstractServiceUtils(SC serviceConnector) {
this.serviceConnector = serviceConnector;
}
@RequestMapping(method = RequestMethod.GET, value = "/check-access")
public final String checkAccess() {
return checkAccess(this.serviceConnector);
}
@RequestMapping(method = RequestMethod.GET, value = "/url")
public final String url() {
return getUrl(this.serviceConnector);
}
@SuppressWarnings("unchecked")
protected final <T> T getField(Object target, String fieldName) {
Field field = ReflectionUtils.findField(target.getClass(), fieldName);
ReflectionUtils.makeAccessible(field);
return (T) ReflectionUtils.getField(field, target);
}
@SuppressWarnings("unchecked")
protected final <T> T invokeMethod(Object target, String methodName, Object... args) {
Method method = ReflectionUtils.findMethod(target.getClass(), methodName);
ReflectionUtils.makeAccessible(method);
return (T) ReflectionUtils.invokeMethod(method, target, args);
}
protected final boolean isClass(SC serviceConnector, String className) {
return serviceConnector.getClass().getName().equals(className);
}
}
|
[
"bhale@pivotal.io"
] |
bhale@pivotal.io
|
2dad67dbd676f7dd69d5e22f768e976e0fc554c0
|
a25ae294a96adf4be6381011a623acd88017599b
|
/slazy-pay/src/main/java/com/slazy/bss/slazypay/vo/req/WithdrawReqVo.java
|
e4ffd8ea851d26ae855e36b35b19be804d88ff4c
|
[] |
no_license
|
soldiers1989/slazy-bss
|
71a006d0d121945546b0e485dd1ce0ae96573a21
|
2158925148ad39868ce8625bfab44106d094405d
|
refs/heads/master
| 2020-03-28T19:18:05.746133
| 2018-09-11T03:02:30
| 2018-09-11T03:02:56
| 148,962,871
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,595
|
java
|
package com.slazy.bss.slazypay.vo.req;
import java.io.Serializable;
/**
*
* @Description:提现
* @author: dingyaru
* @date: 2017年7月5日 下午3:23:45
*/
public class WithdrawReqVo extends BaseReqVo implements Serializable {
/**
*
*/
private static final long serialVersionUID = 4872789059877108752L;
private String tranAmount; //交易金额
private String accountNo; //账户编号
private String name; //客户姓名
private String withdrawType; //提现类型
private String bankCardNo; //银行卡号
private String tradeTime; //交易时间
private String feeAmount; //手续费:手续费内扣
public String getTranAmount() {
return tranAmount;
}
public void setTranAmount(String tranAmount) {
this.tranAmount = tranAmount;
}
public String getAccountNo() {
return accountNo;
}
public void setAccountNo(String accountNo) {
this.accountNo = accountNo;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getWithdrawType() {
return withdrawType;
}
public void setWithdrawType(String withdrawType) {
this.withdrawType = withdrawType;
}
public String getBankCardNo() {
return bankCardNo;
}
public void setBankCardNo(String bankCardNo) {
this.bankCardNo = bankCardNo;
}
public String getTradeTime() {
return tradeTime;
}
public void setTradeTime(String tradeTime) {
this.tradeTime = tradeTime;
}
public String getFeeAmount() {
return feeAmount;
}
public void setFeeAmount(String feeAmount) {
this.feeAmount = feeAmount;
}
}
|
[
"1754031481@qq.com"
] |
1754031481@qq.com
|
0fe5472ffd696f72aa289d9eae3f27e90022f8b3
|
c36d08386a88e139e6325ea7f5de64ba00a45c9f
|
/hadoop-common-project/hadoop-registry/src/main/java/org/apache/hadoop/registry/server/services/MicroZookeeperServiceKeys.java
|
4c1625e6cbc6eaafcd7cd86ffcc589ea81d9b40a
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown",
"CC0-1.0",
"CC-BY-3.0",
"EPL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"Classpath-exception-2.0",
"CC-PDDC",
"GCC-exception-3.1",
"CDDL-1.0",
"MIT",
"GPL-2.0-only",
"BSD-3-Clause",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"CDDL-1.1",
"LicenseRef-scancode-jdom",
"BSD-2-Clause"
] |
permissive
|
dmgerman/hadoop
|
6197e3f3009196fb4ca528ab420d99a0cd5b9396
|
70c015914a8756c5440cd969d70dac04b8b6142b
|
refs/heads/master
| 2020-12-01T06:30:51.605035
| 2019-12-19T19:37:17
| 2019-12-19T19:37:17
| 230,528,747
| 0
| 0
|
Apache-2.0
| 2020-01-31T18:29:52
| 2019-12-27T22:48:25
|
Java
|
UTF-8
|
Java
| false
| false
| 3,884
|
java
|
begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1
begin_comment
comment|/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
end_comment
begin_package
DECL|package|org.apache.hadoop.registry.server.services
package|package
name|org
operator|.
name|apache
operator|.
name|hadoop
operator|.
name|registry
operator|.
name|server
operator|.
name|services
package|;
end_package
begin_import
import|import
name|org
operator|.
name|apache
operator|.
name|hadoop
operator|.
name|registry
operator|.
name|client
operator|.
name|api
operator|.
name|RegistryConstants
import|;
end_import
begin_comment
comment|/** * Service keys for configuring the {@link MicroZookeeperService}. * These are not used in registry clients or the RM-side service, * so are kept separate. */
end_comment
begin_interface
DECL|interface|MicroZookeeperServiceKeys
specifier|public
interface|interface
name|MicroZookeeperServiceKeys
block|{
DECL|field|ZKSERVICE_PREFIX
specifier|public
specifier|static
specifier|final
name|String
name|ZKSERVICE_PREFIX
init|=
name|RegistryConstants
operator|.
name|REGISTRY_PREFIX
operator|+
literal|"zk.service."
decl_stmt|;
comment|/** * Key to define the JAAS context for the ZK service: {@value}. */
DECL|field|KEY_REGISTRY_ZKSERVICE_JAAS_CONTEXT
specifier|public
specifier|static
specifier|final
name|String
name|KEY_REGISTRY_ZKSERVICE_JAAS_CONTEXT
init|=
name|ZKSERVICE_PREFIX
operator|+
literal|"service.jaas.context"
decl_stmt|;
comment|/** * ZK servertick time: {@value} */
DECL|field|KEY_ZKSERVICE_TICK_TIME
specifier|public
specifier|static
specifier|final
name|String
name|KEY_ZKSERVICE_TICK_TIME
init|=
name|ZKSERVICE_PREFIX
operator|+
literal|"ticktime"
decl_stmt|;
comment|/** * host to register on: {@value}. */
DECL|field|KEY_ZKSERVICE_HOST
specifier|public
specifier|static
specifier|final
name|String
name|KEY_ZKSERVICE_HOST
init|=
name|ZKSERVICE_PREFIX
operator|+
literal|"host"
decl_stmt|;
comment|/** * Default host to serve on -this is<code>localhost</code> as it * is the only one guaranteed to be available: {@value}. */
DECL|field|DEFAULT_ZKSERVICE_HOST
specifier|public
specifier|static
specifier|final
name|String
name|DEFAULT_ZKSERVICE_HOST
init|=
literal|"localhost"
decl_stmt|;
comment|/** * port; 0 or below means "any": {@value} */
DECL|field|KEY_ZKSERVICE_PORT
specifier|public
specifier|static
specifier|final
name|String
name|KEY_ZKSERVICE_PORT
init|=
name|ZKSERVICE_PREFIX
operator|+
literal|"port"
decl_stmt|;
comment|/** * Directory containing data: {@value} */
DECL|field|KEY_ZKSERVICE_DIR
specifier|public
specifier|static
specifier|final
name|String
name|KEY_ZKSERVICE_DIR
init|=
name|ZKSERVICE_PREFIX
operator|+
literal|"dir"
decl_stmt|;
comment|/** * Should failed SASL clients be allowed: {@value}? * * Default is the ZK default: true */
DECL|field|KEY_ZKSERVICE_ALLOW_FAILED_SASL_CLIENTS
specifier|public
specifier|static
specifier|final
name|String
name|KEY_ZKSERVICE_ALLOW_FAILED_SASL_CLIENTS
init|=
name|ZKSERVICE_PREFIX
operator|+
literal|"allow.failed.sasl.clients"
decl_stmt|;
block|}
end_interface
end_unit
|
[
"stevel@apache.org"
] |
stevel@apache.org
|
a6d339dcb8cea00f3703b654a0e0b2bc1fb98415
|
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
|
/src/chosun/ciis/hd/saly/dm/HD_SALY_3401_ADM.java
|
8e5e38aaec6eee3b908d2cebff188e0bdab5f112
|
[] |
no_license
|
nosmoon/misdevteam
|
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
|
1829d5bd489eb6dd307ca244f0e183a31a1de773
|
refs/heads/master
| 2020-04-15T15:57:05.480056
| 2019-01-10T01:12:01
| 2019-01-10T01:12:01
| 164,812,547
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 6,370
|
java
|
/***************************************************************************************************
* 파일명 : .java
* 기능 : 독자우대-구독신청
* 작성일자 : 2007-05-22
* 작성자 : 김대섭
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.hd.saly.dm;
import java.sql.*;
import oracle.jdbc.driver.*;
import somo.framework.db.*;
import somo.framework.util.*;
import chosun.ciis.hd.saly.ds.*;
import chosun.ciis.hd.saly.rec.*;
/**
*
*/
public class HD_SALY_3401_ADM extends somo.framework.db.BaseDM implements java.io.Serializable{
public String cmpy_cd;
public String saly_yy;
public String saly_no;
public String incmg_pers_ipadd;
public String incmg_pers;
public HD_SALY_3401_ADM(){}
public HD_SALY_3401_ADM(String cmpy_cd, String saly_yy, String saly_no, String incmg_pers_ipadd, String incmg_pers){
this.cmpy_cd = cmpy_cd;
this.saly_yy = saly_yy;
this.saly_no = saly_no;
this.incmg_pers_ipadd = incmg_pers_ipadd;
this.incmg_pers = incmg_pers;
}
public void setCmpy_cd(String cmpy_cd){
this.cmpy_cd = cmpy_cd;
}
public void setSaly_yy(String saly_yy){
this.saly_yy = saly_yy;
}
public void setSaly_no(String saly_no){
this.saly_no = saly_no;
}
public void setIncmg_pers_ipadd(String incmg_pers_ipadd){
this.incmg_pers_ipadd = incmg_pers_ipadd;
}
public void setIncmg_pers(String incmg_pers){
this.incmg_pers = incmg_pers;
}
public String getCmpy_cd(){
return this.cmpy_cd;
}
public String getSaly_yy(){
return this.saly_yy;
}
public String getSaly_no(){
return this.saly_no;
}
public String getIncmg_pers_ipadd(){
return this.incmg_pers_ipadd;
}
public String getIncmg_pers(){
return this.incmg_pers;
}
public String getSQL(){
return "{ call MISHDL.SP_HD_SALY_3401_A(? ,? ,? ,? ,? ,? ,?) }";
}
public void setParams(CallableStatement cstmt, BaseDM bdm) throws SQLException{
HD_SALY_3401_ADM dm = (HD_SALY_3401_ADM)bdm;
cstmt.registerOutParameter(1, Types.VARCHAR);
cstmt.registerOutParameter(2, Types.VARCHAR);
cstmt.setString(3, dm.cmpy_cd);
cstmt.setString(4, dm.saly_yy);
cstmt.setString(5, dm.saly_no);
cstmt.setString(6, dm.incmg_pers_ipadd);
cstmt.setString(7, dm.incmg_pers);
}
public BaseDataSet createDataSetObject(){
return new chosun.ciis.hd.saly.ds.HD_SALY_3401_ADataSet();
}
public void print(){
System.out.println("SQL = " + this.getSQL());
System.out.println("cmpy_cd = [" + getCmpy_cd() + "]");
System.out.println("saly_yy = [" + getSaly_yy() + "]");
System.out.println("saly_no = [" + getSaly_no() + "]");
System.out.println("incmg_pers_ipadd = [" + getIncmg_pers_ipadd() + "]");
System.out.println("incmg_pers = [" + getIncmg_pers() + "]");
}
}
/*----------------------------------------------------------------------------------------------------
Web Tier에서 req.getParameter() 처리 및 결과확인 검사시 사용하십시오.
String cmpy_cd = req.getParameter("cmpy_cd");
if( cmpy_cd == null){
System.out.println(this.toString+" : cmpy_cd is null" );
}else{
System.out.println(this.toString+" : cmpy_cd is "+cmpy_cd );
}
String saly_yy = req.getParameter("saly_yy");
if( saly_yy == null){
System.out.println(this.toString+" : saly_yy is null" );
}else{
System.out.println(this.toString+" : saly_yy is "+saly_yy );
}
String saly_no = req.getParameter("saly_no");
if( saly_no == null){
System.out.println(this.toString+" : saly_no is null" );
}else{
System.out.println(this.toString+" : saly_no is "+saly_no );
}
String incmg_pers_ipadd = req.getParameter("incmg_pers_ipadd");
if( incmg_pers_ipadd == null){
System.out.println(this.toString+" : incmg_pers_ipadd is null" );
}else{
System.out.println(this.toString+" : incmg_pers_ipadd is "+incmg_pers_ipadd );
}
String incmg_pers = req.getParameter("incmg_pers");
if( incmg_pers == null){
System.out.println(this.toString+" : incmg_pers is null" );
}else{
System.out.println(this.toString+" : incmg_pers is "+incmg_pers );
}
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 req.getParameter() 처리시 사용하십시오.
String cmpy_cd = Util.checkString(req.getParameter("cmpy_cd"));
String saly_yy = Util.checkString(req.getParameter("saly_yy"));
String saly_no = Util.checkString(req.getParameter("saly_no"));
String incmg_pers_ipadd = Util.checkString(req.getParameter("incmg_pers_ipadd"));
String incmg_pers = Util.checkString(req.getParameter("incmg_pers"));
----------------------------------------------------------------------------------------------------*//*----------------------------------------------------------------------------------------------------
Web Tier에서 한글처리와 동시에 req.getParameter() 처리시 사용하십시오.
String cmpy_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("cmpy_cd")));
String saly_yy = Util.Uni2Ksc(Util.checkString(req.getParameter("saly_yy")));
String saly_no = Util.Uni2Ksc(Util.checkString(req.getParameter("saly_no")));
String incmg_pers_ipadd = Util.Uni2Ksc(Util.checkString(req.getParameter("incmg_pers_ipadd")));
String incmg_pers = Util.Uni2Ksc(Util.checkString(req.getParameter("incmg_pers")));
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 DM 파일의 변수를 설정시 사용하십시오.
dm.setCmpy_cd(cmpy_cd);
dm.setSaly_yy(saly_yy);
dm.setSaly_no(saly_no);
dm.setIncmg_pers_ipadd(incmg_pers_ipadd);
dm.setIncmg_pers(incmg_pers);
----------------------------------------------------------------------------------------------------*/
/* 작성시간 : Mon May 18 15:31:57 KST 2009 */
|
[
"DLCOM000@172.16.30.11"
] |
DLCOM000@172.16.30.11
|
827ffd99deb94feadecb271e5e9468f8787b9846
|
92f10c41bad09bee05acbcb952095c31ba41c57b
|
/app/src/main/java/io/github/alula/ohmygod/MainActivity1443.java
|
6f4ef28706bb77252c6ea4fa2de2b516f8c946ee
|
[] |
no_license
|
alula/10000-activities
|
bb25be9aead3d3d2ea9f9ef8d1da4c8dff1a7c62
|
f7e8de658c3684035e566788693726f250170d98
|
refs/heads/master
| 2022-07-30T05:54:54.783531
| 2022-01-29T19:53:04
| 2022-01-29T19:53:04
| 453,501,018
| 16
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 339
|
java
|
package io.github.alula.ohmygod;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity1443 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
|
[
"6276139+alula@users.noreply.github.com"
] |
6276139+alula@users.noreply.github.com
|
585953cf4e5ef7e60c4639e1496868593d1e1fb4
|
102dfa93471425080cee5fcf179fb67591a3e6e1
|
/submissions/lab4/maggardjacko_83602_1907965_ClassifyMessage.java
|
83aca11b093d4c800d8d658ff0fab2901455e3e9
|
[] |
no_license
|
Walter-Shaffer/1061-TA-F17
|
53646db8836b8051d876de2ca0a268f242c0905a
|
dc1ff702af73f4feba004de539a36b145560913b
|
refs/heads/master
| 2021-08-28T20:32:14.175756
| 2017-12-13T04:17:36
| 2017-12-13T04:17:36
| 103,681,473
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,692
|
java
|
import java.util.Scanner;
/*
* ClassifyMessage.java
* Author: Jack Maggard
* Submission Date: 9/25/2017]
*
* Purpose: A brief paragraph description of the
* program. What does it do?
*This program takes a statement inputed by the user and parses it.
* Statement of Academic Honesty:
*
* The following code represents my own work. I have neither
* received nor given inappropriate assistance. I have not copied
* or modified code from any source other than the course webpage
* or the course textbook. I recognize that any unauthorized
* assistance or plagiarism will be handled in accordance
* with the policies at Clemson University and the
* policies of this course. I recognize that my work is based
* on an assignment created by the School of Computing
* at Clemson University. Any publishing or posting
* of source code for this project is strictly prohibited
* unless you have written consent from the instructor.
*/
public class ClassifyMessage {
enum MessageCategory {NEED, OFFER, ALERT, INFO, UNKNOWN}
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner keyboard=new Scanner (System.in);
String catString;
String payload;
double latitude;
double longitude;
boolean isInRange;
MessageCategory category;
double south=39.882343;
double north=40.23115;
double west=-105.743511;
double east=-104.907864;
System.out.println("Please enter a formatted message:");
catString=keyboard.next();
latitude=keyboard.nextDouble();
longitude=keyboard.nextDouble();
payload=keyboard.nextLine();
System.out.println(catString+""+latitude+""+longitude+""+payload);
payload=payload.trim();
catString=catString.trim();
if (catString.equalsIgnoreCase("fire")||catString.equalsIgnoreCase("smoke"))
category=MessageCategory.ALERT;
else if (catString.equalsIgnoreCase("need"))
category=MessageCategory.NEED;
else if (catString.equalsIgnoreCase("offer"))
category=MessageCategory.OFFER;
else if (catString.equalsIgnoreCase("structure")||catString.equalsIgnoreCase("road")||catString.equalsIgnoreCase("photo")||catString.equalsIgnoreCase("evac"))
category=MessageCategory.INFO;
else
category=MessageCategory.UNKNOWN;
if (latitude>=south&&latitude<=north&&longitude>=west&&longitude<=east)
isInRange=true;
else
isInRange=false;
System.out.println("Category:\t"+category);
System.out.println("Raw Cat:\t"+catString);
System.out.println("Message:\t"+payload);
System.out.println("Latitude:\t"+latitude);
System.out.println("Longitude:\t"+longitude);
System.out.println("In Range:\t"+isInRange);
}
}
|
[
"lorenzo.barberis.canonico@gmail.com"
] |
lorenzo.barberis.canonico@gmail.com
|
37607ab2e582d9a0347e3367793abe0aecf39d75
|
e108d65747c07078ae7be6dcd6369ac359d098d7
|
/com/google/common/cache/CacheStats.java
|
cbdfa91d865878e63334d29781e28f2222f9c351
|
[
"MIT"
] |
permissive
|
kelu124/pyS3
|
50f30b51483bf8f9581427d2a424e239cfce5604
|
86eb139d971921418d6a62af79f2868f9c7704d5
|
refs/heads/master
| 2020-03-13T01:51:42.054846
| 2018-04-24T21:03:03
| 2018-04-24T21:03:03
| 130,913,008
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,634
|
java
|
package com.google.common.cache;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import javax.annotation.Nullable;
@GwtCompatible
public final class CacheStats {
private final long evictionCount;
private final long hitCount;
private final long loadExceptionCount;
private final long loadSuccessCount;
private final long missCount;
private final long totalLoadTime;
public CacheStats(long hitCount, long missCount, long loadSuccessCount, long loadExceptionCount, long totalLoadTime, long evictionCount) {
Preconditions.checkArgument(hitCount >= 0);
Preconditions.checkArgument(missCount >= 0);
Preconditions.checkArgument(loadSuccessCount >= 0);
Preconditions.checkArgument(loadExceptionCount >= 0);
Preconditions.checkArgument(totalLoadTime >= 0);
Preconditions.checkArgument(evictionCount >= 0);
this.hitCount = hitCount;
this.missCount = missCount;
this.loadSuccessCount = loadSuccessCount;
this.loadExceptionCount = loadExceptionCount;
this.totalLoadTime = totalLoadTime;
this.evictionCount = evictionCount;
}
public long requestCount() {
return this.hitCount + this.missCount;
}
public long hitCount() {
return this.hitCount;
}
public double hitRate() {
long requestCount = requestCount();
return requestCount == 0 ? 1.0d : ((double) this.hitCount) / ((double) requestCount);
}
public long missCount() {
return this.missCount;
}
public double missRate() {
long requestCount = requestCount();
return requestCount == 0 ? 0.0d : ((double) this.missCount) / ((double) requestCount);
}
public long loadCount() {
return this.loadSuccessCount + this.loadExceptionCount;
}
public long loadSuccessCount() {
return this.loadSuccessCount;
}
public long loadExceptionCount() {
return this.loadExceptionCount;
}
public double loadExceptionRate() {
long totalLoadCount = this.loadSuccessCount + this.loadExceptionCount;
return totalLoadCount == 0 ? 0.0d : ((double) this.loadExceptionCount) / ((double) totalLoadCount);
}
public long totalLoadTime() {
return this.totalLoadTime;
}
public double averageLoadPenalty() {
long totalLoadCount = this.loadSuccessCount + this.loadExceptionCount;
return totalLoadCount == 0 ? 0.0d : ((double) this.totalLoadTime) / ((double) totalLoadCount);
}
public long evictionCount() {
return this.evictionCount;
}
public CacheStats minus(CacheStats other) {
return new CacheStats(Math.max(0, this.hitCount - other.hitCount), Math.max(0, this.missCount - other.missCount), Math.max(0, this.loadSuccessCount - other.loadSuccessCount), Math.max(0, this.loadExceptionCount - other.loadExceptionCount), Math.max(0, this.totalLoadTime - other.totalLoadTime), Math.max(0, this.evictionCount - other.evictionCount));
}
public CacheStats plus(CacheStats other) {
return new CacheStats(this.hitCount + other.hitCount, this.missCount + other.missCount, this.loadSuccessCount + other.loadSuccessCount, this.loadExceptionCount + other.loadExceptionCount, this.totalLoadTime + other.totalLoadTime, this.evictionCount + other.evictionCount);
}
public int hashCode() {
return Objects.hashCode(Long.valueOf(this.hitCount), Long.valueOf(this.missCount), Long.valueOf(this.loadSuccessCount), Long.valueOf(this.loadExceptionCount), Long.valueOf(this.totalLoadTime), Long.valueOf(this.evictionCount));
}
public boolean equals(@Nullable Object object) {
if (!(object instanceof CacheStats)) {
return false;
}
CacheStats other = (CacheStats) object;
if (this.hitCount == other.hitCount && this.missCount == other.missCount && this.loadSuccessCount == other.loadSuccessCount && this.loadExceptionCount == other.loadExceptionCount && this.totalLoadTime == other.totalLoadTime && this.evictionCount == other.evictionCount) {
return true;
}
return false;
}
public String toString() {
return MoreObjects.toStringHelper((Object) this).add("hitCount", this.hitCount).add("missCount", this.missCount).add("loadSuccessCount", this.loadSuccessCount).add("loadExceptionCount", this.loadExceptionCount).add("totalLoadTime", this.totalLoadTime).add("evictionCount", this.evictionCount).toString();
}
}
|
[
"kelu124@gmail.com"
] |
kelu124@gmail.com
|
3dc1e4ab84effd3a78b065c690616697433adcef
|
736fef3dcf85164cf103976e1753c506eb13ae09
|
/seccon_2015/Reverse-Engineering Android APK 1/files/source/src/android/support/v4/widget/SearchViewCompat$OnQueryTextListenerCompat.java
|
5796e50bc6abe56117eae6777cc2949af7ea5444
|
[
"MIT"
] |
permissive
|
Hamz-a/MyCTFWriteUps
|
4b7dac9a7eb71fceb7d83966dc63cf4e5a796007
|
ffa98e4c096ff1751f5f729d0ec882e079a6b604
|
refs/heads/master
| 2021-01-10T17:46:10.014480
| 2018-04-01T22:14:31
| 2018-04-01T22:14:31
| 47,495,748
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 614
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package android.support.v4.widget;
// Referenced classes of package android.support.v4.widget:
// SearchViewCompat
public static abstract class
{
final Object mListener = SearchViewCompat.access$000().QueryTextListener(this);
public boolean onQueryTextChange(String s)
{
return false;
}
public boolean onQueryTextSubmit(String s)
{
return false;
}
public ()
{
}
}
|
[
"dzcyberdev@gmail.com"
] |
dzcyberdev@gmail.com
|
78342bd3f21126dec01737187a5504cb59afa728
|
c5c0ae778566efab9d8bb36aae21c00c32b3580d
|
/pcap4j-packettest/src/test/java/org/pcap4j/packet/IcmpV4TimeExceededPacketTest.java
|
e9f41f0bd3d43b00daf085ee904cd142583e8aa1
|
[
"MIT"
] |
permissive
|
jasonparallel/pcap4j
|
2a2f84e6ec7b7cbc25da0a4332ca69461fa76667
|
e3a6c71182ace7172d779c1aa73122e0e6e6ebfd
|
refs/heads/master
| 2021-01-14T14:16:36.097479
| 2014-10-27T06:22:15
| 2014-10-27T06:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,985
|
java
|
package org.pcap4j.packet;
import static org.junit.Assert.*;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.pcap4j.packet.IcmpV4TimeExceededPacket.IcmpV4TimeExceededHeader;
import org.pcap4j.packet.namednumber.EtherType;
import org.pcap4j.packet.namednumber.IcmpV4Code;
import org.pcap4j.packet.namednumber.IcmpV4Type;
import org.pcap4j.packet.namednumber.IpNumber;
import org.pcap4j.packet.namednumber.IpVersion;
import org.pcap4j.util.IcmpV4Helper;
import org.pcap4j.util.MacAddress;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings("javadoc")
public class IcmpV4TimeExceededPacketTest extends AbstractPacketTest {
private static final Logger logger
= LoggerFactory.getLogger(IcmpV4TimeExceededPacketTest.class);
private final IcmpV4TimeExceededPacket packet;
private final int unused;
public IcmpV4TimeExceededPacketTest() {
this.unused = 12345;
IcmpV4EchoPacket.Builder echob = new IcmpV4EchoPacket.Builder();
echob.identifier((short)100)
.sequenceNumber((short)10)
.payloadBuilder(
new UnknownPacket.Builder()
.rawData((new byte[] { (byte)0, (byte)1, (byte)2 }))
);
IcmpV4CommonPacket.Builder icmpV4b = new IcmpV4CommonPacket.Builder();
icmpV4b.type(IcmpV4Type.ECHO)
.code(IcmpV4Code.NO_CODE)
.payloadBuilder(echob)
.correctChecksumAtBuild(true);
IpV4Packet.Builder ipv4b = new IpV4Packet.Builder();
try {
ipv4b.version(IpVersion.IPV4)
.tos(IpV4Rfc791Tos.newInstance((byte)0))
.identification((short)100)
.ttl((byte)100)
.protocol(IpNumber.ICMPV4)
.srcAddr(
(Inet4Address)InetAddress.getByAddress(
new byte[] { (byte)192, (byte)0, (byte)2, (byte)2 }
)
)
.dstAddr(
(Inet4Address)InetAddress.getByAddress(
new byte[] { (byte)192, (byte)0, (byte)2, (byte)1 }
)
)
.payloadBuilder(icmpV4b)
.correctChecksumAtBuild(true)
.correctLengthAtBuild(true);
} catch (UnknownHostException e) {
throw new AssertionError();
}
IcmpV4TimeExceededPacket.Builder b
= new IcmpV4TimeExceededPacket.Builder();
b.unused(unused)
.payload(
IcmpV4Helper.makePacketForInvokingPacketField(ipv4b.build())
);
this.packet = b.build();
}
@Override
protected Packet getPacket() {
return packet;
}
@Override
protected Packet getWholePacket() throws UnknownHostException {
IcmpV4CommonPacket.Builder icmpV4b = new IcmpV4CommonPacket.Builder();
icmpV4b.type(IcmpV4Type.TIME_EXCEEDED)
.code(IcmpV4Code.TIME_TO_LIVE_EXCEEDED)
.payloadBuilder(new SimpleBuilder(packet))
.correctChecksumAtBuild(true);
IpV4Packet.Builder ipv4b = new IpV4Packet.Builder();
ipv4b.version(IpVersion.IPV4)
.tos(IpV4Rfc791Tos.newInstance((byte)0))
.identification((short)100)
.ttl((byte)100)
.protocol(IpNumber.ICMPV4)
.srcAddr(
(Inet4Address)InetAddress.getByAddress(
new byte[] { (byte)192, (byte)0, (byte)2, (byte)1 }
)
)
.dstAddr(
(Inet4Address)InetAddress.getByAddress(
new byte[] { (byte)192, (byte)0, (byte)2, (byte)2 }
)
)
.payloadBuilder(icmpV4b)
.correctChecksumAtBuild(true)
.correctLengthAtBuild(true);
EthernetPacket.Builder eb = new EthernetPacket.Builder();
eb.dstAddr(MacAddress.getByName("fe:00:00:00:00:02"))
.srcAddr(MacAddress.getByName("fe:00:00:00:00:01"))
.type(EtherType.IPV4)
.payloadBuilder(ipv4b)
.paddingAtBuild(true);
return eb.build();
}
@BeforeClass
public static void setUpBeforeClass() throws Exception {
logger.info(
"########## " + IcmpV4TimeExceededPacketTest.class.getSimpleName() + " START ##########"
);
}
@AfterClass
public static void tearDownAfterClass() throws Exception {
}
@Test
public void testNewPacket() {
IcmpV4TimeExceededPacket p;
try {
p = IcmpV4TimeExceededPacket.newPacket(packet.getRawData(), 0, packet.getRawData().length);
} catch (IllegalRawDataException e) {
throw new AssertionError(e);
}
assertEquals(packet, p);
assertTrue(p.getPayload().contains(IpV4Packet.class));
assertTrue(p.getPayload().contains(IcmpV4CommonPacket.class));
assertTrue(p.getPayload().contains(IcmpV4EchoPacket.class));
assertFalse(p.getPayload().contains(UnknownPacket.class));
assertFalse(p.getPayload().contains(IllegalPacket.class));
}
@Test
public void testGetHeader() {
IcmpV4TimeExceededHeader h = packet.getHeader();
assertEquals(unused, h.getUnused());
}
}
|
[
"kaitoy@pcap4j.org"
] |
kaitoy@pcap4j.org
|
35ca199cfc94e9b51078b1b408ba47d65456a559
|
977af59a7e00524563176de990d92588f60d858c
|
/src/main/java/com/aol/cyclops/types/stream/reactive/SeqSubscriber.java
|
42cd76af8adaec5a551e1e9db4f372fc590db055
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
richardy2012/cyclops-react
|
173285f1a7be45b7b3c38888d53611b8929d3d62
|
0c2a98272211ef642ebaf3889d49f40a5acfeaeb
|
refs/heads/master
| 2020-06-16T22:19:53.009821
| 2016-11-28T23:18:33
| 2016-11-28T23:18:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,259
|
java
|
package com.aol.cyclops.types.stream.reactive;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Spliterator;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.LockSupport;
import java.util.function.Consumer;
import java.util.function.Supplier;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import com.aol.cyclops.types.stream.ConvertableSequence;
import com.aol.cyclops.util.ExceptionSoftener;
/**
* A reactive-streams Subscriber that can generate various forms of sequences from a publisher
*
* <pre>
* {@code
* SeqSubscriber<Integer> ints = SeqSubscriber.subscriber();
* ReactiveSeq.of(1,2,3)
* .publish(ints);
*
* ListX list = ints.toListX();
* }
* </pre>
*
* @author johnmcclean
*
* @param <T> Subscriber type
*/
public class SeqSubscriber<T> implements Subscriber<T>, Supplier<T>, ConvertableSequence<T> {
private final Object UNSET = new Object();
private final AtomicReference lastValue = new AtomicReference(
UNSET);
private final AtomicReference lastError = new AtomicReference(
UNSET);
private final Runnable onComplete;
private volatile boolean complete = false;
private volatile boolean unread = false;
private volatile Subscription s;
protected SeqSubscriber() {
this.onComplete = () -> {
};
}
private SeqSubscriber(final Runnable onComplete) {
super();
this.onComplete = onComplete;
}
public static <T> SeqSubscriber<T> subscriber(final Runnable onComplete) {
return new SeqSubscriber<>(
onComplete);
}
public static <T> SeqSubscriber<T> subscriber() {
return new SeqSubscriber<>(
() -> {
});
}
@Override
public void onSubscribe(final Subscription s) {
Objects.requireNonNull(s);
if (this.s == null) {
this.s = s;
s.request(1);
} else
s.cancel();
}
@Override
public void onNext(final T t) {
unread = true;
Objects.requireNonNull(t);
lastValue.set(t);
}
@Override
public void onError(final Throwable t) {
Objects.requireNonNull(t);
lastError.set(t);
}
@Override
public void onComplete() {
complete = true;
this.onComplete.run();
}
@Override
public T get() {
try {
while (lastValue.get() == UNSET && lastError.get() == UNSET)
LockSupport.parkNanos(1000000l);
if (lastError.get() != UNSET) {
final Throwable toThrow = (Throwable) lastError.get();
reset();
throw ExceptionSoftener.throwSoftenedException(toThrow);
}
final T result = (T) lastValue.get();
return result;
} finally {
unread = false;
}
}
private void reset() {
lastValue.set(UNSET);
lastError.set(UNSET);
}
@Override
public Iterator<T> iterator() {
return new Iterator<T>() {
boolean requested = true;
Object next = complete ? UNSET : get();
@Override
public boolean hasNext() {
if (!requested) {
reset();
s.request(1l);
requested = true;
if (unread)
next = get();
else
next = UNSET;
}
return next != UNSET;
}
@Override
public T next() {
if (!requested) {
if (!hasNext()) {
throw new NoSuchElementException();
}
}
if (next == UNSET)
throw new NoSuchElementException();
requested = false;
return (T) next;
}
};
}
@Override
public Spliterator<T> spliterator() {
return new Spliterator<T>() {
boolean requested = true;
@Override
public boolean tryAdvance(final Consumer<? super T> action) {
if (!requested)
s.request(1l);
else
requested = false;
final Object next = complete ? !unread ? UNSET : get() : get();
if (next != UNSET) {
action.accept((T) next);
return true;
}
return false;
}
@Override
public Spliterator<T> trySplit() {
return this;
}
@Override
public long estimateSize() {
return Long.MAX_VALUE;
}
@Override
public int characteristics() {
return IMMUTABLE;
}
};
}
}
|
[
"john.mcclean@teamaol.com"
] |
john.mcclean@teamaol.com
|
404c9d302fd39a516f6eada3e027cbf56893ddc7
|
fa8994e6ab7de1e7d721e5e9287aba19bb418ec8
|
/src/main/java/ru/durnov/html/doc/DocUElement.java
|
56bd447315f3fb76c13ce7ddf083fb9cb6a0f660
|
[] |
no_license
|
alexdurnoff/BookChaptersFromMSOffice
|
f2e2100f4096c465673bd6e96769457f10b3da62
|
233706e857d229c2bca87dd192698d5aba03ac30
|
refs/heads/master
| 2023-06-05T10:46:03.075150
| 2021-06-27T20:08:09
| 2021-06-27T20:08:09
| 373,937,923
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 669
|
java
|
package ru.durnov.html.doc;
import org.apache.poi.hwpf.usermodel.CharacterRun;
import org.jsoup.nodes.Element;
public class DocUElement {
private final CharacterRun characterRun;
public DocUElement(CharacterRun characterRun) {
this.characterRun = characterRun;
}
public Element element() {
Element element = new Element("u");
if (characterRun.isBold()){
new DocStrongElement(characterRun).element().appendTo(element);
} else {
element.appendText(text());
}
return element;
}
protected String text() {
return this.characterRun.text().replace("\n", "");
}
}
|
[
"door1975@yandex.ru"
] |
door1975@yandex.ru
|
ce93d7dce852055cd01f1bb6526c7ac3eb15c419
|
996a7a35f7bb2560540ab393e368da07558733f2
|
/src/main/java/org/apache/hadoop/hbase/TableNotFoundException.java
|
dc6da43e4702b3ba27b1a0d23f3d02c927018ae4
|
[
"Apache-2.0"
] |
permissive
|
fengchen8086/LCIndex-HBase-0.94.16
|
908d6319eaea4d520372907396033b256a69e174
|
601f5fffb9798f9e481a990ef083d8b930605c40
|
refs/heads/master
| 2020-12-24T21:27:07.033934
| 2016-08-30T02:11:40
| 2016-08-30T02:11:40
| 32,900,547
| 12
| 1
|
Apache-2.0
| 2023-03-20T11:55:06
| 2015-03-26T01:21:12
|
Java
|
UTF-8
|
Java
| false
| false
| 1,243
|
java
|
/**
* Copyright 2007 The Apache Software Foundation
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase;
/** Thrown when a table can not be located */
public class TableNotFoundException extends RegionException {
private static final long serialVersionUID = 993179627856392526L;
/** default constructor */
public TableNotFoundException() {
super();
}
/** @param s message */
public TableNotFoundException(String s) {
super(s);
}
}
|
[
"fengchen8086@gmail.com"
] |
fengchen8086@gmail.com
|
037ac26c4eeb0e1303a29e9de7206cc29f8d4420
|
16212d742fc44742105d5bfa08ce025c0955df1c
|
/fix-dukascopy/src/main/java/quickfix/dukascopy/field/SecurityListRequestType.java
|
bd270832a256f3438fa7db820668942d4b0e4738
|
[
"Apache-2.0"
] |
permissive
|
WojciechZankowski/fix-dictionaries
|
83c7ea194f28edbaba2124418fa2ab05ad256114
|
94b299972ade7597c4b581d752858b873102796e
|
refs/heads/master
| 2021-01-19T13:26:18.927116
| 2017-04-14T22:09:15
| 2017-04-14T22:09:16
| 88,088,490
| 10
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,393
|
java
|
/* Generated Java Source File */
/*******************************************************************************
* Copyright (c) quickfixengine.org All rights reserved.
*
* This file is part of the QuickFIX FIX Engine
*
* This file may be distributed under the terms of the quickfixengine.org
* license as defined by quickfixengine.org and appearing in the file
* LICENSE included in the packaging of this file.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
* THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE.
*
* See http://www.quickfixengine.org/LICENSE for licensing information.
*
* Contact ask@quickfixengine.org if any conditions of this licensing
* are not clear to you.
******************************************************************************/
package quickfix.dukascopy.field;
import quickfix.IntField;
public class SecurityListRequestType extends IntField {
static final long serialVersionUID = 20050617;
public static final int FIELD = 559;
public static final int SYMBOL = 0;
public static final int SECURITYTYPE_AND_OR_CFICODE = 1;
public static final int PRODUCT = 2;
public static final int TRADINGSESSIONID = 3;
public static final int ALL_SECURITIES = 4;
public SecurityListRequestType() {
super(559);
}
public SecurityListRequestType(int data) {
super(559, data);
}
}
|
[
"info@zankowski.pl"
] |
info@zankowski.pl
|
45be2db07900bfa93990f75324d2e99a96bbda44
|
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
|
/Method_Scraping/xml_scraping/NicadOutputFile_t2_flink/Nicad_t2_flink2320.java
|
f088e82e8dc49d614969579cdf7ac5bae05c4cac
|
[] |
no_license
|
ryosuke-ku/TestCodeSeacherPlus
|
cfd03a2858b67a05ecf17194213b7c02c5f2caff
|
d002a52251f5461598c7af73925b85a05cea85c6
|
refs/heads/master
| 2020-05-24T01:25:27.000821
| 2019-08-17T06:23:42
| 2019-08-17T06:23:42
| 187,005,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 524
|
java
|
// clone pairs:25894:90%
// 39967:flink/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/JobConfigInfo.java
public class Nicad_t2_flink2320
{
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
JobConfigInfo that = (JobConfigInfo) o;
return Objects.equals(jobId, that.jobId) &&
Objects.equals(jobName, that.jobName) &&
Objects.equals(executionConfigInfo, that.executionConfigInfo);
}
}
|
[
"naist1020@gmail.com"
] |
naist1020@gmail.com
|
72c4bde8eac329adadcb35f455b5191657244d2b
|
09f0e9e3915f44cb5314d0e0e460455ffb831fed
|
/src/test/java/com/compte/declaccise/config/timezone/HibernateTimeZoneIT.java
|
41d5cca33bb2a68b7ad07f503ec075be72cc11a0
|
[] |
no_license
|
sandalothier/jhdeclaccise
|
052e3b6699f413e74bfef75e97f3f11fa7990fd3
|
e9fa51f3ad5d6e536239726f624e8ed391e08c27
|
refs/heads/master
| 2022-12-21T12:41:46.193974
| 2019-12-29T12:54:47
| 2019-12-29T12:54:47
| 230,750,139
| 0
| 0
| null | 2022-12-16T06:12:07
| 2019-12-29T12:54:37
|
Java
|
UTF-8
|
Java
| false
| false
| 6,870
|
java
|
package com.compte.declaccise.config.timezone;
import com.compte.declaccise.DeclacciseApp;
import com.compte.declaccise.repository.timezone.DateTimeWrapper;
import com.compte.declaccise.repository.timezone.DateTimeWrapperRepository;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.rowset.SqlRowSet;
import org.springframework.transaction.annotation.Transactional;
import java.time.*;
import java.time.format.DateTimeFormatter;
import static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests for the UTC Hibernate configuration.
*/
@SpringBootTest(classes = DeclacciseApp.class)
public class HibernateTimeZoneIT {
@Autowired
private DateTimeWrapperRepository dateTimeWrapperRepository;
@Autowired
private JdbcTemplate jdbcTemplate;
private DateTimeWrapper dateTimeWrapper;
private DateTimeFormatter dateTimeFormatter;
private DateTimeFormatter timeFormatter;
private DateTimeFormatter dateFormatter;
@BeforeEach
public void setup() {
dateTimeWrapper = new DateTimeWrapper();
dateTimeWrapper.setInstant(Instant.parse("2014-11-12T05:50:00.0Z"));
dateTimeWrapper.setLocalDateTime(LocalDateTime.parse("2014-11-12T07:50:00.0"));
dateTimeWrapper.setOffsetDateTime(OffsetDateTime.parse("2011-12-14T08:30:00.0Z"));
dateTimeWrapper.setZonedDateTime(ZonedDateTime.parse("2011-12-14T08:30:00.0Z"));
dateTimeWrapper.setLocalTime(LocalTime.parse("14:30:00"));
dateTimeWrapper.setOffsetTime(OffsetTime.parse("14:30:00+02:00"));
dateTimeWrapper.setLocalDate(LocalDate.parse("2016-09-10"));
dateTimeFormatter = DateTimeFormatter
.ofPattern("yyyy-MM-dd HH:mm:ss.S")
.withZone(ZoneId.of("UTC"));
timeFormatter = DateTimeFormatter
.ofPattern("HH:mm:ss")
.withZone(ZoneId.of("UTC"));
dateFormatter = DateTimeFormatter
.ofPattern("yyyy-MM-dd");
}
@Test
@Transactional
public void storeInstantWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("instant", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeFormatter.format(dateTimeWrapper.getInstant());
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeLocalDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalDateTime()
.atZone(ZoneId.systemDefault())
.format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeOffsetDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("offset_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getOffsetDateTime()
.format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeZoneDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("zoned_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getZonedDateTime()
.format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeLocalTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalTime()
.atDate(LocalDate.of(1970, Month.JANUARY, 1))
.atZone(ZoneId.systemDefault())
.format(timeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeOffsetTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("offset_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getOffsetTime()
.toLocalTime()
.atDate(LocalDate.of(1970, Month.JANUARY, 1))
.atZone(ZoneId.systemDefault())
.format(timeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeLocalDateWithUtcConfigShouldBeStoredWithoutTransformation() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_date", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalDate()
.format(dateFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
private String generateSqlRequest(String fieldName, long id) {
return format("SELECT %s FROM jhi_date_time_wrapper where id=%d", fieldName, id);
}
private void assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(SqlRowSet sqlRowSet, String expectedValue) {
while (sqlRowSet.next()) {
String dbValue = sqlRowSet.getString(1);
assertThat(dbValue).isNotNull();
assertThat(dbValue).isEqualTo(expectedValue);
}
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
3073d315d9c8608ac00d9c4a9fbd3455bc7bc501
|
82a8f35c86c274cb23279314db60ab687d33a691
|
/duokan/reader/ui/general/web/ka.java
|
f2746b790fe6e7766720a06729c19c87198d1649
|
[] |
no_license
|
QMSCount/DReader
|
42363f6187b907dedde81ab3b9991523cbf2786d
|
c1537eed7091e32a5e2e52c79360606f622684bc
|
refs/heads/master
| 2021-09-14T22:16:45.495176
| 2018-05-20T14:57:15
| 2018-05-20T14:57:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,687
|
java
|
package com.duokan.reader.ui.general.web;
import android.net.Uri;
import android.webkit.WebResourceResponse;
import com.duokan.core.b.UrlTools;
import com.duokan.core.diagnostic.LogLevel;
import com.duokan.core.diagnostic.WebLog;
import java.io.File;
import java.io.FileInputStream;
import java.net.URLConnection;
import java.util.regex.Matcher;
class ka implements g {
final /* synthetic */ StoreWebController a;
ka(StoreWebController storeWebController) {
this.a = storeWebController;
}
public WebResourceResponse a(e eVar, String str) {
if (!StoreWebController.sMirrorEnabled) {
return null;
}
boolean z;
StoreWebController.waitForStoreMirrorReady();
File access$200 = StoreWebController.sStoreMirrorDir;
WebLog c = a.c();
if (access$200 != null) {
z = true;
} else {
z = false;
}
c.b(z);
if (access$200 == null) {
return null;
}
if (!access$200.exists()) {
return null;
}
Uri a = UrlTools.parse(str);
if (a == null) {
return null;
}
if (!StoreWebController.sMirrorSchemePattern.matcher(a.getScheme() != null ? a.getScheme() : "").matches()) {
return null;
}
if (!StoreWebController.sMirrorHostPattern.matcher(a.getHost() != null ? a.getHost() : "").matches()) {
return null;
}
CharSequence charSequence;
if (a.getPath() == null) {
charSequence = "";
} else if (a.getPath().endsWith("/")) {
charSequence = a.getPath() + "index.html";
com.duokan.reader.domain.statistics.a.k().a(access$200);
} else {
charSequence = a.getPath();
}
Matcher matcher = StoreWebController.sMirrorPathPattern.matcher(charSequence);
if (!matcher.matches()) {
return null;
}
if (matcher.groupCount() < 1) {
return null;
}
File file = new File(access$200, matcher.group(1));
if (file.exists()) {
try {
return new WebResourceResponse(URLConnection.guessContentTypeFromName(file.getName()), "", new FileInputStream(file));
} catch (Throwable th) {
a.c().a(LogLevel.WARNING, "store", String.format("mirror exception(res=%s, ver=%s)", new Object[]{r5, access$200.getName().split("\\.")[0]}), th);
return null;
}
}
a.c().a(LogLevel.WARNING, "store", "mirror lost(res=%s, ver=%s)", r5, access$200.getName().split("\\.")[0]);
return null;
}
}
|
[
"lixiaohong@p2peye.com"
] |
lixiaohong@p2peye.com
|
af9f2e0bfc8f4768f78188097d5ca37313e1d082
|
fadcbea2ba29868d30a449335422ed145d346ca3
|
/src/main/java/kenny/ml/svm/EvalMeasures.java
|
3f786a1eab9c50f000840503ec7f36d9dffea538
|
[] |
no_license
|
kennycason/supportvectormachine
|
c26e4e9ee6c99023302d4de9127e684f87d2b48e
|
34fa616ea88e5d69202100a9495945c3dc13bb92
|
refs/heads/master
| 2021-01-23T09:49:42.852741
| 2015-03-30T05:38:28
| 2015-03-30T05:38:28
| 10,718,864
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 686
|
java
|
package kenny.ml.svm;
import kenny.ml.svm.problem.Problem;
public class EvalMeasures {
double[] tp;
double[] fp;
double[] fn;
Problem p;
int[] predicted;
int catnum;
int computed;
public EvalMeasures(Problem p, int[] predicted, int catnum) {
if (predicted.length != p.l) {
System.err.println("Length error!");
return;
}
this.p = p;
this.predicted = predicted;
this.catnum = catnum;
computed = 0;
}
public double accuracy() {
int ret = 0;
for (int i = 0; i < p.l; i++) {
if (p.y[i] == predicted[i]) {
ret++;
}
}
System.out.println(ret + "/" + p.l + " correct");
return (double) ret / p.l;
}
}
|
[
"kenneth.cason@gmail.com"
] |
kenneth.cason@gmail.com
|
937a8eff8d47ce526df6120ce4a19b13dbd3a244
|
98e09fe00f89b1c480076f3107fdaa2c19b02531
|
/jpa-hibernate-advanced/src/main/java/com/learning/jpahibernateadvanced/entity/inheritance/PartTimeEmployeeV1.java
|
1e5b3d7f3b2084d93eca85f385f64baf3415daa2
|
[] |
no_license
|
kbhatt23/spring-boot-jpa
|
498b75e7347621bf5dcce9f7e18e8f8f6c1efb1e
|
0524809600973eaaa678447f4c9db92a699a11c4
|
refs/heads/master
| 2020-12-03T13:50:02.915405
| 2020-10-05T07:40:17
| 2020-10-05T07:40:17
| 231,342,474
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 647
|
java
|
package com.learning.jpahibernateadvanced.entity.inheritance;
import javax.persistence.Entity;
//used to represent inhericatnce heirachy with single table
@Entity
public class PartTimeEmployeeV1 extends EmployeeV1{
private Double hourlyWage;
public PartTimeEmployeeV1(String name, Double hourlyWage) {
super(name);
this.hourlyWage = hourlyWage;
}
public PartTimeEmployeeV1() {
}
public Double getHourlyWage() {
return hourlyWage;
}
public void setHourlyWage(Double hourlyWage) {
this.hourlyWage = hourlyWage;
}
@Override
public String toString() {
return "PartTimeEmployeeV1 [salary=" + hourlyWage + "]";
}
}
|
[
"kanishklikesprogramming@gmail.com"
] |
kanishklikesprogramming@gmail.com
|
cb0409257005845999329bc5e89434986823cb59
|
426ed1fed4c81d72867b6672d597dd9f1e30eb0f
|
/java-design-patterns-2/src/main/java/pl/finsys/behavioral/interpreter/Expression.java
|
0bdcb13eeb31ad5b4fd34bad64046b0e61613311
|
[] |
no_license
|
Sargovindan/design-patterns
|
834dfc70192e7fb0d915f27436f8db3c2a0ca6c2
|
9f57b96a7a6775635dd4e647b99d1b41a66e84df
|
refs/heads/master
| 2021-07-05T11:21:49.778838
| 2021-03-16T05:03:29
| 2021-03-16T05:03:29
| 13,791,075
| 0
| 0
| null | 2021-06-07T19:04:42
| 2013-10-23T01:56:36
|
Java
|
UTF-8
|
Java
| false
| false
| 1,173
|
java
|
package pl.finsys.behavioral.interpreter;
public abstract class Expression {
public void interpret(Context context) {
if (context.getInput().length() == 0)
return;
if (context.getInput().startsWith(nine())) {
context.setOutput(context.getOutput() + (9 * multiplier()));
context.setInput(context.getInput().substring(2));
} else if (context.getInput().startsWith(four())) {
context.setOutput(context.getOutput() + (4 * multiplier()));
context.setInput(context.getInput().substring(2));
} else if (context.getInput().startsWith(five())) {
context.setOutput(context.getOutput() + (5 * multiplier()));
context.setInput(context.getInput().substring(1));
}
while (context.getInput().startsWith(one())) {
context.setOutput(context.getOutput() + (1 * multiplier()));
context.setInput(context.getInput().substring(1));
}
}
public abstract String one();
public abstract String four();
public abstract String five();
public abstract String nine();
public abstract int multiplier();
}
|
[
"github.com"
] |
github.com
|
a7a5dfbe8fdfc83f5288660d178f49acb056a30b
|
bb05fc62169b49e01078b6bd211f18374c25cdc9
|
/soft/form/src/com/chimu/form/oql/ExpressionCreator.java
|
bdfe7de9ec9d17d778889c315b18b7e1415e5f97
|
[] |
no_license
|
markfussell/form
|
58717dd84af1462d8e3fe221535edcc8f18a8029
|
d227c510ff072334a715611875c5ae6a13535510
|
refs/heads/master
| 2016-09-10T00:12:07.602440
| 2013-02-07T01:24:14
| 2013-02-07T01:24:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 537
|
java
|
/*======================================================================
**
** File: chimu/form/oql/ExpressionCreator.java
**
** Copyright (c) 1997-2000, ChiMu Corporation. All Rights Reserved.
** See the file COPYING for copying permission.
**
======================================================================*/
package com.chimu.form.oql;
import com.chimu.form.query.*;
interface ExpressionCreator {
public abstract QueryExpression newExpressionFor_using(OqlQueryPi oql, QueryDescription description);
}
|
[
"mark.fussell@emenar.com"
] |
mark.fussell@emenar.com
|
6c1158c969b77a86c168c1c677733acd1f50a61a
|
ef339baebe031cfd9e88fd4c693ed8589df36ab1
|
/microservice/gateway/src/main/java/com/troy/gateway/web/rest/errors/FieldErrorVM.java
|
a6aa4eff1bde1de740c9980f8e2a88d566f67687
|
[] |
no_license
|
JaxYoun/keepertrunk
|
8fdde30ad14833e92de154ca95e81baacd6967b1
|
3d0c1e2a2b8b59b6cf1a83406428907f6474b2ed
|
refs/heads/master
| 2020-03-14T17:56:17.978489
| 2018-05-01T15:52:24
| 2018-05-01T15:52:24
| 131,731,589
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 648
|
java
|
package com.troy.gateway.web.rest.errors;
import java.io.Serializable;
public class FieldErrorVM implements Serializable {
private static final long serialVersionUID = 1L;
private final String objectName;
private final String field;
private final String message;
public FieldErrorVM(String dto, String field, String message) {
this.objectName = dto;
this.field = field;
this.message = message;
}
public String getObjectName() {
return objectName;
}
public String getField() {
return field;
}
public String getMessage() {
return message;
}
}
|
[
"gao88jie@qq.com"
] |
gao88jie@qq.com
|
305d04e77166dcc4750a41971ea3c20b614e018d
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/7/org/apache/commons/math3/dfp/Dfp_negativeOrNull_804.java
|
037c37420263876fcda814361bb70a1ec23e8d78
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 4,401
|
java
|
org apach common math3 dfp
decim float point librari java
float point built radix
decim
design goal
decim math close
settabl precis mix number set
portabl code portabl
perform
accuraci result ulp basic
algebra oper
compli ieee
ieee note
trade off
memori foot print memori
repres number perform
digit bigger round greater loss
decim digit base digit
partial fill
number repres form
pre
sign time mant time radix exp
pre
sign plusmn mantissa repres fraction number
mant signific digit
exp rang
ieee note differ
ieee requir radix radix
requir met
subclass made make behav radix
number opinion behav radix
number requir met
radix chosen faster oper
decim digit time radix behavior
realiz ad addit round step ensur
number decim digit repres constant
ieee standard specif leav intern data encod
reason conclud subclass radix
system encod radix system
ieee specifi exist normal number
entiti signific radix
digit support gradual underflow
rais underflow flag number expon
exp min expmin flush expon reach min exp digit
smallest number repres
min exp digit digit min exp
ieee defin impli radix point li
signific digit left remain digit
implement put impli radix point left
digit includ signific signific digit
radix point fine
detail matter definit side effect
render invis subclass
dfp field dfpfield
version
dfp real field element realfieldel dfp
check instanc equal
instanc nan equal
neg null negativeornul
isnan
field set ieee flag bit setieeeflagsbit dfp field dfpfield flag invalid
dotrap dfp field dfpfield flag invalid trap instanc newinst getzero
sign mant mant length infinit isinfinit
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
942d8f191780660d3b15c658c0d073db798dd6a4
|
9fc6f1d415c8cb341e848863af535dae5b22a48b
|
/Eclipse_Workspace_Core Java/Strings/Section_2/date_formatters/src/com/lara/date/X.java
|
e6c58d89df5d118062794485742de28b50305344
|
[] |
no_license
|
MahanteshAmbali/eclipse_workspaces
|
f7a063f7dd8c247d610f78f0105f9f632348b187
|
1f6d3a7eb0264b500877a718011bf6b842161fa1
|
refs/heads/master
| 2020-04-17T04:50:33.167337
| 2019-01-17T15:53:13
| 2019-01-17T15:53:13
| 166,226,211
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package com.lara.date;
import java.text.NumberFormat;
public class X {
public static void main(String[] args) {
// TODO Auto-generated method stub
NumberFormat nf1 = NumberFormat.getInstance();
double num = 24567.23423;
System.out.println(num);
System.out.println(nf1.format(num));
}
}
|
[
"mahantesh378@gmail.com"
] |
mahantesh378@gmail.com
|
c8f97b3784640b5436b10305302c12c80c1a1aab
|
9bac6b22d956192ba16d154fca68308c75052cbb
|
/icmsint-ejb/src/main/java/hk/judiciary/icmsint/model/sysinf/converter/gdsnid2j/DefendantAddressApplicationV20CT_SysInfCaseDTO_Converter.java
|
e75f9bd9338c082aead12df224600c28f21752e8
|
[] |
no_license
|
peterso05168/icmsint
|
9d4723781a6666cae8b72d42713467614699b66d
|
79461c4dc34c41b2533587ea3815d6275731a0a8
|
refs/heads/master
| 2020-06-25T07:32:54.932397
| 2017-07-13T10:54:56
| 2017-07-13T10:54:56
| 96,960,773
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,603
|
java
|
package hk.judiciary.icmsint.model.sysinf.converter.gdsnid2j;
import java.util.ArrayList;
import java.util.List;
import hk.judiciary.fmk.common.util.CommonUtil;
import hk.judiciary.icmsint.model.common.ConverterUtil;
import hk.judiciary.icmsint.model.sysinf.converter.impl.AbstractPopulatingConverter;
import hk.judiciary.icmsint.model.sysinf.inf.cmc.CodeTableDTO;
import hk.judiciary.icmsint.model.sysinf.inf.cmc.ComprisingCourtDTO;
import hk.judiciary.icmsint.model.sysinf.inf.cmc.CourtLvlTypeDTO;
import hk.judiciary.icmsint.model.sysinf.inf.cmc.sysInt.SysInfAddrDTO;
import hk.judiciary.icmsint.model.sysinf.inf.cmc.sysInt.SysInfCaseDTO;
import hk.judiciary.icmsint.model.sysinf.inf.cmc.sysInt.SysInfCaseDefendantDTO;
import hk.judiciary.icmsint.model.sysinf.inf.cmc.sysInt.SysInfCaseDetailsDTO;
import hk.judiciary.icmsint.model.sysinf.inf.cmc.sysInt.SysInfPartcpDTO;
import hk.judiciary.icmsint.model.sysinf.inf.gdsnid2j.DefendantAddressApplicationV20CT;
public class DefendantAddressApplicationV20CT_SysInfCaseDTO_Converter extends AbstractPopulatingConverter<DefendantAddressApplicationV20CT, SysInfCaseDTO> {
@Override
protected SysInfCaseDTO createTarget() {
return new SysInfCaseDTO();
}
@Override
public void populate(final DefendantAddressApplicationV20CT defendantAddrApp, final SysInfCaseDTO sysInfCase) {
/**
* =================================================FILL IN CASE DETAILS=================================================
**/
SysInfCaseDetailsDTO sysInfCaseDetailsDto = new SysInfCaseDetailsDTO();
CourtLvlTypeDTO courtLvlType = new CourtLvlTypeDTO();
ComprisingCourtDTO compsCourt = new ComprisingCourtDTO();
compsCourt.setCourtLvlType(courtLvlType);
if (!CommonUtil.isNullOrEmpty(defendantAddrApp.getCourtSys())) {
compsCourt.setCompsCourtCode(defendantAddrApp.getCourtSys().getValue());
sysInfCaseDetailsDto.setCompsCourt(compsCourt);
}
if (!CommonUtil.isNullOrEmpty(defendantAddrApp.getCaseType())) {
if (!CommonUtil.isNullOrEmpty(defendantAddrApp.getCaseType().getCodeName())) {
sysInfCaseDetailsDto.setCaseType(new CodeTableDTO(defendantAddrApp.getCaseType().getCodeName()));
}
}
if (!CommonUtil.isNullOrEmpty(defendantAddrApp.getProsecutionDepartmentCode())) {
if (!CommonUtil.isNullOrEmpty(defendantAddrApp.getProsecutionDepartmentCode().getCodeName())) {
sysInfCaseDetailsDto.setProsDept(new CodeTableDTO(defendantAddrApp.getProsecutionDepartmentCode().getCodeName()));
}
}
if (!CommonUtil.isNullOrEmpty(defendantAddrApp.getDepartmentReferenceNumber())) {
sysInfCaseDetailsDto.setProsRefNo(defendantAddrApp.getDepartmentReferenceNumber().getValue());
}
sysInfCaseDetailsDto.setReceiveDate(null); //TODO: AddressUpdateDate?
/**
* =================================================FILL IN DEFENDANTS=================================================
**/
List<SysInfCaseDefendantDTO> defendants = new ArrayList<SysInfCaseDefendantDTO>();
SysInfCaseDefendantDTO defendant = new SysInfCaseDefendantDTO();
SysInfPartcpDTO partcp = new SysInfPartcpDTO();
if (!CommonUtil.isNullOrEmpty(defendantAddrApp.getDefendantAddress())) {
List<SysInfAddrDTO> addrs = new ArrayList<SysInfAddrDTO>();
SysInfAddrDTO addr = new SysInfAddrDTO();
addr = ConverterUtil.toSysInfAddrDto(defendantAddrApp.getDefendantAddress());
addrs.add(addr);
partcp.setAddresses(addrs);
}
defendant.setDefendant(partcp);
defendants.add(defendant);
sysInfCase.setDetails(sysInfCaseDetailsDto);
sysInfCase.setDefendants(defendants);
sysInfCase.setCaseOffence(null);
}
}
|
[
"peterso05168@gmail.com"
] |
peterso05168@gmail.com
|
4fb83f932f9cfe738bc665ef36cfb8217c46a570
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/48/org/apache/commons/math/dfp/Dfp_abs_862.java
|
8eb760d1aa69a97274a23a8bd4cdda01a01607eb
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 3,843
|
java
|
org apach common math dfp
decim float point librari java
float point built radix
decim
design goal
decim math close
settabl precis mix number set
portabl code portabl
perform
accuraci result ulp basic
algebra oper
compli ieee
ieee note
trade off
memori foot print memori
repres number perform
digit bigger round greater loss
decim digit base digit
partial fill
number repres form
pre
sign time mant time radix exp
pre
sign plusmn mantissa repres fraction number
mant signific digit
exp rang
ieee note differ
ieee requir radix radix
requir met
subclass made make behav radix
number opinion behav radix
number requir met
radix chosen faster oper
decim digit time radix behavior
realiz ad addit round step ensur
number decim digit repres constant
ieee standard specif leav intern data encod
reason conclud subclass radix
system encod radix system
ieee specifi exist normal number
entiti signific radix
digit support gradual underflow
rais underflow flag number expon
exp min expmin flush expon reach min exp digit
smallest number repres
min exp digit digit min exp
ieee defin impli radix point li
signific digit left remain digit
implement put impli radix point left
digit includ signific signific digit
radix point fine
detail matter definit side effect
render invis subclass
dfp field dfpfield
version
dfp field element fieldel dfp
absolut instanc
absolut instanc
dfp ab
dfp result instanc newinst
result sign
result
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
66cebc27bf4cb9b987ca85b13d79254422fe568b
|
a695eac710fe15bb64c86869dcedfb8e402a5001
|
/fluent-mybatis-test/src/test/java/cn/org/atool/fluent/mybatis/test/method/SelectCountTest.java
|
89b0680610b63fc4d482e433c898cb3c119454a3
|
[
"Apache-2.0"
] |
permissive
|
atool/fluent-mybatis
|
33e6eb3dccac0db264fcb3c531005d7a28ab7d20
|
500522573c82d470d33a1f347903597edad4808d
|
refs/heads/master
| 2023-06-22T13:50:12.298938
| 2022-12-22T11:04:06
| 2022-12-22T11:04:06
| 218,672,433
| 789
| 84
|
Apache-2.0
| 2023-06-15T09:18:27
| 2019-10-31T02:57:34
|
Java
|
UTF-8
|
Java
| false
| false
| 2,480
|
java
|
package cn.org.atool.fluent.mybatis.test.method;
import cn.org.atool.fluent.mybatis.generator.ATM;
import cn.org.atool.fluent.mybatis.generator.shared2.mapper.StudentMapper;
import cn.org.atool.fluent.mybatis.generator.shared2.wrapper.StudentQuery;
import cn.org.atool.fluent.mybatis.test.BaseTest;
import org.junit.jupiter.api.Test;
import org.mybatis.spring.MyBatisSystemException;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @author darui.wu 2019/10/29 9:33 下午
*/
public class SelectCountTest extends BaseTest {
@Autowired
private StudentMapper mapper;
@Test
public void test_selectCount_null() {
want.exception(() -> mapper.count(null), MyBatisSystemException.class)
.contains("param[ew] not found");
}
@Test
public void test_selectCount() {
ATM.dataMap.student.initTable(4)
.id.values(23, 24, 25, 26)
.userName.values("u1", "u2", "u3", "u2")
.cleanAndInsert();
StudentQuery query = StudentQuery.emptyQuery()
.where.id().eq(24L).end();
int count = mapper.count(query);
db.sqlList().wantFirstSql().start("SELECT COUNT(*)").end("FROM fluent_mybatis.student WHERE `id` = ?");
want.number(count).eq(1);
}
@Test
public void test_selectCount_hasMultiple() {
ATM.dataMap.student.initTable(4)
.id.values(23, 24, 25, 26)
.userName.values("u1", "u2", "u3", "u2")
.cleanAndInsert();
StudentQuery query = StudentQuery.emptyQuery()
.select.id().userName().end()
.where.userName().eq("u2").end();
int count = mapper.count(query);
db.sqlList().wantFirstSql()
.start("SELECT COUNT(*)")
.end("FROM fluent_mybatis.student WHERE `user_name` = ?");
want.number(count).eq(2);
}
@Test
public void test_selectCount_limit() {
ATM.dataMap.student.initTable(4)
.id.values(23, 24, 25, 26)
.userName.values("u1", "u2", "u3", "u2")
.cleanAndInsert();
StudentQuery query = StudentQuery.emptyQuery()
.selectId()
.where.userName().eq("u2").end()
.limit(2);
int count = mapper.count(query);
db.sqlList().wantFirstSql()
.start("SELECT COUNT(`id`)")
.end("FROM fluent_mybatis.student WHERE `user_name` = ? LIMIT ?, ?");
want.number(count).eq(2);
}
}
|
[
"darui.wu@163.com"
] |
darui.wu@163.com
|
3eb1c1d0c75a0be89d3d94bd482e097e4c4f7998
|
e0c0a6209abe333bf863bc6f4d02f04dc1f34d65
|
/ImpInJava/TreeNode.java
|
38113afdf102ef12e4cb433f8ce1419363544795
|
[] |
no_license
|
Yunobububu/LeeCode
|
f7b278bc52f9b2da831b18dbe3f1fd82b1718d75
|
7b5b21fd9aba02da46514ce4c2f4b774d4632817
|
refs/heads/master
| 2021-01-20T11:47:12.789421
| 2018-06-06T12:33:08
| 2018-06-06T12:33:08
| 68,175,302
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 183
|
java
|
package Leecode.ImpInJava;
public class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode(int val){ this.val = val;}
TreeNode(){}
}
|
[
"lvjinkebit@163.com"
] |
lvjinkebit@163.com
|
0fe79f4abdba2fbefd301f86cd33d9284d71d6cf
|
6d4f3781bba2fe3ede9f3161068be8a2382a7891
|
/app/src/main/java/com/adamin/manslove/callback/LeXunDetailCallback.java
|
22ebd25ddf98f8011f9fa4d41f661343f705d028
|
[] |
no_license
|
mengxiangtong/ManLove
|
32aee7581789d746df04cdff31be044382a5b7dd
|
2be153ca6aa62a1933f4b6d01e3c94eb6c60af29
|
refs/heads/master
| 2020-01-23T21:59:26.174158
| 2016-06-27T14:15:32
| 2016-06-27T14:15:32
| 74,717,575
| 1
| 0
| null | 2016-11-25T02:04:29
| 2016-11-25T02:04:28
| null |
UTF-8
|
Java
| false
| false
| 665
|
java
|
package com.adamin.manslove.callback;
import com.adamin.manslove.domain.lexun.LeXunDataDetailWrapper;
import com.adamin.manslove.utils.LogUtil;
import com.google.gson.Gson;
import com.zhy.http.okhttp.callback.Callback;
import okhttp3.Response;
/**
* Created by adamlee on 2016/4/2.
*/
public abstract class LeXunDetailCallback extends Callback<LeXunDataDetailWrapper> {
@Override
public LeXunDataDetailWrapper parseNetworkResponse(Response response) throws Exception {
String json=response.body().string();
String json2=json.substring(1,json.length()-1);
return new Gson().fromJson(json2,LeXunDataDetailWrapper.class);
}
}
|
[
"adamin1990@gmail.com"
] |
adamin1990@gmail.com
|
2b30a62a690ad8d39a282706efa7c75c21a21672
|
271b0539281aa173720c05758c4aa5d3b695057c
|
/plugins/net.sf.jabref.imports.dblppp/src/net/sf/jabref/imports/ws/Sequence.java
|
022bdf351a8003226db92ce8b94794f3a2e1924f
|
[] |
no_license
|
magsilva/jabref3
|
772ccab72e86958b54b9ce6f93b530f8b18e1fe5
|
d5720ccb8f06b8eb196d385f4b758e5a8d090537
|
refs/heads/master
| 2021-05-29T15:17:32.160281
| 2015-11-02T17:53:04
| 2015-11-02T17:53:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,629
|
java
|
/**
* Sequence.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
*/
package net.sf.jabref.imports.ws;
public class Sequence implements java.io.Serializable {
private java.lang.String title;
private java.lang.String dblp_key;
public Sequence() {
}
public Sequence(
java.lang.String title,
java.lang.String dblp_key) {
this.title = title;
this.dblp_key = dblp_key;
}
/**
* Gets the title value for this Sequence.
*
* @return title
*/
public java.lang.String getTitle() {
return title;
}
/**
* Sets the title value for this Sequence.
*
* @param title
*/
public void setTitle(java.lang.String title) {
this.title = title;
}
/**
* Gets the dblp_key value for this Sequence.
*
* @return dblp_key
*/
public java.lang.String getDblp_key() {
return dblp_key;
}
/**
* Sets the dblp_key value for this Sequence.
*
* @param dblp_key
*/
public void setDblp_key(java.lang.String dblp_key) {
this.dblp_key = dblp_key;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof Sequence)) return false;
Sequence other = (Sequence) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.title==null && other.getTitle()==null) ||
(this.title!=null &&
this.title.equals(other.getTitle()))) &&
((this.dblp_key==null && other.getDblp_key()==null) ||
(this.dblp_key!=null &&
this.dblp_key.equals(other.getDblp_key())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getTitle() != null) {
_hashCode += getTitle().hashCode();
}
if (getDblp_key() != null) {
_hashCode += getDblp_key().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(Sequence.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("urn:DBLPPlusPlus", "Sequence"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("title");
elemField.setXmlName(new javax.xml.namespace.QName("", "title"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("dblp_key");
elemField.setXmlName(new javax.xml.namespace.QName("", "dblp_key"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
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.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
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.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"magsilva@gmail.com"
] |
magsilva@gmail.com
|
829db2e04948351ab6b10a0dc08779d500b7727f
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project23/src/test/java/org/gradle/test/performance23_4/Test23_321.java
|
9b255d9fa0f3a2393cfd7d6260417475bf6061b2
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package org.gradle.test.performance23_4;
import static org.junit.Assert.*;
public class Test23_321 {
private final Production23_321 production = new Production23_321("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
01064acbc7342a65d2b85f3e312efc8b17193819
|
e53b7a02300de2b71ac429d9ec619d12f21a97cc
|
/src/com/coda/efinance/schemas/common/TypeCtDocNumberType.java
|
c4d8c5114163840cda12d9f4b0162656285b06c1
|
[] |
no_license
|
phi2039/coda_xmli
|
2ad13c08b631d90a26cfa0a02c9c6c35416e796f
|
4c391b9a88f776c2bf636e15d7fcc59b7fcb7531
|
refs/heads/master
| 2021-01-10T05:36:22.264376
| 2015-12-03T16:36:23
| 2015-12-03T16:36:23
| 47,346,047
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,719
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.12.03 at 01:45:22 AM EST
//
package com.coda.efinance.schemas.common;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for typeCtDocNumberType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="typeCtDocNumberType">
* <restriction base="{http://www.coda.com/efinance/schemas/common}typeBaseEnum">
* <enumeration value="numeric"/>
* <enumeration value="alphanumeric"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "typeCtDocNumberType")
@XmlEnum
public enum TypeCtDocNumberType {
/**
* Numeric document number.
*
*/
@XmlEnumValue("numeric")
NUMERIC("numeric"),
/**
* Alphanumeric document number.
*
*/
@XmlEnumValue("alphanumeric")
ALPHANUMERIC("alphanumeric");
private final String value;
TypeCtDocNumberType(String v) {
value = v;
}
public String value() {
return value;
}
public static TypeCtDocNumberType fromValue(String v) {
for (TypeCtDocNumberType c: TypeCtDocNumberType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"climber2039@gmail.com"
] |
climber2039@gmail.com
|
2c1ab8abb80c38cbabe0b90b04e86e1fb34bb7f9
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/11/11_f8f72426dbe754cc200585d621a49e1f53cbcac3/HTTPMethodSpecTest/11_f8f72426dbe754cc200585d621a49e1f53cbcac3_HTTPMethodSpecTest_t.java
|
5dc6f0ff6108f3a213e440d11c9574ecbf86b70c
|
[] |
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
| 2,285
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package javax.security.jacc;
import junit.framework.TestCase;
/**
* @version $Rev$ $Date$
*/
public class HTTPMethodSpecTest extends TestCase {
public void testHTTPMethodSpec() throws Exception {
testHTTPMethodSpec(true);
testHTTPMethodSpec(false);
assertEquals("NONE", new HTTPMethodSpec("NONE", true).getActions());
}
public void testHTTPMethodSpec(boolean parseTransport) throws Exception {
assertEquals("", new HTTPMethodSpec(null, parseTransport).getActions());
assertEquals("", new HTTPMethodSpec("", parseTransport).getActions());
assertEquals("", new HTTPMethodSpec("!", parseTransport).getActions());
assertEquals("GET", new HTTPMethodSpec("GET", parseTransport).getActions());
assertEquals("GET,PUT", new HTTPMethodSpec("GET,PUT", parseTransport).getActions());
assertEquals("GET,PUT", new HTTPMethodSpec("PUT,GET", parseTransport).getActions());
assertEquals("FOO", new HTTPMethodSpec("FOO", parseTransport).getActions());
assertEquals("!GET", new HTTPMethodSpec("!GET", parseTransport).getActions());
assertEquals("!FOO", new HTTPMethodSpec("!FOO", parseTransport).getActions());
assertEquals("!GET,PUT", new HTTPMethodSpec("!PUT,GET", parseTransport).getActions());
assertFalse(new HTTPMethodSpec("GET", parseTransport).equals(new HTTPMethodSpec("!GET", parseTransport)));
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
10d83b9da5893a33acbf3b5bc9ec6d0ba3fad999
|
b8f4e27b12d45e4c71249e9bc793eeaaf371cf4e
|
/src/main/java/leetcode111_120/Triangle.java
|
fdae3a3ae77372fc630b701c8a84a6e12e11b0c9
|
[
"MIT"
] |
permissive
|
Ernestyj/JStudy
|
ca9a67801ba935655c935e310e4d8ed117200583
|
b5a622ce2a011517a0a00307af7b87ca24fa9d1c
|
refs/heads/master
| 2020-04-04T07:13:55.202675
| 2016-11-17T13:37:07
| 2016-11-17T13:37:07
| 40,429,136
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,403
|
java
|
package leetcode111_120;
import java.util.List;
/**Given a triangle, find the minimum path sum from top to bottom.
Each step you may move to adjacent numbers on the row below.
For example, given the following triangle
[
[2],
[3,4],
[6,5,7],
[4,1,8,3]
]
The minimum path sum from top to bottom is 11 (i.e., 2 + 3 + 5 + 1 = 11).
Note: Bonus point if you are able to do this using only O(n) extra space, where n is the total number of rows in the triangle.
* Created by eugene on 16/2/8.
*/
public class Triangle {
/**http://blog.csdn.net/linhuanmars/article/details/23230657
* 二维动态规划(自顶向下):在某一个元素i,j的最小路径和就是它上层对应的相邻两个元素的最小路径和加上自己的值,
动态规划(自底向上):sum[i][j]=min(sum[i+1][j],sum[i+1][j+1])+triangle[i][j],
自底向上的方式省去了对每层首尾元素的特殊处理,更简洁.
*/
public int minimumTotal(List<List<Integer>> triangle) {
int m = triangle.size();
if (m==0) return 0;
int[] dp = new int[m];
for (int i=0; i<triangle.get(m-1).size(); i++)
dp[i] = triangle.get(m-1).get(i);
for (int i=m-2; i>=0; i--){
for (int j=0; j<triangle.get(i).size(); j++)
dp[j] = Math.min(dp[j], dp[j+1]) + triangle.get(i).get(j);
}
return dp[0];
}
}
|
[
"ernestyj@outlook.com"
] |
ernestyj@outlook.com
|
7690d5d4396ce40a26e2019e11f5c0741e4582fe
|
54f352a242a8ad6ff5516703e91da61e08d9a9e6
|
/Source Codes/CodeJamData/11/01/17.java
|
1cd4ac9dc8baef3799708da5156673aa8a8599e9
|
[] |
no_license
|
Kawser-nerd/CLCDSA
|
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
|
aee32551795763b54acb26856ab239370cac4e75
|
refs/heads/master
| 2022-02-09T11:08:56.588303
| 2022-01-26T18:53:40
| 2022-01-26T18:53:40
| 211,783,197
| 23
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,854
|
java
|
import java.awt.geom.*;
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.regex.*;
import static java.lang.Math.*;
public class A_small {
public static void main(String[] args) throws Exception {
new A_small();
}
public A_small() throws Exception {
line = br.readLine();
st = new StringTokenizer(line);
int caseCount = Integer.parseInt(st.nextToken());
for (int caseNum = 1; caseNum <= caseCount; caseNum++) {
String ans = null;
line = br.readLine();
st = new StringTokenizer(line);
int n = Integer.parseInt(st.nextToken());
int o = 1;
int oLast = 0;
int b = 1;
int bLast = 0;
int r = 0;
for (int i=0;i<n;i++) {
char who = st.nextToken().charAt(0);
int target = Integer.parseInt(st.nextToken());
if (who=='O') {
int wait = r-oLast;
r += max(0, abs(target-o)-wait)+1;
o = target;
oLast = r;
} else {
int wait = r-bLast;
r += max(0, abs(target-b)-wait)+1;
b = target;
bLast = r;
}
// debug(o,b,r);
}
// debug("---");
ans = r+"";
buf.append(String.format("Case #%d: %s\n", caseNum, ans));
}
System.out.print(buf);
}
// {{{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
StringTokenizer st;
StringBuilder buf = new StringBuilder();
public static void debug(Object... arr) {
System.err.println(Arrays.deepToString(arr));
}
// }}}
}
|
[
"kwnafi@yahoo.com"
] |
kwnafi@yahoo.com
|
06cfe51e0ab86c48ad54636a0ba7156d7673a18c
|
92dd6bc0a9435c359593a1f9b309bb58d3e3f103
|
/src/Mar2021Leetcode/_0653TwoSumIVInputIsABST.java
|
5dc4b46d5f44f3a4e057d16853c3f49656913583
|
[
"MIT"
] |
permissive
|
darshanhs90/Java-Coding
|
bfb2eb84153a8a8a9429efc2833c47f6680f03f4
|
da76ccd7851f102712f7d8dfa4659901c5de7a76
|
refs/heads/master
| 2023-05-27T03:17:45.055811
| 2021-06-16T06:18:08
| 2021-06-16T06:18:08
| 36,981,580
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 962
|
java
|
package Mar2021Leetcode;
import java.util.HashSet;
public class _0653TwoSumIVInputIsABST {
static public class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode() {
}
TreeNode(int val) {
this.val = val;
}
TreeNode(int val, TreeNode left, TreeNode right) {
this.val = val;
this.left = left;
this.right = right;
}
}
public static void main(String[] args) {
TreeNode tn = new TreeNode(5);
tn.left = new TreeNode(3);
tn.right = new TreeNode(6);
tn.left.left = new TreeNode(2);
tn.left.right = new TreeNode(4);
tn.right.right = new TreeNode(7);
System.out.println(findTarget(tn, 9));
System.out.println(findTarget(tn, 28));
tn = new TreeNode(2);
tn.left = new TreeNode(1);
tn.right = new TreeNode(3);
System.out.println(findTarget(tn, 4));
System.out.println(findTarget(tn, 1));
System.out.println(findTarget(tn, 3));
}
public static boolean findTarget(TreeNode root, int k) {
}
}
|
[
"hsdars@gmail.com"
] |
hsdars@gmail.com
|
f532e930e058b69e6e7987072d13bd1f4a2a1f4a
|
8a5fb7f90d874edfadf3e32d4283fdc3c501a8af
|
/meteor-client/src/main/java/meteor/plugins/cluescrolls/ClueScrollEmoteOverlay.java
|
565beab83bc607abae862d0f71c2b86893c47652
|
[] |
no_license
|
illumineawake/MeteorLite
|
9ae1a7e541fca900d91a620e4629c311c5d607a1
|
3660bb4d0bfa96477a586e9642ec97f11ae2f229
|
refs/heads/main
| 2023-07-13T11:21:49.282006
| 2021-08-25T07:23:31
| 2021-08-25T07:23:31
| 398,165,027
| 1
| 0
| null | 2021-08-20T05:26:33
| 2021-08-20T05:26:32
| null |
UTF-8
|
Java
| false
| false
| 3,734
|
java
|
/*
* Copyright (c) 2018, Lotto <https://github.com/devLotto>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package meteor.plugins.cluescrolls;
import java.awt.Dimension;
import java.awt.Graphics2D;
import javax.inject.Inject;
import meteor.plugins.cluescrolls.clues.ClueScroll;
import meteor.plugins.cluescrolls.clues.EmoteClue;
import meteor.ui.overlay.Overlay;
import meteor.ui.overlay.OverlayLayer;
import meteor.ui.overlay.OverlayPosition;
import net.runelite.api.Client;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
class ClueScrollEmoteOverlay extends Overlay {
private final ClueScrollPlugin plugin;
private final Client client;
private boolean hasScrolled;
@Inject
private ClueScrollEmoteOverlay(ClueScrollPlugin plugin, Client client) {
setPosition(OverlayPosition.DYNAMIC);
setLayer(OverlayLayer.ABOVE_WIDGETS);
this.plugin = plugin;
this.client = client;
}
@Override
public Dimension render(Graphics2D graphics) {
ClueScroll clue = plugin.getClue();
if (!(clue instanceof EmoteClue)) {
hasScrolled = false;
return null;
}
EmoteClue emoteClue = (EmoteClue) clue;
if (!emoteClue.getFirstEmote().hasSprite()) {
return null;
}
Widget emoteContainer = client.getWidget(WidgetInfo.EMOTE_CONTAINER);
if (emoteContainer == null || emoteContainer.isHidden()) {
return null;
}
Widget emoteWindow = client.getWidget(WidgetInfo.EMOTE_WINDOW);
if (emoteWindow == null) {
return null;
}
Widget firstEmoteWidget = null;
Widget secondEmoteWidget = null;
for (Widget emoteWidget : emoteContainer.getDynamicChildren()) {
if (emoteWidget.getSpriteId() == emoteClue.getFirstEmote().getSpriteId()) {
firstEmoteWidget = emoteWidget;
plugin.highlightWidget(graphics, emoteWidget, emoteWindow, null,
emoteClue.getSecondEmote() != null ? "1st" : null);
} else if (emoteClue.getSecondEmote() != null
&& emoteWidget.getSpriteId() == emoteClue.getSecondEmote().getSpriteId()) {
secondEmoteWidget = emoteWidget;
plugin.highlightWidget(graphics, emoteWidget, emoteWindow, null, "2nd");
}
}
if (!hasScrolled) {
hasScrolled = true;
plugin
.scrollToWidget(WidgetInfo.EMOTE_CONTAINER, WidgetInfo.EMOTE_SCROLLBAR, firstEmoteWidget,
secondEmoteWidget);
}
return null;
}
}
|
[
"therealnull@gmail.com"
] |
therealnull@gmail.com
|
7569359e3e2b8f00a815713c9efae50bb6ec8c05
|
e9d98aa0d0f9e684db84fae1069a657d679e3a64
|
/06.Spring Boot/Ex28_FileUpload/src/main/java/com/study/springboot/file/DownloadController.java
|
b680436abb4227fcab1d7a107f6c70d2d0688377
|
[] |
no_license
|
jbisne/Web
|
d6190b2a26abd82d8b06d3e8543fedb243a522b1
|
425d795bbb38622dd394e912a17562828d060fb6
|
refs/heads/master
| 2022-12-23T21:53:17.202096
| 2019-06-08T20:26:34
| 2019-06-08T20:26:34
| 172,474,634
| 0
| 0
| null | 2022-12-16T02:41:48
| 2019-02-25T09:25:41
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,627
|
java
|
package com.study.springboot.file;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class DownloadController {
@Value("${upload.path}")
private String uploadPath;
// 파일목록보기
@RequestMapping("/fileList")
public String fileList(HttpServletRequest request,
HttpServletResponse response, Model model) throws IOException
{
// 서버의 물리적 경로 얻어오기
String saveDirectory = ResourceUtils.getFile(uploadPath).toPath().toString();
System.out.println("saveDirectory:"+saveDirectory);
// File객체 생성
File file = new File(saveDirectory);
// 파일 목록 얻어오기
File[] files = file.listFiles();
Map<String, Integer> fileMap = new HashMap<>();
for (File f : files) {
// Key:파일명 , Value:파일크기
fileMap.put(f.getName(), (int)Math.ceil(f.length()/1024.0));
//print.println(fname +"---"+ fsize +"<br/>");
}
model.addAttribute("fileMap", fileMap);
return "FileUpload/fileList";
}
// 파일 다운로드
@RequestMapping("/download")
public void download(HttpServletRequest request,
HttpServletResponse response) throws Exception
{
String fileName = request.getParameter("fileName");
String oriFileName = request.getParameter("oriFileName");
// 데이터베이스를 사용했다면 Original File Name이 저장되어 있겠지만
// 이 예제에서는 다음과 같이 구함.
// ----------------------------------------------------------------
int i = fileName.indexOf(".");
oriFileName = fileName.substring(i+1);
// ----------------------------------------------------------------
// String saveDirectory = request
// .getSession().getServletContext()
// .getRealPath("/resources/upload");
String saveDirectory = ResourceUtils.getFile(uploadPath).toPath().toString();
File downloadFile = new File(saveDirectory + File.separator + fileName);
if (!downloadFile.canRead()) {
throw new Exception("File can't read(파일을 찾을 수 없습니다)");
}
String userAgent = request.getHeader("User-Agent");
boolean ie = userAgent.indexOf("MSIE") > -1;
String fileName2 = null;
if(ie) {
fileName2 = URLEncoder.encode(oriFileName, "utf-8");
} else {
fileName2 = new String(oriFileName.getBytes("utf-8"), "iso-8859-1");
}
response.setCharacterEncoding("UTF-8");
response.setContentType("apllication/download; charset=utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + fileName2);
response.setHeader("Content-Transfer-Encoding", "binary");
BufferedInputStream inStrem = new BufferedInputStream(new FileInputStream(downloadFile));
BufferedOutputStream outStream = new BufferedOutputStream(response.getOutputStream());
byte[] buffer = new byte[1024];
int bytesRead = 0;
while ((bytesRead = inStrem.read(buffer)) != -1) {
outStream.write(buffer, 0, bytesRead);
}
outStream.flush();
inStrem.close();
}
}
|
[
"jisun7894@gmail.com"
] |
jisun7894@gmail.com
|
069383d41620b8fe8405359e7496d3b6fed839ff
|
9bfa71d23e70e514dd9be5f47781b1178833130d
|
/SQLPlugin/gen/com/sqlplugin/psi/impl/SqlWidthBucketBound1Impl.java
|
d654573eb92bb710080d67b9b40a05b7ec0dc2bf
|
[
"MIT"
] |
permissive
|
smoothwind/SQL-IDEAplugin
|
de341884b77c2c61e0b4d6ceefd7c16ff3b7b469
|
3efa434095b4cac4772a0a7df18b34042a4c7557
|
refs/heads/master
| 2020-04-16T22:37:44.776363
| 2019-01-28T09:43:25
| 2019-01-28T09:43:25
| 165,976,439
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 1,045
|
java
|
// This is a generated file. Not intended for manual editing.
package com.sqlplugin.psi.impl;
import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiElementVisitor;
import com.intellij.psi.util.PsiTreeUtil;
import static com.sqlplugin.psi.SqlTypes.*;
import com.intellij.extapi.psi.ASTWrapperPsiElement;
import com.sqlplugin.psi.*;
public class SqlWidthBucketBound1Impl extends ASTWrapperPsiElement implements SqlWidthBucketBound1 {
public SqlWidthBucketBound1Impl(@NotNull ASTNode node) {
super(node);
}
public void accept(@NotNull SqlVisitor visitor) {
visitor.visitWidthBucketBound1(this);
}
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof SqlVisitor) accept((SqlVisitor)visitor);
else super.accept(visitor);
}
@Override
@NotNull
public SqlNumericValueExpression getNumericValueExpression() {
return findNotNullChildByClass(SqlNumericValueExpression.class);
}
}
|
[
"stephen.idle@qq.com"
] |
stephen.idle@qq.com
|
95ed534a261126c4ef3bb488fc4a4c20ff4555d6
|
0aba3ca0c2da8626bed808155a854858f93b80e0
|
/services/sms/src/main/java/com/huaweicloud/sdk/sms/v3/model/UpdateTaskRequest.java
|
bccdc7ac8acb33126142551a64987b9f4ef9b66a
|
[
"Apache-2.0"
] |
permissive
|
LanYus/huaweicloud-sdk-java-v3
|
5b51e0953f5b1a8a5d38bccbaa7389222a8c0ea7
|
761a9c43c0ea287a927707891c529389e43e8280
|
refs/heads/master
| 2023-05-31T15:46:06.772578
| 2021-06-10T12:06:03
| 2021-06-10T12:06:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,728
|
java
|
package com.huaweicloud.sdk.sms.v3.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.huaweicloud.sdk.sms.v3.model.PutTaskReq;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Request Object
*/
public class UpdateTaskRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="task_id")
private String taskId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="body")
private PutTaskReq body;
public UpdateTaskRequest withTaskId(String taskId) {
this.taskId = taskId;
return this;
}
/**
* 迁移任务id
* @return taskId
*/
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public UpdateTaskRequest withBody(PutTaskReq body) {
this.body = body;
return this;
}
public UpdateTaskRequest withBody(Consumer<PutTaskReq> bodySetter) {
if(this.body == null ){
this.body = new PutTaskReq();
bodySetter.accept(this.body);
}
return this;
}
/**
* Get body
* @return body
*/
public PutTaskReq getBody() {
return body;
}
public void setBody(PutTaskReq body) {
this.body = body;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UpdateTaskRequest updateTaskRequest = (UpdateTaskRequest) o;
return Objects.equals(this.taskId, updateTaskRequest.taskId) &&
Objects.equals(this.body, updateTaskRequest.body);
}
@Override
public int hashCode() {
return Objects.hash(taskId, body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UpdateTaskRequest {\n");
sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"wuchen25@huawei.com"
] |
wuchen25@huawei.com
|
1effdab944a534955008e04ad902a0c75ec06808
|
804c3721c6d7e52ea073085e28675e8440439c2f
|
/latte_core/src/main/java/com/wwh/latte_core/app/Configurator.java
|
804703d84667dc57b2ff68b96224645266e4c0e6
|
[] |
no_license
|
HAIWWH/FistEC
|
3477c8ca9eb0ba9e8e324ea11a52a9f6c5e991b6
|
3c40eca083a37ea253f5eadcac77069501347851
|
refs/heads/master
| 2020-06-29T20:04:56.865362
| 2019-08-05T00:17:45
| 2019-08-05T00:17:45
| 200,612,201
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,891
|
java
|
package com.wwh.latte_core.app;
import com.joanzapata.iconify.IconFontDescriptor;
import com.joanzapata.iconify.Iconify;
import java.util.ArrayList;
import java.util.WeakHashMap;
public class Configurator {
private static final WeakHashMap<String,Object> LATTE_CONFIGS = new WeakHashMap<>();
private static final ArrayList<IconFontDescriptor> ICON = new ArrayList<>();/*图片库*/
private Configurator(){
LATTE_CONFIGS.put(ConfigType.CONFIG_READY.name(),false);
}
public static Configurator getInsrance(){
return Holder.INSTANCE;
}
final WeakHashMap<String,Object> getLatteConfigs() {
return LATTE_CONFIGS;
}
private static class Holder{
private static final Configurator INSTANCE = new Configurator();
}
public final void configure(){
initIcons();
LATTE_CONFIGS.put(ConfigType.CONFIG_READY.name(),true);
}
public final Configurator withApiHost(String host){
LATTE_CONFIGS.put(ConfigType.API_HOST.name(),host);
return this;
}
private void initIcons(){
if(ICON.size() > 0){
final Iconify.IconifyInitializer initializer = Iconify.with(ICON.get(0));
for (int i = 0; i < ICON.size(); i++) {
initializer.with(ICON.get(i));
}
}
}
public final Configurator withIcon(IconFontDescriptor descriptor){
ICON.add(descriptor);
return this;
}
private void chectConfiguration(){
final boolean isReady = (boolean) LATTE_CONFIGS.get(ConfigType.CONFIG_READY.name());
if(isReady){
throw new RuntimeException("Configuration is not ready,call configure");
}
}
@SuppressWarnings("unchecked")
final <T> T getConfiguration(Enum<ConfigType> key){
chectConfiguration();
return (T) LATTE_CONFIGS.get(key);
}
}
|
[
"1455166220@qq.com"
] |
1455166220@qq.com
|
517f50b3035a4347abf591782e62651ad05270a6
|
6ef4869c6bc2ce2e77b422242e347819f6a5f665
|
/devices/google/Pixel 2/29/QPP6.190730.005/src/framework/android/net/_$$Lambda$ConnectivityManager$4$GbcJVaUJX_pIrYQi94EYHYBwTJI.java
|
33578e42cebf494ea0b2f2371fc9090ffa460b7c
|
[] |
no_license
|
hacking-android/frameworks
|
40e40396bb2edacccabf8a920fa5722b021fb060
|
943f0b4d46f72532a419fb6171e40d1c93984c8e
|
refs/heads/master
| 2020-07-03T19:32:28.876703
| 2019-08-13T03:31:06
| 2019-08-13T03:31:06
| 202,017,534
| 2
| 0
| null | 2019-08-13T03:33:19
| 2019-08-12T22:19:30
|
Java
|
UTF-8
|
Java
| false
| false
| 747
|
java
|
/*
* Decompiled with CFR 0.145.
*/
package android.net;
import android.net.ConnectivityManager;
public final class _$$Lambda$ConnectivityManager$4$GbcJVaUJX_pIrYQi94EYHYBwTJI
implements Runnable {
private final /* synthetic */ ConnectivityManager.OnTetheringEntitlementResultListener f$0;
private final /* synthetic */ int f$1;
public /* synthetic */ _$$Lambda$ConnectivityManager$4$GbcJVaUJX_pIrYQi94EYHYBwTJI(ConnectivityManager.OnTetheringEntitlementResultListener onTetheringEntitlementResultListener, int n) {
this.f$0 = onTetheringEntitlementResultListener;
this.f$1 = n;
}
@Override
public final void run() {
ConnectivityManager.4.lambda$onReceiveResult$0(this.f$0, this.f$1);
}
}
|
[
"me@paulo.costa.nom.br"
] |
me@paulo.costa.nom.br
|
578e255986db39073c97db1261cfe9368b987901
|
de0fd3a72463c76a6980fdc3708566a6ebae793b
|
/src/test/java/gov/nist/SQ136ATest.java
|
dd261818af624ef8bfaad7ed6350b8e2e57864ed
|
[
"MIT"
] |
permissive
|
jasmoran/proleap-cobol-parser
|
2d43460ee306e0c64729ed464f1969e37eeaa7ac
|
61ca74678f998b1a4c9dfbf6dd76dca552ca6a11
|
refs/heads/master
| 2023-08-17T06:41:12.035842
| 2021-10-05T07:47:38
| 2021-10-05T09:37:39
| 411,218,262
| 1
| 0
|
MIT
| 2021-09-28T09:32:08
| 2021-09-28T09:32:06
| null |
UTF-8
|
Java
| false
| false
| 542
|
java
|
package gov.nist;
import java.io.File;
import io.proleap.cobol.preprocessor.CobolPreprocessor.CobolSourceFormatEnum;
import io.proleap.cobol.runner.CobolParseTestRunner;
import io.proleap.cobol.runner.impl.CobolParseTestRunnerImpl;
import org.junit.Test;
public class SQ136ATest {
@Test
public void test() throws Exception {
final File inputFile = new File("src/test/resources/gov/nist/SQ136A.CBL");
final CobolParseTestRunner runner = new CobolParseTestRunnerImpl();
runner.parseFile(inputFile, CobolSourceFormatEnum.FIXED);
}
}
|
[
"u.wol@wwu.de"
] |
u.wol@wwu.de
|
48a94df6bcf1021084b12f67ecbbc4d4d19f661c
|
b0bbd50c4ee2458e0426bb2114e020bd33ee5229
|
/junit5-parameter-resolver/src/test/java/pl/codeleak/samples/junit5/parameterresolver/CustomParameterResolverTest.java
|
78b976220a5fc775d7311a9dd0179089db2dc48f
|
[] |
no_license
|
stefanofiorenza/junit5-samples
|
1ee5209c3de91d55da8637a28078259a50f8b68e
|
8e84d9c772cca3e6b83ed9e38c4245a2a8da99c1
|
refs/heads/master
| 2021-10-24T09:45:01.125565
| 2019-03-24T21:19:32
| 2019-03-24T21:19:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 525
|
java
|
package pl.codeleak.samples.junit5.parameterresolver;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
class Dependency {
void doSomething() {
System.out.println("Doing something... " + this.toString());
}
}
@ExtendWith(InjectResolver.class)
class CustomParameterResolverTest {
@Test
void test1(@Inject Dependency injected) {
injected.doSomething();
}
@Test
void test2(@Inject Dependency injected) {
injected.doSomething();
}
}
|
[
"rafal.borowiec@gmail.com"
] |
rafal.borowiec@gmail.com
|
8a5abcaa25a17fea496ea6305e70ca4a85c22250
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/kms-20160120/src/main/java/com/aliyun/kms20160120/models/UploadCertificateResponse.java
|
9b76baae10d2787c0e89971fcd2b158d21d3c0f2
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,079
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.kms20160120.models;
import com.aliyun.tea.*;
public class UploadCertificateResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("body")
@Validation(required = true)
public UploadCertificateResponseBody body;
public static UploadCertificateResponse build(java.util.Map<String, ?> map) throws Exception {
UploadCertificateResponse self = new UploadCertificateResponse();
return TeaModel.build(map, self);
}
public UploadCertificateResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public UploadCertificateResponse setBody(UploadCertificateResponseBody body) {
this.body = body;
return this;
}
public UploadCertificateResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
1c443669f593758ba304065a234c1eb6c7e02e3f
|
112555797d66c4d03f491d65236d62a60c6dc246
|
/JAXB_Practice/demos/jaxb-23-validation-Inheritence/src/main/java/com/sagar/jaxb/domain/inheritence/Loyalty.java
|
6eb6c8caf90aece547d7ca8bc70cedac7e4397f1
|
[] |
no_license
|
sagarrao1/JAXB_API
|
595e4f310e805cb0f3377b3bb42d3f4ec857699c
|
c3f3fd91047190e5425ca7e94bf5e5c781a636a2
|
refs/heads/master
| 2023-05-04T07:48:02.971642
| 2021-05-20T10:30:27
| 2021-05-20T10:30:27
| 352,019,925
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,147
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.03.27 at 07:20:02 AM IST
//
package com.sagar.jaxb.domain.inheritence;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for loyalty.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="loyalty">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="BRONZE"/>
* <enumeration value="SILVER"/>
* <enumeration value="GOLD"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "loyalty")
@XmlEnum
public enum Loyalty {
BRONZE,
SILVER,
GOLD;
public String value() {
return name();
}
public static Loyalty fromValue(String v) {
return valueOf(v);
}
}
|
[
"sagarrao1@gmail.com"
] |
sagarrao1@gmail.com
|
a04da06371467bc63be20da1c935eaae3eec20b7
|
30e2cb0f82d70cab392f70518c16067705c752eb
|
/src/test/java/outcomes/number_format_exception/NumberFormatExceptionInTests4.java
|
574bcfd6cbfb7149cec2c434006947dee78f67c8
|
[] |
no_license
|
hyperskill/hs-test
|
7afb9fbfb32d3efea9f810be8116f6d99728b8d1
|
94a14529121e3509a0db1e1a552378085587f34d
|
refs/heads/master
| 2023-08-10T04:28:38.330242
| 2023-06-12T10:25:57
| 2023-06-12T10:25:57
| 167,659,709
| 35
| 19
| null | 2023-06-12T10:25:58
| 2019-01-26T06:55:37
|
Java
|
UTF-8
|
Java
| false
| false
| 872
|
java
|
package outcomes.number_format_exception;
import org.hyperskill.hstest.dynamic.input.DynamicTestingMethod;
import org.hyperskill.hstest.testcase.CheckResult;
import org.hyperskill.hstest.testing.TestedProgram;
import outcomes.base.ContainsMessage;
import outcomes.base.UserErrorTest;
class NumberFormatExceptionInTests4Main {
public static void main(String[] args) {
System.out.println("qwe");
}
}
public class NumberFormatExceptionInTests4 extends UserErrorTest {
@ContainsMessage
String m =
"Error in test #1\n" +
"\n" +
"Cannot parse Double from the output part \"qwe\"";
@DynamicTestingMethod
CheckResult test() {
TestedProgram main = new TestedProgram(NumberFormatExceptionInTests4Main.class);
double number = Double.parseDouble(main.start());
return CheckResult.correct();
}
}
|
[
"aaaaaa2493@yandex.ru"
] |
aaaaaa2493@yandex.ru
|
480f3d53b33a2961fc038ffc00c91bce94ec2247
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/com/google/android/gms/internal/ads/zzbci.java
|
b8bebdca2f3f7bdbf9baf9d262020bdf6a7aee9c
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 553
|
java
|
package com.google.android.gms.internal.ads;
public final class zzbci implements Runnable {
private final /* synthetic */ zzbcc zzefd;
private final /* synthetic */ int zzefh;
private final /* synthetic */ int zzefi;
public zzbci(zzbcc zzbcc, int i, int i2) {
this.zzefd = zzbcc;
this.zzefh = i;
this.zzefi = i2;
}
@Override // java.lang.Runnable
public final void run() {
if (zzbcc.zza(this.zzefd) != null) {
zzbcc.zza(this.zzefd).zzk(this.zzefh, this.zzefi);
}
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
203d0b54157fabd97828b0514da36da5b1cb45aa
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/JetBrains--intellij-community/b9e2c6195205e534e72fbde4ffad87db54ed00da/after/DataNode.java
|
6c9eb2135ac226bffb83682f7f95601eb9ab8f6b
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,243
|
java
|
/*
* Copyright 2000-2013 JetBrains s.r.o.
*
* 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.intellij.openapi.externalSystem.model;
import com.intellij.util.containers.ContainerUtilRt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.*;
/**
* This class provides a generic graph infrastructure with ability to store particular data. The main purpose is to
* allow easy extensible data domain construction.
* <p/>
* Example: we might want to describe project model like 'project' which has multiple 'module' children where every
* 'module' has a collection of child 'content root' and dependencies nodes etc. When that is done, plugins can easily
* enhance any project. For example, particular framework can add facet settings as one more 'project' node's child.
* <p/>
* Not thread-safe.
*
* @author Denis Zhdanov
* @since 4/12/13 11:53 AM
*/
public class DataNode<T> {
@NotNull private final List<DataNode<?>> myChildren = ContainerUtilRt.newArrayList();
@NotNull private final Key<T> myKey;
@NotNull private final T myData;
@Nullable private final DataNode<?> myParent;
public DataNode(@NotNull Key<T> key, @NotNull T data, @Nullable DataNode<?> parent) {
myKey = key;
myData = data;
myParent = parent;
}
@NotNull
public <T> DataNode<T> createChild(@NotNull Key<T> key, @NotNull T data) {
DataNode<T> result = new DataNode<T>(key, data, this);
myChildren.add(result);
return result;
}
@NotNull
public Key<T> getKey() {
return myKey;
}
@NotNull
public T getData() {
return myData;
}
/**
* Allows to retrieve data stored for the given key at the current node or any of its parents.
*
* @param key target data's key
* @param <T> target data type
* @return data stored for the current key and available via the current node (if any)
*/
@SuppressWarnings("unchecked")
@Nullable
public <T> T getData(@NotNull Key<T> key) {
if (myKey.equals(key)) {
return (T)myData;
}
for (DataNode<?> p = myParent; p != null; p = p.myParent) {
if (p.myKey.equals(key)) {
return (T)p.myData;
}
}
return null;
}
@SuppressWarnings("unchecked")
@Nullable
public <T> DataNode<T> getDataNode(@NotNull Key<T> key) {
if (myKey.equals(key)) {
return (DataNode<T>)this;
}
for (DataNode<?> p = myParent; p != null; p = p.myParent) {
if (p.myKey.equals(key)) {
return (DataNode<T>)p;
}
}
return null;
}
public void addChild(@NotNull DataNode<?> child) {
myChildren.add(child);
}
@NotNull
public Collection<DataNode<?>> getChildren() {
return myChildren;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
93ab5ef6f021860a8e4879baa40e1f73b06470cf
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_1010370.java
|
ec0082f9e1b4f2f1cc085b5aabaa684c43a3bc6a
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 154
|
java
|
public ConceptDescriptorBuilder2 class_(boolean isFinal,boolean isAbstract,boolean root){
class_(isFinal,isAbstract);
myIsRoot=root;
return this;
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
59b1939b2e5d30d11f362c155a2d15213c4e4418
|
5c45706c2c3c1c662b16c0c754858ab7ae24b8ff
|
/src/main/java/com/mongodb/kafka/connect/sink/processor/field/renaming/RenameByMapping.java
|
e4227c2f20f9e989cc5d6f4ce771dc0e85f9804f
|
[
"Apache-2.0"
] |
permissive
|
mongodb-labs/mongo-kafka
|
a51905d3459f651dcf8ec941d153f830c71c7cd6
|
d92a100e7b1af161797356d25b01e6560fc74df0
|
refs/heads/master
| 2023-09-05T21:05:08.992142
| 2022-01-20T16:59:03
| 2022-01-20T16:59:03
| 169,089,395
| 4
| 4
|
Apache-2.0
| 2022-01-20T16:59:04
| 2019-02-04T14:19:02
|
Java
|
UTF-8
|
Java
| false
| false
| 2,303
|
java
|
/*
* Copyright 2008-present MongoDB, 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.
*
* Original Work: Apache License, Version 2.0, Copyright 2017 Hans-Peter Grahsl.
*/
package com.mongodb.kafka.connect.sink.processor.field.renaming;
import static com.mongodb.kafka.connect.sink.MongoSinkTopicConfig.FIELD_RENAMER_MAPPING_CONFIG;
import static com.mongodb.kafka.connect.util.ConfigHelper.jsonArrayFromString;
import java.util.HashMap;
import java.util.Map;
import org.bson.Document;
import com.mongodb.kafka.connect.sink.MongoSinkTopicConfig;
import com.mongodb.kafka.connect.util.ConnectConfigException;
public class RenameByMapping extends Renamer {
private Map<String, String> fieldMappings;
public RenameByMapping(final MongoSinkTopicConfig config) {
super(config);
fieldMappings = parseRenameFieldnameMappings();
}
boolean isActive() {
return !fieldMappings.isEmpty();
}
String renamed(final String path, final String name) {
String newName = fieldMappings.get(path + SUB_FIELD_DOT_SEPARATOR + name);
return newName != null ? newName : name;
}
private Map<String, String> parseRenameFieldnameMappings() {
String settings = getConfig().getString(FIELD_RENAMER_MAPPING_CONFIG);
Map<String, String> map = new HashMap<>();
jsonArrayFromString(settings).ifPresent(renames -> {
for (Document r : renames) {
if (!(r.containsKey("oldName") || r.containsKey("newName"))) {
throw new ConnectConfigException(FIELD_RENAMER_MAPPING_CONFIG, settings, "Both oldName and newName must be mapped");
}
map.put(r.getString("oldName"), r.getString("newName"));
}
});
return map;
}
}
|
[
"ross.lawley@gmail.com"
] |
ross.lawley@gmail.com
|
b14ef347bb5f277d6bd04b27a943144ee85cb2ee
|
183d057ee3f1255551c9f2bc6080dfcc23262639
|
/app/src/main/java/com/cliffex/videomaker/videoeditor/introvd/template/router/community/event/ScrollTopEvent.java
|
3dbd100f383c2d89367906d9b4498333e8e9e11b
|
[] |
no_license
|
datcoind/VideoMaker-1
|
5567ff713f771b19154ba463469b97d18d0164ec
|
bcd6697db53b1e76ee510e6e805e46b24a4834f4
|
refs/heads/master
| 2023-03-19T20:33:16.016544
| 2019-09-27T13:55:07
| 2019-09-27T13:55:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 184
|
java
|
package com.introvd.template.router.community.event;
public class ScrollTopEvent {
public boolean isShow;
public ScrollTopEvent(boolean z) {
this.isShow = z;
}
}
|
[
"bhagat.singh@cliffex.com"
] |
bhagat.singh@cliffex.com
|
58391d7db0bd61265f8bbb7c7f5f28817c2ccd8b
|
1930d97ebfc352f45b8c25ef715af406783aabe2
|
/src/main/java/com/alipay/api/response/KoubeiMemberDataItemNearbyQueryResponse.java
|
c13c415082b2ade480f50b052483f73d844f03bc
|
[
"Apache-2.0"
] |
permissive
|
WQmmm/alipay-sdk-java-all
|
57974d199ee83518523e8d354dcdec0a9ce40a0c
|
66af9219e5ca802cff963ab86b99aadc59cc09dd
|
refs/heads/master
| 2023-06-28T03:54:17.577332
| 2021-08-02T10:05:10
| 2021-08-02T10:05:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,436
|
java
|
package com.alipay.api.response;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.NearbyGoods;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.member.data.item.nearby.query response.
*
* @author auto create
* @since 1.0, 2021-07-14 10:12:35
*/
public class KoubeiMemberDataItemNearbyQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 8594896575673241838L;
/**
* 附近优惠商品列表,前端根据其中的字段展示即可
*/
@ApiListField("goods_list")
@ApiField("nearby_goods")
private List<NearbyGoods> goodsList;
/**
* 是否有下一页,用于分页展示
*/
@ApiField("has_more")
private Boolean hasMore;
/**
* 下页数据开始索引,请求下一页时作为请求参数start上传。
*/
@ApiField("next_start")
private Long nextStart;
public void setGoodsList(List<NearbyGoods> goodsList) {
this.goodsList = goodsList;
}
public List<NearbyGoods> getGoodsList( ) {
return this.goodsList;
}
public void setHasMore(Boolean hasMore) {
this.hasMore = hasMore;
}
public Boolean getHasMore( ) {
return this.hasMore;
}
public void setNextStart(Long nextStart) {
this.nextStart = nextStart;
}
public Long getNextStart( ) {
return this.nextStart;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
73870238afe54469eb71a9ea488f47228853e221
|
05cb658138cc988654e1c22a20b3919e64d2c464
|
/src/main/java/com/js/isearch/index/DataMove.java
|
3f55a594155c7b417179c5a77c39bb52ee203bc7
|
[] |
no_license
|
xiexlp/jfinal_demo_for_maven_backserver
|
85fdc55112a3644a04c7c7664dfb780dea85a0c1
|
c0c0b137665f3fd1cdeb6224f1c70daffc1fbb75
|
refs/heads/master
| 2022-10-08T07:58:59.125793
| 2019-07-24T09:00:33
| 2019-07-24T09:00:33
| 198,597,524
| 0
| 0
| null | 2022-10-06T06:10:47
| 2019-07-24T08:59:39
|
Lex
|
UTF-8
|
Java
| false
| false
| 7,700
|
java
|
package com.js.isearch.index;
import com.js.common.db.DbUtils;
import com.js.common.db.HikariDb;
import com.js.common.db.HikariFlexibleDb;
import com.js.isearch.orm.Doc;
import com.js.isearch.orm.Topic;
import com.js.isearch.serv.DocServ;
import com.js.isearch.serv.TopicServ;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/***
* 这个是将ejf_topic-->ejf_doc中去
*/
public class DataMove {
public static void main1(String[] args) {
//move();
//更新原字段的索引状态
// updateTopicIndexStatus("content","ejf_topic","iforum");
ThreadPoolExecutor executor = new ThreadPoolExecutor(5, 10, 200, TimeUnit.MILLISECONDS,
new ArrayBlockingQueue<Runnable>(5));
for(int i=0;i<15;i++){
MyTask myTask = new MyTask(i);
executor.execute(myTask);
System.out.println("线程池中线程数目:"+executor.getPoolSize()+",队列中等待执行的任务数目:"+
executor.getQueue().size()+",已执行玩别的任务数目:"+executor.getCompletedTaskCount());
}
executor.shutdown();
}
public static void main(String[] args) {
move();
}
public static final String url_pre="https://localhost/boot/";
/**
* 将ejf_topic数据备份到ejf_doc中去,返回转移的数目
*/
public static int move(){
//将ejf_topic ->ejf_doc中去
String sql = "select * from ejf_topic as a where a.index_status=0";
Connection con = HikariFlexibleDb.getConnection();
List<Topic> topicList =new ArrayList<>();
topicList.clear();
Topic topic1 =null;
ResultSet rs =null;
PreparedStatement ps=null;
try {
ps = con.prepareStatement(sql);
rs=ps.executeQuery();
while (rs.next()){
topic1 = new Topic();
setFindParamNo(rs,topic1);
topicList.add(topic1);
}
}catch (Exception e){
e.printStackTrace();
}finally {
DbUtils.close(rs,ps);
DbUtils.closeConn(con);
}
//List<Topic> topicList = TopicServ.n().findAll();
DocServ docServ = DocServ.n();
int sum=0;
for(Topic topic:topicList){
System.out.println("topic:"+topic.getTitle());
Doc d = new Doc();
d.setBody(topic.getContent());
d.setBodySize(topic.getContent().length());
d.setTitle(topic.getTitle());
d.setTitleSize(topic.getTitle().length());
d.setFieldId(topic.getTopicId());
d.setHost("localhost");
d.setUrl(url_pre+"topic/topicattach?topicId="+topic.getTopicId());
d.setDbname("iforum");
d.setTablename("ejf_topic");
d.setFieldname("content");
d.setCreateTime(System.currentTimeMillis());
d.setUpdateTime(System.currentTimeMillis());
d.setIndexStage(0);
d.setIndexStatus("0");
int r=docServ.saveAutoId(d);
if(r>0){
sum++;
System.out.println("存入成功:"+r);
//更新这个topic的索引状态
String updateSql = "update ejf_topic set index_status=1 where topic_id="+topic.getTopicId();
int result = HikariFlexibleDb.exeUpdate(updateSql);
if(result>0){
System.out.println("更新主题索引状态成功");
}else {
System.out.println("更新主题索引状态失败");
}
}else {
System.out.println("存入失败:"+r);
}
}
return sum;
}
/**
* 更新ejf_topoc的索引状态
*/
public static void updateTopicIndexStatus(String fieldname,String tablename,String dbname){
List<Topic> topicList = findAllTopicFromIforum();
//String tablename = "ejf_topic";
for(Topic topic:topicList){
int topicId = topic.getTopicId();
//查看是否已经拷贝过来了,这个topicl,
List<Long> topicIdList = DocServ.n().findDocIdByFieldnameFieldIdTablenameDbname(fieldname,topicId,tablename,dbname);
int size = topicIdList.size();
System.out.println("size:"+size);
//存在,已经被索引,更新索引状态为1
if(size>0){
String sql = "update ejf_topic set index_status=1 where topic_id="+topicId;
int result = HikariFlexibleDb.exeUpdate(sql);
if(result>0){
System.out.println("更新成功");
}
}
}
}
public static int moveATopic2NewDatabase(Topic topic,String tablename){
//查看 ejf_doc里面是否有该 topic
Connection con= HikariDb.getConnection();
return 0;
//String sql = "select doc_id from ejf_doc where tablename="+tablename+" and topic_id="+topic.getTopicId();
}
public static List<Topic> findAllTopicFromIforum(){
List<Topic> topicList = new ArrayList<>();
//HikariConfig config = new HikariConfig();
try {
Connection con= HikariFlexibleDb.getConnection();
PreparedStatement ps =con.prepareStatement("select * FROM ejf_topic");
ResultSet rs=ps.executeQuery();
Topic topic =null;
while (rs.next()) {
topic = new Topic();
setFindParamNo(rs,topic);
topicList.add(topic);
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return topicList;
}
protected static void setFindParamNo(ResultSet r,Topic topic) throws Exception{
topic.setTopicId(r.getInt(1));
topic.setAttachIcon(r.getString(2));
topic.setAttaches(r.getInt(3));
topic.setCatId(r.getInt(4));
topic.setContent(r.getString(5));
topic.setCreateTime(r.getLong(6));
topic.setDiggdns(r.getInt(7));
topic.setDiggups(r.getInt(8));
topic.setHighColor(r.getString(9));
topic.setHighExpireDate(r.getLong(10));
topic.setIsDigest(r.getInt(11));
topic.setIsHidePost(r.getInt(12));
topic.setIsReplyNotice(r.getString(13));
topic.setIsSolved(r.getString(14));
topic.setLastNickname(r.getString(15));
topic.setLastPostTime(r.getLong(16));
topic.setLastPostUser(r.getString(17));
topic.setNickname(r.getString(18));
topic.setRemoteIp(r.getString(19));
topic.setReplies(r.getInt(20));
topic.setReward(r.getInt(21));
topic.setSectionId(r.getInt(22));
topic.setSpecType(r.getInt(23));
topic.setState(r.getInt(24));
topic.setTitle(r.getString(25));
topic.setTopExpireDate(r.getLong(26));
topic.setTopScope(r.getInt(27));
topic.setUpdateTime(r.getLong(28));
topic.setUpdateUser(r.getString(29));
topic.setUserId(r.getInt(30));
topic.setVisits(r.getInt(31));
topic.setBoardId(r.getInt(32));
topic.setLikes(r.getInt(33));
topic.setUsername(r.getString(34));
topic.setIndexStatus(r.getInt(35));
}
}
|
[
"pkuping@foxmail.com"
] |
pkuping@foxmail.com
|
66bbcb97a054524a5818b61905a78b44f2080a7f
|
cf2e4937e170f6b38839feca7bdf5dd31fa7e135
|
/ryqcxls/src/main/java/com/ystech/qywx/service/AppUserRoleManageImpl.java
|
023a690a867b5dbca9e6c795be44a9b448a675f9
|
[] |
no_license
|
shusanzhan/ryqcxly
|
ff5ba983613bd9041248dc4d55fd1f593eee626e
|
3ef738d1a0c7d61ea448a66f2ccbb7fe3ece992d
|
refs/heads/master
| 2022-12-24T16:25:47.960029
| 2021-02-22T02:57:28
| 2021-02-22T02:57:28
| 193,863,573
| 0
| 0
| null | 2022-12-16T08:01:59
| 2019-06-26T08:31:32
|
Java
|
UTF-8
|
Java
| false
| false
| 289
|
java
|
package com.ystech.qywx.service;
import org.springframework.stereotype.Component;
import com.ystech.core.dao.HibernateEntityDao;
import com.ystech.qywx.model.AppUserRole;
@Component("appUserRoleManageImpl")
public class AppUserRoleManageImpl extends HibernateEntityDao<AppUserRole>{
}
|
[
"shusanzhan@163.com"
] |
shusanzhan@163.com
|
7cc0005a84ec4ccae9c352bff0f4a105955b91cc
|
4370971acf1f422557e3f7de83d47f7705fd3719
|
/ph-oton-html/src/main/java/com/helger/html/hc/html/embedded/EHCIFrameAlign.java
|
4da7be4f971c149c199411c454c20df37fc00912
|
[
"Apache-2.0"
] |
permissive
|
phax/ph-oton
|
848676b328507b5ea96877d0b8ba80d286fd9fb7
|
6d28dcb7de123f4deb77de1bc022faf77ac37e49
|
refs/heads/master
| 2023-08-27T20:41:11.706035
| 2023-08-20T15:30:44
| 2023-08-20T15:30:44
| 35,175,824
| 5
| 5
|
Apache-2.0
| 2023-02-23T20:20:41
| 2015-05-06T18:27:20
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,741
|
java
|
/*
* Copyright (C) 2014-2023 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.helger.html.hc.html.embedded;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.helger.commons.annotation.Nonempty;
import com.helger.commons.lang.EnumHelper;
import com.helger.commons.string.StringHelper;
import com.helger.html.hc.html.IHCHasHTMLAttributeValue;
/**
* Enumeration for {@link com.helger.html.hc.html.embedded.HCIFrame} alignment.
*
* @author Philip Helger
*/
public enum EHCIFrameAlign implements IHCHasHTMLAttributeValue
{
TOP ("top"),
MIDDLE ("middle"),
BOTTOM ("bottom"),
LEFT ("left"),
RIGHT ("right");
private final String m_sAttrValue;
EHCIFrameAlign (@Nonnull @Nonempty final String sAttrValue)
{
m_sAttrValue = sAttrValue;
}
@Nonnull
@Nonempty
public String getAttrValue ()
{
return m_sAttrValue;
}
@Nullable
public static EHCIFrameAlign getFromAttrValueOrNull (@Nullable final String sAttrValue)
{
if (StringHelper.hasNoText (sAttrValue))
return null;
return EnumHelper.findFirst (EHCIFrameAlign.class, x -> x.getAttrValue ().equals (sAttrValue));
}
}
|
[
"philip@helger.com"
] |
philip@helger.com
|
07d013764982bed59f4ef5d351df41ec7511df60
|
608cf243607bfa7a2f4c91298463f2f199ae0ec1
|
/android/versioned-abis/expoview-abi39_0_0/src/main/java/abi39_0_0/host/exp/exponent/modules/api/components/datetimepicker/RNDismissableDatePickerDialog.java
|
c21681a002b600fa19eb83b3d6062f6741cb40d2
|
[
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] |
permissive
|
kodeco835/symmetrical-happiness
|
ca79bd6c7cdd3f7258dec06ac306aae89692f62a
|
4f91cb07abef56118c35f893d9f5cc637b9310ef
|
refs/heads/master
| 2023-04-30T04:02:09.478971
| 2021-03-23T03:19:05
| 2021-03-23T03:19:05
| 350,565,410
| 0
| 1
|
MIT
| 2023-04-12T19:49:48
| 2021-03-23T03:18:02
|
Objective-C
|
UTF-8
|
Java
| false
| false
| 4,548
|
java
|
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package abi39_0_0.host.exp.exponent.modules.api.components.datetimepicker;
import android.app.DatePickerDialog;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build;
import android.util.AttributeSet;
import android.widget.DatePicker;
import androidx.annotation.Nullable;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import static abi39_0_0.host.exp.exponent.modules.api.components.datetimepicker.ReflectionHelper.findField;
/**
* <p>
* Certain versions of Android (Jellybean-KitKat) have a bug where when dismissed, the
* {@link DatePickerDialog} still calls the OnDateSetListener. This class works around that issue.
* </p>
*
* <p>
* See: <a href="https://code.google.com/p/android/issues/detail?id=34833">Issue 34833</a>
* </p>
*/
public class RNDismissableDatePickerDialog extends DatePickerDialog {
public RNDismissableDatePickerDialog(
Context context,
@Nullable DatePickerDialog.OnDateSetListener callback,
int year,
int monthOfYear,
int dayOfMonth,
RNDatePickerDisplay display) {
super(context, callback, year, monthOfYear, dayOfMonth);
fixSpinner(context, year, monthOfYear, dayOfMonth, display);
}
public RNDismissableDatePickerDialog(
Context context,
int theme,
@Nullable DatePickerDialog.OnDateSetListener callback,
int year,
int monthOfYear,
int dayOfMonth,
RNDatePickerDisplay display) {
super(context, theme, callback, year, monthOfYear, dayOfMonth);
fixSpinner(context, year, monthOfYear, dayOfMonth, display);
}
@Override
protected void onStop() {
// do *not* call super.onStop() on KitKat on lower, as that would erroneously call the
// OnDateSetListener when the dialog is dismissed, or call it twice when "OK" is pressed.
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) {
super.onStop();
}
}
private void fixSpinner(Context context, int year, int month, int dayOfMonth, RNDatePickerDisplay display) {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N && display == RNDatePickerDisplay.SPINNER) {
try {
// Get the theme's android:datePickerMode
Class<?> styleableClass = Class.forName("com.android.internal.R$styleable");
Field datePickerStyleableField = styleableClass.getField("DatePicker");
int[] datePickerStyleable = (int[]) datePickerStyleableField.get(null);
final TypedArray a = context.obtainStyledAttributes(null, datePickerStyleable, android.R.attr.datePickerStyle, 0);
a.recycle();
DatePicker datePicker = (DatePicker)findField(DatePickerDialog.class, DatePicker.class, "mDatePicker").get(this);
Class<?> delegateClass = Class.forName("android.widget.DatePickerSpinnerDelegate");
Field delegateField = findField(DatePicker.class, delegateClass, "mDelegate");
Object delegate = delegateField.get(datePicker);
Class<?> spinnerDelegateClass;
spinnerDelegateClass = Class.forName("android.widget.DatePickerSpinnerDelegate");
// In 7.0 Nougat for some reason the datePickerMode is ignored and the delegate is
// DatePickerClockDelegate
if (delegate.getClass() != spinnerDelegateClass) {
delegateField.set(datePicker, null); // throw out the DatePickerClockDelegate!
datePicker.removeAllViews(); // remove the DatePickerClockDelegate views
Method createSpinnerUIDelegate =
DatePicker.class.getDeclaredMethod(
"createSpinnerUIDelegate",
Context.class,
AttributeSet.class,
int.class,
int.class);
createSpinnerUIDelegate.setAccessible(true);
// Instantiate a DatePickerSpinnerDelegate throughout createSpinnerUIDelegate method
delegate = createSpinnerUIDelegate.invoke(datePicker, context, null, android.R.attr.datePickerStyle, 0);
delegateField.set(datePicker, delegate); // set the DatePicker.mDelegate to the spinner delegate
datePicker.setCalendarViewShown(false);
// Initialize the date for the DatePicker delegate again
datePicker.init(year, month, dayOfMonth, this);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
}
|
[
"81201147+kodeco835@users.noreply.github.com"
] |
81201147+kodeco835@users.noreply.github.com
|
c0421b996d191e65b075db51de4820d8d2dfcb08
|
691a767fe4c86278cbe57fda4559ccc177969cfb
|
/clients/ptranslator/src/test/java/org/hawkular/metrics/clients/ptrans/PTransTest.java
|
d9fb6ec88a24a43c99fd04ccd9894dccbf1a4dfb
|
[
"Apache-2.0"
] |
permissive
|
jmazzitelli/hawkular-metrics
|
93be28808ceb04d39fd4074e97368f1cad178d7d
|
83627d276b471961f5a3d7443b52d4ce832f4510
|
refs/heads/master
| 2021-01-18T01:53:50.724678
| 2016-07-08T14:38:28
| 2016-07-08T14:38:28
| 30,549,870
| 0
| 0
| null | 2015-02-09T18:00:07
| 2015-02-09T18:00:07
| null |
UTF-8
|
Java
| false
| false
| 2,053
|
java
|
/*
* Copyright 2014-2015 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* 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.hawkular.metrics.clients.ptrans;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hawkular.metrics.clients.ptrans.ConfigurationKey.SERVICES;
import static org.hawkular.metrics.clients.ptrans.Service.COLLECTD;
import java.util.Properties;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
/**
* @author Thomas Segismont
*/
public class PTransTest {
@Rule
public final ExpectedException expectedException = ExpectedException.none();
@Test
public void constructorShouldThrowExceptionWhenProvidedConfigurationIsNull() {
expectedException.expect(IllegalArgumentException.class);
expectedException.expectMessage(equalTo("Configuration is null"));
new PTrans(null);
}
@Test
public void constructorShouldThrowExceptionWhenProvidedConfigurationIsInvalid() {
expectedException.expect(IllegalArgumentException.class);
expectedException.expectMessage("Property services not found");
new PTrans(Configuration.from(new Properties()));
}
@Test
public void constructorShouldNotThrowExceptionWhenProvidedConfigurationIsValid() {
Properties properties = new Properties();
properties.setProperty(SERVICES.toString(), COLLECTD.getExternalForm());
new PTrans(Configuration.from(properties));
}
}
|
[
"tsegismo@redhat.com"
] |
tsegismo@redhat.com
|
5e4f2a529edf376db167e95419b02a9ef28be12b
|
ade43c95a131bc9f33b8f99e8b0053b5bc1393e8
|
/src/OWON_VDS_v1.0.24/com/owon/uppersoft/dso/function/measure/MeasureWFSupport.java
|
2321c011b1e205d3d347eb02f65128b98c991c37
|
[] |
no_license
|
AbirFaisal/RealScope
|
7ba7532986ea1ee11683b4bd96f746e800ea144a
|
f80ff68a8e9d61d7bec12b464b637decb036a3f0
|
refs/heads/master
| 2020-03-30T04:21:38.344659
| 2018-10-03T17:54:16
| 2018-10-03T17:54:16
| 150,738,973
| 7
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 260
|
java
|
package com.owon.uppersoft.dso.function.measure;
import com.owon.uppersoft.dso.wf.ON_WF_Iterator;
import com.owon.uppersoft.vds.core.aspect.help.IWF;
public interface MeasureWFSupport {
ON_WF_Iterator on_wf_Iterator();
IWF getWaveForm(int idx);
}
|
[
"administrator@Computer.local"
] |
administrator@Computer.local
|
e39470311b461256aef03fc8d2c69244e1ef1210
|
a1c081bac41cf01fa22d0c4c3ef0796847223951
|
/app/src/main/java/com/bowen/doctor/common/bean/ShareData.java
|
8386d4651600e500a8b935362ab42c9dbf6207a5
|
[] |
no_license
|
androiddeveloper007/byDoctor
|
3d1b59421ab749fd60773384207405d82a1a97a9
|
41630c57b92cee43ce4ed6d5e76579224509cf16
|
refs/heads/master
| 2020-04-01T14:19:43.910958
| 2018-10-16T13:35:05
| 2018-10-16T13:35:05
| 153,289,879
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,239
|
java
|
package com.bowen.doctor.common.bean;
/**
* Describe:
* Created by AwenZeng on 2018/5/18.
*/
public class ShareData {
private int shareType;
private String imgUrl;//分享图片
private String titile;//分享title
private String linkUrl;//分享链接
private String content;//分享内容
private String phoneNum;
public int getShareType() {
return shareType;
}
public void setShareType(int shareType) {
this.shareType = shareType;
}
public String getImgUrl() {
return imgUrl;
}
public void setImgUrl(String imgUrl) {
this.imgUrl = imgUrl;
}
public String getTitile() {
return titile;
}
public void setTitile(String titile) {
this.titile = titile;
}
public String getLinkUrl() {
return linkUrl;
}
public void setLinkUrl(String linkUrl) {
this.linkUrl = linkUrl;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getPhoneNum() {
return phoneNum;
}
public void setPhoneNum(String phoneNum) {
this.phoneNum = phoneNum;
}
}
|
[
"zhu852514500@163.com"
] |
zhu852514500@163.com
|
5f65edefe973629a96502dcf0466e48bf7599302
|
67978021063d560b43df75097546c856881aeddd
|
/ghealth-agency/src/main/java/com/todaysoft/ghealth/form/FormRepeatSubmitInterceptor.java
|
d10def63a8f606969b029be42ea5ac949a69bd34
|
[] |
no_license
|
John930312/ghealth-aggregator
|
c9be981dc42cb07d1b7808371acc7f8df52fd078
|
74925db8417b79df17d403f19736ca9308d9755e
|
refs/heads/master
| 2020-04-11T20:54:46.845272
| 2018-10-31T08:47:05
| 2018-10-31T08:47:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,849
|
java
|
package com.todaysoft.ghealth.form;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Enumeration;
import java.util.UUID;
@Component("formRepeatSubmitInterceptor")
public class FormRepeatSubmitInterceptor extends HandlerInterceptorAdapter
{
private static final String TOKEN_NAMESPACE = "com.todaysoft.ghealth";
private static final String TOKEN_NAME_FIELD = "REPEAT_SUBMIT_TOKEN";
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception
{
HandlerMethod method = (HandlerMethod)handler;
if (isFormInputView(method))
{
String token = UUID.randomUUID().toString();
String tokenName = TOKEN_NAMESPACE + "_" + token;
request.setAttribute(TOKEN_NAME_FIELD, tokenName);
request.setAttribute(tokenName, token);
request.getSession().setAttribute(tokenName, token);
return true;
}
else if (isFormSubmitHandler(method))
{
String tokenName = getFormSubmitTokenName(request);
if (StringUtils.isEmpty(tokenName))
{
return false;
}
String token = request.getParameter(tokenName);
String stoken = (String)request.getSession().getAttribute(tokenName);
request.getSession().removeAttribute(tokenName);
if (StringUtils.isEmpty(token) || StringUtils.isEmpty(stoken) || !token.equals(stoken))
{
return false;
}
return true;
}
else
{
return true;
}
}
private boolean isFormInputView(HandlerMethod method)
{
return method.getMethodAnnotation(FormInputView.class) != null;
}
private boolean isFormSubmitHandler(HandlerMethod method)
{
return method.getMethodAnnotation(FormSubmitHandler.class) != null;
}
private String getFormSubmitTokenName(HttpServletRequest request)
{
Enumeration<String> names = request.getParameterNames();
String name;
while (names.hasMoreElements())
{
name = names.nextElement();
if (name.startsWith(TOKEN_NAMESPACE))
{
return name;
}
}
return null;
}
}
|
[
"xuxin@hsgene.com"
] |
xuxin@hsgene.com
|
cf76fca61a327bde0c2b852ba69b52ce23eae68b
|
a5dbeadebfd268a529d6a012fb23dc0b635f9b8c
|
/core/src/main/java/ru/mipt/cybersecurity/crypto/util/DigestFactory.java
|
1d62a9021269e9117760cca2fbc6a3e1b0fb73cd
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
skhvostyuk/CyberSecurity
|
22f6a272e38b56bfb054aae0dd7aa03bc96b6d06
|
33ea483df41973984d0edbe47a20201b204150aa
|
refs/heads/master
| 2021-08-29T04:44:31.041415
| 2017-12-13T12:15:29
| 2017-12-13T12:15:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,709
|
java
|
package ru.mipt.cybersecurity.crypto.util;
import ru.mipt.cybersecurity.crypto.Digest;
import ru.mipt.cybersecurity.crypto.digests.MD5Digest;
import ru.mipt.cybersecurity.crypto.digests.SHA1Digest;
import ru.mipt.cybersecurity.crypto.digests.SHA224Digest;
import ru.mipt.cybersecurity.crypto.digests.SHA256Digest;
import ru.mipt.cybersecurity.crypto.digests.SHA384Digest;
import ru.mipt.cybersecurity.crypto.digests.SHA3Digest;
import ru.mipt.cybersecurity.crypto.digests.SHA512Digest;
import ru.mipt.cybersecurity.crypto.digests.SHA512tDigest;
/**
* Basic factory class for message digests.
*/
public final class DigestFactory
{
public static Digest createMD5()
{
return new MD5Digest();
}
public static Digest createSHA1()
{
return new SHA1Digest();
}
public static Digest createSHA224()
{
return new SHA224Digest();
}
public static Digest createSHA256()
{
return new SHA256Digest();
}
public static Digest createSHA384()
{
return new SHA384Digest();
}
public static Digest createSHA512()
{
return new SHA512Digest();
}
public static Digest createSHA512_224()
{
return new SHA512tDigest(224);
}
public static Digest createSHA512_256()
{
return new SHA512tDigest(256);
}
public static Digest createSHA3_224()
{
return new SHA3Digest(224);
}
public static Digest createSHA3_256()
{
return new SHA3Digest(256);
}
public static Digest createSHA3_384()
{
return new SHA3Digest(384);
}
public static Digest createSHA3_512()
{
return new SHA3Digest(512);
}
}
|
[
"hvostuksergey@gmail.com"
] |
hvostuksergey@gmail.com
|
93158dc3f214f004ce7c478c5d6f388543bb8e85
|
8d6a347b3ee7d5f3abf2144de3ab788e4dfa3162
|
/src/test/java/com/stevesun/_171Test.java
|
f069c18fcbd70a6d944d1850f742c97e15ee84fe
|
[
"Apache-2.0"
] |
permissive
|
Sam-Si/Leetcode
|
3f58b88325ad6a02da0d84c885f08bee8fce8b0d
|
5e7403360cd87c6f32bac05863e4679702f3417c
|
refs/heads/master
| 2021-01-22T03:31:26.751878
| 2017-05-24T15:11:50
| 2017-05-24T15:11:50
| 92,386,586
| 2
| 1
| null | 2017-05-25T09:18:22
| 2017-05-25T09:18:21
| null |
UTF-8
|
Java
| false
| false
| 470
|
java
|
package com.stevesun;
import com.stevesun.solutions._171;
import com.stevesun.solutions._48;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* Created by stevesun on 5/13/17.
*/
public class _171Test {
private static _171 test;
@BeforeClass
public static void setup(){
test = new _171();
}
@Test
public void test1(){
assertEquals(28, test.titleToNumber("AB"));
}
}
|
[
"stevesun@coupang.com"
] |
stevesun@coupang.com
|
0e33dbf3963a2dcf7f10fb4f2b64fcddc4e89d8b
|
c78669aa10172615183faa6639627de285bec87c
|
/WicketWebFramework/src/main/java/com/delesio/markup/html/form/LocaleDropDownChoice.java
|
aba91991f6568c7e3fdfe2637a68cb0cfdafdf52
|
[] |
no_license
|
tdelesio/Leagues
|
8ddd7728ca2540637990ef2051b191efba303ff5
|
1c2a729afa54e332a4fe447255d1345f4372cc4e
|
refs/heads/master
| 2022-12-20T16:45:27.126877
| 2014-09-06T16:25:49
| 2014-09-06T16:25:49
| 5,331,151
| 0
| 0
| null | 2022-12-15T23:58:12
| 2012-08-07T17:40:50
|
Java
|
UTF-8
|
Java
| false
| false
| 1,204
|
java
|
package com.delesio.markup.html.form;
import java.util.List;
import java.util.Locale;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.model.IModel;
public final class LocaleDropDownChoice extends DropDownChoice
{
public LocaleDropDownChoice(String id, List<Locale> locales, IModel model, Locale locale) {
super(id, locales, new LocaleChoiceRenderer(locale));
// set the model that gets the current locale, and that is used for
// updating the current locale to property 'locale' of FormInput
setModel(model);
}
/**
* @see wicket.markup.html.form.DropDownChoice#wantOnSelectionChangedNotifications()
*/
protected boolean wantOnSelectionChangedNotifications() {
// we want roundtrips when a the user selects another item
return true;
}
/**
* @see wicket.markup.html.form.DropDownChoice#onSelectionChanged(java.lang.Object)
*/
public void onSelectionChanged(Object newSelection) {
// note that we don't have to do anything here, as our property
// model allready calls FormInput.setLocale when the model is
// updated
// setLocale((Locale)newSelection); // so we don't need to do this
}
}
|
[
"tdelesio@gmail.com"
] |
tdelesio@gmail.com
|
9aa33b1546a0dd7e7fd354abad331d8d1a0e9121
|
330fb47f20c33657623db1c1477fe04d70280886
|
/dexlib2/org/jf/dexlib2/dexbacked/instruction/DexBackedInstruction20bc.java
|
cb7139236ef8a7c1e2d0d140e8c4b587026c322f
|
[] |
no_license
|
350030173/ApkSignatureKiller
|
c45bc28e8e21f76967b3732d0dca7ebc884d5c05
|
9728831191eaf99ebe50ee6573cd42d1d60b4a4e
|
refs/heads/master
| 2021-07-23T22:17:30.731821
| 2017-11-01T10:35:39
| 2017-11-01T10:35:39
| 109,199,435
| 3
| 0
| null | 2017-11-02T00:39:10
| 2017-11-02T00:39:10
| null |
UTF-8
|
Java
| false
| false
| 3,409
|
java
|
/*
* Copyright 2013, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jf.dexlib2.dexbacked.instruction;
import android.support.annotation.NonNull;
import org.jf.dexlib2.Opcode;
import org.jf.dexlib2.ReferenceType;
import org.jf.dexlib2.dexbacked.DexBackedDexFile;
import org.jf.dexlib2.dexbacked.reference.DexBackedReference;
import org.jf.dexlib2.iface.UpdateReference;
import org.jf.dexlib2.iface.instruction.formats.Instruction20bc;
import org.jf.dexlib2.iface.reference.Reference;
import org.jf.dexlib2.writer.builder.DexBuilder;
public class DexBackedInstruction20bc extends DexBackedInstruction implements Instruction20bc, UpdateReference {
public DexBackedInstruction20bc(@NonNull DexBackedDexFile dexFile,
@NonNull Opcode opcode,
int instructionStart) {
super(dexFile, opcode, instructionStart);
}
@Override
public int getVerificationError() {
return dexFile.readUbyte(instructionStart + 1) & 0x3f;
}
@NonNull
@Override
public Reference getReference() {
if (reference != null)
return reference;
int referenceType = getReferenceType();
return DexBackedReference.makeReference(dexFile, referenceType, dexFile.readUshort(instructionStart + 2));
}
@Override
public int getReferenceType() {
int referenceType = this.referenceType;
if (referenceType != -1)
return referenceType;
referenceType = (dexFile.readUbyte(instructionStart + 1) >>> 6) + 1;
ReferenceType.validateReferenceType(referenceType);
return this.referenceType = referenceType;
}
private Reference reference = null;
private int referenceType = -1;
@Override
public void updateReference(DexBuilder dexBuilder) {
this.reference = dexBuilder.internReference(getReference());
}
}
|
[
"921558445@qq.com"
] |
921558445@qq.com
|
a53b6f36c0bdc7c29734cd1b777d34bd8dbb3baf
|
a747eebf3c1a627649295770455b47c9b2bb083b
|
/version_b/src/main/java/com/shqtn/b/SerialSrcActivity.java
|
5a9d00899885e6e7920b4e56e7c43c84a83cddbd
|
[] |
no_license
|
Claude91/Wms-base
|
5b6ac5649ada7a99bbe8439a844628bb536f2340
|
8355ed0bd7ab7b115a73c6082232be69d7e10787
|
refs/heads/master
| 2020-03-28T07:37:10.297363
| 2018-01-29T10:03:45
| 2018-01-29T10:03:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,776
|
java
|
package com.shqtn.b;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TextView;
import com.shqtn.base.CommonAdapter;
import com.shqtn.base.widget.TitleView;
import java.util.ArrayList;
public class SerialSrcActivity extends BaseBActivity {
public static final String BUNDLE_SERIAL = "serial";
public static final String BUNDLE_ADD_SERIAL = "addSerial";
public static final String RESULT_SELECT_SERIAL = "selectSerial";
private ListView lvSerialSrc;
private CommonAdapter<String> serialAdapter;
private ArrayList<String> selectSerials;
private ArrayList<String> srcSerials;
public static ArrayList<String> getAddSerials(Intent data) {
if (data == null) {
return null;
}
return data.getStringArrayListExtra(RESULT_SELECT_SERIAL);
}
public static void putSerials(@NonNull ArrayList<String> serials, @Nullable ArrayList<String> addSerials, Bundle bundle) {
bundle.putStringArrayList(BUNDLE_SERIAL, serials);
bundle.putStringArrayList(BUNDLE_ADD_SERIAL, addSerials);
}
@Override
protected void setRootView() {
setContentView(R.layout.activity_serial_src);
}
@Override
public void initData() {
super.initData();
Bundle bundle = getBundle();
srcSerials = bundle.getStringArrayList(BUNDLE_SERIAL);
selectSerials = bundle.getStringArrayList(BUNDLE_ADD_SERIAL);
}
@Override
public void bindView() {
lvSerialSrc = (ListView) findViewById(R.id.activity_serial_src_lv);
}
@Override
public void initWidget() {
super.initWidget();
titleView.setRightText("完成");
titleView.setOnRightTextClickListener(new TitleView.OnRightTextClickListener() {
@Override
public void onClickTitleRightText() {
Intent intent = new Intent();
intent.putStringArrayListExtra(RESULT_SELECT_SERIAL, selectSerials);
setResult(Activity.RESULT_OK, intent);
finish();
}
});
serialAdapter = new CommonAdapter<String>(R.layout.item_add_serial) {
@Override
public void setItemContent(ViewHolder holder, String s, int position) {
TextView tvSerial = holder.getViewById(R.id.item_add_serial_tv);
boolean isSelect = selectSerials != null && selectSerials.contains(s);
setSelect(tvSerial, isSelect);
tvSerial.setText(s);
}
private void setSelect(View view, boolean isSelect) {
if (view.isSelected() != isSelect) {
view.setSelected(isSelect);
}
}
};
lvSerialSrc.setAdapter(serialAdapter);
serialAdapter.update(srcSerials);
lvSerialSrc.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (selectSerials == null) {
selectSerials = new ArrayList<String>(srcSerials.size());
}
String serial = srcSerials.get(position);
if (selectSerials.contains(serial)) {
//包含则删除
selectSerials.remove(serial);
} else {
selectSerials.add(serial);
}
serialAdapter.notifyDataSetChanged();
}
});
}
}
|
[
"strive_bug@yeah.net"
] |
strive_bug@yeah.net
|
1dcedbf6100e4eafc18c0107391369c1423fe828
|
2559f1a755814c2024d8450633c525144dc9854f
|
/src/main/java/net/imagej/autoscale/DefaultAutoscaleService.java
|
10d08a1de8b91a5cb49499dc31bda88d7f4d4810
|
[
"BSD-2-Clause"
] |
permissive
|
imagej/imagej-common
|
032f6ddb51a97bb682d994a4e925e0d8514fca72
|
48a1266009f285e6e82f1efdc0d0c8114cab8e7a
|
refs/heads/main
| 2023-08-27T04:07:18.488199
| 2023-06-28T15:38:00
| 2023-06-28T15:38:00
| 18,889,409
| 9
| 20
|
BSD-2-Clause
| 2023-03-02T17:23:52
| 2014-04-17T18:42:52
|
Java
|
UTF-8
|
Java
| false
| false
| 4,551
|
java
|
/*
* #%L
* ImageJ2 software for multidimensional image processing and analysis.
* %%
* Copyright (C) 2009 - 2023 ImageJ2 developers.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* #L%
*/
package net.imagej.autoscale;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.imglib2.IterableInterval;
import net.imglib2.RandomAccessibleInterval;
import net.imglib2.type.numeric.RealType;
import net.imglib2.view.Views;
import org.scijava.plugin.AbstractSingletonService;
import org.scijava.plugin.Plugin;
import org.scijava.service.Service;
/**
* Default service for working with autoscale methods.
*
* @author Barry DeZonia
* @author Curtis Rueden
*/
@SuppressWarnings("rawtypes")
@Plugin(type = Service.class)
public class DefaultAutoscaleService extends
AbstractSingletonService<AutoscaleMethod> implements AutoscaleService
{
// -- instance variables --
private HashMap<String, AutoscaleMethod> methods;
private ArrayList<String> methodNames;
// -- AutoscaleService methods --
@Override
public Map<String, AutoscaleMethod> getAutoscaleMethods() {
return Collections.unmodifiableMap(methods());
}
@Override
public List<String> getAutoscaleMethodNames() {
return Collections.unmodifiableList(methodNames());
}
@Override
public AutoscaleMethod getAutoscaleMethod(final String name) {
return methods().get(name);
}
@Override
public AutoscaleMethod getDefaultAutoscaleMethod() {
return getAutoscaleMethod("Default");
}
@SuppressWarnings("unchecked")
@Override
public DataRange getDefaultIntervalRange(
final IterableInterval<? extends RealType<?>> interval)
{
return getDefaultAutoscaleMethod().getRange(interval);
}
@Override
public DataRange getDefaultRandomAccessRange(
final RandomAccessibleInterval<? extends RealType<?>> interval)
{
final IterableInterval<? extends RealType<?>> newInterval =
Views.iterable(interval);
return getDefaultIntervalRange(newInterval);
}
// -- PTService methods --
@Override
public Class<AutoscaleMethod> getPluginType() {
return AutoscaleMethod.class;
}
// -- Helper methods - lazy initialization --
/** Gets {@link #methods}, initializing if needed. */
private Map<? extends String, ? extends AutoscaleMethod> methods() {
if (methods == null) initMethods();
return methods;
}
/** Gets {@link #methodNames}, initializing if needed. */
private List<? extends String> methodNames() {
if (methodNames == null) initMethodNames();
return methodNames;
}
/** Initializes {@link #methods}. */
private synchronized void initMethods() {
if (methods != null) return; // already initialized
final HashMap<String, AutoscaleMethod> map =
new HashMap<>();
for (final AutoscaleMethod method : getInstances()) {
final String name = method.getInfo().getName();
map.put(name, method);
}
methods = map;
}
/** Initializes {@link #methodNames}. */
private synchronized void initMethodNames() {
if (methodNames != null) return; // already initialized
final ArrayList<String> list = new ArrayList<>();
for (final AutoscaleMethod method : getInstances()) {
final String name = method.getInfo().getName();
list.add(name);
}
methodNames = list;
}
}
|
[
"ctrueden@wisc.edu"
] |
ctrueden@wisc.edu
|
ed645bf2db98b9a99d2b1ecd4418fe0bdfe59ece
|
51b226a55c661dacdc259a4fef331bcb5fdc7278
|
/src/com/java/bestlockexample/App.java
|
2a3dfb0aaff539466858904be84ae6789445b668
|
[] |
no_license
|
sameershrestha333/mutithreading
|
d3c2df5a196b0d6fe6bf6d537a1e415197113aaf
|
429fa0b4ff045f98efd89b0b3b8e856e8d03f96f
|
refs/heads/master
| 2021-01-21T05:16:42.638631
| 2017-02-25T21:44:42
| 2017-02-25T21:44:42
| 83,164,940
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 729
|
java
|
package com.java.bestlockexample;
public class App {
public static void main(String[] args) throws InterruptedException {
final Runner runner = new Runner();
Thread t1 = new Thread(new Runnable() {
@Override
public void run() {
try {
runner.firstMethod();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
Thread t2 = new Thread(new Runnable() {
@Override
public void run() {
try {
runner.scecondMethod();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
t1.start();
t2.start();
t1.join();
t2.join();
runner.finished();
}
}
|
[
"sameershrestha333@gmail.com"
] |
sameershrestha333@gmail.com
|
66df376ac3931cd3d65d024e7214bcb7ef0e7b37
|
f9dd2959a65b9bd8b59982e5183d27dd0331ff1a
|
/app/src/main/java/com/example/administrator/sharenebulaproject/widget/MyDownLoadListener.java
|
27a2c47a70753d4a5ff3953f5a208c7755b338e0
|
[] |
no_license
|
zengli199447/shareProject
|
8b7b5649e24e8f3474affa50796d09785482c044
|
534951938fe0c78b027e332757693ee86b1f82be
|
refs/heads/master
| 2020-04-10T04:27:10.036800
| 2019-04-15T03:09:03
| 2019-04-15T03:09:03
| 160,798,613
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 721
|
java
|
package com.example.administrator.sharenebulaproject.widget;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import com.tencent.smtt.sdk.DownloadListener;
/**
* 作者:真理 Created by Administrator on 2018/12/21.
* 邮箱:229017464@qq.com
* remark:
*/
public class MyDownLoadListener implements DownloadListener {
Context context;
public MyDownLoadListener(Context context) {
this.context = context;
}
@Override
public void onDownloadStart(String s, String s1, String s2, String s3, long l) {
Uri uri = Uri.parse(s);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
context.startActivity(intent);
}
}
|
[
"zengli@126.com"
] |
zengli@126.com
|
d4b7b7c03362de428e1cbc54b447bda042cbb194
|
70e207ac63da49eddd761a6e3a901e693f4ec480
|
/net.certware.state.gui.diagram/src/stateAnalysis/diagram/edit/commands/EstimatorDistilledMeasurementsCreateCommand.java
|
f122c9e371350dbf76b123d1996096a0c4b54ed8
|
[
"Apache-2.0"
] |
permissive
|
arindam7development/CertWare
|
43be650539963b1efef4ce4cad164f23185d094b
|
cbbfdb6012229444d3c0d7e64c08ac2a15081518
|
refs/heads/master
| 2020-05-29T11:38:08.794116
| 2016-03-29T13:56:37
| 2016-03-29T13:56:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,437
|
java
|
/*
*
*/
package stateAnalysis.diagram.edit.commands;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
/**
* @generated
*/
public class EstimatorDistilledMeasurementsCreateCommand extends
EditElementCommand {
/**
* @generated
*/
private final EObject source;
/**
* @generated
*/
private final EObject target;
/**
* @generated
*/
public EstimatorDistilledMeasurementsCreateCommand(
CreateRelationshipRequest request, EObject source, EObject target) {
super(request.getLabel(), null, request);
this.source = source;
this.target = target;
}
/**
* @generated
*/
public boolean canExecute() {
if (source == null && target == null) {
return false;
}
if (source != null
&& false == source instanceof stateAnalysis.Estimator) {
return false;
}
if (target != null
&& false == target instanceof stateAnalysis.Estimator) {
return false;
}
if (getSource() == null) {
return true; // link creation is in progress; source is not defined yet
}
// target may be null here but it's possible to check constraint
return stateAnalysis.diagram.edit.policies.StateAnalysisBaseItemSemanticEditPolicy
.getLinkConstraints()
.canCreateEstimatorDistilledMeasurements_4002(getSource(),
getTarget());
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
IAdaptable info) throws ExecutionException {
if (!canExecute()) {
throw new ExecutionException(
"Invalid arguments in create link command"); //$NON-NLS-1$
}
if (getSource() != null && getTarget() != null) {
getSource().getDistilledMeasurements().add(getTarget());
}
return CommandResult.newOKCommandResult();
}
/**
* @generated
*/
protected void setElementToEdit(EObject element) {
throw new UnsupportedOperationException();
}
/**
* @generated
*/
protected stateAnalysis.Estimator getSource() {
return (stateAnalysis.Estimator) source;
}
/**
* @generated
*/
protected stateAnalysis.Estimator getTarget() {
return (stateAnalysis.Estimator) target;
}
}
|
[
"mrb@certware.net"
] |
mrb@certware.net
|
5bfa10806e5045634887979bb85a6e515ed4c9db
|
393693ac791b9377ed30d5e4276febb1d82c7de8
|
/shell offline/allfiles/tempo/1405039/Networking/src/utility/ConnectionSetup.java
|
b614c1a2b23060307409fda3d2e09797e84024f0
|
[] |
no_license
|
Mritunjoy71/CSE_314-OS-Sessional
|
dc2672126acfb3dbef4424769af8c48fd1554dc6
|
84648c164124ddc65c43e33ee6b3e9113e0ea513
|
refs/heads/master
| 2023-02-19T11:12:16.080216
| 2021-01-21T22:17:40
| 2021-01-21T22:17:40
| 331,764,590
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,521
|
java
|
package utility;
import java.io.*;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;
public class ConnectionSetup {
public Socket sc;
public ObjectInputStream ois;
public ObjectOutputStream oos;
public String username;
public ConnectionSetup(String host, int port, String user){
try {
username = user;
sc=new Socket(host,port);
oos=new ObjectOutputStream(sc.getOutputStream());
ois=new ObjectInputStream(sc.getInputStream());
}
catch(Exception e)
{
System.out.println("Error in first ConnectionSetup.");
}
}
public ConnectionSetup(Socket socket){
try {
sc=socket;
oos=new ObjectOutputStream(sc.getOutputStream());
ois=new ObjectInputStream(sc.getInputStream());
}
catch(Exception e)
{
System.out.println("Error in second ConnectionSetup.");
}
}
public void write(Object o)
{
try {
oos.writeObject(o);
oos.flush();
} catch (IOException ex) {
System.out.println("Error in ConnectionSetup write function.");
}
}
public Object read()
{
Object o = null;
try {
o = ois.readObject();
} catch (Exception ex) {
//System.out.println("Error in connection setup read.");
}
return o;
}
}
|
[
"you@example.com"
] |
you@example.com
|
7ece4a61567de21cc2d7ea6a54779f4ee631cb44
|
9461f5f63a3cbcda27267573e0135741b8c1ed87
|
/struture-repetitive/EjerciciosCiclicos.java
|
19bc637c9a3b1f4ee02b04049e6b06292089d5b6
|
[
"Apache-2.0"
] |
permissive
|
davidmp/FP-2021-G2
|
b7ab6de29cc3db124fad1c1e30ff6051d3bfda86
|
7ceb11b955aab6b911fa6ce28e6421a7f6d9014b
|
refs/heads/main
| 2023-06-17T13:02:18.595780
| 2021-07-12T15:08:57
| 2021-07-12T15:08:57
| 357,930,884
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,103
|
java
|
import java.util.Scanner;
public class EjerciciosCiclicos {
static Scanner teclado=new Scanner(System.in);
public static void identificarColorFoco() {
//definir Variables
int nFocos, fVerde=0, fBlanco=0, fRojo=0;
//Datos de entrada
System.out.println("Ingrese N cantidad de Focos:");
nFocos=teclado.nextInt();
//Proceso
for (int foco=1; foco<=nFocos; foco++) {
System.out.print("Ingrese el color (V=Verde, B=Blanco y R=Rojo)"+
"del foco # "+foco+":");
String color=teclado.next();
if(color.toUpperCase().equals("V")){ fVerde++; }
if(color.toUpperCase().equals("B")){ fBlanco=fBlanco+1; }
if(color.toUpperCase().equals("R")){ fRojo+=1; }
System.out.println("");
}
//Datos de salida
System.out.println("Del total de focos:\n"+fVerde+" son Verde(s)\n"+
fBlanco+" son Blanco(s)\n"+fRojo+" son Rojo(s)\nEn total son:"+nFocos);
}
public static void main(String[] args) {
identificarColorFoco();
}
}
|
[
"mamanipari@gmail.com"
] |
mamanipari@gmail.com
|
65abe5873b4b3eca013a2dedcbc9f75ce38d24f5
|
8b9906f0ffe956ef5d94ec0bcea34c1150a9e503
|
/drools-wb-screens/drools-wb-scenario-simulation-editor/drools-wb-scenario-simulation-editor-client/src/test/java/org/drools/workbench/screens/scenariosimulation/client/factories/AbstractFactoriesTest.java
|
b7ecb76f28ece14ad5ed25f60a134bc138be475a
|
[
"Apache-2.0"
] |
permissive
|
kbongjin/drools-wb
|
e8ece84964e519ef1ed133e979f5b4143b8026ed
|
431e8408d676e193828001845296a5f46cbe3917
|
refs/heads/master
| 2020-04-09T18:17:00.086161
| 2018-12-04T15:56:10
| 2018-12-04T15:56:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,430
|
java
|
/*
* Copyright 2018 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.drools.workbench.screens.scenariosimulation.client.factories;
import com.google.gwt.dom.client.Style;
import com.google.gwt.user.client.Element;
import org.drools.workbench.screens.scenariosimulation.client.editor.AbstractScenarioSimulationEditorTest;
import org.drools.workbench.screens.scenariosimulation.client.models.ScenarioGridModel;
import org.drools.workbench.screens.scenariosimulation.client.widgets.ScenarioGrid;
import org.drools.workbench.screens.scenariosimulation.client.widgets.ScenarioGridLayer;
import org.gwtbootstrap3.client.ui.TextArea;
import org.junit.Before;
import org.mockito.Mock;
import org.uberfire.ext.wires.core.grids.client.widget.context.GridBodyCellRenderContext;
import static org.mockito.Mockito.when;
public abstract class AbstractFactoriesTest extends AbstractScenarioSimulationEditorTest {
@Mock
protected TextArea textAreaMock;
@Mock
protected GridBodyCellRenderContext contextMock;
@Mock
protected Element elementMock;
@Mock
protected Style styleMock;
@Mock
protected ScenarioGridLayer scenarioGridLayerMock;
@Mock
protected ScenarioGrid scenarioGridMock;
@Mock
protected ScenarioGridModel scenarioGridModelMock;
protected final static int ROW_INDEX = 1;
protected final static int COLUMN_INDEX = 2;
@Before
public void setup() {
super.setup();
when(elementMock.getStyle()).thenReturn(styleMock);
when(textAreaMock.getElement()).thenReturn(elementMock);
when(contextMock.getRowIndex()).thenReturn(ROW_INDEX);
when(contextMock.getColumnIndex()).thenReturn(COLUMN_INDEX);
when(scenarioGridMock.getModel()).thenReturn(scenarioGridModelMock);
when(scenarioGridLayerMock.getScenarioGrid()).thenReturn(scenarioGridMock);
}
}
|
[
"manstis@users.noreply.github.com"
] |
manstis@users.noreply.github.com
|
2dd80ebcf96cc397cc431f2a54a9fc9a64ed95bd
|
9f59bcccdfa8f91d38904a0625f2ae2933280d3a
|
/server-core/src/main/java/io/onedev/server/web/behavior/PatternSetAssistBehavior.java
|
0fc2e797d77f5da09732b9062eb47f7f2814b2ee
|
[
"MIT"
] |
permissive
|
zhuqiansheng/onedev
|
3d4c87f04bce061e92d420bf8076430d36d1aeb3
|
7d8f94e5e8624af2628910b13d66ff2cd94e5b14
|
refs/heads/master
| 2020-06-02T14:03:06.768891
| 2019-06-10T00:46:03
| 2019-06-10T00:46:03
| 191,178,873
| 1
| 0
| null | 2019-06-10T14:00:39
| 2019-06-10T14:00:39
| null |
UTF-8
|
Java
| false
| false
| 3,950
|
java
|
package io.onedev.server.web.behavior;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import org.antlr.v4.runtime.Token;
import org.apache.commons.lang3.StringUtils;
import com.google.common.base.Optional;
import io.onedev.commons.codeassist.FenceAware;
import io.onedev.commons.codeassist.InputSuggestion;
import io.onedev.commons.codeassist.grammar.LexerRuleRefElementSpec;
import io.onedev.commons.codeassist.parser.ParseExpect;
import io.onedev.commons.codeassist.parser.TerminalExpect;
import io.onedev.commons.utils.LinearRange;
import io.onedev.server.util.patternset.PatternSet;
import io.onedev.server.util.patternset.PatternSetLexer;
import io.onedev.server.util.patternset.PatternSetParser;
import io.onedev.server.web.behavior.inputassist.ANTLRAssistBehavior;
@SuppressWarnings("serial")
public abstract class PatternSetAssistBehavior extends ANTLRAssistBehavior {
public PatternSetAssistBehavior() {
super(PatternSetParser.class, "patterns", false);
}
@Override
protected List<InputSuggestion> suggest(TerminalExpect terminalExpect) {
if (terminalExpect.getElementSpec() instanceof LexerRuleRefElementSpec) {
LexerRuleRefElementSpec spec = (LexerRuleRefElementSpec) terminalExpect.getElementSpec();
Set<String> matches = new HashSet<>();
for (Token token: terminalExpect.getRoot().getState().getMatchedTokens()) {
if (token.getType() == PatternSetLexer.Quoted)
matches.add(PatternSet.unescape(token.getText()));
else if (token.getType() == PatternSetLexer.NQuoted)
matches.add(token.getText());
}
String unmatched = terminalExpect.getUnmatchedText();
if (spec.getRuleName().equals("NQuoted")) {
List<InputSuggestion> suggestions = suggest(unmatched);
int index = "*".indexOf(unmatched);
if (index != -1)
suggestions.add(new InputSuggestion("*", "all", new LinearRange(index, unmatched.length())));
return suggestions
.stream()
.filter(it->!matches.contains(it.getContent()))
.map(it->{
if (StringUtils.containsAny(it.getContent(), " \"") || it.getContent().startsWith("-")) {
InputSuggestion suggestion = it.escape(PatternSet.ESCAPE_CHARS);
suggestion = new InputSuggestion("\"" + suggestion.getContent() + "\"",
suggestion.getCaret()!=-1? suggestion.getCaret()+1: -1,
suggestion.getDescription(),
new LinearRange(suggestion.getMatch().getFrom()+1, suggestion.getMatch().getTo()+1));
return suggestion;
} else {
return it;
}
})
.collect(Collectors.toList());
} else if (spec.getRuleName().equals("Quoted") && unmatched.startsWith("\"")) {
return new FenceAware(codeAssist.getGrammar(), "\"", "\"") {
@Override
protected List<InputSuggestion> match(String unfencedMatchWith) {
List<InputSuggestion> suggestions = PatternSetAssistBehavior.this.suggest(unfencedMatchWith)
.stream()
.filter(it->!matches.contains(it.getContent()))
.collect(Collectors.toList());
if (unfencedMatchWith.length() != 0
&& !matches.contains(unfencedMatchWith)
&& suggestions.isEmpty()) {
return null;
} else {
return suggestions.stream().map(it->it.escape(PatternSet.ESCAPE_CHARS)).collect(Collectors.toList());
}
}
@Override
protected String getFencingDescription() {
return null;
}
}.suggest(terminalExpect);
}
}
return null;
}
@Override
protected Optional<String> describe(ParseExpect parseExpect, String suggestedLiteral) {
String description;
switch (suggestedLiteral) {
case "-":
description = "exclude";
break;
case " ":
description = "space";
break;
case "\"":
return null;
default:
description = null;
}
return Optional.fromNullable(description);
}
protected abstract List<InputSuggestion> suggest(String matchWith);
}
|
[
"robin@onedev.io"
] |
robin@onedev.io
|
1752a3cffcd47471b44eca5866c86abec48e1277
|
471a1d9598d792c18392ca1485bbb3b29d1165c5
|
/jadx-MFP/src/main/java/com/google/android/gms/fitness/data/zzt.java
|
3a55a654d308554c069af8a3b29fb88f6f3d3201
|
[] |
no_license
|
reed07/MyPreferencePal
|
84db3a93c114868dd3691217cc175a8675e5544f
|
365b42fcc5670844187ae61b8cbc02c542aa348e
|
refs/heads/master
| 2020-03-10T23:10:43.112303
| 2019-07-08T00:39:32
| 2019-07-08T00:39:32
| 129,635,379
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 214
|
java
|
package com.google.android.gms.fitness.data;
import android.os.IInterface;
import android.os.RemoteException;
public interface zzt extends IInterface {
void zzc(DataPoint dataPoint) throws RemoteException;
}
|
[
"anon@ymous.email"
] |
anon@ymous.email
|
793ef6bc248416e191e91acb27e78606b77acdd4
|
e457376950380dd6e09e58fa7bee3d09e2a0f333
|
/python-impl/src/main/java/com/jetbrains/python/impl/inspections/PyChainedComparisonsInspection.java
|
cebea01d47dd232bc59d4aae61c38976e2691956
|
[
"Apache-2.0"
] |
permissive
|
consulo/consulo-python
|
b816b7b9a4b346bee5d431ef6c39fdffe40adf40
|
e191cd28f043c1211eb98af42d3c0a40454b2d98
|
refs/heads/master
| 2023-08-09T02:27:03.585942
| 2023-07-09T08:33:47
| 2023-07-09T08:33:47
| 12,317,018
| 0
| 0
|
Apache-2.0
| 2020-06-05T17:16:50
| 2013-08-23T07:16:43
|
Java
|
UTF-8
|
Java
| false
| false
| 7,881
|
java
|
/*
* Copyright 2000-2013 JetBrains s.r.o.
*
* 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.jetbrains.python.impl.inspections;
import com.jetbrains.python.impl.PyBundle;
import com.jetbrains.python.PyTokenTypes;
import com.jetbrains.python.impl.inspections.quickfix.ChainedComparisonsQuickFix;
import com.jetbrains.python.psi.PyBinaryExpression;
import com.jetbrains.python.psi.PyElementType;
import com.jetbrains.python.psi.PyExpression;
import consulo.annotation.component.ExtensionImpl;
import consulo.language.editor.inspection.LocalInspectionToolSession;
import consulo.language.editor.inspection.ProblemsHolder;
import consulo.language.psi.PsiElementVisitor;
import org.jetbrains.annotations.Nls;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
/**
* User: catherine
* <p>
* Inspection to detect chained comparisons which can be simplified
* For instance, a < b and b < c --> a < b < c
*/
@ExtensionImpl
public class PyChainedComparisonsInspection extends PyInspection {
@Nls
@Nonnull
@Override
public String getDisplayName() {
return PyBundle.message("INSP.NAME.chained.comparisons");
}
@Nonnull
@Override
public PsiElementVisitor buildVisitor(@Nonnull ProblemsHolder holder,
boolean isOnTheFly,
@Nonnull LocalInspectionToolSession session,
Object state) {
return new Visitor(holder, session);
}
private static class Visitor extends PyInspectionVisitor {
boolean myIsLeft;
boolean myIsRight;
PyElementType myOperator;
boolean getInnerRight;
public Visitor(@Nullable ProblemsHolder holder, @Nonnull LocalInspectionToolSession session) {
super(holder, session);
}
@Override
public void visitPyBinaryExpression(final PyBinaryExpression node) {
myIsLeft = false;
myIsRight = false;
myOperator = null;
getInnerRight = false;
PyExpression leftExpression = node.getLeftExpression();
PyExpression rightExpression = node.getRightExpression();
if (leftExpression instanceof PyBinaryExpression &&
rightExpression instanceof PyBinaryExpression) {
if (node.getOperator() == PyTokenTypes.AND_KEYWORD) {
if (isRightSimplified((PyBinaryExpression)leftExpression, (PyBinaryExpression)rightExpression) ||
isLeftSimplified((PyBinaryExpression)leftExpression, (PyBinaryExpression)rightExpression))
registerProblem(node, "Simplify chained comparison", new ChainedComparisonsQuickFix(myIsLeft, myIsRight,
getInnerRight));
}
}
}
private boolean isRightSimplified(@Nonnull final PyBinaryExpression leftExpression,
@Nonnull final PyBinaryExpression rightExpression) {
final PyExpression leftRight = leftExpression.getRightExpression();
if (leftRight instanceof PyBinaryExpression && PyTokenTypes.AND_KEYWORD == leftExpression.getOperator()) {
if (isRightSimplified((PyBinaryExpression)leftRight, rightExpression)) {
getInnerRight = true;
return true;
}
}
if (leftRight instanceof PyBinaryExpression &&
PyTokenTypes.RELATIONAL_OPERATIONS.contains(((PyBinaryExpression)leftRight).getOperator())) {
if (isRightSimplified((PyBinaryExpression)leftRight, rightExpression))
return true;
}
myOperator = leftExpression.getOperator();
if (PyTokenTypes.RELATIONAL_OPERATIONS.contains(myOperator)) {
if (leftRight != null) {
if (leftRight.getText().equals(getLeftExpression(rightExpression, true).getText())) {
myIsLeft = false;
myIsRight = true;
return true;
}
final PyExpression right = getSmallestRight(rightExpression, true);
if (right != null && leftRight.getText().equals(right.getText())) {
myIsLeft = false;
myIsRight = false;
return true;
}
}
}
return false;
}
private static boolean isOpposite(final PyElementType op1, final PyElementType op2) {
if ((op1 == PyTokenTypes.GT || op1 == PyTokenTypes.GE) && (op2 == PyTokenTypes.LT || op2 == PyTokenTypes.LE))
return true;
if ((op2 == PyTokenTypes.GT || op2 == PyTokenTypes.GE) && (op1 == PyTokenTypes.LT || op1 == PyTokenTypes.LE))
return true;
return false;
}
private boolean isLeftSimplified(PyBinaryExpression leftExpression, PyBinaryExpression rightExpression) {
final PyExpression leftLeft = leftExpression.getLeftExpression();
final PyExpression leftRight = leftExpression.getRightExpression();
if (leftRight instanceof PyBinaryExpression
&& PyTokenTypes.AND_KEYWORD == leftExpression.getOperator()) {
if (isLeftSimplified((PyBinaryExpression)leftRight, rightExpression)) {
getInnerRight = true;
return true;
}
}
if (leftLeft instanceof PyBinaryExpression &&
PyTokenTypes.RELATIONAL_OPERATIONS.contains(((PyBinaryExpression)leftLeft).getOperator())) {
if (isLeftSimplified((PyBinaryExpression)leftLeft, rightExpression))
return true;
}
myOperator = leftExpression.getOperator();
if (PyTokenTypes.RELATIONAL_OPERATIONS.contains(myOperator)) {
if (leftLeft != null) {
if (leftLeft.getText().equals(getLeftExpression(rightExpression, false).getText())) {
myIsLeft = true;
myIsRight = true;
return true;
}
final PyExpression right = getSmallestRight(rightExpression, false);
if (right != null && leftLeft.getText().equals(right.getText())) {
myIsLeft = true;
myIsRight = false;
return true;
}
}
}
return false;
}
private PyExpression getLeftExpression(PyBinaryExpression expression, boolean isRight) {
PyExpression result = expression;
while (result instanceof PyBinaryExpression && (
PyTokenTypes.RELATIONAL_OPERATIONS.contains(((PyBinaryExpression)result).getOperator())
|| PyTokenTypes.EQUALITY_OPERATIONS.contains(((PyBinaryExpression)result).getOperator()))) {
final boolean opposite = isOpposite(((PyBinaryExpression)result).getOperator(), myOperator);
if ((isRight && opposite) || (!isRight && !opposite))
break;
result = ((PyBinaryExpression)result).getLeftExpression();
}
return result;
}
@Nullable
private PyExpression getSmallestRight(PyBinaryExpression expression, boolean isRight) {
PyExpression result = expression;
while (result instanceof PyBinaryExpression && (
PyTokenTypes.RELATIONAL_OPERATIONS.contains(((PyBinaryExpression)result).getOperator())
|| PyTokenTypes.EQUALITY_OPERATIONS.contains(((PyBinaryExpression)result).getOperator()))) {
final boolean opposite = isOpposite(((PyBinaryExpression)result).getOperator(), myOperator);
if ((isRight && !opposite) || (!isRight && opposite))
break;
result = ((PyBinaryExpression)result).getRightExpression();
}
return result;
}
}
}
|
[
"vistall.valeriy@gmail.com"
] |
vistall.valeriy@gmail.com
|
3b3debece5cffc83b369fe2b48e31fa459129e2d
|
d167c4fbb7759e84dd9f4efbcbe59637509afee0
|
/repast-common/src/main/java/com/aaa/repast/common/exception/job/TaskException.java
|
ca1716db3891d330448696a142e45f010746c16d
|
[] |
no_license
|
c90005471/repast
|
71abf698a9bba2b838255e7f2982012f8b786972
|
69fc2e8af2fbc64b7ec0809e90d813d6fdb72439
|
refs/heads/master
| 2022-10-31T09:21:55.090528
| 2019-12-18T02:35:27
| 2019-12-18T02:35:27
| 219,511,880
| 0
| 1
| null | 2022-10-12T20:33:37
| 2019-11-04T13:47:28
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 657
|
java
|
package com.aaa.repast.common.exception.job;
/**
* 计划策略异常
*
* @author teacherChen
*/
public class TaskException extends Exception
{
private static final long serialVersionUID = 1L;
private Code code;
public TaskException(String msg, Code code)
{
this(msg, code, null);
}
public TaskException(String msg, Code code, Exception nestedEx)
{
super(msg, nestedEx);
this.code = code;
}
public Code getCode()
{
return code;
}
public enum Code
{
TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE
}
}
|
[
"86521760@qq.com"
] |
86521760@qq.com
|
77fe938d2ce976b8b668ab06a4317536befb17e7
|
8c0ecbec868b5425b5f38beda441b3d6b66545ff
|
/basex-core/src/main/java/org/basex/core/locks/LockQueue.java
|
bc066d9ab4108dc48c7f5f50431ab098f3b59db4
|
[
"BSD-3-Clause"
] |
permissive
|
HGData/basex
|
76c5c8bb2d60ad6fbe260db51ffe75dd5e3dc3af
|
fa88ea21e8f0792e4cfd6a6d8f77e52df4eab167
|
refs/heads/master
| 2021-06-27T17:48:31.833330
| 2021-01-19T04:30:28
| 2021-01-19T04:30:28
| 209,368,032
| 0
| 0
|
NOASSERTION
| 2021-01-19T04:30:30
| 2019-09-18T17:36:06
|
Java
|
UTF-8
|
Java
| false
| false
| 867
|
java
|
package org.basex.core.locks;
/**
* Lock queue.
*
* @author BaseX Team 2005-19, BSD License
* @author Christian Gruen
*/
public abstract class LockQueue {
/** Maximum number of parallel jobs. */
protected final int parallel;
/** Number of currently running jobs. */
protected int jobs;
/**
* Constructor.
* @param parallel parallel jobs
*/
LockQueue(final int parallel) {
this.parallel = parallel;
}
/**
* Queues the job until it can be started.
* @param id job id
* @param read read flag
* @param write write flag
* @throws InterruptedException interrupted exception
*/
public abstract void acquire(Long id, boolean read, boolean write) throws InterruptedException;
/**
* Notifies other jobs that a job has been completed.
*/
public synchronized void release() {
notifyAll();
jobs--;
}
}
|
[
"christian.gruen@gmail.com"
] |
christian.gruen@gmail.com
|
9ed7d540a75d1a35230992b20667a2463ffaeeec
|
0e7f18f5c03553dac7edfb02945e4083a90cd854
|
/src/main/resources/jooqgen/.../src/main/java/com/br/sp/posgresdocker/model/jooq/pg_catalog/routines/Varchartypmodout.java
|
1f28f5422a2e176d8a192e9f7d1f56fe61de1bbc
|
[] |
no_license
|
brunomathidios/PostgresqlWithDocker
|
13604ecb5506b947a994cbb376407ab67ba7985f
|
6b421c5f487f381eb79007fa8ec53da32977bed1
|
refs/heads/master
| 2020-03-22T00:54:07.750044
| 2018-07-02T22:20:17
| 2018-07-02T22:20:17
| 139,271,591
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 2,221
|
java
|
/*
* This file is generated by jOOQ.
*/
package com.br.sp.posgresdocker.model.jooq.pg_catalog.routines;
import com.br.sp.posgresdocker.model.jooq.pg_catalog.PgCatalog;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.Parameter;
import org.jooq.impl.AbstractRoutine;
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.11.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Varchartypmodout extends AbstractRoutine<Object> {
private static final long serialVersionUID = -237416;
/**
* @deprecated Unknown data type. Please define an explicit {@link org.jooq.Binding} to specify how this type should be handled. Deprecation can be turned off using <deprecationOnUnknownTypes/> in your code generator configuration.
*/
@java.lang.Deprecated
public static final Parameter<Object> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"cstring\""), false, false);
/**
* The parameter <code>pg_catalog.varchartypmodout._1</code>.
*/
public static final Parameter<Integer> _1 = createParameter("_1", org.jooq.impl.SQLDataType.INTEGER, false, true);
/**
* Create a new routine call instance
*/
public Varchartypmodout() {
super("varchartypmodout", PgCatalog.PG_CATALOG, org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"cstring\""));
setReturnParameter(RETURN_VALUE);
addInParameter(_1);
}
/**
* Set the <code>_1</code> parameter IN value to the routine
*/
public void set__1(Integer value) {
setValue(_1, value);
}
/**
* Set the <code>_1</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__1(Field<Integer> field) {
setField(_1, field);
}
}
|
[
"brunomathidios@yahoo.com.br"
] |
brunomathidios@yahoo.com.br
|
4fc833ba279bc1193dbd7252ccfc3dbbc0f8bf45
|
d579b25070df5010c6f04c26928354cbc2f067ef
|
/benchmarks/generation/math_4/target/npefix/npefix-output/org/apache/commons/math3/genetics/Chromosome.java
|
4aad6f1080d5ab6f4e073223ed73b849970f2401
|
[
"Apache-2.0",
"BSD-3-Clause",
"Minpack"
] |
permissive
|
Spirals-Team/itzal-experiments
|
b9714f7a340ef9a2e4e748b5b723789592ea1cd5
|
87be2e8c554462ef38e7574dbdd5b28dadb52421
|
refs/heads/master
| 2022-04-07T22:45:06.765973
| 2020-03-03T06:18:03
| 2020-03-03T06:18:03
| 113,832,374
| 0
| 0
| null | 2020-03-03T06:18:05
| 2017-12-11T08:26:25
| null |
UTF-8
|
Java
| false
| false
| 5,546
|
java
|
package org.apache.commons.math3.genetics;
import fr.inria.spirals.npefix.resi.CallChecker;
import fr.inria.spirals.npefix.resi.context.MethodContext;
import fr.inria.spirals.npefix.resi.exception.AbnormalExecutionError;
import fr.inria.spirals.npefix.resi.exception.ForceReturn;
public abstract class Chromosome implements Comparable<Chromosome> , Fitness {
private static final double NO_FITNESS = Double.NEGATIVE_INFINITY;
private double fitness = Chromosome.NO_FITNESS;
public double getFitness() {
MethodContext _bcornu_methode_context3042 = new MethodContext(double.class, 42, 1403, 1859);
try {
CallChecker.varInit(this, "this", 42, 1403, 1859);
CallChecker.varInit(this.fitness, "fitness", 42, 1403, 1859);
CallChecker.varInit(NO_FITNESS, "org.apache.commons.math3.genetics.Chromosome.NO_FITNESS", 42, 1403, 1859);
if ((this.fitness) == (Chromosome.NO_FITNESS)) {
this.fitness = fitness();
CallChecker.varAssign(this.fitness, "this.fitness", 45, 1790, 1814);
}
return this.fitness;
} catch (ForceReturn _bcornu_return_t) {
return ((Double) (_bcornu_return_t.getDecision().getValue()));
} finally {
_bcornu_methode_context3042.methodEnd();
}
}
public int compareTo(final Chromosome another) {
MethodContext _bcornu_methode_context3043 = new MethodContext(int.class, 61, 1866, 2436);
try {
CallChecker.varInit(this, "this", 61, 1866, 2436);
CallChecker.varInit(another, "another", 61, 1866, 2436);
CallChecker.varInit(this.fitness, "fitness", 61, 1866, 2436);
CallChecker.varInit(NO_FITNESS, "org.apache.commons.math3.genetics.Chromosome.NO_FITNESS", 61, 1866, 2436);
if (CallChecker.beforeDeref(another, Chromosome.class, 62, 2409, 2415)) {
final Double npe_invocation_var783 = ((Double) (this.getFitness()));
if (CallChecker.beforeDeref(npe_invocation_var783, Double.class, 62, 2380, 2396)) {
return CallChecker.isCalled(npe_invocation_var783, Double.class, 62, 2380, 2396).compareTo(CallChecker.isCalled(another, Chromosome.class, 62, 2409, 2415).getFitness());
}else
throw new AbnormalExecutionError();
}else
throw new AbnormalExecutionError();
} catch (ForceReturn _bcornu_return_t) {
return ((Integer) (_bcornu_return_t.getDecision().getValue()));
} finally {
_bcornu_methode_context3043.methodEnd();
}
}
protected boolean isSame(final Chromosome another) {
MethodContext _bcornu_methode_context3044 = new MethodContext(boolean.class, 72, 2443, 2874);
try {
CallChecker.varInit(this, "this", 72, 2443, 2874);
CallChecker.varInit(another, "another", 72, 2443, 2874);
CallChecker.varInit(this.fitness, "fitness", 72, 2443, 2874);
CallChecker.varInit(NO_FITNESS, "org.apache.commons.math3.genetics.Chromosome.NO_FITNESS", 72, 2443, 2874);
return false;
} catch (ForceReturn _bcornu_return_t) {
return ((Boolean) (_bcornu_return_t.getDecision().getValue()));
} finally {
_bcornu_methode_context3044.methodEnd();
}
}
protected Chromosome findSameChromosome(final Population population) {
MethodContext _bcornu_methode_context3045 = new MethodContext(Chromosome.class, 83, 2881, 3512);
try {
CallChecker.varInit(this, "this", 83, 2881, 3512);
CallChecker.varInit(population, "population", 83, 2881, 3512);
CallChecker.varInit(this.fitness, "fitness", 83, 2881, 3512);
CallChecker.varInit(NO_FITNESS, "org.apache.commons.math3.genetics.Chromosome.NO_FITNESS", 83, 2881, 3512);
if (CallChecker.beforeDeref(population, Chromosome.class, 84, 3371, 3380)) {
for (Chromosome anotherChr : population) {
if (this.isSame(anotherChr)) {
return anotherChr;
}
}
}
return null;
} catch (ForceReturn _bcornu_return_t) {
return ((Chromosome) (_bcornu_return_t.getDecision().getValue()));
} finally {
_bcornu_methode_context3045.methodEnd();
}
}
public void searchForFitnessUpdate(final Population population) {
MethodContext _bcornu_methode_context3046 = new MethodContext(void.class, 98, 3519, 3967);
try {
CallChecker.varInit(this, "this", 98, 3519, 3967);
CallChecker.varInit(population, "population", 98, 3519, 3967);
CallChecker.varInit(this.fitness, "fitness", 98, 3519, 3967);
CallChecker.varInit(NO_FITNESS, "org.apache.commons.math3.genetics.Chromosome.NO_FITNESS", 98, 3519, 3967);
Chromosome sameChromosome = CallChecker.varInit(findSameChromosome(population), "sameChromosome", 99, 3804, 3862);
if (sameChromosome != null) {
fitness = sameChromosome.getFitness();
CallChecker.varAssign(this.fitness, "this.fitness", 101, 3914, 3951);
}
} catch (ForceReturn _bcornu_return_t) {
_bcornu_return_t.getDecision().getValue();
return ;
} finally {
_bcornu_methode_context3046.methodEnd();
}
}
}
|
[
"martin.monperrus@gnieh.org"
] |
martin.monperrus@gnieh.org
|
c7b9417d58780c2bb4b88646cf7b8d356e920836
|
1661886bc7ec4e827acdd0ed7e4287758a4ccc54
|
/srv_unip_pub/src/main/java/com/sa/unip/app/common/controller/PVPartEditViewController.java
|
acdfb457ec2e12a1e921245cd51e7e87be24e049
|
[
"MIT"
] |
permissive
|
zhanght86/iBizSys_unip
|
baafb4a96920e8321ac6a1b68735bef376b50946
|
a22b15ebb069c6a7432e3401bdd500a3ca37250e
|
refs/heads/master
| 2020-04-25T21:20:23.830300
| 2018-01-26T06:08:28
| 2018-01-26T06:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,103
|
java
|
/**
* iBizSys 5.0 机器人生产代码(不要直接修改当前代码)
* http://www.ibizsys.net
*/
package com.sa.unip.app.common.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import net.ibizsys.paas.appmodel.AppModelGlobal;
import net.ibizsys.paas.appmodel.IApplicationModel;
import net.ibizsys.paas.demodel.DEModelGlobal;
import net.ibizsys.paas.demodel.IDataEntityModel;
import net.ibizsys.paas.service.IService;
import net.ibizsys.paas.service.ServiceGlobal;
import net.ibizsys.paas.sysmodel.ISystemModel;
import net.ibizsys.paas.sysmodel.SysModelGlobal;
import net.ibizsys.paas.controller.ViewControllerGlobal;
import net.ibizsys.paas.ctrlmodel.ICtrlModel;
import net.ibizsys.paas.ctrlhandler.ICtrlHandler;
import com.sa.unip.srv.UniPSampleSysModel;
import com.sa.unip.app.appAppModel;
/**
* 视图[PVPartEditView]控制类基类
*
* !! 不要对此代码进行修改
*/
@Controller
@RequestMapping(value = "/app/common/PVPartEditView.do")
public class PVPartEditViewController extends net.ibizsys.paas.controller.EditViewControllerBase {
public PVPartEditViewController() throws Exception {
super();
this.setId("5ecbb63b058e1d79fcf3d269a635cb19");
this.setCaption("门户视图部件");
this.setTitle("门户视图部件实体编辑视图");
this.setAccessUserMode(2);
//
this.setAttribute("UI.CTRL.FORM","TRUE");
//显示数据信息栏
this.setAttribute("UI.SHOWDATAINFOBAR","TRUE");
//
this.setAttribute("UI.CTRL.TOOLBAR","TRUE");
ViewControllerGlobal.registerViewController("/app/common/PVPartEditView.do",this);
ViewControllerGlobal.registerViewController("com.sa.unip.app.common.controller.PVPartEditViewController",this);
}
@Override
protected void prepareViewParam() throws Exception {
super.prepareViewParam();
}
private UniPSampleSysModel uniPSampleSysModel;
public UniPSampleSysModel getUniPSampleSysModel() {
if(this.uniPSampleSysModel==null) {
try {
this.uniPSampleSysModel = (UniPSampleSysModel)SysModelGlobal.getSystem("com.sa.unip.srv.UniPSampleSysModel");
} catch(Exception ex) {
}
}
return this.uniPSampleSysModel;
}
@Override
public ISystemModel getSystemModel() {
return this.getUniPSampleSysModel();
}
private appAppModel appAppModel;
public appAppModel getappAppModel() {
if(this.appAppModel==null) {
try {
this.appAppModel = (appAppModel)AppModelGlobal.getApplication("com.sa.unip.app.appAppModel");
} catch(Exception ex) {
}
}
return this.appAppModel;
}
@Override
public IApplicationModel getAppModel() {
return this.getappAppModel();
}
private net.ibizsys.psrt.srv.common.demodel.PVPartDEModel pVPartDEModel;
public net.ibizsys.psrt.srv.common.demodel.PVPartDEModel getPVPartDEModel() {
if(this.pVPartDEModel==null) {
try {
this.pVPartDEModel = (net.ibizsys.psrt.srv.common.demodel.PVPartDEModel)DEModelGlobal.getDEModel("net.ibizsys.psrt.srv.common.demodel.PVPartDEModel");
} catch(Exception ex) {
}
}
return this.pVPartDEModel;
}
public IDataEntityModel getDEModel() {
return this.getPVPartDEModel();
}
public net.ibizsys.psrt.srv.common.service.PVPartService getPVPartService() {
try {
return (net.ibizsys.psrt.srv.common.service.PVPartService)ServiceGlobal.getService("net.ibizsys.psrt.srv.common.service.PVPartService",this.getSessionFactory());
} catch(Exception ex) {
return null;
}
}
/* (non-Javadoc)
* @see net.ibizsys.paas.controller.IViewController#getService()
*/
@Override
public IService getService() {
return getPVPartService();
}
/**
* 准备部件模型
* @throws Exception
*/
@Override
protected void prepareCtrlModels()throws Exception {
//注册 form
ICtrlModel editForm=(ICtrlModel)getUniPSampleSysModel().createObject("com.sa.unip.app.srv.common.ctrlmodel.PVPartMainEditFormModel");
editForm.init(this);
this.registerCtrlModel("form",editForm);
}
/**
* 准备部件处理对象
* @throws Exception
*/
@Override
protected void prepareCtrlHandlers()throws Exception {
//注册 form
ICtrlHandler editForm = (ICtrlHandler)getUniPSampleSysModel().createObject("com.sa.unip.app.common.ctrlhandler.PVPartEditViewEditFormHandler");
editForm.init(this);
this.registerCtrlHandler("form",editForm);
}
/**
* 注册界面行为
* @throws Exception
*/
@Override
protected void prepareUIActions()throws Exception {
}
}
|
[
"dev@ibizsys.net"
] |
dev@ibizsys.net
|
9ceaa982a63ed123359842e9cbfebb7a18528d96
|
294e77c56a3ced3d230a948873feee4d48fe53fa
|
/jims-api/src/main/java/com/jims/oauth/api/AuthorityApi.java
|
35327e0037858b2c0cc08314e416695b1b9450f5
|
[] |
no_license
|
zyg58979008/hrm
|
c5ecad2217b7ea10d3c09389e079442ce4c8e75e
|
c53b2205f3f44926f5ee9378dd9e8fd9d47fec9e
|
refs/heads/master
| 2020-05-23T17:38:05.871318
| 2017-03-13T04:03:18
| 2017-03-13T04:03:18
| 84,775,991
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 313
|
java
|
package com.jims.oauth.api;
import com.jims.oauth.entity.Authority;
/**
* Created by Administrator on 2016/5/30.
*/
public interface AuthorityApi {
public Authority findUnique(String appKey, String userId);
public String save(Authority authority);
public Authority findAppKey(String appKey);
}
|
[
"58979008@qq.com"
] |
58979008@qq.com
|
d1090352248797bdebf7cb65d1c5608e5ddfa4bd
|
ae34365cfad30d6d6cf55c15b3a98dd9bd1a6b80
|
/trunk/src/test/java/de/sophomore/zig/webapp/filter/LocaleFilterTest.java
|
6efbabc912323b6fc1c93425af0881c05582ae4d
|
[] |
no_license
|
BGCX261/zig-svn-to-git
|
5152d63ccbc30b197b178273c58a3d79c52bfa03
|
b8d0f88fc0059f56be4926564c143f4f067e3fad
|
refs/heads/master
| 2016-09-06T04:12:23.549555
| 2015-08-25T15:17:55
| 2015-08-25T15:17:55
| 41,589,275
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,698
|
java
|
package de.sophomore.zig.webapp.filter;
import java.util.Locale;
import javax.servlet.jsp.jstl.core.Config;
import junit.framework.TestCase;
import de.sophomore.zig.Constants;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.mock.web.MockFilterConfig;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockHttpSession;
public class LocaleFilterTest extends TestCase {
private LocaleFilter filter = null;
protected void setUp() throws Exception {
filter = new LocaleFilter();
filter.init(new MockFilterConfig());
}
public void testSetLocaleInSessionWhenSessionIsNull() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("locale", "es");
MockHttpServletResponse response = new MockHttpServletResponse();
filter.doFilter(request, response, new MockFilterChain());
// no session, should result in null
assertNull(request.getSession().getAttribute(Constants.PREFERRED_LOCALE_KEY));
// thread locale should always have it, regardless of session
assertNotNull(LocaleContextHolder.getLocale());
}
public void testSetLocaleInSessionWhenSessionNotNull() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("locale", "es");
MockHttpServletResponse response = new MockHttpServletResponse();
request.setSession(new MockHttpSession(null));
filter.doFilter(request, response, new MockFilterChain());
// session not null, should result in not null
Locale locale = (Locale) request.getSession().getAttribute(Constants.PREFERRED_LOCALE_KEY);
assertNotNull(locale);
assertNotNull(LocaleContextHolder.getLocale());
assertEquals(new Locale("es"), locale);
}
public void testSetInvalidLocale() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("locale", "foo");
MockHttpServletResponse response = new MockHttpServletResponse();
request.setSession(new MockHttpSession(null));
filter.doFilter(request, response, new MockFilterChain());
// a locale will get set regardless - there's no such thing as an invalid one
assertNotNull(request.getSession().getAttribute(Constants.PREFERRED_LOCALE_KEY));
}
public void testJstlLocaleIsSet() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("locale", "es");
MockHttpServletResponse response = new MockHttpServletResponse();
request.setSession(new MockHttpSession(null));
filter.doFilter(request, response, new MockFilterChain());
assertNotNull(Config.get(request.getSession(), Config.FMT_LOCALE));
}
public void testLocaleAndCountry() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
request.setSession(new MockHttpSession());
request.addParameter("locale", "zh_TW");
MockHttpServletResponse response = new MockHttpServletResponse();
filter.doFilter(request, response, new MockFilterChain());
// session not null, should result in not null
Locale locale = (Locale) request.getSession().getAttribute(Constants.PREFERRED_LOCALE_KEY);
assertNotNull(locale);
assertEquals(new Locale("zh", "TW"), locale);
}
}
|
[
"you@example.com"
] |
you@example.com
|
39bc254ac02cf63cad863f04f024935bb3009b1e
|
96f8d42c474f8dd42ecc6811b6e555363f168d3e
|
/baike/sources/qsbk/app/widget/cm.java
|
1ae2c8002e479ceb61cf3cef3b18a9486c6f980d
|
[] |
no_license
|
aheadlcx/analyzeApk
|
050b261595cecc85790558a02d79739a789ae3a3
|
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
|
refs/heads/master
| 2020-03-10T10:24:49.773318
| 2018-04-13T09:44:45
| 2018-04-13T09:44:45
| 129,332,351
| 6
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 207
|
java
|
package qsbk.app.widget;
class cm implements Runnable {
final /* synthetic */ cl a;
cm(cl clVar) {
this.a = clVar;
}
public void run() {
this.a.a.setEnabled(true);
}
}
|
[
"aheadlcxzhang@gmail.com"
] |
aheadlcxzhang@gmail.com
|
4a70c4428dbc1a4394ce18767c92f7bedee6f21a
|
0aa4dd65748defba55a006bb87b9c92dc9ed1b80
|
/src/main/java/com/common/AjaxResult.java
|
2200889bc71486579a7b1ba9c18a2d5789bd404d
|
[] |
no_license
|
18753377299/JavaPractice
|
84df7157056111f0f7c870eb1cf48602403bf5a2
|
5741dbdc940a00a2fb611e476fc5f62fc422341f
|
refs/heads/master
| 2022-11-08T14:51:41.033638
| 2019-07-15T09:47:36
| 2019-07-15T09:47:36
| 182,992,351
| 0
| 0
| null | 2022-11-03T22:51:37
| 2019-04-23T10:33:53
|
FreeMarker
|
UTF-8
|
Java
| false
| false
| 677
|
java
|
package com.common;
import java.util.Map;
public class AjaxResult {
private long status;
private String statusText;
private Object data;
private Map<String, Object> datas;
public long getStatus() {
return status;
}
public void setStatus(long status) {
this.status = status;
}
public String getStatusText() {
return statusText;
}
public void setStatusText(String statusText) {
this.statusText = statusText;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
public Map<String, Object> getDatas() {
return datas;
}
public void setDatas(Map<String, Object> datas) {
this.datas = datas;
}
}
|
[
"1733856225@qq.com"
] |
1733856225@qq.com
|
6ae6be9fbfa8032e942304e3ef9640128ddf3534
|
965c556d12e2b7b35be3bdd8a7271037fc67f78d
|
/client/src/main/java/org/infinispan/creson/AtomicInteger.java
|
7a6716dd918cf856129702e4b0c97da929ce590c
|
[] |
no_license
|
danielBCN/event-store
|
d515a65c33388c15fceff53d7c38483481317246
|
49aaa5d1c97c0599966b9083054b33e2d1aea16c
|
refs/heads/master
| 2020-09-06T01:48:51.981625
| 2019-09-17T11:54:47
| 2019-09-17T11:54:47
| 220,277,802
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,053
|
java
|
package org.infinispan.creson;
import java.io.Serializable;
/**
*
* @author Daniel
*/
public class AtomicInteger implements Serializable{
private int value = 0;
public AtomicInteger(){
}
public AtomicInteger(int initialValue){
value = initialValue;
}
public void printValue(){
System.out.println(value);
}
public int get(){
return value;
}
public void set(int newValue){
value = newValue;
}
public int getAndSet(int newValue){
int old = value;
value = newValue;
return old;
}
public int getAndIncrement(){
return getAndAdd(1);
}
public int getAndDecrement(){
return getAndAdd(- 1);
}
public int getAndAdd(int delta){
value += delta;
return value - delta;
}
public int incrementAndGet(){
return addAndGet(1);
}
public int decrementAndGet(){
return addAndGet(- 1);
}
public int addAndGet(int delta){
value += delta;
return value;
}
/**
* Returns the String representation of the current value.
*
* @return the String representation of the current value
*/
public String toString(){
return Integer.toString(get());
}
/**
* Returns the value of this {@code AtomicInteger} as an {@code int}.
*/
public int intValue(){
return get();
}
/**
* Returns the value of this {@code AtomicInteger} as a {@code long}
* after a widening primitive conversion.
*/
public long longValue(){
return (long) get();
}
/**
* Returns the value of this {@code AtomicInteger} as a {@code float}
* after a widening primitive conversion.
*/
public float floatValue(){
return (float) get();
}
/**
* Returns the value of this {@code AtomicInteger} as a {@code double}
* after a widening primitive conversion.
*/
public double doubleValue(){
return (double) get();
}
}
|
[
"0track@gmail.com"
] |
0track@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.