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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
43ede34266a138f3e47b13a5891f87bd37929b03
|
2f52870abfab54b4a300d3ae34349c27b58d28e2
|
/src/main/java/org/ec4j/maven/core/PathSet.java
|
7d43f350a42d1bc3d8419223b3515c254c2096ff
|
[] |
no_license
|
ppalaga/editorconfig-maven-plugin
|
676a03b810cbbb0a055b1bcff31a082049b3fa56
|
8a34cc3dace7127de5f5c6f4c090dee654cab325
|
refs/heads/master
| 2023-03-17T14:35:25.825390
| 2018-01-01T12:54:17
| 2018-01-01T12:54:17
| 39,347,559
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,551
|
java
|
/**
* Copyright (c) 2017 EditorConfig Maven Plugin
* project contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ec4j.maven.core;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.nio.file.PathMatcher;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* A set of {@link Path}s defined by include and exclude globs.
*
* @author <a href="https://github.com/ppalaga">Peter Palaga</a>
*/
public class PathSet {
/**
* A {@link PathSet} builder.
*/
public static class Builder {
private static final FileSystem fileSystem = FileSystems.getDefault();
private List<PathMatcher> excludes = new ArrayList<>();
private List<PathMatcher> includes = new ArrayList<>();
Builder() {
super();
}
/**
* @return a new {@link PathSet}
*/
public PathSet build() {
List<PathMatcher> useExcludes = this.excludes;
this.excludes = null;
List<PathMatcher> useIncludes = this.includes;
this.includes = null;
return new PathSet(Collections.unmodifiableList(useIncludes), Collections.unmodifiableList(useExcludes));
}
/**
* Adds an exclude glob
*
* @param glob
* the glob to add
* @return this {@link Builder}
*/
public Builder exclude(String glob) {
excludes.add(fileSystem.getPathMatcher("glob:" + glob));
return this;
}
/**
* Adds multiple exclude globs
*
* @param globs
* the globs to add
* @return this {@link Builder}
*/
public Builder excludes(List<String> globs) {
if (globs != null) {
for (String glob : globs) {
excludes.add(fileSystem.getPathMatcher("glob:" + glob));
}
}
return this;
}
/**
* Adds multiple exclude globs
*
* @param globs
* the globs to add
* @return this {@link Builder}
*/
public Builder excludes(String... globs) {
if (globs != null) {
for (String glob : globs) {
excludes.add(fileSystem.getPathMatcher("glob:" + glob));
}
}
return this;
}
/**
* Adds an include glob
*
* @param glob
* the glob to add
* @return this {@link Builder}
*/
public Builder include(String glob) {
includes.add(fileSystem.getPathMatcher("glob:" + glob));
return this;
}
/**
* Adds multiple include globs
*
* @param globs
* the globs to add
* @return this {@link Builder}
*/
public Builder includes(List<String> globs) {
for (String glob : globs) {
includes.add(fileSystem.getPathMatcher("glob:" + glob));
}
return this;
}
/**
* Adds multiple include globs
*
* @param globs
* the globs to add
* @return this {@link Builder}
*/
public Builder includes(String... globs) {
if (globs != null) {
for (String glob : globs) {
includes.add(fileSystem.getPathMatcher("glob:" + glob));
}
}
return this;
}
}
private static final Path CURRENT_DIR = Paths.get(".");
/**
* @return new {@link Builder}
*/
public static Builder builder() {
return new Builder();
}
/**
* @param includes
* the globs to define a new {@link PathSet}
* @return a {@link PathSet} defined by the given {@code includes}
*/
public static PathSet ofIncludes(String... includes) {
return builder().includes(includes).build();
}
private final List<PathMatcher> excludes;
private final List<PathMatcher> includes;
PathSet(List<PathMatcher> includes, List<PathMatcher> excludes) {
this.includes = includes;
this.excludes = excludes;
}
/**
* @param path
* the {@link Path} to check
* @return {@code true} if this {@link PathSet} contains the given {@link Path} or {@code false} otherwise
*/
public boolean contains(Path path) {
path = CURRENT_DIR.resolve(path);
for (PathMatcher exclude : excludes) {
if (exclude.matches(path)) {
return false;
}
}
for (PathMatcher include : includes) {
if (include.matches(path)) {
return true;
}
}
return false;
}
}
|
[
"ppalaga@redhat.com"
] |
ppalaga@redhat.com
|
36644e92943cbbd113664220d369cf6bcf217ccf
|
dbd491859ac81fb6b4b2dc3e10bd1b0db58fc371
|
/app/src/main/java/com/park61/widget/imageview/Info.java
|
c444a0253ff41822eb760560f6ebc0b929dbb3fe
|
[] |
no_license
|
shushucn2012/park61
|
222dbaf728342c2c2895c1d284b3226480fc0c92
|
9fb6d0e60ac469ba729badbd98ca4809597fb43c
|
refs/heads/master
| 2020-06-18T20:02:11.728131
| 2019-07-14T01:03:56
| 2019-07-14T01:03:56
| 196,427,832
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 605
|
java
|
package com.park61.widget.imageview;
import android.graphics.RectF;
import android.widget.ImageView;
public class Info {
RectF mRect = new RectF();
RectF mLocalRect = new RectF();
RectF mImgRect = new RectF();
RectF mWidgetRect = new RectF();
float mScale;
float mDegrees;
ImageView.ScaleType mScaleType;
public Info(RectF rect, RectF local, RectF img, RectF widget, float scale,
float degrees, ImageView.ScaleType scaleType) {
mRect.set(rect);
mLocalRect.set(local);
mImgRect.set(img);
mWidgetRect.set(widget);
mScale = scale;
mScaleType = scaleType;
mDegrees = degrees;
}
}
|
[
"199355737@qq.com"
] |
199355737@qq.com
|
09be7771b711f2d3862aaf430991ce14953e7f8d
|
1ce518b09521578e26e79a1beef350e7485ced8c
|
/source/app/src/main/java/net/simonvt/menudrawer/VerticalDrawer.java
|
8ae086a91264cee3f181f48b8f2d8719528f0104
|
[] |
no_license
|
yash2710/AndroidStudioProjects
|
7180eb25e0f83d3f14db2713cd46cd89e927db20
|
e8ba4f5c00664f9084f6154f69f314c374551e51
|
refs/heads/master
| 2021-01-10T01:15:07.615329
| 2016-04-03T09:19:01
| 2016-04-03T09:19:01
| 55,338,306
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,814
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package net.simonvt.menudrawer;
import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.VelocityTracker;
// Referenced classes of package net.simonvt.menudrawer:
// DraggableDrawer, BuildLayerFrameLayout
public abstract class VerticalDrawer extends DraggableDrawer
{
VerticalDrawer(Activity activity, int i)
{
super(activity, i);
}
public VerticalDrawer(Context context)
{
super(context);
}
public VerticalDrawer(Context context, AttributeSet attributeset)
{
super(context, attributeset);
}
public VerticalDrawer(Context context, AttributeSet attributeset, int i)
{
super(context, attributeset, i);
}
public boolean onInterceptTouchEvent(MotionEvent motionevent)
{
int i;
i = 0xff & motionevent.getAction();
if (i == 0 && mMenuVisible && isCloseEnough())
{
setOffsetPixels(0.0F);
stopAnimation();
endPeek();
setDrawerState(0);
}
if (!mMenuVisible || !isContentTouch(motionevent)) goto _L2; else goto _L1
_L1:
boolean flag = true;
_L4:
return flag;
_L2:
int j;
j = mTouchMode;
flag = false;
if (j == 0) goto _L4; else goto _L3
_L3:
if (i != 0 && mIsDragging)
{
return true;
}
i;
JVM INSTR tableswitch 0 3: default 124
// 0 151
// 1 374
// 2 234
// 3 374;
goto _L5 _L6 _L7 _L8 _L7
_L5:
if (mVelocityTracker == null)
{
mVelocityTracker = VelocityTracker.obtain();
}
mVelocityTracker.addMovement(motionevent);
return mIsDragging;
_L6:
float f6 = motionevent.getX();
mInitialMotionX = f6;
mLastMotionX = f6;
float f7 = motionevent.getY();
mInitialMotionY = f7;
mLastMotionY = f7;
if (onDownAllowDrag(motionevent))
{
byte byte0;
if (mMenuVisible)
{
byte0 = 8;
} else
{
byte0 = 0;
}
setDrawerState(byte0);
stopAnimation();
endPeek();
mIsDragging = false;
}
continue; /* Loop/switch isn't completed */
_L8:
float f = motionevent.getX();
float f1 = f - mLastMotionX;
float f2 = Math.abs(f1);
float f3 = motionevent.getY();
float f4 = f3 - mLastMotionY;
float f5 = Math.abs(f4);
if (f5 > (float)mTouchSlop && f5 > f2)
{
if (mOnInterceptMoveEventListener != null && mTouchMode == 2 && canChildScrollVertically(mContentContainer, false, (int)f1, (int)f, (int)f3))
{
endDrag();
return false;
}
if (onMoveAllowDrag(motionevent, f4))
{
setDrawerState(2);
mIsDragging = true;
mLastMotionX = f;
mLastMotionY = f3;
}
}
continue; /* Loop/switch isn't completed */
_L7:
if (Math.abs(mOffsetPixels) > (float)(mMenuSize / 2))
{
openMenu();
} else
{
closeMenu();
}
if (true) goto _L5; else goto _L9
_L9:
}
protected void onMeasure(int i, int j)
{
int k = android.view.View.MeasureSpec.getMode(i);
int l = android.view.View.MeasureSpec.getMode(j);
if (k != 0x40000000 || l != 0x40000000)
{
throw new IllegalStateException("Must measure with an exact size");
}
int i1 = android.view.View.MeasureSpec.getSize(i);
int j1 = android.view.View.MeasureSpec.getSize(j);
if (!mMenuSizeSet)
{
mMenuSize = (int)(0.25F * (float)j1);
}
if (mOffsetPixels == -1F)
{
openMenu(false);
}
int k1 = getChildMeasureSpec(i, 0, i1);
int l1 = getChildMeasureSpec(i, 0, mMenuSize);
mMenuContainer.measure(k1, l1);
int i2 = getChildMeasureSpec(i, 0, i1);
int j2 = getChildMeasureSpec(i, 0, j1);
mContentContainer.measure(i2, j2);
setMeasuredDimension(i1, j1);
updateTouchAreaSize();
}
public boolean onTouchEvent(MotionEvent motionevent)
{
int i;
if (!mMenuVisible && !mIsDragging && mTouchMode == 0)
{
return false;
}
i = 0xff & motionevent.getAction();
if (mVelocityTracker == null)
{
mVelocityTracker = VelocityTracker.obtain();
}
mVelocityTracker.addMovement(motionevent);
i;
JVM INSTR tableswitch 0 3: default 84
// 0 86
// 1 310
// 2 145
// 3 310;
goto _L1 _L2 _L3 _L4 _L3
_L1:
return true;
_L2:
float f7 = motionevent.getX();
mInitialMotionX = f7;
mLastMotionX = f7;
float f8 = motionevent.getY();
mInitialMotionY = f8;
mLastMotionY = f8;
if (onDownAllowDrag(motionevent))
{
stopAnimation();
endPeek();
startLayerTranslation();
}
continue; /* Loop/switch isn't completed */
_L4:
if (!mIsDragging)
{
float f2 = Math.abs(motionevent.getX() - mLastMotionX);
float f3 = motionevent.getY();
float f4 = f3 - mLastMotionY;
float f5 = Math.abs(f4);
if (f5 > (float)mTouchSlop && f5 > f2 && onMoveAllowDrag(motionevent, f4))
{
setDrawerState(2);
mIsDragging = true;
float f;
float f1;
float f6;
if (f3 - mInitialMotionY > 0.0F)
{
f6 = mInitialMotionY + (float)mTouchSlop;
} else
{
f6 = mInitialMotionY - (float)mTouchSlop;
}
mLastMotionY = f6;
}
}
if (mIsDragging)
{
startLayerTranslation();
f = motionevent.getY();
f1 = f - mLastMotionY;
mLastMotionY = f;
onMoveEvent(f1);
}
continue; /* Loop/switch isn't completed */
_L3:
onUpEvent(motionevent);
if (true) goto _L1; else goto _L5
_L5:
}
}
|
[
"13bce123@nirmauni.ac.in"
] |
13bce123@nirmauni.ac.in
|
4af0018c37ae684ca9e86e18b620c5f8317160f6
|
82915a6b4cc9f75df740d8d4966fa8c529e147eb
|
/src/gov/nasa/worldwind/view/OrbitViewModel.java
|
696f62fa8d499469251fb7d1db76ab04a08be773
|
[] |
no_license
|
mdmzero0/WorldWind-Source
|
0365eacf71fb86602b9ecf7752e6d3b234710bc7
|
f6158e385a2b0efc94cec5cee7367482ace596e9
|
refs/heads/master
| 2020-12-25T10:59:39.731966
| 2011-07-29T12:12:14
| 2011-07-29T12:12:14
| 1,949,055
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 998
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gov.nasa.worldwind.view;
import gov.nasa.worldwind.geom.Angle;
import gov.nasa.worldwind.geom.Matrix;
import gov.nasa.worldwind.geom.Position;
import gov.nasa.worldwind.geom.Vec4;
import gov.nasa.worldwind.globes.Globe;
public abstract interface OrbitViewModel
{
public abstract Matrix computeTransformMatrix(Globe paramGlobe, Position paramPosition, Angle paramAngle1, Angle paramAngle2, double paramDouble);
public abstract ModelCoordinates computeModelCoordinates(Globe paramGlobe, Vec4 paramVec41, Vec4 paramVec42, Vec4 paramVec43);
public abstract ModelCoordinates computeModelCoordinates(Globe paramGlobe, Matrix paramMatrix, Vec4 paramVec4);
public static abstract interface ModelCoordinates
{
public abstract Position getCenterPosition();
public abstract Angle getHeading();
public abstract Angle getPitch();
public abstract double getZoom();
}
}
|
[
"sean.li@ai-solutions.com"
] |
sean.li@ai-solutions.com
|
3fc541a9f29e084a38d5f4585e049d790d90e4f4
|
4007f071832fde76e4b26e5b97a43a0136de924c
|
/app/src/main/java/com/sematec/imdb/ImdbOnlineDetailActivity.java
|
4f2937229f89701235abd0de3b4c7aa4cc5d5b36
|
[] |
no_license
|
anddev98/IMDB
|
14c2381903feb8481be85bf97af811604477c3e4
|
4fd59466702b1841573a629c52e5d09627b4028b
|
refs/heads/master
| 2022-04-27T02:00:12.637161
| 2020-03-26T18:49:13
| 2020-03-26T18:49:13
| 250,344,821
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,552
|
java
|
package com.sematec.imdb;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.gson.Gson;
import com.loopj.android.http.AsyncHttpClient;
import com.loopj.android.http.JsonHttpResponseHandler;
import com.squareup.picasso.Picasso;
import org.json.JSONObject;
import Details.Details;
import cz.msebera.android.httpclient.Header;
public class ImdbOnlineDetailActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_imdb_online_detail);
Intent intent = getIntent();
String ImdbId = intent.getStringExtra("id");
String address = "https://www.omdbapi.com/?i="+ImdbId+"&apikey=27e17400";
final TextView txtOnlineTitle = findViewById(R.id.txtOnlineTitle);
final TextView txtOnlineYear = findViewById(R.id.txtOnlineYear);
final TextView txtOnlineDirector = findViewById(R.id.txtOnlineDirector);
final TextView txtOnlineActors = findViewById(R.id.txtOnlineActors);
final TextView txtOnlineCountry = findViewById(R.id.txtOnlineCountry);
final TextView txtOnlineLanguage = findViewById(R.id.txtOnlineLanguage);
final ImageView imgOnlinePoster = findViewById(R.id.imgOnlinePoster);
final Button btnSave = findViewById(R.id.btnSave);
final ImdbDatabase db = new ImdbDatabase(ImdbOnlineDetailActivity.this,"Imdb",null,1);
AsyncHttpClient client = new AsyncHttpClient();
client.get(address,new JsonHttpResponseHandler(){
@Override
public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
super.onSuccess(statusCode, headers, response);
Gson gson = new Gson();
Details details = gson.fromJson(response.toString(),Details.class);
final String title = details.getTitle();
final String year = details.getYear();
final String director = details.getDirector();
final String country = details.getCountry();
final String language = details.getLanguage();
final String actors = details.getActors();
txtOnlineTitle.setText(title);
txtOnlineYear.setText(year);
txtOnlineDirector.setText(director);
txtOnlineCountry.setText(country);
txtOnlineLanguage.setText(language);
txtOnlineActors.setText(actors);
final String imageUrl = details.getPoster();
Picasso.get().load(imageUrl).into(imgOnlinePoster);
btnSave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
db.insertMovie(title,year,director,country,language,actors,imageUrl);
Toast.makeText(ImdbOnlineDetailActivity.this,"Movie Save to Database",Toast.LENGTH_LONG).show();
}
});
}
@Override
public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {
super.onFailure(statusCode, headers, throwable, errorResponse);
}
});
}
}
|
[
"you@example.com"
] |
you@example.com
|
99a5445b667e53821cd04fad7f437ef937982d3c
|
fa32414cd8cb03a7dc3ef7d85242ee7914a2f45f
|
/app/src/main/java/com/google/android/gms/tagmanager/zzat.java
|
1b9318738e58797301d36179db31236c075c5bcd
|
[] |
no_license
|
SeniorZhai/Mob
|
75c594488c4ce815a1f432eb4deacb8e6f697afe
|
cac498f0b95d7ec6b8da1275b49728578b64ef01
|
refs/heads/master
| 2016-08-12T12:49:57.527237
| 2016-03-10T06:57:09
| 2016-03-10T06:57:09
| 53,562,752
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,595
|
java
|
package com.google.android.gms.tagmanager;
import android.content.Context;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.concurrent.LinkedBlockingQueue;
class zzat extends Thread implements zzas {
private static zzat zzaLP;
private volatile boolean mClosed = false;
private final Context mContext;
private volatile boolean zzKU = false;
private final LinkedBlockingQueue<Runnable> zzaLO = new LinkedBlockingQueue();
private volatile zzau zzaLQ;
private zzat(Context context) {
super("GAThread");
if (context != null) {
this.mContext = context.getApplicationContext();
} else {
this.mContext = context;
}
start();
}
static zzat zzaH(Context context) {
if (zzaLP == null) {
zzaLP = new zzat(context);
}
return zzaLP;
}
private String zzd(Throwable th) {
OutputStream byteArrayOutputStream = new ByteArrayOutputStream();
PrintStream printStream = new PrintStream(byteArrayOutputStream);
th.printStackTrace(printStream);
printStream.flush();
return new String(byteArrayOutputStream.toByteArray());
}
public void run() {
while (!this.mClosed) {
try {
Runnable runnable = (Runnable) this.zzaLO.take();
if (!this.zzKU) {
runnable.run();
}
} catch (InterruptedException e) {
zzbg.zzaA(e.toString());
} catch (Throwable th) {
zzbg.zzaz("Error on Google TagManager Thread: " + zzd(th));
zzbg.zzaz("Google TagManager is shutting down.");
this.zzKU = true;
}
}
}
public void zzew(String str) {
zzh(str, System.currentTimeMillis());
}
public void zzf(Runnable runnable) {
this.zzaLO.add(runnable);
}
void zzh(String str, long j) {
final zzat com_google_android_gms_tagmanager_zzat = this;
final long j2 = j;
final String str2 = str;
zzf(new Runnable(this) {
final /* synthetic */ zzat zzaLT;
public void run() {
if (this.zzaLT.zzaLQ == null) {
zzcu zzzz = zzcu.zzzz();
zzzz.zza(this.zzaLT.mContext, com_google_android_gms_tagmanager_zzat);
this.zzaLT.zzaLQ = zzzz.zzzC();
}
this.zzaLT.zzaLQ.zzg(j2, str2);
}
});
}
}
|
[
"370985116@qq.com"
] |
370985116@qq.com
|
2d6ed900f763bb4986951411305614b16516e36e
|
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
|
/cab.snapp.passenger.play_184.apk-decompiled/sources/cab/snapp/passenger/f/g.java
|
52533c42dcbaefb11f493388605dcad536352c12
|
[] |
no_license
|
BaseMax/PopularAndroidSource
|
a395ccac5c0a7334d90c2594db8273aca39550ed
|
bcae15340907797a91d39f89b9d7266e0292a184
|
refs/heads/master
| 2020-08-05T08:19:34.146858
| 2019-10-06T20:06:31
| 2019-10-06T20:06:31
| 212,433,298
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,839
|
java
|
package cab.snapp.passenger.f;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.os.LocaleList;
import android.view.View;
import cab.snapp.b.a;
import cab.snapp.c.d;
import cab.snapp.passenger.activities.root.RootActivity;
import cab.snapp.passenger.data_access_layer.network.b;
import java.util.Locale;
public final class g {
public static final int LOCALE_ARABIC = 50;
public static final int LOCALE_ENGLISH = 20;
public static final int LOCALE_FRENCH = 30;
public static final int LOCALE_PERSIAN = 10;
public static final int LOCALE_TURKISH = 40;
/* renamed from: a reason: collision with root package name */
private static a f570a;
/* renamed from: b reason: collision with root package name */
private static b f571b;
public static void setSharedPreferencesManager(a aVar) {
f570a = aVar;
}
public static void setNetworkModule(b bVar) {
f571b = bVar;
}
public static int getSavedLocale() {
a aVar = f570a;
if (aVar == null) {
return 10;
}
Integer num = (Integer) aVar.get("LOCALE_HELPER_SAVED_LOCALE_SHARED_PREF_KEY");
if (num != null) {
return num.intValue();
}
return 10;
}
public static void setLayoutDirectionBasedOnLocale(View view) {
int savedLocale = getSavedLocale();
if (savedLocale != 0) {
if (savedLocale == 10 || savedLocale == 40 || savedLocale == 50) {
view.setLayoutDirection(1);
} else {
view.setLayoutDirection(0);
}
}
}
public static boolean changeAppLocale(Context context, int i) {
String a2 = a(Integer.valueOf(i));
if (a2.length() == 0 || a(context, a2)) {
return false;
}
a aVar = f570a;
if (aVar != null) {
aVar.put("LOCALE_HELPER_SAVED_LOCALE_SHARED_PREF_KEY", Integer.valueOf(i));
}
changeAppLocaleFromSharedPrefIfNeeded(context, true);
f571b.reset();
return true;
}
public static boolean changeAppLocaleFromSharedPrefIfNeeded(Context context, boolean z) {
String a2 = a(Integer.valueOf(getSavedLocale()));
if (a2.length() == 0 || a(context, a2)) {
return false;
}
Locale locale = new Locale(a2);
Locale.setDefault(locale);
Resources resources = context.getApplicationContext().getResources();
Configuration configuration = new Configuration(resources.getConfiguration());
configuration.setLocale(locale);
if (Build.VERSION.SDK_INT >= 24) {
configuration.setLocales(new LocaleList(new Locale[]{locale}));
}
if (context instanceof Activity) {
Activity activity = (Activity) context;
activity.getBaseContext().getResources().updateConfiguration(configuration, resources.getDisplayMetrics());
if (z) {
activity.startActivity(new Intent(activity, RootActivity.class));
activity.finish();
}
} else if (context instanceof Application) {
((Application) context).getBaseContext().getResources().updateConfiguration(configuration, resources.getDisplayMetrics());
}
return true;
}
private static boolean a(Context context, String str) {
if (Build.VERSION.SDK_INT >= 24) {
return str.equals(context.getResources().getConfiguration().getLocales().get(0).getLanguage());
}
return str.equals(context.getResources().getConfiguration().locale.getLanguage());
}
private static String a(Integer num) {
String str = "";
if (num == null) {
return str;
}
if (num.intValue() == 10) {
str = "fa";
} else if (num.intValue() == 20) {
str = "en";
} else if (num.intValue() == 30) {
str = "fr";
} else if (num.intValue() == 40) {
str = "ug";
} else if (num.intValue() == 50) {
str = "ar";
}
return str;
}
public static String getCurrentActiveLocaleString() {
int savedLocale = getSavedLocale();
if (savedLocale == 20) {
return "en-GB";
}
if (savedLocale == 30) {
return "fr-FR";
}
if (savedLocale != 40) {
return savedLocale != 50 ? "fa-IR" : "ar-IR";
}
return "tr-TR";
}
public static String getCurrentActiveLocaleLanguageString() {
int savedLocale = getSavedLocale();
if (savedLocale == 20) {
return "en";
}
if (savedLocale == 30) {
return "fr";
}
if (savedLocale != 40) {
return savedLocale != 50 ? "fa" : "ar";
}
return "ug";
}
public static String getCurrentActiveLocaleCountryString() {
int savedLocale = getSavedLocale();
if (savedLocale == 20) {
return "GB";
}
if (savedLocale != 30) {
return savedLocale != 40 ? "IR" : "CN";
}
return "FR";
}
public static String getRealCurrentActiveLocaleString() {
int savedLocale = getSavedLocale();
if (savedLocale == 20) {
return "en-GB";
}
if (savedLocale == 30) {
return "fr-FR";
}
if (savedLocale != 40) {
return savedLocale != 50 ? "fa-IR" : "ar-IR";
}
return "ug-CN";
}
public static boolean isCurrentLocalRtl() {
int savedLocale = getSavedLocale();
return savedLocale == 10 || savedLocale == 40 || savedLocale == 50;
}
public static String changeNumbersBasedOnCurrentLocale(String str) {
if (isCurrentLocalRtl()) {
return d.convertEngToPersianNumbers(str);
}
return d.convertPersianToEnglishNumbers(str);
}
public static void setLocale(Application application) {
if (application != null) {
String currentActiveLocaleLanguageString = getCurrentActiveLocaleLanguageString();
String currentActiveLocaleCountryString = getCurrentActiveLocaleCountryString();
if (application.getBaseContext().getResources().getConfiguration().locale.getLanguage().equalsIgnoreCase(currentActiveLocaleLanguageString)) {
a(application);
return;
}
Locale.setDefault(new Locale(currentActiveLocaleLanguageString, currentActiveLocaleCountryString));
a(application);
}
}
public static Context changeLocaleInContext(Context context) {
if (Build.VERSION.SDK_INT < 24 || context == null) {
return context;
}
try {
return f.wrap(context, new Locale(getCurrentActiveLocaleLanguageString(), getCurrentActiveLocaleCountryString()));
} catch (Exception e) {
e.printStackTrace();
com.a.a.a.logException(e);
return context;
}
}
public static void release() {
f570a = null;
}
private static void a(Application application) {
Resources resources = application.getBaseContext().getResources();
Configuration configuration = new Configuration(resources.getConfiguration());
configuration.locale = Locale.getDefault();
if (Build.VERSION.SDK_INT >= 24) {
configuration.setLocales(new LocaleList(new Locale[]{Locale.getDefault()}));
}
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
}
}
|
[
"MaxBaseCode@gmail.com"
] |
MaxBaseCode@gmail.com
|
6048925886d26811863911ab1786f5880944f8c1
|
15cf8a940a99b1335250bff9f221cc08d5df9f0f
|
/src/com/google/android/gms/drive/query/internal/HasFilter.java
|
87c2e288a8ad3adfcba85f604ac38a0a3adbbe0b
|
[] |
no_license
|
alamom/mcoc_mod_11.1
|
0e5153e0e7d83aa082c5447f991b2f6fa5c01d8b
|
d48cb0d2b3bc058bddb09c761ae5f443d9f2e93d
|
refs/heads/master
| 2021-01-11T17:12:37.894951
| 2017-01-22T19:55:38
| 2017-01-22T19:55:38
| 79,739,761
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,111
|
java
|
package com.google.android.gms.drive.query.internal;
import android.os.Parcel;
import com.google.android.gms.drive.metadata.MetadataField;
import com.google.android.gms.drive.metadata.internal.MetadataBundle;
public class HasFilter<T>
extends AbstractFilter
{
public static final g CREATOR = new g();
final int BR;
final MetadataBundle QL;
final MetadataField<T> QM;
HasFilter(int paramInt, MetadataBundle paramMetadataBundle)
{
this.BR = paramInt;
this.QL = paramMetadataBundle;
this.QM = e.b(paramMetadataBundle);
}
public <F> F a(f<F> paramf)
{
return (F)paramf.d(this.QM, getValue());
}
public int describeContents()
{
return 0;
}
public T getValue()
{
return (T)this.QL.a(this.QM);
}
public void writeToParcel(Parcel paramParcel, int paramInt)
{
g.a(this, paramParcel, paramInt);
}
}
/* Location: C:\tools\androidhack\marvel_bitva_chempionov_v11.1.0_mod_lenov.ru\classes.jar!\com\google\android\gms\drive\query\internal\HasFilter.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"eduard.martini@gmail.com"
] |
eduard.martini@gmail.com
|
a907e0ec431c43ecd9e83e4646c11f9fefa27f3c
|
5a474257353b9bbf88c30688fab17a618b154c22
|
/snHose-Server/src/main/java/net/minecraft/server/EnchantmentInstance.java
|
66a4fdedc8623ee0adfb7408bffc22e96f2f4d5d
|
[] |
no_license
|
RealKezuk/snHose
|
7e5424cd3edbf99bb6a586b9592943b11cd9d549
|
8c89453218621426f394fae44625f97b2a57840c
|
refs/heads/master
| 2020-07-22T14:24:17.936438
| 2019-09-09T03:39:21
| 2019-09-09T03:39:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 491
|
java
|
package net.minecraft.server.v1_7_R4;
public class EnchantmentInstance extends WeightedRandomChoice
{
public final Enchantment enchantment;
public final int level;
public EnchantmentInstance(final Enchantment enchantment, final int level) {
super(enchantment.getRandomWeight());
this.enchantment = enchantment;
this.level = level;
}
public EnchantmentInstance(final int n, final int n2) {
this(Enchantment.byId[n], n2);
}
}
|
[
"sathonaypro@gmail.com"
] |
sathonaypro@gmail.com
|
3cbfa44886a3ad1948348d7920fc0be4a1e804c5
|
9aeb261d951d7efd9511184ed38c9caa0a3cd59f
|
/src/main/java/com/android/tools/r8/ir/optimize/info/initializer/InstanceInitializerInfoContext.java
|
8c28004d589d8cfb90f234379cade2c32db7b500
|
[
"BSD-3-Clause",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
veryriskyrisk/r8
|
70bbac0692fcdd7106721015d82d898654ba404a
|
c4e4ae59b83f3d913c34c55e90000a4756cfe65f
|
refs/heads/master
| 2023-03-22T03:51:56.548646
| 2021-03-17T16:53:58
| 2021-03-18T09:00:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 502
|
java
|
// Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.ir.optimize.info.initializer;
import com.android.tools.r8.ir.code.InvokeMethod;
public abstract class InstanceInitializerInfoContext {
public boolean isAlwaysTrue() {
return false;
}
public abstract boolean isSatisfiedBy(InvokeMethod invoke);
}
|
[
"christofferqa@google.com"
] |
christofferqa@google.com
|
b366afc8ab843db97a4346bd20b27cd8a4d23025
|
575c19e81594666f51cceb55cb1ab094b218f66b
|
/octopusconsortium/src/main/java/OctopusConsortium/Core/CommonValues.java
|
ac984b123f121c74c7afda8da6be4c0484bb2b12
|
[
"Apache-2.0"
] |
permissive
|
uk-gov-mirror/111online.ITK-MessagingEngine
|
62b702653ea716786e2684e3d368898533e77534
|
011e8cbe0bcb982eedc2204318d94e2bb5d4adb2
|
refs/heads/master
| 2023-01-22T17:47:54.631879
| 2020-12-01T14:18:05
| 2020-12-01T14:18:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,476
|
java
|
package OctopusConsortium.Core;
import java.math.BigInteger;
public class CommonValues {
public CommonValues(String ods, String name){
ODS_ORGANISATION_CODE = ods;
MANUFACTURER_NAME = name;
ODS_URI = "urn:nhs-uk:identity:ods:" + ODS_ORGANISATION_CODE;
ODS_ADDRESSING_URI = ODS_ADDRESS_BLANK + ODS_ORGANISATION_CODE;
if (MANUFACTURER_NAME != null && !(MANUFACTURER_NAME.isEmpty())){
ODS_ASSIGNING_AUTHORITY_NAME = MANUFACTURER_NAME.toUpperCase() + " NHS TRUST";
}
else{
ODS_ASSIGNING_AUTHORITY_NAME = "";
}
}
public String ODS_ORGANISATION_CODE;
public String MANUFACTURER_NAME;
public String ODS_URI;
public String ODS_ADDRESSING_URI;
public static final String ODS_ADDRESS_BLANK = "urn:nhs-uk:addressing:ods:";
//From here: http://www.connectingforhealth.nhs.uk/systemsandservices/data/ods/datafiles/tr.csv/view
public String ODS_ASSIGNING_AUTHORITY_NAME;
public static final String PATIENTDETAILS_REQUEST_SERVICE = "urn:nhs-itk:services:201005:getPatientDetails-v1-0";
public static final String PATIENTDETAILS_REQUEST_PROFILE = "urn:nhs-en:profile:getPatientDetailsRequest-v1-0";
public static final String SOFTWARE_NAME = "Message Engine ESB";
//Repeat caller
public static final BigInteger HASC_VERSION = BigInteger.valueOf(1);
public static final String REPEATCALLER_REPORT_SERVICE = "urn:nhs-itk:services:201005:SendNHS111Report-v2-0";
public static final String REPEATCALLER_REPORT_PROFILE = "urn:nhs-en:profile:nhs111CDADocument-v2-0";
public static final String REPEATCALLER_QUERY_SERVICE = "NHS111RepeatCallerSyncQueryResp-v1-0";
public static final String REPEATCALLER_QUERY_PROFILE = "urn:nhs-en:profile:nhs111RepeatCallerQuery-v1-0";
public static final String PATIENTDETAILS_REQUEST_OID = "2.16.840.1.113883.2.1.3.2.4.17.284";
public String getOrganisation_Name()
{
return MANUFACTURER_NAME + " Message Engine";
}
public static final String APP_MAJOR_VERSION = "2";
public static final String APP_MINOR_VERSION = "5";
public static final String APP_REVISION_VERSION = "0";
public static final String APP_VERSION = APP_MAJOR_VERSION + "." + APP_MINOR_VERSION + "." + APP_REVISION_VERSION;
public static final String WSDL_MAJOR_VERSION = "2";
public static final String WSDL_MINOR_VERSION = "5";
public static final String WSDL_REVISION_VERSION = "0";
public static final String WSDL_VERSION = WSDL_MAJOR_VERSION + "." + WSDL_MINOR_VERSION + "." + WSDL_REVISION_VERSION;
}
|
[
"tom.axworthy@nhs.net"
] |
tom.axworthy@nhs.net
|
763bfcf793f939636ed369d42caa2caac1191b2a
|
465a93d0231c051a4bddeeefe5ec49568ff7a7a3
|
/cdn/src/main/java/com/jdcloud/sdk/service/cdn/model/DeleteForbiddenStreamResponse.java
|
79619825aa633e0e4ab92f7b2ee5bbbfa46317e9
|
[
"Apache-2.0"
] |
permissive
|
13078263112/jdcloud-sdk-java
|
ee1e9e9e65c171a19f26ea7e5c5b7d8a246e3746
|
2165655f71246babe3988c08e5a559eea36468d1
|
refs/heads/master
| 2022-11-09T14:10:19.960835
| 2020-06-16T04:13:53
| 2020-06-16T04:13:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,101
|
java
|
/*
* Copyright 2018 JDCLOUD.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.
*
* 直播域名操作类接口
* Openapi For JCLOUD cdn
*
* OpenAPI spec version: v1
* Contact: pid-cdn@jd.com
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.cdn.model;
import com.jdcloud.sdk.service.JdcloudResponse;
/**
* 删除禁播流
*/
public class DeleteForbiddenStreamResponse extends JdcloudResponse<DeleteForbiddenStreamResult> implements java.io.Serializable {
private static final long serialVersionUID = 1L;
}
|
[
"tancong@jd.com"
] |
tancong@jd.com
|
a9270e8c231c27c2e7eedc0c9a52345ae35523db
|
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
|
/services/organizations/src/main/java/com/huaweicloud/sdk/organizations/v1/model/DeclineHandshakeResponse.java
|
98ba3121a60ae7ade0cec1729f1d4bd1f9180ef9
|
[
"Apache-2.0"
] |
permissive
|
huaweicloud/huaweicloud-sdk-java-v3
|
51b32a451fac321a0affe2176663fed8a9cd8042
|
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
|
refs/heads/master
| 2023-08-29T06:50:15.642693
| 2023-08-24T08:34:48
| 2023-08-24T08:34:48
| 262,207,545
| 91
| 57
|
NOASSERTION
| 2023-09-08T12:24:55
| 2020-05-08T02:27:00
|
Java
|
UTF-8
|
Java
| false
| false
| 2,183
|
java
|
package com.huaweicloud.sdk.organizations.v1.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huaweicloud.sdk.core.SdkResponse;
import java.util.Objects;
import java.util.function.Consumer;
/**
* Response Object
*/
public class DeclineHandshakeResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "handshake")
private HandshakeDto handshake;
public DeclineHandshakeResponse withHandshake(HandshakeDto handshake) {
this.handshake = handshake;
return this;
}
public DeclineHandshakeResponse withHandshake(Consumer<HandshakeDto> handshakeSetter) {
if (this.handshake == null) {
this.handshake = new HandshakeDto();
handshakeSetter.accept(this.handshake);
}
return this;
}
/**
* Get handshake
* @return handshake
*/
public HandshakeDto getHandshake() {
return handshake;
}
public void setHandshake(HandshakeDto handshake) {
this.handshake = handshake;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
DeclineHandshakeResponse that = (DeclineHandshakeResponse) obj;
return Objects.equals(this.handshake, that.handshake);
}
@Override
public int hashCode() {
return Objects.hash(handshake);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeclineHandshakeResponse {\n");
sb.append(" handshake: ").append(toIndentedString(handshake)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
033ffef38f7af7c2f17c49c4b68a1aaea870df70
|
963599f6f1f376ba94cbb504e8b324bcce5de7a3
|
/sources/p035ru/unicorn/ujin/view/activity/navigation/p058ui/myrenta/$$Lambda$MyRentaViewModel$nJVBF1EZDvU50ybIkzJ143LJAM0.java
|
33f541e6a1c81932078494355403a6a4b2150ddd
|
[] |
no_license
|
NikiHard/cuddly-pancake
|
563718cb73fdc4b7b12c6233d9bf44f381dd6759
|
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
|
refs/heads/main
| 2023-04-09T06:58:04.403056
| 2021-04-20T00:45:08
| 2021-04-20T00:45:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 804
|
java
|
package p035ru.unicorn.ujin.view.activity.navigation.p058ui.myrenta;
import p046io.reactivex.functions.Function;
/* renamed from: ru.unicorn.ujin.view.activity.navigation.ui.myrenta.-$$Lambda$MyRentaViewModel$nJVBF1EZDvU50ybIkzJ143LJAM0 reason: invalid class name */
/* compiled from: lambda */
public final /* synthetic */ class $$Lambda$MyRentaViewModel$nJVBF1EZDvU50ybIkzJ143LJAM0 implements Function {
public static final /* synthetic */ $$Lambda$MyRentaViewModel$nJVBF1EZDvU50ybIkzJ143LJAM0 INSTANCE = new $$Lambda$MyRentaViewModel$nJVBF1EZDvU50ybIkzJ143LJAM0();
private /* synthetic */ $$Lambda$MyRentaViewModel$nJVBF1EZDvU50ybIkzJ143LJAM0() {
}
public final Object apply(Object obj) {
return MyRentaViewModel.lambda$getMyRentaUniqeNoFilter$34((RentInfo) obj);
}
}
|
[
"a.amirovv@mail.ru"
] |
a.amirovv@mail.ru
|
7fc08efa042f7d139c0af701960e5a63915410a5
|
de806161d50f53f4b4249d5ea53ddddc82bfd3f6
|
/bench4q/branches/Bench4Q_qxl/src/org/bench4Q/common/communication/AbstractSender.java
|
1ba500d56437b86ef84556ee9cd8b038d71c8a9d
|
[] |
no_license
|
lijianfeng941227/Bench4Q-TPCW
|
1ad2141fd852ad88c6db3ed8ae89a56f2fdb0ecc
|
2e1c84d1bf1d6cdad4b19a348daf85b59e4f1ce4
|
refs/heads/master
| 2021-01-11T05:43:33.312249
| 2016-04-07T01:58:01
| 2016-04-07T01:58:01
| 71,343,265
| 1
| 0
| null | 2016-10-19T09:55:21
| 2016-10-19T09:55:21
| null |
UTF-8
|
Java
| false
| false
| 4,036
|
java
|
/**
* =========================================================================
* Bench4Q version 1.1.1
* =========================================================================
*
* Bench4Q is available on the Internet at http://forge.ow2.org/projects/jaspte
* You can find latest version there.
*
* Distributed according to the GNU Lesser General Public Licence.
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or any
* later version.
*
* SEE Copyright.txt FOR FULL COPYRIGHT INFORMATION.
*
* This source code is distributed "as is" in the hope that it will be
* useful. It comes with no warranty, and no author or distributor
* accepts any responsibility for the consequences of its use.
*
*
* This version is a based on the implementation of TPC-W from University of Wisconsin.
* This version used some source code of The Grinder.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * Initial developer(s): Zhiquan Duan.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
*/
package org.bench4Q.common.communication;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import org.bench4Q.common.UncheckedInterruptedException;
/**
* Abstract class that manages the sending of messages.
*/
abstract class AbstractSender implements Sender {
private volatile boolean m_shutdown = false;
/**
* Send the given message.
*
* @param message
* A {@link Message}.
* @exception CommunicationException
* If an error occurs.
*/
public final void send(Message message) throws CommunicationException {
if (m_shutdown) {
throw new CommunicationException("Shut down");
}
try {
writeMessage(message);
} catch (IOException e) {
UncheckedInterruptedException.ioException(e);
throw new CommunicationException("Exception whilst sending message", e);
}
}
/**
* Template method for subclasses to implement the sending of a message.
* @param message
* @throws CommunicationException
* @throws IOException
*/
protected abstract void writeMessage(Message message) throws CommunicationException,
IOException;
protected static final void writeMessageToStream(Message message, OutputStream stream)
throws IOException {
// I tried the model of using a single ObjectOutputStream for the
// lifetime of the Sender and a single ObjectInputStream for each
// Reader. However, the corresponding ObjectInputStream would get
// occasional EOF's during readObject. Seems like voodoo to me,
// but creating a new ObjectOutputStream for every message fixes
// this.
// Dr Heinz M. Kabutz's Java Specialists 2004-05-19 newsletter
// (http://www.javaspecialists.co.za) may hold the answer.
// ObjectOutputStream's cache based on object identity. The EOF
// might be due to this, or at least ObjectOutputStream.reset()
// may help. I can't get excited enough about the cost of creating
// a new ObjectOutputStream() to try this as the bulk of what we
// send are long[]'s so aren't cacheable, and it would break sends
// that reuse Messages.
final ObjectOutputStream objectStream = new ObjectOutputStream(stream);
objectStream.writeObject(message);
objectStream.flush();
}
/**
* Cleanly shutdown the <code>Sender</code>.
*/
public void shutdown() {
try {
send(new CloseCommunicationMessage());
} catch (CommunicationException e) {
// Ignore.
}
// Keep track of whether we've been closed. Can't rely on delegate
// as some implementations don't do anything with close(), e.g.
// ByteArrayOutputStream.
m_shutdown = true;
}
/**
* Return whether we are shutdown.
*
* @return <code>true</code> if and only if we are shut down.
*/
public boolean isShutdown() {
return m_shutdown;
}
}
|
[
"silenceofdaybreak@gmail.com"
] |
silenceofdaybreak@gmail.com
|
6783e26ea8723c0b74ea100c79e34113b4027658
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/com/google/android/gms/internal/ads/zzchu.java
|
a440614b0ebea5a79addbe58db28c103b2af66ca
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,690
|
java
|
package com.google.android.gms.internal.ads;
import android.content.Context;
import android.os.Bundle;
import androidx.annotation.Nullable;
import java.lang.ref.WeakReference;
public final class zzchu extends zzbpd {
private final zzaug zzdvj;
private final WeakReference<zzbfq> zzfur;
private final zzbyg zzfus;
private final zzbpx zzfuu;
private final zzdqm zzfuv;
private final zzbtb zzfuw;
private final zzcaz zzfuz;
private boolean zzgce = false;
private final zzbui zzgcs;
private final Context zzvr;
public zzchu(zzbpg zzbpg, Context context, @Nullable zzbfq zzbfq, zzcaz zzcaz, zzbyg zzbyg, zzbtb zzbtb, zzbui zzbui, zzbpx zzbpx, zzdkx zzdkx, zzdqm zzdqm) {
super(zzbpg);
this.zzvr = context;
this.zzfuz = zzcaz;
this.zzfur = new WeakReference<>(zzbfq);
this.zzfus = zzbyg;
this.zzfuw = zzbtb;
this.zzgcs = zzbui;
this.zzfuu = zzbpx;
this.zzfuv = zzdqm;
this.zzdvj = new zzavh(zzdkx.zzdsh);
}
public final void finalize() throws Throwable {
try {
zzbfq zzbfq = this.zzfur.get();
if (((Boolean) zzwe.zzpu().zzd(zzaat.zzcww)).booleanValue()) {
if (!this.zzgce && zzbfq != null) {
zzbbi.zzedy.execute(zzcht.zzh(zzbfq));
}
} else if (zzbfq != null) {
zzbfq.destroy();
}
} finally {
super.finalize();
}
}
public final Bundle getAdMetadata() {
return this.zzgcs.getAdMetadata();
}
public final boolean isClosed() {
return this.zzfuu.isClosed();
}
public final boolean zzanh() {
return this.zzgce;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r5v3, types: [android.content.Context] */
/* JADX WARNING: Unknown variable types count: 1 */
/* Code decompiled incorrectly, please refer to instructions dump. */
public final boolean zzb(boolean r4, @androidx.annotation.Nullable android.app.Activity r5) {
/*
r3 = this;
com.google.android.gms.internal.ads.zzaai<java.lang.Boolean> r0 = com.google.android.gms.internal.ads.zzaat.zzcnp
com.google.android.gms.internal.ads.zzaap r1 = com.google.android.gms.internal.ads.zzwe.zzpu()
java.lang.Object r0 = r1.zzd(r0)
java.lang.Boolean r0 = (java.lang.Boolean) r0
boolean r0 = r0.booleanValue()
r1 = 0
if (r0 == 0) goto L_0x0048
com.google.android.gms.ads.internal.zzp.zzkp()
android.content.Context r0 = r3.zzvr
boolean r0 = com.google.android.gms.internal.ads.zzayh.zzav(r0)
if (r0 == 0) goto L_0x0048
java.lang.String r4 = "Rewarded ads that show when your app is in the background are a violation of AdMob policies and may lead to blocked ad serving. To learn more, visit https://googlemobileadssdk.page.link/admob-interstitial-policies"
com.google.android.gms.internal.ads.zzbbd.zzfe(r4)
com.google.android.gms.internal.ads.zzbtb r4 = r3.zzfuw
r4.zzajk()
com.google.android.gms.internal.ads.zzaai<java.lang.Boolean> r4 = com.google.android.gms.internal.ads.zzaat.zzcnq
com.google.android.gms.internal.ads.zzaap r5 = com.google.android.gms.internal.ads.zzwe.zzpu()
java.lang.Object r4 = r5.zzd(r4)
java.lang.Boolean r4 = (java.lang.Boolean) r4
boolean r4 = r4.booleanValue()
if (r4 == 0) goto L_0x0047
com.google.android.gms.internal.ads.zzdqm r4 = r3.zzfuv
com.google.android.gms.internal.ads.zzdlj r5 = r3.zzflg
com.google.android.gms.internal.ads.zzdlh r5 = r5.zzhbq
com.google.android.gms.internal.ads.zzdkz r5 = r5.zzhbn
java.lang.String r5 = r5.zzdsg
r4.zzhc(r5)
L_0x0047:
return r1
L_0x0048:
boolean r0 = r3.zzgce
if (r0 == 0) goto L_0x005e
java.lang.String r4 = "The rewarded ad have been showed."
com.google.android.gms.internal.ads.zzbbd.zzfe(r4)
com.google.android.gms.internal.ads.zzbtb r4 = r3.zzfuw
int r5 = com.google.android.gms.internal.ads.zzdmd.zzhcx
r0 = 0
com.google.android.gms.internal.ads.zzuw r5 = com.google.android.gms.internal.ads.zzdmb.zza(r5, r0, r0)
r4.zzh(r5)
return r1
L_0x005e:
r0 = 1
r3.zzgce = r0
com.google.android.gms.internal.ads.zzbyg r2 = r3.zzfus
r2.zzaiz()
if (r5 != 0) goto L_0x006a
android.content.Context r5 = r3.zzvr
L_0x006a:
com.google.android.gms.internal.ads.zzcaz r2 = r3.zzfuz // Catch:{ zzcbc -> 0x0075 }
r2.zza(r4, r5) // Catch:{ zzcbc -> 0x0075 }
com.google.android.gms.internal.ads.zzbyg r4 = r3.zzfus // Catch:{ zzcbc -> 0x0075 }
r4.zzaix() // Catch:{ zzcbc -> 0x0075 }
return r0
L_0x0075:
r4 = move-exception
com.google.android.gms.internal.ads.zzbtb r5 = r3.zzfuw
r5.zza(r4)
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.ads.zzchu.zzb(boolean, android.app.Activity):boolean");
}
public final zzaug zzqw() {
return this.zzdvj;
}
public final boolean zzqx() {
zzbfq zzbfq = this.zzfur.get();
return zzbfq != null && !zzbfq.zzabt();
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
2d441ee55a14f23aa758ebc3267452d8845c2295
|
c4faf92837f3c163be4f0089adfbc60828b7fce3
|
/src/by/it/_examples_/jd03_02/demo/crud/CN.java
|
172c99fa6b7540eef50eb24b2235efea12a60b07
|
[] |
no_license
|
AlexandrRogov/JD2018-04-11
|
f3407f240f0dcfa76d4a56346c40e606f49764bb
|
4597619c75cbf8e5b35ed72ad5808413502b57e2
|
refs/heads/master
| 2020-03-15T11:50:33.268173
| 2018-07-05T23:21:10
| 2018-07-05T23:21:10
| 132,129,820
| 0
| 1
| null | 2018-05-04T11:09:42
| 2018-05-04T11:09:41
| null |
UTF-8
|
Java
| false
| false
| 639
|
java
|
package by.it._examples_.jd03_02.demo.crud;
interface CN {
//Корректно держать настройки соединения вне кода (!)
//Обычно это файлы конфигурации сервера или фреймворка
//конфигурация в этом случае - обычно bean с инициализацией из XML
//ТАК ЧТО ЭТО ЛИШЬ ПРИМЕР!
String URL_DB = "jdbc:mysql://127.0.0.1:2016/it_academy"+
"?useUnicode=true&characterEncoding=UTF-8";
String USER_DB = "root";
String PASSWORD_DB = "";
}
|
[
"375336849110@tut.by"
] |
375336849110@tut.by
|
5ced29fb6524a47a6935937ba1590d200cd48393
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/com/avito/android/safedeal/profile_settings/ProfileDeliverySettingsResourceProviderImpl.java
|
a80f3be290998192d2961577ddc36c70483427e6
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,991
|
java
|
package com.avito.android.safedeal.profile_settings;
import android.content.res.Resources;
import com.avito.android.remote.auth.AuthSource;
import com.avito.android.safedeal.R;
import com.facebook.common.util.UriUtil;
import javax.inject.Inject;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u00020\u0001B\u0011\b\u0007\u0012\u0006\u0010\t\u001a\u00020\b¢\u0006\u0004\b\n\u0010\u000bR\u001c\u0010\u0007\u001a\u00020\u00028\u0016@\u0016X\u0004¢\u0006\f\n\u0004\b\u0003\u0010\u0004\u001a\u0004\b\u0005\u0010\u0006¨\u0006\f"}, d2 = {"Lcom/avito/android/safedeal/profile_settings/ProfileDeliverySettingsResourceProviderImpl;", "Lcom/avito/android/safedeal/profile_settings/ProfileDeliverySettingsResourceProvider;", "", AuthSource.SEND_ABUSE, "Ljava/lang/String;", "getSettingsLoadingError", "()Ljava/lang/String;", "settingsLoadingError", "Landroid/content/res/Resources;", UriUtil.LOCAL_RESOURCE_SCHEME, "<init>", "(Landroid/content/res/Resources;)V", "safedeal_release"}, k = 1, mv = {1, 4, 2})
public final class ProfileDeliverySettingsResourceProviderImpl implements ProfileDeliverySettingsResourceProvider {
@NotNull
public final String a;
@Inject
public ProfileDeliverySettingsResourceProviderImpl(@NotNull Resources resources) {
Intrinsics.checkNotNullParameter(resources, UriUtil.LOCAL_RESOURCE_SCHEME);
String string = resources.getString(R.string.settings_loading_error_message);
Intrinsics.checkNotNullExpressionValue(string, "res.getString(com.avito.…gs_loading_error_message)");
this.a = string;
}
@Override // com.avito.android.safedeal.profile_settings.ProfileDeliverySettingsResourceProvider
@NotNull
public String getSettingsLoadingError() {
return this.a;
}
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
4e5fc23302868f0c6d1d7abd3f245f96e26b5839
|
82be361ba40d06e2b797908a11a695ce3c631ca8
|
/docs/thay_tung/ojb-master/src/tools/org/apache/ojb/tools/mapping/reversedb2/dbmetatreemodel/DBMetaColumnNode.java
|
c7b663f3d1d58e97689e92cd634ab529f5ef44e0
|
[
"Apache-2.0"
] |
permissive
|
phamtuanchip/ch-cnttk2
|
ac01dfded36d7216a616c40e7eb432a2fd1f6bc5
|
3b67c28b8b7b1d58071d5c2305c6be36fce9ac9a
|
refs/heads/master
| 2021-01-16T18:30:34.161841
| 2017-01-21T14:46:05
| 2017-01-21T14:46:05
| 32,536,612
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,654
|
java
|
package org.apache.ojb.tools.mapping.reversedb2.dbmetatreemodel;
/* Copyright 2002-2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This class represents a columns of a table
* @author <a href="mailto:bfl@florianbruckner.com">Florian Bruckner</a>
* @version $Id: DBMetaColumnNode.java,v 1.1 2007-08-24 22:17:41 ewestfal Exp $
*/
public class DBMetaColumnNode extends ReverseDbTreeNode
implements java.io.Serializable
{
static final long serialVersionUID = -7694494988930854647L;
/** Key for accessing the column name in the attributes Map */
public static final String ATT_COLUMN_NAME = "Column Name";
/** Creates a new instance of DBMetaSchemaNode
* @param pdbMeta DatabaseMetaData implementation where this node gets its data from.
* @param pdbMetaTreeModel The TreeModel this node is associated to.
* @param pschemaNode The parent node for this node.
* @param pstrColumnName The name of the column this node is representing.
*/
public DBMetaColumnNode(java.sql.DatabaseMetaData pdbMeta,
DatabaseMetaDataTreeModel pdbMetaTreeModel,
DBMetaTableNode ptableNode, String pstrColumnName)
{
super(pdbMeta, pdbMetaTreeModel, ptableNode);
this.setAttribute(ATT_COLUMN_NAME, pstrColumnName);
}
/**
* @see ReverseDbTreeNode#isLeaf()
*/
public boolean getAllowsChildren()
{
return false;
}
/**
* @see ReverseDbTreeNode#getAllowsChildren()
*/
public boolean isLeaf()
{
return true;
}
/**
* @see Object#toString()
*/
public String toString()
{
return this.getAttribute(ATT_COLUMN_NAME).toString();
}
public Class getPropertyEditorClass()
{
return org.apache.ojb.tools.mapping.reversedb2.propertyEditors.JPnlPropertyEditorDBMetaColumn.class;
}
/**
* Do nothing as there are no children for a column.
*/
protected boolean _load ()
{
return true;
}
}
|
[
"phamtuanchip@gmail.com"
] |
phamtuanchip@gmail.com
|
ba589a9949d38e9f1b85d592df20af98a8cb146b
|
08c5675ad0985859d12386ca3be0b1a84cc80a56
|
/src/main/java/java/nio/MappedByteBuffer.java
|
69f7d4e676b1b12d26a54cf05fe34eafc798a125
|
[] |
no_license
|
ytempest/jdk1.8-analysis
|
1e5ff386ed6849ea120f66ca14f1769a9603d5a7
|
73f029efce2b0c5eaf8fe08ee8e70136dcee14f7
|
refs/heads/master
| 2023-03-18T04:37:52.530208
| 2021-03-09T02:51:16
| 2021-03-09T02:51:16
| 345,863,779
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,264
|
java
|
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.nio;
import java.io.FileDescriptor;
import sun.misc.Unsafe;
/**
* A direct byte buffer whose content is a memory-mapped region of a file.
*
* <p> Mapped byte buffers are created via the {@link
* java.nio.channels.FileChannel#map FileChannel.map} method. This class
* extends the {@link ByteBuffer} class with operations that are specific to
* memory-mapped file regions.
*
* <p> A mapped byte buffer and the file mapping that it represents remain
* valid until the buffer itself is garbage-collected.
*
* <p> The content of a mapped byte buffer can change at any time, for example
* if the content of the corresponding region of the mapped file is changed by
* this program or another. Whether or not such changes occur, and when they
* occur, is operating-system dependent and therefore unspecified.
*
* <a name="inaccess"></a><p> All or part of a mapped byte buffer may become
* inaccessible at any time, for example if the mapped file is truncated. An
* attempt to access an inaccessible region of a mapped byte buffer will not
* change the buffer's content and will cause an unspecified exception to be
* thrown either at the time of the access or at some later time. It is
* therefore strongly recommended that appropriate precautions be taken to
* avoid the manipulation of a mapped file by this program, or by a
* concurrently running program, except to read or write the file's content.
*
* <p> Mapped byte buffers otherwise behave no differently than ordinary direct
* byte buffers. </p>
*
* @author Mark Reinhold
* @author JSR-51 Expert Group
* @since 1.4
*/
public abstract class MappedByteBuffer
extends ByteBuffer {
// This is a little bit backwards: By rights MappedByteBuffer should be a
// subclass of DirectByteBuffer, but to keep the spec clear and simple, and
// for optimization purposes, it's easier to do it the other way around.
// This works because DirectByteBuffer is a package-private class.
// For mapped buffers, a FileDescriptor that may be used for mapping
// operations if valid; null if the buffer is not mapped.
private final FileDescriptor fd;
// This should only be invoked by the DirectByteBuffer constructors
//
MappedByteBuffer(int mark, int pos, int lim, int cap, // package-private
FileDescriptor fd) {
super(mark, pos, lim, cap);
this.fd = fd;
}
MappedByteBuffer(int mark, int pos, int lim, int cap) { // package-private
super(mark, pos, lim, cap);
this.fd = null;
}
private void checkMapped() {
if (fd == null)
// Can only happen if a luser explicitly casts a direct byte buffer
throw new UnsupportedOperationException();
}
// Returns the distance (in bytes) of the buffer from the page aligned address
// of the mapping. Computed each time to avoid storing in every direct buffer.
private long mappingOffset() {
int ps = Bits.pageSize();
long offset = address % ps;
return (offset >= 0) ? offset : (ps + offset);
}
private long mappingAddress(long mappingOffset) {
return address - mappingOffset;
}
private long mappingLength(long mappingOffset) {
return (long) capacity() + mappingOffset;
}
/**
* Tells whether or not this buffer's content is resident in physical
* memory.
*
* <p> A return value of <tt>true</tt> implies that it is highly likely
* that all of the data in this buffer is resident in physical memory and
* may therefore be accessed without incurring any virtual-memory page
* faults or I/O operations. A return value of <tt>false</tt> does not
* necessarily imply that the buffer's content is not resident in physical
* memory.
*
* <p> The returned value is a hint, rather than a guarantee, because the
* underlying operating system may have paged out some of the buffer's data
* by the time that an invocation of this method returns. </p>
*
* @return <tt>true</tt> if it is likely that this buffer's content
* is resident in physical memory
*/
public final boolean isLoaded() {
checkMapped();
if ((address == 0) || (capacity() == 0))
return true;
long offset = mappingOffset();
long length = mappingLength(offset);
return isLoaded0(mappingAddress(offset), length, Bits.pageCount(length));
}
// not used, but a potential target for a store, see load() for details.
private static byte unused;
/**
* Loads this buffer's content into physical memory.
*
* <p> This method makes a best effort to ensure that, when it returns,
* this buffer's content is resident in physical memory. Invoking this
* method may cause some number of page faults and I/O operations to
* occur. </p>
*
* @return This buffer
*/
public final MappedByteBuffer load() {
checkMapped();
if ((address == 0) || (capacity() == 0))
return this;
long offset = mappingOffset();
long length = mappingLength(offset);
load0(mappingAddress(offset), length);
// Read a byte from each page to bring it into memory. A checksum
// is computed as we go along to prevent the compiler from otherwise
// considering the loop as dead code.
Unsafe unsafe = Unsafe.getUnsafe();
int ps = Bits.pageSize();
int count = Bits.pageCount(length);
long a = mappingAddress(offset);
byte x = 0;
for (int i = 0; i < count; i++) {
x ^= unsafe.getByte(a);
a += ps;
}
if (unused != 0)
unused = x;
return this;
}
/**
* Forces any changes made to this buffer's content to be written to the
* storage device containing the mapped file.
*
* <p> If the file mapped into this buffer resides on a local storage
* device then when this method returns it is guaranteed that all changes
* made to the buffer since it was created, or since this method was last
* invoked, will have been written to that device.
*
* <p> If the file does not reside on a local device then no such guarantee
* is made.
*
* <p> If this buffer was not mapped in read/write mode ({@link
* java.nio.channels.FileChannel.MapMode#READ_WRITE}) then invoking this
* method has no effect. </p>
*
* @return This buffer
*/
public final MappedByteBuffer force() {
checkMapped();
if ((address != 0) && (capacity() != 0)) {
long offset = mappingOffset();
force0(fd, mappingAddress(offset), mappingLength(offset));
}
return this;
}
private native boolean isLoaded0(long address, long length, int pageCount);
private native void load0(long address, long length);
private native void force0(FileDescriptor fd, long address, long length);
}
|
[
"787491096@qq.com"
] |
787491096@qq.com
|
dccdc73e3f7c1e5c2d5b7be3abedda2bd3df2113
|
40665051fadf3fb75e5a8f655362126c1a2a3af6
|
/abixen-abixen-platform/2662882d75e74b0aa369fc6912534e5cb392bed4/8/UserServiceTest.java
|
bdfdbe45cce9f234c72b5ed99b027291607b5740
|
[] |
no_license
|
fermadeiral/StyleErrors
|
6f44379207e8490ba618365c54bdfef554fc4fde
|
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
|
refs/heads/master
| 2020-07-15T12:55:10.564494
| 2019-10-24T02:30:45
| 2019-10-24T02:30:45
| 205,546,543
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,828
|
java
|
/**
* Copyright (c) 2010-present Abixen Systems. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library 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 Lesser General Public License for more
* details.
*/
package com.abixen.platform.core.service;
import com.abixen.platform.core.configuration.PlatformConfiguration;
import com.abixen.platform.core.configuration.properties.PlatformTestResourceConfigurationProperties;
import com.abixen.platform.core.form.UserChangePasswordForm;
import com.abixen.platform.core.model.enumtype.UserGender;
import com.abixen.platform.core.model.impl.User;
import com.abixen.platform.core.util.UserBuilder;
import org.apache.log4j.Logger;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.Random;
import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = PlatformConfiguration.class)
public class UserServiceTest {
static Logger log = Logger.getLogger(UserServiceTest.class.getName());
@Autowired
private UserService userService;
@Autowired
private DomainBuilderService domainBuilderService;
@Autowired
private PlatformTestResourceConfigurationProperties platformResourceConfigurationProperties;
private File avatarFile;
@Test
public void createUser() {
log.debug("createUser()");
UserBuilder userBuilder = domainBuilderService.newUserBuilderInstance();
userBuilder.credentials("username", "password");
userBuilder.screenName("screenName");
userBuilder.personalData("firstName", "middleName", "lastName");
userBuilder.additionalData(new Date(), "jobTitle", UserGender.MALE);
userBuilder.registrationIp("127.0.0.1");
User user = userBuilder.build();
userService.createUser(user);
User userFromDB = userService.findUser("username");
assertNotNull(userFromDB);
}
@Test
public void changeUserPasswordPositiveCase() {
log.debug("changeUserPassword() positive case");
String newpassword = "newPassword";
UserBuilder userBuilder = domainBuilderService.newUserBuilderInstance();
userBuilder.credentials("usernameA", "password");
userBuilder.screenName("screenNameA");
userBuilder.personalData("firstName", "middleName", "lastName");
userBuilder.additionalData(new Date(), "jobTitle", UserGender.MALE);
userBuilder.registrationIp("127.0.0.1");
User user = userBuilder.build();
userService.createUser(user);
UserChangePasswordForm passwordForm = new UserChangePasswordForm();
passwordForm.setCurrentPassword("password");
passwordForm.setNewPassword(newpassword);
UserChangePasswordForm newPasswordForm = userService.changeUserPassword(user, passwordForm);
User userFromDB = userService.findUser("usernameA");
PasswordEncoder encoder = new BCryptPasswordEncoder();
assertNotNull(userFromDB);
assertTrue(encoder.matches(newpassword, userFromDB.getPassword()));
}
@Test(expected = UsernameNotFoundException.class)
public void changeUserPasswordNegativeCase() {
log.debug("changeUserPassword() negative case");
String newpassword = "newPassword";
UserBuilder userBuilder = domainBuilderService.newUserBuilderInstance();
userBuilder.credentials("usernameB", "password");
userBuilder.screenName("screenNameB");
userBuilder.personalData("firstName", "middleName", "lastName");
userBuilder.additionalData(new Date(), "jobTitle", UserGender.MALE);
userBuilder.registrationIp("127.0.0.1");
User user = userBuilder.build();
userService.createUser(user);
UserChangePasswordForm passwordForm = new UserChangePasswordForm();
passwordForm.setCurrentPassword("someNotCorrectpassword");
passwordForm.setNewPassword(newpassword);
userService.changeUserPassword(user, passwordForm);
}
@Test
public void changeUserAvatar() throws IOException {
log.debug("changeUserAvatar() positive case");
UserBuilder userBuilder = domainBuilderService.newUserBuilderInstance();
userBuilder.credentials("usernameC", "password");
userBuilder.screenName("screenNameC");
userBuilder.personalData("firstName", "middleName", "lastName");
userBuilder.additionalData(new Date(), "jobTitle", UserGender.MALE);
userBuilder.registrationIp("127.0.0.1");
User user = userBuilder.build();
user.setAvatarFileName("oldAvatarName");
userService.createUser(user);
MultipartFile newAvatarFile = mock(MultipartFile.class);
when(newAvatarFile.getName()).thenReturn("newAvatarFile");
byte[] bytes = new byte[32];
new Random().nextBytes(bytes);
when(newAvatarFile.getBytes()).thenReturn(bytes);
User updatedUser = null;
try {
updatedUser = userService.changeUserAvatar(user.getId(), newAvatarFile);
} catch (IOException e) {
e.printStackTrace();
}
avatarFile = new File(platformResourceConfigurationProperties.getImageLibraryDirectory() + "/user-avatar/" + updatedUser.getAvatarFileName());
assertNotNull(updatedUser);
assertNotEquals(updatedUser.getAvatarFileName(), user.getAvatarFileName());
assertTrue(avatarFile.exists());
avatarFile.delete();
}
/*@Test
public void updateUser() {
log.debug("updateUser()");
User user = userService.findUser("username");
user.setFirstname("firstname2");
userService.updateUser(user);
User userAfterUpdate = userService.findUser("username");
assertEquals("firstname2", userAfterUpdate.getFirstname());
}*/
}
|
[
"fer.madeiral@gmail.com"
] |
fer.madeiral@gmail.com
|
6ca28d43c4781ca505bbbe7fb0f46034967dd41c
|
25baed098f88fc0fa22d051ccc8027aa1834a52b
|
/src/main/java/com/ljh/daoMz/JytPrivatecloudBookIntradayMapper.java
|
74765bee91111ac027593129db7c129b9430c1d0
|
[] |
no_license
|
woai555/ljh
|
a5015444082f2f39d58fb3e38260a6d61a89af9f
|
17cf8f4415c9ae7d9fedae46cd9e9d0d3ce536f9
|
refs/heads/master
| 2022-07-11T06:52:07.620091
| 2022-01-05T06:51:27
| 2022-01-05T06:51:27
| 132,585,637
| 0
| 0
| null | 2022-06-17T03:29:19
| 2018-05-08T09:25:32
|
Java
|
UTF-8
|
Java
| false
| false
| 314
|
java
|
package com.ljh.daoMz;
import com.ljh.bean.JytPrivatecloudBookIntraday;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ljh
* @since 2020-10-26
*/
public interface JytPrivatecloudBookIntradayMapper extends BaseMapper<JytPrivatecloudBookIntraday> {
}
|
[
"37681193+woai555@users.noreply.github.com"
] |
37681193+woai555@users.noreply.github.com
|
9a2969ba4e333bc8a26dde3ab55ae3fa5b1f16e9
|
42277e19adfb620aadc391868050af44bf8b060f
|
/app/src/main/java/com/ljcs/cxwl/ui/activity/other/component/FamilyRegisterComponent.java
|
6705a5b8a60c49a2d8f27720116f6e5d1b523c09
|
[] |
no_license
|
18670819116/goufang
|
4da367cfba931ed2942e075e74707577bb3e1422
|
080b0776b6846924a47b3cfe39be5c4dd564f6ec
|
refs/heads/master
| 2020-03-24T18:05:33.172926
| 2018-07-30T11:13:59
| 2018-07-30T11:13:59
| 142,882,425
| 1
| 1
| null | 2018-07-30T13:53:34
| 2018-07-30T13:53:34
| null |
UTF-8
|
Java
| false
| false
| 676
|
java
|
package com.ljcs.cxwl.ui.activity.other.component;
import com.ljcs.cxwl.application.AppComponent;
import com.ljcs.cxwl.ui.activity.base.ActivityScope;
import com.ljcs.cxwl.ui.activity.other.FamilyRegisterActivity;
import com.ljcs.cxwl.ui.activity.other.module.FamilyRegisterModule;
import dagger.Component;
/**
* @author xlei
* @Package com.ljcs.cxwl.ui.activity.other
* @Description: The component for FamilyRegisterActivity
* @date 2018/06/27 17:51:07
*/
@ActivityScope
@Component(dependencies = AppComponent.class, modules = FamilyRegisterModule.class)
public interface FamilyRegisterComponent {
FamilyRegisterActivity inject(FamilyRegisterActivity Activity);
}
|
[
"3401794305@qq.com"
] |
3401794305@qq.com
|
7bf3addc054b50ec93a466ed66436c4b66e88ae8
|
7033d33d0ce820499b58da1d1f86f47e311fd0e1
|
/org/lwjgl/opengl/ARBMultiDrawIndirect.java
|
9bfe2aeb2667124aac6731ad69c3b0ad2caa2050
|
[
"MIT"
] |
permissive
|
gabrielvicenteYT/melon-client-src
|
1d3f1f65c5a3bf1b6bc3e1cb32a05bf1dd56ee62
|
e0bf34546ada3afa32443dab838b8ce12ce6aaf8
|
refs/heads/master
| 2023-04-04T05:47:35.053136
| 2021-04-19T18:34:36
| 2021-04-19T18:34:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,568
|
java
|
package org.lwjgl.opengl;
import java.nio.*;
public final class ARBMultiDrawIndirect
{
private ARBMultiDrawIndirect() {
}
public static void glMultiDrawArraysIndirect(final int mode, final ByteBuffer indirect, final int primcount, final int stride) {
GL43.glMultiDrawArraysIndirect(mode, indirect, primcount, stride);
}
public static void glMultiDrawArraysIndirect(final int mode, final long indirect_buffer_offset, final int primcount, final int stride) {
GL43.glMultiDrawArraysIndirect(mode, indirect_buffer_offset, primcount, stride);
}
public static void glMultiDrawArraysIndirect(final int mode, final IntBuffer indirect, final int primcount, final int stride) {
GL43.glMultiDrawArraysIndirect(mode, indirect, primcount, stride);
}
public static void glMultiDrawElementsIndirect(final int mode, final int type, final ByteBuffer indirect, final int primcount, final int stride) {
GL43.glMultiDrawElementsIndirect(mode, type, indirect, primcount, stride);
}
public static void glMultiDrawElementsIndirect(final int mode, final int type, final long indirect_buffer_offset, final int primcount, final int stride) {
GL43.glMultiDrawElementsIndirect(mode, type, indirect_buffer_offset, primcount, stride);
}
public static void glMultiDrawElementsIndirect(final int mode, final int type, final IntBuffer indirect, final int primcount, final int stride) {
GL43.glMultiDrawElementsIndirect(mode, type, indirect, primcount, stride);
}
}
|
[
"haroldthesenpai@gmail.com"
] |
haroldthesenpai@gmail.com
|
7c5f7a700cfbf2c92f0a1e5a51f9557ea49afb47
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava4/Foo773Test.java
|
d85c6a7ce726ff12f049b027400c30d8c9b9c948
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 481
|
java
|
package applicationModulepackageJava4;
import org.junit.Test;
public class Foo773Test {
@Test
public void testFoo0() {
new Foo773().foo0();
}
@Test
public void testFoo1() {
new Foo773().foo1();
}
@Test
public void testFoo2() {
new Foo773().foo2();
}
@Test
public void testFoo3() {
new Foo773().foo3();
}
@Test
public void testFoo4() {
new Foo773().foo4();
}
@Test
public void testFoo5() {
new Foo773().foo5();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
966365d4ced41bbb836edf32e318292664bfb8de
|
22a8c41442174cf317878be4c9b191d6f86c8ec4
|
/src/main/java/controllers/freelancer/Profile.java
|
951c639631d52d2a93159776351920c14a212600
|
[] |
no_license
|
skuarch/admin
|
0e15e1eb7ff223c988c8e5d84c2ed5515ce550fc
|
a27b5939eba0765825a0b9c359302a8e0cafb69f
|
refs/heads/master
| 2021-01-13T01:30:15.953994
| 2015-08-16T15:14:04
| 2015-08-16T15:14:04
| 35,173,051
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,533
|
java
|
package controllers.freelancer;
import controllers.application.BaseController;
import java.util.Locale;
import javax.servlet.http.HttpSession;
import model.beans.PersonBasicInformation;
import model.util.HandlerExceptionUtil;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
/**
*
* @author skuarch
*/
@Controller
public class Profile extends BaseController {
private static final Logger logger = Logger.getLogger(Profile.class);
@Autowired
private HttpSession session;
@Autowired
MessageSource messageSource;
private PersonBasicInformation personBasicInformation = null;
//==========================================================================
@RequestMapping(value = {"/profile", "profile"})
public ModelAndView profile(Locale locale) {
ModelAndView mav = new ModelAndView("freelancer/profile");
try {
personBasicInformation = (PersonBasicInformation) session.getAttribute("personBasicInformation");
mav.addObject("personBasicInformation", personBasicInformation);
} catch (Exception e) {
HandlerExceptionUtil.alert(mav, messageSource, e, logger, locale);
}
return mav;
}
}
|
[
"skuarch@yahoo.com.mx"
] |
skuarch@yahoo.com.mx
|
62443b2a829d17101682af404544fda77609f644
|
b766c0b6753f5443fd84c14e870ec316edc116bb
|
/java-basic/src/main/java/bitcamp/java100/ch19/ex2/Test1.java
|
25ad62e228e759f455f099f59a8e1100bcb6f093
|
[] |
no_license
|
angelpjn/bitcamp
|
5a83b7493812ae5dd4a61b393743a673085b59b5
|
3c1fb28cda2ab15228bcaed53160aabd936df248
|
refs/heads/master
| 2021-09-06T20:31:18.846623
| 2018-02-11T05:23:07
| 2018-02-11T05:23:07
| 104,423,428
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 329
|
java
|
package bitcamp.java100.ch19.ex2;
import java.lang.annotation.Annotation;
public class Test1 {
public static void main(String[] args) {
Annotation[] annos = MyClass.class.getAnnotations();
for (Annotation a : annos) {
System.out.println(a.annotationType().getName());
}
}
}
|
[
"angelpjn@naver.com"
] |
angelpjn@naver.com
|
2b7f15ff3215ee8b5ac1e3e5f70f781e3524bc71
|
fb5452e16d2518b472470c29852a193eae0e13f2
|
/gameserver/src/main/java/com/junglee/db/domain/Messages.java
|
53339b2486d2cb9fd863af8d28798bc50e0e4866
|
[] |
no_license
|
kinshuk4/KodingProbs
|
50af302b9eee9f8e358057360c8c16792b615830
|
9d060b3bbae3f8c53ec57f7b025dfe65050321a3
|
refs/heads/master
| 2022-12-05T00:55:27.018919
| 2018-12-13T17:13:31
| 2019-02-14T17:13:31
| 78,401,566
| 0
| 0
| null | 2022-11-24T05:28:29
| 2017-01-09T06:47:13
|
Java
|
UTF-8
|
Java
| false
| false
| 867
|
java
|
package com.junglee.db.domain;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "messages")
public class Messages {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Long id;
@Column(name = "connection")
private String connection;
@Column(name = "message")
private String message;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getConnection() {
return connection;
}
public void setConnection(String connection) {
this.connection = connection;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
|
[
"kinshuk.ram@gmail.com"
] |
kinshuk.ram@gmail.com
|
00e3ef039c1471504d66cfb50f8b6be27ea219e5
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_490/Testnull_48945.java
|
2188f8787972d37cf395c636b3a3c0e44fdd6f6e
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package org.gradle.test.performancenull_490;
import static org.junit.Assert.*;
public class Testnull_48945 {
private final Productionnull_48945 production = new Productionnull_48945("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
e4bf0931b461ed0215f178fe141e79ec749f7631
|
1657ce44a741738712ca92352d23fe004e56c263
|
/spring-boot-beatlsql/src/test/java/com/yi/beatlsql/SpringBootBeatlsqlApplicationTests.java
|
d838fd0e955477b8a1e43a111770324d4ce62801
|
[
"Apache-2.0"
] |
permissive
|
zms1207/spring-boot-2.x-examples
|
f5bf68a2819bf10706ebcd081e001d78119d1bea
|
43c9a925a2fb986efe8b220671e4eb4573367c15
|
refs/heads/master
| 2020-05-04T06:26:01.109606
| 2019-04-02T02:39:18
| 2019-04-02T02:39:18
| 179,005,806
| 1
| 0
|
Apache-2.0
| 2019-04-02T05:34:01
| 2019-04-02T05:33:58
| null |
UTF-8
|
Java
| false
| false
| 353
|
java
|
package com.yi.beatlsql;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringBootBeatlsqlApplicationTests {
@Test
public void contextLoads() {
}
}
|
[
"ilovey_hwy@163.com"
] |
ilovey_hwy@163.com
|
b89b707964985b459e32e566a034d334a793220d
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a199/A199210Test.java
|
4f2583f4729654f48102c5afc74e997c18649830
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a199;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A199210Test extends AbstractSequenceTest {
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
33edc91d647d365f39f4d06032100dd39d8ba3b1
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/src/irvine/oeis/a151/A151110.java
|
cc286e601a3d4a41f873a064773afa96ed16b432
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 587
|
java
|
package irvine.oeis.a151;
// Generated by gen_seq4.pl walk23 3 5 1 222220010100111 at 2019-07-08 22:06
// DO NOT EDIT here!
import irvine.oeis.WalkCubeSequence;
/**
* A151110 Number of walks within <code>N^3</code> (the first octant of <code>Z^3)</code> starting at <code>(0,0,0)</code> and consisting of n steps taken from <code>{(-1, -1, -1), (-1, -1, 0), (0, 1, 0), (1, 0, 0), (1, 1, 1)}</code>.
* @author Georg Fischer
*/
public class A151110 extends WalkCubeSequence {
/** Construct the sequence. */
public A151110() {
super(0, 3, 5, "", 1, "222220010100111");
}
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
2967c848676f232f3189336afe15dabbc0499702
|
7da722dca4cdd6b9da27205268641e7aef4e804c
|
/src/main/java/com/hejinyo/core/mapper/SysResourceMapper.java
|
3a04e02fca798588098b11053b87fe56aa01c382
|
[] |
no_license
|
HejinYo/base
|
efec1cec7e8ebcf2ce6c36a8925db4d34451e6dd
|
577c4ab75eac93aa929bf73f5d5c9dd3c0e35fb0
|
refs/heads/master
| 2021-01-12T02:18:01.214075
| 2017-06-06T16:04:54
| 2017-06-06T16:04:54
| 78,495,836
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 470
|
java
|
package com.hejinyo.core.mapper;
import com.hejinyo.core.domain.dto.SysMenu;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author : HejinYo hejinyo@gmail.com
* @date : 2017/4/22 14:08
* @Description :
*/
@Repository
public interface SysResourceMapper extends BaseMapper {
/**
* 根据登录名查询可用菜单
*
* @param loginName
* @return
*/
List<SysMenu> getMenuList(String loginName);
}
|
[
"hejinyo@gmail.com"
] |
hejinyo@gmail.com
|
f46a4191271c1dccc9cc3147677f834e1f76689c
|
eab084584e34ec065cd115139c346180e651c1c2
|
/src/main/java/v1/t600/T639.java
|
7fcc634e145ee226bd97216a8f56da7132bf93fb
|
[] |
no_license
|
zhouyuan93/leetcode
|
5396bd3a01ed0f127553e1e175bb1f725d1c7919
|
cc247bc990ad4d5aa802fc7a18a38dd46ed40a7b
|
refs/heads/master
| 2023-05-11T19:11:09.322348
| 2023-05-05T09:12:53
| 2023-05-05T09:12:53
| 197,735,845
| 0
| 0
| null | 2020-04-05T09:17:34
| 2019-07-19T08:38:17
|
Java
|
UTF-8
|
Java
| false
| false
| 1,490
|
java
|
package v1.t600;
public class T639 {
public static final int MOD = 1000000007;
public int numDecodings(String s) {
if (s.charAt(0) == '0') {
return 0;
}
int p = 0;
long x = 1;
long y = 1;
char c;
char before = '-';
while (p < s.length()) {
long res = 0;
c = s.charAt(p++);
if (c == '*') {
res += (x * 9);
if (before == '*') {
res += y * 15;
} else if (before == '1') {
res += y * 9;
} else if (before == '2') {
res += y * 6;
}
} else if (c == '0') {
if (before == '*') {
res += y * 2;
} else if (before == '1' || before == '2') {
res += y;
} else {
return 0;
}
} else if (c > '0' && c <= '6') {
res += x;
if (before == '*') {
res += y * 2;
} else if (before == '1' || before == '2') {
res += y;
}
} else {
res += x;
if (before == '1' || before == '*') {
res += y;
}
}
before = c;
y = x;
x = res % MOD;
}
return (int) x;
}
}
|
[
"492407250@qq.com"
] |
492407250@qq.com
|
efd53a0a2ecce5544b58d898490d7759776f0da7
|
486c615ccf948e7d7e7e5655a9a53e2f818c4f50
|
/src/test/java/com/mulanfan/shopasa/web/rest/util/PaginationUtilUnitTest.java
|
18bc4c2562b93d760f415544fcebb46463e06184
|
[] |
no_license
|
systembugtj/mulanfan
|
08d75d582cdede067bf94c0891b55bf29e6183f7
|
874b7ffa4621594f581e64945154d738d6645eab
|
refs/heads/master
| 2020-03-08T17:03:53.454817
| 2018-04-05T20:10:45
| 2018-04-05T20:10:45
| 128,258,771
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,029
|
java
|
package com.mulanfan.shopasa.web.rest.util;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.HttpHeaders;
/**
* Tests based on parsing algorithm in app/components/util/pagination-util.service.js
*
* @see PaginationUtil
*/
public class PaginationUtilUnitTest {
@Test
public void generatePaginationHttpHeadersTest() {
String baseUrl = "/api/_search/example";
List<String> content = new ArrayList<>();
Page<String> page = new PageImpl<>(content, new PageRequest(6, 50), 400L);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, baseUrl);
List<String> strHeaders = headers.get(HttpHeaders.LINK);
assertNotNull(strHeaders);
assertTrue(strHeaders.size() == 1);
String headerData = strHeaders.get(0);
assertTrue(headerData.split(",").length == 4);
String expectedData = "</api/_search/example?page=7&size=50>; rel=\"next\","
+ "</api/_search/example?page=5&size=50>; rel=\"prev\","
+ "</api/_search/example?page=7&size=50>; rel=\"last\","
+ "</api/_search/example?page=0&size=50>; rel=\"first\"";
assertEquals(expectedData, headerData);
List<String> xTotalCountHeaders = headers.get("X-Total-Count");
assertTrue(xTotalCountHeaders.size() == 1);
assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(400L));
}
@Test
public void commaTest() {
String baseUrl = "/api/_search/example";
List<String> content = new ArrayList<>();
Page<String> page = new PageImpl<>(content);
String query = "Test1, test2";
HttpHeaders headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, baseUrl);
List<String> strHeaders = headers.get(HttpHeaders.LINK);
assertNotNull(strHeaders);
assertTrue(strHeaders.size() == 1);
String headerData = strHeaders.get(0);
assertTrue(headerData.split(",").length == 2);
String expectedData = "</api/_search/example?page=0&size=0&query=Test1%2C+test2>; rel=\"last\","
+ "</api/_search/example?page=0&size=0&query=Test1%2C+test2>; rel=\"first\"";
assertEquals(expectedData, headerData);
List<String> xTotalCountHeaders = headers.get("X-Total-Count");
assertTrue(xTotalCountHeaders.size() == 1);
assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(0L));
}
@Test
public void multiplePagesTest() {
String baseUrl = "/api/_search/example";
List<String> content = new ArrayList<>();
// Page 0
Page<String> page = new PageImpl<>(content, new PageRequest(0, 50),400L);
String query = "Test1, test2";
HttpHeaders headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, baseUrl);
List<String> strHeaders = headers.get(HttpHeaders.LINK);
assertNotNull(strHeaders);
assertTrue(strHeaders.size() == 1);
String headerData = strHeaders.get(0);
assertTrue(headerData.split(",").length == 3);
String expectedData = "</api/_search/example?page=1&size=50&query=Test1%2C+test2>; rel=\"next\","
+ "</api/_search/example?page=7&size=50&query=Test1%2C+test2>; rel=\"last\","
+ "</api/_search/example?page=0&size=50&query=Test1%2C+test2>; rel=\"first\"";
assertEquals(expectedData, headerData);
List<String> xTotalCountHeaders = headers.get("X-Total-Count");
assertTrue(xTotalCountHeaders.size() == 1);
assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(400L));
// Page 1
page = new PageImpl<>(content,new PageRequest(1, 50),400L);
query = "Test1, test2";
headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, baseUrl);
strHeaders = headers.get(HttpHeaders.LINK);
assertNotNull(strHeaders);
assertTrue(strHeaders.size() == 1);
headerData = strHeaders.get(0);
assertTrue(headerData.split(",").length == 4);
expectedData = "</api/_search/example?page=2&size=50&query=Test1%2C+test2>; rel=\"next\","
+ "</api/_search/example?page=0&size=50&query=Test1%2C+test2>; rel=\"prev\","
+ "</api/_search/example?page=7&size=50&query=Test1%2C+test2>; rel=\"last\","
+ "</api/_search/example?page=0&size=50&query=Test1%2C+test2>; rel=\"first\"";
assertEquals(expectedData, headerData);
xTotalCountHeaders = headers.get("X-Total-Count");
assertTrue(xTotalCountHeaders.size() == 1);
assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(400L));
// Page 6
page = new PageImpl<>(content,new PageRequest(6, 50), 400L);
headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, baseUrl);
strHeaders = headers.get(HttpHeaders.LINK);
assertNotNull(strHeaders);
assertTrue(strHeaders.size() == 1);
headerData = strHeaders.get(0);
assertTrue(headerData.split(",").length == 4);
expectedData = "</api/_search/example?page=7&size=50&query=Test1%2C+test2>; rel=\"next\","
+ "</api/_search/example?page=5&size=50&query=Test1%2C+test2>; rel=\"prev\","
+ "</api/_search/example?page=7&size=50&query=Test1%2C+test2>; rel=\"last\","
+ "</api/_search/example?page=0&size=50&query=Test1%2C+test2>; rel=\"first\"";
assertEquals(expectedData, headerData);
xTotalCountHeaders = headers.get("X-Total-Count");
assertTrue(xTotalCountHeaders.size() == 1);
assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(400L));
// Page 7
page = new PageImpl<>(content,new PageRequest(7, 50),400L);
headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, baseUrl);
strHeaders = headers.get(HttpHeaders.LINK);
assertNotNull(strHeaders);
assertTrue(strHeaders.size() == 1);
headerData = strHeaders.get(0);
assertTrue(headerData.split(",").length == 3);
expectedData = "</api/_search/example?page=6&size=50&query=Test1%2C+test2>; rel=\"prev\","
+ "</api/_search/example?page=7&size=50&query=Test1%2C+test2>; rel=\"last\","
+ "</api/_search/example?page=0&size=50&query=Test1%2C+test2>; rel=\"first\"";
assertEquals(expectedData, headerData);
}
@Test
public void greaterSemicolonTest() {
String baseUrl = "/api/_search/example";
List<String> content = new ArrayList<>();
Page<String> page = new PageImpl<>(content);
String query = "Test>;test";
HttpHeaders headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, baseUrl);
List<String> strHeaders = headers.get(HttpHeaders.LINK);
assertNotNull(strHeaders);
assertTrue(strHeaders.size() == 1);
String headerData = strHeaders.get(0);
assertTrue(headerData.split(",").length == 2);
String[] linksData = headerData.split(",");
assertTrue(linksData.length == 2);
assertTrue(linksData[0].split(">;").length == 2);
assertTrue(linksData[1].split(">;").length == 2);
String expectedData = "</api/_search/example?page=0&size=0&query=Test%3E%3Btest>; rel=\"last\","
+ "</api/_search/example?page=0&size=0&query=Test%3E%3Btest>; rel=\"first\"";
assertEquals(expectedData, headerData);
List<String> xTotalCountHeaders = headers.get("X-Total-Count");
assertTrue(xTotalCountHeaders.size() == 1);
assertTrue(Long.valueOf(xTotalCountHeaders.get(0)).equals(0L));
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
932f1a2d9a91dfdae5542cee466cf73e4289179b
|
017d4a1ebf7e0026f315e912248f89bcfe8ef619
|
/.svn/pristine/ff/ffa17d984b79ffe6d136d375021f7839004f449a.svn-base
|
b78dc93ef206157f1a67fabf652dd874387a2150
|
[] |
no_license
|
QiangzhenZhu/cabinet
|
ed8ea40daa0bbb14f6268c6292c1eda6bf3eea6a
|
aa1484b879a709359080ef65ac52f80694de4247
|
refs/heads/master
| 2020-03-24T13:23:43.203738
| 2018-07-29T08:19:46
| 2018-07-29T08:19:46
| 142,743,099
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 482
|
package com.hzdongcheng.bll.basic.dto;
import com.hzdongcheng.bll.common.IRequest;
public class InParamPTVerfiyUser implements IRequest {
public String FunctionID = "330201"; // 功能编号
public String TerminalNo = ""; // 设备号
public String TradeWaterNo = ""; // 交易流水号
public String CustomerID = ""; // 取件人身份标识
public String OpenBoxKey = ""; // 开箱密码
public String CompanyID = ""; // 投递公司编号
public String Remark = "";
}
|
[
"1083546145@qq.com"
] |
1083546145@qq.com
|
|
a094c0e5d0730b81c6529df72b1a70c6a251ba5e
|
aa7c705d042fd1260152300cfa7925374b30156c
|
/src/main/java/com/hanfak/greedydb/core/usecases/queries/employer/QueryEmployerStreamForGivenTimestampAndFieldUsecase.java
|
bf751068301672ff2664f1659ca872d995e013a3
|
[] |
no_license
|
hanfak/greedy-db
|
4fc4a5a1fc157db6c57e0601c958bc3f8a1c645b
|
219840602d490ac6f30037d9fd3576e1278438df
|
refs/heads/master
| 2020-04-12T09:20:39.816255
| 2018-12-19T07:35:29
| 2018-12-19T07:35:29
| 162,399,681
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,068
|
java
|
package com.hanfak.greedydb.core.usecases.queries.employer;
import com.hanfak.greedydb.core.usecases.EmployerStreamRepository;
import java.sql.Timestamp;
// TODO make more abstract, factory for repository - switch/strategy,
// repository implements interface for just findFieldForGivenTimestamp
// webservice calls factory which passes the correct repository into the abstract usecase
// Issue, factory will new up impl of outer layer breaking dependency inversion
// Or pass the stream name, to be used in the repository impl sql to set the table name,
public class QueryEmployerStreamForGivenTimestampAndFieldUsecase {
private EmployerStreamRepository employerStreamRepository;
public QueryEmployerStreamForGivenTimestampAndFieldUsecase(EmployerStreamRepository employerStreamRepository) {
this.employerStreamRepository = employerStreamRepository;
}
public String queryEmployerStream(Timestamp timestamp, String jsonPath) {
return String.valueOf(employerStreamRepository.findFieldForGivenTimestamp(timestamp, jsonPath));
}
}
|
[
"fakira.work@gmail.com"
] |
fakira.work@gmail.com
|
ba9d1be0685207855f8ae77e09429d7ed5553e59
|
d39fa406c8ce637fc4c6a4cb499d1b04d42b7378
|
/src/main/java/com/chaoxing/filemanagement/common/shiro/MyRealm.java
|
1389bf6206c3e24b911292e6cf564ece90bfda94
|
[] |
no_license
|
lwgboy/filemanagement
|
95636eaa5eba2eb6f4ba55b987211415e66704a7
|
cb8cb06ddc6f78d923461ff5eca2769fb7f001ff
|
refs/heads/master
| 2021-05-18T19:36:33.387434
| 2019-10-30T09:00:43
| 2019-10-30T09:00:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,949
|
java
|
package com.chaoxing.filemanagement.common.shiro;
import com.chaoxing.filemanagement.service.UserService;
import com.chaoxing.filemanagement.util.JWTUtil;
import com.chaoxing.filemanagement.vo.UserVO;
import org.apache.shiro.authc.*;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
@Service
public class MyRealm extends AuthorizingRealm {
private UserService userService;
@Autowired
public void setUserService(UserService userService) {
this.userService = userService;
}
/**
* 大坑!,必须重写此方法,不然Shiro会报错
*/
@Override
public boolean supports(AuthenticationToken token) {
return token instanceof JWTToken;
}
/**
* 只有当需要检测用户权限的时候才会调用此方法,例如checkRole,checkPermission之类的 Authorization 授权
*/
@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
Integer userId = JWTUtil.getUserId(principals.toString());
SimpleAuthorizationInfo simpleAuthorizationInfo = new SimpleAuthorizationInfo();
UserVO user = userService.selectUserVO(userId);
//simpleAuthorizationInfo.addRole(user.getPermission());
System.out.println("permission:"+user.getPermission());
Set<String> permission = new HashSet<>(Arrays.asList(user.getPermission().split(";")));
simpleAuthorizationInfo.addStringPermissions(permission);
return simpleAuthorizationInfo;
}
/**
* 默认使用此方法进行用户名正确与否验证,错误抛出异常即可。 Authentication 认证方式
*/
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken auth) throws AuthenticationException {
String token = (String) auth.getCredentials();
// 解密获得username,用于和数据库进行对比
String username = JWTUtil.getUsername(token);
Integer userId = JWTUtil.getUserId(token);
System.out.println("userId"+userId);
System.out.println("userName"+username);
if (username == null) {
throw new AuthenticationException("token invalid");
}
UserVO userBean = userService.selectUserVO(userId);
if (userBean == null) {
throw new AuthenticationException("User didn't existed!");
}
if (! JWTUtil.verify(token,userBean.getPassword())) {
throw new AuthenticationException("Username or password error");
}
return new SimpleAuthenticationInfo(token, token, "my_realm");
}
}
|
[
"1206966083@qq.com"
] |
1206966083@qq.com
|
b66c76bf10a9f2aae2f01eccce8a76c155e34e39
|
9623f83defac3911b4780bc408634c078da73387
|
/powercraft_146_modloader/src/minecraft/powercraft/management/PC_TileEntity.java
|
5e9b3d2a6e571620eb1e55563b6a9e443c81a630
|
[] |
no_license
|
BlearStudio/powercraft-legacy
|
42b839393223494748e8b5d05acdaf59f18bd6c6
|
014e9d4d71bd99823cf63d4fbdb65c1b83fde1f8
|
refs/heads/master
| 2021-01-21T21:18:55.774908
| 2015-04-06T20:45:25
| 2015-04-06T20:45:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,934
|
java
|
package powercraft.management;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import net.minecraft.src.CrashReportCategory;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.ItemStack;
import net.minecraft.src.Packet;
import net.minecraft.src.Packet250CustomPayload;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
public abstract class PC_TileEntity extends TileEntity
{
@Override
public Packet getDescriptionPacket()
{
Object[] o = getData();
if (o == null)
{
return null;
}
ByteArrayOutputStream data = new ByteArrayOutputStream();
ObjectOutputStream sendData;
try
{
sendData = new ObjectOutputStream(data);
sendData.writeInt(PC_PacketHandler.PACKETTILEENTITY);
sendData.writeInt(xCoord);
sendData.writeInt(yCoord);
sendData.writeInt(zCoord);
sendData.writeObject(o);
sendData.writeInt(PC_PacketHandler.PACKETTILEENTITY);
}
catch (IOException e)
{
e.printStackTrace();
}
return new Packet250CustomPayload("PowerCraft", data.toByteArray());
}
public PC_VecI getCoord()
{
return new PC_VecI(xCoord, yCoord, zCoord);
}
public void setData(Object[] o)
{
}
public Object[] getData()
{
return null;
}
public void create(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
{
}
public boolean canUpdate() {
return false;
}
@Override
public void func_85027_a(CrashReportCategory par1CrashReportCategory)
{
getBlockType();
super.func_85027_a(par1CrashReportCategory);
}
}
|
[
"nils.h.emmerich@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c"
] |
nils.h.emmerich@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c
|
fb43da4c7c99a79dff204641d3e00ea0930f3aa8
|
6a95484a8989e92db07325c7acd77868cb0ac3bc
|
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201502/cm/BiddingErrors.java
|
323dd9b71a56beb03495488127aeceeaf89b6550
|
[
"Apache-2.0"
] |
permissive
|
popovsh6/googleads-java-lib
|
776687dd86db0ce785b9d56555fe83571db9570a
|
d3cabb6fb0621c2920e3725a95622ea934117daf
|
refs/heads/master
| 2020-04-05T23:21:57.987610
| 2015-03-12T19:59:29
| 2015-03-12T19:59:29
| 33,672,406
| 1
| 0
| null | 2015-04-09T14:06:00
| 2015-04-09T14:06:00
| null |
UTF-8
|
Java
| false
| false
| 4,340
|
java
|
/**
* BiddingErrors.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.adwords.axis.v201502.cm;
/**
* Represents error codes for bidding strategy entities.
*/
public class BiddingErrors extends com.google.api.ads.adwords.axis.v201502.cm.ApiError implements java.io.Serializable {
/* The error reason represented by an enum. */
private com.google.api.ads.adwords.axis.v201502.cm.BiddingErrorsReason reason;
public BiddingErrors() {
}
public BiddingErrors(
java.lang.String fieldPath,
java.lang.String trigger,
java.lang.String errorString,
java.lang.String apiErrorType,
com.google.api.ads.adwords.axis.v201502.cm.BiddingErrorsReason reason) {
super(
fieldPath,
trigger,
errorString,
apiErrorType);
this.reason = reason;
}
/**
* Gets the reason value for this BiddingErrors.
*
* @return reason * The error reason represented by an enum.
*/
public com.google.api.ads.adwords.axis.v201502.cm.BiddingErrorsReason getReason() {
return reason;
}
/**
* Sets the reason value for this BiddingErrors.
*
* @param reason * The error reason represented by an enum.
*/
public void setReason(com.google.api.ads.adwords.axis.v201502.cm.BiddingErrorsReason reason) {
this.reason = reason;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof BiddingErrors)) return false;
BiddingErrors other = (BiddingErrors) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj) &&
((this.reason==null && other.getReason()==null) ||
(this.reason!=null &&
this.reason.equals(other.getReason())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getReason() != null) {
_hashCode += getReason().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(BiddingErrors.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201502", "BiddingErrors"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("reason");
elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201502", "reason"));
elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201502", "BiddingErrors.Reason"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
089aa5fab16513a3b6e931e3571cbdc1844c1d5d
|
5e5e09aec0cd7dd38ca008a221693bab6752963c
|
/src/main/java/com/cfl/service/BookTypeService.java
|
1db596d698d90b2cc5ad6ee71223282aa56fe85d
|
[] |
no_license
|
NDCFL/book
|
d27c4922017864187c8bc56e418d73ef89cf4a32
|
4340069000ba3172afd27a9223f9d6b28d04b0c2
|
refs/heads/master
| 2021-01-25T13:24:00.577368
| 2018-03-09T06:15:11
| 2018-03-09T06:15:11
| 123,564,512
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 213
|
java
|
package com.cfl.service;
import com.cfl.vo.BookTypeVo;
import com.cfl.vo.Select2Vo;
import java.util.List;
public interface BookTypeService extends BaseService<BookTypeVo>{
List<Select2Vo> getBookType();
}
|
[
"275300091@qq.com"
] |
275300091@qq.com
|
22443881e567c3ec57f8d1a5821d98283199013c
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/energyexpertalgorithm-20230615/src/main/java/com/aliyun/energyexpertalgorithm20230615/models/QueryEnergyStorageStrategyResponse.java
|
94af1251fc5fc8f4ba6eb92df1bebec22f4679ac
|
[
"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,495
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.energyexpertalgorithm20230615.models;
import com.aliyun.tea.*;
public class QueryEnergyStorageStrategyResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public QueryEnergyStorageStrategyResponseBody body;
public static QueryEnergyStorageStrategyResponse build(java.util.Map<String, ?> map) throws Exception {
QueryEnergyStorageStrategyResponse self = new QueryEnergyStorageStrategyResponse();
return TeaModel.build(map, self);
}
public QueryEnergyStorageStrategyResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public QueryEnergyStorageStrategyResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public QueryEnergyStorageStrategyResponse setBody(QueryEnergyStorageStrategyResponseBody body) {
this.body = body;
return this;
}
public QueryEnergyStorageStrategyResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
cc5332224a2852462652a1dcd530f2f240b73bc7
|
311f1237e7498e7d1d195af5f4bcd49165afa63a
|
/sourcedata/camel-camel-1.6.0/components/camel-spring/src/test/java/org/apache/camel/spring/InjectedBean.java
|
bd17101e3505e1ffc7265dbc142e9e5544dbd896
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-unknown"
] |
permissive
|
DXYyang/SDP
|
86ee0e9fb7032a0638b8bd825bcf7585bccc8021
|
6ad0daf242d4062888ceca6d4a1bd4c41fd99b63
|
refs/heads/master
| 2023-01-11T02:29:36.328694
| 2019-11-02T09:38:34
| 2019-11-02T09:38:34
| 219,128,146
| 10
| 1
|
Apache-2.0
| 2023-01-02T21:53:42
| 2019-11-02T08:54:26
|
Java
|
UTF-8
|
Java
| false
| false
| 4,807
|
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.camel.spring;
import org.apache.camel.Endpoint;
import org.apache.camel.EndpointInject;
import org.apache.camel.PollingConsumer;
import org.apache.camel.Producer;
import org.apache.camel.ProducerTemplate;
/**
* @version $Revision$
*/
public class InjectedBean {
@EndpointInject(uri = "direct:fieldInjectedEndpoint")
private Endpoint fieldInjectedEndpoint;
private Endpoint propertyInjectedEndpoint;
@EndpointInject(uri = "direct:fieldInjectedProducer")
private Producer fieldInjectedProducer;
private Producer propertyInjectedProducer;
@EndpointInject(uri = "direct:fieldInjectedCamelTemplate")
private ProducerTemplate fieldInjectedCamelTemplate;
private ProducerTemplate propertyInjectedCamelTemplate;
@EndpointInject
private ProducerTemplate injectByFieldName;
private ProducerTemplate injectByPropertyName;
@EndpointInject(uri = "direct:fieldInjectedEndpoint")
private PollingConsumer fieldInjectedPollingConsumer;
private PollingConsumer propertyInjectedPollingConsumer;
// Endpoint
//-----------------------------------------------------------------------
public Endpoint getFieldInjectedEndpoint() {
return fieldInjectedEndpoint;
}
public Endpoint getPropertyInjectedEndpoint() {
return propertyInjectedEndpoint;
}
@EndpointInject(name = "namedEndpoint1")
public void setPropertyInjectedEndpoint(Endpoint propertyInjectedEndpoint) {
this.propertyInjectedEndpoint = propertyInjectedEndpoint;
}
// Producer
//-----------------------------------------------------------------------
public Producer getFieldInjectedProducer() {
return fieldInjectedProducer;
}
public Producer getPropertyInjectedProducer() {
return propertyInjectedProducer;
}
@EndpointInject(uri = "direct:propertyInjectedProducer")
public void setPropertyInjectedProducer(Producer propertyInjectedProducer) {
this.propertyInjectedProducer = propertyInjectedProducer;
}
// CamelTemplate
//-----------------------------------------------------------------------
public ProducerTemplate getFieldInjectedCamelTemplate() {
return fieldInjectedCamelTemplate;
}
public ProducerTemplate getPropertyInjectedCamelTemplate() {
return propertyInjectedCamelTemplate;
}
@EndpointInject(uri = "direct:propertyInjectedCamelTemplate")
public void setPropertyInjectedCamelTemplate(ProducerTemplate propertyInjectedCamelTemplate) {
this.propertyInjectedCamelTemplate = propertyInjectedCamelTemplate;
}
// ProducerTemplate
//-------------------------------------------------------------------------
public ProducerTemplate getInjectByFieldName() {
return injectByFieldName;
}
public void setInjectByFieldName(ProducerTemplate injectByFieldName) {
this.injectByFieldName = injectByFieldName;
}
public ProducerTemplate getInjectByPropertyName() {
return injectByPropertyName;
}
@EndpointInject
public void setInjectByPropertyName(ProducerTemplate injectByPropertyName) {
this.injectByPropertyName = injectByPropertyName;
}
// PollingConsumer
//-------------------------------------------------------------------------
public PollingConsumer getFieldInjectedPollingConsumer() {
return fieldInjectedPollingConsumer;
}
public void setFieldInjectedPollingConsumer(PollingConsumer fieldInjectedPollingConsumer) {
this.fieldInjectedPollingConsumer = fieldInjectedPollingConsumer;
}
public PollingConsumer getPropertyInjectedPollingConsumer() {
return propertyInjectedPollingConsumer;
}
@EndpointInject(uri = "direct:propertyInjectedPollingConsumer")
public void setPropertyInjectedPollingConsumer(PollingConsumer propertyInjectedPollingConsumer) {
this.propertyInjectedPollingConsumer = propertyInjectedPollingConsumer;
}
}
|
[
"512463514@qq.com"
] |
512463514@qq.com
|
6187bff40bfbeff0f6c7e9580cdc7815d9deb8ff
|
7adc8a0a46340f94cec9dce1a2042c25bf7ebac0
|
/backend/suyang_project_server/o2o-massage/o2o-mgt-web/src/main/java/com/o2o/nm/sys/entity/SysRole.java
|
fac18c84b03d3d153a31ba39cd956bbfc46d43d5
|
[] |
no_license
|
sonia630/suyang_project
|
23b651b4259a0359bde20fd082410b8a09235466
|
0701c1706cf7d45274758053bba3bb8d64bc9205
|
refs/heads/master
| 2021-04-12T10:34:54.413844
| 2018-07-25T01:35:47
| 2018-07-25T01:35:47
| 126,292,773
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,333
|
java
|
package com.o2o.nm.sys.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.baomidou.mybatisplus.enums.IdType;
import com.google.common.collect.Lists;
import com.o2o.nm.entity.BasicEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.List;
/**
* <p>
* 角色表
* </p>
*
* @author warning5
* @since 2018-02-24
*/
@Getter
@Setter
@ToString
public class SysRole extends BasicEntity<String> implements TreeNode<String, SysRole> {
/**
* 父编号
*/
@TableField(value = "parent_id", strategy = FieldStrategy.IGNORED)
protected String parentId;
@TableId(value = "id", type = IdType.INPUT)
protected String id;
@TableField(exist = false)
@JSONField(serialize = false)
protected List<SysRole> children = Lists.newArrayList();
@TableField(exist = false)
@JSONField(serialize = false)
protected SysRole parent;
private String name;
private String description;
/**
* 角色or分类
*/
private int type;
/**
* 备注信息
*/
private String remarks;
@TableField(exist = false)
private String pname;
}
|
[
"yongtali@cisco.com"
] |
yongtali@cisco.com
|
963bb0002a7837e19d3874fab0f12e38b4ac7db7
|
784017131b5eadffd3bec254f9304225e648d3a3
|
/app/src/main/java/android/support/p001v4/view/LayoutInflaterCompat.java
|
f9f7995c900b99c70c4c152f0ecbb186465f58d6
|
[] |
no_license
|
Nienter/kdshif
|
e6126b3316f4b6e15a7dc6a67253f5729515fb4c
|
4d65454bb331e4439ed948891aa0173655d66934
|
refs/heads/master
| 2022-12-03T19:57:04.981078
| 2020-08-06T11:28:14
| 2020-08-06T11:28:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,747
|
java
|
package android.support.p001v4.view;
import android.os.Build;
import android.view.LayoutInflater;
/* renamed from: android.support.v4.view.LayoutInflaterCompat */
public final class LayoutInflaterCompat {
static final LayoutInflaterCompatImpl IMPL;
/* renamed from: android.support.v4.view.LayoutInflaterCompat$LayoutInflaterCompatImpl */
interface LayoutInflaterCompatImpl {
LayoutInflaterFactory getFactory(LayoutInflater layoutInflater);
void setFactory(LayoutInflater layoutInflater, LayoutInflaterFactory layoutInflaterFactory);
}
/* renamed from: android.support.v4.view.LayoutInflaterCompat$LayoutInflaterCompatImplBase */
static class LayoutInflaterCompatImplBase implements LayoutInflaterCompatImpl {
LayoutInflaterCompatImplBase() {
}
public void setFactory(LayoutInflater layoutInflater, LayoutInflaterFactory layoutInflaterFactory) {
LayoutInflaterCompatBase.setFactory(layoutInflater, layoutInflaterFactory);
}
public LayoutInflaterFactory getFactory(LayoutInflater layoutInflater) {
return LayoutInflaterCompatBase.getFactory(layoutInflater);
}
}
/* renamed from: android.support.v4.view.LayoutInflaterCompat$LayoutInflaterCompatImplV11 */
static class LayoutInflaterCompatImplV11 extends LayoutInflaterCompatImplBase {
LayoutInflaterCompatImplV11() {
}
public void setFactory(LayoutInflater layoutInflater, LayoutInflaterFactory layoutInflaterFactory) {
LayoutInflaterCompatHC.setFactory(layoutInflater, layoutInflaterFactory);
}
}
/* renamed from: android.support.v4.view.LayoutInflaterCompat$LayoutInflaterCompatImplV21 */
static class LayoutInflaterCompatImplV21 extends LayoutInflaterCompatImplV11 {
LayoutInflaterCompatImplV21() {
}
public void setFactory(LayoutInflater layoutInflater, LayoutInflaterFactory layoutInflaterFactory) {
LayoutInflaterCompatLollipop.setFactory(layoutInflater, layoutInflaterFactory);
}
}
static {
int i = Build.VERSION.SDK_INT;
if (i >= 21) {
IMPL = new LayoutInflaterCompatImplV21();
} else if (i >= 11) {
IMPL = new LayoutInflaterCompatImplV11();
} else {
IMPL = new LayoutInflaterCompatImplBase();
}
}
private LayoutInflaterCompat() {
}
public static void setFactory(LayoutInflater layoutInflater, LayoutInflaterFactory layoutInflaterFactory) {
IMPL.setFactory(layoutInflater, layoutInflaterFactory);
}
public static LayoutInflaterFactory getFactory(LayoutInflater layoutInflater) {
return IMPL.getFactory(layoutInflater);
}
}
|
[
"niu@eptonic.com"
] |
niu@eptonic.com
|
b7f4537273af3784013907d1b207bcbabaf0c5c1
|
93a501a1564a89db2985410b0893f839c47b971e
|
/src/twg2/ast/interm/classes/ClassSigSimple.java
|
99e8919e8a2cb49b2256508ef2e82134a1045dc5
|
[
"MIT"
] |
permissive
|
TeamworkGuy2/JParseCode
|
abdd6da2b1efd31089492903d2e418a929f58984
|
16de37b3016a35668bb4f43a48342b05eb311a4b
|
refs/heads/master
| 2021-09-13T02:43:42.742063
| 2021-08-21T18:14:59
| 2021-08-21T18:14:59
| 49,784,617
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,118
|
java
|
package twg2.ast.interm.classes;
import java.io.IOException;
import java.util.List;
import lombok.Getter;
import twg2.annotations.Immutable;
import twg2.ast.interm.annotation.AnnotationSig;
import twg2.ast.interm.type.TypeSig;
import twg2.ast.interm.type.TypeSig.TypeSigSimple;
import twg2.io.json.stringify.JsonStringify;
import twg2.parser.codeParser.Keyword;
import twg2.parser.codeParser.tools.NameUtil;
import twg2.parser.output.WriteSettings;
@Immutable
public class ClassSigSimple implements ClassSig {
private final @Getter List<String> fullName;
/** This type's generic type parameters, if any */
private final @Getter List<TypeSig.TypeSigSimple> params;
/** The block's access (i.e. 'public', 'private', etc.) */
private final @Getter Keyword accessModifier;
/** The block's annotations */
private final @Getter List<AnnotationSig> annotations;
/** The block's type (i.e. 'interface', 'class', 'enum', etc.) */
private final @Getter String declarationType;
private final @Getter List<String> extendImplementSimpleNames;
private final @Getter List<String> comments;
public ClassSigSimple(List<String> fullName, List<? extends TypeSigSimple> params, Keyword accessModifier, List<? extends AnnotationSig> annotations, List<String> comments, String declarationType, List<String> extendImplementSimpleNames) {
@SuppressWarnings("unchecked")
var paramsCast = (List<TypeSigSimple>)params;
@SuppressWarnings("unchecked")
var annotationsCast = (List<AnnotationSig>)annotations;
this.fullName = fullName;
this.params = paramsCast;
this.accessModifier = accessModifier;
this.annotations = annotationsCast;
this.comments = comments;
this.declarationType = declarationType;
this.extendImplementSimpleNames = extendImplementSimpleNames;
}
@Override
public String getSimpleName() {
return fullName.get(fullName.size() - 1);
}
public boolean isGeneric() {
return params.size() > 0;
}
@Override
public void toJson(Appendable dst, WriteSettings st) throws IOException {
var json = JsonStringify.inst;
dst.append("{ ");
json.toProp("access", accessModifier.toSrc(), dst);
json.comma(dst).toProp("name", (st.fullClassName ? NameUtil.joinFqName(fullName) : fullName.get(fullName.size() - 1)), dst);
if(declarationType != null) {
json.comma(dst).toProp("declarationType", declarationType, dst);
}
if(params != null && params.size() > 0) {
json.comma(dst).propName("genericParameters", dst)
.toArrayConsume(params, dst, (p) -> p.toJson(dst, st));
}
if(extendImplementSimpleNames.size() > 0) {
json.comma(dst).propName("extendImplementClassNames", dst)
.toStringArray(extendImplementSimpleNames, dst);
}
if(annotations.size() > 0) {
json.comma(dst).propName("annotations", dst)
.toArrayConsume(annotations, dst, (a) -> a.toJson(dst, st));
}
if(comments.size() > 0) {
json.comma(dst).propName("comments", dst)
.toStringArray(comments, dst);
}
dst.append(" }");
}
@Override
public String toString() {
return accessModifier.toSrc() + " " + declarationType + " " + NameUtil.joinFqName(fullName);
}
}
|
[
"straitfrommars@rocketmail.com"
] |
straitfrommars@rocketmail.com
|
91e9b7e0692e40f981f1ad48edfc16616aec6f27
|
f47330aaf4fec44fe0ab355930eb141fb432ffe7
|
/src/main/java/ai/labs/eddi/modules/nlp/expressions/value/AllValue.java
|
9d1b61fd915f66b2a398b9003c1d7c2c2dee914b
|
[
"Apache-2.0"
] |
permissive
|
labsai/EDDI
|
2451c4601383a37b60808380d47ea84d2232f55d
|
11c82e33f3fabf2655f2c94b4ffd18bae1ff550d
|
refs/heads/main
| 2023-09-04T06:27:13.968221
| 2023-08-16T14:33:33
| 2023-08-16T14:33:33
| 70,809,374
| 257
| 102
| null | 2023-05-02T16:52:33
| 2016-10-13T13:29:22
|
Java
|
UTF-8
|
Java
| false
| false
| 249
|
java
|
package ai.labs.eddi.modules.nlp.expressions.value;
import ai.labs.eddi.modules.nlp.expressions.Expression;
/**
* @author ginccc
*/
public class AllValue extends Expression {
public AllValue() {
this.expressionName = "all";
}
}
|
[
"gregor@jarisch.net"
] |
gregor@jarisch.net
|
ec3030c247d475b16a7ff8b767b1317080f63d70
|
c9523b4741df1b6292430700d5fcf4a8a53401de
|
/lamp-authority/lamp-authority-biz/src/main/java/com/tangyh/lamp/authority/service/auth/ApplicationService.java
|
1a25773f03b563bbb17f99f8ecb61f9957c30a63
|
[
"Apache-2.0"
] |
permissive
|
constantine008/zuihou-admin-cloud
|
c66c1a1c581764ab36630cee89fdb27a258d1c16
|
64a4bdb92efdd67c8e51e25fdcbcaf3d58499820
|
refs/heads/master
| 2023-04-22T09:42:18.840152
| 2021-04-24T08:52:24
| 2021-04-24T08:52:24
| 298,507,347
| 0
| 0
|
Apache-2.0
| 2021-04-24T08:52:24
| 2020-09-25T07:59:03
| null |
UTF-8
|
Java
| false
| false
| 570
|
java
|
package com.tangyh.lamp.authority.service.auth;
import com.tangyh.lamp.authority.entity.auth.Application;
import com.tangyh.basic.base.service.SuperCacheService;
/**
* <p>
* 业务接口
* 应用
* </p>
*
* @author zuihou
* @date 2019-12-15
*/
public interface ApplicationService extends SuperCacheService<Application> {
/**
* 根据 clientId 和 clientSecret 查询
*
* @param clientId 客户端id
* @param clientSecret 客户端密钥
* @return 应用
*/
Application getByClient(String clientId, String clientSecret);
}
|
[
"244387066@qq.com"
] |
244387066@qq.com
|
45343d39f5e342bd77a4622097b6f9f9b36bf5e8
|
c697b14836a01be88e6bbf43ac648be83426ade0
|
/Algorithms/1001-2000/1424. Diagonal Traverse II/Solution.java
|
0a188118da085f06a1e75efccbeda5d84676477c
|
[] |
no_license
|
jianyimiku/My-LeetCode-Solution
|
8b916d7ebbb89606597ec0657f16a8a9e88895b4
|
48058eaeec89dc3402b8a0bbc8396910116cdf7e
|
refs/heads/master
| 2023-07-17T17:50:11.718015
| 2021-09-05T06:27:06
| 2021-09-05T06:27:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,072
|
java
|
class Solution {
public int[] findDiagonalOrder(List<List<Integer>> nums) {
PriorityQueue<int[]> priorityQueue = new PriorityQueue<int[]>(new Comparator<int[]>() {
public int compare(int[] position1, int[] position2) {
int sum1 = position1[0] + position1[1], sum2 = position2[0] + position2[1];
if (sum1 != sum2)
return sum1 - sum2;
else
return position2[0] - position1[0];
}
});
int rows = nums.size();
for (int i = 0; i < rows; i++) {
int columns = nums.get(i).size();
for (int j = 0; j < columns; j++)
priorityQueue.offer(new int[]{i, j});
}
int size = priorityQueue.size();
int[] orderArray = new int[size];
for (int i = 0; i < size; i++) {
int[] position = priorityQueue.poll();
int row = position[0], column = position[1];
orderArray[i] = nums.get(row).get(column);
}
return orderArray;
}
}
|
[
"chenyi_storm@sina.com"
] |
chenyi_storm@sina.com
|
d27f48026969cd627aed5b3897d38beab554e768
|
363c936f4a89b7d3f5f4fb588e8ca20c527f6022
|
/AL-Game/data/scripts/system/handlers/quest/altgard/_2020KeepingtheBlackClawTribeinCheck.java
|
072be0e34407c47380aded4970109627ee1bd851
|
[] |
no_license
|
G-Robson26/AionServer-4.9F
|
d628ccb4307aa0589a70b293b311422019088858
|
3376c78b8d90bd4d859a7cfc25c5edc775e51cbf
|
refs/heads/master
| 2023-09-04T00:46:47.954822
| 2017-08-09T13:23:03
| 2017-08-09T13:23:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,849
|
java
|
/**
* This file is part of Aion-Lightning <aion-lightning.org>.
*
* Aion-Lightning is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Aion-Lightning is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License
* along with Aion-Lightning.
* If not, see <http://www.gnu.org/licenses/>.
*/
package quest.altgard;
import com.aionemu.gameserver.model.gameobjects.Npc;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.network.aion.serverpackets.SM_DIALOG_WINDOW;
import com.aionemu.gameserver.questEngine.handlers.QuestHandler;
import com.aionemu.gameserver.questEngine.model.QuestEnv;
import com.aionemu.gameserver.questEngine.model.QuestState;
import com.aionemu.gameserver.questEngine.model.QuestStatus;
import com.aionemu.gameserver.services.QuestService;
import com.aionemu.gameserver.utils.PacketSendUtility;
/**
* @author Mr. Poke
*/
public class _2020KeepingtheBlackClawTribeinCheck extends QuestHandler {
private final static int questId = 2020;
public _2020KeepingtheBlackClawTribeinCheck() {
super(questId);
}
@Override
public void register() {
qe.registerOnEnterZoneMissionEnd(questId);
qe.registerOnLevelUp(questId);
qe.registerQuestNpc(203665).addOnTalkEvent(questId);
qe.registerQuestNpc(203668).addOnTalkEvent(questId);
qe.registerQuestNpc(210562).addOnKillEvent(questId);
qe.registerQuestNpc(216914).addOnKillEvent(questId);
}
@Override
public boolean onDialogEvent(QuestEnv env) {
final Player player = env.getPlayer();
final QuestState qs = player.getQuestStateList().getQuestState(questId);
if (qs == null) {
return false;
}
final int var = qs.getQuestVarById(0);
int targetId = 0;
if (env.getVisibleObject() instanceof Npc) {
targetId = ((Npc) env.getVisibleObject()).getNpcId();
}
if (qs.getStatus() == QuestStatus.START) {
switch (targetId) {
case 203665:
switch (env.getDialog()) {
case QUEST_SELECT:
if (var == 0) {
return sendQuestDialog(env, 1011);
}
break;
case SETPRO1:
return defaultCloseDialog(env, 0, 1); // 1
default:
break;
}
break;
case 203668:
switch (env.getDialog()) {
case QUEST_SELECT:
if (var == 1) {
return sendQuestDialog(env, 1352);
} else if (var == 5) {
return sendQuestDialog(env, 1693);
} else if (var == 6) {
return sendQuestDialog(env, 2034);
}
break;
case SETPRO2:
case SETPRO3:
if (var == 1 || var == 5) {
qs.setQuestVarById(0, var + 1);
updateQuestStatus(env);
PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(env.getVisibleObject().getObjectId(), 10));
return true;
}
case CHECK_USER_HAS_QUEST_ITEM:
if (var == 6) {
if (QuestService.collectItemCheck(env, true)) {
qs.setStatus(QuestStatus.REWARD);
updateQuestStatus(env);
return sendQuestDialog(env, 5);
} else {
return sendQuestDialog(env, 2120);
}
}
default:
break;
}
}
} else if (qs.getStatus() == QuestStatus.REWARD) {
if (targetId == 203668) {
return sendQuestEndDialog(env);
}
}
return false;
}
@Override
public boolean onKillEvent(QuestEnv env) {
Player player = env.getPlayer();
QuestState qs = player.getQuestStateList().getQuestState(questId);
if (qs == null || qs.getStatus() != QuestStatus.START) {
return false;
}
int var = qs.getQuestVarById(0);
int targetId = 0;
if (env.getVisibleObject() instanceof Npc) {
targetId = ((Npc) env.getVisibleObject()).getNpcId();
}
if ((targetId == 210562 || targetId == 216914) && var >= 2 && var < 5) {
qs.setQuestVarById(0, var + 1);
updateQuestStatus(env);
return true;
}
return false;
}
@Override
public boolean onZoneMissionEndEvent(QuestEnv env) {
return defaultOnZoneMissionEndEvent(env);
}
@Override
public boolean onLvlUpEvent(QuestEnv env) {
return defaultOnLvlUpEvent(env, 2200, true);
}
}
|
[
"falke34@a70f7278-c47d-401d-a0e4-c9401b7f63ed"
] |
falke34@a70f7278-c47d-401d-a0e4-c9401b7f63ed
|
0c0eda1d8912824805c375bca674678b8887c4ab
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdasApi21/applicationModule/src/test/java/applicationModulepackageJava1/Foo530Test.java
|
91c2b74b2d80f961a2df0b56cba4605cb9981388
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 481
|
java
|
package applicationModulepackageJava1;
import org.junit.Test;
public class Foo530Test {
@Test
public void testFoo0() {
new Foo530().foo0();
}
@Test
public void testFoo1() {
new Foo530().foo1();
}
@Test
public void testFoo2() {
new Foo530().foo2();
}
@Test
public void testFoo3() {
new Foo530().foo3();
}
@Test
public void testFoo4() {
new Foo530().foo4();
}
@Test
public void testFoo5() {
new Foo530().foo5();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
68426f017327470b3768bbcb75871308fe31725b
|
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
|
/SCT2/tags/M_SCT_15/test-plugins/org.yakindu.sct.generator.core.test/src/org/yakindu/sct/generator/core/extensions/TypeAnalyzerExtensionsTest.java
|
dc799c8ecb1a3b8b2c85a8f18c64035723f43c0a
|
[] |
no_license
|
huybuidac20593/yakindu
|
377fb9100d7db6f4bb33a3caa78776c4a4b03773
|
304fb02b9c166f340f521f5e4c41d970268f28e9
|
refs/heads/master
| 2021-05-29T14:46:43.225721
| 2015-05-28T11:54:07
| 2015-05-28T11:54:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,830
|
java
|
package org.yakindu.sct.generator.core.extensions;
import static org.yakindu.sct.model.stext.test.util.StextTestFactory.*;
import static org.junit.Assert.*;
import org.eclipse.xtend.XtendFacade;
import org.eclipse.xtend.expression.ExecutionContext;
import org.eclipse.xtend.expression.ExecutionContextImpl;
import org.eclipse.xtend.expression.TypeSystemImpl;
import org.eclipse.xtend.typesystem.emf.EmfMetaModel;
import org.junit.Test;
import org.yakindu.base.base.BasePackage;
import org.yakindu.base.types.Type;
import org.yakindu.base.types.TypesPackage;
import org.yakindu.sct.model.sgraph.SGraphPackage;
import org.yakindu.sct.model.stext.stext.StextPackage;
public class TypeAnalyzerExtensionsTest {
private Object call(String methodName, Object... params) {
TypeSystemImpl ts = new TypeSystemImpl();
ts.registerMetaModel(new EmfMetaModel(BasePackage.eINSTANCE));
ts.registerMetaModel(new EmfMetaModel(TypesPackage.eINSTANCE));
ts.registerMetaModel(new EmfMetaModel(SGraphPackage.eINSTANCE));
ts.registerMetaModel(new EmfMetaModel(StextPackage.eINSTANCE));
ExecutionContext ctx = new ExecutionContextImpl(ts);
XtendFacade facade = XtendFacade
.create(ctx,
"org::yakindu::sct::generator::core::extensions::TypeAnalyzerExtensions");
Object result = facade.call(methodName, params);
return result;
}
@Test
public void testIsVoid() {
Object result = call("isVoid", new Object[] { null });
assertEquals(Boolean.TRUE, result);
Type type = _createType(null);
result = call("isVoid", type);
assertEquals(Boolean.TRUE, result);
type.setName("void");
result = call("isVoid", type);
assertEquals(Boolean.TRUE, result);
type.setName("String");
result = call("isVoid", type);
assertEquals(Boolean.FALSE, result);
}
}
|
[
"terfloth@itemis.de"
] |
terfloth@itemis.de
|
ec34d11ab1bcd7c73f1690d5d01dcc1a8c5388d0
|
29e6f769e937401e20fbc1f8a7b71dd9f2584339
|
/spring-annotation/src/main/java/com/hfm/aware/MyAware.java
|
daf3644f35f603b7b258438013fea81db4ed0e1d
|
[] |
no_license
|
hfming/java_ee
|
0dc57d080a43386d4fcaea3de5f770b4b7791cc6
|
e18957c9a69705f2a1f81bd004577dfaafdacd7e
|
refs/heads/master
| 2023-08-31T05:38:21.817110
| 2021-10-24T13:56:15
| 2021-10-24T13:56:15
| 312,496,780
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 922
|
java
|
package com.hfm.aware;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
/**
* @author hfming2016@163.com
* @version 1.01 2021-10-15 21:52
* @Description 自动装配
* @date 2021/10/15
*/
@Component
public class MyAware implements ApplicationContextAware, BeanNameAware {
private ApplicationContext applicationContext;
@Override
public void setBeanName(String s) {
// 当前 Bean 的名称
System.out.println(s);
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
// IOC 容器
System.out.println(applicationContext);
this.applicationContext = applicationContext;
}
}
|
[
"hfming2016@163.com"
] |
hfming2016@163.com
|
4ebaed0f38480f4206579179f223fab17ad37c12
|
022980735384919a0e9084f57ea2f495b10c0d12
|
/src/liferay-plugins-sdk-5.2.3/portlets/digitalsignature-portlet/docroot/WEB-INF/src/com/nss/portlet/digitalsignature/model/impl/CertificateModelImpl.java
|
ee90619bfbcd861de1f47a323d16b5109f5cb57e
|
[
"MIT"
] |
permissive
|
thaond/nsscttdt
|
474d8e359f899d4ea6f48dd46ccd19bbcf34b73a
|
ae7dacc924efe578ce655ddfc455d10c953abbac
|
refs/heads/master
| 2021-01-10T03:00:24.086974
| 2011-02-19T09:18:34
| 2011-02-19T09:18:34
| 50,081,202
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,706
|
java
|
/**
* Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
*
* 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.
*/
package com.nss.portlet.digitalsignature.model.impl;
import com.liferay.portal.kernel.bean.ReadOnlyBeanHandler;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.HtmlUtil;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl;
import com.nss.portlet.digitalsignature.model.Certificate;
import com.nss.portlet.digitalsignature.model.CertificateSoap;
import java.io.Serializable;
import java.lang.reflect.Proxy;
import java.sql.Types;
import java.util.ArrayList;
import java.util.List;
/**
* <a href="CertificateModelImpl.java.html"><b><i>View Source</i></b></a>
*
* @author canhminh
*
*/
public class CertificateModelImpl extends BaseModelImpl<Certificate> {
public static final String TABLE_NAME = "nss_certificate";
public static final Object[][] TABLE_COLUMNS = {
{ "userId", new Integer(Types.BIGINT) },
{ "x509Certificate", new Integer(Types.CLOB) }
};
public static final String TABLE_SQL_CREATE = "create table nss_certificate (userId LONG not null primary key,x509Certificate TEXT null)";
public static final String TABLE_SQL_DROP = "drop table nss_certificate";
public static final String DATA_SOURCE = "liferayDataSource";
public static final String SESSION_FACTORY = "liferaySessionFactory";
public static final String TX_MANAGER = "liferayTransactionManager";
public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
"value.object.entity.cache.enabled.com.nss.portlet.digitalsignature.model.Certificate"),
true);
public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
"value.object.finder.cache.enabled.com.nss.portlet.digitalsignature.model.Certificate"),
true);
public static Certificate toModel(CertificateSoap soapModel) {
Certificate model = new CertificateImpl();
model.setUserId(soapModel.getUserId());
model.setX509Certificate(soapModel.getX509Certificate());
return model;
}
public static List<Certificate> toModels(CertificateSoap[] soapModels) {
List<Certificate> models = new ArrayList<Certificate>(soapModels.length);
for (CertificateSoap soapModel : soapModels) {
models.add(toModel(soapModel));
}
return models;
}
public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
"lock.expiration.time.com.nss.portlet.digitalsignature.model.Certificate"));
public CertificateModelImpl() {
}
public long getPrimaryKey() {
return _userId;
}
public void setPrimaryKey(long pk) {
setUserId(pk);
}
public Serializable getPrimaryKeyObj() {
return new Long(_userId);
}
public long getUserId() {
return _userId;
}
public void setUserId(long userId) {
_userId = userId;
}
public String getX509Certificate() {
return GetterUtil.getString(_x509Certificate);
}
public void setX509Certificate(String x509Certificate) {
_x509Certificate = x509Certificate;
}
public Certificate toEscapedModel() {
if (isEscapedModel()) {
return (Certificate)this;
}
else {
Certificate model = new CertificateImpl();
model.setNew(isNew());
model.setEscapedModel(true);
model.setUserId(getUserId());
model.setX509Certificate(HtmlUtil.escape(getX509Certificate()));
model = (Certificate)Proxy.newProxyInstance(Certificate.class.getClassLoader(),
new Class[] { Certificate.class },
new ReadOnlyBeanHandler(model));
return model;
}
}
public ExpandoBridge getExpandoBridge() {
if (_expandoBridge == null) {
_expandoBridge = new ExpandoBridgeImpl(Certificate.class.getName(),
getPrimaryKey());
}
return _expandoBridge;
}
public Object clone() {
CertificateImpl clone = new CertificateImpl();
clone.setUserId(getUserId());
clone.setX509Certificate(getX509Certificate());
return clone;
}
public int compareTo(Certificate certificate) {
long pk = certificate.getPrimaryKey();
if (getPrimaryKey() < pk) {
return -1;
}
else if (getPrimaryKey() > pk) {
return 1;
}
else {
return 0;
}
}
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
Certificate certificate = null;
try {
certificate = (Certificate)obj;
}
catch (ClassCastException cce) {
return false;
}
long pk = certificate.getPrimaryKey();
if (getPrimaryKey() == pk) {
return true;
}
else {
return false;
}
}
public int hashCode() {
return (int)getPrimaryKey();
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{userId=");
sb.append(getUserId());
sb.append(", x509Certificate=");
sb.append(getX509Certificate());
sb.append("}");
return sb.toString();
}
public String toXmlString() {
StringBuilder sb = new StringBuilder();
sb.append("<model><model-name>");
sb.append("com.nss.portlet.digitalsignature.model.Certificate");
sb.append("</model-name>");
sb.append(
"<column><column-name>userId</column-name><column-value><![CDATA[");
sb.append(getUserId());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>x509Certificate</column-name><column-value><![CDATA[");
sb.append(getX509Certificate());
sb.append("]]></column-value></column>");
sb.append("</model>");
return sb.toString();
}
private long _userId;
private String _x509Certificate;
private transient ExpandoBridge _expandoBridge;
}
|
[
"nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e"
] |
nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e
|
885d59b5cfde6897588f821bb15ca58b047f356d
|
74201dad70440adbec57bf0a4e83b56551f9da7c
|
/app/src/main/java/kapadokia/nyandoro/books/sharedPref/SpUtil.java
|
566933dfd14cb1599868e9e7d070b488751932ab
|
[] |
no_license
|
Kapadokia-Titus/Google-Books
|
a74db40fe68d35741a07d0e735db3cda7a8d6fac
|
2bd297c8ab204dac9c8b30f1314d5018d44fc264
|
refs/heads/master
| 2022-11-26T20:34:27.207942
| 2020-08-01T19:12:19
| 2020-08-01T19:12:19
| 272,760,322
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,471
|
java
|
package kapadokia.nyandoro.books.sharedPref;
import android.content.Context;
import android.content.SharedPreferences;
public class SpUtil {
private SpUtil(){}
//preference name
public static final String PREF_NAME= "booksPreference";
public static final String POSITION= "position";
public static final String QUERY= "query";
// creating a shared preference instance
public static SharedPreferences getPrefs(Context context){
return context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
}
// When you want to get preference String you use this method
public static String getPreferenceString(Context context, String key){
//if it is empty it will return a default empty string, given the key
return getPrefs(context).getString(key, "");
}
public static int getPreferenceInt(Context context, String key){
return getPrefs(context).getInt(key, 0);
}
// we need two methods, one to write the string and one to write the int
public static void setPrefferenceString(Context context, String key, String value){
SharedPreferences.Editor editor = getPrefs(context).edit();
editor.putString(key, value);
editor.apply();
}
public static void setPrefferenceInt(Context context, String key, int value){
SharedPreferences.Editor editor = getPrefs(context).edit();
editor.putInt(key, value);
editor.apply();
}
}
|
[
"ktnyandoch@gmail.com"
] |
ktnyandoch@gmail.com
|
32df320c9fb0d8ada8873171bcea4023d2845a53
|
659f2dfa9e5efcb6619aa5bdc087ed127f8c93e4
|
/sources/modules/planner/src/main/java/com/minsait/onesait/platform/scheduler/scheduler/instance/BatchQuartzConfig.java
|
1bc3053a69ae4a4e718d2e8c6f65ccdaeff65f5e
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
onesaitplatform/onesaitplatform-revolution-the-minspait-crowd
|
cdb806cbcf5d38d9301a955a88b1e6f540f1be05
|
09937b4df0317013c2dfd0416cfe1c45090486f8
|
refs/heads/master
| 2021-06-17T10:53:26.819575
| 2019-10-09T14:58:20
| 2019-10-09T14:58:20
| 210,382,466
| 2
| 1
|
NOASSERTION
| 2021-06-04T02:20:29
| 2019-09-23T14:55:26
|
Java
|
UTF-8
|
Java
| false
| false
| 2,385
|
java
|
/**
* Copyright Indra Soluciones Tecnologías de la Información, S.L.U.
* 2013-2019 SPAIN
*
* 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.minsait.onesait.platform.scheduler.scheduler.instance;
import static com.minsait.onesait.platform.scheduler.PropertyNames.SCHEDULER_PROPERTIES_LOCATION;
import org.quartz.spi.JobFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.condition.ConditionalOnResource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
import org.springframework.transaction.PlatformTransactionManager;
import com.minsait.onesait.platform.scheduler.scheduler.BatchScheduler;
import com.minsait.onesait.platform.scheduler.scheduler.GenericBatchScheduler;
import com.minsait.onesait.platform.scheduler.scheduler.GenericQuartzConfig;
@Configuration
@ConditionalOnResource(resources = SCHEDULER_PROPERTIES_LOCATION)
public class BatchQuartzConfig extends GenericQuartzConfig {
private static final String SCHEDULER_BEAN_FACTORY_NAME = "batch-scheduler-factory";
@Bean(SCHEDULER_BEAN_FACTORY_NAME)
public SchedulerFactoryBean batchSchedulerFactoryBean(JobFactory jobFactory,
PlatformTransactionManager transactionManager) {
return getSchedulerFactoryBean(jobFactory, transactionManager);
}
@Bean(SchedulerNames.BATCH_SCHEDULER_NAME)
public BatchScheduler batchScheduler(
@Autowired @Qualifier(SCHEDULER_BEAN_FACTORY_NAME) SchedulerFactoryBean schedulerFactoryBean) {
return new GenericBatchScheduler(schedulerFactoryBean.getScheduler(), getSchedulerBeanName());
}
@Override
public String getSchedulerBeanName() {
return SchedulerNames.BATCH_SCHEDULER_NAME;
}
}
|
[
"danzig6661@gmail.com"
] |
danzig6661@gmail.com
|
30f09263ca26de79512fb3728102e230535458e3
|
845054602edb3b60f2479886d59a91ae77cf3e8f
|
/Refactoring/src/interval/v14/UntilIncludedEndPoint.java
|
1237445f4ec12c11dd3104f88aea2bcc7a24bf27
|
[] |
no_license
|
parqueNaturalSantaTecla/refactoring
|
313708abc558ef5609bae41bd71d11d83aa256f9
|
fc855c886630aa72e46cd833fcdca32fcc9250e9
|
refs/heads/master
| 2020-05-25T23:07:48.504899
| 2019-05-22T12:07:11
| 2019-05-22T12:07:11
| 188,029,041
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 435
|
java
|
package interval.v14;
class UntilIncludedEndPoint extends UntilEndPoint {
UntilIncludedEndPoint(double value) {
super(value);
}
boolean onRight(double value) {
return super.onRight(value) || value == this.getValue();
}
boolean onRight(UntilEndPoint that) {
return this.getValue() >= that.getValue();
}
@Override
public void accept(UntilEndPointVisitor visitor) {
visitor.visit(this);
}
}
|
[
"setil@DESKTOP-PEHM5QR"
] |
setil@DESKTOP-PEHM5QR
|
9a52e4daf64ba0a94f4636ee6d1c06f821c363d1
|
5ed635f9326f9bf39aa1e9ff646f9b4659e9a685
|
/app/src/main/java/edu/aku/hassannaqvi/leap_randomization/core/TypefaceUtil.java
|
90596cf60c8c2596eceda6c546cbe5df5ab11129
|
[] |
no_license
|
shznaqvi/LEAP1-Randomisation
|
6e6dff46384c2256d37bd6da7e49e6e03c65911f
|
bed11ae298486a010655d0d47c031b0af6dfa3e0
|
refs/heads/master
| 2021-01-22T03:18:10.341321
| 2017-07-22T08:37:19
| 2017-07-22T08:37:19
| 92,369,797
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,285
|
java
|
package edu.aku.hassannaqvi.leap_randomization.core;
import android.content.Context;
import android.graphics.Typeface;
import java.lang.reflect.Field;
/**
* Created by hassan.naqvi on 9/22/2016.
*/
public class TypefaceUtil {
/**
* Using reflection to override default typeface
* NOTICE: DO NOT FORGET TO SET TYPEFACE FOR APP THEME AS DEFAULT TYPEFACE WHICH WILL BE OVERRIDDEN
*
* @param context to work with assets
* @param defaultFontNameToOverride for example "monospace"
* @param customFontFileNameInAssets file name of the font from assets
*/
public static void overrideFont(Context context, String defaultFontNameToOverride, String customFontFileNameInAssets) {
try {
final Typeface customFontTypeface = Typeface.createFromAsset(context.getAssets(), customFontFileNameInAssets);
final Field defaultFontTypefaceField = Typeface.class.getDeclaredField(defaultFontNameToOverride);
defaultFontTypefaceField.setAccessible(true);
defaultFontTypefaceField.set(null, customFontTypeface);
} catch (Exception e) {
//Log.e("Can not set custom font " + customFontFileNameInAssets + " instead of " + defaultFontNameToOverride);
}
}
}
|
[
"shznaqvi@gmail.com"
] |
shznaqvi@gmail.com
|
5edd0d92d8e6414ce0993fe676b85c51b8a8c794
|
154a885ad39ece031e5224f99b2f8a3082fcb000
|
/Sample/src/sam_08.java
|
cd4c88ce0e3eace088d74bd9b7886e57486b4fab
|
[] |
no_license
|
moonhwan123/moonhwan
|
1b1e2fbc5589ac24d0806029465cdc232f5b9b29
|
84aa4dd9ca1a2f373d91ccbabce154f05c45c3c6
|
refs/heads/master
| 2021-07-05T04:46:46.814625
| 2021-04-01T09:21:19
| 2021-04-01T09:21:19
| 228,724,072
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 561
|
java
|
import java.util.Scanner;
public class sam_08 {
public static void main(String[] args) {
System.out.println("[입력한 수 중 최대,최소 값을 찾는 프로그램 입니다.]");
Scanner sc = new Scanner(System.in);
int max = 0;
int min = 999;
while(true) {
System.out.print("입력 (-99를 입력 하면 종료) : ");
int num = sc.nextInt();
if(num==-99) break;
if(max < num) {
max = num;
}if(min > num) {
min = num;
}
}
System.out.println("max = " + max);
System.out.println("min = " + min);
}
}
|
[
"58998949+moonhwan123@users.noreply.github.com"
] |
58998949+moonhwan123@users.noreply.github.com
|
2c299a5192e870c340068f5e3edf95be388533d7
|
a38ee63d5d8a1edb77ec4c4fd2488a0803dd41d9
|
/backend/src/main/java/org/sharetask/api/WorkspaceService.java
|
8f2740cce9e6a6a60466c55099cb22aa53ec863d
|
[] |
no_license
|
loudbrightraj/sharetask
|
7c4aa121e4783f2bdb88987af72b18bcc345a4f8
|
a7339a01bb4f83410b479fb9060f6702ee5ae98e
|
refs/heads/master
| 2021-01-18T08:07:13.804917
| 2013-08-26T15:59:16
| 2013-08-26T15:59:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,533
|
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.sharetask.api;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.sharetask.api.dto.WorkspaceDTO;
import org.springframework.validation.annotation.Validated;
/**
* Service for accessing workspace.
* @author Michal Bocek
* @since 1.0.0
*/
@Validated
public interface WorkspaceService {
/**
* Create new workspace.
* @param workspace
* @return
*/
@NotNull WorkspaceDTO create(@Valid @NotNull final WorkspaceDTO workspace);
/**
* Update workspace.
* @param workspace
* @return
*/
@NotNull WorkspaceDTO update(@Valid @NotNull final WorkspaceDTO workspace);
/**
* Add member to specified workspace.
* @param invitationCode
*/
void addMember(@NotNull final String invitationCode);
/**
* Remove member from specified workspace.
* @param workspaceId
* @param userId
*/
void removeMember(@NotNull final Long workspaceId, @NotNull final String username);
/**
* Find all workspaces for specified owner.
* @param ownerId
* @return
*/
List<WorkspaceDTO> findByOwner(@NotNull final String username);
/**
* Find all workspaces for member.
* @param username
* @return
*/
List<WorkspaceDTO> findByMember(@NotNull final String username);
/**
* Find all workspaces where i'm owner or member.
* @param username
* @return
*/
List<WorkspaceDTO> findAllMyWorkspaces(@NotNull final String username);
/**
* Find workspace by type.
* Expected type is OWNER, MEMBER, ALL_MY.
* @param type
* @return
*/
List<WorkspaceDTO> findByType(@NotNull final WorkspaceQueryType queryType);
/**
* Delete whole workspace.
* @param taskId
*/
void delete(@NotNull final Long workspaceId);
}
|
[
"michal.bocek@gmail.com"
] |
michal.bocek@gmail.com
|
5bbb0e7557c9ac24e45d2c85dab76eb35a1fbd50
|
2cf11da4067e548a53c24249d56b72579d560f40
|
/docs/src/test/java/com/example/ResponsePostProcessing.java
|
c9a6bcb017ff8869db92be942a3e0d352c70252a
|
[
"Apache-2.0"
] |
permissive
|
phamthaithinh/spring-restdocs
|
23ff827fe3dd8228540925c86a800ea0f9ecf190
|
e5c992c2492e8a4caba6182d3a2be1ebf01813fc
|
refs/heads/master
| 2020-04-01T18:04:11.984658
| 2015-07-28T16:44:50
| 2015-07-28T16:44:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,252
|
java
|
/*
* Copyright 2014-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example;
import static org.springframework.restdocs.RestDocumentation.modifyResponseTo;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.springframework.test.web.servlet.MockMvc;
public class ResponsePostProcessing {
private MockMvc mockMvc;
public void general() throws Exception {
// tag::general[]
this.mockMvc.perform(get("/"))
.andExpect(status().isOk())
.andDo(modifyResponseTo(/* ... */) // <1>
.andDocument("index")); // <2>
// end::general[]
}
}
|
[
"awilkinson@pivotal.io"
] |
awilkinson@pivotal.io
|
38cee732f93b64fdf85ec5e16bd4586f9b8f5e83
|
679d3eb9e9346c32723152861040a1da89aef9ef
|
/src/managers/PrintUtilities.java
|
5918b6240c65135f96ca8d727e67f3cc5aa1e334
|
[] |
no_license
|
maany/ThunderBolt
|
821402011b2269927cfe7fa9357847b82274c9f8
|
c57d0f604ce54363f29f0014e890fe3931dd9a3f
|
refs/heads/master
| 2021-01-10T22:11:01.733128
| 2014-03-14T17:12:31
| 2014-03-14T17:12:31
| 16,720,450
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,454
|
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 managers;
import java.awt.*;
import java.awt.geom.AffineTransform;
import javax.swing.*;
import java.awt.print.*;
import static java.awt.print.Printable.NO_SUCH_PAGE;
import static java.awt.print.Printable.PAGE_EXISTS;
/**
* This class is used to get High Resolution Print-outs using Java
* @author MAYANK
*/
public class PrintUtilities implements Printable {
private Component componentToBePrinted;
public static void printComponent(Component c) {
new PrintUtilities(c).print();
}
public PrintUtilities(Component componentToBePrinted) {
this.componentToBePrinted = componentToBePrinted;
}
/**
* create printJob and call print(1,2,3);
*/
public void print() {
PrinterJob printJob = PrinterJob.getPrinterJob();
printJob.setPrintable(this);
if (printJob.printDialog())
try {
printJob.print();
} catch(PrinterException pe) {
System.out.println("Error printing: " + pe);
}
}
/**
* Most imp method, it scales down frame size to pageformat size and prints
*/
@Override
public int print(Graphics g, PageFormat pf, int pageNumber)
throws PrinterException {
// TODO Auto-generated method stub
if (pageNumber > 0) {
return Printable.NO_SUCH_PAGE;
}
// Get the preferred size ofthe component...
Dimension compSize = componentToBePrinted.getPreferredSize();
// Make sure we size to the preferred size
componentToBePrinted.setSize(compSize);
// Get the the print size
Dimension printSize = new Dimension();
printSize.setSize(pf.getImageableWidth(), pf.getImageableHeight());
// Calculate the scale factor
double scaleFactor = getScaleFactorToFit(compSize, printSize);
// Don't want to scale up, only want to scale down
if (scaleFactor > 1d) {
scaleFactor = 1d;
}
// Calcaulte the scaled size...
double scaleWidth = compSize.width * scaleFactor;
double scaleHeight = compSize.height * scaleFactor;
// Create a clone of the graphics context. This allows us to manipulate
// the graphics context without begin worried about what effects
// it might have once we're finished
Graphics2D g2 = (Graphics2D) g.create();
// Calculate the x/y position of the component, this will center
// the result on the page if it can
double x = ((pf.getImageableWidth() - scaleWidth) / 2d) + pf.getImageableX();
double y = ((pf.getImageableHeight() - scaleHeight) / 2d) + pf.getImageableY();
// Create a new AffineTransformation
AffineTransform at = new AffineTransform();
// Translate the offset to out "center" of page
at.translate(x, y);
// Set the scaling
at.scale(scaleFactor, scaleFactor);
// Apply the transformation
g2.transform(at);
// Print the component
componentToBePrinted.printAll(g2);
// Dispose of the graphics context, freeing up memory and discarding
// our changes
g2.dispose();
componentToBePrinted.revalidate();
return Printable.PAGE_EXISTS;
}
/* @Override
public int print(Graphics g, PageFormat pageFormat, int pageIndex) {
if (pageIndex > 0) {
return(NO_SUCH_PAGE);
} else {
Graphics2D g2d = (Graphics2D)g;
g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
disableDoubleBuffering(componentToBePrinted);
componentToBePrinted.paint(g2d);
enableDoubleBuffering(componentToBePrinted);
return(PAGE_EXISTS);
}
} */
public static double getScaleFactorToFit(Dimension original, Dimension toFit) {
double dScale = 1d;
if (original != null && toFit != null) {
double dScaleWidth = getScaleFactor(original.width, toFit.width);
double dScaleHeight = getScaleFactor(original.height, toFit.height);
dScale = Math.min(dScaleHeight, dScaleWidth);
}
return dScale;
}
public static double getScaleFactor(int iMasterSize, int iTargetSize) {
double dScale = 1;
if (iMasterSize > iTargetSize) {
dScale = (double) iTargetSize / (double) iMasterSize;
} else {
dScale = (double) iTargetSize / (double) iMasterSize;
}
return dScale;
}
/** The speed and quality of printing suffers dramatically if
* any of the containers have double buffering turned on.
* So this turns if off globally.
* @param c
* @see enableDoubleBuffering
*/
public static void disableDoubleBuffering(Component c) {
RepaintManager currentManager = RepaintManager.currentManager(c);
currentManager.setDoubleBufferingEnabled(false);
}
/** Re-enables double buffering globally.
* @param c */
public static void enableDoubleBuffering(Component c) {
RepaintManager currentManager = RepaintManager.currentManager(c);
currentManager.setDoubleBufferingEnabled(true);
}
}
|
[
"imptodefeat@gmail.com"
] |
imptodefeat@gmail.com
|
375c07940cfe627231ee1ca1e946c064a9f2ad5b
|
66b8adafdf237340c674f9b610ad8b98d45d99d7
|
/learn-shop-public-auth/src/main/java/com/billow/auth/security/endpoint/SecurityEndpoint.java
|
69297d904fd4bc73ceb7186d349d8706a5a6e6fd
|
[
"Apache-2.0"
] |
permissive
|
yy321973351/learn
|
33d1fe67d4a932801d2abbde71eae7c45d184c9e
|
49fe64f54a864421c598272274131f5e20d8f5b3
|
refs/heads/master
| 2020-08-30T17:01:59.391480
| 2019-10-30T02:56:15
| 2019-10-30T02:56:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,958
|
java
|
package com.billow.auth.security.endpoint;
import com.billow.auth.pojo.po.UserPo;
import com.billow.auth.security.properties.ClientProperties;
import com.billow.auth.security.properties.SecurityProperties;
import com.billow.tools.enums.ResCodeEnum;
import com.billow.tools.resData.BaseResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.authentication.AuthenticationDetailsSource;
import org.springframework.security.core.Authentication;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.security.oauth2.provider.authentication.BearerTokenExtractor;
import org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationDetailsSource;
import org.springframework.security.oauth2.provider.authentication.TokenExtractor;
import org.springframework.security.oauth2.provider.endpoint.FrameworkEndpoint;
import org.springframework.security.oauth2.provider.token.DefaultTokenServices;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
/**
* 查询用户信息
*
* @author LiuYongTao
* @date 2018/11/15 14:32
*/
@FrameworkEndpoint
public class SecurityEndpoint {
private Logger logger = LoggerFactory.getLogger(getClass());
private TokenExtractor tokenExtractor = new BearerTokenExtractor();
private AuthenticationDetailsSource<HttpServletRequest, ?> authenticationDetailsSource = new OAuth2AuthenticationDetailsSource();
@Autowired
private DefaultTokenServices defaultTokenServices;
@Autowired
private RestTemplate restTemplate;
@Autowired
private SecurityProperties securityProperties;
/**
* 认页面
*
* @return ModelAndView
*/
@GetMapping("/authentication/require")
public ModelAndView require() {
return new ModelAndView("/index.html");
}
/**
* 获取用户信息
*
* @param request
* @param response
* @return
*/
@ResponseBody
@GetMapping("/user")
public Authentication user(ServletRequest request, ServletResponse response) {
HttpServletRequest req = (HttpServletRequest) request;
HttpServletResponse res = (HttpServletResponse) response;
OAuth2Authentication oAuth2Authentication = null;
// 获取请求中中的 Authorization 或者 access_token 中的 token
Authentication authentication = tokenExtractor.extract(req);
if (authentication != null && !StringUtils.isEmpty(authentication.getPrincipal())) {
// 从授权服务器,获取用户信息
oAuth2Authentication = defaultTokenServices.loadAuthentication(authentication.getPrincipal().toString());
if (oAuth2Authentication instanceof AbstractAuthenticationToken) {
// 填充其它信息
oAuth2Authentication.setDetails(authenticationDetailsSource.buildDetails(req));
Authentication userAuthentication = oAuth2Authentication.getUserAuthentication();
oAuth2Authentication.setAuthenticated(userAuthentication.isAuthenticated());
}
}
return oAuth2Authentication;
}
/**
* 用于前后分离时登陆
*
* @param userPo
* @return
*/
@ResponseBody
@PostMapping("/login")
public BaseResponse login(@RequestBody UserPo userPo) {
BaseResponse baseResponse = new BaseResponse();
try {
String username = userPo.getUsername();
String password = userPo.getPassword();
logger.info("Username:{},Password:{}", username, password);
Assert.notNull(username, "用户名不能为空!");
Assert.notNull(password, "密码不能为空!");
ClientProperties client = securityProperties.getClient();
String accessTokenUri = client.getAccessTokenUri();
Assert.notNull(accessTokenUri, "accessTokenUri 不能为空,请配置 auth.security.client.accessTokenUri");
String grantType = client.getGrantType();
Assert.notNull(grantType, "grantType 不能为空,请配置 auth.security.client.grantType");
String clientId = client.getClientId();
Assert.notNull(clientId, "clientId 不能为空,请配置 auth.security.client.clientId");
String clientSecret = client.getClientSecret();
Assert.notNull(clientSecret, "clientSecret 不能为空,请配置 auth.security.client.clientSecret");
// String url = "http://127.0.0.1:9999/oauth/token?grant_type=password&username=admin&password=123456&client_id=app&client_secret=app";
String url = "%s?grant_type=%s&username=%s&password=%s&client_id=%s&client_secret=%s";
String trgUrl = String.format(url, accessTokenUri, grantType, username, password, clientId, clientSecret);
HttpHeaders headers = new HttpHeaders();
headers.add("User-Agent", "curl/7.58.0");
headers.add("Content-Type", "application/json;charset=UTF-8");
HttpEntity<String> entity = new HttpEntity<>(headers);
ResponseEntity<OAuth2AccessToken> accessTokenEntity = restTemplate.postForEntity(trgUrl, entity, OAuth2AccessToken.class);
OAuth2AccessToken oAuth2AccessToken = accessTokenEntity.getBody();
logger.info("accessToken:{}", oAuth2AccessToken.getValue());
logger.info("refreshToken:{}", oAuth2AccessToken.getRefreshToken().getValue());
Map<String, String> result = new HashMap<>();
result.put("accessToken", oAuth2AccessToken.getValue());
result.put("refreshToken", oAuth2AccessToken.getRefreshToken().getValue());
baseResponse.setResData(result);
baseResponse.setResCode(ResCodeEnum.RESCODE_ASSESS_TOKEN);
} catch (Exception e) {
logger.error("登陆异常:{}", e);
baseResponse.setResCode(ResCodeEnum.RESCODE_NOT_FOUND_USER);
}
return baseResponse;
}
}
|
[
"lyongtao123@126.com"
] |
lyongtao123@126.com
|
4033b98499203d72e43c564fd43d27185fe34dc1
|
449cc92656d1f55bd7e58692657cd24792847353
|
/member-service/src/main/java/com/lj/business/member/domain/TerminalLoginLog.java
|
89611adfd1eecaf5457adbb0512160afcec379b4
|
[] |
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
| 4,813
|
java
|
package com.lj.business.member.domain;
import java.util.Date;
public class TerminalLoginLog {
/**
* CODE .
*/
private String code;
/**
* 操作类型:0登录、1登出 .
*/
private Integer optType;
/**
* 操作时间 .
*/
private Date optTime;
/**
* 终端类型:GM导购、ZK中控 .
*/
private String terminalType;
/**
* 终端编码 .
*/
private String terminalCode;
/**
* 导购编号 .
*/
private String memberNoGm;
/**
* 导购姓名 .
*/
private String memberName;
/**
* 微信号 .
*/
private String noWx;
/**
* 手机串号 .
*/
private String imei;
/**
* 商户编号 .
*/
private String merchantNo;
/**
* 商户名称 .
*/
private String merchantName;
/**
* CODE .
*
*/
public String getCode() {
return code;
}
/**
* CODE .
*
*/
public void setCode(String code) {
this.code = code == null ? null : code.trim();
}
/**
* 操作类型:0登录、1登出 .
*
*/
public Integer getOptType() {
return optType;
}
/**
* 操作类型:0登录、1登出 .
*
*/
public void setOptType(Integer optType) {
this.optType = optType;
}
/**
* 操作时间 .
*
*/
public Date getOptTime() {
return optTime;
}
/**
* 操作时间 .
*
*/
public void setOptTime(Date optTime) {
this.optTime = optTime;
}
/**
* 终端类型:GM导购、ZK中控 .
*
*/
public String getTerminalType() {
return terminalType;
}
/**
* 终端类型:GM导购、ZK中控 .
*
*/
public void setTerminalType(String terminalType) {
this.terminalType = terminalType == null ? null : terminalType.trim();
}
/**
* 终端编码 .
*
*/
public String getTerminalCode() {
return terminalCode;
}
/**
* 终端编码 .
*
*/
public void setTerminalCode(String terminalCode) {
this.terminalCode = terminalCode == null ? null : terminalCode.trim();
}
/**
* 导购编号 .
*
*/
public String getMemberNoGm() {
return memberNoGm;
}
/**
* 导购编号 .
*
*/
public void setMemberNoGm(String memberNoGm) {
this.memberNoGm = memberNoGm == null ? null : memberNoGm.trim();
}
/**
* 导购姓名 .
*
*/
public String getMemberName() {
return memberName;
}
/**
* 导购姓名 .
*
*/
public void setMemberName(String memberName) {
this.memberName = memberName == null ? null : memberName.trim();
}
/**
* 微信号 .
*
*/
public String getNoWx() {
return noWx;
}
/**
* 微信号 .
*
*/
public void setNoWx(String noWx) {
this.noWx = noWx == null ? null : noWx.trim();
}
/**
* 手机串号 .
*
*/
public String getImei() {
return imei;
}
/**
* 手机串号 .
*
*/
public void setImei(String imei) {
this.imei = imei == null ? null : imei.trim();
}
/**
* 商户编号 .
*
*/
public String getMerchantNo() {
return merchantNo;
}
/**
* 商户编号 .
*
*/
public void setMerchantNo(String merchantNo) {
this.merchantNo = merchantNo == null ? null : merchantNo.trim();
}
/**
* 商户名称 .
*
*/
public String getMerchantName() {
return merchantName;
}
/**
* 商户名称 .
*
*/
public void setMerchantName(String merchantName) {
this.merchantName = merchantName == null ? null : merchantName.trim();
}
/**
* 输出BEAN数据信息
* @author LeoPeng
*/
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("TerminalLoginLog [code=").append(code);
builder.append(",optType=").append(optType);
builder.append(",optTime=").append(optTime);
builder.append(",terminalType=").append(terminalType);
builder.append(",terminalCode=").append(terminalCode);
builder.append(",memberNoGm=").append(memberNoGm);
builder.append(",memberName=").append(memberName);
builder.append(",noWx=").append(noWx);
builder.append(",imei=").append(imei);
builder.append(",merchantNo=").append(merchantNo);
builder.append(",merchantName=").append(merchantName);
builder.append("]");
return builder.toString();
}
}
|
[
"37724558+wo510751575@users.noreply.github.com"
] |
37724558+wo510751575@users.noreply.github.com
|
69ede4094a9c73d9801f3900134ea8fa14fe5102
|
a6bea5abda4cac2175098d7ccaa0eeed39250e9d
|
/com.qbao.aisr.stuff.algorithm/src/main/java/com/qbao/aisr/stuff/cache/PcCache.java
|
5855b322e2e4dd0f541a92769dd9e853831b3951
|
[] |
no_license
|
jackandyao/stuff-core
|
be6cca6a33ed346d646d97961060e5a9c6c17c98
|
3c561a3b83c68b5385d7b2995530931e87492773
|
refs/heads/master
| 2021-05-09T03:20:37.936326
| 2018-01-28T07:26:45
| 2018-01-28T07:26:45
| 119,237,433
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 346
|
java
|
package com.qbao.aisr.stuff.cache;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PcCache {
public static Map<String,List<String>> dirIdPcStuffIdListMap = new HashMap<String,List<String>>();
public static List<String> pcStuffIdDefault = new ArrayList<String>();
}
|
[
"786648643@qq.com"
] |
786648643@qq.com
|
7a3933a72392efd0e82e840f12951f152de9a865
|
69e6f6822221088dbb6e27f731fc4d117c20aef3
|
/yiQu_Api/src/main/java/com/quanmai/yiqu/ui/grade/FetchBagRecordActivity.java
|
72a1e0b1d45c09df51d96409a36fc0a485e312bc
|
[] |
no_license
|
zengweitao/YiQuLife
|
f7dd201be283dfd64f7348b4525d328e7b7b94a9
|
30dd021e56c8e0914e2e2c23705baf49ffa319ce
|
refs/heads/master
| 2021-01-01T18:10:57.454138
| 2017-07-25T06:38:40
| 2017-07-25T06:38:40
| 98,272,858
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,568
|
java
|
package com.quanmai.yiqu.ui.grade;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import com.handmark.pulltorefresh.library.PullToRefreshBase;
import com.handmark.pulltorefresh.library.PullToRefreshListView;
import com.quanmai.yiqu.R;
import com.quanmai.yiqu.Session;
import com.quanmai.yiqu.api.ApiConfig;
import com.quanmai.yiqu.api.UserInfoApi;
import com.quanmai.yiqu.api.vo.FetchBagRecordInfo;
import com.quanmai.yiqu.api.vo.UserInfo;
import com.quanmai.yiqu.base.BaseActivity;
import com.quanmai.yiqu.base.CommonList;
import com.quanmai.yiqu.ui.grade.adapter.FetchBagAdapter;
/**
* 取袋记录页面
*/
public class FetchBagRecordActivity extends BaseActivity implements View.OnClickListener {
private TextView tv_title;
private PullToRefreshListView listView;
private FetchBagAdapter mAdapter;
private TextView textViewNoData;
private LinearLayout linearLayoutNoData;
private int currentPage=0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_fetch_bag_record);
initView();
init();
getFetchBagRecordList();
}
private void initView() {
tv_title = (TextView) findViewById(R.id.tv_title);
tv_title.setText("取袋记录");
textViewNoData = (TextView) findViewById(R.id.textViewNoData);
textViewNoData.setText("还没取袋记录喲");
linearLayoutNoData = (LinearLayout) findViewById(R.id.linearLayoutNoData);
listView = (PullToRefreshListView) findViewById(R.id.listView);
listView.setEmptyView(linearLayoutNoData);
listView.setMode(PullToRefreshBase.Mode.BOTH);
}
private void init() {
mAdapter = new FetchBagAdapter(mContext);
listView.setAdapter(mAdapter);
listView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {
@Override
public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
refreshData();
}
@Override
public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
getFetchBagRecordList();
}
});
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
getBagRecordList(position-1);
}
});
}
private void refreshData(){
currentPage=0;
getFetchBagRecordList();
}
//获取取袋记录列表
private void getFetchBagRecordList() {
showLoadingDialog("正在获取数据...");
UserInfoApi.get().getFetchBagInfoList(mContext, currentPage,getIntent().getStringExtra("code"),new ApiConfig.ApiRequestListener<CommonList<FetchBagRecordInfo>>() {
@Override
public void onSuccess(String msg, CommonList<FetchBagRecordInfo> data) {
dismissLoadingDialog();
listView.onRefreshComplete();
if (data == null) {
return;
}
if (currentPage==0){
mAdapter.clear();
}
currentPage++;
if (currentPage<data.max_page){
listView.setMode(PullToRefreshBase.Mode.BOTH);
}else {
listView.setMode(PullToRefreshBase.Mode.PULL_FROM_START);
}
mAdapter.add(data);
}
@Override
public void onFailure(String msg) {
dismissLoadingDialog();
listView.onRefreshComplete();
showCustomToast(msg);
}
});
}
/**
* 获取指定设备的取袋详情
*/
String phone=Session.get(mContext).getUsername();
private void getBagRecordList(final int position) {
if (getIntent().hasExtra("phone")){
phone=getIntent().getStringExtra("phone");
}
showLoadingDialog("正在获取数据...");
UserInfoApi.get().getBagInfoList(mContext, 0,mAdapter.getItem(position).terminalno,
mAdapter.getItem(position).opetime,mAdapter.getItem(position).nums, phone,new ApiConfig.ApiRequestListener<CommonList<String>>() {
@Override
public void onSuccess(String msg, CommonList<String> data) {
dismissLoadingDialog();
if (data == null) {
return;
}
Intent intent = new Intent(mContext, FetchBagRecordDetailActivity.class);
intent.putExtra("BagRecordInfo", mAdapter.getItem(position));
intent.putStringArrayListExtra("BagInfoList",data);
intent.putExtra("phone",phone);
intent.putExtra("max_page",data.max_page);
mContext.startActivity(intent);
}
@Override
public void onFailure(String msg) {
dismissLoadingDialog();
showCustomToast(msg);
}
});
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.iv_back: {
break;
}
}
}
}
|
[
"weitao_zeng@jyc99.com"
] |
weitao_zeng@jyc99.com
|
4ba874383fa8c0f483bb4170bf73defb494c35ee
|
da889968b2cc15fc27f974e30254c7103dc4c67e
|
/Optimization Algorithm_GUI/src/Algorithm_Carpool/SaNSDE_POP_NEW/Function.java
|
b84ebcc8c4755e139f6cd68862f2e64a3624e02f
|
[] |
no_license
|
say88888/My_Project_thesis
|
fcd4d96b34de8627fa054146eb6164b7c3636344
|
04908ea3ed6b7a9c1939a5d8e16dfc65d66437f4
|
refs/heads/master
| 2020-04-10T08:32:37.106239
| 2018-12-08T05:52:44
| 2018-12-08T05:52:44
| 160,908,221
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,838
|
java
|
package Algorithm_Carpool.SaNSDE_POP_NEW;
import java.util.ArrayList;
public class Function extends SaNSDE_POP_NEW{
static V_Individual Algorithm1_1(double F,Individual individual_r1,Individual individual_r2,Individual individual_r3,Individual individual,Individual individual_b) {
V_Individual V=new V_Individual();
if(DE_Read_Write_txt.random_generate_or_read1(Execution_Mode)<p){
for(int i=0;i<Xsize;i++)
V.setVx(i, individual_r1.getX(i)+F*(individual_r2.getX(i)-individual_r3.getX(i)));
for(int i=0;i<Ysize;i++)
V.setVy(i, individual_r1.getY(i)+F*(individual_r2.getY(i)-individual_r3.getY(i)));
nf1+=1;
strategy.add(1);
}else{
for(int i=0;i<Xsize;i++)
V.setVx(i, individual.getX(i)+F*(individual_b.getX(i)-individual.getX(i))+F*(individual_r1.getX(i)-individual_r2.getX(i)));
for(int i=0;i<Ysize;i++)
V.setVy(i, individual.getY(i)+F*(individual_b.getY(i)-individual.getY(i))+F*(individual_r1.getY(i)-individual_r2.getY(i)));
nf2+=1;
strategy.add(3);
}
for(int i=0;i<Xsize;i++){
if (V.getVx(i) > Vmax)
V.setVx(i, Vmax);
if (V.getVx(i) < -Vmax)
V.setVx(i, -Vmax);
}
for(int i=0;i<Ysize;i++){
if (V.getVy(i) > Vmax)
V.setVy(i, Vmax);
if (V.getVy(i) < -Vmax)
V.setVy(i, -Vmax);
}
return V;
}
static void Update_p_f_cr( ) {
// Update p、 f、cr
p=(ns1*(ns2+nf2))/(ns2*(ns1+nf1)+ns1*(ns2+nf2));
for(int i=0;i<populationSize;i++){
double sum=0;
for(int k=0;k<frec.size();k++)
sum+=frec.get(k);
double sum1=0;
for(int k=0;k<CRrec.size();k++){
double w=frec.get(k);
w/=sum;
sum1+=w*CRrec.get(k);
}
CRm=sum1;
CR[i]=DE_Read_Write_txt.random_generate_or_read3(Execution_Mode)*0.1+CRm;
if(DE_Read_Write_txt.random_generate_or_read1(Execution_Mode)<p)
F[i]=DE_Read_Write_txt.random_generate_or_read3(Execution_Mode)*0.3+0.5;
else
F[i]=(Math.tan(Math.PI*(DE_Read_Write_txt.random_generate_or_read5(Execution_Mode)-0.5)));
}
ns1=0;
ns2=0;
nf1=0;
nf2=0;
CRrec = new ArrayList<Double>();
frec = new ArrayList<Double>();
}
static U_Individual Algorithm2(int j,Individual indiv,V_Individual P_indiv) {
int a= DE_Read_Write_txt.random_generate_or_read2(Execution_Mode,Xsize);
U_Individual U=new U_Individual();
for(int i=0;i<Xsize;i++)
U.setUx(i, indiv.getX(i));
for(int i=0;i<Ysize;i++)
U.setUy(i, indiv.getY(i));
for(int i=0;i<Xsize;i++)
if(DE_Read_Write_txt.random_generate_or_read1(Execution_Mode)<CR[j] || i==a)
U.setUx(i,P_indiv.getVx(i));
a= DE_Read_Write_txt.random_generate_or_read2(Execution_Mode,Ysize);
for(int i=0;i<Ysize;i++)
if(DE_Read_Write_txt.random_generate_or_read1(Execution_Mode)<CR[j] || i==a)
U.setUy(i,P_indiv.getVy(i));
return U;
}
}
|
[
"gtvsta99@gmail.com"
] |
gtvsta99@gmail.com
|
6e5ea22431a49ba6da4ef860313d4dd7d49e8a83
|
134950f7f1315d92abc95a1cf6b9c6843dcb5a4b
|
/Chapter6/spring-bucks/src/main/java/com/geektime/springbucks/support/MoneySerializer.java
|
ade12d5c157b73b7229140093d8322d373a5a785
|
[] |
no_license
|
jinrunheng/spring-family-learn
|
d773812afed625eb65d2d7e8ec1b9d13ddedc7da
|
b92a87bd7c116b1c2062cc811260a323167449e1
|
refs/heads/master
| 2023-04-12T16:18:52.332279
| 2021-05-10T08:19:27
| 2021-05-10T08:19:27
| 305,738,244
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 674
|
java
|
package com.geektime.springbucks.support;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import org.joda.money.Money;
import org.springframework.boot.jackson.JsonComponent;
import java.io.IOException;
@JsonComponent
public class MoneySerializer extends StdSerializer<Money> {
protected MoneySerializer() {
super(Money.class);
}
@Override
public void serialize(Money money, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
jsonGenerator.writeNumber(money.getAmount());
}
}
|
[
"1175088275@qq.com"
] |
1175088275@qq.com
|
cad8f17839765673eb90f2e87ab219133e12e7aa
|
1ec73a5c02e356b83a7b867580a02b0803316f0a
|
/java/bj/Java1200/col01/ch05_面向对象技术应用/ch05_1_Java中类的定义/_087_构造方法的应用/PersonTest.java
|
0c63c5e84e84e2030d3cfc3c01147d61ffc28c12
|
[] |
no_license
|
jxsd0084/JavaTrick
|
f2ee8ae77638b5b7654c3fcf9bceea0db4626a90
|
0bb835fdac3c2f6d1a29d1e6e479b553099ece35
|
refs/heads/master
| 2021-01-20T18:54:37.322832
| 2016-06-09T03:22:51
| 2016-06-09T03:22:51
| 60,308,161
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 795
|
java
|
package bj.Java1200.col01.ch05_面向对象技术应用.ch05_1_Java中类的定义._087_构造方法的应用;
public class PersonTest {
/**
* 测试
*
* @param args
*/
public static void main( String[] args ) {
Person person1 = new Person();
Person person2 = new Person( "明日科技", "男", 11 );
System.out.println( "员工1的信息" );
System.out.println( "员工姓名:" + person1.getName() );
System.out.println( "员工性别:" + person1.getGender() );
System.out.println( "员工年龄:" + person1.getAge() );
System.out.println( "员工2的信息" );
System.out.println( "员工姓名:" + person2.getName() );
System.out.println( "员工性别:" + person2.getGender() );
System.out.println( "员工年龄:" + person2.getAge() );
}
}
|
[
"chenlong88882001@163.com"
] |
chenlong88882001@163.com
|
4d6538c07b9690b995aa55c88f7c1e2159541663
|
ca4688531c0d8188e66733ebf97949944c8278ea
|
/WebResServer/src/test/java/org/unidal/webres/server/AllTests.java
|
19eaaa756028bd000b3d8bed2b3067f380f52c56
|
[] |
no_license
|
qmwu2000/webres
|
274cf3f2c65fb53b2b06d4181d2b4d9ce3819dc5
|
4bacb5a9544bd41db4003f779270cb4bbe950593
|
refs/heads/master
| 2021-01-17T09:11:13.902019
| 2012-08-01T06:35:07
| 2012-08-01T06:35:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 494
|
java
|
package org.unidal.webres.server;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
import org.unidal.webres.server.taglib.MyTaglibTest;
import org.unidal.webres.server.template.JspTemplateTest;
@RunWith(Suite.class)
@SuiteClasses({
SimpleResourceServletTest.class,
SimpleResourceFilterTest.class,
/* .taglib */
MyTaglibTest.class,
/* .template */
JspTemplateTest.class
})
public class AllTests {
}
|
[
"qmwu2000@gmail.com"
] |
qmwu2000@gmail.com
|
b687b9c3db50538008807b0c8e42bc0aa872d0fe
|
79595075622ded0bf43023f716389f61d8e96e94
|
/app/src/main/java/com/google/android/mms/pdu/AcknowledgeInd.java
|
b43a94891a9ee311acfa74efa51e89ce50e79712
|
[] |
no_license
|
dstmath/OppoR15
|
96f1f7bb4d9cfad47609316debc55095edcd6b56
|
b9a4da845af251213d7b4c1b35db3e2415290c96
|
refs/heads/master
| 2020-03-24T16:52:14.198588
| 2019-05-27T02:24:53
| 2019-05-27T02:24:53
| 142,840,716
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 863
|
java
|
package com.google.android.mms.pdu;
import com.google.android.mms.InvalidHeaderValueException;
public class AcknowledgeInd extends GenericPdu {
public AcknowledgeInd(int mmsVersion, byte[] transactionId) throws InvalidHeaderValueException {
setMessageType(133);
setMmsVersion(mmsVersion);
setTransactionId(transactionId);
}
AcknowledgeInd(PduHeaders headers) {
super(headers);
}
public int getReportAllowed() {
return this.mPduHeaders.getOctet(145);
}
public void setReportAllowed(int value) throws InvalidHeaderValueException {
this.mPduHeaders.setOctet(value, 145);
}
public byte[] getTransactionId() {
return this.mPduHeaders.getTextString(152);
}
public void setTransactionId(byte[] value) {
this.mPduHeaders.setTextString(value, 152);
}
}
|
[
"toor@debian.toor"
] |
toor@debian.toor
|
700d5fb053e906d8670be8f343da5d20e077d213
|
96d5eaa65cd05ff657e3ee1941dcff0080d7c646
|
/src/main/java/net/mcreator/breadpack/item/TacoItem.java
|
fd1e7de45d67c96196824d8d958c59f9af0e6cfa
|
[] |
no_license
|
nate-moo/Breadpack
|
1e2522470e840ed00e676e0cca11bab9aad60159
|
37aa467b392fd210ef1e5606b92a6bd04ff2c6ad
|
refs/heads/master
| 2021-05-22T21:02:08.364431
| 2020-04-05T01:16:14
| 2020-04-05T01:16:14
| 253,094,395
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,081
|
java
|
package net.mcreator.breadpack.item;
import net.minecraftforge.registries.ObjectHolder;
import net.minecraft.item.UseAction;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.Item;
import net.minecraft.item.Food;
import net.mcreator.breadpack.BreadpackElements;
@BreadpackElements.ModElement.Tag
public class TacoItem extends BreadpackElements.ModElement {
@ObjectHolder("breadpack:taco")
public static final Item block = null;
public TacoItem(BreadpackElements instance) {
super(instance, 1);
}
@Override
public void initElements() {
elements.items.add(() -> new FoodItemCustom());
}
public static class FoodItemCustom extends Item {
public FoodItemCustom() {
super(new Item.Properties().group(ItemGroup.FOOD).maxStackSize(64).food((new Food.Builder()).hunger(5).saturation(0.5f).build()));
setRegistryName("taco");
}
@Override
public int getUseDuration(ItemStack stack) {
return 64;
}
@Override
public UseAction getUseAction(ItemStack par1ItemStack) {
return UseAction.EAT;
}
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
c9dadd6f9dcb49d46453d677b4bf5f7a3833cd15
|
ef50e50e0b61db62d0476b5b7df3d5f5044a16a9
|
/Dynamic_Programming/zurikela/java/ivanbessonov.java
|
a339524d9bc698ba88e743c148b3e259e0cc648e
|
[] |
no_license
|
saketrule/Research_Project-HackerRank_CheckStyle
|
09fd6ef3a067926c754af693b13566cc55fe16ae
|
4334bcbc4620fb94fd3d63034a320756e7233ded
|
refs/heads/master
| 2021-01-22T13:03:08.055929
| 2017-09-12T12:11:19
| 2017-09-12T12:11:19
| 102,361,527
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,820
|
java
|
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class Solution {
public static void main(String[] args) {
int Q = readInt();
char[] buffer = new char[1];
List<MySet> mySets = new ArrayList<>();
for (int q = 0; q < Q; q++) {
readWord(buffer);
switch (buffer[0]) {
case 'A': {
mySets.add(new MySet(mySets.size(), readInt()));
break;
}
case 'B': {
int x = readInt() - 1, y = readInt() - 1;
MySet X = mySets.get(x);
MySet Y = mySets.get(y);
X.links.add(Y);
Y.links.add(X);
break;
}
case 'C': {
int x = readInt() - 1;
mergeComponent(mySets, x);
break;
}
}
}
int size = mySets.size();
for (int i = 0; i < size; i++) {
MySet X = mySets.get(i);
if (X != null) mergeComponent(mySets, i);
}
int result = 0;
for (int i = size, size2 = mySets.size(); i < size2; i++) {
result += mySets.get(i).nodes;
}
System.out.println(result);
}
private static void mergeComponent(List<MySet> mySets, int x) {
MySet X = mySets.get(x);
Set<MySet> component = X.getComponent();
for (MySet set : component) mySets.set(set.index, null); // nullify all these sets
mySets.add(new MySet(mySets.size(), getNodes(component, new HashSet<MySet>())));
}
static class MySet {
final int index;
final int nodes;
final int independant;
List<MySet> links = new ArrayList<>();
public MySet(int index, int nodes) {
this(index, nodes, nodes);
}
public MySet(int index, int nodes, int independant) {
this.index = index;
this.nodes = nodes;
this.independant = independant;
}
public Set<MySet> getComponent() {
Set<MySet> c = new HashSet<>();
getComponent(c);
return c;
}
private void getComponent(Set<MySet> c) {
if (!c.contains(this)) {
c.add(this);
for (MySet set : links) {
set.getComponent(c);
}
}
}
@Override
public String toString() {
return "node " + index;
}
}
static int getNodes(Set<MySet> component, Set<MySet> removed) {
if (component.size() == 0) return 0;
if (component.size() == 1) {
return component.iterator().next().nodes;
}
MySet mySet = component.iterator().next();
component.remove(mySet); removed.add(mySet);
int nodes = getNodes(component, removed);
int sizeBefore = component.size();
component.removeAll(mySet.links);
if (component.size() == sizeBefore) {
component.add(mySet); removed.remove(mySet);
return mySet.nodes + nodes;
}
Set<MySet> newRemoved = new HashSet<>(mySet.links);
newRemoved.addAll(removed);
nodes = Math.max(nodes, mySet.nodes + getNodes(component, newRemoved));
for (MySet link : mySet.links) {
if (!removed.contains(link)) component.add(link);
}
component.add(mySet); removed.remove(mySet);
return nodes;
}
static InputStream in = System.in;
static int readInt() {
try {
int c = in.read();
while (c <= 32) {
c = in.read();
}
boolean minus = false;
if (c == '-') {
minus = true;
c = in.read();
}
int result = (c - '0');
c = in.read();
while (c >= '0') {
result = result * 10 + (c - '0');
c = in.read();
}
return minus ? -result : result;
} catch (IOException e) {
return -1; // should not happen
}
}
static String readWord(char[] buffer) {
try {
int c = in.read();
while (c <= 32) {
c = in.read();
}
int length = 0;
while (c > 32) {
buffer[length] = (char) c;
c = in.read();
length++;
}
return "";//String.valueOf(buffer, 0, length);
} catch (IOException ex) {
return null; // should not happen
}
}
}
|
[
"anonymoussaketjoshi@gmail.com"
] |
anonymoussaketjoshi@gmail.com
|
e07fe718292a8f7915db0e11d343c2ae820ed38e
|
f567c98cb401fc7f6ad2439cd80c9bcb45e84ce9
|
/src/main/java/com/alipay/api/response/AlipayMerchantMrchsurpActivitysignupCreateResponse.java
|
c7f00fa3e7316e5b601824590ad89aa04e55395b
|
[
"Apache-2.0"
] |
permissive
|
XuYingJie-cmd/alipay-sdk-java-all
|
0887fa02f857dac538e6ea7a72d4d9279edbe0f3
|
dd18a679f7543a65f8eba2467afa0b88e8ae5446
|
refs/heads/master
| 2023-07-15T23:01:02.139231
| 2021-09-06T07:57:09
| 2021-09-06T07:57:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 769
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.merchant.mrchsurp.activitysignup.create response.
*
* @author auto create
* @since 1.0, 2021-06-25 14:02:36
*/
public class AlipayMerchantMrchsurpActivitysignupCreateResponse extends AlipayResponse {
private static final long serialVersionUID = 2854488781815619481L;
/**
* 报名成功后返回报名记录ID,报名失败无该字段
*/
@ApiField("signup_record_id")
private String signupRecordId;
public void setSignupRecordId(String signupRecordId) {
this.signupRecordId = signupRecordId;
}
public String getSignupRecordId( ) {
return this.signupRecordId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
9e0fdb1dec0cde709e65c3387316a56af860b74c
|
08c5675ad0985859d12386ca3be0b1a84cc80a56
|
/src/main/java/org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java
|
c38f8467fe2d5e741e8eb6dcaba7c701aefe8616
|
[] |
no_license
|
ytempest/jdk1.8-analysis
|
1e5ff386ed6849ea120f66ca14f1769a9603d5a7
|
73f029efce2b0c5eaf8fe08ee8e70136dcee14f7
|
refs/heads/master
| 2023-03-18T04:37:52.530208
| 2021-03-09T02:51:16
| 2021-03-09T02:51:16
| 345,863,779
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,496
|
java
|
package org.omg.PortableServer.POAPackage;
/**
* org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u60/4407/corba/src/share/classes/org/omg/PortableServer/poa.idl
* Tuesday, August 4, 2015 11:07:54 AM PDT
*/
abstract public class ServantNotActiveHelper {
private static String _id = "IDL:omg.org/PortableServer/POA/ServantNotActive:1.0";
public static void insert(org.omg.CORBA.Any a, org.omg.PortableServer.POAPackage.ServantNotActive that) {
org.omg.CORBA.portable.OutputStream out = a.create_output_stream();
a.type(type());
write(out, that);
a.read_value(out.create_input_stream(), type());
}
public static org.omg.PortableServer.POAPackage.ServantNotActive extract(org.omg.CORBA.Any a) {
return read(a.create_input_stream());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
private static boolean __active = false;
synchronized public static org.omg.CORBA.TypeCode type() {
if (__typeCode == null) {
synchronized (org.omg.CORBA.TypeCode.class) {
if (__typeCode == null) {
if (__active) {
return org.omg.CORBA.ORB.init().create_recursive_tc(_id);
}
__active = true;
org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[0];
org.omg.CORBA.TypeCode _tcOf_members0 = null;
__typeCode = org.omg.CORBA.ORB.init().create_exception_tc(org.omg.PortableServer.POAPackage.ServantNotActiveHelper.id(), "ServantNotActive", _members0);
__active = false;
}
}
}
return __typeCode;
}
public static String id() {
return _id;
}
public static org.omg.PortableServer.POAPackage.ServantNotActive read(org.omg.CORBA.portable.InputStream istream) {
org.omg.PortableServer.POAPackage.ServantNotActive value = new org.omg.PortableServer.POAPackage.ServantNotActive();
// read and discard the repository ID
istream.read_string();
return value;
}
public static void write(org.omg.CORBA.portable.OutputStream ostream, org.omg.PortableServer.POAPackage.ServantNotActive value) {
// write the repository ID
ostream.write_string(id());
}
}
|
[
"787491096@qq.com"
] |
787491096@qq.com
|
7a6478a39e571f74cb522b797b8c9d73a72f9c90
|
ea3648110899f7c34c98fb3650cc2fd3d8a16170
|
/main/java/dqmIII/blocks/decorate/render/DqmTileEntityRenderYajirusikiiro2.java
|
c8368b09840d0e6fc65d2bfa1e2ae9609f88b463
|
[] |
no_license
|
azelDqm/MC1.7.10_DQMIIINext
|
51392175b412bd7fa977b9663060bb169980928e
|
af65ee394fe42103655a3ef8ba052765d2934fd0
|
refs/heads/master
| 2021-01-25T05:22:11.733236
| 2015-03-24T15:23:55
| 2015-03-24T15:23:55
| 29,433,818
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,529
|
java
|
package dqmIII.blocks.decorate.render;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dqmIII.blocks.decorate.model.DqmModelYajirusi2;
import dqmIII.blocks.decorate.tileEntity.DqmTileEntityYajirusikiiro2;
@SideOnly(Side.CLIENT)
public class DqmTileEntityRenderYajirusikiiro2 extends TileEntitySpecialRenderer
{
private DqmModelYajirusi2 model = new DqmModelYajirusi2();
public void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8)
{
DqmTileEntityYajirusikiiro2 var9 = (DqmTileEntityYajirusikiiro2)var1;
GL11.glPushMatrix();
GL11.glTranslatef((float)var2 + 0.5F, (float)var4 + 2.0F, (float)var6 + 0.5F);
GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
if (var9.getBlockMetadata() == 1)
{
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
}
if (var9.getBlockMetadata() == 2)
{
GL11.glRotatef(-180.0F, 0.0F, 1.0F, 0.0F);
}
if (var9.getBlockMetadata() == 3)
{
GL11.glRotatef(270.0F, 0.0F, 1.0F, 0.0F);
}
this.bindTexture(new ResourceLocation("dqm:textures/model/Ykiiro.png"));
GL11.glPushMatrix();
this.model.modelRender(0.0625F);
GL11.glPopMatrix();
GL11.glPopMatrix();
}
}
|
[
"azel.trancer@gmail.com"
] |
azel.trancer@gmail.com
|
a07d3e5967b20620f3ec5d4da01fe776ba1f1e00
|
43ea6b8fd54f76e49f6e8ed8ec443336cf7db8ac
|
/uva/UVa10195_TheKnightsOfTheRoundTable.java
|
add4e5cd41e9aef6c66d354bb09835d908fd95b1
|
[] |
no_license
|
mirzainayat92/competitive-programming
|
68f6c0a5a10cf8d8f14040a385e22e53d03beb70
|
2d737fb6f69256f62ea5454888f5687f1814ea7b
|
refs/heads/master
| 2020-12-22T20:45:48.789657
| 2018-03-15T03:52:48
| 2018-03-15T03:52:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,079
|
java
|
package uva;
/* USER: 46724 (sfmunera) */
/* PROBLEM: 1136 (10195 - The Knights Of The Round Table) */
/* SUBMISSION: 09301883 */
/* SUBMISSION TIME: 2011-09-26 16:45:47 */
/* LANGUAGE: 2 */
import java.util.*;
import java.io.*;
public class UVa10195_TheKnightsOfTheRoundTable {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String line;
StringTokenizer stk;
while ((line = in.readLine()) != null) {
stk = new StringTokenizer(line);
double a = Double.parseDouble(stk.nextToken());
double b = Double.parseDouble(stk.nextToken());
double c = Double.parseDouble(stk.nextToken());
double r = 0.0;
if (Math.abs(a) >= 1e-9 && Math.abs(b) >= 1e-9 && Math.abs(c) >= 1e-9) {
double s = (a + b + c) / 2.0;
double A = Math.sqrt(s * (s - a) * (s - b) * (s - c));
r = 2.0 * A / (a + b + c);
}
System.out.printf(Locale.ENGLISH, "The radius of the round table is: %.3f%n", r);
}
in.close();
System.exit(0);
}
}
|
[
"sfmunera@gmail.com"
] |
sfmunera@gmail.com
|
81af91ee1f032a7b8c6ab23495d2ff2b955c2751
|
980a4702cf5396ab54cb0e9282055e1e2d3edd1d
|
/nd4j/nd4j-backends/nd4j-api-parent/nd4j-native-api/src/main/java/org/nd4j/nativeblas/OpaqueConstantDataBuffer.java
|
8e198c18624bcf2adced0177fa43cb91e9dabfc4
|
[
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"MIT",
"BSD-3-Clause"
] |
permissive
|
pxiuqin/deeplearning4j
|
5d7abea2102ad3c8d6455803f7afc5e7641062a1
|
e11ddf3c24d355b43d36431687b807c8561aaae4
|
refs/heads/master
| 2022-12-02T00:09:48.450622
| 2020-08-13T10:32:14
| 2020-08-13T10:32:14
| 277,511,646
| 1
| 0
|
Apache-2.0
| 2020-08-13T10:32:16
| 2020-07-06T10:28:22
| null |
UTF-8
|
Java
| false
| false
| 979
|
java
|
/*******************************************************************************
* Copyright (c) 2015-2019 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://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.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package org.nd4j.nativeblas;
import org.bytedeco.javacpp.Pointer;
/**
*
* @author saudet
*/
public class OpaqueConstantDataBuffer extends Pointer {
public OpaqueConstantDataBuffer(Pointer p) { super(p); }
}
|
[
"blacka101@gmail.com"
] |
blacka101@gmail.com
|
a8dc6cf4c51c47cb3a50bba7054bb16d0f6c6c67
|
2a71eee26fa3313c7aa988042719aeb24d6c1ea4
|
/CoFHCore/src/main/java/cofh/lib/block/TileBlockActive.java
|
4013c1b85f50dacf847c5c8c673dd94500a70887
|
[] |
no_license
|
dizzyd/1.15
|
64b797494e707b8c90a339d0548f841b7cf08002
|
fe938d66c5412bfe8067d91ecfdf559c528ec60d
|
refs/heads/master
| 2022-12-09T07:47:47.685447
| 2020-08-09T03:41:34
| 2020-08-09T03:41:34
| 286,322,082
| 0
| 0
| null | 2020-08-09T21:48:16
| 2020-08-09T21:48:16
| null |
UTF-8
|
Java
| false
| false
| 868
|
java
|
package cofh.lib.block;
import cofh.lib.tileentity.TileCoFH;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.state.StateContainer;
import java.util.function.Supplier;
import static cofh.lib.util.constants.Constants.ACTIVE;
public class TileBlockActive extends TileBlockCoFH {
public TileBlockActive(Properties builder, Supplier<? extends TileCoFH> supplier) {
super(builder, supplier);
this.setDefaultState(this.stateContainer.getBaseState().with(ACTIVE, false));
}
@Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
super.fillStateContainer(builder);
builder.add(ACTIVE);
}
@Override
public int getLightValue(BlockState state) {
return state.get(ACTIVE) ? super.getLightValue(state) : 0;
}
}
|
[
"kinglemming@gmail.com"
] |
kinglemming@gmail.com
|
f18b277ceabd120e848b2cf7a4b5f2f0c42a981b
|
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
|
/core-java-modules/core-java-perf/src/main/java/com/surya/memoryleaks/staticfields/StaticFieldsDemo.java
|
692fea66b1021967b4ace1f1f2c886305bb40225
|
[] |
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
| 555
|
java
|
package com.surya.memoryleaks.staticfields;
import java.util.ArrayList;
import java.util.List;
public class StaticFieldsDemo {
public static List<Double> list = new ArrayList<>();
public void populateList() {
for (int i = 0; i < 10000000; i++) {
list.add(Math.random());
}
System.out.println("Debug Point 2");
}
public static void main(String[] args) {
System.out.println("Debug Point 1");
new StaticFieldsDemo().populateList();
System.out.println("Debug Point 3");
}
}
|
[
"suryakanta97@github.com"
] |
suryakanta97@github.com
|
df82bb37f7f0fab1910848ed8cf61d0146a2decd
|
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
|
/classes5/rym.java
|
2b9b49b1c275bb3c3d51d9e824535b72909d971f
|
[] |
no_license
|
meeidol-luo/qooq
|
588a4ca6d8ad579b28dec66ec8084399fb0991ef
|
e723920ac555e99d5325b1d4024552383713c28d
|
refs/heads/master
| 2020-03-27T03:16:06.616300
| 2016-10-08T07:33:58
| 2016-10-08T07:33:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,636
|
java
|
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.filemanager.app.FileManagerEngine;
import com.tencent.mobileqq.filemanager.core.FileManagerNotifyCenter;
import com.tencent.mobileqq.filemanager.core.OnlineFileSessionWorker;
import com.tencent.mobileqq.filemanager.data.FileManagerEntity;
import com.tencent.mobileqq.filemanager.util.FileManagerUtil;
import com.tencent.mobileqq.hotpatch.NotVerifyClass;
import com.tencent.qphone.base.util.QLog;
public class rym
extends ryd
{
public rym(OnlineFileSessionWorker paramOnlineFileSessionWorker)
{
super(paramOnlineFileSessionWorker);
boolean bool = NotVerifyClass.DO_VERIFY_CLASS;
}
protected String a()
{
return "StateExcepInvalidWhenChangeToOff";
}
protected void a(int paramInt1, int paramInt2)
{
b(paramInt1, paramInt2);
OnlineFileSessionWorker.b(this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker, 11, 11);
OnlineFileSessionWorker.c(this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker, 11, 14);
QLog.i("OnlineFileSessionWorker<FileAssistant>", 1, "OLfilesession[" + this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker.h + "] state change :(" + this.jdField_a_of_type_Ryd.a() + "->StateUploadingWhenChangeToOff)");
this.jdField_a_of_type_Ryd = new rzd(this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker);
}
protected boolean a()
{
if (this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker.jdField_a_of_type_ComTencentMobileqqFilemanagerDataFileManagerEntity == null)
{
QLog.e("OnlineFileSessionWorker<FileAssistant>", 1, "OLfilesession[" + this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker.h + "]. recvOnLineFile entity is null");
return false;
}
OnlineFileSessionWorker.b(this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker, 9, 12);
OnlineFileSessionWorker.c(this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker, 9, 12);
QLog.i("OnlineFileSessionWorker<FileAssistant>", 1, "OLfilesession[" + this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker.h + "] state change :(" + this.jdField_a_of_type_Ryd.a() + "->StateExcepInvalidWhenRecv)");
this.jdField_a_of_type_Ryd = new ryo(this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker);
return true;
}
protected boolean a(int paramInt, String paramString, long paramLong)
{
FileManagerEntity localFileManagerEntity = this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker.jdField_a_of_type_ComTencentMobileqqFilemanagerDataFileManagerEntity;
if (localFileManagerEntity == null)
{
QLog.e("OnlineFileSessionWorker<FileAssistant>", 1, "OLfilesession[" + this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker.h + "]. recvOnLineFile entity is null");
return false;
}
localFileManagerEntity.Uuid = new String(paramString);
localFileManagerEntity.fProgress = 0.0F;
if ((FileManagerUtil.a(localFileManagerEntity.fileName) == 0) && (localFileManagerEntity.Uuid != null) && (localFileManagerEntity.Uuid.length() != 0)) {
this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker.jdField_a_of_type_ComTencentMobileqqAppQQAppInterface.a().a(localFileManagerEntity.Uuid, 3, false, localFileManagerEntity);
}
localFileManagerEntity.setCloudType(1);
OnlineFileSessionWorker.b(this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker, 11, 13);
OnlineFileSessionWorker.c(this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker, 11, 13);
QLog.i("OnlineFileSessionWorker<FileAssistant>", 1, "OLfilesession[" + this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker.h + "] state change :(" + this.jdField_a_of_type_Ryd.a() + "->StateUploadoneWhenChangeToOff)");
this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker.jdField_a_of_type_ComTencentMobileqqAppQQAppInterface.a().a(true, 22, new Object[] { Long.valueOf(localFileManagerEntity.nSessionId), Long.valueOf(localFileManagerEntity.nOLfileSessionId) });
this.jdField_a_of_type_Ryd = new rzg(this.jdField_a_of_type_ComTencentMobileqqFilemanagerCoreOnlineFileSessionWorker);
return true;
}
}
/* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\rym.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
45901b3582784c9015e8b161f0be7502d25bc343
|
72f763d138d244ce5834f5cdd4cbefb4b4239ad6
|
/app/src/main/java/com/appli/nyx/formx/preference/PrefsManager.java
|
6ab6260b1fba59f887f8ffd6f71b5e97db322324
|
[] |
no_license
|
tchipi88/FormX
|
1542d944cf6a42678eacce9394d255736dec5a8c
|
3a1a0d73b001b09dbce4d5c4691488d21961180b
|
refs/heads/master
| 2023-02-25T03:51:25.512625
| 2020-05-24T19:06:28
| 2020-05-24T19:06:28
| 333,015,989
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,476
|
java
|
package com.appli.nyx.formx.preference;
import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.sharedpreferences.Pref;
@EBean
public class PrefsManager {
@Pref
protected Prefs_ prefs_;
public String getFirebaseToken() {
return prefs_.firebaseToken().get();
}
public void setFirebaseToken(String token) {
prefs_.edit().firebaseToken().put(token).apply();
}
public String getCurrentUserEmail() {
return prefs_.currentUserEmail().get();
}
public void setCurrentUserEmail(String email) {
prefs_.edit().currentUserEmail().put(email).apply();
}
public String getCurrentUserName() {
return prefs_.currentUserName().get();
}
public void setCurrentUserName(String name) {
prefs_.edit().currentUserName().put(name).apply();
}
public boolean isFirstLaunch() {
return prefs_.firstLaunch().getOr(true);
}
public void setFirstLaunch(boolean firstLaunch) {
prefs_.edit().firstLaunch().put(firstLaunch).apply();
}
public void clearSessionPrefs() {
setCurrentUserName(null);
setCurrentUserEmail(null);
}
public boolean isNotifications() {
return prefs_.notifications().getOr(true);
}
public void setNotifications(boolean isLogged) {
prefs_.edit().notifications().put(isLogged).apply();
}
//TODO
public boolean isProfilComplete() {
return prefs_.isProfilComplete().getOr(false);
}
public void setProfilComplete(boolean value) {
prefs_.edit().isProfilComplete().put(value).apply();
}
}
|
[
"ngansop.arthur@gmail.com"
] |
ngansop.arthur@gmail.com
|
87341808ea6047df395915fc6ff0cd2db89eeb64
|
ef830bb18e1f432122e1c9523d4c807c9ef077a5
|
/src/main/java/com/taobao/api/domain/Materialitemswlbwmsstockpruductprocessingnotify.java
|
4c9a4e89a3db88a63879aa388d99ee7af30a7f10
|
[] |
no_license
|
daiyuok/TopSecuritySdk
|
bb424c5808bd103079cbbbfcb56689a73259a24d
|
8ac8eb48b88158a741c820a940564fd0b876e9db
|
refs/heads/master
| 2021-01-22T06:49:05.025064
| 2017-03-01T06:19:42
| 2017-03-01T06:19:42
| 81,789,925
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 699
|
java
|
package com.taobao.api.domain;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.TaobaoObject;
/**
* 原料商品列表
*
* @author top auto create
* @since 1.0, null
*/
public class Materialitemswlbwmsstockpruductprocessingnotify extends TaobaoObject {
private static final long serialVersionUID = 3883481541674949946L;
/**
* 商品列表
*/
@ApiField("order_item")
private Orderitemwlbwmsstockpruductprocessingnotify orderItem;
public Orderitemwlbwmsstockpruductprocessingnotify getOrderItem() {
return this.orderItem;
}
public void setOrderItem(Orderitemwlbwmsstockpruductprocessingnotify orderItem) {
this.orderItem = orderItem;
}
}
|
[
"daixinyu@shopex.cn"
] |
daixinyu@shopex.cn
|
ee4d94ec36709d3be37383d319dd2a9442090e83
|
5956be48881ae28149e7feedde3b63853a126cf8
|
/library_sms_pay/src/main/java/com/y7/smspay/sdk/util/HttpURLConnectionUtils.java
|
3cbab53e9a509913dd21eba70a9b23042b38b231
|
[] |
no_license
|
jv-lee/Yuan7Game
|
b10a701fa919e6674e4c99a2f4435ba48583a1a5
|
63c7278a0f1cbe4c5d697ee001672eb853e08f36
|
refs/heads/master
| 2021-01-02T22:33:12.382699
| 2017-08-11T11:07:52
| 2017-08-11T11:08:25
| 99,334,339
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,167
|
java
|
package com.y7.smspay.sdk.util;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* 主要功能:HttpURLConnection网络工具类
*
* @Prject: CommonUtilLibrary
* @Package: com.jingewenku.abrahamcaijin.commonutil
* @author: AbrahamCaiJin
* @date: 2017年05月22日 14:13
* @Copyright: 个人版权所有
* @Company:
* @version: 1.0.0
*/
public class HttpURLConnectionUtils {
private static final int TIMEOUT_IN_MILLIONS = 5000;
public interface CallBack {
void onRequestComplete(String result);
}
/**
* 异步的Get请求
* @param urlStr
* @param callBack
*/
public static void doGetAsyn(final String urlStr, final CallBack callBack) {
new Thread() {
public void run() {
try {
String result = doGet(urlStr);
if (callBack != null) {
callBack.onRequestComplete(result);
}
} catch (Exception e) {
e.printStackTrace();
}
};
}.start();
}
/**
* 异步的Post请求
*
* @param urlStr
*
* @param params
*
* @param callBack
*
* @throws Exception
*/
public static void doPostAsyn(final String urlStr, final String params,final CallBack callBack) throws Exception {
new Thread() {
public void run() {
try {
String result = doPost(urlStr, params);
if (callBack != null) {
callBack.onRequestComplete(result);
}
} catch (Exception e) {
e.printStackTrace();
}
};
}.start();
}
/**
* Get请求,获得返回数据
* @param urlStr
* @return
* @throws Exception
*/
public static String doGet(String urlStr) {
URL url = null;
HttpURLConnection conn = null;
InputStream is = null;
ByteArrayOutputStream baos = null;
try {
url = new URL(urlStr);
conn = (HttpURLConnection) url.openConnection();
conn.setReadTimeout(TIMEOUT_IN_MILLIONS);
conn.setConnectTimeout(TIMEOUT_IN_MILLIONS);
conn.setRequestMethod("GET");
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
if (conn.getResponseCode() == 200) {
is = conn.getInputStream();
baos = new ByteArrayOutputStream();
int len = -1;
byte[] buf = new byte[128];
while ((len = is.read(buf)) != -1) {
baos.write(buf, 0, len);
}
baos.flush();
return baos.toString();
} else {
throw new RuntimeException(" responseCode is not 200 ... ");
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (is != null)
is.close();
} catch (IOException e) {
}
try {
if (baos != null)
baos.close();
} catch (IOException e) {
}
conn.disconnect();
}
return null;
}
/**
* 向指定 URL 发送POST方法的请求
*
* @param url
* 发送请求的 URL
* @param param
* 请求参数,请求参数应该是 name1=value1&name2=value2 的形式
* @return 代表远程资源的响应结果
* @throws Exception
*/
public static String doPost(String url, String param) {
PrintWriter out = null;
BufferedReader in = null;
String result = "";
try {
URL realUrl = new URL(url); // 打开和URL之间的连接
HttpURLConnection conn = (HttpURLConnection) realUrl
.openConnection(); // 设置通用的请求属性
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded"); // 设置内容类型
conn.setRequestProperty("charset", "utf-8"); // 设置字符编码
conn.setUseCaches(false); // 发送POST请求必须设置如下两行
conn.setDoOutput(true);
conn.setDoInput(true);// 设置是否从httpUrlConnection读入,默认情况下是true;
conn.setReadTimeout(TIMEOUT_IN_MILLIONS); // 将读超时设置为指定的超时,以毫秒为单位。
conn.setConnectTimeout(TIMEOUT_IN_MILLIONS); // 设置一个指定的超时值(以毫秒为单位)
if (param != null && !param.trim().equals("")) { // 获取URLConnection对象对应的输出流
out = new PrintWriter(conn.getOutputStream()); // 发送请求参数
out.print(param);
// flush输出流的缓冲
out.flush();
}
// 定义BufferedReader输入流来读取URL的响应
in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
result += line;
}
} catch (Exception e) {
e.printStackTrace();
}
// 使用finally块来关闭输出流和输入流
finally {
try {
if (out != null) {
out.close();
}
if (in != null) {
in.close();
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
return result;
}
}
|
[
"jv.lee@foxmail.com"
] |
jv.lee@foxmail.com
|
d066761c788fbef8da353e2ca62dcc5c7251bdd6
|
41f79b1c6ef0c793914d99a55b3805f39e3ea8e3
|
/src/org/broad/igv/graph/GraphPanel2.java
|
ae52e082c73415b7b001891d0c9f1d8161e29185
|
[
"MIT",
"LGPL-2.1-or-later",
"LGPL-2.1-only"
] |
permissive
|
nrgene/NRGene-IGV
|
35bf50a07341ff0bf26eabbea55d10e8fa9fcdd0
|
4ac9ffcd6f9fcbe318e9e85d9820783afbabf5fc
|
refs/heads/master
| 2023-09-02T12:48:20.171109
| 2021-02-03T10:26:44
| 2021-02-03T10:26:44
| 162,590,091
| 2
| 1
|
MIT
| 2023-08-16T11:47:31
| 2018-12-20T14:26:46
|
Java
|
UTF-8
|
Java
| false
| false
| 3,270
|
java
|
/*
* Copyright (c) 2007-2011 by The Broad Institute of MIT and Harvard. All Rights Reserved.
*
* This software is licensed under the terms of the GNU Lesser General Public License (LGPL),
* Version 2.1 which is available at http://www.opensource.org/licenses/lgpl-2.1.php.
*
* THE SOFTWARE IS PROVIDED "AS IS." THE BROAD AND MIT MAKE NO REPRESENTATIONS OR
* WARRANTES OF ANY KIND CONCERNING THE SOFTWARE, EXPRESS OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, WHETHER
* OR NOT DISCOVERABLE. IN NO EVENT SHALL THE BROAD OR MIT, OR THEIR RESPECTIVE
* TRUSTEES, DIRECTORS, OFFICERS, EMPLOYEES, AND AFFILIATES BE LIABLE FOR ANY DAMAGES
* OF ANY KIND, INCLUDING, WITHOUT LIMITATION, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
* ECONOMIC DAMAGES OR INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER
* THE BROAD OR MIT SHALL BE ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT
* SHALL KNOW OF THE POSSIBILITY OF THE FOREGOING.
*/
package org.broad.igv.graph;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JPanel;
/**
* @author jrobinso
* @date Oct 12, 2010
*/
public class GraphPanel2 extends JPanel {
private Graph graph;
int topMargin = 50;
int leftMargin = 20;
int nodeWidth = 5;
int nodeHeight = 5;
int ySpacing = 20;
public void setGraph(Graph graph) {
this.graph = graph;
}
@Override
protected void paintComponent(Graphics graphics) {
Graphics2D g = (Graphics2D) graphics;
// Just paint nodes (no edges)
if (graph != null) {
// Set X scale to fit graph in panel
float dx = graph.getMaxX() - graph.getMinX();
float scale = (getWidth() - 2 * leftMargin) / dx;
for (Node node : graph.getNodes()) {
int pixelX = getXPosition(scale, node.getCellX());
int pixelY = getYPosition(node);
g.setColor(Color.BLUE);
g.fillRect(pixelX, pixelY, nodeWidth, nodeHeight);
}
// Paint edges
for (SubGraph sg : graph.getSubGraphs()) {
for (Edge edge : sg.getEdges()) {
// Parent right position
Node parent = edge.getParent();
int px1 = getXPosition(scale, parent.getCellX()) + nodeWidth;
int py1 = getYPosition(parent) + nodeHeight / 2;
// Child left position
Node child = edge.getChild();
int px2 = getXPosition(scale, child.getCellX());
int py2 = getYPosition(child) + nodeHeight / 2;
g.setColor(edge.getColor());
g.drawLine(px1, py1, px2, py2);
g.setColor(Color.red);
g.fillRect(px2 - 1, py2 - 1, 2, 2);
}
}
}
}
private int getYPosition(Node node) {
return topMargin + node.getCellY() * ySpacing;
}
private int getXPosition(float scale, int x) {
return leftMargin + (int) (scale * (x - graph.getMinX()));
}
}
|
[
"kiril@ubuntu.nrgene.local"
] |
kiril@ubuntu.nrgene.local
|
7381d0c9a1b8ed59daccbac8b98289c4a2844c34
|
c0e4430afc85ab61f93bbcda31f6fb479e539140
|
/src/main/java/iyunu/NewTLOL/model/gift/instance/SevenGift.java
|
683a3b2f7b87a678d26397951de71ed40c470b4b
|
[] |
no_license
|
Liuguozhu/MyWork
|
68e0b5bca566b16f7da59f229e493875d3b7a943
|
86a6c7eac8cf50e839a4ce018e399d7e26648a33
|
refs/heads/master
| 2021-05-29T18:14:28.386853
| 2015-08-28T09:14:49
| 2015-08-28T09:30:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,945
|
java
|
package iyunu.NewTLOL.model.gift.instance;
import iyunu.NewTLOL.model.monster.MonsterDropItem;
import java.util.ArrayList;
import java.util.List;
/**
* @function VIP奖励
* @author fhy
*/
public class SevenGift {
/** 天数 **/
private int id;
/** 普通物品 **/
private List<MonsterDropItem> commonItems = new ArrayList<MonsterDropItem>();//
/** VIP物品 **/
private List<MonsterDropItem> vipItems = new ArrayList<MonsterDropItem>();//
/** 普通伙伴 **/
private List<MonsterDropItem> commonP = new ArrayList<MonsterDropItem>();//
/** VIP伙伴 **/
private List<MonsterDropItem> vipP = new ArrayList<MonsterDropItem>();//
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @param id
* the id to set
*/
public void setId(int id) {
this.id = id;
}
/**
* @return the commonItems
*/
public List<MonsterDropItem> getCommonItems() {
return commonItems;
}
/**
* @param commonItems
* the commonItems to set
*/
public void setCommonItems(List<MonsterDropItem> commonItems) {
this.commonItems = commonItems;
}
/**
* @return the vipItems
*/
public List<MonsterDropItem> getVipItems() {
return vipItems;
}
/**
* @param vipItems
* the vipItems to set
*/
public void setVipItems(List<MonsterDropItem> vipItems) {
this.vipItems = vipItems;
}
/**
* @return the commonP
*/
public List<MonsterDropItem> getCommonP() {
return commonP;
}
/**
* @param commonP
* the commonP to set
*/
public void setCommonP(List<MonsterDropItem> commonP) {
this.commonP = commonP;
}
/**
* @return the vipP
*/
public List<MonsterDropItem> getVipP() {
return vipP;
}
/**
* @param vipP
* the vipP to set
*/
public void setVipP(List<MonsterDropItem> vipP) {
this.vipP = vipP;
}
}
|
[
"fhyfhy17@163.com"
] |
fhyfhy17@163.com
|
e55d6d56623cfd1af25cd5c4fa23f0104fb17a09
|
89ce74f7132847612aded67ff6468cb5d6a15112
|
/src/test/java/j7orm/test/testsuite/ibmdb2/IBMDB2Config.java
|
1ec65f43b43fc441b9f724a815e3f098bf9aed7f
|
[
"Apache-2.0"
] |
permissive
|
marcoromagnolo/j7ORM
|
3e1d31825a09d04869799e7b7fc624546269d7f2
|
ffb508bf27bc63676c850e56f172a66de9d186b0
|
refs/heads/master
| 2021-05-10T09:21:45.891379
| 2018-01-25T14:27:56
| 2018-01-25T14:27:56
| 118,923,452
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 963
|
java
|
/**
* Copyright 2016 Marco Romagnolo
*
* 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 j7orm.test.testsuite.ibmdb2;
import j7orm.test.testcase.DefaultDBConfig;
import j7orm.type.DBType;
/**
* @author Marco Romagnolo
*/
public class IBMDB2Config extends DefaultDBConfig {
public IBMDB2Config() {
super(DBType.IBMDB2, DefaultDBConfig.HOST, 50000, DefaultDBConfig.HOST, DefaultDBConfig.USER, DefaultDBConfig.PASSWORD);
}
}
|
[
"mail@marcoromagnolo.it"
] |
mail@marcoromagnolo.it
|
c729ba7dcdccf606e59cea68886334fdd6d5600c
|
448396ee748a9c40aeeff4895ce0c0563a7b2ab4
|
/bboxdb-network-proxy/src/main/java/org/bboxdb/networkproxy/handler/CloseHandler.java
|
6431bd453c8473d1f4bbf339d75af127790387fd
|
[
"CC-BY-SA-2.0",
"Apache-2.0"
] |
permissive
|
jnidzwetzki/bboxdb
|
f5fe59678136fb2faccaec35f1fd9d9ec37e4a86
|
47d3da97e605cb2b8f6fb4a004596b458a024da2
|
refs/heads/master
| 2023-09-06T03:00:48.554009
| 2023-08-09T18:34:04
| 2023-08-09T18:34:04
| 45,732,002
| 52
| 10
|
Apache-2.0
| 2023-09-08T04:30:48
| 2015-11-07T10:28:59
|
Java
|
UTF-8
|
Java
| false
| false
| 1,548
|
java
|
/*******************************************************************************
*
* Copyright (C) 2015-2022 the BBoxDB 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 org.bboxdb.networkproxy.handler;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.bboxdb.network.client.BBoxDBCluster;
import org.bboxdb.networkproxy.ProxyConst;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class CloseHandler implements ProxyCommandHandler {
/**
* The Logger
*/
private final static Logger logger = LoggerFactory.getLogger(CloseHandler.class);
@Override
public void handleCommand(final BBoxDBCluster bboxdbClient, final InputStream socketInputStream,
final OutputStream socketOutputStream) throws IOException {
logger.info("Got close call");
socketOutputStream.write(ProxyConst.RESULT_OK);
Thread.currentThread().interrupt();
}
}
|
[
"jnidzwetzki@gmx.de"
] |
jnidzwetzki@gmx.de
|
6616e00efa1e312db3e8522a964010c163ffe9fd
|
7120f0438c1a4a20d67e88c822a601ad61ef5c4d
|
/zyr-web/src/main/java/com/zgm/zen/state/example3/CloseingState.java
|
0df921231f4716178dc335745395e9013c5b532f
|
[] |
no_license
|
zgmzyr/zyr
|
f94dea3d7f7f962b6df5e18185d3e61d77dc009a
|
fea3c44fe6fbe0c110805487096f203fcb8b823b
|
refs/heads/master
| 2021-01-17T15:09:02.961884
| 2016-06-26T08:38:14
| 2016-06-26T08:38:14
| 9,864,102
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 586
|
java
|
package com.zgm.zen.state.example3;
public class CloseingState extends LiftState {
@Override
public void close() {
System.out.println("电梯门关闭!");
}
@Override
public void open() {
super.context.setLiftState(Context.openningState);
super.context.getLiftState().open();
}
@Override
public void run() {
super.context.setLiftState(Context.runningState);
super.context.getLiftState().run();
}
@Override
public void stop() {
super.context.setLiftState(Context.stoppingState);
super.context.getLiftState().stop();
}
}
|
[
"Administrator@zgm"
] |
Administrator@zgm
|
096a59d2150a70f7ea10bd9e426ed9e87ba15128
|
30fee0305b1a435b60111611dca028812818957d
|
/testing/src/trivialDateServerAndClient/DateClient.java
|
48d360879b303490b6c08aeb6cd2cfc4fe84e1a0
|
[] |
no_license
|
alexace013/for-testing
|
9a2ee9a50cfee5bd482781e441b62c3dd68d3362
|
713bdf8cbc227456be193d421297445fbbf9aa5e
|
refs/heads/master
| 2021-01-22T04:40:33.673192
| 2016-01-03T15:11:18
| 2016-01-03T15:11:18
| 42,043,727
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 797
|
java
|
package trivialDateServerAndClient;
import javax.swing.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;
/**
* Created by alexander on 09.09.15.
*/
public class DateClient {
public static void main(String[] args) throws IOException {
String serverAddress = JOptionPane.showInputDialog(
"Enter IP Address of a machine is\n" +
"running the date service on port 3095: ");
Socket socket = new Socket(serverAddress, 3095);
BufferedReader input =
new BufferedReader(new InputStreamReader(socket.getInputStream()));
String answer = input.readLine();
JOptionPane.showMessageDialog(null, answer);
System.exit(0);
}
}
|
[
"alexace013@gmail.com"
] |
alexace013@gmail.com
|
23c54fe5917cbb3f9eecc4a976bbc1a141b351ea
|
f7cc8938ccf25a514c6a6ccdfb4dcc49f80b5c12
|
/microvibe-booster/booster-core/src/main/java/io/microvibe/booster/commons/utils/property/ListBuilder.java
|
5a12f7ab16f69f6419570791bb45ecdeea2e1c9c
|
[
"Apache-2.0"
] |
permissive
|
microsignal/vibe
|
6f8b8d91aa6fa0dfc7020ca023ea8c3cb0d82e37
|
4b3e2d5b5a6f3b3e021276b7e496d6eaa1b7b665
|
refs/heads/master
| 2021-09-25T13:07:16.911688
| 2018-10-22T05:14:14
| 2018-10-22T05:14:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,707
|
java
|
package io.microvibe.booster.commons.utils.property;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;
final class ListBuilder extends AbstractBuilder<List<Object>> implements PropertyBuilder<List<Object>> {
private List<Object> list;
private Class<?> clazz;
public ListBuilder(List<Object> list, Class<?> clazz) {
init(list, clazz);
}
public ListBuilder(List<Object> list, Class<?> clazz, int size) {
init(list, clazz, size);
}
public void init(List<Object> list, Class<?> clazz) {
init(list, clazz, -1);
}
public void init(List<Object> list, Class<?> clazz, int size) {
if (list == null) {
this.list = new ArrayList<Object>();
} else {
this.list = list;
}
if (clazz == null) {
this.clazz = LinkedHashMap.class;
} else {
this.clazz = clazz;
}
for (int i = this.list.size(); i < size; i++) {
this.list.add(newOne());
}
}
private Object newOne() {
try {
return clazz.newInstance();
} catch (Exception e) {
throw new IllegalArgumentException(e);
}
}
private Object getIndexObj(int i) {
Object one;
if (list.size() <= i) {
one = newOne();
list.add(one);
} else {
one = list.get(i);
}
return one;
}
@SuppressWarnings({"rawtypes"})
@Override
public void exec(Seriation seriation) {
Object orig = seriation.orig;
if (orig != null) {
if (orig instanceof Collection) {
int i = 0;
for (Object o : (Collection) orig) {
Object val = PropertyUtil.getPathProperty(o, seriation.origProperty);
if (val != null || !seriation.ignoredNull) {
Object one = getIndexObj(i);
PropertyUtil.setPathProperty(one, seriation.destProperty, val);
}
i++;
}
} else if (orig.getClass().isArray()) {
int len = Array.getLength(orig);
for (int i = 0; i < len; i++) {
Object o = Array.get(orig, i);
Object val = PropertyUtil.getPathProperty(o, seriation.origProperty);
if (val != null || !seriation.ignoredNull) {
Object one = getIndexObj(i);
PropertyUtil.setPathProperty(one, seriation.destProperty, val);
}
}
} else {
for (Object one : list) {
Object val = PropertyUtil.getPathProperty(orig, seriation.origProperty);
if (val != null || !seriation.ignoredNull) {
PropertyUtil.setPathProperty(one, seriation.destProperty, val);
}
}
}
} else {
for (Object one : list) {
if (seriation.propertyValue != null || !seriation.ignoredNull) {
PropertyUtil.setPathProperty(one, seriation.destProperty, seriation.propertyValue);
}
}
}
}
@Override
public List<Object> done() {
exec();
return list;
}
}
|
[
"kylinmania@163.com"
] |
kylinmania@163.com
|
c2ee8d7ab0ff3e793e510d9307f6f84e78d5b014
|
c1d20e33891deb190d096f5a5ea0cf426b257069
|
/newserver1/newserver1/src/com/mayhem/rs2/content/shopping/impl/Hunterskillshop.java
|
eb99d2b103a35ef00cb2d0052e00bb8a291b9475
|
[] |
no_license
|
premierscape/NS1
|
72a5d3a3f2d5c09886b1b26f166a6c2b27ac695d
|
0fb88b155b2abbb98fe3d88bb287012bbcbb8bf9
|
refs/heads/master
| 2020-04-07T00:46:08.175508
| 2018-11-16T20:06:10
| 2018-11-16T20:06:10
| 157,917,810
| 0
| 0
| null | 2018-11-16T20:44:52
| 2018-11-16T20:25:56
|
Java
|
UTF-8
|
Java
| false
| false
| 3,368
|
java
|
package com.mayhem.rs2.content.shopping.impl;
import com.mayhem.rs2.content.interfaces.InterfaceHandler;
import com.mayhem.rs2.content.interfaces.impl.QuestTab;
import com.mayhem.rs2.content.shopping.Shop;
import com.mayhem.rs2.entity.item.Item;
import com.mayhem.rs2.entity.player.Player;
import com.mayhem.rs2.entity.player.net.out.impl.SendMessage;
/**
* Puro store
*
* @author Divine
*/
public class Hunterskillshop extends Shop {
/**
* Id of Puro shop
*/
public static final int SHOP_ID = 351;
/**
* Price of items in Puro point store
*
* @param id
* @return
*/
public static final int getPrice(int id) {
switch (id) {
case 10045:
return 80;
case 10043:
return 80;
case 10041:
return 80;
case 10039:
return 100;
case 10037:
return 100;
case 10035:
return 100;
case 10075:
return 100;
case 10069:
return 200;
case 10071:
return 350;
case 11259:
return 250;
case 2528:
return 50;
case 2990:
return 75;
case 2991:
return 150;
case 2992:
return 150;
case 2993:
return 200;
case 2994:
return 250;
case 2995:
return 300;
case 10051:
return 75;
case 10049:
return 75;
case 10047:
return 75;
case 9957:
return 75;
case 10023:
return 250;
}
return 2147483647;
}
/**
* All items in puro shop
*/
public Hunterskillshop() {
super(SHOP_ID, new Item[] {
new Item(10045),
new Item(10043),
new Item(10041),
new Item(10051),
new Item(10049),
new Item(10047),
new Item(10039),
new Item(10037),
new Item(10035),
new Item(10075),
new Item(11259),
new Item(10069),
new Item(10071),
new Item(2990),
new Item(2991),
new Item(2992),
new Item(2993),
new Item(2994),
new Item(2995),
new Item(9957),
new Item(10023)
},
false, "Puro point Shop");
}
@Override
public void buy(Player player, int slot, int id, int amount) {
if (!hasItem(slot, id))
return;
if (get(slot).getAmount() == 0)
return;
if (amount > get(slot).getAmount()) {
amount = get(slot).getAmount();
}
Item buying = new Item(id, amount);
if (!player.getInventory().hasSpaceFor(buying)) {
if (!buying.getDefinition().isStackable()) {
int slots = player.getInventory().getFreeSlots();
if (slots > 0) {
buying.setAmount(slots);
amount = slots;
} else {
player.getClient().queueOutgoingPacket(new SendMessage("You do not have enough inventory space to buy this item."));
}
} else {
player.getClient().queueOutgoingPacket(new SendMessage("You do not have enough inventory space to buy this item."));
return;
}
}
if (player.getpuroPoints() < amount * getPrice(id)) {
player.getClient().queueOutgoingPacket(new SendMessage("You do not have enough Puro points to buy that."));
return;
}
player.setpuroPoints(player.getpuroPoints() - amount * getPrice(id));
//InterfaceHandler.writeText(new QuestTab(player));
player.getInventory().add(buying);
update();
}
@Override
public int getBuyPrice(int id) {
return 0;
}
@Override
public String getCurrencyName() {
return "Hunter Points";
}
@Override
public int getSellPrice(int id) {
return getPrice(id);
}
@Override
public boolean sell(Player player, int id, int amount) {
player.getClient().queueOutgoingPacket(new SendMessage("You cannot sell items to this shop."));
return false;
}
}
|
[
"brandon46142@icloud.com"
] |
brandon46142@icloud.com
|
6c75ea32a279de87c81d390948f83d58c0ef358f
|
58be909c0ba9a741bec0b11851ae09dcb41a83a1
|
/configcenter-biz/src/main/java/org/antframework/configcenter/biz/service/AddOrModifyPropertyKeyService.java
|
5871668ca273effc760eaa972b0e5c39c5774a5c
|
[
"Apache-2.0"
] |
permissive
|
zhongxunking/configcenter
|
1b7f43ed293f069b8a60ade18f256d3e8cbf3fa1
|
d966b84995af5c769db1e8b51dd145a88d25cf20
|
refs/heads/master
| 2023-03-17T03:11:51.846023
| 2022-04-24T10:00:15
| 2022-04-24T10:00:15
| 100,801,601
| 87
| 51
|
Apache-2.0
| 2021-06-27T11:12:53
| 2017-08-19T14:59:05
|
Java
|
UTF-8
|
Java
| false
| false
| 1,981
|
java
|
/*
* 作者:钟勋 (e-mail:zhongxunking@163.com)
*/
/*
* 修订记录:
* @author 钟勋 2017-08-20 20:42 创建
*/
package org.antframework.configcenter.biz.service;
import lombok.AllArgsConstructor;
import org.antframework.common.util.facade.BizException;
import org.antframework.common.util.facade.CommonResultCode;
import org.antframework.common.util.facade.EmptyResult;
import org.antframework.common.util.facade.Status;
import org.antframework.configcenter.dal.dao.AppDao;
import org.antframework.configcenter.dal.dao.PropertyKeyDao;
import org.antframework.configcenter.dal.entity.App;
import org.antframework.configcenter.dal.entity.PropertyKey;
import org.antframework.configcenter.facade.order.AddOrModifyPropertyKeyOrder;
import org.bekit.service.annotation.service.Service;
import org.bekit.service.annotation.service.ServiceExecute;
import org.bekit.service.engine.ServiceContext;
import org.springframework.beans.BeanUtils;
/**
* 添加或修改配置key服务
*/
@Service(enableTx = true)
@AllArgsConstructor
public class AddOrModifyPropertyKeyService {
// 应用dao
private final AppDao appDao;
// 配置key dao
private final PropertyKeyDao propertyKeyDao;
@ServiceExecute
public void execute(ServiceContext<AddOrModifyPropertyKeyOrder, EmptyResult> context) {
AddOrModifyPropertyKeyOrder order = context.getOrder();
App app = appDao.findLockByAppId(order.getAppId());
if (app == null) {
throw new BizException(Status.FAIL, CommonResultCode.INVALID_PARAMETER.getCode(), String.format("应用[%s]不存在", order.getAppId()));
}
PropertyKey propertyKey = propertyKeyDao.findLockByAppIdAndKey(order.getAppId(), order.getKey());
if (propertyKey == null) {
propertyKey = new PropertyKey();
}
BeanUtils.copyProperties(order, propertyKey);
propertyKeyDao.save(propertyKey);
}
}
|
[
"zhongxunking@163.com"
] |
zhongxunking@163.com
|
3a6d3dd603b3a8608d632069d0ae004076ed4c68
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-422-32-21-SPEA2-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/wikimodel/xhtml/XhtmlParser_ESTest.java
|
2a998d1c8cb29a022926a4a20eab09d9fa89c780
|
[] |
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
| 564
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Apr 07 01:03:39 UTC 2020
*/
package org.xwiki.rendering.wikimodel.xhtml;
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 XhtmlParser_ESTest extends XhtmlParser_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
c5bc9d321bf3ba7f90f3f8891ad0d7c0466964d9
|
cc59bbccd7dc50db9d7153999b90d4e16bca8278
|
/dbus-stream/dbus-stream-common/src/main/java/com/creditease/dbus/stream/common/appender/enums/Command.java
|
3d1693dd0115441e0549b5ab8af7c95eed3dd6e0
|
[
"Apache-2.0"
] |
permissive
|
cammette/DBus
|
e9c834610a5326875162d782217525537a0fb85c
|
905c8b1a8ab09f7f4d7d36394fbec72318aa88eb
|
refs/heads/master
| 2020-03-12T21:24:26.532577
| 2018-04-20T06:07:13
| 2018-04-20T06:07:13
| 130,827,392
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,148
|
java
|
/*-
* <<
* DBus
* ==
* Copyright (C) 2016 - 2017 Bridata
* ==
* 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.creditease.dbus.stream.common.appender.enums;
import com.creditease.dbus.commons.PropertiesHolder;
import com.creditease.dbus.commons.exception.UnintializedException;
import com.creditease.dbus.stream.common.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map;
/**
* 命令枚举
* Created by Shrimp on 16/6/13.
*/
public enum Command {
UNKNOWN_CMD,
PAUSE_APPENDER_DATA_TOPIC, // 暂停appender所有data topic
RESUME_APPENDER, // 继续appender所有data topic
FULL_DATA_PULL_REQ, // 拉全量枚举
HEART_BEAT, // 心跳
SPLIT_ACK,
META_SYNC, // 同步meta信息
APPENDER_TOPIC_RESUME, // 继续某个topic
AVRO_SCHEMA,
MONITOR_ALARM, // 监控报警,停止伪心跳
DATA_INCREMENT_TERMINATION, // 停止发送消息到kafka后发给wormhole的termination消息
META_EVENT_WARNING, // meta变更兼容性事件警告命令
APPENDER_RELOAD_CONFIG; // 重新加载配置
private static Logger logger = LoggerFactory.getLogger(Command.class);
private static boolean initialized = false;
private static Map<String, Command> cmds = new HashMap<>();
private static Map<String, Command> nameCmds = new HashMap<>();
static {
for (Command command : Command.values()) {
nameCmds.put(command.name().toLowerCase(), command);
}
}
public static void initialize() {
cmds.put($(Constants.ConfigureKey.FULLDATA_REQUEST_SRC), FULL_DATA_PULL_REQ);
cmds.put($(Constants.ConfigureKey.HEARTBEAT_SRC), HEART_BEAT);
cmds.put($(Constants.ConfigureKey.META_EVENT_SRC), META_SYNC);
logger.info("Command initialize {}", cmds.toString());
initialized = true;
}
public static Command parse(String cmd) {
if(!initialized) {
throw new UnintializedException("Command has not initialized!");
}
cmd = cmd.toLowerCase();
if(cmds.containsKey(cmd)) {
return cmds.get(cmd);
} else if(nameCmds.containsKey(cmd)) {
return nameCmds.get(cmd);
}
return UNKNOWN_CMD;
}
private static String $(String key) {
return PropertiesHolder.getProperties(Constants.Properties.CONFIGURE, key).toLowerCase();
}
public static void main(String[] args) {
System.out.println(Command.FULL_DATA_PULL_REQ);
}
}
|
[
"dongwang47@creditease.cn"
] |
dongwang47@creditease.cn
|
e2a13c1fb8513c5cc8ef8fd0e0b3edb149800c6d
|
a4a51084cfb715c7076c810520542af38a854868
|
/src/main/java/com/google/android/gms/internal/gtm/zzpo.java
|
e039ae52cb05fa1646e46e5a4f91a4d94a1b352c
|
[] |
no_license
|
BharathPalanivelu/repotest
|
ddaf56a94eb52867408e0e769f35bef2d815da72
|
f78ae38738d2ba6c9b9b4049f3092188fabb5b59
|
refs/heads/master
| 2020-09-30T18:55:04.802341
| 2019-12-02T10:52:08
| 2019-12-02T10:52:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,387
|
java
|
package com.google.android.gms.internal.gtm;
import java.util.AbstractList;
import java.util.Collection;
import java.util.List;
import java.util.RandomAccess;
abstract class zzpo<E> extends AbstractList<E> implements zzrj<E> {
private boolean zzavs = true;
zzpo() {
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof List)) {
return false;
}
if (!(obj instanceof RandomAccess)) {
return super.equals(obj);
}
List list = (List) obj;
int size = size();
if (size != list.size()) {
return false;
}
for (int i = 0; i < size; i++) {
if (!get(i).equals(list.get(i))) {
return false;
}
}
return true;
}
public int hashCode() {
int size = size();
int i = 1;
for (int i2 = 0; i2 < size; i2++) {
i = (i * 31) + get(i2).hashCode();
}
return i;
}
public boolean add(E e2) {
zzmz();
return super.add(e2);
}
public void add(int i, E e2) {
zzmz();
super.add(i, e2);
}
public boolean addAll(Collection<? extends E> collection) {
zzmz();
return super.addAll(collection);
}
public boolean addAll(int i, Collection<? extends E> collection) {
zzmz();
return super.addAll(i, collection);
}
public void clear() {
zzmz();
super.clear();
}
public boolean zzmy() {
return this.zzavs;
}
public final void zzmi() {
this.zzavs = false;
}
public E remove(int i) {
zzmz();
return super.remove(i);
}
public boolean remove(Object obj) {
zzmz();
return super.remove(obj);
}
public boolean removeAll(Collection<?> collection) {
zzmz();
return super.removeAll(collection);
}
public boolean retainAll(Collection<?> collection) {
zzmz();
return super.retainAll(collection);
}
public E set(int i, E e2) {
zzmz();
return super.set(i, e2);
}
/* access modifiers changed from: protected */
public final void zzmz() {
if (!this.zzavs) {
throw new UnsupportedOperationException();
}
}
}
|
[
"noiz354@gmail.com"
] |
noiz354@gmail.com
|
a0862b163102d2b4c418b609fb413eb968e0f5df
|
23f4d78623458d375cf23b7017c142dd45c32481
|
/Core/orient-sysmodel/com/orient/sysmodel/domain/mq/CwmMsg.java
|
a39e92a1b9590278f9bb294a35ae7f1ba6bf0d83
|
[] |
no_license
|
lcr863254361/weibao_qd
|
4e2165efec704b81e1c0f57b319e24be0a1e4a54
|
6d12c52235b409708ff920111db3e6e157a712a6
|
refs/heads/master
| 2023-04-03T00:37:18.947986
| 2021-04-11T15:12:45
| 2021-04-11T15:12:45
| 356,436,350
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,369
|
java
|
package com.orient.sysmodel.domain.mq;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
/**
* ${DESCRIPTION}
*
* @author Administrator
* @create 2016-12-15 14:43
*/
@Entity
@Table(name = "CWM_MSG")
public class CwmMsg {
public static final String TYPE_COLLAB_FEEDBACK = "feedback";
private Long id;
private String title;
private String content;
private String data;
private Long timestamp;
private Long userId;
private String type;
private String src;
private String dest;
private Boolean readed;
@Id
@Column(name = "ID", nullable = false, insertable = true, updatable = true, precision = -127)
@GeneratedValue(generator = "sequence")
@GenericGenerator(name = "sequence", strategy = "sequence", parameters = {@org.hibernate.annotations.Parameter(name = "sequence", value = "SEQ_CWM_MSG")})
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Basic
@Column(name = "TITLE")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Basic
@Column(name = "CONTENT")
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Basic
@Column(name = "DATA")
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
@Basic
@Column(name = "TIMESTAMP")
public Long getTimestamp() {
return timestamp;
}
public void setTimestamp(Long timestamp) {
this.timestamp = timestamp;
}
@Basic
@Column(name = "USER_ID")
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
@Basic
@Column(name = "TYPE")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Basic
@Column(name = "SRC")
public String getSrc() {
return src;
}
public void setSrc(String src) {
this.src = src;
}
@Basic
@Column(name = "DEST")
public String getDest() {
return dest;
}
public void setDest(String dest) {
this.dest = dest;
}
@Basic
@Column(name = "READED")
public Boolean getReaded() {
return readed;
}
public void setReaded(Boolean readed) {
this.readed = readed;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CwmMsg cwmMsg = (CwmMsg) o;
if (id != null ? !id.equals(cwmMsg.id) : cwmMsg.id != null) return false;
if (title != null ? !title.equals(cwmMsg.title) : cwmMsg.title != null) return false;
if (content != null ? !content.equals(cwmMsg.content) : cwmMsg.content != null) return false;
if (timestamp != null ? !timestamp.equals(cwmMsg.timestamp) : cwmMsg.timestamp != null) return false;
if (userId != null ? !userId.equals(cwmMsg.userId) : cwmMsg.userId != null) return false;
if (type != null ? !type.equals(cwmMsg.type) : cwmMsg.type != null) return false;
if (src != null ? !src.equals(cwmMsg.src) : cwmMsg.src != null) return false;
if (dest != null ? !dest.equals(cwmMsg.dest) : cwmMsg.dest != null) return false;
if (readed != null ? !readed.equals(cwmMsg.readed) : cwmMsg.readed != null) return false;
return true;
}
@Override
public int hashCode() {
int result = id != null ? id.hashCode() : 0;
result = 31 * result + (title != null ? title.hashCode() : 0);
result = 31 * result + (content != null ? content.hashCode() : 0);
result = 31 * result + (timestamp != null ? timestamp.hashCode() : 0);
result = 31 * result + (userId != null ? userId.hashCode() : 0);
result = 31 * result + (type != null ? type.hashCode() : 0);
result = 31 * result + (src != null ? src.hashCode() : 0);
result = 31 * result + (dest != null ? dest.hashCode() : 0);
result = 31 * result + (readed != null ? readed.hashCode() : 0);
return result;
}
}
|
[
"lcr18015367626"
] |
lcr18015367626
|
030a0c7d377ce5683f07c36bed961d4c3f320dcf
|
770441d12c3246dbd6ee571e904b783cd1d27758
|
/src/main/java/mutants/fastjson_1_2_45/com/alibaba/fastjson/TypeReference.java
|
11855e020fde125f4fded7d72d61afbf62ec024f
|
[] |
no_license
|
GenaGeng/FastJsonTester
|
047a937222bf256c8688b0e8f11deea56219e71b
|
4eb1f980ce7d493cc150ca2f414ad541b88ab0d8
|
refs/heads/master
| 2020-09-10T05:03:10.336765
| 2019-12-03T06:40:24
| 2019-12-03T06:40:34
| 221,655,012
| 0
| 0
| null | 2019-11-14T09:07:08
| 2019-11-14T09:07:07
| null |
UTF-8
|
Java
| false
| false
| 3,492
|
java
|
package mutants.fastjson_1_2_45.com.alibaba.fastjson;
import java.lang.reflect.GenericArrayType;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import com.alibaba.fastjson.util.ParameterizedTypeImpl;
import com.alibaba.fastjson.util.TypeUtils;
/**
* Represents a generic type {@code T}. Java doesn't yet provide a way to
* represent generic types, so this class does. Forces clients to create a
* subclass of this class which enables retrieval the type information even at
* runtime.
*
* <p>For example, to create a type literal for {@code List<String>}, you can
* create an empty anonymous inner class:
*
* <pre>
* TypeReference<List<String>> list = new TypeReference<List<String>>() {};
* </pre>
* This syntax cannot be used to create type literals that have wildcard
* parameters, such as {@code Class<?>} or {@code List<? extends CharSequence>}.
*/
public class TypeReference<T> {
static ConcurrentMap<Type, Type> classTypeCache
= new ConcurrentHashMap<Type, Type>(16, 0.75f, 1);
protected final Type type;
/**
* Constructs a new type literal. Derives represented class from type
* parameter.
*
* <p>Clients create an empty anonymous subclass. Doing so embeds the type
* parameter in the anonymous class's type hierarchy so we can reconstitute it
* at runtime despite erasure.
*/
protected TypeReference(){
Type superClass = getClass().getGenericSuperclass();
Type type = ((ParameterizedType) superClass).getActualTypeArguments()[0];
Type cachedType = classTypeCache.get(type);
if (cachedType == null) {
classTypeCache.putIfAbsent(type, type);
cachedType = classTypeCache.get(type);
}
this.type = cachedType;
}
/**
* @since 1.2.9
* @param actualTypeArguments
*/
protected TypeReference(Type... actualTypeArguments){
Class<?> thisClass = this.getClass();
Type superClass = thisClass.getGenericSuperclass();
ParameterizedType argType = (ParameterizedType) ((ParameterizedType) superClass).getActualTypeArguments()[0];
Type rawType = argType.getRawType();
Type[] argTypes = argType.getActualTypeArguments();
int actualIndex = 0;
for (int i = 0; i < argTypes.length; ++i) {
if (argTypes[i] instanceof TypeVariable &&
actualIndex < actualTypeArguments.length) {
argTypes[i] = actualTypeArguments[actualIndex++];
}
// fix for openjdk and android env
if (argTypes[i] instanceof GenericArrayType) {
argTypes[i] = TypeUtils.checkPrimitiveArray(
(GenericArrayType) argTypes[i]);
}
}
Type key = new ParameterizedTypeImpl(argTypes, thisClass, rawType);
Type cachedType = classTypeCache.get(key);
if (cachedType == null) {
classTypeCache.putIfAbsent(key, key);
cachedType = classTypeCache.get(key);
}
type = cachedType;
}
/**
* Gets underlying {@code Type} instance.
*/
public Type getType() {
return type;
}
public final static Type LIST_STRING = new TypeReference<List<String>>() {}.getType();
}
|
[
"17854284492@163.com"
] |
17854284492@163.com
|
7df21cc3ca6c752c5dedcd35eb17fa15de822f76
|
ec9bf57a07b7b06134ec7a21407a11f69cc644f7
|
/src/afr$9.java
|
9de91a7a1de3cdbb1ce71f45721678bb57f6ee77
|
[] |
no_license
|
jzarca01/com.ubercab
|
f95c12cab7a28f05e8f1d1a9d8a12a5ac7fbf4b1
|
e6b454fb0ad547287ae4e71e59d6b9482369647a
|
refs/heads/master
| 2020-06-21T04:37:43.723581
| 2016-07-19T16:30:34
| 2016-07-19T16:30:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 515
|
java
|
import java.util.Map;
final class afr$9
implements afs
{
public final void a(ajm paramajm, Map<String, String> paramMap)
{
paramMap = paramajm.h();
if (paramMap != null)
{
paramMap.a();
return;
}
paramajm = paramajm.i();
if (paramajm != null)
{
paramajm.a();
return;
}
ain.d("A GMSG tried to close something that wasn't an overlay.");
}
}
/* Location:
* Qualified Name: afr.9
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
6803a5fe9d0e9936d10a723e687d8444832ef112
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13708-7-22-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/observation/internal/DefaultObservationManager_ESTest_scaffolding.java
|
31e3f4e3fb01ffe97d07e9a8a81dc1e3cbfc7ec2
|
[] |
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
| 460
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Apr 07 23:55:57 UTC 2020
*/
package org.xwiki.observation.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class DefaultObservationManager_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.