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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fc5d6b7e44a46c9e536bc95d4661645dfa316b0f
|
6684d182a58c259448d1fcc577a7a7cf7b3a8e4c
|
/core/src/com/scs/lostinthegame/game/entities/ohmummy/OhMummyNasty.java
|
8a9af4cdec7e4d4ca0b56706814e2c4cf83ee95f
|
[
"MIT"
] |
permissive
|
SteveSmith16384/lostinthegame
|
d495c29678e39b7be416fe1892c53b3f47c35378
|
5e279e4a038c50f0b29bcc91313ff00431cd26cb
|
refs/heads/master
| 2021-09-18T17:32:20.502404
| 2021-08-17T14:06:16
| 2021-08-17T14:06:16
| 209,022,455
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,889
|
java
|
package com.scs.lostinthegame.game.entities.ohmummy;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.graphics.g3d.decals.Decal;
import com.badlogic.gdx.math.Vector3;
import com.scs.basicecs.AbstractEntity;
import com.scs.lostinthegame.game.Game;
import com.scs.lostinthegame.game.components.HarmsPlayer;
import com.scs.lostinthegame.game.components.HasAI;
import com.scs.lostinthegame.game.components.HasDecal;
import com.scs.lostinthegame.game.components.IsDamagableNasty;
import com.scs.lostinthegame.game.components.MovementData;
import com.scs.lostinthegame.game.components.PositionData;
import com.scs.lostinthegame.game.systems.MobAISystem.Mode;
public class OhMummyNasty extends AbstractEntity {
public OhMummyNasty(int x, int y) {
super(OhMummyNasty.class.getSimpleName());
PositionData pos = new PositionData();
pos.position = new Vector3(x*Game.UNIT+(Game.UNIT/2), 0, y*Game.UNIT+(Game.UNIT/2));
this.addComponent(pos);
HasDecal hasDecal = new HasDecal();
Texture tex = new Texture(Gdx.files.internal("ohmummy/baddie.png"));
TextureRegion tr = new TextureRegion(tex, 0, 0, tex.getWidth(), tex.getHeight());
hasDecal.decal = Decal.newDecal(tr, true);
hasDecal.decal.setScale(Game.UNIT / tr.getRegionWidth()); // Scale to sq size by default
hasDecal.faceCamera = true;
hasDecal.faceCameraTilted = true;
this.addComponent(hasDecal);
IsDamagableNasty damagable = new IsDamagableNasty(2);
this.addComponent(damagable);
HasAI ai = new HasAI(Mode.MoveLikeRook, 3f, 9999f);
this.addComponent(ai);
this.addComponent(new MovementData(.75f));
this.addComponent(new HarmsPlayer(1));
}
}
|
[
"stephen.carlylesmith@googlemail.com"
] |
stephen.carlylesmith@googlemail.com
|
496787894eaf78590db0283d8493eb0074d1fc78
|
5d5c2688698a2d6689c1d635724b550b31224c86
|
/extlib/lwp/product/runtime/eclipse/plugins/com.ibm.xsp.extlib.controls/src/com/ibm/xsp/extlib/component/picker/data/BeanNamePickerData.java
|
3b7b7faff0210611025b8022bff1a7cb8ee5e7f1
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-other-permissive",
"MIT",
"CDDL-1.1",
"LicenseRef-scancode-public-domain"
] |
permissive
|
OpenNTF/XPagesExtensionLibrary
|
6bffba4bd5eab5b148a3b4d700da244aab053743
|
25b3b1df7fafb7ceb131e07ade93de5c9ff733d5
|
refs/heads/master
| 2020-04-15T16:12:15.910509
| 2020-03-11T11:49:17
| 2020-03-11T11:49:17
| 26,643,618
| 21
| 35
|
Apache-2.0
| 2019-03-25T12:55:44
| 2014-11-14T15:08:35
|
Java
|
WINDOWS-1252
|
Java
| false
| false
| 3,662
|
java
|
/*
* © Copyright IBM Corp. 2010
*
* 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.ibm.xsp.extlib.component.picker.data;
import java.util.List;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
import com.ibm.xsp.FacesExceptionEx;
import com.ibm.xsp.complex.ValueBindingObjectImpl;
import com.ibm.xsp.util.ManagedBeanUtil;
/**
* Bean data provider for a name picker.
* <p>
* This data provider is delegating to a bean that implements the INamePickerData
* </p>
*/
public class BeanNamePickerData extends ValueBindingObjectImpl implements INamePickerData {
private String dataBean;
private transient INamePickerData bean;
public BeanNamePickerData() {
}
public String getDataBean() {
if (dataBean != null) {
return dataBean;
}
ValueBinding vb = getValueBinding("dataBean"); //$NON-NLS-1$
if (vb != null) {
return (String)vb.getValue(getFacesContext());
}
return null;
}
public void setDataBean(String dataBean) {
this.dataBean = dataBean;
}
@Override
public void restoreState(FacesContext _context, Object _state) {
Object _values[] = (Object[]) _state;
super.restoreState(_context, _values[0]);
this.dataBean = (String)_values[1];
}
@Override
public Object saveState(FacesContext _context) {
Object _values[] = new Object[2];
_values[0] = super.saveState(_context);
_values[1] = dataBean;
return _values;
}
protected INamePickerData getBeanInstance() {
if(bean==null) {
String beanName = getDataBean();
Object b = ManagedBeanUtil.getBean(FacesContext.getCurrentInstance(), beanName);
if(b!=null) {
if(!(b instanceof INamePickerData)) {
throw new FacesExceptionEx(null,"Bean {0}({1}) is not a INamePickerData",beanName,b.getClass()); // $NLX-BeanNamePickerData.Bean01isnotaINamePickerData-1$
}
bean = (INamePickerData)b;
} else {
throw new FacesExceptionEx(null,"Bean {0} does not exist",beanName); // $NLX-BeanNamePickerData.Bean0doesnotexist-1$
}
}
return bean;
}
// ===================================================================
// Name picker delegation
// ===================================================================
public String[] getSourceLabels() {
INamePickerData bean = getBeanInstance();
return bean.getSourceLabels();
}
public boolean hasCapability(int capability) {
INamePickerData bean = getBeanInstance();
return bean.hasCapability(capability);
}
public List<IPickerEntry> loadEntries(Object[] ids, String[] attributeNames) {
INamePickerData bean = getBeanInstance();
return bean.loadEntries(ids,attributeNames);
}
public IPickerResult readEntries(IPickerOptions options) {
INamePickerData bean = getBeanInstance();
return bean.readEntries(options);
}
}
|
[
"padraic.edwards@ie.ibm.com"
] |
padraic.edwards@ie.ibm.com
|
47b593efff8645a637496c579234446282c41bd3
|
60f8c70d135763ef4ceab106f63af2244b2807f2
|
/rxfamily/src/main/java/rxfamily/net/GsonRequestBodyConverter.java
|
989c2477a908769a0cd7fbc2c695c1653dd0c72d
|
[
"MIT"
] |
permissive
|
LJW123/YiLianMall
|
f7f7af4d8d8517001455922e2a55e7064cdf9723
|
ea335a66cb4fd6417aa264a959847b094c90fb04
|
refs/heads/master
| 2022-07-16T08:54:43.231502
| 2020-05-21T09:22:05
| 2020-05-21T09:22:05
| 265,793,269
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,435
|
java
|
/**
* Created by on 2017/8/14 0014.
*/
package rxfamily.net;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.charset.Charset;
import okhttp3.MediaType;
import okhttp3.RequestBody;
import okio.Buffer;
import retrofit2.Converter;
/**
* 该类和gson中自带GsonRequestBodyConverter,但自带GsonRequestBodyConverter不是public的,外部无法引用,所以需要重写该类
* @param <T>
*/
public class GsonRequestBodyConverter<T> implements Converter<T, RequestBody> {
private static final MediaType MEDIA_TYPE = MediaType.parse("application/json; charset=UTF-8");
private static final Charset UTF_8 = Charset.forName("UTF-8");
private final Gson gson;
private final TypeAdapter<T> typeAdapter;
GsonRequestBodyConverter(Gson gson, TypeAdapter<T> typeAdaptert) {
this.gson = gson;
this.typeAdapter = typeAdaptert;
}
@Override public RequestBody convert(T value) throws IOException {
Buffer buffer = new Buffer();
Writer writer = new OutputStreamWriter(buffer.outputStream(), UTF_8);
JsonWriter jsonWriter = gson.newJsonWriter(writer);
typeAdapter.write(jsonWriter,value);
jsonWriter.close();
return RequestBody.create(MEDIA_TYPE,buffer.readByteString());
}
}
|
[
"18203660536@163.com"
] |
18203660536@163.com
|
7b30a0e4f60750877dd1c05bba1a107700f0ed0a
|
35e8a12f96c6f46aa77907c3a3ee2af30c8c8d3f
|
/hub.sam.sdl.model/src/hub/sam/sdl/CommunicationCommunicator.java
|
5ed32688ca5a756ee9878e459c47a87f92018819
|
[] |
no_license
|
markus1978/tef
|
36049dee71a99d24401d4a01fe33a3018e7bb776
|
38bfc24dc64822b7b3ed74e41f85b3a8c10c1955
|
refs/heads/master
| 2020-04-06T04:30:58.699975
| 2015-08-13T07:51:37
| 2015-08-13T07:51:37
| 25,520,279
| 1
| 2
| null | 2015-08-13T07:51:37
| 2014-10-21T12:13:17
|
Java
|
UTF-8
|
Java
| false
| false
| 1,507
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package hub.sam.sdl;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Communication Communicator</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link hub.sam.sdl.CommunicationCommunicator#getMedium <em>Medium</em>}</li>
* </ul>
* </p>
*
* @see hub.sam.sdl.EmfSdlPackage#getCommunicationCommunicator()
* @model abstract="true"
* @generated
*/
public interface CommunicationCommunicator extends CoreAbstractionsElementsElement {
/**
* Returns the value of the '<em><b>Medium</b></em>' reference list.
* The list contents are of type {@link hub.sam.sdl.CommunicationMedium}.
* It is bidirectional and its opposite is '{@link hub.sam.sdl.CommunicationMedium#getAssociatedClassifier <em>Associated Classifier</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Medium</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Medium</em>' reference list.
* @see hub.sam.sdl.EmfSdlPackage#getCommunicationCommunicator_Medium()
* @see hub.sam.sdl.CommunicationMedium#getAssociatedClassifier
* @model opposite="associatedClassifier" ordered="false"
* @generated
*/
EList<CommunicationMedium> getMedium();
} // CommunicationCommunicator
|
[
"do@not.use"
] |
do@not.use
|
51420a1f7060b2d1d137466d16a3a89ae2159cf0
|
18c10aa1261bea4ae02fa79598446df714519c6f
|
/10_Java/01-17_java/Shape_practice/src/cls/Circle.java
|
d55b635d03636595e9fc40aa4f8d5172af110c28
|
[] |
no_license
|
giveseul-23/give_Today_I_Learn
|
3077efbcb11ae4632f68dfa3f9285d2c2ad27359
|
f5599f0573fbf0ffdfbcc9c79b468e3c76303dd4
|
refs/heads/master
| 2023-05-06T08:13:49.845436
| 2021-05-25T04:33:20
| 2021-05-25T04:33:20
| 330,189,867
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 177
|
java
|
package cls;
public class Circle extends Shape{
double r;
public Circle(double r) {
this.r = r;
}
@Override
public double calcArea() {
return r * r * 3.14;
}
}
|
[
"joodasel@icloud.com"
] |
joodasel@icloud.com
|
d3753e81a8e04a592a03d027501edab7398587c0
|
a05d9347d233152affa726a2359be87e42b22e03
|
/Trabajos/Proyecto ErickOre/NDRAsistencias/src/pe/eeob/ndrasistencias/service/CursoService.java
|
eaa2dec3507ddaefab9536eef0994eb5f93f7b0d
|
[] |
no_license
|
gcoronelc/SISTUNI_JAVA_JDBC_002
|
2aa5393d8e20cb5e9fe747255bca7dec17689f58
|
7ae0b7f53b2585d01f34fa337464e22b040712f6
|
refs/heads/master
| 2021-01-10T11:17:06.603759
| 2016-03-25T21:47:44
| 2016-03-25T21:47:44
| 51,031,997
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 841
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package pe.eeob.ndrasistencias.service;
import java.util.List;
import pe.eeob.ndrasistencias.dao.espec.DaoCursoEspec;
import pe.eeob.ndrasistencias.dao.implement.DaoCursoImpl;
import pe.eeob.ndrasistencias.domain.Curso;
/**
*
* @author ErickOre
*/
public class CursoService {
private DaoCursoEspec dao;
public CursoService() {
dao = new DaoCursoImpl();
}
public List<Curso> getCursos(Curso bean){
return dao.readForCriteria(bean);
}
public List<Curso> getAllCursos(){
return dao.readAll();
}
public List<String> getCursoPeriodo() {
return dao.getCursoPeriodo();
}
}
|
[
"gcoronelc@gmail.com"
] |
gcoronelc@gmail.com
|
e06693f5b315223e54e0ca2c511a1b407feac324
|
ad0fe9f21d55ec64ff72fabf77da92a442463b7e
|
/core/src/test/resources/maven-3-trunk/maven-compat/src/test/java/org/apache/maven/project/TestProjectBuilder.java
|
c2a907bba40249073d105e2f97c9aaabd7ed165c
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
gems-uff/oceano
|
91425da8a11aa0268c9b5c1e2db70013f0152bac
|
a37468dab497c1ffe338bbf06df179bfe27b59d1
|
refs/heads/master
| 2020-12-24T19:27:06.468798
| 2018-11-18T00:20:13
| 2018-11-18T00:20:13
| 13,281,731
| 3
| 3
|
MIT
| 2018-11-18T00:20:13
| 2013-10-02T20:18:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,814
|
java
|
/**
*
*/
package org.apache.maven.project;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Collections;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.codehaus.plexus.component.annotations.Component;
@Component(role=ProjectBuilder.class,hint="classpath")
public class TestProjectBuilder
extends DefaultProjectBuilder
{
@Override
public ProjectBuildingResult build( Artifact artifact, ProjectBuildingRequest request )
throws ProjectBuildingException
{
if ( "maven-test".equals( artifact.getGroupId() ) )
{
String scope = artifact.getArtifactId().substring( "scope-".length() );
try
{
artifact.setFile( ProjectClasspathTest.getFileForClasspathResource( ProjectClasspathTest.dir + "transitive-" + scope + "-dep.xml" ) );
}
catch ( FileNotFoundException e )
{
throw new IllegalStateException( "Missing test POM for " + artifact );
}
}
if ( artifact.getFile() == null )
{
MavenProject project = new MavenProject();
project.setArtifact( artifact );
return new DefaultProjectBuildingResult( project, null, null );
}
return build( artifact.getFile(), request );
}
@Override
public ProjectBuildingResult build( File pomFile, ProjectBuildingRequest configuration )
throws ProjectBuildingException
{
ProjectBuildingResult result = super.build( pomFile, configuration );
result.getProject().setRemoteArtifactRepositories( Collections.<ArtifactRepository> emptyList() );
return result;
}
}
|
[
"leomurta@ic.uff.br"
] |
leomurta@ic.uff.br
|
05507589a3f7dedcee3df0cf2b0094cc19d125e2
|
48b016c8eb1e33be1077a5e55482d10ebd023393
|
/src/main/java/ctp/thostapi/CThostFtdcMarketDataStaticField.java
|
1e43fa95d1688d1d7ed00be8c3990a40459fc45d
|
[
"Apache-2.0",
"ICU"
] |
permissive
|
yellow013/jctp_bak
|
17776f152024cf0afea0a8c476ea873f8dedc9e0
|
c293756c2e16a6cff18614f59e4a405eba9cee89
|
refs/heads/master
| 2021-02-06T16:02:43.465965
| 2020-02-29T08:19:27
| 2020-02-29T08:19:27
| 243,929,609
| 0
| 0
|
Apache-2.0
| 2020-10-13T19:56:55
| 2020-02-29T08:10:02
|
C++
|
UTF-8
|
Java
| false
| false
| 3,311
|
java
|
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package ctp.thostapi;
public class CThostFtdcMarketDataStaticField {
private long swigCPtr;
protected boolean swigCMemOwn;
protected CThostFtdcMarketDataStaticField(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(CThostFtdcMarketDataStaticField obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
thosttraderapiJNI.delete_CThostFtdcMarketDataStaticField(swigCPtr);
}
swigCPtr = 0;
}
}
public void setOpenPrice(double value) {
thosttraderapiJNI.CThostFtdcMarketDataStaticField_OpenPrice_set(swigCPtr, this, value);
}
public double getOpenPrice() {
return thosttraderapiJNI.CThostFtdcMarketDataStaticField_OpenPrice_get(swigCPtr, this);
}
public void setHighestPrice(double value) {
thosttraderapiJNI.CThostFtdcMarketDataStaticField_HighestPrice_set(swigCPtr, this, value);
}
public double getHighestPrice() {
return thosttraderapiJNI.CThostFtdcMarketDataStaticField_HighestPrice_get(swigCPtr, this);
}
public void setLowestPrice(double value) {
thosttraderapiJNI.CThostFtdcMarketDataStaticField_LowestPrice_set(swigCPtr, this, value);
}
public double getLowestPrice() {
return thosttraderapiJNI.CThostFtdcMarketDataStaticField_LowestPrice_get(swigCPtr, this);
}
public void setClosePrice(double value) {
thosttraderapiJNI.CThostFtdcMarketDataStaticField_ClosePrice_set(swigCPtr, this, value);
}
public double getClosePrice() {
return thosttraderapiJNI.CThostFtdcMarketDataStaticField_ClosePrice_get(swigCPtr, this);
}
public void setUpperLimitPrice(double value) {
thosttraderapiJNI.CThostFtdcMarketDataStaticField_UpperLimitPrice_set(swigCPtr, this, value);
}
public double getUpperLimitPrice() {
return thosttraderapiJNI.CThostFtdcMarketDataStaticField_UpperLimitPrice_get(swigCPtr, this);
}
public void setLowerLimitPrice(double value) {
thosttraderapiJNI.CThostFtdcMarketDataStaticField_LowerLimitPrice_set(swigCPtr, this, value);
}
public double getLowerLimitPrice() {
return thosttraderapiJNI.CThostFtdcMarketDataStaticField_LowerLimitPrice_get(swigCPtr, this);
}
public void setSettlementPrice(double value) {
thosttraderapiJNI.CThostFtdcMarketDataStaticField_SettlementPrice_set(swigCPtr, this, value);
}
public double getSettlementPrice() {
return thosttraderapiJNI.CThostFtdcMarketDataStaticField_SettlementPrice_get(swigCPtr, this);
}
public void setCurrDelta(double value) {
thosttraderapiJNI.CThostFtdcMarketDataStaticField_CurrDelta_set(swigCPtr, this, value);
}
public double getCurrDelta() {
return thosttraderapiJNI.CThostFtdcMarketDataStaticField_CurrDelta_get(swigCPtr, this);
}
public CThostFtdcMarketDataStaticField() {
this(thosttraderapiJNI.new_CThostFtdcMarketDataStaticField(), true);
}
}
|
[
"wk9988@gmail.com"
] |
wk9988@gmail.com
|
fe7d737bd40aeee3e9b73dcc580e07ed361ed7c3
|
8ad1fb5f6ba8a116993e4f50e1767e04d4bbb20a
|
/acra-core/src/main/java/org/acra/util/PackageManagerWrapper.java
|
baae94441925ebe6129eeb74122a77463a077f1e
|
[
"Apache-2.0"
] |
permissive
|
wolee/acra
|
0a6ad1cd3e79ccd9b54815865b2c66afd82ca49d
|
817d791504693ea184b87a0ab6ce1ba3b3e7e1f2
|
refs/heads/master
| 2021-05-04T20:24:11.624850
| 2018-01-28T23:12:11
| 2018-01-28T23:12:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,566
|
java
|
/*
* Copyright (c) 2017 the ACRA team
*
* 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.acra.util;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import org.acra.ACRA;
import static org.acra.ACRA.LOG_TAG;
/**
* Responsible for wrapping calls to PackageManager to ensure that they always complete without throwing RuntimeExceptions.
* Depending upon the state of the application it is possible that
* <ul>
* <li>Context has no PackageManager.</li>
* <li>PackageManager returned by Context throws RuntimeException("Package manager has died")
* because it cannot contact the remote PackageManager service.
* </li>
* </ul>
* I suspect that PackageManager death is caused during app installation.
* But we need to make ACRA bullet proof, so it's better to handle the condition safely so that the error report itself doesn't fail.
*
* @author William Ferguson
* @since 4.3.0
*/
public final class PackageManagerWrapper {
private final Context context;
public PackageManagerWrapper(@NonNull Context context) {
this.context = context;
}
/**
* @param permission Manifest.permission to check whether it has been granted.
* @return true if the permission has been granted to the app, false if it hasn't been granted or the PackageManager could not be contacted.
*/
public boolean hasPermission(@NonNull String permission) {
final PackageManager pm = context.getPackageManager();
if (pm == null) {
return false;
}
try {
return pm.checkPermission(permission, context.getPackageName()) == PackageManager.PERMISSION_GRANTED;
} catch (Throwable e) {
// To catch RuntimeException("Package manager has died") that can occur on some version of Android,
// when the remote PackageManager is unavailable. I suspect this sometimes occurs when the App is being reinstalled.
return false;
}
}
/**
* @return PackageInfo for the current application or null if the PackageManager could not be contacted.
*/
@Nullable
public PackageInfo getPackageInfo() {
final PackageManager pm = context.getPackageManager();
if (pm == null) {
return null;
}
try {
return pm.getPackageInfo(context.getPackageName(), 0);
} catch (PackageManager.NameNotFoundException e) {
ACRA.log.w(LOG_TAG, "Failed to find PackageInfo for current App : " + context.getPackageName());
return null;
} catch (Throwable e) {
// To catch RuntimeException("Package manager has died") that can occur on some version of Android,
// when the remote PackageManager is unavailable. I suspect this sometimes occurs when the App is being reinstalled.
return null;
}
}
}
|
[
"lukas.morawietz@gmail.com"
] |
lukas.morawietz@gmail.com
|
0773a7d43986d2f96686b33ef689cbf0ea2f31cb
|
0727e648eb765b6ab86f9196f0f0c45bf4f482e7
|
/MyJavaWorkShop13/src/com/test2/LamaEx1.java
|
cafc35b04f663cd0f09ca415a7732b2258a5d862
|
[] |
no_license
|
Ellie-Jung/Java-Study
|
16d4ebf5dd823d9bcd141c3f0201c796f252c96d
|
d41065e6b94566fec2d369567097bd1b2745ec1a
|
refs/heads/master
| 2023-09-05T10:38:14.395318
| 2021-11-13T10:44:15
| 2021-11-13T10:44:15
| 365,295,347
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 626
|
java
|
package com.test2;
@FunctionalInterface
interface MyFunction{
void run();
}
public class LamaEx1 {
static void execute (MyFunction f) {
f.run();
}
static MyFunction getMyFunction() {
MyFunction f= () -> System.out.println("f3.run()");
return f;
}
public static void main(String[] args) {
MyFunction f1 = ()->System.out.println("f1.run()");
MyFunction f2 = new MyFunction() {
@Override
public void run() {
System.out.println("f2.run()");
}
};
MyFunction f3 =getMyFunction();
f1.run();
f2.run();
f3.run();
execute(f1);
execute(()-> System.out.println("run()"));
}
}
|
[
"jssoyeon@gmail.com"
] |
jssoyeon@gmail.com
|
902fd8a53059d47f310f3e8c7b0f89d12ec44346
|
95e944448000c08dd3d6915abb468767c9f29d3c
|
/sources/com/p280ss/android/ugc/aweme/shortvideo/p1557d/C39331i.java
|
be8df447666a3f509dc612c0be396638cc8245f2
|
[] |
no_license
|
xrealm/tiktok-src
|
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
|
90f305b5f981d39cfb313d75ab231326c9fca597
|
refs/heads/master
| 2022-11-12T06:43:07.401661
| 2020-07-04T20:21:12
| 2020-07-04T20:21:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,933
|
java
|
package com.p280ss.android.ugc.aweme.shortvideo.p1557d;
import com.p280ss.android.ugc.aweme.draft.model.DefaultSelectStickerPoi;
import com.p280ss.android.ugc.aweme.draft.model.VideoCategoryParam;
import com.p280ss.android.ugc.aweme.infosticker.StickerChallenge;
import com.p280ss.android.ugc.aweme.shortvideo.AVChallenge;
import com.p280ss.android.ugc.aweme.shortvideo.edit.CompileProbeResult;
import com.p280ss.android.ugc.aweme.shortvideo.model.AVTextExtraStruct;
import java.util.List;
/* renamed from: com.ss.android.ugc.aweme.shortvideo.d.i */
public final class C39331i {
/* renamed from: a */
public String f102164a;
/* renamed from: b */
public List<AVTextExtraStruct> f102165b;
/* renamed from: c */
public int f102166c;
/* renamed from: d */
public String f102167d;
/* renamed from: e */
public DefaultSelectStickerPoi f102168e;
/* renamed from: f */
public List<AVChallenge> f102169f;
/* renamed from: g */
public int f102170g;
/* renamed from: h */
public C39323b f102171h;
/* renamed from: i */
public StickerChallenge f102172i;
/* renamed from: j */
public CompileProbeResult f102173j;
/* renamed from: k */
public String f102174k;
/* renamed from: l */
public int f102175l;
/* renamed from: m */
public VideoCategoryParam f102176m;
public C39331i(String str, List<AVTextExtraStruct> list, int i, String str2, List<AVChallenge> list2, DefaultSelectStickerPoi defaultSelectStickerPoi, C39323b bVar, StickerChallenge stickerChallenge, CompileProbeResult compileProbeResult) {
this.f102164a = str;
this.f102165b = list;
this.f102166c = i;
this.f102167d = str2;
this.f102169f = list2;
this.f102168e = defaultSelectStickerPoi;
this.f102171h = bVar;
this.f102172i = stickerChallenge;
this.f102173j = compileProbeResult;
}
}
|
[
"65450641+Xyzdesk@users.noreply.github.com"
] |
65450641+Xyzdesk@users.noreply.github.com
|
4bfd2a293e1f2c99e17241381cb37def3735d304
|
f009dc33f9624aac592cb66c71a461270f932ffa
|
/src/main/java/com/alipay/api/response/KoubeiItemModifyResponse.java
|
64a5d36c324cc971768131bebfcbef6447061e1e
|
[
"Apache-2.0"
] |
permissive
|
1093445609/alipay-sdk-java-all
|
d685f635af9ac587bb8288def54d94e399412542
|
6bb77665389ba27f47d71cb7fa747109fe713f04
|
refs/heads/master
| 2021-04-02T16:49:18.593902
| 2020-03-06T03:04:53
| 2020-03-06T03:04:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 931
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.item.modify response.
*
* @author auto create
* @since 1.0, 2019-05-09 22:38:25
*/
public class KoubeiItemModifyResponse extends AlipayResponse {
private static final long serialVersionUID = 4128331599377982699L;
/**
* 口碑体系内部商品的唯一标识,后续的增删改查接口都使用该ID作为主键
*/
@ApiField("item_id")
private String itemId;
/**
* 即入参中的request_id
*/
@ApiField("request_id")
private String requestId;
public void setItemId(String itemId) {
this.itemId = itemId;
}
public String getItemId( ) {
return this.itemId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getRequestId( ) {
return this.requestId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
8255028e479ace3ff130c3ff611ded37061c96a8
|
a66a4d91639836e97637790b28b0632ba8d0a4f9
|
/src/generators/framework/SearchResult.java
|
97364524b1768eb4316681410e2850f7ad14f4bb
|
[] |
no_license
|
roessling/animal-av
|
7d0ba53dda899b052a6ed19992fbdfbbc62cf1c9
|
043110cadf91757b984747750aa61924a869819f
|
refs/heads/master
| 2021-07-13T05:31:42.223775
| 2020-02-26T14:47:31
| 2020-02-26T14:47:31
| 206,062,707
| 0
| 2
| null | 2020-10-13T15:46:14
| 2019-09-03T11:37:11
|
Java
|
UTF-8
|
Java
| false
| false
| 220
|
java
|
package generators.framework;
public class SearchResult {
public Generator generator;
public int score;
public SearchResult(Generator gen, int searchScore) {
generator = gen;
score = searchScore;
}
}
|
[
"guido@tk.informatik.tu-darmstadt.de"
] |
guido@tk.informatik.tu-darmstadt.de
|
97f170bac9dbf758a481f5ff6b05c7edefb55a07
|
0c64308919bcb8aa063d89ec87127d07dd2fa337
|
/mooc-java-programming-ii/part09-Part09_05.TacoBoxes/src/main/java/TripleTacoBox.java
|
30150624700b763dde29f11ddfbc875878ade74b
|
[] |
no_license
|
emaphis/mooc_fi
|
a6d9a3a79883a624f49fa563059ba20287992b70
|
52233e55d304c665c0bc2f778710de6b71ca72be
|
refs/heads/master
| 2021-06-18T08:19:44.989075
| 2021-02-09T16:08:12
| 2021-02-09T16:08:12
| 172,287,666
| 1
| 7
| null | 2021-02-09T16:08:13
| 2019-02-24T02:36:17
|
Java
|
UTF-8
|
Java
| false
| false
| 344
|
java
|
/**
*
* @author emaphis
*/
public class TripleTacoBox implements TacoBox {
private int tacos;
public TripleTacoBox() {
this.tacos = 3;
}
@Override
public int tacosRemaining() {
return tacos;
}
@Override
public void eat() {
if (tacos > 0) {
tacos--;
}
}
}
|
[
"emaphis85@gmail.com"
] |
emaphis85@gmail.com
|
906e72593acd99529898a88b57d2bbc9498c105a
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/41/1122.java
|
8c38988fe5de24849ea637e86c1db159d6173976
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,515
|
java
|
//====================================================================================================
//The Free Edition of C++ to Java Converter limits conversion output to 100 lines per snippet.
//To purchase the Premium Edition, visit our website:
//https://www.tangiblesoftwaresolutions.com/order/order-cplus-to-java.html
//====================================================================================================
package <missing>;
public class GlobalMembers
{
public static int Main()
{
int a;
int b;
int c;
int d;
int e;
int i;
int j;
for (e = 1; e < 6; e++)
{
if (e != 2 && e != 3)
{
for (d = 1; d < 6; d++)
{
if (d != e)
{
for (c = 1; c < 6; c++)
{
if (c != d && c != e)
{
for (b = 1; b < 6; b++)
{
if (b != e && b != d && b != c)
{
for (a = 1; a < 6; a++)
{
if (a != b && a != c && a != d && a != e)
{
if ((e == 1) + (b == 2) + (a == 5) + (c != 1) + (d == 1) == 2)
{
if ((e == 1) + (b == 2) == 2 && (a == 1 && b == 2 || a == 2 && b == 1))
{
System.out.print(a);
System.out.print(" ");
System.out.print(b);
System.out.print(" ");
System.out.print(c);
System.out.print(" ");
System.out.print(d);
System.out.print(" ");
System.out.print(e);
System.out.print("\n");
}
else if ((e == 1) + (a == 5) == 2 && (a == 1 && c == 2 || a == 2 && c == 1))
{
System.out.print(a);
System.out.print(" ");
System.out.print(b);
System.out.print(" ");
System.out.print(c);
System.out.print(" ");
System.out.print(d);
System.out.print(" ");
System.out.print(e);
System.out.print("\n");
}
else if ((e == 1) + (c != 1) == 2 && (a == 1 && d == 2 || a == 2 && d == 1))
{
System.out.print(a);
System.out.print(" ");
System.out.print(b);
System.out.print(" ");
System.out.print(c);
System.out.print(" ");
System.out.print(d);
System.out.print(" ");
System.out.print(e);
System.out.print("\n");
}
else if ((e == 1) + (d == 1) == 2 && (a == 1 && e == 2 || a == 2 && e == 1))
{
System.out.print(a);
System.out.print(" ");
System.out.print(b);
System.out.print(" ");
System.out.print(c);
System.out.print(" ");
System.out.print(d);
System.out.print(" ");
System.out.print(e);
System.out.print("\n");
}
else if ((b == 2) + (a == 5) == 2 && (b == 1 && c == 2 || b == 2 && c == 1))
{
System.out.print(a);
System.out.print(" ");
System.out.print(b);
System.out.print(" ");
System.out.print(c);
System.out.print(" ");
System.out.print(d);
System.out.print(" ");
System.out.print(e);
System.out.print("\n");
}
else if ((b == 2) + (c != 1) == 2 && (b == 1 && d == 2 || b == 2 && d == 1))
{
System.out.print(a);
System.out.print(" ");
System.out.print(b);
System.out.print(" ");
System.out.print(c);
System.out.print(" ");
System.out.print(d);
System.out.print(" ");
System.out.print(e);
System.out.print("\n");
}
else if ((b == 2) + (d == 1) == 2 && (b == 1 && e == 2 || b == 2 && e == 1))
{
System.out.print(a);
System.out.print(" ");
System.out.print(b);
System.out.print(" ");
System.out.print(c);
System.out.print(" ");
System.out.print(d);
System.out.print(" ");
System.out.print(e);
System.out.print("\n");
}
else if ((a == 5) + (c != 1) == 2 && (c == 1 && d == 2 || c == 2 && d == 1))
{
System.out.print(a);
//====================================================================================================
//End of the allowed output for the Free Edition of C++ to Java Converter.
//To purchase the Premium Edition, visit our website:
//https://www.tangiblesoftwaresolutions.com/order/order-cplus-to-java.html
//====================================================================================================
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
0f30497f3b0e57211e42ec0ab4e50b814c1aacd1
|
e67d801c509784ef0d9919419f60f3d53d91fd6e
|
/eshop4j-framework/src/main/java/com/eshop4j/core/datatable/DataTableReturn.java
|
3209e6b84c009bc0f5466ac84a7dad8843232263
|
[] |
no_license
|
zwyi1985/eshop4j
|
01ba3a834816765bf931b364088211c283ad98bd
|
ed7e9297138a79d1077c9ade1047c855dbdd9e54
|
refs/heads/master
| 2020-04-13T04:19:24.827448
| 2018-10-20T06:21:06
| 2018-10-20T06:21:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,530
|
java
|
package com.eshop4j.core.datatable;
import java.util.List;
/**
* DataTables期望的返回数据格式
*
* @author Mignet
* @date 2011-7-26 上午11:23:17
*/
public class DataTableReturn {
/**
* 总记录数
*/
private Integer recordsTotal;
/**
* 过滤后总记录数
*/
private Integer recordsFiltered;
/**
* The draw counter that this object is a response to - from the draw parameter sent as part of the data request. <br>
* Note that it is <b>strongly recommended for security reasons that you cast this parameter to an integer</b>, <br>
* rather than simply echoing back to the client what it sent in the draw parameter, in order to prevent Cross Site Scripting (XSS) attacks.
*/
private Integer draw;
/**
* 返回的具体数据
*/
private List<?> data;
/**
* Optional: If an error occurs
*/
private String error;
public Integer getRecordsTotal() {
return recordsTotal;
}
public void setRecordsTotal(Integer recordsTotal) {
this.recordsTotal = recordsTotal;
}
public Integer getRecordsFiltered() {
return recordsFiltered;
}
public void setRecordsFiltered(Integer recordsFiltered) {
this.recordsFiltered = recordsFiltered;
}
public Integer getDraw() {
return draw;
}
public void setDraw(Integer draw) {
this.draw = draw;
}
public List<?> getData() {
return data;
}
public void setData(List<?> data) {
this.data = data;
}
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
}
|
[
"MignetWee@gmail.com"
] |
MignetWee@gmail.com
|
082b5f8505c5189b9b5e1a6e41c81709ad54d1fe
|
e4ef8f38104c080892e482a99cee7f2fdb08a7c4
|
/orange-demo-single/orange-demo-single-service/application-webadmin/src/main/java/com/orangeforms/webadmin/app/dao/ClassCourseMapper.java
|
69ebef35ebd51c69b57d70982f0ec2338d44d373
|
[
"Apache-2.0"
] |
permissive
|
orange-form/orange-admin
|
79f28385658d2635df28fe7a029b987972eb85fb
|
13bf4764d13ed32b564e3ea4442c4b6c53557113
|
refs/heads/master
| 2022-07-27T03:21:03.311959
| 2021-12-26T04:37:09
| 2021-12-26T04:37:09
| 254,990,100
| 234
| 57
|
Apache-2.0
| 2022-06-21T04:20:21
| 2020-04-12T01:53:58
|
CSS
|
UTF-8
|
Java
| false
| false
| 499
|
java
|
package com.orangeforms.webadmin.app.dao;
import com.orangeforms.common.core.base.dao.BaseDaoMapper;
import com.orangeforms.webadmin.app.model.ClassCourse;
import java.util.*;
/**
* 数据操作访问接口。
*
* @author Jerry
* @date 2020-09-24
*/
public interface ClassCourseMapper extends BaseDaoMapper<ClassCourse> {
/**
* 批量插入对象列表。
*
* @param classCourseList 新增对象列表。
*/
void insertList(List<ClassCourse> classCourseList);
}
|
[
"707344974@qq.com"
] |
707344974@qq.com
|
70d789dd0598dc10a46d31f63a278af2dfc5b4bb
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14599-14-12-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/observation/internal/DefaultObservationManager_ESTest.java
|
71cfa569d4610c103a21d2bf2820e776f05b54eb
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 587
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Apr 03 02:54:08 UTC 2020
*/
package org.xwiki.observation.internal;
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(useVFS = true, useJEE = true)
public class DefaultObservationManager_ESTest extends DefaultObservationManager_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
0c051941802ff5c0b555d43e02f48920870ddab2
|
b18508b82fedc024b32474b91ee44f3c900f9eab
|
/JacpFX-ui-composition/src/main/java/quickstart/ui/MessageConstants.java
|
ff54476216d188cb7a24ad050c59f9c44d107166
|
[
"Apache-2.0"
] |
permissive
|
orsanakbaba/JacpFX-misc
|
6dcaac7dbae1be518a9d2bbac34521afad1f59d1
|
47bd752e252439ec91d149e6ef0cbef3fe3c52cd
|
refs/heads/master
| 2022-12-22T05:29:17.720943
| 2020-01-16T22:32:24
| 2020-01-16T22:32:24
| 234,390,538
| 0
| 0
|
Apache-2.0
| 2022-12-16T05:12:45
| 2020-01-16T19:01:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,054
|
java
|
/*
* **********************************************************************
*
* Copyright (C) 2010 - 2014
*
* [Component.java]
* JACPFX Project (https://github.com/JacpFX/JacpFX/)
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS"
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
*
* *********************************************************************
*/
package quickstart.ui;
/**
*
*
* @author: Patrick Symmangk (pete.jacp@gmail.com)
*
*/
public interface MessageConstants {
public static final String SWITCH_MESSAGE = "switch";
}
|
[
"amo.ahcp@gmail.com"
] |
amo.ahcp@gmail.com
|
9d0bd3740705483e2f0627eafb0f58a3d8475bf1
|
433f6bc02a886ecdf2e1f02e2823b039c9d5a9f6
|
/pidome-pidome-plugins/src/main/java/org/pidome/plugins/devices/httpDevices/HttpDevices.java
|
76b4fe619c39828c6fcb57d9ecabbcad87989a20
|
[] |
no_license
|
vendor-vandor/pidome-unofficial
|
58d29895cb21571c7d9a5efb4493c5a475ae5472
|
d1b15bf85085452a664c2892ffb26260df441007
|
refs/heads/master
| 2021-01-10T02:11:03.588741
| 2016-03-04T01:04:24
| 2016-03-04T01:04:24
| 53,095,614
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,387
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.pidome.plugins.devices.httpDevices;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.pidome.server.connector.drivers.devices.Device;
import org.pidome.server.connector.drivers.devices.DeviceCommandRequest;
import org.pidome.server.connector.drivers.devices.PluginDeviceMutationException;
import org.pidome.server.connector.interfaces.web.configuration.WebConfiguration;
import org.pidome.server.connector.interfaces.web.configuration.WebConfigurationException;
import org.pidome.server.connector.interfaces.web.configuration.WebConfigurationOptionSet;
import org.pidome.server.connector.plugins.PluginException;
import org.pidome.server.connector.plugins.emulators.DevicePlugin;
/**
*
* @author John
*/
public final class HttpDevices extends DevicePlugin {
Map<String, String> configuration;
static Logger LOG = LogManager.getLogger(HttpDevices.class);
boolean pluginStarted = false;
public HttpDevices(){
WebConfiguration conf = new WebConfiguration();
WebConfigurationOptionSet optionSet = new WebConfigurationOptionSet("Options");
optionSet.setConfigurationSetDescription("This plugin does not have any additional options. Refer to the documentation about http enabled devices.");
conf.addOptionSet(optionSet);
setConfiguration(conf);
}
@Override
public void setConfigurationValues(Map<String, String> config) throws WebConfigurationException {
}
@Override
public void startPlugin() throws PluginException {
pluginStarted = true;
setRunning(pluginStarted);
}
@Override
public void stopPlugin() {
pluginStarted = false;
setRunning(pluginStarted);
}
/**
* @inheritDoc
*/
@Override
public String getExpectedDriverId() {
return "NATIVE_PIDOMEHTTPDEVICES_DRIVER";
}
/**
* @inheritDoc
*/
@Override
public String getExpectedDriverVersion() {
return "0.0.1";
}
/**
* @inheritDoc
*/
@Override
public void handleDeviceData(Device device, String group, String set, byte[] data, boolean userIntent) {
if (pluginStarted) {
handleDeviceCommand(device, group, set, data);
}
}
/**
* Handles the device command.
* It sorts out what kind of request and how it's made.
*/
private void handleDeviceCommand(Device device, String group, String set, byte[] data){
Runnable exec = () -> {
String workData = new StringBuilder(device.getAddress()).append(data).toString();
BufferedReader rd;
try {
LOG.debug("Trying url: {}", workData);
HttpURLConnection conn = (HttpURLConnection) new URL(workData).openConnection();
conn.setConnectTimeout(2000);
conn.setReadTimeout(2000);
conn.setRequestMethod("GET");
rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
rd.close();
} catch (IOException ex) {
LOG.error("Could not open connection to {}: {} ()", workData, ex.getMessage(), device.getName());
} catch (Exception ex) {
LOG.error("An error occured during request to: {} ({}, )", workData, ex.getMessage(), ex.getCause().getMessage(), device.getName());
}
};
exec.run();
}
@Override
public void prepareDelete() {
List<Device> devices = getHardwareDevice().getSoftwareDriver().getRunningDevices();
List<Integer> deviceIds= new ArrayList<>();
for(Device device: devices){
deviceIds.add(device.getId());
}
for(Integer id:deviceIds){
try {
this.deleteDevice(id);
} catch (PluginDeviceMutationException ex) {
LOG.error("Could not delete device {}: {}", id,ex.getMessage());
}
}
}
@Override
public void deviceRemoved(Device device) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public void deviceAdded(Device device) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public void prepareWebPresentation() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public boolean hasGraphData() {
return false;
}
@Override
public void handleDeviceData(Device device, DeviceCommandRequest dcr) {
/// not used yet.
}
}
|
[
"vandor319@gmail.com"
] |
vandor319@gmail.com
|
d5a75464f262901f9074857d0b64f36f6e58fd7d
|
e68f422792b7c2b5835e4312f5235d431d3c1c86
|
/azurMobile/src/main/java/com/checkme/azur/utils/LogUtils.java
|
8b84e56ea7b7f30ac35a07ad632d2f53b3d7e8b2
|
[] |
no_license
|
viatom-develop/Checkme_Pro_Android_demo
|
6f43028bac836605555fc047c92f12e10bc4ab84
|
24a9f487303f366af63b1329faad2f3366eb73d5
|
refs/heads/lite
| 2023-03-20T00:35:35.638892
| 2021-02-03T10:42:54
| 2021-02-03T10:42:54
| 312,521,998
| 3
| 2
| null | 2021-03-10T04:13:46
| 2020-11-13T08:52:03
|
Java
|
UTF-8
|
Java
| false
| false
| 553
|
java
|
package com.checkme.azur.utils;
import android.util.Log;
/**
* Tools used to pint debug information.
* @author zouhao
*/
public class LogUtils {
/**
* Debug flag
*/
public static boolean DEBUG = true;
/**
* Log debug information with tag "VD" if DEBUG flag is true
* @param string
*/
public static void d(String string){
if(DEBUG)
Log.d("VD",string);
}
/**
* Print debug information if DEBUG flag is true
* @param string
*/
public static void println(String string){
if(DEBUG)
System.out.println(string);
}
}
|
[
"gongguopei@viatomtech.com"
] |
gongguopei@viatomtech.com
|
f13d4ff759dca327dacc969c361738a1d79f193b
|
14d5808bf7a36a316d014af9497594fa42ca93c1
|
/patient/src/main/java/com/shkjs/patient/bean/Page.java
|
20c2ef379860abd8d6673d23b19284741af948b1
|
[] |
no_license
|
Soon-gz/MySecondDemo
|
3baa004b58043034d64c817bf49c071f17cb7687
|
36546731f4aef99ae29a26611277f4ce11361e2c
|
refs/heads/master
| 2023-02-21T11:28:32.261133
| 2017-01-24T02:28:30
| 2017-01-24T02:28:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 643
|
java
|
package com.shkjs.patient.bean;
/**
* Created by xiaohu on 2016/10/14.
*/
public class Page {
private int pageNum = 1;
private int pageSize = 10;
private int totalCount = 0;
public int getPageNum() {
return pageNum;
}
public void setPageNum(int pageNum) {
this.pageNum = pageNum;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
}
|
[
"sw201202@126.com"
] |
sw201202@126.com
|
f72a38b8be22ed72ad84068f30f6a164b5f3cb01
|
17079fa276050a5a7b5994d7fae541d7d0cfa3b3
|
/yxw-stats-task/src/main/java/com/yxw/stats/dao/platform/UserSubscribeDao.java
|
35ef722d98e111b8ed66162e4d3a7cdf02b78835
|
[] |
no_license
|
zhiji6/yxw
|
664f6729b6642affb8ff1ee258b915f8d1ccf666
|
7f75370fcd425cda11faf3d2c54e6119ecc7d9fd
|
refs/heads/master
| 2023-08-17T00:12:03.150081
| 2019-12-04T07:33:45
| 2019-12-04T07:33:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 891
|
java
|
/**
* <html>
* <body>
* <P> Copyright(C)版权所有 - 2016 广州医享网络科技发展有限公司.</p>
* <p> All rights reserved.</p>
* <p> Created on 2016-8-11</p>
* <p> Created by Administrator</p>
* </body>
* </html>
*/
package com.yxw.stats.dao.platform;
import java.util.List;
import java.util.Map;
import com.yxw.framework.mvc.dao.BaseDao;
import com.yxw.stats.entity.platform.UserSubscribe;
public interface UserSubscribeDao extends BaseDao<UserSubscribe, String> {
/**
* 获取用户关注数集合
*
* @param map
* @return
*/
public List<UserSubscribe> getUserSubscribes(Map map);
/**
* 根据日期获取用户关注列
*
* @param map
* @return
*/
public UserSubscribe getUserSubscribeByDate(Map map);
/**
* 获取最后一条用户关注数据
*
* @return
*/
public UserSubscribe getUserSubscribeLastOne(Map map);
}
|
[
"279430985@qq.com"
] |
279430985@qq.com
|
3415b2514e06540fc327b0c8327521f5e89df64b
|
3637342fa15a76e676dbfb90e824de331955edb5
|
/bang-android/branches/GSM/1.2.1/Tonggou2.0_gsm/src/com/tonggou/gsm/andclient/test/TestSimpleTitleBarActivity.java
|
bae15e9f7a658f711f2cd179c70d7237f9063ff2
|
[] |
no_license
|
BAT6188/bo
|
6147f20832263167101003bea45d33e221d0f534
|
a1d1885aed8cf9522485fd7e1d961746becb99c9
|
refs/heads/master
| 2023-05-31T03:36:26.438083
| 2016-11-03T04:43:05
| 2016-11-03T04:43:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,108
|
java
|
package com.tonggou.gsm.andclient.test;
import android.os.Bundle;
import android.view.View;
import com.tonggou.gsm.andclient.App;
import com.tonggou.gsm.andclient.R;
import com.tonggou.gsm.andclient.ui.SimpleTitleBarActivity;
import com.tonggou.gsm.andclient.ui.view.SimpleTitleBar;
public class TestSimpleTitleBarActivity extends SimpleTitleBarActivity {
@Override
protected void onCreate(Bundle arg0) {
super.onCreate(arg0);
setContentView(R.layout.test_activity_simple_titlebar);
SimpleTitleBar titleBar = getTitleBar();
titleBar.setBackgroundColor(getResources().getColor(android.R.color.holo_blue_light));
titleBar.setTitle("行车一键通")
.setLeftButton(android.R.color.black).setOnLeftButtonClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
App.showShortToast("left btn click");
}
})
.setRightButton("REFRESH", android.R.color.black)
.setOnRightButtonClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
App.showShortToast("REFRESH btn click");
}
});
}
}
|
[
"ndong211@163.com"
] |
ndong211@163.com
|
2fcbef53943e14d8e4d1e70ff5d7d30b1243c592
|
b998b375e53c0d8141db7f8e07cb01b494ed3d0a
|
/SPayExperiment/app/src/main/java/com/samsung/android/spayfw/payprovider/discover/tzsvc/DcTaCommandResponse.java
|
6f8c5f462ad72ca1170a43b7f35dcba8ecf0733d
|
[] |
no_license
|
atthisaccount/SPay-inner-workings
|
c3b6256c8ed10c2492d19eca8e63f656cd855be2
|
6dd83a6ea0916c272423ea0dc1fa3757baa632e7
|
refs/heads/master
| 2022-03-22T04:12:05.100198
| 2019-10-06T13:25:49
| 2019-10-06T13:25:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 793
|
java
|
/*
* Decompiled with CFR 0.0.
*
* Could not load the following classes:
* android.spay.TACommandResponse
* java.lang.String
*/
package com.samsung.android.spayfw.payprovider.discover.tzsvc;
import android.spay.TACommandResponse;
import com.samsung.android.spayfw.payprovider.discover.tzsvc.d;
public abstract class DcTaCommandResponse
extends TACommandResponse {
public d yX;
public DcTaCommandResponse(TACommandResponse tACommandResponse) {
super(tACommandResponse.mResponseCode, tACommandResponse.mErrorMsg, tACommandResponse.mResponse);
}
public String ez() {
return this.yX.eA();
}
public long getReturnCode() {
return this.yX.getReturnCode();
}
public boolean validate() {
return this.yX.validate();
}
}
|
[
"4461705+pandalion98@users.noreply.github.com"
] |
4461705+pandalion98@users.noreply.github.com
|
abeac78c0876b9eb983a5706eaae6c2024cfbf47
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/hazelcast/2019/8/CPSemaphoreChangeCodec.java
|
6e749d2e527bffef8aed2f516bd258afb5d537a5
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 6,064
|
java
|
/*
* Copyright (c) 2008-2019, Hazelcast, 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.
*/
package com.hazelcast.client.impl.protocol.codec;
import com.hazelcast.client.impl.protocol.ClientMessage;
import com.hazelcast.client.impl.protocol.codec.builtin.*;
import java.util.ListIterator;
import static com.hazelcast.client.impl.protocol.ClientMessage.*;
import static com.hazelcast.client.impl.protocol.codec.builtin.FixedSizeTypesCodec.*;
/**
* Increases or decreases the number of permits by the given value.
*/
public final class CPSemaphoreChangeCodec {
//hex: 0x270500
public static final int REQUEST_MESSAGE_TYPE = 2557184;
//hex: 0x270501
public static final int RESPONSE_MESSAGE_TYPE = 2557185;
private static final int REQUEST_SESSION_ID_FIELD_OFFSET = PARTITION_ID_FIELD_OFFSET + INT_SIZE_IN_BYTES;
private static final int REQUEST_THREAD_ID_FIELD_OFFSET = REQUEST_SESSION_ID_FIELD_OFFSET + LONG_SIZE_IN_BYTES;
private static final int REQUEST_INVOCATION_UID_FIELD_OFFSET = REQUEST_THREAD_ID_FIELD_OFFSET + LONG_SIZE_IN_BYTES;
private static final int REQUEST_PERMITS_FIELD_OFFSET = REQUEST_INVOCATION_UID_FIELD_OFFSET + UUID_SIZE_IN_BYTES;
private static final int REQUEST_INITIAL_FRAME_SIZE = REQUEST_PERMITS_FIELD_OFFSET + INT_SIZE_IN_BYTES;
private static final int RESPONSE_RESPONSE_FIELD_OFFSET = CORRELATION_ID_FIELD_OFFSET + LONG_SIZE_IN_BYTES;
private static final int RESPONSE_INITIAL_FRAME_SIZE = RESPONSE_RESPONSE_FIELD_OFFSET + BOOLEAN_SIZE_IN_BYTES;
private CPSemaphoreChangeCodec() {
}
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings({"URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"})
public static class RequestParameters {
/**
* CP group id of this ISemaphore instance
*/
public com.hazelcast.cp.internal.RaftGroupId groupId;
/**
* Name of this ISemaphore instance
*/
public java.lang.String name;
/**
* Session ID of the caller
*/
public long sessionId;
/**
* ID of the caller thread
*/
public long threadId;
/**
* UID of this invocation
*/
public java.util.UUID invocationUid;
/**
* number of permits to increase / decrease
*/
public int permits;
}
public static ClientMessage encodeRequest(com.hazelcast.cp.internal.RaftGroupId groupId, java.lang.String name, long sessionId, long threadId, java.util.UUID invocationUid, int permits) {
ClientMessage clientMessage = ClientMessage.createForEncode();
clientMessage.setRetryable(true);
clientMessage.setAcquiresResource(false);
clientMessage.setOperationName("CPSemaphore.Change");
ClientMessage.Frame initialFrame = new ClientMessage.Frame(new byte[REQUEST_INITIAL_FRAME_SIZE], UNFRAGMENTED_MESSAGE);
encodeInt(initialFrame.content, TYPE_FIELD_OFFSET, REQUEST_MESSAGE_TYPE);
encodeLong(initialFrame.content, REQUEST_SESSION_ID_FIELD_OFFSET, sessionId);
encodeLong(initialFrame.content, REQUEST_THREAD_ID_FIELD_OFFSET, threadId);
encodeUUID(initialFrame.content, REQUEST_INVOCATION_UID_FIELD_OFFSET, invocationUid);
encodeInt(initialFrame.content, REQUEST_PERMITS_FIELD_OFFSET, permits);
clientMessage.add(initialFrame);
RaftGroupIdCodec.encode(clientMessage, groupId);
StringCodec.encode(clientMessage, name);
return clientMessage;
}
public static CPSemaphoreChangeCodec.RequestParameters decodeRequest(ClientMessage clientMessage) {
ListIterator<ClientMessage.Frame> iterator = clientMessage.listIterator();
RequestParameters request = new RequestParameters();
ClientMessage.Frame initialFrame = iterator.next();
request.sessionId = decodeLong(initialFrame.content, REQUEST_SESSION_ID_FIELD_OFFSET);
request.threadId = decodeLong(initialFrame.content, REQUEST_THREAD_ID_FIELD_OFFSET);
request.invocationUid = decodeUUID(initialFrame.content, REQUEST_INVOCATION_UID_FIELD_OFFSET);
request.permits = decodeInt(initialFrame.content, REQUEST_PERMITS_FIELD_OFFSET);
request.groupId = RaftGroupIdCodec.decode(iterator);
request.name = StringCodec.decode(iterator);
return request;
}
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings({"URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD"})
public static class ResponseParameters {
/**
* true
*/
public boolean response;
}
public static ClientMessage encodeResponse(boolean response) {
ClientMessage clientMessage = ClientMessage.createForEncode();
ClientMessage.Frame initialFrame = new ClientMessage.Frame(new byte[RESPONSE_INITIAL_FRAME_SIZE], UNFRAGMENTED_MESSAGE);
encodeInt(initialFrame.content, TYPE_FIELD_OFFSET, RESPONSE_MESSAGE_TYPE);
clientMessage.add(initialFrame);
encodeBoolean(initialFrame.content, RESPONSE_RESPONSE_FIELD_OFFSET, response);
return clientMessage;
}
public static CPSemaphoreChangeCodec.ResponseParameters decodeResponse(ClientMessage clientMessage) {
ListIterator<ClientMessage.Frame> iterator = clientMessage.listIterator();
ResponseParameters response = new ResponseParameters();
ClientMessage.Frame initialFrame = iterator.next();
response.response = decodeBoolean(initialFrame.content, RESPONSE_RESPONSE_FIELD_OFFSET);
return response;
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
a81bae973b59fb5145aee8dd2878be87b1f50a0b
|
46fe00b9ac4877cdda2a7c9a1a21078e01297e5c
|
/bpmn-model/src/main/java/org/camunda/bpm/model/bpmn/impl/instance/bpmndi/BpmnEdgeImpl.java
|
fc9541ad4f084bf77ffdb95bd5ceb305a84bba43
|
[
"Apache-2.0"
] |
permissive
|
frettloeh/camunda-bpmn-model
|
4d18ce9fd9224bd12e402eb43514d72eec0b762d
|
a1317e474cea5b0fc3f4bd11fba3e37f262f17f7
|
refs/heads/master
| 2021-01-13T11:59:01.854707
| 2014-03-13T14:32:15
| 2014-03-13T14:32:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,819
|
java
|
/* 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.camunda.bpm.model.bpmn.impl.instance.bpmndi;
import org.camunda.bpm.model.bpmn.impl.instance.di.LabeledEdgeImpl;
import org.camunda.bpm.model.bpmn.instance.BaseElement;
import org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnEdge;
import org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnLabel;
import org.camunda.bpm.model.bpmn.instance.bpmndi.MessageVisibleKind;
import org.camunda.bpm.model.bpmn.instance.di.DiagramElement;
import org.camunda.bpm.model.bpmn.instance.di.LabeledEdge;
import org.camunda.bpm.model.xml.ModelBuilder;
import org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext;
import org.camunda.bpm.model.xml.type.ModelElementTypeBuilder;
import org.camunda.bpm.model.xml.type.attribute.Attribute;
import org.camunda.bpm.model.xml.type.child.ChildElement;
import org.camunda.bpm.model.xml.type.child.SequenceBuilder;
import org.camunda.bpm.model.xml.type.reference.AttributeReference;
import static org.camunda.bpm.model.bpmn.impl.BpmnModelConstants.*;
import static org.camunda.bpm.model.xml.type.ModelElementTypeBuilder.ModelTypeInstanceProvider;
/**
* The BPMNDI BPMNEdge element
*
* @author Sebastian Menski
*/
public class BpmnEdgeImpl extends LabeledEdgeImpl implements BpmnEdge {
private static AttributeReference<BaseElement> bpmnElementAttribute;
private static AttributeReference<DiagramElement> sourceElementAttribute;
private static AttributeReference<DiagramElement> targetElementAttribute;
private static Attribute<MessageVisibleKind> messageVisibleKindAttribute;
private static ChildElement<BpmnLabel> bpmnLabelChild;
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(BpmnEdge.class, BPMNDI_ELEMENT_BPMN_EDGE)
.namespaceUri(BPMNDI_NS)
.extendsType(LabeledEdge.class)
.instanceProvider(new ModelTypeInstanceProvider<BpmnEdge>() {
public BpmnEdge newInstance(ModelTypeInstanceContext instanceContext) {
return new BpmnEdgeImpl(instanceContext);
}
});
bpmnElementAttribute = typeBuilder.stringAttribute(BPMNDI_ATTRIBUTE_BPMN_ELEMENT)
.namespace(BPMNDI_NS)
.qNameAttributeReference(BaseElement.class)
.build();
sourceElementAttribute = typeBuilder.stringAttribute(BPMNDI_ATTRIBUTE_SOURCE_ELEMENT)
.namespace(BPMNDI_NS)
.qNameAttributeReference(DiagramElement.class)
.build();
targetElementAttribute = typeBuilder.stringAttribute(BPMNDI_ATTRIBUTE_TARGET_ELEMENT)
.namespace(BPMNDI_NS)
.qNameAttributeReference(DiagramElement.class)
.build();
messageVisibleKindAttribute = typeBuilder.enumAttribute(BPMNDI_ATTRIBUTE_MESSAGE_VISIBLE_KIND, MessageVisibleKind.class)
.namespace(BPMNDI_NS)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
bpmnLabelChild = sequenceBuilder.element(BpmnLabel.class)
.build();
typeBuilder.build();
}
public BpmnEdgeImpl(ModelTypeInstanceContext instanceContext) {
super(instanceContext);
}
public BaseElement getBpmnElement() {
return bpmnElementAttribute.getReferenceTargetElement(this);
}
public void setBpmnElement(BaseElement bpmnElement) {
bpmnElementAttribute.setReferenceTargetElement(this, bpmnElement);
}
public DiagramElement getSourceElement() {
return sourceElementAttribute.getReferenceTargetElement(this);
}
public void setSourceElement(DiagramElement sourceElement) {
sourceElementAttribute.setReferenceTargetElement(this, sourceElement);
}
public DiagramElement getTargetElement() {
return targetElementAttribute.getReferenceTargetElement(this);
}
public void setTargetElement(DiagramElement targetElement) {
targetElementAttribute.setReferenceTargetElement(this, targetElement);
}
public MessageVisibleKind getMessageVisibleKind() {
return messageVisibleKindAttribute.getValue(this);
}
public void setMessageVisibleKind(MessageVisibleKind messageVisibleKind) {
messageVisibleKindAttribute.setValue(this, messageVisibleKind);
}
public BpmnLabel getBpmnLabel() {
return bpmnLabelChild.getChild(this);
}
public void setBpmnLabel(BpmnLabel bpmnLabel) {
bpmnLabelChild.setChild(this, bpmnLabel);
}
}
|
[
"sebastian.menski@googlemail.com"
] |
sebastian.menski@googlemail.com
|
d168b1c5e26540b874c8bc23f92c85d19f71ffc3
|
7dfc7b63ecffc006125df2bf9d306590732f1fa5
|
/SpringIocDiMvc/src/main/java/com/hongdu/spring/core/HdBeanFactory.java
|
8cbd02b7a77fd78db364a4a0f175b45188c44d76
|
[] |
no_license
|
hddudu/homework
|
368e44464a4010c36266222f1629a83bb6a5152b
|
60732ec06dd1bbdfab40d0cb577ffbe02dacb778
|
refs/heads/master
| 2022-12-23T08:45:35.592459
| 2020-03-05T07:17:58
| 2020-03-05T07:17:58
| 191,090,444
| 0
| 0
| null | 2022-12-16T09:45:36
| 2019-06-10T03:30:25
|
Java
|
UTF-8
|
Java
| false
| false
| 1,016
|
java
|
package com.hongdu.spring.core;
/**
* @ClassName HdBeanFactory
* @Description 顶层的 Bean 工厂定义
* Bean工厂和 factory的一个bean是不一样的
* @Author dudu
* @Date 2019/7/16 14:46
* @Version 1.0
*/
public interface HdBeanFactory {
//对FactoryBean的转义定义,因为如果使用bean的名字检索FactoryBean得到的对象是工厂生成的对象,
//如果需要得到工厂本身,需要转义
String FACTORY_BEAN_PREFIX = "&";
/**
* 根据BeanName从IOC容器中获取一个实例的bean
* 多个容器 不方便管理
* 单例模式
* 是否延时加载:
* 1: 是
* 2: 不是
* 获取 bean
* @param beanName
* @return
* @throws Exception
*/
Object getBean(String beanName) throws Exception;
/**
* 根据beanClass获取 bean
* @param beanClass
* @return
* @throws Exception
*/
Object getBean(Class<?> beanClass) throws Exception;
}
|
[
"15574948314@163.com"
] |
15574948314@163.com
|
8ed554847bd44d9df21b6e89a83e1610e71d0699
|
91b79302c192ee38a15903c187cee164e1727fb6
|
/src/main/java/DAOs/JuniperAPIDAOs/JPCruiseDataRQ.java
|
1dcfd520b0b0bc046299c7cf33da82ee7ba30983
|
[] |
no_license
|
Gnafpas/ATBHolidaysAPI
|
24d82b8a431ad0bf10255e5511e3ef2c434ae780
|
6485a034c56587d790060c0da87d4f24ee947229
|
refs/heads/master
| 2020-04-08T17:25:42.641876
| 2018-12-25T12:17:44
| 2018-12-25T12:17:44
| 159,566,357
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,353
|
java
|
package DAOs.JuniperAPIDAOs;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for JP_CruiseDataRQ complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="JP_CruiseDataRQ">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Login" type="{http://www.juniper.es/webservice/2007/}JP_Login" minOccurs="0"/>
* <element name="CruiseDataRequest" type="{http://www.juniper.es/webservice/2007/}JP_CruiseDataRequest" minOccurs="0"/>
* <element name="RestrictedOptions" type="{http://www.juniper.es/webservice/2007/}JP_RestrictedOptions" minOccurs="0"/>
* </sequence>
* <attribute name="Version" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="Language" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "JP_CruiseDataRQ", propOrder = {
"login",
"cruiseDataRequest",
"restrictedOptions"
})
public class JPCruiseDataRQ {
@XmlElement(name = "Login")
protected JPLogin login;
@XmlElement(name = "CruiseDataRequest")
protected JPCruiseDataRequest cruiseDataRequest;
@XmlElement(name = "RestrictedOptions")
protected JPRestrictedOptions restrictedOptions;
@XmlAttribute(name = "Version")
protected String version;
@XmlAttribute(name = "Language")
protected String language;
/**
* Gets the value of the login property.
*
* @return
* possible object is
* {@link JPLogin }
*
*/
public JPLogin getLogin() {
return login;
}
/**
* Sets the value of the login property.
*
* @param value
* allowed object is
* {@link JPLogin }
*
*/
public void setLogin(JPLogin value) {
this.login = value;
}
/**
* Gets the value of the cruiseDataRequest property.
*
* @return
* possible object is
* {@link JPCruiseDataRequest }
*
*/
public JPCruiseDataRequest getCruiseDataRequest() {
return cruiseDataRequest;
}
/**
* Sets the value of the cruiseDataRequest property.
*
* @param value
* allowed object is
* {@link JPCruiseDataRequest }
*
*/
public void setCruiseDataRequest(JPCruiseDataRequest value) {
this.cruiseDataRequest = value;
}
/**
* Gets the value of the restrictedOptions property.
*
* @return
* possible object is
* {@link JPRestrictedOptions }
*
*/
public JPRestrictedOptions getRestrictedOptions() {
return restrictedOptions;
}
/**
* Sets the value of the restrictedOptions property.
*
* @param value
* allowed object is
* {@link JPRestrictedOptions }
*
*/
public void setRestrictedOptions(JPRestrictedOptions value) {
this.restrictedOptions = value;
}
/**
* Gets the value of the version property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getVersion() {
return version;
}
/**
* Sets the value of the version property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setVersion(String value) {
this.version = value;
}
/**
* Gets the value of the language property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLanguage() {
return language;
}
/**
* Sets the value of the language property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLanguage(String value) {
this.language = value;
}
}
|
[
"george@skamnos.com"
] |
george@skamnos.com
|
1d960520c871d0fc393051aec40d8b52d8df035d
|
62e656585f0ffd5cf572a83f28c898f945fb6228
|
/WEB-INF/src/java/tw/gov/nta/debt/form/Cira0601Form.java
|
e77d265cffc477a879bda3fded4a7064bf507739
|
[] |
no_license
|
minjindang/TAPF
|
b6a7edfb7d171665615f108e5ad4baee4e734dce
|
dd39d455c135d06211654853c8335d03771a1455
|
refs/heads/master
| 2022-09-02T04:10:10.647610
| 2015-04-24T17:20:02
| 2015-04-24T17:20:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,653
|
java
|
package tw.gov.nta.debt.form;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Expression;
import tw.gov.nta.sql.BudgetRef;
import tw.gov.nta.sql.DebitRef;
import tw.gov.nta.sql.dao.BudgetRefDAO;
import tw.gov.nta.sql.dao.DebitRefDAO;
import gov.dnt.tame.common.SupportForm;
public class Cira0601Form extends SupportForm {
private static final long serialVersionUID = 1L;
public Cira0601Form() {
super();
// TODO Auto-generated constructor stub
}
private String status;
private String startYear;
private String endYear;
private Date startDate;
private Date endDate;
private String budgetCode;
private String debtCode;
private String budgetLabel;
private String debtLabel;
private String startSerial;
private String endSerial;
private Date baseDate;
private String bankCode;
private String baseUnit;
private String baseUnitValue;
public String getBaseUnitValue() {
return baseUnitValue;
}
public void setBaseUnitValue(String baseUnitValue) {
this.baseUnitValue = baseUnitValue;
}
public String getBankCode() {
return bankCode;
}
public void setBankCode(String bankCode) {
this.bankCode = bankCode;
}
public Date getBaseDate() {
return baseDate;
}
public void setBaseDate(Date baseDate) {
this.baseDate = baseDate;
}
public String getBaseUnit() {
return baseUnit;
}
public void setBaseUnit(String baseUnit) {
this.baseUnit = baseUnit;
}
public String getBudgetCode() {
return budgetCode;
}
public void setBudgetCode(String budgetCode) {
this.budgetCode = budgetCode;
}
public String getDebtCode() {
return debtCode;
}
public void setDebtCode(String debtCode) {
this.debtCode = debtCode;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public String getEndSerial() {
return endSerial;
}
public void setEndSerial(String endSerial) {
this.endSerial = endSerial;
}
public String getEndYear() {
return endYear;
}
public void setEndYear(String endYear) {
this.endYear = endYear;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public String getStartSerial() {
return startSerial;
}
public void setStartSerial(String startSerial) {
this.startSerial = startSerial;
}
public String getStartYear() {
return startYear;
}
public void setStartYear(String startYear) {
this.startYear = startYear;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public List getBudgetList()
{
Session session = new BudgetRefDAO().getSession();
Criteria criteria = session.createCriteria(BudgetRef.class);
List myList = criteria.list();
session.close();
return myList;
}
public List getDebtCodeList()
{
Session session = new DebitRefDAO().getSession();
Criteria criteria = session.createCriteria(DebitRef.class);
List myList = new LinkedList();
if(null != getBudgetCode() && !"".equals(getBudgetCode()))
{
criteria.add(Expression.eq("budgetCode.id",Integer.parseInt(getBudgetCode())));
myList = criteria.list();
session.close();
return myList;
}
else
{
return null;
}
}
public String getBudgetLabel() {
return budgetLabel;
}
public void setBudgetLabel(String budgetLabel) {
this.budgetLabel = budgetLabel;
}
public String getDebtLabel() {
return debtLabel;
}
public void setDebtLabel(String debtLabel) {
this.debtLabel = debtLabel;
}
}
|
[
"w.illy@gmail.com"
] |
w.illy@gmail.com
|
9f5bf683e0bcc786e2792b5dd785d51d1b709216
|
4d6f449339b36b8d4c25d8772212bf6cd339f087
|
/netreflected/src/Framework/System.Data,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089/system/data/sqltypes/SqlAlreadyFilledException.java
|
f12a6e4bfa66db3b1b9550128c3a1c177d9a7691
|
[
"MIT"
] |
permissive
|
lvyitian/JCOReflector
|
299a64550394db3e663567efc6e1996754f6946e
|
7e420dca504090b817c2fe208e4649804df1c3e1
|
refs/heads/master
| 2022-12-07T21:13:06.208025
| 2020-08-28T09:49:29
| 2020-08-28T09:49:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,574
|
java
|
/*
* MIT License
*
* Copyright (c) 2020 MASES s.r.l.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**************************************************************************************
* <auto-generated>
* This code was generated from a template using JCOReflector
*
* Manual changes to this file may cause unexpected behavior in your application.
* Manual changes to this file will be overwritten if the code is regenerated.
* </auto-generated>
*************************************************************************************/
package system.data.sqltypes;
import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;
// Import section
import system.data.sqltypes.SqlTypeException;
/**
* The base .NET class managing System.Data.SqlTypes.SqlAlreadyFilledException, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. Extends {@link NetException}.
* <p>
*
* See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Data.SqlTypes.SqlAlreadyFilledException" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Data.SqlTypes.SqlAlreadyFilledException</a>
*/
public class SqlAlreadyFilledException extends SqlTypeException {
/**
* Fully assembly qualified name: System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
*/
public static final String assemblyFullName = "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
/**
* Assembly name: System.Data
*/
public static final String assemblyShortName = "System.Data";
/**
* Qualified class name: System.Data.SqlTypes.SqlAlreadyFilledException
*/
public static final String className = "System.Data.SqlTypes.SqlAlreadyFilledException";
static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName);
/**
* The type managed from JCOBridge. See {@link JCType}
*/
public static JCType classType = createType();
static JCEnum enumInstance = null;
JCObject classInstance = null;
JCNativeException jcNativeException = null;
static JCType createType() {
try {
return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName));
} catch (JCException jce) {
if (JCOBridgeInstance.getDebug())
jce.printStackTrace();
return null;
}
}
void addReference(String ref) throws Throwable {
try {
bridge.AddReference(ref);
} catch (JCNativeException jcne) {
throw translateException(jcne);
}
}
public SqlAlreadyFilledException() {
super();
}
public SqlAlreadyFilledException(Object instance) {
super(instance);
if (instance instanceof JCObject) {
classInstance = (JCObject) instance;
} else if (instance instanceof JCNativeException) {
jcNativeException = (JCNativeException) instance;
classInstance = jcNativeException.getCLRException();
}
}
public SqlAlreadyFilledException(String message) {
super(message);
}
public SqlAlreadyFilledException(NetException cause) {
super(cause);
}
public SqlAlreadyFilledException(String message, NetException cause) {
super(message, cause);
}
public String getJCOAssemblyName() {
return assemblyFullName;
}
public String getJCOClassName() {
return className;
}
public String getJCOObjectName() {
return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName);
}
public Object getJCOInstance() {
return classInstance;
}
public void setJCOInstance(JCObject instance) {
classInstance = instance;
super.setJCOInstance(classInstance);
}
public JCType getJCOType() {
return classType;
}
/**
* Try to cast the {@link IJCOBridgeReflected} instance into {@link SqlAlreadyFilledException}, a cast assert is made to check if types are compatible.
*/
public static SqlAlreadyFilledException cast(IJCOBridgeReflected from) throws Throwable {
NetType.AssertCast(classType, from);
return new SqlAlreadyFilledException(from.getJCOInstance());
}
// Constructors section
// Methods section
// Properties section
}
|
[
"mario.mastrodicasa@masesgroup.com"
] |
mario.mastrodicasa@masesgroup.com
|
d4f9081be7cd5e976e207230597887645999bdba
|
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
|
/core-java-modules/core-java-lang-2/src/main/java/com/surya/primitive/CharacterWrapperLookup.java
|
78cec38d8ec7d8fa554328e30c5f624c5fd995d3
|
[] |
no_license
|
Suryakanta97/DemoExample
|
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
|
5c6b831948e612bdc2d9d578a581df964ef89bfb
|
refs/heads/main
| 2023-08-10T17:30:32.397265
| 2021-09-22T16:18:42
| 2021-09-22T16:18:42
| 391,087,435
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 947
|
java
|
package com.surya.primitive;
import org.openjdk.jmh.annotations.*;
@State(Scope.Thread)
public class CharacterWrapperLookup extends Lookup {
private Character[] elements;
private final char pivot = 'b';
@Override
@Setup
public void prepare() {
char common = 'a';
elements = new Character[s];
for (int i = 0; i < s - 1; i++) {
elements[i] = common;
}
elements[s - 1] = pivot;
}
@Override
@TearDown
public void clean() {
elements = null;
}
@Override
@Benchmark
@BenchmarkMode(Mode.AverageTime)
public int findPosition() {
int index = 0;
Character pivotWrapper = pivot;
while (!pivotWrapper.equals(elements[index])) {
index++;
}
return index;
}
@Override
public String getSimpleClassName() {
return CharacterWrapperLookup.class.getSimpleName();
}
}
|
[
"suryakanta97@github.com"
] |
suryakanta97@github.com
|
b3cc3f7ab395e0698ab527f84bf90b107cae2d0b
|
0d96121f9ace818d8d3a92312445d9ff359df140
|
/dongjun-website-hardware/com/gdut/dongjun/domain/dao/ProtocolPortMapper.java
|
d31d5de6be04c294fc933a2a0ce90e9cc39ca186
|
[] |
no_license
|
AcceptedBoy/dongjun
|
57d84671eafa92d93a0e58b6a54cc8053ee8cd63
|
3d85602bd4ef7e52941a5dcaaa9972b49aaae4bb
|
refs/heads/master
| 2021-03-27T19:33:53.890271
| 2017-04-22T14:28:42
| 2017-04-22T14:28:42
| 58,114,745
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,578
|
java
|
package com.gdut.dongjun.domain.dao;
import com.gdut.dongjun.domain.po.ProtocolPort;
public interface ProtocolPortMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table protocol_port
*
* @mbggenerated Mon Jan 09 17:25:08 CST 2017
*/
int deleteByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table protocol_port
*
* @mbggenerated Mon Jan 09 17:25:08 CST 2017
*/
int insert(ProtocolPort record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table protocol_port
*
* @mbggenerated Mon Jan 09 17:25:08 CST 2017
*/
int insertSelective(ProtocolPort record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table protocol_port
*
* @mbggenerated Mon Jan 09 17:25:08 CST 2017
*/
ProtocolPort selectByPrimaryKey(String id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table protocol_port
*
* @mbggenerated Mon Jan 09 17:25:08 CST 2017
*/
int updateByPrimaryKeySelective(ProtocolPort record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table protocol_port
*
* @mbggenerated Mon Jan 09 17:25:08 CST 2017
*/
int updateByPrimaryKey(ProtocolPort record);
}
|
[
"394894672@qq.com"
] |
394894672@qq.com
|
fc89035229e93977c2704d25382a0346955d136d
|
b9cda73f759b80eac1d37b169c76cc90dba059a9
|
/src/day16/Count1To10.java
|
5e48a0d03964a4048bda17627e9bffc2bde7b341
|
[] |
no_license
|
musajojo/Moses_CyberTek
|
07ce383eb2bad72b9601c71bb47ff9d2bc8c6e49
|
97d8d423d454fdba6ee0ffa3b5d818a51663d97e
|
refs/heads/master
| 2020-11-28T13:59:37.913082
| 2020-06-15T03:52:02
| 2020-06-15T03:52:02
| 229,839,863
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 470
|
java
|
package day16;
public class Count1To10 {
public static void main(String[] args) {
int counter = 1;
while (counter < 11) {
System.out.println("Counter values : " + counter);
// SOMETHING HAS TO BE DONE TO CHANGE THE CONDITION ALONG THE WAY
// OR IT JUST KEEP RUNNING FOREVER
++counter;
}
}
// 10 <=10 -->> true 11 <= 10 false
// 10 < 11 -->> true 11 < 11 false
}
|
[
"58441332+musajojo@users.noreply.github.com"
] |
58441332+musajojo@users.noreply.github.com
|
06735161e517b37b7c8cbc16dd88f8649db02bf4
|
48f3f62c0dcd97820e28729385ec8e467bb6f39d
|
/src/dwz/framework/http/session/mdb/mysqldb/schedule/SessionException.java
|
e401b41de61a50ef6e70e0b83e8f0f250b388e1f
|
[] |
no_license
|
renjie120/rep
|
d78277628fb1c45ffbc20dde9a73edd6f6589ad1
|
d1c47353d60b0592229b7294c1283398e5934e0d
|
refs/heads/master
| 2021-01-23T18:11:41.311688
| 2014-06-17T10:46:00
| 2014-06-17T10:46:00
| 19,456,996
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 615
|
java
|
package dwz.framework.http.session.mdb.mysqldb.schedule;
public class SessionException extends Exception{
/**
*
*/
private static final long serialVersionUID = -287101386532361208L;
public SessionException() {
// TODO Auto-generated constructor stub
}
public SessionException(String message) {
super(message);
// TODO Auto-generated constructor stub
}
public SessionException(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
public SessionException(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
}
|
[
"lishuiqing110@163.com"
] |
lishuiqing110@163.com
|
b735cc5958127912e1e0065d763533fdd2eb47bd
|
7e24a8d22ed0bce7e3a290130a7def76f53a5378
|
/urtruck/com.urt.service/src/main/java/com/urt/Ability/unicom/vo/GetNetworkAccessConfigResponse.java
|
4857cc27078735f9b7680ac91c03d21beddedf4c
|
[
"Apache-2.0"
] |
permissive
|
tenchoo/URTrack
|
4b036e1e23af8c28afd1a381a950c4bc455dc00e
|
3ac0b03b3a0359b51d6bd794629cf9b27191976c
|
refs/heads/master
| 2021-07-02T13:13:52.814514
| 2017-09-23T14:09:50
| 2017-09-23T14:09:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,128
|
java
|
package com.urt.Ability.unicom.vo;
import java.io.Serializable;
import java.util.List;
public class GetNetworkAccessConfigResponse extends WsResponse implements
Serializable {
private static final long serialVersionUID = 22364638247352987L;
private String correlationId;
private String version;
private String build;
private String timestamp;
private List<AccessConfig> list;
public static long getSerialversionuid() {
return serialVersionUID;
}
public String getCorrelationId() {
return correlationId;
}
public void setCorrelationId(String correlationId) {
this.correlationId = correlationId;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getBuild() {
return build;
}
public void setBuild(String build) {
this.build = build;
}
public String getTimestamp() {
return timestamp;
}
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}
public List<AccessConfig> getList() {
return list;
}
public void setList(List<AccessConfig> list) {
this.list = list;
}
}
|
[
"519344289@qq.com"
] |
519344289@qq.com
|
bf2ba5f49ef9c832bbe49366b8c758607b7ebb3d
|
c6aa94983f3c8f82954463af3972ae06b30396a7
|
/microservice_platform/zlt-commons/zlt-common-core/src/main/java/com/central/common/annotation/LoginClient.java
|
46705257f0544778a18d5c67bd0a6ba0754478f4
|
[
"Apache-2.0"
] |
permissive
|
dobulekill/jun_springcloud
|
f01358caacb1b04f57908dccc6432d0a5e17745e
|
33248f65301741ed97a24b978a5c22d5d6c052fb
|
refs/heads/master
| 2023-01-24T13:24:59.282130
| 2020-11-25T17:30:47
| 2020-11-25T17:30:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 393
|
java
|
package com.central.common.annotation;
import java.lang.annotation.*;
/**
* 请求的方法参数上添加该注解,则注入当前登录账号的应用id
* 例:public void test(@LoginClient String clientId) //注入webApp
*
* @author Wujun
* @date 2018/7/24 16:44
*/
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface LoginClient {
}
|
[
"wujun728@hotmail.com"
] |
wujun728@hotmail.com
|
ac923e1fd2ca539ed5cae88fcbc22ee722c45e00
|
cccf3a9983452bfda5bff3e5c49eae47fbde467d
|
/src/main/java/com/google/devtools/build/lib/actions/BuildConfigurationEvent.java
|
96fd9cba38c5057fbfaf958ab06ceda4b12992ab
|
[
"Apache-2.0"
] |
permissive
|
Corroler/bazel
|
14756284e7dad5bf6eea1056d5858e3d9286d9e3
|
073ea095a6c6a826ccdbbce1b213de47115e701a
|
refs/heads/master
| 2020-03-10T07:55:03.529634
| 2018-04-12T15:07:30
| 2018-04-12T15:09:01
| 129,273,658
| 1
| 0
|
Apache-2.0
| 2018-04-12T15:35:53
| 2018-04-12T15:35:53
| null |
UTF-8
|
Java
| false
| false
| 2,344
|
java
|
// Copyright 2018 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.devtools.build.lib.actions;
import com.google.common.collect.ImmutableList;
import com.google.devtools.build.lib.buildeventstream.BuildEvent;
import com.google.devtools.build.lib.buildeventstream.BuildEventConverters;
import com.google.devtools.build.lib.buildeventstream.BuildEventId;
import com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos;
import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
import java.util.Collection;
import java.util.Objects;
/**
* Encapsulation of {@link BuildEvent} info associated with a {@link
* com.google.devtools.build.lib.analysis.config.BuildConfiguration}.
*/
@AutoCodec
public class BuildConfigurationEvent implements BuildEvent {
private final BuildEventId eventId;
private final BuildEventStreamProtos.BuildEvent eventProto;
public BuildConfigurationEvent(
BuildEventId eventId, BuildEventStreamProtos.BuildEvent eventProto) {
this.eventId = eventId;
this.eventProto = eventProto;
}
@Override
public BuildEventStreamProtos.BuildEvent asStreamProto(BuildEventConverters unusedConverters) {
return eventProto;
}
@Override
public BuildEventId getEventId() {
return eventId;
}
@Override
public Collection<BuildEventId> getChildrenEvents() {
return ImmutableList.of();
}
@Override
public boolean equals(Object other) {
if (!(other instanceof BuildConfigurationEvent)) {
return false;
}
BuildConfigurationEvent that = (BuildConfigurationEvent) other;
return Objects.equals(eventId, that.eventId) && Objects.equals(eventProto, that.eventProto);
}
@Override
public int hashCode() {
return Objects.hash(eventId, eventProto);
}
}
|
[
"copybara-piper@google.com"
] |
copybara-piper@google.com
|
c29e23ce36e621a1347b95246576620d5175eb98
|
f76aa89301ce9ad77c8023caaa5470ed4b902975
|
/src/main/java/com/xmbl/ops/controller/tree/StageTreeController.java
|
6b47fde8b007ca2f09a1b728159c3ba663886172
|
[
"Apache-2.0"
] |
permissive
|
noseparte/wxAuthServer
|
44633dce0697d3fe6f008ca4cde18e25b5a3ba7b
|
6a5c8d37e08a2be8bba798ef12e09341691e0cdc
|
refs/heads/master
| 2020-04-08T22:46:09.954767
| 2018-12-04T10:06:29
| 2018-12-04T10:06:29
| 159,799,652
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,873
|
java
|
package com.xmbl.ops.controller.tree;
import java.util.List;
import java.util.Objects;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;
import com.googlecode.protobuf.format.JsonFormat;
import com.xmbl.ops.controller.AbstractController;
import com.xmbl.ops.dto.ResponseResult;
import com.xmbl.ops.entity.tree.base.StageTreeRes;
import com.xmbl.ops.entity.tree.base.StageTreeShop;
import com.xmbl.ops.entity.tree.base.TreeCover;
import com.xmbl.ops.entity.tree.local.NodeLocalInfo;
import com.xmbl.ops.entity.tree.local.PanelLocalInfo;
import com.xmbl.ops.entity.tree.local.TreeLocalInfo;
import com.xmbl.ops.logic.TreeFactory;
import com.xmbl.ops.service.StageTreeService;
@RestController
@RequestMapping("/stage/tree")
@CrossOrigin(origins = "*", maxAge = 3600)
public class StageTreeController extends AbstractController {
private static final Logger logger = LoggerFactory.getLogger(StageTreeController.class);
@Autowired
private StageTreeService stageTreeService;
@RequestMapping("/covers")
public ResponseResult getTrees() {
List<TreeCover> treeInfos = stageTreeService.geTreeCovers();
logger.info(treeInfos.toString());
return successJson("", JSONObject.toJSONString(treeInfos));
}
@RequestMapping("/info")
public ResponseResult getTree(@RequestParam(name = "treeId", required = false) long treeId) {
if (treeId <= 0) {
return errorJson("关卡集ID不能为空");
}
StageTreeShop stageTree = stageTreeService.getStageTree(treeId);
logger.info(JSONObject.toJSONString(stageTree));
// TreeLocalInfo treeLocalInfo = stageTreeService.getTreeLocalInfo(treeId);
return successJson("", stageTree);
}
@RequestMapping("/res")
public ResponseResult getStageTreeRes(@RequestParam(name = "treeId", required = false) long treeId,
@RequestParam(name = "nodeId", required = false) long nodeId,
@RequestParam(name = "index", required = false) long index,
@RequestParam(name = "stageId", required = false) long stageId) {
if (treeId <= 0) {
return errorJson("关卡集ID不能为空");
}
if (stageId <= 0) {
return errorJson("ID不能为空");
}
StageTreeRes res = stageTreeService.getStageTreeRes(treeId, stageId);
String jsonString = JsonFormat.printToString(res.transfer());
JSONObject jsonObject = JSONObject.parseObject(jsonString);
JSONObject parent = new JSONObject();
parent.put("Stage", jsonObject);
return successJson("", parent);
}
@RequestMapping("/local/treeinfo")
public ResponseResult getTreeLocalInfo(@RequestParam(name = "treeId", required = false) long treeId) {
TreeLocalInfo info = stageTreeService.getTreeLocalInfo(treeId);
if (Objects.nonNull(info)) {
info = TreeFactory.createTreeLocalInfo(treeId);
stageTreeService.saveTreeLocalInfo(info);
}
return successJson("", info);
}
@RequestMapping("/local/nodeinfo")
public ResponseResult getNodeLocalInfo(@RequestParam(name = "treeId", required = false) long treeId,
@RequestParam(name = "nodeId", required = false) long nodeId) {
NodeLocalInfo info = stageTreeService.getNodeLocalInfo(treeId, nodeId);
if (Objects.nonNull(info)) {
info = TreeFactory.createNodeLocalInfo(treeId, nodeId);
stageTreeService.saveNodeLocalInfo(info);
}
return successJson("", info);
}
@RequestMapping("/local/panelinfo")
public ResponseResult getPanelLocalInfo(@RequestParam(name = "treeId", required = false) long treeId,
@RequestParam(name = "nodeId", required = false) long nodeId,
@RequestParam(name = "stageId", required = false) long stageId,
@RequestParam(name = "index", required = false) int index) {
PanelLocalInfo info = stageTreeService.getPanelLocalInfo(treeId, nodeId, index);
if (Objects.nonNull(info)) {
info = TreeFactory.createPanelLocalInfo(treeId, nodeId, stageId, index);
stageTreeService.savePanelLocalInfo(info);
}
return successJson("", info);
}
@RequestMapping("/treeRank")
public ResponseResult getTreeRank(@RequestParam(name = "treeId", required = false) long treeId) {
return null;
}
@RequestMapping("/nodeRank")
public ResponseResult getTreeNodeRank(@RequestParam(name = "treeId", required = false) long treeId,
@RequestParam(name = "nodeId", required = false) long nodeId) {
return null;
}
@RequestMapping("/stageRank")
public ResponseResult getTreeStageRank(@RequestParam(name = "treeId", required = false) long treeId,
@RequestParam(name = "nodeId", required = false) long nodeId,
@RequestParam(name = "stageId", required = false) long stageId) {
return null;
}
}
|
[
"noseparte@aliyun.com"
] |
noseparte@aliyun.com
|
4b5aa4c4d20e498311ef009504317bc217ee4d81
|
7635a9702631c2d75926fb51f9475e65ae5692a1
|
/MustDos/src/main/java/org/redquark/ramanujan/mustdos/_027KadaneAlgorithm.java
|
7578966b8958681caede367e62979a18c385d5d1
|
[
"MIT"
] |
permissive
|
ani03sha/Project-Ramanujan
|
8d3c09bc9b9be624ce7cd97ee7a9b11cf6eb8f18
|
293b1f440cbc32d114c289158fa5f0444585f3cc
|
refs/heads/master
| 2020-07-15T10:32:39.677430
| 2020-02-21T17:13:37
| 2020-02-21T17:13:37
| 205,543,926
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 608
|
java
|
package org.redquark.ramanujan.mustdos;
/**
* Write an efficient program to find the sum of contiguous subarray within a
* one-dimensional array of numbers which has the largest sum.
*
* @author Anirudh Sharma
*
*/
public class _027KadaneAlgorithm {
public int findMaxSumSubArray(int[] a) {
// Maximum sum so far
int maxSoFar = a[0];
// Current maximum
int currentMax = a[0];
// Loop for the remaining elements in the array
for (int i = 1; i < a.length; i++) {
currentMax = Math.max(a[i], currentMax + a[i]);
maxSoFar = Math.max(currentMax, maxSoFar);
}
return maxSoFar;
}
}
|
[
"anirudh03sharma@gmail.com"
] |
anirudh03sharma@gmail.com
|
fde0202bb70c13bdd1160d21b4ae076ac7514692
|
5479e441b1430b5301298119b3ad637b5e9a9a9a
|
/openapi-sdk-core/src/main/java/com/yiji/openapi/sdk/exception/ApiMessageCheckException.java
|
e5c36c4a1c138e68f184411456ee0338b47119ce
|
[] |
no_license
|
weichk/yiji-sdk
|
4e3c0252a10eec91c6f14220994e9be903b68317
|
7715e3feabb3aef32ea8ee0103cafa774204d928
|
refs/heads/master
| 2022-12-22T12:47:16.898108
| 2019-06-20T07:56:23
| 2019-06-20T07:56:23
| 192,875,193
| 0
| 0
| null | 2022-12-15T23:31:31
| 2019-06-20T07:53:07
|
Java
|
UTF-8
|
Java
| false
| false
| 638
|
java
|
/*
* acooly.cn Inc.
* Copyright (c) 2016 All Rights Reserved.
* create by zhike@yiji.com
* date:2016年4月30日
*
*/
package com.yiji.openapi.sdk.exception;
/**
* @author zhike@yiji.com
*/
public class ApiMessageCheckException extends ApiClientException {
/** serialVersionUID */
private static final long serialVersionUID = 2231458792189656760L;
/**
* @param message
*/
public ApiMessageCheckException(String message) {
super(message);
}
/**
* @param message
*/
public ApiMessageCheckException(String propertyName, String message) {
super("参数" + propertyName + "校验未通过:" + message);
}
}
|
[
"539603511@qq.com"
] |
539603511@qq.com
|
0a72705084f7582f3de42637829a3457e7b6431c
|
3953a0fdfc7da2b47b81c48df0a398850f17da4a
|
/src/main/java/br/inf/portalfiscal/xsd/cte/consReciCTeTiposBasico_v300/TUf.java
|
f58d0d2e1e5a878380959141baaf2d5b6fdba01e
|
[] |
no_license
|
tlmacedo/xsd_Nfe_Cte
|
83d34088ad063e04906c6c910ac4d501d560d65d
|
6b3eea5027cf2927323c4247c7c3c7a3349c8be0
|
refs/heads/main
| 2023-01-27T14:58:48.453452
| 2020-12-02T22:53:14
| 2020-12-02T22:53:14
| 318,008,134
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,415
|
java
|
//
// Este arquivo foi gerado pela Arquitetura JavaTM para Implementaxe7xe3o de Referxeancia (JAXB) de Bind XML, v2.3.1-b171012.0423
// Consulte <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
// Todas as modificaxe7xf5es neste arquivo serxe3o perdidas apxf3s a recompilaxe7xe3o do esquema de origem.
// Gerado em: 2020.06.27 xe0s 02:46:36 PM AMT
//
package br.inf.portalfiscal.xsd.cte.consReciCTeTiposBasico_v300;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Classe Java de TUf.
*
* <p>O seguinte fragmento do esquema especifica o contexFAdo esperado contido dentro desta classe.
* <p>
* <pre>
* <simpleType name="TUf">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <whiteSpace value="preserve"/>
* <enumeration value="AC"/>
* <enumeration value="AL"/>
* <enumeration value="AM"/>
* <enumeration value="AP"/>
* <enumeration value="BA"/>
* <enumeration value="CE"/>
* <enumeration value="DF"/>
* <enumeration value="ES"/>
* <enumeration value="GO"/>
* <enumeration value="MA"/>
* <enumeration value="MG"/>
* <enumeration value="MS"/>
* <enumeration value="MT"/>
* <enumeration value="PA"/>
* <enumeration value="PB"/>
* <enumeration value="PE"/>
* <enumeration value="PI"/>
* <enumeration value="PR"/>
* <enumeration value="RJ"/>
* <enumeration value="RN"/>
* <enumeration value="RO"/>
* <enumeration value="RR"/>
* <enumeration value="RS"/>
* <enumeration value="SC"/>
* <enumeration value="SE"/>
* <enumeration value="SP"/>
* <enumeration value="TO"/>
* <enumeration value="EX"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "TUf")
@XmlEnum
public enum TUf {
AC,
AL,
AM,
AP,
BA,
CE,
DF,
ES,
GO,
MA,
MG,
MS,
MT,
PA,
PB,
PE,
PI,
PR,
RJ,
RN,
RO,
RR,
RS,
SC,
SE,
SP,
TO,
EX;
public String value() {
return name();
}
public static TUf fromValue(String v) {
return valueOf(v);
}
}
|
[
"tl.macedo@hotmail.com"
] |
tl.macedo@hotmail.com
|
43dac6e5547b712aef46702f84674a7e1bf84745
|
e75be673baeeddee986ece49ef6e1c718a8e7a5d
|
/submissions/blizzard/Corpus/eclipse.jdt.ui/10273.java
|
457fa91b14f90c1e71572d955ea04ecadae3d57e
|
[
"MIT"
] |
permissive
|
zhendong2050/fse18
|
edbea132be9122b57e272a20c20fae2bb949e63e
|
f0f016140489961c9e3c2e837577f698c2d4cf44
|
refs/heads/master
| 2020-12-21T11:31:53.800358
| 2018-07-23T10:10:57
| 2018-07-23T10:10:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,606
|
java
|
/*******************************************************************************
* Copyright (c) 2009 SpringSource and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andrew Eisenberg - initial API and implementation
* Andrew Eisenberg <andrew@eisenberg.as> - [JUnit] Rerun failed first does not work with JUnit4 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=140392
*******************************************************************************/
package org.eclipse.jdt.internal.junit4.runner;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Set;
import org.junit.runner.Description;
/**
* Comparator for descriptions to sort according to inclusion in a failure list.
* A description is considered to have failures if its name or one of its transitive
* children's names are in the failures list.
* If neither or both have failures, returns 0.
*
* @since 3.6
*/
public class FailuresFirstSorter implements Comparator<Description> {
private final Set<String> failuresList;
/**
* Creates a sorter.
*
* @param failuresList list of failed tests based on the description's display string
*/
public FailuresFirstSorter(String[] failuresList) {
this.failuresList = new HashSet<String>(Arrays.asList(failuresList));
}
/**
* Compares two descriptions based on the failure list.
* @param d1 the first Description to compare with
* @param d2 the second Description to compare with
* @return -1 if only d1 has failures, 1 if only d2 has failures, 0 otherwise
*/
public int compare(Description d1, Description d2) {
boolean d1HasFailures = hasFailures(d1);
boolean d2HasFailures = hasFailures(d2);
if (d1HasFailures) {
return -1;
} else if (d2HasFailures) {
return 1;
} else // ((d1HasFailures && d2HasFailures) || (!d1HasFailures && !d2HasFailures))
{
return 0;
}
}
private boolean hasFailures(Description d) {
if (failuresList.contains(d.getDisplayName())) {
return true;
} else {
for (Description child : d.getChildren()) {
if (hasFailures(child)) {
return true;
}
}
}
return false;
}
}
|
[
"tim.menzies@gmail.com"
] |
tim.menzies@gmail.com
|
ee2a1651b1e0093ccff6e928a6932460b576bfe1
|
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
|
/regularexpress/home/weilaidb/work/app/hadoop-2.7.3-src/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/timeline/webapp/CrossOriginFilterInitializer.java
|
948512c1eda8ae92ca9c056a1f4e67f5bcec539d
|
[] |
no_license
|
weilaidb/PythonExample
|
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
|
798bf1bdfdf7594f528788c4df02f79f0f7827ce
|
refs/heads/master
| 2021-01-12T13:56:19.346041
| 2017-07-22T16:30:33
| 2017-07-22T16:30:33
| 68,925,741
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 378
|
java
|
package org.apache.hadoop.yarn.server.timeline.webapp;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.http.FilterContainer;
import org.apache.hadoop.security.HttpCrossOriginFilterInitializer;
import org.apache.hadoop.security.http.CrossOriginFilter;
import java.util.Map;
public class CrossOriginFilterInitializer extends HttpCrossOriginFilterInitializer
|
[
"weilaidb@localhost.localdomain"
] |
weilaidb@localhost.localdomain
|
26c6a2c303153000e6ea9930c9c3c9bfd3e56fb3
|
e8f7a323c46dd047460d9db5a899d1917f0dd332
|
/jbpm-designer-vdml/jbpm-designer-vdml-backend/src/main/java/org/jbpm/designer/vdml/VDMLRoleCollaborationOrphanFilter.java
|
5f8cc4181d9c1b486c8ae1567e656a2688395b38
|
[] |
no_license
|
ifu-lobuntu/jbpm-designer-extensions
|
cc1e67366ea23bf4b7129730c502868a5f5e2035
|
8166cb1064b4e830d04346381f441a2e9830219d
|
refs/heads/master
| 2020-12-21T21:02:46.439177
| 2016-08-07T07:38:16
| 2016-08-07T07:38:16
| 31,703,967
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,115
|
java
|
package org.jbpm.designer.vdml;
import org.jbpm.designer.vdml.AbstractVdmlJsonEmfHelper.OrphanFilter;
import org.omg.vdml.Collaboration;
import org.omg.vdml.DeliverableFlow;
import org.omg.vdml.Role;
import org.omg.vdml.VdmlElement;
public class VDMLRoleCollaborationOrphanFilter implements OrphanFilter {
@Override
public boolean shouldHaveDiagramElement(VdmlElement e) {
if (e instanceof DeliverableFlow) {
DeliverableFlow d = (DeliverableFlow) e;
Collaboration owningCollaboration = (Collaboration) e.eContainer();
Role providingRole = VdmlHelper.getRoleResponsibleFor(d.getProvider());
if (providingRole != null && owningCollaboration.getCollaborationRole().contains(providingRole)) {
Role receivingRole = VdmlHelper.getRoleResponsibleFor(d.getRecipient());
if (receivingRole != null && owningCollaboration.getCollaborationRole().contains(receivingRole)) {
return receivingRole!=providingRole;
}
}
return false;
}
return true;
}
}
|
[
"ampieb@gmail.com"
] |
ampieb@gmail.com
|
db90e7b565f5dc401d8338126e754106399a265a
|
642323b88f6a3f9050d3ce297b80c02715ba08db
|
/Java OOP Basics/Polymorphism/src/shapes/Circle.java
|
e74727a1fee8bf1c869ff4e8b2b21c6cc3415009
|
[] |
no_license
|
VenelinBakalov/javaAdvanced
|
5a9e418c6666f85fe8a8d1e65d587a863af367b9
|
d890a84fa56af2e24669e60f48f6d776cf55e9ef
|
refs/heads/master
| 2021-01-11T21:07:45.912758
| 2017-12-03T15:39:27
| 2017-12-03T15:39:27
| 79,252,307
| 8
| 8
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 663
|
java
|
package shapes;
/**
* Created by Venelin on 3.3.2017 г..
*/
public class Circle extends Shape{
private Double radius;
public Circle(Double radius) {
this.setRadius(radius);
this.calculateArea();
this.calculatePerimeter();
}
@Override
public void calculatePerimeter() {
super.setPerimeter(2 * Math.PI * this.getRadius());
}
@Override
public void calculateArea() {
super.setArea(Math.PI * this.getRadius() * this.getRadius());
}
private final Double getRadius() {
return radius;
}
private void setRadius(Double radius) {
this.radius = radius;
}
}
|
[
"venelin_bakalov@abv.bg"
] |
venelin_bakalov@abv.bg
|
5bef3afaf6bd5ccc17ef489bc26a1a73fa5b6215
|
6a5e1c7fd25e38251c19b74ab719f659d767c416
|
/engine/src/main/java/org/apache/hop/trans/steps/mappingoutput/MappingOutputMeta.java
|
c7d74183b7dfdc5f816248237bae3fe5ae58fd32
|
[
"Apache-2.0"
] |
permissive
|
marciojv/hopOLD
|
d734576991460ee9275602a505a4d806c166b1a3
|
461d0608069fd5c66ac3113ca03f94417353a0c4
|
refs/heads/master
| 2022-04-13T23:14:29.027246
| 2020-04-08T17:19:13
| 2020-04-08T17:19:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,467
|
java
|
/*! ******************************************************************************
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2018 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************/
package org.apache.hop.trans.steps.mappingoutput;
import org.apache.hop.core.CheckResult;
import org.apache.hop.core.CheckResultInterface;
import org.apache.hop.core.exception.HopStepException;
import org.apache.hop.core.row.RowMetaInterface;
import org.apache.hop.core.row.ValueMetaInterface;
import org.apache.hop.core.variables.VariableSpace;
import org.apache.hop.i18n.BaseMessages;
import org.apache.hop.metastore.api.IMetaStore;
import org.apache.hop.trans.Trans;
import org.apache.hop.trans.TransMeta;
import org.apache.hop.trans.step.BaseStepMeta;
import org.apache.hop.trans.step.StepDataInterface;
import org.apache.hop.trans.step.StepInterface;
import org.apache.hop.trans.step.StepMeta;
import org.apache.hop.trans.step.StepMetaInterface;
import org.apache.hop.trans.steps.mapping.MappingValueRename;
import java.util.ArrayList;
import java.util.List;
/*
* Created on 02-jun-2003
*
*/
public class MappingOutputMeta extends BaseStepMeta implements StepMetaInterface {
private static Class<?> PKG = MappingOutputMeta.class; // for i18n purposes, needed by Translator2!!
private volatile List<MappingValueRename> inputValueRenames;
private volatile List<MappingValueRename> outputValueRenames;
public MappingOutputMeta() {
super(); // allocate BaseStepMeta
inputValueRenames = new ArrayList<MappingValueRename>();
inputValueRenames = new ArrayList<MappingValueRename>();
}
public Object clone() {
MappingOutputMeta retval = (MappingOutputMeta) super.clone();
return retval;
}
public void allocate( int nrfields ) {
}
public void setDefault() {
int nrfields = 0;
allocate( nrfields );
}
public void getFields( RowMetaInterface r, String name, RowMetaInterface[] info, StepMeta nextStep,
VariableSpace space, IMetaStore metaStore ) throws HopStepException {
// It's best that this method doesn't change anything by itself.
// Eventually it's the Mapping step that's going to tell this step how to behave meta-data wise.
// It is the mapping step that tells the mapping output step what fields to rename.
//
if ( inputValueRenames != null ) {
for ( MappingValueRename valueRename : inputValueRenames ) {
ValueMetaInterface valueMeta = r.searchValueMeta( valueRename.getTargetValueName() );
if ( valueMeta != null ) {
valueMeta.setName( valueRename.getSourceValueName() );
}
}
}
// This is the optionally entered stuff in the output tab of the mapping dialog.
//
if ( outputValueRenames != null ) {
for ( MappingValueRename valueRename : outputValueRenames ) {
int valueMetaRenameIndex = r.indexOfValue( valueRename.getSourceValueName() );
if ( valueMetaRenameIndex >= 0 ) {
ValueMetaInterface valueMetaRename = r.getValueMeta( valueMetaRenameIndex ).clone();
valueMetaRename.setName( valueRename.getTargetValueName() );
// must maintain the same columns order. Noticed when implementing the Mapping step in AEL (BACKLOG-23372)
r.removeValueMeta( valueMetaRenameIndex );
r.addValueMeta( valueMetaRenameIndex, valueMetaRename );
}
}
}
}
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
IMetaStore metaStore ) {
CheckResult cr;
if ( prev == null || prev.size() == 0 ) {
cr =
new CheckResult( CheckResultInterface.TYPE_RESULT_WARNING, BaseMessages.getString(
PKG, "MappingOutputMeta.CheckResult.NotReceivingFields" ), stepMeta );
remarks.add( cr );
} else {
cr =
new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(
PKG, "MappingOutputMeta.CheckResult.StepReceivingDatasOK", prev.size() + "" ), stepMeta );
remarks.add( cr );
}
// See if we have input streams leading to this step!
if ( input.length > 0 ) {
cr =
new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(
PKG, "MappingOutputMeta.CheckResult.StepReceivingInfoFromOtherSteps" ), stepMeta );
remarks.add( cr );
} else {
cr =
new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString(
PKG, "MappingOutputMeta.CheckResult.NoInputReceived" ), stepMeta );
remarks.add( cr );
}
}
public StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,
Trans trans ) {
return new MappingOutput( stepMeta, stepDataInterface, cnr, tr, trans );
}
public StepDataInterface getStepData() {
return new MappingOutputData();
}
/**
* @return the inputValueRenames
*/
public List<MappingValueRename> getInputValueRenames() {
return inputValueRenames;
}
/**
* @param inputValueRenames the inputValueRenames to set
*/
public void setInputValueRenames( List<MappingValueRename> inputValueRenames ) {
this.inputValueRenames = inputValueRenames;
}
/**
* @return the outputValueRenames
*/
public List<MappingValueRename> getOutputValueRenames() {
return outputValueRenames;
}
/**
* @param outputValueRenames the outputValueRenames to set
*/
public void setOutputValueRenames( List<MappingValueRename> outputValueRenames ) {
this.outputValueRenames = outputValueRenames;
}
}
|
[
"mattcasters@gmail.com"
] |
mattcasters@gmail.com
|
aebaeca39ff994454870cce7c372af31263d7910
|
c2f4654ad76bb64a34eaa9950000e58b70b3acdc
|
/src/org/drip/sample/govviemc/PathVertexForwardState.java
|
c034bb2d24eca4cf2a487127934e58a9390733dd
|
[
"Apache-2.0"
] |
permissive
|
IanMadlenya/DROP
|
0a1361a1f6fd46d9dc8d9795edf04ee8f928b437
|
872d93bbae48ce071bcd9bae2b5ce1570bbbc862
|
refs/heads/master
| 2021-07-23T01:41:01.575353
| 2017-11-03T14:45:49
| 2017-11-03T14:45:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,215
|
java
|
package org.drip.sample.govviemc;
import org.drip.analytics.date.*;
import org.drip.measure.discrete.SequenceGenerator;
import org.drip.quant.common.FormatUtil;
import org.drip.service.env.EnvManager;
import org.drip.service.template.LatentMarketStateBuilder;
import org.drip.state.govvie.GovvieCurve;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/
/*!
* Copyright (C) 2017 Lakshmi Krishnamurthy
*
* This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model
* libraries targeting analysts and developers
* https://lakshmidrip.github.io/DRIP/
*
* DRIP is composed of four main libraries:
*
* - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/
* - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/
* - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/
* - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/
*
* - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options,
* Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA
* Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV
* Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM
* Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics.
*
* - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy
* Incorporator, Holdings Constraint, and Transaction Costs.
*
* - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality.
*
* - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning.
*
* 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.
*/
/**
* PathVertexForwardState demonstrates the Simulations of the Forward Govvie State at Paths and Vertexes.
*
* @author Lakshmi Krishnamurthy
*/
public class PathVertexForwardState {
private static final GovvieCurve GovvieCurve (
final JulianDate dtSpot,
final String strCode,
final String[] astrTenor,
final double[] adblCoupon,
final double[] adblYield)
throws Exception
{
JulianDate[] adtMaturity = new JulianDate[astrTenor.length];
JulianDate[] adtEffective = new JulianDate[astrTenor.length];
for (int i = 0; i < astrTenor.length; ++i) {
adtEffective[i] = dtSpot;
adtMaturity[i] = dtSpot.addTenor (astrTenor[i]);
}
return LatentMarketStateBuilder.GovvieCurve (
strCode,
dtSpot,
adtEffective,
adtMaturity,
adblCoupon,
adblYield,
"Yield",
LatentMarketStateBuilder.SHAPE_PRESERVING
);
}
public static final void main (
final String[] astrArgs)
throws Exception
{
EnvManager.InitEnv ("");
JulianDate dtSpot = DateUtil.CreateFromYMD (
2017,
DateUtil.MARCH,
24
);
int iNumPath = 50;
double dblVolatility = 0.10;
String strTreasuryCode = "UST";
String[] astrTenor = new String[] {
"01Y",
"02Y",
"03Y",
"05Y",
"07Y",
"10Y",
"20Y",
"30Y"
};
double[] adblTreasuryCoupon = new double[] {
0.0100,
0.0100,
0.0125,
0.0150,
0.0200,
0.0225,
0.0250,
0.0300
};
double[] adblTreasuryYield = new double[] {
0.0083, // 1Y
0.0122, // 2Y
0.0149, // 3Y
0.0193, // 5Y
0.0227, // 7Y
0.0248, // 10Y
0.0280, // 20Y
0.0308 // 30Y
};
int iNumTreasury = adblTreasuryYield.length;
GovvieCurve[] aGC = new GovvieCurve[iNumPath + 1];
aGC[0] = GovvieCurve (
dtSpot,
strTreasuryCode,
astrTenor,
adblTreasuryCoupon,
adblTreasuryYield
);
double[] adblWanderer = SequenceGenerator.Gaussian (iNumPath);
for (int iPath = 0; iPath < iNumPath; ++iPath) {
double[] adblPathTreasuryYield = new double[iNumTreasury];
double dblWanderFactor = (1. + dblVolatility * adblWanderer[iPath]);
for (int iTreasury = 0; iTreasury < iNumTreasury; ++iTreasury)
adblPathTreasuryYield[iTreasury] = adblTreasuryYield[iTreasury] * dblWanderFactor;
aGC[iPath + 1] = GovvieCurve (
dtSpot,
strTreasuryCode,
astrTenor,
adblTreasuryCoupon,
adblPathTreasuryYield
);
}
for (int iPath = 0; iPath <= iNumPath; ++iPath) {
String strDump = "\t[" + FormatUtil.FormatDouble (iPath, 3, 0, 1.) + "] => ";
for (int iTreasury = 0; iTreasury < iNumTreasury; ++iTreasury)
strDump = strDump + FormatUtil.FormatDouble (aGC[iPath].yield (astrTenor[iTreasury]), 1, 3, 100.) + "% |";
System.out.println (strDump + "|");
}
}
}
|
[
"lakshmi7977@gmail.com"
] |
lakshmi7977@gmail.com
|
d703c06493d6ac08aa3264150ae5d4ff54a3e205
|
740d8206a3750eb9d029803ad18f693f23f40fb8
|
/src/main/java/ch/bergturbenthal/home/security/AnnotationBasedViewAccessControl.java
|
6c17ef73f65de7e3a0dd46de63fcb2257ee9bc8f
|
[] |
no_license
|
koa/wall-menu
|
aa6b03d8573ad03cae25540ae1cec3605d44db33
|
6d28467c3643440996004298cc26895190e213ef
|
refs/heads/master
| 2020-03-18T13:07:08.927517
| 2018-05-24T19:45:47
| 2018-05-24T19:45:47
| 134,761,539
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,449
|
java
|
package ch.bergturbenthal.home.security;
import java.util.Set;
import java.util.stream.Collectors;
import javax.annotation.security.RolesAllowed;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import com.vaadin.spring.access.ViewAccessControl;
import com.vaadin.ui.UI;
@Component
public class AnnotationBasedViewAccessControl implements ViewAccessControl {
@Autowired
private ObjectFactory<AuthenticatedUser> currentUserFactory;
@Autowired
private ApplicationContext applicationContext;
@Override
public boolean isAccessGranted(final UI ui, final String beanName) {
final Class<?> viewClass = applicationContext.getType(beanName);
if (viewClass.isAnnotationPresent(RolesAllowed.class)) {
final Set<String> assignedRoles = currentUserFactory.getObject().getAuthorities().stream().map(ga -> ga.getAuthority())
.collect(Collectors.toSet());
final RolesAllowed rolesAnnotation = viewClass.getAnnotation(RolesAllowed.class);
for (final String role : rolesAnnotation.value()) {
if (assignedRoles.contains(role)) {
return true;
}
}
return false;
}
return true;
}
}
|
[
"andreas.koenig@berg-turbenthal.ch"
] |
andreas.koenig@berg-turbenthal.ch
|
0466588557f5ee74867899dea7eb0c2ba3504eb9
|
24525ebc414e22380e2639876d36e6673dff9657
|
/smsweb/src/main/java/com/siloyou/jmsg/modules/sms/task/impl/SmsTaskSendDotExecutorV2.java
|
365b9100483846f06e85b1857e5c07ad6b32d393
|
[] |
no_license
|
yyf736057729/sms
|
a3b172b7b818411a22ccb7baeaeff1647c7cd106
|
02a72c7bbd712782888c3c897d5494d4052f4cc8
|
refs/heads/master
| 2020-04-22T14:19:39.377203
| 2019-02-13T04:30:02
| 2019-02-13T04:30:02
| 170,440,034
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,943
|
java
|
package com.siloyou.jmsg.modules.sms.task.impl;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.Maps;
import com.google.common.util.concurrent.RateLimiter;
import com.sanerzone.common.modules.account.utils.AccountCacheUtils;
import com.sanerzone.common.support.sequence.MsgId;
import com.sanerzone.common.support.utils.DateUtils;
import com.sanerzone.common.support.utils.JedisClusterUtils;
import com.sanerzone.common.support.utils.SystemClock;
import com.siloyou.core.common.config.Global;
import com.siloyou.core.common.utils.FstObjectSerializeUtil;
import com.siloyou.core.common.utils.SpringContextHolder;
import com.siloyou.core.common.utils.StringUtils;
import com.siloyou.core.modules.sys.utils.UserUtils;
import com.siloyou.jmsg.common.message.SmsMtMessage;
import com.siloyou.jmsg.common.utils.MQUtils;
import com.siloyou.jmsg.common.utils.PhoneUtils;
import com.siloyou.jmsg.modules.sms.dao.JmsgSmsTaskDao;
import com.siloyou.jmsg.modules.sms.entity.JmsgSmsTask;
import com.siloyou.jmsg.modules.sms.task.SmsDot2DotSendTask;
public class SmsTaskSendDotExecutorV2 implements Runnable {
public static Logger logger = LoggerFactory.getLogger(SmsTaskSendDotExecutorV2.class);
private static JmsgSmsTaskDao taskDao = SpringContextHolder.getBean(JmsgSmsTaskDao.class);
private MQUtils mQUtils = SpringContextHolder.getBean(MQUtils.class);
protected RateLimiter limiter = RateLimiter.create(20);
private String taskid;
private int version;
private int rowNumber;//记录暂停时发送条数
private int index = 0;
public SmsTaskSendDotExecutorV2(String taskid,int version,int rowNumber) {
this.taskid = taskid;
this.version = version;
this.rowNumber = rowNumber;
}
@Override
public void run() {
long startTime = System.currentTimeMillis();
logger.info("点对点短信发送任务开始执行,TASKID{},时间{}" , taskid, DateUtils.getDateTime());
try {
while(true) {
//更新状态为运行中
Map<String, String> sMap = Maps.newHashMap();
sMap.put("taskid", taskid);
Map<String,String> result = taskRunResult(sMap, index);
if("0".equals(result.get("runFlag")))break;
String userId = result.get("userId");
String smsContent = "";
int payCount = 1;
String key = AccountCacheUtils.getAmountKey("sms", userId);
//获取待发送数据
File file = new File(Global.getConfig("smsTask.phoneList.dir")+File.separator+taskid+".txt");
BufferedReader br = null;
InputStreamReader reader = null;
try{
if(!file.exists()){
doFinish(sMap);
logger.error("点对点短信批量任务发送失败,文件不存在");
break;
}
reader = new InputStreamReader(new FileInputStream(file),"UTF-8");
br = new BufferedReader(reader);
for(String line = br.readLine();line !=null;line=br.readLine()){
limiter.acquire();
index++;
if(rowNumber > 0){
if(rowNumber > index) {
continue;
}
rowNumber = 0;
}
if(index % 1000 == 0){//执行1000条
Map<String,String> resultMap = taskRunResult(sMap, index);
if("0".equals(resultMap.get("runFlag")))return;
}
String[] array = line.split(" ");
smsContent = array[1];
payCount = StringUtils.findPayCount(smsContent);
if(JedisClusterUtils.decrBy(key, payCount) < 0){//余额不足
JedisClusterUtils.incrBy(key, payCount);
sMap.put("status", "4");// 发送状态为发送完成,余额不足
sMap.put("version", "");// 发送状态为发送完成
taskDao.updateSendStatus(sMap);
logger.info("DOT2DOT-点对点短信批量任务发送结束,余额不足");
SmsDot2DotSendTask.smsDotSendExecMap.remove(taskid);// 任务执行完成
return;
}
//发送
SmsMtMessage message = new SmsMtMessage();
message.setSmsType("sms");
message.setMsgContent(smsContent);
message.setPhone(array[0]);
message.setUserid(userId); //用户ID
message.setTaskid(taskid);
message.setSpNumber("188");
message.setUserReportGateWayID("HTTP");
message.setUserReportNotify(StringUtils.isNotBlank(UserUtils.get(userId).getCallbackUrl())?"9":"0");
message.setSendTime(SystemClock.now());
message.setCstmOrderID("");
// 提交到UMT
int idx = 0;
String msgid = mQUtils.sendSmsMT("SMSUMTV1", "HTTP", message.getTaskid(), FstObjectSerializeUtil.write(message));
if(StringUtils.equals(msgid, "-1")){//失败发送SR消息
String id = new MsgId().toString();
message.setId(id);
message.setSendStatus("F0074");
message.setPayType(findPayType(userId));
Map<String,String> phoneMap = PhoneUtils.get(array[0]);
message.setPhoneType(PhoneUtils.getPhoneType(phoneMap));//运营商
message.setCityCode(PhoneUtils.getCityCode(phoneMap));//省市代码
message.setContentSize(StringUtils.findPayCount(smsContent));
msgid = mQUtils.sendSmsMT("SMSMT", "HTTP", id, FstObjectSerializeUtil.write(message));
idx = 1;
}
logger.info("TASKID:{},点对点短信发送提交队列msgid:{}, idx:{}", taskid, msgid, idx);
}
}catch(Exception e){
logger.error("点对点短信批量任务发送失败,导入数据错误",e);
}finally{
if(br != null)br.close();
if(reader != null)reader.close();
}
doFinish(sMap);//完成
break;
}
} catch (Exception e) {
logger.error("点对点批量任务发送失败",e);
}
long endTime = System.currentTimeMillis();
logger.info("点对点任务执行完成,TASKID{},结束时间{},耗时:{}}",taskid, DateUtils.getDateTime(), (endTime - startTime)/1000);
}
private void doFinish(Map<String, String> sMap) {
sMap.put("status", "3");// 发送状态为发送完成
sMap.put("version", "");// 发送状态为发送完成
taskDao.updateSendStatus(sMap);
SmsDot2DotSendTask.smsDotSendExecMap.remove(taskid);// 任务执行完成
}
/**
*
* @param map
* @param index
* @return
*/
private Map<String,String> taskRunResult(Map<String,String> map,int index){
Map<String,String> resultMap = Maps.newHashMap();
String runFlag = "1";
String userId = "";
String smsContent="";
JmsgSmsTask task = taskDao.get(taskid);// 获取任务信息
if(task != null){
userId = task.getCreateBy().getId();
smsContent = task.getSmsContent();
String sendStatus = task.getStatus();// 任务状态
if ("5".equals(sendStatus)||"9".equals(sendStatus)) {// 任务暂停 或任务停止
if(index > rowNumber)rowNumber=index;
map.put("rowNumber", String.valueOf(rowNumber));
taskDao.updateRowNumber(map);//修改暂停前发送条数
SmsDot2DotSendTask.smsDotSendExecMap.remove(taskid);// 剔除线程
runFlag = "0";
}
if ("1".equals(sendStatus) || "8".equals(sendStatus)) {// 发送状态为待发送、继续发送
map.put("status", "2");// 运行中
map.put("version",String.valueOf(version));
if(0 == taskDao.updateSendStatus(map)){
SmsDot2DotSendTask.smsDotSendExecMap.remove(taskid);// 剔除线程
runFlag = "0";
}
}
}else{
SmsDot2DotSendTask.smsDotSendExecMap.remove(taskid);// 剔除线程
runFlag="0";
}
resultMap.put("runFlag", runFlag);
resultMap.put("userId", userId);
resultMap.put("smsContent", smsContent);
return resultMap;
}
//扣费方式
private String findPayType(String userId){
return UserUtils.getPayMode(userId, "sms");
}
}
|
[
"13282810305@163.com"
] |
13282810305@163.com
|
7e337190dcc19fbc0276b284b73676503776f892
|
80207bd6ecae96a8dda1ec0577a91b2764564499
|
/jbatch/src/main/java/org/apache/batchee/container/services/executor/BoundedThreadPoolService.java
|
f6d6c8a4423226121429d2bdafabd513253dafc6
|
[
"Apache-2.0"
] |
permissive
|
apache/incubator-batchee
|
3f167e4e6c547141c0ef06137d0236ce6373ef0a
|
b070be3821ef1515bd13d792052953db48d154fe
|
refs/heads/master
| 2023-07-02T17:16:47.868640
| 2019-06-01T14:51:16
| 2019-06-01T14:51:16
| 14,135,469
| 14
| 27
|
Apache-2.0
| 2023-05-22T19:56:21
| 2013-11-05T08:00:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,239
|
java
|
/*
* Copyright 2013 International Business Machines Corp.
*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. 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.apache.batchee.container.services.executor;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class BoundedThreadPoolService extends AbstractThreadPoolService {
public static final String BOUNDED_THREADPOOL_MAX_POOL_SIZE = "BOUNDED_THREADPOOL_MAX_POOL_SIZE";
public static final String BOUNDED_THREADPOOL_MIN_POOL_SIZE = "BOUNDED_THREADPOOL_MIN_POOL_SIZE";
public static final String BOUNDED_THREADPOOL_KEEP_ALIVE_TIME = "BOUNDED_THREADPOOL_KEEP_ALIVE_TIME";
public static final String BOUNDED_THREADPOOL_QUEUE_SIZE = "BOUNDED_THREADPOOL_QUEUE_SIZE";
@Override
protected ExecutorService newExecutorService(Properties batchConfig) {
return new ThreadPoolExecutor(
getInt(batchConfig, BOUNDED_THREADPOOL_MIN_POOL_SIZE, "3"),
getInt(batchConfig, BOUNDED_THREADPOOL_MAX_POOL_SIZE, "10"),
getInt(batchConfig, BOUNDED_THREADPOOL_KEEP_ALIVE_TIME, "900"), TimeUnit.SECONDS,
new LinkedBlockingQueue<Runnable>(getInt(batchConfig, BOUNDED_THREADPOOL_QUEUE_SIZE, "4096")),
BatcheeThreadFactory.INSTANCE);
}
private static int getInt(final Properties batchConfig, final String key, final String defaultValue) {
return Integer.parseInt(batchConfig.getProperty(key, defaultValue));
}
}
|
[
"rmannibucau@apache.org"
] |
rmannibucau@apache.org
|
bff4752a1e5c187cdf2b5348a18f9321475242ca
|
97fd02f71b45aa235f917e79dd68b61c62b56c1c
|
/src/main/java/com/tencentcloudapi/tcb/v20180608/models/DescribeGraphDataResponse.java
|
b1eab9158694c723cd5f2bf11c341d943114cd0b
|
[
"Apache-2.0"
] |
permissive
|
TencentCloud/tencentcloud-sdk-java
|
7df922f7c5826732e35edeab3320035e0cdfba05
|
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
|
refs/heads/master
| 2023-09-04T10:51:57.854153
| 2023-09-01T03:21:09
| 2023-09-01T03:21:09
| 129,837,505
| 537
| 317
|
Apache-2.0
| 2023-09-13T02:42:03
| 2018-04-17T02:58:16
|
Java
|
UTF-8
|
Java
| false
| false
| 8,547
|
java
|
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.tcb.v20180608.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class DescribeGraphDataResponse extends AbstractModel{
/**
* 开始时间, 会根据数据的统计周期进行取整.
*/
@SerializedName("StartTime")
@Expose
private String StartTime;
/**
* 结束时间, 会根据数据的统计周期进行取整.
*/
@SerializedName("EndTime")
@Expose
private String EndTime;
/**
* 指标名
*/
@SerializedName("MetricName")
@Expose
private String MetricName;
/**
* 统计周期(单位秒), 当时间区间为1天内, 统计周期为5分钟; 当时间区间选择为1天以上, 15天以下, 统计周期为1小时; 当时间区间选择为15天以上, 180天以下, 统计周期为1天.
*/
@SerializedName("Period")
@Expose
private Long Period;
/**
* 有效的监控数据, 每个有效监控数据的上报时间可以从时间数组中的对应位置上获取到.
*/
@SerializedName("Values")
@Expose
private Float [] Values;
/**
* 时间数据, 标识监控数据Values中的点是哪个时间段上报的.
*/
@SerializedName("Time")
@Expose
private Long [] Time;
/**
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
@SerializedName("RequestId")
@Expose
private String RequestId;
/**
* Get 开始时间, 会根据数据的统计周期进行取整.
* @return StartTime 开始时间, 会根据数据的统计周期进行取整.
*/
public String getStartTime() {
return this.StartTime;
}
/**
* Set 开始时间, 会根据数据的统计周期进行取整.
* @param StartTime 开始时间, 会根据数据的统计周期进行取整.
*/
public void setStartTime(String StartTime) {
this.StartTime = StartTime;
}
/**
* Get 结束时间, 会根据数据的统计周期进行取整.
* @return EndTime 结束时间, 会根据数据的统计周期进行取整.
*/
public String getEndTime() {
return this.EndTime;
}
/**
* Set 结束时间, 会根据数据的统计周期进行取整.
* @param EndTime 结束时间, 会根据数据的统计周期进行取整.
*/
public void setEndTime(String EndTime) {
this.EndTime = EndTime;
}
/**
* Get 指标名
* @return MetricName 指标名
*/
public String getMetricName() {
return this.MetricName;
}
/**
* Set 指标名
* @param MetricName 指标名
*/
public void setMetricName(String MetricName) {
this.MetricName = MetricName;
}
/**
* Get 统计周期(单位秒), 当时间区间为1天内, 统计周期为5分钟; 当时间区间选择为1天以上, 15天以下, 统计周期为1小时; 当时间区间选择为15天以上, 180天以下, 统计周期为1天.
* @return Period 统计周期(单位秒), 当时间区间为1天内, 统计周期为5分钟; 当时间区间选择为1天以上, 15天以下, 统计周期为1小时; 当时间区间选择为15天以上, 180天以下, 统计周期为1天.
*/
public Long getPeriod() {
return this.Period;
}
/**
* Set 统计周期(单位秒), 当时间区间为1天内, 统计周期为5分钟; 当时间区间选择为1天以上, 15天以下, 统计周期为1小时; 当时间区间选择为15天以上, 180天以下, 统计周期为1天.
* @param Period 统计周期(单位秒), 当时间区间为1天内, 统计周期为5分钟; 当时间区间选择为1天以上, 15天以下, 统计周期为1小时; 当时间区间选择为15天以上, 180天以下, 统计周期为1天.
*/
public void setPeriod(Long Period) {
this.Period = Period;
}
/**
* Get 有效的监控数据, 每个有效监控数据的上报时间可以从时间数组中的对应位置上获取到.
* @return Values 有效的监控数据, 每个有效监控数据的上报时间可以从时间数组中的对应位置上获取到.
*/
public Float [] getValues() {
return this.Values;
}
/**
* Set 有效的监控数据, 每个有效监控数据的上报时间可以从时间数组中的对应位置上获取到.
* @param Values 有效的监控数据, 每个有效监控数据的上报时间可以从时间数组中的对应位置上获取到.
*/
public void setValues(Float [] Values) {
this.Values = Values;
}
/**
* Get 时间数据, 标识监控数据Values中的点是哪个时间段上报的.
* @return Time 时间数据, 标识监控数据Values中的点是哪个时间段上报的.
*/
public Long [] getTime() {
return this.Time;
}
/**
* Set 时间数据, 标识监控数据Values中的点是哪个时间段上报的.
* @param Time 时间数据, 标识监控数据Values中的点是哪个时间段上报的.
*/
public void setTime(Long [] Time) {
this.Time = Time;
}
/**
* Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public String getRequestId() {
return this.RequestId;
}
/**
* Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public void setRequestId(String RequestId) {
this.RequestId = RequestId;
}
public DescribeGraphDataResponse() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public DescribeGraphDataResponse(DescribeGraphDataResponse source) {
if (source.StartTime != null) {
this.StartTime = new String(source.StartTime);
}
if (source.EndTime != null) {
this.EndTime = new String(source.EndTime);
}
if (source.MetricName != null) {
this.MetricName = new String(source.MetricName);
}
if (source.Period != null) {
this.Period = new Long(source.Period);
}
if (source.Values != null) {
this.Values = new Float[source.Values.length];
for (int i = 0; i < source.Values.length; i++) {
this.Values[i] = new Float(source.Values[i]);
}
}
if (source.Time != null) {
this.Time = new Long[source.Time.length];
for (int i = 0; i < source.Time.length; i++) {
this.Time[i] = new Long(source.Time[i]);
}
}
if (source.RequestId != null) {
this.RequestId = new String(source.RequestId);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "StartTime", this.StartTime);
this.setParamSimple(map, prefix + "EndTime", this.EndTime);
this.setParamSimple(map, prefix + "MetricName", this.MetricName);
this.setParamSimple(map, prefix + "Period", this.Period);
this.setParamArraySimple(map, prefix + "Values.", this.Values);
this.setParamArraySimple(map, prefix + "Time.", this.Time);
this.setParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
|
[
"tencentcloudapi@tencent.com"
] |
tencentcloudapi@tencent.com
|
7ffd502c533b0b161bb9622601c024519d9b7353
|
c1ae5fd52f2bddb16eef64201421d6a13be4c738
|
/SigmaSI final1/src/org/ucla/sigma/controlador/ctrlWinReporteEstadisticoCita.java
|
95a4d4b6e3426f5715792349c657100c60bc4167
|
[] |
no_license
|
albertdug/SIGMAJava
|
1ecbdf14c24d6d672976b8e3d825679d0bafc72d
|
03d6727283a10789902ffe68e7e8eab70442edfb
|
refs/heads/master
| 2016-09-05T19:33:43.373250
| 2015-07-16T02:11:11
| 2015-07-16T02:11:11
| 39,170,294
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,082
|
java
|
/**
*
*/
package org.ucla.sigma.controlador;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.ucla.sigma.components.HelperDate;
import org.ucla.sigma.components.HelperFileStream;
import org.ucla.sigma.componentsjr.HelperJR;
import org.ucla.sigma.servicio.ServicioNoModel;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.Sessions;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zkplus.spring.SpringUtil;
import org.zkoss.zul.Button;
import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Datebox;
import org.zkoss.zul.Listbox;
import org.zkoss.zul.Window;
/**
* @author rafael
*
*/
public class ctrlWinReporteEstadisticoCita extends GenericForwardComposer {
// ----------------------------------------------------------------------------------------------------
private Window winReporteEstadisticoCita;
private Button btnExportar;
private Datebox dbInicio;
private Datebox dbFin;
private String rutaReporte = "/sigma/vistas/reportes/reportesJR/viewReport.zul";
private String rutaJrxml = "/sigma/vistas/reportes/reportesJR/estadisticoReferencia/estadisticoCita.jrxml";
private Map<String, Object> parametros;
private Map<String, Object> parametrosJasper;
private Button btnCancelar;
// ----------------------------------------------------------------------------------------------------
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
apagarBotones();
}
public void onClick$btnCancelar() {
dbInicio.setText(null);
dbFin.setText(null);
dbFin.setDisabled(true);
btnExportar.setDisabled(true);
}
public void onChange$dbInicio() {
dbFin.setValue(null);
dbFin.setConstraint("between "
+ HelperDate.format(dbInicio.getValue(), "yyyyMMdd")
+ " and " + HelperDate.nowFormat("yyyyMMdd"));
dbFin.setDisabled(false);
}
public void onChange$dbFin() {
btnExportar.setDisabled(false);
}
public void apagarBotones() {
btnExportar.setDisabled(true);
dbFin.setDisabled(true);
}
public void onClick$btnExportar() {
String rutaAlbosultaJrxml = Sessions.getCurrent().getWebApp()
.getRealPath(rutaJrxml);
parametros = new HashMap<String, Object>();
parametrosJasper = new HashMap<String, Object>();
parametrosJasper.put("desde", dbInicio.getValue());
parametrosJasper.put("hasta", dbFin.getValue());
parametrosJasper.put("titulo", "Frecuencia de Citas Asignadas por Servicios");
List sernotin = new ArrayList();
sernotin.add("DEF");
sernotin.add("FME");
sernotin.add("TRQ");
sernotin.add("LAB");
sernotin.add("CGL");
parametrosJasper.put("sernotin", sernotin);
parametros.put("parametrosJasper", parametrosJasper);
parametros.put("rutajrxml", rutaAlbosultaJrxml);
parametros.put("tipo", HelperJR.CONNECTION);
parametros.put("titulo", "Frecuencia de Citas Asignadas por Servicios");
Window win = (Window) Executions.createComponents(rutaReporte, null,
parametros);
win.doHighlighted();
}
}
|
[
"albertrdg@gmail.com"
] |
albertrdg@gmail.com
|
98b87227ab2a0d87413125566efa8335fd4639dc
|
a46f309d68a9e2d9026ca90357f1c947cbf043ff
|
/java_01/src/day24/Test02.java
|
1f1048c54626b541759abbf1fc573c0fc92505c5
|
[] |
no_license
|
aaaaaandohee/bit_java
|
e84322927340f48647f372b17616a0ac62b86717
|
9a2a85f071890ec14cf7766656dabc850ea29fe1
|
refs/heads/master
| 2022-01-20T16:30:55.622591
| 2019-08-27T05:10:14
| 2019-08-27T05:10:14
| 201,861,788
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,147
|
java
|
package day24;
public class Test02 {
public static void main(String[] args) {
System.out.println(" -- main start -- ");
MyStack stack = new MyStack();
Push job1 = new Push(stack);
Pop job2 = new Pop(stack);
Thread push = new Thread(job1, "push");
Thread pop = new Thread(job2, "pop");
push.start();
pop.start();
System.out.println(" -- main end -- ");
}
}
class Pop implements Runnable{
MyStack stack;
public Pop() { }
public Pop(MyStack stack) {
this.stack = stack;
}
public void run() {
for(int i=0 ; i<10 ; i++) {
stack.pop();
try {
Thread.sleep((int)Math.random()*100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
class Push implements Runnable{
MyStack stack;
public Push() { }
public Push(MyStack stack) {
this.stack = stack;
}
public void run() {
for(int i=0 ; i<10 ; i++) {
stack.push(i);
try {
Thread.sleep((int)Math.random()*100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
|
[
"user@DESKTOP-V882PTR"
] |
user@DESKTOP-V882PTR
|
198f14e15a4dd9f8ccce5a00167f5bb1b4842b98
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Log4j/Log4j341.java
|
fa62c7cc00f9ac5032d90c654ba2bb42a1893411
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 612
|
java
|
@Test
public void testIsInRangeErrorToDebug() {
assertFalse(Level.OFF.isInRange(Level.ERROR, Level.DEBUG));
assertFalse(Level.FATAL.isInRange(Level.ERROR, Level.DEBUG));
assertTrue(Level.ERROR.isInRange(Level.ERROR, Level.DEBUG));
assertTrue(Level.WARN.isInRange(Level.ERROR, Level.DEBUG));
assertTrue(Level.INFO.isInRange(Level.ERROR, Level.DEBUG));
assertTrue(Level.DEBUG.isInRange(Level.ERROR, Level.DEBUG));
assertFalse(Level.TRACE.isInRange(Level.ERROR, Level.DEBUG));
assertFalse(Level.ALL.isInRange(Level.ERROR, Level.DEBUG));
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
5b444be6ed83b8884051f45b82861a7a89804afc
|
af1e97e2d048e1be0c6f1f398e34ab6e472cc2e3
|
/src/test/java/io/accountalk/service/mapper/UserMapperIT.java
|
1b583ec88c9b4812331dbc68332bc1fb8f9c61d2
|
[] |
no_license
|
BulkSecurityGeneratorProject/AccounTalk
|
80411a9012ab098380e93ce4f8b2ed2e01f2323e
|
f022d1f1c39c05d41bfcb76bcadf7c932e1ce18f
|
refs/heads/master
| 2022-12-18T18:21:35.429859
| 2019-07-27T22:33:33
| 2019-07-27T22:33:33
| 296,603,883
| 0
| 0
| null | 2020-09-18T11:39:27
| 2020-09-18T11:39:26
| null |
UTF-8
|
Java
| false
| false
| 4,501
|
java
|
package io.accountalk.service.mapper;
import io.accountalk.AccounTalkApp;
import io.accountalk.domain.User;
import io.accountalk.service.dto.UserDTO;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests for {@link UserMapper}.
*/
@SpringBootTest(classes = AccounTalkApp.class)
public class UserMapperIT {
private static final String DEFAULT_LOGIN = "johndoe";
private static final Long DEFAULT_ID = 1L;
@Autowired
private UserMapper userMapper;
private User user;
private UserDTO userDto;
@BeforeEach
public void init() {
user = new User();
user.setLogin(DEFAULT_LOGIN);
user.setPassword(RandomStringUtils.random(60));
user.setActivated(true);
user.setEmail("johndoe@localhost");
user.setFirstName("john");
user.setLastName("doe");
user.setImageUrl("image_url");
user.setLangKey("en");
userDto = new UserDTO(user);
}
@Test
public void usersToUserDTOsShouldMapOnlyNonNullUsers() {
List<User> users = new ArrayList<>();
users.add(user);
users.add(null);
List<UserDTO> userDTOS = userMapper.usersToUserDTOs(users);
assertThat(userDTOS).isNotEmpty();
assertThat(userDTOS).size().isEqualTo(1);
}
@Test
public void userDTOsToUsersShouldMapOnlyNonNullUsers() {
List<UserDTO> usersDto = new ArrayList<>();
usersDto.add(userDto);
usersDto.add(null);
List<User> users = userMapper.userDTOsToUsers(usersDto);
assertThat(users).isNotEmpty();
assertThat(users).size().isEqualTo(1);
}
@Test
public void userDTOsToUsersWithAuthoritiesStringShouldMapToUsersWithAuthoritiesDomain() {
Set<String> authoritiesAsString = new HashSet<>();
authoritiesAsString.add("ADMIN");
userDto.setAuthorities(authoritiesAsString);
List<UserDTO> usersDto = new ArrayList<>();
usersDto.add(userDto);
List<User> users = userMapper.userDTOsToUsers(usersDto);
assertThat(users).isNotEmpty();
assertThat(users).size().isEqualTo(1);
assertThat(users.get(0).getAuthorities()).isNotNull();
assertThat(users.get(0).getAuthorities()).isNotEmpty();
assertThat(users.get(0).getAuthorities().iterator().next().getName()).isEqualTo("ADMIN");
}
@Test
public void userDTOsToUsersMapWithNullAuthoritiesStringShouldReturnUserWithEmptyAuthorities() {
userDto.setAuthorities(null);
List<UserDTO> usersDto = new ArrayList<>();
usersDto.add(userDto);
List<User> users = userMapper.userDTOsToUsers(usersDto);
assertThat(users).isNotEmpty();
assertThat(users).size().isEqualTo(1);
assertThat(users.get(0).getAuthorities()).isNotNull();
assertThat(users.get(0).getAuthorities()).isEmpty();
}
@Test
public void userDTOToUserMapWithAuthoritiesStringShouldReturnUserWithAuthorities() {
Set<String> authoritiesAsString = new HashSet<>();
authoritiesAsString.add("ADMIN");
userDto.setAuthorities(authoritiesAsString);
User user = userMapper.userDTOToUser(userDto);
assertThat(user).isNotNull();
assertThat(user.getAuthorities()).isNotNull();
assertThat(user.getAuthorities()).isNotEmpty();
assertThat(user.getAuthorities().iterator().next().getName()).isEqualTo("ADMIN");
}
@Test
public void userDTOToUserMapWithNullAuthoritiesStringShouldReturnUserWithEmptyAuthorities() {
userDto.setAuthorities(null);
User user = userMapper.userDTOToUser(userDto);
assertThat(user).isNotNull();
assertThat(user.getAuthorities()).isNotNull();
assertThat(user.getAuthorities()).isEmpty();
}
@Test
public void userDTOToUserMapWithNullUserShouldReturnNull() {
assertThat(userMapper.userDTOToUser(null)).isNull();
}
@Test
public void testUserFromId() {
assertThat(userMapper.userFromId(DEFAULT_ID).getId()).isEqualTo(DEFAULT_ID);
assertThat(userMapper.userFromId(null)).isNull();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
255f51b4f7bb282011efe0c8fce4ceac0005e829
|
401f13e50d46627d0d0625aa44ff2827eef9495d
|
/eclipse/plugins/org.switchyard.tools.models.switchyard1_0/src/org/open/oasis/docs/ns/opencsa/sca/bpel/BPELImplementation.java
|
e6cade13a52c94328240a907fa0ea4c99ab18c66
|
[] |
no_license
|
punkhorn/tools
|
6f646da3e39dcf9383ca6c6aed7bfee07cfddbe8
|
32acd56bf2d536e1dcdfe9bcd0c3379d7c982c96
|
refs/heads/master
| 2021-01-16T17:50:50.458942
| 2012-09-25T22:11:00
| 2012-09-26T03:06:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,805
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.open.oasis.docs.ns.opencsa.sca.bpel;
import javax.xml.namespace.QName;
import org.eclipse.soa.sca.sca1_1.model.sca.Implementation;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Implementation</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.open.oasis.docs.ns.opencsa.sca.bpel.BPELImplementation#getProcess <em>Process</em>}</li>
* </ul>
* </p>
*
* @see org.open.oasis.docs.ns.opencsa.sca.bpel.BPELPackage#getBPELImplementation()
* @model extendedMetaData="name='BPELImplementation' kind='empty'"
* @generated
*/
public interface BPELImplementation extends Implementation {
/**
* Returns the value of the '<em><b>Process</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Process</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Process</em>' attribute.
* @see #setProcess(QName)
* @see org.open.oasis.docs.ns.opencsa.sca.bpel.BPELPackage#getBPELImplementation_Process()
* @model dataType="org.eclipse.emf.ecore.xml.type.QName" required="true"
* extendedMetaData="kind='attribute' name='process'"
* @generated
*/
QName getProcess();
/**
* Sets the value of the '{@link org.open.oasis.docs.ns.opencsa.sca.bpel.BPELImplementation#getProcess <em>Process</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Process</em>' attribute.
* @see #getProcess()
* @generated
*/
void setProcess(QName value);
} // BPELImplementation
|
[
"rcernich@redhat.com"
] |
rcernich@redhat.com
|
3b57c6fa9400fbe5ef95f5aad2b5da8da731482e
|
208ba847cec642cdf7b77cff26bdc4f30a97e795
|
/m/src/main/java/org.wp.m/util/CrashlyticsUtils.java
|
be41d2af79e06a5e94a3f8be67216cd350e34d29
|
[] |
no_license
|
kageiit/perf-android-large
|
ec7c291de9cde2f813ed6573f706a8593be7ac88
|
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
|
refs/heads/master
| 2021-01-12T14:00:19.468063
| 2016-09-27T13:10:42
| 2016-09-27T13:10:42
| 69,685,305
| 0
| 0
| null | 2016-09-30T16:59:49
| 2016-09-30T16:59:48
| null |
UTF-8
|
Java
| false
| false
| 1,152
|
java
|
package org.wp.m.util;
public class CrashlyticsUtils {
final private static String EXCEPTION_KEY = "exception";
final private static String TAG_KEY = "tag";
final private static String MESSAGE_KEY = "message";
public enum ExceptionType {USUAL, SPECIFIC}
public enum ExtraKey {IMAGE_ANGLE, IMAGE_WIDTH, IMAGE_HEIGHT, IMAGE_RESIZE_SCALE, NOTE_HTMLDATA, ENTERED_URL}
public static void logException(Throwable tr, ExceptionType exceptionType, AppLog.T tag, String message) {
}
public static void logException(Throwable tr, ExceptionType exceptionType, AppLog.T tag) {
logException(tr, exceptionType, tag, null);
}
public static void logException(Throwable tr, ExceptionType exceptionType) {
logException(tr, exceptionType, null, null);
}
// Utility functions to force us to use and reuse a limited set of keys
public static void setInt(ExtraKey key, int value) {
}
public static void setFloat(ExtraKey key, float value) {
}
public static void setString(ExtraKey key, String value) {
}
public static void setBool(ExtraKey key, boolean value) {
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
f32d9b773122fa18e95ab89950315c2cc5b511bd
|
652f4628ed4f0e975dc4a3f3aba13c3841e71765
|
/java/java-web-ee/ejb-livraria/src/main/java/br/com/caelum/livraria/login/UsuarioLogadoBean.java
|
cc54f5434eeec61b1f845e4f45ac6b0232bd331a
|
[
"Apache-2.0"
] |
permissive
|
wesleyegberto/courses-projects
|
f71700c0d55a41fb0421af0b1ed4b2977a1e43cd
|
e64fca6121cc26e97bfb2abed6b1bce105f5d8bb
|
refs/heads/master
| 2022-07-07T15:58:52.247117
| 2022-06-26T00:38:19
| 2022-06-26T00:38:19
| 70,363,527
| 1
| 0
|
Apache-2.0
| 2020-09-29T19:57:20
| 2016-10-08T23:43:46
|
TypeScript
|
UTF-8
|
Java
| false
| false
| 585
|
java
|
package br.com.caelum.livraria.login;
import java.io.Serializable;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
import br.com.caelum.livraria.modelo.Usuario;
@Named
@SessionScoped
public class UsuarioLogadoBean implements Serializable {
private static final long serialVersionUID = 1L;
private Usuario usuario;
public void logar(Usuario usuario) {
this.usuario = usuario;
}
public void deslogar() {
this.usuario = null;
}
public Usuario getUsuario() {
return usuario;
}
public boolean isLogado() {
return usuario != null;
}
}
|
[
"wesleyegberto@gmail.com"
] |
wesleyegberto@gmail.com
|
f9a79604d1966e9ea17d31d4f3d9348f99f5a068
|
b81dc3ae5d15a90e99476c64fcad57c4d2235e98
|
/src/main/java/testapp/generated/ota2015b/LoyaltyProgramType_2015B.java
|
c29aed0ee69f5751f798140acdea71e224d033a5
|
[] |
no_license
|
northernbird/modelmapper-issue-one
|
a0c496cc38fecce1f8dd19d9846225e4e82a9fd2
|
e84e1df0ebf04de4b518c4673c033b08718c11e9
|
refs/heads/master
| 2020-12-29T15:59:49.960115
| 2019-04-25T18:44:42
| 2019-04-25T18:44:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,142
|
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: 2017.04.10 at 03:53:03 PM CEST
//
package testapp.generated.ota2015b;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* Identifies a membership or loyalty program offered by the company by name of the program.
*
* <p>Java class for LoyaltyProgramType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="LoyaltyProgramType">
* <simpleContent>
* <extension base="<http://www.opentravel.org/OTA/2003/05>StringLength0to32">
* <attGroup ref="{http://www.opentravel.org/OTA/2003/05}SingleVendorIndGroup"/>
* <attribute name="ProgramCode" type="{http://www.opentravel.org/OTA/2003/05}StringLength1to16" />
* <attribute name="LoyaltyLevel" type="{http://www.opentravel.org/OTA/2003/05}StringLength1to16" />
* <attribute name="RPH" type="{http://www.opentravel.org/OTA/2003/05}RPH_Type" />
* <attribute name="PrimaryLoyaltyIndicator" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LoyaltyProgramType", propOrder = {
"value"
})
public class LoyaltyProgramType_2015B {
@XmlValue
protected String value;
@XmlAttribute(name = "ProgramCode")
protected String programCode;
@XmlAttribute(name = "LoyaltyLevel")
protected String loyaltyLevel;
@XmlAttribute(name = "RPH")
protected String rph;
@XmlAttribute(name = "PrimaryLoyaltyIndicator")
protected Boolean primaryLoyaltyIndicator;
@XmlAttribute(name = "SingleVendorInd")
protected String singleVendorInd;
/**
* Used for Character Strings, length 0 to 32.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the programCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProgramCode() {
return programCode;
}
/**
* Sets the value of the programCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProgramCode(String value) {
this.programCode = value;
}
/**
* Gets the value of the loyaltyLevel property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLoyaltyLevel() {
return loyaltyLevel;
}
/**
* Sets the value of the loyaltyLevel property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLoyaltyLevel(String value) {
this.loyaltyLevel = value;
}
/**
* Gets the value of the rph property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRPH() {
return rph;
}
/**
* Sets the value of the rph property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRPH(String value) {
this.rph = value;
}
/**
* Gets the value of the primaryLoyaltyIndicator property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isPrimaryLoyaltyIndicator() {
return primaryLoyaltyIndicator;
}
/**
* Sets the value of the primaryLoyaltyIndicator property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setPrimaryLoyaltyIndicator(Boolean value) {
this.primaryLoyaltyIndicator = value;
}
/**
* Gets the value of the singleVendorInd property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSingleVendorInd() {
return singleVendorInd;
}
/**
* Sets the value of the singleVendorInd property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSingleVendorInd(String value) {
this.singleVendorInd = value;
}
}
|
[
"ervin@rateboard.info"
] |
ervin@rateboard.info
|
817b763abbfa5f2e15df896d5e063d246d10baa5
|
10a689229d6889f86bf6c4ad106caa433379bb49
|
/branch/v1.0.1/hims/src/com/manyi/hims/entity/HouseDirection.java
|
5100e6daa114ae535811f296743987adcef43c47
|
[] |
no_license
|
sanrentai/manyi
|
d9e64224bc18846410c4a986c3f2b4ee229b2a2e
|
c4c92f4dde1671027ff726ba6bbe6021421cd469
|
refs/heads/master
| 2020-03-12T19:30:47.242536
| 2015-04-10T08:40:20
| 2015-04-10T08:40:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,081
|
java
|
package com.manyi.hims.entity;
import java.io.Serializable;
import javax.persistence.Cacheable;
import javax.persistence.Entity;
import javax.persistence.Id;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
/**
* Entity implementation class for Entity: HouseDirection
*
*/
@Entity
@Cacheable
@Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)
public class HouseDirection implements Serializable {
private static final long serialVersionUID = 1L;
private int houseDirectionId;
private String houseDirection;// 朝向描述
private String remark;
@Id
public int getHouseDirectionId() {
return houseDirectionId;
}
public void setHouseDirectionId(int houseDirectionId) {
this.houseDirectionId = houseDirectionId;
}
public String getHouseDirection() {
return houseDirection;
}
public void setHouseDirection(String houseDirection) {
this.houseDirection = houseDirection;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
|
[
"zhangxiongcai337@gmail.com"
] |
zhangxiongcai337@gmail.com
|
f21df61cb408f1d1f4be55e9f9ec364df6e8579a
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/dataworks-public-20200518/src/main/java/com/aliyun/dataworks_public20200518/models/Entity.java
|
b19144a28e289cd97d387528e420015614cab1ad
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,179
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dataworks_public20200518.models;
import com.aliyun.tea.*;
public class Entity extends TeaModel {
@NameInMap("EntityContent")
public java.util.Map<String, ?> entityContent;
@NameInMap("QualifiedName")
public String qualifiedName;
@NameInMap("TenantId")
public Long tenantId;
public static Entity build(java.util.Map<String, ?> map) throws Exception {
Entity self = new Entity();
return TeaModel.build(map, self);
}
public Entity setEntityContent(java.util.Map<String, ?> entityContent) {
this.entityContent = entityContent;
return this;
}
public java.util.Map<String, ?> getEntityContent() {
return this.entityContent;
}
public Entity setQualifiedName(String qualifiedName) {
this.qualifiedName = qualifiedName;
return this;
}
public String getQualifiedName() {
return this.qualifiedName;
}
public Entity setTenantId(Long tenantId) {
this.tenantId = tenantId;
return this;
}
public Long getTenantId() {
return this.tenantId;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
7a15a873376cd78e1b6a5ca011bcd03c95cb45cf
|
a83af5271a6d348d07fb113b549e2abfa76caa40
|
/src/main/java/com/eagle6/strategicplanning/config/LoggingAspectConfiguration.java
|
01e4ddfce390a717c269e1281d1e408b573cf196
|
[] |
no_license
|
anklavez/strategic-planning
|
b5ac1d0ac93d9b7965922b6370d6a8e3bbf665c8
|
1e39ad809a45047d8eb24025ca4483e881b3a412
|
refs/heads/master
| 2020-03-24T08:41:27.860480
| 2018-07-27T18:35:43
| 2018-07-27T18:35:43
| 142,604,289
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 518
|
java
|
package com.eagle6.strategicplanning.config;
import com.eagle6.strategicplanning.aop.logging.LoggingAspect;
import io.github.jhipster.config.JHipsterConstants;
import org.springframework.context.annotation.*;
import org.springframework.core.env.Environment;
@Configuration
@EnableAspectJAutoProxy
public class LoggingAspectConfiguration {
@Bean
@Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)
public LoggingAspect loggingAspect(Environment env) {
return new LoggingAspect(env);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
b1c2955a7fc42cffeaa7b4c3f1b7499aa8b84dc8
|
da36623821df0da8024e761d1ac1e2a739dff031
|
/ego_commons/src/main/java/yimin/ego/commons/utils/FastDFSClient.java
|
7ad8e672a625bd70ae239edf0d900b6b20a0d9e3
|
[] |
no_license
|
unsetopt/ego_shopping
|
8f846300ad77a0266c07e54d592f90587c53c7db
|
984186fe1bfb6099ed7940f5e50d4435e2485ea8
|
refs/heads/master
| 2022-12-25T02:08:33.685805
| 2020-10-10T17:28:07
| 2020-10-10T17:28:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,888
|
java
|
package yimin.ego.commons.utils;
import com.sun.org.glassfish.gmbal.NameValue;
import org.apache.commons.lang3.StringUtils;
import org.csource.common.MyException;
import org.csource.common.NameValuePair;
import org.csource.fastdfs.*;
import java.io.*;
/*
* @Author : Yimin Huang
* @Contact : hymlaucs@gmail.com
* @Date : 2020/10/2 16:06
* @Description :
*
*/
public class FastDFSClient {
// Use relative path
private static final String CONF_FILENAME = "fdfs_client.conf";
private static StorageClient storageClient = null;
// only onload one time
static {
try {
ClientGlobal.init(CONF_FILENAME);
TrackerClient trackerClient = new TrackerClient(ClientGlobal.g_tracker_group);
TrackerServer trackerServer = trackerClient.getConnection();
StorageServer storageServer = trackerClient.getStoreStorage(trackerServer);
storageClient = new StorageClient(trackerServer, storageServer);
} catch (IOException ioException) {
ioException.printStackTrace();
} catch (MyException e) {
e.printStackTrace();
}
}
/**
* @param inputStream
* upload the file's inputStream
* @param fileName
* the original name of the file
* @return
*/
public static String[] uploadFile(InputStream inputStream, String fileName){
try {
// metadata of file
NameValuePair[] meta_list = new NameValuePair[2];
// original name
meta_list[0] = new NameValuePair("file name", fileName);
meta_list[1] = new NameValuePair("file length", inputStream.available() + " ");
byte[] file_buff = null;
if(inputStream != null){
// the length of the file
int len = inputStream.available();
file_buff = new byte[len];
// read the file to the buffer
inputStream.read(file_buff);
}
// upload the file (parsing by byte array)
String[] fields = storageClient.upload_file(file_buff, getFileExt(fileName), meta_list);
return fields;
} catch (Exception ioException) {
ioException.printStackTrace();
return null;
}
}
/**
*
* @param file
* @param fileName
* @return return null if fail
*/
public static String[] uploadFile(File file, String fileName){
FileInputStream fis = null;
try{
NameValuePair[] meta_list = null;
fis = new FileInputStream(file);
byte[] file_buff = null;
if(fis != null){
int len = fis.available();
file_buff = new byte[len];
fis.read(file_buff);
}
String[] fileids = storageClient.upload_file(file_buff, getFileExt(fileName), meta_list);
return fileids;
} catch (Exception ex) {
ex.printStackTrace();
return null;
} finally {
if(fis != null){
try{
fis.close();
} catch (IOException ioException) {
ioException.printStackTrace();
}
}
}
}
/**
* delete the file based on the groupName and fileName
* @param groupName default: group1
* @param remoteFileName
* e.g. M00/00/00/wKgxgk5HbLvfP86RAAAAChd9X1Y736.jpg
* @return 0: success non-0: fail
*/
public static int deleteFile(String groupName, String remoteFileName){
try{
int result = storageClient.delete_file(groupName == null ? "group1":groupName, remoteFileName);
return result;
} catch (Exception exception) {
// exception.printStackTrace();
return 0;
}
}
/**
* update a file that already exist
* @param oldGroupName
* 旧的组名
* @param oldFileName
* 旧的文件名
* @param file
* 新文件
* @param fileName
* 新文件名
* @return 返回空则为失败
*/
public static String[] modifyFile(String oldGroupName, String oldFileName, File file, String fileName){
String[] fields = null;
try{
// step 1: upload first
fields = uploadFile(file, fileName);
if(fields == null){
return null;
}
// step 2: then delete the item
int delResult = deleteFile(oldGroupName, oldFileName);
if(delResult != 0){
return null;
}
} catch (Exception e){
return null;
}
return fields;
}
/**
* download file
* @param groupName
* @param remoteFileName
* @return
*/
public static InputStream downloadFile(String groupName, String remoteFileName){
try{
byte[] bytes = storageClient.download_file(groupName, remoteFileName);
InputStream inputStream = new ByteArrayInputStream(bytes);
return inputStream;
} catch (Exception e){
return null;
}
}
public static NameValuePair[] getMetaData(String groupName, String remoteFileName){
try{
NameValuePair[] nvp = storageClient.get_metadata(groupName, remoteFileName);
return nvp;
} catch (Exception ex){
ex.printStackTrace();
return null;
}
}
/**
* get the suffix type of the file
* @return "jpg" or "".
*/
private static String getFileExt(String fileName){
if(StringUtils.isBlank(fileName) || !fileName.contains(".")){
return "";
} else {
return fileName.substring(fileName.lastIndexOf(".") + 1);
}
}
}
|
[
"hymlaucs@gmail.com"
] |
hymlaucs@gmail.com
|
326d73d86cf3e3d56b585426c0ab9f99b9f0f754
|
e875310d7a939a6fa3859e1e3f6e8d1a43bd1f8f
|
/src/test/java/info/fatecode/web/rest/errors/ExceptionTranslatorTestController.java
|
11ee7db9335a5adec1afe540073199aed5a1d5ea
|
[] |
no_license
|
BulkSecurityGeneratorProject/fate-code
|
8e4b30838dfff95baf7505521479916c30216504
|
a1127dc7fd3e0baf015c3a67fea22fce5ee7d390
|
refs/heads/master
| 2022-12-18T22:28:43.772922
| 2019-08-29T01:21:27
| 2019-08-29T01:21:27
| 296,643,112
| 0
| 0
| null | 2020-09-18T14:23:36
| 2020-09-18T14:23:35
| null |
UTF-8
|
Java
| false
| false
| 2,076
|
java
|
package info.fatecode.web.rest.errors;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
@RestController
public class ExceptionTranslatorTestController {
@GetMapping("/test/concurrency-failure")
public void concurrencyFailure() {
throw new ConcurrencyFailureException("test concurrency failure");
}
@PostMapping("/test/method-argument")
public void methodArgument(@Valid @RequestBody TestDTO testDTO) {
}
@GetMapping("/test/missing-servlet-request-part")
public void missingServletRequestPartException(@RequestPart String part) {
}
@GetMapping("/test/missing-servlet-request-parameter")
public void missingServletRequestParameterException(@RequestParam String param) {
}
@GetMapping("/test/access-denied")
public void accessdenied() {
throw new AccessDeniedException("test access denied!");
}
@GetMapping("/test/unauthorized")
public void unauthorized() {
throw new BadCredentialsException("test authentication failed!");
}
@GetMapping("/test/response-status")
public void exceptionWithResponseStatus() {
throw new TestResponseStatusException();
}
@GetMapping("/test/internal-server-error")
public void internalServerError() {
throw new RuntimeException();
}
public static class TestDTO {
@NotNull
private String test;
public String getTest() {
return test;
}
public void setTest(String test) {
this.test = test;
}
}
@ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "test response status")
@SuppressWarnings("serial")
public static class TestResponseStatusException extends RuntimeException {
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
f9a02e880c3a0d4686761377488cfcaaa0725226
|
53189efbfed5423821a84f631da404d07a80e404
|
/storage/app/Al-QuranIndonesia_com.andi.alquran.id_source_from_JADX/com/google/android/gms/internal/nv.java
|
3d2feb08ac028185fb83ebf745f3b62b94db75dd
|
[
"MIT"
] |
permissive
|
dwijpr/islam
|
0c9b77028d34862b6d06858c5b0d6ffec91b5014
|
6077291a619ac2f5b30a77e284c0a7361e7c8ad4
|
refs/heads/master
| 2021-01-19T17:16:49.818251
| 2017-03-13T23:00:08
| 2017-03-13T23:00:08
| 82,430,213
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 583
|
java
|
package com.google.android.gms.internal;
import com.google.android.gms.ads.purchase.PlayStorePurchaseListener;
import com.google.android.gms.internal.nq.C1842a;
@op
public final class nv extends C1842a {
private final PlayStorePurchaseListener f5114a;
public nv(PlayStorePurchaseListener playStorePurchaseListener) {
this.f5114a = playStorePurchaseListener;
}
public void m7786a(np npVar) {
this.f5114a.onInAppPurchaseFinished(new nt(npVar));
}
public boolean m7787a(String str) {
return this.f5114a.isValidPurchase(str);
}
}
|
[
"dwijpr@gmail.com"
] |
dwijpr@gmail.com
|
ecb4ae5054831b53d39e4359f0e5742a40837ac3
|
40f45f6e154d04b1c137e60f0f25b7d1c31db0b4
|
/love/src/main/java/com/love/mapper/IndexTempMapper.java
|
481a0b40f2525c3690413faa4a707d9cea3b866a
|
[] |
no_license
|
11230595/love
|
5744cf6a91846aae4cb58757d3f010996748e048
|
735e1a6124c7e0d47eb979925f8eed06d5fba26f
|
refs/heads/master
| 2021-01-13T01:04:43.579242
| 2015-08-31T10:00:08
| 2015-08-31T10:00:08
| 36,354,387
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 437
|
java
|
package com.love.mapper;
import java.util.List;
import com.love.entity.IndexTemp;
public interface IndexTempMapper {
int deleteByPrimaryKey(String id);
int insert(IndexTemp record);
int insertSelective(IndexTemp record);
IndexTemp selectByPrimaryKey(String id);
int updateByPrimaryKeySelective(IndexTemp record);
int updateByPrimaryKey(IndexTemp record);
List<IndexTemp> findAll();
}
|
[
"11230595@qq.com"
] |
11230595@qq.com
|
7f187159a7894c51145a899bff7b5d9267ec6960
|
d2984ba2b5ff607687aac9c65ccefa1bd6e41ede
|
/src/net/datenwerke/scheduler/client/scheduler/dto/config/complex/TimeUnitsDto.java
|
d4c63128087117afbba6240e01cc081dbe5f4bb2
|
[] |
no_license
|
bireports/ReportServer
|
da979eaf472b3e199e6fbd52b3031f0e819bff14
|
0f9b9dca75136c2bfc20aa611ebbc7dc24cfde62
|
refs/heads/master
| 2020-04-18T10:18:56.181123
| 2019-01-25T00:45:14
| 2019-01-25T00:45:14
| 167,463,795
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,454
|
java
|
/*
* ReportServer
* Copyright (c) 2018 InfoFabrik GmbH
* http://reportserver.net/
*
*
* This file is part of ReportServer.
*
* ReportServer is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.datenwerke.scheduler.client.scheduler.dto.config.complex;
import net.datenwerke.dtoservices.dtogenerator.annotations.GeneratedType;
import net.datenwerke.scheduler.client.scheduler.locale.SchedulerMessages;
/**
* This file was automatically created by DtoAnnotationProcessor, version 0.1
*/
@GeneratedType("net.datenwerke.dtoservices.dtogenerator.DtoAnnotationProcessor")
public enum TimeUnitsDto {
HOURS {
public String toString(){
return SchedulerMessages.INSTANCE.enumLabelHours();
}
},
MINUTES {
public String toString(){
return SchedulerMessages.INSTANCE.enumLabelMinutes();
}
}
}
|
[
"srbala@gmail.com"
] |
srbala@gmail.com
|
5d698bcc7af140a42974ee59a8b646f9f3983b4b
|
1b1c401d5facb2839c233773fcebefe346f3c076
|
/Chabernac Framework/src/main/java/chabernac/GUI/utils/ColumnModel.java
|
3f61035eab5cfe792bfc2f225fe8130227a4c494
|
[] |
no_license
|
guychauliac/p2pmessenger
|
a0836cc8ff9c83b5ba95879f0ebfc8d5a1eea321
|
1652844014ddb9de00497505ffb14f122adcf57a
|
refs/heads/master
| 2023-05-09T01:29:36.992687
| 2017-11-20T15:09:57
| 2017-11-20T15:09:57
| 43,264,205
| 0
| 0
| null | 2021-06-04T01:00:10
| 2015-09-27T20:43:38
|
Java
|
UTF-8
|
Java
| false
| false
| 445
|
java
|
package chabernac.GUI.utils;
import java.lang.reflect.Method;
public class ColumnModel{
private String myColumnName = null;;
private Method myColumnMethod = null;
public ColumnModel(String aColumnName, Method aColumnMethod){
myColumnName = aColumnName;
myColumnMethod = aColumnMethod;
}
public String getColumnName(){
return myColumnName;
}
public Method getColumnMethod(){
return myColumnMethod;
}
}
|
[
"guy.chauliac@418331b0-0465-11df-b0f7-87f4a55fea09"
] |
guy.chauliac@418331b0-0465-11df-b0f7-87f4a55fea09
|
031c91c16fd6e22d1b0ce0d22c23e9ad9d20741d
|
99491debb70866677edc01d9af1bfaadac914978
|
/src/main/java/com/id/wasta/bean/TIdLandingPersonalInterestLink.java
|
4b00d15194a9c84a159204ea54479de4f5438686
|
[] |
no_license
|
srnu/wasta
|
a9dbf4772d6584aacb952b12a4d0e6842d8fa77c
|
c55498cd42b8114ee0bb9342c9905868632e9ddc
|
refs/heads/master
| 2022-12-12T06:54:57.769288
| 2020-09-13T09:41:53
| 2020-09-13T09:41:53
| 295,119,733
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,868
|
java
|
/*
* Created on 19 Apr 2019 ( Time 15:26:52 )
* Generated by Telosys Tools Generator ( version 2.1.0 )
*/
// This Bean has a composite Primary Key
// This Bean has a basic Primary Key (not composite)
package com.id.wasta.bean;
import java.io.Serializable;
//import org.hibernate.validator.constraints.* ;
import javax.validation.constraints.NotNull;
public class TIdLandingPersonalInterestLink implements Serializable {
private static final long serialVersionUID = 1L;
@NotNull
private Long llKey ;
@NotNull
private Long llLdKey ;
@NotNull
private Long llPinKey ;
@NotNull
private Long lockKey ;
@NotNull
private Long profileKey ;
//----------------------------------------------------------------------
// GETTER & SETTER FOR THE KEY FIELD
//----------------------------------------------------------------------
public void setLlKey( Long llKey ) {
this.llKey = llKey ;
}
public Long getLlKey() {
return this.llKey;
}
//----------------------------------------------------------------------
// GETTERS & SETTERS FOR FIELDS
//----------------------------------------------------------------------
//--- DATABASE MAPPING : ll_ld_key ( BIGINT )
public void setLlLdKey( Long llLdKey ) {
this.llLdKey = llLdKey;
}
public Long getLlLdKey() {
return this.llLdKey;
}
//--- DATABASE MAPPING : ll_pin_key ( BIGINT )
public void setLlPinKey( Long llPinKey ) {
this.llPinKey = llPinKey;
}
public Long getLlPinKey() {
return this.llPinKey;
}
//--- DATABASE MAPPING : lock_key ( BIGINT )
public void setLockKey( Long lockKey ) {
this.lockKey = lockKey;
}
public Long getLockKey() {
return this.lockKey;
}
//--- DATABASE MAPPING : profile_key ( BIGINT )
public void setProfileKey( Long profileKey ) {
this.profileKey = profileKey;
}
public Long getProfileKey() {
return this.profileKey;
}
//----------------------------------------------------------------------
// GETTERS & SETTERS FOR LINKS
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// toString METHOD
//----------------------------------------------------------------------
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("[");
sb.append(llKey);
sb.append("]:");
sb.append(llLdKey);
sb.append("|");
sb.append(llPinKey);
sb.append("|");
sb.append(lockKey);
sb.append("|");
sb.append(profileKey);
return sb.toString();
}
}
|
[
"venkatrao@infodynamic.in"
] |
venkatrao@infodynamic.in
|
9306ac82c06ca189bf42dbda58674e0d0b8ab77c
|
34eeab9ab57c5981a3f73ae51d6702e87275c9f8
|
/Mage.Sets/src/mage/cards/g/GatheringThrong.java
|
05ea13dd378e6279039c56956fe4dc676613f749
|
[
"MIT"
] |
permissive
|
tylerFretz/mage
|
f12a3116119376c4ec50c2eff7f2f03ff3016e07
|
cfa1dffc1e009c25d976dcca0063e8abb237aa46
|
refs/heads/master
| 2023-04-30T08:49:22.655044
| 2023-04-12T15:12:48
| 2023-04-12T15:12:48
| 238,129,169
| 1
| 0
|
MIT
| 2023-04-13T00:28:58
| 2020-02-04T05:17:50
|
Java
|
UTF-8
|
Java
| false
| false
| 1,630
|
java
|
package mage.cards.g;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class GatheringThrong extends CardImpl {
private static final FilterCard filter = new FilterCard("cards named Gathering Throng");
static {
filter.add(new NamePredicate("Gathering Throng"));
}
public GatheringThrong(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.CITIZEN);
this.power = new MageInt(3);
this.toughness = new MageInt(1);
// When Gathering Throng enters the battlefield, you may search your library for any number of cards named Gathering Throng, reveal them, put them into your hand, then shuffle.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(
new TargetCardInLibrary(0, Integer.MAX_VALUE, filter), true, true
), true));
}
private GatheringThrong(final GatheringThrong card) {
super(card);
}
@Override
public GatheringThrong copy() {
return new GatheringThrong(this);
}
}
// nothing to see here, folks
|
[
"theelk801@gmail.com"
] |
theelk801@gmail.com
|
391cfe42d5e50c83a2d8dc946d547b87df6cb31f
|
400fa6f7950fcbc93f230559d649a7bfc50975fe
|
/src/jagdx/Direct3DAdapterIdentifier.java
|
ef951d70063b9da1b11300adf0d7f37304d446e8
|
[] |
no_license
|
Rune-Status/Major--Renamed-839
|
bd242a9b230c104a4021ec679e527fe752c27c4f
|
0e9039aa22f7ecd0ebcf2473a4acb5e91f6c8f76
|
refs/heads/master
| 2021-07-15T08:58:15.963040
| 2017-10-22T20:14:35
| 2017-10-22T20:14:35
| 107,897,914
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package jagdx;
public class Direct3DAdapterIdentifier {
public String driver;
public String description;
public String deviceName;
public long driverVersion;
public int vendorID;
public int deviceID;
public int subSystemID;
public int revision;
public int whqlLevel;
}
|
[
"iano2k4@hotmail.com"
] |
iano2k4@hotmail.com
|
f2601eb0278a3d32948ae94cd481a8c64d7a03a6
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/org/apache/hadoop/hbase/master/procedure/TestMasterProcedureWalLease.java
|
1ff283e796b4a5a813755129e0e3b0e5b884224c
|
[] |
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
| 6,381
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.master.procedure;
import java.io.IOException;
import java.util.concurrent.CountDownLatch;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseTestingUtility;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.RegionInfo;
import org.apache.hadoop.hbase.client.TableDescriptor;
import org.apache.hadoop.hbase.master.HMaster;
import org.apache.hadoop.hbase.procedure2.store.ProcedureStore;
import org.apache.hadoop.hbase.procedure2.store.wal.WALProcedureStore;
import org.apache.hadoop.hbase.testclassification.LargeTests;
import org.apache.hadoop.hbase.testclassification.MasterTests;
import org.apache.hadoop.hbase.util.ModifyRegionUtils;
import org.junit.Assert;
import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import org.mockito.Mockito;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Category({ MasterTests.class, LargeTests.class })
@Ignore
public class TestMasterProcedureWalLease {
@ClassRule
public static final HBaseClassTestRule CLASS_RULE = HBaseClassTestRule.forClass(TestMasterProcedureWalLease.class);
private static final Logger LOG = LoggerFactory.getLogger(TestMasterProcedureWalLease.class);
@Rule
public TestName name = new TestName();
protected static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
@Test
public void testWalRecoverLease() throws Exception {
final ProcedureStore masterStore = getMasterProcedureExecutor().getStore();
Assert.assertTrue("expected WALStore for this test", (masterStore instanceof WALProcedureStore));
HMaster firstMaster = TestMasterProcedureWalLease.UTIL.getHBaseCluster().getMaster();
// Abort Latch for the master store
final CountDownLatch masterStoreAbort = new CountDownLatch(1);
masterStore.registerListener(new ProcedureStore.ProcedureStoreListener() {
@Override
public void postSync() {
}
@Override
public void abortProcess() {
TestMasterProcedureWalLease.LOG.debug("Abort store of Master");
masterStoreAbort.countDown();
}
});
// startup a fake master the new WAL store will take the lease
// and the active master should abort.
HMaster backupMaster3 = Mockito.mock(HMaster.class);
Mockito.doReturn(firstMaster.getConfiguration()).when(backupMaster3).getConfiguration();
Mockito.doReturn(true).when(backupMaster3).isActiveMaster();
final WALProcedureStore backupStore3 = new WALProcedureStore(firstMaster.getConfiguration(), getWALDir(), null, new MasterProcedureEnv.WALStoreLeaseRecovery(backupMaster3));
// Abort Latch for the test store
final CountDownLatch backupStore3Abort = new CountDownLatch(1);
backupStore3.registerListener(new ProcedureStore.ProcedureStoreListener() {
@Override
public void postSync() {
}
@Override
public void abortProcess() {
TestMasterProcedureWalLease.LOG.debug("Abort store of backupMaster3");
backupStore3Abort.countDown();
backupStore3.stop(true);
}
});
backupStore3.start(1);
backupStore3.recoverLease();
// Try to trigger a command on the master (WAL lease expired on the active one)
TableDescriptor htd = MasterProcedureTestingUtility.createHTD(TableName.valueOf(name.getMethodName()), "f");
RegionInfo[] regions = ModifyRegionUtils.createRegionInfos(htd, null);
TestMasterProcedureWalLease.LOG.debug("submit proc");
try {
getMasterProcedureExecutor().submitProcedure(new CreateTableProcedure(getMasterProcedureExecutor().getEnvironment(), htd, regions));
Assert.fail("expected RuntimeException 'sync aborted'");
} catch (RuntimeException e) {
TestMasterProcedureWalLease.LOG.info(("got " + (e.getMessage())));
}
TestMasterProcedureWalLease.LOG.debug("wait master store abort");
masterStoreAbort.await();
// Now the real backup master should start up
TestMasterProcedureWalLease.LOG.debug("wait backup master to startup");
MasterProcedureTestingUtility.waitBackupMaster(TestMasterProcedureWalLease.UTIL, firstMaster);
Assert.assertEquals(true, firstMaster.isStopped());
// wait the store in here to abort (the test will fail due to timeout if it doesn't)
TestMasterProcedureWalLease.LOG.debug("wait the store to abort");
backupStore3.getStoreTracker().setDeleted(1, false);
try {
backupStore3.delete(1);
Assert.fail("expected RuntimeException 'sync aborted'");
} catch (RuntimeException e) {
TestMasterProcedureWalLease.LOG.info(("got " + (e.getMessage())));
}
backupStore3Abort.await();
}
/**
* Tests proper fencing in case the current WAL store is fenced
*/
@Test
public void testWALfencingWithoutWALRolling() throws IOException {
testWALfencing(false);
}
/**
* Tests proper fencing in case the current WAL store does not receive writes until after the
* new WAL does a couple of WAL rolls.
*/
@Test
public void testWALfencingWithWALRolling() throws IOException {
testWALfencing(true);
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
1df10c15d5088694a318a05bfab680cf25ce0a01
|
449cc92656d1f55bd7e58692657cd24792847353
|
/member-service/src/main/java/com/lj/business/member/dto/UpdatePmType.java
|
313ac16ed4d820853c2aae2660fd8e3d1947f383
|
[] |
no_license
|
cansou/HLM
|
f80ae1c71d0ce8ead95c00044a318796820a8c1e
|
69d859700bfc074b5948b6f2c11734ea2e030327
|
refs/heads/master
| 2022-08-27T16:40:17.206566
| 2019-12-18T06:48:10
| 2019-12-18T06:48:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,725
|
java
|
package com.lj.business.member.dto;
import java.io.Serializable;
/**
* The Class UpdatePmType.
*/
public class UpdatePmType implements Serializable {
/** Generate cron. */
private static final long serialVersionUID = 2462836663952991239L;
/**
* CODE .
*/
private String code;
/**
* 商户编号 .
*/
private String merchantNo;
/**
* 导购编号 .
*/
private String memberNo;
/**
* 导购姓名 .
*/
private String memberName;
/**
* 客户分类名称 .
*/
private String typeName;
/**
* 客户分类类型
成单客户:SUCCESS
已放弃客户:GIVE_UP
紧急客户:URGENCY
交叉客户:REPEAT
意向客户:INTENTION
其他:OTHER .
*/
private String pmTypeType;
/**
* 客户分类维度 商户:MERCHANT 导购:GUID .
*/
private String pmTypeDim;
/**
* 状态
启用:Y
停用:N
.
*/
private String status;
/**
* 排序 .
*/
private Integer seq;
/**
* 创建人 .
*/
private String createId;
/**
* 备注 .
*/
private String remark;
/**
* 备注 .
*/
private String remark2;
/**
* 备注 .
*/
private String remark3;
/**
* 备注 .
*/
private String remark4;
/** 频率 小时. */
private String freValue;
/**
* 旧的,修改前的typecode
*/
private String oldPmTypeName;
public String getOldPmTypeName() {
return oldPmTypeName;
}
public void setOldPmTypeName(String oldPmTypeName) {
this.oldPmTypeName = oldPmTypeName;
}
/**
* Gets the cODE .
*
* @return the cODE
*/
public String getCode() {
return code;
}
/**
* Sets the cODE .
*
* @param code the new cODE
*/
public void setCode(String code) {
this.code = code;
}
/**
* Gets the 商户编号 .
*
* @return the 商户编号
*/
public String getMerchantNo() {
return merchantNo;
}
/**
* Sets the 商户编号 .
*
* @param merchantNo the new 商户编号
*/
public void setMerchantNo(String merchantNo) {
this.merchantNo = merchantNo;
}
/**
* Gets the 导购编号 .
*
* @return the 导购编号
*/
public String getMemberNo() {
return memberNo;
}
/**
* Sets the 导购编号 .
*
* @param memberNo the new 导购编号
*/
public void setMemberNo(String memberNo) {
this.memberNo = memberNo;
}
/**
* Gets the 导购姓名 .
*
* @return the 导购姓名
*/
public String getMemberName() {
return memberName;
}
/**
* Sets the 导购姓名 .
*
* @param memberName the new 导购姓名
*/
public void setMemberName(String memberName) {
this.memberName = memberName;
}
/**
* Gets the 客户分类名称 .
*
* @return the 客户分类名称
*/
public String getTypeName() {
return typeName;
}
/**
* Sets the 客户分类名称 .
*
* @param typeName the new 客户分类名称
*/
public void setTypeName(String typeName) {
this.typeName = typeName;
}
/**
* Gets the 客户分类类型 成单客户:SUCCESS 已放弃客户:GIVE_UP 紧急客户:URGENCY 交叉客户:REPEAT 意向客户:INTENTION 其他:OTHER .
*
* @return the 客户分类类型 成单客户:SUCCESS 已放弃客户:GIVE_UP 紧急客户:URGENCY 交叉客户:REPEAT 意向客户:INTENTION 其他:OTHER
*/
public String getPmTypeType() {
return pmTypeType;
}
/**
* Sets the 客户分类类型 成单客户:SUCCESS 已放弃客户:GIVE_UP 紧急客户:URGENCY 交叉客户:REPEAT 意向客户:INTENTION 其他:OTHER .
*
* @param pmTypeType the new 客户分类类型 成单客户:SUCCESS 已放弃客户:GIVE_UP 紧急客户:URGENCY 交叉客户:REPEAT 意向客户:INTENTION 其他:OTHER
*/
public void setPmTypeType(String pmTypeType) {
this.pmTypeType = pmTypeType;
}
/**
* Gets the 客户分类维度 商户:MERCHANT 导购:GUID .
*
* @return the 客户分类维度 商户:MERCHANT 导购:GUID
*/
public String getPmTypeDim() {
return pmTypeDim;
}
/**
* Sets the 客户分类维度 商户:MERCHANT 导购:GUID .
*
* @param pmTypeDim the new 客户分类维度 商户:MERCHANT 导购:GUID
*/
public void setPmTypeDim(String pmTypeDim) {
this.pmTypeDim = pmTypeDim;
}
/**
* Gets the 状态 启用:Y 停用:N .
*
* @return the 状态 启用:Y 停用:N
*/
public String getStatus() {
return status;
}
/**
* Sets the 状态 启用:Y 停用:N .
*
* @param status the new 状态 启用:Y 停用:N
*/
public void setStatus(String status) {
this.status = status;
}
/**
* Gets the 创建人 .
*
* @return the 创建人
*/
public String getCreateId() {
return createId;
}
/**
* Sets the 创建人 .
*
* @param createId the new 创建人
*/
public void setCreateId(String createId) {
this.createId = createId;
}
/**
* Gets the 备注 .
*
* @return the 备注
*/
public String getRemark() {
return remark;
}
/**
* Sets the 备注 .
*
* @param remark the new 备注
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* Gets the 备注 .
*
* @return the 备注
*/
public String getRemark2() {
return remark2;
}
/**
* Sets the 备注 .
*
* @param remark2 the new 备注
*/
public void setRemark2(String remark2) {
this.remark2 = remark2;
}
/**
* Gets the 备注 .
*
* @return the 备注
*/
public String getRemark3() {
return remark3;
}
/**
* Sets the 备注 .
*
* @param remark3 the new 备注
*/
public void setRemark3(String remark3) {
this.remark3 = remark3;
}
/**
* Gets the 备注 .
*
* @return the 备注
*/
public String getRemark4() {
return remark4;
}
/**
* Sets the 备注 .
*
* @param remark4 the new 备注
*/
public void setRemark4(String remark4) {
this.remark4 = remark4;
}
/**
* Gets the 频率 小时.
*
* @return the 频率 小时
*/
public String getFreValue() {
return freValue;
}
/**
* Sets the 频率 小时.
*
* @param freValue the new 频率 小时
*/
public void setFreValue(String freValue) {
this.freValue = freValue;
}
/**
* Gets the 排序 .
*
* @return the 排序
*/
public Integer getSeq() {
return seq;
}
/**
* Sets the 排序 .
*
* @param seq the new 排序
*/
public void setSeq(Integer seq) {
this.seq = seq;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("UpdatePmType [code=");
builder.append(code);
builder.append(", merchantNo=");
builder.append(merchantNo);
builder.append(", memberNo=");
builder.append(memberNo);
builder.append(", memberName=");
builder.append(memberName);
builder.append(", typeName=");
builder.append(typeName);
builder.append(", pmTypeType=");
builder.append(pmTypeType);
builder.append(", pmTypeDim=");
builder.append(pmTypeDim);
builder.append(", status=");
builder.append(status);
builder.append(", seq=");
builder.append(seq);
builder.append(", createId=");
builder.append(createId);
builder.append(", remark=");
builder.append(remark);
builder.append(", remark2=");
builder.append(remark2);
builder.append(", remark3=");
builder.append(remark3);
builder.append(", remark4=");
builder.append(remark4);
builder.append(", freValue=");
builder.append(freValue);
builder.append(", oldPmTypeName=");
builder.append(oldPmTypeName);
builder.append("]");
return builder.toString();
}
}
|
[
"37724558+wo510751575@users.noreply.github.com"
] |
37724558+wo510751575@users.noreply.github.com
|
8638914a4a19febbb48b634dc3473ee35907e63e
|
c15c02d6687cb77c9ff84be71822e8e4783baaef
|
/android/app/src/main/java/com/engine/privatefood/activity/RegistActivity.java
|
3ec7f0b2f7f28bd5d665fc1fa8347f1d24f1719c
|
[] |
no_license
|
lovekill/oto
|
9ec9a1dbc84662ea64f9c88f37a80cbd170f4085
|
291c0efb1ebd2cd375e54050a208e9aaeb807cb3
|
refs/heads/master
| 2021-01-10T07:37:58.922766
| 2016-03-28T10:03:14
| 2016-03-28T10:03:14
| 53,233,859
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,062
|
java
|
package com.engine.privatefood.activity;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.view.View;
import android.view.accessibility.AccessibilityManager;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Toast;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.engine.privatefood.R;
import com.engine.privatefood.UserManager;
import com.engine.privatefood.api.otoapi.RegistApi;
import com.engine.privatefood.bean.UserBean;
import com.squareup.otto.Subscribe;
/**
* Created by engine on 16/3/10.
*/
public class RegistActivity extends BaseActivity {
@Bind(R.id.userName)
EditText userName;
@Bind(R.id.password)
EditText password;
@Bind(R.id.password2)
EditText password2;
@Bind(R.id.normalUser)
RadioButton normalUser;
@Bind(R.id.businessUser)
RadioButton businessUser;
@Bind(R.id.userTypeGroup)
RadioGroup userTypeGroup;
private int userType=1 ;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fragment_regist);
ButterKnife.bind(this);
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle("注册");
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setHomeButtonEnabled(true);
userTypeGroup.setOnCheckedChangeListener(onCheckedChangeListener);
}
private RadioGroup.OnCheckedChangeListener onCheckedChangeListener=new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i) {
if (i==R.id.normalUser){
userType=1;
}else {
userType=2;
}
}
};
private boolean validateUserNameAndPassword(){
String name = userName.getText().toString().trim();
String p1=password.getText().toString();
String p2 = password2.getText().toString();
if (name.length()<0||name.length()>16){
Toast.makeText(this,"用户名必须在0到16位",Toast.LENGTH_SHORT).show();
return false;
}
if (!p1.equals(p2)){
Toast.makeText(this,"密码不一致,请重新确认",Toast.LENGTH_SHORT).show();
return false;
}
return true;
}
@OnClick(R.id.doRegist)
public void doRegist(View view){
if (validateUserNameAndPassword()){
RegistApi registApi = new RegistApi();
registApi.userName=userName.getText().toString().trim();
registApi.password=password.getText().toString();
registApi.userType=userType;
registApi.execute();
}
}
@Subscribe
public void registResponse(RegistApi api){
UserBean userBean = api.getModel();
if (userBean!=null){
UserManager.getInstance(this).saveUser(userBean);
finish();
}
}
}
|
[
"lihongbo2011@gmail.com"
] |
lihongbo2011@gmail.com
|
3573e4394f07db16467b0eabdbdb426446c94ea2
|
5f6edf313639dbe464a1c9cbb62762b427786235
|
/crm/src/com/naswork/model/Income.java
|
c38dddd01f2a6574b90a94ab084cf107ca861e35
|
[] |
no_license
|
magicgis/outfile
|
e69b785cd14ce7cb08d93d0f83b3f4c0b435b17b
|
497635e2cd947811bf616304e9563e59f0ab4f56
|
refs/heads/master
| 2020-05-07T19:24:08.371572
| 2019-01-23T04:57:18
| 2019-01-23T04:57:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,704
|
java
|
package com.naswork.model;
import java.util.Date;
public class Income {
private Double uncollected;
private Double invoiceSum;
private Integer id;
private Integer clientOrderId;
private Date receiveDate;
private Double totalSum;
private String remark;
private Date updateTimestamp;
private String refNumber;
private Integer clientInvoiceId;
private Double total;
private Double totalCount;
private String invoiceNumber;
private String orderNumber;
public Integer getId() {
return id;
}
public Double getInvoiceSum() {
return invoiceSum;
}
public void setInvoiceSum(Double invoiceSum) {
this.invoiceSum = invoiceSum;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getClientOrderId() {
return clientOrderId;
}
public void setClientOrderId(Integer clientOrderId) {
this.clientOrderId = clientOrderId;
}
public Date getReceiveDate() {
return receiveDate;
}
public void setReceiveDate(Date receiveDate) {
this.receiveDate = receiveDate;
}
public Double getTotalSum() {
return totalSum;
}
public void setTotalSum(Double totalSum) {
this.totalSum = totalSum;
}
public String getRemark() {
return remark;
}
public Double getUncollected() {
return uncollected;
}
public void setUncollected(Double uncollected) {
this.uncollected = uncollected;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Date getUpdateTimestamp() {
return updateTimestamp;
}
public void setUpdateTimestamp(Date updateTimestamp) {
this.updateTimestamp = updateTimestamp;
}
public String getRefNumber() {
return refNumber;
}
public void setRefNumber(String refNumber) {
this.refNumber = refNumber;
}
public Integer getClientInvoiceId() {
return clientInvoiceId;
}
public void setClientInvoiceId(Integer clientInvoiceId) {
this.clientInvoiceId = clientInvoiceId;
}
public Double getTotal() {
return total;
}
public void setTotal(Double total) {
this.total = total;
}
public Double getTotalCount() {
return totalCount;
}
public void setTotalCount(Double totalCount) {
this.totalCount = totalCount;
}
public String getInvoiceNumber() {
return invoiceNumber;
}
public void setInvoiceNumber(String invoiceNumber) {
this.invoiceNumber = invoiceNumber;
}
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
}
|
[
"942364283@qq.com"
] |
942364283@qq.com
|
b22bfad53513b47542a6e14b87a885e234ffd26f
|
d1d021f2f70e7c415a1ec02aa5d37e3dd3c73255
|
/Java Fundamentals September 2017/Java OOP Advanced/Exam/02. Input Output/factory/TargetableFactoryImpl.java
|
d38931569c72efb11ec15ae182a10e9280f03149
|
[] |
no_license
|
MartinRavanov72/Softuni
|
92f3a1f6ef747a37f4cc69d75619336dd2e26151
|
7ec9e64fd23e700b7840c9ad05e0e4eb044bfb90
|
refs/heads/master
| 2022-12-30T00:54:21.993884
| 2021-02-18T15:02:13
| 2021-02-18T15:02:13
| 210,897,550
| 0
| 0
| null | 2022-12-22T19:21:37
| 2019-09-25T17:02:37
|
Java
|
UTF-8
|
Java
| false
| false
| 1,237
|
java
|
package app.factory;
import app.contracts.Targetable;
import app.contracts.TargetableFactory;
import app.models.participants.Boss;
import app.models.participants.Necromancer;
import app.models.participants.Warrior;
import app.models.participants.Wizard;
import java.lang.reflect.InvocationTargetException;
public class TargetableFactoryImpl implements TargetableFactory{
@Override
public Targetable create(String name, String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException {
Targetable targetable = null;
switch (className){
case "Boss":
targetable = new Boss();
targetable.setName(name);
break;
case "Necromancer":
targetable = new Necromancer();
targetable.setName(name);
break;
case "Warrior":
targetable = new Warrior();
targetable.setName(name);
break;
case "Wizard":
targetable = new Wizard();
targetable.setName(name);
break;
}
return targetable;
}
}
|
[
"m.ravanov@gmail.com"
] |
m.ravanov@gmail.com
|
0b323eb06f6d48600aeb2f91b87af698a8fcb7d9
|
e6d7727f309768b5987bc3976f9a4f60c79833a2
|
/BriskBenchmarks/src/main/java/brisk/components/operators/api/Checkpointable.java
|
e137df56235be62e3fc8dca6cef636b325e1de49
|
[
"Apache-2.0"
] |
permissive
|
aqifhamid786/briskstream
|
2eab0b2c5789b1978c5bffb8e821dbf1a21e30d2
|
05c591f6df59c6e06797c58eb431a52d160bc724
|
refs/heads/master
| 2023-05-09T21:53:46.263197
| 2019-06-23T15:24:44
| 2019-06-23T15:24:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 897
|
java
|
package brisk.components.operators.api;
import brisk.execution.runtime.tuple.impl.Marker;
import java.util.concurrent.BrokenBarrierException;
public interface Checkpointable {
boolean checkpoint(int counter) throws InterruptedException, BrokenBarrierException;
void forward_checkpoint(int sourceId, long bid, Marker marker) throws InterruptedException;
void forward_checkpoint_single(int sourceId, long bid, Marker marker) throws InterruptedException;
void forward_checkpoint_single(int sourceTask, String streamId, long bid, Marker marker) throws InterruptedException;
void forward_checkpoint(int sourceTask, String streamId, long bid, Marker marker) throws InterruptedException;
/**
* Optionally relax_reset state before marker.
*
* @param marker
*/
void ack_checkpoint(Marker marker);
void earlier_ack_checkpoint(Marker marker);
}
|
[
"IDSZS@nus.edu.sg"
] |
IDSZS@nus.edu.sg
|
1881a28b06c2346e5966a54a3a1a3f12e2df3a04
|
8f38b9bb7d99d97937889d2d2feb0287bbc5ff97
|
/src/mediastore/web/action/ChangeStoreBillAction.java
|
335c33b9b5fee2a6544b38d6584958abcf1e6660
|
[] |
no_license
|
arbor1979/steel
|
3818e286f167d54b92f4ba3f75dfdfc7e2487434
|
818c62310a76ab5a07f24acde8aa97a95cba9b9e
|
refs/heads/master
| 2021-01-19T11:45:06.616633
| 2017-08-24T14:55:08
| 2017-08-24T14:55:08
| 82,261,346
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 4,703
|
java
|
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: ExportGoodsBillShowAction.java
package mediastore.web.action;
import java.util.List;
import mediastore.dao.GoodsInfo;
import mediastore.dao.GoodsStoreGoods;
import mediastore.dao.GoodsStoreInfo;
import mediastore.user.StoreManager;
import mediastore.util.oConvert;
import mediastore.web.form.ChangeStoreBillForm;
import mediastore.web.form.ChangeStoreGoodsForm;
import mediastore.web.form.ErrorMsgFB;
import mediastore.web.form.GoodsInfoForm;
import mediastore.web.form.UserInfoForm;
import mediastore.web.global.Globals;
import mediastore.web.struts.AbstractAction;
import mediastore.web.struts.ActionContext;
import org.apache.struts.action.ActionForward;
public class ChangeStoreBillAction extends AbstractAction
{
public ChangeStoreBillAction()
{
}
//转仓单录入
public ActionForward execute(ActionContext actionContext)
{
try
{
String param = oConvert.getString(actionContext.getParameter("param"),"list");
int selectmode = oConvert.getInt((String)actionContext.getParameter("selectmode"),1);
ChangeStoreGoodsForm gif=(ChangeStoreGoodsForm)actionContext.getForm();
if(gif==null)
gif=new ChangeStoreGoodsForm();
UserInfoForm ctx = (UserInfoForm)actionContext.getSession().getAttribute(Globals.SESSION_CONTEXT);
gif.setCreatePerson(ctx.getUserName());
gif.setDeptid(ctx.getDeptid());
GoodsStoreInfo geinfo = new GoodsStoreInfo();
GoodsStoreGoods geg = new GoodsStoreGoods();
if(param.equals("add"))
{
GoodsInfo gi=new GoodsInfo();
GoodsInfoForm g=gi.getGoodsInfoByGoodsId(gif.getGoodsId());
//插入入库明细表
if(g==null)
throw new Exception("不存在此编号的产品");
if(gif.getFromstore()==0)
gif.setFromstore(gif.getStoreId());
double kucun=gi.getRepertoryAmount(gif.getGoodsId(),gif.getFromstore());
gif.setCurRepertory(kucun);
gif.setGoodsName(g.getGoodsTypeName());
gif.setChangeNum(0);
gif.setChangeAmount(0);
geg.insertNewGoodsRec(gif);
}
else if(param.equals("del"))
{
geg.deleteGoodsRec(gif);
}
else if(param.equals("updateNum"))
{
if(gif.getChangeNum()<=0)
throw new Exception("数量必须大于0");
geg.updateChangeNum(gif);
}
else if(param.equals("updateAmount"))
{
if(gif.getChangeAmount()<=0)
throw new Exception("重量必须大于0");
geg.updateChangeAmount(gif);
}
else if(param.equals("delAll"))
{
geg.deleteAllGoods(gif);
}
else if(param.equals("submit"))
{
geinfo.insertNewBillRec(gif);
actionContext.getResponse().sendRedirect("changeStoreItemsView.do?billId="+gif.getBillId()+"&deptid="+gif.getDeptid()+"&ifprint=1");
return null;
}
else if(param.equals("update"))
{
int fromstore=oConvert.getInt((String)actionContext.getParameter("fromstore"), 0);
int tostore=oConvert.getInt((String)actionContext.getParameter("tostore"), 0);
if(fromstore>0 && tostore>0 && fromstore==tostore)
throw new Exception("转出、转入仓库不能相同");
geinfo.UpdateBillRec(gif.getBillId(), gif.getDeptid(), fromstore, tostore, gif.getMemo());
}
int maxBillId = geinfo.getTempBillIDNum(ctx.getUserName(),gif.getDeptid());
List goodsList = geg.getGoodsList(maxBillId,gif.getDeptid());
StoreManager sm=new StoreManager();
List StoreList = sm.getDepartList("id",ctx.getDeptid());
ChangeStoreBillForm cbf=geinfo.getChangeStoreBillById(maxBillId,ctx.getDeptid());
actionContext.getRequest().setAttribute("cbf", cbf);
actionContext.getRequest().setAttribute("StoreList", StoreList);
actionContext.getRequest().setAttribute("goodsList", goodsList);
actionContext.getRequest().setAttribute("selectmode", String.valueOf(selectmode));
return actionContext.getMapping().findForward("ChangeStoreBill");
}
catch(Exception e)
{
ErrorMsgFB ef=new ErrorMsgFB();
ef.setSource(e.getMessage());
ef.seturl("changeStoreBill.do");
actionContext.getRequest().setAttribute(Globals.REQUEST_ERRORS, ef);
return actionContext.getMapping().findForward("Errors");
}
}
}
|
[
"qiaolin197903@qq.com"
] |
qiaolin197903@qq.com
|
5afa2ba4cafec76c7551816bce4b3fcff41b0d0e
|
90d4870d9a2c132b7b10b4ff6f5bf78a18ac994b
|
/org/shaded/apache/http/auth/AUTH.java
|
8017119fe4462084e5e809181d01f5ceaf5582e9
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
junpengwang/fire2.5.2
|
399aa13b6c326d97aa2c9c8dd72bef03464ad6cc
|
f82ed93de0da5f8d454a9b20c08533a916fc0db4
|
refs/heads/master
| 2016-09-13T16:33:27.944146
| 2016-05-25T12:44:52
| 2016-05-25T12:44:52
| 59,662,156
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 596
|
java
|
package org.shaded.apache.http.auth;
import org.shaded.apache.http.annotation.Immutable;
@Immutable
public final class AUTH
{
public static final String WWW_AUTH = "WWW-Authenticate";
public static final String WWW_AUTH_RESP = "Authorization";
public static final String PROXY_AUTH = "Proxy-Authenticate";
public static final String PROXY_AUTH_RESP = "Proxy-Authorization";
}
/* Location: /Users/junpengwang/Downloads/Download/firebase-client-android-2.5.2.jar!/org/shaded/apache/http/auth/AUTH.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/
|
[
"wangjunpeng@wilddog.com"
] |
wangjunpeng@wilddog.com
|
c6883e00376e66038b4c70d3f4cc4ee0f18352a8
|
7eaaaebb3ec31f8444ed840787ebf505c61d493c
|
/src/com/class18/Task.java
|
68ee49db48a99e9e532f9865dce262315b18e429
|
[] |
no_license
|
Aynagozel/JavaClasses1
|
ccc6dd93895ce9a936f5b582ecc3ca573efc3378
|
1b3b86dd972568392c14e7cba10fb2fcc6a00bc5
|
refs/heads/master
| 2022-04-16T20:46:26.609544
| 2020-04-11T20:37:59
| 2020-04-11T20:37:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 374
|
java
|
package com.class18;
public class Task {
void maximum(int a, int b) {
int max;
if (a>b) {
max=a;
}else {
max=b;
}
System.out.println("The max num is " + max);
}
public static void main(String[] args) {
Task max = new Task ();
max.maximum(5,2);
}
}
|
[
"aynaalty@gmail.com"
] |
aynaalty@gmail.com
|
935285f73abff40735b495aeff9d56a7371a72cc
|
f490119b5f7eea314c3049fc212ff77dd29a1e67
|
/core/src/main/java/com/alibaba/alink/pipeline/recommendation/ItemCfItemsPerUserRecommender.java
|
971ad375e64c8a432acd4bd2e66d5d9d217b0f6b
|
[
"Apache-2.0"
] |
permissive
|
lethetann/Alink
|
b4cb3ddab211baa77e3a93a9b099ddcde662b903
|
a483a8a25ecd136ad4e18709c17c5a242c7e76fa
|
refs/heads/master
| 2021-10-27T17:11:40.158889
| 2021-10-08T10:05:41
| 2021-10-08T10:05:41
| 229,357,943
| 0
| 0
|
Apache-2.0
| 2020-08-06T01:30:39
| 2019-12-21T00:55:32
|
Java
|
UTF-8
|
Java
| false
| false
| 814
|
java
|
package com.alibaba.alink.pipeline.recommendation;
import org.apache.flink.ml.api.misc.param.Params;
import com.alibaba.alink.operator.common.recommendation.ItemCfRecommKernel;
import com.alibaba.alink.operator.common.recommendation.RecommType;
import com.alibaba.alink.params.recommendation.BaseItemsPerUserRecommParams;
/**
* Recommend items for user with itemCF model.
*/
public class ItemCfItemsPerUserRecommender
extends BaseRecommender <ItemCfItemsPerUserRecommender>
implements BaseItemsPerUserRecommParams <ItemCfItemsPerUserRecommender> {
private static final long serialVersionUID = -479183577740169370L;
public ItemCfItemsPerUserRecommender() {
this(null);
}
public ItemCfItemsPerUserRecommender(Params params) {
super(ItemCfRecommKernel::new, RecommType.ITEMS_PER_USER, params);
}
}
|
[
"xuyang1706@gmail.com"
] |
xuyang1706@gmail.com
|
92a7b85a280b917a4ca58f54a292a1b802a16f36
|
c80aa86f871871c0c11a3b416e87a96dfd0d449f
|
/easy-cloud-parent/easy-cloud-core/src/main/java/com/easy/cloud/core/jdbc/vo/druid/EcDruidDataSourceBO.java
|
2b2583a8e1e1c9851c6dcb7fc16a5afb3f0202ca
|
[
"MIT"
] |
permissive
|
Mr-Vincent/dq-easy-cloud
|
4c054d4278ed8160472b631503252e07cee99ee4
|
b9ebc429539ec390775f7cdf65f4855da8ee405e
|
refs/heads/master
| 2020-03-07T02:50:26.791797
| 2018-04-06T09:35:41
| 2018-04-06T09:35:41
| 127,218,991
| 0
| 0
|
MIT
| 2018-04-21T08:48:24
| 2018-03-29T01:25:07
|
Java
|
UTF-8
|
Java
| false
| false
| 2,714
|
java
|
package com.easy.cloud.core.jdbc.vo.druid;
import javax.sql.DataSource;
import org.springframework.core.env.Environment;
import com.alibaba.druid.pool.DruidDataSource;
import com.easy.cloud.core.basic.utils.EcBaseUtils;
import com.easy.cloud.core.jdbc.vo.EcAbstractDataSourceBO;
/**
*
* @ClassName : DqDruidDataSourceBO
* @Description : druid的数据配置信息BO
* @author daiqi
* @date 2017年12月6日 上午10:09:13
*
*/
public class EcDruidDataSourceBO extends EcAbstractDataSourceBO{
private DruidDataSource druidDataSource;
/**
*
* <p></p>
*
* <pre>
* </pre>
*
* @return
* @author daiqi
* @date 2017年12月6日 上午11:29:52
*/
public static EcDruidDataSourceBO newInstance(){
return new EcDruidDataSourceBO();
}
/**
*
* <p>从传入的Environment中获取属性</p>
*
* <pre>
* </pre>
*
* @param environment
* @return
* @author daiqi
* @date 2017年12月6日 下午3:54:56
*/
private static EcDruidDataSourceBO newInstance(Environment environment){
return new EcDruidDataSourceBO(environment);
}
/**
*
* <p>读取配置文件获取单例的数据源</p>
*
* <pre></pre>
*
* @param environment : 传入读取配置文件的对象
* @return DataSource
*
* author daiqi
* 创建时间 2018年1月6日 下午3:45:58
*/
public static DataSource getSingleDataSource(Environment environment){
return newInstance(environment).getDataSource();
}
private EcDruidDataSourceBO(Environment environment) {
super(environment);
}
private EcDruidDataSourceBO() {
super();
}
@Override
protected void initActualDataSourceBean() {
this.druidDataSource = new DruidDataSource();
}
@Override
protected void initDataSourceLinkInfo() {
super.initDataSourceLinkInfo();
if(EcBaseUtils.isNull(this.druidDataSource)){
return ;
}
this.druidDataSource.setUrl(url);
this.druidDataSource.setUsername(username);
this.druidDataSource.setPassword(password);
this.druidDataSource.setDriverClassName(driverClassName);
}
@Override
protected void initDataSourceParamsInfo() {
super.initDataSourceParamsInfo();
if(EcBaseUtils.isNull(this.druidDataSource)){
return ;
}
this.druidDataSource.setInitialSize(initialSize);
this.druidDataSource.setMaxActive(maxActive);
this.druidDataSource.setMinIdle(minIdle);
this.druidDataSource.setMaxWait(maxWait);
this.druidDataSource.setValidationQuery(validationQuery);
this.druidDataSource.setTestOnBorrow(testOnBorrow);
this.druidDataSource.setTestWhileIdle(testWhileIdle);
this.druidDataSource.setPoolPreparedStatements(poolPreparedStatements);
}
@Override
public void initDataSourceBean() {
dataSource = druidDataSource;
}
}
|
[
"466608943@qq.com"
] |
466608943@qq.com
|
83874ff30f4c9e3231925f68ed79022c8ea32420
|
90601cfdec064b48a7e881e4f6281355e6d8b4a1
|
/game_server/src/com/gameserver/mail/handler/MailHandlerFactory.java
|
53d5088cddf82ec15a3915c7ff925557fdbe9a8c
|
[] |
no_license
|
npf888/game
|
86a6e63e2e055d997af43e7fbb655c892a399dbb
|
f73eec261e17ec5a09950cf6b5b172e02dc8dde0
|
refs/heads/master
| 2020-03-21T22:33:56.413814
| 2018-06-29T10:57:54
| 2018-06-29T10:57:54
| 139,134,346
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 496
|
java
|
package com.gameserver.mail.handler;
/**
* 邮件消息工厂
* @author Thinker
*
*/
public class MailHandlerFactory
{
/** 消息处理器 */
private static MailMessageHandler handler = new MailMessageHandler();
private static MailRedisMessageHandler redisHandler = new MailRedisMessageHandler();
public static MailMessageHandler getHandler()
{
return handler;
}
public static MailRedisMessageHandler getRedisHandler()
{
return redisHandler;
}
}
|
[
"npf888@126.com"
] |
npf888@126.com
|
f390adcf19bd6642e7c48c68ac380d2cac1099a3
|
c7e7a66589c2d317990474a4bacda6f63bfc64d1
|
/consumer-bak/src/test/java/top/cardone/func/v1/usercenter/userOrg/C0003FuncTest.java
|
08bdfb406efa38659724df5d00472836f48036ed
|
[] |
no_license
|
yht-fand/cardone-usercenter
|
8cabba7d83e3355d7ba4c2dcd5d7d8078f9b92e1
|
fb772fe7baa6d90d09b622d49ecccb626bf6c833
|
refs/heads/master
| 2021-01-16T22:03:18.874986
| 2019-01-02T02:54:03
| 2019-01-02T02:54:03
| 48,280,884
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,245
|
java
|
package top.cardone.func.v1.usercenter.userOrg;
import com.google.common.base.Charsets;
import com.google.common.collect.Maps;
import com.google.gson.Gson;
import top.cardone.ConsumerApplication;
import lombok.extern.log4j.Log4j2;
import lombok.val;
import org.apache.commons.io.FileUtils;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.CollectionUtils;
import top.cardone.context.ApplicationContextHolder;
import java.util.Map;
@Log4j2
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = ConsumerApplication.class, value = {"spring.profiles.active=test"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
public class C0003FuncTest {
@Value("http://localhost:${server.port:8765}${server.servlet.context-path:}/v1/usercenter/userOrg/c0003.json")
private String funcUrl;
@Value("file:src/test/resources/top/cardone/func/v1/usercenter/userOrg/C0003FuncTest.func.input.json")
private Resource funcInputResource;
@Value("file:src/test/resources/top/cardone/func/v1/usercenter/userOrg/C0003FuncTest.func.output.json")
private Resource funcOutputResource;
@Test
public void func() throws Exception {
if (!funcInputResource.exists()) {
FileUtils.write(funcInputResource.getFile(), "{}", Charsets.UTF_8);
}
val input = FileUtils.readFileToString(funcInputResource.getFile(), Charsets.UTF_8);
Map<String, Object> parametersMap = ApplicationContextHolder.getBean(Gson.class).fromJson(input, Map.class);
Assert.assertFalse("输入未配置", CollectionUtils.isEmpty(parametersMap));
Map<String, Object> output = Maps.newLinkedHashMap();
for (val parametersEntry : parametersMap.entrySet()) {
val body = ApplicationContextHolder.getBean(Gson.class).toJson(parametersEntry.getValue());
val headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
headers.set("Accept", MediaType.APPLICATION_JSON_UTF8_VALUE);
headers.set("collectionStationCodeForToken", parametersEntry.getKey().split(":")[0]);
headers.set("token", ApplicationContextHolder.getBean(org.apache.shiro.authc.credential.PasswordService.class).encryptPassword(headers.get("collectionStationCodeForToken").get(0)));
val httpEntity = new HttpEntity<>(body, headers);
val json = new org.springframework.boot.test.web.client.TestRestTemplate().postForObject(funcUrl, httpEntity, String.class);
val value = ApplicationContextHolder.getBean(Gson.class).fromJson(json, Map.class);
output.put(parametersEntry.getKey(), value);
}
FileUtils.write(funcOutputResource.getFile(), ApplicationContextHolder.getBean(Gson.class).toJson(output), Charsets.UTF_8);
}
}
|
[
"addday@gmail.com"
] |
addday@gmail.com
|
3f325818332e9bc0bd432a453909a79e86207c56
|
e294196964464b5955bc19443c08b46cd3a6663f
|
/src/main/java/quickfix/field/TargetPartyIDSource.java
|
bcf35c8fc025e39f3379b169f6cd6992d483fce5
|
[] |
no_license
|
fortexjava/ftquickfix
|
acb910e42c77c78f3802289f7ec0bc18f1caea5d
|
1a52a384bd7d013f77609c6f3441097b2a8b840e
|
refs/heads/master
| 2021-01-20T07:38:19.196683
| 2017-05-02T11:05:39
| 2017-05-02T11:05:39
| 90,023,265
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,167
|
java
|
/* Generated Java Source File */
/*******************************************************************************
* Copyright (c) quickfixengine.org All rights reserved.
*
* This file is part of the QuickFIX FIX Engine
*
* This file may be distributed under the terms of the quickfixengine.org
* license as defined by quickfixengine.org and appearing in the file
* LICENSE included in the packaging of this file.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
* THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE.
*
* See http://www.quickfixengine.org/LICENSE for licensing information.
*
* Contact ask@quickfixengine.org if any conditions of this licensing
* are not clear to you.
******************************************************************************/
package quickfix.field;
import quickfix.CharField;
public class TargetPartyIDSource extends CharField {
static final long serialVersionUID = 20050617;
public static final int FIELD = 1463;
public TargetPartyIDSource() {
super(1463);
}
public TargetPartyIDSource(char data) {
super(1463, data);
}
}
|
[
"22345195@qq.com"
] |
22345195@qq.com
|
4a8387ff25abb5d2d13927be24a8ea6957a63c47
|
01a23639a4edfe7ffb5330894d553de52368debe
|
/src/main/java/com/finlabs/finexa/dto/ClientUCCContactDetailsDTO.java
|
bbea44b166864be01d7c8d4144e357afaa2d3ff1
|
[] |
no_license
|
kaustubh-walokar/ClientService
|
47943e419482524127abf536f7a293cffb9af90d
|
579d8fc89b1df1f1101a75f98c92f6e5cf08f0de
|
refs/heads/master
| 2021-05-24T16:36:28.919663
| 2020-02-28T12:53:43
| 2020-02-28T12:53:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,095
|
java
|
package com.finlabs.finexa.dto;
public class ClientUCCContactDetailsDTO {
public String address;
public String city;
public String state;
public String country;
public String pincode;
public String mobile;
public String emailId;
public String foreignAddress;
public String foreignCity;
public String foreignState;
public String foreignCountry;
public String foreignPinCode;
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getPincode() {
return pincode;
}
public void setPincode(String pincode) {
this.pincode = pincode;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getEmailId() {
return emailId;
}
public void setEmailId(String emailId) {
this.emailId = emailId;
}
public String getForeignAddress() {
return foreignAddress;
}
public void setForeignAddress(String foreignAddress) {
this.foreignAddress = foreignAddress;
}
public String getForeignCity() {
return foreignCity;
}
public void setForeignCity(String foreignCity) {
this.foreignCity = foreignCity;
}
public String getForeignState() {
return foreignState;
}
public void setForeignState(String foreignState) {
this.foreignState = foreignState;
}
public String getForeignCountry() {
return foreignCountry;
}
public void setForeignCountry(String foreignCountry) {
this.foreignCountry = foreignCountry;
}
public String getForeignPinCode() {
return foreignPinCode;
}
public void setForeignPinCode(String foreignPinCode) {
this.foreignPinCode = foreignPinCode;
}
}
|
[
"nayak1jeet@gmail.com"
] |
nayak1jeet@gmail.com
|
b72dbe43297bf2a5fff68aa22fe81facb2a5d32a
|
278703a79a4f76b31c44f1188c8f6dd13400b130
|
/src/day27_array05/tools.java
|
c1fc1d43b4044b2b9402dced2fe8bb6d90c5e6da
|
[] |
no_license
|
Ardinaa/CytekSDET2
|
5394e972cc3b2f0511df4b4c5df76c5acd3130bf
|
a81d0b462d77622b04f108084c2703bc24118c53
|
refs/heads/master
| 2020-06-04T02:09:42.114164
| 2019-06-13T20:41:40
| 2019-06-13T20:41:40
| 191,828,646
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,184
|
java
|
package day27_array05;
public class tools {
public static void main(String[] args) {
// TODO Auto-generated method stub
/*
Java --> programming language
Selenium --> Test Automation
TestNG --> Testing tool
JUnit --> Testing tool
Cucumber --> BDD Style testing
Git --> Version control
Maven --> Building and execution for project
*/
String[] tools = {"JAVA","Selenium","TestNG",
"JUnit","Cucumber","Git","Maven"};
for(String tool : tools) {
switch(tool.toLowerCase()) {
case "java":
System.out.println("Java --> programming language");
break;
case "selenium":
System.out.println("Selenium --> Test Automation");
break;
case "testng":
case "junit":
System.out.println(tool+" --> Testing tool");
break;
case "cucumber":
System.out.println("Cucumber --> BDD Style testing");
break;
case "git":
System.out.println("Git --> Version control");
break;
case "maven":
System.out.println("Maven --> Building and execution for project");
break;
default:
System.out.println("Unknown tool");
}
}
}
}
|
[
"email"
] |
email
|
211b039c0e7b2e8bb5b9b5f48cc8b6c9aa76a96b
|
6f0027d205d58140fae053fc5a637c535521276d
|
/java-opensaml/opensaml-soap-impl/src/main/java/org/opensaml/ws/wstrust/impl/ForwardableBuilder.java
|
739331867537148dece076acba985daf56670531
|
[] |
no_license
|
murkhog/SAML-2.0
|
b8f5fbf91f68bc3d9cef05cda16d0121304c8e16
|
96363df652cff76cd7a04f200a7f58b988b7bfe7
|
refs/heads/master
| 2020-05-07T18:44:23.200028
| 2011-05-31T21:32:14
| 2011-05-31T21:32:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,257
|
java
|
/*
* Copyright 2008 Members of the EGEE Collaboration.
* Copyright 2008 University Corporation for Advanced Internet Development, 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.opensaml.ws.wstrust.impl;
import org.opensaml.ws.wstrust.Forwardable;
/**
* Builder for the Forwardable element.
*
*/
public class ForwardableBuilder extends AbstractWSTrustObjectBuilder<Forwardable> {
/** {@inheritDoc} */
public Forwardable buildObject() {
return buildObject(Forwardable.ELEMENT_NAME);
}
/** {@inheritDoc} */
public Forwardable buildObject(String namespaceURI, String localName, String namespacePrefix) {
return new ForwardableImpl(namespaceURI, localName, namespacePrefix);
}
}
|
[
"alex.objelean@gmail.com"
] |
alex.objelean@gmail.com
|
7bfd4dac6dbc41962e12fd1f2f991171e4f66b5b
|
fdd4cc6f8b5a473c0081af5302cb19c34433a0cf
|
/src/modules/agrega/visualizadorcontenidos/src/main/java/es/pode/visualizador/presentacion/faqs/ListadoFaqsCategoria.java
|
2faf35feb966c493769320d93f9661ebe826af7a
|
[] |
no_license
|
nwlg/Colony
|
0170b0990c1f592500d4869ec8583a1c6eccb786
|
07c908706991fc0979e4b6c41d30812d861776fb
|
refs/heads/master
| 2021-01-22T05:24:40.082349
| 2010-12-23T14:49:00
| 2010-12-23T14:49:00
| null | 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 2,929
|
java
|
// license-header java merge-point
package es.pode.visualizador.presentacion.faqs;
/**
*
*/
public final class ListadoFaqsCategoria extends org.apache.struts.action.Action
{
public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
{
final ListadoFaqsCategoriaFormImpl specificForm = (ListadoFaqsCategoriaFormImpl)form;
org.apache.struts.action.ActionForward forward = null;
try
{
forward = _cargaFaqs(mapping, form, request, response);
}
catch (java.lang.Exception exception)
{
// we populate the current form with only the request parameters
Object currentForm = request.getSession().getAttribute("form");
// if we can't get the 'form' from the session, try from the request
if (currentForm == null)
{
currentForm = request.getAttribute("form");
}
if (currentForm != null)
{
final java.util.Map parameters = new java.util.HashMap();
for (final java.util.Enumeration names = request.getParameterNames(); names.hasMoreElements();)
{
final String name = String.valueOf(names.nextElement());
parameters.put(name, request.getParameter(name));
}
try
{
org.apache.commons.beanutils.BeanUtils.populate(currentForm, parameters);
}
catch (java.lang.Exception populateException)
{
// ignore if we have an exception here (we just don't populate).
}
}
throw exception;
}
request.getSession().setAttribute("form", form);
return forward;
}
/**
* <p>
* Obtiene un listado de FAQs por idioma ordenados segun posición.
* Ademas, accede al servicio de Indexación para obtener los
* idiomas disponibles en el combo del buscador.
* </p>
*/
private org.apache.struts.action.ActionForward _cargaFaqs(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
{
org.apache.struts.action.ActionForward forward = null;
es.pode.visualizador.presentacion.faqs.FaqsControllerFactory.getFaqsControllerInstance().cargaFaqs(mapping, (ListadoFaqsCategoriaFormImpl)form, request, response);
forward = mapping.findForward("listado.faqs");
return forward;
}
}
|
[
"build@zeno.siriusit.co.uk"
] |
build@zeno.siriusit.co.uk
|
fc31ad023c424fe29bfd217d5f23c115e8fcd323
|
f43ef1add051d76fe84b0f69092ad305929116a5
|
/autotest/OldTests/src/test/java/com/tle/webtests/test/reporting/DisplayTextReportPage.java
|
2fab098d454be819fe36f4bd69c83e06a2d2e3b4
|
[
"Apache-2.0",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"EPL-1.0",
"LGPL-2.0-or-later",
"Classpath-exception-2.0",
"LicenseRef-scancode-jdom",
"ICU",
"Apache-1.1",
"LGPL-2.1-only",
"LicenseRef-scancode-other-permissive",
"GPL-1.0-or-later",
"CPL-1.0",
"CDDL-1.0",
"MIT",
"LicenseRef-scancode-freemarker",
"GPL-2.0-only",
"NetCDF",
"CDDL-1.1"
] |
permissive
|
PenghaiZhang/openEQUELLA
|
93d29f9dab013e2fa19a9a7ae4d71cac2c7269bb
|
c2da9954bd4768e785b3b2f281305c16936f4511
|
refs/heads/develop
| 2023-07-20T02:20:23.684651
| 2023-07-19T00:12:20
| 2023-07-19T00:12:20
| 207,188,550
| 0
| 0
|
Apache-2.0
| 2020-06-17T13:08:07
| 2019-09-08T23:51:30
|
Java
|
UTF-8
|
Java
| false
| false
| 705
|
java
|
package com.tle.webtests.test.reporting;
import com.tle.webtests.framework.PageContext;
import com.tle.webtests.pageobject.AbstractReport;
import org.openqa.selenium.By;
public class DisplayTextReportPage extends AbstractReport<DisplayTextReportPage> {
public DisplayTextReportPage(PageContext context) {
super(
context,
By.xpath(
"//div[text()='Param #1, should have the collection id (a number), then the name']"));
}
// Zero indexed
public String getReportValue(int index, boolean displayText) {
return driver
.findElement(
By.xpath("//tbody//tr[2]/td/span[" + (index * 4 + 2 + (displayText ? 2 : 0)) + "]"))
.getText();
}
}
|
[
"doolse@gmail.com"
] |
doolse@gmail.com
|
e4ee2452e6c002ccd10dc1243b4bf6114e1fa8b3
|
c753b739b8e5484c0251113b797c442ef0b3bb49
|
/src/org/greatfree/framework/cps/cache/coordinator/front/PeekSingleMyStoreDataQueueThread.java
|
bc77a56b9c25a698f66272fbd91ddbd4430f626c
|
[] |
no_license
|
640351963/Wind
|
144c0e9e9f3fdf3ee398f9f1a26a3434ca2dfabf
|
0493d95a1fa8de2de218e651e8ce16be00b8ba38
|
refs/heads/master
| 2023-05-03T03:17:06.737980
| 2021-05-22T19:24:41
| 2021-05-22T19:24:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,547
|
java
|
package org.greatfree.framework.cps.cache.coordinator.front;
import java.io.IOException;
import org.greatfree.concurrency.reactive.RequestQueue;
import org.greatfree.data.ServerConfig;
import org.greatfree.framework.cps.cache.coordinator.MyDistributedQueueStore;
import org.greatfree.framework.cps.cache.message.front.PeekSingleMyStoreDataQueueRequest;
import org.greatfree.framework.cps.cache.message.front.PeekSingleMyStoreDataQueueResponse;
import org.greatfree.framework.cps.cache.message.front.PeekSingleMyStoreDataQueueStream;
// Created: 08/14/2018, Bing Li
public class PeekSingleMyStoreDataQueueThread extends RequestQueue<PeekSingleMyStoreDataQueueRequest, PeekSingleMyStoreDataQueueStream, PeekSingleMyStoreDataQueueResponse>
{
public PeekSingleMyStoreDataQueueThread(int maxTaskSize)
{
super(maxTaskSize);
}
@Override
public void run()
{
PeekSingleMyStoreDataQueueStream request;
PeekSingleMyStoreDataQueueResponse response;
while (!this.isShutdown())
{
while (!this.isEmpty())
{
request = this.dequeue();
response = new PeekSingleMyStoreDataQueueResponse(MyDistributedQueueStore.MIDDLESTORE().dequeue(request.getMessage().getQueueKey()));
try
{
this.respond(request.getOutStream(), request.getLock(), response);
}
catch (IOException e)
{
e.printStackTrace();
}
this.disposeMessage(request, response);
}
try
{
this.holdOn(ServerConfig.REQUEST_THREAD_WAIT_TIME);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
}
}
}
|
[
"bing.li@asu.edu"
] |
bing.li@asu.edu
|
63aee47d4afbff2f27007712524fa21a0fbdec77
|
49fbe59e5dfe77cc51dac56decd554dd573b4791
|
/sparrow-test/src/test/java/com/sparrow/lesson/thread/read/write/lock/sync/TestReadLockState.java
|
6b62eff2a32beedbdae9ebbdde0404e0403cce37
|
[] |
no_license
|
sparrowzoo/sparrow-shell
|
de9da31967f45cbbe15885cd376d5c1d1e65ea4c
|
46738b407576bed02deca359f38075e7dc6d7e26
|
refs/heads/master
| 2023-07-21T21:00:13.386921
| 2023-07-19T15:30:12
| 2023-07-19T15:30:12
| 119,132,449
| 93
| 40
| null | 2023-07-08T03:48:14
| 2018-01-27T04:30:30
|
Java
|
UTF-8
|
Java
| false
| false
| 743
|
java
|
package com.sparrow.lesson.thread.read.write.lock.sync;
import com.sparrow.lesson.thread.read.write.lock.OuterSync;
public class TestReadLockState {
public static void main(String[] args) throws InterruptedException {
OuterSync.NonfairSync nonfairSync = new OuterSync.NonfairSync();
OuterSync.ReadLock readLock = new OuterSync.ReadLock(nonfairSync);
int threadSize = 10;
for (int i = 0; i < threadSize; i++) {
new Thread(readLock::lock).start();
}
int state = 0;
while (state != threadSize) {
state = OuterSync.NonfairSync.sharedCount(nonfairSync.getCount());
System.out.println((nonfairSync.getCount() >>> 16) + "-" + state);
}
}
}
|
[
"zh_harry@163.com"
] |
zh_harry@163.com
|
29a5225dc5480d09a3493e6b1838b93f0b0e49d8
|
d13e942b46aeb2c88b726aa438b987770eaba116
|
/Development of online data-driven monitoring methodologies and piloting analytical and monitoring tools by the State Audit Service of Ukraine/Risk Indicators/Back-End/elasticsearch-integration/src/main/java/com/datapath/elasticsearchintegration/ElasticInitRunner.java
|
41023e4454da790ab497075bfed5e30c547e6cef
|
[] |
no_license
|
EBRD-ProzorroA7-RiskIndicators-SASU/Ukraine-Development-of-online-data-driven-monitoring-methodologies-and-piloting-analytical-tools
|
7f01956b454cfb8f2fa7821e713898068c3db81f
|
2a67c467c878e57f1ee81aef3b49f409bd8e2658
|
refs/heads/main
| 2023-06-18T23:18:28.367265
| 2021-07-13T18:22:10
| 2021-07-13T18:22:10
| 333,778,176
| 0
| 0
| null | 2021-01-28T14:09:57
| 2021-01-28T14:09:56
| null |
UTF-8
|
Java
| false
| false
| 549
|
java
|
package com.datapath.elasticsearchintegration;
import com.datapath.elasticsearchintegration.services.TenderObjectsProvider;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
@Slf4j
@Component
public class ElasticInitRunner implements CommandLineRunner {
@Autowired
private TenderObjectsProvider provider;
@Override
public void run(String... args) {
provider.init();
}
}
|
[
"eduard.david9@gmail.com"
] |
eduard.david9@gmail.com
|
a750970e8b3d2dcc3a3fc3785dacf549cfd62afa
|
473fc28d466ddbe9758ca49c7d4fb42e7d82586e
|
/app/src/main/java/com/syd/source/aosp/cts/tests/tests/externalservice/common/src/android/externalservice/common/ServiceMessages.java
|
8d23bc04116c7cbcaf6bf11f7403c164efe7b86b
|
[] |
no_license
|
lz-purple/Source
|
a7788070623f2965a8caa3264778f48d17372bab
|
e2745b756317aac3c7a27a4c10bdfe0921a82a1c
|
refs/heads/master
| 2020-12-23T17:03:12.412572
| 2020-01-31T01:54:37
| 2020-01-31T01:54:37
| 237,205,127
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,521
|
java
|
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.externalservice.common;
import android.os.IBinder;
public class ServiceMessages {
// No arguments. Gets the UID and PID of the service.
public static final int MSG_IDENTIFY = IBinder.FIRST_CALL_TRANSACTION + 1;
// Response to MSG_IDENTIFY. arg1 is the UID, arg2 is the PID.
public static final int MSG_IDENTIFY_RESPONSE = MSG_IDENTIFY + 100;
// Bundle key in MSG_IDENTIFY_RESPONSE containing the package name.
public static final String IDENTIFY_PACKAGE = "packageName";
// No arguments. Starts an external service.
public static final int MSG_CREATE_EXTERNAL_SERVICE = IBinder.FIRST_CALL_TRANSACTION + 2;
// Responds to MSG_CREATE_EXTERNAL_SERVICE. obj is the IBinder on success, null on failure.
public static final int MSG_CREATE_EXTERNAL_SERVICE_RESPONSE =
MSG_CREATE_EXTERNAL_SERVICE + 100;
private ServiceMessages() {}
}
|
[
"997530783@qq.com"
] |
997530783@qq.com
|
93ee1630dc2ecaca41e539b3b3bb53b9607eed1f
|
2d0de05ba47ad7200e3091bad8b2fbf1dc127684
|
/Books-Code-Example/JavaHowToProgram/src/main/java/com/sayem/ch24/fig24_05_08/Client.java
|
e93255343b91a63e47fc267cc7fb79f2f1a2efe4
|
[] |
no_license
|
alvarozs/OnlineCode
|
10a05685ef515b42468521ae19a0e9e1061b49ad
|
c859d36c14520a11c1af31f12c20e89a19b4e24c
|
refs/heads/master
| 2021-01-22T01:04:42.278651
| 2013-07-24T03:16:12
| 2013-07-24T03:16:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,348
|
java
|
// Fig. 24.7: Client.java
// Client that reads and displays information sent from a Server.
import java.io.EOFException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.InetAddress;
import java.net.Socket;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
public class Client extends JFrame
{
private JTextField enterField; // enters information from user
private JTextArea displayArea; // display information to user
private ObjectOutputStream output; // output stream to server
private ObjectInputStream input; // input stream from server
private String message = ""; // message from server
private String chatServer; // host server for this application
private Socket client; // socket to communicate with server
// initialize chatServer and set up GUI
public Client( String host )
{
super( "Client" );
chatServer = host; // set server to which this client connects
enterField = new JTextField(); // create enterField
enterField.setEditable( false );
enterField.addActionListener(
new ActionListener()
{
// send message to server
public void actionPerformed( ActionEvent event )
{
sendData( event.getActionCommand() );
enterField.setText( "" );
} // end method actionPerformed
} // end anonymous inner class
); // end call to addActionListener
add( enterField, BorderLayout.NORTH );
displayArea = new JTextArea(); // create displayArea
add( new JScrollPane( displayArea ), BorderLayout.CENTER );
setSize( 300, 150 ); // set size of window
setVisible( true ); // show window
} // end Client constructor
// connect to server and process messages from server
public void runClient()
{
try // connect to server, get streams, process connection
{
connectToServer(); // create a Socket to make connection
getStreams(); // get the input and output streams
processConnection(); // process connection
} // end try
catch ( EOFException eofException )
{
displayMessage( "\nClient terminated connection" );
} // end catch
catch ( IOException ioException )
{
ioException.printStackTrace();
} // end catch
finally
{
closeConnection(); // close connection
} // end finally
} // end method runClient
// connect to server
private void connectToServer() throws IOException
{
displayMessage( "Attempting connection\n" );
// create Socket to make connection to server
client = new Socket( InetAddress.getByName( chatServer ), 12345 );
// display connection information
displayMessage( "Connected to: " +
client.getInetAddress().getHostName() );
} // end method connectToServer
// get streams to send and receive data
private void getStreams() throws IOException
{
// set up output stream for objects
output = new ObjectOutputStream( client.getOutputStream() );
output.flush(); // flush output buffer to send header information
// set up input stream for objects
input = new ObjectInputStream( client.getInputStream() );
displayMessage( "\nGot I/O streams\n" );
} // end method getStreams
// process connection with server
private void processConnection() throws IOException
{
// enable enterField so client user can send messages
setTextFieldEditable( true );
do // process messages sent from server
{
try // read message and display it
{
message = ( String ) input.readObject(); // read new message
displayMessage( "\n" + message ); // display message
} // end try
catch ( ClassNotFoundException classNotFoundException )
{
displayMessage( "\nUnknown object type received" );
} // end catch
} while ( !message.equals( "SERVER>>> TERMINATE" ) );
} // end method processConnection
// close streams and socket
private void closeConnection()
{
displayMessage( "\nClosing connection" );
setTextFieldEditable( false ); // disable enterField
try
{
output.close(); // close output stream
input.close(); // close input stream
client.close(); // close socket
} // end try
catch ( IOException ioException )
{
ioException.printStackTrace();
} // end catch
} // end method closeConnection
// send message to server
private void sendData( String message )
{
try // send object to server
{
output.writeObject( "CLIENT>>> " + message );
output.flush(); // flush data to output
displayMessage( "\nCLIENT>>> " + message );
} // end try
catch ( IOException ioException )
{
displayArea.append( "\nError writing object" );
} // end catch
} // end method sendData
// manipulates displayArea in the event-dispatch thread
private void displayMessage( final String messageToDisplay )
{
SwingUtilities.invokeLater(
new Runnable()
{
public void run() // updates displayArea
{
displayArea.append( messageToDisplay );
} // end method run
} // end anonymous inner class
); // end call to SwingUtilities.invokeLater
} // end method displayMessage
// manipulates enterField in the event-dispatch thread
private void setTextFieldEditable( final boolean editable )
{
SwingUtilities.invokeLater(
new Runnable()
{
public void run() // sets enterField's editability
{
enterField.setEditable( editable );
} // end method run
} // end anonymous inner class
); // end call to SwingUtilities.invokeLater
} // end method setTextFieldEditable
} // end class Client
/**************************************************************************
* (C) Copyright 1992-2007 by Deitel & Associates, Inc. and *
* Pearson Education, Inc. All Rights Reserved. *
* *
* DISCLAIMER: The authors and publisher of this book have used their *
* best efforts in preparing the book. These efforts include the *
* development, research, and testing of the theories and programs *
* to determine their effectiveness. The authors and publisher make *
* no warranty of any kind, expressed or implied, with regard to these *
* programs or to the documentation contained in these books. The authors *
* and publisher shall not be liable in any event for incidental or *
* consequential damages in connection with, or arising out of, the *
* furnishing, performance, or use of these programs. *
*************************************************************************/
|
[
"mohammad.hemel@gmail.com"
] |
mohammad.hemel@gmail.com
|
00ed1324fd2975985078cbfbd46f11f153a43d0f
|
a6d8b1662bf4c8a01ec7f2fafd58d85059d8c2f7
|
/src/main/java/org/panda/misc/ConvertRNAseqToZScores.java
|
8b2181c481065dacc398dee660e8f9b0a6512e4c
|
[] |
no_license
|
PathwayAndDataAnalysis/misc
|
216714baf8b091c97cbc6a18643040804ba98d6c
|
6b137cb4eabc596b2c9419c26893824a623c6c63
|
refs/heads/master
| 2021-11-09T06:18:40.026805
| 2021-09-10T02:22:06
| 2021-09-10T02:22:06
| 49,237,102
| 0
| 0
| null | 2021-04-26T19:20:52
| 2016-01-07T23:28:49
|
Java
|
UTF-8
|
Java
| false
| false
| 4,388
|
java
|
package org.panda.misc;
import org.panda.resource.tcga.ExpressionReader;
import org.panda.utility.FileUtil;
import org.panda.utility.statistics.ZScore;
import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.*;
/**
* This class takes an RNA-seq and a TCGA study to convert the first to Z-scores, using the distribution in the second.
*
* @author Ozgun Babur
*/
public class ConvertRNAseqToZScores
{
static final double LOG2 = Math.log(2D);
public static void main(String[] args) throws IOException
{
convertExternalFileComparingWithTCGA("/home/babur/Documents/TCGA/BRCA/expression.txt",
new int[]{2, 3}, "/home/babur/Documents/Analyses/SMMART/Patient1/SMMART-101-RNA-seq-rawcounts.txt",
1, "/home/babur/Documents/Analyses/SMMART/Patient1/SMMART-101-RNA-seq-Z-scores.txt");
}
public static void convertExternalFileComparingWithTCGA(String tcgaFile, int[] valIndex, String inFile,
int symIndex, String outFile) throws IOException
{
ExpressionReader er = new ExpressionReader(tcgaFile);
String[] samples = er.getSamples().toArray(new String[0]);
Map<String, double[]> distMap = new HashMap<>();
List<Map<String, Double>> valMaps = new ArrayList<>();
for (int i : valIndex)
{
valMaps.add(new HashMap<>());
}
Files.lines(Paths.get(inFile)).skip(1).map(l -> l.split("\t")).forEach(t ->
{
String sym = t[symIndex];
double[] dist = er.getGeneAlterationArray(sym, samples);
if (dist != null) dist = removeZeros(dist);
if (dist != null)
{
distMap.put(sym, dist);
for (int i = 0; i < valIndex.length; i++)
{
double val = log(Double.valueOf(t[valIndex[i]]) + 1);
valMaps.get(i).put(sym, val);
}
}
});
List<Map<String, Double>> zscores = new ArrayList<>();
for (Map<String, Double> valMap : valMaps)
{
zscores.add(ZScore.get(distMap, valMap, null));
}
String[] header = Files.lines(Paths.get(inFile)).findFirst().get().split("\t");
BufferedWriter writer = Files.newBufferedWriter(Paths.get(outFile));
writer.write(header[symIndex]);
for (int ind : valIndex)
{
writer.write("\t" + header[ind]);
}
distMap.keySet().stream().sorted().forEach(gene ->
{
FileUtil.lnwrite(gene, writer);
for (Map<String, Double> map : zscores)
{
FileUtil.write("\t" + map.get(gene), writer);
}
});
writer.close();
}
// public static void convertTCGAFile(String tcgaFile, String outFile) throws IOException
// {
// ExpressionReader er = new ExpressionReader(tcgaFile);
// String[] samples = er.getSamples().toArray(new String[0]);
//
// Map<String, double[]> distMap = new HashMap<>();
// List<Map<String, Double>> valMaps = new ArrayList<>();
// for (int i : valIndex)
// {
// valMaps.add(new HashMap<>());
// }
//
// Files.lines(Paths.get(inFile)).skip(1).map(l -> l.split("\t")).forEach(t ->
// {
// String sym = t[symIndex];
//
// double[] dist = er.getGeneAlterationArray(sym, samples);
// if (dist != null) dist = removeZeros(dist);
//
// if (dist != null)
// {
// distMap.put(sym, dist);
//
// for (int i = 0; i < valIndex.length; i++)
// {
// double val = log(Double.valueOf(t[valIndex[i]]) + 1);
// valMaps.get(i).put(sym, val);
// }
// }
// });
//
// List<Map<String, Double>> zscores = new ArrayList<>();
// for (Map<String, Double> valMap : valMaps)
// {
// zscores.add(ZScore.get(distMap, valMap, null));
// }
//
// String[] header = Files.lines(Paths.get(inFile)).findFirst().get().split("\t");
// BufferedWriter writer = Files.newBufferedWriter(Paths.get(outFile));
// writer.write(header[symIndex]);
// for (int ind : valIndex)
// {
// writer.write("\t" + header[ind]);
// }
//
// distMap.keySet().stream().sorted().forEach(gene ->
// {
// FileUtil.lnwrite(gene, writer);
//
// for (Map<String, Double> map : zscores)
// {
// FileUtil.write("\t" + map.get(gene), writer);
// }
// });
//
// writer.close();
// }
private static double log(double x)
{
return Math.log1p(x) / LOG2;
}
private static double[] removeZeros(double[] arr)
{
List<Double> list = new ArrayList<>();
for (double v : arr)
{
if (v > 0) list.add(v);
}
if (list.size() < 10) return null;
double[] v = new double[list.size()];
for (int i = 0; i < list.size(); i++)
{
v[i] = list.get(i);
}
return v;
}
}
|
[
"ozgunbabur@gmail.com"
] |
ozgunbabur@gmail.com
|
904afad7419c6a1b8d6bccb3b35d04708cf04193
|
b997ef6918f777535d52345537b8f2f5dfa592ed
|
/src/main/java/algorithm_practice/LeetCode/code700/E704_二分查找.java
|
b7255ffdc7d76020e0668773bae0be8b48069677
|
[] |
no_license
|
lemonlmlian/algorithms
|
6345661f184a051fcc8ff5b436f6314c326969c8
|
234165b4c76d3110cdb7c9d4a35f9e7c0d3a63c0
|
refs/heads/master
| 2023-07-19T23:49:36.637451
| 2021-08-31T22:16:43
| 2021-08-31T22:17:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,705
|
java
|
package algorithm_practice.LeetCode.code700;
import org.junit.Assert;
import org.junit.Test;
/*
给定一个 n 个元素有序的(升序)整型数组 nums 和一个目标值 target ,写一个函数搜索 nums 中的 target,如果目标值存在返回下标,否则返回 -1。
示例 1:
输入: nums = [-1,0,3,5,9,12], target = 9
输出: 4
解释: 9 出现在 nums 中并且下标为 4
示例 2:
输入: nums = [-1,0,3,5,9,12], target = 2
输出: -1
解释: 2 不存在 nums 中因此返回 -1
提示:
你可以假设 nums 中的所有元素是不重复的。
n 将在 [1, 10000]之间。
nums 的每个元素都将在 [-9999, 9999]之间。
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/binary-search
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
*/
public class E704_二分查找 {
@Test
public void testCase() {
int[] nums = new int[]{-1,0,3,5,9,12};
int target = 9;
int index = 4;
Assert.assertEquals(index, search(nums, target));
nums = new int[]{-1,0,3,5,9,12};
target = 2;
index = -1;
Assert.assertEquals(index, search(nums, target));
}
public int search(int[] nums, int target) {
int left = 0;
int right = nums.length - 1;
while (left < right) {
int mid = left + (right - left) / 2;
if (nums[mid] > target) {
right = mid;
} else if (nums[mid] == target) {
return mid;
} else if (nums[mid] < target) {
left = mid + 1;
}
}
return -1;
}
}
|
[
"tb178271@alibaba-inc.com"
] |
tb178271@alibaba-inc.com
|
cc8179df99f4f34ae09df2d4bdec74b7db540ba1
|
9cf4e2419a195613a502a4695e2344b4bc852545
|
/byte-buddy-benchmark/src/test/java/net/bytebuddy/benchmark/SuperClassInvocationBenchmarkTest.java
|
3bf018b031619cb999902098e280c9ce8d709f01
|
[
"Apache-2.0"
] |
permissive
|
cybernetics/byte-buddy
|
c3b10e80e26075824e6ac3e2d62d2ce1a73bc3f8
|
6ff835577230c1a5e073159c8f5e906364cdea8d
|
refs/heads/master
| 2021-01-16T19:29:46.425250
| 2014-07-14T12:16:48
| 2014-07-14T12:16:48
| 22,251,467
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,052
|
java
|
package net.bytebuddy.benchmark;
import org.junit.Before;
import org.junit.Test;
public class SuperClassInvocationBenchmarkTest extends AbstractBlackHoleTest {
private SuperClassInvocationBenchmark superClassInvocationBenchmark;
@Before
public void setUp() throws Exception {
superClassInvocationBenchmark = new SuperClassInvocationBenchmark();
superClassInvocationBenchmark.setUp();
}
@Test
public void testByteBuddyWithAnnotationsBenchmark() throws Exception {
superClassInvocationBenchmark.benchmarkByteBuddyWithAnnotations(blackHole);
}
@Test
public void testByteBuddySpecializedBenchmark() throws Exception {
superClassInvocationBenchmark.benchmarkByteBuddySpecialized(blackHole);
}
@Test
public void testCglibBenchmark() throws Exception {
superClassInvocationBenchmark.benchmarkCglib(blackHole);
}
@Test
public void testJavassistBenchmark() throws Exception {
superClassInvocationBenchmark.benchmarkJavassist(blackHole);
}
}
|
[
"rafael.wth@web.de"
] |
rafael.wth@web.de
|
3cba408ded73e47ac5d2d61c9d328da04d288316
|
e199545ab99065ef398a78dfb1b0011764c71115
|
/07.Advanced Loops/src/com/company/p03_Powers_of_Two.java
|
e7cb795734f644be5fbdeee813f130b5f7675275
|
[
"MIT"
] |
permissive
|
Tuscann/JAVA---Programing-Basics
|
bd060e243a36e1f0394d641a358448da12196b0f
|
67affef7cd5c57f94ce2459682e34f722f7ab472
|
refs/heads/master
| 2021-01-22T10:08:03.346358
| 2017-10-23T20:34:41
| 2017-10-23T20:34:41
| 102,334,432
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 374
|
java
|
package com.company;
import java.util.Scanner;
public class p03_Powers_of_Two {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
Integer n = Integer.parseInt(input.nextLine());
Integer num = 1;
for (int i = 0; i <= n; i++) {
System.out.println(num);
num *= 2;
}
}
}
|
[
"fbinnzhivko@gmail.com"
] |
fbinnzhivko@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.