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
e4149eb955e478ad32575b1cba79490c4c84f19a
fc259df759f35211ad2711e34d28b91d4106c2d5
/src/main/java/org/stg/persistence/OccupationDAO.java
93c858f4bb59150ee3a2816830c3280b6f98c7cb
[]
no_license
Savys/synthetic-data-generator
52cc2e5d7ee33e71591a2589d0b379d4c4ab5666
4aac779b7f251cac1e7761fb7208eecb58000bf1
refs/heads/master
2021-01-15T16:41:43.475546
2017-08-24T06:24:16
2017-08-24T06:24:16
99,519,140
0
0
null
null
null
null
UTF-8
Java
false
false
303
java
package org.stg.persistence; import java.util.List; import org.stg.exception.DAOException; import org.stg.persistence.model.Occupation; public interface OccupationDAO { public List<Occupation> selectAll() throws DAOException; public List<Occupation> selectWithSalary() throws DAOException; }
[ "savysree2@gmail.com" ]
savysree2@gmail.com
12c1e2bd909bd51dfbc4753feead5e43339c13ab
6bad117693370018244e6a5dee494b24b470fdf8
/src/main/java/com/example12345/demo123/model/User.java
7c30650c3557f773e48d14fa16c012180b0b4a34
[]
no_license
shabrankhairi/GuestBookV.2
57e1ddcd3353d84e744dcbb56d4710a1a7cea30b
16a85661a3dcdc54f8ffd1f0769673ed539b1c35
refs/heads/master
2020-05-16T03:47:55.015306
2019-04-23T03:02:22
2019-04-23T03:02:22
182,746,884
0
0
null
null
null
null
UTF-8
Java
false
false
1,026
java
package com.example12345.demo123.model; import java.util.Date; import javax.persistence.*; @Entity @Table(name="user") public class User { @Id @GeneratedValue(strategy=GenerationType.AUTO) private Integer id_pass; private String username; private String password; @Version @Column(columnDefinition="") //integer DEFAULT 0 private Integer version; public User() {} public User(Integer id_pass,String username, String password) { this.id_pass = id_pass; this.username = username; this.password = password; } public Integer getId_pass() { return id_pass; } public void setId(Integer id_pass) { this.id_pass = id_pass; } 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; } }
[ "shabrankhairi@gmail.com" ]
shabrankhairi@gmail.com
af068a69bc029116d175cfe1516d00ecc25c44ac
bac681bd687d4bcceb07ec9158aac688ef58fa24
/PetManager/src/dao/UserDaoMySQLImpl.java
cb06b7bca360f37a3c475e517942391b6dd2f46f
[]
no_license
quinthaman/JFrame-
68f1187e8b1b18044aa4f1183a1877fc4c85c98b
cc2455ff219d3812bac998137860d238be6044d1
refs/heads/master
2021-01-23T07:44:39.197669
2017-03-28T09:36:23
2017-03-28T09:36:23
86,440,832
0
0
null
null
null
null
UTF-8
Java
false
false
364
java
package dao; import entity.User; public class UserDaoMySQLImpl extends BaseDao implements UserDao{ @Override public int Login(User user) { // TODO Auto-generated method stub String sql = "select * from master where loginid=? and password=?"; String[] param = {User.account,User.password}; int result = this.select(sql,param); return result; } }
[ "1159589916@qq.com" ]
1159589916@qq.com
eb4773d22dd2f0f6a68c652846f0e5f56f06f886
9f2367ec72029233b95ef4a5c91e1e3ef39eb29c
/src/com/edu/exam/service/LoginService.java
7768367e490f92cebd8c8f63162561cd1db2a164
[]
no_license
1036789521/OnlineExaminationOA
e644cf023ba03f45348c0471eb3ecf6e39734dc2
5fc742fd3acd3ad96e0331de980a071c61799845
refs/heads/master
2021-01-13T05:38:34.525946
2017-06-22T14:27:02
2017-06-22T14:27:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
338
java
package com.edu.exam.service; import com.edu.exam.entity.Student; import com.edu.exam.entity.User; public interface LoginService { /** * 用户登录验证 * @param username 用户名 * @param password 密码 * */ public User login(String username,String password); public void Register(Student student ); }
[ "Administrator@PC-20170513XPTS" ]
Administrator@PC-20170513XPTS
d96dc813f83b821b9ecca1835fc1dd54f4b6da79
a475b3109dd11625e34e1b136fb8df4f5e2a18df
/src/main/java/com/example/demo/services/TeacherService.java
e758fbf4e9f6e171e3fb4ae776e8236f894340ce
[]
no_license
NightOfBlood/javaWork7
63bf4b2eb755939767435d01ec64049bd6b5d463
51719c40bc0fd015b93cceabc2ca97e4f5c0403b
refs/heads/master
2023-05-02T21:20:33.478377
2021-05-30T08:44:24
2021-05-30T08:44:24
372,165,001
0
0
null
null
null
null
UTF-8
Java
false
false
965
java
package com.example.demo.services; import com.example.demo.dao.TeacherDao; import com.example.demo.models.Teacher; import java.util.List; public class TeacherService { private final TeacherDao teacherDao = new TeacherDao(); public List<Teacher> getAllTeachers(){ return teacherRepository.getAllTeachers(); } public Teacher findTeacher(int id) { return teacherDao.findTeacherById(id); } public void saveTeacher(Teacher teacher) { Teacher teacherById = teacherDao.findTeacherById(teacher.getId()); if(teacherById==null) teacherDao.save(teacher); else teacherDao.update(teacher); } public void deleteTeacher(Teacher teacher) { teacherDao.delete(teacher); } public void updateTeacher(Teacher teacher) { teacherDao.update(teacher); } public Teacher findTeacherById(int id) { return teacherDao.findTeacherById(id); } }
[ "mimirondakota@gmail.com" ]
mimirondakota@gmail.com
7383412853324ee525a6496f06f12a0a58a2f5fa
0167f77a8364fe86aed16510c97ffc348c0d9132
/src/com/jetcms/common/office/PdfToSwfConverter.java
c12c5d06eb11a0dbcabfe062c3f57c9f7e87bfd0
[]
no_license
barrycom/kgmx
1bc379b7472ec11f8d807fbdf38644b59449410f
f2ad7902d06d36fdb908c6c098f36c978907b05f
refs/heads/master
2021-07-13T14:06:20.966837
2017-09-26T03:14:54
2017-09-26T03:16:42
104,827,608
2
0
null
null
null
null
UTF-8
Java
false
false
1,969
java
package com.jetcms.common.office; /** * @author Tom */ import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; /* * PDF转SWF工具 * @author tom * */ public class PdfToSwfConverter { public static int convertPDF2SWF(String swftoolsHome,String sourcePath, String destPath, String fileName) throws IOException { File dest = new File(destPath); if (!dest.exists()) dest.mkdirs(); //调用pdf2swf命令进行转换 没有中文文件不需要参数-s languagedir String command= swftoolsHome+" "+sourcePath+" -o "+destPath+fileName+" -f -z -s flashversion=9 "; command=command.replace("\\", "/"); Process process =Runtime.getRuntime().exec(command); // 调用外部程序 final InputStream pInputStream = process.getInputStream(); new Thread(new Runnable() { public void run() { BufferedReader br = new BufferedReader(new InputStreamReader(pInputStream)); try { while(br.readLine()!= null) ; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }).start(); // 启动单独的线程来清空process.getInputStream()的缓冲区 InputStream inputstream = process.getErrorStream(); BufferedReader bufferReader = new BufferedReader(new InputStreamReader(inputstream)); StringBuilder buf = new StringBuilder(); // 保存输出结果流 String line = null; while((line = bufferReader.readLine()) != null) buf.append(line); try { process.waitFor(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } return process.exitValue(); } }
[ "whlitiger_yp@163.com" ]
whlitiger_yp@163.com
e7181da11435ab424172e8ffb0966753ffb6dbbd
2c0dd9169799782da4236ad8b7fbb8119c1de822
/app/src/main/java/com/thdz/ywqx/util/NotifyUtil.java
a67ab6af258afb096492bd3c9aef77e390534f1d
[]
no_license
Cyuu/ywqx4.3.0Demo
2956244a0763880143b50e526a663866812e033a
0f877c8f7caa979aee446abfbc27c7c914b82b6f
refs/heads/master
2023-01-10T05:54:38.568052
2020-11-04T10:17:14
2020-11-04T10:17:14
309,966,792
0
0
null
null
null
null
UTF-8
Java
false
false
4,006
java
package com.thdz.ywqx.util; import android.app.Notification; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.support.v4.app.NotificationCompat; import android.support.v4.app.NotificationManagerCompat; import com.thdz.ywqx.R; import com.thdz.ywqx.ui.Activity.alarm.AlarmDetailActivity; /** * 通知栏工具类 */ public class NotifyUtil { /** * 通知 * * @param context * @param title * @param content * @param index * @param intent */ public static void CreateNotify(Context context, String title, String content, int index, Intent intent) { NotificationCompat.Builder builder = new NotificationCompat.Builder(context.getApplicationContext()); PendingIntent pi = PendingIntent.getActivity(context.getApplicationContext(), 0, intent, 0); // 震动通知 // long[] vibratePattern = new long[] {400,800,1200,1600}; // 创建一个 Notification Notification notification = builder .setContentTitle(title) .setContentText(content) .setContentIntent(pi) .setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE) .setColor(context.getApplicationContext().getResources().getColor(R.color.white)) .setSmallIcon(R.mipmap.ic_launcher) // .setVibrate(vibratePattern) .build(); notification.flags |= Notification.FLAG_AUTO_CANCEL; // 设置点击后自动消失 // 使用 NotificationManagerCompat 的 notify 方法展示你设置了 id 的那个 Notification NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context.getApplicationContext()); notificationManager.notify(index, notification); } /** * 打开详情页的通知 * * @param context * @param title * @param content * @param index */ public static void CreateNotification(Context context, String title, String content, int index) { Intent intent = new Intent(context.getApplicationContext(), AlarmDetailActivity.class); CreateNotify(context, title, content, index, intent); } public static void showNotification(Context context, String title, String content, Intent intent, int notyId) { // 获取一个 NotificationCompat.Builder 实例。 NotificationCompat.Builder builder = new NotificationCompat.Builder(context.getApplicationContext()); PendingIntent pi = PendingIntent.getActivity(context.getApplicationContext(), 0, intent, 0); // 震动通知 long[] vibratePattern = new long[]{400, 800, 1200, 1600}; // 创建一个 Notification Notification notification = builder .setContentTitle(title) .setContentText(content) .setContentIntent(pi) .setAutoCancel(true) .setColor(context.getApplicationContext().getResources().getColor(R.color.white)) .setSmallIcon(R.drawable.push) .setSound(Uri.parse("android.resource://" + context.getPackageName() + "/" + R.raw.call)) .setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_VIBRATE) .build(); // notification.defaults |= Notification.DEFAULT_VIBRATE; if (title.contains("告警取消")){ notification.defaults |= Notification.DEFAULT_SOUND; } notification.flags |= Notification.FLAG_AUTO_CANCEL; // 设置点击后自动消失 // 使用 NotificationManagerCompat 的 notify 方法展示你设置了 id 的那个 Notification NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context.getApplicationContext()); notificationManager.notify(notyId, notification); } }
[ "715155129@qq.com" ]
715155129@qq.com
21b3bcc8da341d01e9950384d37734f8b2ee3a75
5d59e9bde3ebe06462c5a90639d0fe07a586ae5f
/src/main/java/be/ac/vub/wise/phidgets/controller/VerticalMoveChangeEvent.java
02e6edacb88f0ab19e30e7fcee23445fee3cbf94
[]
no_license
dataphobe/phidgets_wpo
a3b136232cdd74e6e8b1091de7dc269125ab4b01
29144a37444ba8496cb7eb195203efe87ac5ee1c
refs/heads/master
2020-03-30T08:22:36.330864
2018-09-30T21:47:13
2018-09-30T21:47:13
151,010,153
0
0
null
null
null
null
UTF-8
Java
false
false
335
java
package be.ac.vub.wise.phidgets.controller; public class VerticalMoveChangeEvent { private boolean _up; public VerticalMoveChangeEvent(boolean up) { _up = up; } public int getDirection() { if (_up) { return +1; } else { return -1; } } }
[ "dataphobe@datapho.be" ]
dataphobe@datapho.be
17c8321bbcc2f66bb3f8c71b13914b31ade625ae
dbc2e6d08503b50f4c1f4a4473b5ddc2464323c9
/app/src/main/java/com/witlife/mobileguard/activity/SplashActivity.java
9d75f230a2f935909b6fb3204b31d4f3fb4d5c2f
[]
no_license
Yitian2003/Mobile-Guard
5ce031027a33d2e3eb8b8c1b5e336aae12cdc75a
a4fa83d3316a2545b48661e1c5c97ab23a1d3ef5
refs/heads/master
2021-08-22T13:26:11.655054
2017-11-30T09:00:39
2017-11-30T09:00:39
104,173,189
0
1
null
null
null
null
UTF-8
Java
false
false
11,986
java
package com.witlife.mobileguard.activity; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.res.AssetManager; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.os.Message; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.view.Window; import android.view.WindowManager; import android.view.animation.AlphaAnimation; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import com.google.gson.Gson; import com.witlife.mobileguard.R; import com.witlife.mobileguard.bean.Model; import com.witlife.mobileguard.bean.UpdateBean; import com.witlife.mobileguard.common.Contant; import com.witlife.mobileguard.http.OkHttpHelper; import com.witlife.mobileguard.utils.SPUtils; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; import okhttp3.Call; import okhttp3.Callback; import okhttp3.Response; public class SplashActivity extends AppCompatActivity { public static final int TO_MAIN = 1000; private static final int DOWNLOAD_APK_SUCCESS = 1001; private static final int DOWNLOAD_APK_FAIL = 1002; @BindView(R.id.tv_version) TextView tvVersion; @BindView(R.id.rl_layout) RelativeLayout rlLayout; private Unbinder unbinder; private File apkFile; private long startTime; private UpdateBean updateInfo; private ProgressDialog progressDialog; private int currentVersionCode = 1; private Handler handler = new Handler(){ @Override public void handleMessage(Message msg) { switch (msg.what){ case TO_MAIN: Intent intent = new Intent(SplashActivity.this, MainActivity.class); startActivity(intent); finish(); break; case DOWNLOAD_APK_SUCCESS: Toast.makeText(SplashActivity.this, "Download Success", Toast.LENGTH_SHORT).show(); progressDialog.dismiss(); installApk(); finish(); break; case DOWNLOAD_APK_FAIL: Toast.makeText(SplashActivity.this, "Download file fail!", Toast.LENGTH_SHORT).show(); progressDialog.dismiss(); toMain(); break; } } }; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.activity_splash); unbinder = ButterKnife.bind(this); doAnimation(); // check whether need to automatically update startTime = System.currentTimeMillis(); currentVersionCode = getCurrentVersionCode(); if (SPUtils.getBoolean(this, Contant.AUTO_UPDATE, true)) { updateApk(); } else { toMain(); } copyDb("address.db"); copyDb("commonnum.db"); copyDb("antivirus.db"); } private void updateApk() { // connect server if (!isConneted()) { Toast.makeText(this, "No internet connected", Toast.LENGTH_SHORT).show(); toMain(); } else { // http request String url = Contant.BASE_URL + Contant.UPDATE; OkHttpHelper.getInstance().get(url, new Callback() { @Override public void onFailure(Call call, IOException e) { Toast.makeText(SplashActivity.this, "Request Failure: "+ e.getMessage(), Toast.LENGTH_SHORT).show(); toMain(); } @Override public void onResponse(Call call, Response response) throws IOException { if (response.isSuccessful()){ String result = response.body().string(); updateInfo = new Gson().fromJson(result, UpdateBean.class); compareVersionCode(updateInfo.getVersionCode()); } else { Toast.makeText(SplashActivity.this, response.body().string(), Toast.LENGTH_SHORT).show(); toMain(); } } }); } } private void compareVersionCode(int serverVersionCode) { // compare versionCode if (currentVersionCode < serverVersionCode){ new AlertDialog.Builder(this) .setTitle("Download New Version") .setMessage(updateInfo.getDes()) .setCancelable(false) .setNegativeButton("Not Now", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { toMain(); } }) .setPositiveButton("Download Now", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { downloadNewVersion(); } }) .show(); } else { // no update toMain(); } } private boolean isConneted() { ConnectivityManager manager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo = manager.getActiveNetworkInfo(); if(networkInfo != null){ return networkInfo.isConnected(); } return false; } private void toMain() { long currentTime = System.currentTimeMillis(); long delayTime = 3000 - currentTime + startTime; if (delayTime < 0){ delayTime = 0; } handler.sendEmptyMessageDelayed(TO_MAIN, delayTime); } private void downloadNewVersion() { // show download progress bar progressDialog = new ProgressDialog(this); progressDialog.setMessage("Downloading..."); progressDialog.setCancelable(false); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.show(); // create apk in local File filesDir; if(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){ filesDir = this.getExternalFilesDir(""); } else { filesDir = this.getFilesDir(); } apkFile = new File(filesDir, "update.apk"); // write inputstream Model.getInstance().getGlobalThreadPool().execute(new Runnable() { @Override public void run() { InputStream is = null; FileOutputStream fos = null; URL url = null; HttpURLConnection connection = null; try { url = new URL(updateInfo.getUrl()); } catch (MalformedURLException e) { e.printStackTrace(); } try { connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setConnectTimeout(5000); connection.setReadTimeout(5000); connection.connect(); if (connection.getResponseCode() == 200){ progressDialog.setMax(connection.getContentLength()); is = connection.getInputStream(); fos = new FileOutputStream(apkFile); byte[] buffer = new byte[1024]; int len; while ((len = is.read(buffer)) != -1) { progressDialog.incrementProgressBy(len); fos.write(buffer, 0, len ); } handler.sendEmptyMessage(DOWNLOAD_APK_SUCCESS); } else { handler.sendEmptyMessage(DOWNLOAD_APK_FAIL); } } catch (IOException e) { e.printStackTrace(); } finally { if(connection != null) { connection.disconnect(); } if (is != null){ try { is.close(); } catch (IOException e) { e.printStackTrace(); } } if(fos != null){ try { fos.close(); } catch (IOException e) { e.printStackTrace(); } } } } }); } private void installApk() { Intent intent = new Intent("android.intent.action.INSTALL_PACKAGE"); intent.setData(Uri.parse("file:" + apkFile.getAbsolutePath())); startActivity(intent); } private int getCurrentVersionCode(){ PackageManager packageManager = getPackageManager(); PackageInfo packageInfo; int versionCode = -1; try { //获取包的基本信息; 参1:包名; 参2:0表示不需要额外信息 packageInfo = packageManager.getPackageInfo(getPackageName(), 0); String version = packageInfo.versionName; versionCode = packageInfo.versionCode; tvVersion.setText(version); } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } return versionCode; } private void doAnimation() { AlphaAnimation animation = new AlphaAnimation(0.0f, 1.0f); animation.setDuration(3000); rlLayout.setAnimation(animation); rlLayout.startAnimation(animation); } @Override protected void onDestroy() { super.onDestroy(); unbinder.unbind(); handler.removeCallbacksAndMessages(null); } private void copyDb(String fileName){// copy database InputStream inputStream = null; FileOutputStream outputStream = null; File filesDir = getFilesDir(); File desFile = new File(filesDir, fileName); if(!desFile.exists()){ AssetManager assetManager = getAssets(); try { inputStream = assetManager.open(fileName); outputStream = new FileOutputStream(desFile); byte[] buffer = new byte[1024 * 8]; int len = 0; while ((len = inputStream.read(buffer)) != -1){ outputStream.write(buffer, 0, len); } outputStream.flush(); } catch (IOException e) { e.printStackTrace(); } finally { try { inputStream.close(); outputStream.close(); } catch (Exception e) { e.printStackTrace(); } } } } }
[ "yitianchang@gmail.com" ]
yitianchang@gmail.com
7811a3df3ef234d470142c832bd22f8b08e730bb
c29288241a7c553bd89afa875bc78c63b7185523
/JavaSelfPractice/src/com/main/Quad.java
f267dc420b84ad09320dbd6a140f01f5c231d89a
[]
no_license
spma77/suryaprabha
49170ec1f44cf8a86020efd56bdfc470247f889f
d87b0afb3d142661b9917be82e999d2b1f01fecf
refs/heads/master
2020-05-21T20:49:01.236768
2017-02-23T16:43:10
2017-02-23T16:43:10
60,240,287
0
1
null
null
null
null
UTF-8
Java
false
false
95
java
package com.main; public abstract class Quad { public abstract int area(int l,int b); }
[ "suryaprabha.v@gmail.com" ]
suryaprabha.v@gmail.com
cc319b8219e6a2628270e7f8e773244fcd1d11d0
c578aec5d7bc6ada60e2d1be0654d011a850c32c
/library/common/src/main/java/com/jaydenxiao/common/base/BaseFragment.java
8a09b2a7b0df5fc0187d8a7920f1e4f66de6e55a
[]
no_license
1097919195/AndroidFire-master
e497a5917d22bdd3301fa9fb9354838226ac1837
696db1dc4b2879f74332d33af79d17f528770ff8
refs/heads/master
2020-03-18T06:14:36.588960
2019-01-12T08:37:41
2019-01-12T08:37:41
134,383,736
2
0
null
null
null
null
UTF-8
Java
false
false
5,209
java
package com.jaydenxiao.common.base; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.jaydenxiao.common.R; import com.jaydenxiao.common.baserx.RxManager; import com.jaydenxiao.common.commonutils.TUtil; import com.jaydenxiao.common.commonutils.ToastUtil; import com.jaydenxiao.common.commonwidget.LoadingDialog; import butterknife.ButterKnife; /** * des:基类fragment * Created by xsf * on 2016.07.12:38 */ /***************使用例子*********************/ //1.mvp模式 //public class SampleFragment extends BaseFragment<NewsChanelPresenter, NewsChannelModel>implements NewsChannelContract.View { // @Override // public int getLayoutId() { // return R.layout.activity_news_channel; // } // // @Override // public void initPresenter() { // mPresenter.setVM(this, mModel); // } // // @Override // public void initView() { // } //} //2.普通模式 //public class SampleFragment extends BaseFragment { // @Override // public int getLayoutResource() { // return R.layout.activity_news_channel; // } // // @Override // public void initPresenter() { // } // // @Override // public void initView() { // } //} public abstract class BaseFragment<T extends BasePresenter, E extends BaseModel> extends Fragment { protected View rootView; public T mPresenter; public E mModel; public RxManager mRxManager; @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (rootView == null) rootView = inflater.inflate(getLayoutResource(), container, false); mRxManager=new RxManager(); ButterKnife.bind(this, rootView);//绑定fragment mPresenter = TUtil.getT(this, 0); mModel= TUtil.getT(this,1); if(mPresenter!=null){ mPresenter.mContext=this.getActivity(); } initPresenter(); initView(); return rootView; } //获取布局文件 protected abstract int getLayoutResource(); //简单页面无需mvp就不用管此方法即可,完美兼容各种实际场景的变通 public abstract void initPresenter(); //初始化view protected abstract void initView(); /** * 通过Class跳转界面 **/ public void startActivity(Class<?> cls) { startActivity(cls, null); } /** * 通过Class跳转界面 **/ public void startActivityForResult(Class<?> cls, int requestCode) { startActivityForResult(cls, null, requestCode); } /** * 含有Bundle通过Class跳转界面 **/ public void startActivityForResult(Class<?> cls, Bundle bundle, int requestCode) { Intent intent = new Intent(); intent.setClass(getActivity(), cls); if (bundle != null) { intent.putExtras(bundle); } startActivityForResult(intent, requestCode); } /** * 含有Bundle通过Class跳转界面 **/ public void startActivity(Class<?> cls, Bundle bundle) { Intent intent = new Intent(); intent.setClass(getActivity(), cls); if (bundle != null) { intent.putExtras(bundle); } startActivity(intent); } /** * 开启加载进度条 */ public void startProgressDialog() { LoadingDialog.showDialogForLoading(getActivity()); } /** * 开启加载进度条 * * @param msg */ public void startProgressDialog(String msg) { LoadingDialog.showDialogForLoading(getActivity(), msg, true); } /** * 停止加载进度条 */ public void stopProgressDialog() { LoadingDialog.cancelDialogForLoading(); } /** * 短暂显示Toast提示(来自String) **/ public void showShortToast(String text) { ToastUtil.showShort(text); } /** * 短暂显示Toast提示(id) **/ public void showShortToast(int resId) { ToastUtil.showShort(resId); } /** * 长时间显示Toast提示(来自res) **/ public void showLongToast(int resId) { ToastUtil.showLong(resId); } /** * 长时间显示Toast提示(来自String) **/ public void showLongToast(String text) { ToastUtil.showLong(text); } public void showToastWithImg(String text,int res) { ToastUtil.showToastWithImg(text,res); } /** * 网络访问错误提醒 */ public void showNetErrorTip() { ToastUtil.showToastWithImg(getText(R.string.net_error).toString(),R.drawable.ic_wifi_off); } public void showNetErrorTip(String error) { ToastUtil.showToastWithImg(error,R.drawable.ic_wifi_off); } @Override public void onDestroyView() { super.onDestroyView(); ButterKnife.unbind(this); if (mPresenter != null) mPresenter.onDestroy(); mRxManager.clear(); } }
[ "1097919195@qq.com" ]
1097919195@qq.com
2ea91e3f74159fb8a9e04def7f906ac3afa59fd5
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project70/src/main/java/org/gradle/test/performance/largejavamultiproject/project70/p351/Production7021.java
363ca5b5736f4fe664139edfd516bff4a4c18faa
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
1,887
java
package org.gradle.test.performance.largejavamultiproject.project70.p351; public class Production7021 { private String property0; public String getProperty0() { return property0; } public void setProperty0(String value) { property0 = value; } private String property1; public String getProperty1() { return property1; } public void setProperty1(String value) { property1 = value; } private String property2; public String getProperty2() { return property2; } public void setProperty2(String value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
b90b334d868af0bdbab5f13820f76eb5aaeb685b
8bb9cd855366217336d399fdb945c0835d80a2ee
/themelib/src/test/java/com/jerey/themelib/ExampleUnitTest.java
eaae6cbff2992899edf93a3606606c9036b2fbd0
[ "Apache-2.0" ]
permissive
deviche/KeepGank
dd03b20dffa705b3d085d0b13d1a972241a38c03
776b35819f1e713514420d0ba0f5efedd95a2025
refs/heads/master
2020-03-27T08:34:33.013281
2018-03-25T06:30:58
2018-03-25T06:30:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
396
java
package com.jerey.themelib; 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() throws Exception { assertEquals(4, 2 + 2); } }
[ "610315802@qq.com" ]
610315802@qq.com
d449c5abf4d54ef16f213db041f3c5c27684d3a2
5a1163351e15ffb71764be54a4cd8311c7a8ed13
/src/com/example/lifecycle/OtherActivity.java
40f1906c932280c66aa0910954587971482eb12e
[]
no_license
okadaakihito/LifeCycle
7dd68a74e7cda545fd76846c0e684670509ef4d2
8a9db0583e21123c0240d17b980000c46ee34cfe
refs/heads/master
2020-05-30T19:11:43.400029
2014-05-01T02:29:19
2014-05-01T02:29:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,710
java
package com.example.lifecycle; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBar; import android.support.v4.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.os.Build; public class OtherActivity extends BaseActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_other); /* if (savedInstanceState == null) { getSupportFragmentManager().beginTransaction() .add(R.id.container, new PlaceholderFragment()).commit(); }*/ } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.other, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } /** * A placeholder fragment containing a simple view. */ public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment_other, container, false); return rootView; } } }
[ "akihito.okada@mulodo.com" ]
akihito.okada@mulodo.com
6733adfafa7c75525a1e6b69f708ac59fd171e2b
e42a1a3a923570bceb6586d198c36082c928c083
/src/servlet_exercises/MyNameServlet.java
212c26dffc8f1c47cdefd8b192acba1215e26ce1
[]
no_license
rikurasilainen/WebAppExercises
453339da170b0fd6fec2918bc9e3746ed1020aa5
296f9ebd0026e4caf9e1644f00a1603c56987207
refs/heads/main
2023-01-19T11:16:00.542772
2020-11-25T14:55:03
2020-11-25T14:55:03
315,970,417
0
0
null
null
null
null
UTF-8
Java
false
false
1,210
java
package servlet_exercises; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Servlet implementation class MyNameServlet */ @WebServlet("/myname") public class MyNameServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public MyNameServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse * response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.print("Riku Rasilainen"); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse * response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request, response); } }
[ "riku.rasilainen@gmail.com" ]
riku.rasilainen@gmail.com
d90e449c3014e15b4c7a7e724573e8feb8de5dc7
d8464bc704b52cf38cf11b23fdbaf1fc6f184eb5
/lab2/Intlist/SLListVanilla.java
039f491ab10fd4e907604637770618f06a025654
[]
no_license
zzehli/skeleton-sp19
43b2a7c28b0d683b2873be9b52494df8ab28245a
d66e72036c81711366d2f63d3d6be1f6ec16f7ff
refs/heads/master
2022-11-30T12:15:43.565619
2020-08-17T22:51:34
2020-08-17T22:51:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,505
java
public class SLListVanilla { private class IntNode { public int item; public IntNode next; public IntNode(int i, IntNode n) { item = i; next = n; } } private IntNode first; public SLListVanilla(int x){ first = new IntNode(x,null); } public void addFirst(int x){ first = new IntNode(x, first); } //iteratively reverse a SLL /** public void reverse() { IntNode active = first.next; first.next = null; IntNode hold = active; while (active != null) { hold = hold.next; active.next = first; first = active; active = hold; } }*/ /** recursively reverse a SLL*/ public void reverse(){ first = reverse(first); } public IntNode reverse(IntNode first){ if (first.next == null) return first; IntNode hold = first.next; IntNode newHead = reverse(first.next); hold.next = first; first.next = null; return newHead; } public static void main(String[] args) { SLListVanilla L = new SLListVanilla(7); L.addFirst(5); L.addFirst(10); L.addFirst(25); L.reverse(); } }
[ "albertforus@gmail.com" ]
albertforus@gmail.com
122a574e435f5c21912b2a4c7725be26b029192e
c33ed0d4ef9683f2e0277a577e861b5d8ad71e03
/src/PERTMUAN10/koneksi.java
dfe520c6c5837648c0bb5cc5ce29cb326fa6253e
[]
no_license
MuhFatwa/tugas
80939e732c85beffd301d83c32114af018dcc132
680bfd216bd15227989ef41042fd3160cb83d32f
refs/heads/master
2022-11-28T16:17:37.387380
2020-08-14T08:13:55
2020-08-14T08:13:55
287,495,105
0
0
null
null
null
null
UTF-8
Java
false
false
1,181
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 PERTMUAN10; import com.mysql.jdbc.Connection; import java.sql.DriverManager; import javax.swing.JOptionPane; /** * * @author iqbal */ public class koneksi { public static void main(String[] args) { koneksi tesKoneksi = new koneksi (); tesKoneksi.Koneksi(); } Connection con=null; String statusKoneksi; public void Koneksi() { try { String connectionURL = "jdbc:mysql://localhost/Rizal_s"; String username = "root"; String password = ""; Class.forName("com.mysql.jdbc.Driver"); con = (Connection) DriverManager.getConnection(connectionURL, username, password); // JOptionPane.showMessageDialog(null,"Sukses Koneksi"); statusKoneksi = "BERHASIL"; }catch(Exception e){ // JOptionPane.showMessageDialog(null, e); statusKoneksi = "TIDAK BERHASIL"; // System.exit(0); } } }
[ "fatwagaming511@gmail.com" ]
fatwagaming511@gmail.com
09dba758399ca9e17e0082cae7e7ca910d4df1e0
7cf0f3983be3f98300128ee9aa927d4ef530eca6
/src/main/java/br/com/swconsultoria/cte/schema_300/cte/SignedInfoType.java
d2ce5c54489d3984d1b226d4d8f1a144d440233f
[ "MIT" ]
permissive
Samuel-Oliveira/Java_CTe
9394ed7692c9f504aa891265831da29f2e643735
51e95b15a94d0796457f1a0620f37b167096bb76
refs/heads/master
2023-09-04T12:35:59.598280
2023-08-29T20:28:00
2023-08-29T20:28:00
82,298,784
64
42
MIT
2023-08-29T20:24:14
2017-02-17T13:13:34
Java
UTF-8
Java
false
false
8,711
java
// // Este arquivo foi gerado pela Arquitetura JavaTM para Implementação de Referência (JAXB) de Bind XML, v2.2.8-b130911.1802 // Consulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Todas as modificações neste arquivo serão perdidas após a recompilação do esquema de origem. // Gerado em: 2019.09.22 às 07:41:00 PM BRT // package br.com.swconsultoria.cte.schema_300.cte; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlID; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * <p>Classe Java de SignedInfoType complex type. * * <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe. * * <pre> * &lt;complexType name="SignedInfoType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="CanonicalizationMethod"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" fixed="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;element name="SignatureMethod"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" fixed="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;element name="Reference" type="{http://www.w3.org/2000/09/xmldsig#}ReferenceType"/> * &lt;/sequence> * &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SignedInfoType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { "canonicalizationMethod", "signatureMethod", "reference" }) public class SignedInfoType { @XmlElement(name = "CanonicalizationMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) protected SignedInfoType.CanonicalizationMethod canonicalizationMethod; @XmlElement(name = "SignatureMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) protected SignedInfoType.SignatureMethod signatureMethod; @XmlElement(name = "Reference", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) protected ReferenceType reference; @XmlAttribute(name = "Id") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID @XmlSchemaType(name = "ID") protected String id; /** * Obtém o valor da propriedade canonicalizationMethod. * * @return * possible object is * {@link SignedInfoType.CanonicalizationMethod } * */ public SignedInfoType.CanonicalizationMethod getCanonicalizationMethod() { return canonicalizationMethod; } /** * Define o valor da propriedade canonicalizationMethod. * * @param value * allowed object is * {@link SignedInfoType.CanonicalizationMethod } * */ public void setCanonicalizationMethod(SignedInfoType.CanonicalizationMethod value) { this.canonicalizationMethod = value; } /** * Obtém o valor da propriedade signatureMethod. * * @return * possible object is * {@link SignedInfoType.SignatureMethod } * */ public SignedInfoType.SignatureMethod getSignatureMethod() { return signatureMethod; } /** * Define o valor da propriedade signatureMethod. * * @param value * allowed object is * {@link SignedInfoType.SignatureMethod } * */ public void setSignatureMethod(SignedInfoType.SignatureMethod value) { this.signatureMethod = value; } /** * Obtém o valor da propriedade reference. * * @return * possible object is * {@link ReferenceType } * */ public ReferenceType getReference() { return reference; } /** * Define o valor da propriedade reference. * * @param value * allowed object is * {@link ReferenceType } * */ public void setReference(ReferenceType value) { this.reference = value; } /** * Obtém o valor da propriedade id. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Define o valor da propriedade id. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * <p>Classe Java de anonymous complex type. * * <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" fixed="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") public static class CanonicalizationMethod { @XmlAttribute(name = "Algorithm", required = true) @XmlSchemaType(name = "anyURI") protected String algorithm; /** * Obtém o valor da propriedade algorithm. * * @return * possible object is * {@link String } * */ public String getAlgorithm() { if (algorithm == null) { return "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"; } else { return algorithm; } } /** * Define o valor da propriedade algorithm. * * @param value * allowed object is * {@link String } * */ public void setAlgorithm(String value) { this.algorithm = value; } } /** * <p>Classe Java de anonymous complex type. * * <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" fixed="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") public static class SignatureMethod { @XmlAttribute(name = "Algorithm", required = true) @XmlSchemaType(name = "anyURI") protected String algorithm; /** * Obtém o valor da propriedade algorithm. * * @return * possible object is * {@link String } * */ public String getAlgorithm() { if (algorithm == null) { return "http://www.w3.org/2000/09/xmldsig#rsa-sha1"; } else { return algorithm; } } /** * Define o valor da propriedade algorithm. * * @param value * allowed object is * {@link String } * */ public void setAlgorithm(String value) { this.algorithm = value; } } }
[ "samuk.exe@hotmail.com" ]
samuk.exe@hotmail.com
06d1eb63178e26726ba0a13146260b2cbbd7cbaf
c7e2b71a1b9e9663dd1874374eca85aae86b1ccf
/src/test/java/com/yahoo/algebra/matrix/DenseComplexMatrixSetGetTest.java
3b6721b3dffcc781fa43c95e1efb4db98bfa821e
[]
no_license
qianwan/extended-algebra
d3a7890fd2bd4ed1f84c251e1295250866fbcb99
7575ddd4dcb66375dddbf5db78cd9fa832165e78
refs/heads/master
2021-01-23T03:28:33.236717
2013-10-11T06:18:43
2013-10-11T06:18:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
465
java
package com.yahoo.algebra.matrix; import org.testng.annotations.Test; public class DenseComplexMatrixSetGetTest { @Test public void testIt() { DenseComplexMatrix A = new DenseComplexMatrix(2, 2); A.set(0, 0, new double[] { 2.29309, 0.12325 }); A.set(0, 1, new double[] { 0.43952, 0.73916 }); A.set(1, 0, new double[] { -0.82307, 1.24527 }); A.set(1, 1, new double[] { 1.23955, -0.08308 }); // TODO } }
[ "qianwan@ymail.com" ]
qianwan@ymail.com
3090f21dbd70c95f022e505e86495dc0d2173eb1
c08215659794f83957a7423367880b1ca6c75bcd
/app/src/main/java/com/fil/fellahty/MapActivity.java
d752c52feed8f525b88e9d1b6c274ac10e1417b5
[]
no_license
yassinereptor/fellahty
ba5305a4f354d9c6f84306285061bb88c8a0bf7f
d91d7e10ede37f1a1bef418711a096c99496a689
refs/heads/master
2022-02-17T00:47:47.247243
2019-09-04T17:13:54
2019-09-04T17:13:54
206,369,076
0
0
null
null
null
null
UTF-8
Java
false
false
1,766
java
package com.fil.fellahty; import android.app.Fragment; import android.app.FragmentManager; import android.support.design.widget.TextInputEditText; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageButton; import com.fil.fellahty.fragments.MapDialogFragment; import com.fil.fellahty.fragments.SMSCodeDialogFragment; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; public class MapActivity extends AppCompatActivity { private ImageButton btn_open_map; private TextInputEditText signup_map; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_map); btn_open_map = findViewById(R.id.btn_open_map); signup_map = findViewById(R.id.signup_map); btn_open_map.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { final FragmentManager manager = getFragmentManager(); Fragment frag = manager.findFragmentByTag("fragment_map"); if (frag != null) { manager.beginTransaction().remove(frag).commit(); } MapDialogFragment editNameDialog = new MapDialogFragment(); editNameDialog.show(getSupportFragmentManager().beginTransaction(), "fragment_map"); } }); } }
[ "ouarzaziyassine@gmail.com" ]
ouarzaziyassine@gmail.com
e0c62b2ccd538c2b6a9262bcd685f93830fe1ff7
ecfdddb81d5d890006a70af23ac9fbc6de4c21a2
/reference-server-lib/src/main/java/uk/nhs/fhir/servlet/UnhandledFhirOperationException.java
122eaf3557812613be961413ce7cd93fa805e951
[]
no_license
health-and-care-developer-network/fhir-reference-server
aaf8031d9f9e8ceda20a3b6a44f4e5fe5c7c02cd
62222fe88cfda8ad94c5eee192f027faa0c8ee97
refs/heads/master
2023-06-27T22:24:50.214861
2023-02-10T12:09:07
2023-02-10T12:09:07
81,573,386
4
1
null
2023-06-14T22:18:57
2017-02-10T14:34:19
Java
UTF-8
Java
false
false
245
java
package uk.nhs.fhir.servlet; @SuppressWarnings("serial") public class UnhandledFhirOperationException extends RuntimeException { public UnhandledFhirOperationException(String operation) { super("Unsupported operation: " + operation); } }
[ "jonathan.mew@xml-solutions.com" ]
jonathan.mew@xml-solutions.com
d2751e89fe1ff955250b71a7fb054ed9e85f9512
5ecd15baa833422572480fad3946e0e16a389000
/framework/Pipeline-Open/subsystems/pipeline/main/api/java/com/volantis/xml/pipeline/sax/cache/CacheEntry.java
7ce2cf2a6309344d05e1425b20ab1ebc1e1ce14c
[]
no_license
jabley/volmobserverce
4c5db36ef72c3bb7ef20fb81855e18e9b53823b9
6d760f27ac5917533eca6708f389ed9347c7016d
refs/heads/master
2021-01-01T05:31:21.902535
2009-02-04T02:29:06
2009-02-04T02:29:06
38,675,289
0
1
null
null
null
null
UTF-8
Java
false
false
3,778
java
/* This file is part of Volantis Mobility Server. Volantis Mobility Server is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Volantis Mobility Server is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Volantis Mobility Server.  If not, see <http://www.gnu.org/licenses/>. */ /* ---------------------------------------------------------------------------- * (c) Volantis Systems Ltd 2003. * ---------------------------------------------------------------------------- */ package com.volantis.xml.pipeline.sax.cache; /** * This class wraps entries into the cache. It also contains state * information as the entry can be marked as pending. This means that * the entry is not yet complete. */ public class CacheEntry { /** * The Object we wish to store in the cache. */ private Object cacheObject; /** * This flag determines whether the Object {@link #cacheObject} is in * a completed state. true if the Object is complete, otherwise false. */ private boolean pending = false; /** * Construct a new CacheEntry with the specified Object. This * CacheEntry will be in a non-pending state. * @param cacheObject - The Object that we wish to store in the cache. */ public CacheEntry(Object cacheObject) { this.cacheObject = cacheObject; } /** * Construct a new CacheEntry with the specified Object in the * specified pending state. * @param cacheObject - The Object that we wish to store in the cache. * @param pending - true if the Object is the cache is not in a * complete state, otherwise false. */ public CacheEntry(Object cacheObject, boolean pending) { this.cacheObject = cacheObject; this.pending = pending; } /** * Get the state of the stored Object. * @return true if the stored Object is in a pending (incomplete) * state, otherwise false. */ public boolean isPending() { return pending; } /** * Set the state of the stored Object. * @param pending - true to set the state to pending, otherwise false */ public void setPending(boolean pending) { this.pending = pending; } /** * Get the Object being cached. * @return The Object being cached. */ public Object getCacheObject() { return cacheObject; } /** * Set the object being cached. * @param object The object being cached. */ public void setCacheObject(Object object) { this.cacheObject = object; } } /* =========================================================================== Change History =========================================================================== $Log$ 20-Oct-04 5438/3 philws VBM:2004082706 Reformat production pipeline code 20-Oct-04 5438/1 philws VBM:2004082706 Transfer Pipeline source into MCS 04-Aug-03 294/1 allan VBM:2003070709 Fixed merge conflicts 31-Jul-03 217/3 allan VBM:2003071702 Fixed javadoc issue with contains and containsIdentity. 31-Jul-03 217/1 allan VBM:2003071702 Made HTTPMessageEntities into a set. 09-Jun-03 49/1 adrian VBM:2003060505 updated headers and cleaned up imports following changes required for addition of cacheBody elements =========================================================================== */
[ "iwilloug@b642a0b7-b348-0410-9912-e4a34d632523" ]
iwilloug@b642a0b7-b348-0410-9912-e4a34d632523
4a22371a04e01b8663b24a671258429ed4f90b78
e62a138aa251d3e14d9d536b9313858b178324bd
/app/src/main/java/com/guokm/tibetanroot/activity/UmengMsgActivity.java
2555fd246b6d07e32e148081fbc8ba2247a070ce
[ "Apache-2.0" ]
permissive
guokmTest/TibetanRoot
0be70b996e6252a6aaa1724e80962142fb193fc1
a51907ef31e2986aa6d11be22ea1c2268ec0fa05
refs/heads/master
2021-01-21T07:00:36.576373
2017-07-18T14:11:43
2017-07-18T14:11:43
91,592,439
0
0
null
null
null
null
UTF-8
Java
false
false
1,425
java
package com.guokm.tibetanroot.activity; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.View; import android.widget.Button; import android.widget.TextView; import com.guokm.tibetanroot.R; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; /** * Created by Administrator on 2017/6/18. */ public class UmengMsgActivity extends BaseActivity { @BindView(R.id.textView) TextView textView; @BindView(R.id.back_button) Button backButton; @BindView(R.id.title_text) TextView titleText; @BindView(R.id.freshtime_tv) TextView freshtimeTv; @BindView(R.id.search_button) Button searchButton; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_umeng_msg); ButterKnife.bind(this); initView(); } private void initView() { backButton.setVisibility(View.VISIBLE); freshtimeTv.setVisibility(View.GONE); searchButton.setVisibility(View.GONE); titleText.setText(getIntent().getStringExtra("custom")); textView.setText(getIntent().getStringExtra("custom")); } @Override protected void onDestroy() { super.onDestroy(); } @OnClick(R.id.back_button) public void onViewClicked() { finish(); } }
[ "598105852@qq.com" ]
598105852@qq.com
853ef7ea540f4a5f93824777249e3f050577504e
99c14585111f3c73a305242473b6e7a79a5743f8
/src/main/old/com/workasintended/chromaggus/unitcomponent/DevelopmentComponent.java
876cd7e7cb9d2a1196c45db066eeb5a411d031b9
[]
no_license
mazimeng/chromaggus
3a5fdb68108a6d50c5d8f1636519cd8752a9309e
912ae7fdf50d46dc7f312b812af4339b327a4c2a
refs/heads/master
2021-01-16T18:33:02.030430
2017-09-17T15:43:41
2017-09-17T15:43:41
100,087,622
0
0
null
null
null
null
UTF-8
Java
false
false
830
java
package com.workasintended.chromaggus.unitcomponent; import com.badlogic.gdx.scenes.scene2d.actions.SequenceAction; import com.workasintended.chromaggus.Unit; import com.workasintended.chromaggus.action.Develop; import com.workasintended.chromaggus.action.MoveToUnit; /** * Created by mazimeng on 1/17/16. */ public class DevelopmentComponent extends UnitComponent { public DevelopmentComponent(Unit self) { super(self); } @Override public void update(float delta) { } public void develop(Unit city) { if(city.city == null) return; Develop develop = new Develop(city); SequenceAction sequenceAction = new SequenceAction(new MoveToUnit(city, getSelf().getSpeed(), 32), develop); getSelf().clearActions(); getSelf().addAction(sequenceAction); } }
[ "mazm@unicc.com.cn" ]
mazm@unicc.com.cn
06980e6d4e83d38aeba96c7d7a58f6ac93ce756e
f7beee39f6f6df92173f28a8b663cea79ee5ebf4
/app/src/main/java/com/example/project_androidchat/General/AboutUserActivity.java
810d4d17e67c414ef2144fb81a943546d20f4305
[]
no_license
Victoria282/Project_AndroidChat
c39202706877d4490e4d8dfeadc3e17190282392
54df9b5c3b48aa19cb96193c19958c63a43fd27c
refs/heads/master
2023-05-06T13:49:53.599988
2021-05-31T15:41:52
2021-05-31T15:41:52
360,626,564
0
0
null
null
null
null
UTF-8
Java
false
false
406
java
package com.example.project_androidchat.General; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import com.example.project_androidchat.R; public class AboutUserActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about_user); } }
[ "vilkova_viktoria2000@mail.ru" ]
vilkova_viktoria2000@mail.ru
6cd1937c9e3bcdd640ed4c2b208779aa2687980c
5066ce35e578be8ab2305361509102cd1e29f29f
/app/src/main/java/com/android/example/spongebobcharacter/MainActivity.java
6248af5092f2ea852978e90d749feffbacbcfad7
[]
no_license
nmluthfi/SpongeBob-Squarepants-Characters
4d5b1940a7c24bce750f4282c450f96cf2cd022d
51568ee5db95136d93d2be7039da8cc8baa35aa3
refs/heads/master
2020-05-24T19:28:32.299730
2019-05-19T08:47:53
2019-05-19T08:47:53
187,435,579
0
0
null
null
null
null
UTF-8
Java
false
false
6,020
java
package com.android.example.spongebobcharacter; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Toast; import com.android.example.spongebobcharacter.Adapter.CardviewCharactersAdapter; import com.android.example.spongebobcharacter.Adapter.GridCharactersAdapter; import com.android.example.spongebobcharacter.Adapter.RowCharactersAdapter; import com.android.example.spongebobcharacter.Model.Characters; import com.android.example.spongebobcharacter.Data.CharactersData; import com.android.example.spongebobcharacter.Utils.ItemClickSupport; import java.util.ArrayList; public class MainActivity extends AppCompatActivity { private RecyclerView rvCategory; private ArrayList<Characters> mData = new ArrayList<>(); private String title = "Mode Row"; private final String STATE_TITLE = "state_string", STATE_LIST = "state_list" , STATE_MODE = "state_mode"; private int mode; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); rvCategory = findViewById(R.id.rv_spongebob_characters); rvCategory.setHasFixedSize(true); if (savedInstanceState == null) { setActionBarTitle("Mode List"); mData.addAll(CharactersData.getListData()); initRecyclerList(); mode = R.id.action_row; } else { String stateTitle = savedInstanceState.getString(STATE_TITLE); ArrayList<Characters> stateList = savedInstanceState.getParcelableArrayList(STATE_LIST); int stateMode = savedInstanceState.getInt(STATE_MODE); setActionBarTitle(stateTitle); mData.addAll(stateList); setMode(stateMode); } } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putString(STATE_TITLE, (String) getSupportActionBar().getTitle()); outState.putParcelableArrayList(STATE_LIST, mData); outState.putInt(STATE_MODE, mode); } private void initRecyclerList() { rvCategory.setLayoutManager(new LinearLayoutManager(this)); RowCharactersAdapter rowCharactersAdapter = new RowCharactersAdapter(this); rowCharactersAdapter.setmData(mData); rvCategory.setAdapter(rowCharactersAdapter); ItemClickSupport.addTo(rvCategory).setOnItemClickListener(new ItemClickSupport.OnItemClickListener() { @Override public void onItemClicked(RecyclerView recyclerView, int position, View v) { openDetailActivity(mData.get(position)); } }); } private void initRecycleGrid() { rvCategory.setLayoutManager(new GridLayoutManager(this, 2)); GridCharactersAdapter gridCharactersAdapter = new GridCharactersAdapter(this); gridCharactersAdapter.setmData(mData); rvCategory.setAdapter(gridCharactersAdapter); ItemClickSupport.addTo(rvCategory).setOnItemClickListener(new ItemClickSupport.OnItemClickListener() { @Override public void onItemClicked(RecyclerView recyclerView, int position, View v) { openDetailActivity(mData.get(position)); } }); } private void initRecycleCardview() { rvCategory.setLayoutManager(new LinearLayoutManager(this)); CardviewCharactersAdapter cardviewCharactersAdapter = new CardviewCharactersAdapter(this); cardviewCharactersAdapter.setmData(mData); rvCategory.setAdapter(cardviewCharactersAdapter); ItemClickSupport.addTo(rvCategory).setOnItemClickListener(new ItemClickSupport.OnItemClickListener() { @Override public void onItemClicked(RecyclerView recyclerView, int position, View v) { openDetailActivity(mData.get(position)); } }); } private void openDetailActivity(Characters characters) { Class destinationClass = DetailActivity.class; Context context = MainActivity.this; Intent openDetailActivity = new Intent(context, destinationClass); openDetailActivity.putExtra(DetailActivity.EXTRA_NAME, characters.getmNama()); openDetailActivity.putExtra(DetailActivity.EXTRA_DESCRIPTION, characters.getmDeskripsi()); openDetailActivity.putExtra(DetailActivity.EXTRA_VOICE_OVER, characters.getmPengisiSuara()); openDetailActivity.putExtra(DetailActivity.EXTRA_PHOTO, characters.getmFoto()); startActivity(openDetailActivity); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { int selectedMenu = item.getItemId(); setMode(selectedMenu); return super.onOptionsItemSelected(item); } private void setMode(int selectedMenu) { switch (selectedMenu) { case R.id.action_row: title = "Mode Row"; initRecyclerList(); break; case R.id.action_grid: title = "Mode Grid"; initRecycleGrid(); break; case R.id.action_card_View: title = "Mode Cardview"; initRecycleCardview(); break; } mode = selectedMenu; setActionBarTitle(title); } private void setActionBarTitle(String title) { if (getSupportActionBar() != null) { getSupportActionBar().setTitle(title); } } }
[ "luthfi2444@gmail.com" ]
luthfi2444@gmail.com
4706441b1067586c0cda8fd35c1b0cc9e458d3b5
1a03fb0ee836ed7dbfbca47a184add9a44c1adf4
/algorithm/src/main/java/review/dp/str/IsSubsequence.java
38d093ea96d22cc77878ba9471250451d70c6fd8
[]
no_license
15271944243/review2020
7a51cb6672cdd3e1f531fb73a455990eed52a803
3466bdd492968a356cb373de678c3f87c00de6e1
refs/heads/master
2023-06-26T12:02:52.503163
2022-10-27T09:32:18
2022-10-27T09:32:18
233,530,026
0
0
null
2021-04-12T02:48:18
2020-01-13T06:48:55
Java
UTF-8
Java
false
false
3,074
java
package review.dp.str; /** * https://leetcode.com/problems/is-subsequence/ No.392 判断子序列 * @author: xiaoxiaoxiang * @date: 2021/3/25 09:56 */ public class IsSubsequence { /** * Given two strings s and t, check if s is a subsequence of t. * * A subsequence of a string is a new string that is formed from the original string by * deleting some (can be none) of the characters without disturbing the relative positions * of the remaining characters. (i.e., "ace" is a subsequence of "abcde" while "aec" is not). * * Input: s = "abc", t = "ahbgdc" * Output: true * * Input: s = "axc", t = "ahbgdc" * Output: false * * 0 <= s.length <= 100 * 0 <= t.length <= 104 * s and t consist only of lowercase English letters. * * Follow up: If there are lots of incoming s, say s1, s2, ..., sk where k >= 109, * and you want to check one by one to see if t has its subsequence. * In this scenario, how would you change your code? */ /** * 题目意思: 给定字符串 s 和 t,判断 s 是否为 t 的子序列 * 字符串的一个子序列是原始字符串删除一些(也可以不删除)字符而不改变剩余字符相对位置形成的新字符串 * 例如,"ace"是"abcde"的一个子序列,而"aec"不是 * * 进阶: 如果有大量输入的 S,称作 S1, S2, ... , Sk 其中 k >= 10亿,你需要依次检查它们是否为 T 的子序列 * 在这种情况下,你会怎样改变代码? * * 思路一: 两重循环-遍历 时间复杂度O(n^2) * 思路二: 动态规划 * 1. 确定dp数组(dp table)以及下标的含义 * 2. 确定递推公式 * 3. dp数组如何初始化 * 4. 确定遍历顺序 * 5. 举例推导dp数组 */ public static void main(String[] args) { IsSubsequence demo = new IsSubsequence(); String s = "abc", t = "ahbgdc"; boolean result = demo.isSubsequence(s, t); System.out.println(result); } /** * 本题dp公式同 LongestCommonSubsequence No.1143 最长公共子序列 * @param s * @param t * @return */ public boolean isSubsequence(String s, String t) { int l1 = s == null || s.length() == 0 ? 1 : s.length() + 1; int l2 = t == null || t.length() == 0 ? 1 : t.length() + 1; if (l1 > l2) { return false; } int[][] dp = new int[l1][l2]; boolean result = false; f: for (int i = 1; i < l1; i++) { for (int j = 1; j < l2; j++) { if (dp[i][j] + 1 == l1) { result = true; break f; } if (s.charAt(i-1) == t.charAt(j-1)) { dp[i][j] = dp[i-1][j-1] + 1; } else { dp[i][j] = Math.max(dp[i-1][j], dp[i][j-1]); } } } if (!result && dp[l1-1][l2-1] + 1 == l1) { result = true; } return result; } }
[ "xiaoxiaoxiang@xhqb.com" ]
xiaoxiaoxiang@xhqb.com
1d030d6b60d18ec2ce41f8e1a3a31401e5a8dc1f
5b61c916007327ab88b7a504f7236d793124707a
/shared/src/main/java/com/blockwithme/util/shared/Preconditions.java
693805ff47441aff5a45222f54b4d4b899abf3ad
[ "Apache-2.0" ]
permissive
skunkiferous/Util
72bd3ca128c7454d2d37c77230d722f5ca6bd305
bac4bc1b9db6868cc093e6edccb600f7fc6c4d2b
refs/heads/master
2020-04-17T07:35:50.401020
2014-12-08T06:18:39
2014-12-08T06:18:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,359
java
/* * Copyright (C) 2014 Sebastien Diot. * * 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.blockwithme.util.shared; import java.util.Arrays; import java.util.Collection; import java.util.Iterator; import java.util.Map; /** * Some non-Xtend compatible validation code * * @author monster */ public class Preconditions { public static <T> T requireNonNull(final T obj, final Object name) { if (obj == null) throw new NullPointerException(String.valueOf(name)); return obj; } public static String requireNonEmpty(final String obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (obj.isEmpty()) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static boolean[] requireNonEmpty(final boolean[] obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (obj.length == 0) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static byte[] requireNonEmpty(final byte[] obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (obj.length == 0) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static short[] requireNonEmpty(final short[] obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (obj.length == 0) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static char[] requireNonEmpty(final char[] obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (obj.length == 0) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static int[] requireNonEmpty(final int[] obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (obj.length == 0) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static long[] requireNonEmpty(final long[] obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (obj.length == 0) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static float[] requireNonEmpty(final float[] obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (obj.length == 0) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static double[] requireNonEmpty(final double[] obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (obj.length == 0) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static <T> T[] requireNonEmpty(final T[] obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (obj.length == 0) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static <T extends Collection<?>> T requireNonEmpty(final T obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (obj.isEmpty()) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static <T extends Map<?, ?>> T requireNonEmpty(final T obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (obj.isEmpty()) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static <T extends Iterator<?>> T requireNonEmpty(final T obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } if (!obj.hasNext()) { throw new IllegalArgumentException("Empty: " + name); } return obj; } public static <T> T requireContains(final T obj, final T[] array, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } for (final T o : array) { if (o == obj) { return obj; } } throw new IllegalArgumentException("Unknown: " + name + " " + obj); } public static <T> T[] requireContainsNoNull(final T[] obj, final Object name) { if (obj == null) { throw new NullPointerException(String.valueOf(name)); } for (int i = 0; i < obj.length; i++) { final T o = obj[i]; if (o == null) { final String msg = name + "[" + i + "] ARRAY: " + Arrays.asList(obj); throw new NullPointerException(msg); } } return obj; } }
[ "s.diot@eurodata.de" ]
s.diot@eurodata.de
1eb8e2b0e0c6e735cf779a554f5903b569e0e3b2
edd603a64100a65a0b0e345bf12884036ba6c76a
/src/test/java/com/cooper/creator/builder/WeaponBuilderTest.java
f58fb6958fccc7f555cd68f47617862a0f433c2a
[]
no_license
JamesRCooper/PatternGame
2579d224215cf4b7c068566aeb28fd394f7b700a
0ca71092501277ceaa07d519dcb2c503f582ae94
refs/heads/master
2021-01-17T18:06:42.142364
2016-06-14T03:49:37
2016-06-14T03:49:37
58,567,219
2
1
null
2016-06-08T18:48:45
2016-05-11T17:44:09
Java
UTF-8
Java
false
false
2,845
java
/* * Copyright (C) 2016 by Amobee Inc. * All Rights Reserved. */ package com.cooper.creator.builder; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.Arrays; import org.junit.Assert; import org.junit.Test; import com.cooper.creator.data.WeaponDecoratorRepository; import com.cooper.creator.data.WeaponRepository; import com.cooper.creator.entities.WeaponDecoratorEntity; import com.cooper.creator.entities.WeaponEntity; import com.cooper.creator.entities.sub.Dice; import com.cooper.creator.entities.sub.WeaponCompositeEntity; import com.cooper.creator.enums.CarryableType; import com.cooper.creator.enums.DecoratorPlacement; import com.cooper.creator.enums.DieType; import com.cooper.creator.model.Weapon; public class WeaponBuilderTest { @Test public void testBuild() { WeaponBuilder builder = new WeaponBuilder( getMockWeaponRepo(), getMockWeaponDecoratorRepo()); Weapon weapon = builder.build(getMockWeaponComposite()); Assert.assertEquals( "before name after\n" + "hit: (4D6+4) 5D8+5 (6D10+6)\n" + "dmg: (1D0+1) 2D2+2 (3D4+3)", weapon.getIdentifier()); } private WeaponRepository getMockWeaponRepo() { WeaponRepository repo = mock(WeaponRepository.class); when(repo.findOne(anyString())).thenReturn(new WeaponEntity( "identity", CarryableType.WEAPON, "name", new Dice(2, 2, DieType.D2), new Dice(5, 5, DieType.D8) )); return repo; } private WeaponDecoratorRepository getMockWeaponDecoratorRepo() { WeaponDecoratorRepository repo = mock(WeaponDecoratorRepository.class); when(repo.findOne(eq("decor1"))).thenReturn(new WeaponDecoratorEntity( "decor identity", CarryableType.WEAPON_DECORATOR, "before", DecoratorPlacement.PREFIX, new Dice(1, 1, DieType.D0), new Dice(4, 4, DieType.D6))); when(repo.findOne(eq("decor2"))).thenReturn(new WeaponDecoratorEntity( "decor identity", CarryableType.WEAPON_DECORATOR, "after", DecoratorPlacement.POSTFIX, new Dice(3, 3, DieType.D4), new Dice(6, 6, DieType.D10))); return repo; } private WeaponCompositeEntity getMockWeaponComposite() { WeaponCompositeEntity entity = new WeaponCompositeEntity(); entity.setBaseIdentifier("identity"); entity.setDecorators(Arrays.asList("decor1", "decor2")); return entity; } }
[ "eedeusf@gmail.com" ]
eedeusf@gmail.com
c5eb7c24e486e4717d9546dab26bf304130f3b50
c9e72bd0b492950b8ad49286ba9b6c55bfb97b1a
/src/main/java/com/github/unishako/demo/api/users/UsersDto.java
9236dbd469edff2a70ceb07d7e71483e02717945
[]
no_license
unishako/springboot-doma-demo
ae50001b4ab19c2b364ff0ec83dbad1357da5471
26ce20d1ddd28fc80b56ac07a740cecf840b78c7
refs/heads/master
2020-12-14T06:36:41.036760
2020-04-03T23:42:20
2020-04-03T23:42:20
234,669,385
0
0
null
null
null
null
UTF-8
Java
false
false
271
java
package com.github.unishako.demo.api.users; import lombok.Data; import java.math.BigDecimal; @Data public class UsersDto { private BigDecimal id; private String password; private String name; private BigDecimal version; private String biko; }
[ "tmakn0822@icloud.com" ]
tmakn0822@icloud.com
7a8ac74140ea7352fa65eba83350fbb40575da95
48fdbac240675df7f5882cccf9318de2698290f8
/.svn/pristine/94/947a8e9874dce93a6e61261b5229d62f88281f40.svn-base
80ff2a0ab9f115bd26c9ef66dfccb6be0f992002
[]
no_license
RL-Edward/StockMachine_Project
d05ec9af432fe3c6db082373f4599daa94302310
0cf35a8eb9be8af43827b82ce132604902518a13
refs/heads/master
2020-06-26T00:49:50.523040
2017-07-12T11:25:34
2017-07-12T11:25:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,367
package ticker; import Ticker.TickerCalculator; import org.junit.Before; import org.junit.Test; import java.io.InputStream; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; public class TickerCalculatorTest { TickerCalculator ticker; @Before public void setUp() { ticker = new TickerCalculator(); } @Test public void testCanary() { assertTrue(true); } @Test public void TestTotalAssetCalculation() { assertEquals(1000.0, ticker.calculateValue(100.0, 10), .0001); } @Test public void testCalculateNetAssetValue() { List<Double> values = Arrays.asList(1.0, 2.0, 3.0, 4.0, 5.0); assertEquals(15, ticker.calculateNetAssestValue(values), .0001); } @Test public void TestComputeStockValuesAndNetAsset() { Function<String, Double> fakePrice = symbol -> 10.00; Map<String, Integer> shares = new HashMap<>(); shares.put("GOOG", 12); shares.put("AMZN", 10); shares.put("EBAY", 9); shares.put("MSFT", 8); Map<String, Double> checkhashmap = new HashMap<>(); checkhashmap.put("GOOG", 120.0); checkhashmap.put("AMZN", 100.0); checkhashmap.put("EBAY", 90.0); checkhashmap.put("MSFT", 80.0); checkhashmap.put("Net Asset", 390.0); assertEquals(checkhashmap, ticker.computeValueAndNet(shares, fakePrice)); } @Test public void TestInvalidStocksComputeValuesAndNetAsset() { Function<String, Double> invalidStockPrice = symbol -> 0.0; HashMap<String, Integer> shares = new HashMap<>(); shares.put("InvalidStock1", 12); shares.put("InvalidStock2", 10); shares.put("InvalidStock3", 9); shares.put("InvalidStock4", 8); HashMap<String, Double> checkhashmap = new HashMap<>(); checkhashmap.put("InvalidStock1", 0.0); checkhashmap.put("InvalidStock2", 0.0); checkhashmap.put("InvalidStock3", 0.0); checkhashmap.put("InvalidStock4", 0.0); checkhashmap.put("Net Asset", 0.0); assertEquals(checkhashmap, ticker.computeValueAndNet(shares, invalidStockPrice)); } }
[ "atf.edward@gmail.com" ]
atf.edward@gmail.com
002ef2ef3d00d9232ed2c257640d15b057256691
38c4451ab626dcdc101a11b18e248d33fd8a52e0
/identifiers/batik-1.7/sources/org/apache/batik/apps/svgbrowser/DOMDocumentTree.java
6b14f1cf15bf13342ac2e4f6d9ae2de87d2b610c
[]
no_license
habeascorpus/habeascorpus-data
47da7c08d0f357938c502bae030d5fb8f44f5e01
536d55729f3110aee058ad009bcba3e063b39450
refs/heads/master
2020-06-04T10:17:20.102451
2013-02-19T15:19:21
2013-02-19T15:19:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
41,216
java
org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false batik PACKAGE_IDENTIFIER false apps PACKAGE_IDENTIFIER false svgbrowser PACKAGE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false Component TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false Graphics TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false Insets TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false Point TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false Rectangle TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false datatransfer PACKAGE_IDENTIFIER false DataFlavor TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false datatransfer PACKAGE_IDENTIFIER false Transferable TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false datatransfer PACKAGE_IDENTIFIER false UnsupportedFlavorException TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false Autoscroll TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DnDConstants TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DragGestureEvent TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DragGestureListener TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DragGestureRecognizer TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DragSource TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DragSourceDragEvent TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DragSourceDropEvent TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DragSourceEvent TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DragSourceListener TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DropTarget TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DropTargetContext TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DropTargetDragEvent TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DropTargetDropEvent TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DropTargetEvent TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false dnd PACKAGE_IDENTIFIER false DropTargetListener TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false event PACKAGE_IDENTIFIER false ActionEvent TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false awt PACKAGE_IDENTIFIER false event PACKAGE_IDENTIFIER false ActionListener TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false io PACKAGE_IDENTIFIER false IOException TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false util PACKAGE_IDENTIFIER false ArrayList TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false util PACKAGE_IDENTIFIER false EventListener TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false util PACKAGE_IDENTIFIER false EventObject TYPE_IDENTIFIER false java PACKAGE_IDENTIFIER false util PACKAGE_IDENTIFIER false Iterator TYPE_IDENTIFIER false javax PACKAGE_IDENTIFIER false swing PACKAGE_IDENTIFIER false JPanel TYPE_IDENTIFIER false javax PACKAGE_IDENTIFIER false swing PACKAGE_IDENTIFIER false JRootPane TYPE_IDENTIFIER false javax PACKAGE_IDENTIFIER false swing PACKAGE_IDENTIFIER false JTree TYPE_IDENTIFIER false javax PACKAGE_IDENTIFIER false swing PACKAGE_IDENTIFIER false JViewport TYPE_IDENTIFIER false javax PACKAGE_IDENTIFIER false swing PACKAGE_IDENTIFIER false SwingUtilities TYPE_IDENTIFIER false javax PACKAGE_IDENTIFIER false swing PACKAGE_IDENTIFIER false Timer TYPE_IDENTIFIER false javax PACKAGE_IDENTIFIER false swing PACKAGE_IDENTIFIER false UIManager TYPE_IDENTIFIER false javax PACKAGE_IDENTIFIER false swing PACKAGE_IDENTIFIER false event PACKAGE_IDENTIFIER false EventListenerList TYPE_IDENTIFIER false javax PACKAGE_IDENTIFIER false swing PACKAGE_IDENTIFIER false tree PACKAGE_IDENTIFIER false DefaultMutableTreeNode TYPE_IDENTIFIER false javax PACKAGE_IDENTIFIER false swing PACKAGE_IDENTIFIER false tree PACKAGE_IDENTIFIER false TreeNode TYPE_IDENTIFIER false javax PACKAGE_IDENTIFIER false swing PACKAGE_IDENTIFIER false tree PACKAGE_IDENTIFIER false TreePath TYPE_IDENTIFIER false org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false batik PACKAGE_IDENTIFIER false dom PACKAGE_IDENTIFIER false util PACKAGE_IDENTIFIER false DOMUtilities TYPE_IDENTIFIER false org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false batik PACKAGE_IDENTIFIER false apps PACKAGE_IDENTIFIER false svgbrowser PACKAGE_IDENTIFIER false DOMViewer TYPE_IDENTIFIER false NodeInfo TYPE_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false dom PACKAGE_IDENTIFIER false Node TYPE_IDENTIFIER false DOMDocumentTree TYPE_IDENTIFIER true JTree TYPE_IDENTIFIER false Autoscroll TYPE_IDENTIFIER false EventListenerList TYPE_IDENTIFIER false eventListeners VARIABLE_IDENTIFIER true EventListenerList TYPE_IDENTIFIER false Insets TYPE_IDENTIFIER false autoscrollInsets VARIABLE_IDENTIFIER true Insets TYPE_IDENTIFIER false Insets TYPE_IDENTIFIER false scrollUnits VARIABLE_IDENTIFIER true Insets TYPE_IDENTIFIER false DOMDocumentTreeController TYPE_IDENTIFIER false controller VARIABLE_IDENTIFIER true DOMDocumentTree METHOD_IDENTIFIER false TreeNode TYPE_IDENTIFIER false root VARIABLE_IDENTIFIER true DOMDocumentTreeController TYPE_IDENTIFIER false controller VARIABLE_IDENTIFIER true root VARIABLE_IDENTIFIER false controller VARIABLE_IDENTIFIER false controller VARIABLE_IDENTIFIER false TreeDragSource TYPE_IDENTIFIER false DnDConstants TYPE_IDENTIFIER false ACTION_COPY_OR_MOVE VARIABLE_IDENTIFIER false DropTarget TYPE_IDENTIFIER false TreeDropTargetListener TYPE_IDENTIFIER false TreeDragSource TYPE_IDENTIFIER true DragSourceListener TYPE_IDENTIFIER false DragGestureListener TYPE_IDENTIFIER false DragSource TYPE_IDENTIFIER false source VARIABLE_IDENTIFIER true DragGestureRecognizer TYPE_IDENTIFIER false recognizer VARIABLE_IDENTIFIER true TransferableTreeNode TYPE_IDENTIFIER false transferable VARIABLE_IDENTIFIER true DOMDocumentTree TYPE_IDENTIFIER false sourceTree VARIABLE_IDENTIFIER true TreeDragSource METHOD_IDENTIFIER false DOMDocumentTree TYPE_IDENTIFIER false tree VARIABLE_IDENTIFIER true actions VARIABLE_IDENTIFIER true sourceTree VARIABLE_IDENTIFIER false tree VARIABLE_IDENTIFIER false source VARIABLE_IDENTIFIER false DragSource TYPE_IDENTIFIER false recognizer VARIABLE_IDENTIFIER false source VARIABLE_IDENTIFIER false createDefaultDragGestureRecognizer METHOD_IDENTIFIER false sourceTree VARIABLE_IDENTIFIER false actions VARIABLE_IDENTIFIER false dragGestureRecognized METHOD_IDENTIFIER true DragGestureEvent TYPE_IDENTIFIER false dge VARIABLE_IDENTIFIER true controller VARIABLE_IDENTIFIER false isDNDSupported METHOD_IDENTIFIER false TreePath TYPE_IDENTIFIER false paths VARIABLE_IDENTIFIER true sourceTree VARIABLE_IDENTIFIER false getSelectionPaths METHOD_IDENTIFIER false paths VARIABLE_IDENTIFIER false ArrayList TYPE_IDENTIFIER false nodeList VARIABLE_IDENTIFIER true ArrayList TYPE_IDENTIFIER false i VARIABLE_IDENTIFIER true i VARIABLE_IDENTIFIER false paths VARIABLE_IDENTIFIER false length VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false TreePath TYPE_IDENTIFIER false path VARIABLE_IDENTIFIER true paths VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false path VARIABLE_IDENTIFIER false getPathCount METHOD_IDENTIFIER false DefaultMutableTreeNode TYPE_IDENTIFIER false node VARIABLE_IDENTIFIER true DefaultMutableTreeNode TYPE_IDENTIFIER false path VARIABLE_IDENTIFIER false getLastPathComponent METHOD_IDENTIFIER false Node TYPE_IDENTIFIER false associatedNode VARIABLE_IDENTIFIER true getDomNodeFromTreeNode METHOD_IDENTIFIER false node VARIABLE_IDENTIFIER false associatedNode VARIABLE_IDENTIFIER false nodeList VARIABLE_IDENTIFIER false add METHOD_IDENTIFIER false associatedNode VARIABLE_IDENTIFIER false nodeList VARIABLE_IDENTIFIER false isEmpty METHOD_IDENTIFIER false transferable VARIABLE_IDENTIFIER false TransferableTreeNode TYPE_IDENTIFIER false TransferData TYPE_IDENTIFIER false nodeList VARIABLE_IDENTIFIER false source VARIABLE_IDENTIFIER false startDrag METHOD_IDENTIFIER false dge VARIABLE_IDENTIFIER false transferable VARIABLE_IDENTIFIER false dragEnter METHOD_IDENTIFIER true DragSourceDragEvent TYPE_IDENTIFIER false dsde VARIABLE_IDENTIFIER true dragExit METHOD_IDENTIFIER true DragSourceEvent TYPE_IDENTIFIER false dse VARIABLE_IDENTIFIER true dragOver METHOD_IDENTIFIER true DragSourceDragEvent TYPE_IDENTIFIER false dsde VARIABLE_IDENTIFIER true dropActionChanged METHOD_IDENTIFIER true DragSourceDragEvent TYPE_IDENTIFIER false dsde VARIABLE_IDENTIFIER true dragDropEnd METHOD_IDENTIFIER true DragSourceDropEvent TYPE_IDENTIFIER false dsde VARIABLE_IDENTIFIER true TreeDropTargetListener TYPE_IDENTIFIER true DropTargetListener TYPE_IDENTIFIER false BEFORE VARIABLE_IDENTIFIER true AFTER VARIABLE_IDENTIFIER true CURRENT VARIABLE_IDENTIFIER true TransferData TYPE_IDENTIFIER false transferData VARIABLE_IDENTIFIER true Component TYPE_IDENTIFIER false originalGlassPane VARIABLE_IDENTIFIER true visualTipOffset VARIABLE_IDENTIFIER true visualTipThickness VARIABLE_IDENTIFIER true positionIndicator VARIABLE_IDENTIFIER true Point TYPE_IDENTIFIER false startPoint VARIABLE_IDENTIFIER true Point TYPE_IDENTIFIER false endPoint VARIABLE_IDENTIFIER true JPanel TYPE_IDENTIFIER false visualTipGlassPane VARIABLE_IDENTIFIER true JPanel TYPE_IDENTIFIER false paint METHOD_IDENTIFIER true Graphics TYPE_IDENTIFIER false g VARIABLE_IDENTIFIER true g VARIABLE_IDENTIFIER false setColor METHOD_IDENTIFIER false UIManager TYPE_IDENTIFIER false getColor METHOD_IDENTIFIER false startPoint VARIABLE_IDENTIFIER false endPoint VARIABLE_IDENTIFIER false x1 VARIABLE_IDENTIFIER true startPoint VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false x2 VARIABLE_IDENTIFIER true endPoint VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false y1 VARIABLE_IDENTIFIER true startPoint VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false start VARIABLE_IDENTIFIER true visualTipThickness VARIABLE_IDENTIFIER false start VARIABLE_IDENTIFIER false visualTipThickness VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER true start VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false visualTipThickness VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false g VARIABLE_IDENTIFIER false drawLine METHOD_IDENTIFIER false x1 VARIABLE_IDENTIFIER false y1 VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false x2 VARIABLE_IDENTIFIER false y1 VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false Timer TYPE_IDENTIFIER false expandControlTimer VARIABLE_IDENTIFIER true expandTimeout VARIABLE_IDENTIFIER true TreePath TYPE_IDENTIFIER false dragOverTreePath VARIABLE_IDENTIFIER true TreePath TYPE_IDENTIFIER false treePathToExpand VARIABLE_IDENTIFIER true TreeDropTargetListener METHOD_IDENTIFIER false DOMDocumentTree TYPE_IDENTIFIER false tree VARIABLE_IDENTIFIER true addOnAutoscrollListener METHOD_IDENTIFIER false tree VARIABLE_IDENTIFIER false dragEnter METHOD_IDENTIFIER true DropTargetDragEvent TYPE_IDENTIFIER false dtde VARIABLE_IDENTIFIER true JTree TYPE_IDENTIFIER false tree VARIABLE_IDENTIFIER true JTree TYPE_IDENTIFIER false dtde VARIABLE_IDENTIFIER false getDropTargetContext METHOD_IDENTIFIER false getComponent METHOD_IDENTIFIER false JRootPane TYPE_IDENTIFIER false rootPane VARIABLE_IDENTIFIER true tree VARIABLE_IDENTIFIER false getRootPane METHOD_IDENTIFIER false originalGlassPane VARIABLE_IDENTIFIER false rootPane VARIABLE_IDENTIFIER false getGlassPane METHOD_IDENTIFIER false rootPane VARIABLE_IDENTIFIER false setGlassPane METHOD_IDENTIFIER false visualTipGlassPane VARIABLE_IDENTIFIER false visualTipGlassPane VARIABLE_IDENTIFIER false setOpaque METHOD_IDENTIFIER false visualTipGlassPane VARIABLE_IDENTIFIER false setVisible METHOD_IDENTIFIER false updateVisualTipLine METHOD_IDENTIFIER false tree VARIABLE_IDENTIFIER false Transferable TYPE_IDENTIFIER false transferable VARIABLE_IDENTIFIER true DropTargetDropEvent TYPE_IDENTIFIER false dtde VARIABLE_IDENTIFIER false getDropTargetContext METHOD_IDENTIFIER false dtde VARIABLE_IDENTIFIER false getLocation METHOD_IDENTIFIER false getTransferable METHOD_IDENTIFIER false DataFlavor TYPE_IDENTIFIER false flavors VARIABLE_IDENTIFIER true transferable VARIABLE_IDENTIFIER false getTransferDataFlavors METHOD_IDENTIFIER false i VARIABLE_IDENTIFIER true i VARIABLE_IDENTIFIER false flavors VARIABLE_IDENTIFIER false length VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false transferable VARIABLE_IDENTIFIER false isDataFlavorSupported METHOD_IDENTIFIER false flavors VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false transferData VARIABLE_IDENTIFIER false TransferData TYPE_IDENTIFIER false transferable VARIABLE_IDENTIFIER false getTransferData METHOD_IDENTIFIER false flavors VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false UnsupportedFlavorException TYPE_IDENTIFIER false e VARIABLE_IDENTIFIER true e VARIABLE_IDENTIFIER false printStackTrace METHOD_IDENTIFIER false IOException TYPE_IDENTIFIER false e VARIABLE_IDENTIFIER true e VARIABLE_IDENTIFIER false printStackTrace METHOD_IDENTIFIER false dragOver METHOD_IDENTIFIER true DropTargetDragEvent TYPE_IDENTIFIER false dtde VARIABLE_IDENTIFIER true JTree TYPE_IDENTIFIER false tree VARIABLE_IDENTIFIER true JTree TYPE_IDENTIFIER false dtde VARIABLE_IDENTIFIER false getDropTargetContext METHOD_IDENTIFIER false getComponent METHOD_IDENTIFIER false TreeNode TYPE_IDENTIFIER false targetTreeNode VARIABLE_IDENTIFIER true getNode METHOD_IDENTIFIER false dtde VARIABLE_IDENTIFIER false targetTreeNode VARIABLE_IDENTIFIER false updatePositionIndicator METHOD_IDENTIFIER false dtde VARIABLE_IDENTIFIER false Point TYPE_IDENTIFIER false p VARIABLE_IDENTIFIER true dtde VARIABLE_IDENTIFIER false getLocation METHOD_IDENTIFIER false TreePath TYPE_IDENTIFIER false currentPath VARIABLE_IDENTIFIER true tree VARIABLE_IDENTIFIER false getPathForLocation METHOD_IDENTIFIER false p VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false p VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false TreePath TYPE_IDENTIFIER false parentPath VARIABLE_IDENTIFIER true getParentPathForPosition METHOD_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false TreeNode TYPE_IDENTIFIER false parentNode VARIABLE_IDENTIFIER true getNodeForPath METHOD_IDENTIFIER false parentPath VARIABLE_IDENTIFIER false TreePath TYPE_IDENTIFIER false nextSiblingPath VARIABLE_IDENTIFIER true getSiblingPathForPosition METHOD_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false TreeNode TYPE_IDENTIFIER false nextSiblingNode VARIABLE_IDENTIFIER true getNodeForPath METHOD_IDENTIFIER false nextSiblingPath VARIABLE_IDENTIFIER false Node TYPE_IDENTIFIER false potentialParent VARIABLE_IDENTIFIER true getDomNodeFromTreeNode METHOD_IDENTIFIER false DefaultMutableTreeNode TYPE_IDENTIFIER false parentNode VARIABLE_IDENTIFIER false Node TYPE_IDENTIFIER false potentialSibling VARIABLE_IDENTIFIER true getDomNodeFromTreeNode METHOD_IDENTIFIER false DefaultMutableTreeNode TYPE_IDENTIFIER false nextSiblingNode VARIABLE_IDENTIFIER false DOMUtilities TYPE_IDENTIFIER false canAppendAny METHOD_IDENTIFIER false transferData VARIABLE_IDENTIFIER false getNodeList METHOD_IDENTIFIER false potentialParent VARIABLE_IDENTIFIER false transferData VARIABLE_IDENTIFIER false getNodeList METHOD_IDENTIFIER false contains METHOD_IDENTIFIER false potentialSibling VARIABLE_IDENTIFIER false dtde VARIABLE_IDENTIFIER false acceptDrag METHOD_IDENTIFIER false dtde VARIABLE_IDENTIFIER false getDropAction METHOD_IDENTIFIER false updateVisualTipLine METHOD_IDENTIFIER false tree VARIABLE_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false dragOverTreePath VARIABLE_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false tree VARIABLE_IDENTIFIER false isExpanded METHOD_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false scheduleExpand METHOD_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false tree VARIABLE_IDENTIFIER false dtde VARIABLE_IDENTIFIER false rejectDrag METHOD_IDENTIFIER false dtde VARIABLE_IDENTIFIER false rejectDrag METHOD_IDENTIFIER false dropActionChanged METHOD_IDENTIFIER true DropTargetDragEvent TYPE_IDENTIFIER false dtde VARIABLE_IDENTIFIER true drop METHOD_IDENTIFIER true DropTargetDropEvent TYPE_IDENTIFIER false dtde VARIABLE_IDENTIFIER true Point TYPE_IDENTIFIER false p VARIABLE_IDENTIFIER true dtde VARIABLE_IDENTIFIER false getLocation METHOD_IDENTIFIER false DropTargetContext TYPE_IDENTIFIER false dtc VARIABLE_IDENTIFIER true dtde VARIABLE_IDENTIFIER false getDropTargetContext METHOD_IDENTIFIER false JTree TYPE_IDENTIFIER false tree VARIABLE_IDENTIFIER true JTree TYPE_IDENTIFIER false dtc VARIABLE_IDENTIFIER false getComponent METHOD_IDENTIFIER false setOriginalGlassPane METHOD_IDENTIFIER false tree VARIABLE_IDENTIFIER false dragOverTreePath VARIABLE_IDENTIFIER false TreePath TYPE_IDENTIFIER false currentPath VARIABLE_IDENTIFIER true tree VARIABLE_IDENTIFIER false getPathForLocation METHOD_IDENTIFIER false p VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false p VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false DefaultMutableTreeNode TYPE_IDENTIFIER false parent VARIABLE_IDENTIFIER true DefaultMutableTreeNode TYPE_IDENTIFIER false getNodeForPath METHOD_IDENTIFIER false getParentPathForPosition METHOD_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false Node TYPE_IDENTIFIER false dropTargetNode VARIABLE_IDENTIFIER true getDomNodeFromTreeNode METHOD_IDENTIFIER false parent VARIABLE_IDENTIFIER false DefaultMutableTreeNode TYPE_IDENTIFIER false sibling VARIABLE_IDENTIFIER true DefaultMutableTreeNode TYPE_IDENTIFIER false getNodeForPath METHOD_IDENTIFIER false getSiblingPathForPosition METHOD_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false Node TYPE_IDENTIFIER false siblingNode VARIABLE_IDENTIFIER true getDomNodeFromTreeNode METHOD_IDENTIFIER false sibling VARIABLE_IDENTIFIER false transferData VARIABLE_IDENTIFIER false ArrayList TYPE_IDENTIFIER false nodelist VARIABLE_IDENTIFIER true getNodeListForParent METHOD_IDENTIFIER false transferData VARIABLE_IDENTIFIER false getNodeList METHOD_IDENTIFIER false dropTargetNode VARIABLE_IDENTIFIER false fireDropCompleted METHOD_IDENTIFIER false DOMDocumentTreeEvent TYPE_IDENTIFIER false DropCompletedInfo TYPE_IDENTIFIER false dropTargetNode VARIABLE_IDENTIFIER false siblingNode VARIABLE_IDENTIFIER false nodelist VARIABLE_IDENTIFIER false dtde VARIABLE_IDENTIFIER false dropComplete METHOD_IDENTIFIER false dtde VARIABLE_IDENTIFIER false rejectDrop METHOD_IDENTIFIER false dragExit METHOD_IDENTIFIER true DropTargetEvent TYPE_IDENTIFIER false dte VARIABLE_IDENTIFIER true setOriginalGlassPane METHOD_IDENTIFIER false JTree TYPE_IDENTIFIER false dte VARIABLE_IDENTIFIER false getDropTargetContext METHOD_IDENTIFIER false getComponent METHOD_IDENTIFIER false dragOverTreePath VARIABLE_IDENTIFIER false updatePositionIndicator METHOD_IDENTIFIER true DropTargetDragEvent TYPE_IDENTIFIER false dtde VARIABLE_IDENTIFIER true Point TYPE_IDENTIFIER false p VARIABLE_IDENTIFIER true dtde VARIABLE_IDENTIFIER false getLocation METHOD_IDENTIFIER false DropTargetContext TYPE_IDENTIFIER false dtc VARIABLE_IDENTIFIER true dtde VARIABLE_IDENTIFIER false getDropTargetContext METHOD_IDENTIFIER false JTree TYPE_IDENTIFIER false tree VARIABLE_IDENTIFIER true JTree TYPE_IDENTIFIER false dtc VARIABLE_IDENTIFIER false getComponent METHOD_IDENTIFIER false TreePath TYPE_IDENTIFIER false currentPath VARIABLE_IDENTIFIER true tree VARIABLE_IDENTIFIER false getPathForLocation METHOD_IDENTIFIER false p VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false p VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false Rectangle TYPE_IDENTIFIER false bounds VARIABLE_IDENTIFIER true tree VARIABLE_IDENTIFIER false getPathBounds METHOD_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false p VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false bounds VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false visualTipOffset VARIABLE_IDENTIFIER false positionIndicator VARIABLE_IDENTIFIER false BEFORE VARIABLE_IDENTIFIER false p VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false bounds VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false bounds VARIABLE_IDENTIFIER false height VARIABLE_IDENTIFIER false visualTipOffset VARIABLE_IDENTIFIER false positionIndicator VARIABLE_IDENTIFIER false AFTER VARIABLE_IDENTIFIER false positionIndicator VARIABLE_IDENTIFIER false CURRENT VARIABLE_IDENTIFIER false TreePath TYPE_IDENTIFIER false getParentPathForPosition METHOD_IDENTIFIER true TreePath TYPE_IDENTIFIER false currentPath VARIABLE_IDENTIFIER true currentPath VARIABLE_IDENTIFIER false TreePath TYPE_IDENTIFIER false parentPath VARIABLE_IDENTIFIER true positionIndicator VARIABLE_IDENTIFIER false AFTER VARIABLE_IDENTIFIER false parentPath VARIABLE_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false getParentPath METHOD_IDENTIFIER false positionIndicator VARIABLE_IDENTIFIER false BEFORE VARIABLE_IDENTIFIER false parentPath VARIABLE_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false getParentPath METHOD_IDENTIFIER false positionIndicator VARIABLE_IDENTIFIER false CURRENT VARIABLE_IDENTIFIER false parentPath VARIABLE_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false parentPath VARIABLE_IDENTIFIER false TreePath TYPE_IDENTIFIER false getSiblingPathForPosition METHOD_IDENTIFIER true TreePath TYPE_IDENTIFIER false currentPath VARIABLE_IDENTIFIER true TreePath TYPE_IDENTIFIER false parentPath VARIABLE_IDENTIFIER true getParentPathForPosition METHOD_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false TreePath TYPE_IDENTIFIER false nextSiblingPath VARIABLE_IDENTIFIER true positionIndicator VARIABLE_IDENTIFIER false AFTER VARIABLE_IDENTIFIER false TreeNode TYPE_IDENTIFIER false parentNode VARIABLE_IDENTIFIER true getNodeForPath METHOD_IDENTIFIER false parentPath VARIABLE_IDENTIFIER false TreeNode TYPE_IDENTIFIER false currentNode VARIABLE_IDENTIFIER true getNodeForPath METHOD_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false parentPath VARIABLE_IDENTIFIER false parentNode VARIABLE_IDENTIFIER false currentNode VARIABLE_IDENTIFIER false siblingIndex VARIABLE_IDENTIFIER true parentNode VARIABLE_IDENTIFIER false getIndex METHOD_IDENTIFIER false currentNode VARIABLE_IDENTIFIER false parentNode VARIABLE_IDENTIFIER false getChildCount METHOD_IDENTIFIER false siblingIndex VARIABLE_IDENTIFIER false nextSiblingPath VARIABLE_IDENTIFIER false parentPath VARIABLE_IDENTIFIER false pathByAddingChild METHOD_IDENTIFIER false parentNode VARIABLE_IDENTIFIER false getChildAt METHOD_IDENTIFIER false siblingIndex VARIABLE_IDENTIFIER false positionIndicator VARIABLE_IDENTIFIER false BEFORE VARIABLE_IDENTIFIER false nextSiblingPath VARIABLE_IDENTIFIER false currentPath VARIABLE_IDENTIFIER false positionIndicator VARIABLE_IDENTIFIER false CURRENT VARIABLE_IDENTIFIER false nextSiblingPath VARIABLE_IDENTIFIER false nextSiblingPath VARIABLE_IDENTIFIER false TreeNode TYPE_IDENTIFIER false getNodeForPath METHOD_IDENTIFIER true TreePath TYPE_IDENTIFIER false path VARIABLE_IDENTIFIER true path VARIABLE_IDENTIFIER false path VARIABLE_IDENTIFIER false getLastPathComponent METHOD_IDENTIFIER false TreeNode TYPE_IDENTIFIER false path VARIABLE_IDENTIFIER false getLastPathComponent METHOD_IDENTIFIER false TreeNode TYPE_IDENTIFIER false getNode METHOD_IDENTIFIER true DropTargetDragEvent TYPE_IDENTIFIER false dtde VARIABLE_IDENTIFIER true Point TYPE_IDENTIFIER false p VARIABLE_IDENTIFIER true dtde VARIABLE_IDENTIFIER false getLocation METHOD_IDENTIFIER false DropTargetContext TYPE_IDENTIFIER false dtc VARIABLE_IDENTIFIER true dtde VARIABLE_IDENTIFIER false getDropTargetContext METHOD_IDENTIFIER false JTree TYPE_IDENTIFIER false tree VARIABLE_IDENTIFIER true JTree TYPE_IDENTIFIER false dtc VARIABLE_IDENTIFIER false getComponent METHOD_IDENTIFIER false TreePath TYPE_IDENTIFIER false path VARIABLE_IDENTIFIER true tree VARIABLE_IDENTIFIER false getPathForLocation METHOD_IDENTIFIER false p VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false p VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false path VARIABLE_IDENTIFIER false path VARIABLE_IDENTIFIER false getLastPathComponent METHOD_IDENTIFIER false TreeNode TYPE_IDENTIFIER false path VARIABLE_IDENTIFIER false getLastPathComponent METHOD_IDENTIFIER false updateVisualTipLine METHOD_IDENTIFIER true JTree TYPE_IDENTIFIER false tree VARIABLE_IDENTIFIER true TreePath TYPE_IDENTIFIER false path VARIABLE_IDENTIFIER true path VARIABLE_IDENTIFIER false startPoint VARIABLE_IDENTIFIER false endPoint VARIABLE_IDENTIFIER false Rectangle TYPE_IDENTIFIER false bounds VARIABLE_IDENTIFIER true tree VARIABLE_IDENTIFIER false getPathBounds METHOD_IDENTIFIER false path VARIABLE_IDENTIFIER false positionIndicator VARIABLE_IDENTIFIER false BEFORE VARIABLE_IDENTIFIER false startPoint VARIABLE_IDENTIFIER false bounds VARIABLE_IDENTIFIER false getLocation METHOD_IDENTIFIER false endPoint VARIABLE_IDENTIFIER false Point TYPE_IDENTIFIER false startPoint VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false bounds VARIABLE_IDENTIFIER false width VARIABLE_IDENTIFIER false startPoint VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false positionIndicator VARIABLE_IDENTIFIER false AFTER VARIABLE_IDENTIFIER false startPoint VARIABLE_IDENTIFIER false Point TYPE_IDENTIFIER false bounds VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false bounds VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false bounds VARIABLE_IDENTIFIER false height VARIABLE_IDENTIFIER false endPoint VARIABLE_IDENTIFIER false Point TYPE_IDENTIFIER false startPoint VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false bounds VARIABLE_IDENTIFIER false width VARIABLE_IDENTIFIER false startPoint VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false positionIndicator VARIABLE_IDENTIFIER false AFTER VARIABLE_IDENTIFIER false positionIndicator VARIABLE_IDENTIFIER false CURRENT VARIABLE_IDENTIFIER false startPoint VARIABLE_IDENTIFIER false endPoint VARIABLE_IDENTIFIER false startPoint VARIABLE_IDENTIFIER false endPoint VARIABLE_IDENTIFIER false startPoint VARIABLE_IDENTIFIER false SwingUtilities TYPE_IDENTIFIER false convertPoint METHOD_IDENTIFIER false tree VARIABLE_IDENTIFIER false startPoint VARIABLE_IDENTIFIER false visualTipGlassPane VARIABLE_IDENTIFIER false endPoint VARIABLE_IDENTIFIER false SwingUtilities TYPE_IDENTIFIER false convertPoint METHOD_IDENTIFIER false tree VARIABLE_IDENTIFIER false endPoint VARIABLE_IDENTIFIER false visualTipGlassPane VARIABLE_IDENTIFIER false visualTipGlassPane VARIABLE_IDENTIFIER false getRootPane METHOD_IDENTIFIER false repaint METHOD_IDENTIFIER false addOnAutoscrollListener METHOD_IDENTIFIER true DOMDocumentTree TYPE_IDENTIFIER false tree VARIABLE_IDENTIFIER true tree VARIABLE_IDENTIFIER false addListener METHOD_IDENTIFIER false DOMDocumentTreeAdapter TYPE_IDENTIFIER false onAutoscroll METHOD_IDENTIFIER true DOMDocumentTreeEvent TYPE_IDENTIFIER false event VARIABLE_IDENTIFIER true startPoint VARIABLE_IDENTIFIER false endPoint VARIABLE_IDENTIFIER false setOriginalGlassPane METHOD_IDENTIFIER true JTree TYPE_IDENTIFIER false tree VARIABLE_IDENTIFIER true JRootPane TYPE_IDENTIFIER false rootPane VARIABLE_IDENTIFIER true tree VARIABLE_IDENTIFIER false getRootPane METHOD_IDENTIFIER false rootPane VARIABLE_IDENTIFIER false setGlassPane METHOD_IDENTIFIER false originalGlassPane VARIABLE_IDENTIFIER false originalGlassPane VARIABLE_IDENTIFIER false setVisible METHOD_IDENTIFIER false rootPane VARIABLE_IDENTIFIER false repaint METHOD_IDENTIFIER false scheduleExpand METHOD_IDENTIFIER true TreePath TYPE_IDENTIFIER false treePath VARIABLE_IDENTIFIER true JTree TYPE_IDENTIFIER false tree VARIABLE_IDENTIFIER true treePath VARIABLE_IDENTIFIER false treePathToExpand VARIABLE_IDENTIFIER false getExpandTreeTimer METHOD_IDENTIFIER false tree VARIABLE_IDENTIFIER false stop METHOD_IDENTIFIER false treePathToExpand VARIABLE_IDENTIFIER false treePath VARIABLE_IDENTIFIER false getExpandTreeTimer METHOD_IDENTIFIER false tree VARIABLE_IDENTIFIER false start METHOD_IDENTIFIER false Timer TYPE_IDENTIFIER false getExpandTreeTimer METHOD_IDENTIFIER true JTree TYPE_IDENTIFIER false tree VARIABLE_IDENTIFIER true expandControlTimer VARIABLE_IDENTIFIER false expandControlTimer VARIABLE_IDENTIFIER false Timer TYPE_IDENTIFIER false expandTimeout VARIABLE_IDENTIFIER false ActionListener TYPE_IDENTIFIER false actionPerformed METHOD_IDENTIFIER true ActionEvent TYPE_IDENTIFIER false arg0 VARIABLE_IDENTIFIER true treePathToExpand VARIABLE_IDENTIFIER false treePathToExpand VARIABLE_IDENTIFIER false dragOverTreePath VARIABLE_IDENTIFIER false tree VARIABLE_IDENTIFIER false expandPath METHOD_IDENTIFIER false treePathToExpand VARIABLE_IDENTIFIER false getExpandTreeTimer METHOD_IDENTIFIER false tree VARIABLE_IDENTIFIER false stop METHOD_IDENTIFIER false expandControlTimer VARIABLE_IDENTIFIER false TransferableTreeNode TYPE_IDENTIFIER true Transferable TYPE_IDENTIFIER false DataFlavor TYPE_IDENTIFIER false NODE_FLAVOR VARIABLE_IDENTIFIER true DataFlavor TYPE_IDENTIFIER false TransferData TYPE_IDENTIFIER false DataFlavor TYPE_IDENTIFIER false FLAVORS VARIABLE_IDENTIFIER true DataFlavor TYPE_IDENTIFIER false NODE_FLAVOR VARIABLE_IDENTIFIER false DataFlavor TYPE_IDENTIFIER false stringFlavor VARIABLE_IDENTIFIER false TransferData TYPE_IDENTIFIER false data VARIABLE_IDENTIFIER true TransferableTreeNode METHOD_IDENTIFIER false TransferData TYPE_IDENTIFIER false data VARIABLE_IDENTIFIER true data VARIABLE_IDENTIFIER false data VARIABLE_IDENTIFIER false DataFlavor TYPE_IDENTIFIER false getTransferDataFlavors METHOD_IDENTIFIER true FLAVORS VARIABLE_IDENTIFIER false isDataFlavorSupported METHOD_IDENTIFIER true DataFlavor TYPE_IDENTIFIER false flavor VARIABLE_IDENTIFIER true i VARIABLE_IDENTIFIER true i VARIABLE_IDENTIFIER false FLAVORS VARIABLE_IDENTIFIER false length VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false flavor VARIABLE_IDENTIFIER false equals METHOD_IDENTIFIER false FLAVORS VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false Object TYPE_IDENTIFIER false getTransferData METHOD_IDENTIFIER true DataFlavor TYPE_IDENTIFIER false flavor VARIABLE_IDENTIFIER true isDataFlavorSupported METHOD_IDENTIFIER false flavor VARIABLE_IDENTIFIER false flavor VARIABLE_IDENTIFIER false equals METHOD_IDENTIFIER false NODE_FLAVOR VARIABLE_IDENTIFIER false data VARIABLE_IDENTIFIER false flavor VARIABLE_IDENTIFIER false equals METHOD_IDENTIFIER false DataFlavor TYPE_IDENTIFIER false stringFlavor VARIABLE_IDENTIFIER false data VARIABLE_IDENTIFIER false getNodesAsXML METHOD_IDENTIFIER false TransferData TYPE_IDENTIFIER true ArrayList TYPE_IDENTIFIER false nodeList VARIABLE_IDENTIFIER true TransferData METHOD_IDENTIFIER false ArrayList TYPE_IDENTIFIER false nodeList VARIABLE_IDENTIFIER true nodeList VARIABLE_IDENTIFIER false nodeList VARIABLE_IDENTIFIER false ArrayList TYPE_IDENTIFIER false getNodeList METHOD_IDENTIFIER true nodeList VARIABLE_IDENTIFIER false String TYPE_IDENTIFIER false getNodesAsXML METHOD_IDENTIFIER true String TYPE_IDENTIFIER false toReturn VARIABLE_IDENTIFIER true Iterator TYPE_IDENTIFIER false iterator VARIABLE_IDENTIFIER true nodeList VARIABLE_IDENTIFIER false iterator METHOD_IDENTIFIER false iterator VARIABLE_IDENTIFIER false hasNext METHOD_IDENTIFIER false Node TYPE_IDENTIFIER false node VARIABLE_IDENTIFIER true Node TYPE_IDENTIFIER false iterator VARIABLE_IDENTIFIER false next METHOD_IDENTIFIER false toReturn VARIABLE_IDENTIFIER false DOMUtilities TYPE_IDENTIFIER false getXML METHOD_IDENTIFIER false node VARIABLE_IDENTIFIER false toReturn VARIABLE_IDENTIFIER false autoscroll METHOD_IDENTIFIER true Point TYPE_IDENTIFIER false point VARIABLE_IDENTIFIER true JViewport TYPE_IDENTIFIER false viewport VARIABLE_IDENTIFIER true JViewport TYPE_IDENTIFIER false SwingUtilities TYPE_IDENTIFIER false getAncestorOfClass METHOD_IDENTIFIER false JViewport TYPE_IDENTIFIER false viewport VARIABLE_IDENTIFIER false Point TYPE_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER true viewport VARIABLE_IDENTIFIER false getViewPosition METHOD_IDENTIFIER false viewHeight VARIABLE_IDENTIFIER true viewport VARIABLE_IDENTIFIER false getExtentSize METHOD_IDENTIFIER false height VARIABLE_IDENTIFIER false viewWidth VARIABLE_IDENTIFIER true viewport VARIABLE_IDENTIFIER false getExtentSize METHOD_IDENTIFIER false width VARIABLE_IDENTIFIER false point VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false autoscrollInsets VARIABLE_IDENTIFIER false top VARIABLE_IDENTIFIER false viewport VARIABLE_IDENTIFIER false setViewPosition METHOD_IDENTIFIER false Point TYPE_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false Math TYPE_IDENTIFIER false max METHOD_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false scrollUnits VARIABLE_IDENTIFIER false top VARIABLE_IDENTIFIER false fireOnAutoscroll METHOD_IDENTIFIER false DOMDocumentTreeEvent TYPE_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false viewHeight VARIABLE_IDENTIFIER false point VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false autoscrollInsets VARIABLE_IDENTIFIER false bottom VARIABLE_IDENTIFIER false viewport VARIABLE_IDENTIFIER false setViewPosition METHOD_IDENTIFIER false Point TYPE_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false Math TYPE_IDENTIFIER false min METHOD_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false scrollUnits VARIABLE_IDENTIFIER false bottom VARIABLE_IDENTIFIER false getHeight METHOD_IDENTIFIER false viewHeight VARIABLE_IDENTIFIER false fireOnAutoscroll METHOD_IDENTIFIER false DOMDocumentTreeEvent TYPE_IDENTIFIER false point VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false autoscrollInsets VARIABLE_IDENTIFIER false left VARIABLE_IDENTIFIER false viewport VARIABLE_IDENTIFIER false setViewPosition METHOD_IDENTIFIER false Point TYPE_IDENTIFIER false Math TYPE_IDENTIFIER false max METHOD_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false scrollUnits VARIABLE_IDENTIFIER false left VARIABLE_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false fireOnAutoscroll METHOD_IDENTIFIER false DOMDocumentTreeEvent TYPE_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false viewWidth VARIABLE_IDENTIFIER false point VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false autoscrollInsets VARIABLE_IDENTIFIER false right VARIABLE_IDENTIFIER false viewport VARIABLE_IDENTIFIER false setViewPosition METHOD_IDENTIFIER false Point TYPE_IDENTIFIER false Math TYPE_IDENTIFIER false min METHOD_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER false x VARIABLE_IDENTIFIER false scrollUnits VARIABLE_IDENTIFIER false right VARIABLE_IDENTIFIER false getWidth METHOD_IDENTIFIER false viewWidth VARIABLE_IDENTIFIER false viewportPos VARIABLE_IDENTIFIER false y VARIABLE_IDENTIFIER false fireOnAutoscroll METHOD_IDENTIFIER false DOMDocumentTreeEvent TYPE_IDENTIFIER false Insets TYPE_IDENTIFIER false getAutoscrollInsets METHOD_IDENTIFIER true topAndBottom VARIABLE_IDENTIFIER true getHeight METHOD_IDENTIFIER false leftAndRight VARIABLE_IDENTIFIER true getWidth METHOD_IDENTIFIER false Insets TYPE_IDENTIFIER false topAndBottom VARIABLE_IDENTIFIER false leftAndRight VARIABLE_IDENTIFIER false topAndBottom VARIABLE_IDENTIFIER false leftAndRight VARIABLE_IDENTIFIER false DOMDocumentTreeEvent TYPE_IDENTIFIER true EventObject TYPE_IDENTIFIER false DOMDocumentTreeEvent METHOD_IDENTIFIER false Object TYPE_IDENTIFIER false source VARIABLE_IDENTIFIER true source VARIABLE_IDENTIFIER false DOMDocumentTreeListener TYPE_IDENTIFIER true EventListener TYPE_IDENTIFIER false dropCompleted METHOD_IDENTIFIER true DOMDocumentTreeEvent TYPE_IDENTIFIER false event VARIABLE_IDENTIFIER true onAutoscroll METHOD_IDENTIFIER true DOMDocumentTreeEvent TYPE_IDENTIFIER false event VARIABLE_IDENTIFIER true DOMDocumentTreeAdapter TYPE_IDENTIFIER true DOMDocumentTreeListener TYPE_IDENTIFIER false dropCompleted METHOD_IDENTIFIER true DOMDocumentTreeEvent TYPE_IDENTIFIER false event VARIABLE_IDENTIFIER true onAutoscroll METHOD_IDENTIFIER true DOMDocumentTreeEvent TYPE_IDENTIFIER false event VARIABLE_IDENTIFIER true addListener METHOD_IDENTIFIER true DOMDocumentTreeListener TYPE_IDENTIFIER false listener VARIABLE_IDENTIFIER true eventListeners VARIABLE_IDENTIFIER false add METHOD_IDENTIFIER false DOMDocumentTreeListener TYPE_IDENTIFIER false listener VARIABLE_IDENTIFIER false fireDropCompleted METHOD_IDENTIFIER true DOMDocumentTreeEvent TYPE_IDENTIFIER false event VARIABLE_IDENTIFIER true Object TYPE_IDENTIFIER false listeners VARIABLE_IDENTIFIER true eventListeners VARIABLE_IDENTIFIER false getListenerList METHOD_IDENTIFIER false length VARIABLE_IDENTIFIER true listeners VARIABLE_IDENTIFIER false length VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER true i VARIABLE_IDENTIFIER false length VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false listeners VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false DOMDocumentTreeListener TYPE_IDENTIFIER false DOMDocumentTreeListener TYPE_IDENTIFIER false listeners VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false dropCompleted METHOD_IDENTIFIER false event VARIABLE_IDENTIFIER false fireOnAutoscroll METHOD_IDENTIFIER true DOMDocumentTreeEvent TYPE_IDENTIFIER false event VARIABLE_IDENTIFIER true Object TYPE_IDENTIFIER false listeners VARIABLE_IDENTIFIER true eventListeners VARIABLE_IDENTIFIER false getListenerList METHOD_IDENTIFIER false length VARIABLE_IDENTIFIER true listeners VARIABLE_IDENTIFIER false length VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER true i VARIABLE_IDENTIFIER false length VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false listeners VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false DOMDocumentTreeListener TYPE_IDENTIFIER false DOMDocumentTreeListener TYPE_IDENTIFIER false listeners VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false onAutoscroll METHOD_IDENTIFIER false event VARIABLE_IDENTIFIER false DropCompletedInfo TYPE_IDENTIFIER true Node TYPE_IDENTIFIER false parent VARIABLE_IDENTIFIER true ArrayList TYPE_IDENTIFIER false children VARIABLE_IDENTIFIER true Node TYPE_IDENTIFIER false sibling VARIABLE_IDENTIFIER true DropCompletedInfo METHOD_IDENTIFIER false Node TYPE_IDENTIFIER false parent VARIABLE_IDENTIFIER true Node TYPE_IDENTIFIER false sibling VARIABLE_IDENTIFIER true ArrayList TYPE_IDENTIFIER false children VARIABLE_IDENTIFIER true parent VARIABLE_IDENTIFIER false parent VARIABLE_IDENTIFIER false sibling VARIABLE_IDENTIFIER false sibling VARIABLE_IDENTIFIER false children VARIABLE_IDENTIFIER false children VARIABLE_IDENTIFIER false ArrayList TYPE_IDENTIFIER false getChildren METHOD_IDENTIFIER true children VARIABLE_IDENTIFIER false Node TYPE_IDENTIFIER false getParent METHOD_IDENTIFIER true parent VARIABLE_IDENTIFIER false Node TYPE_IDENTIFIER false getSibling METHOD_IDENTIFIER true sibling VARIABLE_IDENTIFIER false Node TYPE_IDENTIFIER false getDomNodeFromTreeNode METHOD_IDENTIFIER true DefaultMutableTreeNode TYPE_IDENTIFIER false treeNode VARIABLE_IDENTIFIER true treeNode VARIABLE_IDENTIFIER false treeNode VARIABLE_IDENTIFIER false getUserObject METHOD_IDENTIFIER false NodeInfo TYPE_IDENTIFIER false NodeInfo TYPE_IDENTIFIER false treeNode VARIABLE_IDENTIFIER false getUserObject METHOD_IDENTIFIER false getNode METHOD_IDENTIFIER false ArrayList TYPE_IDENTIFIER false getNodeListForParent METHOD_IDENTIFIER true ArrayList TYPE_IDENTIFIER false potentialChildren VARIABLE_IDENTIFIER true Node TYPE_IDENTIFIER false parentNode VARIABLE_IDENTIFIER true ArrayList TYPE_IDENTIFIER false children VARIABLE_IDENTIFIER true ArrayList TYPE_IDENTIFIER false n VARIABLE_IDENTIFIER true potentialChildren VARIABLE_IDENTIFIER false size METHOD_IDENTIFIER false i VARIABLE_IDENTIFIER true i VARIABLE_IDENTIFIER false n VARIABLE_IDENTIFIER false i VARIABLE_IDENTIFIER false Node TYPE_IDENTIFIER false node VARIABLE_IDENTIFIER true Node TYPE_IDENTIFIER false potentialChildren VARIABLE_IDENTIFIER false get METHOD_IDENTIFIER false i VARIABLE_IDENTIFIER false DOMUtilities TYPE_IDENTIFIER false canAppend METHOD_IDENTIFIER false node VARIABLE_IDENTIFIER false parentNode VARIABLE_IDENTIFIER false children VARIABLE_IDENTIFIER false add METHOD_IDENTIFIER false node VARIABLE_IDENTIFIER false children VARIABLE_IDENTIFIER false
[ "pschulam@gmail.com" ]
pschulam@gmail.com
1baacc9558cc235fb46a964d312a3471477ea6aa
8aee7f49d30beb992373db8f73d429d27253488e
/cms-base-system/src/main/java/com/finance/modules/system/aspect/AutoLogAspect.java
64c45e1cd49bf1ceb84c9707e38c844a56d923e5
[]
no_license
tc7879685/cms-boot
fe0fae28a9010a56eb960c86830734f40957bb9b
9346f9ce4b650ed7bd4905ff71c2be9a18b469f3
refs/heads/master
2022-07-03T05:02:17.148443
2019-07-17T09:41:59
2019-07-17T09:41:59
195,168,065
2
0
null
2022-06-21T01:23:55
2019-07-04T04:21:41
Java
UTF-8
Java
false
false
3,092
java
package com.finance.modules.system.aspect; import com.alibaba.fastjson.JSONObject; import com.finance.common.aspect.annotation.AutoLog; import com.finance.common.system.controller.BaseController; import com.finance.common.system.model.UserBean; import com.finance.common.util.SpringContextUtils; import com.finance.modules.model.SysLoginModel; import com.finance.modules.system.entity.TraceInfo; import com.finance.modules.system.entity.UserInfo; import com.finance.modules.system.service.ITraceInfoService; import org.apache.shiro.SecurityUtils; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.lang.reflect.Method; import java.util.Date; /** * 系统日志,切面处理类 * * @Author tangc * @email * @Date 2018年1月14日 */ @Aspect @Component public class AutoLogAspect { @Autowired private ITraceInfoService sysLogService; //当添加注解时自动添加日志 @Pointcut("@annotation(com.finance.common.aspect.annotation.AutoLog)") public void logPointCut() { } @Around("logPointCut()") public Object around(ProceedingJoinPoint point) throws Throwable { long beginTime = System.currentTimeMillis(); //执行方法 Object result = point.proceed(); //执行时长(毫秒) long time = System.currentTimeMillis() - beginTime; //保存日志 saveSysLog(point, time); return result; } private void saveSysLog(ProceedingJoinPoint joinPoint, long time) { MethodSignature signature = (MethodSignature) joinPoint.getSignature(); Method method = signature.getMethod(); TraceInfo sysLog = new TraceInfo(); AutoLog syslog = method.getAnnotation(AutoLog.class); if(syslog != null){ //注解上的描述,操作日志内容 sysLog.setOperateInfo(syslog.value()); sysLog.setOperateType(syslog.logType()); } //请求的方法名 String className = joinPoint.getTarget().getClass().getName(); String methodName = signature.getName(); //sysLog.setMethod(className + "." + methodName + "()"); //请求的参数 /*Object[] args = joinPoint.getArgs(); try{ String params = JSONObject.toJSONString(args); sysLog.setRequestParam(params); }catch (Exception e){ }*/ //获取request //HttpServletRequest request = SpringContextUtils.getHttpServletRequest(); //UserBean userBean = new BaseController().getUserBean(request); //设置IP地址 //sysLog.setCorpCode(userBean.getCorpCode()); //sysLog.setUserCode(userBean.getUserCode()); //获取登录用户信息 UserInfo sysUser = (UserInfo)SecurityUtils.getSubject().getPrincipal(); if(sysUser!=null){ sysLog.setCorpCode(sysUser.getCorpCode()); sysLog.setUserCode(sysUser.getUserCode()); } //耗时 //sysLog.setCostTime(time); sysLog.setOperateTime(new Date()); //保存系统日志 sysLogService.save(sysLog); } }
[ "tc57070300822" ]
tc57070300822
e6b46662228eba9b2da63981dfa8da12da3f7f27
86d07b532bd92e3d8dd8eb30a83aeb2706ddcefd
/src/main/java/com/varoli/hello/controller/UserPreferenceController.java
1313e1b69fa607e6c6bcb332de8555b5703b64c3
[]
no_license
FernandaVaroli/spring-data-study
d261e2f8106dead1cfdb00fd214b6febb5457e28
25ca66011fd66a01836cb02ca3b7e0d270a5adc3
refs/heads/master
2022-04-16T23:18:23.379097
2020-04-16T19:55:56
2020-04-16T19:55:56
253,082,843
0
0
null
null
null
null
UTF-8
Java
false
false
913
java
package com.varoli.hello.controller; import com.varoli.hello.entities.UserPreference; import com.varoli.hello.services.UserPreferenceService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @RestController @RequestMapping(path = "/userPreference") public class UserPreferenceController { private UserPreferenceService userPreferenceService; @Autowired public UserPreferenceController(UserPreferenceService userPreferenceService) { this.userPreferenceService = userPreferenceService; } @GetMapping("/{id}") public UserPreference findById(@PathVariable Integer id){ return userPreferenceService.findById(id); } @PostMapping("/") public UserPreference createPreference(@RequestBody UserPreference userPreference){ return userPreferenceService.createPreference(userPreference); } }
[ "fernandavaroli@gmail.com" ]
fernandavaroli@gmail.com
6f0c37aa364fd6e50567437cda44e31410c5ae8a
2e77f427339c8dc6afead1dfe5a486271be84761
/src/test/java/co/com/choucair/retotecnico/runners/RunnerTags.java
e9a2c51834e36326564bb4fb0de0afff2983def7
[]
no_license
andres26142/reto-tecnico-choucair
24743e4f9be0ad69cd20c744a863aafa4c38b419
e920bddf9a6dbe04c1d4529dea058cfbc30f7c92
refs/heads/main
2023-06-23T16:54:20.553484
2021-07-26T20:55:55
2021-07-26T20:55:55
389,676,881
0
0
null
null
null
null
UTF-8
Java
false
false
469
java
package co.com.choucair.retotecnico.runners; import cucumber.api.CucumberOptions; import cucumber.api.SnippetType; import net.serenitybdd.cucumber.CucumberWithSerenity; import org.junit.runner.RunWith; @RunWith(CucumberWithSerenity.class) @CucumberOptions(features = "src/test/resources/features/uTest.feature", tags="@stories", glue="co.com.choucair.retotecnico.stepdefinitions", snippets = SnippetType.CAMELCASE) public class RunnerTags { }
[ "andres26142@gmail.com" ]
andres26142@gmail.com
0c643e79bb0905e0f14a5109c1edb08bed22ee04
7044f83b875e0c992c1e4ceb06a95a8c3aceda3a
/src/main/java/com/example/arena/model/postaci/ParametryIstotyEnum.java
ca6bc34b68c8e1a91905a320b4cb6d9b006afd6c
[]
no_license
KajmanProgrammer/arena3
efba9ee3f6e155280c9d5ccd707f77fb82c0f097
009e51023155b7af3e45930529580dd587f16ac8
refs/heads/master
2020-04-17T01:16:27.698335
2019-01-16T17:53:18
2019-01-16T17:53:18
166,084,741
0
0
null
null
null
null
UTF-8
Java
false
false
255
java
package com.example.arena.model.postaci; /** * Created by Saad on 2018-03-26. */ public enum ParametryIstotyEnum { SIŁA, ZWINNOŚĆ, WYTRZYMAŁOŚĆ, SZYBKOŚĆ, INICJATYWA, ILOSC_ATAKOW, ILOSC_UNIKOW, PUNKTY_ZYCIA; }
[ "michal.chwedorczuk@gmail.com" ]
michal.chwedorczuk@gmail.com
6d40be561926d023f6018bc7c70a1b994cdada5d
0aee85835dfe31081d90d02bfd4b82c9d5906f4e
/src/main/java/com/imooc/miaosha/dao/UserDao.java
3514f78402aaa68f8fa0db6d3440e967e87b6e95
[]
no_license
Franciswyyy/miaosha
49d0a9f4e60d28a61031acc0a49d47e9d4ee5deb
46189b90e925d2952dfd2fb7aba53561f63a82a7
refs/heads/master
2020-03-27T23:03:20.307890
2018-09-05T09:04:11
2018-09-05T09:04:11
147,285,467
0
0
null
null
null
null
UTF-8
Java
false
false
486
java
package com.imooc.miaosha.dao; import com.imooc.miaosha.domain.User; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @Mapper public interface UserDao { @Select("select * from user where id = #{id}") public User getById(@Param("id") int id); @Insert("insert into user(id, name) values(#{id}, #{name})") public int insert(User user); }
[ "826531768@qq.com" ]
826531768@qq.com
28171d13c2ea8a957bd62203e3d0a93983c2c11d
17b8008b5c69fa00a5538f6bff2c4bbd28b8230b
/src/com/smartiky/smartpoll/PollListAdapter.java
866cf375f4a2931e02d1f88c34e627554da96947
[ "MIT" ]
permissive
mozadeh/smartpoll
499b41e28eed4b4e3a4cf61f858f9342ce328fa9
5ffcc03784880cfaeda4bad5aef534b54fcbe22f
refs/heads/master
2021-01-22T10:32:09.997877
2017-06-25T21:44:59
2017-06-25T21:44:59
82,008,976
1
0
null
null
null
null
UTF-8
Java
false
false
2,896
java
package com.smartiky.smartpoll; import java.util.List; import android.content.Context; import android.util.DisplayMetrics; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ArrayAdapter; import com.smartiky.smartpoll.misc.ImageLoader; import com.smartiky.smartpoll.system.Poll; import com.smartiky.smartpoll.system.SmartPollSystem; public class PollListAdapter extends ArrayAdapter<Poll> { protected static final String TAG = "PollListAdapter"; Context context; OnClickListener voteListener; OnClickListener pollDetailListener; OnClickListener profileListener; ImageLoader imageLoader; LayoutInflater mInflater; DisplayMetrics metrics; int screenwidth; public PollListAdapter(Context context, List<Poll> data) { super(context, R.layout.question, data); this.context = context; mInflater = LayoutInflater.from(context); metrics = context.getResources().getDisplayMetrics(); screenwidth = metrics.widthPixels; } public void setVoteListener(OnClickListener voteListener) { this.voteListener = voteListener; } public void setPollDetailListener(OnClickListener pollDetailListener) { this.pollDetailListener = pollDetailListener; } public void setProfileListener(OnClickListener profileListener) { this.profileListener = profileListener; } public void updateList() { this.notifyDataSetChanged(); } public void setImageLoader(ImageLoader imageLoader) { this.imageLoader = imageLoader; } @Override public View getView(int position, View view, ViewGroup parent) { // Create a ViewHolder if the view is not recycled. PollViewHolder holder; if (view == null) { view = mInflater.inflate(R.layout.question, null); holder = new PollViewHolder(); holder.setImageLoader(imageLoader); holder.findViews(view); holder.postedBy.setMaxWidth((int)(screenwidth - 200*(view.getResources().getDisplayMetrics()).density)); // Manual customization of the layout holder.setUITypefaces(context); holder.setVoteListener(voteListener); holder.setProfileListener(profileListener); view.setTag(holder); } else { holder = (PollViewHolder) view.getTag(); } view.setOnClickListener(pollDetailListener); Poll poll = getItem(position); boolean isOwner = (poll.getCreatorId().equals(SmartPollSystem.getInstance(context).getUserId())); boolean hasResponded = (poll.getResponse() != null); holder.updateView(poll, isOwner, hasResponded, false); if (hasResponded) { holder.rightArrow.setImageResource(R.drawable.expandbuttons); holder.rightArrow.setBackgroundResource(R.drawable.buttonexpandgradient); } else { holder.rightArrow.setImageResource(R.drawable.expandbutton); holder.rightArrow.setBackgroundResource(R.drawable.buttonexpandgradient1); } return view; } }
[ "mo@sidebuy.com" ]
mo@sidebuy.com
5bb3380d114a67f6f5f2b3e3e39293682d48ee62
22b57a6e4ca4a3efd4d40255308509f23c9ad645
/src/freshsupermaket/ui/FrmRecipeManage_Add.java
5f0177a82d4dc10d5d52d00e15bb3c2c62346a7b
[]
no_license
CodeYYang/Fresh_Supermaket
709b3b8c2e885d2832d0a1c687073e833ba43e9b
7aff00cc9f0a4c9d30b5d29ba508b59bc07e7493
refs/heads/master
2022-11-18T03:54:01.610374
2020-07-15T08:20:37
2020-07-15T08:20:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,360
java
package freshsupermaket.ui; import freshsupermaket.control.CustomerManager; import freshsupermaket.control.GoodInformationManager; import freshsupermaket.model.BeanRecipe; import freshsupermaket.util.BaseException; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class FrmRecipeManage_Add extends JDialog implements ActionListener { private BeanRecipe pub=null; private JPanel toolBar = new JPanel(); private JPanel workPane = new JPanel(); private Button btnOk = new Button("确定"); private Button btnCancel = new Button("取消"); // private JLabel labelRecipe_Id = new JLabel("菜谱编号"); private JLabel labelRecipe_Name = new JLabel("菜谱名称"); private JLabel labelRecipe_Material = new JLabel("菜谱用料"); private JLabel labelRecipe_Steps = new JLabel("步骤 "); private JLabel labelDetail = new JLabel("详情 "); // private JTextField edtRecipe_Id =new JTextField(20); private JTextField edtRecipe_Name =new JTextField(20); private JTextField edtRecipe_Material =new JTextField(20); private JTextField edtRecipe_Steps =new JTextField(20); private JTextField edtDetail = new JTextField(20); public FrmRecipeManage_Add(JDialog f, String s, boolean b) { super(f, s, b); toolBar.setLayout(new FlowLayout(FlowLayout.RIGHT)); toolBar.add(btnOk); toolBar.add(btnCancel); this.getContentPane().add(toolBar, BorderLayout.SOUTH); // workPane.add(labelRecipe_Id); // workPane.add(edtRecipe_Id); workPane.add(labelRecipe_Name); workPane.add(edtRecipe_Name); workPane.add(labelRecipe_Material); workPane.add(edtRecipe_Material); workPane.add(labelRecipe_Steps); workPane.add(edtRecipe_Steps); workPane.add(labelDetail); workPane.add(edtDetail); this.getContentPane().add(workPane, BorderLayout.CENTER); this.setSize(320, 300); // 屏幕居中显示 double width = Toolkit.getDefaultToolkit().getScreenSize().getWidth(); double height = Toolkit.getDefaultToolkit().getScreenSize().getHeight(); this.setLocation((int) (width - this.getWidth()) / 2, (int) (height - this.getHeight()) / 2); this.validate(); this.btnOk.addActionListener(this); this.btnCancel.addActionListener(this); } @Override public void actionPerformed(ActionEvent e) { if(e.getSource()==this.btnCancel) { this.setVisible(false); return; } else if(e.getSource()==this.btnOk){ pub=new BeanRecipe(); pub.setRecipe_name(this.edtRecipe_Name.getText()); pub.setRecipe_material(this.edtRecipe_Material.getText()); pub.setSteps(this.edtRecipe_Steps.getText()); pub.setDetail(this.edtDetail.getText()); try{ (new GoodInformationManager()).CreateRecipe(pub); this.setVisible(false); }catch (BaseException e1){ this.pub=null; JOptionPane.showMessageDialog(null,e1.getMessage(),"错误",JOptionPane.ERROR_MESSAGE); } } } public BeanRecipe getPub() { return pub; } }
[ "1592980573@qq.com" ]
1592980573@qq.com
e97f157460e83219cc009e9aa740c670a228ca11
6003f0df962e40e08d8d34a8b349d5665cb31c22
/app/src/main/java/com/example/vojjalateja/symphonia/ConnectionDetector.java
50530a03cdde47ed15ce67a4a6f2e9cb89ca1558
[]
no_license
tejavojjala/Symphonia
026f3a25fc14d2a7752e170b2b24ef6d271411b6
089c16b18bc3c7380f37813309d5e862ac9df40e
refs/heads/master
2021-07-15T22:24:26.550063
2017-02-20T02:12:23
2017-04-06T05:46:50
48,069,893
2
1
null
2017-10-21T10:54:56
2015-12-15T21:24:52
Java
UTF-8
Java
false
false
856
java
package com.example.vojjalateja.symphonia; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; public class ConnectionDetector { private Context context; public ConnectionDetector(Context context){ this.context = context; } public boolean isConnectingToInternet(){ ConnectivityManager connectivity = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivity != null) { NetworkInfo[] info = connectivity.getAllNetworkInfo(); if (info != null) for (int i = 0; i < info.length; i++) if (info[i].getState() == NetworkInfo.State.CONNECTED) { return true; } } return false; } }
[ "iit2014086@iiita.ac.in" ]
iit2014086@iiita.ac.in
87082e99f37997a1e46e736af8e3c29dc170d3bf
fcd3dae50913be589e39acd57b0536305f59bea9
/android/app/src/main/java/com/ebudgie/MainApplication.java
16220695281769cbf412f341a618a5de778f0112
[ "MIT" ]
permissive
nikolay-radkov/EBudgie
2e382a39a6feefd5c7445f4a1d6606a6cc618af6
7cbc62041800d16a3adfa210479f7b76d0568423
refs/heads/master
2021-01-12T01:07:05.759732
2017-07-03T18:27:59
2017-07-03T18:27:59
78,345,670
0
0
null
2017-05-28T20:49:10
2017-01-08T13:51:02
JavaScript
UTF-8
Java
false
false
2,452
java
package com.ebudgie; import android.app.Application; import android.util.Log; import com.facebook.react.ReactApplication; import com.BV.LinearGradient.LinearGradientPackage; import com.github.droibit.android.reactnative.customtabs.CustomTabsPackage; import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage; import com.i18n.reactnativei18n.ReactNativeI18n; import com.github.reactNativeMPAndroidChart.MPAndroidChartPackage; import cl.json.RNSharePackage; import com.rnfs.RNFSPackage; import com.dieam.reactnativepushnotification.ReactNativePushNotificationPackage; import com.reactlibrary.RNUUIDGeneratorPackage; import com.learnium.RNDeviceInfo.RNDeviceInfo; import io.underscope.react.fbak.RNAccountKitPackage; import com.cboy.rn.splashscreen.SplashScreenReactPackage; import com.oblador.vectoricons.VectorIconsPackage; import com.facebook.react.modules.storage.ReactDatabaseSupplier; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; import com.facebook.soloader.SoLoader; import java.util.Arrays; import java.util.List; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { long size = 100L * 1024L * 1024L; // 100 MB ReactDatabaseSupplier.getInstance(getApplicationContext()).setMaximumSize(size); return Arrays.<ReactPackage>asList( new MainReactPackage(), new LinearGradientPackage(), new CustomTabsPackage(), new ReactNativeDialogsPackage(), new ReactNativeI18n(), new MPAndroidChartPackage(), new RNSharePackage(), new RNFSPackage(), new ReactNativePushNotificationPackage(), new RNUUIDGeneratorPackage(), new RNDeviceInfo(), new RNAccountKitPackage(), new SplashScreenReactPackage(), new VectorIconsPackage() ); } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } @Override public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); } }
[ "nikolay.kirilov.radkov@gmail.com" ]
nikolay.kirilov.radkov@gmail.com
9fb5494477cd30932e129f6b70cfc92bca9f9814
a353245e46e3e5c510350cd7303b59b3aa557cd5
/src/main/java/demo/MDCTurboFilter.java
c3a3954a4a90920f5becb360fd31c57b6307682c
[]
no_license
rwinch/spring-session-logging
e9596f367a02e2628584c4b6496e454dfeb7529b
59192750a887be83b9bb6a8ca7ede906ae3b72b4
refs/heads/master
2016-09-06T12:19:11.098962
2016-03-02T19:26:03
2016-03-02T19:26:03
41,311,757
2
0
null
null
null
null
UTF-8
Java
false
false
1,559
java
/* * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package demo; import org.slf4j.MDC; import org.slf4j.Marker; import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.turbo.TurboFilter; import ch.qos.logback.core.spi.FilterReply; /** * @author Rob Winch * */ public class MDCTurboFilter extends TurboFilter { /* (non-Javadoc) * @see ch.qos.logback.classic.turbo.TurboFilter#decide(org.slf4j.Marker, ch.qos.logback.classic.Logger, ch.qos.logback.classic.Level, java.lang.String, java.lang.Object[], java.lang.Throwable) */ @Override public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) { String mdcLogLevel = MDC.get(LoggingKey.LOGGING_KEY); if(mdcLogLevel == null) { return FilterReply.NEUTRAL; } Level newLevel = Level.valueOf(mdcLogLevel); if(level.isGreaterOrEqual(newLevel)) { return FilterReply.ACCEPT; } return FilterReply.NEUTRAL; } }
[ "rwinch@gopivotal.com" ]
rwinch@gopivotal.com
5ddca26e3c59b959b19388b6739d5da3aa6b7de8
4faa42b0f3c1b90f82bd809c4b5e169104ebbee3
/src/main/java/cz/wa2/poll/backend/dto/BallotDTO.java
5cb7475640536538009f430e79ba9f77700bdf90
[]
no_license
kuburoman/PollBackend
4954a5a471928cdb7cb493ac6672abe7b3b4ba56
3f8ad50c0c4090bcf78254e26bc99156034c8fc6
refs/heads/master
2021-05-28T23:14:57.014226
2015-04-14T15:12:25
2015-04-14T15:12:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
896
java
package cz.wa2.poll.backend.dto; import cz.wa2.poll.backend.entities.Ballot; public class BallotDTO { private Long id; private Integer answer; public BallotDTO() { } public BallotDTO(Ballot ballot) { this.id = ballot.getId(); this.answer = ballot.getAnswer(); } public Integer getAnswer() { return answer; } public void setAnswer(Integer answer) { this.answer = answer; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Ballot toEntity(){ Ballot ballot = new Ballot(); ballot.setId(id); ballot.setAnswer(answer); return ballot; } @Override public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Answer: "+answer+"\n"); return sb.toString(); } }
[ "kuburoman@seznam.cz" ]
kuburoman@seznam.cz
52455f2dc6d63ff05c04b16511f0af67ab8057f5
186b130c3bcf03723a8cfcc427bf1c53278a2f0a
/app/src/main/java/com/hoang/lvhco/assigmentnc/db/DataBaseQL.java
2ddf3d8f4f171fa421b77eaa7cd7044027052908
[]
no_license
lvhcoder/AssigmentNC
5f2bb06de215a1da3057410a93b40f66139c9dfa
b27e0ce080bc825a1969bbcbde00c8b0ba7f7607
refs/heads/master
2021-10-07T21:42:18.344005
2018-12-06T07:03:34
2018-12-06T07:03:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,277
java
package com.hoang.lvhco.assigmentnc.db; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; public class DataBaseQL extends SQLiteOpenHelper { private static final int version = 1 ; private static final String name = "db"; private static final String SQL_CREATE_ACCOUNT="Create table SIGNUPLEARN (" + "ID INTEGER PRIMARY KEY AUTOINCREMENT, " + "NAME TEXT ," + "SID TEXT ,"+ "MCLASS TEXT ,"+ "SUBJECT TEXT)"; private static final String SQL_CREATE_TEST ="Create table TEST (" + "ID INTEGER PRIMARY KEY AUTOINCREMENT, " + "DATE TEXT ," + "SUBJECT TEXT )"; public DataBaseQL(Context context) { super(context, name, null, version); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL(SQL_CREATE_ACCOUNT); db.execSQL(SQL_CREATE_TEST); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { String drop_table = String.format("DROP TABLE IF EXISTS %s", db); db.execSQL(drop_table); onCreate(db); Log.d("onUpgrade","HELLO"); } }
[ "hoanglvph05611@fpt.edu.vn" ]
hoanglvph05611@fpt.edu.vn
e133b747843ccd7af41bcb5d62d17b3ee1726f81
ce902739c229a398738c55ee798d281ae65a5dec
/src/main/java/kr/co/openprogramming/servlet/basic/request/RequestBodyStringServlet.java
d3070351a7d5aefb7adef33b168aae96bc74061b
[]
no_license
prankbye77/servletwebmvc
50c44e0ec4f17b8702570bdef630c93760065ef6
4a7b11f6b5176406f6615c3e998ab018744561a2
refs/heads/master
2023-04-22T13:27:31.951332
2021-05-06T07:26:44
2021-05-06T07:26:44
364,817,980
0
0
null
null
null
null
UTF-8
Java
false
false
982
java
package kr.co.openprogramming.servlet.basic.request; import org.springframework.util.StreamUtils; import javax.servlet.ServletException; import javax.servlet.ServletInputStream; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.nio.charset.StandardCharsets; @WebServlet(name = "requestBodyStringServlet", urlPatterns = "/request-body-string") public class RequestBodyStringServlet extends HttpServlet { @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ServletInputStream inputStream = request.getInputStream(); String messageBody = StreamUtils.copyToString(inputStream, StandardCharsets.UTF_8); System.out.println("messageBody = " + messageBody); response.getWriter().write("ok"); } }
[ "prankbye@gamevilcom2us.com" ]
prankbye@gamevilcom2us.com
9adfea6d4547c3a5accc1742028ed4801371c657
0b7b81932208e9b0d9e9142ea313194d69642355
/app/src/androidTest/java/com/example/complexcalculator/ExampleInstrumentedTest.java
4a958c5dcb1648c1a687cb9d0a6a1da15597c89f
[]
no_license
Cherirei/Calculator2
4350c2ba16e3030199d7871a09d2939d4e8da017
f26c78c3b1f84e5184dd28ecbfbc6700eff1d5dd
refs/heads/master
2021-02-06T06:52:04.814993
2020-02-29T02:21:45
2020-02-29T02:21:45
243,890,025
0
0
null
null
null
null
UTF-8
Java
false
false
774
java
package com.example.complexcalculator; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.example.complexcalculator", appContext.getPackageName()); } }
[ "johkirwa17@gmail.com" ]
johkirwa17@gmail.com
766e89e0b90cabcdd68bbbe347046684f4e4f8ca
d2cb1f4f186238ed3075c2748552e9325763a1cb
/methods_all/nonstatic_methods/javax_swing_table_TableColumn_toString.java
3592813610b74a4f5696a811d73c866495ea5bb2
[]
no_license
Adabot1/data
9e5c64021261bf181b51b4141aab2e2877b9054a
352b77eaebd8efdb4d343b642c71cdbfec35054e
refs/heads/master
2020-05-16T14:22:19.491115
2019-05-25T04:35:00
2019-05-25T04:35:00
183,001,929
4
0
null
null
null
null
UTF-8
Java
false
false
166
java
class javax_swing_table_TableColumn_toString{ public static void function() {javax.swing.table.TableColumn obj = new javax.swing.table.TableColumn();obj.toString();}}
[ "peter2008.ok@163.com" ]
peter2008.ok@163.com
4e02db6560a834cb8c5c7aee693b1882fbb9131d
200188f6c503e5c2acee73d92b28c0c74a157558
/pinyougou-web/pinyougou-manager-web/src/main/java/com/pinyougou/manager/controller/itemCatController.java
b39d861d8b3178159ad35167990f8a9727f0d0a8
[]
no_license
Wongwengho/pinyougou
aaf87f0daf5ef17578ebb2fb7018ad78f9196d81
54050424e78f42d7d3b3c3124b8a3e00592cc24c
refs/heads/master
2020-05-03T21:05:10.981355
2019-04-23T13:27:50
2019-04-23T13:27:50
178,817,113
0
0
null
null
null
null
UTF-8
Java
false
false
842
java
package com.pinyougou.manager.controller; import com.alibaba.dubbo.config.annotation.Reference; import com.pinyougou.common.pojo.PageResult; import com.pinyougou.pojo.ItemCat; import com.pinyougou.service.ItemCatService; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * 商品分类管理 */ @RestController @RequestMapping("/itemCat") public class itemCatController { //注入service服务 @Reference(timeout = 10000) private ItemCatService itemCatService; /**分页查询商品分类*/ @GetMapping("/findItemCatByParentId") public List<ItemCat> findByPage(Long parentId){ return itemCatService.findItemCatByParentId(parentId); } }
[ "15819970711@163.com" ]
15819970711@163.com
76e023185b8c3e684ca6ee3bd47cd276b5055e8a
3e765cd2955562d5b9e5fa25ccd07355a41692ce
/src/main/java/bg/softuni/gamingstore/services/impl/GoodGamesUserServiceImpl.java
6179022f7984b36952645500b72cf47a3603bb68
[]
no_license
vmbg00/GoodGames-softuni-project
9ae12abcb8685d13295f541d4679b0f0e0228c6a
aff9515d7aceac136b01cf8dcdb5f7cd7cc4233f
refs/heads/master
2023-04-04T15:21:33.936813
2021-04-10T00:23:35
2021-04-10T00:23:35
343,568,891
1
0
null
null
null
null
UTF-8
Java
false
false
1,819
java
package bg.softuni.gamingstore.services.impl; import bg.softuni.gamingstore.models.entities.UserEntity; import bg.softuni.gamingstore.repositories.UserRepository; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.User; 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.Component; import java.util.List; import java.util.stream.Collectors; @Component public class GoodGamesUserServiceImpl implements UserDetailsService { private final UserRepository userRepository; public GoodGamesUserServiceImpl(UserRepository userRepository) { this.userRepository = userRepository; } @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { UserEntity userEntity = userRepository. findByUsername(username). orElseThrow(() -> new UsernameNotFoundException("User with name " + username + " was not found!")); return mapToUserDetails(userEntity); } private UserDetails mapToUserDetails(UserEntity userEntity) { List<GrantedAuthority> authorities = userEntity. getRoles(). stream(). map(r -> new SimpleGrantedAuthority("ROLE_" + r.getName().name())). collect(Collectors.toList()); return new User( userEntity.getUsername(), userEntity.getPassword(), authorities ); } }
[ "vmbg00@gmail.com" ]
vmbg00@gmail.com
05bf4d55c4b8e6d86bb2d86b05970e00a9f188d4
7d88f1594f262de478bb382906807c37f76b92e5
/Projeto 01 Inicio/OutroNome.java
d6ca1923d3fa47c2360da2a79a48e335661d31cb
[]
no_license
carlrps/poo2020
de5f6fbc473e428313c3c2ac741f79a75b77004d
922a3265f1d4387958fa8c06ddbbd909efbfc1f6
refs/heads/main
2023-02-13T07:22:30.373194
2021-01-21T01:11:09
2021-01-21T01:11:09
315,742,050
0
0
null
null
null
null
UTF-8
Java
false
false
116
java
class MeuPrograma { public static void main(String[] args) { System.out.println("Hello World!"); } }
[ "carlosryan24@gmail.com" ]
carlosryan24@gmail.com
cdcf2911c52f8977269ced025bc4274b74e0fd6e
da3e7fb4ce9103d181ba57d2d71058d52b4a6ca4
/app/src/main/java/com/infoplustech/smartscrutinization/evaluation/Eval_ShowBundleCompletedMessage.java
049b1b8a7192d67fd79e76df6f0c5b899cf3f6a2
[]
no_license
HariChowdary/evaluation
d1039807e8fa72e01c14be755d09c5881d075234
144d6eb1e2e9ca15a9f5971988f0217a9c75308f
refs/heads/master
2020-07-22T03:25:25.948255
2016-11-15T17:03:43
2016-11-15T17:03:43
73,835,823
0
0
null
null
null
null
UTF-8
Java
false
false
2,195
java
package com.infoplustech.smartscrutinization.evaluation; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.widget.TextView; import android.widget.Toast; import com.infoplustech.smartscrutinization.R; public class Eval_ShowBundleCompletedMessage extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.small_bundle_completed_message); getActionBar().setIcon(R.drawable.ic_launchere); getActionBar().setTitle(" Evaluator"); ((TextView) findViewById(R.id.text1)).setText(getIntent().getStringExtra("totalCount")); ((TextView) findViewById(R.id.text2)).setText(getIntent().getStringExtra("maxMarks")); /* ((TextView) findViewById(R.id.text4)).setText(getIntent().getStringExtra("maxMarks")); ((TextView) findViewById(R.id.text5)).setText(getIntent().getStringExtra("avgMarks")); ((TextView) findViewById(R.id.text6)).setText(getIntent().getStringExtra("Pass"));*/ findViewById(R.id.btn_ok).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub //navigateToTabletHomeScreen(); // finish(); navigateToTabletHomeScreen(); //Toast.makeText(Eval_ShowBundleCompletedMessage.this, "Please Release the Tab...!", Toast.LENGTH_SHORT).show(); } }); } protected void navigateToTabletHomeScreen() { // TODO Auto-generated method stub Intent in = new Intent(Eval_ShowBundleCompletedMessage.this, Eval_BundleEntryActivity.class); in.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); in.addCategory(Intent.CATEGORY_HOME); startActivity(in); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_HOME) { return false; } if (keyCode == KeyEvent.KEYCODE_BACK) { return false; } return false; } @Override public void onBackPressed() { // TODO Auto-generated method stub } }
[ "hari.somara@gmail.com" ]
hari.somara@gmail.com
739832dbf82884b342679957493fd33b09a536dd
d21feb16ce7b3b68ccd6bc644d51b4074ec244c2
/app/src/main/java/com/keye/keyevolly/http/JsonDealListener.java
dbb21d3388daf0138059e7e1403202de002f9478
[]
no_license
zhangkekekeke/KeyeVolly
27bbab4e195970adfcac01c480744dc3b00f6d65
828a07f4b5fed34c78862d680ecd1b49d3ad1e4c
refs/heads/master
2021-01-22T19:14:33.444927
2017-03-16T11:00:50
2017-03-16T11:00:50
85,181,373
3
0
null
null
null
null
UTF-8
Java
false
false
2,523
java
package com.keye.keyevolly.http; import android.os.Handler; import android.os.Looper; import com.alibaba.fastjson.JSON; import com.keye.keyevolly.http.interfaces.IDataListener; import com.keye.keyevolly.http.interfaces.IHttpListener; import org.apache.http.HttpEntity; import org.json.JSONObject; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import static android.os.Build.ID; /** * Created by admin on 2017/3/15. */ public class JsonDealListener<M> implements IHttpListener { private Class<M> responseClass; /** * 回调调用层 的接口 */ private IDataListener<M> dataListener; /** * 获取主线程的Handler * 通过 handler切换至主线程 */ Handler handler = new Handler(Looper.getMainLooper()); public JsonDealListener(Class<M> responseClass, IDataListener<M> dataListener) { this.responseClass = responseClass; this.dataListener = dataListener; } @Override public void onSuccess(HttpEntity httpEntity) { InputStream inputStream = null; try { inputStream = httpEntity.getContent(); String content = getContent(inputStream); final M response = JSON.parseObject(content, responseClass); handler.post(new Runnable() { @Override public void run() { dataListener.onSuccess(response); } }); } catch (IOException e) { dataListener.onFail(); e.printStackTrace(); } } private String getContent(InputStream inputStream) { String content = null; BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); StringBuilder sb = new StringBuilder(); String line = null; try { while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } } catch (IOException e) { e.printStackTrace(); dataListener.onFail(); } finally { try { inputStream.close(); } catch (IOException e) { System.out.println("Error=" + e.toString()); } } return sb.toString(); } @Override public void onFail() { dataListener.onFail(); } }
[ "as82801" ]
as82801
ce1b2eccf803a98da66951bfb161331ae6003a17
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/43/88.java
aba20d79278f68bbb2bade252a58c90166afe5f7
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
570
java
package <missing>; public class GlobalMembers { public static int ju(int x) { int j; for (j = 2;j < x;j++) { if (x % j == 0) { return 0; } } return 1; } public static int Main() { int i; int num; int flag = 0; int b; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { num = Integer.parseInt(tempVar); } for (i = 3;i <= num / 2;i = i + 2) { if (ju(i) == 1) { b = num - i; if (ju(b) == 1) { System.out.printf("%d %d",i,b); System.out.print("\n"); } } } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
2811ed0525309c9bf38639742f29663c7581f762
b5502ea9580e882a1c530f6e5914ce090e2d00a6
/experiment/CASSANDRA/cassandra/src/java/org/apache/cassandra/cql3/statements/CreateRoleStatement.java
cd262abae156195d6847184ba55c09e2e81baa40
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-public-domain" ]
permissive
Lingzhi-Ouyang/Almost-Strong-Consistency-Cassandra
a3fb54a8c35805a6810532719d7a8da99998f997
2b9aa8e78e134fc8811ea6caff3daca1f4a92936
refs/heads/master
2021-07-09T01:13:04.424482
2020-11-03T03:12:13
2020-11-03T03:12:13
205,116,322
2
2
null
null
null
null
UTF-8
Java
false
false
4,359
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cassandra.cql3.statements; import org.apache.cassandra.auth.*; import org.apache.cassandra.config.DatabaseDescriptor; import org.apache.cassandra.cql3.RoleName; import org.apache.cassandra.exceptions.*; import org.apache.cassandra.service.ClientState; import org.apache.cassandra.transport.messages.ResultMessage; public class CreateRoleStatement extends AuthenticationStatement { private final RoleResource role; private final RoleOptions opts; private final boolean ifNotExists; public CreateRoleStatement(RoleName name, RoleOptions options, boolean ifNotExists) { this.role = RoleResource.role(name.getName()); this.opts = options; this.ifNotExists = ifNotExists; } public void checkAccess(ClientState state) throws UnauthorizedException { super.checkPermission(state, Permission.CREATE, RoleResource.root()); if (opts.getSuperuser().isPresent()) { if (opts.getSuperuser().get() && !state.getUser().isSuper()) throw new UnauthorizedException("Only superusers can create a role with superuser status"); } } public void validate(ClientState state) throws RequestValidationException { opts.validate(); if (role.getRoleName().isEmpty()) throw new InvalidRequestException("Role name can't be an empty string"); // validate login here before checkAccess to avoid leaking role existence to anonymous users. state.ensureNotAnonymous(); if (!ifNotExists && DatabaseDescriptor.getRoleManager().isExistingRole(role)) throw new InvalidRequestException(String.format("%s already exists", role.getRoleName())); } public ResultMessage execute(ClientState state) throws RequestExecutionException, RequestValidationException { // not rejected in validate() if (ifNotExists && DatabaseDescriptor.getRoleManager().isExistingRole(role)) return null; DatabaseDescriptor.getRoleManager().createRole(state.getUser(), role, opts); grantPermissionsToCreator(state); return null; } /** * Grant all applicable permissions on the newly created role to the user performing the request * see also: SchemaAlteringStatement#grantPermissionsToCreator and the overridden implementations * of it in subclasses CreateKeyspaceStatement & CreateTableStatement. * @param state */ private void grantPermissionsToCreator(ClientState state) { // The creator of a Role automatically gets ALTER/DROP/AUTHORIZE permissions on it if: // * the user is not anonymous // * the configured IAuthorizer supports granting of permissions (not all do, AllowAllAuthorizer doesn't and // custom external implementations may not) if (!state.getUser().isAnonymous()) { try { DatabaseDescriptor.getAuthorizer().grant(AuthenticatedUser.SYSTEM_USER, role.applicablePermissions(), role, RoleResource.role(state.getUser().getName())); } catch (UnsupportedOperationException e) { // not a problem, grant is an optional method on IAuthorizer } } } }
[ "lingzhi.ouyang@outlook.com" ]
lingzhi.ouyang@outlook.com
6d88df35ebc9cdc4d903bbc163cf0d3408a69a90
e98727e2a52626df5cf7991e9537ab00de92e7ff
/src/HUD.java
0088d022858c8d8bc7fb20c9fc8c932876904f05
[]
no_license
agustafson19/GameTutorial
8f043de91c61fff4ae7acf9cd63c06aec0c4f260
e38806612319f599028074165f28bb1669e79613
refs/heads/master
2021-02-05T19:11:38.069130
2020-03-25T18:39:22
2020-03-25T18:39:22
243,821,312
0
0
null
null
null
null
UTF-8
Java
false
false
1,100
java
import java.awt.Color; import java.awt.Graphics; public class HUD { public int bounds = 0; public static int HEALTH = 100; private int greenValue = 255; private int score = 0; private int level = 1; public void tick() { HEALTH = Math.round(Game.clamp((float) HEALTH, 0f, 100f + bounds / 2f)); greenValue = Math.round(Game.clamp((float) greenValue, 0f, 255f)); greenValue = HEALTH * 2; greenValue = Math.round(Game.clamp((float) greenValue, 0f, 255f)); score++; } public void render(Graphics g) { g.setColor(Color.GRAY); g.fillRect(15, 15, 200 + bounds, 32); g.setColor(new Color(75, greenValue, 0)); g.fillRect(15, 15, HEALTH * 2, 32); g.setColor(Color.WHITE); g.drawRect(15, 15, 200 + bounds, 32); g.drawString("Score: " + score, 15, 64); g.drawString("Level: " + level, 15, 80); g.drawString("Space for shop", 15, 94); } public void setScore(int score) { this.score = score; } public int getScore() { return score; } public void setLevel(int level) { this.level = level; } public int getLevel() { return level; } }
[ "40578471+agustafson19@users.noreply.github.com" ]
40578471+agustafson19@users.noreply.github.com
390113b11241792bb1e24086ad260633780d4660
89f68cb0ed75b8ee0954337a536c26bfcc2a4015
/SuperSoftwere/app/src/main/java/com/supergao/softwere/utils/Utils.java
01469fe2349975cd29eb7b51a0fbcb71432c5795
[]
no_license
superGao/SuperSoftwere
8e8ba0445916c475816edc26f1d9ed214af2e0d9
7dba53c134c8adb8ca88599fa434c187ada02126
refs/heads/master
2021-01-21T13:14:46.401248
2016-05-10T02:02:47
2016-05-10T02:02:47
53,644,628
0
0
null
null
null
null
UTF-8
Java
false
false
9,358
java
package com.supergao.softwere.utils; import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Canvas; import android.media.Ringtone; import android.media.RingtoneManager; import android.net.Uri; import android.net.wifi.WifiManager; import android.os.AsyncTask; import android.util.DisplayMetrics; import android.view.View; import android.widget.RelativeLayout; import android.widget.Toast; import com.supergao.softwere.R; import com.supergao.softwere.entity.App; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; public class Utils { public static void toast(Context context, String str) { Toast.makeText(context, str, Toast.LENGTH_SHORT).show(); } public static AlertDialog.Builder getBaseDialogBuilder(Activity activity, String s) { return getBaseDialogBuilder(activity).setMessage(s); } public static int getWindowWidth(Activity cxt) { int width; DisplayMetrics metrics = cxt.getResources().getDisplayMetrics(); width = metrics.widthPixels; return width; } public static long getLongByTimeStr(String begin) throws ParseException { SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss.SS"); String origin = "00:00:00.00"; Date parse = format.parse(begin); return parse.getTime() - format.parse(origin).getTime(); } public static String getEquation(int finalNum, int delta) { String equation; int abs = Math.abs(delta); if (delta >= 0) { equation = String.format("%d+%d=%d", finalNum - delta, abs, finalNum); } else { equation = String.format("%d-%d=%d", finalNum - delta, abs, finalNum); } return equation; } public static Uri getCacheUri(String path, String url) { Uri uri = Uri.parse(url); uri = Uri.parse("cache:" + path + ":" + uri.toString()); return uri; } public static void showInfoDialog(Activity cxt, String msg, String title) { AlertDialog.Builder builder = getBaseDialogBuilder(cxt); builder.setMessage(msg) .setPositiveButton(cxt.getString(R.string.chat_utils_right), null) .setTitle(title) .show(); } public static AlertDialog.Builder getBaseDialogBuilder(Activity ctx) { return new AlertDialog.Builder(ctx).setTitle(R.string.chat_utils_tips).setIcon(R.drawable.utils_icon_info_2); } public static String getStrByRawId(Context ctx, int id) throws UnsupportedEncodingException { InputStream is = ctx.getResources().openRawResource(id); BufferedReader br = new BufferedReader(new InputStreamReader(is, "gbk")); String line; StringBuilder sb = new StringBuilder(); try { while ((line = br.readLine()) != null) { sb.append(line + "\n"); } br.close(); } catch (IOException e) { e.printStackTrace(); } return sb.toString(); } public static void showInfoDialog(Activity cxt, int msgId, int titleId) { showInfoDialog(cxt, cxt.getString(msgId), cxt.getString(titleId)); } public static String getTodayDayStr() { String dateStr; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); dateStr = sdf.format(new Date()); return dateStr; } public static Ringtone getDefaultRingtone(Context ctx, int type) { return RingtoneManager.getRingtone(ctx, RingtoneManager.getActualDefaultRingtoneUri(ctx, type)); } public static Uri getDefaultRingtoneUri(Context ctx, int type) { return RingtoneManager.getActualDefaultRingtoneUri(ctx, type); } public static boolean isEmpty(Activity activity, String str, String prompt) { if (str.isEmpty()) { toast(activity, prompt); return true; } return false; } public static String getWifiMac(Context cxt) { WifiManager wm = (WifiManager) cxt.getSystemService(Context.WIFI_SERVICE); return wm.getConnectionInfo().getMacAddress(); } public static String quote(String str) { return "'" + str + "'"; } public static String formatString(Context cxt, int id, Object... args) { return String.format(cxt.getString(id), args); } public static void sleep(int partMilli) { try { Thread.sleep(partMilli); } catch (InterruptedException e) { e.printStackTrace(); } } public static void setLayoutTopMargin(View view, int topMargin) { RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) view.getLayoutParams(); lp.topMargin = topMargin; view.setLayoutParams(lp); } public static List<?> getCopyList(List<?> ls) { List<?> l = new ArrayList(ls); return l; } public static void fixAsyncTaskBug() { // android bug new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... params) { return null; } }.execute(); } public static void openUrl(Context context, String url) { Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse(url)); context.startActivity(i); } public static Bitmap getCopyBitmap(Bitmap original) { Bitmap copy = Bitmap.createBitmap(original.getWidth(), original.getHeight(), original.getConfig()); Canvas copiedCanvas = new Canvas(copy); copiedCanvas.drawBitmap(original, 0f, 0f, null); return copy; } public static Bitmap getEmptyBitmap(int w, int h) { return Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888); } public static void intentShare(Context context, String title, String shareContent) { Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.chat_utils_share)); intent.putExtra(Intent.EXTRA_TEXT, shareContent); intent.putExtra(Intent.EXTRA_TITLE, title); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(Intent.createChooser(intent, context.getString(R.string.chat_utils_please_choose))); } public static void toast(int id) { toast(App.ctx, id); } public static void toast(String s) { toast(App.ctx, s); } public static void toast(String s, String exceptionMsg) { if (App.debug) { s = s + exceptionMsg; } toast(s); } public static void toast(int resId, String exceptionMsg) { String s = App.ctx.getString(resId); toast(s, exceptionMsg); } public static void toast(Context cxt, int id) { Toast.makeText(cxt, id, Toast.LENGTH_SHORT).show(); } public static void toastLong(Context cxt, int id) { Toast.makeText(cxt, id, Toast.LENGTH_LONG).show(); } public static ProgressDialog showHorizontalDialog(Activity activity) { //activity = modifyDialogContext(activity); ProgressDialog dialog = new ProgressDialog(activity); dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); dialog.setCancelable(true); if (activity.isFinishing() == false) { dialog.show(); } return dialog; } public static int currentSecs() { int l; l = (int) (new Date().getTime() / 1000); return l; } public static String md5(String string) { byte[] hash = null; try { hash = string.getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("Huh,UTF-8 should be supported?", e); } return computeMD5(hash); } public static String computeMD5(byte[] input) { try { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(input, 0, input.length); byte[] md5bytes = md.digest(); StringBuffer hexString = new StringBuffer(); for (int i = 0; i < md5bytes.length; i++) { String hex = Integer.toHexString(0xff & md5bytes[i]); if (hex.length() == 1) hexString.append('0'); hexString.append(hex); } return hexString.toString(); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } } public static boolean doubleEqual(double a, double b) { return Math.abs(a - b) < 1E-8; } public static String getPrettyDistance(double distance) { if (distance < 1000) { int metres = (int) distance; return String.valueOf(metres) + App.ctx.getString(R.string.discover_metres); } else { String num = String.format("%.1f", distance / 1000); return num + App.ctx.getString(R.string.utils_kilometres); } } public static ProgressDialog showSpinnerDialog(Activity activity) { //activity = modifyDialogContext(activity); ProgressDialog dialog = new ProgressDialog(activity); dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); dialog.setCancelable(true); dialog.setMessage(App.ctx.getString(R.string.chat_utils_hardLoading)); if (!activity.isFinishing()) { dialog.show(); } return dialog; } public static boolean filterException(Exception e) { if (e != null) { toast(e.getMessage()); return false; } else { return true; } } }
[ "1763683540@qq.com" ]
1763683540@qq.com
f449828dd44b207778283561e3cebdbcea97e618
4537c0ffcc36a8f1139cd3fb695067d6dad7400c
/PrizeFactoryTest_M/src/com/prize/factorytest/LCD/LCD.java
976f64bb0934034964bd24410b1121192737fff4
[]
no_license
lesching2014/programmer
a3fc29191f4777f3d7a7a8083be56664cccf2cc9
12d1671a7076ecf6cf7de434afa6fba95aa780cf
refs/heads/master
2023-08-02T05:38:43.224712
2019-03-29T09:53:27
2019-03-29T09:53:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,436
java
package com.prize.factorytest.LCD; import java.io.InputStream; import com.prize.factorytest.R; import com.prize.factorytest.PrizeFactoryTestListActivity; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.os.PowerManager; import android.view.MotionEvent; import android.view.View; import android.view.WindowManager; import android.widget.Button; import android.widget.LinearLayout; import android.view.KeyEvent; public class LCD extends Activity { private static Handler mHandler; private int brightnessState = 0, imgSeq = 0; private float mBrightness = 1.0f; float x = 0, y = 0; WindowManager.LayoutParams mLayoutParams; private boolean ifLocked = false; private PowerManager.WakeLock mWakeLock; private PowerManager mPowerManager; private LinearLayout mLinearLayout; private int[] mTestImg = { R.drawable.lcm_red, R.drawable.lcm_green, R.drawable.lcm_blue, R.drawable.lcm_black, R.drawable.lcm_black_white_lump,R.drawable.lcm_girl_01, R.drawable.lcm_girl_02,R.drawable.lcm_girl_08 }; @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK){ return true; } return false; } @SuppressWarnings("deprecation") @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.lcd); mLayoutParams = getWindow().getAttributes(); mLayoutParams.screenBrightness = 1; getWindow().setAttributes(mLayoutParams); mLinearLayout = (LinearLayout) findViewById(R.id.myLinearLayout1); mPowerManager = (PowerManager) getSystemService(Context.POWER_SERVICE); mWakeLock = mPowerManager.newWakeLock( PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "BackLight"); startHandler(); } public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case 0: { if (imgSeq <= mTestImg.length) { Message message = new Message(); message.what = imgSeq; mHandler.sendMessage(message); break; } else { imgSeq = mTestImg.length; break; } } } return super.onTouchEvent(event); } void startHandler() { mHandler = new Handler() { @SuppressWarnings("deprecation") @Override public void handleMessage(Message msg) { switch (msg.what) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: if (brightnessState == 0) { //mBrightness = 0.01f; mBrightness = 1.0f; brightnessState = 1; } else { mBrightness = 1.0f; brightnessState = 0; } try { BitmapFactory.Options option = new BitmapFactory.Options(); option.inPreferredConfig = Config.ARGB_8888; option.inPurgeable = true; option.inInputShareable = true; InputStream mInputSream = getResources() .openRawResource(mTestImg[imgSeq]); Bitmap bitmap = BitmapFactory.decodeStream(mInputSream, null, option); BitmapDrawable bitmapDrawable = new BitmapDrawable( bitmap); mLinearLayout.setBackgroundDrawable(bitmapDrawable); } catch (Exception e) { e.printStackTrace(); } imgSeq++; mLayoutParams = getWindow().getAttributes(); mLayoutParams.screenBrightness = mBrightness; getWindow().setAttributes(mLayoutParams); if (imgSeq < mTestImg.length) { } else { imgSeq = 0; confirmButton(); } break; default: break; } super.handleMessage(msg); } }; } public void start() { mHandler.removeCallbacks(mRunnable); mHandler.postDelayed(mRunnable, 0); } private Runnable mRunnable = new Runnable() { @SuppressWarnings("deprecation") public void run() { imgSeq++; if (brightnessState == 0) { mBrightness = 0.01f; brightnessState = 1; } else { mBrightness = 1.0f; brightnessState = 0; } try { BitmapFactory.Options option = new BitmapFactory.Options(); option.inPreferredConfig = Config.ARGB_8888; option.inPurgeable = true; option.inInputShareable = true; InputStream mInputSream = getResources().openRawResource( mTestImg[imgSeq]); Bitmap bitmap = BitmapFactory.decodeStream(mInputSream, null, option); BitmapDrawable bitmapDrawable = new BitmapDrawable(bitmap); mLinearLayout.setBackgroundDrawable(bitmapDrawable); } catch (Exception e) { e.printStackTrace(); } mLayoutParams = getWindow().getAttributes(); mLayoutParams.screenBrightness = mBrightness; getWindow().setAttributes(mLayoutParams); if (imgSeq < mTestImg.length) { } else { imgSeq = 0; confirmButton(); } if (imgSeq != 0) { mHandler.postDelayed(mRunnable, 1000); } System.gc(); } }; public void confirmButton() { setContentView(R.layout.lcd_confirm); final Button buttonPass = (Button) findViewById(R.id.passButton); final Button buttonFail = (Button) findViewById(R.id.failButton); buttonPass.setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View arg0) { if (PrizeFactoryTestListActivity.toStartAutoTest == true) { PrizeFactoryTestListActivity.itempos++; } setResult(RESULT_OK); finish(); } }); buttonFail.setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View arg0) { if (PrizeFactoryTestListActivity.toStartAutoTest == true) { PrizeFactoryTestListActivity.itempos++; } setResult(RESULT_CANCELED); finish(); } }); } @Override protected void onResume() { wakeLock(); super.onResume(); } @Override protected void onPause() { wakeUnlock(); super.onPause(); mHandler.removeCallbacks(mRunnable); setResult(RESULT_CANCELED); } private void wakeLock() { if (!ifLocked) { ifLocked = true; mWakeLock.acquire(); } } private void wakeUnlock() { if (ifLocked) { mWakeLock.release(); ifLocked = false; } } }
[ "1601523436@qq.com" ]
1601523436@qq.com
7fd89d4f3f92c40839727277ea24986f9ab45817
40380569ec911d82a356ae6e3cdd1428864de2e1
/springboot-project-dao-annotation/src/main/java/com/kinnylee/SpringbootProjectDaoApplication.java
c46831e9122e259d2c1efc2e4d9cbdfe291f09ad
[]
no_license
kinnylee/springboot-project-sample
d6272f9bd339b2a13d11e3f5f13404b679d29713
15fccc9c9b63ec446cb94fe37dab167693009045
refs/heads/master
2020-04-02T09:41:00.150594
2019-03-06T14:15:24
2019-03-06T14:15:24
154,304,293
0
0
null
null
null
null
UTF-8
Java
false
false
144
java
package com.kinnylee; /** * @author lijl-c */ public class SpringbootProjectDaoApplication { public static void main(String[] args) { } }
[ "lijl-c@glodon.com" ]
lijl-c@glodon.com
db526f10999ec050ed626400b7fa6af2cd453dc5
90929cac4cb67f3318190609e2834110c666658d
/src/main/java/com/yejianfengblue/ldplayer/command/CommandExecutionResult.java
dcb251a91b72d89ee8e948933540ed2ff448af7f
[]
no_license
yejianfengblue/ldplayer
9227da0389ee1fa87eb92d5ea6e4e7480d65e838
e3f1f268ccf030bf5b5f7e5a899150c57f2328f8
refs/heads/master
2023-02-28T17:53:29.867325
2021-02-07T02:30:58
2021-02-07T02:30:58
301,951,966
2
1
null
null
null
null
UTF-8
Java
false
false
190
java
package com.yejianfengblue.ldplayer.command; import lombok.Value; import java.util.List; @Value public class CommandExecutionResult { int exitValue; List<String> outputLines; }
[ "yejianfengblue@163.com" ]
yejianfengblue@163.com
c29c1946a241b6d8b86170295b03ca0b518ed65e
d46c7d839a7129a221b0b3e9a190b6f715956c7c
/console-adapter/src/main/java/com/poetry/infra/ConsoleAdapter.java
8572b1bb2422a7d7d68493a84e572d7d34297060
[]
no_license
BasavarajuDesai/java-hexagonal
1262cc1b41bdcdc9c31b0ee14f16f25524665ef7
9ed3b41b9b5b644e431ec6ccb7a8be20f1fe837d
refs/heads/master
2020-04-22T22:02:02.329896
2019-02-04T05:23:41
2019-02-04T05:23:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
704
java
package com.poetry.infra; import com.poetry.port.RequestVerse; /** * Created by Paul * * @author <a href="mailto:paul58914080@gmail.com">Paul Williams</a> */ public class ConsoleAdapter { private RequestVerse poetryReader; private WriteLine publicationStrategy; public ConsoleAdapter(RequestVerse poetryReader) { this(poetryReader, new WriteLine() {}); } public ConsoleAdapter(RequestVerse poetryReader, WriteLine publicationStrategy) { this.poetryReader = poetryReader; this.publicationStrategy = publicationStrategy; } public void ask() { this.publicationStrategy.writeLine("Poem: " + this.poetryReader.giveMeSomePoetry()); } }
[ "paul58914080@gmail.com" ]
paul58914080@gmail.com
9cede23456c7a028b52711bd4762c3f969cd14f1
d6d5731f30d3eaf62c552d81e935dfac79a65f6a
/src/visao/Principal.java
8e4c23e094e6825b2fb205186da58ee3a587127a
[]
no_license
Davi-o/JavaSwing-Aula-3
01121ca304d5fc5f812de3bfc9852e0398a4c9fb
91f68f5a8a3390c255c33bafbcd87b7094ad717c
refs/heads/master
2020-04-28T16:39:31.855371
2019-03-13T14:46:19
2019-03-13T14:46:19
175,419,715
0
0
null
null
null
null
UTF-8
Java
false
false
851
java
package visao; import modelo.Calculadora; import javax.swing.JOptionPane; /** * * @author Davi Alves - 10:40 * @since 13/03/2019 * @version 1.0 Arya Version */ public class Principal { public static void main(String[] args) { Calculadora calc = new Calculadora(); calc.setNum1(Double.parseDouble(JOptionPane.showInputDialog(null, "Insira o primeiro valor"))); calc.setNum2(Double.parseDouble(JOptionPane.showInputDialog(null, "Insira o segundo valor"))); int op = JOptionPane.showConfirmDialog(null, "Você deseja ver o resultado?", "Pergunta",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE); if(op == 0){ JOptionPane.showMessageDialog(null, calc.toString()); }else{ JOptionPane.showMessageDialog(null, "Talkei"); } } }
[ "103@qi" ]
103@qi
39b6379aed50de8dca768ef5741476f0253b7151
33e102f485a70bc24c051099a8f8a6ba8857d5bc
/server/regtest/src/test/java/org/hyperledger/account/AccountOperationsInBlocksTest.java
0c90034485f9df452d16b2205013a20bdf244092
[ "Apache-2.0", "MIT" ]
permissive
greathjt/hlp-candidate
42196e728f42d07591fc5fe8ec91f5ebc5d26eb0
831d19ede4008655ad5d489c1e2c1e16e5437fd7
refs/heads/master
2021-01-21T01:11:18.685171
2016-02-29T20:03:42
2016-02-29T21:40:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,967
java
/** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.hyperledger.account; import com.typesafe.config.ConfigFactory; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.hyperledger.api.BCSAPI; import org.hyperledger.common.Address; import org.hyperledger.common.MasterPrivateKey; import org.hyperledger.common.PrivateKey; import org.hyperledger.common.Transaction; import org.hyperledger.test.RegtestRule; import org.hyperledger.test.TestServer; import org.junit.BeforeClass; import org.junit.ClassRule; import org.junit.Test; import java.security.Security; import static org.hyperledger.account.ActionWaiter.*; import static org.junit.Assert.assertEquals; public class AccountOperationsInBlocksTest { @BeforeClass public static void init() { Security.addProvider(new BouncyCastleProvider()); } @ClassRule public static RegtestRule regtestRule = new RegtestRule(ConfigFactory.parseResources("test-config.json")); @Test public void sendToAddressTest() throws Exception { BCSAPI api = regtestRule.getBCSAPI(); TestServer testServer = regtestRule.getTestServer(); ConfirmationManager confirmationManager = new ConfirmationManager(); confirmationManager.init(api, 101); KeyListChain senderKeyChain = new KeyListChain(PrivateKey.createNew(true)); UIAddress senderAddress = new UIAddress(UIAddress.Network.TEST, senderKeyChain.getNextReceiverAddress()); BaseAccount senderAccount = new BaseAccount(senderKeyChain); senderAccount.sync(api); api.registerTransactionListener(senderAccount); confirmationManager.addConfirmationListener(senderAccount); ActionWaiter.execute(() -> testServer.sendTo(senderAddress.toString(), 100000000), expected(senderAccount, 2)); assertEquals("Incorrect balance", 100000000, senderAccount.getCoins().getTotalSatoshis()); assertEquals("Incorrect confirmed", 100000000, senderAccount.getConfirmedCoins().getTotalSatoshis()); Address receiverAddress = PrivateKey.createNew().getAddress(); ReadOnlyAccount receiverAccount = new BaseReadOnlyAccount(new AddressListChain(receiverAddress)); api.registerTransactionListener(receiverAccount); confirmationManager.addConfirmationListener(receiverAccount); TransactionFactory factory = new BaseTransactionFactory(senderAccount); Transaction tx = factory.propose(receiverAddress, 30000).sign(senderKeyChain); ActionWaiter.execute(() -> api.sendTransaction(tx), expectedOneOnEach(senderAccount, receiverAccount)); assertEquals("Incorrect balance", 30000, receiverAccount.getCoins().getTotalSatoshis()); assertEquals("Incorrect receiving", 30000, receiverAccount.getReceivingCoins().getTotalSatoshis()); assertEquals("Incorrect balance", 99965000, senderAccount.getCoins().getTotalSatoshis()); assertEquals("Incorrect change", 99965000, senderAccount.getChangeCoins().getTotalSatoshis()); ActionWaiter.execute(() -> testServer.mineOneBlock(), expectedOne(senderAccount)); assertEquals("Incorrect balance", 99965000, senderAccount.getCoins().getTotalSatoshis()); assertEquals("Incorrect confirmed", 99965000, senderAccount.getConfirmedCoins().getTotalSatoshis()); ActionWaiter.execute(() -> receiverAccount.sync(api), expectedOne(receiverAccount)); assertEquals("Incorrect balance", 30000, receiverAccount.getCoins().getTotalSatoshis()); assertEquals("Incorrect confirmed", 30000, receiverAccount.getConfirmedCoins().getTotalSatoshis()); // multisig MasterPrivateKey m1 = MasterPrivateKey.createNew(); MasterPrivateKey m2 = MasterPrivateKey.createNew(); MultiSigKeyChain multiChain = new MultiSigMasterChain(2, m1, m2); BaseTransactionFactory multiCoins = new BaseTransactionFactory(new BaseAccount(multiChain)); ReadOnlyAccount multiCoinsAccount = multiCoins.getAccount(); api.registerTransactionListener(multiCoinsAccount); confirmationManager.addConfirmationListener(multiCoinsAccount); Transaction multiFunding = factory.propose(multiChain.getNextReceiverAddress(), 1000000).sign(senderKeyChain); ActionWaiter.execute(() -> api.sendTransaction(multiFunding), expectedOneOnEach(senderAccount, multiCoinsAccount)); ActionWaiter.execute(() -> testServer.mineOneBlock(), expectedOne(multiCoinsAccount)); assertEquals(1000000, multiCoinsAccount.getCoins().getTotalSatoshis()); MasterPrivateKey m3 = MasterPrivateKey.createNew(); MasterPrivateKey m4 = MasterPrivateKey.createNew(); MultiSigKeyChain otherChain = new MultiSigMasterChain(2, m3, m4); BaseTransactionFactory otherCoins = new BaseTransactionFactory(new BaseAccount(otherChain)); ReadOnlyAccount otherCoinsAccount = otherCoins.getAccount(); api.registerTransactionListener(otherCoinsAccount); confirmationManager.addConfirmationListener(otherCoinsAccount); Transaction toOther = multiCoins.propose(otherChain.getNextReceiverAddress(), 500000).sign(multiChain); ActionWaiter.execute(() -> api.sendTransaction(toOther), expectedOne(otherCoinsAccount)); ActionWaiter.execute(() -> testServer.mineOneBlock(), expectedOne(otherCoinsAccount)); assertEquals(500000, otherCoinsAccount.getCoins().getTotalSatoshis()); } }
[ "tamas.blummer@digitalasset.com" ]
tamas.blummer@digitalasset.com
8f7147b503982c8a74f8bfa7903b69fa1e216091
a128b5066df3fa67b352970d8bb1f32dd9788626
/ProyectoWAD/src/java/paquete/ActionCrearPregunta.java
c20b510548613a4d91ed6fd640ab3d1c106f4cdb
[]
no_license
leafar5645/WAD
442f967fde0e67a4c8ede3a8a5c6ac9e72bbc31c
cd3d396d405d0be82d8bb306cc960fd64ab009b4
refs/heads/master
2021-08-18T08:23:20.591214
2019-06-05T17:02:44
2019-06-05T17:02:44
180,434,072
0
0
null
2021-06-16T00:38:07
2019-04-09T19:15:46
JavaScript
UTF-8
Java
false
false
2,740
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 paquete; import com.opensymphony.xwork2.ActionSupport; import entity.Usuarios; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileWriter; import java.io.InputStream; import java.io.StringBufferInputStream; import javax.servlet.http.HttpSession; import org.apache.struts2.ServletActionContext; import org.jdom.Document; import org.jdom.Element; import org.jdom.input.SAXBuilder; import org.jdom.output.Format; import org.jdom.output.XMLOutputter; public class ActionCrearPregunta extends ActionSupport { private String pregunta; InputStream responseStream; public String getPregunta() { return pregunta; } public void setPregunta(String pregunta) { this.pregunta = pregunta; } public InputStream getResponseStream() { return responseStream; } public void setResponseStream(InputStream responseStream) { this.responseStream = responseStream; } public ActionCrearPregunta() { } public String execute() throws Exception { HttpSession sesion=ServletActionContext.getRequest().getSession(); Usuarios us =(Usuarios)sesion.getAttribute("user"); int id =us.getId(); // System.out.println("" + id); String path=ServletActionContext.getServletContext().getRealPath("/xml"); path=path + "/banco.xml"; System.out.println("" + path); XMLOutputter xmlout= new XMLOutputter(); Document doc = new Document(); File fXmlFile = new File(path); SAXBuilder builder = new SAXBuilder(); doc=builder.build(fXmlFile); //System.out.println("-----------------llegue" ); InputStream stream = new ByteArrayInputStream(pregunta.getBytes("UTF-8")); // System.out.println("----" + pregunta); Document Dpregunta = builder.build(stream); Element newPregunta=Dpregunta.getRootElement(); Element newPregunta2=(Element)newPregunta.clone(); newPregunta2.detach(); newPregunta2.setAttribute("idcreador", ""+id); Element root=doc.getRootElement(); root.addContent(newPregunta2); Format f = Format.getPrettyFormat(); f.setEncoding("ISO-8859-1"); xmlout.setFormat(f); xmlout.output(doc,new FileWriter(path)); xmlout.output(doc,System.out); String respuesta="listo"; responseStream = new StringBufferInputStream(respuesta); return SUCCESS; } }
[ "rafassassinscreed@gmail.com" ]
rafassassinscreed@gmail.com
22b66487713df0d71df78d596342f317ba064fa7
ff3f9815dd36f6546ea552eb6c074e101a736832
/android/app/src/main/java/com/bluetoothplayground/bluetooth/module/discover/DiscoverDevices.java
8d3b3258649ade3700763b6cad58ff59d2b73d59
[]
no_license
pzdralewicz/RN-Bluetooth-Playground
032a5ad5d646244ff52b9e12a87899a3c440a293
5eb1b1226220400c581ba9d0750e5839a263218c
refs/heads/master
2022-12-13T17:15:47.380376
2020-09-16T20:30:38
2020-09-16T20:30:38
272,208,124
0
0
null
null
null
null
UTF-8
Java
false
false
2,431
java
package com.bluetoothplayground.bluetooth.module.discover; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Build.VERSION_CODES; import android.util.Log; import androidx.annotation.RequiresApi; import com.bluetoothplayground.bluetooth.BluetoothDeviceMapFactory; import com.facebook.react.bridge.Promise; import com.facebook.react.bridge.ReactContext; import java.util.HashSet; import java.util.Set; public class DiscoverDevices { private final ReactContext reactContext; private final BluetoothAdapter bluetoothAdapter; public DiscoverDevices(ReactContext reactContext) { this.reactContext = reactContext; this.bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); } public void findBLEDevices(Promise promise) { bluetoothAdapter.startDiscovery(); discoverDevices(promise); } private void discoverDevices(Promise promise) { IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(BluetoothDevice.ACTION_FOUND); intentFilter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); final BroadcastReceiver deviceDiscoveryReceiver = new BroadcastReceiver() { final Set<BluetoothDevice> bluetoothDeviceList = new HashSet<>(); @RequiresApi(api = VERSION_CODES.JELLY_BEAN_MR2) @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (BluetoothDevice.ACTION_FOUND.equals(action)) { BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); if (device.getType() == BluetoothDevice.DEVICE_TYPE_LE) { bluetoothDeviceList.add(device); } } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) { promise.resolve( BluetoothDeviceMapFactory.queryWritableMapFromDevice(bluetoothDeviceList)); try { reactContext.unregisterReceiver(this); } catch (Exception e) { Log.e("BluetoothModule", "Unable to unregister receiver", e); } } } }; reactContext.registerReceiver(deviceDiscoveryReceiver, intentFilter); } }
[ "szymon.groth@gfactor.pl" ]
szymon.groth@gfactor.pl
9724b853ac6ffb533299f56c9fc9d25bf5811002
e2d354b73423025fc970f12723bade9cc94980c0
/src/Node.java
238487c933abeb7aa8db8031264debac2f132065
[]
no_license
jclinford/A-example
37caf33ab4944fc7d6d31e6c1dd8b16cd0824408
0e403b5e0a29d7129b1f8e624bde45af7343e55f
refs/heads/master
2021-01-22T18:23:23.928963
2012-03-04T22:24:32
2012-03-04T22:24:32
3,616,425
0
0
null
null
null
null
UTF-8
Java
false
false
1,028
java
/** * @author John Linford */ import java.awt.Color; public class Node { public Node(int c, int r) { col = c; row = r; } public int getRow() { return row; } public int getCol() { return col; } public void setCost(int c) { cost = c; } public int getCost() { return cost; } public void setCostFromStart(int c) { costFromStart = c; } public int getCostFromStart() { return costFromStart; } public void setHeuristic(int h) { heuristic = h; } public int getHeuristic() { return heuristic; } public void setCameFrom(Node n) { cameFrom = n; } public Node getCameFrom() { return cameFrom; } private int row; private int col; // A* cost, heuristic and costFromStart and Node that you came from private int cost; private int costFromStart; private int heuristic; private Node cameFrom; public boolean wasVisited = false; public boolean isPath = false; public boolean isWall = false; public boolean isStart = false; public boolean isFinish = false; }
[ "jclinford@gmail.com" ]
jclinford@gmail.com
a8fcac989c5dfdd301c833bb7b0f7ddf5d8a846f
776bebbfa7d4a3d45ba636cfdd42c957d5445d4a
/src/main/java/org/codelabor/example/username/dao/mybatis/MyBatisUsernameDaoImpl.java
b32a76d731429b3f5a79cf16dc897446a00a714f
[ "Apache-2.0" ]
permissive
codelabor/codelabor-web-app-prototype
64964e174d106015a492163402d215436aa2a708
c9c7aca148fbd210e3adc7132c32144a603f0ca7
refs/heads/master
2022-12-23T03:53:39.495953
2020-07-08T05:17:54
2020-07-08T05:17:54
38,967,977
0
1
Apache-2.0
2022-12-16T06:03:23
2015-07-12T16:04:02
Java
UTF-8
Java
false
false
1,201
java
package org.codelabor.example.username.dao.mybatis; import org.codelabor.example.username.dao.UsernameDao; import org.codelabor.example.username.dto.RegistrationFormDto; import org.codelabor.system.security.core.context.SecurityContextHolderUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.stereotype.Service; @Service public class MyBatisUsernameDaoImpl implements UsernameDao { // @Autowired // private SqlSessionTemplate sqlSession; @Autowired private MessageSource messageSource; private final Logger logger = LoggerFactory .getLogger(MyBatisUsernameDaoImpl.class); @Override public int insertRegistrationForm(RegistrationFormDto registrationFormDto) { String username = SecurityContextHolderUtils.getUsername(); logger.debug("username: {}", username); // TODO: String message = messageSource.getMessage("success.create.completed", null, LocaleContextHolder.getLocale()); logger.debug(message); return 1; } }
[ "codelabor@gmail.com" ]
codelabor@gmail.com
487a791c38cb8ca9340142385ccf5de8e882dc99
480318ebcb015ce7a77d32e0465f121a634df09f
/src/main/java/com/jaqp7363/book/config/AuthSuccessHandler.java
06d498d1322911c95e7b4b705aa9eb3ac1858140
[]
no_license
jaqp7363/bookSearch
b2738ec1a55d5a4c105e117b784387ca07914a9a
ab426a0e8619f25eb0fddfe709c95c76deaef6da
refs/heads/master
2020-09-14T16:04:08.298664
2019-11-21T13:37:07
2019-11-21T13:37:07
223,177,420
0
0
null
null
null
null
UTF-8
Java
false
false
1,385
java
package com.jaqp7363.book.config; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.springframework.security.core.Authentication; import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler; import org.springframework.stereotype.Component; @Component public class AuthSuccessHandler extends SimpleUrlAuthenticationSuccessHandler { @Override public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws ServletException, IOException { HttpSession session = request.getSession(); if (session != null) { String redirectUrl = (String) session.getAttribute("prevPage"); if (redirectUrl != null) { session.removeAttribute("prevPage"); getRedirectStrategy().sendRedirect(request, response, redirectUrl); } else { super.onAuthenticationSuccess(request, response, authentication); } } else { super.onAuthenticationSuccess(request, response, authentication); } } }
[ "57783976+jaqp7363@users.noreply.github.com" ]
57783976+jaqp7363@users.noreply.github.com
19fa6a11071215b2b481f8b4e2d016933699d9ba
ccc5322cfb27c71e7838136b7d977182e731456a
/src/main/java/jp/co/soramitsu/iroha/java/debug/Account.java
a1b75c0d7b7fefe16928fdb665aa0cc0ff557f5e
[ "Apache-2.0" ]
permissive
Warchant/iroha-pure-java
697789599922441fe573199342e522b167dc3b1b
dbe4237af422e06a9bed639d386768a9f98b210c
refs/heads/v1.0.0_rc2
2021-07-09T01:33:13.211000
2019-01-25T13:14:26
2019-01-25T13:37:59
136,601,870
9
8
Apache-2.0
2019-01-25T13:38:00
2018-06-08T10:02:29
Java
UTF-8
Java
false
false
388
java
package jp.co.soramitsu.iroha.java.debug; import java.security.KeyPair; import jp.co.soramitsu.crypto.ed25519.Ed25519Sha3; import lombok.Value; @Value public class Account { private static Ed25519Sha3 crypto = new Ed25519Sha3(); private String id; private KeyPair keyPair; public static Account create(String id) { return new Account(id, crypto.generateKeypair()); } }
[ "warchantua@gmail.com" ]
warchantua@gmail.com
fcf80b2bf710fe9c20f244bb4bb6b8916d1e3b69
7a3eba24f4d535e9f4aeb02e0c6813a9848dfebf
/projet-agilite/src/test/java/CompteCreationSteps.java
34e5819ad40b56189cb74c402e0fdb29adab0490
[]
no_license
floflobay/Agilit-
279624688c195a533dcb6716a7c8ab62ffa86f7e
11acab5ac98d59e2dc6286fcbd51535603e82830
refs/heads/master
2020-03-08T05:00:17.885082
2018-06-25T12:45:56
2018-06-25T12:45:56
127,936,782
0
1
null
null
null
null
UTF-8
Java
false
false
2,310
java
import cucumber.api.java.en.Given; import cucumber.api.java.en.Then; import cucumber.api.java.en.When; import static org.junit.Assert.*; /** * @author I83977 * */ public class CompteCreationSteps { private CompteBancaire compte; private CompteBancaire compte2; private Personne proprietaire; private boolean sucess; // public CompteCreationSteps(Listener listener) { // super(listener); // // TODO Auto-generated constructor stub // } @Given("^le gestionnaire veut creer un compte et la banque KN peut utiliser un constructeur de compte\"$") public void le_gestionnaire_veut_creer_un_compte_et_la_banque_KN_peut_utiliser_un_constructeur_de_compte() throws Throwable{ } @When("^j appelle la methode CompteBancaire$") public void j_appelle_la_methode_CompteBancaire () throws Throwable{ compte = new CompteBancaire(); } @Then("^un compte est cree avec le (\\d+.\\d) \\.$") public void un_compte_est_cree_avec_le_solde(double arg1) throws Throwable{ assertNotNull(compte); } @Given("^le gestionnaire veut creer un compte avec le solde desire positif$") public void le_gestionnaire_veut_creer_un_compte_avec_le_solde_desire_positif() throws Throwable { } @When("^j appelle la methode CompteBancaire avec montant initial (\\d+.\\d)$") public void j_appelle_la_methode_CompteBancaire_avec_montant_initial(double arg1) throws Throwable{ compte = new CompteBancaire(arg1); } @Then("^le nouveau compte a un solde (\\d+.\\d) euros\\.$") public void le_nouveau_compte_a_un_solde(double arg1) throws Throwable{ assertEquals(arg1, compte.getSolde(), 0.1); } @Given("^le gestionnaire veut creer un compte avec un solde negatif$") public void le_gestionnaire_veut_creer_un_compte_avec_un_solde_negatif() throws Throwable { } @When("^j appelle la methode CompteBancaire avec montant negatif (-\\d+.\\d)$") public void j_appelle_la_methode_CompteBancaire_avec_montant_negatif (double arg1) throws Throwable{ compte = new CompteBancaire(arg1); } @Then("^le compte ne peut pas etre cree ERROR \"([^\"]*)\"$") public void le_compte_ne_peut_pas_etre_cree_ERROR (String arg1) throws Throwable{ String msg = "impossible de creer un compte avec un solde neagtif"; msg.equals(arg1); } }
[ "fbayeux@gmail.com" ]
fbayeux@gmail.com
0f493b7c8b31179579f10342d74cfc5c371c9285
6ed32b9c157d783ad4b4fa74accfaee4fd63a3a4
/samediff/src/main/java/org/nd4j/autodiff/functions/impl/unary/transform/Sinh.java
3ad9bd0135912f89154b19fb5c839a80363f4652
[ "MIT", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
manaswiv/nd4j
8b59d7c22291838c23b05409e36df8229d5345c3
3d7afd15d3badefdcab891cc6b93f4e7234dca01
refs/heads/master
2021-01-21T13:15:23.048219
2017-09-01T08:32:45
2017-09-01T08:32:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,021
java
package org.nd4j.autodiff.functions.impl.unary.transform; import org.nd4j.autodiff.ArrayField; import org.nd4j.autodiff.functions.AbstractUnaryFunction; import org.nd4j.autodiff.functions.DifferentialFunction; import org.nd4j.autodiff.samediff.SameDiff; import java.util.Collections; import java.util.List; public class Sinh extends AbstractUnaryFunction<ArrayField> { public Sinh(SameDiff sameDiff, DifferentialFunction<ArrayField> i_v, Object[] extraArgs) { super(sameDiff, i_v, extraArgs); } @Override public ArrayField doGetValue() { return a().sinh(arg().getValue(true)); } @Override public List<DifferentialFunction<ArrayField>> diff(List<DifferentialFunction<ArrayField>> i_v) { DifferentialFunction<ArrayField> ret = f().cosh(arg()); arg().setGradient(ret); return Collections.singletonList(ret); } @Override public String functionName() { return new org.nd4j.linalg.api.ops.impl.transforms.Sinh().name(); } }
[ "adam@skymind.io" ]
adam@skymind.io
32c6d0a1f0f6f80d59327b7673910c2666b8aa26
7b82d70ba5fef677d83879dfeab859d17f4809aa
/_part2/framework-generator/src/main/java/cn/backflow/generator/util/paranamer/NullParanamer.java
681f8d2736745ebae22ef2fc41c0255b8fe3d9eb
[ "MIT" ]
permissive
apollowesley/jun_test
fb962a28b6384c4097c7a8087a53878188db2ebc
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
refs/heads/main
2022-12-30T20:47:36.637165
2020-10-13T18:10:46
2020-10-13T18:10:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,273
java
/*** * * Copyright (c) 2007 Paul Hammant * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ package cn.backflow.generator.util.paranamer; import java.lang.reflect.AccessibleObject; /** * Implementation of Paranamer which adheres to the NullObject pattern * * @author Paul Hammant */ public class NullParanamer implements Paranamer { public String[] lookupParameterNames(AccessibleObject methodOrConstructor) { return new String[0]; } public String[] lookupParameterNames(AccessibleObject methodOrConstructor, boolean throwExceptionIfMissing) { if (throwExceptionIfMissing) { throw new ParameterNamesNotFoundException("NullParanamer implementation predictably finds no parameter names"); } return new String[0]; } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
190417a3cbf54aabe42183795e02ab8d76c5a8f9
345f05a61dc9a1ff99e80b5e9357f60fef7fc746
/src/test/java/tz/go/moh/him/nacte/mediator/hrhis/BaseOrchestratorTest.java
8d367c17930b4341c5c20d81fd8f8f43e9d1c305
[]
no_license
SoftmedTanzania/nacte-mediator-hrhis
c58befbf1bb4022212760ad021ba09b7aff0b2bc
9e4de27bd978a682813161518cd5670323355419
refs/heads/development
2023-05-31T14:46:40.715805
2021-07-02T06:52:23
2021-07-02T06:52:23
338,021,181
0
0
null
2021-07-02T06:52:24
2021-02-11T12:21:29
Java
UTF-8
Java
false
false
3,343
java
package tz.go.moh.him.nacte.mediator.hrhis; import akka.actor.ActorSystem; import akka.testkit.JavaTestKit; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.openhim.mediator.engine.MediatorConfig; import org.openhim.mediator.engine.testing.MockLauncher; import org.openhim.mediator.engine.testing.TestingUtils; import tz.go.moh.him.nacte.mediator.hrhis.mock.MockDestination; import java.io.File; import java.io.InputStream; import java.util.LinkedList; import java.util.List; import java.util.Properties; public abstract class BaseOrchestratorTest { /** * Represents the configuration. */ protected static MediatorConfig configuration; /** * Represents the system actor. */ protected static ActorSystem system; /** * Runs cleanup after class execution. */ @AfterClass public static void afterClass() { TestingUtils.clearRootContext(system, configuration.getName()); JavaTestKit.shutdownActorSystem(system); system = null; } /** * Runs initialization before each class execution. */ @BeforeClass public static void beforeClass() { try { configuration = loadConfig(null); system = ActorSystem.create(); } catch (Exception e) { throw new RuntimeException(e); } List<MockLauncher.ActorToLaunch> actorsToLaunch = new LinkedList<>(); actorsToLaunch.add(new MockLauncher.ActorToLaunch("http-connector", MockDestination.class)); TestingUtils.launchActors(system, configuration.getName(), actorsToLaunch); } /** * Loads the mediator configuration. * * @param configPath The configuration path. * @return Returns the mediator configuration. */ public static MediatorConfig loadConfig(String configPath) { MediatorConfig config = new MediatorConfig(); try { if (configPath != null) { Properties props = new Properties(); File conf = new File(configPath); InputStream in = FileUtils.openInputStream(conf); props.load(in); IOUtils.closeQuietly(in); config.setProperties(props); } else { config.setProperties("mediator.properties"); } } catch (Exception e) { throw new RuntimeException(e); } config.setName(config.getProperty("mediator.name")); config.setServerHost(config.getProperty("mediator.host")); config.setServerPort(Integer.parseInt(config.getProperty("mediator.port"))); config.setRootTimeout(Integer.parseInt(config.getProperty("mediator.timeout"))); config.setCoreHost(config.getProperty("core.host")); config.setCoreAPIUsername(config.getProperty("core.api.user")); config.setCoreAPIPassword(config.getProperty("core.api.password")); config.setCoreAPIPort(Integer.parseInt(config.getProperty("core.api.port"))); config.setHeartbeatsEnabled(true); return config; } /** * Runs cleanup after each test execution. */ @After public void after() { } }
[ "ilakozejumanne@gmail.com" ]
ilakozejumanne@gmail.com
944494678b3dccd1754a80264c3ac1b887f68e31
ce70d6f46fc4bbd4cd48c95a94d278a4720de005
/tf_llamapolice/src/main/java/pe/edu/upc/serviceimpl/DenuncianteServiceImpl.java
0782a79200dede81492523bacb45889e3e243605
[]
no_license
juanx2/tf_llamapolice
515c15eb1e04c69c4830bfa264464b8dc2dbdee3
8960c4c0b69b17b2d85d199e86b28ee2c7e1899d
refs/heads/master
2022-11-08T21:23:30.117265
2020-06-19T01:39:24
2020-06-19T01:39:24
273,365,552
0
0
null
null
null
null
UTF-8
Java
false
false
1,672
java
package pe.edu.upc.serviceimpl; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import pe.edu.upc.model.Denunciante; import pe.edu.upc.repository.IDenuncianteRepository; import pe.edu.upc.service.IDenuncianteService; @Service public class DenuncianteServiceImpl implements IDenuncianteService { @Autowired private IDenuncianteRepository dDenunciante; @Override @Transactional public boolean insertar(Denunciante denunciante) { Denunciante objDenunciante = dDenunciante.save(denunciante); if (objDenunciante!=null) return true; else return false; } @Override @Transactional public boolean modificar(Denunciante denunciante) { boolean flag = false; try { dDenunciante.save(denunciante); flag = true; } catch(Exception ex) { System.out.println(ex.getMessage()); } return flag; } @Override @Transactional public void eliminar(int idDenunciante) { dDenunciante.deleteById(idDenunciante); } @Override public Optional<Denunciante> buscarId(int idDenunciante) { return dDenunciante.findById(idDenunciante); } @Override public Optional<Denunciante> listarId(int idDenunciante) { return dDenunciante.findById(idDenunciante); } @Override @Transactional(readOnly=true) public List<Denunciante> listar() { return dDenunciante.findAll(); } @Override public List<Denunciante> buscarNombre(String nombreDenunciante) { return dDenunciante.buscarNombre(nombreDenunciante); } }
[ "PC@DESKTOP-OM53IMJ" ]
PC@DESKTOP-OM53IMJ
911412bef9050566d2de9590108b900ca1ad26ef
3d4a64f00391cb3720439f8276f4cf46bd0bbe84
/StockAnalysis_CANSLIM/src/main/tokyo/createnewDB/impl/buildDB/BuildTokyoDB.java
5af2d19641d95cf68cd299bebc232570f63ff3f8
[]
no_license
vdaytona/StockAnalysis_CANSLIM
bd9bbfbfd3df683f7a6e088977adf08c457acade
ee1c12ec3cc7963da4288ff7e5f540eeb1f094ed
refs/heads/master
2020-05-18T13:25:33.311660
2015-06-12T02:25:23
2015-06-12T02:25:23
18,316,404
0
1
null
null
null
null
UTF-8
Java
false
false
423
java
package impl.buildDB; import impl.download.HistoricalQuoteDownload; //create database on a new warehouse public class BuildTokyoDB { public static void main(String args[]) { // TODO Auto-generated constructor stub // 1.Download list of listed companies //ListOfTSEListedDownloadImpl.start(); // 2.Download historical quotes HistoricalQuoteDownload.start(); } }
[ "daytonaviola@gmail.com" ]
daytonaviola@gmail.com
23350d84c1ed1ae94cecb94c554b53f6fa2dad18
8aece436d93c3c8b300d809e0aafa2ce4b985713
/com.android.dialer/src/com/android/incallui/VideoCallFragment.java
cb8c6449b9db4b497a53c417aa23e8a83c050156
[]
no_license
xjpmauricio/dialer-nougat-release
d571dc1817beb60bdd3fb8743b29676d84dacf7a
eea8846eb16a1ed60f2d97db4291442888f55b1f
refs/heads/master
2021-01-22T23:06:14.019082
2019-04-25T17:54:01
2019-04-25T17:54:01
85,606,453
9
5
null
2019-04-25T18:18:54
2017-03-20T17:31:06
Java
UTF-8
Java
false
false
33,044
java
/* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package com.android.incallui; import android.graphics.Matrix; import android.graphics.Point; import android.graphics.SurfaceTexture; import android.os.Bundle; import android.view.Display; import android.view.LayoutInflater; import android.view.Surface; import android.view.TextureView; import android.view.View; import android.view.ViewGroup; import android.view.ViewStub; import android.view.ViewTreeObserver; import android.widget.FrameLayout; import android.widget.ImageView; import com.android.dialer.R; import com.android.phone.common.animation.AnimUtils; import com.google.common.base.Objects; /** * Fragment containing video calling surfaces. */ public class VideoCallFragment extends BaseFragment<VideoCallPresenter, VideoCallPresenter.VideoCallUi> implements VideoCallPresenter.VideoCallUi { private static final String TAG = VideoCallFragment.class.getSimpleName(); private static final boolean DEBUG = false; /** * Used to indicate that the surface dimensions are not set. */ private static final int DIMENSIONS_NOT_SET = -1; /** * Surface ID for the display surface. */ public static final int SURFACE_DISPLAY = 1; /** * Surface ID for the preview surface. */ public static final int SURFACE_PREVIEW = 2; /** * Used to indicate that the UI rotation is unknown. */ public static final int ORIENTATION_UNKNOWN = -1; // Static storage used to retain the video surfaces across Activity restart. // TextureViews are not parcelable, so it is not possible to store them in the saved state. private static boolean sVideoSurfacesInUse = false; private static VideoCallSurface sPreviewSurface = null; private static VideoCallSurface sDisplaySurface = null; private static Point sDisplaySize = null; /** * {@link ViewStub} holding the video call surfaces. This is the parent for the * {@link VideoCallFragment}. Used to ensure that the video surfaces are only inflated when * required. */ private ViewStub mVideoViewsStub; /** * Inflated view containing the video call surfaces represented by the {@link ViewStub}. */ private View mVideoViews; /** * The {@link FrameLayout} containing the preview surface. */ private View mPreviewVideoContainer; /** * Icon shown to indicate that the outgoing camera has been turned off. */ private View mCameraOff; /** * {@link ImageView} containing the user's profile photo. */ private ImageView mPreviewPhoto; /** * {@code True} when the layout of the activity has been completed. */ private boolean mIsLayoutComplete = false; /** * {@code True} if in landscape mode. */ private boolean mIsLandscape; private int mAnimationDuration; /** * Inner-class representing a {@link TextureView} and its associated {@link SurfaceTexture} and * {@link Surface}. Used to manage the lifecycle of these objects across device orientation * changes. */ private static class VideoCallSurface implements TextureView.SurfaceTextureListener, View.OnClickListener, View.OnAttachStateChangeListener { private int mSurfaceId; private VideoCallPresenter mPresenter; private TextureView mTextureView; private SurfaceTexture mSavedSurfaceTexture; private Surface mSavedSurface; private boolean mIsDoneWithSurface; private int mWidth = DIMENSIONS_NOT_SET; private int mHeight = DIMENSIONS_NOT_SET; /** * Creates an instance of a {@link VideoCallSurface}. * * @param surfaceId The surface ID of the surface. * @param textureView The {@link TextureView} for the surface. */ public VideoCallSurface(VideoCallPresenter presenter, int surfaceId, TextureView textureView) { this(presenter, surfaceId, textureView, DIMENSIONS_NOT_SET, DIMENSIONS_NOT_SET); } /** * Creates an instance of a {@link VideoCallSurface}. * * @param surfaceId The surface ID of the surface. * @param textureView The {@link TextureView} for the surface. * @param width The width of the surface. * @param height The height of the surface. */ public VideoCallSurface(VideoCallPresenter presenter,int surfaceId, TextureView textureView, int width, int height) { Log.d(this, "VideoCallSurface: surfaceId=" + surfaceId + " width=" + width + " height=" + height); mPresenter = presenter; mWidth = width; mHeight = height; mSurfaceId = surfaceId; recreateView(textureView); } /** * Recreates a {@link VideoCallSurface} after a device orientation change. Re-applies the * saved {@link SurfaceTexture} to the * * @param view The {@link TextureView}. */ public void recreateView(TextureView view) { if (DEBUG) { Log.i(TAG, "recreateView: " + view); } if (mTextureView == view) { return; } mTextureView = view; mTextureView.setSurfaceTextureListener(this); mTextureView.setOnClickListener(this); final boolean areSameSurfaces = Objects.equal(mSavedSurfaceTexture, mTextureView.getSurfaceTexture()); Log.d(this, "recreateView: SavedSurfaceTexture=" + mSavedSurfaceTexture + " areSameSurfaces=" + areSameSurfaces); if (mSavedSurfaceTexture != null && !areSameSurfaces) { mTextureView.setSurfaceTexture(mSavedSurfaceTexture); if (createSurface(mWidth, mHeight)) { onSurfaceCreated(); } } mIsDoneWithSurface = false; } public void resetPresenter(VideoCallPresenter presenter) { Log.d(this, "resetPresenter: CurrentPresenter=" + mPresenter + " NewPresenter=" + presenter); mPresenter = presenter; } /** * Handles {@link SurfaceTexture} callback to indicate that a {@link SurfaceTexture} has * been successfully created. * * @param surfaceTexture The {@link SurfaceTexture} which has been created. * @param width The width of the {@link SurfaceTexture}. * @param height The height of the {@link SurfaceTexture}. */ @Override public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width, int height) { boolean surfaceCreated; if (DEBUG) { Log.i(TAG, "onSurfaceTextureAvailable: " + surfaceTexture); } // Where there is no saved {@link SurfaceTexture} available, use the newly created one. // If a saved {@link SurfaceTexture} is available, we are re-creating after an // orientation change. Log.d(this, " onSurfaceTextureAvailable mSurfaceId=" + mSurfaceId + " surfaceTexture=" + surfaceTexture + " width=" + width + " height=" + height + " mSavedSurfaceTexture=" + mSavedSurfaceTexture); Log.d(this, " onSurfaceTextureAvailable VideoCallPresenter=" + mPresenter); if (mSavedSurfaceTexture == null) { mSavedSurfaceTexture = surfaceTexture; surfaceCreated = createSurface(width, height); } else { // A saved SurfaceTexture was found. Log.d(this, " onSurfaceTextureAvailable: Replacing with cached surface..."); mTextureView.setSurfaceTexture(mSavedSurfaceTexture); surfaceCreated = true; } // Inform presenter that the surface is available. if (surfaceCreated) { onSurfaceCreated(); } } private void onSurfaceCreated() { if (mPresenter != null) { mPresenter.onSurfaceCreated(mSurfaceId); } else { Log.e(this, "onSurfaceTextureAvailable: Presenter is null"); } } /** * Handles a change in the {@link SurfaceTexture}'s size. * * @param surfaceTexture The {@link SurfaceTexture}. * @param width The new width. * @param height The new height. */ @Override public void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int width, int height) { // Not handled } /** * Handles {@link SurfaceTexture} destruct callback, indicating that it has been destroyed. * * @param surfaceTexture The {@link SurfaceTexture}. * @return {@code True} if the {@link TextureView} can release the {@link SurfaceTexture}. */ @Override public boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) { /** * Destroying the surface texture; inform the presenter so it can null the surfaces. */ Log.d(this, " onSurfaceTextureDestroyed mSurfaceId=" + mSurfaceId + " surfaceTexture=" + surfaceTexture + " SavedSurfaceTexture=" + mSavedSurfaceTexture + " SavedSurface=" + mSavedSurface); Log.d(this, " onSurfaceTextureDestroyed VideoCallPresenter=" + mPresenter); // Notify presenter if it is not null. onSurfaceDestroyed(); if (mIsDoneWithSurface) { onSurfaceReleased(); if (mSavedSurface != null) { mSavedSurface.release(); mSavedSurface = null; } } return mIsDoneWithSurface; } private void onSurfaceDestroyed() { if (mPresenter != null) { mPresenter.onSurfaceDestroyed(mSurfaceId); } else { Log.e(this, "onSurfaceTextureDestroyed: Presenter is null."); } } /** * Handles {@link SurfaceTexture} update callback. * @param surface */ @Override public void onSurfaceTextureUpdated(SurfaceTexture surface) { // Not Handled } @Override public void onViewAttachedToWindow(View v) { if (DEBUG) { Log.i(TAG, "OnViewAttachedToWindow"); } if (mSavedSurfaceTexture != null) { mTextureView.setSurfaceTexture(mSavedSurfaceTexture); } } @Override public void onViewDetachedFromWindow(View v) {} /** * Retrieves the current {@link TextureView}. * * @return The {@link TextureView}. */ public TextureView getTextureView() { return mTextureView; } /** * Called by the user presenter to indicate that the surface is no longer required due to a * change in video state. Releases and clears out the saved surface and surface textures. */ public void setDoneWithSurface() { Log.d(this, "setDoneWithSurface: SavedSurface=" + mSavedSurface + " SavedSurfaceTexture=" + mSavedSurfaceTexture); mIsDoneWithSurface = true; if (mTextureView != null && mTextureView.isAvailable()) { return; } if (mSavedSurface != null) { onSurfaceReleased(); mSavedSurface.release(); mSavedSurface = null; } if (mSavedSurfaceTexture != null) { mSavedSurfaceTexture.release(); mSavedSurfaceTexture = null; } } private void onSurfaceReleased() { if (mPresenter != null) { mPresenter.onSurfaceReleased(mSurfaceId); } else { Log.d(this, "setDoneWithSurface: Presenter is null."); } } /** * Retrieves the saved surface instance. * * @return The surface. */ public Surface getSurface() { return mSavedSurface; } /** * Sets the dimensions of the surface. * * @param width The width of the surface, in pixels. * @param height The height of the surface, in pixels. */ public void setSurfaceDimensions(int width, int height) { Log.d(this, "setSurfaceDimensions, width=" + width + " height=" + height); mWidth = width; mHeight = height; if (width != DIMENSIONS_NOT_SET && height != DIMENSIONS_NOT_SET && mSavedSurfaceTexture != null) { Log.d(this, "setSurfaceDimensions, mSavedSurfaceTexture is NOT equal to null."); mSavedSurfaceTexture.setDefaultBufferSize(width, height); } } /** * Creates the {@link Surface}, adjusting the {@link SurfaceTexture} buffer size. * @param width The width of the surface to create. * @param height The height of the surface to create. */ private boolean createSurface(int width, int height) { Log.d(this, "createSurface mSavedSurfaceTexture=" + mSavedSurfaceTexture + " mSurfaceId =" + mSurfaceId + " mWidth " + width + " mHeight=" + height); if (width != DIMENSIONS_NOT_SET && height != DIMENSIONS_NOT_SET && mSavedSurfaceTexture != null) { mSavedSurfaceTexture.setDefaultBufferSize(width, height); mSavedSurface = new Surface(mSavedSurfaceTexture); return true; } return false; } /** * Handles a user clicking the surface, which is the trigger to toggle the full screen * Video UI. * * @param view The view receiving the click. */ @Override public void onClick(View view) { if (mPresenter != null) { mPresenter.onSurfaceClick(mSurfaceId); } else { Log.e(this, "onClick: Presenter is null."); } } /** * Returns the dimensions of the surface. * * @return The dimensions of the surface. */ public Point getSurfaceDimensions() { return new Point(mWidth, mHeight); } }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mAnimationDuration = getResources().getInteger(R.integer.video_animation_duration); } /** * Handles creation of the activity and initialization of the presenter. * * @param savedInstanceState The saved instance state. */ @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mIsLandscape = getResources().getBoolean(R.bool.is_layout_landscape); Log.d(this, "onActivityCreated: IsLandscape=" + mIsLandscape); getPresenter().init(getActivity()); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); final View view = inflater.inflate(R.layout.video_call_fragment, container, false); return view; } /** * Centers the display view vertically for portrait orientations. The view is centered within * the available space not occupied by the call card. This is a no-op for landscape mode. * * @param displayVideo The video view to center. */ private void centerDisplayView(View displayVideo) { if (!mIsLandscape) { ViewGroup.LayoutParams p = displayVideo.getLayoutParams(); int height = p.height; float spaceBesideCallCard = InCallPresenter.getInstance().getSpaceBesideCallCard(); // If space beside call card is zeo, layout hasn't happened yet so there is no point // in attempting to center the view. if (Math.abs(spaceBesideCallCard - 0.0f) < 0.0001) { return; } float videoViewTranslation = height / 2 - spaceBesideCallCard / 2; displayVideo.setTranslationY(videoViewTranslation); } } /** * After creation of the fragment view, retrieves the required views. * * @param view The fragment view. * @param savedInstanceState The saved instance state. */ @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); Log.d(this, "onViewCreated: VideoSurfacesInUse=" + sVideoSurfacesInUse); mVideoViewsStub = (ViewStub) view.findViewById(R.id.videoCallViewsStub); } @Override public void onStop() { super.onStop(); Log.d(this, "onStop:"); } @Override public void onPause() { super.onPause(); Log.d(this, "onPause:"); } @Override public void onDestroyView() { super.onDestroyView(); Log.d(this, "onDestroyView:"); } /** * Creates the presenter for the {@link VideoCallFragment}. * @return The presenter instance. */ @Override public VideoCallPresenter createPresenter() { Log.d(this, "createPresenter"); VideoCallPresenter presenter = new VideoCallPresenter(); onPresenterChanged(presenter); return presenter; } /** * @return The user interface for the presenter, which is this fragment. */ @Override public VideoCallPresenter.VideoCallUi getUi() { return this; } /** * Inflate video surfaces. * * @param show {@code True} if the video surfaces should be shown. */ private void inflateVideoUi(boolean show) { int visibility = show ? View.VISIBLE : View.GONE; getView().setVisibility(visibility); if (show) { inflateVideoCallViews(); } if (mVideoViews != null) { mVideoViews.setVisibility(visibility); } } /** * Hides and shows the incoming video view and changes the outgoing video view's state based on * whether outgoing view is enabled or not. */ public void showVideoViews(boolean previewPaused, boolean showIncoming) { inflateVideoUi(true); View incomingVideoView = mVideoViews.findViewById(R.id.incomingVideo); if (incomingVideoView != null) { incomingVideoView.setVisibility(showIncoming ? View.VISIBLE : View.INVISIBLE); } if (mCameraOff != null) { mCameraOff.setVisibility(!previewPaused ? View.VISIBLE : View.INVISIBLE); } if (mPreviewPhoto != null) { mPreviewPhoto.setVisibility(!previewPaused ? View.VISIBLE : View.INVISIBLE); } } /** * Hide all video views. */ public void hideVideoUi() { inflateVideoUi(false); } /** * Cleans up the video telephony surfaces. Used when the presenter indicates a change to an * audio-only state. Since the surfaces are static, it is important to ensure they are cleaned * up promptly. */ @Override public void cleanupSurfaces() { Log.d(this, "cleanupSurfaces"); if (sDisplaySurface != null) { sDisplaySurface.setDoneWithSurface(); sDisplaySurface = null; } if (sPreviewSurface != null) { sPreviewSurface.setDoneWithSurface(); sPreviewSurface = null; } sVideoSurfacesInUse = false; } @Override public ImageView getPreviewPhotoView() { return mPreviewPhoto; } /** * Adjusts the location of the video preview view by the specified offset. * * @param shiftUp {@code true} if the preview should shift up, {@code false} if it should shift * down. * @param offset The offset. */ @Override public void adjustPreviewLocation(boolean shiftUp, int offset) { if (sPreviewSurface == null || mPreviewVideoContainer == null) { return; } // Set the position of the secondary call info card to its starting location. mPreviewVideoContainer.setTranslationY(shiftUp ? 0 : -offset); // Animate the secondary card info slide up/down as it appears and disappears. mPreviewVideoContainer.animate() .setInterpolator(AnimUtils.EASE_OUT_EASE_IN) .setDuration(mAnimationDuration) .translationY(shiftUp ? -offset : 0) .start(); } private void onPresenterChanged(VideoCallPresenter presenter) { Log.d(this, "onPresenterChanged: Presenter=" + presenter); if (sDisplaySurface != null) { sDisplaySurface.resetPresenter(presenter);; } if (sPreviewSurface != null) { sPreviewSurface.resetPresenter(presenter); } } /** * @return {@code True} if the display video surface has been created. */ @Override public boolean isDisplayVideoSurfaceCreated() { boolean ret = sDisplaySurface != null && sDisplaySurface.getSurface() != null; Log.d(this, " isDisplayVideoSurfaceCreated returns " + ret); return ret; } /** * @return {@code True} if the preview video surface has been created. */ @Override public boolean isPreviewVideoSurfaceCreated() { boolean ret = sPreviewSurface != null && sPreviewSurface.getSurface() != null; Log.d(this, " isPreviewVideoSurfaceCreated returns " + ret); return ret; } /** * {@link android.view.Surface} on which incoming video for a video call is displayed. * {@code Null} until the video views {@link android.view.ViewStub} is inflated. */ @Override public Surface getDisplayVideoSurface() { return sDisplaySurface == null ? null : sDisplaySurface.getSurface(); } /** * {@link android.view.Surface} on which a preview of the outgoing video for a video call is * displayed. {@code Null} until the video views {@link android.view.ViewStub} is inflated. */ @Override public Surface getPreviewVideoSurface() { return sPreviewSurface == null ? null : sPreviewSurface.getSurface(); } /** * Changes the dimensions of the preview surface. Called when the dimensions change due to a * device orientation change. * * @param width The new width. * @param height The new height. */ @Override public void setPreviewSize(int width, int height) { Log.d(this, "setPreviewSize: width=" + width + " height=" + height); if (sPreviewSurface != null) { TextureView preview = sPreviewSurface.getTextureView(); if (preview == null ) { return; } // Set the dimensions of both the video surface and the FrameLayout containing it. ViewGroup.LayoutParams params = preview.getLayoutParams(); params.width = width; params.height = height; preview.setLayoutParams(params); if (mPreviewVideoContainer != null) { ViewGroup.LayoutParams containerParams = mPreviewVideoContainer.getLayoutParams(); containerParams.width = width; containerParams.height = height; mPreviewVideoContainer.setLayoutParams(containerParams); } // The width and height are interchanged outside of this method based on the current // orientation, so we can transform using "width", which will be either the width or // the height. Matrix transform = new Matrix(); transform.setScale(-1, 1, width/2, 0); preview.setTransform(transform); } } /** * Sets the rotation of the preview surface. Called when the dimensions change due to a * device orientation change. * * Please note that the screen orientation passed in is subtracted from 360 to get the actual * preview rotation values. * * @param rotation The screen orientation. One of - * {@link InCallOrientationEventListener#SCREEN_ORIENTATION_0}, * {@link InCallOrientationEventListener#SCREEN_ORIENTATION_90}, * {@link InCallOrientationEventListener#SCREEN_ORIENTATION_180}, * {@link InCallOrientationEventListener#SCREEN_ORIENTATION_270}). */ @Override public void setPreviewRotation(int orientation) { Log.d(this, "setPreviewRotation: orientation=" + orientation); if (sPreviewSurface != null) { TextureView preview = sPreviewSurface.getTextureView(); if (preview == null ) { return; } preview.setRotation(orientation); } } @Override public void setPreviewSurfaceSize(int width, int height) { final boolean isPreviewSurfaceAvailable = sPreviewSurface != null; Log.d(this, "setPreviewSurfaceSize: width=" + width + " height=" + height + " isPreviewSurfaceAvailable=" + isPreviewSurfaceAvailable); if (isPreviewSurfaceAvailable) { sPreviewSurface.setSurfaceDimensions(width, height); } } /** * returns UI's current orientation. */ @Override public int getCurrentRotation() { try { return getActivity().getWindowManager().getDefaultDisplay().getRotation(); } catch (Exception e) { Log.e(this, "getCurrentRotation: Retrieving current rotation failed. Ex=" + e); } return ORIENTATION_UNKNOWN; } /** * Changes the dimensions of the display video surface. Called when the dimensions change due to * a peer resolution update * * @param width The new width. * @param height The new height. */ @Override public void setDisplayVideoSize(int width, int height) { Log.v(this, "setDisplayVideoSize: width=" + width + " height=" + height); if (sDisplaySurface != null) { TextureView displayVideo = sDisplaySurface.getTextureView(); if (displayVideo == null) { Log.e(this, "Display Video texture view is null. Bail out"); return; } sDisplaySize = new Point(width, height); setSurfaceSizeAndTranslation(displayVideo, sDisplaySize); } else { Log.e(this, "Display Video Surface is null. Bail out"); } } /** * Determines the size of the device screen. * * @return {@link Point} specifying the width and height of the screen. */ @Override public Point getScreenSize() { // Get current screen size. Display display = getActivity().getWindowManager().getDefaultDisplay(); Point size = new Point(); display.getSize(size); return size; } /** * Determines the size of the preview surface. * * @return {@link Point} specifying the width and height of the preview surface. */ @Override public Point getPreviewSize() { if (sPreviewSurface == null) { return null; } return sPreviewSurface.getSurfaceDimensions(); } /** * Inflates the {@link ViewStub} containing the incoming and outgoing surfaces, if necessary, * and creates {@link VideoCallSurface} instances to track the surfaces. */ private void inflateVideoCallViews() { Log.d(this, "inflateVideoCallViews"); if (mVideoViews == null ) { mVideoViews = mVideoViewsStub.inflate(); } if (mVideoViews != null) { mPreviewVideoContainer = mVideoViews.findViewById(R.id.previewVideoContainer); mCameraOff = mVideoViews.findViewById(R.id.previewCameraOff); mPreviewPhoto = (ImageView) mVideoViews.findViewById(R.id.previewProfilePhoto); TextureView displaySurface = (TextureView) mVideoViews.findViewById(R.id.incomingVideo); Log.d(this, "inflateVideoCallViews: sVideoSurfacesInUse=" + sVideoSurfacesInUse); //If peer adjusted screen size is not available, set screen size to default display size Point screenSize = sDisplaySize == null ? getScreenSize() : sDisplaySize; setSurfaceSizeAndTranslation(displaySurface, screenSize); if (!sVideoSurfacesInUse) { // Where the video surfaces are not already in use (first time creating them), // setup new VideoCallSurface instances to track them. Log.d(this, " inflateVideoCallViews screenSize" + screenSize); sDisplaySurface = new VideoCallSurface(getPresenter(), SURFACE_DISPLAY, (TextureView) mVideoViews.findViewById(R.id.incomingVideo), screenSize.x, screenSize.y); sPreviewSurface = new VideoCallSurface(getPresenter(), SURFACE_PREVIEW, (TextureView) mVideoViews.findViewById(R.id.previewVideo)); sVideoSurfacesInUse = true; } else { // In this case, the video surfaces are already in use (we are recreating the // Fragment after a destroy/create cycle resulting from a rotation. sDisplaySurface.recreateView((TextureView) mVideoViews.findViewById( R.id.incomingVideo)); sPreviewSurface.recreateView((TextureView) mVideoViews.findViewById( R.id.previewVideo)); } // Attempt to center the incoming video view, if it is in the layout. final ViewTreeObserver observer = mVideoViews.getViewTreeObserver(); observer.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { // Check if the layout includes the incoming video surface -- this will only be the // case for a video call. View displayVideo = mVideoViews.findViewById(R.id.incomingVideo); if (displayVideo != null) { centerDisplayView(displayVideo); } mIsLayoutComplete = true; // Remove the listener so we don't continually re-layout. ViewTreeObserver observer = mVideoViews.getViewTreeObserver(); if (observer.isAlive()) { observer.removeOnGlobalLayoutListener(this); } } }); } } /** * Resizes a surface so that it has the same size as the full screen and so that it is * centered vertically below the call card. * * @param textureView The {@link TextureView} to resize and position. * @param size The size of the screen. */ private void setSurfaceSizeAndTranslation(TextureView textureView, Point size) { // Set the surface to have that size. ViewGroup.LayoutParams params = textureView.getLayoutParams(); params.width = size.x; params.height = size.y; textureView.setLayoutParams(params); Log.d(this, "setSurfaceSizeAndTranslation: Size=" + size + "IsLayoutComplete=" + mIsLayoutComplete + "IsLandscape=" + mIsLandscape); // It is only possible to center the display view if layout of the views has completed. // It is only after layout is complete that the dimensions of the Call Card has been // established, which is a prerequisite to centering the view. // Incoming video calls will center the view if (mIsLayoutComplete) { centerDisplayView(textureView); } } }
[ "xjpmauricio@gmail.com" ]
xjpmauricio@gmail.com
faffe5f5437445e5da55f394b2e0743f21060279
037fc4bf2a1ad9da0e0570c30b8cefcfbb8f0ea1
/src/main/java/com/gamaset/crbetadmin/endpoint/BatchEndpoint.java
16ed978a032a6397bd55c76280415d4ee757116e
[]
no_license
gamaset/crbets-admin-api
6de71dff4423119bdebfb937dd40cdd08222c9f2
bf6f5dc65a77a0ee1440565982343fef53f317c5
refs/heads/master
2020-04-27T15:43:30.149346
2019-04-23T22:02:16
2019-04-23T22:02:16
174,457,615
0
0
null
null
null
null
UTF-8
Java
false
false
1,373
java
package com.gamaset.crbetadmin.endpoint; import static org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.gamaset.crbetadmin.executor.TicketUpdateExecutor; import com.gamaset.crbetadmin.repository.BetRepository; import com.gamaset.crbetadmin.repository.EventRepository; import com.gamaset.crbetadmin.service.BetService; @CrossOrigin(origins = "*") @RestController @RequestMapping(value = "/api/v1/batch") public class BatchEndpoint { private BetService betService; private BetRepository betRepository; private EventRepository eventRepository; @Autowired public BatchEndpoint(BetService betService, EventRepository eventRepository, BetRepository betRepository) { this.betService = betService; this.eventRepository = eventRepository; this.betRepository = betRepository; } @PostMapping(value = "/update-ticket-status", produces = APPLICATION_JSON_UTF8_VALUE) public void updateTicketStatusBatch() { Thread t1 = new Thread(new TicketUpdateExecutor(betService, eventRepository, betRepository)); t1.start(); } }
[ "christopherscotini@gmail.com" ]
christopherscotini@gmail.com
5d0720a13b0a22f4fee1caa363f9a227fade923d
a93b5ae769c845a53d3a7fec3a6a31147c0b6520
/2020-09-28/src/lt/vtmc/vaclav/JavaWorkingWithArrays.java
60082d2171704878a5b078ee4e3503b60eff59b9
[]
no_license
ponasvincas/classworks
8404b57ca5d9cba2d4382d8ce1ebbe824463e3c3
ec77bde1bafa1a072ec25cf71744928d52e18bca
refs/heads/master
2022-12-28T09:44:11.122234
2020-10-07T16:59:02
2020-10-07T16:59:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,368
java
package lt.vtmc.vaclav; import java.util.Arrays; public class JavaWorkingWithArrays { public static void main(String[] args) { int[] numbers = {0,1,2,3,4,5,6,7,8,9}; printArray(numbers); int[] otherNumbers = generateArray(5000000); insertElementInArray(otherNumbers, 89); } private static void insertElementInArray(int[] otherNumbers, int number) { double start = System.currentTimeMillis(); int[] newOtherNumbers = new int[otherNumbers.length + 1]; for (int i = 0; i < otherNumbers.length; i++) { newOtherNumbers[i] = otherNumbers[i]; } newOtherNumbers[newOtherNumbers.length - 1] = number; double end = System.currentTimeMillis(); System.out.println("Time: " + (end - start) / 1000); } private static int[] generateArray(int number) { double start = System.currentTimeMillis(); int[] numbers = new int[number]; for(int i = 0; i < numbers.length; i++) { numbers[i] = (int)(Math.random()*100); } double end = System.currentTimeMillis(); System.out.println("Time: " + (end - start) / 1000); return numbers; } private static void printArray(int[] numbers) { // for(int i = 0; i < numbers.length; i++) { // System.out.print(numbers[i] + ", "); // String // } System.out.println("\n" + Arrays.toString(numbers)); // for(int number: numbers) { // foreach // System.out.print(number + ", "); // } } }
[ "Administratorius@DESKTOP-NCUDGGO" ]
Administratorius@DESKTOP-NCUDGGO
bc840866ca01396de7c19a97eeff6aae72ac3fa6
2a86c22390cd4af801e7dc0c1abee363d907a41f
/src/sk/akademiasovy/geometry2D/Rectangle.java
68444892c5ea668bdabc8474f356b6e54ae15346
[]
no_license
akademiasovy/projectGeometry
8ed7f8d43e51da7059f76e291d34467ddc4b435b
5c78eeca29ace09d55104dfd3ab7ea416af04a21
refs/heads/master
2021-05-12T19:23:48.487447
2018-01-12T10:48:45
2018-01-12T10:48:45
117,091,685
0
0
null
null
null
null
UTF-8
Java
false
false
722
java
package sk.akademiasovy.geometry2D; /** * Created by host on 11.1.2018. */ public class Rectangle implements Operation, Diagonal{ private double a; private double b; public Rectangle(double a) { this.a = a; this.b = a; } public Rectangle(double a, double b) { this.a = a; this.b = b; } public Rectangle() { a=b=0; } @Override public double getArea(){ return a*b; } @Override public double getPerimeter(){ return 2*(a+b); } public double getDiagonal(){ return Math.sqrt(a*a+b*b); } public void transpose(){ double temp; temp=a; a=b; b=temp; } }
[ "roland.onofrej@akademiasovy.sk" ]
roland.onofrej@akademiasovy.sk
b43980a0aefe142416050cba0cc62c232a121b68
5fd6e3d9a53e2602929e4373df1922499ad809d6
/src/main/java/al/ikubinfo/internship/freelancer/service/TestService.java
fa6a1e27e38f5a93c3562e788b64f3de5a7b7a87
[]
no_license
aleksanderndoci/intern-freelancer
e5ab5b1f7543cdf141fd48f94af099f01bde6d0b
d1818e53823898bba74674daa95035287d82ead2
refs/heads/master
2023-04-04T01:13:21.969746
2021-02-23T07:56:45
2021-02-23T07:56:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
225
java
package al.ikubinfo.internship.freelancer.service; import al.ikubinfo.internship.freelancer.model.TestModel; public interface TestService { TestModel addTest(TestModel testModel); TestModel findById(Integer id); }
[ "aleksanfer.ndoci@ikubinfo.al" ]
aleksanfer.ndoci@ikubinfo.al
ca6cf6ff0720d3266921ebc84d919b210e4c60cf
e195a007303715cd29599b89725c4720a094c720
/HackerEarth/IsItPossible.java
64c677ec821b68fa08918ec23e57a0a74108abe0
[]
no_license
chiranjeevbitm/Eclipse_programs
4f423148bea5b33c1ec55a868476e41991be8bc4
8266854275bdc0672f4cf6b026562e84b7711bcb
refs/heads/master
2020-03-23T00:22:20.529204
2018-07-13T14:21:25
2018-07-13T14:21:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
512
java
package HackerEarth; import java.io.BufferedReader; import java.io.InputStreamReader; public class IsItPossible { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); for (int i = 0; i < N; i++) { String a = br.readLine(); if (Integer.parseInt(a.substring(a.length() - 1)) % 2 == 0) System.out.println("YES"); else System.out.println("NO"); } br.close(); } }
[ "chiranjeevkumar47@gmail.com" ]
chiranjeevkumar47@gmail.com
f4a04dcba41b922ef2ec7c091d2201463a281af9
9b7dec08a72088c1e8ce518ea28e95810561d1f3
/lwh-springcloud-2020/cloud-consumer-feign-order80/src/main/java/com/lwhtarena/springcloud/OrderFeignMain80.java
be013dbcb86ad5e01497c6e33e059a8b9fd7cce8
[]
no_license
LWHTarena/lwh-example
6c9b763bca5a5a1557a14778a13a8cde1ffeb53e
e74096b50e49ea37b913b967cd3272ae13cda632
refs/heads/master
2022-12-21T09:50:27.766898
2021-05-01T08:31:34
2021-05-01T08:31:34
128,957,310
0
0
null
2022-12-16T15:41:55
2018-04-10T15:41:01
Java
UTF-8
Java
false
false
579
java
package com.lwhtarena.springcloud; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.openfeign.EnableFeignClients; /** * @author liwh * @Title: OrderFeignMain80 * @Package com.lwhtarena.springcloud * @Description: openFeign负载均衡 * @Version 1.0.0 * @date 2020/5/7 13:16 */ @SpringBootApplication @EnableFeignClients public class OrderFeignMain80 { public static void main(String[] args) { SpringApplication.run(OrderFeignMain80.class,args); } }
[ "lwhtarena@163.com" ]
lwhtarena@163.com
04076fb13b2ec92565fd77e548241f16faf3e867
fd5abf321e92d92d45b7ab81de99355c23f24cc2
/snake/src/onlineThread/Sender.java
deb33902d2ff487f91aa5c49b7745fddb10f141a
[]
no_license
Krokofol/OnlineSnake
0d8638b4d8cea40fc69dbe9a32679d17585343ed
b91f7ca77781c43b9faaa565c3c62533cd42f4e0
refs/heads/master
2023-01-23T18:25:57.509370
2020-12-09T04:22:53
2020-12-09T04:22:53
311,066,391
0
0
null
null
null
null
UTF-8
Java
false
false
843
java
package onlineThread; import java.io.IOException; import java.net.DatagramPacket; public class Sender implements Runnable { public void run() { while (true) { String message = "message"; byte[] messByte = message.getBytes(); DatagramPacket sendPacket = new DatagramPacket(messByte, messByte.length, Finder.multicastAddress); try { Finder.socketAddress.send(sendPacket); } catch (IOException e) { e.printStackTrace(); Finder.errorCode = "Send error"; continue; } Finder.cooldownSend = Finder.totalCooldownSend; try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } } } }
[ "45444605+Krokofol@users.noreply.github.com" ]
45444605+Krokofol@users.noreply.github.com
8a630daa0995ed42c7370a47f823588c220a0ebb
5505d69c7bd41ffe898bcff71200a40db461c7fb
/src/com/tutorialspoint/eclipselink/service/EmployeeFindService.java
18e18c3879ed1e2a208ea85c61746f687e28f9fd
[]
no_license
zarimustafa/JpaDemp
7223b4331f6e1dad4286ff3b2437f505ad059ce3
d6f7d57f0b0df1605fb3f370ad0979fd898e956a
refs/heads/master
2020-03-30T19:44:52.286614
2018-10-04T10:44:52
2018-10-04T10:44:52
151,556,315
0
0
null
null
null
null
UTF-8
Java
false
false
764
java
package com.tutorialspoint.eclipselink.service; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import com.tutorialspoint.eclipselink.entity.Employee; public class EmployeeFindService { public static void main(String[] args) { EntityManagerFactory emf = Persistence.createEntityManagerFactory("JpaDemp"); EntityManager manager = emf.createEntityManager(); manager.getTransaction().begin(); Employee e = manager.find(Employee.class, 200); System.out.println("ID - " + e.getId()); System.out.println("Name - " + e.getName()); System.out.println("Salary - " + e.getSal()); System.out.println("Designation - " + e.getDes()); manager.close(); emf.close(); } }
[ "mustafazari8@gmail.com" ]
mustafazari8@gmail.com
512b68df24c17311261168fa6f40547ee3567939
f3fbabb66839e720b7e1712e8dc7711772efa957
/Source/mifi/windows/1.0.0/src/me/kingka/network/configuration/ConfigurationFactory.java
393b6e349f505aa3c965e2a01f2b656354f6ec55
[ "MIT" ]
permissive
mizkchen/mifi
1f47cc8c878aee860cf4798286f8c86fb8f9c88c
893696705b4c568c77ebc00d133e58d37a499649
refs/heads/master
2016-09-13T19:10:10.438001
2016-04-28T08:45:36
2016-04-28T08:45:36
57,121,202
0
0
null
null
null
null
UTF-8
Java
false
false
6,139
java
package me.kingka.network.configuration; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import org.apache.commons.codec.binary.StringUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.io.output.ByteArrayOutputStream; import org.apache.log4j.Logger; /** * 配置信息工厂类 * * @author swift.apple */ public class ConfigurationFactory { private Configuration configuration = null; private boolean loaded = false; public boolean isLoaded() { return loaded; } /** * 配置 * * @return */ public Configuration configure() { load(); return configuration; } private String configPath; public String getConfigPath() { return configPath; } /** * 设置配置文件地址 * * @param configPath * @return */ public ConfigurationFactory setConfigPath(String configPath) { this.configPath = configPath; return this; } private final Logger logger = Logger.getLogger(ConfigurationFactory.class); private ConfigurationFactory() { configuration = new Configuration(); } private static ConfigurationFactory instance = null; /** * 获取配置工厂实例 * * @return */ public static synchronized ConfigurationFactory getInstance() { if (instance == null) { instance = new ConfigurationFactory(); } return instance; } /** * 加载配置 * * @return * @throws NullPointerException */ public ConfigurationFactory load() throws NullPointerException { if (loaded) { return this; } if (configPath == null) { throw new NullPointerException("configPath is null"); } String storage = null; int port = -1; String password = null; String host = null; InputStream in = null; ByteArrayOutputStream bos; try { String folder = String.format("%s%s%s", System.getProperty("user.home"), File.separator, "mifi"); String path = String.format("%s%s%s", folder, File.separator, configPath); File f = new File(path); if (!f.exists()) { return this; } in = new FileInputStream(path); bos = new ByteArrayOutputStream(); byte[] bytes = new byte[1024]; int len = -1; while ((len = in.read(bytes)) > 0) { bos.write(bytes, 0, len); } byte[] buffer = bos.toByteArray(); bos.close(); String jsonString = StringUtils.newStringUtf8(buffer); JSONObject object = JSON.parseObject(jsonString); if (object.containsKey("port")) { port = object.getInteger("port"); } if (object.containsKey("password")) { password = object.getString("password"); } if (object.containsKey("storage")) { storage = object.getString("storage"); } if (object.containsKey("host")) { host = object.getString("host"); } configuration.setHost(host); configuration.setPort(port); configuration.setPassword(password); configuration.setStorage(storage); loaded = true; } catch (IOException e) { logger.debug(e); } finally { if (port < 0) { port = 8888; } if (port > 65535) { port = 65535; } if (password == null) { password = ""; } if (storage == null) { storage = System.getProperty("user.home"); } if (host == null) { host = ""; } apply(host, storage, password, port); if (in != null) { try { in.close(); } catch (IOException e) { } } } return this; } /** * 端口 * * @return */ public int port() { if (configuration.getPort() == -1) { load(); } return configuration.getPort(); } /** * 密码 * * @return */ public String password() { if (configuration.getPassword() == null) { load(); } return configuration.getPassword(); } /** * 存储地址 * * @return */ public String storage() { if (configuration.getStorage() == null) { load(); } return configuration.getStorage(); } public ConfigurationFactory apply(String host, String storage, String password, int port) { configuration.setHost(host); configuration.setPort(port); configuration.setPassword(password); configuration.setStorage(storage); return this; } public ConfigurationFactory save() { String config = JSON.toJSONString(configuration); String folder = String.format("%s%s%s", System.getProperty("user.home"), File.separator, "mifi"); File fd = new File(folder); if (!fd.exists()) { fd.mkdirs(); } String path = String.format("%s%s%s", folder, File.separator, configPath); FileOutputStream fos = null; try { fos = new FileOutputStream(path); IOUtils.write(StringUtils.getBytesUtf8(config), fos); } catch (IOException ex) { logger.debug(ex); } finally { if (fos != null) { try { fos.close(); } catch (IOException ex) { logger.debug(ex); } } } return this; } }
[ "heras@vip.qq.com" ]
heras@vip.qq.com
ecbb342402806dc1cfbda7e45b6f0a9ca9917e2b
d9477e8e6e0d823cf2dec9823d7424732a7563c4
/plugins/ShortcutDisplay/tags/rel_1_0/src/shortcutdisplay/SDChangeListener.java
3708695b3657f932484c1f47e9a589458dd1f243
[]
no_license
RobertHSchmidt/jedit
48fd8e1e9527e6f680de334d1903a0113f9e8380
2fbb392d6b569aefead29975b9be12e257fbe4eb
refs/heads/master
2023-08-30T02:52:55.676638
2018-07-11T13:28:01
2018-07-11T13:28:01
140,587,948
1
0
null
null
null
null
UTF-8
Java
false
false
1,004
java
package shortcutdisplay; import javax.swing.event.*; import java.awt.Component; import java.io.*; import java.util.Hashtable; import java.util.Vector; import org.gjt.sp.jedit.*; import org.gjt.sp.jedit.browser.VFSBrowser; import org.gjt.sp.jedit.io.*; import org.gjt.sp.jedit.msg.*; import org.gjt.sp.util.Log; import org.gjt.sp.jedit.gui.*; /** * Description of the Class * *@author jchoyt *@created December 17, 2005 */ public class SDChangeListener implements ChangeListener { /** * Description of the Method * *@param e Description of the Parameter */ public void stateChanged( ChangeEvent e ) { Log.log(Log.DEBUG,this,"got stateChanged event: " + e); ShortcutPrefixActiveEvent evt = ( ShortcutPrefixActiveEvent ) e; if ( evt.getActive() == true ) { ShortcutDisplay.displayShortcuts( evt.getBindings() ); } else { ShortcutDisplay.disposeShortcuts(); } } }
[ "nobody@6b1eeb88-9816-0410-afa2-b43733a0f04e" ]
nobody@6b1eeb88-9816-0410-afa2-b43733a0f04e
52fe7ad8115f97753335f55544b90aa9067ed565
c1cfb7fbc2a22cfde6f225aeb731f4ff5b11ce91
/07-LinkedList/Testing/Node2.java
b8a11997a5e023318e0cc265b95072f202fe3acb
[]
no_license
lulublue98/Homework2
de55162bc1c13233fcaae68e7e024fbf5103864c
07555c9eb5547392c0352a8ebe3eaee02dcccc36
refs/heads/master
2021-01-19T08:56:05.173879
2015-05-14T13:22:11
2015-05-14T13:22:11
30,255,542
0
0
null
null
null
null
UTF-8
Java
false
false
399
java
public class Node { private String data; private Node next; public Node( String s ) { data = s; next = null; } public void setData( String s ) { data = s; } public String getData() { return data; } public void setNext( Node n ) { next = n; } public Node getNext() { return next; } public String toString() { return data; } }
[ "lulu.jiyun.cho@gmail.com" ]
lulu.jiyun.cho@gmail.com
9e800091f18e76161e99a7306a5faf0549529997
27c8ac5e32bb04dfa8dad68796ecbebb3f2897dd
/app/src/main/java/com/clevertap/customhandlingpushnotification/NotificationActivity.java
2c8f577d8a7e002ee4264b3442ba5c52029d3a50
[]
no_license
palashclevertap/custom_handling
dcb18f5d83b3e7158520332b610059c979a03e25
1558f6af7ae3f499369fae8ea7a266d01e8a58f9
refs/heads/master
2021-05-03T06:20:54.818657
2018-02-07T09:22:52
2018-02-07T09:22:52
120,592,396
0
0
null
null
null
null
UTF-8
Java
false
false
446
java
package com.clevertap.customhandlingpushnotification; import android.app.Activity; import android.os.Bundle; import android.support.annotation.Nullable; /** * Created by palashjain on 07/02/18. */ public class NotificationActivity extends Activity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_notification); } }
[ "palashjain@Palashs-MacBook-Air.local" ]
palashjain@Palashs-MacBook-Air.local
353ec8f2110c4cc7c3e3397a8d8800014d30efda
dffad0dfa97c26a72a231ff1060c6adf6f2d4029
/WEB-INF/classes/com/keyword_form/model/Keyword_formDAO_interface.java
3e78e823157dfbeee7e3f495e593d583e4d40999
[]
no_license
Poyaching/TEA102G5_fin
55f7ff476fd6a1a4be928aa3b8f17649e36b1e0e
58b5f3504187a1b57598e2c0df16c3326e2cd2d5
refs/heads/master
2023-03-19T08:21:28.578213
2021-03-17T13:47:53
2021-03-17T13:47:53
348,724,598
0
0
null
null
null
null
UTF-8
Java
false
false
594
java
package com.keyword_form.model; import java.util.List; import java.util.Map; public interface Keyword_formDAO_interface { public void insert(Keyword_formVO keyword_formVO); public void update(Keyword_formVO keyword_formVO); public Keyword_formVO findByPrimaryKey(String keyword_id); public List<Keyword_formVO> getAll(); public void delete(String keyword_id); public List<Keyword_formVO> getKeywordbydate(String startdate, String enddate); public int getKeywordCount(String search_word); public List<Integer> getKeywordCountList(String search_word); }
[ "ching@test.27n5f.ga" ]
ching@test.27n5f.ga
ea6a211f80ac15352bfd340cb9cc26f60b724f01
6176cd53207819f9fb02877f6cfb718d115ab76c
/src/main/java/cn/edu/javase/序列化/Demo1.java
f14296948cb9cb42d8f21478b6aa3d62faac3004
[]
no_license
biaxiao/javalearning
ace12902dd0415f8d9682214ef709683505063af
09c38603ebf9ceed6f339f41cca505a452437fff
refs/heads/master
2021-06-20T23:59:13.754386
2019-07-17T11:49:29
2019-07-17T11:49:29
174,907,274
1
0
null
2020-10-13T12:19:16
2019-03-11T01:56:37
Java
UTF-8
Java
false
false
1,361
java
package cn.edu.javase.序列化; import org.junit.Test; import java.io.*; public class Demo1 implements Serializable{ @Test public void test2() throws IOException, ClassNotFoundException { B b = new B(); b.i = 1; b.s = "a"; //将obj写入文件 FileOutputStream fileOutputStream = new FileOutputStream("temp"); ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream); objectOutputStream.writeObject(b); fileOutputStream.close(); //通过文件读取obj FileInputStream fileInputStream = new FileInputStream("temp"); ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream); B b2 = (B) objectInputStream.readObject(); fileInputStream.close(); System.out.println(b2.i); System.out.println(b2.s); //打印结果为0和null,即初始值,没有被赋值 //0 //null } } class B implements Externalizable { //必须要有公开无参构造函数。否则报错 public B() { } int i; String s; @Override public void writeExternal(ObjectOutput out) throws IOException { } @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { } }
[ "953692809@qq.com" ]
953692809@qq.com
12d5b775b296b2f1bc35f57130a224b8455f1446
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/gradle--gradle/f24146cc5f956a1b03a515bbee4225e6f861b6ab/before/CLangPlugin.java
d8c53ab55d632a30a085c48300967b0adb9e5d9f
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,487
java
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.gradle.language.c.plugins; import com.google.common.collect.Maps; import org.gradle.api.Incubating; import org.gradle.api.Plugin; import org.gradle.api.Project; import org.gradle.internal.service.ServiceRegistry; import org.gradle.language.base.internal.SourceTransformTaskConfig; import org.gradle.language.base.internal.registry.LanguageTransformContainer; import org.gradle.language.base.plugins.ComponentModelBasePlugin; import org.gradle.language.c.CSourceSet; import org.gradle.language.c.internal.DefaultCSourceSet; import org.gradle.language.c.tasks.CCompile; import org.gradle.language.c.tasks.CPreCompiledHeaderCompile; import org.gradle.language.nativeplatform.internal.DependentSourceSetInternal; import org.gradle.language.nativeplatform.internal.NativeLanguageTransform; import org.gradle.language.nativeplatform.internal.PCHCompileTaskConfig; import org.gradle.language.nativeplatform.internal.SourceCompileTaskConfig; import org.gradle.model.Mutate; import org.gradle.model.RuleSource; import org.gradle.nativeplatform.internal.DefaultPreprocessingTool; import org.gradle.nativeplatform.internal.pch.PchEnabledLanguageTransform; import org.gradle.platform.base.ComponentType; import org.gradle.platform.base.TypeBuilder; import java.util.Map; /** * Adds core C language support. */ @Incubating public class CLangPlugin implements Plugin<Project> { public void apply(final Project project) { project.getPluginManager().apply(ComponentModelBasePlugin.class); } @SuppressWarnings("UnusedDeclaration") static class Rules extends RuleSource { @ComponentType void registerLanguage(TypeBuilder<CSourceSet> builder) { builder.defaultImplementation(DefaultCSourceSet.class); builder.internalView(DependentSourceSetInternal.class); } @Mutate void registerLanguageTransform(LanguageTransformContainer languages, ServiceRegistry serviceRegistry) { languages.add(new C()); } } private static class C extends NativeLanguageTransform<CSourceSet> implements PchEnabledLanguageTransform<CSourceSet> { public Class<CSourceSet> getSourceSetType() { return CSourceSet.class; } public Map<String, Class<?>> getBinaryTools() { Map<String, Class<?>> tools = Maps.newLinkedHashMap(); tools.put("cCompiler", DefaultPreprocessingTool.class); return tools; } @Override public String getLanguageName() { return "c"; } public SourceTransformTaskConfig getTransformTask() { return new SourceCompileTaskConfig(this, CCompile.class); } public SourceTransformTaskConfig getPchTransformTask() { return new PCHCompileTaskConfig(this, CPreCompiledHeaderCompile.class); } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
ce797d3f9323145c862c0b323277f0dead3148c0
40665051fadf3fb75e5a8f655362126c1a2a3af6
/ibinti-bugvm/fc03be43f5a999223672bc9d7ca0c0a2488ad7a7/6673/CAMetalLayer.java
6314b821eb1ac3fc32685b38ee8a829e64b42046
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
3,106
java
/* * Copyright (C) 2013-2015 RoboVM AB * * 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.bugvm.apple.coreanimation; /*<imports>*/ import java.io.*; import java.nio.*; import java.util.*; import com.bugvm.objc.*; import com.bugvm.objc.annotation.*; import com.bugvm.objc.block.*; import com.bugvm.rt.*; import com.bugvm.rt.annotation.*; import com.bugvm.rt.bro.*; import com.bugvm.rt.bro.annotation.*; import com.bugvm.rt.bro.ptr.*; import com.bugvm.apple.foundation.*; import com.bugvm.apple.coregraphics.*; import com.bugvm.apple.coreimage.*; import com.bugvm.apple.coretext.*; import com.bugvm.apple.opengles.*; import com.bugvm.apple.metal.*; /*</imports>*/ /*<javadoc>*/ /** * @since Available in iOS 8.0 and later. */ /*</javadoc>*/ /*<annotations>*/@Library("QuartzCore") @NativeClass/*</annotations>*/ /*<visibility>*/public/*</visibility>*/ class /*<name>*/CAMetalLayer/*</name>*/ extends /*<extends>*/CALayer/*</extends>*/ /*<implements>*//*</implements>*/ { /*<ptr>*/public static class CAMetalLayerPtr extends Ptr<CAMetalLayer, CAMetalLayerPtr> {}/*</ptr>*/ /*<bind>*/static { ObjCRuntime.bind(CAMetalLayer.class); }/*</bind>*/ /*<constants>*//*</constants>*/ /*<constructors>*/ public CAMetalLayer() {} protected CAMetalLayer(SkipInit skipInit) { super(skipInit); } /*</constructors>*/ /*<properties>*/ @WeaklyLinked @Property(selector = "device") public native MTLDevice getDevice(); @WeaklyLinked @Property(selector = "setDevice:") public native void setDevice(MTLDevice v); @WeaklyLinked @Property(selector = "pixelFormat") public native MTLPixelFormat getPixelFormat(); @WeaklyLinked @Property(selector = "setPixelFormat:") public native void setPixelFormat(MTLPixelFormat v); @Property(selector = "framebufferOnly") public native boolean isFramebufferOnly(); @Property(selector = "setFramebufferOnly:") public native void setFramebufferOnly(boolean v); @Property(selector = "drawableSize") public native @ByVal CGSize getDrawableSize(); @Property(selector = "setDrawableSize:") public native void setDrawableSize(@ByVal CGSize v); @Property(selector = "presentsWithTransaction") public native boolean presentsWithTransaction(); @Property(selector = "setPresentsWithTransaction:") public native void setPresentsWithTransaction(boolean v); /*</properties>*/ /*<members>*//*</members>*/ /*<methods>*/ @Method(selector = "nextDrawable") public native CAMetalDrawable nextDrawable(); /*</methods>*/ }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
2176083cb5c3db45b6ee46eac6031d68947ac94f
8d7e2ed8dfae44459bf865b4c5090a08f8c3ec94
/src/main/java/com/ambition/agile/modules/consumer/dao/ConsumerDao.java
12abae90a622f364503a21dc8c115935e159f6c3
[]
no_license
hanqingtao/sal_admin
1aac4a9aeccc1e4a20f849ba45d7e248661ac2db
9078204eb5ca25a4c6afa9ddf88e9b2e094e951f
refs/heads/master
2022-12-29T14:34:29.500002
2020-01-04T17:13:56
2020-01-04T17:13:56
122,911,455
0
0
null
2022-12-16T06:11:39
2018-02-26T04:08:29
JavaScript
UTF-8
Java
false
false
438
java
/** * Copyright &copy; 2012-2017 All rights reserved. */ package com.ambition.agile.modules.consumer.dao; import com.ambition.agile.common.persistence.CrudDao; import com.ambition.agile.common.persistence.annotation.MyBatisDao; import com.ambition.agile.modules.consumer.entity.Consumer; /** * 用户信息DAO接口 * @author harry * @version 2018-03-09 */ @MyBatisDao public interface ConsumerDao extends CrudDao<Consumer> { }
[ "hanqingtao@bjadks.com" ]
hanqingtao@bjadks.com
2e8b6dfae49ad8cfc685040924714e0f352719c9
379475071b98bc2946e48f31ef15f577e0e6c05f
/src/main/java/ru/dpoz/socinetw/repository/UserDAO.java
97a368e687bf9e9000b2da5f499db273f63199bb
[]
no_license
notrickyd/ru.dpoz.socinetw
719d0f1c434d308de9c9a085f4f1029815b3882e
285dd9f84c219e4e02bf43f19d30b30f5f4c8a8f
refs/heads/main
2023-08-22T22:51:40.194342
2021-10-14T10:30:37
2021-10-14T10:30:37
412,532,845
0
0
null
null
null
null
UTF-8
Java
false
false
5,755
java
package ru.dpoz.socinetw.repository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; import org.springframework.stereotype.Repository; import ru.dpoz.socinetw.helpers.SqlUtils; import ru.dpoz.socinetw.model.UserEntity; import ru.dpoz.socinetw.repository.intf.User; import java.sql.Types; import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; import java.util.UUID; @Repository("Users") public class UserDAO implements User { @Autowired private NamedParameterJdbcTemplate jdbc; @Override public int hashCode() { return super.hashCode(); } @Override public UUID add(UserEntity user) { UUID newId = UUID.randomUUID(); String SQL_ADD = "insert into users (user_id, first_name, last_name, age, gender, city) " + "values (UNHEX(CONCAT(REPLACE(:uid, '-', ''))), :first, :last, :age, :gender, :city)"; jdbc.update(SQL_ADD, new MapSqlParameterSource() .addValue("uid", newId, Types.VARCHAR) .addValue("first", user.getFirstName(), Types.VARCHAR) .addValue("last", user.getLastName(), Types.VARCHAR) .addValue("age", user.getAge(), Types.SMALLINT) .addValue("gender", user.getGender(), Types.VARCHAR) .addValue("city", user.getCity(), Types.VARCHAR) ); return newId; } @Override public List<UUID> addAll(List<UserEntity> users) { List<UUID> userIds = new ArrayList<>(); String SQL_BULK = "insert into users (user_id, first_name, last_name, age, gender, city) VALUES"; MapSqlParameterSource params = new MapSqlParameterSource(); int i = 0; for (UserEntity u: users) { i++; SQL_BULK += MessageFormat.format("(UNHEX(CONCAT(REPLACE(:uid{0}, '-', ''))), :first{0}, :last{0}, :age{0}, :gender{0}, :city{0}),", Integer.toString(i)); u.setUserId(UUID.randomUUID()); userIds.add(u.getUserId()); params .addValue("uid" + Integer.toString(i), u.getUserId(), Types.VARCHAR) .addValue("first" + Integer.toString(i), u.getFirstName(), Types.VARCHAR) .addValue("last" + Integer.toString(i), u.getLastName(), Types.VARCHAR) .addValue("age" + Integer.toString(i), u.getAge(), Types.SMALLINT) .addValue("gender" + Integer.toString(i), u.getGender(), Types.VARCHAR) .addValue("city" + Integer.toString(i), u.getCity(), Types.VARCHAR); } jdbc.update(SQL_BULK.substring(0, SQL_BULK.length() -1), params); return userIds; } @Override public int count() { String SQL_GET_COUNT = "select count(1) as cnt from users"; return jdbc.queryForObject( SQL_GET_COUNT, new MapSqlParameterSource(), int.class ); } @Override public List<UserEntity> getAll(Integer page) { Integer rowno = page * 100; String SQL_GET_ALL = "select " + "LOWER(CONCAT(" + " LEFT(HEX(user_id), 8), '-', " + " MID(HEX(user_id), 9, 4), '-', " + " MID(HEX(user_id), 13, 4), '-', " + " MID(HEX(user_id), 17, 4), '-', " + " RIGHT(HEX(user_id), 12))) as user_id, " + "age, city, first_name, gender, last_name " + "from users order by first_name, last_name limit " + rowno.toString() + ", 100;"; return jdbc.query( SQL_GET_ALL, new MapSqlParameterSource(), new BeanPropertyRowMapper<>(UserEntity.class) ); } @Override public List<UserEntity> findByName(String first, String last) { first = SqlUtils.prepareParam(first) + '%'; last = SqlUtils.prepareParam(last) + '%'; String SQL_FIND = "select " + "LOWER(CONCAT(" + " LEFT(HEX(user_id), 8), '-', " + " MID(HEX(user_id), 9, 4), '-', " + " MID(HEX(user_id), 13, 4), '-', " + " MID(HEX(user_id), 17, 4), '-', " + " RIGHT(HEX(user_id), 12))) as user_id, " + "age, city, first_name, gender, last_name " + "from users where first_name like :first and last_name like :last order by user_id"; return jdbc.query( SQL_FIND, new MapSqlParameterSource().addValue("first", first, Types.VARCHAR).addValue("last", last, Types.VARCHAR), new BeanPropertyRowMapper<>(UserEntity.class) ); } @Override public UserEntity get(UUID userId) { String SQL_GET = "select " + "LOWER(CONCAT(" + " LEFT(HEX(user_id), 8), '-', " + " MID(HEX(user_id), 9, 4), '-', " + " MID(HEX(user_id), 13, 4), '-', " + " MID(HEX(user_id), 17, 4), '-', " + " RIGHT(HEX(user_id), 12))) as user_id, " + "age, city, first_name, gender, last_name " + "from users where user_id = UNHEX(CONCAT(REPLACE(:uid, '-', '')))"; return jdbc.queryForObject( SQL_GET, new MapSqlParameterSource().addValue("uid", userId, Types.VARCHAR), new BeanPropertyRowMapper<>(UserEntity.class) ); } }
[ "dmitry.pozhitkov@megafon.ru" ]
dmitry.pozhitkov@megafon.ru
a66c8e26d94590e49e2cb6ef2c4811fb4bebf611
1982066f9a6e391eb0c231770728e3feb7892625
/JAXWSSpringServer/src/main/java/ru/itis/Publisher.java
2229d74f5b50d4782112a8ba0585e015bf6cff06
[]
no_license
DimAce74/Education
e284574bc5443864c90bc67cfba940ee93fd892f
6e5b0fa39a9ca2c56ce1a0aa87b5f87663f1731e
refs/heads/master
2021-01-12T08:07:40.411752
2017-05-22T18:45:06
2017-05-22T18:45:06
76,480,664
1
1
null
null
null
null
UTF-8
Java
false
false
376
java
package ru.itis; import ru.itis.services.AutoServiceImpl; import ru.itis.services.UserServiceImpl; import javax.xml.ws.Endpoint; public class Publisher { public static void main(String[] args) { Endpoint.publish("http://localhost:8081/ws/autos", new AutoServiceImpl()); Endpoint.publish("http://localhost:8081/ws/users", new UserServiceImpl()); } }
[ "dimaswg@mail.ru" ]
dimaswg@mail.ru
e67bbcadba6441d6b67602e4f09c378a573a9584
b83d5e7b381168979ed1bcad3e2d37cc4547c8a1
/uaa/src/main/java/me/tdcarefor/tdcloud/uaa/util/CheckoutUtil.java
67db8eed5c8e5d40a24e96bf00aded3ff3a67db6
[]
no_license
milesxiao/micro
152ceaa9393055b8f806c00790156e874fe19c55
12d496e96848a5d448df51378d9e067be115ec93
refs/heads/master
2021-08-17T09:04:23.099084
2017-11-21T01:28:15
2017-11-21T01:28:15
111,386,144
0
0
null
null
null
null
UTF-8
Java
false
false
2,361
java
package me.tdcarefor.tdcloud.uaa.util; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; /** * Created by xsx on 2017/8/21. */ public class CheckoutUtil { // // 与接口配置信息中的Token要一致 // private static String token = "Javen"; /** * 验证签名 * * @param signature * @param timestamp * @param nonce * @return */ public static boolean checkSignature(String token, String signature, String timestamp, String nonce) { String[] arr = new String[] { token, timestamp, nonce }; // 将token、timestamp、nonce三个参数进行字典序排序 // Arrays.sort(arr); sort(arr); StringBuilder content = new StringBuilder(); for (int i = 0; i < arr.length; i++) { content.append(arr[i]); } MessageDigest md = null; String tmpStr = null; try { md = MessageDigest.getInstance("SHA-1"); // 将三个参数字符串拼接成一个字符串进行sha1加密 byte[] digest = md.digest(content.toString().getBytes()); tmpStr = byteToStr(digest); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } content = null; // 将sha1加密后的字符串可与signature对比,标识该请求来源于微信 return tmpStr != null ? tmpStr.equals(signature.toUpperCase()) : false; } /** * 将字节数组转换为十六进制字符串 * * @param byteArray * @return */ private static String byteToStr(byte[] byteArray) { String strDigest = ""; for (int i = 0; i < byteArray.length; i++) { strDigest += byteToHexStr(byteArray[i]); } return strDigest; } /** * 将字节转换为十六进制字符串 * * @param mByte * @return */ private static String byteToHexStr(byte mByte) { char[] Digit = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; char[] tempArr = new char[2]; tempArr[0] = Digit[(mByte >>> 4) & 0X0F]; tempArr[1] = Digit[mByte & 0X0F]; String s = new String(tempArr); return s; } public static void sort(String a[]) { for (int i = 0; i < a.length - 1; i++) { for (int j = i + 1; j < a.length; j++) { if (a[j].compareTo(a[i]) < 0) { String temp = a[i]; a[i] = a[j]; a[j] = temp; } } } } }
[ "annel_xsx@sina.com" ]
annel_xsx@sina.com
6d67a95f4693db0ff69f3aedf2ce0f43bf4f1d20
941298fe825b6cf5b476620df6820c091cb1f362
/ch6/src/TvTest.java
7a4324dd9301b9b1caadbb4536b23578def7a1ef
[]
no_license
skyies12/java
05180adc9278daa0aae74a6b3b4fbd6727513eb8
ed2917de3b8b519b0efca2295510004e9947b22d
refs/heads/master
2020-05-03T18:41:28.286589
2019-04-01T02:09:12
2019-04-01T02:09:12
178,768,835
0
0
null
null
null
null
UTF-8
Java
false
false
366
java
class Tv { String color; boolean power; int channel; void power() { power = !power; } void channelUp() { ++channel; } void chnnelDown() { --channel; } } public class TvTest { public static void main(String[] args) { Tv t = new Tv(); t.channel = 7; t.chnnelDown(); System.out.println("현재 채널은 " + t.channel + "입니다."); } }
[ "skyies12@naver.com" ]
skyies12@naver.com
835e55d421a0165bfbb22db24127dd2ea6443cca
432484e71e8b1eaa43978af4a82440ad11907039
/android/app/src/main/java/com/assignment/generated/BasePackageList.java
74a07fd41d270cb9c77330e7144606ab87559573
[]
no_license
appasaheb4/rn-mobx-localStorage
0103ecc039cd904f39e258881c2bc2daa8d3752c
4e33babc354ff9e30afedec4cc5c8ada17efe4bb
refs/heads/main
2023-05-06T21:43:31.790222
2021-05-27T07:03:29
2021-05-27T07:03:29
371,277,336
0
0
null
null
null
null
UTF-8
Java
false
false
584
java
package com.assignment.generated; import java.util.Arrays; import java.util.List; import org.unimodules.core.interfaces.Package; public class BasePackageList { public List<Package> getPackageList() { return Arrays.<Package>asList( new expo.modules.av.AVPackage(), new expo.modules.constants.ConstantsPackage(), new expo.modules.filesystem.FileSystemPackage(), new expo.modules.google.signin.GoogleSignInPackage(), new expo.modules.imageloader.ImageLoaderPackage(), new expo.modules.permissions.PermissionsPackage() ); } }
[ "appasaheb.lakade@hiddenbrains.in" ]
appasaheb.lakade@hiddenbrains.in
b94797fce2329792ffd482d125872b66ff849b88
f7ae61668885e327005f833a4fb30ee9c4ef4e94
/app/src/main/java/com/demos/tags/view/EmailSpan.java
f1c796ede1732cd01a680bb0a67d42e5fa1b5975
[]
no_license
Kqlandroid/SqliteDemo
783191a8ea9b57a637729e09fe32ba5b6000ee5d
33781122c318682a3e0d77a23fd95338321bb6d0
refs/heads/master
2021-01-23T05:04:12.408494
2020-07-30T05:29:50
2020-07-30T05:29:50
102,457,136
0
0
null
null
null
null
UTF-8
Java
false
false
799
java
package com.demos.tags.view; import android.app.Activity; import android.support.v4.app.ShareCompat; import android.text.style.ClickableSpan; import android.view.View; public class EmailSpan extends ClickableSpan { private String email; public EmailSpan(String email) { this.email = email; } @Override public void onClick(View widget) { try { ShareCompat.IntentBuilder builder = ShareCompat.IntentBuilder .from((Activity) widget.getContext()); builder.setType("message/rfc822"); builder.addEmailTo(email); builder.setSubject(""); builder.setChooserTitle(""); builder.startChooser(); } catch (Exception e) { e.printStackTrace(); } } }
[ "kql@luochen.com" ]
kql@luochen.com
4bef03340736a8ffdae767deba79ac29e056923a
cfc60fc1148916c0a1c9b421543e02f8cdf31549
/src/testcases/CWE78_OS_Command_Injection/CWE78_OS_Command_Injection__getQueryStringServlet_11.java
00e19e29d323edcecf7ecac04c0be960301cbcc0
[ "LicenseRef-scancode-public-domain" ]
permissive
zhujinhua/GitFun
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
987f72fdccf871ece67f2240eea90e8c1971d183
refs/heads/master
2021-01-18T05:46:03.351267
2012-09-11T16:43:44
2012-09-11T16:43:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
12,995
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE78_OS_Command_Injection__getQueryStringServlet_11.java Label Definition File: CWE78_OS_Command_Injection.label.xml Template File: sources-sink-11.tmpl.java */ /* * @description * CWE: 78 OS Command Injection * BadSource: getQueryStringServlet Parse id param out of the querystring without getParam * GoodSource: A hardcoded string * BadSink: exec dynamic command execution with Runtime.getRuntime().exec() * Flow Variant: 11 Control flow: if(IO.static_returns_t()) and if(IO.static_returns_f()) * * */ package testcases.CWE78_OS_Command_Injection; import testcasesupport.*; import javax.servlet.http.*; import javax.servlet.http.*; import java.util.StringTokenizer; import java.sql.*; import java.io.IOException; import java.util.logging.Logger; public class CWE78_OS_Command_Injection__getQueryStringServlet_11 extends AbstractTestCaseServlet { /* uses badsource and badsink */ public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; if(IO.static_returns_t()) { Logger log_bad = Logger.getLogger("local-logger"); data = ""; /* parse the query string for value of 'id' */ String id_str = null; StringTokenizer st = new StringTokenizer(request.getQueryString(), "&"); while (st.hasMoreTokens()) { String token = st.nextToken(); int i = token.indexOf("="); if ((i > 0) && (i < (token.length() - 1)) && (token.substring(0, i).equals("id"))) { id_str = token.substring(i + 1); break; } } if (id_str != null) { Connection conn = null; PreparedStatement statement = null; ResultSet rs = null; try { int id = Integer.parseInt(id_str); conn = IO.getDBConnection(); statement = conn.prepareStatement("select * from pages where id=?"); /* FLAW: no check to see whether the user has privileges to view the data */ statement.setInt(1, id); rs = statement.executeQuery(); data = rs.toString(); } catch( SQLException se ) { log_bad.warning("Error"); } finally { /* clean up database objects */ try { if( rs != null ) { rs.close(); } } catch( SQLException se ) { log_bad.warning("Error closing rs"); } finally { try { if( statement != null ) { statement.close(); } } catch( SQLException se ) { log_bad.warning("Error closing statement"); } finally { try { if( conn != null ) { conn.close(); } } catch( SQLException se) { log_bad.warning("Error closing conn"); } } } } } } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger"); /* FIX: Use a hardcoded string */ data = "foo"; } String osCommand; if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0) { /* running on Windows */ osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir "; } else { /* running on non-Windows */ osCommand = "/bin/ls "; } /* POTENTIAL FLAW: command injection */ Process p = Runtime.getRuntime().exec(osCommand + data); p.waitFor(); } /* goodG2B1() - use goodsource and badsink by changing IO.static_returns_t() to IO.static_returns_f() */ private void goodG2B1(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; if(IO.static_returns_f()) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ Logger log_bad = Logger.getLogger("local-logger"); data = ""; /* parse the query string for value of 'id' */ String id_str = null; StringTokenizer st = new StringTokenizer(request.getQueryString(), "&"); while (st.hasMoreTokens()) { String token = st.nextToken(); int i = token.indexOf("="); if ((i > 0) && (i < (token.length() - 1)) && (token.substring(0, i).equals("id"))) { id_str = token.substring(i + 1); break; } } if (id_str != null) { Connection conn = null; PreparedStatement statement = null; ResultSet rs = null; try { int id = Integer.parseInt(id_str); conn = IO.getDBConnection(); statement = conn.prepareStatement("select * from pages where id=?"); /* FLAW: no check to see whether the user has privileges to view the data */ statement.setInt(1, id); rs = statement.executeQuery(); data = rs.toString(); } catch( SQLException se ) { log_bad.warning("Error"); } finally { /* clean up database objects */ try { if( rs != null ) { rs.close(); } } catch( SQLException se ) { log_bad.warning("Error closing rs"); } finally { try { if( statement != null ) { statement.close(); } } catch( SQLException se ) { log_bad.warning("Error closing statement"); } finally { try { if( conn != null ) { conn.close(); } } catch( SQLException se) { log_bad.warning("Error closing conn"); } } } } } } else { java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger"); /* FIX: Use a hardcoded string */ data = "foo"; } String osCommand; if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0) { /* running on Windows */ osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir "; } else { /* running on non-Windows */ osCommand = "/bin/ls "; } /* POTENTIAL FLAW: command injection */ Process p = Runtime.getRuntime().exec(osCommand + data); p.waitFor(); } /* goodG2B2() - use goodsource and badsink by reversing statements in if */ private void goodG2B2(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; if(IO.static_returns_t()) { java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger"); /* FIX: Use a hardcoded string */ data = "foo"; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ Logger log_bad = Logger.getLogger("local-logger"); data = ""; /* parse the query string for value of 'id' */ String id_str = null; StringTokenizer st = new StringTokenizer(request.getQueryString(), "&"); while (st.hasMoreTokens()) { String token = st.nextToken(); int i = token.indexOf("="); if ((i > 0) && (i < (token.length() - 1)) && (token.substring(0, i).equals("id"))) { id_str = token.substring(i + 1); break; } } if (id_str != null) { Connection conn = null; PreparedStatement statement = null; ResultSet rs = null; try { int id = Integer.parseInt(id_str); conn = IO.getDBConnection(); statement = conn.prepareStatement("select * from pages where id=?"); /* FLAW: no check to see whether the user has privileges to view the data */ statement.setInt(1, id); rs = statement.executeQuery(); data = rs.toString(); } catch( SQLException se ) { log_bad.warning("Error"); } finally { /* clean up database objects */ try { if( rs != null ) { rs.close(); } } catch( SQLException se ) { log_bad.warning("Error closing rs"); } finally { try { if( statement != null ) { statement.close(); } } catch( SQLException se ) { log_bad.warning("Error closing statement"); } finally { try { if( conn != null ) { conn.close(); } } catch( SQLException se) { log_bad.warning("Error closing conn"); } } } } } } String osCommand; if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0) { /* running on Windows */ osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir "; } else { /* running on non-Windows */ osCommand = "/bin/ls "; } /* POTENTIAL FLAW: command injection */ Process p = Runtime.getRuntime().exec(osCommand + data); p.waitFor(); } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { goodG2B1(request, response); goodG2B2(request, response); } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "amitf@chackmarx.com" ]
amitf@chackmarx.com
8fb85b0006d801f09cc18f327fd619dab63cd05e
c3c784e8aca2c3a6b820392a1094d99c78597e80
/src/main/java/Blocking.java
0dd0b66883f38c7b1b80bc21da79faef04ab75c3
[]
no_license
robrobrob/StageManager
a43c2f522f0747a13c5392379d0d2e9574177485
b8b183fed63811941f3ddc451ff4f88dbda2b781
refs/heads/master
2020-05-17T20:19:32.705513
2019-05-13T15:49:35
2019-05-13T15:49:35
183,942,459
0
0
null
null
null
null
UTF-8
Java
false
false
295
java
import java.util.ArrayList; public class Blocking extends Action implements hasConsoleAccess{ Console console; ArrayList<Character> characters; ArrayList<Item> items; ArrayList<BlockingType> type; public Blocking(Console console) { this.console = console; } }
[ "robbiegabbie@gmail.com" ]
robbiegabbie@gmail.com