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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ab0001ac3f89f0ade7a3c6577a0d67b60e8f4b4b
|
fa2d84d1fd00ee5ffd0cb85808dce6f0d909d204
|
/zava/src/main/java/com/github/wangxuehui/rpc/test/SnRpcImpl.java
|
2d4b3c530d4ca5b914fd52f4cc75ccb5f37c5dba
|
[] |
no_license
|
hbwzhsh/tutorials
|
8ad70095fa9c4a5d3f2ca27a98afe404a1e0101c
|
02d0f97da44e71f3fd47def8010611796efce3e8
|
refs/heads/master
| 2021-01-18T00:58:05.822652
| 2015-05-29T08:28:26
| 2015-05-29T08:28:26
| 36,609,864
| 1
| 0
| null | 2015-05-31T15:42:17
| 2015-05-31T15:42:17
| null |
UTF-8
|
Java
| false
| false
| 219
|
java
|
package com.github.wangxuehui.rpc.test;
// implement interface
public class SnRpcImpl implements SnRpcInterface {
public String getMessage(String param) {
return "hi,it is message from server...param+" + param;
}
}
|
[
"zqhxuyuan@gmail.com"
] |
zqhxuyuan@gmail.com
|
57efcee85ccb488aeecabe33d2999150c6198f54
|
11201bc32f4b8d479cd5f7d5fd4859085207068f
|
/src/whizlabspackage/Q3q1.java
|
5d1b40b26ee93f875d0ce96fe31bf3c785a8d4dc
|
[] |
no_license
|
Bir-Eda/My-Java-Projects
|
842337614591955410a2730b355d55754e8fa804
|
eefe94288b94884b9cd813a2c712e2269bf4df14
|
refs/heads/master
| 2023-03-15T17:52:04.595827
| 2021-03-08T03:41:58
| 2021-03-08T03:41:58
| 258,254,372
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 174
|
java
|
package whizlabspackage;
public class Q3q1 {
public static void main(String[] args) {
int x=-1;
int i=2;
System.out.println(++x + --i);
}
}
|
[
"60522150+Bir-Eda@users.noreply.github.com"
] |
60522150+Bir-Eda@users.noreply.github.com
|
1f7daa3639cc7e21587aeeda17c65e5d7c4ca8ac
|
ce55e10448040cf27b4abccc9fb2b46e83ffb434
|
/trunk/dam/src/main/java/gov/nih/nci/ncicb/tcga/dcc/dam/bean/DataSetLevelTwoThree.java
|
33e1848be04f26e79ffc85cf313ac56cbe34187f
|
[] |
no_license
|
NCIP/tcga-sandbox-v1
|
0518dee6ee9e31a48c6ebddd1c10d20dca33c898
|
c8230c07199ddaf9d69564480ff9124782525cf5
|
refs/heads/master
| 2021-01-19T04:07:08.906026
| 2013-05-29T18:00:15
| 2013-05-29T18:00:15
| 87,348,860
| 1
| 7
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,978
|
java
|
/*
* Software License, Version 1.0 Copyright 2009 SRA International, Inc.
* Copyright Notice. The software subject to this notice and license includes both human
* readable source code form and machine readable, binary, object code form (the "caBIG
* Software").
*
* Please refer to the complete License text for full details at the root of the project.
*/
package gov.nih.nci.ncicb.tcga.dcc.dam.bean;
/**
* @user: HickeyE
* @version: $id$
*/
public class DataSetLevelTwoThree extends DataSet { // TODO: name should reflect Level 2 and 3 usage
private String centerName;
private String platformName;
private String depositBaseName;
private int depositBatch;
private int dataRevision;
private int experimentID; // TODO: we now have both DCC and DP internal IDs in the same class. This will get confusing. Maybe we should stop storing internal IDs in the Code and use the names instead.
public void setCenterName( final String c ) {
centerName = c;
}
public void setDataDepositBaseName( final String n ) {
depositBaseName = n;
}
public void setDataDepositBatch( final int b ) {
depositBatch = b;
}
public void setDataRevision( final int r ) {
dataRevision = r;
}
public String getCenterName() {
return centerName;
}
public String getDepositBaseName() {
return depositBaseName;
}
public int getDepositBatch() {
return depositBatch;
}
public int getDataRevision() {
return dataRevision;
}
public void setExperimentID( final int eID ) {
experimentID = eID;
}
public int getExperimentID() {
return experimentID;
}
public String getPlatformName() {
return platformName;
}
public void setPlatformName( final String platformName ) {
this.platformName = platformName;
}
}
|
[
"reillysm@mail.nih.gov"
] |
reillysm@mail.nih.gov
|
874921ae2d4c2b4a8f3c438b11e06b74354c467d
|
b9a71bb2805d5f0d5ac98c59d984246463285d34
|
/testing/drools-master/drools-core/src/main/java/org/drools/core/util/Bag.java
|
9a89580c11333b60e6953c0d08fe1f045aa33493
|
[
"MIT"
] |
permissive
|
rokn/Count_Words_2015
|
486f3b292954adc76c9bcdbf9a37eb07421ddd2a
|
e07f6fc9dfceaf773afc0c3a614093e16a0cde16
|
refs/heads/master
| 2021-01-10T04:23:49.999237
| 2016-01-11T19:53:31
| 2016-01-11T19:53:31
| 48,538,207
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,340
|
java
|
/*
* Copyright 2015 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.core.util;
import java.io.Serializable;
import java.util.*;
import java.util.Iterator;
public class Bag<T> implements Collection<T>, Serializable {
private Map<T, Counter> map = new HashMap<T, Counter>();
private int size = 0;
@Override
public int size() {
return size;
}
public int sizeFor(T t) {
Counter i = map.get(t);
return i != null ? i.get() : 0;
}
@Override
public boolean isEmpty() {
return map.isEmpty();
}
@Override
public boolean contains( Object o ) {
return map.containsKey( o );
}
@Override
public Iterator<T> iterator() {
return map.keySet().iterator();
}
@Override
public Object[] toArray() {
return map.keySet().toArray();
}
@Override
public <T1> T1[] toArray( T1[] a ) {
return map.keySet().toArray( a );
}
@Override
public boolean add( T t ) {
Counter i = map.get(t);
if (i == null) {
map.put( t, new Counter() );
} else {
i.increment();
}
size++;
return true;
}
@Override
public boolean remove( Object o ) {
Counter i = map.get(o);
if (i == null) {
return false;
}
if (i.decrement()) {
map.remove( o );
}
size--;
return true;
}
@Override
public boolean containsAll( Collection<?> c ) {
return map.keySet().containsAll( c );
}
@Override
public boolean addAll( Collection<? extends T> c ) {
for (T t : c) {
add(t);
}
return true;
}
@Override
public boolean removeAll( Collection<?> c ) {
boolean result = false;
for (Object o : c) {
result = remove(o) || result;
}
return result;
}
@Override
public boolean retainAll( Collection<?> c ) {
throw new UnsupportedOperationException();
}
@Override
public void clear() {
map.clear();
size = 0;
}
@Override
public String toString() {
return map.toString();
}
public static class Counter implements Serializable {
private int count;
public Counter() {
this(1);
}
public Counter(int count) {
this.count = count;
}
public void increment() {
count++;
}
public boolean decrement() {
return --count == 0;
}
public int get() {
return count;
}
@Override
public String toString() {
return "" + count;
}
}
}
|
[
"marto_dimitrov@mail.bg"
] |
marto_dimitrov@mail.bg
|
36a3f68f8e4bad43a917fdad92a1b0df2693155d
|
ff77098c5077fe6b6102779b01b1b779b653fe9a
|
/Algorithm/Level2/Develop.java
|
9ce1963b71c3565b410865e7db8a5423b63a1263
|
[] |
no_license
|
wjdrbs96/Programmers
|
9b3d0a683b8cc86e8f242b8a90880530162d569a
|
554d0f6be50ee7f3293f39bfa397531662f15459
|
refs/heads/master
| 2022-05-07T20:38:06.102608
| 2022-03-17T13:51:53
| 2022-03-17T13:51:53
| 237,273,836
| 5
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,299
|
java
|
package Programmers.Algorithm.Level2;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Develop {
public static int[] solution(int[] progresses, int[] speeds) {
int[] answer = new int[progresses.length];
for (int i = 0; i < progresses.length; ++i) {
if ((100 - progresses[i]) % speeds[i] == 0) {
answer[i] = (100 - progresses[i]) / speeds[i];
} else {
answer[i] = (100 - progresses[i]) / speeds[i] + 1;
}
}
int count = 1;
List<Integer> list = new ArrayList<>();
for (int i = 0; i < answer.length; ++i) {
for (int j = i + 1; j < answer.length; ++j) {
if (answer[i] < answer[j]) {
break;
}
count++;
}
list.add(count);
i = i + count - 1;
count = 1;
}
int[] ans = new int[list.size()];
for (int i = 0; i < list.size(); ++i) {
ans[i] = list.get(i);
}
return ans;
}
public static void main(String[] args) {
int[] pro = {93, 30, 55};
int[] spe = {1, 30, 5};
System.out.println(Arrays.toString(solution(pro, spe)));
}
}
|
[
"wjdrbs966@naver.com"
] |
wjdrbs966@naver.com
|
9d185784265833ab271ea2235f8b6e03fc5b88a0
|
b13de6d76f3c6b8f0ab2786a07cc25f5badc21e0
|
/bootstrapped/ideal/development/elements/deeply_immutable_declaration.java
|
a1fb4a2f996d9ea0864e811c90979b4effd53ad1
|
[
"BSD-3-Clause"
] |
permissive
|
mishadynin/ideal
|
c4e554538ae6eb711af739ec043640d66f305cae
|
a512796201e6e26ea750e31561e4c709b55cf268
|
refs/heads/master
| 2021-04-15T19:55:59.143341
| 2020-05-01T22:50:56
| 2020-05-01T22:50:56
| 249,295,173
| 0
| 0
|
BSD-3-Clause
| 2020-03-22T23:54:04
| 2020-03-22T23:54:04
| null |
UTF-8
|
Java
| false
| false
| 236
|
java
|
// Autogenerated from development/elements/declaration.i
package ideal.development.elements;
import ideal.library.elements.*;
public interface deeply_immutable_declaration extends deeply_immutable_position, immutable_declaration { }
|
[
"dynin@google.com"
] |
dynin@google.com
|
15795b980a46baa78591ee17d7543388b1be3d38
|
a773a12e019864b5f0e1fe01ee6f6b47d8bac0c4
|
/src/main/java/com/guilin/java/designpattern/strategy/s1/Context.java
|
e7c2bdf294f06dda581ad8c053e0a5c48fa28fd0
|
[] |
no_license
|
dongguilin/JavaTest
|
cba4bf2630065b1b8f1b682c3698fc7eb8fcdad6
|
71e4d1afd6e5fc6d837ef538d8ad00148297b729
|
refs/heads/master
| 2022-05-02T10:18:09.556459
| 2022-03-14T07:44:24
| 2022-03-14T07:44:24
| 40,651,915
| 3
| 1
| null | 2022-03-14T08:11:05
| 2015-08-13T10:00:57
|
Java
|
UTF-8
|
Java
| false
| false
| 411
|
java
|
package com.guilin.java.designpattern.strategy.s1;
/**
* Created by T57 on 2016/9/11 0011.
* 封装角色
*/
public class Context {
//抽象策略
private Strategy strategy = null;
//构造函数设置具体策略
public Context(Strategy strategy) {
this.strategy = strategy;
}
//封装后的策略方法
public void doAnything() {
strategy.doString();
}
}
|
[
"guilin1_happy@163.com"
] |
guilin1_happy@163.com
|
f023809cc44681006f376f69cfd6c7d89a5919fa
|
55791da0600be8a15d345fc88efc369a82bad714
|
/core-ng/src/main/java/core/framework/impl/search/DocumentValidator.java
|
f64ecb1fd47828c176f3d0baaf078f66cc6a2a8a
|
[
"Apache-2.0"
] |
permissive
|
movomoto/core-ng-project
|
3e597f9f111fb07e0aa77835f49a189b7770d44d
|
2880a1d904096efcff66386d494d49bc192593f6
|
refs/heads/master
| 2020-03-07T09:09:15.517332
| 2018-03-29T18:55:42
| 2018-03-29T18:55:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 475
|
java
|
package core.framework.impl.search;
import core.framework.api.json.Property;
import core.framework.impl.validate.Validator;
/**
* @author neo
*/
final class DocumentValidator<T> {
private final Validator validator;
DocumentValidator(Class<T> documentClass) {
validator = new Validator(documentClass, field -> field.getDeclaredAnnotation(Property.class).name());
}
public void validate(T document) {
validator.validate(document);
}
}
|
[
"neowu.us@gmail.com"
] |
neowu.us@gmail.com
|
60073b12233dc8fc1f33f4df487e53011308fb15
|
b06acf556b750ac1fa5b28523db7188c05ead122
|
/IfcXML/src/org/tech/iai/ifc/xml/ifc/_2x3/final_/IfcWasteTerminalTypeEnumType.java
|
18c3fe9a72c96f4e157ec959342150a827797a56
|
[] |
no_license
|
christianharrington/MDD
|
3500afbe5e1b1d1a6f680254095bb8d5f63678ba
|
64beecdaed65ac22b0047276c616c269913afd7f
|
refs/heads/master
| 2021-01-10T21:42:53.686724
| 2012-12-17T03:27:05
| 2012-12-17T03:27:05
| 6,157,471
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,159
|
java
|
/**
*/
package org.tech.iai.ifc.xml.ifc._2x3.final_;
import java.math.BigInteger;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Ifc Waste Terminal Type Enum Type</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.tech.iai.ifc.xml.ifc._2x3.final_.IfcWasteTerminalTypeEnumType#getValue <em>Value</em>}</li>
* <li>{@link org.tech.iai.ifc.xml.ifc._2x3.final_.IfcWasteTerminalTypeEnumType#getId <em>Id</em>}</li>
* <li>{@link org.tech.iai.ifc.xml.ifc._2x3.final_.IfcWasteTerminalTypeEnumType#getPath <em>Path</em>}</li>
* <li>{@link org.tech.iai.ifc.xml.ifc._2x3.final_.IfcWasteTerminalTypeEnumType#getPos <em>Pos</em>}</li>
* </ul>
* </p>
*
* @see org.tech.iai.ifc.xml.ifc._2x3.final_.FinalPackage#getIfcWasteTerminalTypeEnumType()
* @model extendedMetaData="name='IfcWasteTerminalTypeEnum_._type' kind='simple'"
* @generated
*/
public interface IfcWasteTerminalTypeEnumType extends EObject {
/**
* Returns the value of the '<em><b>Value</b></em>' attribute.
* The literals are from the enumeration {@link org.tech.iai.ifc.xml.ifc._2x3.final_.IfcWasteTerminalTypeEnum}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Value</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Value</em>' attribute.
* @see org.tech.iai.ifc.xml.ifc._2x3.final_.IfcWasteTerminalTypeEnum
* @see #setValue(IfcWasteTerminalTypeEnum)
* @see org.tech.iai.ifc.xml.ifc._2x3.final_.FinalPackage#getIfcWasteTerminalTypeEnumType_Value()
* @model unsettable="true"
* extendedMetaData="name=':0' kind='simple'"
* @generated
*/
IfcWasteTerminalTypeEnum getValue();
/**
* Sets the value of the '{@link org.tech.iai.ifc.xml.ifc._2x3.final_.IfcWasteTerminalTypeEnumType#getValue <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Value</em>' attribute.
* @see org.tech.iai.ifc.xml.ifc._2x3.final_.IfcWasteTerminalTypeEnum
* @see #getValue()
* @generated
*/
void setValue(IfcWasteTerminalTypeEnum value);
/**
* Returns the value of the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Id</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Id</em>' attribute.
* @see #setId(String)
* @see org.tech.iai.ifc.xml.ifc._2x3.final_.FinalPackage#getIfcWasteTerminalTypeEnumType_Id()
* @model id="true" dataType="org.eclipse.emf.ecore.xml.type.ID"
* extendedMetaData="kind='attribute' name='id'"
* @generated
*/
String getId();
/**
* Sets the value of the '{@link org.tech.iai.ifc.xml.ifc._2x3.final_.IfcWasteTerminalTypeEnumType#getId <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Id</em>' attribute.
* @see #getId()
* @generated
*/
void setId(String value);
/**
* Returns the value of the '<em><b>Path</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Path</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Path</em>' attribute.
* @see #setPath(List)
* @see org.tech.iai.ifc.xml.ifc._2x3.final_.FinalPackage#getIfcWasteTerminalTypeEnumType_Path()
* @model dataType="org.eclipse.emf.ecore.xml.type.NMTOKENS" many="false"
* extendedMetaData="kind='attribute' name='path'"
* @generated
*/
List<String> getPath();
/**
* Sets the value of the '{@link org.tech.iai.ifc.xml.ifc._2x3.final_.IfcWasteTerminalTypeEnumType#getPath <em>Path</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Path</em>' attribute.
* @see #getPath()
* @generated
*/
void setPath(List<String> value);
/**
* Returns the value of the '<em><b>Pos</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Pos</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Pos</em>' attribute.
* @see #setPos(List)
* @see org.tech.iai.ifc.xml.ifc._2x3.final_.FinalPackage#getIfcWasteTerminalTypeEnumType_Pos()
* @model dataType="org.iso.standard._10303.part._28.version._2.xmlschema.common.PosType" many="false"
* extendedMetaData="kind='attribute' name='pos'"
* @generated
*/
List<BigInteger> getPos();
/**
* Sets the value of the '{@link org.tech.iai.ifc.xml.ifc._2x3.final_.IfcWasteTerminalTypeEnumType#getPos <em>Pos</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Pos</em>' attribute.
* @see #getPos()
* @generated
*/
void setPos(List<BigInteger> value);
} // IfcWasteTerminalTypeEnumType
|
[
"christian@harrington.dk"
] |
christian@harrington.dk
|
97fd5e9d27fe9c6985e6115c262782c4ffd6f002
|
78e340dda73697b4c7e32ac346f116b61c981226
|
/src/org/dmd/dms/util/TypeAndAttr.java
|
64a2b37c8afec4d99d7489f1ac8478bd2834537d
|
[] |
no_license
|
dark-matter-org/dark-matter-data
|
451e7b9da3ae34d94deb4084d462b887d1624da9
|
b2e9bc79a6a8162651672871e2c7ccdf47a642e7
|
refs/heads/master
| 2023-05-25T00:47:44.782732
| 2023-05-19T17:15:06
| 2023-05-19T17:15:06
| 46,194,282
| 4
| 0
| null | 2023-05-19T17:15:07
| 2015-11-14T22:17:39
|
Java
|
UTF-8
|
Java
| false
| false
| 2,071
|
java
|
package org.dmd.dms.util;
import org.dmd.dms.TypeDefinition;
import org.dmd.dms.generated.enums.ValueTypeEnum;
/**
* The TypeAndAttr class stores the type and cardinality for an attribute and provides
* convenience functions to get the appropriate derived type for SV, MV, MAP and SET
* versions of a type.
*/
public class TypeAndAttr {
public TypeDefinition td;
public ValueTypeEnum valueType;
public int indexSize;
public boolean indexed;
public String name;
public TypeAndAttr(TypeDefinition t, ValueTypeEnum v, Integer idxSize){
td = t;
valueType = v;
name = td.getName().getNameString() + "-" + valueType;
indexed = false;
if (idxSize == null){
indexSize = 0;
}
else{
indexSize = idxSize;
if (indexSize > 0)
indexed = true;
}
}
public String getImport(){
if (td.getIsRefType() && !td.getIsExtendedRefType()){
if (td.getName().getNameString().endsWith("REF")){
// DebugInfo.debug("Normal REF");
return td.getDefinedIn().getSchemaPackage() + ".generated.types.DmcType" + td.getName() + getSuffix();
}
else{
// DebugInfo.debug("REF not in type name: " + td.getName());
return td.getDefinedIn().getSchemaPackage() + ".generated.types.DmcType" + td.getName() + "REF" + getSuffix();
}
}
else{
if (td.getName().getNameString().endsWith("REF") && td.getIsEnumType()){
// Special case for meta schema enums which have type definitions with names like ValueTypeEnumREF
return td.getDefinedIn().getSchemaPackage() + ".generated.types.DmcType" + td.getEnumName() + getSuffix();
}
else
return td.getDefinedIn().getSchemaPackage() + ".generated.types.DmcType" + td.getName() + getSuffix();
}
}
String getSuffix(){
String rc = null;
switch(valueType){
case SINGLE:
rc = "SV";
break;
case MULTI:
rc = "MV";
break;
case HASHMAPPED:
case TREEMAPPED:
rc = "MAP";
break;
case HASHSET:
case TREESET:
rc = "SET";
break;
}
return(rc);
}
}
|
[
"pstrong99@gmail.com"
] |
pstrong99@gmail.com
|
34d3db1a90b88c7acaf9da8c316d94cec3becabd
|
1b9eaa8c98435052c02c07e858085dd0ea9ff651
|
/src/main/java/org/contentmine/graphics/html/HtmlTbody.java
|
d7214df14bf584c497eac19205cd95018714358a
|
[
"Apache-2.0"
] |
permissive
|
petermr/cephis
|
9152966dc936dc1660b50dc0c7f3db362d8b93c4
|
9eee6685b38f11ca3bf11ddea879f6b5af04a988
|
refs/heads/master
| 2021-06-21T10:49:20.650898
| 2019-05-21T08:52:44
| 2019-05-21T08:52:44
| 133,259,880
| 1
| 2
|
Apache-2.0
| 2019-05-21T08:52:45
| 2018-05-13T17:35:26
|
HTML
|
UTF-8
|
Java
| false
| false
| 2,020
|
java
|
/**
* Copyright 2011 Peter Murray-Rust et. al.
*
* 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.contentmine.graphics.html;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import nu.xom.Elements;
/** base class for lightweight generic SVG element.
* no checking - i.e. can take any name or attributes
* @author pm286
*
*/
public class HtmlTbody extends HtmlElement {
@SuppressWarnings("unused")
private final static Logger LOG = Logger.getLogger(HtmlTbody.class);
public final static String TAG = "tbody";
/** constructor.
*
*/
public HtmlTbody() {
super(TAG);
}
public void addRow(HtmlTr row) {
this.appendChild(row);
}
public List<HtmlElement> getRows() {
return getChildElements(this, HtmlTr.TAG);
}
public List<HtmlTr> getChildTrs() {
List<HtmlTr> rowList = new ArrayList<HtmlTr>();
List<HtmlElement> rows = getChildElements(this, HtmlTr.TAG);
for (HtmlElement el : rows) {
rowList.add((HtmlTr) el);
}
return rowList;
}
public List<HtmlElement> getChildElementsList() {
Elements elts = this.getChildElements();
List<HtmlElement> elements = new ArrayList<HtmlElement>();
for (int i = 0; i < elts.size(); i++) {
elements.add((HtmlElement) elts.get(i));
}
return elements;
}
}
|
[
"peter.murray.rust@googlemail.com"
] |
peter.murray.rust@googlemail.com
|
d9edf0386da5b389531033d9ce068a1f44a99604
|
82b78a6fb7ee91b88831d27615ac92d37e15046d
|
/src/main/java/com/free4lab/freeRT/utils/JSONUtil.java
|
61e2c79f7f7a85ebfc2d4568c11d8fb93604dcbd
|
[] |
no_license
|
ShangfengDing/ProjectManagement
|
05f93bfb824faa6d6dd2afb4544ab1ca2d33e909
|
10169858fd45570fc344a5c720364e3ea3130140
|
refs/heads/master
| 2022-06-27T15:16:42.981905
| 2019-11-07T13:30:40
| 2019-11-07T13:30:40
| 220,195,396
| 0
| 0
| null | 2022-06-21T02:11:24
| 2019-11-07T09:10:56
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 817
|
java
|
package com.free4lab.freeRT.utils;
import org.json.JSONException;
import org.json.JSONObject;
public class JSONUtil {
public static String getMessage(JSONObject json) {
try {
return json.getString("message");
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
public static Integer getCode(JSONObject json) {
try {
return json.getInt("code");
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
public static JSONObject getContent(JSONObject json) {
try {
return json.has("content")? json.getJSONObject("content"): null;
} catch (JSONException e) {
e.printStackTrace();
}
return null;
}
}
|
[
"747879583@qq.com"
] |
747879583@qq.com
|
302bca89af4c89008c92460693f994e58d06e851
|
4a9618d3506c869a27fff61174e7bcd13c7ce47e
|
/platform/metamodel/metamodel-datastructure/src/main/java/org/elsoft/platform/metamodel/objects/infrastructure/ServerClasterDAO.java
|
f0cde3118c13e5b2fd7001a79735f59e708603e8
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
renaudpawlak/tura
|
ce4d2ca9c21fa096081ca4d4fb9f5acb27bee1f7
|
bbcfbaeb9a0286912712004b67966cb639b9cb5f
|
refs/heads/master
| 2021-05-08T08:20:14.259297
| 2013-08-07T21:57:43
| 2013-08-07T21:57:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,772
|
java
|
/*******************************************************************************
* Copyright 2012 Arseniy Isakov
*
* 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.elsoft.platform.metamodel.objects.infrastructure;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import org.elsoft.platform.metamodel.objects.ELsoftObject;
@Entity(name = "ServerClaster")
@Table(name = "serverclaster")
public class ServerClasterDAO extends ELsoftObject{
@Column(name = "CLASTER_NAME") // (ACTIVE/ACTIVE, ACTIVE/PASSIVE)
private String clasterName;
@Column(name = "CLASTER_TYPE") // (ACTIVE/ACTIVE, ACTIVE/PASSIVE)
private String clasterType;
@Column(name = "LAVEL") // (1..7)
private Integer lavel;
public String getClasterType() {
return clasterType;
}
public void setClasterType(String clasterType) {
this.clasterType = clasterType;
}
public Integer getLavel() {
return lavel;
}
public void setLavel(Integer lavel) {
this.lavel = lavel;
}
public String getClasterName() {
return clasterName;
}
public void setClasterName(String clasterName) {
this.clasterName = clasterName;
}
}
|
[
"isakovarseniy@gmail.com"
] |
isakovarseniy@gmail.com
|
ea98169e935deef616d32f438c78bf647179d31c
|
34c3b0887f71165a6d4a533bc06ffa2624c2dc10
|
/summer-alipay-core/src/main/java/com/alipay/api/domain/AlipayMarketingToolFengdieTemplateSendModel.java
|
3d1f93344c106d5ffdbd7efdc07d987f3d10474c
|
[] |
no_license
|
songhaoran/summer-alipay
|
91a7a7fdddf67265241785cd6bb2b784c0f0f1c4
|
d02e33d9ab679dfc56160af4abd759c0abb113a4
|
refs/heads/master
| 2021-05-04T16:39:11.272890
| 2018-01-17T09:52:32
| 2018-01-17T09:52:32
| 120,255,759
| 1
| 0
| null | 2018-02-05T04:42:15
| 2018-02-05T04:42:15
| null |
UTF-8
|
Java
| false
| false
| 1,313
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 分配云凤蝶站点模板
*
* @author auto create
* @since 1.0, 2017-10-16 20:21:42
*/
public class AlipayMarketingToolFengdieTemplateSendModel extends AlipayObject {
private static final long serialVersionUID = 3111997949354619715L;
/**
* 企业 VIP 用户的ID(以 2088 开头的ID)
*/
@ApiField("operator")
private String operator;
/**
* 欲分配站点模板的空间业务 ID 列表
*/
@ApiListField("space_ids")
@ApiField("string")
private List<String> spaceIds;
/**
* 欲分配的站点模板的名称,可以在模板包的 package.json 文件中找到 name 字段
*/
@ApiField("template_name")
private String templateName;
public String getOperator() {
return this.operator;
}
public void setOperator(String operator) {
this.operator = operator;
}
public List<String> getSpaceIds() {
return this.spaceIds;
}
public void setSpaceIds(List<String> spaceIds) {
this.spaceIds = spaceIds;
}
public String getTemplateName() {
return this.templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
}
|
[
"1467237221@qq.com"
] |
1467237221@qq.com
|
8de71cb06c2f23dd74d5cdde2a1a385ad2bc86c3
|
a4f1a8877c721c4275cb4d945abeb5da508792e3
|
/utterVoiceCommandsBETA_source_from_JADX/com/nuance/nmdp/speechkit/C0486n.java
|
f4673f6bfe9e62a362e4ec509e3fb83aff3d09a7
|
[] |
no_license
|
coolchirag/androidRepez
|
36e686d0b2349fa823d810323034a20e58c75e6a
|
8d133ed7c523bf15670535dc8ba52556add130d9
|
refs/heads/master
| 2020-03-19T14:23:46.698124
| 2018-06-13T14:01:34
| 2018-06-13T14:01:34
| 136,620,480
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,868
|
java
|
package com.nuance.nmdp.speechkit;
import android.content.Context;
import android.os.Vibrator;
public final class C0486n implements ba {
private boolean f2835a = false;
private final int f2836b;
private Vibrator f2837c;
public C0486n(int i) {
this.f2836b = i;
this.f2837c = null;
}
public final void mo291a() {
if (this.f2837c != null) {
this.f2837c.cancel();
this.f2837c = null;
}
}
public final void mo292a(Object obj, final az azVar, final Object obj2) {
this.f2837c = (Vibrator) ((Context) obj).getSystemService("vibrator");
if (this.f2837c == null) {
C0478j.m2567c(this, "Unable to get vibrator service");
azVar.mo196a(obj2);
} else if (this.f2835a) {
C0478j.m2567c(this, "Can't start disposed vibration prompt.");
azVar.mo196a(obj2);
} else {
try {
C0478j.m2564a(this, "Starting vibration (" + this.f2836b + " ms)");
this.f2837c.vibrate((long) this.f2836b);
ax.m2056a(new Runnable(this) {
private /* synthetic */ C0486n f2834c;
public final void run() {
C0478j.m2564a(this, "Vibration finished");
azVar.mo198c(obj2);
this.f2834c.f2837c = null;
}
}, this.f2836b);
} catch (Throwable th) {
C0478j.m2565a(this, "Unable to vibrate", th);
azVar.mo196a(obj2);
}
}
}
public final boolean mo293b() {
return this.f2835a;
}
public final void mo294c() {
this.f2835a = true;
if (this.f2837c != null) {
this.f2837c.cancel();
this.f2837c = null;
}
}
}
|
[
"j.chirag5555@gmail.com"
] |
j.chirag5555@gmail.com
|
88f6def360cc3caaad30d709e23da99d0ed6bb10
|
377405a1eafa3aa5252c48527158a69ee177752f
|
/src/com/biznessapps/messages/MessageListFragment$MessageItemListener.java
|
18daaf373f52a99ab7812f36089f0de27a21a49a
|
[] |
no_license
|
apptology/AltFuelFinder
|
39c15448857b6472ee72c607649ae4de949beb0a
|
5851be78af47d1d6fcf07f9a4ad7f9a5c4675197
|
refs/heads/master
| 2016-08-12T04:00:46.440301
| 2015-10-25T18:25:16
| 2015-10-25T18:25:16
| 44,921,258
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 514
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.biznessapps.messages;
// Referenced classes of package com.biznessapps.messages:
// MessageListFragment, MessageEntity
public static interface
{
public abstract void onRemoveItemClicked(MessageEntity messageentity, int i);
public abstract void onShareIconClicked(MessageEntity messageentity, int i);
}
|
[
"rich.foreman@apptology.com"
] |
rich.foreman@apptology.com
|
5f92f7365f0542f03f759df34012a9b24c1a7741
|
6350764c8268d5d4b40e05d80773bd0123d8eb5d
|
/carnival-spring-boot-starter-common/src/main/java/com/github/yingzhuo/carnival/jsr310/PasswordValidator.java
|
c79394081b8c63844a2645cb7d4327eb9f2cd518
|
[
"Apache-2.0"
] |
permissive
|
chenshufeng/carnival
|
3f33b7b60c231a7a836236e3bdfd168672c508d8
|
bfa7c7cc7ce98a55adfee6f8adb48f5afeb9a8cf
|
refs/heads/master
| 2020-03-23T12:02:15.958590
| 2018-07-19T03:13:48
| 2018-07-19T03:13:48
| 141,533,023
| 1
| 0
|
Apache-2.0
| 2018-07-19T06:18:19
| 2018-07-19T06:18:18
| null |
UTF-8
|
Java
| false
| false
| 2,127
|
java
|
/*
* ____ _ ____ _ _ _____ ___ _
* / ___| / \ | _ \| \ | |_ _\ \ / / \ | |
* | | / _ \ | |_) | \| || | \ \ / / _ \ | |
* | |___/ ___ \| _ <| |\ || | \ V / ___ \| |___
* \____/_/ \_\_| \_\_| \_|___| \_/_/ \_\_____|
*
* https://github.com/yingzhuo/carnival
*/
package com.github.yingzhuo.carnival.jsr310;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.nio.CharBuffer;
import java.util.Set;
import java.util.stream.Collectors;
/**
* @author 应卓
*/
public class PasswordValidator implements ConstraintValidator<Password, String> {
private Password.Complexity complexity;
private Set<String> specialChars;
private int minLength;
private int maxLength;
@Override
public void initialize(Password annotation) {
this.complexity = annotation.complexity();
this.minLength = annotation.minLength();
this.maxLength = annotation.maxLength();
this.specialChars = CharBuffer.wrap(annotation.specialChars()).chars().mapToObj(ch -> String.valueOf((char) ch)).collect(Collectors.toSet());
}
@Override
public boolean isValid(String password, ConstraintValidatorContext context) {
final int len = password.length();
if (len < minLength || len > maxLength) return false;
if (complexity == Password.Complexity.NONE) {
return true;
}
if (complexity == Password.Complexity.NUMERIC) {
return password.matches(".*[0-9]+.*");
}
if (complexity == Password.Complexity.ALPHABETIC) {
return password.matches(".*[a-zA-Z]+.*");
}
if (complexity == Password.Complexity.ALPHABETIC_AND_NUMERIC) {
return password.matches(".*[a-zA-Z]+.*") && password.matches(".*[0-9]+.*");
}
if (complexity == Password.Complexity.ALPHABETIC_AND_NUMERIC_AND_SPECIAL_CHARS) {
return password.matches(".*[a-zA-Z]+.*") && password.matches(".*[0-9]+.*") && specialChars.stream().anyMatch(password::contains);
}
return true;
}
}
|
[
"yingzhor@gmail.com"
] |
yingzhor@gmail.com
|
5304c8f27021e9f3347f1785989104b1d4592a29
|
103e0d6c397ef2756a028fb1b3ef01b7b03f5460
|
/flickr/src/main/java/com/platzerworld/flickr/tasks/LoadUserTask.java
|
7f3bddda8e0ebf0b238a9f16c9e5b488d6d0dbde
|
[] |
no_license
|
platzerg/FakeMe
|
c46369f582cdf9ddd84cd153c2c56dd48cb46546
|
8fd3d4c973821ec83ac2d8262995adf359754262
|
refs/heads/master
| 2021-01-22T17:58:02.582762
| 2014-09-07T09:58:50
| 2014-09-07T09:58:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,403
|
java
|
package com.platzerworld.flickr.tasks;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.widget.ImageView;
import android.widget.Toast;
import com.googlecode.flickrjandroid.Flickr;
import com.googlecode.flickrjandroid.oauth.OAuth;
import com.googlecode.flickrjandroid.oauth.OAuthToken;
import com.googlecode.flickrjandroid.people.User;
import com.platzerworld.flickr.FlickrActivity;
import com.platzerworld.flickr.FlickrHelper;
import com.platzerworld.flickr.images.ImageUtils;
public class LoadUserTask extends AsyncTask<OAuth, Void, User> {
/**
*
*/
private final FlickrActivity flickrjAndroidSampleActivity;
private ImageView userIconImage;
private final Logger logger = LoggerFactory.getLogger(LoadUserTask.class);
public LoadUserTask(FlickrActivity flickrjAndroidSampleActivity,
ImageView userIconImage) {
this.flickrjAndroidSampleActivity = flickrjAndroidSampleActivity;
this.userIconImage = userIconImage;
}
/**
* The progress dialog before going to the browser.
*/
private ProgressDialog mProgressDialog;
@Override
protected void onPreExecute() {
super.onPreExecute();
mProgressDialog = ProgressDialog.show(flickrjAndroidSampleActivity,
"", "Loading user information..."); //$NON-NLS-1$ //$NON-NLS-2$
mProgressDialog.setCanceledOnTouchOutside(true);
mProgressDialog.setCancelable(true);
mProgressDialog.setOnCancelListener(new OnCancelListener() {
@Override
public void onCancel(DialogInterface dlg) {
LoadUserTask.this.cancel(true);
}
});
}
/* (non-Javadoc)
* @see android.os.AsyncTask#doInBackground(Params[])
*/
@Override
protected User doInBackground(OAuth... params) {
OAuth oauth = params[0];
User user = oauth.getUser();
OAuthToken token = oauth.getToken();
try {
Flickr f = FlickrHelper.getInstance()
.getFlickrAuthed(token.getOauthToken(), token.getOauthTokenSecret());
return f.getPeopleInterface().getInfo(user.getId());
} catch (Exception e) {
Toast.makeText(flickrjAndroidSampleActivity, e.toString(), Toast.LENGTH_LONG).show();
logger.error(e.getLocalizedMessage(), e);
}
return null;
}
/* (non-Javadoc)
* @see android.os.AsyncTask#onPostExecute(java.lang.Object)
*/
@Override
protected void onPostExecute(User user) {
if (mProgressDialog != null) {
mProgressDialog.dismiss();
}
if (user == null) {
return;
}
flickrjAndroidSampleActivity.setUser(user);
if (user.getBuddyIconUrl() != null) {
String buddyIconUrl = user.getBuddyIconUrl();
if (userIconImage != null) {
ImageDownloadTask task = new ImageDownloadTask(userIconImage);
Drawable drawable = new ImageUtils.DownloadedDrawable(task);
userIconImage.setImageDrawable(drawable);
task.execute(buddyIconUrl);
}
}
}
}
|
[
"guenter.platzerworld@googlemail.com"
] |
guenter.platzerworld@googlemail.com
|
2f3ece9cf4a1d2a31a12469e1b3f09b55c7c3ad3
|
36de8dd09c8281624faf450fd8986353b8f6b793
|
/src/osmedile/intellij/stringmanip/unused/WordsCamelCaseToWordsAction.java
|
4188f2d1d5facc5ce1c603ad054a4f67aa41aef1
|
[
"Apache-2.0"
] |
permissive
|
tan9/StringManipulation
|
49bf6856741158992494b6265ae8315804beb498
|
0129602dc688b0cc44932346a5c3567edb0bed5b
|
refs/heads/master
| 2023-03-20T23:26:45.189745
| 2021-03-06T02:38:24
| 2021-03-06T08:17:30
| 263,498,735
| 0
| 0
|
Apache-2.0
| 2020-05-13T01:53:52
| 2020-05-13T01:53:51
| null |
UTF-8
|
Java
| false
| false
| 791
|
java
|
package osmedile.intellij.stringmanip.unused;
import osmedile.intellij.stringmanip.AbstractStringManipAction;
import java.util.Map;
public class WordsCamelCaseToWordsAction extends AbstractStringManipAction<Object> {
public WordsCamelCaseToWordsAction() {
}
public WordsCamelCaseToWordsAction(boolean setupHandler) {
super(setupHandler);
}
@Override
public String transformByLine(Map<String, Object> actionContext, String s) {
String res = "";
for (int i = 0; i < s.length(); i++) {
Character ch = s.charAt(i);
if (i != 0 && s.charAt(i - 1) != ' ' && Character.isUpperCase(ch))
res += " " + Character.toLowerCase(ch);
else
res += ch;
}
return res;
}
}
|
[
"vojta.krasa@gmail.com"
] |
vojta.krasa@gmail.com
|
abaeb2011fd85d7bef3a5a8484520038b30d6235
|
a5f1da80efdc5ae8dfda2e18af2a1042e2ff9234
|
/src/com/cyb/collection/map/ObjectMapUtils.java
|
f63142709bcf8e2bbf0ebf3abb1341b91a4ead63
|
[] |
no_license
|
iechenyb/sina1.0
|
fb2b7b9247c7f6504e10d8301ee581a3b960bac2
|
aac363143e920a418f0cc3a8e3cadcb91cdb3acf
|
refs/heads/master
| 2021-05-23T04:47:39.852726
| 2020-05-15T00:32:27
| 2020-05-15T00:32:27
| 81,402,063
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,114
|
java
|
package com.cyb.collection.map;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.cyb.collection.po.User_;
/**
*作者 : iechenyb<br>
*类描述: 说点啥<br>
*创建时间: 2017年7月19日
*/
public class ObjectMapUtils {
static Log log = LogFactory.getLog(ObjectMapUtils.class);
/***
* 将对象转换为map对象
* @param thisObj 对象
* @return
*/
public static Map objectToMap(Object thisObj)
{
Map map = new HashMap();
Class c;
try
{
c = Class.forName(thisObj.getClass().getName());
//获取所有的方法
Method[] m = c.getMethods();
for (int i = 0; i < m.length; i++)
{ //获取方法名
String method = m[i].getName();
//获取get开始的方法名
if (method.startsWith("get")&&!method.contains("getClass"))
{
try{
//获取对应对应get方法的value值
Object value = m[i].invoke(thisObj);
if (value != null)
{
//截取get方法除get意外的字符 如getUserName-->UserName
String key=method.substring(3);
//将属性的第一个值转为小写
key=key.substring(0,1).toLowerCase()+key.substring(1);
//将属性key,value放入对象
map.put(key, value);
}
}catch (Exception e) {
System.out.println("error:"+method);
}
}
}
}
catch (Exception e)
{
e.printStackTrace();
}
return map;
}
/**
* 将Map对象通过反射机制转换成Bean对象
*
* @param map 存放数据的map对象
* @param clazz 待转换的class
* @return 转换后的Bean对象
* @throws Exception 异常
*/
public static Object mapToObject(Map<String, Object> map, Class<?> clazz) throws Exception {
Object obj = clazz.newInstance();
if(map != null && map.size() > 0) {
for(Map.Entry<String, Object> entry : map.entrySet()) {
String propertyName = entry.getKey(); //属性名
Object value = entry.getValue();
String setMethodName = "set"
+ propertyName.substring(0, 1).toUpperCase()
+ propertyName.substring(1);
//获取属性对应的对象字段
Field field = getClassField(clazz, propertyName);
if(field==null){
continue;
}
//获取字段类型
Class<?> fieldTypeClass = field.getType();
//根据字段类型进行值的转换
value = convertValType(value, fieldTypeClass);
try{
//调用对象对应的set方法
clazz.getMethod(setMethodName, field.getType()).invoke(obj, value);
}catch(NoSuchMethodException e){
e.printStackTrace();
}
}
}
return obj;
}
/**
* 获取指定字段名称查找在class中的对应的Field对象(包括查找父类)
*
* @param clazz 指定的class
* @param fieldName 字段名称
* @return Field对象
*/
private static Field getClassField(Class<?> clazz, String fieldName) {
if( Object.class.getName().equals(clazz.getName())) {
return null;
}
Field []declaredFields = clazz.getDeclaredFields();
for (Field field : declaredFields) {
if (field.getName().equals(fieldName)) {
return field;
}
}
Class<?> superClass = clazz.getSuperclass();
if(superClass != null) {// 简单的递归一下
return getClassField(superClass, fieldName);
}
return null;
}
/**
* 将Object类型的值,转换成bean对象属性里对应的类型值
*
* @param value Object对象值
* @param fieldTypeClass 属性的类型
* @return 转换后的值
*/
private static Object convertValType(Object value, Class<?> fieldTypeClass) {
Object retVal = null;
if(Long.class.getName().equals(fieldTypeClass.getName())
|| long.class.getName().equals(fieldTypeClass.getName())) {
retVal = Long.parseLong(value.toString());
} else if(Integer.class.getName().equals(fieldTypeClass.getName())
|| int.class.getName().equals(fieldTypeClass.getName())) {
retVal = Integer.parseInt(value.toString());
} else if(Float.class.getName().equals(fieldTypeClass.getName())
|| float.class.getName().equals(fieldTypeClass.getName())) {
retVal = Float.parseFloat(value.toString());
} else if(Double.class.getName().equals(fieldTypeClass.getName())
|| double.class.getName().equals(fieldTypeClass.getName())) {
retVal = Double.parseDouble(value.toString());
} else {
retVal = value;
}
return retVal;
}
public static void main(String... args) throws Exception{
User_ user = new User_();
user.setName("iechenyb");
user.setPwd("1232334");
//对象转map
Map map = objectToMap(user);
log.info("obj2map="+map);
//map转对象
User_ newUser = (User_) mapToObject(map,User_.class);
log.info("map2user="+newUser);
}
}
|
[
"zzuchenyb@sina.com"
] |
zzuchenyb@sina.com
|
ccfc104753d98ae90b6cb885b8ae3f25d0acf6f4
|
e561d6ea521a4d7eee9c96eca671ae6212406309
|
/Java/src/Programmers/PG12914.java
|
0353e60aca9eb5cb59a537119a599dfef87cf2c0
|
[] |
no_license
|
Seungpang/Algorithms
|
02a9a9dc3225caf8651c03208334082024deb65f
|
f7e6c5f28ce3b6509cb91d7aca162f36ae837b82
|
refs/heads/master
| 2023-08-19T03:30:24.346606
| 2023-08-17T15:50:18
| 2023-08-17T15:50:18
| 176,178,409
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 431
|
java
|
package Programmers;
public class PG12914 {
public static void main(String[] args) {
final PG12914 pg12914 = new PG12914();
System.out.println(pg12914.solution(2000));
}
public long solution(int n) {
int[] dp = new int[2001];
dp[1] = 1;
dp[2] = 2;
for (int i=3; i <= n; i++) {
dp[i] = (dp[i-2] + dp[i-1]) % 1234567;
}
return dp[n];
}
}
|
[
"obey1342@gmail.com"
] |
obey1342@gmail.com
|
1df1b2d5e6025aa134d43d0b05a7f17ad59e3721
|
5bee638e7ea3cbe9982432e54f1defff0b858a24
|
/src/java/co/com/siscomputo/endpoint/ActualizarTipoAlmacenamiento.java
|
82a2ecbc8283fd5a53dad360eb642feabed01906
|
[] |
no_license
|
oscar1992/ISODOC
|
baa5e38f6b52fae1d766a9bc32841ed26b1694ee
|
3ebfc61adb4844322eaae8899613641c24183697
|
refs/heads/master
| 2021-01-10T06:03:41.422443
| 2016-02-19T22:30:38
| 2016-02-19T22:30:38
| 45,137,805
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,522
|
java
|
package co.com.siscomputo.endpoint;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Clase Java para actualizarTipoAlmacenamiento complex type.
*
* <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase.
*
* <pre>
* <complexType name="actualizarTipoAlmacenamiento">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="objeto" type="{http://endpoint.siscomputo.com.co/}tipoAlmacenamientoEntity" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "actualizarTipoAlmacenamiento", propOrder = {
"objeto"
})
public class ActualizarTipoAlmacenamiento {
protected TipoAlmacenamientoEntity objeto;
/**
* Obtiene el valor de la propiedad objeto.
*
* @return
* possible object is
* {@link TipoAlmacenamientoEntity }
*
*/
public TipoAlmacenamientoEntity getObjeto() {
return objeto;
}
/**
* Define el valor de la propiedad objeto.
*
* @param value
* allowed object is
* {@link TipoAlmacenamientoEntity }
*
*/
public void setObjeto(TipoAlmacenamientoEntity value) {
this.objeto = value;
}
}
|
[
"LENOVO@LENOVO-PC"
] |
LENOVO@LENOVO-PC
|
51a964baa2a7d14907fc7a4995324d9feeab2bd0
|
522504e5dc74bb52f4f47beeef17baac0a9e62b0
|
/jbase/common/src/main/java/cn/itsite/jbase/common/annotation/DataFilter.java
|
5e56cebe8738545c3c02fd1f47b9bc1a31126fb0
|
[] |
no_license
|
leguang/JCloud
|
96205dd68490a3cc8a255c25270f250e5383163d
|
0924a525b26de2622e583ab44b8e4800a43a8bdb
|
refs/heads/master
| 2020-05-01T11:56:04.344481
| 2019-03-29T02:31:29
| 2019-03-29T02:31:29
| 177,455,176
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,280
|
java
|
/**
* Copyright 2018 人人开源 http://www.renren.io
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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 cn.itsite.jbase.common.annotation;
import java.lang.annotation.*;
/**
* 数据过滤
*
* @author Mark sunlightcs@gmail.com
* @since 3.0.0 2017-09-17
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DataFilter {
/** 表的别名 */
String tableAlias() default "";
/** true:没有本部门数据权限,也能查询本人数据 */
boolean user() default true;
/** true:拥有子部门数据权限 */
boolean subDept() default false;
/** 部门ID */
String deptId() default "dept_id";
/** 用户ID */
String userId() default "user_id";
}
|
[
"admin@example.com"
] |
admin@example.com
|
d12e69220ed69019f8d9ee82a5aeac12920df31b
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/84_ifx-framework-org.sourceforge.ifx.framework.pain004.simpletype.CashAccountType2Code-0.5-5/org/sourceforge/ifx/framework/pain004/simpletype/CashAccountType2Code_ESTest.java
|
44b84b9294892d64b58ac2b324457acb2cdcd9f9
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 694
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Oct 29 13:26:14 GMT 2019
*/
package org.sourceforge.ifx.framework.pain004.simpletype;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class CashAccountType2Code_ESTest extends CashAccountType2Code_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
16b42786f778f5eab16c265155fa3326bbf5c1ae
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/aq/o.java
|
2dc96d5c829611ca1741f431cf43840601838f23
|
[] |
no_license
|
jambestwick/HackWechat
|
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
|
6a34899c8bfd50d19e5a5ec36a58218598172a6b
|
refs/heads/master
| 2022-01-27T12:48:43.446804
| 2021-12-29T10:36:30
| 2021-12-29T10:36:30
| 249,366,791
| 0
| 0
| null | 2020-03-23T07:48:32
| 2020-03-23T07:48:32
| null |
UTF-8
|
Java
| false
| false
| 4,784
|
java
|
package com.tencent.mm.aq;
import android.os.Looper;
import com.tencent.mm.ae.e;
import com.tencent.mm.aq.a.a;
import com.tencent.mm.aq.d.b;
import com.tencent.mm.by.h.d;
import com.tencent.mm.kernel.g;
import com.tencent.mm.modelsfs.SFSContext;
import com.tencent.mm.sdk.b.c;
import com.tencent.mm.sdk.platformtools.bh;
import com.tencent.mm.sdk.platformtools.x;
import com.tencent.mm.z.ap;
import com.tencent.mm.z.p;
import java.util.HashMap;
public class o implements ap {
private static HashMap<Integer, d> gwY;
private j hCA = new j();
private d hCB = null;
private h hCC = new h();
private b hCD = null;
private p hCE = null;
private c hCF = new 1(this);
private a hCG = null;
private SFSContext hCH = null;
private SFSContext hCI = null;
private g hCx;
private i hCy;
private c hCz;
private static synchronized o Pt() {
o oVar;
synchronized (o.class) {
oVar = (o) p.s(o.class);
}
return oVar;
}
public static i Pu() {
if (Pt().hCy == null) {
Pt().hCy = new i();
}
return Pt().hCy;
}
public static c Pv() {
g.Dh().Ct();
if (Pt().hCz == null) {
Pt().hCz = new c();
}
return Pt().hCz;
}
public static g Pw() {
g.Dh().Ct();
if (Pt().hCx == null) {
Pt().hCx = new g(g.Dj().gQj);
}
return Pt().hCx;
}
public static d Px() {
g.Dh().Ct();
if (Pt().hCB == null) {
Pt().hCB = new d();
}
return Pt().hCB;
}
public static b Py() {
g.Dh().Ct();
if (Pt().hCD == null) {
Pt().hCD = new b(Looper.getMainLooper());
}
return Pt().hCD;
}
public static p Pz() {
g.Dh().Ct();
if (Pt().hCE == null) {
Pt().hCE = new p();
}
return Pt().hCE;
}
public static a PA() {
g.Dh().Ct();
if (Pt().hCG == null) {
Pt().hCG = a.PH();
}
return Pt().hCG;
}
public static SFSContext PB() {
return null;
}
public final void onAccountRelease() {
o Pt = Pt();
if (Pt.hCy != null) {
e eVar = Pt.hCy;
eVar.flT = 0;
g.Di().gPJ.b(110, eVar);
}
if (Pt.hCD != null) {
b bVar = Pt.hCD;
synchronized (bVar.hzl) {
bVar.hzl.clear();
bVar.hzm = 0;
Px().a(bVar);
}
com.tencent.mm.sdk.b.a.xef.c(bVar.hzx);
com.tencent.mm.sdk.b.a.xef.c(bVar.hzy);
}
if (Pt.hCB != null) {
e eVar2 = Pt.hCB;
x.i("ModelImage.DownloadImgService", "on detach");
x.i("ModelImage.DownloadImgService", "cancel all net scene");
eVar2.hzH = true;
eVar2.b(eVar2.hzF);
while (eVar2.hzD.size() > 0) {
eVar2.b((b) eVar2.hzD.get(0));
}
eVar2.Pc();
g.Di().gPJ.b(109, eVar2);
}
if (Pt.hCE != null) {
p pVar = Pt.hCE;
x.i("MicroMsg.UrlImageCacheService", "detach");
pVar.hCK.clear();
pVar.hCM = true;
}
PC();
com.tencent.mm.ae.d.c.b(Integer.valueOf(3), this.hCC);
com.tencent.mm.ae.d.c.b(Integer.valueOf(23), this.hCC);
com.tencent.mm.cache.e.a.a("local_cdn_img_cache", null);
com.tencent.mm.sdk.b.a.xef.c(this.hCF);
if (Pt.hCG != null) {
Pt.hCG.detach();
Pt.hCG = null;
}
if (Pt.hCH != null) {
Pt.hCH.release();
Pt.hCH = null;
}
if (Pt.hCI != null) {
Pt.hCI.release();
Pt.hCI = null;
}
}
public static void PC() {
g gVar = Pt().hCx;
if (gVar != null) {
x.i("MicroMsg.ImgInfoStorage", "clearCacheMap stack:%s", new Object[]{bh.cgy()});
gVar.hAw.a(new g$3(gVar));
}
a aVar = Pt().hCG;
if (aVar != null) {
aVar.detach();
}
}
static {
HashMap hashMap = new HashMap();
gwY = hashMap;
hashMap.put(Integer.valueOf("IMGINFO_TABLE".hashCode()), new 2());
}
public final HashMap<Integer, d> Bn() {
return gwY;
}
public final void gd(int i) {
}
public final void bq(boolean z) {
com.tencent.mm.ae.d.c.a(Integer.valueOf(3), this.hCC);
com.tencent.mm.ae.d.c.a(Integer.valueOf(23), this.hCC);
com.tencent.mm.cache.e.a.a("local_cdn_img_cache", this.hCA);
com.tencent.mm.sdk.b.a.xef.b(this.hCF);
}
public final void br(boolean z) {
}
}
|
[
"malin.myemail@163.com"
] |
malin.myemail@163.com
|
850782ecf62bd9ab37a4d3191bd47022d0c723dd
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/XWIKI-13916-3-30-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/com/xpn/xwiki/objects/classes/BaseClass_ESTest.java
|
bc5f58694e526be47805a241ee8d34da3b9bcfd9
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,026
|
java
|
/*
* This file was automatically generated by EvoSuite
* Thu Oct 28 15:41:50 UTC 2021
*/
package com.xpn.xwiki.objects.classes;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.xpn.xwiki.objects.classes.BaseClass;
import com.xpn.xwiki.objects.classes.TextAreaClass;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class BaseClass_ESTest extends BaseClass_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
BaseClass baseClass0 = new BaseClass();
baseClass0.addTextField("y", "[eck#H92{m#aKyQq", (-2258));
TextAreaClass.ContentType textAreaClass_ContentType0 = TextAreaClass.ContentType.WIKI_TEXT;
// Undeclared exception!
baseClass0.addTextAreaField("y", "[eck#H92{m#aKyQq", (-765), 304, textAreaClass_ContentType0);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
11a1af3a5ac1c51d8f11c799acce822f86d7e006
|
930eb3cae2072d0f9b87d585a05ee92f7fc81218
|
/BroadcastBestPractice/app/src/main/java/cn/shui/broadcastbestpractice/MainActivity.java
|
299443c1ed166021653b777961a214524e0b14f7
|
[] |
no_license
|
shuile/FirstCode_Android
|
fb38825b3ae2b102cae39e577f5d20acef06ada9
|
f7c1c6f2d91629ed80fac608bccdebadef4bc6e5
|
refs/heads/master
| 2020-08-02T16:39:16.186550
| 2019-12-05T17:03:01
| 2019-12-05T17:03:01
| 211,432,152
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 730
|
java
|
package cn.shui.broadcastbestpractice;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button forceOffline = findViewById(R.id.force_offline);
forceOffline.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent("com.shui.broadcastbestpractice.FORCE_OFFLINE");
sendBroadcast(intent);
}
});
}
}
|
[
"chenyiting1995@gmail.com"
] |
chenyiting1995@gmail.com
|
761ca8fc83a2f5aef9b5dd93cd02844a909d4000
|
254292bbb95222cd6a97eae493e28b5a63c14a9d
|
/spring-boot-integration-tests/spring-boot-integration-tests-embedded-servlet-container/src/test/java/org/springframework/boot/context/embedded/ExplodedApplicationLauncher.java
|
72539c58a223cc859bd52cd958614a41b00887e7
|
[
"Apache-2.0"
] |
permissive
|
pikefeier/springboot
|
0e881a59ceefd3ae1991e83a0ad4a4d787831097
|
2fb23ab250f095dec39bf5e4d114c26d51467142
|
refs/heads/master
| 2023-01-09T02:51:23.939848
| 2019-12-30T12:19:14
| 2019-12-30T12:19:14
| 230,909,567
| 0
| 0
|
Apache-2.0
| 2022-12-27T14:51:00
| 2019-12-30T12:10:46
|
Java
|
UTF-8
|
Java
| false
| false
| 2,666
|
java
|
/*
* Copyright 2012-2017 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.springframework.boot.context.embedded;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.List;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import org.springframework.util.FileSystemUtils;
import org.springframework.util.StreamUtils;
/**
* {@link AbstractApplicationLauncher} that launches a Spring Boot application using
* {@code JarLauncher} or {@code WarLauncher} and an exploded archive.
*
* @author Andy Wilkinson
*/
class ExplodedApplicationLauncher extends AbstractApplicationLauncher {
private final File exploded = new File("target/exploded");
ExplodedApplicationLauncher(ApplicationBuilder applicationBuilder) {
super(applicationBuilder);
}
@Override
protected File getWorkingDirectory() {
return this.exploded;
}
@Override
protected String getDescription(String packaging) {
return "exploded " + packaging;
}
@Override
protected List<String> getArguments(File archive) {
String mainClass = archive.getName().endsWith(".war")
? "org.springframework.boot.loader.WarLauncher"
: "org.springframework.boot.loader.JarLauncher";
try {
explodeArchive(archive);
return Arrays.asList("-cp", this.exploded.getAbsolutePath(), mainClass);
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
private void explodeArchive(File archive) throws IOException {
FileSystemUtils.deleteRecursively(this.exploded);
JarFile jarFile = new JarFile(archive);
Enumeration<JarEntry> entries = jarFile.entries();
while (entries.hasMoreElements()) {
JarEntry jarEntry = entries.nextElement();
File extracted = new File(this.exploded, jarEntry.getName());
if (jarEntry.isDirectory()) {
extracted.mkdirs();
} else {
FileOutputStream extractedOutputStream = new FileOutputStream(extracted);
StreamUtils.copy(jarFile.getInputStream(jarEntry), extractedOutputStream);
extractedOutputStream.close();
}
}
jarFile.close();
}
}
|
[
"945302777@qq.com"
] |
945302777@qq.com
|
72838473c48a9c9d434e9c46b12c95ce8a7ecf3f
|
1cf8449e6cf38e5d7e21afda890527c1c519152e
|
/lswdYoupin/lswd-service/src/main/java/RFID/RfidFunction.java
|
895d2ca2d3acf2e880e778c32f2057dc84ba9e96
|
[] |
no_license
|
sunzhenpeng/lswdYoupin
|
2ce704575fc29f6ada480c15242ee5436a99fd5c
|
dcadb056374a4a1588d1304ebfd69e5fd7507bb3
|
refs/heads/master
| 2020-04-11T21:06:50.531422
| 2018-12-17T08:03:58
| 2018-12-17T08:03:58
| 162,095,245
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,649
|
java
|
package RFID;
public class RfidFunction {
/**
* 用于建立十六进制字符的输出的小写字符数组
*/
private static final char[] DIGITS_LOWER = { '0', '1', '2', '3', '4', '5',
'6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
/**
* 用于建立十六进制字符的输出的大写字符数组
*/
private static final char[] DIGITS_UPPER = { '0', '1', '2', '3', '4', '5',
'6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
/**
* 将字节数组转换为十六进制字符数组
*
* @param data
* byte[]
* @return 十六进制char[]
*/
public static char[] encodeHex(byte[] data) {
return encodeHex(data, true);
}
public static char[] encodeHex(byte[] data ,int dataLen) {
return encodeHex(data, dataLen,true);
}
/**
* 将字节数组转换为十六进制字符数组
*
* @param data
* byte[]
* @param toLowerCase
* <code>true</code> 传换成小写格式 , <code>false</code> 传换成大写格式
* @return 十六进制char[]
*/
public static char[] encodeHex(byte[] data, boolean toLowerCase) {
return encodeHex(data, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER);
}
public static char[] encodeHex(byte[] data,int dataLen, boolean toLowerCase) {
return encodeHex(data, dataLen,toLowerCase ? DIGITS_LOWER : DIGITS_UPPER);
}
/**
* 将字节数组转换为十六进制字符数组
*
* @param data
* byte[]
* @param toDigits
* 用于控制输出的char[]
* @return 十六进制char[]
*/
protected static char[] encodeHex(byte[] data, char[] toDigits) {
int len = data.length;
char[] out = new char[len << 1];
// two characters form the hex value.
for (int i = 0, j = 0; i < len; i++) {
out[j++] = toDigits[(0xF0 & data[i]) >>> 4];
out[j++] = toDigits[0x0F & data[i]];
}
return out;
}
protected static char[] encodeHex(byte[] data, int dataLen,char[] toDigits) {
int len = dataLen;//dataLen;//data.length;
char[] out = new char[len << 1];
for (int i = 0, j = 0; i < len; i++) {
out[j++] = toDigits[(0xF0 & data[i]) >>> 4];
out[j++] = toDigits[0x0F & data[i]];
}
return out;
}
/**
* 将字节数组转换为十六进制字符串
*
* @param data
* byte[]
* @return 十六进制String
*/
public static String encodeHexStr(byte[] data) {
return encodeHexStr(data, false);
}
public static String encodeHexStr(byte[] data,int dataLen) {
return encodeHexStr(data,dataLen,false);
}
/**
* 将字节数组转换为十六进制字符串
*
* @param data
* byte[]
* @param toLowerCase
* <code>true</code> 传换成小写格式 , <code>false</code> 传换成大写格式
* @return 十六进制String
*/
public static String encodeHexStr(byte[] data, boolean toLowerCase) {
return encodeHexStr(data, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER);
}
public static String encodeHexStr(byte[] data,int dataLen,boolean toLowerCase) {
return encodeHexStr(data,dataLen, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER);
}
/**
* 将字节数组转换为十六进制字符串
*
* @param data
* byte[]
* @param toDigits
* 用于控制输出的char[]
* @return 十六进制String
*/
protected static String encodeHexStr(byte[] data, char[] toDigits) {
return new String(encodeHex(data, toDigits));
}
protected static String encodeHexStr(byte[] data,int dataLen,char[] toDigits) {
return new String(encodeHex(data,dataLen,toDigits));
}
/**
* 将十六进制字符数组转换为字节数组
*
* @param data
* 十六进制char[]
* @return byte[]
* @throws RuntimeException
* 如果源十六进制字符数组是一个奇怪的长度,将抛出运行时异常
*/
public static byte[] decodeHex(char[] data) {
int len = data.length;
if ((len & 0x01) != 0) {
throw new RuntimeException("Odd number of characters.");
}
byte[] out = new byte[len >> 1];
// two characters form the hex value.
for (int i = 0, j = 0; j < len; i++) {
int f = toDigit(data[j], j) << 4;
j++;
f = f | toDigit(data[j], j);
j++;
out[i] = (byte) (f & 0xFF);
}
return out;
}
public static byte[] decodeHex(char[] data,int dataLen) {
int len = dataLen;
if ((len & 0x01) != 0) {
throw new RuntimeException("Odd number of characters.");
}
byte[] out = new byte[len >> 1];
// two characters form the hex value.
for (int i = 0, j = 0; j < len; i++) {
int f = toDigit(data[j], j) << 4;
j++;
f = f | toDigit(data[j], j);
j++;
out[i] = (byte) (f & 0xFF);
}
return out;
}
public static byte[] decodeHex(String sData) {
char[]data = sData.toCharArray();
int len = data.length;
if ((len & 0x01) != 0) {
throw new RuntimeException("Odd number of characters.");
}
byte[] out = new byte[len >> 1];
// two characters form the hex value.
for (int i = 0, j = 0; j < len; i++) {
int f = toDigit(data[j], j) << 4;
j++;
f = f | toDigit(data[j], j);
j++;
out[i] = (byte) (f & 0xFF);
}
return out;
}
/**
* 将十六进制字符转换成一个整数
*
* @param ch
* 十六进制char
* @param index
* 十六进制字符在字符数组中的位置
* @return 一个整数
* @throws RuntimeException
* 当ch不是一个合法的十六进制字符时,抛出运行时异常
*/
protected static int toDigit(char ch, int index) {
int digit = Character.digit(ch, 16);
if (digit == -1) {
throw new RuntimeException("Illegal hexadecimal character " + ch
+ " at index " + index);
}
return digit;
}
}
|
[
"sunzhenpeng_g@163.com"
] |
sunzhenpeng_g@163.com
|
a53700da6113d23460b4ed094db97e9507782c8d
|
7d68a34e09e2ab22fbe0efe43ff6b3ccf44cf8a3
|
/NTSP69 Final/DAOEmpSearchApp2/src/main/java/com/nt/controller/MainControllerServlet.java
|
592bf65177e4068e767d3c6982a6346121744080
|
[] |
no_license
|
ALLISWELL-REPO/Natraj
|
293a9d65eb1de585fbf3d9b4f233a2c5ace1c6f6
|
cab1ce5c12df97e59b5cac0f53bf77c99012951a
|
refs/heads/master
| 2022-12-02T01:08:41.704483
| 2019-10-01T19:30:40
| 2019-10-01T19:30:40
| 212,178,682
| 0
| 0
| null | 2022-11-24T07:12:43
| 2019-10-01T19:09:51
|
Java
|
UTF-8
|
Java
| false
| false
| 1,645
|
java
|
package com.nt.controller;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.nt.service.EmployeeService;
public class MainControllerServlet extends HttpServlet {
ApplicationContext ctx;
EmployeeService service;
@Override
public void init() throws ServletException {
//create IOC container
ctx=new ClassPathXmlApplicationContext("com/nt/cfgs/applicationContext.xml");
//get Service class object
service=ctx.getBean("empService",EmployeeService.class);
}
@Override
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
String desgs[]=null;
List<Map<String,Object>> list=null;
RequestDispatcher rd=null;
//read form data
desgs=req.getParameterValues("desgs");
try{
//use service
list=service.fetchEmpDetialsByDesgs(desgs);
}//try
catch(Exception e){
rd=req.getRequestDispatcher("/error.jsp");
rd.forward(req,res);
return;
}
//keep result in request scope
req.setAttribute("empList",list);
//forward the request result.jsp
rd=req.getRequestDispatcher("/result.jsp");
rd.forward(req, res);
}//doGet(-,-)
@Override
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
doGet(req,res);
}
}//class
|
[
"alliswellrepo@gmail.com"
] |
alliswellrepo@gmail.com
|
d6b2023bc4f23c6189eb862238a73349fad3b25b
|
c9825f01b1dc42c261410bd6148d8072024e7039
|
/src/pl/asie/charset/cursifier/Utils.java
|
f2fe75d81cf3762ff96e87d252655e39f8e62e31
|
[] |
no_license
|
CharsetMC/CharsetUploader
|
2fd162b7d705c467d33ffa4cb56a01ac0df373d9
|
d9e6dd6a578118d998387ae9753a8224c4504c40
|
refs/heads/main
| 2022-03-09T14:05:39.753876
| 2022-02-21T21:56:30
| 2022-02-21T21:56:30
| 115,935,686
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,498
|
java
|
package pl.asie.charset.cursifier;
import com.google.common.hash.Hashing;
import com.google.common.io.ByteStreams;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.util.Set;
import java.util.function.BiFunction;
import java.util.function.Predicate;
import java.util.jar.JarEntry;
import java.util.jar.JarOutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public final class Utils {
private Utils() {
}
static String stripInnerClass(String s) {
return s.replaceFirst("\\$[a-zA-Z0-9\\$]+\\.class$", "\\.class");
}
public static void copy(File zipFile, JarOutputStream stream, Set<String> filesLeft, Predicate<ZipEntry> pass, BiFunction<ZipEntry, ZipInputStream, byte[]> patcher) throws IOException {
ZipInputStream inStream = new ZipInputStream(new FileInputStream(zipFile));
ZipEntry entry;
while ((entry = inStream.getNextEntry()) != null) {
if (!entry.getName().equals("META-INF/MANIFEST.MF") && pass.test(entry)) {
filesLeft.remove(entry.getName());
JarEntry entryNew = new JarEntry(entry.getName());
entryNew.setTime(entry.getTime());
stream.putNextEntry(entryNew);
if (patcher != null) {
byte[] patch = patcher.apply(entry, inStream);
if (patch != null) {
stream.write(patch);
stream.closeEntry();
continue;
}
}
ByteStreams.copy(inStream, stream);
stream.closeEntry();
}
}
inStream.close();
}
}
|
[
"kontakt@asie.pl"
] |
kontakt@asie.pl
|
8401c6eccb23a1d17912086ac840d14550b6eb6e
|
44e28c55f2ffef2b581a181e7f74ed2f2d66ad3e
|
/src/edu/nju/desserthouse/action/book/ShopNextDayAction.java
|
84ab966cd93d6913b38ea9f3febd8f73251f2298
|
[] |
no_license
|
bobo15850/DessertHouse
|
1cff7e45f6f0246a08b413e2ad4b7cbd08e1afbd
|
856f35721e494af4192085546c9cdecc72e11b46
|
refs/heads/master
| 2021-01-17T06:41:57.011911
| 2016-03-17T02:32:26
| 2016-03-17T02:32:26
| 50,285,924
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,795
|
java
|
package edu.nju.desserthouse.action.book;
import java.sql.Date;
import java.util.List;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import edu.nju.desserthouse.action.BaseAction;
import edu.nju.desserthouse.model.Goods;
import edu.nju.desserthouse.model.Shop;
import edu.nju.desserthouse.service.BookService;
import edu.nju.desserthouse.service.RegionService;
import edu.nju.desserthouse.service.ShopService;
public class ShopNextDayAction extends BaseAction {
private static final long serialVersionUID = -8823719051948302903L;
private int shopId;
private String curDateStr;
@Autowired
private BookService bookService;
@Autowired
private ShopService shopService;
@Autowired
private RegionService regionService;
@Override
@Action(value = "shopNextDay", results = { @Result(name = SUCCESS, location = "/page/book/bookGoods.jsp") })
public String execute() throws Exception {
Shop shop = shopService.getShopById(shopId);
String regionStr = regionService.getCompleteRegionStr(shop.getRegion().getId());
Date curDate = Date.valueOf(curDateStr);
Date nextDate = new Date(curDate.getTime() + 24 * 60 * 60 * 1000);
List<Goods> goodsList = bookService.getTrgetDayGoods(shopId, nextDate);
request.setAttribute("shop", shop);
request.setAttribute("shopRegionStr", regionStr);
request.setAttribute("date", nextDate);
request.setAttribute("goodsList", goodsList);
return SUCCESS;
}
public int getShopId() {
return shopId;
}
public void setShopId(int shopId) {
this.shopId = shopId;
}
public String getCurDateStr() {
return curDateStr;
}
public void setCurDateStr(String curDateStr) {
this.curDateStr = curDateStr;
}
}
|
[
"1248373163@qq.com"
] |
1248373163@qq.com
|
a5e0011d5fe76a52ab9850a682a17153681e720f
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/org/geoserver/platform/GeoServerExtensionsHelperTest.java
|
cfa7ea0eff893f7dad2c827930e408f3c0c81999
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 2,273
|
java
|
/**
* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* (c) 2014 OpenPlans
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.platform;
import java.io.File;
import org.hamcrest.Matchers;
import org.junit.Assert;
import org.junit.Test;
public class GeoServerExtensionsHelperTest {
@Test
public void helperProperty() {
Assert.assertEquals("ABC", GeoServerExtensions.getProperty("TEST_PROPERTY"));
GeoServerExtensionsHelper.property("TEST_PROPERTY", "abc");
Assert.assertEquals("abc", GeoServerExtensions.getProperty("TEST_PROPERTY"));
GeoServerExtensionsHelper.clear();
Assert.assertEquals("ABC", GeoServerExtensions.getProperty("TEST_PROPERTY"));
}
@Test
public void helperSingleton() {
GeoServerExtensionsHelper.singleton("bean", this);
Assert.assertSame(this, GeoServerExtensions.bean("bean"));
Assert.assertSame(this, GeoServerExtensions.bean(GeoServerExtensionsHelperTest.class));
GeoServerExtensionsHelper.clear();
Assert.assertNull(GeoServerExtensions.bean("bean"));
Assert.assertNull(GeoServerExtensions.bean(GeoServerExtensionsHelperTest.class));
}
class TestClass {}
@SuppressWarnings("unchecked")
@Test
public void helperMultipleSingleton() {
GeoServerExtensionsHelperTest.TestClass o1 = new GeoServerExtensionsHelperTest.TestClass();
GeoServerExtensionsHelperTest.TestClass o2 = new GeoServerExtensionsHelperTest.TestClass();
GeoServerExtensionsHelper.singleton("o1", o1, GeoServerExtensionsHelperTest.TestClass.class);
GeoServerExtensionsHelper.singleton("o2", o2, GeoServerExtensionsHelperTest.TestClass.class);
Assert.assertThat(GeoServerExtensions.extensions(GeoServerExtensionsHelperTest.TestClass.class), Matchers.containsInAnyOrder(Matchers.sameInstance(o1), Matchers.sameInstance(o2)));
}
@Test
public void helperFile() {
File webxml = new File("web.xml");// we are not touching the file so anywhere is fine
GeoServerExtensionsHelper.file("WEB-INF/web.xml", webxml);
Assert.assertSame(webxml, GeoServerExtensions.file("WEB-INF/web.xml"));
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
b5b5fad770349828ab6c86ba78ad15184482e5dd
|
534c1934a8eed6a6b2ad3b866adfc6805b5f2984
|
/issue/src/main/java/com/ibm/service/IssueService.java
|
cf23fadd3d69999f787573b7ab044b655fe61f4a
|
[] |
no_license
|
1291334282/eclipsegit
|
6869390bfdbe0d3d8aaaefc7b37ca5c4e8d3d817
|
7041cd46b83bfd41d4a0f4aeb23761bd6dff6f69
|
refs/heads/master
| 2023-01-13T22:24:38.250913
| 2020-11-27T03:05:23
| 2020-11-27T03:05:23
| 314,166,763
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,890
|
java
|
package com.ibm.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ibm.entity.Issue;
import com.ibm.entity.IssueUser;
import com.ibm.entity.User;
import com.ibm.mapper.IssueMapper;
@Service
public class IssueService {
@Autowired
IssueMapper issueMapper;
public List<Issue> issueCount() {
return issueMapper.issueCount();
}
public List<IssueUser> issueIdOrName(IssueUser issueUser) {
return issueMapper.issueIdOrName(issueUser);
}
public void addIssue(Issue issue) {
issueMapper.addIssue(issue);
}
public User findByUserID(Integer userID) {
return issueMapper.findByUserID(userID);
}
public List<IssueUser> findIssuetask(Integer userID) {
return issueMapper.findIssuetask(userID);
}
// issue模糊查询
public List<IssueUser> findLikeIssue(IssueUser issueUser) {
return issueMapper.findLikeIssue(issueUser);
}
// issue修改
public void UpdateIssue(Issue issue) {
issueMapper.UpdateIssue(issue);
}
// issue修改:解决方案solution
public void UpdateIssueSolution(Issue issue) {
issueMapper.UpdateIssueSolution(issue);
}
// issue创建人需验证修改:状态issuestate
public void UpdateIssueState(Issue issue) {
issueMapper.UpdateIssueState(issue);
}
// issue创建人需验证修改:状态issuestate 报错
public Issue compareIssueidUserid(Issue issue) {
return issueMapper.compareIssueidUserid(issue);
}
public List<IssueUser> findIssueAll() {
return issueMapper.findIssueAll();
}
// issue查询登录用户的创建issue
public List<IssueUser> findCreateIssue(String creater) {
return issueMapper.findCreateIssue(creater);
}
// issue模糊查询:登录用户的新建issue
public List<IssueUser> findLikeNewIssue(IssueUser issueUser) {
return issueMapper.findLikeNewIssue(issueUser);
}
}
|
[
"email"
] |
email
|
361d5b522ce2d6e1a0b2f4f826465339fd0b6b94
|
92dcfa1a9f836b3bbaf9339d5cfa1c00609f0414
|
/admin-gateway/src/main/java/com/future/gameplatform/admin/web/filter/SysUserFilter.java
|
d3a082931b247a9d571b51e38d0a23abeea3de1e
|
[] |
no_license
|
game-platform-awaresome/game-platform
|
d839566476c13bec5938a906ee82673579762aab
|
5b489e4b35366124fe23a2b0ee240de834521a41
|
refs/heads/master
| 2020-04-01T15:05:31.689435
| 2015-02-14T05:37:38
| 2015-02-14T05:37:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,159
|
java
|
package com.future.gameplatform.admin.web.filter;
import com.future.gameplatform.admin.Constants;
import com.future.gameplatform.admin.service.UserService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.web.filter.PathMatchingFilter;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
/**
* <p>User: Zhang Kaitao
* <p>Date: 14-2-15
* <p>Version: 1.0
*/
public class SysUserFilter extends PathMatchingFilter {
@Autowired
private UserService userService;
@Override
protected boolean onPreHandle(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception {
String username = (String)SecurityUtils.getSubject().getPrincipal();
request.setAttribute(Constants.CURRENT_USER, userService.findByUsername(username));
SecurityUtils.getSubject().getSession().setAttribute(Constants.CURRENT_USER, userService.findByUsername(username));
return true;
}
}
|
[
"zhaominhe@gmail.com"
] |
zhaominhe@gmail.com
|
d713e32f776b4b6c5f728fc67f91afafcea22c32
|
c1b4ec7a48645e2cd82e7b5d794bcf403b7d72dd
|
/mulanbay-pms/src/main/java/cn/mulanbay/pms/handler/job/PmsCommandJobPara.java
|
57b7ed70514128170161c22dff9f1ef406b3ed24
|
[
"Apache-2.0"
] |
permissive
|
zbeol/mulanbay-server
|
7245766cdcd6564c4d0dc0552fcbc4124b94cdb2
|
ffadd9e5b774875bb798145073482c0cabef0195
|
refs/heads/master
| 2023-03-27T04:11:51.619489
| 2021-03-27T00:42:15
| 2021-03-27T00:42:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,624
|
java
|
package cn.mulanbay.pms.handler.job;
import cn.mulanbay.common.config.OSType;
import cn.mulanbay.schedule.para.AbstractTriggerPara;
import cn.mulanbay.schedule.para.EditType;
import cn.mulanbay.schedule.para.JobParameter;
/**
* 命令job的参数定义
*
* @author fenghong
* @create 2017-07-10 21:44
*/
public class PmsCommandJobPara extends AbstractTriggerPara {
@JobParameter(name = "命令", dataType = String.class, desc = "绝对路径")
private String cmd;
@JobParameter(name = "操作系统", editType = EditType.COMBOBOX,
editData = "[{\"id\":\"UNKNOWN\",\"text\":\"由程序判断\"},{\"id\":\"LINUX\",\"text\":\"LINUX\"},{\"id\":\"WINDOWS\",\"text\":\"WINDOWS\"}]",
dataType = Integer.class)
private OSType osType;
@JobParameter(name = "是否同步", editType = EditType.BOOLEAN, dataType = Boolean.class)
private boolean asyn = false;
@JobParameter(name = "代码", editType = EditType.TEXT, dataType = String.class, desc = "配置了命令直接使用命令,否则用命令代码表配置")
private String code;
public String getCmd() {
return cmd;
}
public void setCmd(String cmd) {
this.cmd = cmd;
}
public OSType getOsType() {
return osType;
}
public void setOsType(OSType osType) {
this.osType = osType;
}
public boolean isAsyn() {
return asyn;
}
public void setAsyn(boolean asyn) {
this.asyn = asyn;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
|
[
"fenghong007@hotmail.com"
] |
fenghong007@hotmail.com
|
e0c2b9f6bd4a2d470cf43f95d7a8846e1e3b3655
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes5.dex_source_from_JADX/com/google/common/collect/Maps$FilteredEntryBiMap.java
|
0a0ba5d8eee7015255e06b99228d911c84898965
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,773
|
java
|
package com.google.common.collect;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
import com.google.common.collect.Maps.FilteredEntryMap;
import java.util.Collection;
import java.util.Map.Entry;
import java.util.Set;
import javax.annotation.Nullable;
/* compiled from: camera */
public final class Maps$FilteredEntryBiMap<K, V> extends FilteredEntryMap<K, V> implements BiMap<K, V> {
private final BiMap<V, K> f7474d;
/* compiled from: camera */
public final class C08291 implements Predicate<Entry<V, K>> {
final /* synthetic */ Predicate f7473a;
public C08291(Predicate predicate) {
this.f7473a = predicate;
}
public final boolean apply(Object obj) {
Entry entry = (Entry) obj;
return this.f7473a.apply(Maps.a(entry.getValue(), entry.getKey()));
}
}
public final /* synthetic */ Collection values() {
return m13529c();
}
public Maps$FilteredEntryBiMap(BiMap<K, V> biMap, Predicate<? super Entry<K, V>> predicate) {
super(biMap, predicate);
this.f7474d = new Maps$FilteredEntryBiMap(biMap.a_(), new C08291(predicate), this);
}
private Maps$FilteredEntryBiMap(BiMap<K, V> biMap, Predicate<? super Entry<K, V>> predicate, BiMap<V, K> biMap2) {
super(biMap, predicate);
this.f7474d = biMap2;
}
public final BiMap<K, V> m13530e() {
return (BiMap) this.a;
}
public final V m13528a(@Nullable K k, @Nullable V v) {
Preconditions.checkArgument(b(k, v));
return m13530e().a(k, v);
}
public final BiMap<V, K> a_() {
return this.f7474d;
}
public final Set<V> m13529c() {
return this.f7474d.keySet();
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
81389213841ecd515fa2d512434c6938dc14872f
|
c45b9115f776b7961c522396388f3032a2bc0d15
|
/log-kit/src/main/java/com/log/kit/print/view/LogAdapter.java
|
066a94f38f0559623d8210b7791b59c33e8131fe
|
[
"Apache-2.0"
] |
permissive
|
ydstar/LogKit
|
0722cab1f84066cd844b05a9c28c86267ed48123
|
3935f403e37d3d50a412efc7bfc98c15587a296c
|
refs/heads/main
| 2023-08-02T23:36:00.247937
| 2021-09-18T06:52:42
| 2021-09-18T06:52:42
| 350,587,657
| 164
| 32
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,958
|
java
|
package com.log.kit.print.view;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.log.kit.R;
import com.log.kit.LogType;
import java.util.ArrayList;
import java.util.List;
/**
* Author: 信仰年轻
* Date: 2020-09-08 17:34
* Email: hydznsqk@163.com
* Des:
*/
public class LogAdapter extends RecyclerView.Adapter<LogAdapter.LogViewHolder> {
private LayoutInflater inflater;
private List<LogModel> mLogs = new ArrayList<>();
public LogAdapter(LayoutInflater inflater) {
this.inflater = inflater;
}
@NonNull
@Override
public LogViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View itemView = inflater.inflate(R.layout.log_kit_item, parent, false);
return new LogViewHolder(itemView);
}
@Override
public void onBindViewHolder(LogViewHolder holder, int position) {
LogModel logItem = mLogs.get(position);
int color = getHighlightColor(logItem.level);
holder.tagView.setTextColor(color);
holder.messageView.setTextColor(color);
holder.tagView.setText(logItem.getFlattened());
holder.messageView.setText(logItem.log);
}
/**
* 跟进log级别获取不同的高了颜色
*
* @param logLevel log 级别
* @return 高亮的颜色
*/
private int getHighlightColor(int logLevel) {
int highlight;
switch (logLevel) {
case LogType.V:
highlight = Color.parseColor("#BBBBBB");
break;
case LogType.D:
highlight = Color.parseColor("#0070BB");
break;
case LogType.I:
highlight = Color.parseColor("#48BB31");
break;
case LogType.W:
highlight = Color.parseColor("#BBBB23");
break;
case LogType.E:
highlight = Color.parseColor("#FF0006");
break;
case LogType.A:
default:
highlight = Color.parseColor("#8F0005");
break;
}
return highlight;
}
@Override
public int getItemCount() {
return mLogs.size();
}
public void addItem(LogModel logItem) {
mLogs.add(logItem);
notifyItemInserted(mLogs.size() - 1);
}
public void clear(){
mLogs.clear();
notifyDataSetChanged();
}
public static class LogViewHolder extends RecyclerView.ViewHolder {
TextView tagView;
TextView messageView;
LogViewHolder(View itemView) {
super(itemView);
tagView = itemView.findViewById(R.id.tag);
messageView = itemView.findViewById(R.id.message);
}
}
}
|
[
"hydznsqk@163.com"
] |
hydznsqk@163.com
|
5883c4dcf87da38a01ea40a6bbf40b565f18a1e8
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project91/src/main/java/org/gradle/test/performance91_3/Production91_252.java
|
0022b70dfe8ea804dde1122d167b57a0ec5a7c44
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 305
|
java
|
package org.gradle.test.performance91_3;
public class Production91_252 extends org.gradle.test.performance17_3.Production17_252 {
private final String property;
public Production91_252() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
a76eb761ebfe895ad62420cd8f80e98e167c8fe3
|
ca0e9689023cc9998c7f24b9e0532261fd976e0e
|
/src/com/tencent/mm/plugin/sns/i/a/a/a/g$9$1.java
|
8d76c3c8123b77a481b99208728693ce4cdfa091
|
[] |
no_license
|
honeyflyfish/com.tencent.mm
|
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
|
ce6e605ff98164359a7073ab9a62a3f3101b8c34
|
refs/heads/master
| 2020-03-28T15:42:52.284117
| 2016-07-19T16:33:30
| 2016-07-19T16:33:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 428
|
java
|
package com.tencent.mm.plugin.sns.i.a.a.a;
import android.view.View;
import android.view.View.OnClickListener;
final class g$9$1
implements View.OnClickListener
{
g$9$1(g.9 param9) {}
public final void onClick(View paramView)
{
hgl.hgi.hgb = 3;
hgl.hgi.aCw();
}
}
/* Location:
* Qualified Name: com.tencent.mm.plugin.sns.i.a.a.a.g.9.1
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
e3d71c76903cd4dd40ddaae72193acc3687ac6b0
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/stanfordnlp--CoreNLP/533b0745b48a55fa83b16720fdd5ef50269a965e/after/LexicalChainMatch.java
|
6cf031f81906f17d3e5cfddfdbf34a21c28f8d9d
|
[] |
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
| 374
|
java
|
package edu.stanford.nlp.hcoref.sieve;
public class LexicalChainMatch extends DeterministicCorefSieve {
public LexicalChainMatch() {
super();
flags.USE_iwithini = true;
flags.USE_ATTRIBUTES_AGREE = true;
flags.USE_WN_HYPERNYM = true;
flags.USE_WN_SYNONYM = true;
flags.USE_DIFFERENT_LOCATION = true;
flags.USE_NUMBER_IN_MENTION = true;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
d672123386edfddb33d6d503c0e647de510358b4
|
d8d454e8ccbb8bde65ab422fe530b22f366a4036
|
/errai-codegen/src/main/java/org/jboss/errai/codegen/framework/builder/callstack/LoadVariable.java
|
f34e953fa9afd02a4c9ce278292a30c508201058
|
[] |
no_license
|
GunioRobot/errai
|
1aee6de47df8ebd323ee26940e2e3ed59893d0c5
|
d841d51567037f36ea11de8932eaa2165097b96a
|
refs/heads/master
| 2021-01-18T10:32:55.855190
| 2011-10-18T21:22:10
| 2011-10-18T21:22:10
| 2,672,285
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,697
|
java
|
/*
* Copyright 2011 JBoss, a divison Red Hat, 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 org.jboss.errai.codegen.framework.builder.callstack;
import org.jboss.errai.codegen.framework.Context;
import org.jboss.errai.codegen.framework.Statement;
import org.jboss.errai.codegen.framework.VariableReference;
import org.jboss.errai.codegen.framework.exception.InvalidTypeException;
import org.jboss.errai.codegen.framework.meta.MetaClass;
import org.jboss.errai.codegen.framework.meta.MetaClassFactory;
import org.jboss.errai.codegen.framework.util.GenUtil;
/**
* {@link CallElement} to load {@link VariableReference}s. Indexes can be provided in case of an array.
*
* @author Mike Brock <cbrock@redhat.com>
* @author Christian Sadilek <csadilek@redhat.com>
*/
public class LoadVariable extends AbstractCallElement {
private String variableName;
private Object[] indexes;
private boolean classMember;
public LoadVariable(String variableName, Object... indexes) {
this.variableName = variableName;
this.indexes = indexes;
}
public LoadVariable(String variableName, boolean classMember, Object... indexes) {
this(variableName, indexes);
this.classMember = classMember;
}
@Override
public void handleCall(CallWriter writer, Context context, Statement statement) {
writer.reset();
final Statement[] idx = new Statement[this.indexes.length];
for (int i = 0; i < idx.length; i++) {
idx[i] = GenUtil.convert(context, GenUtil.generate(context, this.indexes[i]), MetaClassFactory.get(Integer.class));
}
final VariableReference ref = context.getVariable(variableName);
if (idx.length > 0) {
if (!ref.getType().isArray()) {
throw new InvalidTypeException("attempt to use indexed accessor on non-array type: " + ref);
}
}
final Statement stmt = new VariableReference() {
@Override
public String getName() {
return ref.getName();
}
@Override
public Statement getValue() {
return ref.getValue();
}
@Override
public String generate(Context context) {
StringBuilder buf = new StringBuilder((classMember
&& !context.isNonAmbiguous(ref.getName()) ? "this." : "") + getName());
for (Statement s : idx) {
buf.append('[').append(s.generate(context)).append(']');
}
return buf.toString();
}
@Override
public MetaClass getType() {
MetaClass ret;
int dims = GenUtil.getArrayDimensions(ref.getType());
if (ref.getType().isArray() && idx.length > 0) {
int newDims = dims - idx.length;
if (newDims > 0) {
ret = ref.getType().getOuterComponentType().asArrayOf(dims - idx.length);
}
else {
ret = ref.getType().getOuterComponentType();
}
}
else {
ret = ref.getType();
}
return ret;
}
};
ref.setIndexes(idx);
nextOrReturn(writer, context, stmt);
}
@Override
public String toString() {
return "[[LoadVariable<" + variableName + ">]" + next + "]";
}
}
|
[
"brockm@gmail.com"
] |
brockm@gmail.com
|
d005411ff8b24f143d9fda664977dbd57b18d37b
|
f9aaf5983687ad6e7fb20f09e4cacdc1d312636d
|
/src/main/java/com/example/bench/AnnotatedMethodBenchmark.java
|
162453cfc64c500be0b84afb70570d39021003e1
|
[] |
no_license
|
cybernetics/spring-boot-allocations
|
83ea3635b485abeb71a3c3950017b1b3e134f7b5
|
1dfc91c2d21645a46069b3c69a4898b56b45d1a5
|
refs/heads/master
| 2020-06-05T14:07:43.565414
| 2019-06-14T08:21:49
| 2019-06-14T08:21:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,963
|
java
|
/*
* Copyright 2016-2017 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 com.example.bench;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.annotations.Warmup;
import org.springframework.context.annotation.Bean;
import org.springframework.core.type.StandardAnnotationMetadata;
@Measurement(iterations = 5)
@Warmup(iterations = 3)
@Fork(value = 1, warmups = 0)
public class AnnotatedMethodBenchmark {
@Benchmark
public void count10(SimpleState state) throws Exception {
state.setTarget(Bogus1.class);
state.run();
}
@Benchmark
public void count20(SimpleState state) throws Exception {
state.setTarget(Bogus2.class);
state.run();
}
@Benchmark
public void count30(SimpleState state) throws Exception {
state.setTarget(Bogus3.class);
state.run();
}
@State(Scope.Thread)
public static class SimpleState extends AnnotatedMethodState {
}
public static void main(String[] args) {
SimpleState state = new SimpleState();
state.setTarget(Bogus3.class);
state.run();
}
public static abstract class AnnotatedMethodState {
private Class<?> target = Bogus1.class;
public void setTarget(Class<?> target) {
this.target = target;
}
@TearDown(Level.Invocation)
public void clear() {
}
public void run() {
if (new StandardAnnotationMetadata(target).hasAnnotatedMethods(Bean.class.getName())) {
throw new IllegalStateException();
}
}
}
static class Bogus1 {
public void method0() {}
public void method1() {}
public void method2() {}
public void method3() {}
public void method4() {}
public void method5() {}
public void method6() {}
public void method7() {}
public void method8() {}
public void method9() {}
}
static class Bogus2 {
public void method0() {}
public void method1() {}
public void method2() {}
public void method3() {}
public void method4() {}
public void method5() {}
public void method6() {}
public void method7() {}
public void method8() {}
public void method9() {}
public void method10() {}
public void method11() {}
public void method12() {}
public void method13() {}
public void method14() {}
public void method15() {}
public void method16() {}
public void method17() {}
public void method18() {}
public void method19() {}
}
static class Bogus3 {
public void method0() {}
public void method1() {}
public void method2() {}
public void method3() {}
public void method4() {}
public void method5() {}
public void method6() {}
public void method7() {}
public void method8() {}
public void method9() {}
public void method10() {}
public void method11() {}
public void method12() {}
public void method13() {}
public void method14() {}
public void method15() {}
public void method16() {}
public void method17() {}
public void method18() {}
public void method19() {}
public void method30() {}
public void method31() {}
public void method32() {}
public void method33() {}
public void method34() {}
public void method35() {}
public void method36() {}
public void method37() {}
public void method38() {}
public void method39() {}
}
}
|
[
"dsyer@pivotal.io"
] |
dsyer@pivotal.io
|
4a4ad43f8ecc388c763ef44541595f4ea80b0b15
|
b7c059120c10fb8ee89685c573c84663c72cd6df
|
/app/src/main/java/com/yibai/examination/timertask/ExamTimerTaskExcutor.java
|
45189677c9b350a94fe6555208e04b8a358ae87a
|
[] |
no_license
|
enjoyO/YiBaiEducationExamination
|
38387cf44b2d1220e6356796c78e0ccbbd381394
|
60fc525259ffa0e5bf9272488cf54bc1216a5f05
|
refs/heads/master
| 2020-05-21T01:34:54.245911
| 2016-12-21T03:48:45
| 2016-12-21T03:48:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 802
|
java
|
package com.yibai.examination.timertask;
import com.yibai.examination.timertask.ExamTimerTask;
import java.util.Timer;
/**
* YiBaiEducationExamination
* Create 2016/12/19 13:59;
* https://github.com/szhua
*
* @author sz.hua
*/
public class ExamTimerTaskExcutor {
private static Timer timer ;
private static final int DEFAULT_DELAIED_TIME =1000;
private static final int DEFAULT_PERIOD =1000 ;
public static void excuteTask(ExamTimerTask examTimerTask){
getTimer().schedule(examTimerTask,DEFAULT_DELAIED_TIME,DEFAULT_PERIOD);
}
private static Timer getTimer(){
if(timer!=null)
timer.cancel();
timer=null ;
timer =new Timer();
return timer ;
}
}
|
[
"389894467@qq.com"
] |
389894467@qq.com
|
e996046371bb3991de2507541313fccd18b7d196
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/MOCKITO-16b-4-7-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/mockito/Mockito_ESTest.java
|
df6276b9634ab50a0d536141e175c6ee1b5f7842
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 751
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Oct 29 07:56:19 UTC 2021
*/
package org.mockito;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.Locale;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class Mockito_ESTest extends Mockito_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
Locale.Category locale_Category0 = Locale.Category.DISPLAY;
// Undeclared exception!
Mockito.when(locale_Category0);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
d79de6ebefcda2fc7c6a6d7d9c37bb2b33e300e5
|
dd89001cf9431ed7e0f4c9fef6ed65fef99dd436
|
/src/by/it/akhmelev/JD02_02/th2_09_deadlock.java
|
c73dbd0963e090ffb44d65daaa031b37d5669f0c
|
[] |
no_license
|
yego87/JD2016
|
e2b3c0d82a4fd49751f814cd8081e457cd369082
|
9370566f4ecd0f18000b45b6fbdea9151ca6632e
|
refs/heads/master
| 2020-04-11T15:01:35.373484
| 2016-03-30T09:38:10
| 2016-03-30T09:38:10
| 51,425,475
| 1
| 1
| null | 2016-02-10T06:48:33
| 2016-02-10T06:48:33
| null |
UTF-8
|
Java
| false
| false
| 968
|
java
|
package by.it.akhmelev.JD02_02;
public class th2_09_deadlock {
static class Friend {
private final String name;
public Friend(String name) {this.name = name;}
public String getName() {return this.name;}
public synchronized void bow(Friend bower) {
System.out.format("%s: %s" + " поклонился мне!%n", this.name, bower.getName());
bower.bowBack(this);
}
public synchronized void bowBack(Friend bower) {
System.out.format("%s: %s" + " стал прямо!%n", this.name, bower.getName());
}
}
public static void main(String[] args) {
final Friend tim = new Friend("Тим");
final Friend bob = new Friend("Боб");
new Thread(new Runnable() {
public void run() { tim.bow(bob); }
}).start();
new Thread(new Runnable() {
public void run() { bob.bow(tim); }
}).start();
}
}
|
[
"375336849110@tut.by"
] |
375336849110@tut.by
|
8065727f3600bcac4782b25ca030dd4729501e1a
|
16501bd6b24f9f3c8d06c6136358433d1817aae5
|
/taobao-standard-android/src/main/java/com/taobao/api/request/SimbaInsightCatsforecastGetRequest.java
|
0683078e9d0617a4b0e114aeaf83a65250c0d31e
|
[] |
no_license
|
alexvarboffin/open-platform-sdk-for-android
|
07dff8b0d5a5e2ce8594461a78afdcba0e760d3f
|
f5f9fad74beea2e3ff3368beb05476105f3a9bf7
|
refs/heads/master
| 2016-08-12T06:20:21.972512
| 2012-08-13T08:46:00
| 2012-08-13T08:46:00
| 49,562,777
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,032
|
java
|
package com.taobao.api.request;
import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Map;
import com.taobao.api.TaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.response.SimbaInsightCatsforecastGetResponse;
import com.taobao.api.ApiRuleException;
/**
* TOP API: taobao.simba.insight.catsforecast.get request
*
* @author auto create
* @since 1.0, 2012-08-10 16:38:26
*/
public class SimbaInsightCatsforecastGetRequest implements TaobaoRequest<SimbaInsightCatsforecastGetResponse> {
private TaobaoHashMap udfParams; // add user-defined text parameters
private Long timestamp;
/**
* 主人昵称
*/
private String nick;
/**
* 查询词数组,最大长度200
*/
private String words;
public void setNick(String nick) {
this.nick = nick;
}
public String getNick() {
return this.nick;
}
public void setWords(String words) {
this.words = words;
}
public String getWords() {
return this.words;
}
public Long getTimestamp() {
return this.timestamp;
}
public void setTimestamp(Long timestamp) {
this.timestamp = timestamp;
}
public String getApiMethodName() {
return "taobao.simba.insight.catsforecast.get";
}
public Map<String, String> getTextParams() {
TaobaoHashMap txtParams = new TaobaoHashMap();
txtParams.put("nick", this.nick);
txtParams.put("words", this.words);
if(this.udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new TaobaoHashMap();
}
this.udfParams.put(key, value);
}
public Class<SimbaInsightCatsforecastGetResponse> getResponseClass() {
return SimbaInsightCatsforecastGetResponse.class;
}
public void check() throws ApiRuleException {
RequestCheckUtils.checkNotEmpty(words,"words");
RequestCheckUtils.checkMaxListSize(words,200,"words");
}
}
|
[
"leeivan2008@gmail.com"
] |
leeivan2008@gmail.com
|
ce7814c54437797640cdf484ee05bef4f121e1ee
|
a7c16658e092b90d92dd25a51ea58b7218190df2
|
/src/com/jiayue/util/UriUtils.java
|
a515062e6b2b3da57fa5a056038bd516bbf8df51
|
[] |
no_license
|
wzyxzy/jiayue_1.0
|
9450a39882b1d610032ddb4d5922d10190000eb3
|
a7074e6ff43bc597bfb00e608f89dd15fe40a216
|
refs/heads/master
| 2022-07-01T15:29:33.479948
| 2020-05-09T11:41:35
| 2020-05-09T11:41:35
| 262,558,964
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,005
|
java
|
package com.jiayue.util;
import android.annotation.SuppressLint;
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.provider.MediaStore;
public class UriUtils {
public static final boolean isChineseCharacter(String chineseStr) {
char[] charArray = chineseStr.toCharArray();
for (int i = 0; i < charArray.length; i++) {
// 是否是Unicode编码,除了"�"这个字符.这个字符要另外处理
if ((charArray[i] >= '\u0000' && charArray[i] < '\uFFFD') || ((charArray[i] > '\uFFFD' && charArray[i] < '\uFFFF'))) {
continue;
} else {
return false;
}
}
return true;
}
/**
* Get a file path from a Uri. This will get the the path for Storage Access
* Framework Documents, as well as the _data field for the MediaStore and
* other file-based ContentProviders.
*
* @param context
* The context.
* @param uri
* The Uri to query.
* @author paulburke
*/
@SuppressLint("NewApi")
public static String getPath(final Context context, final Uri uri) {
final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
// DocumentProvider
if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) {
// ExternalStorageProvider
if (isExternalStorageDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":");
final String type = split[0];
if ("primary".equalsIgnoreCase(type)) {
return Environment.getExternalStorageDirectory() + "/" + split[1];
}
// TODO handle non-primary volumes
}
// DownloadsProvider
else if (isDownloadsDocument(uri)) {
final String id = DocumentsContract.getDocumentId(uri);
final Uri contentUri = ContentUris.withAppendedId(Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
return getDataColumn(context, contentUri, null, null);
}
// MediaProvider
else if (isMediaDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":");
final String type = split[0];
Uri contentUri = null;
if ("image".equals(type)) {
contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
} else if ("video".equals(type)) {
contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
} else if ("audio".equals(type)) {
contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
}
final String selection = "_id=?";
final String[] selectionArgs = new String[] { split[1] };
return getDataColumn(context, contentUri, selection, selectionArgs);
}
}
// MediaStore (and general)
else if ("content".equalsIgnoreCase(uri.getScheme())) {
return getDataColumn(context, uri, null, null);
}
// File
else if ("file".equalsIgnoreCase(uri.getScheme())) {
return uri.getPath();
}
return null;
}
/**
* Get the value of the data column for this Uri. This is useful for
* MediaStore Uris, and other file-based ContentProviders.
*
* @param context
* The context.
* @param uri
* The Uri to query.
* @param selection
* (Optional) Filter used in the query.
* @param selectionArgs
* (Optional) Selection arguments used in the query.
* @return The value of the _data column, which is typically a file path.
*/
public static String getDataColumn(Context context, Uri uri, String selection, String[] selectionArgs) {
Cursor cursor = null;
final String column = "_data";
final String[] projection = { column };
try {
cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs, null);
if (cursor != null && cursor.moveToFirst()) {
final int column_index = cursor.getColumnIndexOrThrow(column);
return cursor.getString(column_index);
}
} finally {
if (cursor != null)
cursor.close();
}
return null;
}
/**
* @param uri
* The Uri to check.
* @return Whether the Uri authority is ExternalStorageProvider.
*/
public static boolean isExternalStorageDocument(Uri uri) {
return "com.android.externalstorage.documents".equals(uri.getAuthority());
}
/**
* @param uri
* The Uri to check.
* @return Whether the Uri authority is DownloadsProvider.
*/
public static boolean isDownloadsDocument(Uri uri) {
return "com.android.providers.downloads.documents".equals(uri.getAuthority());
}
/**
* @param uri
* The Uri to check.
* @return Whether the Uri authority is MediaProvider.
*/
public static boolean isMediaDocument(Uri uri) {
return "com.android.providers.media.documents".equals(uri.getAuthority());
}
}
|
[
"xzywzy@gmail.com"
] |
xzywzy@gmail.com
|
4d2f977339851dc2d2d710dc01f497ebd8756848
|
3f79ff6215d488b49b6c635a149a6cd473ad4371
|
/design-pattern-base/src/main/java/com/mmc/design/pattern/imple/processor/two/LowPass.java
|
4c2f4585b687079ace11d2a3d3affe57b9d73a46
|
[] |
no_license
|
gaowei0115/design-pattern-system
|
6eb84e493c60baf4bf5cb6859e9dc315731cf994
|
b95a35a060e0c5370116680875dc45212f98e891
|
refs/heads/master
| 2020-03-31T20:29:06.492352
| 2018-10-26T07:22:59
| 2018-10-26T07:22:59
| 152,542,375
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 612
|
java
|
package com.mmc.design.pattern.imple.processor.two;
import com.mmc.design.pattern.imple.processor.one.Waveform;
/**
* @packageName:com.mmc.design.pattern.imple.processor.two
* @desrciption:
* @author: gaowei
* @date: 2018-10-16 16:04
* @history: (version) author date desc
*/
public class LowPass implements Filter {
private double cutoff;
public LowPass(double cutoff) {
this.cutoff = cutoff;
}
@Override
public String name() {
return getClass().getSimpleName();
}
@Override
public Waveform process(Waveform input) {
return input;
}
}
|
[
"gao_wei0115@sina.com"
] |
gao_wei0115@sina.com
|
88bcaec91c46d25b56925e4ef7ff14554f367fb2
|
c424ec5731c7c0e97407f3120f1ab3b47143077c
|
/nirvana-core/com/nirvana/service/impl/DealerOrderServiceImpl.java
|
3601602a2d51cbae0d94e47a42f28485c88b360d
|
[] |
no_license
|
snailhu/Naivana
|
670a7560e9e7577ed20d08af5ff4fe5c92075df1
|
5678e7b71ff38649b2305c06c4b1f37b76f1ec33
|
refs/heads/master
| 2020-05-30T14:16:32.821350
| 2015-09-11T02:36:23
| 2015-09-11T02:36:23
| 42,281,788
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 6,298
|
java
|
package com.nirvana.service.impl;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import javax.annotation.Resource;
import javax.persistence.LockModeType;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import com.nirvana.domain.common.Product;
import com.nirvana.domain.dealer.Dealer;
import com.nirvana.domain.dealer.DealerOrder;
import com.nirvana.domain.dealer.DealerOrderItem;
import com.nirvana.domain.dealer.DealerOrderItemPK;
import com.nirvana.domain.dealer.DealerOrderItemType;
import com.nirvana.domain.dealer.DealerOrderState;
import com.nirvana.domain.dealer.DealerStockSerialNumber;
import com.nirvana.erp.domain.PepsiOrderHead;
import com.nirvana.erp.domain.PepsiOrderLine;
import com.nirvana.erp.service.ErpService;
import com.nirvana.exception.DataIntegrityException;
import com.nirvana.exception.RecordNotFoundException;
import com.nirvana.fdfs.FileOperator;
import com.nirvana.mongo.converter.impl.DealerOrderConverter;
import com.nirvana.mongo.document.DealerOrderDocument;
import com.nirvana.mongo.repository.DealerOrderDocumentRepository;
import com.nirvana.repository.common.ProductRepository;
import com.nirvana.repository.dealer.DealerOrderItemRepository;
import com.nirvana.repository.dealer.DealerOrderRepository;
import com.nirvana.repository.dealer.DealerStockSerialNumberRepository;
import com.nirvana.service.DealerOrderService;
import com.nirvana.utils.Assert;
@Service
@Transactional
public class DealerOrderServiceImpl implements DealerOrderService {
@Resource
private ErpService erpService;
@Resource
private DealerOrderRepository dealerOrderRepository;
@Resource
private ProductRepository productRepository;
@Resource
private DealerOrderItemRepository dealerOrderItemRepository;
@Resource
private DealerStockSerialNumberRepository dealerStockSerialNumberRepository;
@Resource
private DealerOrderDocumentRepository dealerOrderDocumentRepository;
@Resource
private DealerOrderConverter dealerOrderConverter;
@Override
public long operateNewOrderNo(Dealer dealer) {
long time = System.currentTimeMillis();
Calendar currentCalendar = Calendar.getInstance();
currentCalendar.setTimeInMillis(time);
int year = currentCalendar.get(Calendar.YEAR);
int month = currentCalendar.get(Calendar.MONTH) + 1;
int day = currentCalendar.get(Calendar.DAY_OF_MONTH);
int date = year * 100 * 100 + month * 100 + day;
long dealerId = dealer.getId();
DealerStockSerialNumber dealerSerialNumber = dealerStockSerialNumberRepository.findOne(dealerId, LockModeType.OPTIMISTIC);
if (dealerSerialNumber == null) {
throw new DataIntegrityException("经销商的流水号未初始化。");
}
if (date > dealerSerialNumber.getDate()) {
dealerSerialNumber.setDate(date);
dealerSerialNumber.setSerialNum(1);
dealerStockSerialNumberRepository.save(dealerSerialNumber);
} else {
dealerStockSerialNumberRepository.updateSerialNum(dealerId);
dealerStockSerialNumberRepository.refresh(dealerSerialNumber);
}
long orderId = (long) date * 10000l * 10000l * 10l + dealerId * 1000l + (long) dealerSerialNumber.getSerialNum();
return orderId;
}
@Override
public DealerOrder placeOrder(Dealer dealer, Map<String, Integer> skus, boolean isAgentHelped, boolean isInline, MultipartFile picture) {
PepsiOrderHead head = erpService.placeOrder(dealer.getCodeInERP(), 1, skus);
if (head == null) {
throw new IllegalArgumentException("下单失败。");
}
long orderId = operateNewOrderNo(dealer);
DealerOrder dealerOrder = new DealerOrder();
dealerOrder.setOrderNo(orderId);
dealerOrder.setIsAgentHelped(isAgentHelped);
dealerOrder.setIsInLine(isInline);
dealerOrder.setCodeInERP(head.getOrderNo());
dealerOrder.setDealer(dealer);
dealerOrder.setEnterDate(head.getDateEntered());
dealerOrder.setState(DealerOrderState.fromERP(head.getState()));
dealerOrder.setWantDate(head.getWantedDeliveryDate());
Set<DealerOrderItem> items = new HashSet<DealerOrderItem>();
if (picture != null) {
String url = FileOperator.savePicture(picture);
dealerOrder.setSignPic(url);
}
BigDecimal totalPrice = new BigDecimal(0);
for (PepsiOrderLine line : head.getLines()) {
DealerOrderItem item = new DealerOrderItem();
DealerOrderItemPK pk = new DealerOrderItemPK();
pk.setLineNo(Integer.parseInt(line.getId().getLineNo()));
pk.setOrder(dealerOrder);
item.setPk(pk);
item.setAmount(line.getQty().intValue());
if (line.getDiscount() != null) {
item.setDiscount(line.getDiscount().floatValue());
}
if (line.getPointsAmount() != null) {
item.setPoints(line.getPointsAmount().intValue());
}
Product product = productRepository.findOne(line.getPartNo());
if (product == null) {
throw new RecordNotFoundException("此商品未找到。");
}
item.setProduct(product);
item.setType(DealerOrderItemType.parseDealerOrderItemType(line.getOrderType()));
item.setUnitMeas(line.getSalesUnitMeas());
item.setUnitPrice(line.getSaleUnitPrice().floatValue());
items.add(item);
totalPrice = totalPrice.add(line.getQty().multiply(line.getSaleUnitPrice()));
}
dealerOrder.setItems(items);
dealerOrder.setTotalPrice(totalPrice);
dealerOrderRepository.save(dealerOrder);
return dealerOrder;
}
@Override
public DealerOrder placeOrder(Dealer dealer, Map<String, Integer> skus, boolean isAgentHelped, MultipartFile picture) {
return placeOrder(dealer, skus, isAgentHelped, false, picture);
}
@Override
public void deleteTwoWeekAgoFinishedOrders() {
long time = System.currentTimeMillis();
long twoWeek = 2 * 7 * 24 * 60 * 60 * 1000;
long twoWeekAgo = time - twoWeek;
Date date = new Date(twoWeekAgo);
dealerOrderRepository.deleteByDateAndState(date, DealerOrderState.CANCELED);
dealerOrderRepository.deleteByDateAndState(date, DealerOrderState.CLOSED);
}
@Override
public void finishOrder(DealerOrder dealerOrder) {
Assert.notNull(dealerOrder);
DealerOrderDocument document = dealerOrderConverter.convert(dealerOrder);
dealerOrderDocumentRepository.save(document);
// TODO 结束经销商订单...
}
}
|
[
"snailhu@yahoo.com"
] |
snailhu@yahoo.com
|
958ce39cd0416b1571753177049f1bfd42348a7c
|
9e048428ca10f604c557784f4b28c68ce9b5cccb
|
/bitcamp-java-basic/src/step11/ex09/Exam02.java
|
e779a39ece7cc164348b7abb008da42b40cb0beb
|
[] |
no_license
|
donhee/bitcamp
|
6c90ec687e00de07315f647bdb1fda0e277c3937
|
860aa16d86cbd6faeb56b1f5c70b5ea5d297aef0
|
refs/heads/master
| 2021-01-24T11:44:48.812897
| 2019-02-20T00:06:07
| 2019-02-20T00:06:07
| 123,054,172
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,788
|
java
|
// 다형성 : 다형적 변수와 형변환
package step11.ex09;
public class Exam02 {
public static void main(String[] args) {
Vehicle v1 = new Sedan();
Vehicle v2 = new Truck();
// model과 capacity 변수는 원래 Vehicle 설계도에 있는 변수이기 때문에
// 당연히 레퍼런스를 통해 사용할 수 있다.
v1.model = "티코";
v1.capacity = 5;
// 자바 컴파일러는 레퍼런스의 클래스를 보고 사용할 수 있는
// 변수/메서드 인지 아닌지 판단한다.
// 비록 v1 변수에 Sedan 객체의 주소가 들어 있다 할지라도,
// 실제 들어 있는 객체의 주소로 판단하지 않고
// "레퍼런스가 어떤 클래스냐에 따라 판단한다"
/*
v1.cc = 1980;
v1.valve = 16;
v1.sunroof = true;
v1.auto = true;
*/
// 그럼에도 불구하고 레퍼런스가 실제 가리키는 객체의 모든 메모리에 접근하고 싶은가?
// => 그럼 형변환 하라!!!
((Sedan)v1).cc = 1980;
((Sedan)v1).valve = 16;
((Sedan)v1).sunroof = true;
((Sedan)v1).auto = true;
System.out.printf("%s, %d, %d, %d, %b, %b\n",
v1.model, v1.capacity, ((Sedan)v1).cc, ((Sedan)v1).valve, ((Sedan)v1).sunroof, ((Sedan)v1).auto);
// 그냥 레퍼런스를 형변환해서 사용하라!
Sedan s = (Sedan)v1;
s.cc = 1980;
s.valve = 16;
s.sunroof = true;
s.auto = true;
System.out.printf("%s, %d, %d, %d, %b, %b\n",
v1.model, v1.capacity, ((Sedan)v1).cc, ((Sedan)v1).valve, ((Sedan)v1).sunroof, ((Sedan)v1).auto);
}
}
|
[
"231313do@gmail.com"
] |
231313do@gmail.com
|
6703031fad8f5d9aa0b49d28e1acca9230b62298
|
bebd6127370d51dbbb9694cb5afee7c50448132d
|
/app/src/main/java/com/hippo/swipeback/example/SwipeBackActivity.java
|
d0dcc712da7ba742e72a65d86614d94820e86ba9
|
[
"Apache-2.0"
] |
permissive
|
seven332/SwipeBack
|
08ee42702c5087a331d37c36b45b2ffb2b9024e9
|
5307143104aca12ad325b027b8d475721ef5ec3f
|
refs/heads/master
| 2020-05-25T15:47:30.850358
| 2017-05-07T08:26:50
| 2017-05-07T08:26:50
| 70,083,468
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,479
|
java
|
/*
* Copyright 2016 Hippo Seven
*
* 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.hippo.swipeback.example;
/*
* Created by Hippo on 10/5/2016.
*/
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import com.hippo.swipeback.SwipeBackHelper;
import com.hippo.swipeback.SwipeBackLayout;
public abstract class SwipeBackActivity extends AppCompatActivity {
private SwipeBackHelper mSwipeBackHelper;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mSwipeBackHelper = new SwipeBackHelper(this);
}
@Override
protected void onPostCreate(@Nullable Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
mSwipeBackHelper.onPostCreate();
}
public SwipeBackLayout getSwipeBackLayout() {
return mSwipeBackHelper.getSwipeBackLayout();
}
}
|
[
"seven332@163.com"
] |
seven332@163.com
|
fcda851692303e7f48b54625d29123db878ad7dd
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/junit_cluster/583/src_5.java
|
2373ea3343969ce1098acc1b7054cad5ea63ad9e
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613
| 2020-04-15T14:41:34
| 2020-04-15T14:41:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,847
|
java
|
package junit.tests;
import java.util.Vector;
import junit.framework.*;
/**
* A test case testing the testing framework.
*
*/
public class TestCaseTest extends TestCase {
static class TornDown extends TestCase {
boolean fTornDown= false;
TornDown(String name) {
super(name);
}
protected void tearDown() {
fTornDown= true;
}
protected void runTest() {
throw new Error();
}
}
public TestCaseTest(String name) {
super(name);
}
public void testCaseToString() {
// This test wins the award for twisted snake tail eating while
// writing self tests. And you thought those weird anonymous
// inner classes were bad...
assertEquals("testCaseToString(junit.tests.TestCaseTest)", toString());
}
public void testError() {
TestCase error= new TestCase("error") {
protected void runTest() {
throw new Error();
}
};
verifyError(error);
}
public void testRunAndTearDownFails() {
TornDown fails= new TornDown("fails") {
protected void tearDown() {
super.tearDown();
throw new Error();
}
protected void runTest() {
throw new Error();
}
};
verifyError(fails);
assert(fails.fTornDown);
}
public void testSetupFails() {
TestCase fails= new TestCase("success") {
protected void setUp() {
throw new Error();
}
protected void runTest() {
}
};
verifyError(fails);
}
public void testSuccess() {
TestCase success= new TestCase("success") {
protected void runTest() {
}
};
verifySuccess(success);
}
public void testFailure() {
TestCase failure= new TestCase("failure") {
protected void runTest() {
fail();
}
};
verifyFailure(failure);
}
public void testTearDownAfterError() {
TornDown fails= new TornDown("fails");
verifyError(fails);
assert(fails.fTornDown);
}
public void testTearDownFails() {
TestCase fails= new TestCase("success") {
protected void tearDown() {
throw new Error();
}
protected void runTest() {
}
};
verifyError(fails);
}
public void testTearDownSetupFails() {
TornDown fails= new TornDown("fails") {
protected void setUp() {
throw new Error();
}
};
verifyError(fails);
assert(!fails.fTornDown);
}
public void testWasRun() {
WasRun test= new WasRun("");
test.run();
assert(test.fWasRun);
}
void verifyError(TestCase test) {
TestResult result= test.run();
assert(result.runCount() == 1);
assert(result.failureCount() == 0);
assert(result.errorCount() == 1);
}
void verifyFailure(TestCase test) {
TestResult result= test.run();
assert(result.runCount() == 1);
assert(result.failureCount() == 1);
assert(result.errorCount() == 0);
}
void verifySuccess(TestCase test) {
TestResult result= test.run();
assert(result.runCount() == 1);
assert(result.failureCount() == 0);
assert(result.errorCount() == 0);
}
}
|
[
"375833274@qq.com"
] |
375833274@qq.com
|
e85f3d74c2baea6665f2e7a8d084bff54c553089
|
60c4056900b741a6b68b9bbaae3458a9e12b2441
|
/src/main/java/designpatterns/creational/factory/Computer.java
|
43937cadfb07db8285d95e2f1aab875eddc9fd34
|
[] |
no_license
|
dhrub123/JavaFundamentals
|
c82b27822d294894f1b35ce853db206c505e38b1
|
cd626a3cca500fa3afb9c092aa68692e9a4ae880
|
refs/heads/master
| 2023-05-12T11:39:04.280928
| 2023-05-05T07:32:44
| 2023-05-05T07:32:44
| 289,631,254
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 254
|
java
|
package designpatterns.creational.factory;
//This class can be an interface, abstract class or normal java class
public abstract class Computer {
public abstract String getRam();
public abstract String getHdd();
public abstract String getCpu();
}
|
[
"dhrub123@gmail.com"
] |
dhrub123@gmail.com
|
d88aa450b8fbab6d91811a32ba5644836aaa41a6
|
0bc5f4c31e7b22bb0cfbf013e31bf785ff95e3f6
|
/app/src/main/java/com/example/jingbin/cloudreader/viewmodel/wan/JokeViewModel.java
|
92c6f2747d6aba01b8f760b845927be94a4cd80a
|
[
"Apache-2.0"
] |
permissive
|
ZhuTingyu/CloudReader
|
8ce7ff99a08f2243bf6174bb8b41ff9872369ab8
|
5de50c94c68fb0ccf78a4b01f82eafbb79a40272
|
refs/heads/master
| 2020-05-17T18:21:03.144873
| 2019-04-24T09:31:16
| 2019-04-24T09:31:16
| 183,882,104
| 1
| 0
|
Apache-2.0
| 2019-04-28T08:48:51
| 2019-04-28T08:48:51
| null |
UTF-8
|
Java
| false
| false
| 1,780
|
java
|
package com.example.jingbin.cloudreader.viewmodel.wan;
import android.app.Application;
import android.arch.lifecycle.AndroidViewModel;
import android.arch.lifecycle.MutableLiveData;
import android.support.annotation.NonNull;
import com.example.jingbin.cloudreader.bean.wanandroid.DuanZiBean;
import com.example.jingbin.cloudreader.data.model.JokeModel;
import java.util.List;
import io.reactivex.disposables.Disposable;
/**
* @author jingbin
* @data 2018/2/8
* @Description 玩安卓ViewModel
*/
public class JokeViewModel extends AndroidViewModel {
private final JokeModel mModel;
private int mPage = 1;
// 刷新糗事百科
private boolean isRefreshBK = false;
private final MutableLiveData<List<DuanZiBean>> data = new MutableLiveData<>();
public JokeViewModel(@NonNull Application application) {
super(application);
mModel = new JokeModel();
}
public MutableLiveData<List<DuanZiBean>> getData() {
return data;
}
public void showQSBKList() {
mModel.showQSBKList(navigator, mPage);
}
private WanNavigator.JokeModelNavigator navigator = new WanNavigator.JokeModelNavigator() {
@Override
public void loadSuccess(List<DuanZiBean> lists) {
data.setValue(lists);
}
@Override
public void loadFailed() {
data.setValue(null);
}
@Override
public void addSubscription(Disposable subscription) {
}
};
public void setRefreshBK(boolean refreshBK) {
isRefreshBK = refreshBK;
}
public boolean isRefreshBK() {
return isRefreshBK;
}
public int getPage() {
return mPage;
}
public void setPage(int mPage) {
this.mPage = mPage;
}
}
|
[
"770413277@qq.com"
] |
770413277@qq.com
|
028980d0809178b9a35040bd63ed665eb64085ff
|
15783e25206e6b14cdd2217dcc01e5914134cb5d
|
/app/src/main/java/com/wyw/jiangsu/interfac/IHarmlessConcentrateProcessListActivity.java
|
7c645764c59962a396bcb835744bf8722f04650b
|
[] |
no_license
|
993739033/JiangSu
|
7e1e0f2a457ea8e88629e716b8201f936c191bdb
|
d4b9524c06a103848631036d568c5577b70cad1a
|
refs/heads/master
| 2020-06-12T10:59:46.695256
| 2019-06-28T13:19:04
| 2019-06-28T13:19:04
| 194,276,952
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 384
|
java
|
package com.wyw.jiangsu.interfac;
import com.wyw.jiangsu.bean.HarmlessListBean;
import java.util.List;
/**
* Created by wyw on 2016/12/29.HarmlessConcentrateProcessListActivity
*/
public interface IHarmlessConcentrateProcessListActivity extends IMVPList{
void refresh(List<HarmlessListBean.DataEntity> entity);
void loadMore(List<HarmlessListBean.DataEntity> entity);
}
|
[
"993739033@qq.com"
] |
993739033@qq.com
|
b501dd139459c8c9a646e95e20d8d6bd78455ba4
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/module0214/src/java/module0214/a/Foo2.java
|
123abd680e5c97016b618c4d384899290d64c70d
|
[
"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
| 1,516
|
java
|
package module0214.a;
import javax.management.*;
import javax.naming.directory.*;
import javax.net.ssl.*;
/**
* 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.util.logging.Filter
* @see java.util.zip.Deflater
* @see javax.annotation.processing.Completion
*/
@SuppressWarnings("all")
public abstract class Foo2<S> extends module0214.a.Foo0<S> implements module0214.a.IFoo2<S> {
javax.lang.model.AnnotatedConstruct f0 = null;
javax.management.Attribute f1 = null;
javax.naming.directory.DirContext f2 = null;
public S element;
public static Foo2 instance;
public static Foo2 getInstance() {
return instance;
}
public static <T> T create(java.util.List<T> input) {
return module0214.a.Foo0.create(input);
}
public String getName() {
return module0214.a.Foo0.getInstance().getName();
}
public void setName(String string) {
module0214.a.Foo0.getInstance().setName(getName());
return;
}
public S get() {
return (S)module0214.a.Foo0.getInstance().get();
}
public void set(Object element) {
this.element = (S)element;
module0214.a.Foo0.getInstance().set(this.element);
}
public S call() throws Exception {
return (S)module0214.a.Foo0.getInstance().call();
}
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
bfd61e241b5831a9d5427a8b9eee5f8b66a7e578
|
ce038793e39acb67002643935b858e7fe75283a7
|
/Themes/14. JavaIO/src/ru/itis/MainReaderVsInputStream.java
|
92c0340b03e47fa1b216506773dcfe3368ec3290
|
[] |
no_license
|
MarselSidikov/11-802
|
1add06cc48683469d6a710e5603008c223e2a897
|
c4580078e0d056803b20c68a7c1ab6c47f27b9f5
|
refs/heads/master
| 2020-03-27T21:52:46.784136
| 2019-04-16T10:30:13
| 2019-04-16T10:30:13
| 147,183,087
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 839
|
java
|
package ru.itis;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.InputStream;
import java.io.Reader;
/**
* 31.10.2018
* MainReaderVsInputStream
*
* @author Sidikov Marsel (First Software Engineering Platform)
* @version v1.0
*/
public class MainReaderVsInputStream {
public static void main(String[] args) throws Exception {
Reader reader = new FileReader("input3.txt");
char text[] = new char[30];
int length = reader.read(text);
String string = new String(text, 0, length);
// System.out.println(string);
System.out.println(length);
reader.close();
InputStream inputStream = new FileInputStream("input3.txt");
byte bytes[] = new byte[30];
int count = inputStream.read(bytes);
System.out.println(count);
}
}
|
[
"sidikov.marsel@gmail.com"
] |
sidikov.marsel@gmail.com
|
3cc8f93776814c243ec316c2a6ccd78a653045b3
|
f766baf255197dd4c1561ae6858a67ad23dcda68
|
/app/src/main/java/com/tencent/mm/plugin/appbrand/jsapi/j/i.java
|
9512bbdb24083d285fc63b453ee7bd150a2c7da0
|
[] |
no_license
|
jianghan200/wxsrc6.6.7
|
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
|
eb6c56587cfca596f8c7095b0854cbbc78254178
|
refs/heads/master
| 2020-03-19T23:40:49.532494
| 2018-06-12T06:00:50
| 2018-06-12T06:00:50
| 137,015,278
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,133
|
java
|
package com.tencent.mm.plugin.appbrand.jsapi.j;
import android.widget.NumberPicker;
import com.tencent.mm.plugin.appbrand.widget.picker.AppBrandTimePicker;
import com.tencent.mm.plugin.appbrand.widget.picker.a;
import com.tencent.mm.plugin.appbrand.widget.picker.b;
import com.tencent.mm.ui.widget.picker.f;
import org.json.JSONObject;
final class i
extends c
{
int fXA = -1;
int fXv = -1;
int fXw = -1;
int fXx = Integer.MAX_VALUE;
int fXy = Integer.MAX_VALUE;
int fXz = -1;
final void u(JSONObject paramJSONObject)
{
Object localObject2 = paramJSONObject.optJSONObject("range");
if (localObject2 != null)
{
Object localObject1 = ((JSONObject)localObject2).optString("start");
localObject2 = ((JSONObject)localObject2).optString("end");
localObject1 = f.abB((String)localObject1);
if (localObject1 != null)
{
this.fXv = localObject1[0];
this.fXw = localObject1[1];
}
localObject1 = f.abB((String)localObject2);
if (localObject1 != null)
{
this.fXx = localObject1[0];
this.fXy = localObject1[1];
}
}
this.fXv = Math.max(this.fXv, 0);
this.fXw = Math.max(this.fXw, 0);
this.fXx = Math.min(this.fXx, 23);
this.fXy = Math.min(this.fXy, 59);
paramJSONObject = f.abB(paramJSONObject.optString("current"));
if (paramJSONObject != null)
{
this.fXz = paramJSONObject[0];
this.fXA = paramJSONObject[1];
}
com.tencent.mm.plugin.appbrand.r.c.runOnUiThread(new Runnable()
{
public final void run()
{
i locali = i.this;
AppBrandTimePicker localAppBrandTimePicker = (AppBrandTimePicker)locali.C(AppBrandTimePicker.class);
if (localAppBrandTimePicker == null)
{
locali.h("fail cant init view", null);
return;
}
a locala = locali.gMI;
int i = locali.fXv;
int j = locali.fXw;
localAppBrandTimePicker.fXv = i;
localAppBrandTimePicker.fXw = j;
if ((f.GF(localAppBrandTimePicker.fXv)) && (localAppBrandTimePicker.gNn != null)) {
localAppBrandTimePicker.gNn.setMinValue(localAppBrandTimePicker.fXv);
}
i = locali.fXx;
j = locali.fXy;
localAppBrandTimePicker.fXx = i;
localAppBrandTimePicker.fXy = j;
if ((f.GF(localAppBrandTimePicker.fXx)) && (localAppBrandTimePicker.gNn != null)) {
localAppBrandTimePicker.gNn.setMaxValue(localAppBrandTimePicker.fXx);
}
i = locali.fXz;
j = locali.fXA;
if ((f.GF(i)) && (f.GE(j)))
{
localAppBrandTimePicker.setCurrentHour(Integer.valueOf(i));
localAppBrandTimePicker.setCurrentMinute(Integer.valueOf(j));
}
localAppBrandTimePicker.aqt();
locala.setOnResultListener(new i.2(locali));
locala.show();
}
});
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes3-dex2jar.jar!/com/tencent/mm/plugin/appbrand/jsapi/j/i.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"526687570@qq.com"
] |
526687570@qq.com
|
24bb6fc9cd24aa6832a5656a5585d7504f90be9d
|
6d54c69641e421d7a737950f6f7301b1fb0b9b12
|
/4.JavaCollections/src/com/javarush/task/task32/task3211/Solution.java
|
8c750f15e19682eb85fa60459ec4af9d486218d4
|
[] |
no_license
|
MarvineGothic/JavaRushTasks
|
ab91358bbbce7934b2ed0d05bd62510be17747c9
|
ec77371bc91fe415ee06d949ed6ad9490d21b597
|
refs/heads/master
| 2021-08-05T20:51:23.112564
| 2021-07-27T18:24:19
| 2021-07-27T18:24:19
| 105,068,893
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,684
|
java
|
package com.javarush.task.task32.task3211;
import javax.xml.bind.DatatypeConverter;
import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
import java.io.ByteArrayOutputStream;
import java.io.ObjectOutputStream;
import java.security.MessageDigest;
/*
Целостность информации
public class Solution {
public static void main(String... args) throws Exception {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(new String("test string"));
oos.flush();
System.out.println(compareMD5(bos, "5a47d12a2e3f9fecf2d9ba1fd98152eb")); //true
}
public static boolean compareMD5(ByteArrayOutputStream byteArrayOutputStream, String md5) throws Exception {
return false;
}
}
*/
public class Solution { // solved
public static void main(String... args) throws Exception {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(new String("test string"));
oos.flush();
System.out.println(compareMD5(bos, "5a47d12a2e3f9fecf2d9ba1fd98152eb")); //true
}
public static boolean compareMD5(ByteArrayOutputStream byteArrayOutputStream, String md5) throws Exception {
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] digest = md.digest(byteArrayOutputStream.toByteArray());
//String hex = DatatypeConverter.printHexBinary(digest).toLowerCase();
String hex = (new HexBinaryAdapter()).marshal(digest).toLowerCase();
return hex.equals(md5);
}
}
|
[
"seis@itu.dk"
] |
seis@itu.dk
|
6554bd8637af395c6992edf150572910615ba069
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/a/i/b/a/c/g/v$a.java
|
3f8a124e076a8321d298ef0a4da4a57deb13cf3f
|
[] |
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
| 602
|
java
|
package a.i.b.a.c.g;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.Iterator;
final class v$a
{
private static final Iterator<Object> BAD;
private static final Iterable<Object> BAE;
static
{
AppMethodBeat.i(121625);
BAD = new v.a.1();
BAE = new v.a.2();
AppMethodBeat.o(121625);
}
static <T> Iterable<T> eiK()
{
return BAE;
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes6-dex2jar.jar
* Qualified Name: a.i.b.a.c.g.v.a
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
e66b4827572d4de63d5cdacba4da932c976cb288
|
e455b112a11a44e17914f5177328b62c952a8fe3
|
/flood-db/flood-db-redis-spring/src/main/java/cn/flood/db/redis/builder/RedisTemplaterFactoryBuild.java
|
981040ca6e54cb671aa91b385e7b986bf2276de5
|
[
"Apache-2.0"
] |
permissive
|
mmdai/flood-dependencies
|
97035978179228efe740dc8712996a8b5188b51a
|
586fa0db96dcfdd7bbdec064922f213df3250d21
|
refs/heads/master
| 2023-09-02T00:47:29.496481
| 2023-08-01T03:26:23
| 2023-08-01T03:26:23
| 203,513,950
| 5
| 3
|
Apache-2.0
| 2023-03-01T09:04:21
| 2019-08-21T05:39:54
|
Java
|
UTF-8
|
Java
| false
| false
| 1,476
|
java
|
package cn.flood.db.redis.builder;
import cn.flood.db.redis.exception.RedisException;
import java.util.Map;
import org.springframework.data.redis.core.RedisTemplate;
/**
* RedisTemplaterWrapper工厂类 当配置了多数据源时,用户可以通过该工厂获取自己想要的数据源
*/
public class RedisTemplaterFactoryBuild {
/**
* 默认RedisTemplate
*/
private RedisTemplate<String, Object> defaultRedisTemplate;
/**
* 多数据源RedisTemplate
*/
private Map<String, RedisTemplate<String, Object>> redisTemplateMap;
public RedisTemplate<String, Object> getDefaultRedisTemplate() {
return defaultRedisTemplate;
}
public void setDefaultRedisTemplate(RedisTemplate<String, Object> defaultRedisTemplate) {
this.defaultRedisTemplate = defaultRedisTemplate;
}
public Map<String, RedisTemplate<String, Object>> getRedisTemplateMap() {
return redisTemplateMap;
}
public void setRedisTemplateMap(Map<String, RedisTemplate<String, Object>> redisTemplateMap) {
this.redisTemplateMap = redisTemplateMap;
}
/**
* 根据数据源名称获取相对应的RedisTemplate数据源
*
* @param dsName
* @return
*/
public RedisTemplate<String, Object> getRedisTemplaterByName(String dsName) {
RedisTemplate<String, Object> redisTemplate = redisTemplateMap.get(dsName);
if (redisTemplate == null) {
throw new RedisException("没有相应的数据源");
}
return redisTemplate;
}
}
|
[
"daiming123.happy@163.com"
] |
daiming123.happy@163.com
|
4ff7a99fb5d0a830e3455473064a741cd79f4f92
|
ecb449c5c6c40d31911c452d3b351f18a7c436de
|
/www.csie.ntu.edu.tw/~sylee/courses/dataStructures/qqniuke/基础和提升/第八节/基础入门班第八课代码/class08/Code04_ReverseStackUsingRecursive.java
|
150ade45e232cf92c07275441f2100ac3ee1e7e0
|
[] |
no_license
|
2892931976/Algorithms-in-Go
|
166319cd97dc6521a06076f456d6eb14281868db
|
cbdb38d86282a42f9e0eb43e15f9362584524ffd
|
refs/heads/master
| 2023-01-20T18:06:28.345390
| 2020-05-03T07:55:49
| 2020-05-03T07:55:49
| 203,523,554
| 1
| 1
| null | 2022-12-30T01:26:35
| 2019-08-21T06:44:23
|
Java
|
UTF-8
|
Java
| false
| false
| 767
|
java
|
package class08;
import java.util.Stack;
public class Code04_ReverseStackUsingRecursive {
public static void reverse(Stack<Integer> stack) {
if (stack.isEmpty()) {
return;
}
int i = getAndRemoveLastElement(stack);
reverse(stack);
stack.push(i);
}
public static int getAndRemoveLastElement(Stack<Integer> stack) {
int result = stack.pop();
if (stack.isEmpty()) {
return result;
} else {
int last = getAndRemoveLastElement(stack);
stack.push(result);
return last;
}
}
public static void main(String[] args) {
Stack<Integer> test = new Stack<Integer>();
test.push(1);
test.push(2);
test.push(3);
test.push(4);
test.push(5);
reverse(test);
while (!test.isEmpty()) {
System.out.println(test.pop());
}
}
}
|
[
"2892931976@qq.com"
] |
2892931976@qq.com
|
adace66f15fb90aa0866020cf23e9549ae1afecc
|
2958df3f24ae8a8667394b6ebb083ba6a9a1d36a
|
/Universal08Cloud/src/com/willwinder/universalgcodesender/pendantui/SystemStateBean.java
|
d46c2eec89ee0b5b8fff341c8ca0a4997bfc7c8f
|
[] |
no_license
|
igorbeninca/utevolux
|
27ac6af9a6d03f21d815c057f18524717b3d1c4d
|
3f602d9cf9f58d424c3ea458346a033724c9c912
|
refs/heads/master
| 2021-01-19T02:50:04.157218
| 2017-10-13T16:19:41
| 2017-10-13T16:19:41
| 51,842,805
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,479
|
java
|
package com.willwinder.universalgcodesender.pendantui;
import com.willwinder.universalgcodesender.MainWindow.ControlState;
public class SystemStateBean {
private ControlState controlState = ControlState.COMM_DISCONNECTED;
private String fileName = "";
private String latestComment = "";
private String activeState = "";
private String workX = "0";
private String workY = "0";
private String workZ = "0";
private String machineX = "0";
private String machineY = "0";
private String machineZ = "0";
private String rowsInFile = "0";
private String sentRows = "0";
private String remainingRows = "0";
private String estimatedTimeRemaining = "--:--:--";
private String duration = "00:00:00";
private String sendButtonText = "Send";
private boolean sendButtonEnabled = false;
private String pauseResumeButtonText = "Pause";
private boolean pauseResumeButtonEnabled = false;
private String cancelButtonText = "Cancel";
private boolean cancelButtonEnabled = false;
public SystemStateBean() {
}
public ControlState getControlState() {
return controlState;
}
public void setControlState(ControlState controlState) {
this.controlState = controlState;
}
public String getActiveState() {
return activeState;
}
public void setActiveState(String activeState) {
this.activeState = activeState;
}
public String getWorkX() {
return workX;
}
public void setWorkX(String workX) {
this.workX = workX;
}
public String getWorkY() {
return workY;
}
public void setWorkY(String workY) {
this.workY = workY;
}
public String getWorkZ() {
return workZ;
}
public void setWorkZ(String workZ) {
this.workZ = workZ;
}
public String getMachineX() {
return machineX;
}
public void setMachineX(String machineX) {
this.machineX = machineX;
}
public String getMachineY() {
return machineY;
}
public void setMachineY(String machineY) {
this.machineY = machineY;
}
public String getMachineZ() {
return machineZ;
}
public void setMachineZ(String machineZ) {
this.machineZ = machineZ;
}
public String getRowsInFile() {
return rowsInFile;
}
public void setRowsInFile(String rowsInFile) {
this.rowsInFile = rowsInFile;
}
public String getSentRows() {
return sentRows;
}
public void setSentRows(String sentRows) {
this.sentRows = sentRows;
}
public String getRemainingRows() {
return remainingRows;
}
public void setRemainingRows(String remainingRows) {
this.remainingRows = remainingRows;
}
public String getEstimatedTimeRemaining() {
return estimatedTimeRemaining;
}
public void setEstimatedTimeRemaining(String estimatedTimeRemaining) {
this.estimatedTimeRemaining = estimatedTimeRemaining;
}
public String getDuration() {
return duration;
}
public void setDuration(String duration) {
this.duration = duration;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
String fileSeparator = System.getProperty("file.separator");
if(fileName.contains(fileSeparator)){
this.fileName = fileName.substring(fileName.lastIndexOf(fileSeparator)+1);
} else {
this.fileName = fileName;
}
}
public String getLatestComment() {
return latestComment;
}
public void setLatestComment(String lastComment) {
this.latestComment = lastComment;
}
public boolean isSendButtonEnabled() {
return sendButtonEnabled;
}
public void setSendButtonEnabled(boolean sendButtonEnabled) {
this.sendButtonEnabled = sendButtonEnabled;
}
public boolean isPauseResumeButtonEnabled() {
return pauseResumeButtonEnabled;
}
public void setPauseResumeButtonEnabled(boolean pauseResumeButtonEnabled) {
this.pauseResumeButtonEnabled = pauseResumeButtonEnabled;
}
public boolean isCancelButtonEnabled() {
return cancelButtonEnabled;
}
public void setCancelButtonEnabled(boolean cancelButtonEnabled) {
this.cancelButtonEnabled = cancelButtonEnabled;
}
public String getPauseResumeButtonText() {
return pauseResumeButtonText;
}
public void setPauseResumeButtonText(String pauseResumeButtonText) {
this.pauseResumeButtonText = pauseResumeButtonText;
}
public String getSendButtonText() {
return sendButtonText;
}
public void setSendButtonText(String sendButtonText) {
this.sendButtonText = sendButtonText;
}
public String getCancelButtonText() {
return cancelButtonText;
}
public void setCancelButtonText(String cancelButtonText) {
this.cancelButtonText = cancelButtonText;
}
}
|
[
"pilarrmeister@gmail.com"
] |
pilarrmeister@gmail.com
|
4f177bfad6617f7033c68bdb3f69c81eb332ff01
|
d669e67a5cfd22363b20cc7dc1c56fcb230454ec
|
/src/davi/mutation/media/ODL_23/Media.java
|
9ddbb34f7a7f67fd92be8d293561063375266413
|
[
"Apache-2.0"
] |
permissive
|
DaviSRodrigues/TAIGA
|
f1fe37583bd5009fa0ee192954d0c5ce5d051ee0
|
7997a8e4a31a177335178571a443b03f1bf3f2e4
|
refs/heads/master
| 2022-04-10T16:11:10.871395
| 2020-03-09T14:34:04
| 2020-03-09T14:34:04
| 101,459,116
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,987
|
java
|
// This is a mutant program.
// Author : ysma
package davi.mutation.media.ODL_23;
import java.awt.image.WritableRaster;
import davi.genetic.algorithm.Image;
public class Media
{
public static void main( java.lang.String[] args )
throws java.lang.Exception
{
}
public static davi.genetic.algorithm.Image aplicaFiltro( davi.genetic.algorithm.Image img )
{
try {
int p1;
int p2;
int p3;
int p4;
int p5;
int p6;
int p7;
int p8;
int p9;
int media;
int altura = img.getHeight();
int largura = img.getWidth();
java.awt.image.WritableRaster raster = img.getBufferedImage().getRaster();
for (int i = 1; i <= altura - 2; i++) {
for (int j = 1; j <= largura - 2; j++) {
p1 = raster.getSample( j, i, 0 );
p2 = raster.getSample( j, i - 1, 0 );
p3 = raster.getSample( j + 1, i - 1, 0 );
p4 = raster.getSample( j + 1, i, 0 );
p5 = raster.getSample( j + 1, i + 1, 0 );
p6 = raster.getSample( j, i, 0 );
p7 = raster.getSample( j - 1, i + 1, 0 );
p8 = raster.getSample( j - 1, i, 0 );
p9 = raster.getSample( j - 1, i - 1, 0 );
media = (p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + p9) / 9;
raster.setSample( j, i, 0, media );
verificaTimeout();
}
verificaTimeout();
}
} catch ( java.lang.Exception e ) {
return null;
}
return img;
}
public static void verificaTimeout()
throws java.lang.InterruptedException
{
if (Thread.currentThread().isInterrupted()) {
throw new java.lang.InterruptedException();
}
}
}
|
[
"davisilvarodrigues@gmail.com"
] |
davisilvarodrigues@gmail.com
|
f00b20ec7a733f43ddf5894177cc3d7982c8026f
|
8a9c5164fae44d2fe64dee576986f05615dbdfe9
|
/app/src/main/java/com/example/asus1/learnrecyclerview/BaseAdapter.java
|
98b16679277473fa74efa54a59eeba696b24977a
|
[] |
no_license
|
vivianluomin/RecuclerViewPra
|
a1eaf3ad42274471dae1fa709d2dc191e610ebd8
|
efbbab6a4f3ed4d7c171511e86829bcba5c6ddba
|
refs/heads/master
| 2020-03-27T15:56:45.044422
| 2018-08-30T12:54:39
| 2018-08-30T12:54:39
| 146,749,463
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,024
|
java
|
package com.example.asus1.learnrecyclerview;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class BaseAdapter extends RecyclerView.Adapter<BaseHolder> {
private static final String TAG = "BaseAdapter";
private Context mContext;
public BaseAdapter(Context context) {
mContext = context;
}
@Override
public BaseHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(mContext).inflate(R.layout.layout_item,parent,false);
BaseHolder holder = new BaseHolder(view);
Log.d(TAG, "onCreateViewHolder: ");
return holder;
}
@Override
public void onBindViewHolder(BaseHolder holder, int position) {
Log.d(TAG, "onBindViewHolder: \r\n"+holder.toString()+"----"+position);
}
@Override
public int getItemCount() {
return 30;
}
}
|
[
"273104241@qq.com"
] |
273104241@qq.com
|
0e54f48992e00873d744142d8a2c2d18043ee1c9
|
97abe314f90c47105d0a5a987c86c8a5eee8ace2
|
/carbidect/com.nokia.tools.carbide.ct.confml.ui/src/com/nokia/tools/carbide/ct/ui/overview/OverviewFactory.java
|
a6cd390caac43a83f163ab1f0d614ebab818debb
|
[] |
no_license
|
SymbianSource/oss.FCL.sftools.depl.swconfigapps.configtools
|
f668c9cd73dafd83d11beb9f86252674d2776cd2
|
dcab5fbd53cf585e079505ef618936fd8a322b47
|
refs/heads/master
| 2020-12-24T12:00:19.067971
| 2010-06-02T07:50:41
| 2010-06-02T07:50:41
| 73,007,522
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,699
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package com.nokia.tools.carbide.ct.ui.overview;
import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see com.nokia.tools.carbide.ct.ui.overview.OverviewPackage
* @generated
*/
public interface OverviewFactory extends EFactory {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
OverviewFactory eINSTANCE = com.nokia.tools.carbide.ct.ui.overview.impl.OverviewFactoryImpl.init();
/**
* Returns a new object of class '<em>Configuration</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Configuration</em>'.
* @generated
*/
Configuration createConfiguration();
/**
* Returns a new object of class '<em>Feature</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Feature</em>'.
* @generated
*/
Feature createFeature();
/**
* Returns a new object of class '<em>Simple Setting</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Simple Setting</em>'.
* @generated
*/
SimpleSetting createSimpleSetting();
/**
* Returns a new object of class '<em>Sequence Setting</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Sequence Setting</em>'.
* @generated
*/
SequenceSetting createSequenceSetting();
/**
* Returns a new object of class '<em>Sequence Value Item</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Sequence Value Item</em>'.
* @generated
*/
SequenceValueItem createSequenceValueItem();
/**
* Returns a new object of class '<em>Simple Value</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Simple Value</em>'.
* @generated
*/
SimpleValue createSimpleValue();
/**
* Returns a new object of class '<em>Line Number Container</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Line Number Container</em>'.
* @generated
*/
LineNumberContainer createLineNumberContainer();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
OverviewPackage getOverviewPackage();
} //OverviewFactory
|
[
"none@none"
] |
none@none
|
f00cf6dc97d4acf451a87bd994bf1256b6a3c6b8
|
ddcfad945588d5785e401b9fa986950daa0ae34c
|
/interfaces/src/main/java/org/jeesl/interfaces/model/module/attribute/JeeslAttributeItem.java
|
9ffce059fac11c6ae771c7e3aecbb4c86ed1662b
|
[] |
no_license
|
manandhar-aht/jeesl
|
79319e0b03797cea213c83522844da57a8b37504
|
629b6e0e5cd2bdace024dea5ec849a832adddf11
|
refs/heads/master
| 2020-06-20T16:54:06.287869
| 2019-07-25T14:25:36
| 2019-07-25T14:25:36
| 197,183,643
| 0
| 0
| null | 2019-07-16T11:47:13
| 2019-07-16T11:47:10
| null |
UTF-8
|
Java
| false
| false
| 806
|
java
|
package org.jeesl.interfaces.model.module.attribute;
import java.io.Serializable;
import net.sf.ahtutils.interfaces.model.behaviour.EjbSaveable;
import net.sf.ahtutils.interfaces.model.crud.EjbRemoveable;
import net.sf.ahtutils.interfaces.model.with.position.EjbWithPositionVisibleParent;
import net.sf.ahtutils.model.interfaces.with.EjbWithId;
public interface JeeslAttributeItem <CRITERIA extends JeeslAttributeCriteria<?,?,?,?>,
SET extends JeeslAttributeSet<?,?,?,?>>
extends Serializable,EjbWithId,EjbSaveable,EjbWithPositionVisibleParent,EjbRemoveable
{
public enum Attributes{itemSet,criteria}
SET getItemSet();
void setItemSet(SET itemSet);
CRITERIA getCriteria();
void setCriteria(CRITERIA criteria);
Boolean getTableHeader();
void setTableHeader(Boolean tableHeader);
}
|
[
"t.kisner@web.de"
] |
t.kisner@web.de
|
97e014014b40ab18c09bd2d043738b01995461f4
|
08bdd164c174d24e69be25bf952322b84573f216
|
/opencores/client/foundation classes/j2sdk-sec-1_4_2-src-scsl/jsse1.4.2-src/src/share/javax/net/ssl/SSLSessionBindingEvent.java
|
a08c0a0ebe86d5bda8b6f6428e67ab67cd79d83d
|
[] |
no_license
|
hagyhang/myforthprocessor
|
1861dcabcf2aeccf0ab49791f510863d97d89a77
|
210083fe71c39fa5d92f1f1acb62392a7f77aa9e
|
refs/heads/master
| 2021-05-28T01:42:50.538428
| 2014-07-17T14:14:33
| 2014-07-17T14:14:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,803
|
java
|
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.net.ssl;
import java.util.EventObject;
/**
* This event is propagated to a SSLSessionBindingListener.
* When a listener object is bound or unbound to an SSLSession by
* {@link SSLSession#putValue(String, Object)}
* or {@link SSLSession#removeValue(String)}, objects which
* implement the SSLSessionBindingListener will be receive an
* event of this type. The event's <code>name</code> field is the
* key in which the listener is being bound or unbound.
*
* @see SSLSession
* @see SSLSessionBindingListener
*
* @since 1.4
* @author Nathan Abramson
* @author David Brownell
* @version 1.13
*/
public
class SSLSessionBindingEvent
extends EventObject
{
/**
* @serial The name to which the object is being bound or unbound
*/
private String name;
/**
* Constructs a new SSLSessionBindingEvent.
*
* @param session the SSLSession acting as the source of the event
* @param name the name to which the object is being bound or unbound
*/
public SSLSessionBindingEvent(SSLSession session, String name)
{
super(session);
this.name = name;
}
/**
* Returns the name to which the object is being bound, or the name
* from which the object is being unbound.
*
* @return the name to which the object is being bound or unbound
*/
public String getName()
{
return name;
}
/**
* Returns the SSLSession into which the listener is being bound or
* from which the listener is being unbound.
*
* @return the <code>SSLSession</code>
*/
public SSLSession getSession()
{
return (SSLSession) getSource();
}
}
|
[
"blue@cmd.nu"
] |
blue@cmd.nu
|
16e79788cc5b1fa575b326cdcc1dc5effd27da4b
|
3864406df6f75378a2e15c176f0250b2b4c775e6
|
/src/esocial-esquemas/src/main/java/br/jus/tst/esocial/esquemas/eventos/tribproctrab/TNovaValidade.java
|
bb85f56055e804e833577b13a075255f649a1c3d
|
[
"BSD-3-Clause"
] |
permissive
|
tst-labs/esocial
|
272a4ccfc1a33868e669e454e976f848e79cf6c9
|
8be5092a80709521597189c3413de10dfd910f89
|
refs/heads/master
| 2023-07-23T07:26:43.590176
| 2023-07-18T13:23:20
| 2023-07-18T13:23:20
| 136,499,720
| 119
| 75
|
BSD-3-Clause
| 2023-09-08T12:24:41
| 2018-06-07T15:50:24
|
Java
|
UTF-8
|
Java
| false
| false
| 2,512
|
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: 2023.03.02 at 02:45:34 PM BRT
//
package br.jus.tst.esocial.esquemas.eventos.tribproctrab;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* CONDICAO_GRUPO: OC
*
* <p>Java class for T_novaValidade complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="T_novaValidade">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="iniValid" type="{http://www.esocial.gov.br/schema/evt/evtTribProcTrab/v_S_01_01_00}TS_iniValid"/>
* <element name="fimValid" type="{http://www.esocial.gov.br/schema/evt/evtTribProcTrab/v_S_01_01_00}TS_fimValid" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "T_novaValidade", propOrder = {
"iniValid",
"fimValid"
})
public class TNovaValidade {
@XmlElement(required = true)
protected String iniValid;
protected String fimValid;
/**
* Gets the value of the iniValid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getIniValid() {
return iniValid;
}
/**
* Sets the value of the iniValid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIniValid(String value) {
this.iniValid = value;
}
/**
* Gets the value of the fimValid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFimValid() {
return fimValid;
}
/**
* Sets the value of the fimValid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFimValid(String value) {
this.fimValid = value;
}
}
|
[
"tiago.bento@tst.jus.br"
] |
tiago.bento@tst.jus.br
|
1bc0dee188a1bc8b894236c0b19f86a9fb498a4a
|
3e9dd3298b85ab9b081117eb9c88032715ce13cf
|
/foc/src/com/foc/gui/table/cellControler/renderer/gantChartActivityRenderer/GanttStyleDesc.java
|
c866f1a52412ce5aba3c1dc392a48cccbcb5eb67
|
[
"Apache-2.0"
] |
permissive
|
focframework/framework
|
d0a151755f14a04b4a72a562b22f6bad83fe8836
|
6d07b694e7713d27b95f0ca69e2ec3c056969054
|
refs/heads/master
| 2020-05-30T16:48:32.505610
| 2019-05-30T07:38:36
| 2019-05-30T07:38:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,644
|
java
|
package com.foc.gui.table.cellControler.renderer.gantChartActivityRenderer;
import com.foc.desc.FocDesc;
import com.foc.desc.field.FColorField;
import com.foc.desc.field.FField;
import com.foc.desc.field.FMultipleChoiceField;
import com.foc.gui.FColorProvider;
import com.foc.list.FocList;
import com.foc.list.FocListOrder;
public class GanttStyleDesc extends FocDesc {
public static final int FLD_NAME = FField.FLD_NAME;
public static final int FLD_BAR_POSITIONS = 1;//Single Centered, Up_Down, Outer_Inner
public static final int FLD_FIRST_BAR = 2;//MINIMUM, MAXIMUM, FORECAST, ACTUAL, SCENARIO
public static final int FLD_FIRST_BAR_FILLER = 3;//MINIMUM, MAXIMUM, FORECAST, ACTUAL, SCENARIO
public static final int FLD_SECOND_BAR = 4;//MINIMUM, MAXIMUM, FORECAST, ACTUAL, SCENARIO
public static final int FLD_SECOND_BAR_FILLER = 5;//MINIMUM, MAXIMUM, FORECAST, ACTUAL, SCENARIO
public static final int FLD_FIRST_BAR_COLOR = 6;//First Bar Color
public static final int FLD_FIRST_BAR_FILLER_COLOR = 7;//First Bar Fill Color
public static final int FLD_SECOND_BAR_COLOR = 8;//Second Bar Color
public static final int FLD_SECOND_BAR_FILLER_COLOR = 9;//Second Bar Fill Color
public static final int FLD_RELATIONSHIP_MODE = 10;
public static final int FLD_RELATIONSHIP_COLOR = 11;
public static final int ARROW_MODE_NONE = 0;
public static final int ARROW_MODE_RANDOM_COLORS = 1;
public static final int ARROW_MODE_SELECTED_COLOR = 2;
public static final int BAR_POSITION_SINGLE_CENTERED = 0;
public static final int BAR_POSITION_UP_DOWN = 1;
public static final int BAR_POSITION_OUTER_INNER = 2;
public static final int BAR_TYPE_NONE = 0;
public static final int BAR_TYPE_MINIMUM = 1;
public static final int BAR_TYPE_MAXIMUM = 2;
public static final int BAR_TYPE_FORECAST = 3;
public static final int BAR_TYPE_ACTUAL = 4;
public static final int BAR_TYPE_SCENARIO = 5;
public static final String DB_TABLE_NAME = "GUI_GANTT_STYLE";
public GanttStyleDesc() {
super(GanttStyle.class, FocDesc.DB_RESIDENT, DB_TABLE_NAME, true);
setGuiBrowsePanelClass(GanttStyleGuiBrowsePanel.class);
setGuiDetailsPanelClass(GanttStyleGuiDetailsPanel.class);
FField fld = addReferenceField();
fld = addNameField();
fld.setMandatory(true);
FMultipleChoiceField mFld = new FMultipleChoiceField("BAR_POSITIONS", "Bar positions", FLD_BAR_POSITIONS, false, 2);
mFld.addChoice(BAR_POSITION_SINGLE_CENTERED, "Single centered bar");
mFld.addChoice(BAR_POSITION_UP_DOWN , "Up Down Bars");
mFld.addChoice(BAR_POSITION_OUTER_INNER , "Outer Inner Bars");
addField(mFld);
fld = newBarTypeMultipleChoiceField("FIRST_BAR_TYPE", "First Bar Type", FLD_FIRST_BAR);
addField(fld);
fld = newBarTypeMultipleChoiceField("FIRST_BAR_FILLER_TYPE", "First Bar Filler Type", FLD_FIRST_BAR_FILLER);
addField(fld);
fld = newBarTypeMultipleChoiceField("SECOND_BAR_TYPE", "Second Bar Type", FLD_SECOND_BAR);
addField(fld);
fld = newBarTypeMultipleChoiceField("SECOND_BAR_FILLER_TYPE", "Second Bar Filler Type", FLD_SECOND_BAR_FILLER);
addField(fld);
FColorField colorField = new FColorField("FIRST_BAR_COLOR", "First Bar Color", FLD_FIRST_BAR_COLOR, false, FColorProvider.getColorAt(0));
addField(colorField);
colorField = new FColorField("FIRST_BAR_FILLER_COLOR", "First Bar Color", FLD_FIRST_BAR_FILLER_COLOR, false, FColorProvider.getColorAt(1));
addField(colorField);
colorField = new FColorField("SECOND_BAR_COLOR", "Second Bar Color", FLD_SECOND_BAR_COLOR, false, FColorProvider.getColorAt(2));
addField(colorField);
colorField = new FColorField("SECOND_BAR_FILLER_COLOR", "Second Bar Filler Color", FLD_SECOND_BAR_FILLER_COLOR, false, FColorProvider.getColorAt(3));
addField(colorField);
mFld = new FMultipleChoiceField("ARROW_MODE", "Relationship mode", FLD_RELATIONSHIP_MODE, false, 2);
mFld.addChoice(ARROW_MODE_NONE , "None");
mFld.addChoice(ARROW_MODE_RANDOM_COLORS , "Random colors");
mFld.addChoice(ARROW_MODE_SELECTED_COLOR, "Selected Color");
addField(mFld);
colorField = new FColorField("ARROW_COLOR", "Arrow Color", FLD_RELATIONSHIP_COLOR, false, FColorProvider.getColorAt(0));
addField(colorField);
}
private FMultipleChoiceField newBarTypeMultipleChoiceField(String fieldName, String fieldTitle, int fieldID){
FMultipleChoiceField fld = new FMultipleChoiceField(fieldName, fieldTitle, fieldID, false, 2);
fld.addChoice(BAR_TYPE_NONE ,"-" );
fld.addChoice(BAR_TYPE_MINIMUM ,"Minimum" );
fld.addChoice(BAR_TYPE_MAXIMUM ,"Maximum" );
fld.addChoice(BAR_TYPE_FORECAST,"Forecast");
fld.addChoice(BAR_TYPE_ACTUAL ,"Actual" );
fld.addChoice(BAR_TYPE_SCENARIO,"Scenario");
return fld;
}
public static FocList getList(int mode){
return getInstance().getFocList(mode);
}
@Override
public FocList newFocList(){
FocList list = super.newFocList();
list.setDirectlyEditable(false);
list.setDirectImpactOnDatabase(true);
if(list.getListOrder() == null){
FocListOrder order = new FocListOrder(FLD_NAME);
list.setListOrder(order);
}
return list;
}
public static FocDesc getInstance() {
return getInstance(DB_TABLE_NAME, GanttStyleDesc.class);
}
}
|
[
"antoine.samaha@01barmaja.com"
] |
antoine.samaha@01barmaja.com
|
f1eda0dc8d2e752f7ddd66eb09986766e6631181
|
6d9d90789f91d4010c30344409aad49fa99099e3
|
/lucene-analyzers-common/src/test/java/org/apache/lucene/analysis/sinks/DateRecognizerSinkTokenizerTest.java
|
8fa4d717fab2bed519062c0175aeccec13ba5cf0
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
bighaidao/lucene
|
8c2340f399c60742720e323a0b0c0a70b2651147
|
bd5d75e31526b599296c3721bc2081a3bde3e251
|
refs/heads/master
| 2021-08-07T07:01:42.438869
| 2012-08-22T09:16:08
| 2012-08-22T09:16:08
| 8,878,381
| 1
| 2
|
Apache-2.0
| 2021-08-02T17:05:32
| 2013-03-19T12:48:16
|
Java
|
UTF-8
|
Java
| false
| false
| 1,916
|
java
|
package org.apache.lucene.analysis.sinks;
/**
* Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.io.IOException;
import java.io.StringReader;
import java.text.SimpleDateFormat;
import java.util.Locale;
import org.apache.lucene.analysis.BaseTokenStreamTestCase;
import org.apache.lucene.analysis.TeeSinkTokenFilter;
import org.apache.lucene.analysis.TeeSinkTokenFilter.SinkTokenStream;
import org.apache.lucene.analysis.MockTokenizer;
public class DateRecognizerSinkTokenizerTest extends BaseTokenStreamTestCase {
public void test() throws IOException {
DateRecognizerSinkFilter sinkFilter = new DateRecognizerSinkFilter(new SimpleDateFormat("MM/dd/yyyy", Locale.US));
String test = "The quick red fox jumped over the lazy brown dogs on 7/11/2006 The dogs finally reacted on 7/12/2006";
TeeSinkTokenFilter tee = new TeeSinkTokenFilter(new MockTokenizer(new StringReader(test), MockTokenizer.WHITESPACE, false));
SinkTokenStream sink = tee.newSinkTokenStream(sinkFilter);
int count = 0;
tee.reset();
while (tee.incrementToken()) {
count++;
}
assertTrue(count + " does not equal: " + 18, count == 18);
int sinkCount = 0;
sink.reset();
while (sink.incrementToken()) {
sinkCount++;
}
assertTrue("sink Size: " + sinkCount + " is not: " + 2, sinkCount == 2);
}
}
|
[
"joergprante@gmail.com"
] |
joergprante@gmail.com
|
85163801559368492a38680d6eb11aee577016c1
|
8a135ca3f5eb37520774209cbe37244dbaf0e268
|
/mango-sql/src/main/java/com/gengoai/sql/constraint/column/NotNull.java
|
dfca1b9b36610a10c3bddb2bdbd73c3b433396be
|
[
"Apache-2.0"
] |
permissive
|
gengoai/mango
|
511ccb5cd69ee7930996277c400e6a6c26dafd73
|
c9f427bb74c2dc60813dd5a9c4f66cc2562dc69f
|
refs/heads/master
| 2021-06-12T13:42:31.298020
| 2020-07-31T16:45:11
| 2020-07-31T16:45:11
| 128,667,584
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,839
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.gengoai.sql.constraint.column;
import com.gengoai.sql.SQLDialect;
import com.gengoai.sql.constraint.ColumnConstraint;
import com.gengoai.sql.constraint.ConflictClause;
import com.gengoai.sql.constraint.Constraint;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
import lombok.Value;
@Value
@EqualsAndHashCode(callSuper = true)
public class NotNull extends Constraint implements ColumnConstraint {
private static final long serialVersionUID = 1L;
ConflictClause conflictClause;
public NotNull() {
this(null, null);
}
public NotNull(String name, ConflictClause conflictClause) {
super(name);
this.conflictClause = conflictClause;
}
@Override
public boolean providesValue() {
return false;
}
@Override
public String toSQL(@NonNull SQLDialect dialect) {
String str = super.toSQL(dialect) + "NOT NULL";
if(conflictClause != null) {
str += " " + dialect.onConflict(conflictClause);
}
return str;
}
}//END OF NotNull
|
[
"david@davidbracewell.com"
] |
david@davidbracewell.com
|
37088cfc1257087fbcff2197a956b1db7ae6d4d2
|
29e0d37ff00a0272e043aaee5d8f37ede4e1b692
|
/fxpt/fxpt.main/src/main/java/com/cntest/fxpt/anlaysis/event/handler/WuHouCalculateHandler.java
|
c19c3ebae20ee98775fd57ce11da4c73e35fcd52
|
[] |
no_license
|
SelfImpr001/seaskyland
|
2704a1c178604a7b2d1d4b4c637ccb64748aaa51
|
8ab1f011807363d95baf523523b7349a815970f2
|
refs/heads/master
| 2020-03-11T13:08:47.339552
| 2018-07-31T06:40:10
| 2018-07-31T06:40:10
| 130,016,742
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,441
|
java
|
/*
* @(#)com.cntest.fxpt.anlaysis.service.impl.CalculateHandler.java 1.0 2014年11月28日:上午9:16:02
*
* Copyright 2014 seasky land, Inc. All rights reserved.
*/
package com.cntest.fxpt.anlaysis.event.handler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.cntest.fxpt.anlaysis.bean.CalculateResult;
import com.cntest.fxpt.anlaysis.bean.CalculateTask;
import com.cntest.fxpt.anlaysis.calculate.impl.WuHouCalcluator;
import com.cntest.util.ExceptionHelper;
import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.WorkHandler;
/**
* <Pre>
* </Pre>
*
* @author 刘海林 2014年11月28日 上午9:16:02
* @version 1.0
*/
public class WuHouCalculateHandler implements EventHandler<CalculateTask>,
WorkHandler<CalculateTask> {
private static final Logger log = LoggerFactory
.getLogger(WuHouCalculateHandler.class);
@Override
public void onEvent(CalculateTask event) throws Exception {
try {
WuHouCalcluator calculator = new WuHouCalcluator();
CalculateResult cr = event.getCalculateResult(0);
calculator.calculate(event, cr, event.getSubjectScoreContainer());
} catch (Exception e) {
log.error(event.toString() + "==>>"
+ ExceptionHelper.trace2String(e));
e.printStackTrace();
}
log.debug("计算完毕" + event.toString());
}
@Override
public void onEvent(CalculateTask event, long arg1, boolean arg2)
throws Exception {
this.onEvent(event);
}
}
|
[
"xyqiao@vip.qq.com"
] |
xyqiao@vip.qq.com
|
e6d6fd630bfe26cf3f2e882781c684e5dd80aa84
|
9a6ea6087367965359d644665b8d244982d1b8b6
|
/src/main/java/X/C73013Vd.java
|
600d57101b2602c12f083f6a9d753e879b11437a
|
[] |
no_license
|
technocode/com.wa_2.21.2
|
a3dd842758ff54f207f1640531374d3da132b1d2
|
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
|
refs/heads/master
| 2023-02-12T11:20:28.666116
| 2021-01-14T10:22:21
| 2021-01-14T10:22:21
| 329,578,591
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 351
|
java
|
package X;
/* renamed from: X.3Vd reason: invalid class name and case insensitive filesystem */
public final /* synthetic */ class C73013Vd implements AbstractC02170Ax {
public static final /* synthetic */ C73013Vd A00 = new C73013Vd();
@Override // X.AbstractC02170Ax
public final Object get() {
return C002701k.A00();
}
}
|
[
"madeinborneo@gmail.com"
] |
madeinborneo@gmail.com
|
247160531f47dd49e6b8cf0a2f06321ba5cb546e
|
a69843c67fd8a5b227837bd253fde3f672739e87
|
/dataunit-core/src/main/java/com/linkedpipes/etl/dataunit/core/pipeline/DataUnit.java
|
a446d4c0a82907777b6bfd8447fa4ec03bbf4942
|
[
"MIT"
] |
permissive
|
eghuro/etl
|
28713014be4db6bb010bd8c6a4e9a8249857ed2f
|
5d74f9156397a4b48ad0eb3d833721dc67ba74a2
|
refs/heads/master
| 2020-04-02T02:41:15.816327
| 2018-09-20T11:44:31
| 2018-09-20T11:44:31
| 153,922,127
| 0
| 0
|
NOASSERTION
| 2018-10-20T15:53:20
| 2018-10-20T15:53:20
| null |
UTF-8
|
Java
| false
| false
| 932
|
java
|
package com.linkedpipes.etl.dataunit.core.pipeline;
import com.linkedpipes.etl.executor.api.v1.rdf.RdfException;
import com.linkedpipes.etl.executor.api.v1.rdf.model.RdfValue;
import com.linkedpipes.etl.executor.api.v1.rdf.pojo.Loadable;
import com.linkedpipes.etl.executor.api.v1.vocabulary.LP_PIPELINE;
class DataUnit implements Loadable {
private String resource;
private String binding;
@Override
public void resource(String resource) throws RdfException {
this.resource = resource;
}
@Override
public Loadable load(String predicate, RdfValue value) throws RdfException {
switch (predicate) {
case LP_PIPELINE.HAS_BINDING:
binding = value.asString();
return null;
}
return null;
}
public String getResource() {
return resource;
}
public String getBinding() {
return binding;
}
}
|
[
"skodapetr@gmail.com"
] |
skodapetr@gmail.com
|
b22e6e209bd46151cf1f074600428eafebbf9e29
|
cb593d17cf6e163c7ff61ee2bd4bbc7e2ac6cc93
|
/list/src/linked/TwoDirLinkedList.java
|
6704b9270bb25367b077e600760ce1d06b51083c
|
[
"MIT",
"LicenseRef-scancode-other-permissive"
] |
permissive
|
15775979058/Demo
|
f68e80bfe6a1d3290d77dc349258ef7f2a16d4c8
|
31b3e7e5d52a69247f543c2d362901d21eb778c1
|
refs/heads/master
| 2020-09-22T02:26:18.128227
| 2019-07-24T13:23:47
| 2019-07-24T13:23:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,002
|
java
|
package linked;
import linked.node.TwoDirNode;
/**
* User:zhangweixiao
* Description:
*/
public class TwoDirLinkedList<T> {
private int cur_count = 0;
//the first's data means nothing
private TwoDirNode<T> first = new TwoDirNode(null);
public TwoDirLinkedList(T... args) {
first.setNext(CreateLinkedList(first,null,args));
}
/**
*
* @param before_List
* @param after_list
* @param args
* @return
*/
public TwoDirNode CreateLinkedList(TwoDirNode<T> before_List,TwoDirNode<T> after_list,T... args)
{
TwoDirNode after=after_list;
TwoDirNode before=before_List;
T[] tmp = args.clone();
for (int j = tmp.length - 1; j >= 0; j--) {
TwoDirNode cur=new TwoDirNode(tmp[j]);
cur.setNext(after);
if(j<tmp.length-1)
cur.getNext().setPrior(after);
after=cur;
}
if(after!=null)
after.setPrior(before);
cur_count+=args.length;
return after;
}
public void insert(int pos, T... objs) {
if(pos<0||pos>cur_count)
throw new IndexOutOfBoundsException();
TwoDirNode insert_after_this_node=first;
for(int i=0;i<pos;i++)
{
insert_after_this_node=insert_after_this_node.getNext();
}
TwoDirNode<T> inserted_node_first = CreateLinkedList(insert_after_this_node,insert_after_this_node.getNext(),objs);
insert_after_this_node.setNext(inserted_node_first);
}
public T delete(int pos)
{
if(pos<0||pos>=cur_count)
throw new IndexOutOfBoundsException();
TwoDirNode<T> delete_after_this_node=first;
for(int i=0;i<pos;i++)
{
delete_after_this_node=delete_after_this_node.getNext();
}
T ret=delete_after_this_node.getNext().getObj();
delete_after_this_node.getNext().setPrior(delete_after_this_node);
delete_after_this_node.setNext(delete_after_this_node.getNext().getNext());
cur_count--;
return ret;
}
/**
* I want to whether Java GC garbage can automatically delete the link,if the head is not pointer to the Link.
* but now just set every TwoDirNode's next to null to make GC active.
* @return
*/
public boolean clear()
{
TwoDirNode curNode=first;
TwoDirNode nextNode=curNode.getNext();
while (nextNode!=null)
{
nextNode=curNode.getNext();
curNode.setNext(null);
curNode=nextNode;
}
return true;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
TwoDirNode TwoDirNode = first.getNext();
while (TwoDirNode != null) {
sb.append(TwoDirNode.getObj() + ",");
TwoDirNode = TwoDirNode.getNext();
}
return sb.toString();
}
public int Length() {
return cur_count;
}
}
|
[
"zhangweixiao@live.com"
] |
zhangweixiao@live.com
|
53cfed20b4e169115e7ded2496ffd786e149a9f0
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/10/10_a7d1e00b07fc42df7f7a920b0485410d0f791df2/ActivationGroupTest/10_a7d1e00b07fc42df7f7a920b0485410d0f791df2_ActivationGroupTest_t.java
|
bebea4b196d920c79aa70e3c38d86c81cd0f9ec8
|
[] |
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,654
|
java
|
package drools.cookbook.chapter01;
import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.List;
import org.drools.KnowledgeBase;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderError;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.event.rule.AfterActivationFiredEvent;
import org.drools.event.rule.DefaultAgendaEventListener;
import org.drools.io.impl.ClassPathResource;
import org.drools.runtime.StatefulKnowledgeSession;
import org.junit.Test;
public class ActivationGroupTest {
@Test
public void serverInitialization() {
List<String> firedRules = new ArrayList<String>();
StatefulKnowledgeSession ksession = createKnowledgeSession(firedRules);
Server winServer = new Server("winServer", 4, 4096, 2048, 0);
ksession.insert(winServer);
Server ubuntuServer = new Server("ubuntuServer", 4, 2048, 1024, 0);
ksession.insert(ubuntuServer);
Virtualization rhel = new Virtualization("rhel", "debianServer", 2048, 160);
VirtualizationRequest virtualizationRequest = new VirtualizationRequest(rhel);
ksession.insert(virtualizationRequest);
ksession.getAgenda().getAgendaGroup("server-configuration-loaded").setFocus();
ksession.fireAllRules();
assertTrue(firedRules.remove("Load server configuration from file"));
assertTrue(firedRules.remove("Check the required server configuration"));
}
private StatefulKnowledgeSession createKnowledgeSession(final List<String> firedRules) {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(new ClassPathResource("rules.drl", getClass()), ResourceType.DRL);
if (kbuilder.hasErrors()) {
if (kbuilder.getErrors().size() > 0) {
for (KnowledgeBuilderError kerror : kbuilder.getErrors()) {
System.err.println(kerror);
}
}
}
KnowledgeBase kbase = kbuilder.newKnowledgeBase();
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
if (firedRules != null) {
ksession.addEventListener(new DefaultAgendaEventListener() {
@Override
public void afterActivationFired(AfterActivationFiredEvent event) {
firedRules.add(event.getActivation().getRule().getName());
}
});
}
return ksession;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
cea3aea5e5b898afff7f73a6862b99c5ed37001d
|
f8bfd08b69508143cae43fe32f7237d2efadfb31
|
/CHPEV_DEV_RPT/src/main/java/com/ailk/bi/base/common/CSysCode.java
|
8b9e33b5b5a8365cbefc03dcb775fcf8bfdb036b
|
[] |
no_license
|
qq85609655/BIReport
|
540dedefe76e2127a1ad4ce16455aa8dfb8480a5
|
769568a13e709064a32094f9996a49f3edb7cc59
|
refs/heads/master
| 2021-05-27T06:56:29.683749
| 2013-03-31T09:03:04
| 2013-03-31T09:03:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 958
|
java
|
package com.ailk.bi.base.common;
public class CSysCode {
public static String SYS_TITLE = "经营分析系统";
public static String SYS_CODE = "1";
public static String CITY_CODE = "000";
public static String CITY_NAME = "北京市";
public static String CITY_DESC = "北京市";
public static String G_ROLE_CODE = "";// G网业务角色
public static String C_ROLE_CODE = "";// C网业务角色
public static String GC_ROLE_CODE = "";// G/C网业务角色
public static String PRINT_ROLE = "";// 打印
public static String EXCEL_ROLE = "";// 导出
public static String PRINT_EXCEL_ROLE = "";// 打印导出
public static String SUBJECT_OPP_STABLE = "2";// 稳定性
public static String SUBJECT_OPP_VALUE = "1";// 价值
public static String SUBJECT_OPP_CUST_FCF_VALUE = "4";// 反策反
public static String SUBJECT_OPP_ROWNUM = "200000";// 价值
public static String SUBJECT_OPP_BACK = "3";// 高价值客户策反
}
|
[
"xiaofeng.dou@gmail.com"
] |
xiaofeng.dou@gmail.com
|
0d2d6820d3deeb3903480d91ed9a3bf789677b0f
|
dafcdd6347a1be928df01b5a5bf47527f38d029f
|
/secondNPRRssFeedTest/src/org/tacademy/network/rss/c2dm/C2DMRegistrationRequest.java
|
ef730b0909017b3fd0ca4b90505f94748e1f4715
|
[] |
no_license
|
sunleesi/android-education-project
|
b62e63076619cb927490fe1585c6a7a0169c79a5
|
31c1e520275ba0445b3288e0626fe5717193bd7b
|
refs/heads/master
| 2021-01-10T03:06:12.607555
| 2015-06-01T06:38:54
| 2015-06-01T06:38:54
| 36,643,841
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 529
|
java
|
package org.tacademy.network.rss.c2dm;
import org.tacademy.network.rss.Nework.NetworkRequest;
import org.tacademy.network.rss.Nework.PostRequest;
import org.tacademy.network.rss.upload.UploadParser;
public class C2DMRegistrationRequest extends PostRequest {
public C2DMRegistrationRequest(String email,String registrationid) {
this.urlString = NetworkRequest.BASE_URL + "/c2dmregistration";
this.parser = new UploadParser();
addFormData("email",email);
addFormData("registrationid",registrationid);
}
}
|
[
"dongja94@gmail.com"
] |
dongja94@gmail.com
|
d55642e6421a0e7abee412b767631a1a7bcd2e6b
|
44545af9639fcbaacf0ca525e679be6c704b50db
|
/kafka/sidecar-backend/src/main/java/com/networknt/mesh/kafka/backend/model/Record.java
|
eb699ae8c0658189fa3a1e7fb7e15d477c9d8f60
|
[
"Apache-2.0"
] |
permissive
|
networknt/light-example-4j
|
c806c6e211a66a57f57268814c09a13decc9167d
|
f81a5b4d3c3df3bf68eadcd6b32b717d129a1b6a
|
refs/heads/release
| 2023-09-04T09:19:10.684389
| 2023-08-17T18:34:35
| 2023-08-17T18:34:35
| 67,934,497
| 103
| 59
|
Apache-2.0
| 2022-05-26T15:44:31
| 2016-09-11T14:31:47
|
Java
|
UTF-8
|
Java
| false
| false
| 2,764
|
java
|
package com.networknt.mesh.kafka.backend.model;
import java.util.Arrays;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Record {
private String key;
private String value;
private Object header;
private Integer partition;
private java.math.BigDecimal offset;
public Record () {
}
@JsonProperty("key")
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
@JsonProperty("value")
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@JsonProperty("header")
public Object getHeader() {
return header;
}
public void setHeader(Object header) {
this.header = header;
}
@JsonProperty("partition")
public Integer getPartition() {
return partition;
}
public void setPartition(Integer partition) {
this.partition = partition;
}
@JsonProperty("offset")
public java.math.BigDecimal getOffset() {
return offset;
}
public void setOffset(java.math.BigDecimal offset) {
this.offset = offset;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Record Record = (Record) o;
return Objects.equals(key, Record.key) &&
Objects.equals(value, Record.value) &&
Objects.equals(header, Record.header) &&
Objects.equals(partition, Record.partition) &&
Objects.equals(offset, Record.offset);
}
@Override
public int hashCode() {
return Objects.hash(key, value, header, partition, offset);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Record {\n");
sb.append(" key: ").append(toIndentedString(key)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); sb.append(" header: ").append(toIndentedString(header)).append("\n"); sb.append(" partition: ").append(toIndentedString(partition)).append("\n"); sb.append(" offset: ").append(toIndentedString(offset)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"stevehu@gmail.com"
] |
stevehu@gmail.com
|
b2b8ca1ca4ee6c6e7f0238e69267bc40e9f3f4ab
|
9d0517091fe2313c40bcc88a7c82218030d2075c
|
/core/src/main/java/org/jclouds/location/suppliers/LocationIdToIso3166CodesSupplier.java
|
4edf0b5dbb1b66ca03445467ef8ac3a658eb16f6
|
[
"Apache-2.0"
] |
permissive
|
nucoupons/Mobile_Applications
|
5c63c8d97f48e1051049c5c3b183bbbaae1fa6e6
|
62239dd0f17066c12a86d10d26bef350e6e9bd43
|
refs/heads/master
| 2020-12-04T11:49:53.121041
| 2020-01-04T12:00:04
| 2020-01-04T12:00:04
| 231,754,011
| 0
| 0
|
Apache-2.0
| 2020-01-04T12:02:30
| 2020-01-04T11:46:54
|
Java
|
UTF-8
|
Java
| false
| false
| 1,247
|
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.jclouds.location.suppliers;
import java.util.Map;
import java.util.Set;
import org.jclouds.location.suppliers.fromconfig.LocationIdToIso3166CodesFromConfiguration;
import com.google.common.base.Supplier;
import com.google.inject.ImplementedBy;
/**
*
*/
@ImplementedBy(LocationIdToIso3166CodesFromConfiguration.class)
public interface LocationIdToIso3166CodesSupplier extends Supplier<Map<String, Supplier<Set<String>>>> {
}
|
[
"Administrator@fdp"
] |
Administrator@fdp
|
598237ff183ce3a779d5afba843041d18679671a
|
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
|
/bin/modules/commerce-services/commerceservices/src/de/hybris/platform/commerceservices/order/impl/DefaultCommerceSaveCartStrategy.java
|
27d5d0bd201dfa75a05103bd7d85e930ed3a4725
|
[] |
no_license
|
jp-developer0/hybrisTrail
|
82165c5b91352332a3d471b3414faee47bdb6cee
|
a0208ffee7fee5b7f83dd982e372276492ae83d4
|
refs/heads/master
| 2020-12-03T19:53:58.652431
| 2020-01-02T18:02:34
| 2020-01-02T18:02:34
| 231,430,332
| 0
| 4
| null | 2020-08-05T22:46:23
| 2020-01-02T17:39:15
| null |
UTF-8
|
Java
| false
| false
| 2,664
|
java
|
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package de.hybris.platform.commerceservices.order.impl;
import de.hybris.platform.commerceservices.order.CommerceSaveCartException;
import de.hybris.platform.commerceservices.order.CommerceSaveCartStrategy;
import de.hybris.platform.commerceservices.service.data.CommerceSaveCartParameter;
import de.hybris.platform.commerceservices.service.data.CommerceSaveCartResult;
import de.hybris.platform.core.model.order.CartModel;
import de.hybris.platform.servicelayer.time.TimeService;
import java.util.Date;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Required;
/**
* Default implementation of the interface {@link CommerceSaveCartStrategy}. The provided
* {@link CommerceSaveCartParameter#cart} (or if empty the session cart) is simply enriched with additional data to mark
* it as a saved cart. The cart is not cloned.
*/
public class DefaultCommerceSaveCartStrategy extends AbstractCommerceSaveCartStrategy
{
private static int DEFAULT_SAVE_CART_EXPIRY_DAYS = 30;
private TimeService timeService;
@Override
public CommerceSaveCartResult saveCart(final CommerceSaveCartParameter parameters) throws CommerceSaveCartException
{
this.beforeSaveCart(parameters);
final CommerceSaveCartResult saveCartResult = new CommerceSaveCartResult();
validateSaveCartParameters(parameters);
final CartModel cartToBeSaved = parameters.getCart() == null ? getCartService().getSessionCart() : parameters.getCart();
validateSaveCart(cartToBeSaved);
final Date currentDate = getTimeService().getCurrentTime();
cartToBeSaved.setExpirationTime(calculateExpirationTime(currentDate));
cartToBeSaved.setSaveTime(currentDate);
cartToBeSaved.setSavedBy(getUserService().getCurrentUser());
cartToBeSaved.setName(parameters.getName());
cartToBeSaved.setDescription(parameters.getDescription());
saveCartResult.setSavedCart(cartToBeSaved);
getModelService().save(cartToBeSaved);
getModelService().refresh(cartToBeSaved);
this.afterSaveCart(parameters, saveCartResult);
return saveCartResult;
}
protected Date calculateExpirationTime(final Date currentDate)
{
final Integer expirationDays = getConfigurationService().getConfiguration().getInteger(
"commerceservices.saveCart.expiryTime.days", Integer.valueOf(DEFAULT_SAVE_CART_EXPIRY_DAYS));
return new DateTime(currentDate).plusDays(expirationDays.intValue()).toDate();
}
protected TimeService getTimeService()
{
return timeService;
}
@Required
public void setTimeService(final TimeService timeService)
{
this.timeService = timeService;
}
}
|
[
"juan.gonzalez.working@gmail.com"
] |
juan.gonzalez.working@gmail.com
|
08422f9554fe850ff8d7789f34dc39cfd5c47d38
|
d47473c82d42cbd17504965b330be52485c16c91
|
/squidb-processor/src/com/yahoo/squidb/processor/plugins/defaults/ModelMethodPlugin.java
|
bf60678e2d05c2c7bb7f04ac7e710feea7d345ee
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
rugby110/squidb
|
491cdc992f48a45e79a235e36dfde28729ebc309
|
78e3f503210d63d270b567d786299e1576e8b31c
|
refs/heads/master
| 2020-06-27T08:48:40.856190
| 2016-11-21T21:46:03
| 2016-11-21T21:46:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,763
|
java
|
/*
* Copyright 2015, Yahoo Inc.
* Copyrights licensed under the Apache 2.0 License.
* See the accompanying LICENSE file for terms.
*/
package com.yahoo.squidb.processor.plugins.defaults;
import com.yahoo.aptutils.model.CoreTypes;
import com.yahoo.aptutils.model.DeclaredTypeName;
import com.yahoo.aptutils.utils.AptUtils;
import com.yahoo.aptutils.writer.JavaFileWriter;
import com.yahoo.aptutils.writer.expressions.Expression;
import com.yahoo.aptutils.writer.expressions.Expressions;
import com.yahoo.aptutils.writer.parameters.MethodDeclarationParameters;
import com.yahoo.squidb.annotations.ModelMethod;
import com.yahoo.squidb.processor.TypeConstants;
import com.yahoo.squidb.processor.data.ModelSpec;
import com.yahoo.squidb.processor.plugins.Plugin;
import com.yahoo.squidb.processor.plugins.PluginEnvironment;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
import javax.lang.model.element.VariableElement;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.ErrorType;
import javax.lang.model.type.TypeMirror;
import javax.tools.Diagnostic;
/**
* A {@link Plugin} that controls copying public static methods or methods annotated with {@link ModelMethod}
* to the generated model. It is enabled by default. It can be disabled by passing a bitmask with the
* {@link PluginEnvironment#OPTIONS_DISABLE_DEFAULT_METHOD_HANDLING} flag set.
*/
public class ModelMethodPlugin extends Plugin {
private final List<ExecutableElement> modelMethods = new ArrayList<>();
private final List<ExecutableElement> staticModelMethods = new ArrayList<>();
public ModelMethodPlugin(ModelSpec<?> modelSpec, PluginEnvironment pluginEnv) {
super(modelSpec, pluginEnv);
parseModelMethods();
}
@Override
public void addRequiredImports(Set<DeclaredTypeName> imports) {
utils.accumulateImportsFromElements(imports, modelMethods);
utils.accumulateImportsFromElements(imports, staticModelMethods);
}
@Override
public void emitMethods(JavaFileWriter writer) throws IOException {
for (ExecutableElement e : modelMethods) {
emitModelMethod(writer, e, Modifier.PUBLIC);
}
for (ExecutableElement e : staticModelMethods) {
emitModelMethod(writer, e, Modifier.PUBLIC, Modifier.STATIC);
}
}
private void emitModelMethod(JavaFileWriter writer, ExecutableElement e, Modifier... modifiers)
throws IOException {
MethodDeclarationParameters params = utils.methodDeclarationParamsFromExecutableElement(e, modifiers);
ModelMethod methodAnnotation = e.getAnnotation(ModelMethod.class);
List<Object> arguments = new ArrayList<>();
if (methodAnnotation != null) {
String name = methodAnnotation.name();
if (!AptUtils.isEmpty(name)) {
params.setMethodName(name);
}
params.getArgumentTypes().remove(0);
params.getArgumentNames().remove(0);
arguments.add(0, "this");
}
arguments.addAll(params.getArgumentNames());
Expression methodCall = Expressions.staticMethod(modelSpec.getModelSpecName(),
e.getSimpleName().toString(), arguments);
if (!CoreTypes.VOID.equals(params.getReturnType())) {
methodCall = methodCall.returnExpr();
}
JavadocPlugin.writeJavadocFromElement(pluginEnv, writer, e);
writer.beginMethodDefinition(params)
.writeStatement(methodCall)
.finishMethodDefinition();
}
private void parseModelMethods() {
List<? extends Element> enclosedElements = modelSpec.getModelSpecElement().getEnclosedElements();
for (Element e : enclosedElements) {
if (e instanceof ExecutableElement) {
checkExecutableElement((ExecutableElement) e, modelMethods, staticModelMethods,
modelSpec.getGeneratedClassName());
}
}
}
private void checkExecutableElement(ExecutableElement e, List<ExecutableElement> modelMethods,
List<ExecutableElement> staticModelMethods, DeclaredTypeName modelClass) {
Set<Modifier> modifiers = e.getModifiers();
if (e.getKind() == ElementKind.CONSTRUCTOR) {
// Don't copy constructors
return;
}
if (!modifiers.contains(Modifier.STATIC)) {
utils.getMessager().printMessage(Diagnostic.Kind.WARNING,
"Model spec objects should never be instantiated, so non-static methods are meaningless. " +
"Did you mean to make this a static method?", e);
return;
}
ModelMethod methodAnnotation = e.getAnnotation(ModelMethod.class);
// Private static methods may be unannotated if they are called by a public annotated method.
// Don't assume error if method is private
if (methodAnnotation == null) {
if (modifiers.contains(Modifier.PUBLIC)) {
staticModelMethods.add(e);
} else if (!modifiers.contains(Modifier.PRIVATE)) {
utils.getMessager().printMessage(Diagnostic.Kind.WARNING,
"This method will not be added to the model definition. " +
"Did you mean to annotate this method with @ModelMethod?", e);
}
} else {
List<? extends VariableElement> params = e.getParameters();
if (params.size() == 0) {
modelSpec.logError("@ModelMethod methods must have an abstract model as their first argument", e);
} else {
VariableElement firstParam = params.get(0);
TypeMirror paramType = firstParam.asType();
if (!checkFirstArgType(paramType, modelClass)) {
modelSpec.logError("@ModelMethod methods must have an abstract model as their first argument", e);
} else {
modelMethods.add(e);
}
}
}
}
private boolean checkFirstArgType(TypeMirror type, DeclaredTypeName generatedClassName) {
if (type instanceof ErrorType) {
return true;
}
if (!(type instanceof DeclaredType)) {
return false;
}
DeclaredTypeName typeName = (DeclaredTypeName) utils.getTypeNameFromTypeMirror(type);
return typeName.equals(generatedClassName) || typeName.equals(TypeConstants.ABSTRACT_MODEL);
}
}
|
[
"sboz88@gmail.com"
] |
sboz88@gmail.com
|
7fbe23b5bbc215542c9e0e80a3c9e2236dca6937
|
7596b13ad3a84feb67f05aeda486e8b9fc93f65f
|
/getAndroidAPI/src/java/nio/file/LinkOption.java
|
5a9ba88f46943ce6d879612a6cbd07c5430740ae
|
[] |
no_license
|
WinterPan2017/Android-Malware-Detection
|
7aeacfa03ca1431e7f3ba3ec8902cfe2498fd3de
|
ff38c91dc6985112e958291867d87bfb41c32a0f
|
refs/heads/main
| 2023-02-08T00:02:28.775711
| 2020-12-20T06:58:01
| 2020-12-20T06:58:01
| 303,900,592
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 958
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: LinkOption.java
package java.nio.file;
// Referenced classes of package java.nio.file:
// OpenOption, CopyOption
public final class LinkOption extends Enum
implements OpenOption, CopyOption
{
public static LinkOption[] values()
{
return (LinkOption[])$VALUES.clone();
}
public static LinkOption valueOf(String name)
{
return (LinkOption)Enum.valueOf(java/nio/file/LinkOption, name);
}
private LinkOption(String s, int i)
{
super(s, i);
}
public static final LinkOption NOFOLLOW_LINKS;
private static final LinkOption $VALUES[];
static
{
NOFOLLOW_LINKS = new LinkOption("NOFOLLOW_LINKS", 0);
$VALUES = (new LinkOption[] {
NOFOLLOW_LINKS
});
}
}
|
[
"panwentao1301@163.com"
] |
panwentao1301@163.com
|
afa329dd74305f8099be7c07f229f8044dbebf94
|
0b93651bf4c4be26f820702985bd41089026e681
|
/modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/v201802/VideoPositionTargeting.java
|
a18687b207d382396fb2e445887a579815acf112
|
[
"Apache-2.0"
] |
permissive
|
cmcewen-postmedia/googleads-java-lib
|
adf36ccaf717ab486e982b09d69922ddd09183e1
|
75724b4a363dff96e3cc57b7ffc443f9897a9da9
|
refs/heads/master
| 2021-10-08T16:50:38.364367
| 2018-12-14T22:10:58
| 2018-12-14T22:10:58
| 106,611,378
| 0
| 0
|
Apache-2.0
| 2018-12-14T22:10:59
| 2017-10-11T21:26:49
|
Java
|
UTF-8
|
Java
| false
| false
| 6,367
|
java
|
// Copyright 2018 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* VideoPositionTargeting.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.dfp.axis.v201802;
/**
* Represents positions within and around a video where ads can be
* targeted to.
* <p>
* Example positions could be {@code pre-roll} (before the
* video plays),
* {@code post-roll} (after a video has completed playback)
* and
* {@code mid-roll} (during video playback).
*/
public class VideoPositionTargeting implements java.io.Serializable {
/* The {@link VideoTargetingPosition} objects being targeted by
* the
* video {@link LineItem}. */
private com.google.api.ads.dfp.axis.v201802.VideoPositionTarget[] targetedPositions;
public VideoPositionTargeting() {
}
public VideoPositionTargeting(
com.google.api.ads.dfp.axis.v201802.VideoPositionTarget[] targetedPositions) {
this.targetedPositions = targetedPositions;
}
@Override
public String toString() {
return com.google.common.base.MoreObjects.toStringHelper(this.getClass())
.omitNullValues()
.add("targetedPositions", getTargetedPositions())
.toString();
}
/**
* Gets the targetedPositions value for this VideoPositionTargeting.
*
* @return targetedPositions * The {@link VideoTargetingPosition} objects being targeted by
* the
* video {@link LineItem}.
*/
public com.google.api.ads.dfp.axis.v201802.VideoPositionTarget[] getTargetedPositions() {
return targetedPositions;
}
/**
* Sets the targetedPositions value for this VideoPositionTargeting.
*
* @param targetedPositions * The {@link VideoTargetingPosition} objects being targeted by
* the
* video {@link LineItem}.
*/
public void setTargetedPositions(com.google.api.ads.dfp.axis.v201802.VideoPositionTarget[] targetedPositions) {
this.targetedPositions = targetedPositions;
}
public com.google.api.ads.dfp.axis.v201802.VideoPositionTarget getTargetedPositions(int i) {
return this.targetedPositions[i];
}
public void setTargetedPositions(int i, com.google.api.ads.dfp.axis.v201802.VideoPositionTarget _value) {
this.targetedPositions[i] = _value;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof VideoPositionTargeting)) return false;
VideoPositionTargeting other = (VideoPositionTargeting) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.targetedPositions==null && other.getTargetedPositions()==null) ||
(this.targetedPositions!=null &&
java.util.Arrays.equals(this.targetedPositions, other.getTargetedPositions())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getTargetedPositions() != null) {
for (int i=0;
i<java.lang.reflect.Array.getLength(getTargetedPositions());
i++) {
java.lang.Object obj = java.lang.reflect.Array.get(getTargetedPositions(), i);
if (obj != null &&
!obj.getClass().isArray()) {
_hashCode += obj.hashCode();
}
}
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(VideoPositionTargeting.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201802", "VideoPositionTargeting"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("targetedPositions");
elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201802", "targetedPositions"));
elemField.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201802", "VideoPositionTarget"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setMaxOccursUnbounded(true);
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);
}
}
|
[
"api.cseeley@gmail.com"
] |
api.cseeley@gmail.com
|
5d46ae3908bd46c9d6f189589db5c78204422639
|
4b98e0b28b25b9a56212036c734a5be23243a11a
|
/scw_common/src/test/java/com/offcn/test/HttpClientTest.java
|
cf27700698993cf36ce2df1fc20cd7b74c892fc2
|
[] |
no_license
|
stardust-anticlockwise/offcn_parent
|
1ca95ede30c3401a6e3aa6f916614af4a0088d43
|
268b00758039babe5f957acacaf667511a4e0e7f
|
refs/heads/master
| 2023-02-19T14:32:05.654845
| 2021-01-18T13:34:07
| 2021-01-18T13:34:07
| 329,860,813
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 971
|
java
|
//package com.offcn.test;
//
//
//import org.apache.http.HttpEntity;
//import org.apache.http.HttpResponse;
//import org.apache.http.client.HttpClient;
//import org.apache.http.client.methods.HttpGet;
//import org.apache.http.util.EntityUtils;
//
//import java.io.IOException;
//
//public class HttpClientTest {
//
// //测试使用HttpClient实现URL设置,发出请求,接收响应,并处理响应内容
// public static void main(String[] args) throws IOException {
// //创建httpclient对象
//// HttpClient client = HttpClientBuilder.create().build();
//
// //设置请求
// HttpGet get = new HttpGet("http://www.baidu.com");
//
// //设置URL、执行请求
//// HttpResponse response = client.execute(get);
//
// //处理响应 -- 获取响应内容
// HttpEntity entity = response.getEntity();
// String s = EntityUtils.toString(entity);
// System.out.println(s);
//
// }
//}
|
[
"myqq@qq.com"
] |
myqq@qq.com
|
43f6b53f47fd02b128e6823cd0094078911d2cd9
|
5fe70f7634032cb77cc57cba778d18d47a764b6c
|
/openbp-server/src/test/java/org/openbp/server/test/base/HistoricContextData.java
|
f2af32021b2107140bd338191a59896f523b03ec
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
cleancode1116/OpenBP
|
cab222b3e336f1c81d6bc832e3c0d53244c13746
|
460a09c2f396ed1f77add70637644d254326d350
|
refs/heads/master
| 2020-07-11T06:07:24.821569
| 2016-11-18T07:43:22
| 2016-11-18T07:43:22
| 74,003,934
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,433
|
java
|
package org.openbp.server.test.base;
import org.openbp.server.context.TokenContextUtil;
/**
* This class holds a deserialized token context data as returned by {@link TokenContextUtil#toByteArray(org.openbp.server.context.TokenContext)}.
*
* @author Heiko Erhardt
*/
public class HistoricContextData
{
/** Version identifier */
private String version;
/** Base64-encoded token context data */
private String base64ContextData;
/**
* Default constructor.
*/
public HistoricContextData()
{
}
/**
* Value constructor.
*
* @param version Version identifier
* @param base64ContextData Base64-encoded token context data
*/
public HistoricContextData(String version, String base64ContextData)
{
this.version = version;
this.base64ContextData = base64ContextData;
}
/**
* Gets the version identifier.
* @nowarn
*/
public String getVersion()
{
return version;
}
/**
* Sets the version identifier.
* @nowarn
*/
public void setVersion(String version)
{
this.version = version;
}
/**
* Gets the base64-encoded token context data.
* @nowarn
*/
public String getBase64ContextData()
{
return base64ContextData;
}
/**
* Sets the base64-encoded token context data.
* @nowarn
*/
public void setBase64ContextData(String base64ContextData)
{
this.base64ContextData = base64ContextData;
}
}
|
[
"stephan@blackbuild.com"
] |
stephan@blackbuild.com
|
c2675b18af584a6693f67a54b07027050445bd73
|
7646ca765934a7ceccf5d7d5a4c9e43ad126afe1
|
/src/main/java/com/pdk/manage/action/cs/ChatMsgAction.java
|
164745c983369deb24ed4e7c6b67cc63a0627768
|
[] |
no_license
|
88886/pdk-manage
|
2e7e9994f525d0ece942c15a8cd979e94dc67606
|
132b70f103f2011f4838e860648547a44fcffd41
|
refs/heads/master
| 2021-05-30T10:28:30.454363
| 2015-12-18T05:45:31
| 2015-12-18T05:45:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 378
|
java
|
package com.pdk.manage.action.cs;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* Created by hubo on 2015/10/20
*/
@Controller
@RequestMapping("/cs/chat/msg")
public class ChatMsgAction {
@RequestMapping("/index")
public String index() {
return "cs/chatmsg";
}
}
|
[
"hubo02090209@sina.com"
] |
hubo02090209@sina.com
|
466f89bc950bca07b8546fbc9ca58b2ea92edcfe
|
590ab79666d13a128538adb639c9d4695761bafe
|
/root-model/src/main/java/org/cyk/system/root/model/generator/StringValueGenerator.java
|
1bbd877d5504dfca22b14d21aa153e210a484057
|
[] |
no_license
|
devlopper/org.cyk.system.root
|
53c1844665cd9caed3429ef19f63bd9c33d42a63
|
b3e0bf2d730555412564f32a1b174835d8a53c89
|
refs/heads/master
| 2021-01-24T12:31:10.691363
| 2018-05-21T21:10:26
| 2018-05-21T21:10:26
| 16,188,519
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,118
|
java
|
package org.cyk.system.root.model.generator;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
@Getter @Setter
public class StringValueGenerator<INPUT> extends AbstractValueGenerator<INPUT, String> implements Serializable {
private static final long serialVersionUID = 2018757764631209047L;
private String prefix,suffix;
public StringValueGenerator(String identifier, String description,Class<INPUT> inputClass) {
super(identifier, description, inputClass, String.class,new GenerateMethod<INPUT, String>() {
@Override
public String execute(INPUT input) {
return RandomStringUtils.randomAlphabetic(8);
}
});
}
@Override
public String generate(INPUT input) {
List<String> values = new ArrayList<String>();
if(StringUtils.isNotBlank(prefix))
values.add(prefix);
values.add(method.execute(input));
if(StringUtils.isNotBlank(suffix))
values.add(suffix);
return StringUtils.join(values.toArray());
}
}
|
[
"kycdev@gmail.com"
] |
kycdev@gmail.com
|
bf67b86d8276e29113f72ebe2bd074ada3db626e
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/28/28_b4ff99fafdc4bde542a8bbd39c3c9c6ba5985e7e/Z3Solver/28_b4ff99fafdc4bde542a8bbd39c3c9c6ba5985e7e_Z3Solver_s.java
|
b04b339b32ade2e1f73686901810deee1f7baae7
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,119
|
java
|
package jkind.solvers.z3;
import jkind.lustre.NamedType;
import jkind.sexp.Cons;
import jkind.sexp.Sexp;
import jkind.sexp.Symbol;
import jkind.solvers.Result;
import jkind.solvers.SatResult;
import jkind.solvers.UnsatResult;
import jkind.solvers.VarDecl;
import jkind.solvers.smtlib2.SmtLib2Solver;
public class Z3Solver extends SmtLib2Solver {
public Z3Solver() {
super(new ProcessBuilder("z3", "/smt2", "/in"), "Z3");
}
@Override
public void initialize() {
send("(set-option :produce-models true)");
}
private int assumCount = 1;
@Override
public Result query(Sexp sexp) {
Result result;
Symbol assum = new Symbol("assum" + assumCount++);
send(new VarDecl(assum, NamedType.BOOL));
send(new Cons("assert", new Cons("=>", assum, new Cons("not", sexp))));
send(new Cons("check-sat", assum));
send("(echo \"" + DONE + "\")");
if (isSat(readFromSolver())) {
send("(get-model)");
send("(echo \"" + DONE + "\")");
result = new SatResult(parseModel(readFromSolver()));
} else {
result = new UnsatResult();
}
return result;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
608c78a96c9aa2f3f42607402aa23fb7126097dd
|
2f8e759b9e70a7b74e0d697d82b6bc7d6c379e16
|
/src/main/java/org/bian/dto/BQCalculationRetrieveOutputModelCalculationInstanceReport.java
|
4f240339ce1251ddaab807a468cb8ebc0ae3861d
|
[
"Apache-2.0"
] |
permissive
|
bianapis/sd-commissions-v3
|
1f429a09faca9b6a1d03e0382b1fe323ec596c00
|
747676f0979f22d4025398eecbdd8e1444d1d719
|
refs/heads/master
| 2022-12-22T08:20:12.961423
| 2020-09-26T17:06:58
| 2020-09-26T17:06:58
| 298,786,284
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,736
|
java
|
package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
/**
* BQCalculationRetrieveOutputModelCalculationInstanceReport
*/
public class BQCalculationRetrieveOutputModelCalculationInstanceReport {
private Object calculationInstanceReportRecord = null;
private String calculationInstanceReportType = null;
private String calculationInstanceReportParameters = null;
private Object calculationInstanceReport = null;
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: The input information used to assemble the report that can be on-going, periodic and actual and projected
* @return calculationInstanceReportRecord
**/
public Object getCalculationInstanceReportRecord() {
return calculationInstanceReportRecord;
}
public void setCalculationInstanceReportRecord(Object calculationInstanceReportRecord) {
this.calculationInstanceReportRecord = calculationInstanceReportRecord;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Code general-info: The type of external report available
* @return calculationInstanceReportType
**/
public String getCalculationInstanceReportType() {
return calculationInstanceReportType;
}
public void setCalculationInstanceReportType(String calculationInstanceReportType) {
this.calculationInstanceReportType = calculationInstanceReportType;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: The selection parameters for the report (e.g. period, content type)
* @return calculationInstanceReportParameters
**/
public String getCalculationInstanceReportParameters() {
return calculationInstanceReportParameters;
}
public void setCalculationInstanceReportParameters(String calculationInstanceReportParameters) {
this.calculationInstanceReportParameters = calculationInstanceReportParameters;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: The external report in any suitable form including selection filters where appropriate
* @return calculationInstanceReport
**/
public Object getCalculationInstanceReport() {
return calculationInstanceReport;
}
public void setCalculationInstanceReport(Object calculationInstanceReport) {
this.calculationInstanceReport = calculationInstanceReport;
}
}
|
[
"spabandara@Virtusa.com"
] |
spabandara@Virtusa.com
|
7d455fcb96e93f129a55df82efae515338b57bbb
|
d3eefa5d9c4be591a13ce46b4631feec6e8d9fda
|
/springAop/annotationAop/src/test/java/itheima/test/AOPTest.java
|
3e6ec56e3f3296c4b3978b827ef8d96068bbc1ec
|
[] |
no_license
|
zxq19970820/code
|
3fb7b8013c5b42a4ee752433b3506e7f3f00f5a7
|
9238dac8b8a09e4d457ef310bc3e30e5cfaed32e
|
refs/heads/master
| 2023-01-18T17:59:39.609751
| 2020-11-18T05:47:15
| 2020-11-18T05:47:15
| 313,832,991
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 582
|
java
|
package itheima.test;
import com.itheima.service.IAccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* 测试AOP的配置
*/
public class AOPTest {
public static void main(String[] args) {
//1.获取容器
ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");
//2.获取对象
IAccountService as = (IAccountService)ac.getBean("accountService");
//3.执行方法
as.saveAccount();
}
}
|
[
"1415990264@qq.com"
] |
1415990264@qq.com
|
02b64375f4da268e51702e6767a8674656242b4c
|
e9688821c673c1631db0ba3ff08e01d01c54aa4c
|
/source/production/java/com/dub/sharewood/config/SecurityConfiguration.java
|
9d9ef487c08f2c0b648776dcc5e0720d9d5b684c
|
[] |
no_license
|
dubersfeld/Sharewood
|
a775e975f93b4a8c553ab2ead51a5fc5b937f5dc
|
9042ee4e402a0ee46487428c74b4f01d8627e5dc
|
refs/heads/master
| 2020-12-13T14:42:57.546373
| 2017-06-27T10:39:53
| 2017-06-27T10:39:53
| 95,545,047
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,633
|
java
|
package com.dub.sharewood.config;
import org.springframework.context.annotation.AdviceMode;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.session.SessionRegistry;
import org.springframework.security.core.session.SessionRegistryImpl;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.oauth2.provider.expression.OAuth2WebSecurityExpressionHandler;
import com.dub.sharewood.users.UserService;
import javax.inject.Inject;
/** SecurityConfiguration is used for the basic Spring Security
* that is used to protect all HTTP requests
* */
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(
prePostEnabled = true, order = 0, mode = AdviceMode.PROXY,
proxyTargetClass = true
)
public class SecurityConfiguration extends WebSecurityConfigurerAdapter
{
@Inject UserService userService;
@Bean
public OAuth2WebSecurityExpressionHandler webSecurityExpressionHandler() {
return new OAuth2WebSecurityExpressionHandler();
}
@Bean
protected SessionRegistry sessionRegistryImpl()
{
return new SessionRegistryImpl();
}
@Bean
@Override
public AuthenticationManager authenticationManagerBean() throws Exception
{
return super.authenticationManagerBean();
}
@Override
protected void configure(AuthenticationManagerBuilder builder)
throws Exception
{
builder
.userDetailsService(this.userService)
.passwordEncoder(new BCryptPasswordEncoder())
.and()
.eraseCredentials(true);
}
@Override
public void configure(WebSecurity security)
{
security.ignoring().antMatchers("/resource/**");
}
@Override
protected void configure(HttpSecurity security)
throws Exception
{
security
.authorizeRequests().expressionHandler(webSecurityExpressionHandler())
.antMatchers("/oauth/**")
.hasAnyAuthority("ROLE_USER", "ROLE_ADMIN", "ROLE_DBA")
.antMatchers("/login/**")
.permitAll()
.antMatchers("/login")
.permitAll()
.antMatchers("/register/**")
.permitAll()
.antMatchers("/register")
.permitAll()
.antMatchers("/**")
.hasAnyAuthority("ROLE_USER", "ROLE_ADMIN", "ROLE_DBA")
//.fullyAuthenticated()
//.anyRequest()
// .authenticated()
.and().formLogin()
.loginPage("/login").failureUrl("/login?loginFailed")
.defaultSuccessUrl("/index")
.usernameParameter("username")
.passwordParameter("password")
.permitAll()
.and().logout()
.logoutUrl("/logout")
.invalidateHttpSession(true).deleteCookies("JSESSIONID")
.permitAll()
.and().sessionManagement()
.sessionFixation().changeSessionId()
.maximumSessions(1).maxSessionsPreventsLogin(false)
.sessionRegistry(this.sessionRegistryImpl())
.and().and().csrf()
.requireCsrfProtectionMatcher((r) -> {
String m = r.getMethod();
return !r.getServletPath().startsWith("/services/") &&
("POST".equals(m) || "PUT".equals(m) ||
"DELETE".equals(m) || "PATCH".equals(m));
});
}
}
|
[
"dominique42ubersfeld@gmail.com"
] |
dominique42ubersfeld@gmail.com
|
c7696609c7077bb30ed12c2beb14f652d5fa0d86
|
ebff4108ace2fcbfbd2bc3dea924f8da88654149
|
/app/src/main/java/douya/eventbus/BroadcastSendErrorEvent.java
|
65a342d158910c013a7e6eb62d6d6869f97ca70f
|
[] |
no_license
|
447857062/client_douban
|
9b046512a84bee48b343f77ff3d214c672450888
|
4e0b677e3e6e5cee8d2922e0cdf67d6129276351
|
refs/heads/master
| 2020-03-19T06:01:10.211955
| 2018-06-14T01:47:54
| 2018-06-14T01:47:54
| 135,983,473
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 335
|
java
|
/*
* Copyright (c) 2018 Zhang Hai <Dreaming.in.Code.ZH@Gmail.com>
* All Rights Reserved.
*/
package douya.eventbus;
public class BroadcastSendErrorEvent extends Event {
public long writerId;
public BroadcastSendErrorEvent(long writerId, Object source) {
super(source);
this.writerId = writerId;
}
}
|
[
"447857062@qq.com"
] |
447857062@qq.com
|
baeaad2369e4df105bfc8cc1cf41e8a0a9570b68
|
37f53ea93eaa9bd64423e07b1f7c0ad7bc79e98c
|
/trainings/src/main/java/com/laidongs/sba/gateway/service/MyCalendarService.java
|
a69ae440a0489730d3b4b731fb7d1e31b5ce882c
|
[] |
no_license
|
woyaowoyao/hipster4FSD
|
15621a2f8eee77d1a0e1730ac2c98edcf5e07910
|
259e039f131a3d01d9dc43b361f149cc2bba8145
|
refs/heads/master
| 2022-12-24T01:34:45.535515
| 2019-11-22T02:50:31
| 2019-11-22T02:50:31
| 217,682,878
| 0
| 0
| null | 2022-12-16T04:41:34
| 2019-10-26T09:00:17
|
Java
|
UTF-8
|
Java
| false
| false
| 838
|
java
|
package com.laidongs.sba.gateway.service;
import com.laidongs.sba.gateway.domain.MyCalendar;
import java.util.List;
import java.util.Optional;
/**
* Service Interface for managing {@link MyCalendar}.
*/
public interface MyCalendarService {
/**
* Save a myCalendar.
*
* @param myCalendar the entity to save.
* @return the persisted entity.
*/
MyCalendar save(MyCalendar myCalendar);
/**
* Get all the myCalendars.
*
* @return the list of entities.
*/
List<MyCalendar> findAll();
/**
* Get the "id" myCalendar.
*
* @param id the id of the entity.
* @return the entity.
*/
Optional<MyCalendar> findOne(Long id);
/**
* Delete the "id" myCalendar.
*
* @param id the id of the entity.
*/
void delete(Long id);
}
|
[
"laidongs@cn.ibm.com"
] |
laidongs@cn.ibm.com
|
6e03d55263dfc41bffeedd889680cbbf07c97f0c
|
73364c57427e07e90d66692a3664281d5113177e
|
/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/trackedentityattributevalue/DefaultTrackedEntityAttributeReservedValueService.java
|
2aedc6750a9488b1f1e145002aa1aa67361eda59
|
[
"BSD-3-Clause"
] |
permissive
|
abyot/sun-pmt
|
4681f008804c8a7fc7a75fe5124f9b90df24d44d
|
40add275f06134b04c363027de6af793c692c0a1
|
refs/heads/master
| 2022-12-28T09:54:11.381274
| 2019-06-10T15:47:21
| 2019-06-10T15:47:21
| 55,851,437
| 0
| 1
|
BSD-3-Clause
| 2022-12-16T12:05:12
| 2016-04-09T15:21:22
|
Java
|
UTF-8
|
Java
| false
| false
| 7,855
|
java
|
package org.hisp.dhis.trackedentityattributevalue;
/*
* Copyright (c) 2004-2017, University of Oslo
* 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 the HISP project 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.
*/
import org.apache.commons.lang.NotImplementedException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
import org.hisp.dhis.trackedentity.TrackedEntityInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeoutException;
/**
* @author Markus Bekken
*/
public class DefaultTrackedEntityAttributeReservedValueService
implements TrackedEntityAttributeReservedValueService
{
private static final Log log = LogFactory.getLog( DefaultTrackedEntityAttributeReservedValueService.class );
private static final int GENERATION_TIMEOUT = 50;
@Autowired
private TrackedEntityAttributeReservedValueStore trackedEntityAttributeReservedValueStore;
@Autowired
private TrackedEntityAttributeValueService trackedEntityAttributeValueService;
@Override
public TrackedEntityAttributeReservedValue markTrackedEntityAttributeReservedValueAsUtilized(
TrackedEntityAttribute attribute, TrackedEntityInstance trackedEntityInstance, String value )
{
if ( attribute.isGenerated() )
{
TrackedEntityAttributeReservedValue utilized = findTrackedEntityAttributeReservedValue(
attribute, value );
if ( utilized != null )
{
utilized.setValueUtilizedByTEI( trackedEntityInstance );
utilized = trackedEntityAttributeReservedValueStore.saveTrackedEntityAttributeReservedValue( utilized );
}
return utilized;
}
return null;
}
@Override
public List<TrackedEntityAttributeReservedValue> createTrackedEntityReservedValues(
TrackedEntityAttribute attribute, int valuesToCreate )
{
Assert.isTrue( attribute.isGenerated(), "Attribute must be of type generated in order to reserve values" );
ArrayList<TrackedEntityAttributeReservedValue> reservedValues = new ArrayList<TrackedEntityAttributeReservedValue>();
for ( int i = 0; i < valuesToCreate; i++ )
{
try
{
reservedValues.add( reserveCandidateValue( attribute ) );
}
catch ( Exception e )
{
log.warn( "Not able to provide all requested reserved values for "
+ attribute.getUid() + ". " + (i + 1) + " of " + valuesToCreate + " created." );
break;
}
}
return reservedValues;
}
private String findValueCandidate( TrackedEntityAttribute trackedEntityAttribute )
throws TimeoutException
{
int timeout = 0;
while ( timeout < GENERATION_TIMEOUT )
{
String candidate = generateRandomValueInPattern( trackedEntityAttribute.getPattern() );
if ( !trackedEntityAttributeValueService.exists( trackedEntityAttribute, candidate ) )
{
//The generated ID was available. Check that it is not already reserved
if ( findTrackedEntityAttributeReservedValue( trackedEntityAttribute, candidate ) == null )
{
return candidate;
}
}
timeout ++;
}
throw new TimeoutException( "Timeout while generating values, could not find unused values for "
+ trackedEntityAttribute.getUid() + " in " + GENERATION_TIMEOUT + " tries." );
}
@Transactional
public TrackedEntityAttributeReservedValue reserveCandidateValue( TrackedEntityAttribute trackedEntityAttribute )
throws TimeoutException
{
//Retrieve a valid, non-taken and non-reserved ID
String reservableValue = findValueCandidate( trackedEntityAttribute );
if ( reservableValue != null )
{
TrackedEntityAttributeReservedValue newReservation =
new TrackedEntityAttributeReservedValue( trackedEntityAttribute, reservableValue );
return trackedEntityAttributeReservedValueStore.saveTrackedEntityAttributeReservedValue( newReservation );
}
return null;
}
private String generateRandomValueInPattern( String pattern )
{
if ( pattern.isEmpty() || ( pattern.matches( " *(#+|[0-9]+) *" ) && pattern.length() > 0 ) )
{
// This is a simplified pattern
long min = 1000000;
long max = 9999999;
if ( !pattern.isEmpty() )
{
// Generate a random number with the same number of digits as given in the pattern.
min = (long)Math.pow( 10, pattern.length() - 1 );
max = (long)Math.pow( 10, pattern.length() ) - 1;
}
return String.valueOf( ThreadLocalRandom.current().nextLong( min, max ) );
}
else
{
// RegEx generation, not covered yet
throw new NotImplementedException();
}
}
private TrackedEntityAttributeReservedValue findTrackedEntityAttributeReservedValue(
TrackedEntityAttribute attribute, String value )
{
List<TrackedEntityAttributeReservedValue> values = trackedEntityAttributeReservedValueStore.
getTrackedEntityReservedValues( attribute, value );
Assert.state( ( values.size() <= 1 ), "Duplicate values reserved for attribute " + attribute.getUid() + " value " + value );
return values.size() == 1 ? values.get( 0 ) : null;
}
@Override
public String getGeneratedValue( TrackedEntityAttribute attribute )
throws TimeoutException
{
Assert.state( attribute.isGenerated(), "Tracked entity attribute " + attribute.getUid() + " must be of type generated" );
return findValueCandidate( attribute );
}
}
|
[
"abyota@gmail.com"
] |
abyota@gmail.com
|
febd50f19152f9f8c60b297a14bb0a5ae363ef76
|
e3fceee94d864db932cfe737a4961d15f2ea4da9
|
/src/main/java/com/sidot/gesteau/service/criteria/PrevisionCriteria.java
|
9b3016bb0dff53944c2293314057762b9abaf49b
|
[] |
no_license
|
Kadsuke/onea_sidot_gesteau
|
7b4cac3795a0b4c2f72988c721069f743f2cff40
|
0522509d7370ecc782b4cc0ea2b9cee3bfcb8251
|
refs/heads/main
| 2023-04-12T02:52:10.247377
| 2021-04-21T09:01:19
| 2021-04-21T09:01:19
| 360,099,387
| 0
| 0
| null | 2021-04-21T09:01:20
| 2021-04-21T08:58:16
|
Java
|
UTF-8
|
Java
| false
| false
| 6,550
|
java
|
package com.sidot.gesteau.service.criteria;
import java.io.Serializable;
import java.util.Objects;
import tech.jhipster.service.Criteria;
import tech.jhipster.service.filter.BooleanFilter;
import tech.jhipster.service.filter.DoubleFilter;
import tech.jhipster.service.filter.Filter;
import tech.jhipster.service.filter.FloatFilter;
import tech.jhipster.service.filter.IntegerFilter;
import tech.jhipster.service.filter.LongFilter;
import tech.jhipster.service.filter.StringFilter;
/**
* Criteria class for the {@link com.sidot.gesteau.domain.Prevision} entity. This class is used
* in {@link com.sidot.gesteau.web.rest.PrevisionResource} to receive all the possible filtering options from
* the Http GET request parameters.
* For example the following could be a valid request:
* {@code /previsions?id.greaterThan=5&attr1.contains=something&attr2.specified=false}
* As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use
* fix type specific filters.
*/
public class PrevisionCriteria implements Serializable, Criteria {
private static final long serialVersionUID = 1L;
private LongFilter id;
private IntegerFilter nbLatrine;
private IntegerFilter nbPuisard;
private IntegerFilter nbPublic;
private IntegerFilter nbScolaire;
private LongFilter anneeId;
private LongFilter centreId;
private LongFilter ficheSuiviOuvrageId;
public PrevisionCriteria() {}
public PrevisionCriteria(PrevisionCriteria other) {
this.id = other.id == null ? null : other.id.copy();
this.nbLatrine = other.nbLatrine == null ? null : other.nbLatrine.copy();
this.nbPuisard = other.nbPuisard == null ? null : other.nbPuisard.copy();
this.nbPublic = other.nbPublic == null ? null : other.nbPublic.copy();
this.nbScolaire = other.nbScolaire == null ? null : other.nbScolaire.copy();
this.anneeId = other.anneeId == null ? null : other.anneeId.copy();
this.centreId = other.centreId == null ? null : other.centreId.copy();
this.ficheSuiviOuvrageId = other.ficheSuiviOuvrageId == null ? null : other.ficheSuiviOuvrageId.copy();
}
@Override
public PrevisionCriteria copy() {
return new PrevisionCriteria(this);
}
public LongFilter getId() {
return id;
}
public LongFilter id() {
if (id == null) {
id = new LongFilter();
}
return id;
}
public void setId(LongFilter id) {
this.id = id;
}
public IntegerFilter getNbLatrine() {
return nbLatrine;
}
public IntegerFilter nbLatrine() {
if (nbLatrine == null) {
nbLatrine = new IntegerFilter();
}
return nbLatrine;
}
public void setNbLatrine(IntegerFilter nbLatrine) {
this.nbLatrine = nbLatrine;
}
public IntegerFilter getNbPuisard() {
return nbPuisard;
}
public IntegerFilter nbPuisard() {
if (nbPuisard == null) {
nbPuisard = new IntegerFilter();
}
return nbPuisard;
}
public void setNbPuisard(IntegerFilter nbPuisard) {
this.nbPuisard = nbPuisard;
}
public IntegerFilter getNbPublic() {
return nbPublic;
}
public IntegerFilter nbPublic() {
if (nbPublic == null) {
nbPublic = new IntegerFilter();
}
return nbPublic;
}
public void setNbPublic(IntegerFilter nbPublic) {
this.nbPublic = nbPublic;
}
public IntegerFilter getNbScolaire() {
return nbScolaire;
}
public IntegerFilter nbScolaire() {
if (nbScolaire == null) {
nbScolaire = new IntegerFilter();
}
return nbScolaire;
}
public void setNbScolaire(IntegerFilter nbScolaire) {
this.nbScolaire = nbScolaire;
}
public LongFilter getAnneeId() {
return anneeId;
}
public LongFilter anneeId() {
if (anneeId == null) {
anneeId = new LongFilter();
}
return anneeId;
}
public void setAnneeId(LongFilter anneeId) {
this.anneeId = anneeId;
}
public LongFilter getCentreId() {
return centreId;
}
public LongFilter centreId() {
if (centreId == null) {
centreId = new LongFilter();
}
return centreId;
}
public void setCentreId(LongFilter centreId) {
this.centreId = centreId;
}
public LongFilter getFicheSuiviOuvrageId() {
return ficheSuiviOuvrageId;
}
public LongFilter ficheSuiviOuvrageId() {
if (ficheSuiviOuvrageId == null) {
ficheSuiviOuvrageId = new LongFilter();
}
return ficheSuiviOuvrageId;
}
public void setFicheSuiviOuvrageId(LongFilter ficheSuiviOuvrageId) {
this.ficheSuiviOuvrageId = ficheSuiviOuvrageId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final PrevisionCriteria that = (PrevisionCriteria) o;
return (
Objects.equals(id, that.id) &&
Objects.equals(nbLatrine, that.nbLatrine) &&
Objects.equals(nbPuisard, that.nbPuisard) &&
Objects.equals(nbPublic, that.nbPublic) &&
Objects.equals(nbScolaire, that.nbScolaire) &&
Objects.equals(anneeId, that.anneeId) &&
Objects.equals(centreId, that.centreId) &&
Objects.equals(ficheSuiviOuvrageId, that.ficheSuiviOuvrageId)
);
}
@Override
public int hashCode() {
return Objects.hash(id, nbLatrine, nbPuisard, nbPublic, nbScolaire, anneeId, centreId, ficheSuiviOuvrageId);
}
// prettier-ignore
@Override
public String toString() {
return "PrevisionCriteria{" +
(id != null ? "id=" + id + ", " : "") +
(nbLatrine != null ? "nbLatrine=" + nbLatrine + ", " : "") +
(nbPuisard != null ? "nbPuisard=" + nbPuisard + ", " : "") +
(nbPublic != null ? "nbPublic=" + nbPublic + ", " : "") +
(nbScolaire != null ? "nbScolaire=" + nbScolaire + ", " : "") +
(anneeId != null ? "anneeId=" + anneeId + ", " : "") +
(centreId != null ? "centreId=" + centreId + ", " : "") +
(ficheSuiviOuvrageId != null ? "ficheSuiviOuvrageId=" + ficheSuiviOuvrageId + ", " : "") +
"}";
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
1ce92e74807dd182dcb01547b4284426371c1d20
|
4ecc390ae66bbb8bad8a6bba636fd19702205d34
|
/minecraft 1.8/ckc.java
|
63025e0ce2ba44a83e2f56d6055fea4ffcda321d
|
[] |
no_license
|
project-ion/Decompile-Minecraft
|
d9c967e57ff7d24ada8c4c49f832dac25f18bb9e
|
12882633319383b7652b475b4f08b6f72acdddc4
|
refs/heads/master
| 2021-01-23T15:28:54.832366
| 2014-09-20T09:57:54
| 2014-09-20T09:57:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 171
|
java
|
public enum ckc {}
/* Location: C:\Users\Hugo Haldi\Desktop\Decompile Minecraft\1.8.jar
* Qualified Name: ckc
* JD-Core Version: 0.7.0.1
*/
|
[
"projection-team@hotmail.com"
] |
projection-team@hotmail.com
|
e52fcbaa410e895dbfa57d09cd023f11792b6189
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_352/Testnull_35126.java
|
0a25a6f1033968c2c7153383e3f59d6fd415d8da
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package org.gradle.test.performancenull_352;
import static org.junit.Assert.*;
public class Testnull_35126 {
private final Productionnull_35126 production = new Productionnull_35126("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.