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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42dcf87a18ffa6ecbe6dc800325ddb6630a67006
|
07ba22802386b8fe92d7319f46dba1db4bfa7235
|
/oblib/src/main/java/com/oldbaby/oblib/image/viewer/ImageDataAdapter.java
|
164c1c9f45dae7671ed0f25bebcf15a4c9a73f0a
|
[
"Apache-2.0"
] |
permissive
|
kHRYSTAL/Old-Baby
|
0b8610cac38c0e4d515b551553c5e5510d3736ab
|
c8d90bee468c0f0cde4eb2f32ab9e381f99e2445
|
refs/heads/master
| 2020-04-07T15:37:23.900913
| 2018-11-21T05:46:54
| 2018-11-21T05:46:54
| 158,493,517
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 685
|
java
|
package com.oldbaby.oblib.image.viewer;
import java.io.Serializable;
public interface ImageDataAdapter extends Serializable {
/**
* ๆๅคๅฐๆกๆต่ง
*
* @return
*/
public int count();
/**
* ่ทๅๅถๅฎไฝ็ฝฎ็URL
*
* @param postion
* @return
*/
public String getUrl(int postion);
/**
* ่ทๅๅถๅฎไฝ็ฝฎ็ๅพ็id
*/
public int getDrawableId(int position);
/**
* ๅ ้คๆๅผ ็
ง็
*
* @param position
*/
void remove(int position);
/**
* ่ทๅๆๅผ ็
ง็็ๆ่ฟฐ
*
* @param position
* @return
*/
String getDesc(int position);
}
|
[
"723526676@qq.com"
] |
723526676@qq.com
|
ff48089c8ea12bd479aaa7a2dab9361473b35ab2
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Chart/23/org/jfree/chart/plot/Plot_getNoDataMessagePaint_396.java
|
84a43e10a67d7e60d91ee4a2c0eadd3ac671e43e
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,808
|
java
|
org jfree chart plot
base plot free chart jfreechart
link org jfree chart free chart jfreechart deleg draw ax
data plot base facil common plot
type
plot axi chang listen axischangelisten
return paint displai 'no data' messag
paint code code
set data messag paint setnodatamessagepaint paint
data messag getnodatamessag
paint data messag paint getnodatamessagepaint
data messag paint nodatamessagepaint
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
2b8642d92bb6054d8e970207493c5b70834ca4d6
|
30d08b7a9cbdd336a8d9f802f5ac50eb9700dee5
|
/src/main/java/minecraftbyexample/mbe40_hud_overlay/StartupCommon.java
|
50a9b3498ebca208799e7b7f81fed0d52e6463a7
|
[] |
no_license
|
alvaropp/MinecraftByExample
|
e0da453ff2a21d049547b40c3f0ebefd5f11dac8
|
c265da620571d0b53f50d9fdd7159e95d174b96d
|
refs/heads/master
| 2021-01-22T13:30:38.075187
| 2016-08-22T14:37:17
| 2016-08-22T14:37:17
| 67,339,071
| 0
| 0
| null | 2016-09-04T10:39:50
| 2016-09-04T10:39:50
| null |
UTF-8
|
Java
| false
| false
| 1,075
|
java
|
//package minecraftbyexample.mbe40_hud_overlay;
//
//import net.minecraftforge.fml.common.registry.GameRegistry;
//
// /**
// * @author Nephroid
// *
// * User: Nephroid
// * Date: December 26, 2014
// * The Startup classes for this example are called during startup, in the following order:
// * preInitCommon
// * preInitClientOnly
// * initCommon
// * initClientOnly
// * postInitCommon
// * postInitClientOnly
// * See MinecraftByExample class for more information
// */
//public class StartupCommon
//{
// public static ItemHUDactivator itemHUDactivator; // this holds the unique instance of your item
//
// public static void preInitCommon()
// {
// // each instance of your item should have a name that is unique within your mod. use lower case.
// itemHUDactivator = (ItemHUDactivator)(new ItemHUDactivator().setUnlocalizedName("mbe40_hud_overlay_item"));
// GameRegistry.registerItem(itemHUDactivator, "mbe40_hud_overlay_item");
// }
//
// public static void initCommon()
// {
// }
//
// public static void postInitCommon()
// {
// }
//}
|
[
"spamblackhole88@yahoo.com.au"
] |
spamblackhole88@yahoo.com.au
|
05d2238b84c4483520b04466a1e789b3a1129d06
|
f5e7dde3ced0e7af1c9fcec1e2a74384c862cb56
|
/app/src/main/java/dev/nick/music/MainActivity.java
|
54fb697e7e15a98a61736c6fd4dc2db83289aa6f
|
[] |
no_license
|
yinheng/Music
|
6ab8ca5e4d16dcd106681c2a4db5c77e5198d95e
|
dcf798600e2bee2462d3fd583d5d89737755cc1f
|
refs/heads/master
| 2021-01-01T17:45:25.121365
| 2017-07-24T04:13:19
| 2017-07-24T04:13:48
| 98,148,254
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,611
|
java
|
package dev.nick.music;
import android.graphics.Color;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Environment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ImageButton;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import dev.nick.music.loader.Music;
import dev.nick.music.loader.MusicLoader;
public class MainActivity extends AppCompatActivity {
List<Music> musicList;
MediaPlayer mediaPlayer = new MediaPlayer();
ListView listView;
ImageButton prevBtn, playBtn, nextBtn;
BaseAdapter adapter;
int index = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
listView = (ListView) findViewById(R.id.list);
SwipeRefreshLayout swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe);
swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
loadAndDisplay();
}
});
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Toast.makeText(getApplicationContext(), "item:" + (i + 1), Toast.LENGTH_SHORT).show();
play(i);
}
});
mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mediaPlayer) {
playNext();
}
});
playBtn = (ImageButton) findViewById(R.id.imageButton2);
nextBtn = (ImageButton) findViewById(R.id.imageButton3);
prevBtn = (ImageButton) findViewById(R.id.imageButton);
playBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (mediaPlayer.isPlaying()) {
mediaPlayer.pause();
playBtn.setImageResource(R.drawable.ic_play_arrow_black_24dp);
} else {
mediaPlayer.start();
playBtn.setImageResource(R.drawable.ic_pause_black_24dp);
}
}
});
prevBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (index == 0) {
index = musicList.size() - 1;
} else {
index = index - 1;
}
play(index);
}
});
nextBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
playNext();
}
});
loadAndDisplay();
}
private void playNext() {
if (index == musicList.size() - 1) {
index = 0;
} else {
index += 1;
}
play(index);
}
private void play(int i) {
index = i;
String path = musicList.get(i).getMusicPath();
try {
if (mediaPlayer.isPlaying()) {
mediaPlayer.stop();
}
mediaPlayer.reset();
mediaPlayer.setDataSource(path);
mediaPlayer.prepare();
mediaPlayer.start();
playBtn.setImageResource(R.drawable.ic_pause_black_24dp);
adapter.notifyDataSetChanged();
} catch (IOException e) {
e.printStackTrace();
}
}
private void loadAndDisplay() {
new Thread(new Runnable() {
@Override
public void run() {
MusicLoader musicLoader = new MusicLoader();
musicList = musicLoader.loadMusic(Environment.getExternalStorageDirectory().getPath());
Log.i("yinheng", "item:" + musicList.size());
Iterator<Music> iterator = musicList.iterator();
while (iterator.hasNext()) {
Music m = iterator.next();
Log.i("yinheng", m.toString());
}
runOnUiThread(new Runnable() {
@Override
public void run() {
onLoadComplete();
}
});
}
}).start();
}
private void onLoadComplete() {
SwipeRefreshLayout swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe);
swipeRefreshLayout.setRefreshing(false);
ProgressBar progressBar = (ProgressBar) findViewById(R.id.progress);
progressBar.setVisibility(View.INVISIBLE);
adapter = new MusicAdapter();
ListView listView = (ListView) findViewById(R.id.list);
listView.setAdapter(adapter);
}
class MusicAdapter extends BaseAdapter {
@Override
public int getCount() {
return musicList.size();
}
@Override
public Object getItem(int i) {
return musicList.get(i);
}
@Override
public long getItemId(int i) {
return i;
}
@Override
public View getView(int position, View view, ViewGroup viewGroup) {
View itemView = LayoutInflater.from(getApplicationContext())
.inflate(R.layout.item, viewGroup, false);
TextView line1 = itemView.findViewById(R.id.textView);
TextView line2 = itemView.findViewById(R.id.textView2);
Music music = musicList.get(position);
line1.setText(music.getMusicName());
line2.setText(music.getMusicPath());
if (index == position) {
itemView.setBackgroundColor(Color.GREEN);
}
return itemView;
}
}
}
|
[
"guohao4@lenovo.com"
] |
guohao4@lenovo.com
|
4e60c19d307b7ce00f0f9b92673d2a375931ff02
|
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
|
/DecompiledViberSrc/app/src/main/java/com/google/android/gms/internal/ads/zzdqn.java
|
4423feff1194c532ede0675ff0d070ec4cf0fddf
|
[] |
no_license
|
cga2351/code
|
703f5d49dc3be45eafc4521e931f8d9d270e8a92
|
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
|
refs/heads/master
| 2021-07-08T15:11:06.299852
| 2021-05-06T13:22:21
| 2021-05-06T13:22:21
| 60,314,071
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 521
|
java
|
package com.google.android.gms.internal.ads;
final class zzdqn
implements zzdph
{
public final int zzayz()
{
throw new NoSuchMethodError();
}
public final boolean zzaza()
{
throw new NoSuchMethodError();
}
public final zzdpj zzazb()
{
throw new NoSuchMethodError();
}
}
/* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_2_dex2jar.jar
* Qualified Name: com.google.android.gms.internal.ads.zzdqn
* JD-Core Version: 0.6.2
*/
|
[
"yu.liang@navercorp.com"
] |
yu.liang@navercorp.com
|
a1c54b2ddae49b1b27e1f50b0fe463a3fa1f4b46
|
1cce29cd23674b1e7f3d523c779231032720add4
|
/src/main/java/com/suixingpay/profit/jikeshijian/xiengnengyouhua/DemoApplication15.java
|
79f52c53295a0a2662b78ab26246dc06c624085f
|
[] |
no_license
|
histjxg/hxg-all
|
b87a30f2c18c8c075067c406fb1aac8b56dbff4d
|
01a1aabb12f3a56bb74698ac986fd16268421698
|
refs/heads/master
| 2023-07-11T22:10:39.808894
| 2021-08-18T16:07:35
| 2021-08-18T16:07:36
| 397,638,703
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,593
|
java
|
package com.suixingpay.profit.jikeshijian.xiengnengyouhua;
public class DemoApplication15 {
public static void main(String[] args) {
// ่ฟ่กๅค็บฟ็จ
MultiThreadTester test1 = new MultiThreadTester();
test1.Start();
// ่ฟ่กๅ็บฟ็จ
SerialTester test2 = new SerialTester();
test2.Start();
}
static class MultiThreadTester extends ThreadContextSwitchTester {
@Override
public void Start() {
long start = System.currentTimeMillis();
MyRunnable myRunnable1 = new MyRunnable();
Thread[] threads = new Thread[4];
// ๅๅปบๅคไธช็บฟ็จ
for (int i = 0; i < 4; i++) {
threads[i] = new Thread(myRunnable1);
threads[i].start();
}
for (int i = 0; i < 4; i++) {
try {
// ็ญๅพ
ไธ่ตท่ฟ่กๅฎ
threads[i].join();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
long end = System.currentTimeMillis();
System.out.println("multi thread exce time: " + (end - start) + "s");
System.out.println("counter: " + counter);
}
// ๅๅปบไธไธชๅฎ็ฐ Runnable ็็ฑป
class MyRunnable implements Runnable {
public void run() {
while (counter < 100000000) {
synchronized (this) {
if(counter < 100000000) {
increaseCounter();
}
}
}
}
}
}
// ๅๅปบไธไธชๅ็บฟ็จ
static class SerialTester extends ThreadContextSwitchTester{
@Override
public void Start() {
long start = System.currentTimeMillis();
for (long i = 0; i < count; i++) {
increaseCounter();
}
long end = System.currentTimeMillis();
System.out.println("serial exec time: " + (end - start) + "s");
System.out.println("counter: " + counter);
}
}
// ็ถ็ฑป
static abstract class ThreadContextSwitchTester {
public static final int count = 100000000;
public volatile int counter = 0;
public int getCount() {
return this.counter;
}
public void increaseCounter() {
this.counter += 1;
}
public abstract void Start();
}
}
|
[
"huangxiaogen@baijiahulian.com"
] |
huangxiaogen@baijiahulian.com
|
3759ff24f54bbf4724cef0783b9a9760d6b9de7e
|
6edf6c315706e14dc6aef57788a2abea17da10a3
|
/com/planet_ink/marble_mud/WebMacros/grinder/GrinderHolidays.java
|
4fb81a06883a5b7c99d1a52346d5ce855b6e45db
|
[] |
no_license
|
Cocanuta/Marble
|
c88efd73c46bd152098f588ba1cdc123316df818
|
4306fbda39b5488dac465a221bf9d8da4cbf2235
|
refs/heads/master
| 2020-12-25T18:20:08.253300
| 2012-09-10T17:09:50
| 2012-09-10T17:09:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,446
|
java
|
package com.planet_ink.marble_mud.WebMacros.grinder;
import com.planet_ink.marble_mud.WebMacros.RoomData;
import com.planet_ink.marble_mud.core.interfaces.*;
import com.planet_ink.marble_mud.core.*;
import com.planet_ink.marble_mud.core.collections.*;
import com.planet_ink.marble_mud.Abilities.interfaces.*;
import com.planet_ink.marble_mud.Areas.interfaces.*;
import com.planet_ink.marble_mud.Behaviors.interfaces.*;
import com.planet_ink.marble_mud.CharClasses.interfaces.*;
import com.planet_ink.marble_mud.Libraries.interfaces.*;
import com.planet_ink.marble_mud.Common.interfaces.*;
import com.planet_ink.marble_mud.Exits.interfaces.*;
import com.planet_ink.marble_mud.Items.interfaces.*;
import com.planet_ink.marble_mud.Locales.interfaces.*;
import com.planet_ink.marble_mud.MOBS.interfaces.*;
import com.planet_ink.marble_mud.Races.interfaces.*;
import java.util.*;
/*
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.
*/
@SuppressWarnings({"unchecked","rawtypes"})
public class GrinderHolidays {
public String name() {return this.getClass().getName().substring(this.getClass().getName().lastIndexOf('.')+1);}
protected static String setText(DVector sets, String var, String newVAL)
{
if(newVAL==null) newVAL="";
//var=var.toUpperCase().trim();
int index=sets.indexOf(var);
String oldVal=index>=0?(String)sets.elementAt(index,2):"";
if(index>=0)
{
if(!newVAL.equals(oldVal))
sets.setElementAt(index,2,newVAL);
}
else
sets.addElement(var,newVAL,Integer.valueOf(-1));
return newVAL;
}
public static String createModifyHoliday(ExternalHTTPRequests httpReq, java.util.Map<String,String> parms, String holidayName)
{
int index=CMLib.quests().getHolidayIndex(holidayName);
if(index<=0)
{
String err = CMLib.quests().createHoliday(holidayName,"ALL",true);
if((err != null) && (err.trim().length()>0))
return err;
index=CMLib.quests().getHolidayIndex(holidayName);
if(index < 0)
return "Error creating holiday file.";
}
List<String> steps=null;
QuestManager.RawHolidayData encodedData = null;
Object resp=CMLib.quests().getHolidayFile();
if(resp instanceof List)
steps=(List<String>)resp;
else
if(resp instanceof String)
return (String)resp;
if(steps!=null)
encodedData=CMLib.quests().getEncodedHolidayData(steps.get(index));
if(encodedData==null)
return "Error reading holiday data (code: "+((resp instanceof List)?"T":"F")+":"+((steps==null)?"F":"T")+":"+((encodedData==null)?"F":"T")+")";
DVector settings=encodedData.settings;
DVector behaviors=encodedData.behaviors;
DVector properties=encodedData.properties;
DVector stats=encodedData.stats;
//List stepV=(List)encodedData.elementAt(4);
//int pricingMobIndex=((Integer)encodedData.elementAt(5)).intValue();
String name=setText(settings,"NAME",httpReq.getRequestParameter("NAME"));
if((name==null)||(name.trim().length()==0)) return "A name is required.";
String duration=setText(settings,"DURATION",httpReq.getRequestParameter("DURATION"));
if((duration==null)||(!CMath.isMathExpression(duration))) return "Duration is mal-formed.";
if(!httpReq.isRequestParameter("SCHEDULETYPE")) return "Schedule not found.";
int typeIndex=CMath.s_int(httpReq.getRequestParameter("SCHEDULETYPE"));
int mudDayIndex=settings.indexOf("MUDDAY");
int dateIndex=settings.indexOf("DATE");
int waitIndex=settings.indexOf("WAIT");
String scheduleName=new String[]{"WAIT","MUDDAY","DATE"}[typeIndex];
if((typeIndex!=0)&&(waitIndex>=0))
settings.removeElement("WAIT");
if((typeIndex!=1)&&(mudDayIndex>=0))
settings.removeElement("MUDDAY");
if((typeIndex!=2)&&(dateIndex>=0))
settings.removeElement("DATE");
String newWait = setText(settings,scheduleName,httpReq.getRequestParameter(scheduleName));
switch(typeIndex)
{
case 0: {
if(!CMath.isMathExpression(newWait))
return "Wait expression is invalid.";
break;
}
case 1:
case 2: {
int dash=newWait.indexOf('-');
if(dash < 0) return "Given date is invalid. Use Month#-Day# format";
if(!CMath.isInteger(newWait.substring(0,dash).trim()))
return "Month value in the given date is not valid.";
if(!CMath.isInteger(newWait.substring(dash+1).trim()))
return "Day value in the given date is not valid.";
break;
}
}
StringBuffer areaGroup = new StringBuffer("");
HashSet areaCodes=new HashSet();
String id="";
for(int i=0;httpReq.isRequestParameter("AREAGROUP"+id);id=Integer.toString(++i))
areaCodes.add(httpReq.getRequestParameter("AREAGROUP"+id));
if(areaCodes.contains("AREAGROUP1"))
areaGroup.append("ANY");
else
{
int areaNum=2;
boolean reallyAll=true;
for(Enumeration e=CMLib.map().sortedAreas();e.hasMoreElements();areaNum++)
if(areaCodes.contains("AREAGROUP"+areaNum))
areaGroup.append(" \"" + ((Area)e.nextElement()).Name()+"\"");
else
{
reallyAll=false;
e.nextElement();
}
if(reallyAll)
areaGroup.setLength(0);
}
setText(settings,"AREAGROUP",areaGroup.toString().trim());
setText(settings,"MOBGROUP",httpReq.getRequestParameter("MOBGROUP"));
behaviors.clear();
setText(behaviors,"AGGRESSIVE",httpReq.getRequestParameter("AGGRESSIVE"));
for(int i=1;httpReq.isRequestParameter("BEHAV"+i);i++)
if(httpReq.getRequestParameter("BEHAV"+i).trim().length()>0)
setText(behaviors,httpReq.getRequestParameter("BEHAV"+i),httpReq.getRequestParameter("BDATA"+i));
StringBuffer mudChats=new StringBuffer("");
for(int i=1;httpReq.isRequestParameter("MCWDS"+i);i++)
{
String words=httpReq.getRequestParameter("MCWDS"+i).trim();
words=CMStrings.replaceAll(words,",","|");
if((words.length()>0)&&(httpReq.isRequestParameter("MCSAYS"+i+"_1")))
{
mudChats.append("("+words+");");
for(int ii=1;httpReq.isRequestParameter("MCSAYW"+i+"_"+ii);ii++)
if(CMath.isInteger(httpReq.getRequestParameter("MCSAYW"+i+"_"+ii)))
mudChats.append(httpReq.getRequestParameter("MCSAYW"+i+"_"+ii)+httpReq.getRequestParameter("MCSAYS"+i+"_"+ii)+";");
mudChats.append(";");
}
}
setText(behaviors,"MUDCHAT",mudChats.toString());
properties.clear();
setText(properties,"MOOD",httpReq.getRequestParameter("MOOD"));
for(int i=1;httpReq.isRequestParameter("AFFECT"+i);i++)
if(httpReq.getRequestParameter("AFFECT"+i).trim().length()>0)
setText(properties,httpReq.getRequestParameter("AFFECT"+i),httpReq.getRequestParameter("ADATA"+i));
Vector priceFV=new Vector();
for(int i=1;httpReq.isRequestParameter("PRCFAC"+i);i++)
if(CMath.isPct(httpReq.getRequestParameter("PRCFAC"+i).trim()))
priceFV.add(((String)(CMath.s_pct(httpReq.getRequestParameter("PRCFAC"+i).trim())+" "+httpReq.getRequestParameter("PMASK"+i).trim())).trim());
setText(stats,"PRICEMASKS",CMParms.toStringList(priceFV));
String err=CMLib.quests().alterHoliday(holidayName, encodedData);
if(err.length()==0)
httpReq.addRequestParameters("HOLIDAY",name);
return err;
}
}
|
[
"Cocanuta@Gmail.com"
] |
Cocanuta@Gmail.com
|
951548b8771ff837e5c58cb3bfa20cd536bff40a
|
093e942f53979299f3e56c9ab1f987e5e91c13ab
|
/storm-client/src/jvm/org/apache/storm/trident/operation/builtin/MapGet.java
|
f8ca0e80524d9e0e97cc9b8b69dd53219be71b82
|
[
"Apache-2.0",
"GPL-1.0-or-later",
"BSD-3-Clause",
"MIT",
"BSD-2-Clause"
] |
permissive
|
Whale-Storm/Whale
|
09bab86ce0b56412bc1b984bb5d47935cf0814aa
|
9b3e5e8bffbeefa54c15cd2de7f2fb67f36d64b2
|
refs/heads/master
| 2022-09-26T10:56:51.916884
| 2020-06-11T08:36:44
| 2020-06-11T08:36:44
| 266,803,131
| 3
| 0
|
Apache-2.0
| 2022-09-17T00:00:04
| 2020-05-25T14:39:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,539
|
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.storm.trident.operation.builtin;
import org.apache.storm.tuple.Values;
import java.util.List;
import org.apache.storm.trident.operation.TridentCollector;
import org.apache.storm.trident.state.BaseQueryFunction;
import org.apache.storm.trident.state.map.ReadOnlyMapState;
import org.apache.storm.trident.tuple.TridentTuple;
public class MapGet extends BaseQueryFunction<ReadOnlyMapState, Object> {
@Override
public List<Object> batchRetrieve(ReadOnlyMapState map, List<TridentTuple> keys) {
return map.multiGet((List) keys);
}
@Override
public void execute(TridentTuple tuple, Object result, TridentCollector collector) {
collector.emit(new Values(result));
}
}
|
[
"798750509@qq.com"
] |
798750509@qq.com
|
e47bbf4264d3b0017d72c6fa259a04adda828ae7
|
c2e6f7c40edce79fd498a5bbaba4c2d69cf05e0c
|
/src/main/java/com/google/android/gms/common/zzh.java
|
ed06314bf8d937217a05673da67f89ce81f44396
|
[] |
no_license
|
pengju1218/decompiled-apk
|
7f64ee6b2d7424b027f4f112c77e47cd420b2b8c
|
b60b54342a8e294486c45b2325fb78155c3c37e6
|
refs/heads/master
| 2022-03-23T02:57:09.115704
| 2019-12-28T23:13:07
| 2019-12-28T23:13:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 359
|
java
|
package com.google.android.gms.common;
import com.google.android.gms.common.util.VisibleForTesting;
@VisibleForTesting
final class zzh {
static final zze[] a = {new zzi(zze.a("0ย\u0004C0ย\u0003+ย \u0003\u0002\u0001\u0002\u0002\t\u0000รร ยFdJ0ย0")), new zzj(zze.a("0ย\u0004ยจ0ย\u0003ยย \u0003\u0002\u0001\u0002\u0002\t\u0000รย
ยธl}รNรต0"))};
}
|
[
"apoorwaand@gmail.com"
] |
apoorwaand@gmail.com
|
75a493ea1825c2fcf40b708648368298c5f5dc46
|
2d9bd0fc6fd3e788b0cff0d17bc6d74c55d51671
|
/Sprint17_repush/commons/commons-data/src/main/java/dz/gov/mesrs/sii/commons/data/model/referentiel/Nomenclature.java
|
2eec30eb53a1c8478b4df63b1cdccf6aadcf01b7
|
[] |
no_license
|
kkezzar/code2
|
952de18642d118d9dae9b10acc3b15ef7cfd709e
|
ee7bd0908ac7826074d26e214ef07c594e8a9706
|
refs/heads/master
| 2016-09-06T04:17:06.896511
| 2015-03-10T13:41:04
| 2015-03-10T13:41:04
| 31,958,723
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,482
|
java
|
package dz.gov.mesrs.sii.commons.data.model.referentiel;
// Generated 20 janv. 2014 11:10:42 by Hibernate Tools 3.6.0
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
* NcValues generated by hbm2java
*/
@Entity
@Table(name = "nomenclature", schema = "nc")
public class Nomenclature implements java.io.Serializable {
/**
* serialVersionUID
*
* @author BELDI Jamel on : 23 janv. 2014 11:20:05
*/
private static final long serialVersionUID = 1L;
private int id;
private Nomenclature nomenclature;
private NcNames ncNames;
private String libelleLongFr;
private String libelleLongAr;
private String libelleCourtFr;
private String libelleCourtAr;
private Boolean status;
private String code;
// private Set<NcHistory> ncHistories = new HashSet<NcHistory>(0);
private List<Nomenclature> nomenclatures;
public Nomenclature() {
}
public Nomenclature(int id, String code) {
this.id = id;
this.code = code;
}
// public Nomenclature(int id, Nomenclature nomenclature, NcNames ncNames,
// String libelleLongFr, String libelleLongAr, String libelleCourtFr,
// String libelleCourtAr, Boolean status, String code, Set<NcHistory>
// ncHistories,
// Set<Nomenclature> ncValueses) {
// this.id = id;
// //this.nomenclature = nomenclature;
// this.ncNames = ncNames;
// this.libelleLongFr = libelleLongFr;
// this.libelleLongAr = libelleLongAr;
// this.libelleCourtFr = libelleCourtFr;
// this.libelleCourtAr = libelleCourtAr;
// this.status = status;
// this.code = code;
// this.ncHistories = ncHistories;
// }
@Id
@SequenceGenerator(name = "seq_nc", initialValue = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_nc")
@Column(name = "id", unique = true, nullable = false)
public int getId() {
return this.id;
}
public void setId(int id) {
this.id = id;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "ref_valeur")
public Nomenclature getNomenclature() {
return this.nomenclature;
}
public void setNomenclature(Nomenclature nomenclature) {
this.nomenclature = nomenclature;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_list")
public NcNames getNcNames() {
return this.ncNames;
}
public void setNcNames(NcNames ncNames) {
this.ncNames = ncNames;
}
@Column(name = "libelle_long_fr", length = 100)
public String getLibelleLongFr() {
return this.libelleLongFr;
}
public void setLibelleLongFr(String libelleLongFr) {
this.libelleLongFr = libelleLongFr;
}
@Column(name = "libelle_long_ar", length = 100)
public String getLibelleLongAr() {
return this.libelleLongAr;
}
public void setLibelleLongAr(String libelleLongAr) {
this.libelleLongAr = libelleLongAr;
}
@Column(name = "libelle_court_fr", length = 100)
public String getLibelleCourtFr() {
return this.libelleCourtFr;
}
public void setLibelleCourtFr(String libelleCourtFr) {
this.libelleCourtFr = libelleCourtFr;
}
@Column(name = "libelle_court_ar", length = 100)
public String getLibelleCourtAr() {
return this.libelleCourtAr;
}
public void setLibelleCourtAr(String libelleCourtAr) {
this.libelleCourtAr = libelleCourtAr;
}
@Column(name = "code", unique = false, nullable = false, length = 30)
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
/**
* [Nomenclature.nomenclatures] Getter
* @author MAKERRI Sofiane on : 6 janv. 2015 10:59:59
* @return the nomenclatures
*/
@OneToMany(fetch = FetchType.LAZY, mappedBy = "nomenclature", cascade = CascadeType.ALL, orphanRemoval = true)
public List<Nomenclature> getNomenclatures() {
return nomenclatures;
}
/**
* [Nomenclature.nomenclatures] Setter
* @author MAKERRI Sofiane on : 6 janv. 2015 10:59:59
* @param nomenclatures the nomenclatures to set
*/
public void setNomenclatures(List<Nomenclature> nomenclatures) {
this.nomenclatures = nomenclatures;
}
@Column(name = "status")
public Boolean getStatus() {
return status;
}
public void setStatus(Boolean status) {
this.status = status;
}
}
|
[
"root@lhalid-pc"
] |
root@lhalid-pc
|
df37c431603293ba1713fdd5dcb0572b5c62ea0e
|
55aca439e180a9bcf0a36f60320013979905d1e5
|
/efreight-afbase/src/main/java/com/efreight/afbase/controller/LcCostController.java
|
1402308778a535d15ad7c19c5ffa1195d9c542ba
|
[] |
no_license
|
zhoudy-github/efreight-cloud
|
1a8f791f350a37c1f2828985ebc20287199a8027
|
fc669facfdc909b51779a88575ab4351e275bd25
|
refs/heads/master
| 2023-03-18T07:24:18.001404
| 2021-03-23T06:55:54
| 2021-03-23T06:55:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,047
|
java
|
package com.efreight.afbase.controller;
import java.util.List;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.efreight.afbase.entity.LcCost;
import com.efreight.afbase.service.LcCostService;
import com.efreight.common.security.util.MessageInfo;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@RestController
@AllArgsConstructor
@RequestMapping("/lc-cost")
@Slf4j
public class LcCostController {
private final LcCostService service;
/**
* ๆฅ่ฏขๆๆฌๆ็ป(ๆชๅฎๅ
จๅฏน่ดฆ็)
* @param lcCost
* @return
*/
@GetMapping("/list")
public MessageInfo getCostList(LcCost lcCost) {
try {
List<LcCost> result = service.getCostList(lcCost);
return MessageInfo.ok(result);
} catch (Exception e) {
log.info(e.getMessage());
return MessageInfo.failed(e.getMessage());
}
}
}
|
[
"yeliang_sun@163.com"
] |
yeliang_sun@163.com
|
9c2d8968635e974e70d99c0b14381469ccd89611
|
6a73c05f6de364388de2bd9b16fcfd45f20dbfc0
|
/AIDL_Demo/src/main/java/com/zuimeia/aidl_demo/Book.java
|
d014141dd208040ecc185d2d986972847601c14f
|
[] |
no_license
|
Adan0225/androiddemo
|
9eaf2ce33abd31d06c71a66bbfbdf51bea6d6108
|
c6e823f89eef3d36d90ab8d83ed0bcfe4e28fd3f
|
refs/heads/master
| 2020-03-28T18:35:13.616255
| 2018-09-15T10:52:28
| 2018-09-15T10:52:28
| 148,893,740
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,180
|
java
|
package com.zuimeia.aidl_demo;
import android.os.Parcel;
import android.os.Parcelable;
/**
* Created by chenzhiyong on 16/3/6.
*/
public class Book implements Parcelable
{
private String mDesc;
private int mPrise;
public String getDesc()
{
return mDesc;
}
public void setDesc(String desc)
{
mDesc = desc;
}
public int getPrise()
{
return mPrise;
}
public void setPrise(int prise)
{
mPrise = prise;
}
@Override
public int describeContents()
{
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags)
{
dest.writeString(this.mDesc);
dest.writeInt(this.mPrise);
}
public Book()
{
}
protected Book(Parcel in)
{
this.mDesc = in.readString();
this.mPrise = in.readInt();
}
public static final Parcelable.Creator<Book> CREATOR = new
Parcelable.Creator<Book>()
{
public Book createFromParcel(Parcel source) {
return new Book(source);
}
public Book[] newArray(int size) {
return new Book[size];
}
};
}
|
[
"jason_yao"
] |
jason_yao
|
d7f2b492bc76a8f16113fe39ae9cebbb351ebcee
|
b4252cd1c9942474ca1a17cd906196d264f4d60e
|
/src/com/cartmatic/estore/imports/handler/product/ProductKindHandler.java
|
99abcda31a7bdd9ec8c592853c6ec42965308bc6
|
[] |
no_license
|
1649865412/StoreAdminOne
|
5acb273becf848f5007320bff720924cb1fd5faf
|
70bc2fb098eafb436c8860cdf9a58e63ee61510b
|
refs/heads/master
| 2021-01-02T22:58:16.554900
| 2015-06-26T05:54:52
| 2015-06-26T05:54:52
| 38,096,515
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,642
|
java
|
package com.cartmatic.estore.imports.handler.product;
import java.math.BigDecimal;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import com.cartmatic.estore.common.model.catalog.Product;
import com.cartmatic.estore.imports.handler.ColumnHandler;
import com.cartmatic.estore.imports.handler.basic.ColumnBasicHandler;
import com.cartmatic.estore.imports.model.Column;
import com.cartmatic.estore.imports.model.ImportModel;
public class ProductKindHandler extends ColumnBasicHandler implements
ColumnHandler {
private Logger logger = Logger.getLogger(ProductKindHandler.class);
public void setProperty(ImportModel importModel,Column column) throws Exception {
Product product=(Product)importModel.getTarget();
Short origProductKind=product.getProductKind();
//็ฎๅๅชๅคๆญๆฏๅฆๅญๅจไธคไธชไปทๆ ผๆฅๅณๅฎๆฏๅฆๅ็ง
List<String> values = column.getValues();
int count=0;
for (String value : values) {
if (StringUtils.isNotBlank(value)) {
try {
if(new BigDecimal(value).doubleValue()>0)
count++;
} catch (Exception e) {
// TODO: handle exception
}
}
}
Short productKind=null;
if(count>1){
productKind=new Short("2");
}else{
productKind=new Short("1");
}
if(product.getId()==null){
product.setProductKind(productKind);
}else{
if(column.isSupportUpdate()){
product.setProductKind(productKind);
}else if(productKind.intValue()!=origProductKind){
logger.warn("ๆฌๆกๆฐๆฎไธบๆดๆฐ๏ผproductKindไธๆฏๆๆดๆฐๆไฝใ"+column);
}
}
}
}
|
[
"1649865412@qq.com"
] |
1649865412@qq.com
|
27ab7cfa26d7b8bb06ad541104bb3d86a68ded5a
|
4c730ce99f29fdc883557bbdcb52a48890e2ff18
|
/app/src/main/java/details/hotel/app/hoteldetails/Adapter/RoomCategoriesListAdapter.java
|
dfafee9dd2fe184395eebe0e68c9c0554ee6fe9d
|
[] |
no_license
|
nisharzingo/HotelDetailsOptions
|
0b6ba91a0ee0b1e6ea956682bf0c315f86c73a30
|
48d9b007d6a3101ac4a46cfbe9f11703d6372107
|
refs/heads/master
| 2020-04-10T17:48:22.721586
| 2018-12-11T19:14:13
| 2018-12-11T19:14:13
| 161,184,769
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,962
|
java
|
package details.hotel.app.hoteldetails.Adapter;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import java.util.ArrayList;
import details.hotel.app.hoteldetails.Customs.CustomFonts.TextViewRobotoregular;
import details.hotel.app.hoteldetails.Model.HotelDetails;
import details.hotel.app.hoteldetails.Model.Rates;
import details.hotel.app.hoteldetails.Model.RoomCategories;
import details.hotel.app.hoteldetails.R;
import details.hotel.app.hoteldetails.UI.Activities.BookAvailablityScreen;
import details.hotel.app.hoteldetails.Utils.Util;
import details.hotel.app.hoteldetails.WebAPI.RateApi;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
/**
* Created by ZingoHotels Tech on 11-12-2018.
*/
public class RoomCategoriesListAdapter extends RecyclerView.Adapter<RoomCategoriesListAdapter.ViewHolder> {
Context context;
ArrayList<RoomCategories> roomCategories;
public RoomCategoriesListAdapter(Context context, ArrayList<RoomCategories> roomCategories)
{
this.context = context;
this.roomCategories = roomCategories;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_room_category_list,parent,false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(final ViewHolder holder, final int position) {
final RoomCategories roomCategory = roomCategories.get(position);
if(roomCategory!=null){
holder.mCategoryName.setText(roomCategories.get(position).getCategoryName());
if(roomCategory.getRates()!=null){
if(roomCategory.getRates().size()!=0){
holder.mRate.setText("โน "+roomCategory.getRates().get(0).getSellRateForSingle()+"/-(incl GST)");
}
}else{
getRatesByCategoryId(roomCategory.getRoomCategoryId(),holder.mRate);
}
holder.mBookNow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent book = new Intent(context, BookAvailablityScreen.class);
Bundle bundle = new Bundle();
bundle.putSerializable("Category",roomCategory);
book.putExtras(bundle);
context.startActivity(book);
}
});
}else{
}
}
@Override
public int getItemCount() {
return roomCategories.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
TextView mCategoryName,mRate;
ImageView mCategoryImage;
Button mBookNow;
public ViewHolder(View itemView) {
super(itemView);
mCategoryName = (TextView)itemView.findViewById(R.id.category_name);
mRate = (TextView) itemView.findViewById(R.id.rate);
mCategoryImage = (ImageView) itemView.findViewById(R.id.category_image);
mBookNow = (Button) itemView.findViewById(R.id.book_category);
}
}
private void getRatesByCategoryId(final int categoryId, final TextView sellRate){
RateApi apiService = Util.getClient().create(RateApi.class);
//String authenticationString = Util.getToken(context);
String authenticationString = "Basic TW9obmlBdmQ6ODIyMDgxOTcwNg==";
Call<ArrayList<Rates>> call = apiService.getRatesByCategoryId(authenticationString,categoryId);
call.enqueue(new Callback<ArrayList<Rates>>() {
@Override
public void onResponse(Call<ArrayList<Rates>> call, Response<ArrayList<Rates>> response) {
try {
int statusCode = response.code();
if (statusCode == 200||statusCode==201||statusCode==204) {
if(response.body()!=null&&response.body().size()!=0){
sellRate.setText("โน "+response.body().get(0).getSellRateForSingle()+"/-(incl GST)");
}
}else {
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
@Override
public void onFailure(Call<ArrayList<Rates>> call, Throwable t) {
// Log error here since request failed
Log.e("TAG", t.toString());
}
});
}
}
|
[
"nishar@zingohotels.com"
] |
nishar@zingohotels.com
|
f5e469bde59e2b0828bf111cf3f7d0f9fe1c648b
|
9cd45a02087dac52ea4d39a0c17e525c11a8ed97
|
/src/java/com/adincube/sdk/mediation/f/a.java
|
9fbe7066b8f98f878a17858c401f759188353ea1
|
[] |
no_license
|
abhijeetvaidya24/INFO-NDVaidya
|
fffb90b8cb4478399753e3c13c4813e7e67aea19
|
64d69250163e2d8d165e8541aec75b818c2d21c5
|
refs/heads/master
| 2022-11-29T16:03:21.503079
| 2020-08-12T06:00:59
| 2020-08-12T06:00:59
| 286,928,296
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,050
|
java
|
/*
* Decompiled with CFR 0.0.
*
* Could not load the following classes:
* java.lang.Integer
* java.lang.Object
* java.lang.String
*/
package com.adincube.sdk.mediation.f;
import com.adincube.sdk.mediation.b;
import com.adincube.sdk.mediation.j;
public final class a {
com.adincube.sdk.mediation.a a = null;
private b b = null;
public a(b b2) {
this.b = b2;
}
public final void a() {
com.adincube.sdk.mediation.a a2 = this.a;
if (a2 != null) {
a2.a();
}
}
public final void a(int n2) {
if (this.a != null) {
j.a a2 = j.a.d;
if (n2 != -103 && n2 != -102) {
if (n2 != -6) {
if (n2 == 204) {
a2 = j.a.b;
}
} else {
a2 = j.a.d;
}
} else {
a2 = j.a.c;
}
j j2 = new j(this.b, a2, Integer.toString((int)n2));
this.a.a(j2);
}
}
}
|
[
"abhijeetvaidya24@gmail.com"
] |
abhijeetvaidya24@gmail.com
|
a562ca27d7ce46c991a3bdcf7abb835c93d62561
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_1893.java
|
bd2e1eb1ec776bf8a89f5d57f136f1b0c1cea562
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,152
|
java
|
/**
* This is a fast, native implementation of an iterative box blur. The algorithm runs in-place on the provided bitmap and therefore has a very small memory footprint. <p> The iterative box blur has the nice property that it approximates the Gaussian blur very quickly. Usually iterations=3 is sufficient such that the casual observer cannot tell the difference. <p> The edge pixels are repeated such that the bitmap still has a well-defined border. <p> Asymptotic runtime: O(width * height * iterations) <p> Asymptotic memory: O(radius + max(width, height))
* @param bitmap The targeted bitmap that will be blurred in-place. Each dimension must not begreater than 65536.
* @param iterations The number of iterations to run. Must be greater than 0 and not greater than65536.
* @param blurRadius The given blur radius. Must be greater than 0 and not greater than 65536.
*/
public static void iterativeBoxBlur(Bitmap bitmap,int iterations,int blurRadius){
Preconditions.checkNotNull(bitmap);
Preconditions.checkArgument(iterations > 0);
Preconditions.checkArgument(blurRadius > 0);
nativeIterativeBoxBlur(bitmap,iterations,blurRadius);
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
f22c1a94462b70a2555932d3f5506e45a5ae4cbe
|
cd4a79a2841c6d3d7ee687e502f121a7156d0920
|
/app/src/main/java/hainu/com/trainorganization/adapter/ArticlelistAdapter.java
|
479ed3c243a6758334c785f7f1f31047bb5e2421
|
[] |
no_license
|
1812507678/TrainOrganization
|
8064d2fdf61ee9dd0a53ac463ea63be1bbe225b3
|
4943b1ca2fbc05ff07b4f2500c06b547ea35d02b
|
refs/heads/master
| 2020-06-13T03:59:50.339432
| 2016-12-28T18:25:59
| 2016-12-28T18:25:59
| 75,451,512
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,019
|
java
|
package hainu.com.trainorganization.adapter;
import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.lidroid.xutils.BitmapUtils;
import java.util.List;
import hainu.com.trainorganization.R;
import hainu.com.trainorganization.bean.StrategyArticle;
/**
* Created by Administrator on 2016/7/26.
*/
public class ArticlelistAdapter extends BaseAdapter {
private BitmapUtils bitmapUtils;
private Activity activity;
private List<StrategyArticle> data;
public ArticlelistAdapter(Activity activity, List<StrategyArticle> data) {
bitmapUtils = new BitmapUtils(activity);
this.data = data;
this.activity = activity;
}
@Override
public int getCount() {
return data.size();
}
@Override
public Object getItem(int position) {
return data.get(position);
}
@Override
public long getItemId(int position) {
return 0;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
final StrategyArticle article = data.get(position);
View inflate = View.inflate(activity, R.layout.list_article_item,null);
ImageView iv_readlist_artcileimage = (ImageView) inflate.findViewById(R.id.iv_readlist_artcileimage);
TextView tv_readlist_title = (TextView) inflate.findViewById(R.id.tv_readlist_title);
TextView tv_readlist_time = (TextView) inflate.findViewById(R.id.tv_readlist_time);
TextView tv_readlist_count = (TextView) inflate.findViewById(R.id.tv_readlist_count);
String imageurl = article.getimageUrl();
bitmapUtils.display(iv_readlist_artcileimage,imageurl);
tv_readlist_title.setText(article.getTitle());
tv_readlist_time.setText(article.getTime());
tv_readlist_count.setText("้
่ฏป้๏ผ"+ article.getReadCount()+"");
return inflate;
}
}
|
[
"1812507678@qq.com"
] |
1812507678@qq.com
|
6573cc2e30421a378c928383bfc61acdcb763ac3
|
7c832046815214f00436a5047cdcf2df1d705263
|
/common_base/src/main/java/com/xy/commonbase/base/BasePopupWindow.java
|
d37d65a5260f004188fddec0b64c8ee7f6672fef
|
[] |
no_license
|
surpreme/aite1.1.1
|
1c0d258d3ae0e9fb6e7fa618a1bdf31799bc8f5a
|
37346a1ec059c7bb4210be46fdd913642375831c
|
refs/heads/master
| 2020-08-29T12:21:50.871759
| 2019-10-28T08:18:18
| 2019-10-28T08:18:18
| 218,029,631
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,677
|
java
|
package com.xy.commonbase.base;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.PopupWindow;
import androidx.annotation.StyleRes;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
public abstract class BasePopupWindow extends PopupWindow {
protected Context mContext;
private Unbinder binder;
protected CompositeDisposable disposable;
public BasePopupWindow(Context context, CompositeDisposable disposable) {
this(context,ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT,0,disposable);
}
public BasePopupWindow(Context context, int width, int height, @StyleRes int anim , CompositeDisposable disposable) {
this.mContext = context;
View enrollView = LayoutInflater.from(mContext).inflate(getLayout(), null);
binder = ButterKnife.bind(this, enrollView);
this.disposable = disposable;
this.setContentView(enrollView);
// ่ฎพ็ฝฎๅฎฝ้ซ
this.setWidth(width);
this.setHeight(height);
// ่ฎพ็ฝฎๅผนๅบ็ชๅฃๅฏ็นๅป
this.setOutsideTouchable(true);
// ็ชไฝ่ๆฏ่ฒ
this.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
this.setAnimationStyle(anim);
initData();
initView();
}
public abstract int getLayout();
protected abstract void initData();
protected abstract void initView();
}
|
[
"1740747328@qq.com"
] |
1740747328@qq.com
|
1ac65a73f1e673a0813397bfb3bd29451bdba239
|
cf0f8f9b8c7f0eeef62b81ff1f4c883a7905e8a1
|
/src/com/kaylerrenslow/armaDialogCreator/control/DefaultValueProvider.java
|
4f8ed3b45d97bc8bd354f68e7ac67eee2327f368
|
[
"MIT"
] |
permissive
|
pikaxo/arma-dialog-creator
|
5fc21f06110501e24b8ac55f51c74202c8b97e05
|
5ff118a0661c7878a44ebe20ad35fb9594b083ad
|
refs/heads/master
| 2020-03-28T19:54:42.052608
| 2017-06-17T05:03:30
| 2017-06-17T05:03:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 958
|
java
|
package com.kaylerrenslow.armaDialogCreator.control;
import com.kaylerrenslow.armaDialogCreator.control.sv.SerializableValue;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
/**
Get {@link SerializableValue} instances from storage or create them dynamically.
@author Kayler
@since 11/22/2016 */
public interface DefaultValueProvider {
/**
Get a default value for the given property lookup
@param lookup lookup
*/
@Nullable SerializableValue getDefaultValue(@NotNull ControlPropertyLookupConstant lookup);
/**
Tells the provider that the given properties will be needed for a series of {@link #getDefaultValue(ControlPropertyLookupConstant)} calls. This will not be called before
{@link #getDefaultValue(ControlPropertyLookupConstant)}
@param tofetch list to fetch that are being requested.
*/
void prefetchValues(@NotNull List<ControlPropertyLookupConstant> tofetch);
}
|
[
"kaylerrenslow@gmail.com"
] |
kaylerrenslow@gmail.com
|
e2388e257179ca40b41c60840a27da1c68e1b7b3
|
8fd2c2998888c28ccd54ee4d745bedda509b6e9c
|
/src/main/java/app/common/validation/Constraint.java
|
d2fdae36741c615b20a6921df5a8e542573c6bc6
|
[
"MIT"
] |
permissive
|
project-templates/payara-application
|
301df8750513061ab97b02cb05243a982cf80a38
|
b2becb437c57b322b62ca9e820152208c3f6a1d6
|
refs/heads/master
| 2021-06-09T08:12:07.628270
| 2016-12-08T14:34:12
| 2016-12-08T14:34:12
| 73,614,379
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 135
|
java
|
package app.common.validation;
public interface Constraint {
boolean validate(String text);
String getErrorMessage();
}
|
[
"tomcat.port.8080+github@gmail.com"
] |
tomcat.port.8080+github@gmail.com
|
c070a0387833630eb902658dbec14af3dafa3abc
|
e04af49094db9f5b18f7900a6e6841996f22b0bd
|
/app/src/main/java/com/xavier/financasdroid/ui/tools/ToolsFragment.java
|
7fa271ce6d888801afee5a9f4a84984a2e870878
|
[
"MIT"
] |
permissive
|
fxavier/financasdroid
|
0548bca5a5a48921023203dff1f6315cc5c43c57
|
d8934253f37c044c0ff77bad71b4d895e77e1011
|
refs/heads/master
| 2020-09-16T13:26:28.095809
| 2019-11-24T17:35:47
| 2019-11-24T17:35:47
| 223,732,858
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,148
|
java
|
package com.xavier.financasdroid.ui.tools;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders;
import com.xavier.financasdroid.R;
public class ToolsFragment extends Fragment {
private ToolsViewModel toolsViewModel;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
toolsViewModel =
ViewModelProviders.of(this).get(ToolsViewModel.class);
View root = inflater.inflate(R.layout.fragment_tools, container, false);
final TextView textView = root.findViewById(R.id.text_tools);
toolsViewModel.getText().observe(this, new Observer<String>() {
@Override
public void onChanged(@Nullable String s) {
textView.setText(s);
}
});
return root;
}
}
|
[
"xavierfrancisco353@gmail.com"
] |
xavierfrancisco353@gmail.com
|
42345986bdeb16acb697b9ed71e3dec39f8f4db9
|
0498b2a550adc40b48da03a5c7adcd7c3d3a037d
|
/errai-ui/src/main/java/org/jboss/errai/ui/shared/VisitContextImpl.java
|
1a13067a8489789fe2d672ddcc6192f98f200d57
|
[] |
no_license
|
sinaisix/errai
|
ba5cd3db7a01f1a0829086635128d918f25c0122
|
7e7e0a387d02b7366cbed9947d6c969f21ac655f
|
refs/heads/master
| 2021-01-18T08:03:04.809057
| 2015-02-24T00:10:16
| 2015-02-24T00:14:28
| 31,277,838
| 1
| 0
| null | 2015-02-24T19:32:46
| 2015-02-24T19:32:46
| null |
UTF-8
|
Java
| false
| false
| 435
|
java
|
package org.jboss.errai.ui.shared;
public class VisitContextImpl<T> implements VisitContextMutable<T> {
private boolean complete;
private T result;
public boolean isVisitComplete() {
return complete;
}
@Override
public void setVisitComplete() {
complete = true;
}
@Override
public T getResult() {
return result;
}
@Override
public void setResult(T result) {
this.result = result;
}
}
|
[
"lincolnbaxter@gmail.com"
] |
lincolnbaxter@gmail.com
|
fc00d89a912b5c5d0cf3dfb36e71bb27a0de5810
|
16b5d51ab0409cbb5a1da9eacb9948a54acd6258
|
/app/src/main/java/com/haoche51/checker/entity/VehicleBrandEntity.java
|
791a7e0af8d7d3ae02e0af91a49c843c5259e724
|
[] |
no_license
|
liyq1406/haochebang
|
c3405a537d4f695ca51cb26d7889e952c6965eea
|
12727fcca80c85aa9586bd58fe9b16c98fa1bf5b
|
refs/heads/master
| 2021-01-17T21:20:31.261785
| 2017-02-28T04:52:06
| 2017-02-28T04:52:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 974
|
java
|
package com.haoche51.checker.entity;
public class VehicleBrandEntity extends BaseEntity {
private int id = 0;
private String name = "";
private String pinyin = "";
private String first_char = "";
private String img_url = "";
public static VehicleBrandEntity parseFromJson(String jsonString) {
return gson.fromJson(jsonString, VehicleBrandEntity.class);
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPinyin() {
return pinyin;
}
public void setPinyin(String pinyin) {
this.pinyin = pinyin;
}
public String getFirst_char() {
return first_char;
}
public void setFirst_char(String first_char) {
this.first_char = first_char;
}
public String getImg_url() {
return img_url;
}
public void setImg_url(String img_url) {
this.img_url = img_url;
}
}
|
[
"pengxianglin@haoche51.com"
] |
pengxianglin@haoche51.com
|
1f8357baab9877f906b43a015456773461f171ba
|
d7be0cf96dae35a98dc1643011e025a28e3c92bd
|
/QZComm/src/main/java/com/ks/object/ValidObject.java
|
e81687cf0a0f4fd87773d4112bce3b0826be6de1
|
[] |
no_license
|
liaohanjie/QZStore
|
8ab5827138266dc88179ee2cfb94c98d391c39be
|
698d1e7d8386bca3b15fd4b3ea3020e5b9cc3c43
|
refs/heads/master
| 2021-01-10T18:35:14.604327
| 2016-05-31T05:17:50
| 2016-05-31T05:17:50
| 59,005,984
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 176
|
java
|
package com.ks.object;
import lombok.Data;
@Data
public class ValidObject {
private int heroSize;
private int propSize;
private int eternalSize;
private int equipSize;
}
|
[
"liaohanjie1314@126.com"
] |
liaohanjie1314@126.com
|
bd064a4e8522ee065e5a628c3e72e6b5b855dd99
|
388c2a44fe5de5c6524d407c1dddfe43db754c5b
|
/src/gui/org/deidentifier/arx/gui/view/impl/common/datatable/DataTableConfigLabelAccumulator.java
|
648542aa9047d1a0489671255b6fc4f17e18a5e9
|
[
"Apache-2.0"
] |
permissive
|
arx-deidentifier/arx
|
d51f751acac017d39e18213cce18d42887dcdb22
|
c8c26c95e42465908cdc1e07f6211121374600af
|
refs/heads/master
| 2023-08-16T08:07:47.794373
| 2023-04-06T18:34:16
| 2023-04-06T18:34:16
| 9,751,165
| 567
| 243
|
Apache-2.0
| 2023-05-23T20:17:59
| 2013-04-29T15:23:18
|
Java
|
UTF-8
|
Java
| false
| false
| 2,391
|
java
|
/*
* ARX Data Anonymization Tool
* Copyright 2012 - 2023 Fabian Prasser and contributors
*
* 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.deidentifier.arx.gui.view.impl.common.datatable;
import org.deidentifier.arx.RowSet;
import org.eclipse.nebula.widgets.nattable.NatTable;
import org.eclipse.nebula.widgets.nattable.layer.LabelStack;
import org.eclipse.nebula.widgets.nattable.layer.cell.IConfigLabelAccumulator;
/**
* A label accumulator for the data view.
*
* @author Fabian Prasser
*/
public class DataTableConfigLabelAccumulator implements IConfigLabelAccumulator {
/** TODO */
private final DataTableContext context;
/** TODO */
private final NatTable table;
/**
* Creates a new instance.
*
* @param table
* @param context
*/
public DataTableConfigLabelAccumulator(NatTable table, DataTableContext context) {
this.context = context;
this.table = table;
}
@Override
public void accumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition) {
int[] groups = context.getGroups();
RowSet rows = context.getRows();
if (table != null && groups != null) {
int row = table.getRowIndexByPosition(rowPosition + 1);
configLabels.addLabel("background" + (groups[row] % 2)); //$NON-NLS-1$
if (row < groups.length - 1 && groups[row] != groups[row + 1]) {
configLabels.addLabel(DataTableDecorator.BOTTOM_LINE_BORDER_LABEL);
}
}
if (table != null && rows != null) {
int column = table.getColumnIndexByPosition(columnPosition + 1);
if (column == 0) {
configLabels.addLabel("checkbox"); //$NON-NLS-1$
}
}
}
}
|
[
"mail@fabian-prasser.de"
] |
mail@fabian-prasser.de
|
2b2b8ea8f64e3823d7411d103c71b0936e23e515
|
45c31d23be3d46b03af0828c1b5bc5739147cc44
|
/pcapngdecoder/src/main/java/fr/bmartel/pcapdecoder/structure/PcapNgStructureParser.java
|
0609f65034be9f17c9ca25f33b7f8548946db7c4
|
[
"MIT"
] |
permissive
|
bertrandmartel/pcapng-decoder
|
15e6e8711ebce01a5d943eb248150987a432e46c
|
e9adb3bdf0d530a650f15aa2a557819da2dd60f8
|
refs/heads/master
| 2022-02-15T08:05:17.277067
| 2017-01-12T14:53:02
| 2017-01-12T14:53:02
| 34,972,594
| 20
| 9
|
MIT
| 2020-03-31T09:32:12
| 2015-05-03T03:37:56
|
Java
|
UTF-8
|
Java
| false
| false
| 4,595
|
java
|
/*
* The MIT License (MIT)
* <p/>
* Copyright (c) 2015-2016 Bertrand Martel
* <p/>
* 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:
* <p/>
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* <p/>
* 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 fr.bmartel.pcapdecoder.structure;
import fr.bmartel.pcapdecoder.structure.types.IPcapngType;
import fr.bmartel.pcapdecoder.structure.types.impl.EnhancedPacketHeader;
import fr.bmartel.pcapdecoder.structure.types.impl.InterfaceDescriptionHeader;
import fr.bmartel.pcapdecoder.structure.types.impl.InterfaceStatisticsHeader;
import fr.bmartel.pcapdecoder.structure.types.impl.NameResolutionHeader;
import fr.bmartel.pcapdecoder.structure.types.impl.SectionHeader;
/**
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Block Type |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Block Total Length |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* / Block Body /
* / variable length, aligned to 32 bits /
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | Block Total Length |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
* @author Bertrand Martel
*/
public class PcapNgStructureParser {
/**
* unique value that identifies the block. Values whose Most Significant Bit (MSB) is equal to 1 are reserved for
* local use. They allow to save private data to the file and to extend the file format
*/
private BlockTypes blockType = BlockTypes.UNKNOWN;
private IPcapngType pcapStruct = null;
/**
* total size of this block
*/
private byte[] blockTotalLength = new byte[32];
/**
* content of the block
*/
private byte[] blockData = new byte[]{};
private boolean isBigEndian = true;
/**
* Build Pcap Ng structure
*
* @param type block type
* @param data block data
*/
public PcapNgStructureParser(BlockTypes type, byte[] data, boolean isBigEndian) {
this.blockType = type;
this.blockData = data;
this.isBigEndian = isBigEndian;
}
public void decode() {
if (blockType == BlockTypes.SECTION_HEADER_BLOCK) {
pcapStruct = new SectionHeader(blockData, isBigEndian, blockType);
} else if (blockType == BlockTypes.INTERFACE_DESCRIPTION_BLOCK) {
pcapStruct = new InterfaceDescriptionHeader(blockData, isBigEndian, blockType);
} else if (blockType == BlockTypes.ENHANCES_PACKET_BLOCK) {
pcapStruct = new EnhancedPacketHeader(blockData, isBigEndian, blockType);
} else if (blockType == BlockTypes.SIMPLE_PACKET_BLOCK) {
} else if (blockType == BlockTypes.NAME_RESOLUTION_BLOCK) {
pcapStruct = new NameResolutionHeader(blockData, isBigEndian, blockType);
} else if (blockType == BlockTypes.INTERFACE_STATISTICS_BLOCK) {
pcapStruct = new InterfaceStatisticsHeader(blockData, isBigEndian, blockType);
} else if (blockType == BlockTypes.PACKET_BLOCK) {
}
}
public BlockTypes getBlockType() {
return blockType;
}
public IPcapngType getPcapStruct() {
return pcapStruct;
}
public byte[] getBlockTotalLength() {
return blockTotalLength;
}
public byte[] getBlockData() {
return blockData;
}
public boolean isBigEndian() {
return isBigEndian;
}
}
|
[
"bmartel.fr@gmail.com"
] |
bmartel.fr@gmail.com
|
34162f1773e71ee78465fedba9a908b0dd18896a
|
a2054e8dbec716aec5af2e0269128c19be9551c1
|
/Character_Main/src/net/sf/anathema/character/generic/framework/xml/trait/GenericTraitTemplateFactory.java
|
ea150526c06ac5ab63e46304546b5d2f19577078
|
[] |
no_license
|
oxford-fumble/anathema
|
a2cf9e1429fa875718460e6017119c4588f12ffe
|
2ba9b506297e1e7a413dee7bfdbcd6af80a6d9ec
|
refs/heads/master
| 2021-01-18T05:08:33.046966
| 2013-06-28T14:50:45
| 2013-06-28T14:50:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,868
|
java
|
package net.sf.anathema.character.generic.framework.xml.trait;
import net.sf.anathema.character.generic.framework.xml.trait.pool.GenericTraitTemplatePool;
import net.sf.anathema.character.generic.template.ITraitTemplateFactory;
import net.sf.anathema.character.generic.traits.ITraitTemplate;
import net.sf.anathema.character.generic.traits.types.AbilityType;
import net.sf.anathema.character.generic.traits.types.AttributeType;
import net.sf.anathema.character.generic.traits.types.VirtueType;
import net.sf.anathema.lib.exception.UnreachableCodeReachedException;
import net.sf.anathema.lib.lang.clone.ICloneable;
public class GenericTraitTemplateFactory implements ITraitTemplateFactory, ICloneable<GenericTraitTemplateFactory> {
private GenericTraitTemplatePool abilitiesPool;
private GenericTraitTemplatePool attributesPool;
private GenericTraitTemplatePool virtuesPool;
private GenericTraitTemplate essenceTemplate;
private GenericTraitTemplate willpowerTemplate;
@Override
public ITraitTemplate createWillpowerTemplate() {
return willpowerTemplate;
}
@Override
public ITraitTemplate createEssenceTemplate() {
return essenceTemplate;
}
@Override
public ITraitTemplate createVirtueTemplate(VirtueType type) {
return virtuesPool.getTemplate(type);
}
@Override
public ITraitTemplate createAttributeTemplate(AttributeType type) {
return attributesPool.getTemplate(type);
}
@Override
public ITraitTemplate createAbilityTemplate(AbilityType type) {
return abilitiesPool.getTemplate(type);
}
public void setAbilitiesPool(GenericTraitTemplatePool abilitiesPool) {
this.abilitiesPool = abilitiesPool;
}
public void setAttributesPool(GenericTraitTemplatePool attributesPool) {
this.attributesPool = attributesPool;
}
public void setVirtuesPool(GenericTraitTemplatePool virtuesPool) {
this.virtuesPool = virtuesPool;
}
public void setEssenceTemplate(GenericTraitTemplate essenceTemplate) {
this.essenceTemplate = essenceTemplate;
}
public void setWillpowerTemplate(GenericTraitTemplate willpowerTemplate) {
this.willpowerTemplate = willpowerTemplate;
}
@Override
public GenericTraitTemplateFactory clone() {
GenericTraitTemplateFactory clone;
try {
clone = (GenericTraitTemplateFactory) super.clone();
} catch (CloneNotSupportedException e) {
throw new UnreachableCodeReachedException(e);
}
clone.abilitiesPool = abilitiesPool == null ? null : abilitiesPool.clone();
clone.attributesPool = attributesPool == null ? null : attributesPool.clone();
clone.virtuesPool = virtuesPool == null ? null : virtuesPool.clone();
clone.essenceTemplate = essenceTemplate == null ? null : essenceTemplate.clone();
clone.willpowerTemplate = willpowerTemplate == null ? null : willpowerTemplate.clone();
return clone;
}
}
|
[
"sandra.sieroux@googlemail.com"
] |
sandra.sieroux@googlemail.com
|
76f931187d5b2ac8337aed4d68aff55d64d2726b
|
30c9dda3b97566da565aa641f96c13a624efcea3
|
/src/main/java/cxsjcj/hdsx/com/view/badgeview/utils/StringUtils.java
|
6c808de890da52f26c625526396343330a6cef36
|
[] |
no_license
|
dawitephrem565/ShoppingMall
|
664039a72e8c298e5998e3321f767600c6c39f5d
|
9b0c7eeb01f4cf57fe82fad55f34d70b14d7cc19
|
refs/heads/master
| 2020-04-03T12:00:09.435686
| 2015-11-08T13:54:17
| 2015-11-08T13:54:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 664
|
java
|
package cxsjcj.hdsx.com.view.badgeview.utils;
import cxsjcj.hdsx.com.view.badgeview.values.IValue;
import cxsjcj.hdsx.com.view.badgeview.values.TextValue;
public class StringUtils {
public static boolean isNumber(IValue value) {
if (value instanceof TextValue) {
CharSequence str = ((TextValue) value).getValue();
return isNumber(str);
} else {
return false;
}
}
public static boolean isNumber(CharSequence str) {
try {
Double.parseDouble(str.toString());
} catch (NumberFormatException nfe) {
return false;
}
return true;
}
}
|
[
"1038127753@qq.com"
] |
1038127753@qq.com
|
f6a93121b3a20e261b35923d2b2cb83bfedd94fc
|
bceba483c2d1831f0262931b7fc72d5c75954e18
|
/src/qubed/corelogicextensions/CREDITFREEZEPIN.java
|
2e80a97ba5089f38ec7672c8adfbe5054ff563fd
|
[] |
no_license
|
Nigel-Qubed/credit-services
|
6e2acfdb936ab831a986fabeb6cefa74f03c672c
|
21402c6d4328c93387fd8baf0efd8972442d2174
|
refs/heads/master
| 2022-12-01T02:36:57.495363
| 2020-08-10T17:26:07
| 2020-08-10T17:26:07
| 285,552,565
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,986
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2020.08.05 at 04:53:09 AM CAT
//
package qubed.corelogicextensions;
import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
/**
* <p>Java class for CREDIT_FREEZE_PIN complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CREDIT_FREEZE_PIN">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="CreditFreezePINValue" type="{http://www.mismo.org/residential/2009/schemas}MISMOValue" minOccurs="0"/>
* <element name="CreditRepositorySourceType" type="{http://www.mismo.org/residential/2009/schemas}CreditRepositorySourceEnum" minOccurs="0"/>
* <element name="CreditRepositorySourceTypeOtherDescription" type="{http://www.mismo.org/residential/2009/schemas}MISMOString" minOccurs="0"/>
* <element name="EXTENSION" type="{http://www.mismo.org/residential/2009/schemas}CREDIT_FREEZE_PIN_EXTENSION" minOccurs="0"/>
* </sequence>
* <attGroup ref="{http://www.w3.org/1999/xlink}MISMOresourceLink"/>
* <attGroup ref="{http://www.mismo.org/residential/2009/schemas}AttributeExtension"/>
* <attribute name="SequenceNumber" type="{http://www.mismo.org/residential/2009/schemas}MISMOSequenceNumber_Base" />
* <anyAttribute processContents='lax'/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CREDIT_FREEZE_PIN", propOrder = {
"creditFreezePINValue",
"creditRepositorySourceType",
"creditRepositorySourceTypeOtherDescription",
"extension"
})
public class CREDITFREEZEPIN {
@XmlElementRef(name = "CreditFreezePINValue", namespace = "http://www.mismo.org/residential/2009/schemas", type = JAXBElement.class, required = false)
protected JAXBElement<MISMOValue> creditFreezePINValue;
@XmlElementRef(name = "CreditRepositorySourceType", namespace = "http://www.mismo.org/residential/2009/schemas", type = JAXBElement.class, required = false)
protected JAXBElement<CreditRepositorySourceEnum> creditRepositorySourceType;
@XmlElementRef(name = "CreditRepositorySourceTypeOtherDescription", namespace = "http://www.mismo.org/residential/2009/schemas", type = JAXBElement.class, required = false)
protected JAXBElement<MISMOString> creditRepositorySourceTypeOtherDescription;
@XmlElement(name = "EXTENSION")
protected CREDITFREEZEPINEXTENSION extension;
@XmlAttribute(name = "SequenceNumber")
protected Integer sequenceNumber;
@XmlAttribute(name = "label", namespace = "http://www.w3.org/1999/xlink")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String label;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Gets the value of the creditFreezePINValue property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link MISMOValue }{@code >}
*
*/
public JAXBElement<MISMOValue> getCreditFreezePINValue() {
return creditFreezePINValue;
}
/**
* Sets the value of the creditFreezePINValue property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link MISMOValue }{@code >}
*
*/
public void setCreditFreezePINValue(JAXBElement<MISMOValue> value) {
this.creditFreezePINValue = value;
}
/**
* Gets the value of the creditRepositorySourceType property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link CreditRepositorySourceEnum }{@code >}
*
*/
public JAXBElement<CreditRepositorySourceEnum> getCreditRepositorySourceType() {
return creditRepositorySourceType;
}
/**
* Sets the value of the creditRepositorySourceType property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link CreditRepositorySourceEnum }{@code >}
*
*/
public void setCreditRepositorySourceType(JAXBElement<CreditRepositorySourceEnum> value) {
this.creditRepositorySourceType = value;
}
/**
* Gets the value of the creditRepositorySourceTypeOtherDescription property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link MISMOString }{@code >}
*
*/
public JAXBElement<MISMOString> getCreditRepositorySourceTypeOtherDescription() {
return creditRepositorySourceTypeOtherDescription;
}
/**
* Sets the value of the creditRepositorySourceTypeOtherDescription property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link MISMOString }{@code >}
*
*/
public void setCreditRepositorySourceTypeOtherDescription(JAXBElement<MISMOString> value) {
this.creditRepositorySourceTypeOtherDescription = value;
}
/**
* Gets the value of the extension property.
*
* @return
* possible object is
* {@link CREDITFREEZEPINEXTENSION }
*
*/
public CREDITFREEZEPINEXTENSION getEXTENSION() {
return extension;
}
/**
* Sets the value of the extension property.
*
* @param value
* allowed object is
* {@link CREDITFREEZEPINEXTENSION }
*
*/
public void setEXTENSION(CREDITFREEZEPINEXTENSION value) {
this.extension = value;
}
/**
* Gets the value of the sequenceNumber property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getSequenceNumber() {
return sequenceNumber;
}
/**
* Sets the value of the sequenceNumber property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setSequenceNumber(Integer value) {
this.sequenceNumber = value;
}
/**
* Gets the value of the label property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLabel() {
return label;
}
/**
* Sets the value of the label property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLabel(String value) {
this.label = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}
|
[
"vectorcrael@yahoo.com"
] |
vectorcrael@yahoo.com
|
44cef44382c18fe5ad621d8790cb61e359897c5e
|
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
|
/spring-security-modules/spring-security-web-mvc-custom/src/main/java/com/surya/web/controller/BankController.java
|
d592345d8bc1ea8e984c04449fec27e0d99d40f0
|
[] |
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
| 1,218
|
java
|
package com.surya.web.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
// to test csrf
@Controller
public class BankController {
private final Logger logger = LoggerFactory.getLogger(getClass());
@RequestMapping(value = "/transfer", method = RequestMethod.GET)
@ResponseBody
public int transfer(@RequestParam("accountNo") final int accountNo, @RequestParam("amount") final int amount) {
logger.info("Transfer to {}", accountNo);
return amount;
}
// write - just for test
@RequestMapping(value = "/transfer", method = RequestMethod.POST)
@ResponseStatus(HttpStatus.OK)
public void create(@RequestParam("accountNo") final int accountNo, @RequestParam("amount") final int amount) {
logger.info("Transfer to {}", accountNo);
}
}
|
[
"suryakanta97@github.com"
] |
suryakanta97@github.com
|
934dc5ed324a505f9bde14ca5f9a2e5f5dafbfc1
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_20e4db79712cb4120b84bc073fa6b0633e8ab5d4/KThreadTest/2_20e4db79712cb4120b84bc073fa6b0633e8ab5d4_KThreadTest_s.java
|
67f2aabb121cee526faeecf0e652bea270ff3426
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,698
|
java
|
package nachos.threads;
import nachos.machine.*;
/**
* A Tester for the KThread class.
* Really, this tests the join() implementation.
*/
public class KThreadTest {
/**
* LoopThread class, which implements a KThread
* that simply prints out numbers in sequence.
*/
private static class LoopThread implements Runnable {
LoopThread(String name, int upTo) {
this.name = name;
this.upTo = upTo;
}
public void run() {
for (int i=0; i<upTo; i++) {
//System.out.println("*** " + name + " looped " + i + " times");
KThread.yield();
}
System.out.println("*** " + name + " done");
}
/* An ID for output purposes */
private String name;
/* The maximum number of iterations */
private int upTo;
}
/**
* JoinThread class, which implements a KThread
* that attempts to join with one or two threads, in sequence.
*/
private static class JoinThread implements Runnable {
JoinThread(String name, KThread thread1, KThread thread2) {
this.name = name;
this.thread1 = thread1;
this.thread2 = thread2;
}
public void run() {
/* Joining with the first thread, if non-null */
if (thread1 != null) {
System.out.println("*** "+name+" joining with "+thread1.toString());
thread1.join();
System.out.println("*** "+name+" joined with "+thread1.toString());
}
/* Joining with the second thread, if non-null */
if (thread1 != null) {
System.out.println("*** "+name+" joining with "+thread2.toString());
thread2.join();
System.out.println("*** "+name+" joined with "+thread2.toString());
}
System.out.println("*** "+name+" done.");
}
/* An ID for output purposes */
private String name;
/* The maximum number of iterations */
private KThread thread1;
private KThread thread2;
}
/**
* Tests whether this module is working.
*/
public static void runTest() {
System.out.println("**** KThread testing begins ****");
/* Create 4 LoopThread, each one looping 3*(i+1) times, so
* that the last create thread loops longer */
KThread loopThreads[] = new KThread[5];
for (int i=0; i < 5; i++) {
loopThreads[i] = new KThread(new LoopThread("loopThread"+3*(i+1),3*(i+1)));
loopThreads[i].setName("loopThread"+3*(i+1));
loopThreads[i].fork();
}
/* Create a JoinThread that waits for loopThread #1
* and then for loopThread #3 */
KThread joinThread1 = new KThread(new JoinThread(
"joinThread #1",loopThreads[1],loopThreads[3]));
joinThread1.setName("joinThread #1");
joinThread1.fork();
/* Create a JoinThread that waits for loopThread #4
* and then for loopThread #2 */
KThread joinThread2 = new KThread(new JoinThread(
"joinThread #2",loopThreads[4],loopThreads[2]));
joinThread2.setName("joinThread #2");
joinThread2.fork();
/* Create a JoinThread that waits for joinThread #1
* and then for loopThread #4 */
KThread joinThread3 = new KThread(new JoinThread(
"joinThread #3",joinThread1,loopThreads[4]));
joinThread3.setName("joinThread #3");
joinThread3.fork();
/* Join with all the above to wait for the end of the testing */
for (int i=0; i < 5; i++) {
loopThreads[i].join();
}
joinThread1.join();
joinThread2.join();
joinThread3.join();
System.out.println("**** KThread testing ends ****");
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
345a8de1866e5bded906ba8d987154c04921e133
|
dec11f09905937042ddc9260eb8325f18f996b10
|
/src/test/subjects/JHD176target/src/CH/ifa/draw/test/standard/SingleFigureEnumeratorTest.java
|
33624a849345287e9b61231516a98428b644fca7
|
[] |
no_license
|
easy-software-ufal/Nimrod
|
b09d45df580fce5811732e1d88314623cd150f17
|
dd7135791636d754d4501124bf9edde7027baa03
|
refs/heads/master
| 2021-09-13T20:08:59.182101
| 2018-05-03T18:26:26
| 2018-05-03T18:26:26
| 105,577,422
| 0
| 1
| null | 2018-02-22T02:20:22
| 2017-10-02T19:44:18
|
Java
|
UTF-8
|
Java
| false
| false
| 4,459
|
java
|
package CH.ifa.draw.test.standard;
import junit.framework.TestCase;
// JUnitDoclet begin import
import CH.ifa.draw.standard.SingleFigureEnumerator;
import CH.ifa.draw.figures.RectangleFigure;
import java.awt.*;
// JUnitDoclet end import
/*
* Generated by JUnitDoclet, a tool provided by
* ObjectFab GmbH under LGPL.
* Please see www.junitdoclet.org, www.gnu.org
* and www.objectfab.de for informations about
* the tool, the licence and the authors.
*/
// JUnitDoclet begin javadoc_class
/**
* TestCase SingleFigureEnumeratorTest is generated by
* JUnitDoclet to hold the tests for SingleFigureEnumerator.
* @see CH.ifa.draw.standard.SingleFigureEnumerator
*/
// JUnitDoclet end javadoc_class
public class SingleFigureEnumeratorTest
// JUnitDoclet begin extends_implements
extends TestCase
// JUnitDoclet end extends_implements
{
// JUnitDoclet begin class
// instance variables, helper methods, ... put them in this marker
CH.ifa.draw.standard.SingleFigureEnumerator singlefigureenumerator = null;
// JUnitDoclet end class
/**
* Constructor SingleFigureEnumeratorTest is
* basically calling the inherited constructor to
* initiate the TestCase for use by the Framework.
*/
public SingleFigureEnumeratorTest(String name) {
// JUnitDoclet begin method SingleFigureEnumeratorTest
super(name);
// JUnitDoclet end method SingleFigureEnumeratorTest
}
/**
* Factory method for instances of the class to be tested.
*/
public CH.ifa.draw.standard.SingleFigureEnumerator createInstance() throws Exception {
// JUnitDoclet begin method testcase.createInstance
return new CH.ifa.draw.standard.SingleFigureEnumerator(new RectangleFigure(new Point(10, 10), new Point(100, 100)));
// JUnitDoclet end method testcase.createInstance
}
/**
* Method setUp is overwriting the framework method to
* prepare an instance of this TestCase for a single test.
* It's called from the JUnit framework only.
*/
protected void setUp() throws Exception {
// JUnitDoclet begin method testcase.setUp
super.setUp();
singlefigureenumerator = createInstance();
// JUnitDoclet end method testcase.setUp
}
/**
* Method tearDown is overwriting the framework method to
* clean up after each single test of this TestCase.
* It's called from the JUnit framework only.
*/
protected void tearDown() throws Exception {
// JUnitDoclet begin method testcase.tearDown
singlefigureenumerator = null;
super.tearDown();
// JUnitDoclet end method testcase.tearDown
}
// JUnitDoclet begin javadoc_method hasNextFigure()
/**
* Method testHasNextFigure is testing hasNextFigure
* @see CH.ifa.draw.standard.SingleFigureEnumerator#hasNextFigure()
*/
// JUnitDoclet end javadoc_method hasNextFigure()
public void testHasNextFigure() throws Exception {
// JUnitDoclet begin method hasNextFigure
// JUnitDoclet end method hasNextFigure
}
// JUnitDoclet begin javadoc_method nextFigure()
/**
* Method testNextFigure is testing nextFigure
* @see CH.ifa.draw.standard.SingleFigureEnumerator#nextFigure()
*/
// JUnitDoclet end javadoc_method nextFigure()
public void testNextFigure() throws Exception {
// JUnitDoclet begin method nextFigure
// JUnitDoclet end method nextFigure
}
// JUnitDoclet begin javadoc_method reset()
/**
* Method testReset is testing reset
* @see CH.ifa.draw.standard.SingleFigureEnumerator#reset()
*/
// JUnitDoclet end javadoc_method reset()
public void testReset() throws Exception {
// JUnitDoclet begin method reset
// JUnitDoclet end method reset
}
// JUnitDoclet begin javadoc_method testVault
/**
* JUnitDoclet moves marker to this method, if there is not match
* for them in the regenerated code and if the marker is not empty.
* This way, no test gets lost when regenerating after renaming.
* <b>Method testVault is supposed to be empty.</b>
*/
// JUnitDoclet end javadoc_method testVault
public void testVault() throws Exception {
// JUnitDoclet begin method testcase.testVault
// JUnitDoclet end method testcase.testVault
}
/**
* Method to execute the TestCase from command line
* using JUnit's textui.TestRunner .
*/
public static void main(String[] args) {
// JUnitDoclet begin method testcase.main
junit.textui.TestRunner.run(SingleFigureEnumeratorTest.class);
// JUnitDoclet end method testcase.main
}
}
|
[
"pmop@ic.ufal.br"
] |
pmop@ic.ufal.br
|
8b582ab9fcc4f458e57446403345b88b8bb000bd
|
dea92fc41db6a97d8cb32b266c399edd3a61989f
|
/source/org.strategoxt.imp.spoofax.generator/src-gen/org/strategoxt/imp/spoofax/generator/lifted9438.java
|
59f668ba5db73b3c8c6ee2b842182ada2c801422
|
[] |
no_license
|
adilakhter/spoofaxlang
|
19170765e690477a79069e05fd473f521d1d1ddc
|
27515280879cc108a3cf2108df00760b6d39e15e
|
refs/heads/master
| 2020-03-17T01:15:18.833754
| 2015-01-22T07:12:05
| 2015-01-22T07:12:05
| 133,145,594
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,105
|
java
|
package org.strategoxt.imp.spoofax.generator;
import org.strategoxt.stratego_lib.*;
import org.strategoxt.stratego_lib.*;
import org.strategoxt.stratego_sglr.*;
import org.strategoxt.stratego_gpp.*;
import org.strategoxt.stratego_xtc.*;
import org.strategoxt.stratego_aterm.*;
import org.strategoxt.stratego_rtg.*;
import org.strategoxt.stratego_sdf.*;
import org.strategoxt.stratego_tool_doc.*;
import org.strategoxt.java_front.*;
import org.strategoxt.lang.*;
import org.spoofax.interpreter.terms.*;
import static org.strategoxt.lang.Term.*;
import org.spoofax.interpreter.library.AbstractPrimitive;
import java.util.ArrayList;
import java.lang.ref.WeakReference;
@SuppressWarnings("all") final class lifted9438 extends Strategy
{
TermReference w_4320;
@Override public IStrategoTerm invoke(Context context, IStrategoTerm term)
{
Fail28641:
{
if(w_4320.value == null)
break Fail28641;
term = set_verbosity_0_0.instance.invoke(context, w_4320.value);
if(term == null)
break Fail28641;
if(true)
return term;
}
return null;
}
}
|
[
"md.adilakhter@gmail.com"
] |
md.adilakhter@gmail.com
|
521efe0f661af59da7d4592dc0791b67525f26ed
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/smallest/769cd811312cbbb82c87033a78ac9584ad282550bcb9cc3ae8c4e3da44c288c1a5b3954e01998c3c0654ee6774ceab66e9fe5b135750905c917d2b0bb5fab98b/004/mutations/33/smallest_769cd811_004.java
|
a69bc3fdddda33b08cc16789a59afd0e4a361a51
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,988
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class smallest_769cd811_004 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
smallest_769cd811_004 mainClass = new smallest_769cd811_004 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj a = new IntObj (), b = new IntObj (), c = new IntObj (), d =
new IntObj (), x = new IntObj ();
output +=
(String.format ("Please enter 4 numbers separated by spaces > "));
a.value = scanner.nextInt ();
b.value = scanner.nextInt ();
c.value = scanner.nextInt ();
d.value = scanner.nextInt ();
if (a.value >= b.value) {
x.value = b.value;
} else {
x.value = a.value;
}
if (b.value >= c.value) {
x.value = c.value;
}
if (c.value >= d.value) {
x.value = d.value;
}
output += (String.format ("%d is the smallest\n", d.value));
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
e1a962b8512c2d726897805a6e0c19746e925bde
|
84e064c973c0cc0d23ce7d491d5b047314fa53e5
|
/latest9.4/hej/net/sf/saxon/trans/RuleTarget.java
|
880655221ad3df20ef6b8cb4fcff3f1520195c47
|
[] |
no_license
|
orbeon/saxon-he
|
83fedc08151405b5226839115df609375a183446
|
250c5839e31eec97c90c5c942ee2753117d5aa02
|
refs/heads/master
| 2022-12-30T03:30:31.383330
| 2020-10-16T15:21:05
| 2020-10-16T15:21:05
| 304,712,257
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,073
|
java
|
package net.sf.saxon.trans;
import net.sf.saxon.trace.ExpressionPresenter;
import java.io.Serializable;
/**
* The target of a rule, typically a Template.
*/
public interface RuleTarget extends Serializable {
/**
* Output diagnostic explanation to an ExpressionPresenter
*/
public void explain(ExpressionPresenter presenter);
}
//
// The contents of this file are subject to the Mozilla Public License Version 1.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.mozilla.org/MPL/
//
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
// See the License for the specific language governing rights and limitations under the License.
//
// The Original Code is: all this file
//
// The Initial Developer of the Original Code is Saxonica Limited.
// Portions created by ___ are Copyright (C) ___. All rights reserved.
//
// Contributor(s):
//
|
[
"oneil@saxonica.com"
] |
oneil@saxonica.com
|
af3fed7e039dba67efda90dc1cb8970d7bfc288a
|
ce975af2263d2dd8312e68c5456445a669be2e28
|
/src/main/java/valandur/webapi/security/SecurityFilter.java
|
bc1b099025ca0e7bf5399b34187c0a9c88587b76
|
[
"MIT"
] |
permissive
|
ancgate/Web-API
|
0939efd61840a0b5ceb3e14ab6e02e5311b85f90
|
c45445ea61079d5f1d9519e597409e9a82d15a28
|
refs/heads/master
| 2020-04-18T08:37:10.142593
| 2018-08-23T10:33:19
| 2018-08-23T10:33:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,198
|
java
|
package valandur.webapi.security;
import com.google.common.net.HttpHeaders;
import org.eclipse.jetty.http.HttpMethod;
import valandur.webapi.WebAPI;
import valandur.webapi.servlet.base.ExplicitDetails;
import valandur.webapi.servlet.base.Permission;
import valandur.webapi.util.TreeNode;
import javax.annotation.Priority;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.*;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.container.ResourceInfo;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.Provider;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicLong;
import static valandur.webapi.security.SecurityService.*;
@Provider
@Priority(Priorities.AUTHENTICATION)
public class SecurityFilter implements ContainerRequestFilter {
private SecurityService srv;
private Map<String, Double> lastCall = new ConcurrentHashMap<>();
private AtomicLong calls = new AtomicLong(0);
@Context
private ResourceInfo resourceInfo;
@Context
private HttpServletRequest request;
@Context
private HttpServletResponse response;
public SecurityFilter() {
this.srv = WebAPI.getSecurityService();
}
@Override
public void filter(ContainerRequestContext context) {
String addr = getRealAddr(request);
String target = context.getUriInfo().getPath();
request.setAttribute("ip", addr);
response.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, ACCESS_CONTROL_ORIGIN);
response.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_METHODS);
response.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS, ACCESS_CONTROL_HEADERS);
// Exit early on options requests
if (HttpMethod.OPTIONS.asString().equalsIgnoreCase(context.getMethod())) {
context.abortWith(Response.ok().build());
return;
}
if (!srv.whitelistContains(addr)) {
WebAPI.getLogger().warn(addr + " is not on whitelist: " + target);
throw new ForbiddenException();
} else if (srv.blacklistContains(addr)) {
WebAPI.getLogger().warn(addr + " is on blacklist: " + target);
throw new ForbiddenException();
}
String key = context.getHeaderString(API_KEY_HEADER);
if (key == null || key.isEmpty()) {
key = context.getUriInfo().getQueryParameters().getFirst("key");
}
if (key == null || key.isEmpty()) {
key = context.getHeaderString(HttpHeaders.AUTHORIZATION);
if (key != null) key = key.substring(key.indexOf(" ") + 1);
}
PermissionStruct permStruct;
if (key != null) {
permStruct = srv.getPermissions(key);
} else {
key = DEFAULT_KEY;
permStruct = srv.getDefaultPermissions();
}
// Add new security context
SecurityContext securityContext = new SecurityContext(permStruct);
context.setSecurityContext(securityContext);
request.setAttribute("security", securityContext);
// Do rate limiting
calls.incrementAndGet();
if (permStruct.getRateLimit() > 0) {
double time = System.nanoTime() / 1000000000d;
if (lastCall.containsKey(key) && time - lastCall.get(key) < 1d / permStruct.getRateLimit()) {
WebAPI.getLogger().warn(addr + " has exceeded the rate limit when requesting " +
request.getRequestURI());
throw new ClientErrorException("Rate limit exceeded", Response.Status.TOO_MANY_REQUESTS);
}
lastCall.put(key, time);
}
boolean details = true;
Method method = resourceInfo.getResourceMethod();
if (method.isAnnotationPresent(ExplicitDetails.class)) {
ExplicitDetails dets = method.getAnnotation(ExplicitDetails.class);
if (dets.value()) {
details = false;
}
}
request.setAttribute("details", details);
String basePath = resourceInfo.getResourceClass().getAnnotation(Path.class).value();
TreeNode perms = permStruct.getPermissions();
Permission[] reqPerms = method.getAnnotationsByType(Permission.class);
if (reqPerms.length == 0) {
return;
}
// Calculate the sub-perms that apply for our endpoint
for (Permission reqPerm : reqPerms) {
if (!reqPerm.autoCheck()) {
continue;
}
List<String> reqPermList = new ArrayList<>(Arrays.asList(reqPerm.value()));
reqPermList.add(0, basePath);
TreeNode methodPerms = SecurityService.subPermissions(perms, reqPermList);
if (!methodPerms.getValue()) {
WebAPI.getLogger().warn(addr + " does not have permisson to access " + target);
if (key.equalsIgnoreCase(DEFAULT_KEY)) {
throw new NotAuthorizedException("Bearer realm=\"Web-API Access\"");
} else {
throw new ForbiddenException();
}
}
// Set the endpoint permissions to the first permissions listed
if (securityContext.getEndpointPerms() == null)
securityContext.setEndpointPerms(methodPerms);
}
}
private String getRealAddr(HttpServletRequest request) {
final String addr = request.getRemoteAddr();
String forwardedFor = request.getHeader(HttpHeaders.X_FORWARDED_FOR);
if (forwardedFor == null)
return addr;
// First check the actual IP that we got. If that is not a trusted proxy we're done.
if (!srv.containsProxyIP(addr)) {
WebAPI.getLogger().warn(addr + " sent " + HttpHeaders.X_FORWARDED_FOR +
" header, but is not a proxy. Header will be ignored!");
return addr;
}
String[] ips = forwardedFor.split(",");
// Traverse the X-Forwarded-For header backwards and take the first IP that we don't trust.
for (int i = ips.length - 1; i >= 0; i--) {
String ip = ips[i].trim();
if (srv.containsProxyIP(ip)) {
continue;
}
if (i > 0) {
WebAPI.getLogger().warn(ips[i].trim() + " sent " + HttpHeaders.X_FORWARDED_FOR +
" header, but is not a proxy. Header will be ignored!");
}
return ips[i];
}
// We usually shouldn't get here, but if we don't it means we trusted all proxy ips, so just
// return the last one of those.
return ips[ips.length - 1];
}
}
|
[
"inithilian@gmail.com"
] |
inithilian@gmail.com
|
c818907a15284e9628d88b1477e6343580165e18
|
9ccf99159f3bbd0789a0de9e518955f33ff05efd
|
/easycode-auth-core/src/main/java/com/easycodebox/auth/core/util/CodeMsgExt.java
|
6d882817c797ce8e879e0ad0b7717e69a35b02ec
|
[
"Apache-2.0"
] |
permissive
|
swyl/easycode
|
71aa824cd82e0a08eabe0da6e3f1961778b0e12d
|
1d514796668d96ed1ec71203f7c4e4098e284641
|
refs/heads/master
| 2021-01-23T22:31:10.777845
| 2017-03-09T09:24:43
| 2017-03-09T09:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,338
|
java
|
package com.easycodebox.auth.core.util;
import com.easycodebox.common.error.CodeMsg;
import com.easycodebox.common.file.PropertiesPool;
import com.easycodebox.common.lang.Symbol;
import java.io.File;
/**
* @author WangXiaoJin
*
*/
public class CodeMsgExt extends CodeMsg {
public static CodeMsg PARAM_ERR = new CodeMsgExt("1002", "{0}ๅๆฐ้่ฏฏ");
public static CodeMsg PARAM_BLANK = new CodeMsgExt("1003", "{0}ๅๆฐไธ่ฝไธบ็ฉบ");
public static CodeMsg EXISTS = new CodeMsgExt("2001", "{0}ๅทฒๅญๅจ");
private static final String FILE_PATH = "/code-msg.properties";
static {
PropertiesPool.loadPropertiesFile(FILE_PATH);
}
protected CodeMsgExt(String code, String msg) {
super(code, msg);
}
public static void main(String[] args) throws Exception {
/* ------------ ็ๆpropertiesๆไปถ BEGIN -------------- */
File file = new File("src/main/resources" + (FILE_PATH.startsWith(Symbol.SLASH) ? "" : Symbol.SLASH) + FILE_PATH);
CodeMsgs.storePropertiesFile(CodeMsgExt.class, file);
/* ------------ ็ๆpropertiesๆไปถ END ---------------- */
CodeMsg code = CodeMsgExt.NONE;
System.out.println(code.getMsg());
CodeMsg xx = code.msg("XXXXXXXXXXx");
System.out.println(code.getMsg());
System.out.println(xx.getMsg());
System.out.println(CodeMsgExt.NONE.getMsg());
}
}
|
[
"381954728@qq.com"
] |
381954728@qq.com
|
41fcec09fc54b8cebf4e0f22cb72b7488b371f27
|
03d61086047f041168f9a77b02a63a9af83f0f3f
|
/newrelic/src/main/java/com/newrelic/agent/deps/org/yaml/snakeyaml/reader/UnicodeReader.java
|
039372946e558bbda0f012ccac624c70836f839b
|
[] |
no_license
|
masonmei/mx2
|
fa53a0b237c9e2b5a7c151999732270b4f9c4f78
|
5a4adc268ac1e52af1adf07db7a761fac4c83fbf
|
refs/heads/master
| 2021-01-25T10:16:14.807472
| 2015-07-30T21:49:33
| 2015-07-30T21:49:35
| 39,944,476
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,851
|
java
|
//
// Decompiled by Procyon v0.5.29
//
package com.newrelic.agent.deps.org.yaml.snakeyaml.reader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PushbackInputStream;
import java.io.Reader;
public class UnicodeReader extends Reader
{
PushbackInputStream internalIn;
InputStreamReader internalIn2;
private static final int BOM_SIZE = 3;
public UnicodeReader(final InputStream in) {
this.internalIn2 = null;
this.internalIn = new PushbackInputStream(in, 3);
}
public String getEncoding() {
return this.internalIn2.getEncoding();
}
protected void init() throws IOException {
if (this.internalIn2 != null) {
return;
}
final byte[] bom = new byte[3];
final int n = this.internalIn.read(bom, 0, bom.length);
String encoding;
int unread;
if (bom[0] == -17 && bom[1] == -69 && bom[2] == -65) {
encoding = "UTF-8";
unread = n - 3;
}
else if (bom[0] == -2 && bom[1] == -1) {
encoding = "UTF-16BE";
unread = n - 2;
}
else if (bom[0] == -1 && bom[1] == -2) {
encoding = "UTF-16LE";
unread = n - 2;
}
else {
encoding = "UTF-8";
unread = n;
}
if (unread > 0) {
this.internalIn.unread(bom, n - unread, unread);
}
this.internalIn2 = new InputStreamReader(this.internalIn, encoding);
}
public void close() throws IOException {
this.init();
this.internalIn2.close();
}
public int read(final char[] cbuf, final int off, final int len) throws IOException {
this.init();
return this.internalIn2.read(cbuf, off, len);
}
}
|
[
"dongxu.m@gmail.com"
] |
dongxu.m@gmail.com
|
cd8b7a380490624ff17fcefd3f0baa58b1753af5
|
dbe59da45f4cee95debb721141aeab16f44b4cac
|
/src/main/java/com/syuesoft/sell/model/XsSuppliertraderAccount.java
|
802a995df33a398d4cd8a25f80022d7aa1fb7157
|
[] |
no_license
|
tonyliu830204/UESoft
|
5a8a546107f2093ee920facf6d93eedd1affd248
|
9dd48ff19f40556d1892688f6426e4bfe68c7d10
|
refs/heads/master
| 2021-01-23T15:51:00.782632
| 2014-03-26T15:56:46
| 2014-03-26T15:56:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,303
|
java
|
package com.syuesoft.sell.model;
import java.sql.Timestamp;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
/**
* XsSuppliertraderAccount entity. @author MyEclipse Persistence Tools
*/
public class XsSuppliertraderAccount implements java.io.Serializable {
// Fields
private Integer enterpriseId;
private Integer accountId;
private String accountCode;
private String remark;
private Integer instorehouseId;
private Integer accountPerson;
private Date accountDate;
private Double accountSun;
private Double accountBalance;
private Double accountMoney;
private Integer accountType;
private Set xsSupplierAccountlogs = new HashSet(0);
// Constructors
/** default constructor */
public XsSuppliertraderAccount() {
}
/** full constructor */
public XsSuppliertraderAccount(String accountCode, Integer instorehouseId,
Integer accountPerson, Timestamp accountDate, Double accountSun,
Double accountBalance, Double accountMoney, Integer accountType,
Set xsSupplierAccountlogs) {
this.accountCode = accountCode;
this.instorehouseId = instorehouseId;
this.accountPerson = accountPerson;
this.accountDate = accountDate;
this.accountSun = accountSun;
this.accountBalance = accountBalance;
this.accountMoney = accountMoney;
this.accountType = accountType;
this.xsSupplierAccountlogs = xsSupplierAccountlogs;
}
// Property accessors
public Integer getAccountId() {
return this.accountId;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public void setAccountId(Integer accountId) {
this.accountId = accountId;
}
public String getAccountCode() {
return this.accountCode;
}
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
public Integer getInstorehouseId() {
return this.instorehouseId;
}
public void setInstorehouseId(Integer instorehouseId) {
this.instorehouseId = instorehouseId;
}
public Integer getAccountPerson() {
return this.accountPerson;
}
public void setAccountPerson(Integer accountPerson) {
this.accountPerson = accountPerson;
}
public Date getAccountDate() {
return this.accountDate;
}
public void setAccountDate(Date accountDate) {
this.accountDate = accountDate;
}
public Double getAccountSun() {
return this.accountSun;
}
public void setAccountSun(Double accountSun) {
this.accountSun = accountSun;
}
public Double getAccountBalance() {
return this.accountBalance;
}
public void setAccountBalance(Double accountBalance) {
this.accountBalance = accountBalance;
}
public Double getAccountMoney() {
return this.accountMoney;
}
public void setAccountMoney(Double accountMoney) {
this.accountMoney = accountMoney;
}
public Integer getAccountType() {
return this.accountType;
}
public void setAccountType(Integer accountType) {
this.accountType = accountType;
}
public Set getXsSupplierAccountlogs() {
return this.xsSupplierAccountlogs;
}
public void setXsSupplierAccountlogs(Set xsSupplierAccountlogs) {
this.xsSupplierAccountlogs = xsSupplierAccountlogs;
}
}
|
[
"liweinan0423@gmail.com"
] |
liweinan0423@gmail.com
|
875b0e4072418106920a3143a2a6a4365840c198
|
018adaf5f1e17065845e1b8fcad32e7c3eab74c6
|
/paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/mapper/UacGroupUserMapper.java
|
f9674552845a002f60998cefd22da15ab5eb83d3
|
[] |
no_license
|
wangwuuw/surpermarket
|
e367f4daf9581acb48abf9c415ce718fb6b3e5ef
|
5f0a1b7643d6bbfe276937eafbb99c5bc887100d
|
refs/heads/master
| 2020-04-28T15:12:43.642801
| 2019-03-13T07:54:43
| 2019-03-13T07:54:43
| 175,364,625
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,916
|
java
|
/*
* Copyright (c) 2018. paascloud.net All Rights Reserved.
* ้กน็ฎๅ็งฐ๏ผpaascloudๅฟซ้ๆญๅปบไผไธ็บงๅๅธๅผๅพฎๆๅกๅนณๅฐ
* ็ฑปๅ็งฐ๏ผUacGroupUserMapper.java
* ๅๅปบไบบ๏ผๅๅ
ๆ
* ่็ณปๆนๅผ๏ผpaascloud.net@gmail.com
* ๅผๆบๅฐๅ: https://github.com/paascloud
* ๅๅฎขๅฐๅ: http://blog.paascloud.net
* ้กน็ฎๅฎ็ฝ: http://paascloud.net
*/
package com.paascloud.provider.mapper;
import com.paascloud.core.mybatis.MyMapper;
import com.paascloud.provider.model.domain.UacGroup;
import com.paascloud.provider.model.domain.UacGroupUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* The interface Uac group user mapper.
*
* @author paascloud.net@gmail.com
*/
@Mapper
@Component
public interface UacGroupUserMapper extends MyMapper<UacGroupUser> {
/**
* Query by user id uac group user.
*
* @param userId the user id
*
* @return the uac group user
*/
UacGroupUser getByUserId(Long userId);
/**
* Update by user id int.
*
* @param uacGroupUser the uac group user
*
* @return the int
*/
int updateByUserId(UacGroupUser uacGroupUser);
/**
* Select group list by user id list.
*
* @param userId the user id
*
* @return the list
*/
List<UacGroup> selectGroupListByUserId(Long userId);
/**
* List by group id list.
*
* @param groupId the group id
*
* @return the list
*/
List<UacGroupUser> listByGroupId(@Param("groupId") Long groupId);
/**
* Delete exclude super mng int.
*
* @param groupId the group id
* @param superManagerRoleId the super manager role id
*
* @return the int
*/
int deleteExcludeSuperMng(@Param("currentGroupId") Long groupId, @Param("superManagerRoleId") Long superManagerRoleId);
}
|
[
"wangwu123mtr@sina.com"
] |
wangwu123mtr@sina.com
|
089fb41b1ee418876d8d1cac9cf3f84cec873452
|
e723dd5f7cdda19ee80c4ce82e8394296c43706d
|
/ontrack-extension/ontrack-extension-svn/src/main/java/net/ontrack/extension/svn/dao/jdbc/IssueRevisionJdbcDao.java
|
f31246abde84eeccc0eedb3bb5882d8d7c5cb1b6
|
[
"MIT"
] |
permissive
|
cpf/ontrack
|
9422a89b15238194c9ba05b78bbc6d0a4afcad8f
|
15a1d66c2841f964fd4cbc612c62c806631399d2
|
refs/heads/master
| 2021-01-18T08:55:47.368338
| 2014-01-31T10:52:31
| 2014-01-31T10:52:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,441
|
java
|
package net.ontrack.extension.svn.dao.jdbc;
import net.ontrack.dao.AbstractJdbcDao;
import net.ontrack.extension.svn.dao.IssueRevisionDao;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.sql.DataSource;
import java.util.List;
@Component
public class IssueRevisionJdbcDao extends AbstractJdbcDao implements IssueRevisionDao {
private static final int ISSUE_KEY_MAX_LENGTH = 20;
private final Logger logger = LoggerFactory.getLogger(IssueRevisionDao.class);
@Autowired
public IssueRevisionJdbcDao(DataSource dataSource) {
super(dataSource);
}
@Override
@Transactional
public void link(long revision, String key) {
if (StringUtils.isBlank(key)) {
logger.warn("Cannot insert a null or blank key (revision {})", revision);
} else if (key.length() > ISSUE_KEY_MAX_LENGTH) {
logger.warn("Cannot insert a key longer than {} characters: {} for revision {}", ISSUE_KEY_MAX_LENGTH, key, revision);
} else {
getNamedParameterJdbcTemplate().update(
"INSERT INTO REVISION_ISSUE (REVISION, ISSUE) VALUES (:revision, :key)",
params("revision", revision).addValue("key", key));
}
}
@Override
@Transactional(readOnly = true)
public List<String> findIssuesByRevision(long revision) {
return getNamedParameterJdbcTemplate().queryForList(
"SELECT ISSUE FROM REVISION_ISSUE WHERE REVISION = :revision ORDER BY ISSUE",
params("revision", revision),
String.class
);
}
@Override
@Transactional(readOnly = true)
public boolean isIndexed(String key) {
return getFirstItem(
"SELECT ISSUE FROM REVISION_ISSUE WHERE ISSUE = :key",
params("key", key),
String.class) != null;
}
@Override
@Transactional(readOnly = true)
public List<Long> findRevisionsByIssue(String key) {
return getNamedParameterJdbcTemplate().queryForList(
"SELECT REVISION FROM REVISION_ISSUE WHERE ISSUE = :key ORDER BY REVISION DESC",
params("key", key),
Long.class);
}
}
|
[
"damien.coraboeuf@gmail.com"
] |
damien.coraboeuf@gmail.com
|
8bf28e0cb670bcff82e29fd48545d91e15e6478a
|
2177f9092108d66d6b1c80cc503fcb2aba708519
|
/src/cn/edustar/usermgr/service/impl/UserServiceImpl.java
|
d24717f13523af9f61e8026f3cb418c4f18b7461
|
[] |
no_license
|
yxxcrtd/UserMgr2_branches
|
6b05705e2b0423711928883993ecdaef32069943
|
c4a4ad90b174b1f4731791e1f6054c0992f50082
|
refs/heads/master
| 2020-05-31T20:21:48.195613
| 2019-06-05T22:01:06
| 2019-06-05T22:01:06
| 190,474,498
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,148
|
java
|
package cn.edustar.usermgr.service.impl;
import java.util.Date;
import cn.edustar.usermgr.pojos.Ticket;
import cn.edustar.usermgr.pojos.User;
import cn.edustar.usermgr.service.UserService;
import cn.edustar.usermgr.service.impl.base.BaseServiceImpl;
import cn.edustar.usermgr.util.MD5;
/**
* UserService
*
* @author Yang XinXin
* @version 2.0.0, 2010-09-02 11:03:12
*/
public class UserServiceImpl extends BaseServiceImpl implements UserService {
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#getUserByQueryString(java.lang.String)
*/
public User getUserByQueryString(String queryString) {
if (queryString.contains("@")) {
return userDao.getUserByQueryString("email", queryString);
} else {
return userDao.getUserByQueryString("username", queryString);
}
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#getUserCounts()
*/
public int getUserCounts() {
return userDao.getUserCounts();
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#createUserTicket(java.lang.String)
*/
public Ticket createUserTicket(String username) {
Ticket ticket = new Ticket(username);
HASHMAP_TICKET.put(ticket.getTicket(), ticket);
return ticket;
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#saveOrUpdate(cn.edustar.usermgr.pojos.User)
*/
public void saveOrUpdate(User user) {
userDao.saveOrUpdate(user);
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#getUserByUserTicket(java.lang.String)
*/
public User getUserByUserTicket(String userTicket) {
if (null == userTicket || "".equals(userTicket)
|| userTicket.length() == 0) {
return null;
}
Ticket ticket = getTicketByUserTicket(userTicket);
if (null == ticket) {
return null;
}
if (null == ticket.getUsername() || "".equals(ticket.getUsername())
|| ticket.getUsername().length() < 0) {
return null;
}
ticket.setLastAccessed(new Date());
return getUserByQueryString(ticket.getUsername());
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#getTicketByUserTicket(java.lang.String)
*/
public Ticket getTicketByUserTicket(String userTicket) {
Ticket ticket = HASHMAP_TICKET.get(userTicket);
if (null != ticket) {
if (null == ticket.getLastAccessed()) {
return null;
}
}
return ticket;
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#verifyUser(java.lang.String)
*/
public String verifyUser(String username) {
User user = getUserByQueryString(username);
if (null != user) {
if (null == user.getQuestion() || "".equals(user.getQuestion())) {
return NULL;
}
return user.getQuestion();
} else {
return ERROR;
}
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#verifyAnswer(java.lang.String, java.lang.String)
*/
public String verifyAnswer(String username, String answer) {
User user = getUserByQueryString(username);
if (null != user) {
if (user.getAnswer().equals(MD5.toMD5(answer))) {
return SUCCESS;
} else {
return ERROR;
}
} else {
return "";
}
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#resetPassword(java.lang.String, java.lang.String)
*/
public String resetPassword(String username, String password) {
User user = getUserByQueryString(username);
if (null != user) {
user.setPassword(MD5.toMD5(password));
userDao.saveOrUpdate(user);
return SUCCESS;
} else {
return "";
}
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#updatePasswordByUsername(java.lang.String, java.lang.String)
*/
public void updatePasswordByUsername(String username, String password) {
userDao.updatePasswordByUsername(username, MD5.toMD5(password));
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#updateUserInfoByUsername(java.lang.String, int)
*/
public void updateUserInfoByUsername(String username, String trueName, String email, int role) {
userDao.updateUserInfoByUsername(username, trueName, email, role);
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#resetQuestionAndAnswerByUsername(java.lang.String, java.lang.String, java.lang.String)
*/
public void resetQuestionAndAnswerByUsername(String username, String question, String answer) {
userDao.resetQuestionAndAnswerByUsername(username, question, MD5.toMD5(answer));
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#updateStatusByUsername(java.lang.String, int)
*/
public void updateStatusByUsername(String username, int status) {
userDao.updateStatusByUsername(username, status);
}
/* (non-Javadoc)
*
* @see cn.edustar.usermgr.service.UserService#deleteUser(java.lang.String)
*/
public void deleteUser(String username) {
if (!"".equals(username) || null != username) {
userDao.deleteUser(getUserByQueryString(username));
}
}
}
|
[
"yxxcrtd@gmail.com"
] |
yxxcrtd@gmail.com
|
9cb337273ee152174dbfa0090467898cbdc6996e
|
1a4770c215544028bad90c8f673ba3d9e24f03ad
|
/second/quark/src/main/java/com/airbnb/lottie/ax.java
|
99f0b227ca0fe2297b9c1cf8aa7e1a0471a5a743
|
[] |
no_license
|
zhang1998/browser
|
e480fbd6a43e0a4886fc83ea402f8fbe5f7c7fce
|
4eee43a9d36ebb4573537eddb27061c67d84c7ba
|
refs/heads/master
| 2021-05-03T06:32:24.361277
| 2018-02-10T10:35:36
| 2018-02-10T10:35:36
| 120,590,649
| 8
| 10
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 592
|
java
|
package com.airbnb.lottie;
import android.graphics.PointF;
import org.json.JSONArray;
import org.json.JSONObject;
/* compiled from: ProGuard */
final class ax implements ay<PointF> {
static final ax a = new ax();
private ax() {
}
public final /* synthetic */ Object a(Object obj, float f) {
if (obj instanceof JSONArray) {
return bb.a((JSONArray) obj, f);
}
if (obj instanceof JSONObject) {
return bb.a((JSONObject) obj, f);
}
throw new IllegalArgumentException("Unable to parse point from " + obj);
}
}
|
[
"2764207312@qq.com"
] |
2764207312@qq.com
|
464c5c8e8a9429f0790d660832ea68318ef56987
|
3955f3bc4b1e9c41ffabb34fcdbfbfb3a8b2f77c
|
/bizcore/WEB-INF/youbenben_core_src/com/youbenben/youbenben/retailstoreinvestmentinvitation/RetailStoreInvestmentInvitationMapper.java
|
1852662f010b0039eddcf87bce41b4230665efd9
|
[] |
no_license
|
1342190832/youbenben
|
c9ba34117b30988419d4d053a35960f35cd2c3f0
|
f68fb29f17ff4f74b0de071fe11bc9fb10fd8744
|
refs/heads/master
| 2022-04-25T10:17:48.674515
| 2020-04-25T14:22:40
| 2020-04-25T14:22:40
| 258,133,780
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,230
|
java
|
package com.youbenben.youbenben.retailstoreinvestmentinvitation;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;
import java.math.BigDecimal;
import com.youbenben.youbenben.BaseRowMapper;
public class RetailStoreInvestmentInvitationMapper extends BaseRowMapper<RetailStoreInvestmentInvitation>{
protected RetailStoreInvestmentInvitation internalMapRow(ResultSet rs, int rowNumber) throws SQLException{
RetailStoreInvestmentInvitation retailStoreInvestmentInvitation = getRetailStoreInvestmentInvitation();
setId(retailStoreInvestmentInvitation, rs, rowNumber);
setComment(retailStoreInvestmentInvitation, rs, rowNumber);
setVersion(retailStoreInvestmentInvitation, rs, rowNumber);
return retailStoreInvestmentInvitation;
}
protected RetailStoreInvestmentInvitation getRetailStoreInvestmentInvitation(){
return new RetailStoreInvestmentInvitation();
}
protected void setId(RetailStoreInvestmentInvitation retailStoreInvestmentInvitation, ResultSet rs, int rowNumber) throws SQLException{
//there will be issue when the type is double/int/long
String id = rs.getString(RetailStoreInvestmentInvitationTable.COLUMN_ID);
if(id == null){
//do nothing when nothing found in database
return;
}
retailStoreInvestmentInvitation.setId(id);
}
protected void setComment(RetailStoreInvestmentInvitation retailStoreInvestmentInvitation, ResultSet rs, int rowNumber) throws SQLException{
//there will be issue when the type is double/int/long
String comment = rs.getString(RetailStoreInvestmentInvitationTable.COLUMN_COMMENT);
if(comment == null){
//do nothing when nothing found in database
return;
}
retailStoreInvestmentInvitation.setComment(comment);
}
protected void setVersion(RetailStoreInvestmentInvitation retailStoreInvestmentInvitation, ResultSet rs, int rowNumber) throws SQLException{
//there will be issue when the type is double/int/long
Integer version = rs.getInt(RetailStoreInvestmentInvitationTable.COLUMN_VERSION);
if(version == null){
//do nothing when nothing found in database
return;
}
retailStoreInvestmentInvitation.setVersion(version);
}
}
|
[
"1342190832@qq.com"
] |
1342190832@qq.com
|
139c33c47259df6385e08931485035f0dc5e822d
|
b991b1eb27db9e6c81e3a477d1911ef29b446c7a
|
/src/main/java/com/yichen/jwtauthentication/controller/AuthRestAPIs.java
|
da087620e36d6caa3a5218d3bd4d8c3ced217d0f
|
[] |
no_license
|
yichenliang/Todo_Backend
|
90caa7cf8691db3765eb7db170c1412aa825f9d3
|
7d771736719825cb199dd1b8d3bb4be096eed500
|
refs/heads/master
| 2020-04-28T01:33:13.786082
| 2019-03-10T18:21:33
| 2019-03-10T18:21:33
| 174,777,924
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,151
|
java
|
package com.yichen.jwtauthentication.controller;
import java.util.HashSet;
import java.util.Set;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yichen.jwtauthentication.message.request.LoginForm;
import com.yichen.jwtauthentication.message.request.SignUpForm;
import com.yichen.jwtauthentication.message.response.JwtResponse;
import com.yichen.jwtauthentication.message.response.ResponseMessage;
import com.yichen.jwtauthentication.model.Role;
import com.yichen.jwtauthentication.model.RoleName;
import com.yichen.jwtauthentication.model.User;
import com.yichen.jwtauthentication.repository.RoleRepository;
import com.yichen.jwtauthentication.repository.UserRepository;
import com.yichen.jwtauthentication.security.jwt.JwtProvider;
@CrossOrigin(origins = "*", maxAge = 3600)
@RestController
@RequestMapping("/api/auth")
public class AuthRestAPIs {
@Autowired
AuthenticationManager authenticationManager;
@Autowired
UserRepository userRepository;
@Autowired
RoleRepository roleRepository;
@Autowired
PasswordEncoder encoder;
@Autowired
JwtProvider jwtProvider;
@PostMapping("/signin")
public ResponseEntity<?> authenticateUser(@Valid @RequestBody LoginForm loginRequest) {
Authentication authentication = authenticationManager.authenticate(
new UsernamePasswordAuthenticationToken(loginRequest.getUsername(), loginRequest.getPassword()));
SecurityContextHolder.getContext().setAuthentication(authentication);
String jwt = jwtProvider.generateJwtToken(authentication);
UserDetails userDetails = (UserDetails) authentication.getPrincipal();
return ResponseEntity.ok(new JwtResponse(jwt, userDetails.getUsername(), userDetails.getAuthorities()));
}
@PostMapping("/signup")
public ResponseEntity<?> registerUser(@Valid @RequestBody SignUpForm signUpRequest) {
if (userRepository.existsByUsername(signUpRequest.getUsername())) {
return new ResponseEntity<>(new ResponseMessage("Fail -> Username is already taken!"),
HttpStatus.BAD_REQUEST);
}
if (userRepository.existsByEmail(signUpRequest.getEmail())) {
return new ResponseEntity<>(new ResponseMessage("Fail -> Email is already in use!"),
HttpStatus.BAD_REQUEST);
}
// Creating user's account
User user = new User(signUpRequest.getName(), signUpRequest.getUsername(), signUpRequest.getEmail(),
encoder.encode(signUpRequest.getPassword()));
Set<String> strRoles = signUpRequest.getRole();
Set<Role> roles = new HashSet<>();
strRoles.forEach(role -> {
switch (role) {
case "admin":
Role adminRole = roleRepository.findByName(RoleName.ROLE_ADMIN)
.orElseThrow(() -> new RuntimeException("Fail! -> Cause: User Role not find."));
roles.add(adminRole);
break;
case "pm":
Role pmRole = roleRepository.findByName(RoleName.ROLE_PM)
.orElseThrow(() -> new RuntimeException("Fail! -> Cause: User Role not find."));
roles.add(pmRole);
break;
default:
Role userRole = roleRepository.findByName(RoleName.ROLE_USER)
.orElseThrow(() -> new RuntimeException("Fail! -> Cause: User Role not find."));
roles.add(userRole);
}
});
user.setRoles(roles);
userRepository.save(user);
return new ResponseEntity<>(new ResponseMessage("User registered successfully!"), HttpStatus.OK);
}
}
|
[
"yichenliang@ufl.edu"
] |
yichenliang@ufl.edu
|
fe579cc836357e2c2c54ee601e363265af8f4105
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/elastic--elasticsearch/610ce078fb3c84c47d6d32aff7d77ba850e28f9d/before/IndexFieldDataCache.java
|
573d66056057fb95eb03d149711c1a492d038bbd
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,773
|
java
|
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch 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.elasticsearch.index.fielddata;
import org.apache.lucene.index.AtomicReaderContext;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.util.Accountable;
import org.elasticsearch.index.mapper.FieldMapper;
/**
* A simple field data cache abstraction on the *index* level.
*/
public interface IndexFieldDataCache {
<FD extends AtomicFieldData, IFD extends IndexFieldData<FD>> FD load(AtomicReaderContext context, IFD indexFieldData) throws Exception;
<FD extends AtomicFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(final IndexReader indexReader, final IFD indexFieldData) throws Exception;
/**
* Clears all the field data stored cached in on this index.
*/
void clear();
/**
* Clears all the field data stored cached in on this index for the specified field name.
*/
void clear(String fieldName);
void clear(Object coreCacheKey);
interface Listener {
void onLoad(FieldMapper.Names fieldNames, FieldDataType fieldDataType, Accountable ramUsage);
void onUnload(FieldMapper.Names fieldNames, FieldDataType fieldDataType, boolean wasEvicted, long sizeInBytes);
}
class None implements IndexFieldDataCache {
@Override
public <FD extends AtomicFieldData, IFD extends IndexFieldData<FD>> FD load(AtomicReaderContext context, IFD indexFieldData) throws Exception {
return indexFieldData.loadDirect(context);
}
@Override
@SuppressWarnings("unchecked")
public <FD extends AtomicFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(IndexReader indexReader, IFD indexFieldData) throws Exception {
return (IFD) indexFieldData.localGlobalDirect(indexReader);
}
@Override
public void clear() {
}
@Override
public void clear(String fieldName) {
}
@Override
public void clear(Object coreCacheKey) {
}
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
b4c9f5cc6a2940c66bdff9f908265296bc843d8c
|
abf09f42e594f943927530d4d7dbd08dda436de5
|
/allPattern/src/patternDemo/PatternDemo24.java
|
587ae85af41c74c4434329933e4cebc04182350b
|
[] |
no_license
|
mortozafsti/Jsp-Web-Project
|
e232148120b026a8eeb87fa3b2582e36c356e0fc
|
3920d6a4d9161609a2dc9030ba901728363e5423
|
refs/heads/master
| 2022-12-02T19:33:56.584746
| 2019-09-23T08:06:55
| 2019-09-23T08:06:55
| 160,851,448
| 0
| 0
| null | 2022-11-24T09:19:21
| 2018-12-07T16:53:00
|
Java
|
UTF-8
|
Java
| false
| false
| 480
|
java
|
package patternDemo;
public class PatternDemo24 {
public static void main(String[] args) {
int row = 4, col = 7;
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
if (i == 0 || j == 0 || i == row - 1 || j == col - 1) {
System.out.print("0");
} else {
System.out.print("1");
}
}
System.out.println("");
}
}
}
|
[
"mortozafsti@gmail.com"
] |
mortozafsti@gmail.com
|
584b0fe843362ffdfe4091b10803dea564442c1c
|
ddce3c1d623fc6887e288a4e5fa022abd2707761
|
/src/com/MCAAlgorithm/bigshua/class34/Problem_0348_DesignTicTacToe.java
|
c013d102289643fd1b10ce98fd3979f672912c96
|
[] |
no_license
|
tjzhaomengyi/DataStructure-java
|
e1632758761ab66f58dee6f84d81ac101d2a3289
|
7f1a95bd2918ea7a4763df7858d1ea28e538698d
|
refs/heads/master
| 2023-07-07T19:09:21.349154
| 2023-06-27T02:59:12
| 2023-06-27T02:59:12
| 81,512,160
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,115
|
java
|
package com.MCAAlgorithm.bigshua.class34;
public class Problem_0348_DesignTicTacToe {
class TicTacToe {
private int[][] rows;
private int[][] cols;
private int[] leftUp;
private int[] rightUp;
private boolean[][] matrix;
private int N;
public TicTacToe(int n) {
// rows[a][1] : 1่ฟไธชไบบ๏ผๅจa่กไธ๏ผไธไบๅ ไธช
// rows[b][2] : 2่ฟไธชไบบ๏ผๅจb่กไธ๏ผไธไบๅ ไธช
rows = new int[n][3]; //0 1 2
cols = new int[n][3];
// leftUp[2] = 7 : 2่ฟไธชไบบ๏ผๅจๅทฆๅฏน่ง็บฟไธ๏ผไธไบ7ไธช
leftUp = new int[3];
// rightUp[1] = 9 : 1่ฟไธชไบบ๏ผๅจๅณๅฏน่ง็บฟไธ๏ผไธไบ9ไธช
rightUp = new int[3];
matrix = new boolean[n][n];
N = n;
}
public int move(int row, int col, int player) {
if (matrix[row][col]) {
return 0;
}
matrix[row][col] = true;
rows[row][player]++;
cols[col][player]++;
if (row == col) {
leftUp[player]++;
}
if (row + col == N - 1) {
rightUp[player]++;
}
if (rows[row][player] == N || cols[col][player] == N || leftUp[player] == N || rightUp[player] == N) {
return player;
}
return 0;
}
}
}
|
[
"tjzhaomengyi@163.com"
] |
tjzhaomengyi@163.com
|
6c533847e45fbc1e953a915c445e83bcec1e6e23
|
a36dce4b6042356475ae2e0f05475bd6aed4391b
|
/2005/julypersistence2EJB/ejbModule/com/hps/july/persistence2/EtapDocKey.java
|
b43ea1b71d01cef59e1075df9a8a93242c82c3e3
|
[] |
no_license
|
ildar66/WSAD_NRI
|
b21dbee82de5d119b0a507654d269832f19378bb
|
2a352f164c513967acf04d5e74f36167e836054f
|
refs/heads/master
| 2020-12-02T23:59:09.795209
| 2017-07-01T09:25:27
| 2017-07-01T09:25:27
| 95,954,234
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 958
|
java
|
package com.hps.july.persistence2;
public class EtapDocKey implements java.io.Serializable {
private final static long serialVersionUID = 3206093459760846163L;
public int sitedoc;
/**
* Default constructor
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
public EtapDocKey() {
super();
}
/**
* Initialize a key from the passed values
* @param argSitedoc int
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
public EtapDocKey(int argSitedoc) {
sitedoc = argSitedoc;
}
/**
* equals method
* @return boolean
* @param o java.lang.Object
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
public boolean equals(Object o) {
if (o instanceof EtapDocKey) {
EtapDocKey otherKey = (EtapDocKey) o;
return (((this.sitedoc == otherKey.sitedoc)));
}
else
return false;
}
/**
* hashCode method
* @return int
*/
/* WARNING: THIS METHOD WILL BE REGENERATED. */
public int hashCode() {
return ((new java.lang.Integer(sitedoc).hashCode()));
}
}
|
[
"ildar66@inbox.ru"
] |
ildar66@inbox.ru
|
0942683b9b067b71e6e438e2f1706331933b10a0
|
611b2f6227b7c3b4b380a4a410f357c371a05339
|
/src/main/java/cn/xports/baselib/util/DensityUtil.java
|
2f0af7f438f2c2759d6e2751015a44a9f5537548
|
[] |
no_license
|
obaby/bjqd
|
76f35fcb9bbfa4841646a8888c9277ad66b171dd
|
97c56f77380835e306ea12401f17fb688ca1373f
|
refs/heads/master
| 2022-12-04T21:33:17.239023
| 2020-08-25T10:53:15
| 2020-08-25T10:53:15
| 290,186,830
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 640
|
java
|
package cn.xports.baselib.util;
import cn.xports.baselib.App;
public class DensityUtil {
public static int dp2px(float f) {
return (int) ((f * App.getInstance().getResources().getDisplayMetrics().density) + 0.5f);
}
public static int px2dp(float f) {
return (int) ((f / App.getInstance().getResources().getDisplayMetrics().density) + 0.5f);
}
public static int getScreenWidth() {
return App.getInstance().getResources().getDisplayMetrics().widthPixels;
}
public static int getScreenHeight() {
return App.getInstance().getResources().getDisplayMetrics().heightPixels;
}
}
|
[
"obaby.lh@gmail.com"
] |
obaby.lh@gmail.com
|
5deabd6088ec1c5a277beee0fdfab4e14ad23e7c
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/MATH-4b-1-20-Single_Objective_GGA-WeightedSum/org/apache/commons/math3/geometry/euclidean/threed/Line_ESTest.java
|
5192c2f51145d009db723dceaddf5e8ad4fafc56
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 968
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Mar 31 09:42:07 UTC 2020
*/
package org.apache.commons.math3.geometry.euclidean.threed;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.math3.geometry.euclidean.threed.Line;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
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 Line_ESTest extends Line_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
Vector3D vector3D0 = Vector3D.PLUS_J;
Vector3D vector3D1 = Vector3D.crossProduct(vector3D0, vector3D0);
Line line0 = new Line(vector3D1, vector3D0);
// Undeclared exception!
line0.getAbscissa((Vector3D) null);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
4aacd9fe732cde1ac9e4c7e0cd22ef7438b62e71
|
1930d97ebfc352f45b8c25ef715af406783aabe2
|
/src/main/java/com/alipay/api/domain/AlipayMarketingCampaignDiscountWhitelistUpdateModel.java
|
a66dd84e531978856f6a61ee5e656b9dd4911cfb
|
[
"Apache-2.0"
] |
permissive
|
WQmmm/alipay-sdk-java-all
|
57974d199ee83518523e8d354dcdec0a9ce40a0c
|
66af9219e5ca802cff963ab86b99aadc59cc09dd
|
refs/heads/master
| 2023-06-28T03:54:17.577332
| 2021-08-02T10:05:10
| 2021-08-02T10:05:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 880
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* ไผๆ ๆดปๅจ็ฝๅๅ่ฎพ็ฝฎ
*
* @author auto create
* @since 1.0, 2019-05-15 15:30:43
*/
public class AlipayMarketingCampaignDiscountWhitelistUpdateModel extends AlipayObject {
private static final long serialVersionUID = 7515278731691393141L;
/**
* ๆดปๅจid
*/
@ApiField("camp_id")
private String campId;
/**
* ็ฝๅๅใ้ๅทๅ้ๅผ
*/
@ApiField("user_white_list")
private String userWhiteList;
public String getCampId() {
return this.campId;
}
public void setCampId(String campId) {
this.campId = campId;
}
public String getUserWhiteList() {
return this.userWhiteList;
}
public void setUserWhiteList(String userWhiteList) {
this.userWhiteList = userWhiteList;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
46d8f9a1fa42f0d73efd68da9d67579034f7167b
|
6429ff62e5bb8d68641161a6974e8d7e6f39a999
|
/src/test/java/org/essentials4j/DoCollTest.java
|
04b07b7c474215606eaf67dc79a8443c5221b47f
|
[
"Apache-2.0"
] |
permissive
|
essentials4j/essentials4j
|
1cbf360c87b6700982cac930264fd877bfc5d956
|
32791d8442b6e5ed096c21383ae7839a789494f1
|
refs/heads/master
| 2023-03-08T17:53:11.364693
| 2018-02-08T21:40:37
| 2018-02-08T21:40:37
| 107,420,829
| 78
| 7
|
Apache-2.0
| 2018-02-08T21:40:38
| 2017-10-18T14:38:00
|
Java
|
UTF-8
|
Java
| false
| false
| 1,905
|
java
|
/*-
* #%L
* essentials4j
* %%
* Copyright (C) 2017 Nikolche Mihajlovski
* %%
* 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.
* #L%
*/
package org.essentials4j;
import org.junit.Assert;
import org.junit.Test;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* @author Nikolche Mihajlovski
* @since 1.0.0
*/
public class DoCollTest extends TestCommons {
private final List<String> abc = New.list("a", "bb", "cc");
@Test
public void doMapToList() {
List<Integer> lengths = Do.map(abc).toList(String::length);
eq(lengths, New.list(1, 2, 2));
}
@Test
public void listToMap() {
Map<String, Integer> lengthsByWord = Do.map(abc).toMap(s -> s, String::length);
expectMap(lengthsByWord, New.map("a", 1, "bb", 2, "cc", 2));
}
@Test
public void listToMapConflicting() {
try {
Do.map(abc).toMap(String::length, s -> s);
} catch (IllegalArgumentException e) {
// this is expected
eq(e.getMessage(), "Both values [bb] and [cc] have the same key!");
return;
}
Assert.fail("Expected IllegalArgumentException!");
}
@Test
public void groupListBy() {
Map<Integer, List<String>> byLength = Do.group(abc).by(String::length);
expectMap(byLength, New.map(1, New.list("a"), 2, New.list("bb", "cc")));
}
@Test
public void listToSet() {
Set<Integer> lengths = Do.map(abc).toSet(String::length);
eq(lengths, New.set(1, 2));
}
}
|
[
"nikolce.mihajlovski@gmail.com"
] |
nikolce.mihajlovski@gmail.com
|
f39970c8051843fb7debc4982ffa2a989ca2a3c3
|
65c37921c5000bc01a428d36f059578ce02ebaab
|
/jooq/src/main/test/test/generated/pg_catalog/routines/DateGt.java
|
6dbc51c405e00f3533c66bda60a54bb3492a8f2a
|
[] |
no_license
|
azeredoA/projetos
|
05dde053aaba32f825f17f3e951d2fcb2d3034fc
|
7be5995edfaad4449ec3c68d422247fc113281d0
|
refs/heads/master
| 2021-01-11T05:43:21.466522
| 2013-06-10T15:39:42
| 2013-06-10T15:40:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,239
|
java
|
/**
* This class is generated by jOOQ
*/
package test.generated.pg_catalog.routines;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(value = {"http://www.jooq.org", "2.6.0"},
comments = "This class is generated by jOOQ")
@java.lang.SuppressWarnings("all")
public class DateGt extends org.jooq.impl.AbstractRoutine<java.lang.Boolean> {
private static final long serialVersionUID = -900370036;
/**
* The procedure parameter <code>pg_catalog.date_gt.RETURN_VALUE</code>
*/
public static final org.jooq.Parameter<java.lang.Boolean> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.BOOLEAN);
/**
* The procedure parameter <code>pg_catalog.date_gt._1</code>
*/
public static final org.jooq.Parameter<java.sql.Date> _1 = createParameter("_1", org.jooq.impl.SQLDataType.DATE);
/**
* The procedure parameter <code>pg_catalog.date_gt._2</code>
*/
public static final org.jooq.Parameter<java.sql.Date> _2 = createParameter("_2", org.jooq.impl.SQLDataType.DATE);
/**
* Create a new routine call instance
*/
public DateGt() {
super("date_gt", test.generated.pg_catalog.PgCatalog.PG_CATALOG, org.jooq.impl.SQLDataType.BOOLEAN);
setReturnParameter(RETURN_VALUE);
addInParameter(_1);
addInParameter(_2);
}
/**
* Set the <code>_1</code> parameter IN value to the routine
*/
public void set__1(java.sql.Date value) {
setValue(test.generated.pg_catalog.routines.DateGt._1, value);
}
/**
* Set the <code>_1</code> parameter to the function
* <p>
* Use this method only, if the function is called as a {@link org.jooq.Field} in a {@link org.jooq.Select} statement!
*/
public void set__1(org.jooq.Field<java.sql.Date> field) {
setField(_1, field);
}
/**
* Set the <code>_2</code> parameter IN value to the routine
*/
public void set__2(java.sql.Date value) {
setValue(test.generated.pg_catalog.routines.DateGt._2, value);
}
/**
* Set the <code>_2</code> parameter to the function
* <p>
* Use this method only, if the function is called as a {@link org.jooq.Field} in a {@link org.jooq.Select} statement!
*/
public void set__2(org.jooq.Field<java.sql.Date> field) {
setField(_2, field);
}
}
|
[
"lindomar_reitz@hotmail.com"
] |
lindomar_reitz@hotmail.com
|
51afd1df8342e9917b2f396460bc62b0234ec142
|
07efa03a2f3bdaecb69c2446a01ea386c63f26df
|
/eclipse_jee/Toolbox/TestPatterns2/com/idc/test/TestVenusInfo.java
|
a826616200b4e5865d6d7d91112f44a5bf90d9de
|
[] |
no_license
|
johnvincentio/repo-java
|
cc21e2b6e4d2bed038e2f7138bb8a269dfabeb2c
|
1824797cb4e0c52e0945248850e40e20b09effdd
|
refs/heads/master
| 2022-07-08T18:14:36.378588
| 2020-01-29T20:55:49
| 2020-01-29T20:55:49
| 84,679,095
| 0
| 0
| null | 2022-06-30T20:11:56
| 2017-03-11T20:51:46
|
Java
|
UTF-8
|
Java
| false
| false
| 1,694
|
java
|
package com.idc.test;
import java.io.Serializable;
import com.idc.pattern.patterns.KeyItemInfo;
import com.idc.pattern.patterns.VenusInfo;
public class TestVenusInfo extends VenusInfo implements Serializable {
private static final long serialVersionUID = 1L;
public TestVenusInfo () {super();}
public TestVenusInfo (int capacity) {super (capacity);}
public void add (DddItemInfo item) {super.add (getKeyItemInfo (item), item);}
public KeyItemInfo getKeyItemInfo (DddItemInfo dddItemInfo) {
return new DddKeyItemInfo (dddItemInfo.getName(), dddItemInfo.getIValue(), dddItemInfo.getLValue());
}
public KeyItemInfo getKeyItemInfo (String name, int iValue, long lValue) {
return new DddKeyItemInfo (name, iValue, lValue);
}
public class DddKeyItemInfo implements KeyItemInfo {
private String name;
private int iValue;
private long lValue;
private int hashCode = 0;
public DddKeyItemInfo (String name, int iValue, long lValue) {
this.name = name;
this.iValue = iValue;
this.lValue = lValue;
hashCode = (name + ";" + Integer.toString(iValue) + ";" + Long.toString(lValue)).hashCode();
System.out.println("DddKeyItemInfo constructor:: name "+name+" iValue "+iValue+" lValue "+lValue);
}
public String getName() {return name;}
public int getIValue() {return iValue;}
public long getLValue() {return lValue;}
public int hashCode() {return hashCode;}
public boolean equals (Object obj) {
if (obj == null || ! (obj instanceof KeyItemInfo)) return false;
if (this.hashCode != ((KeyItemInfo) obj).hashCode()) return false;
return true;
}
public String toString() {
return "("+getName()+","+getIValue()+","+getLValue()+")";
}
}
}
|
[
"john@johnvincent.io"
] |
john@johnvincent.io
|
0ebbe144ea6415f4e0cd81b6b0e45d4dc32e3dc6
|
9ea78e8fbcc72442b96af2b6150497b0b7dacb50
|
/src/main/lombok/com/restfb/types/UserProfile.java
|
997fab57d5341e086fb0ccbdd7495f25e97a9b3e
|
[
"MIT"
] |
permissive
|
amit-jay/restfb
|
e8f49700069be0b984d5cd2ae10c5f9f5d22b021
|
762c7f263d8f944123ebe4b2f65caffe2279c877
|
refs/heads/master
| 2023-05-23T23:18:06.521247
| 2021-05-12T20:44:42
| 2021-05-12T20:44:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,318
|
java
|
/*
* Copyright (c) 2010-2021 Mark Allen, Norbert Bartels.
*
* 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.restfb.types;
import com.restfb.Facebook;
import lombok.Getter;
import lombok.Setter;
/**
* Respresents the User Profile object as defined
* <a href="https://developers.facebook.com/docs/messenger-platform/identity/user-profile/">here</a>
*/
public class UserProfile extends AbstractFacebookType {
@Getter
@Setter
@Facebook("first_name")
private String firstName;
@Getter
@Setter
@Facebook("last_name")
private String lastName;
@Getter
@Setter
@Facebook("profile_pic")
private String profilePic;
@Getter
@Setter
@Facebook
private String locale;
@Getter
@Setter
@Facebook
private String timezone;
@Getter
@Setter
@Facebook
private String gender;
@Getter
@Setter
@Facebook("is_payment_enabled")
private Boolean isPaymentEnabled;
@Getter
@Setter
@Facebook("last_ad_referral")
private LastAdReferral lastAdReferral;
public static class LastAdReferral extends AbstractFacebookType {
@Getter
@Setter
@Facebook
private String source;
@Getter
@Setter
@Facebook
private String type;
@Getter
@Setter
@Facebook("ad_id")
private String adId;
}
}
|
[
"n.bartels@phpmonkeys.de"
] |
n.bartels@phpmonkeys.de
|
b5465e109ac4d586d1548a05998e5a59e0cc4e24
|
4f773252d3bd4de4ddcdb74f7f9bf7c1bdd47aa7
|
/Forge/Base/src/main/java/br/com/gamemods/minecity/forge/base/accessors/entity/base/PotionApplier.java
|
02739ffaa4823cb82c8b18e1328a0c70a3f55cb0
|
[] |
no_license
|
Plugner/MineCity
|
c02c19ef8cd033aa25e89783ed465b03829136e9
|
e0512b4cdfa82875a1a4012d681f0777afb8f5c6
|
refs/heads/master
| 2021-09-24T12:27:41.952641
| 2021-09-14T16:36:11
| 2021-09-14T16:36:11
| 302,193,934
| 1
| 0
| null | 2021-09-14T16:36:12
| 2020-10-08T00:33:03
| null |
UTF-8
|
Java
| false
| false
| 1,532
|
java
|
package br.com.gamemods.minecity.forge.base.accessors.entity.base;
import net.minecraft.entity.Entity;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSource;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
public interface PotionApplier
{
@NotNull
default Action getPotionAction(IEntityLivingBase mcEntity, IPotionEffect mcEffect, Class<?> sourceClass,
String methodName, String methodDesc, List<?> methodParams)
{
return Action.SIMULATE_POTION;
}
@Nullable
default IEntity getPotionSource(IEntityLivingBase entity, IPotionEffect mcEffect, Class<?> sourceClass,
String methodName, String methodDesc, List<?> methodParams)
{
if(this instanceof IEntity)
return (IEntity) this;
return null;
}
default DamageSource getPotionDamageSource(IEntity sourceEntity, IEntityLivingBase entity, IPotionEffect mcEffect,
Class<?> sourceClass, String methodName, String methodDesc,
List<?> methodParams)
{
if(sourceEntity != null)
return new EntityDamageSource("potion", (Entity) sourceEntity).setMagicDamage();
return new DamageSource("potion").setMagicDamage();
}
enum Action
{
NOTHING, SIMULATE_POTION, SIMULATE_DAMAGE_VERBOSE, SIMULATE_DAMAGE_SILENT
}
}
|
[
"jose.rob.jr@gmail.com"
] |
jose.rob.jr@gmail.com
|
7f89088b3919db431cf5eb282c39c5a9b41022ba
|
1a3fd16bfb0087761095961478297c26a9dd467e
|
/http-client/src/test/java/com/proofpoint/http/client/balancing/TestBalancingHttpClient.java
|
577f0026eeb39004434d8b76a34a90975eee5d94
|
[
"Apache-2.0"
] |
permissive
|
parags/platform
|
6d8b47d25715ea465ac106b089e7aff548f8f656
|
78cb72bd8745016adc28a00b46b1a7587275525b
|
refs/heads/master
| 2021-01-16T18:07:45.550834
| 2015-01-21T20:08:10
| 2015-01-21T20:08:10
| 12,907,150
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,003
|
java
|
package com.proofpoint.http.client.balancing;
import com.proofpoint.http.client.HttpClient;
import com.proofpoint.http.client.Request;
import com.proofpoint.http.client.RequestStats;
import com.proofpoint.http.client.Response;
import com.proofpoint.http.client.ResponseHandler;
import org.testng.annotations.Test;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import static com.google.common.base.Preconditions.checkArgument;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertSame;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
public class TestBalancingHttpClient
extends AbstractTestBalancingHttpClient<HttpClient>
{
@Override
protected TestingHttpClient createTestingClient()
{
return new TestingHttpClient("PUT");
}
@Override
protected BalancingHttpClient createBalancingHttpClient()
{
return new BalancingHttpClient(serviceBalancer, httpClient,
new BalancingHttpClientConfig().setMaxAttempts(3));
}
@Override
protected void assertHandlerExceptionThrown(ResponseHandler responseHandler, RuntimeException handlerException)
throws Exception
{
try {
balancingHttpClient.execute(request, responseHandler);
fail("Exception not thrown");
}
catch (Exception e) {
assertSame(e, handlerException, "Exception thrown by BalancingHttpClient");
}
}
@Override
protected void issueRequest()
throws Exception
{
balancingHttpClient.executeAsync(request, mock(ResponseHandler.class));
}
@Test
public void testGetStats()
{
RequestStats requestStats = new RequestStats();
HttpClient mockClient = mock(HttpClient.class);
when(mockClient.getStats()).thenReturn(requestStats);
balancingHttpClient = new BalancingHttpClient(serviceBalancer, mockClient, new BalancingHttpClientConfig());
assertSame(balancingHttpClient.getStats(), requestStats);
verify(mockClient).getStats();
verifyNoMoreInteractions(mockClient, serviceBalancer);
}
@Test
public void testClose()
{
HttpClient mockClient = mock(HttpClient.class);
balancingHttpClient = new BalancingHttpClient(serviceBalancer, mockClient, new BalancingHttpClientConfig());
balancingHttpClient.close();
verify(mockClient).close();
verifyNoMoreInteractions(mockClient, serviceBalancer);
}
class TestingHttpClient
implements HttpClient, TestingClient
{
private String method;
private List<URI> uris = new ArrayList<>();
private List<Object> responses = new ArrayList<>();
TestingHttpClient(String method)
{
this.method = method;
checkArgument(uris.size() == responses.size(), "uris same size as responses");
}
public TestingHttpClient expectCall(String uri, Response response)
{
return expectCall(URI.create(uri), response);
}
public TestingHttpClient expectCall(String uri, Exception exception)
{
return expectCall(URI.create(uri), exception);
}
private TestingHttpClient expectCall(URI uri, Object response)
{
uris.add(uri);
responses.add(response);
return this;
}
public void assertDone()
{
assertEquals(uris.size(), 0, "all expected calls made");
}
@Override
public <T, E extends Exception> HttpResponseFuture<T> executeAsync(Request request, ResponseHandler<T, E> responseHandler)
{
throw new UnsupportedOperationException();
}
@Override
public <T, E extends Exception> T execute(Request request, ResponseHandler<T, E> responseHandler)
throws E
{
assertTrue(uris.size() > 0, "call was expected");
assertEquals(request.getMethod(), method, "request method");
assertEquals(request.getUri(), uris.remove(0), "request uri");
assertEquals(request.getBodyGenerator(), bodyGenerator, "request body generator");
Object response = responses.remove(0);
if (response instanceof Exception) {
return responseHandler.handleException(request, (Exception) response);
}
return responseHandler.handle(request, (Response) response);
}
@Override
public RequestStats getStats()
{
throw new UnsupportedOperationException();
}
@Override
public void close()
{
throw new UnsupportedOperationException();
}
}
}
|
[
"jgmyers@proofpoint.com"
] |
jgmyers@proofpoint.com
|
d1e77b77d534c7f517313f72bde77e1c21ca7a30
|
0ac3db7e3a7f1b408f5f8f34bf911b1c7e7a4289
|
/src/bone/server/server/model/L1Karma.java
|
223a326226bec0bef435aefaa1ed01eaf961c68a
|
[] |
no_license
|
zajako/lineage-jimin
|
4d56ad288d4417dca92bc824f2d1b484992702e3
|
d8148ac99ad0b5530be3c22e6d7a5db80bbf2e5e
|
refs/heads/master
| 2021-01-10T00:57:46.449401
| 2011-10-05T22:32:33
| 2011-10-05T22:32:33
| 46,512,502
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,000
|
java
|
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package bone.server.server.model;
import bone.server.server.utils.IntRange;
public class L1Karma {
private static final int[] KARMA_POINT = { 10000, 20000, 100000, 500000,
1500000, 3000000, 5000000, 10000000, 15500000 };
private static IntRange KARMA_RANGE = new IntRange(-15500000, 15500000);
private int _karma = 0;
public int get() {
return _karma;
}
public void set(int i) {
_karma = KARMA_RANGE.ensure(i);
}
public void add(int i) {
set(_karma + i);
}
public int getLevel() {
boolean isMinus = false;
int karmaLevel = 0;
int karma = get();
if (karma < 0) {
isMinus = true;
karma *= -1;
}
for (int point : KARMA_POINT) {
if (karma >= point) {
karmaLevel++;
if (karmaLevel >= 8) {
break;
}
} else {
break;
}
}
if (isMinus) {
karmaLevel *= -1;
}
return karmaLevel;
}
public int getPercent() {
int karma = get();
int karmaLevel = getLevel();
if (karmaLevel == 0) {
return 0;
}
if (karma < 0) {
karma *= -1;
karmaLevel *= -1;
}
return 100 * (karma - KARMA_POINT[karmaLevel - 1])
/ (KARMA_POINT[karmaLevel] - KARMA_POINT[karmaLevel - 1]);
}
}
|
[
"wlals1978@nate.com"
] |
wlals1978@nate.com
|
2f80fedc9507ed96f15dea83040ad8f0e7cd8375
|
f91b07bef43cdfd7e02889c7ce44992f19ab4a4b
|
/ssm_project/ssm_itheima_web/src/main/java/com/itheima/controller/UserController.java
|
96412c96fd4ebb7990ca4aff069652e7dfedcb47
|
[] |
no_license
|
ido0524/ssm-projrct
|
3f615340dca7c0f582eb2da7fdb5f5a368eedb91
|
f004f53343503b718fb872fb2186dc1bff3316aa
|
refs/heads/master
| 2020-04-13T23:09:53.315433
| 2018-12-29T10:22:09
| 2018-12-29T10:22:44
| 163,498,907
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,169
|
java
|
package com.itheima.controller;
import com.github.pagehelper.PageInfo;
import com.itheima.domain.Orders;
import com.itheima.domain.Product;
import com.itheima.domain.Roles;
import com.itheima.domain.UserInfo;
import com.itheima.service.RolesService;
import com.itheima.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* @author duchengjun@itcast.cn
* @date 2018/12/27
*/
@Controller
@RequestMapping("/user")
public class UserController {
@Autowired
private UserInfoService userInfoService;
@Autowired
private RolesService rolesService;
//ๆณจๅ
ฅๅ ๅฏๅฏน่ฑก
@Autowired
private PasswordEncoder passwordEncoder;
@RequestMapping("/findAll")
public String findAll(@RequestParam(required = true,defaultValue = "1") Integer pageNum, @RequestParam(required = true,defaultValue = "2") Integer pageSize, Model model) throws Exception {
List<UserInfo> userList=userInfoService.findAll(pageNum,pageSize);
PageInfo info= new PageInfo(userList);
model.addAttribute("userList",info);
return "user-list";
}
//ไฟๅญ
@RequestMapping("/saveUser")
public String saveUser(UserInfo userInfo) throws Exception{
//่ทๅๆฐๆฎๅบๆๆๅฏ็ ๅ ๅฏ
String encode = passwordEncoder.encode(userInfo.getPassword());
userInfo.setPassword(encode);
userInfoService.saveUser(userInfo);
return "redirect:findAll";
}
//่ฏฆๆ
@RequestMapping("/findById")
public String findById(String id,Model model) throws Exception {
UserInfo userInfo= userInfoService.findById(id);
model.addAttribute("user",userInfo);
return "user-show";
}
//ไฟฎๆน
@RequestMapping("/findUserById")
public String findUserById(String id,Model model) throws Exception {
UserInfo userInfo= userInfoService.findById(id);
model.addAttribute("user",userInfo);
return "user-update";
}
@RequestMapping("/updateUser")
public String updateProduct(UserInfo userInfo,Integer flag) throws Exception {
//ไฟฎๆนๅฏ็ ไนๅๅฏ็ ๅ ๅฏ
if(flag==1){
String encodePwd = passwordEncoder.encode(userInfo.getPassword());
userInfo.setPassword(encodePwd);
}
userInfoService.updateUser(userInfo);
return "redirect:findAll";
}
@RequestMapping("/findRoles")
public String findRoles(String id,Model model) throws Exception{
List<Roles> roles = rolesService.findAll();//flag=null;
List<Roles> userRoles = rolesService.findByUserId(id);
for (Roles role : roles) {
for (Roles userRole : userRoles) {
//ๅฆๆroleID=userRoleId
if (role.getId().equals(userRole.getId())){
role.setFlag(1);
}
}
}
model.addAttribute("roleList",roles);
return "user-role-add";
}
}
|
[
"zhangsan@itcast.cn"
] |
zhangsan@itcast.cn
|
4c50306f50ea6d0091edf0f9d6bcb324b147d203
|
d4620fcf4c90e78033addda8a535bd3503478681
|
/plugins/devkit/devkit-java-tests/testSrc/org/jetbrains/idea/devkit/inspections/DevkitInspectionsRegistrationCheckTest.java
|
eec3a1368de7b34fa1467911895be847eac40793
|
[
"Apache-2.0"
] |
permissive
|
bc-lee/intellij-community
|
94e22f46d8c66f09300b990248f77162fcd4d3fd
|
996d33fd17a3c434bcb361bfe47b8c12449af90e
|
refs/heads/master
| 2023-09-01T04:12:47.035684
| 2023-07-30T19:41:22
| 2023-07-30T20:08:55
| 253,115,731
| 0
| 0
|
Apache-2.0
| 2023-07-30T22:56:20
| 2020-04-04T23:07:54
| null |
UTF-8
|
Java
| false
| false
| 2,536
|
java
|
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.idea.devkit.inspections;
import com.intellij.codeInspection.LocalInspectionEP;
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
import com.intellij.util.containers.ContainerUtil;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class DevkitInspectionsRegistrationCheckTest extends BasePlatformTestCase {
private static final List<String> DISABLED_INSPECTIONS =
List.of("PluginXmlDynamicPlugin",
"StatisticsCollectorNotRegistered",
"UseCouple",
"HighlightVisitorInternal",
"PluginXmlI18n",
"SerializableCtor");
private static final List<String> WIP_INSPECTIONS =
List.of("ExtensionClassShouldBeFinalAndNonPublic",
"ActionPresentationInstantiatedInCtor",
"CancellationCheckInLoops",
"ApplicationServiceAsStaticFinalField",
"ThreadingConcurrency",
"TokenSetInParserDefinition",
"CallingMethodShouldBeRequiresBlockingContext",
"IncorrectProcessCanceledExceptionHandling");
/**
* Validates all DevKit inspections that are disabled by default match the expected known set.
*/
public void testKnownDisabledByDefaultInspections() {
List<LocalInspectionEP> devkitInspections = ContainerUtil.filter(LocalInspectionEP.LOCAL_INSPECTION.getExtensionList(), ep -> {
return "DevKit".equals(ep.getPluginDescriptor().getPluginId().getIdString());
});
assertEquals("Mismatch in total inspections, check classpath in test run configuration (intellij.devkit.plugin)", 63,
devkitInspections.size());
List<LocalInspectionEP> disabledInspections = ContainerUtil.filter(devkitInspections, ep -> !ep.enabledByDefault);
List<String> disabledInspectionShortNames = new ArrayList<>(ContainerUtil.map(disabledInspections, ep -> ep.getShortName()));
Collections.sort(disabledInspectionShortNames);
assertContainsElements("Mismatch in known disabled inspections", disabledInspectionShortNames, DISABLED_INSPECTIONS);
List<String> allKnownDisabledInspections = new ArrayList<>(ContainerUtil.concat(DISABLED_INSPECTIONS, WIP_INSPECTIONS));
Collections.sort(allKnownDisabledInspections);
assertSameElements("Mismatch in known WIP inspections", disabledInspectionShortNames,
allKnownDisabledInspections);
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
0dafc304d94e56c9a011dcc9a600839c34a9a8ad
|
dd80a584130ef1a0333429ba76c1cee0eb40df73
|
/cts/tools/signature-tools/test/signature/converter/util/AbstractConvertTest.java
|
04935d8ebb18d72ade85573a798f67bee1ac4d37
|
[
"MIT"
] |
permissive
|
karunmatharu/Android-4.4-Pay-by-Data
|
466f4e169ede13c5835424c78e8c30ce58f885c1
|
fcb778e92d4aad525ef7a995660580f948d40bc9
|
refs/heads/master
| 2021-03-24T13:33:01.721868
| 2017-02-18T17:48:49
| 2017-02-18T17:48:49
| 81,847,777
| 0
| 2
|
MIT
| 2020-03-09T00:02:12
| 2017-02-13T16:47:00
| null |
UTF-8
|
Java
| false
| false
| 1,357
|
java
|
/*
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package signature.converter.util;
import java.io.IOException;
import java.util.Set;
import org.junit.Before;
import signature.converter.Visibility;
import signature.model.IApi;
public abstract class AbstractConvertTest extends AbstractTestSourceConverter {
private ITestSourceConverter converter;
/**
* Creates and returns a converter instance.
* @return a converter instance
*/
public abstract ITestSourceConverter createConverter();
@Before
public void setupConverter(){
converter = createConverter();
}
public IApi convert(Visibility visibility, Set<CompilationUnit> units) throws IOException {
return converter.convert(visibility, units);
}
}
|
[
"karun.matharu@gmail.com"
] |
karun.matharu@gmail.com
|
61ac78f003570622a3e34a326c30a9c4045c43dc
|
c2d8181a8e634979da48dc934b773788f09ffafb
|
/storyteller/output/realize/UsersAction.java
|
b3f0f0753b51a77029bcc2e2c7eeeaec8232c1f8
|
[] |
no_license
|
toukubo/storyteller
|
ccb8281cdc17b87758e2607252d2d3c877ffe40c
|
6128b8d275efbf18fd26d617c8503a6e922c602d
|
refs/heads/master
| 2021-05-03T16:30:14.533638
| 2016-04-20T12:52:46
| 2016-04-20T12:52:46
| 9,352,300
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,945
|
java
|
package net.realize.web.app;
import net.realize.model.*;
import net.realize.beans.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Iterator;
import java.util.Vector;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang.StringUtils;
import java.util.Date;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.web.context.support.WebApplicationContextUtils;
import net.enclosing.util.HibernateSession;
import net.storyteller.desktop.CopyProperties;
public class UsersAction extends Action{
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res) throws Exception{
Session session = new HibernateSession().currentSession(this
.getServlet().getServletContext());
//<snippet sentence="UsersAction">
// Vector vector = new Vector();
Criteria criteria = session.createCriteria(User.class);
req.setAttribute("users",criteria.list());
// for (Iterator iter = criteria.list().iterator(); iter.hasNext();) {
// User user = (User) iter.next();
// vector.add(user);
// }
User user = new UserImpl();
UserForm userform = new UserForm();
criteria = session.createCriteria(User.class);
if (req.getAttribute("form")== null && req.getParameter("id")!=null){
criteria.add(Restrictions.idEq(Integer.valueOf(req
.getParameter("id"))));
user = (User) criteria.uniqueResult();
new CopyProperties(user,userform);
} else if(req.getAttribute("form")!=null){
userform = (UserForm)req.getAttribute("form");
criteria.add(Restrictions.idEq(userform.getId()));
user = (User) criteria.uniqueResult();
}
req.setAttribute("model",user);
req.setAttribute("form",userform);
//</snippet>
Criteria criteriaCertificationType= session.createCriteria(CertificationType.class);
req.setAttribute("CertificationTypes", criteriaCertificationType.list());
// if(req.getParameter("displayexport") !=null){
// return mapping.findForward("displayexport");
// }
// if(req.getParameter("csv") !=null){
// CsvExportUsersAction csvExportUsersAction
// = new CsvExportUsersAction(req,session,Collection collection);
// }
return mapping.findForward("success");
}
}
|
[
"toukubo@gmail.com"
] |
toukubo@gmail.com
|
782af7cb3beb604a1b5a546b95f97fd91c915735
|
a12c21f18ac52b1d432d878cad4ce9a26cf67164
|
/src/java/com/deploy/web/utils/X509ShellUtils.java
|
ce239718fb6bce0357a9f88ad94c2f9707f69cc5
|
[] |
no_license
|
zhanght86/deploy_sm2_rsa
|
b364c6c76a6c3da99a3bf2e9d9f2015ff4fa686c
|
4c55f3585d46e2cbac8a92ffbe8f830e80d1c58d
|
refs/heads/master
| 2021-06-08T13:27:57.978524
| 2016-11-22T10:02:34
| 2016-11-22T10:02:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,387
|
java
|
package com.deploy.web.utils;
import com.deploy.utils.StringContext;
import com.inetec.common.util.OSInfo;
import com.inetec.common.util.Proc;
import org.apache.log4j.Logger;
import java.math.BigInteger;
import java.util.UUID;
/**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: 13-7-4
* Time: ไธๅ6:55
* To change this template use File | Settings | File Templates.
*/
public class X509ShellUtils {
private static Logger logger = Logger.getLogger(X509ShellUtils.class);
//็ๆuuidๅฏไธๅบๅๅท
public static String build_uuid() {
//ไฝฟ็จUUID็ๆๅบๅๅท
UUID uuid = UUID.randomUUID();
String ids[] = uuid.toString().split("-");
StringBuffer strBuf = new StringBuffer();
for (int i = 0; i < ids.length; i++) {
strBuf.append(ids[i]);
}
BigInteger big = new BigInteger(strBuf.toString(), 16);
return big.toString();
}
//็ญพๅrsa CA
public static boolean build_rsa_selfsign_ca(String days, String bits, String keyfile, String certificate, String apply_conf) {
Proc proc = new Proc();
String command = null;
if (OSInfo.getOSInfo().isWin()) {
command = StringContext.systemPath + "/commands/windows/rsa/build-selfsign-ca.bat " +
days + " " +
build_uuid() + " " +
bits + " " +
keyfile +" " +
certificate+ " " +
apply_conf;
} else {
command = StringContext.systemPath + "/commands/liunx/rsa/build-selfsign-ca.sh " +
days + " " +
build_uuid() + " " +
bits + " " +
keyfile + " " +
certificate + " " +
apply_conf;
}
logger.info(command);
proc.exec(command);
if (proc.getResultCode() != -1) {
if(!proc.getErrorOutput().contains("error")&&!proc.getErrorOutput().contains("Error")){
return true;
} else {
logger.equals(proc.getErrorOutput());
}
}
return false;
}
//็ๆsm2 CA
public static boolean build_sm2_ca(String csrFile, String extFile,String extensions, String caKey,String caCrt,String days) {
Proc proc = new Proc();
String command = null;
if (OSInfo.getOSInfo().isWin()) {
command = StringContext.systemPath + "/commands/windows/sm2/build-selfsign-ca.bat " +
build_uuid() + " " +
csrFile + " " +
extFile+ " " +
extensions+ " " +
caKey+ " " +
caCrt+ " " +
days;
} else {
command = StringContext.systemPath + "/commands/liunx/sm2/build-selfsign-ca.sh " +
build_uuid() + " " +
csrFile + " " +
extFile+ " " +
extensions+ " " +
caKey+ " " +
caCrt+ " " +
days;
}
logger.info(command);
proc.exec(command);
if (proc.getResultCode() != -1) {
if(!proc.getErrorOutput().contains("error")&&!proc.getErrorOutput().contains("Error")){
return true;
} else {
logger.equals(proc.getErrorOutput());
}
}
return false;
}
//็ๆsm2็ง้ฅ
public static boolean build_sm2_key(String bits, String keyfile) {
Proc proc = new Proc();
String command = null;
if (OSInfo.getOSInfo().isWin()) {
command = StringContext.systemPath + "/commands/windows/sm2/build-key.bat " +
keyfile + " " +
bits;
} else {
command = StringContext.systemPath + "/commands/liunx/sm2/build-key.sh " +
keyfile + " " +
bits;
}
logger.info(command);
proc.exec(command);
if (proc.getResultCode() != -1) {
if(!proc.getErrorOutput().contains("error")&&!proc.getErrorOutput().contains("Error")){
return true;
} else {
logger.equals(proc.getErrorOutput());
}
}
return false;
}
//็ๆsm2่ฏทๆฑ
public static boolean build_sm2_csr(String keyfile, String csrfile, String apply_conf) {
Proc proc = new Proc();
String command = null;
if (OSInfo.getOSInfo().isWin()) {
command = StringContext.systemPath + "/commands/windows/sm2/build-csr.bat " +
keyfile + " " +
csrfile + " " +
apply_conf;
} else {
command = StringContext.systemPath + "/commands/liunx/sm2/build-csr.sh " +
keyfile + " " +
csrfile + " " +
apply_conf;
}
logger.info(command);
proc.exec(command);
if (proc.getResultCode() != -1) {
if(!proc.getErrorOutput().contains("error")&&!proc.getErrorOutput().contains("Error")){
return true;
} else {
logger.equals(proc.getErrorOutput());
}
}
return false;
}
}
|
[
"465805947@QQ.com"
] |
465805947@QQ.com
|
b3793f2c8be50b1874bdd94b786f6007600b4b1c
|
c37ecee6763b36d97b4d61dca47c222a3028c280
|
/example/src/main/java/com/fastcode/example/domain/core/authorization/role/RoleEntity.java
|
6538bfa63d49f1fa89c24d1cfb39e9a8e5bb1c3f
|
[] |
no_license
|
fastcode-inc/lkjh6
|
b76fe9531271a2c7d9b0e175295b48602cfd3c19
|
435baa264d654df45b701301fafbdb000550f587
|
refs/heads/master
| 2023-02-19T23:08:26.162547
| 2021-01-18T09:07:15
| 2021-01-18T09:07:15
| 330,137,464
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 825
|
java
|
package com.fastcode.example.domain.core.authorization.role;
import com.fastcode.example.domain.core.abstractentity.AbstractEntity;
import java.time.*;
import javax.persistence.*;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Entity
@Table(name = "role")
@Getter
@Setter
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
@NoArgsConstructor
public class RoleEntity extends AbstractEntity {
@Basic
@Column(name = "display_name", nullable = false, length = 255)
private String displayName;
@Basic
@Column(name = "name", nullable = false, length = 255)
private String name;
@Id
@EqualsAndHashCode.Include
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Long id;
}
|
[
"info@nfinityllc.com"
] |
info@nfinityllc.com
|
a832d24f359cac2d0b70f40b402efe9e40ffea19
|
5619f522ceffcdb8dd859891731873765d795a09
|
/day2-OOPs/src/Test.java
|
b6e327644426e81222103a3bc7d337d6007affdd
|
[] |
no_license
|
skpayaya/OCA-Preparation
|
a78a09562cc174819a09a1f4c9168c794643b5c4
|
64832fa6d1cd955210452c7df59eaff91ff8606f
|
refs/heads/master
| 2022-12-16T15:07:05.349638
| 2020-09-25T12:12:39
| 2020-09-25T12:12:39
| 297,936,751
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 453
|
java
|
public class Test {
public static void main(String[] args) {
Test t1=new Test();
Test t2 =new Test();
System.out.println(t1.equals(t2));
System.out.println(t1 instanceof Test);
System.out.println(t1 instanceof Object);
}
}
//false
//true
//true
//The reference variable t1 is of type Test , and thereโs no
//equals method in the Test class. The third test asks whether t1 is an instance of class
//Object , and because it is, the test succeeds.
|
[
"1234"
] |
1234
|
ec230d245aacc68dfc440cdf42dd4587772b21ec
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_10963.java
|
33ee582f44cdddea0c419bcf46eb34fc3c5ce98d
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 363
|
java
|
/**
* ???Toast??? :????
* @param context Context
* @param str ???????
* @param isLong Toast.LENGTH_LONG / Toast.LENGTH_SHORT
*/
public static void showToast(Context context,String str,boolean isLong){
if (isLong) {
Toast.makeText(context,str,Toast.LENGTH_LONG).show();
}
else {
Toast.makeText(context,str,Toast.LENGTH_SHORT).show();
}
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
589b6439b72106bc34d5269384179ef4a77a972b
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_27688.java
|
8280defec7823bc18db7a4a49cd1daf3997ca9f2
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 140
|
java
|
@Override public void onSuccessfullyLoggedIn(boolean extraLogin){
checkPurchases(() -> {
hideProgress();
onRestartApp();
}
);
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
f6cf80ba106e4b6ee0726559c98c96e991f603b4
|
58da62dfc6e145a3c836a6be8ee11e4b69ff1878
|
/src/main/java/com/alipay/api/domain/KoubeiCateringPosDishbatchDeleteModel.java
|
7efd010cddb04d79a72965ec317130aea7fcf5dc
|
[
"Apache-2.0"
] |
permissive
|
zhoujiangzi/alipay-sdk-java-all
|
00ef60ed9501c74d337eb582cdc9606159a49837
|
560d30b6817a590fd9d2c53c3cecac0dca4449b3
|
refs/heads/master
| 2022-12-26T00:27:31.553428
| 2020-09-07T03:39:05
| 2020-09-07T03:39:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,391
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* ๆน้ๅ ้ค่ๅ
*
* @author auto create
* @since 1.0, 2018-11-16 17:27:05
*/
public class KoubeiCateringPosDishbatchDeleteModel extends AlipayObject {
private static final long serialVersionUID = 2562542366626411473L;
/**
* ่่ฐฑ็IDใ็จไบๅ ้ค่่ฐฑไธญ็่ๅ
*/
@ApiField("cook_id")
private String cookId;
/**
* ่ๅID
*/
@ApiListField("dish_ids")
@ApiField("string")
private List<String> dishIds;
/**
* ๅๆทID
*/
@ApiField("merchant_id")
private String merchantId;
/**
* ้จๅบID
*/
@ApiField("shop_id")
private String shopId;
public String getCookId() {
return this.cookId;
}
public void setCookId(String cookId) {
this.cookId = cookId;
}
public List<String> getDishIds() {
return this.dishIds;
}
public void setDishIds(List<String> dishIds) {
this.dishIds = dishIds;
}
public String getMerchantId() {
return this.merchantId;
}
public void setMerchantId(String merchantId) {
this.merchantId = merchantId;
}
public String getShopId() {
return this.shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
0217cf4b9afec9d5e3dc814abf329911fb09948d
|
434a45b826a2b46dc64ad1562c8236224c6b1884
|
/AndroidStudioProjects/EjemploFragmento/app/build/generated/source/r/androidTest/debug/es/saladillo/alejandro/ejemplofragmento/test/R.java
|
21a3cef5545bf3efd10abfb0dd9e2c4864db9ede
|
[] |
no_license
|
SoulApps/CrossPlatformLearning
|
66c42b1cb09d69e97c3a1668502b0dd9cc139625
|
c80d0893621e85b426f0e17410f69e5f825dfa12
|
refs/heads/master
| 2021-04-27T06:05:36.794382
| 2017-12-06T18:17:26
| 2017-12-06T18:17:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 403
|
java
|
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package es.saladillo.alejandro.ejemplofragmento.test;
public final class R {
public static final class attr {
}
public static final class string {
public static final int app_name=0x7f020000;
}
}
|
[
"alejandrosanchezgalvin@gmail.com"
] |
alejandrosanchezgalvin@gmail.com
|
53ef466bd00013498126ae8f9ae1682e1cd38165
|
7e512d95c474399d054a165e082c72277f13089b
|
/legacy-core/src/main/java/corent/djinn/SelectionDjinnButtonFactory.java
|
1af41f49fd448e8a6b2350cf1708d47579ed2115
|
[
"Apache-2.0"
] |
permissive
|
greifentor/archimedes-legacy
|
d8ec4baa38d6c55c1d3e3177cc6964598541ad1e
|
996ec2a9d97ba684574849472a8b5b28beaa1825
|
refs/heads/master
| 2023-09-01T06:08:45.643685
| 2023-08-29T09:43:33
| 2023-08-29T09:43:33
| 214,502,614
| 0
| 0
|
Apache-2.0
| 2023-08-29T09:43:35
| 2019-10-11T18:15:48
|
Java
|
UTF-8
|
Java
| false
| false
| 824
|
java
|
/*
* SelectionDjinnButtonFactory.java
*
* 05.02.2004
*
* (c) by O.Lieshoff
*
*/
package corent.djinn;
import javax.swing.*;
/**
* Dieses Interface definiert das Verhalten einer ButtonFactory, die die notwendigen Buttons
* für einen SelectionDjinn produzieren kann.<BR>
* <HR>
*
* @author O.Lieshoff
*
*/
public interface SelectionDjinnButtonFactory {
/** @return Generiert einen Abbruch-Button. */
public JButton createButtonAbbruch();
/** @return Generiert einen Auswahl-Button. */
public JButton createButtonAuswahl();
/** @return Generiert einen Duplizieren-Button. */
public JButton createButtonDuplizieren();
/** @return Generiert einen Neuanlage-Button. */
public JButton createButtonNeuanlage();
}
|
[
"lieshoff@gmx.de"
] |
lieshoff@gmx.de
|
d15c598ed5226ec6317f566dc7d24b4e478216cb
|
dd3eec242deb434f76d26b4dc0e3c9509c951ce7
|
/2018-work/yjj/miscroservice_activity/src/main/java/com/e_commerce/miscroservice/activity/service/ChannelUserService.java
|
bb8df43692e3369ab562044936f522ccb84cc13d
|
[] |
no_license
|
github4n/other_workplace
|
1091e6368abc51153b4c7ebbb3742c35fb6a0f4a
|
7c07e0d078518bb70399e50b35e9f9ca859ba2df
|
refs/heads/master
| 2020-05-31T10:12:37.160922
| 2019-05-25T15:48:54
| 2019-05-25T15:48:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 338
|
java
|
package com.e_commerce.miscroservice.activity.service;
import com.e_commerce.miscroservice.activity.PO.ChannelOrderRecordVO;
import java.util.Map;
/**
* @author Charlie
* @version V1.0
* @date 2018/12/24 9:41
* @Copyright ็่ฟ็ฝ็ป
*/
public interface ChannelUserService {
void fansPaySuccess(ChannelOrderRecordVO vo);
}
|
[
"nessary@foxmail.com"
] |
nessary@foxmail.com
|
bf91354c5dfb73e1a88a6c2b31fe94415e7046e0
|
98d8b4a24a53aa1ef2d60c7330beda09fdb7bcec
|
/src/main/java/by/topolev/spring/beans/RenderMessage.java
|
2f35862a909881eddb1815571800839fea2784e1
|
[] |
no_license
|
Topolev/ITechArtSpring
|
d6d6620cf7d7b6f599bfe606b559260c01f747eb
|
f100e81b17757a54937f9f848119ad2d87adaa98
|
refs/heads/master
| 2021-01-11T04:32:18.207238
| 2016-10-17T18:48:00
| 2016-10-17T18:48:00
| 71,170,109
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
package by.topolev.spring.beans;
/**
* Created by Vladimir on 16.10.2016.
*/
public interface RenderMessage {
void render();
}
|
[
"i.topolev.vladimir@gmail.com"
] |
i.topolev.vladimir@gmail.com
|
ac2439a6cff4d85c269fe8c3a9630376b5701590
|
9b47d61beed9aaeaeafceaa0459ae63102cd923c
|
/src/barcode/cheng/client/android/demo/WifiReceiver.java
|
976de331a97692515c4af536d24ec9177f44edf5
|
[] |
no_license
|
chengkaizone/barcode
|
20729e5a7e1f8925b5f16c333fd4c1ee2dcddb58
|
231f7e48b5f29e646ef8b94fbf874883cccc7c78
|
refs/heads/master
| 2021-01-19T14:34:01.051522
| 2014-05-03T09:41:06
| 2014-05-03T09:41:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,939
|
java
|
package barcode.cheng.client.android.demo;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.SupplicantState;
import android.net.wifi.WifiManager;
import android.util.Log;
import android.widget.TextView;
import barcode.cheng.client.android.demo.R;
import barcode.cheng.client.android.wifi.Killer;
/**
* Get a broadcast when the network is connected, and kill the activity.
*/
public final class WifiReceiver extends BroadcastReceiver {
private static final String TAG = WifiReceiver.class.getSimpleName();
private final WifiManager mWifiManager;
private final WifiActivity parent;
private final TextView statusView;
WifiReceiver(WifiManager wifiManager, WifiActivity wifiActivity,
TextView statusView, String ssid) {
this.parent = wifiActivity;
this.statusView = statusView;
this.mWifiManager = wifiManager;
}
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(
WifiManager.SUPPLICANT_STATE_CHANGED_ACTION)) {
handleChange(
(SupplicantState) intent
.getParcelableExtra(WifiManager.EXTRA_NEW_STATE),
intent.hasExtra(WifiManager.EXTRA_SUPPLICANT_ERROR));
} else if (intent.getAction().equals(
WifiManager.NETWORK_STATE_CHANGED_ACTION)) {
handleNetworkStateChanged((NetworkInfo) intent
.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO));
} else if (intent.getAction().equals(
ConnectivityManager.CONNECTIVITY_ACTION)) {
ConnectivityManager con = (ConnectivityManager) parent
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo[] s = con.getAllNetworkInfo();
for (NetworkInfo i : s) {
if (i.getTypeName().contentEquals("WIFI")) {
NetworkInfo.State state = i.getState();
String ssid = mWifiManager.getConnectionInfo().getSSID();
if (state == NetworkInfo.State.CONNECTED && ssid != null) {
mWifiManager.saveConfiguration();
String label = parent
.getString(R.string.wifi_connected);
statusView.setText(label + '\n' + ssid);
Runnable delayKill = new Killer(parent);
delayKill.run();
}
if (state == NetworkInfo.State.DISCONNECTED) {
Log.d(TAG, "Got state: " + state + " for ssid: " + ssid);
parent.gotError();
}
}
}
}
}
private void handleNetworkStateChanged(NetworkInfo networkInfo) {
NetworkInfo.DetailedState state = networkInfo.getDetailedState();
if (state == NetworkInfo.DetailedState.FAILED) {
Log.d(TAG, "Detailed Network state failed");
parent.gotError();
}
}
private void handleChange(SupplicantState state, boolean hasError) {
if (hasError || state == SupplicantState.INACTIVE) {
Log.d(TAG, "Found an error");
parent.gotError();
}
}
}
|
[
"chengkaizone@163.com"
] |
chengkaizone@163.com
|
5a1f145129fe86435ae6ba898a654b0396b4969c
|
590f065619a7168d487eec05db0fd519cfb103b5
|
/evosuite-tests/com/iluwatar/producer/consumer/Item_ESTest_scaffolding.java
|
7d7ad80d4fce71481f8c2dacc5e265a3e48af9ce
|
[] |
no_license
|
parthenos0908/EvoSuiteTrial
|
3de131de94e8d23062ab3ba97048d01d504be1fb
|
46f9eeeca7922543535737cca3f5c62d71352baf
|
refs/heads/master
| 2023-02-17T05:00:39.572316
| 2021-01-18T00:06:01
| 2021-01-18T00:06:01
| 323,848,050
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,797
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Jan 11 10:52:01 GMT 2021
*/
package com.iluwatar.producer.consumer;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class Item_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "com.iluwatar.producer.consumer.Item";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.dir", "C:\\Users\\disto\\gitrepos\\EvoSuiteTrial");
java.lang.System.setProperty("java.io.tmpdir", "C:\\Users\\disto\\AppData\\Local\\Temp\\");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Item_ESTest_scaffolding.class.getClassLoader() ,
"com.iluwatar.producer.consumer.Item"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(Item_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"com.iluwatar.producer.consumer.Item"
);
}
}
|
[
"distortion0908@gmail.com"
] |
distortion0908@gmail.com
|
fc652fa073471de633f0cc36c23e9ce157ee4e9e
|
94d391922b685f3a911702f4b4fb5ecfbc67b65f
|
/web/support/src/main/java/org/yes/cart/cluster/service/impl/WsCacheDirectorImpl.java
|
dfbe6029da5b51e0a234140633bb437fa42f10f6
|
[
"Apache-2.0"
] |
permissive
|
yuzhijia88/yes-cart
|
6ee20754ac0c9d4b4c7ea60c3f6a17920f5d2f40
|
a93e0b9b640a1c0985bcc8be986802830ec6ddec
|
refs/heads/master
| 2020-04-04T14:12:35.838691
| 2018-11-03T09:16:56
| 2018-11-03T09:16:56
| 155,991,408
| 1
| 0
| null | 2018-11-03T14:35:30
| 2018-11-03T14:35:30
| null |
UTF-8
|
Java
| false
| false
| 3,665
|
java
|
/*
* Copyright 2013 Denys Pavlov, Igor Azarnyi
*
* 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.yes.cart.cluster.service.impl;
import org.yes.cart.cluster.node.Node;
import org.yes.cart.cluster.node.NodeService;
import org.yes.cart.cluster.service.CacheDirector;
import org.yes.cart.domain.dto.impl.CacheInfoDTO;
import java.util.ArrayList;
import java.util.Map;
/**
* Service responsible to evict particular cache(s) depending on entity and operation.
*
* User: Igor Azarny iazarny@yahoo.com
* Date: 18 Aug 2013
* Time: 9:50 AM
*/
public class WsCacheDirectorImpl extends CacheDirectorImpl implements CacheDirector {
private NodeService nodeService;
public NodeService getNodeService() {
return nodeService;
}
/**
* Spring IoC.
*
* @param nodeService node service
*/
public void setNodeService(final NodeService nodeService) {
this.nodeService = nodeService;
nodeService.subscribe("CacheDirector.getCacheInfo", message -> {
final Node node = nodeService.getCurrentNode();
final ArrayList<CacheInfoDTO> caches = new ArrayList<>();
for (final CacheInfoDTO cache : WsCacheDirectorImpl.this.getCacheInfo()) {
cache.setNodeId(node.getId());
cache.setNodeUri(node.getChannel());
caches.add(cache);
}
return caches;
});
nodeService.subscribe("CacheDirector.evictAllCache", message -> {
final Boolean force = (Boolean) message.getPayload();
WsCacheDirectorImpl.this.evictAllCache(force != null && force);
return "OK";
});
nodeService.subscribe("CacheDirector.evictCache", message -> {
WsCacheDirectorImpl.this.evictCache((String) message.getPayload());
return "OK";
});
nodeService.subscribe("CacheDirector.enableStats", message -> {
WsCacheDirectorImpl.this.enableStats((String) message.getPayload());
return "OK";
});
nodeService.subscribe("CacheDirector.disableStats", message -> {
WsCacheDirectorImpl.this.disableStats((String) message.getPayload());
return "OK";
});
nodeService.subscribe("CacheDirector.onCacheableChange", message -> {
final Map<String, Object> payload = (Map<String, Object>) message.getPayload();
return WsCacheDirectorImpl.this.onCacheableChange(
(String) payload.get("entityOperation"),
(String) payload.get("entityName"),
(Long) payload.get("pkValue")
);
});
nodeService.subscribe("CacheDirector.onCacheableBulkChange", message -> {
final Map<String, Object> payload = (Map<String, Object>) message.getPayload();
return WsCacheDirectorImpl.this.onCacheableBulkChange(
(String) payload.get("entityOperation"),
(String) payload.get("entityName"),
(Long[]) payload.get("pkValues")
);
});
}
}
|
[
"denis.v.pavlov@gmail.com"
] |
denis.v.pavlov@gmail.com
|
a042592dbc7eeddcf790662fce9e62d80fecb06a
|
eeeb576e953d03b282e931a5848bd4560a9fdd7c
|
/serverbywanglong/model/src/main/java/com/modianli/power/model/HotProductCategoryTypeDetails.java
|
2b8ec27b323af939a141faad0ced9d4bd02e641b
|
[] |
no_license
|
Qingmutang/controller
|
28c0666e2a2ae35cbe8b46aa08108bfe7ff1097b
|
8077ed6ccb00232023aa51e5c23e42f921a57550
|
refs/heads/master
| 2020-03-22T06:43:30.695840
| 2018-07-04T23:05:09
| 2018-07-04T23:05:09
| 139,653,384
| 0
| 0
| null | 2018-07-04T06:43:08
| 2018-07-04T01:27:39
| null |
UTF-8
|
Java
| false
| false
| 454
|
java
|
package com.modianli.power.model;
import java.io.Serializable;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* Created by gao on 17-2-23.
*/
@NoArgsConstructor
@AllArgsConstructor
@Data
@Builder
public class HotProductCategoryTypeDetails implements Serializable{
private String type;
private List<HotProductCategoryDetails> hotProductCategoryDetails;
}
|
[
"a1.com"
] |
a1.com
|
e4b6dcc52d3c02ca11004db4c3f22388c750f501
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/138/397/CWE400_Resource_Exhaustion__getParameter_Servlet_write_53c.java
|
c7bec8a9ca117c9d7623fd2a99256b79ea6ab642
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,677
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE400_Resource_Exhaustion__getParameter_Servlet_write_53c.java
Label Definition File: CWE400_Resource_Exhaustion.label.xml
Template File: sources-sinks-53c.tmpl.java
*/
/*
* @description
* CWE: 400 Resource Exhaustion
* BadSource: getParameter_Servlet Read count from a querystring using getParameter()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: write
* GoodSink: Write to a file count number of times, but first validate count
* BadSink : Write to a file count number of times
* Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package
*
* */
import javax.servlet.http.*;
public class CWE400_Resource_Exhaustion__getParameter_Servlet_write_53c
{
public void badSink(int count , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE400_Resource_Exhaustion__getParameter_Servlet_write_53d()).badSink(count , request, response);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(int count , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE400_Resource_Exhaustion__getParameter_Servlet_write_53d()).goodG2BSink(count , request, response);
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(int count , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE400_Resource_Exhaustion__getParameter_Servlet_write_53d()).goodB2GSink(count , request, response);
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
9bd672362dc9b0cada3112492ca2865fe869d5f4
|
fd8fadf30b2e357c1f432a303115ce5bf30ff57c
|
/src/net/sourceforge/plantuml/stats/XmlConverter.java
|
db46a2654cfa09618e839b22d06d217a95bf87cc
|
[] |
no_license
|
lixinlin/plantuml-code
|
6642e452ae8e6834942593a7ecd42f44418b8b6b
|
f558a8ec50f9ec617528dede774c3f46f1aac5ae
|
refs/heads/master
| 2021-06-28T02:24:29.085869
| 2019-09-22T11:20:25
| 2019-09-22T11:20:25
| 214,447,468
| 0
| 0
| null | 2021-02-03T19:33:31
| 2019-10-11T13:45:25
|
Java
|
UTF-8
|
Java
| false
| false
| 7,772
|
java
|
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2020, Arnaud Roques
*
* Project Info: http://plantuml.com
*
* If you like this project or if you find it useful, you can support us at:
*
* http://plantuml.com/patreon (only 1$ per month!)
* http://plantuml.com/paypal
*
* This file is part of PlantUML.
*
* PlantUML 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.
*
* PlantUML distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
*
* Original Author: Arnaud Roques
*
*
*/
package net.sourceforge.plantuml.stats;
import java.io.OutputStream;
import java.text.DateFormat;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import net.sourceforge.plantuml.BackSlash;
import net.sourceforge.plantuml.stats.api.Stats;
import net.sourceforge.plantuml.stats.api.StatsColumn;
import net.sourceforge.plantuml.stats.api.StatsLine;
import net.sourceforge.plantuml.stats.api.StatsTable;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class XmlConverter {
private final DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
private final Stats stats;
public XmlConverter(Stats stats) {
this.stats = stats;
}
private Document getDocument() throws ParserConfigurationException {
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
final DocumentBuilder builder = factory.newDocumentBuilder();
final Document document = builder.newDocument();
document.setXmlStandalone(true);
final Element root = (Element) document.createElement("plantuml".toUpperCase());
document.appendChild(root);
// final Element elt1 = (Element) document.createElement("totalLaunch".toUpperCase());
// elt1.setTextContent("" + stats.totalLaunch());
// root.appendChild(elt1);
addNode(root, document, stats.getLastSessions());
addNode(root, document, stats.getCurrentSessionByDiagramType());
addNode(root, document, stats.getCurrentSessionByFormat());
addNode(root, document, stats.getAllByDiagramType());
addNode(root, document, stats.getAllByFormat());
return document;
}
private void addNode(Element root, Document document, StatsTable table) {
final Element elt = (Element) document.createElement(toXmlName(table.getName()).toUpperCase());
for (StatsLine statsLine : table.getLines()) {
final Element line = (Element) document.createElement("line".toUpperCase());
for (StatsColumn col : table.getColumnHeaders()) {
final Element value = (Element) document.createElement(col.name());
// value.setAttribute("value", toText(statsLine.getValue(col)));
value.setTextContent(toText(statsLine.getValue(col)));
line.appendChild(value);
}
elt.appendChild(line);
}
root.appendChild(elt);
}
private String toXmlName(String name) {
return name.replaceAll("\\W+", "_");
}
private String toText(Object tmp) {
if (tmp instanceof Date) {
return "" + ((Date) tmp).getTime();
}
if (tmp == null) {
return "";
}
return tmp.toString();
}
private Transformer getTransformer() throws TransformerException {
final TransformerFactory xformFactory = TransformerFactory.newInstance();
final Transformer transformer = xformFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.STANDALONE, "yes");
return transformer;
}
public void createXml(OutputStream os) throws TransformerException, ParserConfigurationException {
final DOMSource source = new DOMSource(getDocument());
final StreamResult scrResult = new StreamResult(os);
getTransformer().transform(source, scrResult);
}
public String toHtml() {
final StringBuilder result = new StringBuilder();
result.append("<html>");
result.append("<style type=\"text/css\">");
result.append("body { font-family: arial, helvetica, sans-serif; font-size: 12px; font-weight: normal; color: black; background: white;}");
result.append("th,td { font-size: 12px;}");
result.append("table { border-collapse: collapse; border-style: none;}");
result.append("</style>");
result.append("<h2>Statistics</h2>");
printTableHtml(result, stats.getLastSessions());
result.append("<h2>Current session statistics</h2>");
printTableHtml(result, stats.getCurrentSessionByDiagramType());
result.append("<p>");
printTableHtml(result, stats.getCurrentSessionByFormat());
result.append("<h2>General statistics since ever</h2>");
printTableHtml(result, stats.getAllByDiagramType());
result.append("<p>");
printTableHtml(result, stats.getAllByFormat());
result.append("</html>");
return result.toString();
}
private void printTableHtml(StringBuilder result, StatsTable table) {
final Collection<StatsColumn> headers = table.getColumnHeaders();
result.append("<table border=1 cellspacing=0 cellpadding=2>");
result.append(getHtmlHeader(headers));
final List<StatsLine> lines = table.getLines();
for (int i = 0; i < lines.size(); i++) {
final StatsLine line = lines.get(i);
final boolean bold = i == lines.size() - 1;
result.append(getCreoleLine(headers, line, bold));
}
result.append("</table>");
}
private String getCreoleLine(Collection<StatsColumn> headers, StatsLine line, boolean bold) {
final StringBuilder result = new StringBuilder();
if (bold) {
result.append("<tr bgcolor=#f0f0f0>");
} else {
result.append("<tr bgcolor=#fcfcfc>");
}
for (StatsColumn col : headers) {
final Object v = line.getValue(col);
if (v instanceof Long || v instanceof HumanDuration) {
result.append("<td align=right>");
} else {
result.append("<td>");
}
if (bold) {
result.append("<b>");
}
if (v instanceof Long) {
result.append(String.format("%,d", v));
} else if (v instanceof Date) {
result.append(formatter.format(v));
} else if (v == null || v.toString().length() == 0) {
result.append(" ");
} else {
result.append(v.toString());
}
if (bold) {
result.append("</b>");
}
result.append("</td>");
}
result.append("</tr>");
return result.toString();
}
private String getHtmlHeader(Collection<StatsColumn> headers) {
final StringBuilder sb = new StringBuilder();
sb.append("<tr bgcolor=#e0e0e0>");
for (StatsColumn col : headers) {
sb.append("<td><b>");
sb.append(col.getTitle().replace(BackSlash.BS_BS_N, "<br>"));
sb.append("</b></td>");
}
sb.append("</tr>");
return sb.toString();
}
}
|
[
"arnaud_roques@2bfd43ce-aac2-44f9-bcbc-61bf0d4e0ab5"
] |
arnaud_roques@2bfd43ce-aac2-44f9-bcbc-61bf0d4e0ab5
|
4743aa694d478e23fdda5a8b7ecf1cb198a940b0
|
4347ea57d9a2f78977c05ade175ed2d70134cde4
|
/Trainer Works/DynamicWorks/src/com/fannie/HelloWorld.java
|
0ffca738fba2f479d7bd603ab67f394bb0060356
|
[] |
no_license
|
adithnaveen/SDET5
|
fb92ed5459f43558a3027c4545957eea2ac4e3f3
|
4a3d60f1fe5085b111d32663f7542ed4974e1ab3
|
refs/heads/master
| 2020-12-30T14:57:29.930662
| 2018-09-11T09:37:13
| 2018-09-11T09:37:13
| 91,100,869
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,113
|
java
|
package com.fannie;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class HelloWorld
*/
public class HelloWorld extends HttpServlet {
private static final long serialVersionUID = 1L;
public void init(ServletConfig config) throws ServletException {
System.out.println(">>>>>>>>INIT>>>>>>>>>>>>>");
}
public void destroy() {
System.out.println("<<<<<<<<<DESTORY<<<<<<<<<<<<<");
}
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// response type as text render as html
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<body>");
out.print("<h2>Welcome to Servlets </h2>");
out.println("</body>");
out.println("</html>");
out.close();
}
}
|
[
"adith.naveen@gmail.com"
] |
adith.naveen@gmail.com
|
8e5719cf5f68f17627a3afa2fdcefcd8a7bb02ff
|
c9f808b3316a96a4d0a1555a36d6ec47ccb8fd9b
|
/src/com/javahis/web/form/SysEmrIndexForm.java
|
23955006363d05b232e3f1d67ac69001135e1abe
|
[] |
no_license
|
levonyang/proper-his
|
f4c19b4ce46b213bf637be8e18bffa3758c64ecd
|
2fdcb956b0c61e8be35e056d52a97d4890cbea3f
|
refs/heads/master
| 2022-01-05T09:17:14.716629
| 2018-04-08T01:04:21
| 2018-04-08T01:04:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,224
|
java
|
package com.javahis.web.form;
public class SysEmrIndexForm {
private String adm_date_begin;
private String adm_date_end;
private String adm_type_0;
private String adm_type_1;
private String adm_type_2;
private String adm_type_3;
private String dept_code;
private String sort1;
private String sort2;
private String sort3;
private String view_pattern;
private String case_no;
private String mr_no;
public String getMr_no() {
return mr_no;
}
public void setMr_no(String mrNo) {
mr_no = mrNo;
}
public String getCase_no() {
return case_no;
}
public void setCase_no(String case_no) {
this.case_no = case_no;
}
public String getAdm_date_begin() {
return adm_date_begin;
}
public void setAdm_date_begin(String adm_date_begin) {
this.adm_date_begin = adm_date_begin;
}
public String getAdm_date_end() {
return adm_date_end;
}
public void setAdm_date_end(String adm_date_end) {
this.adm_date_end = adm_date_end;
}
public String getDept_code() {
return dept_code;
}
public void setDept_code(String dept_code) {
this.dept_code = dept_code;
}
public String getSort1() {
return sort1;
}
public void setSort1(String sort1) {
this.sort1 = sort1;
}
public String getSort2() {
return sort2;
}
public void setSort2(String sort2) {
this.sort2 = sort2;
}
public String getSort3() {
return sort3;
}
public void setSort3(String sort3) {
this.sort3 = sort3;
}
public String getView_pattern() {
return view_pattern;
}
public void setView_pattern(String view_pattern) {
this.view_pattern = view_pattern;
}
public String getAdm_type_0() {
return adm_type_0;
}
public void setAdm_type_0(String adm_type_0) {
this.adm_type_0 = adm_type_0;
}
public String getAdm_type_1() {
return adm_type_1;
}
public void setAdm_type_1(String adm_type_1) {
this.adm_type_1 = adm_type_1;
}
public String getAdm_type_2() {
return adm_type_2;
}
public void setAdm_type_2(String adm_type_2) {
this.adm_type_2 = adm_type_2;
}
public String getAdm_type_3() {
return adm_type_3;
}
public void setAdm_type_3(String adm_type_3) {
this.adm_type_3 = adm_type_3;
}
}
|
[
"licx@ACA803A0.ipt.aol.com"
] |
licx@ACA803A0.ipt.aol.com
|
35e8fea82b1164d77b16909ddde40a67cb8251dc
|
2d27b4d2aca7f590485f914a6fae6e979338a951
|
/src/conversation/Conversation.java
|
8a81dc69651e0a3ebbcd3293461a283a194717b4
|
[] |
no_license
|
dafrito/Riviera
|
af71c4b40cafed972e6d8c21d87fab42684284bb
|
1de0336961b78fde5593645c45e5077cbb49f773
|
refs/heads/master
| 2021-12-01T01:57:46.068373
| 2021-11-16T13:39:07
| 2021-11-16T13:40:31
| 674,718
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,561
|
java
|
package conversation;
import java.util.Set;
/**
* Represents a logical grouping of {@link Speaker} objects. Conversations may
* be derived from some lower level of conversation. For example, network
* communications represent a conversation, with packets being the messages.
* This global "conversation" is isolated to a network interface. Listeners to
* this conversation may, however, recognize sub-conversations taking place, and
* are encouraged to create their own {@code Conversation} implementations to
* reflect this. Through the derivations of conversations, more and more
* sophisticated translations of messages can occur.
*
* @author Aaron Faanes
*
* @param <E>
* the type of message expected by this conversation
*/
public interface Conversation<E extends Message<E>> {
/**
* Adds a listener to this conversation.
*
* @param listener
* the listener to add
*/
public void addConversationListener(ConversationListener<? super E> listener);
/**
* Removes a listener from this conversation.
*
* @param listener
* the listener to remove
*/
public void removeConversationListener(ConversationListener<? super E> listener);
/**
* Returns all speakers that are currently involved in this conversation.
* <p>
* What defines being "involved" depends on the implementation. Network
* conversations may simply use timeouts to periodically delete inactive
* speakers.
*
* @return the group of active speakers
*/
public Set<Speaker<? extends E>> getSpeakers();
}
|
[
"dafrito@gmail.com"
] |
dafrito@gmail.com
|
a8c118e885350d1a0775377bf9c25029b2f0fc7f
|
64bcf7d49332278e9077a17333aa34dbb4b97500
|
/src/main/java/com/bevelio/arcade/listeners/GameStateListener.java
|
bfae557a0d5a01898030ac7a1e6f6474c392ea7f
|
[] |
no_license
|
CyberFlameGO/BevsArcade
|
32c8438772ed2657fc2db1f967628ef20cf17692
|
539c9324e4f35cb9dd3b0380d318e32ec4347f75
|
refs/heads/master
| 2021-05-16T22:36:21.510813
| 2019-11-17T12:54:57
| 2019-11-17T12:54:57
| 250,498,048
| 0
| 0
| null | 2020-03-27T09:56:03
| 2020-03-27T09:55:13
| null |
UTF-8
|
Java
| false
| false
| 5,011
|
java
|
package com.bevelio.arcade.listeners;
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;
import com.bevelio.arcade.ArcadePlugin;
import com.bevelio.arcade.commands.DebugCommands;
import com.bevelio.arcade.configs.files.LobbyConfig;
import com.bevelio.arcade.events.PreApplyKitEvent;
import com.bevelio.arcade.games.Game;
import com.bevelio.arcade.managers.GameManager;
import com.bevelio.arcade.misc.CC;
import com.bevelio.arcade.events.GameStateChangeEvent;
import com.bevelio.arcade.types.GameState;
import com.bevelio.arcade.types.Kit;
import com.bevelio.arcade.types.Team;
import com.bevelio.arcade.utils.PlayerUtils;
import com.bevelio.arcade.utils.ShapeUtils;
public class GameStateListener implements Listener
{
private LobbyConfig lc;
private GameManager gm;
public GameStateListener()
{
this.lc = ArcadePlugin.getInstance().getConfigManager().getLobbyConfig();
this.gm = ArcadePlugin.getInstance().getGameManager();
}
@SuppressWarnings("deprecation")
@EventHandler
public void onGameState(GameStateChangeEvent e)
{
if(this.gm.getGame() != null)
{
int minPlayers = ArcadePlugin.getInstance().getConfigManager().getMainConfig().getMinNumberOfPlayersToStart();
if(gm.getInteractivePlayers().size() < minPlayers && (e.getTo() == GameState.STARTING ))
{
e.setCancelled(true);
return;
}
Game game = this.gm.getGame();
if(e.getTo() == game.getRegisterAtState())
Bukkit.getPluginManager().registerEvents(game, ArcadePlugin.getInstance());
if(e.getTo() == GameState.PREGAME)
{
game.onPreStart();
game.onStartAnnouncement();
}
else if(e.getTo() == GameState.LIVE)
{
game.onStart();
e.setSeconds(game.getWorldData().maxSeconds);
}
else if(e.getTo() == GameState.FINISHING)
{
this.gm.getGame().onEndAnnouncement();
}
}
if(e.getTo() == GameState.WAITING)
{
if(e.getFrom() != GameState.STARTING)
{
if(lc.isPlateformGenerate())
{
lc.getPlateformFloorBlocks();
lc.getPlateformWallsBlocks();
int radius = lc.getPlateformRadius();
ShapeUtils.getCircle(lc.getSpawnLocation().clone().add(0, -2, 0), false, radius).forEach(loc ->
{
Block block = loc.getBlock();
block.setType(lc.getPlateformFloorBlocks().getType());
block.setData(lc.getPlateformFloorBlocks().getData().getData());
});
}
HandlerList.unregisterAll(gm.getGame());
gm.nextGame(); //Create new game.
Bukkit.getOnlinePlayers().forEach(player ->
{
if(!gm.isInteractivePlayer(player)) return;
player.setFlying(false);
player.setAllowFlight(false);
DebugCommands.message(player, "You have been respawned.");
player.setMaxHealth(20);
player.setHealth(20);
player.setFoodLevel(20);
player.setSaturation(1f);
Bukkit.getOnlinePlayers().forEach(viewer ->
{
if(viewer != player)
if(!viewer.canSee(player))
viewer.showPlayer(player);
});
if(gm.isInteractivePlayer(player))
{
gm.toLobby(player);
}
});
}
}
if(e.getTo() == GameState.STARTING)
gm.getGame().hanndleTeamPreferences();
if(e.getTo() == GameState.PREGAME)
{
gm.getGame().hanndleTeamPreferences();
Bukkit.getOnlinePlayers().forEach(player ->
{
if(gm.isInteractivePlayer(player))
{
String teamName = null;
for(Entry<String, ArrayList<UUID>> prefTeamSet : gm.getGame().getPlayersPrefTeams().entrySet())
if(prefTeamSet.getValue().contains(player.getUniqueId()))
teamName = prefTeamSet.getKey();
if(teamName == null)
gm.getGame().hanndleTeamPreferences();
Team team = gm.getGame().getTeam(teamName);
if(team == null) return;
gm.getGame().addMember(team, player);
DebugCommands.message(player, "You are in team " + team.getDisplayName() + CC.gray + "!");
}
});
}
if(e.getTo() == GameState.PREGAME)
{
Bukkit.getOnlinePlayers().forEach(player ->
{
if(gm.isInteractivePlayer(player))
gm.getGame().respawnPlayer(player);
});
//this.teleportAllToNewGame();
}
}
public void teleportAllToNewGame()
{
World world = null;
System.out.println("World: " + ArcadePlugin.getInstance().getWorldManager().getWorld());
System.out.println("Next World: " + ArcadePlugin.getInstance().getWorldManager().getNextWorld());
world = ArcadePlugin.getInstance().getWorldManager().getWorld();
Location location = new Location(world , 530, 0, 811);
Bukkit.getOnlinePlayers().forEach(player ->
{
if(gm.isInteractivePlayer(player))
player.teleport(location);
});
}
}
|
[
"github@heathlogancampbell.com"
] |
github@heathlogancampbell.com
|
3387235a082beafe59eb46a920953ab621a86a0b
|
97cda285663a8bbf751b39321b695d97b6f69474
|
/Checkstyle/src/com/puppycrawl/tools/checkstyle/checks/ArrayTypeStyleCheck.java
|
44ed372d551d6c1e8af0f6bb493b4733c3de0759
|
[] |
no_license
|
clustercompare/clustercompare-data
|
838c4de68645340546dd5e50b375dcf877591b3e
|
163d05bdc5f4a03da8155ffb1f922a9421733589
|
refs/heads/master
| 2020-12-25T23:10:16.331657
| 2015-12-11T10:37:43
| 2015-12-11T10:37:43
| 39,699,972
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,832
|
java
|
////////////////////////////////////////////////////////////////////////////////
// checkstyle: Checks Java source code for adherence to a set of rules.
// Copyright (C) 2001-2010 Oliver Burn
//
// 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.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle.checks;
import com.puppycrawl.tools.checkstyle.api.Check;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
/**
* Checks the style of array type definitions.
* Some like Java-style: <code>public static void main(String[] args)</code>
* and some like C-style: public static void main(String args[])
*
* By default the Check enforces Java style.
* @author lkuehne
*/
public class ArrayTypeStyleCheck extends Check
{
/** controls whether to use Java or C style */
private boolean mJavaStyle = true;
@Override
public int[] getDefaultTokens()
{
return new int[] {TokenTypes.ARRAY_DECLARATOR};
}
@Override
public void visitToken(DetailAST aAST)
{
final DetailAST typeAST = aAST.getParent();
if (typeAST.getType() != TokenTypes.TYPE) {
return;
}
final DetailAST declAST = typeAST.getParent();
if (declAST.getType() == TokenTypes.METHOD_DEF) {
// Do not check method's return type.
// We have no alternatives here.
return;
}
final DetailAST variableAST = typeAST.getNextSibling();
if (variableAST != null) {
final boolean isJavaStyle =
(variableAST.getLineNo() > aAST.getLineNo())
|| (variableAST.getColumnNo() > aAST.getColumnNo());
if (isJavaStyle != mJavaStyle) {
log(aAST.getLineNo(), aAST.getColumnNo(), "array.type.style");
}
}
}
/**
* Controls whether to check for Java or C style.
* @param aJavaStyle true if Java style should be used.
*/
public void setJavaStyle(boolean aJavaStyle)
{
mJavaStyle = aJavaStyle;
}
}
|
[
"mail@jan-melcher.de"
] |
mail@jan-melcher.de
|
117b8d9c133e4933e43059e1338808d83370aea3
|
36ba7792e0cccfe9c217a2fe58700292af6d2204
|
/in_dev_npc_combat_b/Kurask106Combat.java
|
bfea3da5420a5199cbf2b3682e770822426bed14
|
[] |
no_license
|
danielsojohn/BattleScape-Server-NoMaven
|
92a678ab7d0e53a68b10d047638c580c902673cb
|
793a1c8edd7381a96db0203b529c29ddf8ed8db9
|
refs/heads/master
| 2020-09-09T01:55:54.517436
| 2019-11-15T05:08:02
| 2019-11-15T05:08:02
| 221,307,980
| 0
| 0
| null | 2019-11-12T20:41:54
| 2019-11-12T20:41:53
| null |
UTF-8
|
Java
| false
| false
| 7,231
|
java
|
package script.npc.combat;
import java.util.Arrays;
import java.util.List;
import com.palidino.osrs.io.cache.NpcId;
import com.palidino.osrs.model.npc.combat.NpcCombatDefinition;
import com.palidino.osrs.model.npc.combat.NpcCombatDrop;
import com.palidino.osrs.model.npc.combat.NpcCombatDropTable;
import com.palidino.osrs.model.npc.combat.NpcCombatDropTableDrop;
import com.palidino.osrs.model.item.RandomItem;
import com.palidino.osrs.io.cache.ItemId;
import com.palidino.osrs.model.npc.combat.NpcCombatHitpoints;
import com.palidino.osrs.model.npc.combat.NpcCombatStats;
import com.palidino.osrs.model.CombatBonus;
import com.palidino.osrs.model.npc.combat.NpcCombatSlayer;
import com.palidino.osrs.model.npc.combat.NpcCombatAggression;
import com.palidino.osrs.model.npc.combat.NpcCombatImmunity;
import com.palidino.osrs.model.npc.combat.style.NpcCombatStyle;
import com.palidino.osrs.model.npc.combat.style.NpcCombatStyleType;
import com.palidino.osrs.model.npc.combat.style.NpcCombatDamage;
import com.palidino.osrs.model.npc.combat.style.NpcCombatProjectile;
import com.palidino.osrs.model.npc.combat.NpcCombat;
import lombok.var;
public class Kurask106Combat extends NpcCombat {
@Override
public List<NpcCombatDefinition> getCombatDefinitions() {
var drop = NpcCombatDrop.builder().rareDropTableRate(NpcCombatDropTable.CHANCE_1_IN_256);
var dropTable = NpcCombatDropTable.builder().chance(0.03);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.KURASK_HEAD)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(0.29);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.LEAF_BLADED_BATTLEAXE)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(0.58);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.MYSTIC_ROBE_TOP_LIGHT)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(NpcCombatDropTable.CHANCE_1_IN_128);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.CLUE_SCROLL_HARD)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(0.79);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.LEAF_BLADED_SWORD)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(NpcCombatDropTable.CHANCE_UNCOMMON);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.POISON_IVY_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.CACTUS_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.KWUARM_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.CADANTINE_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.LANTADYME_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.DWARF_WEED_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.SNAPDRAGON_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.TORSTOL_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.RUNE_LONGSWORD)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.ADAMANT_PLATEBODY)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.RUNE_AXE)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_IRIT_LEAF, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_AVANTOE, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_KWUARM, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_CADANTINE, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_DWARF_WEED, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_RANARR_WEED, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_LANTADYME, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.PAPAYA_FRUIT_NOTED, 10)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.WHITE_BERRIES_NOTED, 12)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.COCONUT_NOTED, 10)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(NpcCombatDropTable.CHANCE_COMMON);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_GUAM_LEAF, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_MARRENTILL, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_TARROMIN, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.GRIMY_HARRALANDER, 1, 3)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.COINS, 44, 5000)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.LIMPWURT_ROOT_NOTED, 10, 20)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.FLAX_NOTED, 100)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.BIG_BONES_NOTED, 20)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.MITHRIL_KITESHIELD)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.NATURE_RUNE, 5, 30)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.BELLADONNA_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.TOADFLAX_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.IRIT_SEED)));
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.AVANTOE_SEED)));
drop.table(dropTable.build());
dropTable = NpcCombatDropTable.builder().chance(NpcCombatDropTable.CHANCE_ALWAYS);
dropTable.drop(NpcCombatDropTableDrop.items(new RandomItem(ItemId.BONES)));
drop.table(dropTable.build());
var combat = NpcCombatDefinition.builder();
combat.id(NpcId.KURASK_106);
combat.hitpoints(NpcCombatHitpoints.total(97));
combat.stats(NpcCombatStats.builder().attackLevel(67).defenceLevel(105).bonus(CombatBonus.DEFENCE_SLASH, 20).bonus(CombatBonus.DEFENCE_CRUSH, 20).build());
combat.slayer(NpcCombatSlayer.builder().level(70).superiorId(NpcId.KING_KURASK_295).build());
combat.aggression(NpcCombatAggression.PLAYERS);
combat.immunity(NpcCombatImmunity.builder().poison(true).build());
combat.deathAnimation(1513).blockAnimation(1514);
combat.drop(drop.build());
var style = NpcCombatStyle.builder();
style.type(NpcCombatStyleType.melee(CombatBonus.ATTACK_CRUSH));
style.damage(NpcCombatDamage.maximum(11));
style.animation(1512).attackSpeed(4);
style.projectile(NpcCombatProjectile.id(335));
combat.style(style.build());
return Arrays.asList(combat.build());
}
}
|
[
"palidino@Daltons-MacBook-Air.local"
] |
palidino@Daltons-MacBook-Air.local
|
08afa5489cb576ea559630614358e30f4e5d589a
|
d93a47a7c64fae6e5fa62184ca95f7831c3c20ed
|
/src/com/wenjing/entity/AttractionLevel.java
|
139773eff3b35ee43331b7db285f638c8f02147f
|
[] |
no_license
|
cfy202/intertrips
|
b5ace01f0c7f7ab4f9753be4f3ab5d457102d263
|
f3810e8018b5c3f15c2f72b281e9a462fe0d4cb0
|
refs/heads/master
| 2020-04-29T11:37:20.753331
| 2019-12-04T03:12:11
| 2019-12-04T03:12:11
| 176,105,219
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 762
|
java
|
/**
*
*/
package com.wenjing.entity;
import java.io.Serializable;
/**
* ็ฑป่ฏดๆ
* @author xiejin
* @date 2015-9-25
* @date 2015-9-25 ไธๅ2:09:56
*/
public class AttractionLevel implements Serializable{
private static final long serialVersionUID = -2920880765426813428L;
private String id;
private String description;
private int level;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
}
|
[
"cfy871222@163.com"
] |
cfy871222@163.com
|
e24c89b5b89cf142588d1002813efca51b514df0
|
bcd4762b1961dfa3cdebe8d24ab20760eb1a9732
|
/phloc-appbasics/src/main/java/com/phloc/appbasics/datetime/IHasLastModificationInfo.java
|
e3209b1fe1821f98d9e7505d4174e912ce109bd7
|
[] |
no_license
|
phlocbg/phloc-webbasics
|
4d7d773f7d8fc90349432982e647d66aa2b322b8
|
c1a4c5ffab91c89abf27e080601b509061e9cf47
|
refs/heads/master
| 2023-07-20T01:39:32.772637
| 2023-07-14T16:23:00
| 2023-07-14T16:23:00
| 41,255,519
| 0
| 0
| null | 2022-12-06T00:05:48
| 2015-08-23T15:42:00
|
Java
|
UTF-8
|
Java
| false
| false
| 1,211
|
java
|
/**
* Copyright (C) 2006-2014 phloc systems
* http://www.phloc.com
* office[at]phloc[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.phloc.appbasics.datetime;
import javax.annotation.Nullable;
import com.phloc.datetime.IHasLastModificationDateTime;
/**
* Base interface for an object that has a date time and a user ID.
*
* @author Philip Helger
*/
public interface IHasLastModificationInfo extends IHasLastModificationDateTime
{
/**
* @return The user ID who last modified the object or <code>null</code> if
* this object has not yet been modified.
*/
@Nullable
String getLastModificationUserID ();
}
|
[
"ph@phloc.com@224af017-8982-1a56-601f-39e8d6e75726"
] |
ph@phloc.com@224af017-8982-1a56-601f-39e8d6e75726
|
fa0bc46a3705c4c991f15a4a6f1f4a673656f11d
|
690f8951fceca09e2d8cb6bf9abb2a6c17f32d6d
|
/src/esocial-esquemas/src/main/java/br/jus/tst/esocial/esquemas/eventos/benprrp/TSIndRRA.java
|
5f3663aa0652cbbb38794458d47a6775b20a9ed7
|
[
"BSD-3-Clause"
] |
permissive
|
lldias/esocial
|
f5af6198738f3557e175d37ed57c3eb44616be1e
|
80db222dc493e4f6dbcdbc1c3142a77e2c033c7d
|
refs/heads/master
| 2023-03-08T08:38:30.459805
| 2022-11-25T17:34:24
| 2022-11-25T17:34:24
| 143,428,870
| 0
| 0
| null | 2018-08-03T13:10:04
| 2018-08-03T13:10:02
| null |
UTF-8
|
Java
| false
| false
| 1,091
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2022.10.24 at 05:04:31 PM BRT
//
package br.jus.tst.esocial.esquemas.eventos.benprrp;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for TS_indRRA.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="TS_indRRA">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="S"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "TS_indRRA")
@XmlEnum
public enum TSIndRRA {
/**
* Sim
*
*/
S;
public String value() {
return name();
}
public static TSIndRRA fromValue(String v) {
return valueOf(v);
}
}
|
[
"tiago.bento@tst.jus.br"
] |
tiago.bento@tst.jus.br
|
7fb617cc576bfbab75119ccca94208e95a7204d4
|
76a7c720f8c0c5babd092093708e7323dd941aa4
|
/bubing_camera/src/main/java/com/bubing/camera/result/TakeResult.java
|
4cc495848c0a295cf1267b3db57dbf50d7bc4980
|
[] |
no_license
|
General757/BubingTools
|
13b2622a65cdba982a8f5ab2b6d6541ce4f1d14a
|
550af7395935e3f2e1411a9c80eed6698343a607
|
refs/heads/master
| 2023-02-23T03:53:10.106504
| 2020-11-02T03:35:04
| 2020-11-02T03:35:04
| 260,145,210
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,339
|
java
|
package com.bubing.camera.result;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
/**
* @ClassName: TakeResult
* @Description: java็ฑปไฝ็จๆ่ฟฐ
* @Author: bubing
* @Date: 2020-05-09 15:24
*/
public class TakeResult {
private static final String TAG = TakeResult.class.getName();
private TakeResult() {
}
public static HolderFragment get(FragmentActivity activity) {
return new TakeResult().getHolderFragment(activity.getSupportFragmentManager());
}
public static HolderFragment get(Fragment fragment) {
return new TakeResult().getHolderFragment(fragment.getChildFragmentManager());
}
private HolderFragment getHolderFragment(FragmentManager fragmentManager) {
HolderFragment holderFragment = findHolderFragment(fragmentManager);
if (holderFragment == null) {
holderFragment = new HolderFragment();
fragmentManager.beginTransaction().add(holderFragment, TAG).commitAllowingStateLoss();
fragmentManager.executePendingTransactions();
}
return holderFragment;
}
private HolderFragment findHolderFragment(FragmentManager fragmentManager) {
return (HolderFragment) fragmentManager.findFragmentByTag(TAG);
}
}
|
[
"1183561804@qq.com"
] |
1183561804@qq.com
|
d8b151be777d7c952d85954592fbd835c0b7443f
|
23d343c5a7d982697ba539de76c24a03e6fd9b0d
|
/96/Solution (2).java
|
1741bbdaaf03d6a93f930d37ca3e30d06a195261
|
[] |
no_license
|
yanglin0883/leetcode
|
5050e4062aea6c3070a54843e07d5a09a592eda2
|
851d3bec58d61ed908d8c33c31d309ff204e1643
|
refs/heads/master
| 2022-12-05T23:50:39.822841
| 2020-08-21T17:13:16
| 2020-08-21T17:13:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 296
|
java
|
class Solution {
public int numTrees(int n) {
// if(n<1) return 1;
if(n<=1) return 1;
int res=0;
int a, b;
for(int i=0;i<n;i++){
a=numTrees(i-0);
b=numTrees(n-i-1);
res += a * b;
}
return res;
}
}
|
[
"yanglin0883@gmail.com"
] |
yanglin0883@gmail.com
|
4e63a69aa1ac9f9b25c9e8683af4330af20691a5
|
67f03b9fd28393790ee51eb10dcab7fbaf7f2181
|
/BomWeatherApplication/src/main/java/com/bomWeather/messageManagement/awsIoT/WeatherTopicPublisher.java
|
67d5980c0c5d6596a059932e164dc315000ef030
|
[] |
no_license
|
szeyick/AlexaWeatherApp
|
c9156bade72310629b696b585b5f5473ffc98afc
|
27bb54a68c97a6ce297af7aa6cae3b2359c4bf79
|
refs/heads/master
| 2020-12-02T11:04:50.940623
| 2017-07-08T09:46:45
| 2017-07-08T09:46:45
| 96,597,473
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,853
|
java
|
package com.bomWeather.messageManagement.awsIoT;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.amazonaws.services.iot.client.AWSIotException;
import com.amazonaws.services.iot.client.AWSIotMessage;
import com.amazonaws.services.iot.client.AWSIotMqttClient;
import com.amazonaws.services.iot.client.AWSIotQos;
/**
* The WeatherTopicPublisher.
* <p>
* This publisher is responsible for sending messages back to AWS-IoT
* on a specified topic.
* <p>
* <b>Warning: </b>None.
* @author szeyick
* @version 0.0.1
*/
public class WeatherTopicPublisher {
/**
* The logger.
*/
private Logger LOGGER = LoggerFactory.getLogger(NonBlockingPublishListener.class.getSimpleName());
/**
* A reference to the AWS-IoT client.
*/
private final AWSIotMqttClient awsIotClient;
/**
* The topic to publish to.
*/
private String publishToTopic;
/**
* Constructor.
* @param awsIotClient - The AWS-IoT Client.
* @param topic - The topic to publish to.
*/
public WeatherTopicPublisher(AWSIotMqttClient awsIotClient, String topic) {
this.awsIotClient = awsIotClient;
publishToTopic = topic;
}
/**
* @param jsonPayload - The payload to send to the topic as a JSON string.
*/
public void publish(String jsonPayload) {
AWSIotMessage message = new NonBlockingPublishListener(publishToTopic, AWSIotQos.QOS0, jsonPayload);
try {
awsIotClient.publish(message);
} catch (AWSIotException e) {
LOGGER.info(System.currentTimeMillis() + ": Publish Failed - " + jsonPayload);
}
}
/**
* The NonBlockingPublishListener.
* <p>
* This class is responsible for listening to the message that has been published and
* updating the status.
* <p>
* <b>Warning: <b>None.
* <p>
* @author szeyick
* @version 0.0.1
*/
private class NonBlockingPublishListener extends AWSIotMessage {
/**
* The logger.
*/
private Logger LOGGER = LoggerFactory.getLogger(NonBlockingPublishListener.class.getSimpleName());
/**
* Constructor.
* @param topic - The topic to listen to.
* @param qos - The QoS variable.
* @param payload - The message to send.
*/
public NonBlockingPublishListener(String topic, AWSIotQos qos, String payload) {
super(topic, qos, payload);
}
/**
* {@inheritDoc}
*/
@Override
public void onSuccess() {
LOGGER.info(System.currentTimeMillis() + ": Message Successfully Sent - " + getStringPayload());
}
/**
* {@inheritDoc}
*/
@Override
public void onFailure() {
LOGGER.info(System.currentTimeMillis() + ": Message Failed To Publish - " + getStringPayload());
}
/**
* {@inheritDoc}
*/
@Override
public void onTimeout() {
LOGGER.info(System.currentTimeMillis() + ": Publish Timeout - " + getStringPayload());
}
}
}
|
[
"szeyick@gmail.com"
] |
szeyick@gmail.com
|
0732a3de3d41e71ac9d195b67ebc3259690c5b86
|
1efcc13e41fc932413c88bb00ed181c77da8cebc
|
/gobiiproject/gobii-model/src/main/java/org/gobiiproject/gobiimodel/dto/container/ExperimentDTO.java
|
8d7590cdffd9ab257fd49bbe1f6edbb5837ebc4e
|
[
"MIT"
] |
permissive
|
gobiiproject/GOBii-System
|
466478089ec8ca12f7e560996f3409afae205c88
|
cab3432ddec4546140a29b157e767f71456531ec
|
refs/heads/master
| 2021-01-11T23:25:58.902840
| 2018-07-13T01:03:38
| 2018-07-13T01:03:38
| 78,578,773
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,465
|
java
|
package org.gobiiproject.gobiimodel.dto.container;
import org.gobiiproject.gobiimodel.dto.DtoMetaData;
import org.gobiiproject.gobiimodel.dto.annotations.GobiiEntityColumn;
import org.gobiiproject.gobiimodel.dto.annotations.GobiiEntityParam;
import java.util.Date;
/**
* Created by Angel on 4/13/2016.
*/
public class ExperimentDTO extends DtoMetaData {
public ExperimentDTO() {
}
public ExperimentDTO(ProcessType processType) {
super(processType);
}
private Integer experimentId;
private String experimentName = null;
private String experimentCode = null;
private String experimentDataFile = null;
private Integer projectId;
private Integer platformId;
private String platformName;
private Integer manifestId;
private Integer createdBy;
private Date createdDate;
private Integer modifiedBy;
private Date modifiedDate;
private Integer status;
@GobiiEntityParam(paramName = "experimentId")
public Integer getExperimentId() {
return experimentId;
}
@GobiiEntityColumn(columnName = "experiment_id")
public void setExperimentId(Integer experimentId) {
this.experimentId = experimentId;
}
@GobiiEntityParam(paramName = "experimentName")
public String getExperimentName() {
return experimentName;
}
@GobiiEntityColumn(columnName = "name")
public void setExperimentName(String experimentName) {
this.experimentName = experimentName;
}
@GobiiEntityParam(paramName = "experimentCode")
public String getExperimentCode() {
return experimentCode;
}
@GobiiEntityColumn(columnName = "code")
public void setExperimentCode(String experimentCode) {
this.experimentCode = experimentCode;
}
@GobiiEntityParam(paramName = "experimentDataFile")
public String getExperimentDataFile() {
return experimentDataFile;
}
@GobiiEntityColumn(columnName = "data_file")
public void setExperimentDataFile(String dataFile) {
this.experimentDataFile = dataFile;
}
@GobiiEntityParam(paramName = "projectId")
public Integer getProjectId() {
return projectId;
}
@GobiiEntityColumn(columnName = "project_id")
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
@GobiiEntityParam(paramName = "platformId")
public Integer getPlatformId() {
return platformId;
}
@GobiiEntityColumn(columnName = "platform_id")
public void setPlatformId(Integer platformId) {
this.platformId = platformId;
}
@GobiiEntityParam(paramName = "platformName")
public String getPlatformName() {
return platformName;
}
@GobiiEntityColumn(columnName = "platform_name")
public void setPlatformName(String platformName) {
this.platformName = platformName;
}
@GobiiEntityParam(paramName = "manifestId")
public Integer getManifestId() {
return manifestId;
}
@GobiiEntityColumn(columnName = "manifest_id")
public void setManifestId(Integer manifestId) {
this.manifestId = manifestId;
}
@GobiiEntityParam(paramName = "createdBy")
public Integer getCreatedBy() {
return createdBy;
}
@GobiiEntityColumn(columnName = "created_by")
public void setCreatedBy(Integer createdBy) {
this.createdBy = createdBy;
}
@GobiiEntityParam(paramName = "createDate")
public Date getCreatedDate() {
return createdDate;
}
@GobiiEntityColumn(columnName = "created_date")
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
@GobiiEntityParam(paramName = "modifiedBy")
public Integer getModifiedBy() {
return modifiedBy;
}
@GobiiEntityColumn(columnName = "modified_by")
public void setModifiedBy(Integer modifiedBy) {
this.modifiedBy = modifiedBy;
}
@GobiiEntityParam(paramName = "modifiedDate")
public Date getModifiedDate() {
return modifiedDate;
}
@GobiiEntityColumn(columnName = "modified_date")
public void setModifiedDate(Date modifiedDate) {
this.modifiedDate = modifiedDate;
}
@GobiiEntityParam(paramName = "status")
public Integer getStatus() {
return status;
}
@GobiiEntityColumn(columnName = "status")
public void setStatus(Integer status) {
this.status = status;
}
}
|
[
"jdl232@cornell.edu"
] |
jdl232@cornell.edu
|
6e7450c4ca06633cf1314638815132f207fd94c1
|
95c49f466673952b465e19a5ee3ae6eff76bee00
|
/src/main/java/com/bytedance/sdk/openadsdk/utils/C3802x.java
|
312a453ac0c706d60d18b46ed5aab83ddd8bffee
|
[] |
no_license
|
Phantoms007/zhihuAPK
|
58889c399ae56b16a9160a5f48b807e02c87797e
|
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
|
refs/heads/main
| 2023-01-24T01:34:18.716323
| 2020-11-25T17:14:55
| 2020-11-25T17:14:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,398
|
java
|
package com.bytedance.sdk.openadsdk.utils;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import com.baidu.mobads.interfaces.utils.IXAdSystemUtils;
import com.p438f.p439a.p441b.Hodor;
import com.zhihu.android.api.model.LiveVideoModel;
/* renamed from: com.bytedance.sdk.openadsdk.utils.x */
/* compiled from: NetworkUtils */
public class C3802x {
/* renamed from: a */
public static boolean m18954a(Context context) {
NetworkInfo[] allNetworkInfo;
try {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
if (!(connectivityManager == null || (allNetworkInfo = connectivityManager.getAllNetworkInfo()) == null)) {
for (NetworkInfo networkInfo : allNetworkInfo) {
if (networkInfo.getState() == NetworkInfo.State.CONNECTED || networkInfo.getState() == NetworkInfo.State.CONNECTING) {
return true;
}
}
}
} catch (Throwable unused) {
}
return false;
}
/* renamed from: b */
public static int m18956b(Context context) {
int c = m18957c(context);
if (c == 1) {
return 0;
}
switch (c) {
case 4:
return 1;
case 5:
return 4;
default:
return c;
}
}
/* renamed from: c */
public static int m18957c(Context context) {
try {
NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
if (activeNetworkInfo == null) {
return 0;
}
if (!activeNetworkInfo.isAvailable()) {
return 0;
}
switch (activeNetworkInfo.getType()) {
case 0:
switch (((TelephonyManager) Hodor.f17380a.mo27336a("phone", "com.zhihu.android.third:adpangolin")).getNetworkType()) {
case 1:
case 2:
case 4:
case 7:
case 11:
case 16:
return 2;
case 3:
case 5:
case 6:
case 8:
case 9:
case 10:
case 12:
case 14:
case 15:
case 17:
return 3;
case 13:
case 18:
case 19:
return 5;
default:
String subtypeName = activeNetworkInfo.getSubtypeName();
if (TextUtils.isEmpty(subtypeName) || (!subtypeName.equalsIgnoreCase("TD-SCDMA") && !subtypeName.equalsIgnoreCase("WCDMA") && !subtypeName.equalsIgnoreCase("CDMA2000"))) {
return 1;
}
return 3;
}
case 1:
return 4;
default:
return 1;
}
} catch (Throwable unused) {
return 1;
}
}
/* renamed from: d */
public static boolean m18958d(Context context) {
return m18957c(context) == 4;
}
/* renamed from: e */
public static boolean m18959e(Context context) {
return m18957c(context) == 5;
}
/* renamed from: f */
public static String m18960f(Context context) {
switch (m18957c(context)) {
case 2:
return "2g";
case 3:
return "3g";
case 4:
return IXAdSystemUtils.NT_WIFI;
case 5:
return "4g";
default:
return LiveVideoModel.MOBILE;
}
}
/* renamed from: a */
public static boolean m18955a(String str) {
return !TextUtils.isEmpty(str) && (str.startsWith("http://") || str.startsWith("https://"));
}
}
|
[
"seasonpplp@qq.com"
] |
seasonpplp@qq.com
|
79b55f2ac6b1a8303e8da3b9de8efdf4c9577029
|
cc93fcf137ad446d1882d2ff210cee9dfceba53a
|
/src/main/java/paulevs/betternether/world/NetherBiomeAccessType.java
|
3547c4cdd85a157740586ac6f018ae6739293a5a
|
[] |
no_license
|
2A5F/BetterNether
|
f891cf586adf8f19c152ec65b312a169c3aaae68
|
f5c2f609c0b4af8c75adb5c597e8d9814d2de878
|
refs/heads/master
| 2023-04-07T09:47:01.364946
| 2020-09-13T16:27:32
| 2020-09-13T16:27:32
| 274,848,071
| 0
| 0
| null | 2023-04-04T00:57:58
| 2020-06-25T06:50:02
|
Java
|
UTF-8
|
Java
| false
| false
| 1,359
|
java
|
package paulevs.betternether.world;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.source.BiomeAccess.Storage;
import net.minecraft.world.biome.source.BiomeAccessType;
import paulevs.betternether.config.Config;
import paulevs.betternether.noise.OpenSimplexNoise;
public enum NetherBiomeAccessType implements BiomeAccessType
{
INSTANCE;
private static BiomeMap map;
private static final OpenSimplexNoise NOISE_X = new OpenSimplexNoise(0);
private static final OpenSimplexNoise NOISE_Y = new OpenSimplexNoise(1);
private static final OpenSimplexNoise NOISE_Z = new OpenSimplexNoise(2);
@Override
public Biome getBiome(long seed, int x, int y, int z, Storage storage)
{
double px = x * 0.2;
double py = y * 0.2;
double pz = z * 0.2;
int nx = (int) (NOISE_X.eval(pz, py) * 6 + x);
int ny = (int) (NOISE_Y.eval(px, pz) * 6 + y);
int nz = (int) (NOISE_Z.eval(py, px) * 6 + z);
return map.getBiome(nx, ny, nz);//storage.getBiomeForNoiseGen(nx >> 2, ny >> 2, nz >> 2);
//return storage.getBiomeForNoiseGen(x >> 2, y >> 2, z >> 2);
}
public static void reInitMap(long seed)
{
int sizeXZ = Config.getInt("generator_world", "biome_size_xz", 200);
int sizeY = Config.getInt("generator_world", "biome_size_y", 40);
map = new BiomeMap(seed, sizeXZ, sizeY, true);
}
}
|
[
"paulevs@yandex.ru"
] |
paulevs@yandex.ru
|
dae45c7ee4aa9e82af51de45aadc28e179c373ee
|
ee2fece384c0b7b58cd40f10227960c9058d2ee6
|
/src/main/java/com/homeapp/app/security/SpringSecurityAuditorAware.java
|
f157f206a22511457dec03657f91a762da869953
|
[] |
no_license
|
FredPi17/HomeAutomationApp
|
302289b94b4f4a1109c2a81db6f25486c3f38867
|
1e9a98aa091982dd943a866b0ea919deeb9b49db
|
refs/heads/master
| 2022-12-22T15:00:58.568671
| 2020-03-09T18:50:24
| 2020-03-09T18:50:24
| 244,335,080
| 0
| 0
| null | 2022-12-16T05:13:17
| 2020-03-02T09:49:13
|
Java
|
UTF-8
|
Java
| false
| false
| 540
|
java
|
package com.homeapp.app.security;
import com.homeapp.app.config.Constants;
import java.util.Optional;
import org.springframework.data.domain.AuditorAware;
import org.springframework.stereotype.Component;
/**
* Implementation of {@link AuditorAware} based on Spring Security.
*/
@Component
public class SpringSecurityAuditorAware implements AuditorAware<String> {
@Override
public Optional<String> getCurrentAuditor() {
return Optional.of(SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT));
}
}
|
[
"fpinaud17@gmail.com"
] |
fpinaud17@gmail.com
|
c5495f3c6412718d80f360bf0c9c1d820a0a4396
|
f47ab0338caee17b44179222d0fb50b51be8a9cf
|
/springboot-mybatis-annotation-multidatasource/src/test/java/com/example/demo/SpringbootMybatisAnnotationMultidatasourceApplicationTests.java
|
77742ea1e29bae02b70990a9afefd96680eafd74
|
[] |
no_license
|
jiaozg/spring-boot-all
|
dec335e10251d747a003e1ba86ca8b00cd07215a
|
88bbb08c118d278bcdbbe46e869585e27d4db3f3
|
refs/heads/master
| 2021-01-23T08:44:57.932265
| 2018-04-10T15:02:33
| 2018-04-10T15:02:33
| 102,546,613
| 91
| 70
| null | 2018-03-06T08:30:26
| 2017-09-06T01:14:58
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 369
|
java
|
package com.example.demo;
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 SpringbootMybatisAnnotationMultidatasourceApplicationTests {
@Test
public void contextLoads() {
}
}
|
[
"jiaozhiguang@126.com"
] |
jiaozhiguang@126.com
|
c9b3fee1c8dfec378df4713b7c7dd0b048c85303
|
b2b0f00fd6a06e7aab45f96339be0b97edc077e6
|
/networking/src/com/emptyPockets/test/controls/menus/EntityMenu.java
|
beeb54356db68aa27cec16ff14c55d585ed817b0
|
[] |
no_license
|
cdbhimani/joeydevolopmenttesting
|
ecb5d8b6bed2401a972bc4f72226550f6fb2ffbf
|
7f5ad39c9bea54db2a6bc26a84905e541fd7c3d5
|
refs/heads/master
| 2020-03-27T22:40:44.688037
| 2018-02-08T07:28:54
| 2018-02-08T07:28:54
| 40,646,759
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,905
|
java
|
package com.emptyPockets.test.controls.menus;
import java.util.ArrayList;
import com.emptyPockets.test.controls.entities.BaseEntity;
import com.emptyPockets.test.controls.inputs.handlers.EntityInputHandler;
public class EntityMenu implements EntityInputHandler {
BaseEntity owner;
ArrayList<EntityMenuItem> items;
boolean visible = false;
public EntityMenu() {
items = new ArrayList<EntityMenuItem>();
}
public void setOwner(BaseEntity owner) {
this.owner = owner;
}
public BaseEntity getOwner() {
return owner;
}
public ArrayList<EntityMenuItem> getMenuItems() {
return items;
}
public void update() {
synchronized (items) {
for (EntityMenuItem item : items) {
item.updateMenuItem(this);
}
}
}
public void addMenuItem(EntityMenuItem item) {
synchronized (items) {
items.add(item);
}
}
public void removeMenuItem(EntityMenuItem item) {
synchronized (items) {
items.remove(item);
}
}
public boolean isVisible() {
return visible;
}
public void setVisible(boolean visible) {
this.visible = visible;
update();
}
@Override
public boolean touchDown(BaseEntity entity, float x, float y) {
boolean returnValue = false;
synchronized (items) {
for (EntityMenuItem item : items) {
if (item.contains(x, y)) {
if (item.touchDown(x, y)) {
returnValue = true;
}
}
}
}
return returnValue;
}
@Override
public boolean touchUp(BaseEntity entity, float x, float y) {
boolean returnValue = false;
synchronized (items) {
for (EntityMenuItem item : items) {
if (item.contains(x, y)) {
if (item.touchUp(x, y)) {
returnValue = true;
}
}
}
}
return returnValue;
}
@Override
public boolean clicked(BaseEntity entity, float x, float y) {
boolean returnValue = false;
synchronized (items) {
for (EntityMenuItem item : items) {
if (item.contains(x, y)) {
if (item.clicked(x, y)) {
returnValue = true;
}
}
}
}
return returnValue;
}
@Override
public boolean dragged(BaseEntity entity, float x, float y, float offX, float offY) {
boolean returnValue = false;
synchronized (items) {
for (EntityMenuItem item : items) {
if (item.contains(x, y)) {
if (item.dragged(x, y)) {
returnValue = true;
}
}
}
}
return returnValue;
}
@Override
public void selected(BaseEntity entity) {
// TODO Auto-generated method stub
}
@Override
public void unSelected(BaseEntity entity) {
// TODO Auto-generated method stub
}
public boolean contains(float x, float y) {
boolean returnValue = false;
synchronized (items) {
for (EntityMenuItem item : items) {
if (item.contains(x, y)) {
returnValue = true;
}
}
}
return returnValue;
}
}
|
[
"joey.enfield@gmail.com"
] |
joey.enfield@gmail.com
|
165486f22a725c6093e190d24e8e01bb8d0eefa8
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/MATH-81b-3-10-Single_Objective_GGA-WeightedSum/org/apache/commons/math/linear/EigenDecompositionImpl_ESTest_scaffolding.java
|
a232ce56163e20b4204ea96a8236975d89c9794f
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,096
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Mar 30 14:45:46 UTC 2020
*/
package org.apache.commons.math.linear;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class EigenDecompositionImpl_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.linear.EigenDecompositionImpl";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(EigenDecompositionImpl_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.math.MathException",
"org.apache.commons.math.linear.EigenDecompositionImpl",
"org.apache.commons.math.linear.DecompositionSolver",
"org.apache.commons.math.ConvergenceException",
"org.apache.commons.math.linear.AnyMatrix",
"org.apache.commons.math.MathRuntimeException",
"org.apache.commons.math.linear.InvalidMatrixException",
"org.apache.commons.math.linear.RealVector",
"org.apache.commons.math.MathRuntimeException$1",
"org.apache.commons.math.linear.RealMatrix",
"org.apache.commons.math.MathRuntimeException$2",
"org.apache.commons.math.MaxIterationsExceededException",
"org.apache.commons.math.MathRuntimeException$3",
"org.apache.commons.math.MathRuntimeException$4",
"org.apache.commons.math.MathRuntimeException$5",
"org.apache.commons.math.linear.EigenDecomposition",
"org.apache.commons.math.MathRuntimeException$6",
"org.apache.commons.math.MathRuntimeException$7",
"org.apache.commons.math.MathRuntimeException$8",
"org.apache.commons.math.MathRuntimeException$10",
"org.apache.commons.math.MathRuntimeException$9"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
db1f54e94ea4a23ded7126ffb15177cb0976535e
|
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
|
/src/chosun/ciis/ss/sls/rdr/ds/SS_A_VSCDDataSet.java
|
74f802b505471df6eceee9f18e47f05d28ffada7
|
[] |
no_license
|
nosmoon/misdevteam
|
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
|
1829d5bd489eb6dd307ca244f0e183a31a1de773
|
refs/heads/master
| 2020-04-15T15:57:05.480056
| 2019-01-10T01:12:01
| 2019-01-10T01:12:01
| 164,812,547
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 2,786
|
java
|
/***************************************************************************************************
* ํ์ผ๋ช
: SS_A_VSCDDataSet.java
* ๊ธฐ๋ฅ : ๋
์ํํฉ-VacationStop-๋ฑ๋ก,์์ ,์ญ์ ๋ฅผ ์ํ DataSet
* ์์ฑ์ผ์ : 2004-03-20
* ์์ฑ์ : ๊น๋์ญ
***************************************************************************************************/
/***************************************************************************************************
* ์์ ๋ด์ญ :
* ์์ ์ :
* ์์ ์ผ์ :
* ๋ฐฑ์
:
***************************************************************************************************/
package chosun.ciis.ss.sls.rdr.ds;
import java.sql.*;
import java.util.*;
import somo.framework.db.*;
import somo.framework.util.*;
import chosun.ciis.ss.sls.rdr.dm.*;
import chosun.ciis.ss.sls.rdr.rec.*;
/**
* ๋
์ํํฉ-VacationStop-๋ฑ๋ก,์์ ,์ญ์ ๋ฅผ ์ํ DataSet
*/
public class SS_A_VSCDDataSet extends somo.framework.db.BaseDataSet implements java.io.Serializable{
public String errcode;
public String errmsg;
public SS_A_VSCDDataSet(){}
public SS_A_VSCDDataSet(String errcode, String errmsg){
this.errcode = errcode;
this.errmsg = errmsg;
}
public void setErrcode(String errcode){
this.errcode = errcode;
}
public void setErrmsg(String errmsg){
this.errmsg = errmsg;
}
public String getErrcode(){
return this.errcode;
}
public String getErrmsg(){
return this.errmsg;
}
public void getValues(CallableStatement cstmt) throws SQLException{
this.errcode = Util.checkString(cstmt.getString(1));
this.errmsg = Util.checkString(cstmt.getString(2));
}
}/*----------------------------------------------------------------------------------------------------
Web Tier์์ DataSet ๊ฐ์ฒด ๊ด๋ จ ์ฝ๋ ์์ฑ์ ์ฌ์ฉํ์ญ์์ค.
<%
SS_A_VSCDDataSet ds = (SS_A_VSCDDataSet)request.getAttribute("ds");
%>
Web Tier์์ Record ๊ฐ์ฒด ๊ด๋ จ ์ฝ๋ ์์ฑ์ ์ฌ์ฉํ์ญ์์ค.
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier์์ DataSet ๊ฐ์ฒด์ <%= %> ์์ฑ์ ์ฌ์ฉํ์ญ์์ค.
<%= ds.getErrcode()%>
<%= ds.getErrmsg()%>
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier์์ Record ๊ฐ์ฒด์ <%= %> ์์ฑ์ ์ฌ์ฉํ์ญ์์ค.
----------------------------------------------------------------------------------------------------*/
/* ์์ฑ์๊ฐ : Mon Mar 29 11:39:03 KST 2004 */
|
[
"DLCOM000@172.16.30.11"
] |
DLCOM000@172.16.30.11
|
31fc34c0c1c441ed48cc6062b1f899b2ffd0689f
|
2ad5236ca6679a98f60219982dbc3d728ee1b1e4
|
/Me/Me/Global/FrameWorkSource/Java/Framework/Presentation/Web/Ajax/JMaki/Utils/MenuYahooWidgetsExt.java
|
b7aca866d228dfe5f8bf1a8a46b3b4251188e263
|
[
"Apache-2.0"
] |
permissive
|
bydan/scode
|
2097ddcc41b33145812b560d8e102284961abfb9
|
4ac143d579437e969602ecc71575ca6e17fb21b9
|
refs/heads/master
| 2020-12-08T06:54:41.010177
| 2016-08-31T19:08:59
| 2016-08-31T19:08:59
| 67,065,627
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,956
|
java
|
package ByDan.Framework.Presentation.Web.Ajax.JMaki.Utils;
import java.util.ArrayList;
import ByDan.Seguridad.Business.Entities.Usuario;
import ByDan.Seguridad.Business.Entities.Funcionalidad;
public class MenuYahooWidgetsExt {
static String startKey="{";
static String endKey="}";
MenuAuxYahooWidgetsExt auxMenuYahoo;
public static void StartCreateMenu(StringBuilder tableAjax)
{
tableAjax.append(startKey);
}
public static void EndCreateMenu(StringBuilder tableAjax)
{
tableAjax.append(endKey);
}
public static String TraerPaginas(ArrayList<Funcionalidad> paginas)
{
StringBuilder tableAjax=new StringBuilder();
Integer count=1;
StartCreateMenu(tableAjax) ;
for(Funcionalidad pagina:paginas)
{
MenuAuxYahooWidgetsExt auxMenuYahoo=new MenuAuxYahooWidgetsExt();
if(count.equals(1))
{
auxMenuYahoo.setEsInicio(true);
}
auxMenuYahoo.setLabel(pagina.getField_strNombre());
auxMenuYahoo.setUrl(pagina.getField_strPath());
if(count.equals(paginas.size()))
{
auxMenuYahoo.setEsUltimo(true);
}
auxMenuYahoo.buildMenu(tableAjax);
count++;
}
EndCreateMenu(tableAjax) ;
return tableAjax.toString();
}
public static String TraerUsuarios(ArrayList<Usuario> usuarios)
{
StringBuilder tableAjax=new StringBuilder();
Integer count=1;
StartCreateMenu(tableAjax) ;
for(Usuario usuario:usuarios)
{
MenuAuxYahooWidgetsExt auxMenuYahoo=new MenuAuxYahooWidgetsExt();
if(count.equals(1))
{
auxMenuYahoo.setEsInicio(true);
}
//auxMenuYahoo.setLabel(usuario.getNombre());
//auxMenuYahoo.setUrl(usuario.getClave());
if(count.equals(usuarios.size()))
{
auxMenuYahoo.setEsUltimo(true);
}
auxMenuYahoo.buildMenu(tableAjax);
count++;
}
EndCreateMenu(tableAjax) ;
return tableAjax.toString();
}
public static String TraerUsuariosHijos(ArrayList<Usuario> usuarios)
{
StringBuilder tableAjax=new StringBuilder();
Integer count=1;
StartCreateMenu(tableAjax) ;
ArrayList<MenuAuxYahooWidgetsExt> auxMenusYahoo= new ArrayList<MenuAuxYahooWidgetsExt>();
MenuAuxYahooWidgetsExt auxMenuYahoo=new MenuAuxYahooWidgetsExt();
auxMenuYahoo.setLabel("test");
auxMenuYahoo.setUrl("test");
auxMenuYahoo.setEsInicio(true);
auxMenuYahoo.setEsUltimo(true);
for(Usuario usuario:usuarios)
{
MenuAuxYahooWidgetsExt auxMenuYahoo1=new MenuAuxYahooWidgetsExt();
//auxMenuYahoo1.setLabel(usuario.getNombre());
//auxMenuYahoo1.setUrl(usuario.getClave());
auxMenusYahoo.add(auxMenuYahoo1);
count++;
}
auxMenuYahoo.setAuxMenusYahoo(auxMenusYahoo);
auxMenuYahoo.buildMenu(tableAjax);
EndCreateMenu(tableAjax) ;
return tableAjax.toString();
}
public static String TraerPaginasPadresHijos(ArrayList<Funcionalidad> paginas)
{
StringBuilder tableAjax=new StringBuilder();
Integer count=1;
StartCreateMenu(tableAjax) ;
ArrayList<MenuAuxYahooWidgetsExt> auxMenusYahoo= new ArrayList<MenuAuxYahooWidgetsExt>();
MenuAuxYahooWidgetsExt auxMenuYahoo=new MenuAuxYahooWidgetsExt();
auxMenuYahoo.setLabel("test");
auxMenuYahoo.setUrl("test");
auxMenuYahoo.setEsInicio(true);
auxMenuYahoo.setEsUltimo(true);
for(Funcionalidad pagina:paginas)
{
MenuAuxYahooWidgetsExt auxMenuYahoo1=new MenuAuxYahooWidgetsExt();
auxMenuYahoo1.setLabel(pagina.getField_strNombre());
auxMenuYahoo1.setUrl(pagina.getField_strPath());
auxMenusYahoo.add(auxMenuYahoo1);
count++;
}
auxMenuYahoo.setAuxMenusYahoo(auxMenusYahoo);
auxMenuYahoo.buildMenu(tableAjax);
EndCreateMenu(tableAjax) ;
return tableAjax.toString();
}
}
|
[
"byrondanilo10@hotmail.com"
] |
byrondanilo10@hotmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.