blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
6c6e37f08ff519ee74d273ddcb3f67ec52aa60c1
76d622162471dbdd648ce2ae155af0e0a2992288
/CoreComponents/src/com/enterprise/core/data/search/criteria/PredicateCustomExpr.java
9664ebef02930073528693239deabff8b2ea6b77
[]
no_license
cretzanu/Core
89d84b6967b8d3d1ba35e68d7d0f9ad03d1f91d7
7f96f38c2fedb8bfff70d1b7b52876b67a2122c8
refs/heads/master
2021-01-10T19:23:08.122656
2014-09-26T14:27:18
2014-09-26T14:27:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,342
java
package com.enterprise.core.data.search.criteria; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import javax.persistence.Query; public class PredicateCustomExpr extends Predicate { private Map<String,Object> values; private String operandExpr; public PredicateCustomExpr(String operandExpr ) { super(); this.operandExpr=operandExpr; } @Override public Object getValue() { // Need this for the engine to take it into account!!! return values!=null; } public String buildQueryParam() { return this.getLogicalOperator().toString() + this.operandExpr; } public void setQueryParam(Query q) { Iterator<Entry<String, Object>> it = values.entrySet().iterator(); while (it.hasNext()) { Entry<String, Object> pairs = it.next(); logger.debug("param {}:{}",pairs.getKey(), pairs.getValue()); q.setParameter(pairs.getKey(), pairs.getValue()); } } public Map<String, Object> getValues() { return values; } public void setValues(Map<String, Object> values) { this.values = values; } public String getOperandExpr() { return operandExpr; } public void setOperandExpr(String operandExpr) { this.operandExpr = operandExpr; } }
[ "liviugabriel.cretu@gmail.com" ]
liviugabriel.cretu@gmail.com
15598784f3f8b07cea13e3c4453a22f9e9a2e858
9672d5b9ece53615eb0f31e1b54abcf887544253
/sdkplugin/src/main/java/com/lion/plugin/sdkplugin/sdk/manager/PesudoUniqueIDMananger.java
7030015020c1cb068f35c573fb856bcb04d71b08
[]
no_license
YangRichardLee/SDKPlugin
a6b3c4b39bc3953ed1229b9e1161bb2a467282c6
6b755c3a23a5e61b846b1da8e18e3b5178596239
refs/heads/master
2023-02-05T08:48:31.061086
2020-11-30T07:25:17
2020-11-30T07:25:17
317,139,863
0
0
null
null
null
null
UTF-8
Java
false
false
4,570
java
package com.lion.plugin.sdkplugin.sdk.manager; import android.os.Environment; import android.text.TextUtils; import android.util.Base64; import android.util.Log; import com.lion.plugin.sdkplugin.sdk.constants.SPConstants; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; import java.io.InputStreamReader; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; public class PesudoUniqueIDMananger { private static final String TAG = PesudoUniqueIDMananger.class.getName(); private static PesudoUniqueIDMananger mInstance; private PesudoUniqueIDMananger() { } public static PesudoUniqueIDMananger getInstance() { if (mInstance == null) { synchronized (PesudoUniqueIDMananger.class) { if (mInstance == null) { mInstance = new PesudoUniqueIDMananger(); } } } return mInstance; } private static final String ACCOUNT_FILE_NAME = SPConstants.GM_USER_ONLYID_PESUDOUNIQUEID_FILE; private String mFilePath; private String pesudouniqueID = ""; public void savePesudoUniqueID(String id) { saveIdToFile(id); } public String getPesudoUniqueID(){ if (pesudouniqueID.isEmpty()){ pesudouniqueID = getIdFromFile(); } return pesudouniqueID; } private String getIdFromFile() { File file = new File(getFilePath()); String id = ""; String contentBase64 = null; BufferedReader reader = null; if (!file.exists()) { Log.w(TAG, "file account is emtpy !!!"); return ""; } try { StringBuilder sb = new StringBuilder(); reader = new BufferedReader(new InputStreamReader(new FileInputStream(file))); String line; if ((line = reader.readLine()) != null) { sb.append(line); while ((line = reader.readLine()) != null) { sb.append(System.getProperty("line.separator")).append(line); } } reader.close(); contentBase64 = sb.toString(); } catch (Exception e) { e.printStackTrace(); return ""; } if (TextUtils.isEmpty(contentBase64)) { Log.w(TAG, "file account is emtpy !!!"); return ""; } try { byte[] base64 = Base64.decode(contentBase64, Base64.DEFAULT); ByteArrayInputStream bais = new ByteArrayInputStream(base64); ObjectInputStream objs = new ObjectInputStream(bais); Object object = objs.readObject(); if (object instanceof String) { id = (String) object; } else { Log.w(TAG, "[getIdFromFile] read base64 can not convert to list !!!"); } } catch (Exception e) { Log.e(TAG, "[getIdFromFile] failed,", e); } return id; } private void saveIdToFile(String id) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(id); String contentBase64 = new String(Base64.encode(baos.toByteArray(), Base64.DEFAULT)); File file = new File(getFilePath()); if (!file.exists()) { File parentFile = file.getParentFile(); if (!parentFile.exists()) { parentFile.mkdirs(); } } BufferedWriter bw = new BufferedWriter(new FileWriter(file, false)); bw.write(contentBase64); bw.close(); } catch (Exception e) { Log.e(TAG, "[saveIdToFile] error,", e); } } private String getFilePath() { if (TextUtils.isEmpty(mFilePath)) { mFilePath = getSDCardPath() + ACCOUNT_FILE_NAME; } return mFilePath; } //获取SD卡根目录 private static String getSDCardPath() { boolean exist = isSDCardExist(); if (exist) { return Environment.getExternalStorageDirectory().getAbsolutePath(); } return "/sdcard/"; } private static boolean isSDCardExist() { return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED); } }
[ "liyang@gm88.com" ]
liyang@gm88.com
8e040e9dc4e6518f2ab11983ef3b06da2846201d
081d988c417e264173e8b6d923ae37437ff9da0a
/app/src/main/java/com/banmo/sweethomeclient/tool/DateTools.java
a3a0a3e2ca0c1857dccb6cf6cbcb82641178be3b
[]
no_license
lcmoxiao/SweetHomeClient
1537f17b162ddc474c5e6580dd66e5c00e62016f
9ce0579d45c57ce9bae9c56fef6d91c662b92bd5
refs/heads/master
2023-03-08T16:31:13.798216
2021-02-19T11:30:07
2021-02-19T11:30:07
330,308,173
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
package com.banmo.sweethomeclient.tool; import java.text.DateFormat; import java.util.Date; public class DateTools { public static String formatToDay(Date date) { return DateFormat.getDateInstance().format(date); } //日期格式化到年月日时分秒 public static String formatToSecond(Date date) { return DateFormat.getDateTimeInstance().format(date); } public static String getNowTimeToSecond() { return formatToSecond(new Date()); } }
[ "735763610@qq.com" ]
735763610@qq.com
b5a20bbed2d1198e1790756778ba528a016c5149
043a957c844b0a13d4023a5bf45d40d846e2bae4
/Sculpture.java
e2160220a37e0de243d422385359fab1f81a0772
[]
no_license
patschris/ArtifactJava
d796c242d642dca19148801e437d70f75db116a8
9012375b0413ee5c5414f84c4b1e6b36e1f66816
refs/heads/master
2020-03-23T03:25:21.002775
2018-09-26T11:46:48
2018-09-26T11:46:48
141,029,711
0
0
null
null
null
null
UTF-8
Java
false
false
1,215
java
public class Sculpture extends Masterpiece { /* * Sculpture's volume */ private int volume; /* * Sculpture's material (Iron, Stone, Wood) */ Material material; /* * Constructor of class "Sculpture" */ public Sculpture(int index, String creator, int year, Movement movement, Condition condition, int volume, Material material) { super(index, creator, year, movement, condition); this.volume = volume; this.material = material; } /* * Returns information about the sculpture's volume and material */ public void getInfo() { super.getInfo(); String s = "Sculpture's volume: " + volume; s += "\nSculpture's material: " + material.toString(); System.out.println(s); } /* * Sculpture's evaluation based on program arguments for desired movement and condition */ public boolean evaluate(Movement desiredMovement) { return evaluate(desiredMovement, Condition.EXCELLENT); } /* * Sculpture's evaluation based on program arguments for desired movement and condition */ public boolean evaluate(Movement desiredMovement, Condition desiredCondition) { if(desiredCondition == getCond() && desiredMovement == getMove()) { return true; } return false; } }
[ "chpatsouras@gmail.com" ]
chpatsouras@gmail.com
425447331a4b40e0608f2662f64ae1ca7582f26e
5e555cbfd31f9e6876b5c713230707f33ab8717f
/app/src/main/java/com/example/android/lagosgithubdeveloper/MainActivity.java
b15b316a34bb1f3f0a9a4f5635c98ffc32269d22
[]
no_license
Saintiano/lagos-developers
a80129d12f829a7184f03f0387682de8ed2520db
9f994e085966371d97d96c8d82b177f4431e47de
refs/heads/master
2021-01-20T11:46:35.313554
2017-08-28T21:33:47
2017-08-28T21:33:47
101,687,676
0
0
null
null
null
null
UTF-8
Java
false
false
2,812
java
package com.example.android.lagosgithubdeveloper; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import java.util.Timer; import java.util.TimerTask; public class MainActivity extends AppCompatActivity { Button findDevelopers; Button viewDevelopers; Intent intent, intent2; ViewPager viewPager; SliderAdapter adapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); viewPager = (ViewPager) findViewById(R.id.viewpager); adapter = new SliderAdapter(this); viewPager.setAdapter(adapter); addListenerOnButton(); Timer timer = new Timer(); timer.scheduleAtFixedRate(new MyTimerTask(), 2000,4000); } public void addListenerOnButton(){ final Context context = this; findDevelopers = (Button) findViewById(R.id.find); viewDevelopers = (Button) findViewById(R.id.pull); findDevelopers.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { intent = new Intent(MainActivity.this, DeveloperFinder.class); startActivity(intent); } }); viewDevelopers.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v) { intent2 = new Intent(MainActivity.this, LagosActivity.class); startActivity(intent2); } }); } public class MyTimerTask extends TimerTask{ @Override public void run() { MainActivity.this.runOnUiThread(new Runnable() { @Override public void run() { if (viewPager.getCurrentItem() == 0){ viewPager.setCurrentItem(2); } else if (viewPager.getCurrentItem() == 2){ viewPager.setCurrentItem(3); } else if (viewPager.getCurrentItem() == 3){ viewPager.setCurrentItem(1); } else if (viewPager.getCurrentItem() == 1){ viewPager.setCurrentItem(4); } else if (viewPager.getCurrentItem() == 4){ viewPager.setCurrentItem(5); } else { viewPager.setCurrentItem(1); } } }); } } }
[ "saintiano@gmail.com" ]
saintiano@gmail.com
f8090db17e40ae3fff629b2360283d9fc89de08d
dc782192b597077db2e233fb2fe355e774b4a621
/src/main/java/ods/raidplanner/dto/EventDTO.java
9ffc1f9136f800b91ce4613e19e8fe7e48bd5619
[]
no_license
aleDanna/ods-raidplanner-rest
0de94b22978bfdb621a919080fe632917a66e789
07139ca1d78eddda025ea99c51c1d87a3ff87ec7
refs/heads/master
2023-03-16T18:17:07.328815
2020-08-23T14:42:56
2020-08-23T14:42:56
282,706,180
0
0
null
null
null
null
UTF-8
Java
false
false
140
java
package ods.raidplanner.dto; import lombok.Data; @Data public class EventDTO { private boolean recurrent; private RaidDTO raid; }
[ "alessio.danna.94@gmail.com" ]
alessio.danna.94@gmail.com
8e38735745c59780bdb35ba7cdded6a8b28532d0
25c30927aba0b9453864f8633b762967f49efce8
/base/src/main/java/com/workstation/android/BaseHomeActivity.java
83a819a8034db344f482a1502f745bbfa5e53049
[]
no_license
victorqin666/MwClientAndroid2
99458a71a4372a5a1c175e45fa6bef6f4e433cd6
724f2ab6d01fe5cee7fa257aae5fbf194392421a
refs/heads/master
2023-03-09T04:28:07.076899
2021-02-22T05:05:18
2021-02-22T05:05:18
340,593,696
0
0
null
null
null
null
UTF-8
Java
false
false
9,739
java
package com.workstation.android; import android.content.Intent; import android.content.pm.ActivityInfo; import android.graphics.PixelFormat; import android.net.Uri; import android.os.Bundle; import android.provider.Settings; import androidx.annotation.NonNull; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.WindowManager; import android.widget.FrameLayout; import android.widget.LinearLayout; import com.http.network.HttpConnectWork; import com.http.network.listener.OnResultDataListener; import com.http.network.model.RequestWork; import com.http.network.model.ResponseWork; import com.work.util.NetworkUtils; import com.work.util.ToastUtil; import com.workstation.listener.HomeWorkListener; import com.workstation.permission.PermissionsManager; import com.workstation.permission.PermissionsResultAction; import com.workstation.view.GraduallyTextView; import java.util.Locale; /** * Created by tangyx on 15/8/28. * */ public class BaseHomeActivity extends ToolBarActivity implements HomeWorkListener, OnResultDataListener{ public final static int FinishCode = -100000; public final static int TextSizeCode = - 200000; public String mThisClassName; private WindowManager mWindowManager = null; private View mProgressLayout = null; private GraduallyTextView mGraduallyTextView; /** * 提示框 */ public View mContentView; /** * 权限检查 */ @Override protected void onCreate(Bundle savedInstanceState) { //强制竖屏 // setRequestedOrientation(onScreenFlag()); super.onCreate(savedInstanceState); mContentView = onCustomContentView(); if(mContentView ==null){ int layoutId = onCustomContentId(); if(layoutId<=0){ layoutId = onInitContentView(); } if(layoutId>0){ mContentView = mInflater.inflate(layoutId, null); setContentView(mContentView); } } else { setContentView(mContentView); } try { onInitContentView(); onInitView(); onInitValue(); }catch (Exception e){ e.printStackTrace(); } } @Deprecated protected int onScreenFlag(){ return ActivityInfo.SCREEN_ORIENTATION_PORTRAIT; } /** * 初始化view */ protected int onInitContentView(){ mThisClassName = this.getClass().getSimpleName(); String resLayoutName = "activity_"+ mThisClassName.replaceFirst("Activity",""); resLayoutName = resLayoutName.toLowerCase(Locale.getDefault()); return getResources().getIdentifier(resLayoutName, "layout", getPackageName()); } /** * 控件初始化 */ @Override public void onInitView() throws Exception{ String resLayoutName = "activity_"+ mThisClassName.replaceFirst("Activity",""); resLayoutName = resLayoutName.toLowerCase(Locale.getDefault()); final int layoutId = getResources().getIdentifier(resLayoutName, "string", getPackageName()); if(layoutId>0){ setTitleName(layoutId); } } @Override public void onInitValue() throws Exception{ setStatusBar(); }; public void setStatusBar(){ // StatusBarUtil.setColor(this, ContextCompat.getColor(this,R.color.defaultColorPrimary),50); } @Override public View onCustomContentView() { return null; } @Override public int onCustomContentId() { return -1; } public void showProgressLoading(){ showProgressLoading(false); } public void showProgressLoading(boolean isOperation) { boolean isShowTitleBar = isShowTitleBar(); showProgressLoading(isOperation, null, 1000,isShowTitleBar); } public void showProgressLoading(boolean isOperation,boolean hiddenContentView){ showProgressLoading(isOperation, null, 500,hiddenContentView); } public void showProgressLoading(int resId) { showProgressLoading(getResources().getString(resId)); } public void showProgressLoading(String tips) { showProgressLoading(false, tips, 0,true); } @Override public void showProgressLoading(boolean isOperation, String tips, int delayMillis,boolean hiddenContentView) { if(mProgressLayout !=null || isFinishing()){ return; } mProgressLayout = LayoutInflater.from(this).inflate(R.layout.progress, null); mProgressLayout.setVisibility(View.GONE); mGraduallyTextView = mProgressLayout.findViewById(R.id.loading); WindowManager.LayoutParams lp; if(!isOperation){//不可点击屏幕其他地方 lp = new WindowManager.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.TYPE_APPLICATION, WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, PixelFormat.RGBA_8888); lp.gravity = Gravity.BOTTOM; }else{ lp = new WindowManager.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.TYPE_APPLICATION, WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, PixelFormat.RGBA_8888); lp.gravity = Gravity.CENTER; } if(hiddenContentView){ mContentView.setVisibility(View.INVISIBLE); }else{ mContentView.setVisibility(View.VISIBLE); LinearLayout mLayout = mProgressLayout.findViewById(R.id.m_layout); mLayout.setBackgroundResource(R.drawable.border_d00_bg_d00_5); } mWindowManager = this.getWindowManager(); mWindowManager.addView(mProgressLayout, lp); mProgressLayout.postDelayed(new Runnable() { @Override public void run() { if(mProgressLayout!=null && !isFinishing()){ mProgressLayout.setVisibility(View.VISIBLE); mGraduallyTextView.startLoading(); mGraduallyTextView.postDelayed(new Runnable() { @Override public void run() { dismissProgress(); } },1000 * 60); } } },delayMillis); } public boolean isShowProgress(){ return mWindowManager !=null && mProgressLayout !=null; } @Override public void dismissProgress(){ dismissProgress(false); } private void dismissProgress(final boolean isFinishActivity){ removeProgress(isFinishActivity); } private void removeProgress(boolean isFinishActivity){ if(mContentView.getVisibility() == View.INVISIBLE){ mContentView.setVisibility(View.VISIBLE); } if(mWindowManager !=null && mProgressLayout !=null){ mWindowManager.removeView(mProgressLayout); mProgressLayout = null; mGraduallyTextView.stopLoading(); mGraduallyTextView = null; if(isFinishActivity){ finish(); } } } private void checkNetwork(){ if(!NetworkUtils.isConnected(this)){ } } public boolean isAutoCloseProgress(){ return true; } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if(resultCode == FinishCode){ finish(); }else if(resultCode == TextSizeCode){ setResult(TextSizeCode); } } @Override public void onBackPressed() { onWindowFinish(); } public void onWindowFinish(){ finish(); } @Override public void onPermissionChecker(String[] permissions,PermissionsResultAction permissionsResultAction){ PermissionsManager.getInstance().requestPermissionsIfNecessaryForResult(this, permissions, permissionsResultAction); } @Override public boolean hasPermission(String[] permissions){ return PermissionsManager.getInstance().hasAllPermissions(this,permissions); } public void onIntentSetting(){ final String PACKAGE_URL_SCHEME = "package:"; // 方案 Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setData(Uri.parse(PACKAGE_URL_SCHEME + getPackageName())); startActivity(intent); } @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); PermissionsManager.getInstance().notifyPermissionsChange(permissions,grantResults); } @Override protected void onDestroy() { super.onDestroy(); } @Override public void onResult(RequestWork req, ResponseWork resp) throws Exception { onResultActivity(req,resp); } public void onResultActivity(RequestWork req, ResponseWork resp) throws Exception{ if(isAutoCloseProgress()){ dismissProgress(); } if(resp.getHttpCode() == HttpConnectWork.SocketCode){ ToastUtil.warning(this,R.string.tips_service_error); checkNetwork(); } } }
[ "660406@gdpr.com" ]
660406@gdpr.com
2ed3b45e0a0f4b9175f78ec49f7ed47e1fcb9984
6dd9b6a46e244b4d25c346ee2613f88b3b093cc5
/src/konto/data/DBUtil/ITransaktionDetail.java
195cacf228d46fc09abcb976448a5bf4bc29f451
[]
no_license
lukinoway/java-buchhaltung
83419b8ec57b1433593c77f56803eaaad8bf9447
1223d3a9dda45acf577a19e464b4a5295640c4d0
refs/heads/master
2022-05-04T04:52:07.093451
2016-06-04T09:54:54
2016-06-04T09:54:54
44,246,129
1
0
null
2022-03-30T22:04:45
2015-10-14T12:29:13
HTML
UTF-8
Java
false
false
448
java
package konto.data.DBUtil; import java.util.ArrayList; import konto.data.model.Transaktion; import konto.data.model.TransaktionDetail; public interface ITransaktionDetail { public void insertDetail(TransaktionDetail detail); public void updateDetail(TransaktionDetail detail); public void deleteDetail(int detailId); public ArrayList<TransaktionDetail> selectDetail(Transaktion transaktion); public void close(); }
[ "lukas.pichler@gmail.com" ]
lukas.pichler@gmail.com
fa3630588d9bae71ce8579fd057a636eb8e1c2f1
30f2c0cc14905b683f90f3fcbec9f2e77b7a40d5
/src/java/vn/com/telsoft/controller/NewsController.java
1d5477adb98ec827ee4742dcbaaec7749d19e860
[]
no_license
monsoc/wh_qldld
e5ff133d6cda1c8b2c0460632791773bdb387125
64d66a26971bc68dc626990b355856b6fc5058f7
refs/heads/master
2023-06-06T20:44:35.859040
2021-07-08T04:05:06
2021-07-08T04:05:06
383,988,440
0
0
null
null
null
null
UTF-8
Java
false
false
8,513
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package vn.com.telsoft.controller; import com.faplib.admin.security.User; import com.faplib.lib.ClientMessage; import com.faplib.lib.SystemLogger; import com.faplib.lib.TSFuncTemplate; import com.faplib.lib.admin.security.Authorizator; import com.faplib.lib.util.DataUtil; import com.faplib.lib.util.ResourceBundleUtil; import com.faplib.util.StringUtil; import java.io.Serializable; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.Map; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import javax.faces.context.FacesContext; import javax.faces.model.SelectItem; import org.apache.commons.lang3.StringUtils; import vn.com.telsoft.entity.News; import vn.com.telsoft.model.NewsModel; /** * * @author Chien Do Xo */ @ManagedBean(name = "NewsController") @ViewScoped public class NewsController extends TSFuncTemplate implements Serializable { private List<News> mlistNews; private List<News> mlistNewsFilterred; private News[] mselectedNews; private News mtmpNews; private boolean mbDeleteMany = false; private SelectItem[] statusOptions; public NewsController() { try { mlistNews = DataUtil.getData(NewsModel.class, "getListAll"); } catch (Exception ex) { SystemLogger.getLogger().error(ex); } } //////////////////////////////////////////////////////////////////////// public void doubleClickSelection() throws Exception { FacesContext context = FacesContext.getCurrentInstance(); Map<String, String> map = context.getExternalContext().getRequestParameterMap(); String strCell = map.get("row").trim(); if (!StringUtils.isEmpty(strCell)) { for (News tmpAttr : mlistNews) { if (String.valueOf(tmpAttr.getNewsId()).equals(strCell)) { changeStateView(tmpAttr); break; } } } } //////////////////////////////////////////////////////////////////////// @Override public void handOK() { if (isADD) { try { //Access database DataUtil.getStringData(NewsModel.class, "add", mtmpNews); //Access list mlistNews.add(0, new News(mtmpNews)); //Reset form changeStateAdd(); //Message to client ClientMessage.logAdd(); } catch (Exception ex) { if (ex.toString().contains("ORA-01461")) { ClientMessage.logErr(ClientMessage.MESSAGE_TYPE.ERR, ResourceBundleUtil.getCTObjectAsString("PP_NEWS", "content_too_large")); } else { ClientMessage.logErr(ClientMessage.MESSAGE_TYPE.ERR, ex.toString()); } SystemLogger.getLogger().error(ex); } } else { try { //Access database DataUtil.performAction(NewsModel.class, "edit", mtmpNews); //Message to client ClientMessage.logUpdate(); } catch (Exception ex) { if (ex.toString().contains("ORA-01461")) { ClientMessage.logErr(ClientMessage.MESSAGE_TYPE.ERR, ResourceBundleUtil.getCTObjectAsString("PP_NEWS", "content_too_large")); } else { ClientMessage.logErr(ClientMessage.MESSAGE_TYPE.ERR, ex.toString()); } SystemLogger.getLogger().error(ex); } } } //////////////////////////////////////////////////////////////////////// @Override public void handDelete() { try { //Access database if (mbDeleteMany) { //Get ids String strNewsId = ""; for (News tmp : mselectedNews) { strNewsId += tmp.getNewsId() + ","; } //Delete DataUtil.performAction(NewsModel.class, "delete", StringUtil.removeLastChar(strNewsId)); //Refresh for (int i = 0; i < mlistNews.size(); i++) { for (News tmp : mselectedNews) { if (mlistNews.get(i).getNewsId() == tmp.getNewsId()) { mlistNews.remove(i--); } } } } else { //Delete DataUtil.performAction(NewsModel.class, "delete", String.valueOf(mtmpNews.getNewsId())); //Refresh for (int i = 0; i < mlistNews.size(); i++) { if (mlistNews.get(i).getNewsId() == mtmpNews.getNewsId()) { mlistNews.remove(i); break; } } } //Message to client ClientMessage.logDelete(); } catch (Exception ex) { SystemLogger.getLogger().error(ex); ClientMessage.logErr(ClientMessage.MESSAGE_TYPE.ERR, ex.toString()); } } //////////////////////////////////////////////////////////////////////// public String dateToString(Date input) { if (input == null) { return ""; } SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss"); return df.format(input); } //////////////////////////////////////////////////////////////////////// @Override public void changeStateAdd() { super.changeStateAdd(); mtmpNews = new News(); mtmpNews.setCreatedDate(new Date()); mtmpNews.setCreatedId(Long.parseLong(User.getUserLogged().getUserId())); mtmpNews.setCreatedName(User.getUserLogged().getUserName()); } //////////////////////////////////////////////////////////////////////// public void changeStateView(News ett) { super.changeStateView(); mtmpNews = ett; } //////////////////////////////////////////////////////////////////////// public void changeStateEdit(News ett) { super.changeStateEdit(); mtmpNews = ett; mtmpNews.setModifiedDate(new Date()); mtmpNews.setModifiedId(Long.parseLong(User.getUserLogged().getUserId())); mtmpNews.setModifiedName(User.getUserLogged().getUserName()); } //////////////////////////////////////////////////////////////////////// public void changeStateDel(News ett) { super.changeStateDel(); mbDeleteMany = false; mtmpNews = new News(ett); } //////////////////////////////////////////////////////////////////////// public void changeStateDelMany() { super.changeStateDel(); mbDeleteMany = true; } //////////////////////////////////////////////////////////////////////// public boolean getPermission(String strRight) { boolean bReturnValue = false; try { bReturnValue = Authorizator.checkAuthorizator().contains(strRight); } catch (Exception ex) { SystemLogger.getLogger().error(ex); } return bReturnValue; } //////////////////////////////////////////////////////////////////////// //Setters, Gettters public List<News> getMlistNews() { return mlistNews; } public List<News> getMlistNewsFilterred() { return mlistNewsFilterred; } public void setMlistNewsFilterred(List<News> mlistNewsFilterred) { this.mlistNewsFilterred = mlistNewsFilterred; } public News[] getMselectedNews() { return mselectedNews; } public void setMselectedNews(News[] mselectedNews) { this.mselectedNews = mselectedNews; } public News getMtmpNews() { return mtmpNews; } public void setMtmpNews(News mtmpNews) { this.mtmpNews = mtmpNews; } public boolean isMbDeleteMany() { return mbDeleteMany; } public void setMbDeleteMany(boolean mbDeleteMany) { this.mbDeleteMany = mbDeleteMany; } public SelectItem[] getStatusOptions() { return statusOptions; } public void setStatusOptions(SelectItem[] statusOptions) { this.statusOptions = statusOptions; } }
[ "dev_panda@xyz.com" ]
dev_panda@xyz.com
61157a8b27ed9b11ba48cccdcdbfb5fcf70ecf03
f8f22f12156768d16c68f077c254c8942dfde8c7
/src/Paragraph.java
f15104ec056ae2da234d5a235123a350b350e230
[]
no_license
denisatimis99/Sp-Lab
f14ba7b4a1463e289fb7bbe869cebd17573995f5
28e87fa5430a6d881c0b8d0c879722bcf73a74fd
refs/heads/master
2023-01-09T16:32:57.068021
2020-11-04T09:12:19
2020-11-04T09:12:19
301,966,484
0
0
null
null
null
null
UTF-8
Java
false
false
382
java
public class Paragraph implements Element{ private String text; private AlignStrategy textAlignment; Paragraph (String text) { this.text=text; } public void print() { System.out.print("Paragraph: " + this.text); } public void setTextAlignment(AlignStrategy textAlignment) { this.textAlignment = textAlignment; } }
[ "timisdenisaioana@yahoo.com" ]
timisdenisaioana@yahoo.com
7b42fab4bf0c0b4e2203fb46db1291ee7cdecb81
ccc65488101c13c23b40f9295fefc2d91f251535
/src/com/company/Smok.java
ea916fa834e8cf771eb348dfd4eac976cfec879f
[]
no_license
Daw990/Turn-based-Game
daca61740163fb2c8c3016fa2b4f289d32e5bc52
3ce2d01711007ea1bfb626b97b56ae6816e358ca
refs/heads/master
2023-03-23T01:29:10.715445
2021-03-04T12:32:56
2021-03-04T12:32:56
200,727,757
0
0
null
null
null
null
UTF-8
Java
false
false
1,126
java
package com.company; import jdk.swing.interop.SwingInterOpUtils; public class Smok extends klasa { Smok(){ } Smok(double Hp, double Str, double intelligence, int licznikSkill1, int licznikSkill2){ super(Hp, Str, intelligence, licznikSkill1, licznikSkill2); } void SmokDie(){ System.out.println("Brawo zabiłeś Smoka!"); } void SmokUltimate(){ System.out.println("BOSS ULTIMATE!! Wzbijając sie w powietrze zadaje 150pkt obrazen!"); } void SmokUltimateOdbite(){ System.out.println("Ogroma Kula ognia odbija sie od potężnego zaklęcia czarodzieja! i uderza w prost w jej właścicieala zadajac 150 obrażeń!"); } double UltiSmok(double dmg){ return dmg; } @Override protected void opis() { System.out.println("BOSS! Napotykasz na swojej drodze Ogromnego Smoka! wielkie jak twoj miecz kły, łuski grube niczym mur, do boju!" + "UWAGA!! CO 3 TURA SPECJALNY ATAK SMOKA! SMOK TEZ ATAKUJE KRYTYCZNIE!"); System.out.println("UWAGA!! PRZY BOSSIE ATAKI SPECJALNE ODNAWIAJA SIE CO 3 TURY"); } }
[ "dawid.990m@gmail.com" ]
dawid.990m@gmail.com
0b8657852a91938b2704f402bd9c3e59040c18e8
d382cd0d0956a76f2fc9ab5a431ed9638e0bc927
/src/main/java/com/yw/ldap/MyRouteBuilder.java
084a518d67ff7994b0979bb48142624a770cd242
[]
no_license
stewchicken/ldapcamel
c083b212f3ccacc4fc74f3f1deabe2d6ca0815e1
82f0ffbc7a6ac288a8f4ed969f5774aecb648f36
refs/heads/master
2021-01-13T06:01:02.502923
2017-06-21T20:07:34
2017-06-21T20:07:34
95,039,252
0
1
null
null
null
null
UTF-8
Java
false
false
3,077
java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with this * work for additional information regarding copyright ownership. The ASF * licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.yw.ldap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.camel.Endpoint; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.jetty.JettyHttpComponent; import org.apache.camel.spring.Main; import org.apache.camel.util.jsse.KeyManagersParameters; import org.apache.camel.util.jsse.KeyStoreParameters; import org.apache.camel.util.jsse.SSLContextParameters; /** * A Camel Router */ public class MyRouteBuilder extends RouteBuilder { com.yw.ldap.LdapService ldapService; private static final Logger log = LoggerFactory.getLogger(MyRouteBuilder.class); public LdapService getLdapService() { return ldapService; } public void setLdapService(LdapService ldapService) { this.ldapService = ldapService; } /** * A main() so we can easily run these routing rules in our IDE */ public static void main(String... args) throws Exception { Main.main(args); } /** * Let's configure the Camel routing rules using Java code... */ private void setupHttpsRestService() throws Exception { //prepare one way SSL for fuse server KeyStoreParameters ksp = new KeyStoreParameters(); ksp.setResource("<PATH TO KEYSTORE FILE (.jks)>"); ksp.setPassword("<PASSWORD OF KEYSTORE>"); KeyManagersParameters kmp = new KeyManagersParameters(); kmp.setKeyStore(ksp); kmp.setKeyPassword("<PASSWORD OF KEY>"); SSLContextParameters scp = new SSLContextParameters(); scp.setKeyManagers(kmp); JettyHttpComponent jetty = this.getContext().getComponent("jetty", JettyHttpComponent.class); jetty.setSslContextParameters(scp); //set up route final Endpoint jettyEndpoint = jetty.createEndpoint("jetty:https://<FUSE>:<PORT>/service"); from(jettyEndpoint).process(new MyBookService()); } public void configure() { try { from("direct-vm:fromldapx").to("ldap:ldapserver?base=OU=xx,OU=xxx,DC=xx,DC=xx,DC=xx"); setupHttpsRestService(); } catch (Exception ex) { log.error(ex.getMessage()); } } }
[ "stewchicken@gmail.com" ]
stewchicken@gmail.com
3e34bba49f799400316cd2b6b0eaeaba90720085
37eff69549391da7d960cbc2745f27600554efa7
/6th-week.java/src/TwoDimensionalShape.java
7e15f5ed09118731f180fa4e925dcb96ad5a550c
[]
no_license
Jay-Ppark/Java
5d99c21737c7d968b44ac6265d761913440964bc
d8910ebd25e82fffc521b10ac960046d57f97e8e
refs/heads/master
2021-11-23T15:37:56.725002
2021-11-18T01:17:01
2021-11-18T01:17:01
102,059,425
0
0
null
null
null
null
UTF-8
Java
false
false
1,576
java
/** * @author ailab * Create class of 2DShape and can be subclassed. */ public abstract class TwoDimensionalShape implements Comparable<TwoDimensionalShape>, Sizable { private static final String CLASS_NAME = "2D Shape"; private String name; private double dimension1; private double dimension2; // Constructor public TwoDimensionalShape() { } public TwoDimensionalShape(String name, double d1, double d2) { setName(name); setDimension1(d1); setDimension2(d2); } // Get class name public String getClassName() { return CLASS_NAME; } // Get & set name public String getName() { return name; } public void setName(String name) { this.name = name; } // Get & set methods for dimension 1 public double getDimension1() { return dimension1; } public void setDimension1(double dimension1) { this.dimension1 = dimension1; } // Get & set methods for dimension 2 public double getDimension2() { return dimension2; } public void setDimension2(double dimension2) { this.dimension2 = dimension2; } // Don't know the kind of current shape // must be implement in subclass (Override) public abstract double getArea(); public int compareTo(TwoDimensionalShape otherShape) { double val; val = getArea() - otherShape.getArea(); if (val > 0) { return 1; } else if (val < 0) { return -1; } return 0; } @Override public String toString() { return String.format("%s is a [%s]", getName(), getClassName()); } }
[ "ajtnlaka456@naver.com" ]
ajtnlaka456@naver.com
f79ebbf29e184c18fafcc8839e00f3c18c72b92b
f7a8c7ac7b0b560ac3f295288957169c86c0a9b6
/lib_network/src/main/java/com/njh/network/exception/ApiException.java
dc92a2f6a28cdd9829e9cbd52f03c17c274cc5f8
[]
no_license
HeroLBJ/DaChengCar
93027d7a29f12f9b1fa0e2bc5550260962e41c92
b3172f632351a6fcac397273b1553719b2202b36
refs/heads/master
2020-05-07T13:43:27.036761
2019-04-29T06:08:18
2019-04-29T06:08:18
180,559,875
0
0
null
null
null
null
UTF-8
Java
false
false
819
java
package com.njh.network.exception; /** * api接口错误/异常统一处理类 * 异常=[程序异常,网络异常,解析异常..] * 错误=[接口逻辑错误eg:{code:-101,msg:账号密码错误}] * * @author niejiahuan */ public class ApiException extends Exception { private int code;//错误码 private String msg;//错误信息 public ApiException(Throwable throwable, int code) { super(throwable); this.code = code; } public ApiException(int code, String msg) { this.code = code; this.msg = msg; } public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } }
[ "617416791@qq.com" ]
617416791@qq.com
e898a76655ea243c38f6ac97170183b743b789a3
3761d8b08b4f147bfe169737ba605ccdfa7aa838
/cloud-eureka-server7002/src/main/java/com/heitaoc/springcloud/Eureka2Application.java
bee4c4b7a2e7429cf2c1223b1c6e9ec77af286cd
[]
no_license
HEITAOCHAO/springcloud2020
356fff4e484f02b32d681ed1d9176406788f2bc3
5d0003baa0a5b966c4d7d7f7c5164318562adab5
refs/heads/master
2022-07-16T00:11:14.917600
2020-07-04T00:32:53
2020-07-04T00:32:53
249,933,988
2
0
null
2022-06-21T03:06:27
2020-03-25T09:16:06
Java
UTF-8
Java
false
false
474
java
package com.heitaoc.springcloud; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; /** * @Author: 郭超 * @DateTime: 2020/3/25 22:28 */ @SpringBootApplication @EnableEurekaServer public class Eureka2Application { public static void main(String[] args) { SpringApplication.run(Eureka2Application.class); } }
[ "1185597412@qq.ocm" ]
1185597412@qq.ocm
b169ef0b921fdc2413e17bb0b3b928f4d9a044bf
d7fe9da4d78acf8019dfa0fe26d5b05d8b049bf0
/MobileQuizScuola-portlet/docroot/WEB-INF/src/it/quizscuola/portlet/service/http/RispostaServiceSoap.java
0f8229b934e70690c1cd498952ace90c635486df
[]
no_license
salvonapo1972/QuizManager
9ae9cf1e720ff50400b401de5c18690422c1331f
71696206fd1d500aa7e5cb259d077454e2e1c408
refs/heads/master
2021-09-27T14:57:51.909346
2021-09-19T16:40:09
2021-09-19T16:40:09
66,702,007
0
0
null
2021-09-19T17:27:31
2016-08-27T07:28:50
Java
UTF-8
Java
false
false
4,770
java
/** * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package it.quizscuola.portlet.service.http; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import it.quizscuola.portlet.service.RispostaServiceUtil; import java.rmi.RemoteException; /** * Provides the SOAP utility for the * {@link it.quizscuola.portlet.service.RispostaServiceUtil} service utility. The * static methods of this class calls the same methods of the service utility. * However, the signatures are different because it is difficult for SOAP to * support certain types. * * <p> * ServiceBuilder follows certain rules in translating the methods. For example, * if the method in the service utility returns a {@link java.util.List}, that * is translated to an array of {@link it.quizscuola.portlet.model.RispostaSoap}. * If the method in the service utility returns a * {@link it.quizscuola.portlet.model.Risposta}, that is translated to a * {@link it.quizscuola.portlet.model.RispostaSoap}. Methods that SOAP cannot * safely wire are skipped. * </p> * * <p> * The benefits of using the SOAP utility is that it is cross platform * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and * even Perl, to call the generated services. One drawback of SOAP is that it is * slow because it needs to serialize all calls into a text format (XML). * </p> * * <p> * You can see a list of services at http://localhost:8080/api/axis. Set the * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure * security. * </p> * * <p> * The SOAP utility is only generated for remote services. * </p> * * @author Salvatore * @see RispostaServiceHttp * @see it.quizscuola.portlet.model.RispostaSoap * @see it.quizscuola.portlet.service.RispostaServiceUtil * @generated */ public class RispostaServiceSoap { public static it.quizscuola.portlet.model.RispostaSoap addRisposta( com.liferay.portal.service.ServiceContext ctx, java.lang.String descRisposta, boolean esatta, long idDomanda) throws RemoteException { try { it.quizscuola.portlet.model.Risposta returnValue = RispostaServiceUtil.addRisposta(ctx, descRisposta, esatta, idDomanda); return it.quizscuola.portlet.model.RispostaSoap.toSoapModel(returnValue); } catch (Exception e) { _log.error(e, e); throw new RemoteException(e.getMessage()); } } public static java.lang.String getRisultati(long idUtente, long idArgomento) throws RemoteException { try { com.liferay.portal.kernel.json.JSONArray returnValue = RispostaServiceUtil.getRisultati(idUtente, idArgomento); return returnValue.toString(); } catch (Exception e) { _log.error(e, e); throw new RemoteException(e.getMessage()); } } public static java.lang.String getRisultatiDomande(long idUtente, long idArgomento) throws RemoteException { try { com.liferay.portal.kernel.json.JSONObject returnValue = RispostaServiceUtil.getRisultatiDomande(idUtente, idArgomento); return returnValue.toString(); } catch (Exception e) { _log.error(e, e); throw new RemoteException(e.getMessage()); } } public static it.quizscuola.portlet.model.RispostaSoap[] getRispostas( long idDomanda) throws RemoteException { try { java.util.List<it.quizscuola.portlet.model.Risposta> returnValue = RispostaServiceUtil.getRispostas(idDomanda); return it.quizscuola.portlet.model.RispostaSoap.toSoapModels(returnValue); } catch (Exception e) { _log.error(e, e); throw new RemoteException(e.getMessage()); } } public static it.quizscuola.portlet.model.RispostaSoap updateRisposta( com.liferay.portal.service.ServiceContext ctx, long idDomanda, long idRisposta, java.lang.String descRisposta, boolean esatta) throws RemoteException { try { it.quizscuola.portlet.model.Risposta returnValue = RispostaServiceUtil.updateRisposta(ctx, idDomanda, idRisposta, descRisposta, esatta); return it.quizscuola.portlet.model.RispostaSoap.toSoapModel(returnValue); } catch (Exception e) { _log.error(e, e); throw new RemoteException(e.getMessage()); } } private static Log _log = LogFactoryUtil.getLog(RispostaServiceSoap.class); }
[ "snapolitano@example.com" ]
snapolitano@example.com
35f50630db8e4b3c0cea59b821474564ef40ec48
0c96ad424dcd541c77ef8a99aa1ed51657e2e777
/CDI-interceptor/src/main/java/com/intuit/cdi/exampleCDIServlet.java
db18f7c98beb0be98b654713a47765ffb2721620
[]
no_license
ashish-bhatt/CDI-Spring
b4463085d3e68857c2ca81b9e747bd5e93b70890
58a25af673c140a97953d509d3b9843f2ab68c3a
refs/heads/master
2021-01-02T08:10:37.707299
2014-03-09T10:03:27
2014-03-09T10:03:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,218
java
package com.intuit.cdi; import java.io.IOException; import java.util.Iterator; import java.util.Set; import javax.inject.Inject; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.validation.ConstraintViolation; import javax.validation.ConstraintViolationException; import com.intuit.core.Loggable; import com.intuit.core.SimpleGreeting; /** * Servlet implementation class exampleCDIServlet */ @WebServlet("/test") @Loggable public class exampleCDIServlet extends HttpServlet { private static final long serialVersionUID = 1L; @Inject SimpleGreeting greeting; /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { greeting.setEmail("ashish_bhatt@intuit.com"); greeting.setGreeting("good morning!"); RequestDispatcher dispatcher = request.getRequestDispatcher("/test.jsp"); dispatcher.forward(request, response); } }
[ "maxsteel8951@ymail.com" ]
maxsteel8951@ymail.com
c2bed0f0b77c2fec7f18c92af61c7aad2e3b77f5
cfe621e8c36e6ac5053a2c4f7129a13ea9f9f66b
/apps_final/mobi.dream.neko/apk/com/google/zxing/client/android/HelpActivity$HelpClient.java
2fdcae0b3b79afa27071790c8128e86a6ad6132f
[]
no_license
linux86/AndoirdSecurity
3165de73b37f53070cd6b435e180a2cb58d6f672
1e72a3c1f7a72ea9cd12048d9874a8651e0aede7
refs/heads/master
2021-01-11T01:20:58.986651
2016-04-05T17:14:26
2016-04-05T17:14:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
960
java
package com.google.zxing.client.android; import android.content.Intent; import android.net.Uri; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.Button; final class HelpActivity$HelpClient extends WebViewClient { private HelpActivity$HelpClient(HelpActivity paramHelpActivity) {} public void onPageFinished(WebView paramWebView, String paramString) { this$0.setTitle(paramWebView.getTitle()); HelpActivity.access$200(this$0).setEnabled(paramWebView.canGoBack()); } public boolean shouldOverrideUrlLoading(WebView paramWebView, String paramString) { if (paramString.startsWith("file")) { return false; } this$0.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(paramString))); return true; } } /* Location: * Qualified Name: com.google.zxing.client.android.HelpActivity.HelpClient * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "i@xuzhao.net" ]
i@xuzhao.net
4e3a258f7af52cfc9464e85c9b317a8c5c9ed5e3
93571216d41070799ee9618c4d94fa61196bfed8
/system/platform-core/src/test/java/org/platformlambda/core/util/unsafe/models/UnauthorizedObj.java
1ae7a265e81e43b085a2413b62012ba79fefeb33
[ "Apache-2.0" ]
permissive
iuriimattos2/mercury
118bba92bde7f68def4ad383e48c1336e16754d8
7092ad906b7c780ce53f974a2b02c5a7177c2a8a
refs/heads/master
2023-04-07T20:58:42.113020
2021-04-08T23:13:28
2021-04-08T23:13:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,550
java
/* Copyright 2018-2021 Accenture Technology 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.platformlambda.core.util.unsafe.models; import java.util.Date; public class UnauthorizedObj { private int number; private String name; private String address; private String fullName; private Date date; public int getNumber() { return number; } public void setNumber(int number) { this.number = number; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public Date getDate() { return date; } public void setDate(Date date) { this.date = date; } public String getFullName() { return fullName; } public void setFullName(String fullName) { this.fullName = fullName; } }
[ "eric.cw.law@gmail.com" ]
eric.cw.law@gmail.com
e751f99360390fe746fb3b7f029799af82bf1f5b
77f5f15c0c7cf8bc52270dc1de25edc2567bb7ae
/group04/349184132/Study/src/com/first/BinaryTreeNode.java
aca133605be40c388c35f8e9728bb007aa18aebf
[]
no_license
luojunyi/coding2017
6eba845be6caf2a4f4ef7632b07b7d419dfa8423
8e41c35516e88fc6e65d5388f31c1e465e9b830c
refs/heads/master
2021-01-18T13:07:55.996480
2017-05-04T08:53:40
2017-05-04T08:53:40
84,706,399
0
0
null
2017-03-12T06:54:55
2017-03-12T06:54:55
null
UTF-8
Java
false
false
1,509
java
package com.first; public class BinaryTreeNode { private Object data; private BinaryTreeNode left; private BinaryTreeNode right; private BinaryTreeNode root; public Object getData() { return data; } public void setData(Object data) { this.data = data; } public BinaryTreeNode getLeft() { return left; } public void setLeft(BinaryTreeNode left) { this.left = left; } public BinaryTreeNode getRight() { return right; } public void setRight(BinaryTreeNode right) { this.right = right; } public BinaryTreeNode insert(Object o) { BinaryTreeNode newNode = null; // 新結點 if (o == null) throw new NullPointerException("element is not null"); if (root == null) { root = new BinaryTreeNode(); root.setData(o); } else { newNode = new BinaryTreeNode(); BinaryTreeNode nowNode = root; //當前結點 int val = (int) root.getData(); nowNode.setData(o); while (true) { if ((int) newNode.getData() < val) { // 新結點的值 < 當前結點 if (nowNode.left == null) { nowNode.setLeft(newNode); break; } else { nowNode = nowNode.left; } } else if ((int) newNode.getData() > val) { if (nowNode.right == null) { nowNode.setRight(newNode); break; } else { nowNode = newNode.right; } } else { throw new IllegalArgumentException("element exist"); } } } return newNode; } }
[ "191191717@qq.com" ]
191191717@qq.com
122bc79a3c572e8a03e0a4cd2b3af9c09f3fe957
32918e4317c42e994c7854b56f814bbcce524443
/IndoorPositioning/app/src/main/java/com/example/matthew/newapplication/ImageViewTest.java
3893800c635e5a553b1a8fadee6e36182b8ce136
[]
no_license
mdeyo/IndoorPositioningSystem
d242d6e0991caf473179d60dbb4c5d346dea3a05
8592dc58bad1a407e4a93f84701065bcf3b2e075
refs/heads/master
2016-09-05T11:59:27.765300
2015-11-18T17:51:45
2015-11-18T17:51:45
32,813,256
1
1
null
null
null
null
UTF-8
Java
false
false
1,440
java
package com.example.matthew.newapplication; import android.app.Activity; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.util.AttributeSet; import android.util.Xml; import android.view.Window; import android.widget.ImageView; import org.xmlpull.v1.XmlPullParser; public class ImageViewTest extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_image_view_test); final ImageView imageView = (ImageView) findViewById(R.id.imageView1); Resources resource = this.getResources(); XmlPullParser parser = resource.getXml(R.layout.activity_image_view_test); AttributeSet attributes = Xml.asAttributeSet(parser); final MyImageView miv = new MyImageView(this, attributes); // // imageView.setOnTouchListener(new View.OnTouchListener() { // @Override // public boolean onTouch(final View view, final MotionEvent event) { // return miv.onTouchEvent(event); // } // }); imageView.setOnTouchListener(new Touch()); Bitmap map = BitmapFactory.decodeResource(getResources(), R.drawable.build_image); imageView.setImageBitmap(map); } }
[ "mdeyo@mit.edu" ]
mdeyo@mit.edu
2447676d17a9d444a4d28e2404f5af9de915a5c2
60913d222b7d86266f1e845741e79456f5bc9c8f
/test/WhateverIWant/app/src/test/java/com/example/whateveriwant/ExampleUnitTest.java
aa128ff3b90b0c15c731d103bc5d4c7deed25f2e
[]
no_license
aharper20/temp20
e354a6f0c3c6f3b0da55fa965cfcbf9a5fe9dd19
41a6e0c1dcdf307fc439d26ef46dc587efa1e37d
refs/heads/master
2020-12-20T10:07:21.882747
2020-01-24T16:53:57
2020-01-24T16:53:57
236,037,017
0
0
null
null
null
null
UTF-8
Java
false
false
386
java
package com.example.whateveriwant; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "you@example.com" ]
you@example.com
44d12d49aad515384a230258efe1ab82c2c9021f
842047b40a739e3e237a9b731e922cb932c4c175
/src/main/java/hsbc/groupthree/ordersystem/OrdersystemApplication.java
cdf32e5e98d105ab19313ba23f5e22f48ca6f18c
[]
no_license
Liu15625177108/NewOrderSystem
708053cbec5937aa514f22a690cc369a6180a96a
63aafba1a182f27805e6bf4ac43049bc144d9eb8
refs/heads/master
2020-03-26T14:48:39.455627
2018-08-28T15:27:04
2018-08-28T15:27:04
144,968,568
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
package hsbc.groupthree.ordersystem; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class OrdersystemApplication { public static void main(String[] args) { SpringApplication.run(OrdersystemApplication.class, args); } }
[ "2447152234@qq.com" ]
2447152234@qq.com
4e05c49c3c00c640dd226c56a004722048e12aaf
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MOCKITO-38b-1-1-MOEAD-WeightedSum:TestLen:CallDiversity/org/mockito/internal/verification/argumentmatching/ArgumentMatchingTool_ESTest.java
667b4df576974e8e5eceaf2467d0a9db7975b520
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
597
java
/* * This file was automatically generated by EvoSuite * Wed Apr 08 08:11:47 UTC 2020 */ package org.mockito.internal.verification.argumentmatching; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class ArgumentMatchingTool_ESTest extends ArgumentMatchingTool_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
727b9139df2506abf33e369b28a89341f216ecaa
34508bf36803fbe41861361f311bff3188d874ed
/chart/src/main/java/com/henry/chart/ChartView.java
640dbb7fdce3a118791c18a21e1a21ca2b1d6be5
[ "Apache-2.0" ]
permissive
Henry7604/CustomChart
1badf27f642bd5896dc7f69c1fcfc54d2218f1c5
a07f62eaedd587ea00b12f7e4ddedbcc70d2929f
refs/heads/master
2022-11-14T07:51:05.836050
2020-07-10T02:11:19
2020-07-10T02:11:19
278,294,028
1
0
null
null
null
null
UTF-8
Java
false
false
5,638
java
package com.henry.chart; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.LinearGradient; import android.graphics.Paint; import android.graphics.Path; import android.graphics.Shader; import android.util.AttributeSet; import android.view.View; import androidx.core.content.ContextCompat; import java.util.ArrayList; import java.util.List; /** * * @author Henry */ public class ChartView extends View { private int mWidth; private int mHeight; private Paint mPaintLine; private Paint mPaintTransparent; private Paint mPaintCircle; private Context mContext; private List<ChartModel> mDataList; private TypedArray mTa; private int mGradientColorStart = 0; private int mGradientColorEnd = 0; public ChartView(Context context) { this(context, null); } public ChartView(Context context, AttributeSet attrs) { super(context, attrs); init(context, attrs); } private void init(Context context, AttributeSet attrs) { if (attrs != null) { mTa = context.obtainStyledAttributes(attrs, com.henry.chart.R.styleable.ChartView); } mContext = context; mDataList = new ArrayList<>(); // 折線 mPaintLine =new Paint(Paint.ANTI_ALIAS_FLAG); mPaintLine.setStrokeWidth(Utility.convertDpToPixel(mContext, 1)); // mPaintLine.setColor(ContextCompat.getColor(context, R.color.dark_lavender)); // 前後空白 mPaintTransparent =new Paint(Paint.ANTI_ALIAS_FLAG); mPaintTransparent.setStrokeWidth(Utility.convertDpToPixel(mContext, 1)); mPaintTransparent.setColor(mContext.getColor(android.R.color.transparent)); // 小圓 mPaintCircle =new Paint(Paint.ANTI_ALIAS_FLAG); mPaintCircle.setColor(Color.WHITE); mWidth = Utility.convertDpToPixel(mContext, 45); mHeight = Utility.convertDpToPixel(mContext, 60); if (mTa != null) { mPaintLine.setColor(mTa.getColor(com.henry.chart.R.styleable.ChartView_paint_line_color, ContextCompat.getColor(mContext, android.R.color.transparent))); mGradientColorStart = mTa.getColor(com.henry.chart.R.styleable.ChartView_gradient_color_start, ContextCompat.getColor(mContext, android.R.color.transparent)); mGradientColorEnd = mTa.getColor(com.henry.chart.R.styleable.ChartView_gradient_color_end, ContextCompat.getColor(mContext, android.R.color.transparent)); mTa.recycle(); } else { mGradientColorStart = ContextCompat.getColor(mContext, android.R.color.transparent); mGradientColorEnd = ContextCompat.getColor(mContext, android.R.color.transparent); } invalidate(); } public void setItemWidth(int width) { mWidth = width; } public void setData(List<ChartModel> dataList) { if (mDataList != null && mDataList.size() > 0) { mDataList.clear(); } mDataList.addAll(dataList); requestLayout(); invalidate(); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); if (mDataList != null && mDataList.size() > 0) { for (int i = 0; i < mDataList.size(); i++) { ChartModel previousData = mDataList.size() > 1 && i != 0 ? mDataList.get(i - 1) : null; ChartModel nowData = mDataList.get(i); ChartModel nextData = mDataList.size() > i + 1 ? mDataList.get(i + 1) : null; if (nowData.getData() == -999) { canvas.drawLine(mWidth * i,0, (mWidth * i) + mWidth, 0, mPaintTransparent); } else { int start = 120 - (nowData.getData() + 20); float startY = mHeight - nowData.getData() > 0 ? (start / 120f) * mHeight : 0; if (nextData != null && nextData.getData() != -999) { int end = 120 - (nextData.getData() + 20); float endY = mHeight - nextData.getData() > 0 ? (end / 120f) * mHeight : 0; // 畫折線 canvas.drawLine(mWidth * i, startY, (mWidth * i) + mWidth, endY, mPaintLine); // 漸層色路徑 Path path = new Path(); path.moveTo(mWidth * i, mHeight); path.lineTo(mWidth * i, startY); path.lineTo((mWidth * i) + mWidth, endY); path.lineTo((mWidth * i) + mWidth, mHeight); path.close(); LinearGradient linearGradient = new LinearGradient(mWidth * i, 0, mWidth * i, mHeight, mGradientColorStart, mGradientColorEnd, Shader.TileMode.CLAMP); Paint pathPaint = new Paint(Paint.ANTI_ALIAS_FLAG); pathPaint.setShader(linearGradient); canvas.drawPath(path, pathPaint); } // 畫小圓 canvas.drawCircle(mWidth * i, startY, Utility.convertDpToPixel(mContext, 2), mPaintCircle); } } } } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); if (mDataList.size() == 0) { setMeasuredDimension(mWidth, mHeight); } else { setMeasuredDimension(mWidth * mDataList.size(), mHeight); } } }
[ "henry@goonsdesign.com" ]
henry@goonsdesign.com
1b82571b52c62408f00631f08282a1f29a435b6e
b77b97b47ea0e492c61a4222925afd89468fae0c
/src/main/java/compiler/tree/operations/Arithmetic.java
f511166f511e7fd9313e1726f9640f1f09f5f475
[]
no_license
nicoconstanzo/Compiler
19c60549bdd9a53cd2427bea50c948268c51204d
f9101b406782e4ae460e8714704ee84e1715eb37
refs/heads/master
2016-09-06T10:44:08.358636
2012-06-08T13:08:11
2012-06-08T13:08:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,476
java
package compiler.tree.operations; import compiler.tree.Node; import compiler.tree.symbol.SymbolTable; import compiler.tree.types.Type; import org.antlr.runtime.Token; import java.util.Stack; /** * Created by IntelliJ IDEA. * User: NoePodesta * Date: 29/03/12 * Time: 19:08 **/ public abstract class Arithmetic extends Node { public Arithmetic(Token token) { super(token); } @Override public void analyze(SymbolTable symbolTable) { super.analyze(symbolTable); Type t1 = getChild(0).getTypeDef(); Type t2 = getChild(1).getTypeDef(); setTypeDef(Type.promotion(t1, t2)); } @Override public void execute(Stack<Object> stack){ super.execute(stack); //evalua los hijos para ver si son integers o no. if (getTypeDef().equals(Type.INTEGER)) { Number i1 = (Number) stack.pop(); Number i2 = (Number) stack.pop(); stack.push(operation(i1,i2)); } else if(getTypeDef().equals(Type.FLOAT)) { Number f1 = (Number) stack.pop(); Number f2 = (Number) stack.pop(); stack.push(operation(f1,f2)); } else { String f1 = stack.pop().toString(); String f2 = stack.pop().toString(); stack.push(operation(f2,f1)); } } public abstract String operation(String object1, String object2); public abstract Number operation(Number object1, Number object2); }
[ "podesta.noe@gmail.com" ]
podesta.noe@gmail.com
f5c84b76374b3337116933cc515d7593c6de89b0
925e3f64b87cc110fb09683f3fd03c08f80a2491
/cart-server/src/main/java/works/weave/socks/cart/cartserver/tars/cart/impl/ItemsControllerServantImpl.java
cba972027d59c271852c77c919f20b1a2c321715
[]
no_license
yzgqy/shop-tars
e2d703a9d670488097e707d20cd8651f3b549b48
5c963126612a57e3aae20974a5d9a830a3a8cd10
refs/heads/master
2020-06-21T23:11:40.282762
2019-07-18T11:36:14
2019-07-18T11:36:14
197,574,984
0
0
null
null
null
null
UTF-8
Java
false
false
4,401
java
package works.weave.socks.cart.cartserver.tars.cart.impl; import com.qq.tars.spring.annotation.TarsServant; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.PathVariable; import works.weave.socks.cart.cartserver.cart.CartDAO; import works.weave.socks.cart.cartserver.cart.CartResource; import works.weave.socks.cart.cartserver.entities.Cart; import works.weave.socks.cart.cartserver.entities.Item; import works.weave.socks.cart.cartserver.item.FoundItem; import works.weave.socks.cart.cartserver.item.ItemDAO; import works.weave.socks.cart.cartserver.item.ItemResource; import works.weave.socks.cart.cartserver.tars.cart.ItemTars; import works.weave.socks.cart.cartserver.tars.cart.ItemsControllerServant; import java.util.ArrayList; import java.util.List; import java.util.function.Supplier; import static org.slf4j.LoggerFactory.getLogger; /** * @Auther: yaya * @Date: 2019/7/3 17:27 * @Description: */ @Component @TarsServant("ItemsObj") public class ItemsControllerServantImpl implements ItemsControllerServant { private final Logger LOG = getLogger(getClass()); @Autowired private ItemDAO itemDAO; @Autowired private CartsControllerServantImpl cartsControllerServantImpl; @Autowired private CartDAO cartDAO; @Override public ItemTars get(String customerId, String itemId) { return new FoundItem(() -> getItemsModel(customerId), () -> new Item(itemId)).get().toTars(); } public Item getModel(@PathVariable String customerId, @PathVariable String itemId) { return new FoundItem(() -> getItemsModel(customerId), () -> new Item(itemId)).get(); } @Override public List<ItemTars> getItems(String customerId) { List<Item> items =getItemsModel(customerId); List<ItemTars> itemTarsList = new ArrayList<>(); for (Item item:items){ itemTarsList.add(item.toTars()); } return itemTarsList; } private List<Item> getItemsModel(String customerId){ return getcart(customerId).contents(); } private Cart getcart( String customerId){ return new CartResource(cartDAO, customerId).value().get(); } @Override public ItemTars addToCart(String customerId, ItemTars item) { Item itemModel = new Item(); itemModel.setId(item.getId()); itemModel.setItemId(item.getItemId()); itemModel.setQuantity(item.getQuantity()); itemModel.setUnitPrice(item.getUnitPrice()); // If the item does not exist in the cart, create new one in the repository. FoundItem foundItem = new FoundItem(() -> getcart(customerId).contents(), () -> itemModel); if (!foundItem.hasItem()) { Supplier<Item> newItem = new ItemResource(itemDAO, () -> itemModel).create(); LOG.debug("Did not find item. Creating item for user: " + customerId + ", " + newItem.get()); new CartResource(cartDAO, customerId).contents().get().add(newItem).run(); return itemModel.toTars(); } else { Item newItem = new Item(foundItem.get(), foundItem.get().quantity() + 1); LOG.debug("Found item in cart. Incrementing for user: " + customerId + ", " + newItem); updateItem(customerId, newItem); return newItem.toTars(); } } @Override public void removeItem(String customerId, String itemId) { FoundItem foundItem = new FoundItem(() -> getItemsModel(customerId), () -> new Item(itemId)); Item item = foundItem.get(); LOG.debug("Removing item from cart: " + item); new CartResource(cartDAO, customerId).contents().get().delete(() -> item).run(); LOG.debug("Removing item from repository: " + item); new ItemResource(itemDAO, () -> item).destroy().run(); } @Override public void updateItem(String customerId, ItemTars item) { Item itemModel = new Item(item); updateItem(customerId,itemModel); } private void updateItem(String customerId, Item item) { ItemResource itemResource = new ItemResource(itemDAO, () -> getModel(customerId, item.itemId())); LOG.debug("Merging item in cart for user: " + customerId + ", " + item); itemResource.merge(item).run(); } }
[ "772751879@qq.com" ]
772751879@qq.com
f069e04507f811bee771e7905f0ee971a5a1b54b
d0622ee08a6ed11bfdc25f8a46374859f68d5905
/src/main/java/com/actram/wordattainer/ui/controllers/SelectionModeController.java
1550ebb37b0f48844bade6b22389f36dc3dd84ed
[ "MIT" ]
permissive
peterjohansen/word-attainer
35e48ae34de6e4646b54d004f904c422da7f22e9
7e8fbb7b935a944b870158b79513c13ef14376b9
refs/heads/master
2021-01-10T05:33:29.233693
2015-12-16T18:56:25
2015-12-16T18:56:25
47,506,235
0
0
null
null
null
null
UTF-8
Java
false
false
5,746
java
package com.actram.wordattainer.ui.controllers; import java.nio.channels.InterruptedByTimeoutException; import java.util.ResourceBundle; import com.actram.wordattainer.ResultList; import com.actram.wordattainer.ui.Preferences; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.input.MouseEvent; import javafx.stage.Modality; import javafx.stage.Stage; /** * * * @author Peter André Johansen */ public class SelectionModeController implements MainControllerChild { @FXML private Label statsLabel; @FXML private Label resultLabel; @FXML private TextField resultTextField; @FXML private Button discardPrevButton; @FXML private Button keepPrevButton; @FXML private Label nextLabel; @FXML private Label prevLabel; @FXML private Parent choiceParent; private MainController mainController; private Stage stage; private final ResultList keptResults = new ResultList(); private String prevResult; private String currentResult; private boolean stageShowedOnce = false; @FXML public void cancelSelectionMode(ActionEvent evt) { if (!keptResults.isEmpty()) { // @formatterOff if (mainController.showConfirmAlert("Discard Results", "You will lose all your kept results.\n\n" + "Are you sure you want to cancel?", "Keep them", "Discard them")) { // @formatterOn return; } } close(); } public void close() { stage.close(); } @FXML public void discardCurrent(ActionEvent evt) { nextResult(false); } @FXML public void discardPrevious(ActionEvent evt) { if (prevResult != null) { keptResults.remove(prevResult); updateUI(mainController.getPreferences(), mainController.getResults()); } } @FXML public void editDone() { String result = resultTextField.getText().trim(); if (!result.isEmpty()) { currentResult = result; } resultLabel.setVisible(true); resultTextField.setVisible(false); updateUI(mainController.getPreferences(), mainController.getResults()); } @Override public void initialize(MainController mainController, ResourceBundle resources) { this.mainController = mainController; } @FXML public void keepCurrent(ActionEvent evt) { nextResult(true); } @FXML public void keepPrevious(ActionEvent evt) { if (prevResult != null) { keptResults.add(prevResult); updateUI(mainController.getPreferences(), mainController.getResults()); } } @FXML public void keepResults(ActionEvent evt) { mainController.getResults().clear(); mainController.getResults().addAll(keptResults); mainController.getGeneratorController().generateDone(); close(); mainController.stateUpdated(); } private String nextResult() { try { return currentResult = mainController.getPreferences().getGenerator().query(); } catch (InterruptedByTimeoutException e) { keepResults(null); mainController.getGeneratorController().showTimedOutMessage(); return null; } } private void nextResult(boolean keepCurrent) { if (keepCurrent) { keptResults.add(currentResult); } prevResult = currentResult; currentResult = null; choiceParent.setDisable(true); this.currentResult = nextResult(); choiceParent.setDisable(false); updateUI(mainController.getPreferences(), mainController.getResults()); } void setRootNode(Parent parent) { this.stage = new Stage(); stage.setScene(new Scene(parent)); stage.setTitle("Generator: Selection Mode"); stage.getScene().setOnKeyReleased(evt -> { if (resultTextField.isVisible() || choiceParent.isDisabled()) { return; } switch (evt.getCode()) { case F: if (!discardPrevButton.isDisabled()) { discardPrevious(null); } break; case G: discardCurrent(null); break; case H: keepCurrent(null); break; case J: if (!keepPrevButton.isDisable()) { keepPrevious(null); } break; default: break; } }); } public void showSelectionMode() { keptResults.clear(); prevResult = null; choiceParent.setDisable(false); if (!stageShowedOnce) { mainController.setIcon(stage); stage.initOwner(mainController.getStage()); stage.initModality(Modality.WINDOW_MODAL); } stage.show(); stageShowedOnce = true; stage.setMinWidth(stage.getWidth()); stage.setMinHeight(stage.getHeight()); this.currentResult = nextResult(); updateUI(mainController.getPreferences(), mainController.getResults()); } @FXML public void startEdit(MouseEvent evt) { if (evt.getClickCount() == 2) { resultTextField.setText(currentResult); resultLabel.setVisible(false); resultTextField.setVisible(true); resultTextField.selectAll(); } } @Override public void updateUI(Preferences preferences, ResultList results) { discardPrevButton.setDisable(prevResult == null || !keptResults.contains(prevResult)); keepPrevButton.setDisable(prevResult == null || keptResults.contains(prevResult)); resultLabel.setText(currentResult); prevLabel.setText(prevResult == null ? "-" : prevResult); final int resultCount = preferences.getGenerator().getUniqueResultsAmount() - 1; statsLabel.setText(String.format("%s kept | %s discarded | %s total", keptResults.size(), resultCount - keptResults.size(), resultCount)); } @FXML public void viewShortcuts(ActionEvent evt) { // @formatterOff mainController.showInfoAlert("Selection Mode Shortcuts", "Shortcuts:\n" + "H\tKeep result\n" + "J\tKeep previous\n" + "G\tDiscard result\n" + "F\tDiscard previous\n"); // @formatterOn } }
[ "peterandrejohansen@gmail.com" ]
peterandrejohansen@gmail.com
6ac29d7145fcd1841b3c40041ad6fbb48e56ce9b
4939a0ba3ff6e387c23e4928a7a5b707a2b41244
/com/client/glowclient/dA.java
75457a19c4a33c6dfd7116026f598e57f9c409b0
[]
no_license
XeonLyfe/Glow-1.0.4-Deobf-Source-Leak
39356b4e9ec35d6631aa811ec65005a2ae1a95ab
fd3b7315a80ec56bc86dfa9db87bde35327dde5d
refs/heads/master
2022-03-29T03:51:08.343934
2019-11-30T01:58:05
2019-11-30T01:58:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
280
java
package com.client.glowclient; public final class DA { public static final int d = 1; public static final int L = 9; public static final int A = 5; public static final int B = 36; public static final int b = 0; public DA() { super(); } }
[ "57571957+RIPBackdoored@users.noreply.github.com" ]
57571957+RIPBackdoored@users.noreply.github.com
c4803374933e1566cb4a8db67d5acfeade4c41cc
60444dd2295b114b035c546035aa39540889e625
/workspace/jquantlib/src/test/java/org/jquantlib/testsuite/instruments/BondTest.java
5f69b8adef7069bfbec3ea6950ef2c080087b8f4
[ "BSD-3-Clause" ]
permissive
gmakhobe/Quant
13c3a78c2a60d5bf4e725fab3ef2352a37135610
6557af79fc4b02cdb19dbbb410b0e45198d4e94a
refs/heads/master
2022-11-24T11:54:59.992914
2020-07-26T17:31:05
2020-07-26T17:31:05
264,510,073
0
0
null
2020-05-16T19:20:36
2020-05-16T19:20:35
null
UTF-8
Java
false
false
35,795
java
/* Copyright (C) 2008 Richard Gomes Copyright (C) 2009 John Nichol This source code is release under the BSD License. This file is part of JQuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://jquantlib.org/ JQuantLib is free software: you can redistribute it and/or modify it under the terms of the JQuantLib license. You should have received a copy of the license along with this program; if not, please email <jquant-devel@lists.sourceforge.net>. The license is also available online at <http://www.jquantlib.org/index.php/LICENSE.TXT>. 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 license for more details. JQuantLib is based on QuantLib. http://quantlib.org/ When applicable, the original copyright notice follows this notice. */ /* Copyright (C) 2003, 2004 Ferdinando Ametrano Copyright (C) 2005 StatPro Italia srl Copyright (C) 2005 Joseph Wang This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email <quantlib-dev@lists.sf.net>. The license is also available online at <http://quantlib.org/license.shtml>. 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 license for more details. */ /** * * Ported from * <ul> * <li>test-suite/americanoption.cpp</li> * </ul> * * @author <Richard Gomes> * */ package org.jquantlib.testsuite.instruments; import static org.junit.Assert.fail; import org.jquantlib.QL; import org.jquantlib.SavedSettings; import org.jquantlib.Settings; import org.jquantlib.cashflow.BlackIborCouponPricer; import org.jquantlib.cashflow.FixedRateLeg; import org.jquantlib.cashflow.IborCouponPricer; import org.jquantlib.cashflow.Leg; import org.jquantlib.cashflow.PricerSetter; import org.jquantlib.cashflow.SimpleCashFlow; import org.jquantlib.daycounters.Actual360; import org.jquantlib.daycounters.ActualActual; import org.jquantlib.daycounters.Business252; import org.jquantlib.daycounters.DayCounter; import org.jquantlib.daycounters.Thirty360; import org.jquantlib.indexes.IborIndex; import org.jquantlib.indexes.ibor.USDLibor; import org.jquantlib.instruments.Bond; import org.jquantlib.instruments.bonds.FixedRateBond; import org.jquantlib.instruments.bonds.FloatingRateBond; import org.jquantlib.instruments.bonds.ZeroCouponBond; import org.jquantlib.math.matrixutilities.Array; import org.jquantlib.pricingengines.PricingEngine; import org.jquantlib.pricingengines.bond.DiscountingBondEngine; import org.jquantlib.quotes.Handle; import org.jquantlib.quotes.SimpleQuote; import org.jquantlib.termstructures.Compounding; import org.jquantlib.termstructures.InterestRate; import org.jquantlib.termstructures.YieldTermStructure; import org.jquantlib.termstructures.volatilities.optionlet.OptionletVolatilityStructure; import org.jquantlib.testsuite.util.Utilities; import org.jquantlib.time.BusinessDayConvention; import org.jquantlib.time.Calendar; import org.jquantlib.time.Date; import org.jquantlib.time.DateGeneration; import org.jquantlib.time.DateGeneration.Rule; import org.jquantlib.time.Frequency; import org.jquantlib.time.Month; import org.jquantlib.time.Period; import org.jquantlib.time.Schedule; import org.jquantlib.time.TimeUnit; import org.jquantlib.time.calendars.Brazil; import org.jquantlib.time.calendars.NullCalendar; import org.jquantlib.time.calendars.Target; import org.jquantlib.time.calendars.UnitedStates; import org.junit.Ignore; import org.junit.Test; public class BondTest { private class CommonVars { // common data Calendar calendar; Date today; double /*Real*/ faceAmount; // cleanup SavedSettings backup = new SavedSettings(); // setup public CommonVars() { calendar = new Target(); today = calendar.adjust(Date.todaysDate()); new Settings().setEvaluationDate(today); faceAmount = 1000000.0; } } public BondTest() { QL.info("::::: " + this.getClass().getSimpleName() + " :::::"); } @Ignore @Test //FIXME: http://bugs.jquantlib.org/view.php?id=472 public void testYield() { QL.info("Testing consistency of bond price/yield calculation...."); final Calendar calendar = new org.jquantlib.time.calendars.Target(); final Date today = calendar.adjust(Date.todaysDate()); final double faceAmount = 1000000.0; final double tolerance = 1.0e-7; final int maxEvaluations = 100; final int issueMonths[] = { -24, -18, -12, -6, 0, 6, 12, 18, 24 }; final int lengths[] = { 3, 5, 10, 15, 20 }; final int settlementDays = 3; final double coupons[] = { 0.02, 0.05, 0.08 }; final Frequency frequencies[] = { Frequency.Semiannual, Frequency.Annual }; final DayCounter bondDayCount = new Thirty360(); final BusinessDayConvention accrualConvention = BusinessDayConvention.Unadjusted; final BusinessDayConvention paymentConvention = BusinessDayConvention.ModifiedFollowing; final double redemption = 100.0; final double yields[] = { 0.03, 0.04, 0.05, 0.06, 0.07 }; final Compounding compounding[] = { Compounding.Compounded, Compounding.Continuous }; for (int i = 0; i < (issueMonths).length; i++) { for (int j = 0; j < (lengths).length; j++) { for (int k = 0; k < (coupons).length; k++) { for (int l = 0; l < (frequencies).length; l++) { for (int n = 0; n < (compounding).length; n++) { final Date dated = calendar.advance(today, issueMonths[i], TimeUnit.Months); final Date issue = dated; final Date maturity = calendar.advance(issue, lengths[j], TimeUnit.Years); final Schedule sch = new Schedule( dated, maturity, new Period(frequencies[l]), calendar, accrualConvention, accrualConvention, DateGeneration.Rule.Backward, false, new Date(), new Date()); final FixedRateBond bond = new FixedRateBond( settlementDays, faceAmount, sch, new double[] { coupons[k] }, bondDayCount, paymentConvention, redemption, issue); for (int m = 0; m < (yields).length; m++) { final double price = bond.cleanPrice(yields[m], bondDayCount, compounding[n], frequencies[l]); final double calculated = bond.yield( price, bondDayCount, compounding[n], frequencies[l], new Date(), tolerance, maxEvaluations); if (Math.abs(yields[m] - calculated) > tolerance) { // the difference might not matter final double price2 = bond.cleanPrice(calculated, bondDayCount, compounding[n], frequencies[l]); if (Math.abs(price - price2) / price > tolerance) { fail( "yield recalculation failed:\n" + " issue: " + issue + "\n" + " maturity: " + maturity + "\n" + " coupon: " + coupons[k] + "\n" + " frequency: " + frequencies[l] + "\n\n" + " yield: " + yields[m] + " " + (compounding[n] == Compounding.Continuous ? "compounded" : "continuous") + "\n" + " price: " + price + "\n" + " yield': " + (calculated) + "\n" + " price': " + price2); } } } } } } } } } @Test public void testTheoretical() { QL.info("Testing theoretical bond price/yield calculation..."); final Calendar calendar = new org.jquantlib.time.calendars.Target(); final Date today = calendar.adjust(Date.todaysDate()); final double faceAmount = 1000000.0; final double tolerance = 1.0e-7; final int maxEvaluations = 100; final int lengths[] = { 3, 5, 10, 15, 20 }; final int settlementDays = 3; final double coupons[] = { 0.02, 0.05, 0.08 }; final Frequency frequencies[] = { Frequency.Semiannual, Frequency.Annual }; final DayCounter bondDayCount = new Actual360(); final BusinessDayConvention accrualConvention = BusinessDayConvention.Unadjusted; final BusinessDayConvention paymentConvention = BusinessDayConvention.ModifiedFollowing; final double redemption = 100.0; final double yields[] = { 0.03, 0.04, 0.05, 0.06, 0.07 }; for (final int length : lengths) { for (final double coupon : coupons) { for (final Frequency frequency : frequencies) { final Date dated = today; final Date issue = dated; final Date maturity = calendar.advance(issue, length, TimeUnit.Years); final SimpleQuote rate = new SimpleQuote(0.0); final Handle<YieldTermStructure> discountCurve = new Handle<YieldTermStructure>(Utilities.flatRate(today, rate, bondDayCount)); final Schedule sch = new Schedule( dated, maturity, new Period(frequency), calendar, accrualConvention, accrualConvention, Rule.Backward, false); final FixedRateBond bond = new FixedRateBond( settlementDays, faceAmount, sch, new double[] { coupon }, bondDayCount, paymentConvention, redemption, issue); final PricingEngine bondEngine = new DiscountingBondEngine(discountCurve); bond.setPricingEngine(bondEngine); for (final double yield : yields) { rate.setValue(yield); final double price = bond.cleanPrice(yield, bondDayCount, Compounding.Continuous, frequency); final double calculatedPrice = bond.cleanPrice(); if (Math.abs(price-calculatedPrice) > tolerance) { fail( "price calculation failed:" + "\n issue: " + issue + "\n maturity: " + maturity + "\n coupon: " + coupon + "\n frequency: " + frequency + "\n" + "\n yield: " + yield + "\n expected: " + price + "\n calculated': " + calculatedPrice + "\n error': " + (price-calculatedPrice)); } final double calculatedYield = bond.yield( bondDayCount, Compounding.Continuous, frequency, tolerance, maxEvaluations); if (Math.abs(yield-calculatedYield) > tolerance) { fail( "yield calculation failed:" + "\n issue: " + issue + "\n maturity: " + maturity + "\n coupon: " + coupon + "\n frequency: " + frequency + "\n" + "\n yield: " + yield + "\n price: " + price + "\n yield': " + calculatedYield); } } } } } } @Test public void testCached() { QL.info("Testing bond price/yield calculation against cached values..."); //final Calendar calendar = new Target(); // final Date today = calendar.adjust(Date.todaysDate()); // final Date today = calendar.adjust(new Date(6,Month.June,2007)); final Date today = new Date(22,Month.November,2004); final Settings settings = new Settings(); settings.setEvaluationDate(today); final double faceAmount = 1000000.0; // with implicit settlement calculation: final Calendar bondCalendar = new NullCalendar(); final DayCounter bondDayCount = new ActualActual(ActualActual.Convention.ISMA); final int settlementDays = 1; final Handle<YieldTermStructure> discountCurve = new Handle<YieldTermStructure>(Utilities.flatRate(today, 0.03, new Actual360())); // actual market values from the evaluation date final Frequency freq = Frequency.Semiannual; final Schedule sch1 = new Schedule(new Date(31, Month.October, 2004), new Date(31, Month.October, 2006), new Period(freq), bondCalendar, BusinessDayConvention.Unadjusted, BusinessDayConvention.Unadjusted, DateGeneration.Rule.Backward, false); final FixedRateBond bond1 = new FixedRateBond(settlementDays, faceAmount, sch1, new double[] {0.025}, bondDayCount, BusinessDayConvention.ModifiedFollowing, 100.0, new Date(1, Month.November, 2004)); final PricingEngine bondEngine = new DiscountingBondEngine(discountCurve); bond1.setPricingEngine(bondEngine); final double marketPrice1 = 99.203125; final double marketYield1 = 0.02925; final Schedule sch2 = new Schedule(new Date(15, Month.November, 2004), new Date(15, Month.November, 2009), new Period(freq), bondCalendar, BusinessDayConvention.Unadjusted, BusinessDayConvention.Unadjusted, DateGeneration.Rule.Backward, false); final FixedRateBond bond2 = new FixedRateBond(settlementDays, faceAmount, sch2, new double [] {0.035}, bondDayCount, BusinessDayConvention.ModifiedFollowing, 100.0, new Date(15, Month.November, 2004)); bond2.setPricingEngine(bondEngine); final double marketPrice2 = 99.6875; final double marketYield2 = 0.03569; // calculated values final double cachedPrice1a = 99.204505, cachedPrice2a = 99.687192; final double cachedPrice1b = 98.943393, cachedPrice2b = 101.986794; final double cachedYield1a = 0.029257, cachedYield2a = 0.035689; final double cachedYield1b = 0.029045, cachedYield2b = 0.035375; final double cachedYield1c = 0.030423, cachedYield2c = 0.030432; // check final double tolerance = 1.0e-6; double price, yield; price = bond1.cleanPrice(marketYield1, bondDayCount, Compounding.Compounded, freq); if (Math.abs(price-cachedPrice1a) > tolerance) { fail("failed to reproduce cached price:" + "\n calculated: " + price + "\n expected: " + cachedPrice1a + "\n tolerance: " + tolerance + "\n error: " + (price-cachedPrice1a)); } price = bond1.cleanPrice(); if (Math.abs(price-cachedPrice1b) > tolerance) { fail("failed to reproduce cached price:" + "\n calculated: " + price + "\n expected: " + cachedPrice1b + "\n tolerance: " + tolerance + "\n error: " + (price-cachedPrice1b)); } yield = bond1.yield(marketPrice1, bondDayCount, Compounding.Compounded, freq); if (Math.abs(yield-cachedYield1a) > tolerance) { fail("failed to reproduce cached compounded yield:" + "\n calculated: " + yield + "\n expected: " + cachedYield1a + "\n tolerance: " + tolerance + "\n error: " + (yield-cachedYield1a)); } yield = bond1.yield(marketPrice1, bondDayCount, Compounding.Continuous, freq); if (Math.abs(yield-cachedYield1b) > tolerance) { fail("failed to reproduce cached continuous yield:" + "\n calculated: " + yield + "\n expected: " + cachedYield1b + "\n tolerance: " + tolerance + "\n error: " + (yield-cachedYield1b)); } yield = bond1.yield(bondDayCount, Compounding.Continuous, freq); if (Math.abs(yield-cachedYield1c) > tolerance) { fail("failed to reproduce cached continuous yield:" + "\n calculated: " + yield + "\n expected: " + cachedYield1c + "\n tolerance: " + tolerance + "\n error: " + (yield-cachedYield1c)); } price = bond2.cleanPrice(marketYield2, bondDayCount, Compounding.Compounded, freq); if (Math.abs(price-cachedPrice2a) > tolerance) { fail("failed to reproduce cached price:" + "\n calculated: " + price + "\n expected: " + cachedPrice2a + "\n tolerance: " + tolerance + "\n error: " + (price-cachedPrice2a)); } price = bond2.cleanPrice(); if (Math.abs(price-cachedPrice2b) > tolerance) { fail("failed to reproduce cached price:" + "\n calculated: " + price + "\n expected: " + cachedPrice2b + "\n tolerance: " + tolerance + "\n error: " + (price-cachedPrice2b)); } yield = bond2.yield(marketPrice2, bondDayCount, Compounding.Compounded, freq); if (Math.abs(yield-cachedYield2a) > tolerance) { fail("failed to reproduce cached compounded yield:" + "\n calculated: " + yield + "\n expected: " + cachedYield2a + "\n tolerance: " + tolerance + "\n error: " + (yield-cachedYield2a)); } yield = bond2.yield(marketPrice2, bondDayCount, Compounding.Continuous, freq); if (Math.abs(yield-cachedYield2b) > tolerance) { fail("failed to reproduce cached continuous yield:" + "\n calculated: " + yield + "\n expected: " + cachedYield2b + "\n tolerance: " + tolerance + "\n error: " + (yield-cachedYield2b)); } yield = bond2.yield(bondDayCount, Compounding.Continuous, freq); if (Math.abs(yield-cachedYield2c) > tolerance) { fail("failed to reproduce cached continuous yield:" + "\n calculated: " + yield + "\n expected: " + cachedYield2c + "\n tolerance: " + tolerance + "\n error: " + (yield-cachedYield2c)); } // with explicit settlement date: final Schedule sch3 = new Schedule(new Date(30,Month.November,2004), new Date(30,Month.November,2006), new Period(freq), new UnitedStates(UnitedStates.Market.GOVERNMENTBOND), BusinessDayConvention.Unadjusted, BusinessDayConvention.Unadjusted, DateGeneration.Rule.Backward, false); final FixedRateBond bond3 = new FixedRateBond(settlementDays, faceAmount, sch3, new double[] {0.02875}, new ActualActual(ActualActual.Convention.ISMA), BusinessDayConvention.ModifiedFollowing, 100.0, new Date(30,Month.November,2004)); bond3.setPricingEngine(bondEngine); final double marketYield3 = 0.02997; final Date settlementDate = new Date(30,Month.November,2004); final double cachedPrice3 = 99.764874; price = bond3.cleanPrice(marketYield3, bondDayCount, Compounding.Compounded, freq, settlementDate); if (Math.abs(price-cachedPrice3) > tolerance) { fail("failed to reproduce cached price:" + "\n calculated: " + price + "" + "\n expected: " + cachedPrice3 + "" + "\n error: " + (price-cachedPrice3)); } // this should give the same result since the issue date is the // earliest possible settlement date settings.setEvaluationDate(new Date(22,Month.November,2004)); price = bond3.cleanPrice(marketYield3, bondDayCount, Compounding.Compounded, freq); if (Math.abs(price-cachedPrice3) > tolerance) { fail("failed to reproduce cached price:" + "\n calculated: " + price + "" + "\n expected: " + cachedPrice3 + "" + "\n error: " + (price-cachedPrice3)); } } @Test public void testCachedZero() { QL.info("Testing zero-coupon bond prices against cached values..."); final Calendar calendar = new Target(); final Date today = calendar.adjust(Date.todaysDate()); // final Date today = calendar.adjust(new Date(6,Month.June,2007)); // final Date today = new Date(22,Month.November,2004); final Settings settings = new Settings(); settings.setEvaluationDate(today); final double faceAmount = 1000000.0; final int settlementDays = 1; final Handle<YieldTermStructure> discountCurve = new Handle<YieldTermStructure>(Utilities.flatRate(today, 0.03, new Actual360())); final double tolerance = 1.0e-6; // plain final ZeroCouponBond bond1 = new ZeroCouponBond(settlementDays, new UnitedStates(UnitedStates.Market.GOVERNMENTBOND), faceAmount, new Date(30,Month.November,2008), BusinessDayConvention.ModifiedFollowing, 100.0, new Date(30,Month.November,2004)); final PricingEngine bondEngine = new DiscountingBondEngine(discountCurve); bond1.setPricingEngine(bondEngine); final double cachedPrice1 = 88.551726; double price = bond1.cleanPrice(); if (Math.abs(price-cachedPrice1) > tolerance) { fail("failed to reproduce cached price:\n" + " calculated: " + price + "\n" + " expected: " + cachedPrice1 + "\n" + " error: " + (price-cachedPrice1)); } final ZeroCouponBond bond2 = new ZeroCouponBond(settlementDays, new UnitedStates(UnitedStates.Market.GOVERNMENTBOND), faceAmount, new Date(30,Month.November,2007), BusinessDayConvention.ModifiedFollowing, 100.0, new Date(30,Month.November,2004)); bond2.setPricingEngine(bondEngine); final double cachedPrice2 = 91.278949; price = bond2.cleanPrice(); if (Math.abs(price-cachedPrice2) > tolerance) { fail("failed to reproduce cached price:\n" + " calculated: " + price + "\n" + " expected: " + cachedPrice2 + "\n" + " error: " + (price-cachedPrice2)); } final ZeroCouponBond bond3 = new ZeroCouponBond(settlementDays, new UnitedStates(UnitedStates.Market.GOVERNMENTBOND), faceAmount, new Date(30,Month.November,2006), BusinessDayConvention.ModifiedFollowing, 100.0, new Date(30,Month.November,2004)); bond3.setPricingEngine(bondEngine); final double cachedPrice3 = 94.098006; price = bond3.cleanPrice(); if (Math.abs(price-cachedPrice3) > tolerance) { fail("failed to reproduce cached price:\n" + " calculated: " + price + "\n" + " expected: " + cachedPrice3 + "\n" + " error: " + (price-cachedPrice3)); } } @Test public void testCachedFixed() { QL.info("Testing fixed-coupon bond prices against cached values..."); final Calendar calendar = new Target(); final Date today = calendar.adjust(Date.todaysDate()); // final Date today = calendar.adjust(new Date(6,Month.June,2007)); // final Date today = new Date(22,Month.November,2004); final Settings settings = new Settings(); settings.setEvaluationDate(today); final double faceAmount = 1000000.0; final int settlementDays = 1; final Handle<YieldTermStructure> discountCurve = new Handle<YieldTermStructure>(Utilities.flatRate(today, 0.03, new Actual360())); final double tolerance = 1.0e-6; // plain final Schedule sch = new Schedule(new Date(30,Month.November,2004), new Date(30,Month.November,2008), new Period(Frequency.Semiannual), new UnitedStates(UnitedStates.Market.GOVERNMENTBOND), BusinessDayConvention.Unadjusted, BusinessDayConvention.Unadjusted, DateGeneration.Rule.Backward, false); final FixedRateBond bond1 = new FixedRateBond(settlementDays, faceAmount, sch, new double [] { 0.02875 }, new ActualActual(ActualActual.Convention.ISMA), BusinessDayConvention.ModifiedFollowing, 100.0, new Date(30,Month.November,2004)); final PricingEngine bondEngine = new DiscountingBondEngine(discountCurve); bond1.setPricingEngine(bondEngine); final double cachedPrice1 = 99.298100; double price = bond1.cleanPrice(); if (Math.abs(price-cachedPrice1) > tolerance) { fail("failed to reproduce cached price:\n" + " calculated: " + price + "\n" + " expected: " + cachedPrice1 + "\n" + " error: " + (price-cachedPrice1)); } // varying coupons final double [] couponRates = new double[] { 0.02875, 0.03, 0.03125, 0.0325 }; final FixedRateBond bond2 = new FixedRateBond(settlementDays, faceAmount, sch, couponRates, new ActualActual(ActualActual.Convention.ISMA), BusinessDayConvention.ModifiedFollowing, 100.0, new Date(30,Month.November,2004)); bond2.setPricingEngine(bondEngine); final double cachedPrice2 = 100.334149; price = bond2.cleanPrice(); if (Math.abs(price-cachedPrice2) > tolerance) { fail("failed to reproduce cached price:\n" + " calculated: " + price + "\n" + " expected: " + cachedPrice2 + "\n" + " error: " + (price-cachedPrice2)); } // stub date final Schedule sch3 = new Schedule(new Date(30,Month.November,2004), new Date(30,Month.March,2009), new Period(Frequency.Semiannual), new UnitedStates(UnitedStates.Market.GOVERNMENTBOND), BusinessDayConvention.Unadjusted, BusinessDayConvention.Unadjusted, DateGeneration.Rule.Backward, false, new Date(), new Date(30,Month.November,2008)); final FixedRateBond bond3 = new FixedRateBond(settlementDays, faceAmount, sch3, couponRates, new ActualActual(ActualActual.Convention.ISMA), BusinessDayConvention.ModifiedFollowing, 100.0, new Date(30,Month.November,2004)); bond3.setPricingEngine(bondEngine); final double cachedPrice3 = 100.382794; price = bond3.cleanPrice(); if (Math.abs(price-cachedPrice3) > tolerance) { fail("failed to reproduce cached price:\n" + " calculated: " + price + "\n" + " expected: " + cachedPrice3 + "\n" + " error: " + (price-cachedPrice3)); } } @Test public void testCachedFloating() { QL.info("Testing floating-rate bond prices against cached values..."); final CommonVars vars = new CommonVars(); final Date today = new Date(22,Month.November,2004); final Settings settings = new Settings(); settings.setEvaluationDate(today); final int settlementDays = 1; final Handle<YieldTermStructure> riskFreeRate = new Handle<YieldTermStructure>(Utilities.flatRate(today, 0.025, new Actual360())); final Handle<YieldTermStructure> discountCurve = new Handle<YieldTermStructure>(Utilities.flatRate(today, 0.03, new Actual360())); final IborIndex index = new USDLibor(new Period(6,TimeUnit.Months), riskFreeRate); final int fixingDays = 1; final double tolerance = 1.0e-6; final IborCouponPricer pricer = new BlackIborCouponPricer(new Handle<OptionletVolatilityStructure>()); // plain final Schedule sch = new Schedule(new Date(30,Month.November,2004), new Date(30,Month.November,2008), new Period(Frequency.Semiannual), new UnitedStates(UnitedStates.Market.GOVERNMENTBOND), BusinessDayConvention.ModifiedFollowing, BusinessDayConvention.ModifiedFollowing, DateGeneration.Rule.Backward, false); final FloatingRateBond bond1 = new FloatingRateBond(settlementDays, vars.faceAmount, sch, index, new ActualActual(ActualActual.Convention.ISMA), BusinessDayConvention.ModifiedFollowing, fixingDays, new Array(0), new Array(0), new Array(0), new Array(0), false, 100.0, new Date(30,Month.November,2004)); final PricingEngine bondEngine = new DiscountingBondEngine(riskFreeRate); bond1.setPricingEngine(bondEngine); PricerSetter.setCouponPricer(bond1.cashflows(),pricer); final boolean indexedCoupon = new Settings().isUseIndexedCoupon(); final double cachedPrice1 = indexedCoupon ? 99.874645 : 99.874646; double price = bond1.cleanPrice(); if (Math.abs(price-cachedPrice1) > tolerance) { fail("failed to reproduce cached price:\n" + " calculated: " + price + "\n" + " expected: " + cachedPrice1 + "\n" + " error: " + (price-cachedPrice1)); } // different risk-free and discount curve final FloatingRateBond bond2 = new FloatingRateBond(settlementDays, vars.faceAmount, sch, index, new ActualActual(ActualActual.Convention.ISMA), BusinessDayConvention.ModifiedFollowing, fixingDays, new Array(0), new Array(0), new Array(0), new Array(0), false, 100.0, new Date(30,Month.November,2004)); final PricingEngine bondEngine2 = new DiscountingBondEngine(discountCurve); bond2.setPricingEngine(bondEngine2); PricerSetter.setCouponPricer(bond2.cashflows(),pricer); final double cachedPrice2 = indexedCoupon ? 97.955904 : 97.955904; // yes, they are the same, according to QuantLib/C++ price = bond2.cleanPrice(); if (Math.abs(price-cachedPrice2) > tolerance) { fail("failed to reproduce cached price:\n" + " calculated: " + price + "\n" + " expected: " + cachedPrice2 + "\n" + " error: " + (price-cachedPrice2)); } // varying spread final double [] spreads = new double[] { 0.001, 0.0012, 0.0014, 0.0016 }; final FloatingRateBond bond3 = new FloatingRateBond(settlementDays, vars.faceAmount, sch, index, new ActualActual(ActualActual.Convention.ISMA), BusinessDayConvention.ModifiedFollowing, fixingDays, new Array(0), new Array(spreads), new Array(0), new Array(0), false, 100.0, new Date(30,Month.November,2004)); bond3.setPricingEngine(bondEngine2); PricerSetter.setCouponPricer(bond3.cashflows(),pricer); final double cachedPrice3 = indexedCoupon ? 98.495458 : 98.495459; price = bond3.cleanPrice(); if (Math.abs(price-cachedPrice3) > tolerance) { fail("failed to reproduce cached price:\n" + " calculated: " + price + "\n" + " expected: " + cachedPrice3 + "\n" + " error: " + (price-cachedPrice3)); } } @Test public void testBrazilianCached() { QL.info("Testing Brazilian public bond prices against cached values..."); final Calendar calendar = new Target(); // final Date today = calendar.adjust(Date.todaysDate()); final Date today = calendar.adjust(new Date(6,Month.June,2007)); final Settings settings = new Settings(); settings.setEvaluationDate(today); //final double faceAmount = 1000000.0; final double faceAmount = 1000.0; final int settlementDays = 1; // NTN-F maturity dates final Date [] maturityDates = new Date[6]; maturityDates[0] = new Date(1,Month.January,2008); maturityDates[1] = new Date(1,Month.January,2010); maturityDates[2] = new Date(1,Month.July,2010); maturityDates[3] = new Date(1,Month.January,2012); maturityDates[4] = new Date(1,Month.January,2014); maturityDates[5] = new Date(1,Month.January,2017); // NTN-F yields final double [] yields = new double[6]; yields[0] = 0.114614; yields[1] = 0.105726; yields[2] = 0.105328; yields[3] = 0.104283; yields[4] = 0.103218; yields[5] = 0.102948; // NTN-F prices final double [] prices = new double[6]; prices[0] = 1034.63031372; prices[1] = 1030.09919487; prices[2] = 1029.98307160; prices[3] = 1028.13585068; prices[4] = 1028.33383817; prices[5] = 1026.19716497; // The tolerance is high because Andima truncate yields final double tolerance = 1.0e-4; final InterestRate [] couponRates = new InterestRate[1]; couponRates[0] = new InterestRate(0.1,new Thirty360(),Compounding.Compounded,Frequency.Annual); for (int bondIndex = 0; bondIndex < maturityDates.length; bondIndex++) { // plain final InterestRate yield = new InterestRate(yields[bondIndex], new Business252(new Brazil()), Compounding.Compounded, Frequency.Annual); final Schedule schedule = new Schedule(new Date(1,Month.January,2007), maturityDates[bondIndex], new Period(Frequency.Semiannual), new Brazil(Brazil.Market.SETTLEMENT), BusinessDayConvention.Unadjusted, BusinessDayConvention.Unadjusted, DateGeneration.Rule.Backward, false); // fixed coupons final Leg cashflows = new FixedRateLeg(schedule, new Actual360()) .withNotionals(faceAmount) .withCouponRates(couponRates) .withPaymentAdjustment(BusinessDayConvention.ModifiedFollowing).Leg(); // redemption cashflows.add(new SimpleCashFlow(faceAmount, cashflows.last().date())); final Bond bond = new Bond(settlementDays, new Brazil(Brazil.Market.SETTLEMENT), faceAmount, cashflows.last().date(), new Date(1,Month.January,2007), cashflows); final double cachedPrice = prices[bondIndex]; final double price = faceAmount*bond.dirtyPrice(yield.rate(), yield.dayCounter(), yield.compounding(), yield.frequency(), today)/100; if (Math.abs(price-cachedPrice) > tolerance) { fail("failed to reproduce cached price:\n" + " calculated: " + price + "\n" + " expected: " + cachedPrice + "\n" + " error: " + (price-cachedPrice) + "\n" ); } } } }
[ "plamen_stilyianov@yahoo.com" ]
plamen_stilyianov@yahoo.com
15f6dd56d1af46709e1e128e003f0a4db90fd222
f543db1fb407f19119e0287efe70de2e39d175b5
/Mongo_Api/src/main/java/com/elkinprog/api/repositories/StoreRepository.java
880572173949690694fce4b915cfac0ab2e35a05
[]
no_license
elkinprog/SpringBootStore
380b268940cf516ec355f6051cc3c802325c370f
5023e9a91ed8485833fa7f4b039fdeed13c83291
refs/heads/master
2023-04-16T04:12:58.506569
2021-04-28T05:14:28
2021-04-28T05:14:28
362,344,634
0
0
null
null
null
null
UTF-8
Java
false
false
305
java
package com.elkinprog.api.repositories; import org.springframework.data.mongodb.repository.MongoRepository; import org.springframework.stereotype.Repository; import com.elkinprog.api.model.ModelStore; @Repository public interface StoreRepository extends MongoRepository<ModelStore, String> { }
[ "elkinprog@gmail.com" ]
elkinprog@gmail.com
6852714ecb31893aac1939be010e74b3899f571a
774b50fe5091754f23ef556c07a4d1aab56efe27
/oag/src/main/java/org/oagis/model/v101/QualitativeType.java
6a0b775124bfe286e20d2ed064cb2d76c8150d19
[]
no_license
otw1248/thirdpartiess
daa297c2f44adb1ffb6530f88eceab6b7f37b109
4cbc4501443d807121656e47014d70277ff30abc
refs/heads/master
2022-12-07T17:10:17.320160
2022-11-28T10:56:19
2022-11-28T10:56:19
33,661,485
0
0
null
null
null
null
UTF-8
Java
false
false
2,436
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: 2015.04.09 at 04:59:34 PM CST // package org.oagis.model.v101; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * The type that represents The qualitative result from a test or analysis * * <p>Java class for QualitativeType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="QualitativeType"> * &lt;complexContent> * &lt;extension base="{http://www.openapplications.org/oagis/10}QualitativeBaseType"> * &lt;sequence> * &lt;element name="Extension" type="{http://www.openapplications.org/oagis/10}QualitativeExtensionType" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "QualitativeType", propOrder = { "extension" }) public class QualitativeType extends QualitativeBaseType { @XmlElement(name = "Extension") protected List<QualitativeExtensionType> extension; /** * Gets the value of the extension property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the extension property. * * <p> * For example, to add a new item, do as follows: * <pre> * getExtension().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link QualitativeExtensionType } * * */ public List<QualitativeExtensionType> getExtension() { if (extension == null) { extension = new ArrayList<QualitativeExtensionType>(); } return this.extension; } }
[ "otw1248@otw1248.com" ]
otw1248@otw1248.com
5a99c7ac5f16cba0577e3cfe71a5b8eb4fd76584
ad6f23bfacda696103e7f397592f2295223e1a7b
/Code/Programmering/1.semester/modul 15 Inheritant/Person1.java
03ca2bb4aab71dce0749e79e03b8f7e84963e52f
[]
no_license
Alirazaakhtar/KeaCode
8b6847aef7a6ad4af124d33596de5712144bed80
7260130c014776a48f6c2bdf145d0c912a0c9bfe
refs/heads/master
2023-03-22T07:57:02.063399
2021-03-14T19:21:38
2021-03-14T19:21:38
297,443,548
0
0
null
null
null
null
UTF-8
Java
false
false
255
java
public class Person1 extends Eat{ //overrider mehtodA fra Eat klassen!!! public void mehtodA(){ System.out.println("Hello guys, u alrigth?"); } public void mehtodB(){ System.out.println("I am hungry?"); } }
[ "56973809+alix0731@users.noreply.github.com" ]
56973809+alix0731@users.noreply.github.com
121a321749197a3cf719eaa5d21bd627e1740be1
f27cb821dd601554bc8f9c112d9a55f32421b71b
/integration/eclipselink/src/main/java/com/blazebit/persistence/integration/eclipselink/function/ExpressionOperatorJpqlFunction.java
962f0213015c03fe237d88eefa879d33fc2ac2dd
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Blazebit/blaze-persistence
94f7e75154e80ce777a61eb3d436135ad6d7a497
a9b1b6efdd7ae388e7624adc601a47d97609fdaa
refs/heads/main
2023-08-31T22:41:17.134370
2023-07-14T15:31:39
2023-07-17T14:52:26
21,765,334
1,475
92
Apache-2.0
2023-08-07T18:10:38
2014-07-12T11:08:47
Java
UTF-8
Java
false
false
10,128
java
/* * Copyright 2014 - 2023 Blazebit. * * 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.blazebit.persistence.integration.eclipselink.function; import com.blazebit.persistence.spi.FunctionRenderContext; import com.blazebit.persistence.spi.JpqlFunction; import org.eclipse.persistence.expressions.ExpressionOperator; import java.math.BigDecimal; import java.math.BigInteger; /** * * @author Christian Beikov * @since 1.0.0 */ public class ExpressionOperatorJpqlFunction implements JpqlFunction { private final ExpressionOperator function; public ExpressionOperatorJpqlFunction(ExpressionOperator function) { this.function = function; } @Override public boolean hasArguments() { // Not sure how to determine that return true; } @Override public boolean hasParenthesesIfNoArguments() { // Not sure how to determine that return true; } @Override public Class<?> getReturnType(Class<?> firstArgumentType) { if (firstArgumentType == null) { return null; } // Eclipselink apparently does not support resolving the type... // So we have to hack something up int selector = function.getSelector(); // Aggregate if (selector == ExpressionOperator.Count) { return Long.class; } else if (selector == ExpressionOperator.Sum) { if (firstArgumentType == BigInteger.class || firstArgumentType == BigDecimal.class) { return firstArgumentType; } else if (firstArgumentType == Float.class || firstArgumentType == Double.class) { return Double.class; } return Long.class; } else if (selector == ExpressionOperator.Average) { return Double.class; } else if (selector == ExpressionOperator.Maximum || selector == ExpressionOperator.Minimum) { return firstArgumentType; } else if (selector == ExpressionOperator.StandardDeviation || selector == ExpressionOperator.Variance) { if (firstArgumentType == Float.class || firstArgumentType == Double.class) { return Double.class; } else { return BigDecimal.class; } } if (selector == ExpressionOperator.Coalesce || selector == ExpressionOperator.NullIf || selector == ExpressionOperator.Decode || selector == ExpressionOperator.Case || selector == ExpressionOperator.CaseCondition) { return firstArgumentType; } // General if (selector == ExpressionOperator.ToUpperCase || selector == ExpressionOperator.ToLowerCase || selector == ExpressionOperator.Chr || selector == ExpressionOperator.Concat || selector == ExpressionOperator.Initcap || selector == ExpressionOperator.Soundex || selector == ExpressionOperator.LeftPad || selector == ExpressionOperator.LeftTrim || selector == ExpressionOperator.Replace || selector == ExpressionOperator.RightPad || selector == ExpressionOperator.RightTrim || selector == ExpressionOperator.Substring || selector == ExpressionOperator.Translate || selector == ExpressionOperator.Trim || selector == ExpressionOperator.Ascii || selector == ExpressionOperator.Reverse || selector == ExpressionOperator.Replicate || selector == ExpressionOperator.Right || selector == ExpressionOperator.ToChar || selector == ExpressionOperator.ToCharWithFormat || selector == ExpressionOperator.RightTrim2 || selector == ExpressionOperator.Trim2 || selector == ExpressionOperator.LeftTrim2 || selector == ExpressionOperator.SubstringSingleArg) { return String.class; } else if (selector == ExpressionOperator.Instring || selector == ExpressionOperator.Length || selector == ExpressionOperator.CharIndex || selector == ExpressionOperator.CharLength || selector == ExpressionOperator.Locate || selector == ExpressionOperator.Locate2 || selector == ExpressionOperator.Extract) { return Integer.class; } else if (selector == ExpressionOperator.ToNumber) { return BigDecimal.class; // } else if (selector == HexToRaw) { // } else if (selector == Difference) { // } else if (selector == Any) { // } else if (selector == Some) { // } else if (selector == All) { // } else if (selector == Cast) { } // Date if (selector == ExpressionOperator.AddMonths) { return firstArgumentType; } else if (selector == ExpressionOperator.DateToString || selector == ExpressionOperator.DateName) { return String.class; } else if (selector == ExpressionOperator.LastDay || selector == ExpressionOperator.NextDay || selector == ExpressionOperator.RoundDate || selector == ExpressionOperator.ToDate || selector == ExpressionOperator.Today || selector == ExpressionOperator.AddDate || selector == ExpressionOperator.DateDifference || selector == ExpressionOperator.TruncateDate || selector == ExpressionOperator.NewTime || selector == ExpressionOperator.CurrentDate) { return java.sql.Date.class; } else if (selector == ExpressionOperator.MonthsBetween || selector == ExpressionOperator.DatePart) { return Integer.class; } else if (selector == ExpressionOperator.Nvl) { return firstArgumentType; } else if (selector == ExpressionOperator.CurrentTime) { return java.sql.Time.class; } // Math if (selector == ExpressionOperator.Ceil || selector == ExpressionOperator.Floor || selector == ExpressionOperator.Exp || selector == ExpressionOperator.Abs || selector == ExpressionOperator.Mod || selector == ExpressionOperator.Power || selector == ExpressionOperator.Round || selector == ExpressionOperator.Trunc || selector == ExpressionOperator.Greatest || selector == ExpressionOperator.Least || selector == ExpressionOperator.Add || selector == ExpressionOperator.Subtract || selector == ExpressionOperator.Multiply || selector == ExpressionOperator.Negate || selector == ExpressionOperator.Divide) { return firstArgumentType; } else if (selector == ExpressionOperator.Cos || selector == ExpressionOperator.Cosh || selector == ExpressionOperator.Acos || selector == ExpressionOperator.Asin || selector == ExpressionOperator.Atan || selector == ExpressionOperator.Sqrt || selector == ExpressionOperator.Ln || selector == ExpressionOperator.Log || selector == ExpressionOperator.Sin || selector == ExpressionOperator.Sinh || selector == ExpressionOperator.Tan || selector == ExpressionOperator.Tanh || selector == ExpressionOperator.Atan2 || selector == ExpressionOperator.Cot) { // Maybe double? return firstArgumentType; } else if (selector == ExpressionOperator.Sign) { return Integer.class; } // Predicates if (selector == ExpressionOperator.Equal || selector == ExpressionOperator.NotEqual || selector == ExpressionOperator.EqualOuterJoin || selector == ExpressionOperator.LessThan || selector == ExpressionOperator.LessThanEqual || selector == ExpressionOperator.GreaterThan || selector == ExpressionOperator.GreaterThanEqual || selector == ExpressionOperator.Like || selector == ExpressionOperator.NotLike || selector == ExpressionOperator.In || selector == ExpressionOperator.InSubQuery || selector == ExpressionOperator.NotIn || selector == ExpressionOperator.NotInSubQuery || selector == ExpressionOperator.Between || selector == ExpressionOperator.NotBetween || selector == ExpressionOperator.IsNull || selector == ExpressionOperator.NotNull || selector == ExpressionOperator.Exists || selector == ExpressionOperator.NotExists || selector == ExpressionOperator.LikeEscape || selector == ExpressionOperator.NotLikeEscape || selector == ExpressionOperator.Regexp) { return Boolean.class; } return null; } @Override public void render(FunctionRenderContext context) { throw new UnsupportedOperationException("Rendering functions through this API is not possible!"); } }
[ "christian.beikov@gmail.com" ]
christian.beikov@gmail.com
1bd09e162a092972add74df84e4ee61591b5e63f
f103df66b40477104085bc35aba0e76df26393cf
/src/com/yiqingjing/utils/ChangeBluetootn.java
1cf0d6052fdefe02c46dc1bc9d4fda996343bbe4
[]
no_license
renlei0109/yiqingjing
69671550c6caf4cc1a2425f3bf75a1f572574876
f026b76f91a23348a81cc75d2174e2aae45ac21b
refs/heads/master
2021-01-01T18:07:03.480931
2015-04-17T07:23:40
2015-04-17T07:23:40
34,093,013
0
0
null
null
null
null
UTF-8
Java
false
false
726
java
package com.yiqingjing.utils; import android.annotation.SuppressLint; import android.app.Service; import android.bluetooth.BluetoothAdapter; import android.content.Context; @SuppressLint("NewApi") public class ChangeBluetootn { private Context context; private BluetoothAdapter bluetoothAdapter; public ChangeBluetootn(Context context){ this.context = context; bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); } public String getBluetoothState(){ boolean flag = bluetoothAdapter.isEnabled(); if(flag){ return "开"; }else{ return "关"; } } public void setBluetoothState(boolean state){ if(state == true){ bluetoothAdapter.enable(); }else{ bluetoothAdapter.disable(); } } }
[ "114949142@qq.com" ]
114949142@qq.com
ec4810f759f5c2a7a3c28ab8cc11f0aa84cb2a44
45c473971314c76a0ee7e0a666051eae2fba07b7
/app/Global/IGGlobal.java
c25be3344d7ae4274475e4b209a314ee6575c1a2
[]
no_license
maxrevilo/SQLfi_Infoguias
b8fa71693f4f52a28de80fd7244c8c4f54428074
f55b6607fe820f485f264d94f74de0f2bb96d96f
refs/heads/master
2021-01-19T02:40:50.113369
2012-07-15T17:16:49
2012-07-15T17:16:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,019
java
package Global; import Cliente.ClienteSQLfiImpl; import play.*; public class IGGlobal extends GlobalSettings { private static ClienteSQLfiImpl sqlfiApp; static int i; @Override public void onStart(Application app) { sqlfiApp = new ClienteSQLfiImpl(); // Se carga la configuracion SQLfi del archivo de propiedades. try { sqlfiApp.cargarConfiguracion(); sqlfiApp.conectarUsuarios(); } catch (Exception e) { e.printStackTrace(); } Logger.info("SQLfi Client connected"); i = 0; } @Override public void onStop(Application app) { if(sqlfiApp!=null) { try { sqlfiApp.desconectarUsuarios(); } catch (Exception e) { e.printStackTrace(); } } Logger.info("SQLfi Client disconnected..."); } public static Cliente.ClienteSQLfi SQLfiApp() { return sqlfiApp; } public static int i() { return i++;} }
[ "oliver.a.perez.c@gmail.com" ]
oliver.a.perez.c@gmail.com
4efe91d426c90214efd7f41777cec9fdc14a01a3
962328c0f5e44123991bbcde6a5158755c235013
/src/main/java/cn/qingtianr/controller/NoAnnotationController.java
8f776131fe042ff14a6839b4da3f693893276216
[]
no_license
yang2yang/YangMvc
4874a8f98147d1d9497779d25fd466a77e3e2688
27f466e62b5931f294f0038f87de64dc092270a0
refs/heads/master
2021-01-23T04:09:49.120057
2017-04-29T15:02:47
2017-04-29T15:02:47
86,167,348
1
0
null
null
null
null
UTF-8
Java
false
false
205
java
package cn.qingtianr.controller; /** * Created by ding on 2017/4/1. */ /** * 定义一个没有被YangController注解的类 */ public class NoAnnotationController { public void fun(){ } }
[ "197753119@qq.com" ]
197753119@qq.com
7090a262f177ec805eda9ad5b253bb6b46718c73
3902f244ba7693213f3f23eefd801a3c0eacaede
/src/automation/enboard/pages/PersonalDetailsPage.java
adae1bc1bbed22aadfb8d3912f75c7eb4587abd9
[]
no_license
snandurkar/Enboard
51baffb4dd67bb459fe0ec56db5641f788fbbf0f
102f570ea614e2090a98fe35cce7658abea15aa8
refs/heads/master
2021-09-06T23:11:13.683982
2018-02-13T08:52:35
2018-02-13T08:52:35
119,539,587
0
0
null
null
null
null
UTF-8
Java
false
false
4,679
java
package automation.enboard.pages; import java.util.HashMap; import java.util.List; import java.util.Map; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import automation.enboard.common.AutoLogger; import automation.enboard.common.BasePage; public class PersonalDetailsPage extends BasePage{ public PersonalDetailsPage(WebDriver driver, AutoLogger handler) { super(driver); PageFactory.initElements(driver, this); super.handler = handler; handler.setCurrentPageClass(this.getClass()); } @FindBy(id = "PD_txtFatherName") private WebElement fatherNameTextBox; @FindBy(id = "PD_ddlNationality") private WebElement natinalityDropDown; @FindBy(id = "PD_ddlBloodGroup") private WebElement bloodGroupDropDown; @FindBy(id = "PD_ddlMaritalStatus") private WebElement maritalStatusDropDown; @FindBy(id = "PD_txtSpouseName") private WebElement spouseNameTextBox; @FindBy(id = "PD_ddlMotherTongue") private WebElement motherTongueDropDown; @FindBy(id = "PD_txtPANNumber") private WebElement panNumberTextBox; @FindBy(id = "PD_txtUANNumber") private WebElement uanNumberTextBox; @FindBy(id = "PD_txtAadharCardNumber") private WebElement aadharCardNumberTextBox; @FindBy(id = "PD_lstPlaceofBirthState") private WebElement birthPlaceStateDropDown; @FindBy(id = "PD_lstPlaceofBirthCity") private WebElement birthPlaceCityDropDown; @FindBy(id = "PD_txtPassportNumber") private WebElement passportNumberTextBox; @FindBy(id = "PD_txtPassportExpiryDate") private WebElement passportExpiryDateCalender; @FindBy(id = "PD_SaveId") private WebElement saveDetailsButton; @FindBy(id = "PD_txtNameOnPassport") private WebElement nameOnPassportTextBox; @FindBy(xpath = "/html/body/div[1]/div/nav/ul/li[2]/a") private WebElement personalDetailsTab; public void clickOnPersonalDetailsTab(){ try { Thread.sleep(3000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } personalDetailsTab.click(); } public void fillPersonalDetails(Map<String, String> personalDetails){ actions.sendKeys(fatherNameTextBox, personalDetails.get("FatherName")); actions.selectDropdownByVisibleText(natinalityDropDown, personalDetails.get("Nationality")); actions.selectDropdownByVisibleText(bloodGroupDropDown, personalDetails.get("BloodGroup")); actions.selectDropdownByVisibleText(maritalStatusDropDown, personalDetails.get("MaritalStatus")); actions.sendKeys(spouseNameTextBox, personalDetails.get("SpouseName")); actions.selectDropdownByVisibleText(motherTongueDropDown, personalDetails.get("MotherTongue")); actions.sendKeys(panNumberTextBox, personalDetails.get("PanNumber")); actions.sendKeys(aadharCardNumberTextBox, personalDetails.get("AadharCardNumber")); actions.sendKeys(uanNumberTextBox, personalDetails.get("UANNumber")); actions.sendKeys(passportNumberTextBox, personalDetails.get("PassPortNumber")); actions.sendKeys(nameOnPassportTextBox, personalDetails.get("NameOnPassword")); actions.sendKeys(passportExpiryDateCalender, personalDetails.get("ExpiryDateOnPassport")); nameOnPassportTextBox.click(); actions.selectDropdownByVisibleText(birthPlaceStateDropDown, personalDetails.get("BirthState")); actions.selectDropdownByVisibleText(birthPlaceCityDropDown, personalDetails.get("BirthCity")); //saveDetailsButton.click(); } public Map<String, String> getPersonalDetails(){ Map<String, String> personalDetails = new HashMap<String, String>(); personalDetails.put("FatherName", "testFName"); personalDetails.put("Nationality", "India"); personalDetails.put("BloodGroup", "A+"); personalDetails.put("SpouseName", "testSName"); personalDetails.put("MaritalStatus", "Married"); personalDetails.put("MotherTongue", "Marathi"); personalDetails.put("AadharCardNumber", "112367899778"); personalDetails.put("UANNumber", "767878784"); personalDetails.put("PassPortNumber", "KMH5640JK3+"); personalDetails.put("NameOnPassword", "testPName"); personalDetails.put("ExpiryDateOnPassport", "18/12/2019"); personalDetails.put("BirthState", "Maharashtra"); personalDetails.put("BirthCity", "Pune"); personalDetails.put("PanNumber", "76787876"); return personalDetails; } public boolean verifyUpdatedPersonalDetails(Map<String, String> personalDetails){ return personalDetails.get("FatherName").equalsIgnoreCase(fatherNameTextBox.getText()); } }
[ "snandurkar@lampsplus.com" ]
snandurkar@lampsplus.com
64cf2c57d3ccdc5f8502921e17996ebf71bf3baa
bb13907de0911a1c03f1a32a7ea16740234abf1c
/src/main/java/com/emc/fapi/jaxws/v4_3_1/DefaultArrayResourcePoolParams.java
a23ed62932afba88b7b1a54c07f7a906d57f8625
[]
no_license
noamda/fal431
9287e95fa2bacdace92e65b16ec6985ce2ded29c
dad30667424970fba049df3ba2c2023b82b9276e
refs/heads/master
2021-01-21T14:25:10.211169
2016-06-20T08:55:43
2016-06-20T08:58:33
58,481,483
0
0
null
null
null
null
UTF-8
Java
false
false
2,991
java
package com.emc.fapi.jaxws.v4_3_1; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DefaultArrayResourcePoolParams", propOrder = {"requiredSizeInBytes", "arrayUid", "tieringPolicy", "poolType"}) public class DefaultArrayResourcePoolParams { protected long requiredSizeInBytes; @XmlElement(nillable = true) protected ArrayUID arrayUid; protected ArrayResourcePoolTieringPolicy tieringPolicy; protected ArrayResourcePoolType poolType; public DefaultArrayResourcePoolParams() { } public DefaultArrayResourcePoolParams(long requiredSizeInBytes, ArrayUID arrayUid, ArrayResourcePoolTieringPolicy tieringPolicy, ArrayResourcePoolType poolType) { this.requiredSizeInBytes = requiredSizeInBytes; this.arrayUid = arrayUid; this.tieringPolicy = tieringPolicy; this.poolType = poolType; } public long getRequiredSizeInBytes() { return this.requiredSizeInBytes; } public void setRequiredSizeInBytes(long value) { this.requiredSizeInBytes = value; } public ArrayUID getArrayUid() { return this.arrayUid; } public void setArrayUid(ArrayUID value) { this.arrayUid = value; } public ArrayResourcePoolTieringPolicy getTieringPolicy() { return this.tieringPolicy; } public void setTieringPolicy(ArrayResourcePoolTieringPolicy value) { this.tieringPolicy = value; } public ArrayResourcePoolType getPoolType() { return this.poolType; } public void setPoolType(ArrayResourcePoolType value) { this.poolType = value; } public boolean equals(Object obj) { if (!(obj instanceof DefaultArrayResourcePoolParams)) { return false; } DefaultArrayResourcePoolParams otherObj = (DefaultArrayResourcePoolParams) obj; return (this.requiredSizeInBytes == otherObj.requiredSizeInBytes) && (this.arrayUid != null ? this.arrayUid.equals(otherObj.arrayUid) : this.arrayUid == otherObj.arrayUid) && (this.tieringPolicy != null ? this.tieringPolicy.equals(otherObj.tieringPolicy) : this.tieringPolicy == otherObj.tieringPolicy) && (this.poolType != null ? this.poolType.equals(otherObj.poolType) : this.poolType == otherObj.poolType); } public int hashCode() { return (int) this.requiredSizeInBytes ^ (this.arrayUid != null ? this.arrayUid.hashCode() : 0) ^ (this.tieringPolicy != null ? this.tieringPolicy.hashCode() : 0) ^ (this.poolType != null ? this.poolType.hashCode() : 0); } public String toString() { return "DefaultArrayResourcePoolParams [requiredSizeInBytes=" + this.requiredSizeInBytes + ", " + "arrayUid=" + this.arrayUid + ", " + "tieringPolicy=" + this.tieringPolicy + ", " + "poolType=" + this.poolType + "]"; } }
[ "style.daniel@gmail.com" ]
style.daniel@gmail.com
729e731553da3aa97bfa252079e981d3943f07d3
83d4277f16a60022883fd3c32dc32709dd5516f3
/fit/gof/chain_of_responsibility/dispatcher.java
52142019997ba739529c3476a8ca5589df85c79c
[]
no_license
gustavofonseca/sandbox
60ff78e9886d25fdccfb96811a18853ae876a443
a0feec6c962e086aae39a7a93dbe6611b28eb65c
refs/heads/master
2021-01-22T07:32:39.386218
2011-05-30T16:13:20
2011-05-30T16:13:20
1,179,820
0
0
null
null
null
null
UTF-8
Java
false
false
201
java
class Dispatcher { Cat cat = new Cat(); Dog dog = new Dog(); public void handleForMe(String request) { cat.successor = dog; cat.processRequest(request); } }
[ "gustavofons@gmail.com" ]
gustavofons@gmail.com
095062ff7642e253693b45d2b2f8ef744a29d18c
1b14dfa3c1903e942d0949dae803089d6d3a4626
/src/com/zadaci/Kalkulator.java
bc55e8a5669c4311f7db124b732b90c38af2c21e
[]
no_license
ElmedinEdo/ZadacaJUNIT
df5f38fa270dbed1b66c24695d390346d0f619b5
155c0ca0c14796034e78f270ef9103371ddc4e94
refs/heads/master
2020-04-17T09:33:25.163829
2019-01-18T19:41:10
2019-01-18T19:41:10
166,463,148
0
0
null
null
null
null
UTF-8
Java
false
false
301
java
package com.zadaci; public class Kalkulator { public double sabiranje(double a, double b){ return a + b; } public double oduzimanje(double a, double b){ return a - b; } public double mnozenje(double a, double b){ return a * b; } public double djeljenje(double a, double b){ return a / b; } }
[ "edohanic@hotmail.com" ]
edohanic@hotmail.com
ea9cff4525f4aa8dbdda1362ee9ac83f8082d826
0dccef976f19741f67479f32f15d76c1e90e7f94
/ave.java
5a292a8623303e9402dd8a5ed29971edddb60678
[]
no_license
Tominous/LabyMod-1.9
a960959d67817b1300272d67bd942cd383dfd668
33e441754a0030d619358fc20ca545df98d55f71
refs/heads/master
2020-05-24T21:35:00.931507
2017-02-06T21:04:08
2017-02-06T21:04:08
187,478,724
1
0
null
2019-05-19T13:14:46
2019-05-19T13:14:46
null
UTF-8
Java
false
false
3,873
java
import java.util.Random; public class ave extends atp { private static final arc a = aju.r.u().a(ang.b, anj.a.a); private static final arc b = aju.t.u().a(anf.e, anj.a.a).a(anf.b, Boolean.valueOf(false)); public ave() { super(false); } public boolean b(aht ☃, Random ☃, cj ☃) { int ☃ = ☃.nextInt(4) + 5; while (☃.o(☃.b()).a() == axe.h) { ☃ = ☃.b(); } boolean ☃ = true; if ((☃.q() < 1) || (☃.q() + ☃ + 1 > 256)) { return false; } for (int ☃ = ☃.q(); ☃ <= ☃.q() + 1 + ☃; ☃++) { int ☃ = 1; if (☃ == ☃.q()) { ☃ = 0; } if (☃ >= ☃.q() + 1 + ☃ - 2) { ☃ = 3; } cj.a ☃ = new cj.a(); for (int ☃ = ☃.p() - ☃; (☃ <= ☃.p() + ☃) && (☃); ☃++) { for (int ☃ = ☃.r() - ☃; (☃ <= ☃.r() + ☃) && (☃); ☃++) { if ((☃ >= 0) && (☃ < 256)) { arc ☃ = ☃.o(☃.c(☃, ☃, ☃)); ajt ☃ = ☃.t(); if ((☃.a() != axe.a) && (☃.a() != axe.j)) { if ((☃ == aju.j) || (☃ == aju.i)) { if (☃ > ☃.q()) { ☃ = false; } } else { ☃ = false; } } } else { ☃ = false; } } } } if (!☃) { return false; } ajt ☃ = ☃.o(☃.b()).t(); if (((☃ != aju.c) && (☃ != aju.d)) || (☃.q() >= 256 - ☃ - 1)) { return false; } a(☃, ☃.b()); for (int ☃ = ☃.q() - 3 + ☃; ☃ <= ☃.q() + ☃; ☃++) { int ☃ = ☃ - (☃.q() + ☃); int ☃ = 2 - ☃ / 2; for (int ☃ = ☃.p() - ☃; ☃ <= ☃.p() + ☃; ☃++) { int ☃ = ☃ - ☃.p(); for (int ☃ = ☃.r() - ☃; ☃ <= ☃.r() + ☃; ☃++) { int ☃ = ☃ - ☃.r(); if ((Math.abs(☃) != ☃) || (Math.abs(☃) != ☃) || ((☃.nextInt(2) != 0) && (☃ != 0))) { cj ☃ = new cj(☃, ☃, ☃); if (!☃.o(☃).b()) { a(☃, ☃, b); } } } } } for (int ☃ = 0; ☃ < ☃; ☃++) { arc ☃ = ☃.o(☃.b(☃)); ajt ☃ = ☃.t(); if ((☃.a() == axe.a) || (☃.a() == axe.j) || (☃ == aju.i) || (☃ == aju.j)) { a(☃, ☃.b(☃), a); } } for (int ☃ = ☃.q() - 3 + ☃; ☃ <= ☃.q() + ☃; ☃++) { int ☃ = ☃ - (☃.q() + ☃); int ☃ = 2 - ☃ / 2; cj.a ☃ = new cj.a(); for (int ☃ = ☃.p() - ☃; ☃ <= ☃.p() + ☃; ☃++) { for (int ☃ = ☃.r() - ☃; ☃ <= ☃.r() + ☃; ☃++) { ☃.c(☃, ☃, ☃); if (☃.o(☃).a() == axe.j) { cj ☃ = ☃.e(); cj ☃ = ☃.f(); cj ☃ = ☃.c(); cj ☃ = ☃.d(); if ((☃.nextInt(4) == 0) && (☃.o(☃).a() == axe.a)) { a(☃, ☃, apj.c); } if ((☃.nextInt(4) == 0) && (☃.o(☃).a() == axe.a)) { a(☃, ☃, apj.e); } if ((☃.nextInt(4) == 0) && (☃.o(☃).a() == axe.a)) { a(☃, ☃, apj.d); } if ((☃.nextInt(4) == 0) && (☃.o(☃).a() == axe.a)) { a(☃, ☃, apj.b); } } } } } return true; } private void a(aht ☃, cj ☃, arn ☃) { arc ☃ = aju.bn.u().a(☃, Boolean.valueOf(true)); a(☃, ☃, ☃); int ☃ = 4; ☃ = ☃.b(); while ((☃.o(☃).a() == axe.a) && (☃ > 0)) { a(☃, ☃, ☃); ☃ = ☃.b(); ☃--; } } }
[ "admin@timo.de.vc" ]
admin@timo.de.vc
5bd22604454bdf14b53755609028239abbd1ac21
bdb5199c6593fb7cb8b4b31bc5e2e696976f8669
/SparNordHeatMaps/src/com/sparnord/heatmaps/grcu/constants/GRCMetaAttribut.java
b24c55de2149f8a3f9607ae768354626f039bb07
[]
no_license
dkmingye/SN-report
b369446adee8d1ceabd5d684f684b0da5fc706a0
4fde293505173301f6815d9072e1e27a4279d993
refs/heads/master
2021-01-15T15:31:18.206258
2016-07-25T12:49:59
2016-07-25T12:49:59
55,147,791
4
0
null
null
null
null
UTF-8
Java
false
false
4,718
java
package com.sparnord.heatmaps.grcu.constants; public class GRCMetaAttribut { public static String MA_CREATIONDATE = "~510000000L00[Creation Date]"; public static final String META_ATTRIBUTE = "~O20000000Y10[MetaAttribute]"; public static final String META_ATTRIBUTE_VALUE = "~(0000000C830[MetaAttributeValue]"; public static final String MA_ACTIONPLANNATURE = "~wS9yE9F4GjDE[Action Plan Nature]"; public static final String MA_ACTIONPLANSTATUS = "~vsbTSXOfEXyH[X]"; public static final String MA_ACTIONPLANPRIORITY = "~ltbTbFPfEnLL[X]"; public static final String MA_ACTION_PLAN_CATEGORY = "~6rbTOCOfELAG[Action Plan Category]"; public static final String MA_CAMPAIGN_TYPE = "~qvLQAPt4HzWU[Campaign Type]"; public static final String MA_ASSESSMENT_VALIDATION_END_DATE = "~aWGUxjd8FvlF[Assessment Validation End Date]"; public static final String MA_CONTROL_STATUS = "~me(3W4XrFXRA[Control Status]"; public static final String MA_RISK_STATUS = "~Mo1eTITMGrpW[Risk Object Status]"; public static final String MA_SHORT_NAME = "~Z20000000D60[Short Name]"; public static final String MA_SELECT = "~ZIXaICfyheJ0[_Select]"; public static final String MA_CREATION_DATE = "~510000000L00[Creation Date]"; public static final String MA_INTERNAL_VALUE = "~L20000000L50[Internal Value]"; public static final String MA_VALUE_NAME = "~H3l5fU1F3n80[Value Name]"; public static final String MA_ASSESSMENT_END_DATE = "~1MFDsrsyE9lG[Assessment End Date]"; public static final String MA_ASSESSMENT_START_DATE = "~aKFDYrsyEbgG[Assessment Start Date]"; public static final String MA_SIGNATORY_TYPE = "~RubAV1ptED6T[Signatory Type]"; public static final String MA_QUESTIONNAIRE_STATUS = "~FSf5nS5HIH1C[Questionnaire Status]"; public static final String MA_PARAMETRISATION = "~eIXaJCfyhuJ0[_Parameterization]"; public static final String MA_LIKELIHOOD = "~3CKVX(7vFn9L[ERM Likelihood]"; public static final String MA_IMPACT = "~kEKVUu7vFnyK[ERM Impact]"; public static final String MA_COMPUTED_VALUE = "~ebwhMB3iDLiH[Computed Value]"; public static final String MA_CONTROL_DESIGN = "~9kwEom3vFXgM[ERM Control Design]"; public static final String MA_CONTROL_EFFICIENCY = "~xjwEoq3vFXvM[ERM Control Efficiency]"; public static final String MA_CONTROL_LEVEL = "~yHLey8AwFHYJ[ERM Control Level]"; public static final String MA_INHERENT_RISK = "~lFKVs28vF5NL[ERM Inherent Risk]"; public static final String MA_NET_RISK = "~DJCPGp7wFzzG[ERM Net Risk]"; public static final String MA_VELOCITY = "~nMkFZLqqKHuE[Velocity]"; public static final String MA_WEIGHTED_VELOCITY = "~kNkFqLqqK1xE[Weighted Inherent Risk]"; public static final String MA_SESSION_STATUS = "~rlhJ(GrnFfXA[Assessment Session Status]"; public static final String MA_HEX_ID_ABS = "~H20000000550[_HexaIdAbs]"; public static final String MA_ComputedValue = "~ebwhMB3iDLiH[X]"; public static final String MA_InternalValue = "~L20000000L50[Internal Value]"; public static final String MA_PLANNED_END_DATE = "~UrbTe)OfE1TK[Planned End Date]"; public static final String MA_ENTITY_TYPE = "~XpFbeKfOn400[Org-Unit Type]"; public static final String MA_PLAN_BEGIN_DATE = "~9p2YE2TyFHoK[X]"; public static final String MA_PLAN_END_DATE = "~Fm2YT2TyFjrK[X]"; public static final String MA_TARGET_RISK = "~9QuMpD7fHbC1[Target Risk <ERM>]"; public static String MA_AssessmentPlannedStartDate = "~UnO7QYI3Gzs9[Assessment Planned Start Date]"; public static String MA_AssessmentPlannedEndtDate = "~rpO7IXI3Gvq9[Assessment Planned End Date]"; public static final String MA_ORDER = "~410000000H00[Order]"; public static final String MA_NAME = "~210000000900[Name]"; public static final String MA_AssessmentMode = "~8pn9rU2(Fz)O[X]"; public static final String MA_Mode = "~7qv19b0JIvVT[X]"; public static final String MA_RGB_COLOR = "~i30000000nA0[RGBColor]"; }
[ "mingye@bizcon.dk" ]
mingye@bizcon.dk
508e9bc85593f8dc878c47f4a0fbd92bdb108726
2c43810fbed9683ab5be72eb212db0374a170426
/demo10_mail/src/com/cbb/dao/ContactDao.java
466b3c2ea7c81836b8195f1d983c5bec3fa4d6e5
[]
no_license
cbb294609622/web
756056b79482fe89d8a38bccadfce8ffb7a93b47
d8cae174865321f17798d5c26b436c8f410da007
refs/heads/master
2021-01-22T07:22:46.584080
2017-03-30T05:55:26
2017-03-30T05:55:26
81,811,028
0
0
null
null
null
null
UTF-8
Java
false
false
661
java
package com.cbb.dao; import java.util.List; import com.cbb.entity.Contact; /** * 联系人的DAO接口 * @author bb * */ public interface ContactDao { /** * 添加联系人 * @param contact */ public void addContact(Contact contact); /** * 修改联系人 * @param contact */ public void updateContact(Contact contact); /** * 删除联系人 * @param contact */ public void deleteContact(String id); /** * 查询所有联系人 * @return */ public List<Contact> findAll(); /** * 根据编号查询联系人 * @param id * @return */ public Contact findById(String id); }
[ "bobo.chen@venusource.com" ]
bobo.chen@venusource.com
6ef6e6ae3f45e12a4ee8781d16a18f61adde9632
7b04c3c3995059b89d1e197bf647a4209c035c3d
/app/src/main/java/com/example/orosz/fidlee/InfoScene.java
b78184378944629e2dca61e1874d0b3101fb304b
[]
no_license
oroszdd/Fidlee
894a963eb60073fd8f883d7560f3f758eeb3c688
48c43687127a0e8d01f5a4ca49083b740e522f57
refs/heads/master
2020-03-22T03:56:36.915270
2018-07-24T17:28:02
2018-07-24T17:28:02
139,462,020
0
0
null
null
null
null
UTF-8
Java
false
false
2,406
java
package com.example.orosz.fidlee; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.RectF; import android.view.MotionEvent; public class InfoScene implements Scene { @Override public void motionEventHandler(MotionEvent event) { switch(event.getAction()){ case MotionEvent.ACTION_DOWN: if(event.getX() < Constants.SCREEN_WIDTH/3-5 && event.getY() > Constants.SCREEN_HEIGHT*9/10){ GamePanel.sceneManager.ACTIVE_SCENE = 1; } if(event.getX() < Constants.SCREEN_WIDTH*2/3-5 && event.getX() > Constants.SCREEN_WIDTH/3+5 && event.getY() > Constants.SCREEN_HEIGHT*9/10){ GamePanel.sceneManager.ACTIVE_SCENE = 0; } if(event.getX() > Constants.SCREEN_WIDTH*2/3+5 && event.getY() > Constants.SCREEN_HEIGHT*9/10){ GamePanel.sceneManager.ACTIVE_SCENE = 2; } } } @Override public void update() { } @Override public void draw(Canvas canvas) { // Get a paint object Paint paint = new Paint(); // Draw the background canvas.drawColor(Color.argb(255,150,200,255)); // Set the UI paint.setColor(Color.argb(80,150,220,0)); canvas.drawRect(new RectF(0,Constants.SCREEN_HEIGHT*9/10,Constants.SCREEN_WIDTH,Constants.SCREEN_HEIGHT),paint); paint.setColor(Color.argb(255,150,220,0)); canvas.drawRect(new RectF(0,Constants.SCREEN_HEIGHT*9/10,Constants.SCREEN_WIDTH/3-5,Constants.SCREEN_HEIGHT),paint); paint.setColor(Color.argb(255,0,0,0)); canvas.drawRect(new RectF(Constants.SCREEN_WIDTH/3-5,Constants.SCREEN_HEIGHT*9/10,Constants.SCREEN_WIDTH/3+5,Constants.SCREEN_HEIGHT),paint); canvas.drawRect(new RectF(Constants.SCREEN_WIDTH*2/3-5,Constants.SCREEN_HEIGHT*9/10,Constants.SCREEN_WIDTH*2/3+5,Constants.SCREEN_HEIGHT),paint); paint.setTextSize(30); canvas.drawText("Info",50,Constants.SCREEN_HEIGHT*19/20+10,paint); canvas.drawText("Fishing",190,Constants.SCREEN_HEIGHT*19/20+10,paint); canvas.drawText("Backpack",340,Constants.SCREEN_HEIGHT*19/20+10,paint); paint.setTextSize(50); canvas.drawText("Tomi egy Faggot",50,60,paint); } @Override public void terminate() { } }
[ "oroszdd@gmail.com" ]
oroszdd@gmail.com
8f2eb7478eba3b7d8aec70e150e8d3ebc1804ec5
a5f00700e15c0e3a4afb1a2e40b088cac7b35873
/cafe/src/main/java/com/kitri/cafe/admin/board/dao/BoardAdminDao.java
5b7bcf038bcfcdde36ae209dbac3cb1c9ca5420c
[]
no_license
joyunyeong/spring
caf8f3cf09d9d0e6c5bcbd539bbf3ee2f00169ee
e8eacecb9a1c28bc0dcee5dcf1c9959e840989dd
refs/heads/master
2022-12-21T15:42:21.010102
2019-07-03T22:29:24
2019-07-03T22:29:24
192,501,851
0
0
null
2022-12-16T04:52:53
2019-06-18T08:47:31
CSS
UTF-8
Java
false
false
541
java
package com.kitri.cafe.admin.board.dao; import java.util.List; import com.kitri.cafe.admin.board.model.BoardListDto; import com.kitri.cafe.admin.board.model.CategoryDto; public interface BoardAdminDao { // board 게시판 목록 불러오기 List<BoardListDto> getBoardMenuList(int ccode); List<BoardListDto> getCategoryList(); // 카테고리 목록 void makeCategory(CategoryDto categoryDto); // category 번호 : ccode List<BoardListDto> getBoardTypeList(); void makeBoard(BoardListDto boardListDto); }
[ "claire97j@naver.com" ]
claire97j@naver.com
f4f2312a0eaff9fea1ba34dfc7b68002f1283553
38f8654ef209f4b709620dce117d97464010f817
/furms-web-ui/src/main/java/io/imunity/furms/ui/views/user_settings/projects/ProjectGridModelMapper.java
60344f9ad2fe2ce04b2f3e7c7dccb7069c9ac4c1
[ "BSD-2-Clause" ]
permissive
unity-idm/furms
2a41699eb77f582d2439b6e6a49c0ced1cdb6a7a
3d66992bad72b782006c292612669107a9bffbc2
refs/heads/dev
2023-08-31T11:10:57.576761
2023-08-23T11:41:17
2023-08-23T11:41:17
293,072,384
4
1
BSD-2-Clause
2022-05-30T13:36:26
2020-09-05T12:34:25
Java
UTF-8
Java
false
false
1,716
java
/* * Copyright (c) 2020 Bixbit s.c. All rights reserved. * See LICENSE file for licensing information. */ package io.imunity.furms.ui.views.user_settings.projects; import io.imunity.furms.api.applications.ProjectApplicationsService; import io.imunity.furms.api.projects.ProjectService; import io.imunity.furms.domain.projects.Project; import io.imunity.furms.domain.projects.ProjectId; import java.util.Set; import java.util.stream.Collectors; import static io.imunity.furms.ui.views.user_settings.projects.UserStatus.ACTIVE; import static io.imunity.furms.ui.views.user_settings.projects.UserStatus.NOT_ACTIVE; import static io.imunity.furms.ui.views.user_settings.projects.UserStatus.REQUESTED; class ProjectGridModelMapper { private final ProjectService projectService; private final ProjectApplicationsService projectApplicationsService; ProjectGridModelMapper(ProjectService projectService, ProjectApplicationsService projectApplicationsService) { this.projectService = projectService; this.projectApplicationsService = projectApplicationsService; } Set<ProjectGridModel> map(Set<Project> projects){ Set<ProjectId> projectsIds = projectApplicationsService.findAllAppliedProjectsIdsForCurrentUser(); Set<ProjectId> usersProjectIds = projectService.getUsersProjectIds(); return projects.stream() .map(project -> ProjectGridModel.builder() .id(project.getId()) .communityId(project.getCommunityId()) .name(project.getName()) .description(project.getDescription()) .status( usersProjectIds.contains(project.getId()) ? ACTIVE : projectsIds.contains(project.getId()) ? REQUESTED : NOT_ACTIVE ) .build() ).collect(Collectors.toSet()); } }
[ "bihuniak.piotr@gmail.com" ]
bihuniak.piotr@gmail.com
3c2771a33ea025169713730cd08c768debd5f89e
8229884a9bd15286a34cbd2e7b4624ee158be378
/app/src/k7/java/com/mili/smarthome/tkj/main/face/activity/WffrFaceEnrollActivity.java
f5a3bc7b984fc741efaa5dacbff0335ad7a5211a
[]
no_license
chengcdev/smarthome
5ae58bc0ba8770598f83a36355b557c46f37b90c
4edb33dcdfcab39a3bc6e5342a7973ac703f1344
refs/heads/master
2022-12-03T18:04:39.172431
2020-08-20T05:22:57
2020-08-20T05:22:57
288,909,136
1
1
null
null
null
null
UTF-8
Java
false
false
7,360
java
package com.mili.smarthome.tkj.main.face.activity; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.os.Message; import android.view.SurfaceView; import android.view.TextureView; import android.view.View; import android.widget.TextView; import com.android.CommStorePathDef; import com.mili.smarthome.tkj.R; import com.mili.smarthome.tkj.app.Const; import com.mili.smarthome.tkj.appfunc.AppConfig; import com.mili.smarthome.tkj.appfunc.facefunc.BaseFacePresenter; import com.mili.smarthome.tkj.appfunc.facefunc.FacePresenter; import com.mili.smarthome.tkj.appfunc.facefunc.WffrFacePresenterImpl; import com.mili.smarthome.tkj.entities.FaceWffrModel; import com.mili.smarthome.tkj.face.FaceDetectView; import com.mili.smarthome.tkj.face.FaceInfo; import com.mili.smarthome.tkj.face.FaceInfoAdapter; import com.mili.smarthome.tkj.face.wffr.WffrFaceInfoAdapter; import com.mili.smarthome.tkj.main.widget.KeyBoardItemView; import com.mili.smarthome.tkj.proxy.SinglechipClientProxy; import com.mili.smarthome.tkj.set.Constant; import com.mili.smarthome.tkj.utils.AppManage; import com.mili.smarthome.tkj.utils.LogUtils; import com.mili.smarthome.tkj.utils.MediaPlayerUtils; import com.mili.smarthome.tkj.utils.PlaySoundUtils; import com.wf.wffrapp; import com.wf.wffrjni; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; /** * 人脸注册 */ public class WffrFaceEnrollActivity extends BaseFaceActivity implements KeyBoardItemView.IOnKeyClickListener { private static final int MSG_TIMEOUT = 0x30; @BindView(R.id.tv_title) TextView tvTitle; @BindView(R.id.tv_subtitle) TextView tvSubTitle; @BindView(R.id.tv_warning) TextView tvWarning; @BindView(R.id.key_cancle) KeyBoardItemView keyCancle; @BindView(R.id.sv_receive) SurfaceView svReceive; @BindView(R.id.tv_preview) TextureView tvPreview; @BindView(R.id.detectView) FaceDetectView faceDetectView; private boolean mFaceLiveCheck; private String mCardNo; private String mEnrollName; private int mResult; private FacePresenter<FaceWffrModel> mFacePresenter = new WffrFacePresenterImpl(); @Override public void handleMessage(Message msg) { switch (msg.what) { case MSG_TIMEOUT: if (mResult > 0) { onEnrollSuc(); } else { onEnrollFail(); } break; } } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_face_enroll); ButterKnife.bind(this); KeyBoardItemView.setOnkeyClickListener(this); Intent intent = getIntent(); mCardNo = intent.getStringExtra(FaceManageActivity.EXTRA_CARDNO); mFaceLiveCheck = (AppConfig.getInstance().getFaceLiveCheck() == 1); faceDetectView.setRecognitionThreshold(wffrjni.GetRecognitionThreshold()); setEnrollment(); startPreview(svReceive, tvPreview); } @Override protected void onDestroy() { stopPreview(); wffrapp.stopExecution(); SinglechipClientProxy.getInstance().ctrlCamLamp(SinglechipClientProxy.TURN_OFF); super.onDestroy(); } @Override public void OnViewDownClick(int code, View view) { int position = AppManage.getInstance().getPosition(code); switch (position) { case Constant.KeyNumId.KEY_NUM_12: case Constant.KeyNumId.KEY_NUM_13: case Constant.KeyNumId.KEY_NUM_14: AppManage.getInstance().keyBoardDown(keyCancle); break; } } @Override public void OnViewUpClick(int code, View view) { int position = AppManage.getInstance().getPosition(code); switch (position) { case Constant.KeyNumId.KEY_NUM_12: case Constant.KeyNumId.KEY_NUM_13: case Constant.KeyNumId.KEY_NUM_14: AppManage.getInstance().keyBoardUp(keyCancle); AppManage.getInstance().restartLauncherAct(); break; } } @Override public void InterVideoCallBK(byte[] data, int datalen, int width, int height, int type) { try { // YuvImage image = new YuvImage(data, ImageFormat.NV21, width, height, null); // File file = new File(Environment.getExternalStorageDirectory().getPath() + "/out.jpg"); // FileOutputStream filecon = new FileOutputStream(file); // image.compressToJpeg(new Rect(0, 0, image.getWidth(), image.getHeight()), 90, filecon); wffrapp.startExecution(data, width, height, mEnrollName); List<FaceInfo> faceList = wffrapp.getFaceParseResult(); if (faceList != null && faceList.size() > 0) { SinglechipClientProxy.getInstance().ctrlCamLampChange(SinglechipClientProxy.TURN_ON_FOR_FACE); for (FaceInfo faceInfo : faceList) { if (faceInfo.getSimilar() == -1) { continue; } mResult++; } } FaceInfoAdapter faceInfoAdapter = new WffrFaceInfoAdapter() .setData(data) .setWidth(width) .setHeight(height) .setMirror(type == 0) .setFaceList(faceList); faceDetectView.setFaceInfoAdapter(faceInfoAdapter); faceDetectView.setEnrolling(true); faceDetectView.postInvalidate(); } catch (Exception e) { LogUtils.e(e); } } private void setEnrollment() { if (mFaceLiveCheck) { PlaySoundUtils.playAssetsSound(CommStorePathDef.FACE_OPERATE_PATH); tvTitle.setText(R.string.face_scan_hint3); } else { PlaySoundUtils.playAssetsSound(CommStorePathDef.FACE_OPERATE_SHORT_PATH); tvTitle.setText(R.string.face_scan_hint4); } tvSubTitle.setText(R.string.face_enrollment_hint2); tvTitle.setTextColor(Color.GREEN); tvWarning.setText(R.string.face_scan_hint1); tvWarning.setTextColor(Color.WHITE); mResult = 0; mEnrollName = BaseFacePresenter.genResidentFaceId(mCardNo); wffrapp.setState(wffrapp.ENROLLMENT); SinglechipClientProxy.getInstance().ctrlCamLampChange(SinglechipClientProxy.TURN_HALF); mMainHandler.removeMessages(MSG_TIMEOUT); mMainHandler.sendEmptyMessageDelayed(MSG_TIMEOUT, Const.Config.FACE_ENROLL_TIMEOUT); } private void onEnrollSuc() { FaceWffrModel faceInfoModel = new FaceWffrModel(); faceInfoModel.setFirstName(mEnrollName); faceInfoModel.setCardNo(mCardNo); mFacePresenter.addFaceInfo(faceInfoModel); AppManage.getInstance().toActFinish(this, FacePromptActivity.class); } private void onEnrollFail() { PlaySoundUtils.playAssetsSound(CommStorePathDef.SET_ERR_PATH, new MediaPlayerUtils.OnMediaStatusCompletionListener() { @Override public void onMediaStatusCompletion(boolean flag) { AppManage.getInstance().restartLauncherAct(); } }); } }
[ "1508592785@qq.com" ]
1508592785@qq.com
1a46e8b06662cfa63dbba77f8072e54ad979e316
d730b5b7776dd7a19e95808adae69cbe9f94ab2f
/src/main/java/com/gdt/icow/config/ApplicationProperties.java
8edf04a133db006a99c95f6e9a6c152dfd576f4a
[]
no_license
Michuki/greendreams-icow3
f9e676e5bc4f9e3aaedcd90e87f005a0aa03d5b2
f925c2f9e912c1e8ad7b7bdecb697908d894e1d8
refs/heads/master
2023-01-02T16:34:27.181791
2020-10-26T12:26:32
2020-10-26T12:26:32
307,364,341
0
0
null
null
null
null
UTF-8
Java
false
false
418
java
package com.gdt.icow.config; import org.springframework.boot.context.properties.ConfigurationProperties; /** * Properties specific to Icow 3. * <p> * Properties are configured in the {@code application.yml} file. * See {@link io.github.jhipster.config.JHipsterProperties} for a good example. */ @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) public class ApplicationProperties {}
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
72f323218b3dc6395744fd765aca305046743ca9
5e3d204c5eb880138c1052901316e09d7d1c2a88
/src/main/java/com/websushibar/hprofpersist/hprofentries/dumpSubtags/RootJNILocal.java
1e5c63b83498bcd97a23433b9befef0f37b86954
[]
no_license
dgerenrot/hProfi
8addac16831cc698543f635bd9a311709ec47ca5
72839a5ca8a0f171a12d019239314a419880dea2
refs/heads/master
2020-04-10T13:30:14.127301
2015-09-27T23:37:06
2015-09-27T23:37:06
9,962,445
0
0
null
null
null
null
UTF-8
Java
false
false
133
java
package com.websushibar.hprofpersist.hprofentries.dumpSubtags; public class RootJNILocal extends AbstractSubtagWThreadAndFrame { }
[ "dgerenrot@gmail.com" ]
dgerenrot@gmail.com
1e8244fa0c6e8cf1b2f20c71efffe5a1d0264da6
487739942e747ea005d001ceb439e53cd0d215c7
/src/net/kagani/game/npc/combat/impl/LivingRockStrickerCombat.java
c67958b0352afc14d1798aaa0a6a6bd8a532c9aa
[]
no_license
99max99/PhoenixRisingServer
fbdc61eff78de3a4d29caa1eaa8c67837b73840f
1815a47c071b7351baa1eb0178ffe6b965e8ccf4
refs/heads/master
2021-01-11T10:29:06.968358
2016-12-29T02:01:23
2016-12-29T02:01:23
76,208,559
0
0
null
null
null
null
UTF-8
Java
false
false
1,082
java
package net.kagani.game.npc.combat.impl; import net.kagani.game.Animation; import net.kagani.game.Entity; import net.kagani.game.npc.NPC; import net.kagani.game.npc.combat.CombatScript; import net.kagani.game.npc.combat.NPCCombatDefinitions; import net.kagani.utils.Utils; public class LivingRockStrickerCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 8833 }; } @Override public int attack(final NPC npc, final Entity target) { final NPCCombatDefinitions defs = npc.getCombatDefinitions(); if (!Utils.isOnRange(target, npc, 0)) { // TODO add projectile npc.setNextAnimation(new Animation(12196)); delayHit( npc, 1, target, getRangeHit(npc, getMaxHit(npc, NPCCombatDefinitions.RANGE, target))); } else { npc.setNextAnimation(new Animation(defs.getAttackEmote())); delayHit( npc, 0, target, getMeleeHit( npc, getMaxHit(npc, 84, NPCCombatDefinitions.MELEE, target))); return npc.getAttackSpeed(); } return npc.getAttackSpeed(); } }
[ "emrosswarone@gmail.com" ]
emrosswarone@gmail.com
dc28da34e73aacc5c7dfc2fd8a96fec27ce18d6a
0b98a2b6dca161742b2e0de78403ad5d4465bc32
/src/main/java/ru/vetclinic/clinic/Streams/ClinicOutputStream.java
ac3f5946a8bd77057ed5c34cda5b6d55bff70b9e
[ "Apache-2.0" ]
permissive
Bragin666/Clinic
463a03c81fec3845794f7f3eb3ccff9602c76edc
5ff3b2ff57b54b14769c2192c51fa00f295393a6
refs/heads/master
2021-01-20T18:58:41.028500
2016-08-01T13:09:09
2016-08-01T13:09:09
61,143,029
0
0
null
null
null
null
UTF-8
Java
false
false
358
java
package ru.vetclinic.clinic.Streams; /** * Рабочий поток выходных данных * Created by Djony on 10.07.2016. */ public class ClinicOutputStream implements OutputStream { /** * Выводит строку * * @param s Строка */ public void print(String s) { System.out.println(s); } }
[ "bragin-evgenii@mail.ru" ]
bragin-evgenii@mail.ru
e7bbfcb760e935df2f64a4bdda799a23a4f8539b
2805d9d77cf89797df472aef8295f6c6bb2e9e1d
/Week_03/geek/src/main/java/com/example/geek/netty/nio0/main/Main.java
14e29e26338554423e70995e9fd02ccd4ef9a16a
[]
no_license
wenjie-yeah/JAVA-01
bf1ecfd0ff654aff781e97c22c2ff8c1fd7eaeae
5a8df1df9e57afc0aaaf0c6be11b15e1b1ee5629
refs/heads/main
2023-03-08T09:40:11.888074
2021-02-18T01:39:26
2021-02-18T01:39:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,112
java
package com.example.geek.netty.nio0.main; import com.example.geek.netty.nio0.httpServer.HttpServer01; import com.example.geek.netty.nio0.httpServer.HttpServer02; import com.example.geek.netty.nio0.httpServer.HttpServer03; import com.example.geek.netty.nio0.netty01.NettyHttpServer; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; public class Main { public static void main(String[] args) { Map<String, Class> map = new HashMap<>(); map.put("1", HttpServer01.class); map.put("2", HttpServer02.class); map.put("3", HttpServer03.class); map.put("8", NettyHttpServer.class); String id = (null == args || args.length == 0) ? "1" : args[0]; Class clazz = map.get(id); if( null == clazz ) { System.out.println("No class for id: " + id); } try { Method method = clazz.getDeclaredMethod("main", new Class[]{String[].class}); method.invoke(null, new Object[]{new String[]{}}); } catch (Exception e) { e.printStackTrace(); } } }
[ "wenjie.ye@yintech.cn" ]
wenjie.ye@yintech.cn
b266f1c04f7f58fbed17b9d2574d9a7732eb2806
fd435a6375586d2d31945dd723cbf3175733bdd5
/app/src/main/java/com/androidexample/musicapp/popActivity.java
50190b6ed3c2808765c9edbc007d515e690d8370
[]
no_license
shiv-u/MusicApp
8b32b67a5592a1ac2a21d17870555658285c13a1
39378ef20866e910b016e2a64b3c18408b0a301b
refs/heads/master
2020-03-22T07:15:08.362201
2018-07-05T08:10:33
2018-07-05T08:10:33
139,688,868
0
0
null
null
null
null
UTF-8
Java
false
false
1,859
java
package com.androidexample.musicapp; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; import java.util.ArrayList; public class popActivity extends AppCompatActivity { ListView listView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.list); final ArrayList<Music> music = new ArrayList<>(); music.add(new Music(R.drawable.mj, "Thriller", "Michael Jackson")); music.add(new Music(R.drawable.ts, "Shake It Off", "Taylor Swift")); music.add(new Music(R.drawable.timber, "Can't Stop The Feeling", "Justin TimberLake")); music.add(new Music(R.drawable.mars, "Uptown Funk", "Bruno Mars")); music.add(new Music(R.drawable.katy, "Roar", "KatyPerry")); music.add(new Music(R.drawable.queen, "We Will Rock You", "Queen")); music.add(new Music(R.drawable.ed, "Shape Of You", "Ed Sheeran")); MusicAdapter musicAdapter = new MusicAdapter(this, music); listView = findViewById(R.id.list); listView.setAdapter(musicAdapter); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent intent = new Intent(popActivity.this, play.class); intent.putExtra("artist_name", music.get(position).getmArtistName()); intent.putExtra("song_name", music.get(position).getmSongName()); intent.putExtra("thumbnail", music.get(position).getmThumbNail()); startActivity(intent); } }); } }
[ "shivshankar.hc@gmail.com" ]
shivshankar.hc@gmail.com
df37e9a27f55a20b2318c0c86af98334e4fff730
9890b5d7c948359f41ee0741d5d6cbc1975113fe
/src/main/java/com/example/springsecuritydemo/security/UserDetailsServiceImpl.java
f81d205ad352eb2735240060db35c349fce0f884
[]
no_license
ksenyakom/springsecuritydemo
c62b6e08a2b11b304136e79a8f7af8a8f6a4e30c
a79fbbbc79750909c075b366b389e2298627066e
refs/heads/master
2023-06-16T10:59:39.541099
2021-07-08T13:23:28
2021-07-08T13:23:28
379,200,489
0
0
null
null
null
null
UTF-8
Java
false
false
1,219
java
package com.example.springsecuritydemo.security; import com.example.springsecuritydemo.model.User; import com.example.springsecuritydemo.repository.UserRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Configuration; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; @Service @Qualifier("userDetailsServiceImpl") public class UserDetailsServiceImpl implements UserDetailsService { private final UserRepository userRepository; @Autowired public UserDetailsServiceImpl(UserRepository userRepository) { this.userRepository = userRepository; } @Override public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException { User user = userRepository.findByEmail(email).orElseThrow( () -> new UsernameNotFoundException("User doesn't exist")); return SecurityUser.fromUser(user); } }
[ "ksenyakom@gmail.com" ]
ksenyakom@gmail.com
9cb934c1f3e2c538704dca17a2d2fcd8158179e9
f40b856b6b56ec653477a4550e30fa249b555f2d
/com.io7m.jvgm.core/src/main/java/com/io7m/jvgm/core/VGMCommandYM2612PCMWriteWait8Type.java
af54599cec2e3a8d37ca1449b3bc7216191cdc7c
[ "ISC" ]
permissive
io7m/jvgm
810e9e4318cd5a2d7dfd7520bb1b064bc14f670e
cd90e003d1b639d6dc63c9da8fcc801ac5f2df10
refs/heads/master
2023-08-17T23:13:24.177710
2017-09-19T21:29:40
2017-09-19T21:29:40
104,130,897
1
0
null
null
null
null
UTF-8
Java
false
false
1,210
java
/* * Copyright © 2017 <code@io7m.com> http://io7m.com * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package com.io7m.jvgm.core; import org.immutables.value.Value; /** * Write PCM data and then wait for a fixed number of samples. */ @VGMImmutableStyleType @Value.Immutable public interface VGMCommandYM2612PCMWriteWait8Type extends VGMCommandYM2612PCMWriteWaitType { @Override default int samples() { return 8; } @Override default Type type() { return Type.YM2612_PCM_WRITE_WAIT_8; } }
[ "code@io7m.com" ]
code@io7m.com
23ccfce4ec1012ed49fc8c402450da71e94db08c
dffe4b43ef1390c23173e62259569692d0d07da1
/app/src/main/java/com/escience/weather/DataBase/DBHandler.java
fba0eae73b9ac7f74258fac4fd50fd4a26f956f8
[]
no_license
112996/LeXiang
c036368adb0768e8389e95d1a9fed81e66eb3395
3aa574587e87d6cf75982c24e57ec366ae4b59d9
refs/heads/master
2020-03-09T16:46:12.458402
2018-04-10T07:47:39
2018-04-10T07:47:39
128,893,701
0
0
null
null
null
null
UTF-8
Java
false
false
1,426
java
package com.escience.weather.DataBase; import android.content.ContentValues; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import java.util.HashMap; import java.util.Iterator; import java.util.Map; /** * Created by Stark on 2017/2/28. */ public class DBHandler extends SQLiteOpenHelper { private static final String name = "data"; //数据库名称 private static final int version = 1; //数据库版本 public DBHandler(Context context) { super(context, name, null, version); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL("CREATE TABLE IF NOT EXISTS mood(sponsor varchar(20),nick varchar(16),head varchar(32),place varchar(100),temp varchar(4),sex varchar(2),skin varchar(2),msg varchar(512),msgcode varchar(20),msgcode2 varchar(20),anum varchar(10))"); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { } public static ContentValues MapToContentValues(HashMap map){ ContentValues cv=new ContentValues(); Iterator it = map.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); if(entry.getValue()!=null) { cv.put(entry.getKey().toString(), entry.getValue().toString()); } } return cv; } }
[ "YeJiangXia@qq.com" ]
YeJiangXia@qq.com
cbf9f149b8591662e62fff7c5735ca0697562cce
3db2a2958870a4e9277203078efece767965e68d
/stec-wyl-service/src/main/java/com/stec/masterdata/handler/wyl/impl/RoadDataUploadRecordHandlerImpl.java
6739615187928b3650e2a7da0519ec1f15d2d5f7
[]
no_license
fanrenzfj/wyl
6d987f7da4a2016ae6d99c3fdc7ee8321bd76605
7290325e569e2497ac3ef464a6f2ada7feb80382
refs/heads/master
2020-05-17T17:47:14.240486
2019-04-28T06:22:59
2019-04-28T06:22:59
183,843,419
0
0
null
null
null
null
UTF-8
Java
false
false
869
java
package com.stec.masterdata.handler.wyl.impl; import com.alibaba.dubbo.config.annotation.Service; import com.stec.framework.handler.service.AdvMySqlHandlerService; import com.stec.masterdata.entity.wyl.RoadDataUploadRecord; import com.stec.masterdata.handler.wyl.RoadDataUploadRecordHandler; import com.stec.masterdata.service.wyl.RoadDataUploadRecordService; import org.springframework.stereotype.Component; /** * Created with IntelliJ IDEA. * * @author zhuangrui * Date: 2018/12/7 * Time: 9:56 */ @Service @Component public class RoadDataUploadRecordHandlerImpl extends AdvMySqlHandlerService<RoadDataUploadRecordService, RoadDataUploadRecord, Long> implements RoadDataUploadRecordHandler { @Override public void updateByDataDate(RoadDataUploadRecord roadDataUploadRecord) { this.privateService.updateByDataDate(roadDataUploadRecord); } }
[ "fanrenzfj@126.com" ]
fanrenzfj@126.com
2d90bd47274cfb3c90ecd03bb570b018f86d2d31
32df3ee4c9290664b3adae552958dec7623658ca
/android/app/src/main/java/karbosh/nl/matshofman/saxrssreader/RssReader.java
1bf5d8aea26cf6870b26ef6d2a0bd5fe3139d996
[]
no_license
Abuzar3/NIC-magazine
8e025204d0f62ee13778e27e59606af16c1f782f
4fef654981703fcc41129d30865315531332de7b
refs/heads/master
2020-01-21T04:35:05.390936
2015-06-21T14:21:35
2015-06-21T14:21:35
37,811,151
1
0
null
null
null
null
UTF-8
Java
false
false
1,758
java
/* * Copyright (C) 2011 Mats Hofman <http://matshofman.nl/contact/> * * 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 karbosh.nl.matshofman.saxrssreader; import java.io.IOException; import java.io.InputStream; import java.net.URL; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; public class RssReader { public static RssFeed read(URL url) throws SAXException, IOException { return read(url.openStream()); } public static RssFeed read(InputStream stream) throws SAXException, IOException { try { SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser parser = factory.newSAXParser(); XMLReader reader = parser.getXMLReader(); RssHandler handler = new RssHandler(); InputSource input = new InputSource(stream); reader.setContentHandler(handler); reader.parse(input); return handler.getResult(); } catch (ParserConfigurationException e) { throw new SAXException(); } } }
[ "abuzar3@hotmail.com" ]
abuzar3@hotmail.com
54ee03e4eaae0b4a27e5440c93ad4f875079ad51
b34a5a596d0cc4abce160e4c7e24f5f6c6a459f3
/src/main/java/io/swagger/client/model/SchoolResponse.java
e54001e916412b0b34347c87c7d682aacac7397f
[]
no_license
Clever/clever-java
aa9146bf74933568d617816f86ebfee18a6c9834
06e82d336934531d80b0cdd34b86e3a8685baa5a
refs/heads/master
2022-05-29T22:41:29.364406
2022-03-30T22:43:27
2022-03-30T22:43:27
85,258,910
3
7
null
2022-03-30T22:43:28
2017-03-17T01:45:49
Java
UTF-8
Java
false
false
2,114
java
/* * Clever API * The Clever API * * OpenAPI spec version: 2.0.0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package io.swagger.client.model; import java.util.Objects; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import io.swagger.client.model.School; import java.io.IOException; /** * SchoolResponse */ @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-07-01T21:58:05.926-07:00") public class SchoolResponse { @SerializedName("data") private School data = null; public SchoolResponse data(School data) { this.data = data; return this; } /** * Get data * @return data **/ @ApiModelProperty(value = "") public School getData() { return data; } public void setData(School data) { this.data = data; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } SchoolResponse schoolResponse = (SchoolResponse) o; return Objects.equals(this.data, schoolResponse.data); } @Override public int hashCode() { return Objects.hash(data); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SchoolResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "amelia.jones@clever.com" ]
amelia.jones@clever.com
0dd1bb819e76bb9d378902069130ab93ad8db2a3
1133317b0ff8674f817d31fe3b41214ef45cd43f
/maven-goal-log-parser/src/test/java/ch/scheitlin/alex/maven/MavenGoalLogParserTest.java
47bc07dca6083311d2530faa6d5954f30e5dc1de
[ "MIT" ]
permissive
alexscheitlin/caesar
3f51b74b5b274136851c5ba52991cc4ff19f7833
d985691e449137bb4b226dbcaf66b081db931a38
refs/heads/master
2020-03-24T10:42:25.753719
2018-09-04T11:12:53
2018-09-04T11:12:53
142,664,964
1
0
null
null
null
null
UTF-8
Java
false
false
10,071
java
package ch.scheitlin.alex.maven; import static org.junit.Assert.fail; import ch.scheitlin.alex.build.model.Error; import org.junit.Assert; import org.junit.Test; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class MavenGoalLogParserTest { @Test public void parseGoalLog_MavencompilerCompile_oneError() { // define plugin and goal String pluginName = "maven-compiler-plugin"; String goalName = "compile"; // read goal log from test resources String log = readResourceFile(pluginName + "-" + goalName + "-1.txt"); // define expected errors List<Error> expectedErrors = new ArrayList<Error>(); String path = "src/main/java/com/example/bank"; String file = "Main.java"; int line = 5; int column = 27; String message = "';' expected"; Error expectedError1 = new Error(path, file, line, column, message); expectedErrors.add(expectedError1); // parse goal log List<Error> actualErrors = MavenGoalLogParser.parseGoalLog(pluginName, goalName, log); // assert assertErrors(expectedErrors, actualErrors); } @Test public void parseGoalLog_MavencompilerCompile_twoErrors() { // define plugin and goal String pluginName = "maven-compiler-plugin"; String goalName = "compile"; // read goal log from test resources String log = readResourceFile(pluginName + "-" + goalName + "-2.txt"); // define expected errors List<Error> expectedErrors = new ArrayList<Error>(); String path1 = "src/main/java/com/example/bank"; String file1 = "Main.java"; int line1 = 5; int column1 = 28; String message1 = "';' expected"; Error expectedError1 = new Error(path1, file1, line1, column1, message1); expectedErrors.add(expectedError1); String path2 = "src/main/java/com/example/bank"; String file2 = "Main.java"; int line2 = 16; int column2 = 11; String message2 = "'catch' without 'try'"; Error expectedError2 = new Error(path2, file2, line2, column2, message2); expectedErrors.add(expectedError2); // parse goal log List<Error> actualErrors = MavenGoalLogParser.parseGoalLog(pluginName, goalName, log); // assert assertErrors(expectedErrors, actualErrors); } @Test public void parseGoalLog_CouldNotResolveDependencies_1() { String errorMessage = "Could not resolve dependencies"; // read goal log from test resources String log = readResourceFile("could-not-resolve-dependencies-1.txt"); // define expected errors List<Error> expectedErrors = new ArrayList<Error>(); String path = null; String file = "pom.xml"; int line = 0; int column = 0; String message = "Could not find artifact: junit:junit:5.12 (version '5.12' is locally not available)\n" + "Please check why this version can not be found on maven central or in any of the defined repositories in the pom.xml file. Does the <version> really exist?\n" + "Locally, only the following versions are available: 3.8.1, 3.8.2, 4.11, 4.12, 4.8.2\n" + "Check all available versions of this artifact on maven central: https://mvnrepository.com/artifact/junit/junit"; Error expectedError1 = new Error(path, file, line, column, message); expectedErrors.add(expectedError1); // parse goal log List<Error> actualErrors = MavenGoalLogParser.parseErrorLog(errorMessage, log); // assert assertErrors(expectedErrors, actualErrors); } @Test public void parseGoalLog_CouldNotResolveDependencies_2() { String errorMessage = "Could not resolve dependencies"; // read goal log from test resources String log = readResourceFile("could-not-resolve-dependencies-2.txt"); // define expected errors List<Error> expectedErrors = new ArrayList<Error>(); String path = null; String file = "pom.xml"; int line = 0; int column = 0; String message = "Failure to find: junit:junit:5.12 (version '5.12' is locally not available)\n" + "Please check why this version can not be found on maven central or in any of the defined repositories in the pom.xml file. Does the <version> really exist?\n" + "Locally, only the following versions are available: 3.8.1, 3.8.2, 4.11, 4.12, 4.8.2\n" + "Check all available versions of this artifact on maven central: https://mvnrepository.com/artifact/junit/junit"; Error expectedError1 = new Error(path, file, line, column, message); expectedErrors.add(expectedError1); // parse goal log List<Error> actualErrors = MavenGoalLogParser.parseErrorLog(errorMessage, log); // assert assertErrors(expectedErrors, actualErrors); } @Test public void parseGoalLog_MavensurefireTest_1() { // define plugin and goal String pluginName = "maven-surefire-plugin"; String goalName = "test"; // read goal log from test resources String log = readResourceFile(pluginName + "-" + goalName + "-1.txt"); // define expected errors List<Error> expectedErrors = new ArrayList<Error>(); String path1 = "src/test/java/com/example/bank"; String file1 = "BankAccountTest.java"; int line1 = 21; int column1 = 0; String message1 = "java.lang.AssertionError"; Error expectedError1 = new Error(path1, file1, line1, column1, message1); expectedErrors.add(expectedError1); String path2 = "src/test/java/com/example/bank"; String file2 = "BankAccountTest.java"; int line2 = 49; int column2 = 0; String message2 = "java.lang.AssertionError: expected:<1000000.0> but was:<1000001.0>"; Error expectedError2 = new Error(path2, file2, line2, column2, message2); expectedErrors.add(expectedError2); String path3 = "src/test/java/com/example/bank"; String file3 = "TableTest.java"; int line3 = 26; int column3 = 0; String message3 = "java.lang.AssertionError"; Error expectedError3 = new Error(path3, file3, line3, column3, message3); expectedErrors.add(expectedError3); String path4 = "src/test/java/com/example/bank"; String file4 = "BankAccountTest.java"; int line4 = 29; int column4 = 0; String message4 = "java.lang.IllegalArgumentException: Deposit amount less than zero"; Error expectedError4 = new Error(path4, file4, line4, column4, message4); expectedErrors.add(expectedError4); // parse goal log List<Error> actualErrors = MavenGoalLogParser.parseGoalLog(pluginName, goalName, log); // assert assertErrors(expectedErrors, actualErrors); } @Test public void parseGoalLog_MavensurefireTest_2() { // define plugin and goal String pluginName = "maven-surefire-plugin"; String goalName = "test"; // read goal log from test resources String log = readResourceFile(pluginName + "-" + goalName + "-2.txt"); // define expected errors List<Error> expectedErrors = new ArrayList<Error>(); String path1 = "src/test/java/org/apache/commons/cli"; String file1 = "UtilTest.java"; int line1 = 31; int column1 = 0; String message1 = "org.junit.ComparisonFailure: expected:<[]foo> but was:<[-]foo>"; Error expectedError1 = new Error(path1, file1, line1, column1, message1); expectedErrors.add(expectedError1); // parse goal log List<Error> actualErrors = MavenGoalLogParser.parseGoalLog(pluginName, goalName, log); // assert assertErrors(expectedErrors, actualErrors); } @Test public void parseGoalLog_UnknownGoal() { String pluginName = "plugin"; String goalName = "goal"; String log = "log"; List<Error> expectedErrors = null; // parse goal log List<Error> actualErrors = MavenGoalLogParser.parseGoalLog(pluginName, goalName, log); // assert Assert.assertEquals(expectedErrors, actualErrors); } private void assertErrors(List<Error> expectedErrors, List<Error> actualErrors) { Assert.assertEquals(expectedErrors.size(), actualErrors.size()); for (int i = 0; i < expectedErrors.size(); i++) { if (expectedErrors.get(i).getPath() != null && actualErrors.get(i).getPath() != null) { Assert.assertEquals(expectedErrors.get(i).getPath(), actualErrors.get(i).getPath()); } else if (expectedErrors.get(i).getPath() == null && actualErrors.get(i).getPath() != null || expectedErrors.get(i).getPath() != null && actualErrors.get(i).getPath() == null) { fail(); } Assert.assertEquals(expectedErrors.get(i).getFile(), actualErrors.get(i).getFile()); Assert.assertEquals(expectedErrors.get(i).getLine(), actualErrors.get(i).getLine()); Assert.assertEquals(expectedErrors.get(i).getColumn(), actualErrors.get(i).getColumn()); Assert.assertEquals(expectedErrors.get(i).getMessage(), actualErrors.get(i).getMessage()); } } private String readResourceFile(String fileName) { StringBuilder result = new StringBuilder(); File file = new File(getClass().getResource("/" + fileName).getFile()); Scanner scanner; try { scanner = new Scanner(file); } catch (Exception ext) { return null; } while (scanner.hasNextLine()) { result.append(scanner.nextLine()).append("\n"); } scanner.close(); return result.toString(); } }
[ "alex.scheitlin@bluewin.ch" ]
alex.scheitlin@bluewin.ch
6cf641ce286ca63451298b534a5896fe8e9648a7
5658b1ae29d8044b332d10f167f6ec0c3bd4f0e2
/src/test/java/com/framework/test/dao/UserDaoTest.java
47460705e08827df5993dc7a8730dddf25be9509
[]
no_license
Blackfat/ssm
73c4e444a44ab5fef4aa2108709790d8bcf22eaf
49fccbb50e6efda598e827ab6156f9130b3ffa6d
refs/heads/master
2021-01-24T10:52:39.269253
2016-10-08T00:16:54
2016-10-08T00:16:54
70,291,372
0
0
null
null
null
null
UTF-8
Java
false
false
2,060
java
package com.framework.test.dao; import java.util.Date; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.TransactionConfiguration; import com.framework.persistent.jpa.dao.UserDao; import com.framework.persistent.jpa.domain.User; import com.framework.persistent.mybatis.dao.UserMapper; /** * * @RunWith 注释标签是 Junit 提供的,用来说明此测试类的运行者,这里用了 SpringJUnit4ClassRunner,这个类是一个针对 * Junit 运行环境的自定义扩展,用来标准化在 Spring 环境中 Junit4.5 的测试用例,例如支持的注释标签的标准化 * @ContextConfiguration 注释标签是 Spring test context 提供的,用来指定 Spring 配置信息的来源,支持指定 * XML 文件位置或者 Spring 配置类名 * @Transactional 注释标签是表明此测试类的事务启用,这样所有的测试方案都会自动的 * rollback,即您不用自己清除自己所做的任何对数据库的变更了 * @Autowired 体现了我们的测试类也是在 Spring 的容器中管理的,他可以获取容器的 bean 的注入,您不用自己手工获取要测试的 bean * 实例了 * * */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={"classpath:applicationContext.xml"}) @TransactionConfiguration(defaultRollback=false) public class UserDaoTest { @Autowired private UserDao userDao; @Autowired private UserMapper userMapper; @Test public void insertUser(){ User user=new User(); user.setLoginName("admin"); user.setPassword("admin"); user.setRegistDate(new Date()); userDao.save(user); } @Test public void selectUser(){ User user=userMapper.findUserByLoginName("admin"); System.out.println(user.getRegistDate()); } }
[ "15715556946@163.com" ]
15715556946@163.com
6e1a882563521756ca2d6e93ca3dac4851ae262f
e2b120ba417072f3ccd5d00804433afd5108601a
/myBlog/src/main/java/com/rong/demo/po/User.java
301bd94d46780fc2f0fbb2af2a3d1f5eb7b500c2
[]
no_license
xiaorong59/blog
d4a2284844746cb45032a2d171630af5f0ec2cab
9cafe9bc99b40747eb3d6eeff06fb9ff9a2b8aab
refs/heads/master
2022-11-18T01:51:49.659878
2020-07-21T07:04:49
2020-07-21T07:04:49
281,320,080
0
0
null
null
null
null
UTF-8
Java
false
false
2,599
java
package com.rong.demo.po; import javax.persistence.*; import java.util.ArrayList; import java.util.Date; import java.util.List; @Entity @Table(name = "t_user") public class User { @Id @GeneratedValue private Long id; private String nickname; private String username; private String password; private String email; private String avatar; private Integer type; @Temporal(TemporalType.TIMESTAMP) private Date createTime; @Temporal(TemporalType.TIMESTAMP) private Date updateTime; public List<Blog> getBlogs() { return blogs; } public void setBlogs(List<Blog> blogs) { this.blogs = blogs; } @OneToMany(mappedBy = "user") private List<Blog> blogs = new ArrayList<>(); public User(){ } @Override public String toString() { return "User{" + "id=" + id + ", nickname='" + nickname + '\'' + ", username='" + username + '\'' + ", password='" + password + '\'' + ", email='" + email + '\'' + ", avatar='" + avatar + '\'' + ", type=" + type + ", createTime=" + createTime + ", updateTime=" + updateTime + '}'; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getNickname() { return nickname; } public void setNickname(String nickname) { this.nickname = nickname; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getAvatar() { return avatar; } public void setAvatar(String avatar) { this.avatar = avatar; } public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } }
[ "2731797466@qq.com" ]
2731797466@qq.com
cc220d9f192e6b572bbeb955763e64cfee7f1153
d9fe212ddb5455b33fd223e7aec08937d0d0e0ce
/Shapes/src/ru/academits/levshakov/shapes/shape/Rectangle.java
6fed8c057cc935e70b315d0417df6b3861becf0e
[]
no_license
AlexeyLevshakov/AcademItSchool
f532d9c131950bc30bce39f2b7c48eedf01250fa
0bb2c1105f1413832fd16343bc53acb956ed1ba1
refs/heads/master
2020-03-22T00:29:03.139529
2018-08-31T12:01:59
2018-08-31T12:01:59
139,247,336
0
0
null
null
null
null
UTF-8
Java
false
false
1,359
java
package ru.academits.levshakov.shapes.shape; public class Rectangle implements Shape { private double width; private double height; public Rectangle(double width, double height) { this.width = width; this.height = height; } @Override public double getWidth() { return width; } @Override public double getHeight() { return height; } @Override public double getArea() { return width * height; } @Override public double getPerimeter() { return 2 * (width + height); } @Override public String toString() { return "Прямоугольник со сторонами " + Double.toString(width) + " и " + Double.toString(height); } @Override public boolean equals(Object object) { if (object == this) { return true; } if (object == null || object.getClass() != this.getClass()) { return false; } Rectangle rectangle = (Rectangle) object; return width == rectangle.width && height == rectangle.height; } @Override public int hashCode() { final int prime = 37; int hash = 1; hash = prime * hash + Double.hashCode(width); hash = prime * hash + Double.hashCode(height); return hash; } }
[ "sinistral@inbox.ru" ]
sinistral@inbox.ru
ac75a0093109f9fc2fb33e11b08a62e8c2cdb9d0
b846434b6a46ada25fb98ff751a1e978658ef0fe
/2.JavaCore/src/com/javarush/task/task15/task1502/Solution.java
8b2760b598f27842dc820bd5e33483a13d85ddb0
[]
no_license
AlyonaFox/JavaRushTasks
a3ec5e219e1380aba4451b9f24fca312e71b7fe6
f30662037b48df2d764dfafea02892653f5b0f9d
refs/heads/master
2020-07-17T00:50:39.853926
2019-09-13T12:41:58
2019-09-13T12:41:58
205,905,202
1
0
null
null
null
null
UTF-8
Java
false
false
783
java
package com.javarush.task.task15.task1502; /* ООП - Наследование животных */ public class Solution { public static class Goose extends SmallAnimal{ public String getSize() { return "Гусь маленький, " + super.getSize(); } } public static class Dragon extends BigAnimal{ public String getSize() { return "Дракон большой, " + super.getSize(); } } public static void main(String[] args) { } public static class BigAnimal { protected String getSize() { return "как динозавр"; } } public static class SmallAnimal { String getSize() { return "как кошка"; } } }
[ "fox@tre.one" ]
fox@tre.one
baa5f360fc8e78cc26a11c706db3157af542ae41
5eabf92283e9b9ceaa2f8b1d0cccc4f0f0aa4e25
/src/com/javaex/basic/operators/BitShiftOperEx.java
5ba825c4695a11d705dfad21fcb08fe79abc4ae5
[]
no_license
kjy1111/JavaEx
bbae55a65b652d8860edc2048fa742cd7d6c40f2
ac8a043095cec6fa876fdf6949a2c3444585b40e
refs/heads/master
2020-03-21T12:38:54.660462
2018-06-08T04:00:36
2018-06-08T04:00:36
136,564,162
0
0
null
null
null
null
UTF-8
Java
false
false
580
java
package com.javaex.basic.operators; public class BitShiftOperEx { public static void main(String[] args) { // 비트 시프트 int val = 1; System.out.println(val); System.out.println(Integer.toBinaryString(val)); System.out.println(Integer.toBinaryString(val << 1)); System.out.println(Integer.toBinaryString(val << 4)); System.out.println("----------"); // 우측 비트 시프트 int val2 = 0b1000; System.out.println(Integer.toBinaryString(val2 >> 1)); System.out.println(Integer.toBinaryString(val2 >> 3)); } }
[ "Yeon@DESKTOP-C5DQ9EC" ]
Yeon@DESKTOP-C5DQ9EC
4f6febb39a37884edcc019f3002593086a4867e1
26dd1a08ddc186846f30cd4258bcf063f979469c
/src/hup/gamelogic/TwoPair.java
497816c6447f750a6dcada8ea0e52935effb7c67
[]
no_license
gotchops/HUP
77d9c9658c96136513ccb734160facdd5e9877e6
e3dadcff169c47972393b20c942b7606cc8b8bc3
refs/heads/master
2021-01-17T10:58:26.998673
2016-07-24T20:19:02
2016-07-24T20:19:02
64,083,843
0
0
null
null
null
null
UTF-8
Java
false
false
1,289
java
package hup.gamelogic; public class TwoPair extends Rank { Card.value m_secondValue; Card.value m_kicker; public TwoPair(Card.value val1, Card.value val2, Card.value kicker) { m_category = category.TWO_PAIR; if (val1.compareTo(val2) > 0) { m_value = val1; m_secondValue = val2; } else { m_value = val2; m_secondValue = val1; } m_kicker = kicker; } public Card.value getSecondValue() { return m_secondValue; } public Card.value getKicker() { return m_kicker; } @Override public int compareTo(Rank other) { if (other.getCategory() == category.TWO_PAIR) { if (this.getValue() == other.getValue()) { if (this.getSecondValue() == ((TwoPair) other).getSecondValue()) { return this.getKicker().compareTo(((TwoPair) other).getKicker()); } return this.getSecondValue().compareTo(((TwoPair) other).getSecondValue()); } return this.getValue().compareTo(other.getValue()); } else { return super.compareTo(other); } } }
[ "gotchopsgithub@gmail.com" ]
gotchopsgithub@gmail.com
6f4b09717ed18998b46ca458334483c6a7ff3056
ed8a20168593e6a41e3637d76f7ae6d623f604b1
/src/main/java/fr/cart/CartResources.java
b77a204db53e563a8bbb66304b878739a7edef16
[]
no_license
karimessouabni/ms-cart
b0e018cc3659d3cb5297b01cfa4129636a5b563f
7b397ba5be660e15185ef06bec72148dab925455
refs/heads/master
2020-09-07T18:03:43.667556
2019-11-17T23:59:22
2019-11-17T23:59:22
220,871,474
0
0
null
null
null
null
UTF-8
Java
false
false
448
java
package fr.cart; import com.netflix.discovery.EurekaClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class CartResources { @GetMapping("/hello-cart") String helloEureka(){ return "hello from cart"; } }
[ "karimessouabni0@gmail.com" ]
karimessouabni0@gmail.com
8c1cf738740f69e96e105c220a1cc45bc4f66d25
fe10fd3183a8a57067b9ff2dd7cd57a181ff209f
/Observer.java
813bfb612cf98d621863cdd31ece22e0bf9fff1d
[]
no_license
cyeduarte/MiniTwitter
4fc3457f97a83d14813d23bdfe0e975d68818255
0188fa9accb57ca414f4b2b8b798c4558f2b7452
refs/heads/master
2021-01-01T04:24:11.319573
2017-07-19T16:56:01
2017-07-19T16:56:01
97,171,893
0
0
null
null
null
null
UTF-8
Java
false
false
306
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package minitwitter; /** * * @author chris */ public interface Observer { public void update(Subject subject); }
[ "cyeduarte@cpp.edu" ]
cyeduarte@cpp.edu
3a6fe0aa92a6d8dedf2e4c1172ad76d0e8bfaacd
f907d4cb2619e3cb114b68f2bfb821a9d8d9799e
/src/monprojet/Main.java
4a3a4c5b50cbf2f81b043044b81cd1cdaf2f9e3b
[]
no_license
GremTristan/Uno-tp
c4d06ed111679d131fe1d9217d2b1c20e8d91672
ced49098cf1d78bc00637cd642cec79693577060
refs/heads/master
2023-08-27T06:12:46.911625
2021-11-10T13:15:00
2021-11-10T13:15:00
426,627,942
0
0
null
null
null
null
UTF-8
Java
false
false
119
java
package monprojet; public class Main { public static void main(String[] args) { // write your code here } }
[ "tristan.gremling9@etu.univ-lorraine.fr" ]
tristan.gremling9@etu.univ-lorraine.fr
4ffd285c9c2a4e350fa4d13a7b6f733431f0130d
c977f65e23e7ea6dd98db999221fe7f501e31af4
/src/main/java/blog/controller/PostsController.java
00a1c35e506f9bf4cbe8062af89ed50ac300e952
[]
no_license
vijay-mamoria/TechnicalBlog
96290e2b0d68759fbe36766edb58a4bf1d85da5b
aae0a607a5158e242a34fdd49661e5b81ba0e578
refs/heads/master
2020-03-22T16:28:02.648343
2018-07-09T18:34:11
2018-07-09T18:34:11
140,322,849
0
0
null
null
null
null
UTF-8
Java
false
false
1,036
java
package blog.controller; import blog.model.Post; import blog.services.PostService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import java.util.List; @Controller public class PostsController { @Autowired private PostService postService; @RequestMapping("/posts") public String getAllPosts(Model model){ List<Post> posts = postService.firstThreePosts(); model.addAttribute("posts", posts); return "posts"; } @RequestMapping("/posts/create") public String createPost(){ return "posts/create"; } @RequestMapping(value = "/create", method = RequestMethod.GET) public String createPostPage(Post post){ post.setId(System.currentTimeMillis()%1000); postService.create(post); return "redirect:/posts"; } }
[ "theprofessionalcoder@gmail.com" ]
theprofessionalcoder@gmail.com
89090b5844e180bccc99e506efcc7a2c391822e6
f66b8b4b768ae6a071a5ae5dcec1b614ca785ab1
/src/test/java/com/lemonaide/backend/BackendApplicationTests.java
bfb4389acf99e39e28b3232eafb052bf891bebe3
[]
no_license
murphpdx/lemons-backend
f4b315cb3fe4a8a9f3eed61d3adacff4ca74b908
02b11f981c2657cf4e9da5bfe5ce6fe7d2a4d3db
refs/heads/master
2020-03-25T12:05:58.960576
2018-08-10T03:42:26
2018-08-10T03:42:26
143,760,294
0
0
null
null
null
null
UTF-8
Java
false
false
339
java
package com.lemonaide.backend; 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 BackendApplicationTests { @Test public void contextLoads() { } }
[ "bhandarp@por-bhandarp-m1.ds.ad.adp.com" ]
bhandarp@por-bhandarp-m1.ds.ad.adp.com
c390e88d3ba547904895e76720314e4592a57b21
6138af219efc3a8f31060e30ebc532ffcbad1768
/astrogrid/ar-taverna/src/java/org/astrogrid/taverna/armyspace/ARProcessorInfoBean.java
fa7cd32b5f4f3f3347c2e7c6bef529e726e5d771
[]
no_license
Javastro/astrogrid-legacy
dd794b7867a4ac650d1a84bdef05dfcd135b8bb6
51bdbec04bacfc3bcc3af6a896e8c7f603059cd5
refs/heads/main
2023-06-26T10:23:01.083788
2021-07-30T11:17:12
2021-07-30T11:17:12
391,028,616
0
0
null
null
null
null
UTF-8
Java
false
false
584
java
package org.astrogrid.taverna.armyspace; import org.embl.ebi.escience.scuflworkers.ProcessorInfoBeanHelper; import org.apache.log4j.Logger; /** * Provides information about the Biomoby Processor plugin, using taverna.properties, identified by the * tag 'biomobywsdl' * @author Stuart Owen * */ public class ARProcessorInfoBean extends ProcessorInfoBeanHelper { private static Logger logger = Logger.getLogger(ARProcessorInfoBean.class); public ARProcessorInfoBean() { super("astroruntimemyspace"); logger.warn("just done constructor of ARProcessorInfoBean"); } }
[ "kmb@mssl.ucl.ac.uk" ]
kmb@mssl.ucl.ac.uk
6a8e2cd65cfbdbaa49dce70f034e6a01bb772a06
6b977783c98eea9f8bb6a7be14123273f773837d
/src/il/co/hit/model/service/LabService.java
94edaae601f9b4f8d7c40e3dd7b76b493508f203
[]
no_license
AfikGrinstein/PhoneStore
210a922ddca94657340519e12aaae948771f84be
99f5e34e884a157a55bcd57b14c9bba52edee4c1
refs/heads/master
2023-02-13T09:44:44.317919
2021-01-20T08:01:36
2021-01-20T08:01:36
272,255,922
2
0
null
2020-06-17T14:12:00
2020-06-14T17:59:25
Java
UTF-8
Java
false
false
3,080
java
package il.co.hit.model.service; import il.co.hit.model.events.LabStatusUpdateObservable; import il.co.hit.model.objects.Contact; import il.co.hit.model.objects.LabPhone; import il.co.hit.model.objects.LabStatus; import il.co.hit.model.objects.Phone; import il.co.hit.model.objects.StatusUpdateEvent; import il.co.hit.model.repository.LabRepository; import il.co.hit.model.repository.LabRepositoryImpl; import il.co.hit.model.repository.PhoneRepository; import il.co.hit.model.repository.PhoneRepositoryImpl; import java.time.LocalDateTime; import java.util.NoSuchElementException; import java.util.Observer; import java.util.Set; public class LabService { private final LabRepository labRepository; private final PhoneRepository phoneRepository; private final LabStatusUpdateObservable labStatusUpdateObservable; public LabService() { this.labRepository = new LabRepositoryImpl(); this.phoneRepository = new PhoneRepositoryImpl(); this.labStatusUpdateObservable = new LabStatusUpdateObservable(); } public boolean addPhone(String phoneId, String contactName, String contactPhoneNumber, String email) { try { // Check if phone belong to us if (!this.phoneRepository.exists(phoneId)) { throw new NoSuchElementException("Phone " + phoneId + " not exists"); } LabPhone labPhone = LabPhone.builder() .phoneId(phoneId) .status(LabStatus.NEW) .contact(new Contact(contactName, contactPhoneNumber, email)) .creationDate(LocalDateTime.now()) .build(); this.labRepository.save(labPhone); return true; } catch (Exception e) { return false; } } public Set<LabPhone> getPhonesByStatus(LabStatus labStatus) { return this.labRepository.filterByStatus(labStatus); } public LabPhone getPhone(String labPhoneId) throws NoSuchFieldException { return this.labRepository.find(labPhoneId); } public Set<LabPhone> getAllLabPhones() { return this.labRepository.findAll(); } public void addStatusUpdateObserver(Observer observer) { this.labStatusUpdateObservable.addObserver(observer); } public boolean updateStatus(String labId, LabStatus status) { try { LabPhone phone = this.labRepository.find(labId); phone.setStatus(status); this.labRepository.update(phone); this.publishStatusChangeEvent(phone); return true; } catch (Exception e) { return false; } } private void publishStatusChangeEvent(LabPhone labPhone) { try { Phone phone = this.phoneRepository.find(labPhone.getPhoneId()); this.labStatusUpdateObservable.statusUpdated(new StatusUpdateEvent(labPhone.getContact(), labPhone.getStatus(), phone.getName())); } catch (Exception e) { // Failed to publish an event } } }
[ "afik.grinstein@algosec.com" ]
afik.grinstein@algosec.com
d03062ab20aa9cd0169eb8f7500de967f1bb1f1b
e2ce140970ba536b3dfd0f8f28e44973e724792b
/lucian-channel/src/com/lucianms/events/ChangeMapSpecialEvent.java
39c30c3e6fbf285c8d4302ca8774668fb3f22779
[]
no_license
hoditac068/LucianMS
ca5f07309fc373824aba1600bce96b0524d5ad7d
9976a1d4ecf82a31feb4d5af3ceb41d67a7198c0
refs/heads/master
2023-08-07T13:29:03.993323
2021-05-23T03:24:32
2021-05-23T03:24:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,925
java
package com.lucianms.events; import com.lucianms.client.MapleCharacter; import com.lucianms.nio.receive.MaplePacketReader; import com.lucianms.server.MaplePortal; import com.lucianms.server.MapleTrade; import com.lucianms.server.maps.MapleMap; import tools.MaplePacketCreator; /** * @author izarooni */ public final class ChangeMapSpecialEvent extends PacketEvent { private String startwp; @Override public void processInput(MaplePacketReader reader) { reader.skip(1); startwp = reader.readMapleAsciiString(); reader.skip(2); } @Override public Object onPacket() { MapleCharacter player = getClient().getPlayer(); MaplePortal portal = player.getMap().getPortal(startwp); if (portal != null) { if (player.isGM() && player.isDebug()) { player.sendMessage("[DEBUG] ID: {}, Name: {}/{}, Target map: {}, Location: x:{}/y:{}", portal.getId(), portal.getName(), portal.getScriptName(), portal.getTarget(), portal.getPosition().x, portal.getPosition().y); player.announce(MaplePacketCreator.enableActions()); return null; } if (player.isBanned() || player.portalDelay() > System.currentTimeMillis() || player.getBlockedPortals().contains(portal.getScriptName())) { player.announce(MaplePacketCreator.enableActions()); return null; } if (player.getTrade() != null) { MapleTrade.cancelTrade(player); } if (!portal.enterPortal(getClient()) && portal.getTargetMapId() != MapleMap.INVALID_ID) { player.announce(MaplePacketCreator.enableActions()); getLogger().warn("portal {} in {} that leads to invalid area {}", startwp, player.getMapId(), portal.getTargetMapId()); } } return null; } }
[ "coalasonly@gmail.com" ]
coalasonly@gmail.com
c5332c19aa6dac7b5238dc18015922d68d969c37
0b6388fb9a9b02a4c043c309e577516a1b9cc55f
/src/main/java/stsjorbsmod/actions/AdvanceRelicsThroughTimeAction.java
93026eae4f348580a16964b33eb1bc3aabf83dcd
[ "MIT" ]
permissive
johnplunk/jorbs-spire-mod
3f1607e947877e853896d9e63fcd6206ee94449e
e0d9d58438a4ff8def5e20a2daa9838b364a0760
refs/heads/master
2021-01-05T21:39:38.445919
2020-02-17T04:46:47
2020-02-17T04:46:47
241,145,092
0
0
MIT
2020-02-17T15:44:32
2020-02-17T15:44:31
null
UTF-8
Java
false
false
1,601
java
package stsjorbsmod.actions; import com.megacrit.cardcrawl.actions.AbstractGameAction; import com.megacrit.cardcrawl.characters.AbstractPlayer; import com.megacrit.cardcrawl.core.Settings; import com.megacrit.cardcrawl.relics.AbstractRelic; public class AdvanceRelicsThroughTimeAction extends AbstractGameAction { AbstractPlayer player; public AdvanceRelicsThroughTimeAction(AbstractPlayer player, int relicCounterIncrement) { this.player = player; this.amount = relicCounterIncrement; this.duration = Settings.ACTION_DUR_FAST; } @Override public void update() { for (int i = 0; i < this.amount; ++i) { for (AbstractRelic relic : player.relics) { if (relic.counter >= 0) { // We aren't just incrementing the counter directly because the relics generally aren't listening for // that to happen, so incrementing a counter to a relic's trigger value that way wouldn't trigger // the relic as desire. Instead, we simulate the passage of the turn ending and then starting again, // so those relics' trigger behaviors can get a chance to run. // // Notable test cases: // * Stone Calendar // * Happy Flower // * Ancient Tea Set relic.onPlayerEndTurn(); relic.atTurnStart(); relic.atTurnStartPostDraw(); } } } isDone = true; } }
[ "dan@dbjorge.net" ]
dan@dbjorge.net
e8ab1ab0c0778f1b03a9d7f1938141a0c5ff4c67
fb872fa87a4e81a5264786ce2d48098bab9d9381
/app/src/test/java/co/icovid_19/ExampleUnitTest.java
df474c05ec8c94ed4fcc89643f1b385bfbd98890
[]
no_license
Ramon0898/ICoVid-19
7e47b6f6347d66e58584396bc3ff04b7b2f590f5
5517322e414edbc73331f6a8e2a8a3762bd2e4f1
refs/heads/master
2021-05-21T01:36:17.671688
2020-04-08T14:08:14
2020-04-08T14:08:14
252,488,603
0
0
null
null
null
null
UTF-8
Java
false
false
373
java
package co.icovid_19; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "58474071+Ramon0898@users.noreply.github.com" ]
58474071+Ramon0898@users.noreply.github.com
53ec778378c02c68066756f93c9275eaf28abc18
3551415a77a2ee1bae8016f554c354881ca6b9eb
/SpringSample/src/main/java/com/example/demo/trySpring/HelloService.java
28a8030237ecc8e05239a65d1a7567c5643354f1
[]
no_license
faith-goto/Spring
a51b1ccba3ae7433589620dbf766fb852e518e24
552e0dc4e930ec12cad235049f2a7284179b4a57
refs/heads/master
2020-04-09T00:00:39.765930
2018-12-05T06:15:34
2018-12-05T06:15:34
159,849,480
0
0
null
2018-12-05T07:31:12
2018-11-30T16:24:20
JavaScript
UTF-8
Java
false
false
765
java
package com.example.demo.trySpring; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class HelloService { @Autowired private HelloRepository helloRepository; public Employee findOne(int id) { //1件検索実行 Map<String, Object>map = helloRepository.findOne(id); //Mapから値を取得 int employeeId = (Integer)map.get("employee_id"); String employeeName = (String)map.get("employee_name"); int age = (Integer)map.get("age"); //Employeeクラスに値をセット Employee employee = new Employee(); employee.setEmployeeId(employeeId); employee.setEmployeeName(employeeName); employee.setAge(age); return employee; } }
[ "goto@faith.co.jp" ]
goto@faith.co.jp
3bbff94e2e4d3602ca4d9ea3e48f38a615fd7075
24a95572ae2bbc80f6868eaeeb04def1ee357147
/Supply_Chain_Management_in_Healthcare/src/Business/Enterprise/ManufactureEnterprise.java
e2fe9482020e1192d858bd5f67f9a64ccaff0e21
[]
no_license
suthardhaval24/SupplyChainManagementinHealthCare
1feacfb323e5e9c3979f41812b5cfff804ef328b
d2b93aa9cfd650c4e564cd37d448fff8fb06b327
refs/heads/master
2020-04-11T11:03:18.632062
2019-04-16T20:12:57
2019-04-16T20:12:57
161,735,585
0
0
null
null
null
null
UTF-8
Java
false
false
567
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package Business.Enterprise; import Business.Role.Role; import java.util.ArrayList; /** * * @author sutha */ public class ManufactureEnterprise extends Enterprise{ public ManufactureEnterprise(String name){ super(name,Enterprise.EnterpriseType.Manufacture); } @Override public ArrayList<Role> getSupportedRole() { return null; } }
[ "suthardhaval24@gmail.com" ]
suthardhaval24@gmail.com
f14fafb393e6ca9f1a0451a14c595da374d91f29
6c4b5a94ade5af6834d978b93f487c3f647706f5
/AtGuiGu_Hanshunping/Leetcode/src/medium/medium5.java
bc6f6535c9235dd25319574b91d294ca8f6511d3
[]
no_license
dck793905632/2020-
d8ea11f60ef50f95d3670b6cc164bf6faa240f13
56a40d604608066fbb97aaf9e5b4d8cc7a9e13e9
refs/heads/master
2022-12-30T03:32:22.229478
2020-06-12T14:28:31
2020-06-12T14:28:31
271,822,831
0
0
null
2020-10-13T22:45:20
2020-06-12T14:52:01
Java
UTF-8
Java
false
false
1,115
java
package medium; import org.junit.Test; import java.util.ArrayList; import java.util.List; public class medium5 { @Test public void test(){ String s = "babad"; List<String> list = new ArrayList<>(); dfs(s,0,list); String str1=""; int len=Integer.MIN_VALUE; for(int i=0;i<list.size();i++){ if(len<list.get(i).length()){ str1=list.get(i); len=list.get(i).length(); } } } public void dfs(String s, int startIndex, List<String> list){ for(int i=startIndex;i<s.length();i++){ String str1 = s.substring(startIndex, i + 1); if (isP(str1)){ list.add(str1); } dfs(s,i+1,list); } } public boolean isP(String s){ char[] chars = s.toCharArray(); int j = chars.length-1; for(int i=0;i<chars.length/2;i++){ if(chars[i]!=chars[j]){ return false; } j--; } return true; } }
[ "18817781078@163.com" ]
18817781078@163.com
83aefa83bd257370b004cf87364da6b2312dd87e
8f1ff539fef95d9d4baf2ac348627ba320fc63af
/src/solutions/ConvertBinarySearchTreetoSortedDoublyLinkedList/Solution.java
400fefa1eb9eb989fa8acce9db5cddb59f960559
[]
no_license
dongyj1/coding_practice
a142ea7a1abec113cad74b44c754b119228a7af1
014b204ca4864de416dc89eaf8da5d92a6432b3f
refs/heads/master
2020-03-22T11:43:12.995574
2018-09-09T16:49:37
2018-09-09T16:49:37
139,991,355
1
0
null
null
null
null
UTF-8
Java
false
false
2,046
java
package solutions.ConvertBinarySearchTreetoSortedDoublyLinkedList; /** * Created by dyj on 8/3/18. * Convert a BST to a sorted circular doubly-linked list in-place. Think of the left and right pointers as synonymous to the previous and next pointers in a doubly-linked list. Let's take the following BST as an example, it may help you understand the problem better: We want to transform this BST into a circular doubly linked list. Each node in a doubly linked list has a predecessor and successor. For a circular doubly linked list, the predecessor of the first element is the last element, and the successor of the last element is the first element. The figure below shows the circular doubly linked list for the BST above. The "head" symbol means the node it points to is the smallest element of the linked list. Specifically, we want to do the transformation in place. After the transformation, the left pointer of the tree node should point to its predecessor, and the right pointer should point to its successor. We should return the pointer to the first element of the linked list. The figure below shows the transformed BST. The solid line indicates the successor relationship, while the dashed line means the predecessor relationship. */ public class Solution { Node prev; public Node treeToDoublyList(Node root) { if (root == null) { return null; } Node dummy = new Node(0, null, null); prev = dummy; inorder(root); prev.right = dummy.right; dummy.right.left = prev; return dummy.right; } private void inorder(Node root) { if (root == null) return; inorder(root.left); prev.right = root; root.left = prev; prev = root; inorder(root.right); } } class Node { public int val; public Node left; public Node right; public Node() {} public Node(int _val,Node _left,Node _right) { val = _val; left = _left; right = _right; } };
[ "dongyj@bu.edu" ]
dongyj@bu.edu
2c73304f82a1589483861a58516f06c7d68544ed
3a72729e9afcda70cc3512d19d460d27b3f98d15
/yim-route/src/main/java/io/yzecho/yimroute/service/RouteService.java
b94ac52ea95131ff0c95896109d6832c47e9062c
[]
no_license
yzecho/yim
3e19faa79b2cc77854d1fe927a9ef1c2488948e6
e62f1c4d6d564fd069df37c2c6ff9ed32df91d42
refs/heads/master
2022-10-19T08:30:45.123944
2019-12-12T11:25:47
2019-12-12T11:25:47
224,595,955
4
1
null
2022-10-04T23:56:19
2019-11-28T07:37:00
Java
UTF-8
Java
false
false
941
java
package io.yzecho.yimroute.service; import io.yzecho.yimcommon.entity.Chat; import io.yzecho.yimcommon.entity.User; import java.io.IOException; import java.util.Set; /** * @author yzecho * @desc * @date 25/11/2019 17:19 */ public interface RouteService { /** * 发送消息 * * @param url * @param chat * @throws IOException */ void sendMessage(String url, Chat chat) throws IOException; /** * 保存和检查用户登录情况 * * @param userId * @return */ boolean saveAndCheckUserLoginStatus(Integer userId); /** * 清除用户的登录状态 * * @param userId */ void removeLoginStatus(Integer userId); /** * 根据用户id获取用户 * * @param userId * @return */ User loadUserByUserId(Integer userId); /** * 在线用户 * * @return */ Set<User> onlineUser(); }
[ "1227067627@qq.com" ]
1227067627@qq.com
9b13a550d76ea61d61bdbdbf7fecd9ba3ef359bd
6ab04e71d6f28681fa35ca796905f2f855e9fab0
/src/main/java/com/ncepulcy/battery_monitor/dao/MenuDao.java
9b9f9b4a3e0c88daf9014d358048208794e46e83
[]
no_license
ncepulcy2018/battery_monitor
5a1bfd2e03d22d35d9e5c5956342fd86e35fda94
b9accad741e55738cb2fe46deeea4ee0a234343e
refs/heads/master
2020-03-11T00:29:15.736209
2018-08-29T00:56:20
2018-08-29T00:56:20
129,665,362
0
0
null
null
null
null
UTF-8
Java
false
false
302
java
package com.ncepulcy.battery_monitor.dao; import com.ncepulcy.battery_monitor.entity.Menu; import org.apache.ibatis.annotations.Param; import java.util.List; public interface MenuDao { List<Menu> findPrimaryMenu(); List<Menu> findByParentId(@Param("parentId") Long parentId); }
[ "ncepulcy@126.com" ]
ncepulcy@126.com
86cbd69493002538dc29b51b2130997fc8c96184
7a74a3e3968739378dc49dd090bb42ca9c595e8a
/src/main/java/me/pzoupis/mastermind/domain/CodeMaker.java
eb89c79f8a0915dd9ef18706a2570f9b35bc391e
[]
no_license
pzoupis/master-mind-game
467503f8d407a320f43a04af0178d6f9d3d3634c
742714afd911f97be799c0a90fa9b8b3f1f3e7d4
refs/heads/master
2022-04-26T22:22:44.795912
2022-03-15T09:08:15
2022-03-15T09:08:15
140,189,443
0
0
null
2022-03-15T09:08:16
2018-07-08T17:43:47
Java
UTF-8
Java
false
false
932
java
package me.pzoupis.mastermind.domain; import me.pzoupis.mastermind.interfaces.ICodeMaker; import me.pzoupis.mastermind.models.GameConfiguration; public class CodeMaker implements ICodeMaker { private GameConfiguration gameConfiguration; public CodeMaker() { } @Override public void setGameConfiguration(GameConfiguration gameConfiguration) { this.gameConfiguration = gameConfiguration; } @Override public int[] generateCode() { int length = gameConfiguration.getLengthOfCode(); int[] code = new int[length]; for(int i = 0; i < length; i++) { code[i] = getRandomDigit(); } return code; } private int getRandomDigit() { int availableCodeItems = gameConfiguration.getAvailableCodeItems(); return (int) (availableCodeItems * Math.random() + 1); } }
[ "pantelis.zoupis@gmail.com" ]
pantelis.zoupis@gmail.com
05e4b1764659882935e4a23945b08a7e821a345a
db03971ef7fe9b699df74a0e21635e3012ba79cf
/taskman/src/main/java/net/incongru/taskman/def/TaskDef.java
e31afbe670f7968a3b7ffad4b7dae24c086c11cb
[]
no_license
codehaus/berkano
b23005abb1c86cd3d18c0a99de0a370f43ad6cbe
5ac4188b111fc4cab581653477c1198a5091b59a
refs/heads/master
2023-07-20T01:34:51.669091
2007-11-03T01:32:55
2007-11-03T01:32:55
36,529,417
0
0
null
null
null
null
UTF-8
Java
false
false
1,968
java
package net.incongru.taskman.def; import net.incongru.taskman.TaskEvent; import net.incongru.taskman.action.TaskAction; import org.joda.time.DateTime; import org.joda.time.Period; import java.io.Serializable; /** * A TaskDef is a task definition: once deployed, it can tell TaskMan what TaskAction * to take upon given events. * * @author gjoseph * @author $Author: $ (last edit) * @version $Revision: $ */ public interface TaskDef extends Serializable { Long getId(); // TODO : we might want to make this a string, if it is to be used by apps. // TODO : OR APPS should use the name property as the identifier. Long getVersionId(); // TODO : having this on the interface is *a bit* unsafe - doing it now for the sake of easyness with TaskMan.deployTaskDef's implementation void setVersionId(Long versionId); DateTime getDeploymentDateTime(); // TODO : having this on the interface is *a bit* unsafe - doing it now for the sake of easyness with TaskMan.deployTaskDef's implementation void setDeploymentDateTime(DateTime dateTime); /** * A generic name for this task definition, thus shared by all instances of * this definition. This is what determines if the version should be incremented * (i.e. if a TaskDef with this name already exists) */ String getName(); String getDescription(); /** * How much time is allowed before the assigne is reminded. */ Period getDuePeriod(); /** * How much time between each reminder. */ Period getReminderPeriod(); /** * How much time before no more reminders are sent and the task is automatically cancelled. */ Period getDueDateTimeout(); Class<? extends TaskAction> getEventActionClass(TaskEvent event); /** * Returns true if all attributes are equals to the given TaskDef, * except for id, versionId and deploymentDateTime. */ boolean isSameAs(TaskDef other); }
[ "gjoseph@5e6c65d6-21f8-0310-a445-fbbf500fbdde" ]
gjoseph@5e6c65d6-21f8-0310-a445-fbbf500fbdde
e658cae39861ba7b647b3bb133b70939868ccc3d
e5daba56473cae918591f698bc02138a12b8b7a5
/03-Abstract factory/src/com/bosch/dao/DaoFactory.java
3f308822ebb9bee67a39052fe8542275e1ca8f0e
[]
no_license
kayartaya-vinod/2019_12_BOSCH_DESIGN_PATTERNS
993e47dc276b5f5f37c1faae9698301d67de57be
936aae4aab66f1d88b7a82f068e6153422251bd4
refs/heads/master
2020-11-25T16:23:09.849164
2019-12-24T07:08:33
2019-12-24T07:08:33
228,752,311
0
1
null
null
null
null
UTF-8
Java
false
false
736
java
package com.bosch.dao; import java.util.ResourceBundle; public abstract class DaoFactory { static class Holder { private static DaoFactory instance = null; static { ResourceBundle rb = ResourceBundle.getBundle("asdf"); String factoryImplClass = rb.getString("dao.factory.impl"); // for example, factoryImplClass = "com.bosch.dao.JdbcDaoFactory" try { instance = (DaoFactory) Class.forName(factoryImplClass).newInstance(); } catch (Exception e) { e.printStackTrace(); } } } public static DaoFactory getInstance() { return Holder.instance; } public abstract ProductDao getProductDao(); public abstract CustomerDao getCustomerDao(); public abstract EmployeeDao getEmployeeDao(); }
[ "vinod@vinod.co" ]
vinod@vinod.co
abce90f7085ec6b8b015eef0f42ab6679ef2c65d
5f955b0dd47e29682fa3a908d7cfd4ab4ab0a6e7
/shop/src/main/java/com/skynet/cpay/service/TransactionService.java
afd5ae736a7b492ba6c9e49c67850c725d8485fc
[]
no_license
AzureSavant/cpay
db9b2d457bb59c6722e38284705678ca0c967e10
bc4f23b1c7b7e9ea09eb99a8d39ca31a124dd78c
refs/heads/master
2020-11-29T14:04:45.150643
2020-01-18T11:35:46
2020-01-18T11:35:46
230,131,843
3
0
null
null
null
null
UTF-8
Java
false
false
332
java
package com.skynet.cpay.service; import com.skynet.cpay.models.Transaction; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface TransactionService { List<Transaction> getAllTransactions(); Transaction getById(int id); void saveTransaction(Transaction transaction); }
[ "mkdwarrior007@gmail.com" ]
mkdwarrior007@gmail.com
d8dd144f7dd7674c97110a9a7654d4e1ec52d5db
514f7283dca2e74bdde662b3c9dafbfaba17dedc
/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/busifavor/AvailableDayTimeItem.java
de5e0c839bc238bab86d5a4fef4cbf71a15627d2
[ "Apache-2.0" ]
permissive
mizhiqiang/payment-spring-boot
26bdff3614573ca9f215185ffb808a3cb87e6b03
54c119e254a56e6d76ef1fda93d713b22c1e4362
refs/heads/main
2023-07-14T20:42:30.220791
2021-08-25T03:27:32
2021-08-25T03:27:32
399,668,524
0
0
null
null
null
null
UTF-8
Java
false
false
1,111
java
/* * Copyright 2019-2021 felord.cn * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * Website: * https://felord.cn * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package cn.felord.payment.wechat.v3.model.busifavor; import lombok.Data; /** * 商家券当天可用时间段 * * @author felord.cn * @since 1.0.4.RELEASE */ @Data public class AvailableDayTimeItem { /** * 当天可用开始时间,单位:秒,1代表当天0点0分1秒。 */ private Integer endTime; /** * 当天可用结束时间,单位:秒,86399代表当天23点59分59秒。 */ private Integer beginTime; }
[ "945186744@qq.com" ]
945186744@qq.com
cec543e953bd1eb7aa07b4a86d3cec9978bfe9ff
b2c62b9faeac88fb36c0b90aaf70b951140d355c
/week1-020.Usernames/src/Usernames.java
e24a47e7ff603e1c910150b435c31afb9ab37029
[]
no_license
Alftron/Mooc.fi-Java-Helsinki-1
0aafe604f93dc5037b60d66c077067ebf5798d21
f38c1332ee027ece48bd2649e89ac69d0af0a6f4
refs/heads/master
2020-08-01T15:54:19.118966
2019-09-26T08:31:41
2019-09-26T08:31:41
211,024,651
0
0
null
null
null
null
UTF-8
Java
false
false
837
java
import java.util.Scanner; public class Usernames { public static void main(String[] args) { Scanner reader = new Scanner(System.in); String user1 = "alex"; String user2 = "emily"; String pass1 = "mightyducks"; String pass2 = "cat"; System.out.print("Type your username:" ); String typedUser = reader.nextLine(); System.out.print("Type your password:" ); String typedPass = reader.nextLine(); if (typedUser.equals(user1) && typedPass.equals(pass1) || typedUser.equals(user2) && typedPass.equals(pass2)) { System.out.println("You are now logged into the system!"); } else { System.out.println("Your username or password was invalid!"); } } }
[ "mja.haycock@gmail.com" ]
mja.haycock@gmail.com
5d17669526463f9dd258a043595b403981ef6e03
af50c50851d5027fafaf084c105397cf8cc3d07f
/src/Prototype/Person.java
64eb27827aa598f78cbcf8fd391e4067c0a2978b
[]
no_license
LYQkeke/DesignPatternsInJava
cf63a51c06d4b3334996e08780fb7df7ad8c8b05
bc620c773613cde8426375be0ca895866eb7180d
refs/heads/master
2020-05-20T20:13:19.256978
2019-05-15T09:23:28
2019-05-15T09:23:28
185,739,466
0
0
null
null
null
null
UTF-8
Java
false
false
1,193
java
package Prototype; import java.util.ArrayList; import java.util.List; /** * Created by KEKE on 2019/5/11 */ public class Person implements Cloneable { private String name; private List<String> friends; public Person(){ name = "乔可可"; // Arrays asList 方法返回的是一个不可变 List // friends = Arrays.asList("Pony Ma","Jack Ma"); friends = new ArrayList<>(); friends.add("Pony Ma"); friends.add("Jack Ma"); } public String getName() { return name; } public void setName(String name) { this.name = name; } public List<String> getFriends() { return friends; } public void setFriends(List<String> friends) { this.friends = friends; } public Person clone(){ try { Person p = (Person) super.clone(); p.setFriends(new ArrayList<>(p.friends)); return p; } catch (CloneNotSupportedException e) { e.printStackTrace(); return null; } } @Override public String toString() { return "{ name: "+this.name+", friends: " + friends + " }"; } }
[ "493006007@qq.com" ]
493006007@qq.com
f12b73c901545e2522e94566e7a58099cba03d30
bdec967a585a70a99de0e12742ca46e460a0a51f
/Tic-tac-toe/src/br/fsa/app/controller/ITicTacToe.java
aa37067f93d295d9d8a7b561a5ee1e5b40163757
[ "MIT" ]
permissive
mantinha/Tic-tac-toe
bbb11ad8f5ebced0c2fbbe4c98837a8c3ae0504b
99ce544709547001dfed7d1ac0141caa60d1ee91
refs/heads/master
2023-01-08T14:03:12.694134
2020-11-09T03:02:23
2020-11-09T03:02:23
311,193,067
0
0
null
null
null
null
UTF-8
Java
false
false
380
java
package br.fsa.app.controller; public interface ITicTacToe { public static final int O = 1; public static final int X = 2; public void putO(int x, int y); public void putX(int x, int y); public int whosTurn(); public int whosVictory(); public int whichVictory(); public void newGame(); public void saveGame(); public void loadGame(); public int[][] getBoard(); }
[ "adriandesigner@hotmail.com" ]
adriandesigner@hotmail.com
b7b199dd91dbce9d7b86dfe5fe5a138df7123f2c
ebae5c2684f30e36d4a321bd7cb7c28dae4b3124
/app/src/main/java/com/etiennelawlor/quickreturn/fragments/QuickReturnFooterListFragment.java
f6a922a4626c22e86e12e6787b7e89f10b4963c7
[]
no_license
shawwinbin/QuickReturn
fe4917e965c7b68f5f3a88bc6cf5a32dee1e31d7
48757a85f6966bf90cbe974226b11ab7f3b6f749
refs/heads/master
2021-01-17T22:16:09.313452
2014-07-15T17:51:36
2014-07-15T17:51:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,553
java
package com.etiennelawlor.quickreturn.fragments; import android.app.ListFragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; import com.etiennelawlor.quickreturn.R; import com.etiennelawlor.quickreturn.enums.QuickReturnType; import com.etiennelawlor.quickreturn.listeners.QuickReturnListViewOnScrollListener; import butterknife.ButterKnife; import butterknife.InjectView; /** * Created by etiennelawlor on 6/23/14. */ public class QuickReturnFooterListFragment extends ListFragment { // region Member Variables private String[] mValues; private boolean isActionUp = false; @InjectView(android.R.id.list) ListView mListView; @InjectView(R.id.quick_return_tv) TextView mQuickReturnTextView; // endregion // region Constructors public static QuickReturnFooterListFragment newInstance() { QuickReturnFooterListFragment fragment = new QuickReturnFooterListFragment(); Bundle args = new Bundle(); fragment.setArguments(args); return fragment; } public QuickReturnFooterListFragment() { } // endregion // region Lifecycle Methods @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_list_quick_return_footer, container, false); ButterKnife.inject(this, view); return view; } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mValues = getResources().getStringArray(R.array.countries); ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(), R.layout.list_item, R.id.item_tv, mValues); mListView.setAdapter(adapter); int footerHeight = getActivity().getResources().getDimensionPixelSize(R.dimen.footer_height); mListView.setOnScrollListener(new QuickReturnListViewOnScrollListener(QuickReturnType.FOOTER, null, 0, mQuickReturnTextView, footerHeight)); // mListView.setOnTouchListener(new View.OnTouchListener() { // @Override // public boolean onTouch(View v, MotionEvent event) { // switch(event.getAction()) // { // // case MotionEvent.ACTION_DOWN: // isActionUp = false; // Log.d("QuickReturnFooterListFragment", "onTouch() : ACTION_DOWN"); //// return true; // case MotionEvent.ACTION_CANCEL: //// Log.d("QuickReturnFooterListFragment", "onTouch() : ACTION_CANCEL"); // case MotionEvent.ACTION_OUTSIDE: //// Log.d("QuickReturnFooterListFragment", "onTouch() : ACTION_OUTSIDE"); //// return true; // case MotionEvent.ACTION_UP: // if(isActionUp){ // Log.d("QuickReturnFooterListFragment", "onTouch() : ACTION_UP : mDiffTotal - "+mDiffTotal); // Log.d("QuickReturnFooterListFragment", "onTouch() : mFooterHeight - "+mFooterHeight); // // // if(-mDiffTotal <= mFooterHeight/2){ // Log.d("QuickReturnFooterListFragment", "onTouch() : slide up"); //// mQuickReturnTextView.startAnimation(-mDiffTotal); // //// Animation animation = AnimationUtils.loadAnimation(getActivity(), R.anim.anticipate_slide_footer_down); //// mQuickReturnTextView.startAnimation(animation); // // //// mQuickReturnTextView.setTranslationY(0); // // mAnim = new TranslateAnimation(0, 0, mDiffTotal, // 0); //// mAnim.setFillAfter(true); // //// mAnim.setFillAfter(true); // //// mAnim.setFillBefore(true); // // mAnim.setAnimationListener(new Animation.AnimationListener() { // @Override // public void onAnimationStart(Animation animation) { // // } // // @Override // public void onAnimationEnd(Animation animation) { //// mAnim.setFillAfter(true); // //// ((RelativeLayout.LayoutParams)v4.getLayoutParams()).bottomMargin = mbar4.getHeight(); //// v4.requestLayou(); // //// mQuickReturnTextView.getLayoutParams().height = 200; //// mQuickReturnTextView.requestLayout(); // // RelativeLayout parent = (RelativeLayout) mQuickReturnTextView.getParent(); //// mQuickReturnTextView.layout(0, parent.getHeight()-mQuickReturnTextView.getHeight(), mQuickReturnTextView.getWidth() , mQuickReturnTextView.getHeight()); // //// mQuickReturnTextView.layout(0, parent.getHeight()-QuickReturnUtils.dp2px(getActivity(), 80), mQuickReturnTextView.getWidth() , QuickReturnUtils.dp2px(getActivity(), 80)); // // mQuickReturnTextView.layout(0, -parent.getHeight()+QuickReturnUtils.dp2px(getActivity(), 80), mQuickReturnTextView.getWidth() , QuickReturnUtils.dp2px(getActivity(), 80)); // // } // // @Override // public void onAnimationRepeat(Animation animation) { // // } // }); // mAnim.setDuration(100); // mQuickReturnTextView.startAnimation(mAnim); // } else { //// mQuickReturnTextView.setTranslationY(mFooterHeight); // //// mAnim = new TranslateAnimation(0, 0, mDiffTotal, //// -mFooterHeight); ////// mAnim.setFillAfter(true); ////// mAnim.setFillBefore(true); //// mAnim.setDuration(100); //// mQuickReturnTextView.startAnimation(mAnim); // // Log.d("QuickReturnFooterListFragment", "onTouch() : slide down"); // // } // //// v.setBackgroundDrawable(null); //// Intent myIntent = new Intent(v.getContext(), SearchActivity.class); //// startActivity(myIntent); // //// return true; // } // // isActionUp = true; // // } // return false; // } // // // }); } @Override public void onDestroyView() { super.onDestroyView(); ButterKnife.reset(this); } // endregion }
[ "etienne@shopsavvy.com" ]
etienne@shopsavvy.com
d6c443814a4a698f76e5cb9a10f47228bbf59d28
592eb3c39bbd5550c5406abdfd45f49c24e6fd6c
/autoweb/src/main/java/com/autosite/ds/SiteRegPaymentInfoDS.java
288ed3c828ad6ffc2f88244d81ae171b75b12624
[]
no_license
passionblue/autoweb
f77dc89098d59fddc48a40a81f2f2cf27cd08cfb
8ea27a5b83f02f4f0b66740b22179bea4d73709e
refs/heads/master
2021-01-17T20:33:28.634291
2016-06-17T01:38:45
2016-06-17T01:38:45
60,968,206
0
0
null
null
null
null
UTF-8
Java
false
false
4,067
java
package com.autosite.ds; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; import java.util.Iterator; import java.sql.Timestamp; import java.util.concurrent.ConcurrentHashMap; import org.apache.log4j.Logger; import com.autosite.AutositeGlobals; import com.autosite.db.SiteRegPaymentInfo; import com.jtrend.service.DomainStore; public class SiteRegPaymentInfoDS extends AbstractDS implements DomainStore { private static Logger m_logger = Logger.getLogger(SiteRegPaymentInfoDS.class); private static SiteRegPaymentInfoDS m_SiteRegPaymentInfoDS = new SiteRegPaymentInfoDS(); public static boolean m_debug = AutositeGlobals.m_debug; public static SiteRegPaymentInfoDS getInstance() { return m_SiteRegPaymentInfoDS; } public static synchronized SiteRegPaymentInfoDS getInstance(long id) { SiteRegPaymentInfoDS ret = (SiteRegPaymentInfoDS) m_dsMap.get(new Long(id)); if (ret == null) { ret = new SiteRegPaymentInfoDS(id); m_dsMap.put(new Long(id), ret); } return m_SiteRegPaymentInfoDS; } private static Map m_dsMap = new ConcurrentHashMap(); protected long m_loadById=0; protected SiteRegPaymentInfoDS() { m_idToMap = new ConcurrentHashMap(); try { loadFromDB(); } catch (Exception e) { m_logger.error(e, e); } } protected SiteRegPaymentInfoDS(long id) { m_idToMap = new ConcurrentHashMap(); m_loadById = id; try { loadFromDB(); } catch (Exception e) { m_logger.error(e, e); } } public SiteRegPaymentInfo getById(Long id) { return (SiteRegPaymentInfo) m_idToMap.get(id); } public void updateMaps(Object obj, boolean del) { SiteRegPaymentInfo o = (SiteRegPaymentInfo)obj; if (del) { m_idToMap.remove(new Long(o.getId())); if (m_debug) m_logger.debug("SiteRegPaymentInfo removed from DS " + o.getId()); } else { m_idToMap.put(new Long(o.getId()), o); if (m_debug) m_logger.debug("SiteRegPaymentInfo added to DS " + o.getId()); } } public boolean persistEnable(){ return false; } public static void main(String[] args) throws Exception { SiteRegPaymentInfoDS ds = new SiteRegPaymentInfoDS(); SiteRegPaymentInfo obj = ds.getById((long)1); System.out.println(obj); } // public static SiteRegPaymentInfo createDefault(){ SiteRegPaymentInfo ret = new SiteRegPaymentInfo(); // ret.setTargetDomain(""); // ret.setPaymentType(""); // ret.setCardType(""); // ret.setPaymentNum(""); // ret.setExpireMonth(""); // ret.setExpireYear(""); // ret.setCcv(""); return ret; } public static SiteRegPaymentInfo copy(SiteRegPaymentInfo org){ SiteRegPaymentInfo ret = new SiteRegPaymentInfo(); ret.setTargetDomain(org.getTargetDomain()); ret.setPaymentType(org.getPaymentType()); ret.setCardType(org.getCardType()); ret.setPaymentNum(org.getPaymentNum()); ret.setExpireMonth(org.getExpireMonth()); ret.setExpireYear(org.getExpireYear()); ret.setCcv(org.getCcv()); return ret; } public static void objectToLog(SiteRegPaymentInfo siteRegPaymentInfo, Logger logger){ logger.debug("SiteRegPaymentInfo [" + siteRegPaymentInfo.getId() + "]" + objectToString(siteRegPaymentInfo)); } public static String objectToString(SiteRegPaymentInfo siteRegPaymentInfo){ StringBuffer buf = new StringBuffer(); buf.append("SiteRegPaymentInfo="); return buf.toString(); } }
[ "joshua@joshua-dell" ]
joshua@joshua-dell
84e5851079bdd0a458fea6f74ac86f0ee5eae7d0
016a02ecdb2bfce86b9977cc49c3ac0060788a19
/casadocodigo-master/src/main/java/br/com/casadocodigo/loja/controllers/PedidosServicoController.java
09a55cc52d9c2397be68123d66102b7b2fd9d6ed
[]
no_license
vinicius-gomes/cc-vini
0b8a4f0a1b157196a38355995dc8d7955945fa68
6f69a78ec5e63198ce559fba7a6fa747cabe1973
refs/heads/master
2022-12-20T23:27:32.807684
2019-07-14T18:01:29
2019-07-14T18:01:29
196,867,522
0
0
null
2022-12-16T09:43:46
2019-07-14T17:57:06
Java
UTF-8
Java
false
false
920
java
package br.com.casadocodigo.loja.controllers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.client.RestTemplate; import org.springframework.web.servlet.ModelAndView; import br.com.casadocodigo.loja.models.Pedido; @Controller @RequestMapping("/pedidos") public class PedidosServicoController { @Autowired private RestTemplate restTemplate; @GetMapping public ModelAndView listarPedidos() { String uri = "https://book-payment.herokuapp.com/orders"; Pedido[] response = restTemplate.getForObject(uri, Pedido[].class); ModelAndView modelAndView = new ModelAndView("pedidos"); modelAndView.addObject("response", response); return modelAndView; } }
[ "vin.felipes@gmail.com" ]
vin.felipes@gmail.com
5b9860d5b4d382992e46925a158c53076a89bfc6
b218169eb27975819fe771b226430ac0759af53c
/Star Ticket Operator Gradle/starticket_alloperators_sale_bk_31May2016_v2.7.0/starTicketOperator/src/main/java/com/ignite/mm/ticketing/sqlite/database/model/BusDestination.java
0b96cc341d3936f53cc2e75beb580e451d7c2467
[]
no_license
ignitemyanmar/starticketandroid
23b40ba44040d1ea6bf238f980fc6261a3c666fa
69c8e2ed3172f9d08489bf68cc998ffcafb2d5f9
refs/heads/master
2021-06-12T18:39:09.390898
2017-02-27T10:32:05
2017-02-27T10:32:05
37,309,842
0
0
null
null
null
null
UTF-8
Java
false
false
595
java
package com.ignite.mm.ticketing.sqlite.database.model; public class BusDestination { private String DesID; private String DesName; public BusDestination() { super(); // TODO Auto-generated constructor stub } public BusDestination(String iD, String destination) { super(); DesID = iD; DesName = destination; } public String getDesID() { return DesID; } public void setDesID(String iD) { DesID = iD; } public String getDesName() { return DesName; } public void setDesName(String destination) { DesName = destination; } }
[ "hello.yelinaung@gmail.com" ]
hello.yelinaung@gmail.com
84448a427626fd0b720ddedde14a2453dba721a0
20f6094ceacc669af4092886712648898fc62c5b
/src/main/java/com/example/demo/repository/EventRepository.java
e09f2c452960c0a607b4bbd4ddcb45c182bf810b
[]
no_license
divya1019/HashedIn_Assignments
d4fd6773016845146c0b08d4e8cf4ef9f9889d98
6562f3cad00e9ee722760da12fd88a2632d05a6e
refs/heads/master
2023-01-23T07:55:03.447640
2020-11-17T08:06:15
2020-11-17T08:06:15
313,403,288
0
0
null
null
null
null
UTF-8
Java
false
false
392
java
package com.example.demo.repository; import javax.transaction.Transactional; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; import com.example.demo.model.Events; @Repository @Transactional public interface EventRepository extends JpaRepository<Events, Integer>{ }
[ "divya.nitt71@gmail.com" ]
divya.nitt71@gmail.com
5bc0fcdda8b2a17fe49d6cc35d44fa9022076e59
7637454bfa1caac722ee3d220a6f597553401a8f
/src/main/java/fcomp/application/configuration/dictionary/DictParser.java
673354f159da9c91947c37fd36ff5e5f80791a83
[]
no_license
rafal-kobylinski/fileComparator
191dba323f94477c5382500822fd48dcf80631f9
c15ec97de71b2679bfdc5c1e42f174318d4c68ff
refs/heads/master
2020-04-28T21:32:59.372184
2019-04-12T11:02:34
2019-04-12T11:02:34
175,586,160
0
0
null
null
null
null
UTF-8
Java
false
false
4,590
java
package fcomp.application.configuration.dictionary; import lombok.extern.slf4j.Slf4j; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; @Slf4j public class DictParser { private static final String[] TYPE_REGEX = {"DELIMITER", "VARIANT_FORMATS", "FIXED_FORMAT"}; public static Map<String, Map<String, String>> parse(String path) { String content = loadFile(path); switch (getType(content)) { case "DELIMITER": return type1(content); case "FIXED_FORMAT": return type2(content); case "VARIANT_FORMATS": return type3(content); default: return null; } } public static String loadFile(String file) { File path = new File(file); log.debug(path.getAbsolutePath()); try { return Files.lines(path.toPath()).collect(Collectors.joining(" ")); } catch (IOException e) { log.error("dictionary file " + file + " not found"); e.printStackTrace(); } return null; } private static String getType(String file) { return Arrays .stream(TYPE_REGEX) .parallel() .filter(file::contains) .findFirst() .orElse(""); } private static Map<String, Map<String, String>> type1(String content) { Map<String, String> map = new LinkedHashMap(); Pattern pattern2 = Pattern.compile("qw\\((.+)\\)"); Matcher matcher2 = pattern2.matcher(content); matcher2.find(); List<String> list = Arrays.asList(matcher2.group(1).trim().split("[ ,;|]")); for (int i=0; i<list.size(); i++) { map.put(String.valueOf(i), list.get(i)); } Map<String, Map<String, String>> output = new LinkedHashMap<>(); output.put("00", map); return output; } private static Map<String, Map<String, String>> type2(String content) { Map<String, String> map = new LinkedHashMap<>(); Pattern pattern = Pattern.compile("\\[.*'(.+)\\'.*\\[(.*?)\\]"); Matcher matcher = pattern.matcher(content); matcher.find(); String keys = matcher .group(1) .trim() .replaceAll("\\s+",",") .replaceAll("a",""); String names = matcher .group(2) .replaceAll(","," ") .trim() .replaceAll("\\s+",","); List<String> keyList = Arrays.asList(keys.split("[ ,;|]")); List<String> namesList = Arrays.asList(names.split("[ ,;|]")); int start = 0; for (int i=0; i<keyList.size(); i++) { map.put(start + "-" + (start - 1 + Integer.valueOf(keyList.get(i))),namesList.get(i)); start += Integer.valueOf(keyList.get(i)); } Map<String, Map<String,String>> output = new LinkedHashMap<>(); output.put("00", map); return output; } private static Map<String, Map<String, String>> type3(String content) { Pattern pattern = Pattern.compile("'([0-9]{2})' =>.*?\\[.*?'(.*?)',.*?\\[(.*?)\\]"); Matcher matcher = pattern.matcher(content); Map<String, Map<String, String>> output = new LinkedHashMap<>(); while (matcher.find()) { String type = matcher.group(1); String keys = matcher .group(2) .trim() .replaceAll("\\s+", ",") .replaceAll("a", ""); String names = matcher .group(3) .trim() .replaceAll("'", "") .replaceAll(",\\s+", " ") .trim() .replaceAll("\\s", ","); List<String> keysList = Arrays.asList(keys.split(",")); List<String> namesList = Arrays.asList(names.split(",")); Map<String, String> map = new LinkedHashMap<>(); int start = 0; for (int i=0; i<keysList.size(); i++) { map.put(start + "-" + (start - 1 + Integer.valueOf(keysList.get(i))),namesList.get(i)); start += Integer.valueOf(keysList.get(i)); } output.put(type, map); } return output; } }
[ "rafal.kobylinski@plus.pl" ]
rafal.kobylinski@plus.pl
2d2396a5c28eeb2973512bce42191213930399fa
f1a19012b859e9f72eb02ede9af5eb874af1ce71
/FamilyMapServer/app/src/main/java/recyclerview/ChildViewHolder.java
44d605f92204d3c1c8937a2717e22cc5df6eb4d8
[]
no_license
jarmknecht/AdvProgrammingConcepts
71f561660d0c0d362304650fed142dd813ac24a1
159fe018daadee51271fb7e1f8cdb05233b2e3d0
refs/heads/master
2020-03-29T13:21:27.097874
2018-09-23T06:52:27
2018-09-23T06:52:27
149,954,375
0
0
null
null
null
null
UTF-8
Java
false
false
1,092
java
package recyclerview; import android.view.View; import com.joanzapata.iconify.widget.IconTextView; import android.widget.TextView; import com.example.jonathan.familymapserver.R; public class ChildViewHolder extends com.bignerdranch.expandablerecyclerview.ViewHolder.ChildViewHolder { public TextView title; public TextView subTitle; public IconTextView iconTextView; public View itemView; public ChildViewHolder(View itemView) { super(itemView); this.itemView = itemView; title = (TextView) itemView.findViewById(R.id.listChildItemTitle); subTitle = (TextView) itemView.findViewById(R.id.listChildItemSubTitle); iconTextView = (IconTextView) itemView.findViewById(R.id.listChildIcon); } public void setOnClickListener(final AbstractChildListItem object, final OnChildListItemClickListener listener) { itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { listener.onChildListItemClick(object); } }); } }
[ "jonathan.armknecht@gmail.com" ]
jonathan.armknecht@gmail.com
bd8f6c8ffdd3827cb76f462950d999e5bd87e2d5
0cfadbe44a1f3272d5b4901be7ded8db22ec63a6
/trade-app/cashing/src/main/java/com/akmans/trade/cashing/dto/SpecialDetailQueryDto.java
ffb003ce4f48ecd60faf85456cbe1e577e485335
[]
no_license
akmans/stock_db
4391ddae8a03aa3348f104b711d9fb7555b09749
986cb4a7645a1543d36f97e262fbee07389d30ea
refs/heads/master
2021-01-12T06:13:35.688347
2016-11-03T06:51:37
2016-11-03T06:51:37
77,327,205
0
0
null
null
null
null
UTF-8
Java
false
false
952
java
package com.akmans.trade.cashing.dto; import java.io.Serializable; import com.akmans.trade.core.dto.AbstractQueryDto; public class SpecialDetailQueryDto extends AbstractQueryDto implements Serializable { private static final long serialVersionUID = 1L; /** name. */ private String name; /** itemCode */ private Integer itemCode; /** * name getter.<BR> * * @return name */ public String getName() { return this.name; } /** * name setter.<BR> * * @param name */ public void setName(String name) { this.name = name; } /** * itemCode getter.<BR> * * @return itemCode */ public Integer getItemCode() { return this.itemCode; } /** * itemCode setter.<BR> * * @param itemCode */ public void setItemCode(Integer itemCode) { this.itemCode = itemCode; } @Override public String toString() { return "[name=" + name + ", itemCode=" + itemCode + ", pageable=" + super.toString() + "]"; } }
[ "mr.wgang@gmail.com" ]
mr.wgang@gmail.com
92cc0aa32c4eb2c6a13f559741dd76d4f04bf6db
17d28bb95bbc0c683dfc79f3879d6882ed108347
/src/main/java/edu/nccu/soslab/Patcher/Json/File/ResGetSrcCode.java
186a4555a3b56c1097b9255183531ce0795335b0
[]
no_license
junhanlin/Patcher
5aae293b6927730e143f1685016e6f3c239f188a
2773a1480c1ab9fce44a7657dc7cd1bb6ffd8d97
refs/heads/master
2020-04-10T08:50:43.648234
2017-01-24T12:19:45
2017-01-24T12:19:45
160,917,054
0
0
null
null
null
null
UTF-8
Java
false
false
249
java
package edu.nccu.soslab.Patcher.Json.File; import edu.nccu.mis.Service.Response; public class ResGetSrcCode extends Response { public int fileId; public String srcCode; public ResGetSrcCode() { // TODO Auto-generated constructor stub } }
[ "john.lin@gmail.com" ]
john.lin@gmail.com