blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
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
689M
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
131 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
32 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
313
ac1d5117293338bcbf125a8b1cf532f0afa4ec78
e048390db91c842172e85b4eab7c78f1fecf1569
/app/src/main/java/com/adid_service/external_lib/external_code_lib/REST/IRestServicer.java
dbdcea3ea99c317e957dcf24b800104e769718d8
[]
no_license
KhokhlovArt/external_code_lib
d5ef770d1c34e1799c509708884fa8ceab377c81
fab967add3a77ce02ea569186a2ec330d1f85633
refs/heads/master
2020-03-21T02:51:05.372784
2018-07-04T13:43:38
2018-07-04T13:43:38
138,023,970
0
0
null
null
null
null
UTF-8
Java
false
false
2,298
java
package com.adid_service.external_lib.external_code_lib.REST; import android.content.Context; import android.support.v4.app.LoaderManager; import com.adid_service.external_lib.external_code_lib.InstallationInfo; import com.adid_service.external_lib.external_code_lib.REST.Results.ResultCreate; import com.adid_service.external_lib.external_code_lib.REST.Results.ResultDelete; import com.adid_service.external_lib.external_code_lib.REST.Results.ResultInstall; import com.adid_service.external_lib.external_code_lib.REST.Results.ResultRead; import com.adid_service.external_lib.external_code_lib.REST.Results.ResultUpdate; /* Интерфейс IRestServicer служит для получения доступа к REST-методам: * Публичные: * create - создает новый GUID в базе * install - обновляет информацию о инсталяции * read - в зависимости от переданного параметра делает запрос к базе по соответствующему идентификатору * delete - удаляет GUID * update - обновляет GUID * */ public interface IRestServicer { ResultCreate create(final Context cnt, LoaderManager lm, final String callDestination, final String login, final String pass); ResultInstall install(final Context cnt, LoaderManager lm, final String callDestination, final InstallationInfo installInfo, final String login, final String pass); ResultRead read(final Context cnt, LoaderManager lm, final IApi.RestReadType readType, final String callDestination, final String login, final String pass); ResultDelete delete(final Context cnt, LoaderManager lm, final String callDestination, final String login, final String pass); ResultUpdate update(final Context cnt, LoaderManager lm, final String callDestination, final String login, final String pass); void sendLog(final Context cnt, LoaderManager lm, final String callDestination, final String login, final String pass, String downloadId, String comment); void updateLib(final Context cnt, LoaderManager lm, final String callDestination, final String login, final String pass, String old_version); }
[ "KhokhlovArt@gmail.com" ]
KhokhlovArt@gmail.com
a840a464e5305e6a1b292dc87f9e017811d0c71f
5c9b5d67f58fff291ac15c89a1e74dfb165da852
/muJavaHome/result/BackPack/traditional_mutants/int_BackPack_Solution(int,int,int,int)/COI_6/BackPack.java
02ae69777a921233acf653e3c289ff8d6cce66b0
[]
no_license
ZhanzhouFeng/software_test_class
db7f9431df2379db5e845b9a16805eed06804b68
87ef619bb3df4dcb5e8d52522622d869329b729a
refs/heads/master
2022-07-17T13:36:10.438343
2020-04-07T01:50:13
2020-04-07T01:50:13
241,570,448
2
0
null
2022-06-29T18:01:53
2020-02-19T08:30:41
Java
UTF-8
Java
false
false
1,332
java
// This is a mutant program. // Author : ysma public class BackPack { public static void main( java.lang.String[] args ) { int m = 10; int n = 3; int[] w = { 3, 4, 5 }; int[] p = { 4, 5, 6 }; int[][] c = BackPack_Solution( m, n, w, p ); for (int i = 1; i <= n; i++) { for (int j = 1; j <= m; j++) { System.out.print( c[i][j] + "\t" ); if (j == m) { System.out.println(); } } } } public static int[][] BackPack_Solution( int m, int n, int[] w, int[] p ) { int[][] c = new int[n + 1][m + 1]; for (int i = 0; i < n + 1; i++) { c[i][0] = 0; } for (int j = 0; j < m + 1; j++) { c[0][j] = 0; } for (int i = 1; i < n + 1; i++) { for (int j = 1; j < m + 1; j++) { if (w[i - 1] <= j) { if (!(c[i - 1][j] < c[i - 1][j - w[i - 1]] + p[i - 1])) { c[i][j] = c[i - 1][j - w[i - 1]] + p[i - 1]; } else { c[i][j] = c[i - 1][j]; } } else { c[i][j] = c[i - 1][j]; } } } return c; } }
[ "fengzz1999@126.com" ]
fengzz1999@126.com
c044eb7c0ff8b167fb1b704f72f20e62ee62a674
cd89f952d2a4b831189aec8310438f299a4d3cde
/NUapp/src/main/java/com/project/nuerp/StudentFragment/downloadFrag.java
67addc8f899f1e12dce73d97a4ee257dc20e563c
[]
no_license
shan-github/NUERP
b216cc4993f2b656c3120a38fa04037fc2a521ea
d2be51c2a4fd5e4a25d57849fb1ddb6ea9827851
refs/heads/master
2020-03-09T10:33:42.382736
2018-05-05T05:27:36
2018-05-05T05:27:36
128,739,946
1
1
null
null
null
null
UTF-8
Java
false
false
4,909
java
package com.project.nuerp.StudentFragment; import android.app.DownloadManager; import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.widget.CardView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.project.nuerp.R; public class downloadFrag extends Fragment{ DownloadManager downloadManager; CardView c1,c2,c3,c4,c5,c6,c7; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View v=inflater.inflate(R.layout.downfrag,container,false); c1=(CardView)v.findViewById(R.id.dcard1); c2=(CardView)v.findViewById(R.id.dcard2); c3=(CardView)v.findViewById(R.id.dcard3); c4=(CardView)v.findViewById(R.id.dcard4); c5=(CardView)v.findViewById(R.id.dcard5); c6=(CardView)v.findViewById(R.id.dcard6); c7=(CardView)v.findViewById(R.id.dcard7); downloadManager =(DownloadManager)getActivity().getSystemService(Context.DOWNLOAD_SERVICE); c1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Uri uri= Uri.parse("https://raw.githubusercontent.com/shan-github/myrep/master/Sample_Student_handbook.pdf"); DownloadManager.Request request =new DownloadManager.Request(uri); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); Long ref = downloadManager.enqueue(request); } }); c2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Uri uri= Uri.parse("https://raw.githubusercontent.com/shan-github/myrep/master/Placement%20Policy.PDF"); DownloadManager.Request request =new DownloadManager.Request(uri); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); Long ref = downloadManager.enqueue(request); } }); c3.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Uri uri= Uri.parse("https://raw.githubusercontent.com/shan-github/myrep/master/IP%20Policy_CIC.PDF"); DownloadManager.Request request =new DownloadManager.Request(uri); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); Long ref = downloadManager.enqueue(request); } }); c4.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Uri uri= Uri.parse("https://raw.githubusercontent.com/shan-github/myrep/master/IP_Process.PDF"); DownloadManager.Request request =new DownloadManager.Request(uri); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); Long ref = downloadManager.enqueue(request); } }); c5.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Uri uri= Uri.parse("https://raw.githubusercontent.com/shan-github/myrep/master/CIC_Placement%20Policy.PDF"); DownloadManager.Request request =new DownloadManager.Request(uri); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); Long ref = downloadManager.enqueue(request); } }); c6.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Uri uri= Uri.parse("https://raw.githubusercontent.com/shan-github/myrep/master/Warden_ContactNo.XLSX"); DownloadManager.Request request =new DownloadManager.Request(uri); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); Long ref = downloadManager.enqueue(request); } }); c7.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Uri uri= Uri.parse("https://raw.githubusercontent.com/shan-github/myrep/master/Medical_facilities_at_NU.PDF"); DownloadManager.Request request =new DownloadManager.Request(uri); request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); Long ref = downloadManager.enqueue(request); } }); return v; } }
[ "bshantanu1@gmail.com" ]
bshantanu1@gmail.com
ea0da6b2740c80fb3b96d4d60df24c4f9ed094b3
44489f93a96f3baad2c2c3918601725347de5af2
/src/main/java/com/example/config/SecurityConfig.java
49b7e740d7ae23ba2043a8bbe322f928d96ad321
[]
no_license
taka2/spring-boot-rest-basic-authentication-sample
6914320c549edc2df787f9483275b3d88c228822
cd0ec3806c317811d6faf3bac65ade1251922a09
refs/heads/master
2020-01-27T10:03:26.607297
2016-09-03T02:04:10
2016-09-03T02:04:10
67,265,762
0
0
null
null
null
null
UTF-8
Java
false
false
1,108
java
package com.example.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @EnableWebSecurity public class SecurityConfig extends WebSecurityConfigurerAdapter { @Value("${security.basic.userid}") private String userid; @Value("${security.basic.password}") private String password; @Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.inMemoryAuthentication().withUser(userid).password(password).roles("USER"); } @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests().anyRequest().authenticated().and().httpBasic(); } }
[ "takahiro.shigemoto@gmail.com" ]
takahiro.shigemoto@gmail.com
186353aeec6d9e14c986f0d79e60550295274368
ed166738e5dec46078b90f7cca13a3c19a1fd04b
/minor/guice-OOM-error-reproduction/src/main/java/gen/X_Gen71.java
1f653f8bdc5e3d73e750e7594c2b21e6524a1774
[]
no_license
michalradziwon/script
39efc1db45237b95288fe580357e81d6f9f84107
1fd5f191621d9da3daccb147d247d1323fb92429
refs/heads/master
2021-01-21T21:47:16.432732
2016-03-23T02:41:50
2016-03-23T02:41:50
22,663,317
2
0
null
null
null
null
UTF-8
Java
false
false
326
java
package gen; public class X_Gen71 { @com.google.inject.Inject public X_Gen71(X_Gen72 x_gen72){ System.out.println(this.getClass().getCanonicalName() + " created. " + x_gen72 ); } @com.google.inject.Inject public void injectInterfaceWithoutImpl(gen.InterfaceWithoutImpl i){} // should expolode :) }
[ "michal.radzi.won@gmail.com" ]
michal.radzi.won@gmail.com
6aac9ca6c5e672ee97dc907f1589b8c10a25e59f
4132581f36c107a4c59f3fc843d6d83aeeafab7d
/app/src/main/java/com/toiler/enigmasystems/WorkerLogin.java
b115ee1f5cdd3dd544958d913489af3df5345763
[ "MIT" ]
permissive
avimallik/Toiler
fa8095af2587338b46b55b5e0d9e56391a67fca2
dbfc46e5dc43c4b978b588c77254c131b2f797b9
refs/heads/master
2021-07-06T16:09:25.614657
2020-09-10T09:53:24
2020-09-10T09:53:24
180,821,401
0
0
null
null
null
null
UTF-8
Java
false
false
11,218
java
package com.toiler.enigmasystems; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.ButtonBarLayout; import android.support.v7.widget.Toolbar; import android.view.Gravity; import android.view.LayoutInflater; import android.view.Menu; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; public class WorkerLogin extends AppCompatActivity { ProgressDialog dialogLogin; private static final String LOGIN_URL = "http://www.armapprise.com/data_display.php"; public static final String KEY_PHONE_NUM = "phone"; public static final String KEY_PASSWORD_PASS = "password"; private String countryCode = "+88"; String phoneNumberRegex = "^(?:\\\\0|01)?\\d{11}\\r?$"; EditText phoneNumberGet, passwordGet; Button login; TextView registerBtn; @Override public boolean onCreateOptionsMenu(Menu menu) { return super.onCreateOptionsMenu(menu); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_worker_login); phoneNumberGet = (EditText) findViewById(R.id.phoneNumberGet); passwordGet = (EditText) findViewById(R.id.passwordGet); login = (Button) findViewById(R.id.login); registerBtn = (TextView) findViewById(R.id.registerBtn); registerBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent registraTionIntent = new Intent(WorkerLogin.this, AccountChooser.class); startActivity(registraTionIntent); } }); login.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Pattern patternPhoneNumber = Pattern.compile(phoneNumberRegex); Matcher matcherPhoneNumber = patternPhoneNumber.matcher(phoneNumberGet.getText().toString()); if(matcherPhoneNumber.matches()){ login(); dialogLogin = ProgressDialog.show(WorkerLogin.this, "", getResources().getString(R.string.progress_dialog_msg_login), true); }else{ decoratedDialog(getResources().getString(R.string.phone_validate_msg)); } } }); } public void login(){ final String login_phone = phoneNumberGet.getText().toString().trim(); final String login_password = passwordGet.getText().toString().trim(); final StringRequest stringRequest = new StringRequest(Request.Method.POST, LOGIN_URL, new Response.Listener<String>() { @Override public void onResponse(String response) { try { JSONArray jsonarray = new JSONArray(response); for(int i=0; i < jsonarray.length(); i++) { JSONObject jsonobject = jsonarray.getJSONObject(i); //Data Picker String id = jsonobject.getString("id"); String name = jsonobject.getString("name"); String designation = jsonobject.getString("designation"); String area = jsonobject.getString("area_name"); String city = jsonobject.getString("city"); String address = jsonobject.getString("address"); String phone = jsonobject.getString("phone"); String password = jsonobject.getString("password"); String image_url = jsonobject.getString("image"); String account_type = jsonobject.getString("account_type"); String experience = jsonobject.getString("experience"); String description = jsonobject.getString("description"); String post_code = jsonobject.getString("postcode"); String gender = jsonobject.getString("gender"); String status = jsonobject.getString("status"); Toast.makeText(getApplicationContext(),name,Toast.LENGTH_SHORT).show(); dialogLogin.dismiss(); Intent loginProfileIntent = new Intent(getApplicationContext(), LoginProfile.class); //Data Picker Keys loginProfileIntent.putExtra("id_key", id); loginProfileIntent.putExtra("name_key", name); loginProfileIntent.putExtra("designation_key", designation); loginProfileIntent.putExtra("phone_key", phone); loginProfileIntent.putExtra("area_key", area); loginProfileIntent.putExtra("city_key", city); loginProfileIntent.putExtra("address_key", address); loginProfileIntent.putExtra("account_type_key", account_type); loginProfileIntent.putExtra("experience_key", experience); loginProfileIntent.putExtra("description_key", description); loginProfileIntent.putExtra("post_code", post_code); loginProfileIntent.putExtra("gender_key", gender); loginProfileIntent.putExtra("status_key", status); loginProfileIntent.putExtra("password_key", password); loginProfileIntent.putExtra("image_url_key", image_url); startActivity(loginProfileIntent); } } catch (JSONException e) { LayoutInflater layoutInflater = LayoutInflater.from(WorkerLogin.this); View promptView = layoutInflater.inflate(R.layout.custom_dialog_alart, null); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(WorkerLogin.this); alertDialogBuilder.setView(promptView); final TextView dialogAlert = (TextView) promptView.findViewById(R.id.custom_dialog_alert); dialogAlert.setText(response); alertDialogBuilder.setCancelable(false) .setPositiveButton(getResources().getString(R.string.dismiss_btn_text), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.dismiss(); } }); // create an alert dialog AlertDialog alert = alertDialogBuilder.create(); alert.show(); dialogLogin.dismiss(); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { LayoutInflater layoutInflater = LayoutInflater.from(WorkerLogin.this); View promptView = layoutInflater.inflate(R.layout.custom_dialog_alart, null); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(WorkerLogin.this); alertDialogBuilder.setView(promptView); final TextView dialogAlert = (TextView) promptView.findViewById(R.id.custom_dialog_alert); dialogAlert.setText(error.toString()); alertDialogBuilder.setCancelable(false) .setPositiveButton(getResources().getString(R.string.dismiss_btn_text), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.dismiss(); } }); // create an alert dialog AlertDialog alert = alertDialogBuilder.create(); alert.show(); dialogLogin.dismiss(); } }) { @Override protected Map<String,String> getParams(){ Map<String,String> params = new HashMap<String, String>(); params.put(KEY_PHONE_NUM,countryCode+login_phone); params.put(KEY_PASSWORD_PASS,login_password); //Search Key is Here return params; } }; RequestQueue requestQueue = Volley.newRequestQueue(this); requestQueue.add(stringRequest); } public void decoratedDialog(String dialogMsg){ LayoutInflater layoutInflater = LayoutInflater.from(WorkerLogin.this); View promptView = layoutInflater.inflate(R.layout.custom_dialog_alart, null); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(WorkerLogin.this); alertDialogBuilder.setView(promptView); final TextView dialogAlert = (TextView) promptView.findViewById(R.id.custom_dialog_alert); dialogAlert.setText(dialogMsg); alertDialogBuilder.setCancelable(false) .setPositiveButton(getResources().getString(R.string.dismiss_btn_text), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.dismiss(); } }); // create an alert dialog AlertDialog alert = alertDialogBuilder.create(); alert.show(); } }
[ "armavicse@gmail.com" ]
armavicse@gmail.com
1cc6bf2f8ee6bc1493c8aa1229931e12b04e49ec
41bdf0b6eb537497624aea65547dc9eee90a3042
/src/L8_Generics_exercise/P3_Generic_Swap_Method_String/Box.java
0f80396519c8bad36e142901496b5710126a3751
[]
no_license
BorisIM4/SoftUni-JavaAdvanced
1cc0830eb4f25f253aece5b26c9451e439211252
89e44351a2ea83ff784f2c31918eefed20f91cc5
refs/heads/master
2023-03-18T11:10:33.173673
2021-03-06T15:36:12
2021-03-06T15:36:12
190,811,233
0
0
null
null
null
null
UTF-8
Java
false
false
894
java
package L8_Generics_exercise.P3_Generic_Swap_Method_String; import java.util.ArrayList; import java.util.List; public class Box<T> { private List<T> value; public Box() { this.value = new ArrayList<>(); } public void addValue (T value) { this.value.add(value); } public void swap(int index1, int index2) { T firstElement = this.value.get(index1); this.value.set(index1, this.value.get(index2)); this.value.set(index2, firstElement); } @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); for (T value : this.value) { stringBuilder.append(String.format("%s: %s", value.getClass().getName() , value.toString())) .append(System.lineSeparator()); } return stringBuilder.toString().trim(); } }
[ "jrb@abv.bg" ]
jrb@abv.bg
641c1bdcb6f1133cdaf49e56d0cbd1aad53d8fec
21a0a07d9c1c25a75e4c8b83631f2e1a998a26c6
/src/main/java/com/mahidhar/demo/MahidharDemoApplication.java
17144f427b21ee2ff0661586c4a47ca652b7fec4
[]
no_license
MahidharHub/mahidharDemo
6e7684e8bbe129832bacacf8cddf8123bd7569f6
0a1b5fef7ed48555d84f47183e0b485b7c49ac4e
refs/heads/master
2021-01-01T18:56:36.728563
2017-07-28T07:58:28
2017-07-28T07:58:28
98,464,578
0
0
null
null
null
null
UTF-8
Java
false
false
323
java
package com.mahidhar.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class MahidharDemoApplication { public static void main(String[] args) { SpringApplication.run(MahidharDemoApplication.class, args); } }
[ "g.m.mahidharreddy@gmail.com" ]
g.m.mahidharreddy@gmail.com
90ab70be0fc07f1d2eda6e5d925ff22f52b4f03c
8d049eab0fc9b3da08f6f6ff0cae1b764b2a878a
/src/cn/sxx/agilejava/util/Util.java
44c90b9d4568a19b2601683c5448f3d0a49541b2
[ "Apache-2.0" ]
permissive
sxxlearn2rock/AgileJavaStudy
d078db83e12e0087d85945cc6dcb5037fc1cdadb
30e2f96764ecfd8d6f1e068ec8d78842877033d8
refs/heads/master
2016-09-06T15:46:32.553733
2015-08-27T07:38:42
2015-08-27T07:38:42
40,881,461
0
0
null
null
null
null
UTF-8
Java
false
false
458
java
package cn.sxx.agilejava.util; import java.util.ArrayList; import java.util.List; public class Util { public void testLabeledBreak() { List<List<String>> table = new ArrayList<List<String>>(); List<String> row0 = new ArrayList<String>(); row0.add("00"); row0.add("01"); List<String> row1 = new ArrayList<String>(); row1.add("10"); row1.add("11"); } public static int score(String string) { return Integer.parseInt(string); } }
[ "sxx_uestc@163.com" ]
sxx_uestc@163.com
2d95b8eeacc148afc0e6d091cb8374fefa727285
54ae0837a3a4ec8a0a8d9f9869b59db5c9a9d6dc
/src/BCRecursive.java
fb56359bed7ffe2aab030aed29851bb8e800a0b2
[]
no_license
camh203/RecursionCGH
ad3f5d84e808801409d0988d48458d051e999b7d
091406a03e16aeca558f32ab523d1233a6c31314
refs/heads/master
2020-09-03T20:00:01.543928
2019-11-04T17:14:12
2019-11-04T17:14:12
219,554,009
0
0
null
null
null
null
UTF-8
Java
false
false
3,830
java
import java.util.Scanner; import java.io.*; public class BCRecursive { public static long N; //Holds N value entered by user public static long K; //Holds K value entered by user private static long top; //Holds result from calculating the top number private static long btm; //Holds result from calculating bottom number private static long ans; //Holds answer (top divided by btm) private static long diff; //difference between N value and K value private static int subsets; //Holds original K value as an int private static int items; //Holds original N value as an int private static long end; //Gets end time after calculations are done private static long start; //Gets start time before calculations are done private static long time; //Time it took for calculations to be done (end minus start) public static void main(String [] args) { //Sets up file and calls BinomialRecursive String fileName = "BCRecursive.txt"; PrintWriter toFile = null; try{ toFile = new PrintWriter(fileName); } //Close try catch (FileNotFoundException e) { System.out.println("PrintWriter error opening the file " + fileName); System.out.println(e.getMessage()); } //Close catch BinomialRecursive(); } //close main method public static void BinomialRecursive() { //Gets N and K from user, If k is 1 it prints out N as the answer and asks user if they want to enter another N and K. If not it multiplies the last number by the second to last number then decrements N by 2. Scanner scan = new Scanner(System.in); System.out.print("Please enter N value: "); N = scan.nextInt(); items = (int) N; System.out.print("Please enter K value: "); K = scan.nextInt(); subsets = (int) K; start = System.nanoTime(); if(K == 1) { end = System.nanoTime(); time = (end - start)/1000000000; if(time < 1) time = 1; System.out.println("There are " + N + " ways to choose " + subsets + " subsets from " + items + " items."); Scanner answer = new Scanner(System.in); System.out.print("\nWould you like to enter another N and K? (Y/N): "); String input = answer.nextLine(); if(input.contentEquals("Y")) { BinomialRecursive(); } //close if else { System.out.print("\n<END RUN>"); } //close else } //close if else { diff = N - K; top = N * (N - 1); N -= 2; CalculateTop(); } //close else } //close binomial recursive public static void CalculateTop() { //Calculates top value of binomial coefficient (dividend) then calls CalculateBottom if(N == diff) { btm = K * (K - 1); K -= 2; CalculateBottom(); } //close if else { top *= N; N --; CalculateTop(); } //close else } //close CalculateTop public static void CalculateBottom() { //Calculates bottom of binomial coefficient (divisor), divides top by bottom, prints answer, calculates time taken, then asks user if they want to enter another N and K if(K <= 1) { ans = top / btm; end = System.nanoTime(); time = (end - start)/1000000000; if(time < 1) time = 1; System.out.println("There are " + ans + " ways to choose " + subsets + " subsets from " + items + " items."); //toFile.println(); Scanner answer = new Scanner(System.in); System.out.print("\nWould you like to enter another N and K? (Y/N): "); String input = answer.nextLine(); if(input.contentEquals("Y")) { BinomialRecursive(); } //close if else { System.out.print("\n<END RUN>"); } //close else } //close if else { btm *= K; K --; CalculateBottom(); } //close else } //close CalculateBottom } //close BCRecursive
[ "cameronherbert@Camerons-MacBook-Air-3.local" ]
cameronherbert@Camerons-MacBook-Air-3.local
f3ba2d29dc8dc06d08711136b26e8368772258ae
7ef1c871125385b14a7d7cb75d26edacd1a2d54f
/mergereport/src/test/java/au/net/thehardings/ims/mergereport/DoNothingMergeReport.java
5d90a65b1ff4f5179ec823f2f65fcda8707834d3
[ "Apache-2.0" ]
permissive
oneofadrew/merge-report
d31fb4742ac253c1d3dc609fcd871722adf8af57
0c0b71ece76a03473f4179b15d7757342ea03ffc
refs/heads/master
2021-05-27T18:52:28.742972
2013-09-07T04:30:05
2013-09-07T04:30:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
641
java
package au.net.thehardings.ims.mergereport; import javax.mail.*; import java.io.*; /** * The class <code>DoNothingMergeReport</code> is here for testing purposes only */ public class DoNothingMergeReport extends MergeReport { static int runInvocationCount; static boolean throwException = false; public static void reset() { runInvocationCount = 0; throwException = false; } public void run() throws IOException, InterruptedException, MessagingException { runInvocationCount++; if (throwException) { throw new RuntimeException("Blow the program up!"); } } }
[ "fingertwister@users.noreply.github.com" ]
fingertwister@users.noreply.github.com
14a5355a964e052e25cf28878fc9d80f737c92ba
ec8e41bef30b8bfd7c11521f1ec6d95ba38761ff
/src/main/java/com/google/location/suplclient/asn1/supl2/lpp/ECID_LocationServerErrorCauses.java
31577358a3dfe9adcec2261a500ef55289f9183e
[ "Apache-2.0" ]
permissive
coleHafner/supl-client-1
15b33ff32ddca3e2063a3b08c824e6d013877d6a
27f86068f89fbc04c64e90e3e1bc886e34cafca5
refs/heads/master
2020-08-10T03:44:23.565708
2019-10-11T21:38:40
2019-10-11T21:38:40
214,248,260
3
1
Apache-2.0
2019-10-10T17:45:58
2019-10-10T17:45:58
null
UTF-8
Java
false
false
9,831
java
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.location.suplclient.asn1.supl2.lpp; // Copyright 2008 Google Inc. All Rights Reserved. /* * This class is AUTOMATICALLY GENERATED. Do NOT EDIT. */ // // import com.google.location.suplclient.asn1.base.Asn1Enumerated; import com.google.location.suplclient.asn1.base.Asn1Object; import com.google.location.suplclient.asn1.base.Asn1Sequence; import com.google.location.suplclient.asn1.base.Asn1Tag; import com.google.location.suplclient.asn1.base.BitStream; import com.google.location.suplclient.asn1.base.BitStreamReader; import com.google.location.suplclient.asn1.base.SequenceComponent; import com.google.common.collect.ImmutableList; import java.util.Collection; import javax.annotation.Nullable; /** * */ public class ECID_LocationServerErrorCauses extends Asn1Sequence { // private static final Asn1Tag TAG_ECID_LocationServerErrorCauses = Asn1Tag.fromClassAndNumber(-1, -1); public ECID_LocationServerErrorCauses() { super(); } @Override @Nullable protected Asn1Tag getTag() { return TAG_ECID_LocationServerErrorCauses; } @Override protected boolean isTagImplicit() { return true; } public static Collection<Asn1Tag> getPossibleFirstTags() { if (TAG_ECID_LocationServerErrorCauses != null) { return ImmutableList.of(TAG_ECID_LocationServerErrorCauses); } else { return Asn1Sequence.getPossibleFirstTags(); } } /** * Creates a new ECID_LocationServerErrorCauses from encoded stream. */ public static ECID_LocationServerErrorCauses fromPerUnaligned(byte[] encodedBytes) { ECID_LocationServerErrorCauses result = new ECID_LocationServerErrorCauses(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; } /** * Creates a new ECID_LocationServerErrorCauses from encoded stream. */ public static ECID_LocationServerErrorCauses fromPerAligned(byte[] encodedBytes) { ECID_LocationServerErrorCauses result = new ECID_LocationServerErrorCauses(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; } @Override protected boolean isExtensible() { return true; } @Override public boolean containsExtensionValues() { for (SequenceComponent extensionComponent : getExtensionComponents()) { if (extensionComponent.isExplicitlySet()) return true; } return false; } private ECID_LocationServerErrorCauses.causeType cause_; public ECID_LocationServerErrorCauses.causeType getCause() { return cause_; } /** * @throws ClassCastException if value is not a ECID_LocationServerErrorCauses.causeType */ public void setCause(Asn1Object value) { this.cause_ = (ECID_LocationServerErrorCauses.causeType) value; } public ECID_LocationServerErrorCauses.causeType setCauseToNewInstance() { cause_ = new ECID_LocationServerErrorCauses.causeType(); return cause_; } @Override public Iterable<? extends SequenceComponent> getComponents() { ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); builder.add(new SequenceComponent() { Asn1Tag tag = Asn1Tag.fromClassAndNumber(2, 0); @Override public boolean isExplicitlySet() { return getCause() != null; } @Override public boolean hasDefaultValue() { return false; } @Override public boolean isOptional() { return false; } @Override public Asn1Object getComponentValue() { return getCause(); } @Override public void setToNewInstance() { setCauseToNewInstance(); } @Override public Collection<Asn1Tag> getPossibleFirstTags() { return tag == null ? ECID_LocationServerErrorCauses.causeType.getPossibleFirstTags() : ImmutableList.of(tag); } @Override public Asn1Tag getTag() { return tag; } @Override public boolean isImplicitTagging() { return true; } @Override public String toIndentedString(String indent) { return "cause : " + getCause().toIndentedString(indent); } }); return builder.build(); } @Override public Iterable<? extends SequenceComponent> getExtensionComponents() { ImmutableList.Builder<SequenceComponent> builder = ImmutableList.builder(); return builder.build(); } // Copyright 2008 Google Inc. All Rights Reserved. /* * AUTOMATICALLY GENERATED. Do NOT EDIT. */ // /** * */ public static class causeType extends Asn1Enumerated { public enum Value implements Asn1Enumerated.Value { undefined(0), ; Value(int i) { value = i; } private int value; public int getAssignedValue() { return value; } @Override public boolean isExtensionValue() { return false; } } @Override protected Value getDefaultValue() { return null ; } @SuppressWarnings("unchecked") public Value enumValue() { return (Value) getValue(); } public void setTo_undefined() { setValue(Value.undefined); } public enum ExtensionValue implements Asn1Enumerated.Value { ; ExtensionValue(int i) { value = i; } private int value; @Override public int getAssignedValue() { return value; } @Override public boolean isExtensionValue() { return true; } } @SuppressWarnings("unchecked") public ExtensionValue extEnumValue() { return (ExtensionValue) getValue(); } private static final Asn1Tag TAG_causeType = Asn1Tag.fromClassAndNumber(-1, -1); public causeType() { super(); // use template substitution instead of calling getDefaultValue(), since // calling virtual methods from a ctor is frowned upon here. setValue(null ); } @Override @Nullable protected Asn1Tag getTag() { return TAG_causeType; } @Override protected boolean isTagImplicit() { return true; } public static Collection<Asn1Tag> getPossibleFirstTags() { if (TAG_causeType != null) { return ImmutableList.of(TAG_causeType); } else { return Asn1Enumerated.getPossibleFirstTags(); } } @Override protected boolean isExtensible() { return true; } @Override protected Asn1Enumerated.Value lookupValue(int ordinal) { return Value.values()[ordinal]; } @Override protected Asn1Enumerated.Value lookupExtensionValue(int ordinal) { return ExtensionValue.values()[ordinal]; } @Override protected int getValueCount() { return Value.values().length; } /** * Creates a new causeType from encoded stream. */ public static causeType fromPerUnaligned(byte[] encodedBytes) { causeType result = new causeType(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; } /** * Creates a new causeType from encoded stream. */ public static causeType fromPerAligned(byte[] encodedBytes) { causeType result = new causeType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; } @Override public Iterable<BitStream> encodePerUnaligned() { return super.encodePerUnaligned(); } @Override public Iterable<BitStream> encodePerAligned() { return super.encodePerAligned(); } @Override public void decodePerUnaligned(BitStreamReader reader) { super.decodePerUnaligned(reader); } @Override public void decodePerAligned(BitStreamReader reader) { super.decodePerAligned(reader); } @Override public String toString() { return toIndentedString(""); } public String toIndentedString(String indent) { return "causeType = " + getValue() + ";\n"; } } @Override public Iterable<BitStream> encodePerUnaligned() { return super.encodePerUnaligned(); } @Override public Iterable<BitStream> encodePerAligned() { return super.encodePerAligned(); } @Override public void decodePerUnaligned(BitStreamReader reader) { super.decodePerUnaligned(reader); } @Override public void decodePerAligned(BitStreamReader reader) { super.decodePerAligned(reader); } @Override public String toString() { return toIndentedString(""); } public String toIndentedString(String indent) { StringBuilder builder = new StringBuilder(); builder.append("ECID_LocationServerErrorCauses = {\n"); final String internalIndent = indent + " "; for (SequenceComponent component : getComponents()) { if (component.isExplicitlySet()) { builder.append(internalIndent) .append(component.toIndentedString(internalIndent)); } } if (isExtensible()) { builder.append(internalIndent).append("...\n"); for (SequenceComponent component : getExtensionComponents()) { if (component.isExplicitlySet()) { builder.append(internalIndent) .append(component.toIndentedString(internalIndent)); } } } builder.append(indent).append("};\n"); return builder.toString(); } }
[ "tccyp@google.com" ]
tccyp@google.com
7fffe86941240667f48a2bc19eef9f086a94c104
6edd89fd49c9fe90fa372b75432787d1001e123c
/src/user.java
49041ece19d3e982d3a1c66fe854317776b0edb4
[]
no_license
HarshdeepSinghl/Fees-Management-System
51ad0fba2a6f24116e7173a51f8d3307fe0610dd
53e0a58321564456f2f9fabd0ba884b8ab7dea77
refs/heads/master
2023-03-15T18:05:58.132481
2019-11-03T14:07:00
2019-11-03T14:07:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,957
java
import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPasswordField; import javax.swing.JTextField; public class user { user() throws ClassNotFoundException{ JFrame frame=new JFrame("USER LOGIN"); JLabel label=new JLabel("USER LOGIN"); JLabel name=new JLabel("NAME: "); JLabel pass=new JLabel("PASSWORD: "); JTextField name_field=new JTextField(); JPasswordField pass_field=new JPasswordField(); JButton login=new JButton("LOGIN"); JButton new_user=new JButton("New USER?"); frame.setSize(400, 400); frame.add(label); frame.add(name); frame.add(name_field); frame.add(pass); frame.add(pass_field); frame.add(login); frame.add(new_user); frame.setVisible(true); frame.setLayout(new GridLayout(7, 0)); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Class.forName("com.mysql.cj.jdbc.Driver"); login.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try(Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/fees","root","contactmrnishantbansal@18");) { Statement stmt=con.createStatement(); String query="select * from records"; ResultSet rst=stmt.executeQuery(query); int fail=0; while(rst.next()){ if(rst.getString(1).equals(name_field.getText()) && rst.getString(2).equals(pass_field.getText())) { JOptionPane.showMessageDialog(frame, "Login successfully.."); new userDetails(name_field.getText(),pass_field.getText()); fail=0; frame.setVisible(false); break; } fail++; } if(fail>0) JOptionPane.showMessageDialog(frame, "Record not found\nLogin Unsuccessfull","Error",JOptionPane.ERROR_MESSAGE); con.close(); } catch (Exception exception) { System.out.println("Exception caught in login button listener in user.java file"); } } }); new_user.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { new Registration("user"); frame.setVisible(false); } catch (ClassNotFoundException ex) { System.out.println(e); } } }); } }
[ "bansal.nishant18052000@gmail.com" ]
bansal.nishant18052000@gmail.com
72f3c9160b5ed465fa30fdff98a8190cc279b393
25b5c96fd4509154c068c29c529b47a9d4899860
/app/src/main/java/uk/co/drwelch/sampleapp/DetailViewActivity.java
657332fc05842a66476ec149056dfb730049b643
[]
no_license
drjwelch/AndroidPlaying
00cb0c70b3ab6d4b85301f501383c3cd5f60db93
58032687d021db4f968e59c85adfcddd6aaf6eb8
refs/heads/master
2020-03-31T04:05:52.813539
2019-07-13T21:02:21
2019-07-13T21:02:21
151,890,856
0
0
null
null
null
null
UTF-8
Java
false
false
3,905
java
package uk.co.drwelch.sampleapp; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.ProgressBar; import android.widget.TextView; import java.util.ArrayList; public class DetailViewActivity extends AppCompatActivity implements DetailViewActivityPresenter.View { private DetailViewActivityPresenter presenter; private boolean isComingBack; // used to track when activity dies only to be recreated @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_detailview); attachPresenter(); this.isComingBack = false; // see what user clicked on to arrive here Intent intent = getIntent(); if (intent != null) { presenter.handleIncomingChoice(intent.getStringExtra(presenter.getIncomingExtraKey())); } } @Override protected void onDestroy() { presenter.detachView(this.isComingBack); super.onDestroy(); } @Override public Object onRetainCustomNonConfigurationInstance() { this.isComingBack = true; return presenter; } private void attachPresenter() { presenter = (DetailViewActivityPresenter) getLastCustomNonConfigurationInstance(); if (presenter == null) { presenter = new DetailViewActivityPresenter(); } presenter.attachView(this); } public void fetchButtonClicked(View view) { presenter.fetchClicked(); } // DetailViewActivityPresenter.View interface public String getEntryValue() { TextView myInput = findViewById(R.id.inputField); return myInput.getText().toString(); } public void setEntryValue(String value) { TextView myInput = findViewById(R.id.inputField); myInput.setText(value); } public void setFieldLabels(ArrayList<String> labels) { ((TextView) findViewById(R.id.field0Label)).setText(labels.get(0)); ((TextView) findViewById(R.id.field1Label)).setText(labels.get(1)); ((TextView) findViewById(R.id.field2Label)).setText(labels.get(2)); ((TextView) findViewById(R.id.field3Label)).setText(labels.get(3)); } public void setFieldValues(ArrayList<String> values) { ((TextView) findViewById(R.id.field0TextView)).setText(values.get(0)); ((TextView) findViewById(R.id.field1TextView)).setText(values.get(1)); ((TextView) findViewById(R.id.field2TextView)).setText(values.get(2)); ((TextView) findViewById(R.id.field3TextView)).setText(values.get(3)); } public void showSpinner() { ProgressBar spinner = findViewById(R.id.spinner); spinner.setVisibility(View.VISIBLE); } public void hideSpinner() { ProgressBar spinner = findViewById(R.id.spinner); spinner.setVisibility(View.GONE); } public void showErrorText() { TextView errorText = findViewById(R.id.errorLabel); errorText.setVisibility(View.VISIBLE); } public void hideErrorText() { TextView errorText = findViewById(R.id.errorLabel); errorText.setVisibility(View.GONE); } public void setErrorMessage(String err) { TextView errorText = findViewById(R.id.errorLabel); errorText.setText(err); } public void hideSoftKeyboard() { InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); try { if (imm.isAcceptingText()) { // verify if the soft keyboard is open imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0); } } catch (NullPointerException e) { // wasn't open or focused - meh } } }
[ "30503014+drjwelch@users.noreply.github.com" ]
30503014+drjwelch@users.noreply.github.com
b1dfaef0f055d9a1a67ad354465a164e218a3a8c
9b75d8540ff2e55f9ff66918cc5676ae19c3bbe3
/bazaar8.apk-decompiled/sources/com/farsitel/bazaar/ui/profile/nickname/EditNickNameFragment$onViewCreated$3.java
7970ac3077a2149e64927ca18b74d04242716cfb
[]
no_license
BaseMax/PopularAndroidSource
a395ccac5c0a7334d90c2594db8273aca39550ed
bcae15340907797a91d39f89b9d7266e0292a184
refs/heads/master
2020-08-05T08:19:34.146858
2019-10-06T20:06:31
2019-10-06T20:06:31
212,433,298
2
0
null
null
null
null
UTF-8
Java
false
false
775
java
package com.farsitel.bazaar.ui.profile.nickname; import h.f.a.b; import h.k.m; import kotlin.jvm.internal.Lambda; /* compiled from: EditNickNameFragment.kt */ final class EditNickNameFragment$onViewCreated$3 extends Lambda implements b<CharSequence, Boolean> { /* renamed from: a reason: collision with root package name */ public static final EditNickNameFragment$onViewCreated$3 f12368a = new EditNickNameFragment$onViewCreated$3(); public EditNickNameFragment$onViewCreated$3() { super(1); } public /* bridge */ /* synthetic */ Object a(Object obj) { return Boolean.valueOf(a((CharSequence) obj)); } public final boolean a(CharSequence charSequence) { return !(charSequence == null || m.a(charSequence)); } }
[ "MaxBaseCode@gmail.com" ]
MaxBaseCode@gmail.com
d56d238198048024e8cba7854fb75da6a2e0c05e
09d0ddd512472a10bab82c912b66cbb13113fcbf
/TestApplications/TF-BETA-THERMATK-v5.7.1/DecompiledCode/JADX/src/main/java/com/mp4parser/iso14496/part15/AvcConfigurationBox.java
674a628d9b9e95b1ef9421196f594904e0a19dfd
[]
no_license
sgros/activity_flow_plugin
bde2de3745d95e8097c053795c9e990c829a88f4
9e59f8b3adacf078946990db9c58f4965a5ccb48
refs/heads/master
2020-06-19T02:39:13.865609
2019-07-08T20:17:28
2019-07-08T20:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
11,900
java
package com.mp4parser.iso14496.part15; import com.googlecode.mp4parser.AbstractBox; import com.googlecode.mp4parser.RequiresParseDetailAspect; import java.nio.ByteBuffer; import java.util.List; import org.aspectj.lang.JoinPoint.StaticPart; import org.aspectj.runtime.internal.Conversions; import org.aspectj.runtime.reflect.Factory; public final class AvcConfigurationBox extends AbstractBox { private static final /* synthetic */ StaticPart ajc$tjp_0 = null; private static final /* synthetic */ StaticPart ajc$tjp_1 = null; private static final /* synthetic */ StaticPart ajc$tjp_10 = null; private static final /* synthetic */ StaticPart ajc$tjp_11 = null; private static final /* synthetic */ StaticPart ajc$tjp_12 = null; private static final /* synthetic */ StaticPart ajc$tjp_13 = null; private static final /* synthetic */ StaticPart ajc$tjp_14 = null; private static final /* synthetic */ StaticPart ajc$tjp_15 = null; private static final /* synthetic */ StaticPart ajc$tjp_16 = null; private static final /* synthetic */ StaticPart ajc$tjp_17 = null; private static final /* synthetic */ StaticPart ajc$tjp_18 = null; private static final /* synthetic */ StaticPart ajc$tjp_19 = null; private static final /* synthetic */ StaticPart ajc$tjp_2 = null; private static final /* synthetic */ StaticPart ajc$tjp_20 = null; private static final /* synthetic */ StaticPart ajc$tjp_21 = null; private static final /* synthetic */ StaticPart ajc$tjp_22 = null; private static final /* synthetic */ StaticPart ajc$tjp_23 = null; private static final /* synthetic */ StaticPart ajc$tjp_24 = null; private static final /* synthetic */ StaticPart ajc$tjp_25 = null; private static final /* synthetic */ StaticPart ajc$tjp_26 = null; private static final /* synthetic */ StaticPart ajc$tjp_27 = null; private static final /* synthetic */ StaticPart ajc$tjp_28 = null; private static final /* synthetic */ StaticPart ajc$tjp_29 = null; private static final /* synthetic */ StaticPart ajc$tjp_3 = null; private static final /* synthetic */ StaticPart ajc$tjp_4 = null; private static final /* synthetic */ StaticPart ajc$tjp_5 = null; private static final /* synthetic */ StaticPart ajc$tjp_6 = null; private static final /* synthetic */ StaticPart ajc$tjp_7 = null; private static final /* synthetic */ StaticPart ajc$tjp_8 = null; private static final /* synthetic */ StaticPart ajc$tjp_9 = null; public AvcDecoderConfigurationRecord avcDecoderConfigurationRecord = new AvcDecoderConfigurationRecord(); static { ajc$preClinit(); } private static /* synthetic */ void ajc$preClinit() { Factory factory = new Factory("AvcConfigurationBox.java", AvcConfigurationBox.class); String str = "method-execution"; ajc$tjp_0 = factory.makeSJP(str, factory.makeMethodSig("1", "getConfigurationVersion", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "int"), 44); ajc$tjp_1 = factory.makeSJP(str, factory.makeMethodSig("1", "getAvcProfileIndication", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "int"), 48); ajc$tjp_10 = factory.makeSJP(str, factory.makeMethodSig("1", "setAvcLevelIndication", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "int", "avcLevelIndication", "", "void"), 84); ajc$tjp_11 = factory.makeSJP(str, factory.makeMethodSig("1", "setLengthSizeMinusOne", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "int", "lengthSizeMinusOne", "", "void"), 88); ajc$tjp_12 = factory.makeSJP(str, factory.makeMethodSig("1", "setSequenceParameterSets", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "java.util.List", "sequenceParameterSets", "", "void"), 92); ajc$tjp_13 = factory.makeSJP(str, factory.makeMethodSig("1", "setPictureParameterSets", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "java.util.List", "pictureParameterSets", "", "void"), 96); ajc$tjp_14 = factory.makeSJP(str, factory.makeMethodSig("1", "getChromaFormat", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "int"), 100); ajc$tjp_15 = factory.makeSJP(str, factory.makeMethodSig("1", "setChromaFormat", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "int", "chromaFormat", "", "void"), 104); ajc$tjp_16 = factory.makeSJP(str, factory.makeMethodSig("1", "getBitDepthLumaMinus8", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "int"), 108); ajc$tjp_17 = factory.makeSJP(str, factory.makeMethodSig("1", "setBitDepthLumaMinus8", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "int", "bitDepthLumaMinus8", "", "void"), 112); ajc$tjp_18 = factory.makeSJP(str, factory.makeMethodSig("1", "getBitDepthChromaMinus8", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "int"), 116); ajc$tjp_19 = factory.makeSJP(str, factory.makeMethodSig("1", "setBitDepthChromaMinus8", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "int", "bitDepthChromaMinus8", "", "void"), 120); ajc$tjp_2 = factory.makeSJP(str, factory.makeMethodSig("1", "getProfileCompatibility", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "int"), 52); ajc$tjp_20 = factory.makeSJP(str, factory.makeMethodSig("1", "getSequenceParameterSetExts", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "java.util.List"), 124); ajc$tjp_21 = factory.makeSJP(str, factory.makeMethodSig("1", "setSequenceParameterSetExts", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "java.util.List", "sequenceParameterSetExts", "", "void"), 128); ajc$tjp_22 = factory.makeSJP(str, factory.makeMethodSig("1", "hasExts", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "boolean"), 132); ajc$tjp_23 = factory.makeSJP(str, factory.makeMethodSig("1", "setHasExts", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "boolean", "hasExts", "", "void"), 136); ajc$tjp_24 = factory.makeSJP(str, factory.makeMethodSig("1", "getContentSize", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "long"), 147); ajc$tjp_25 = factory.makeSJP(str, factory.makeMethodSig("1", "getContent", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "java.nio.ByteBuffer", "byteBuffer", "", "void"), 153); ajc$tjp_26 = factory.makeSJP(str, factory.makeMethodSig("1", "getSPS", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "[Ljava.lang.String;"), 158); ajc$tjp_27 = factory.makeSJP(str, factory.makeMethodSig("1", "getPPS", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "[Ljava.lang.String;"), 162); ajc$tjp_28 = factory.makeSJP(str, factory.makeMethodSig("1", "getavcDecoderConfigurationRecord", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "com.mp4parser.iso14496.part15.AvcDecoderConfigurationRecord"), 167); ajc$tjp_29 = factory.makeSJP(str, factory.makeMethodSig("1", "toString", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "java.lang.String"), 172); ajc$tjp_3 = factory.makeSJP(str, factory.makeMethodSig("1", "getAvcLevelIndication", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "int"), 56); ajc$tjp_4 = factory.makeSJP(str, factory.makeMethodSig("1", "getLengthSizeMinusOne", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "int"), 60); ajc$tjp_5 = factory.makeSJP(str, factory.makeMethodSig("1", "getSequenceParameterSets", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "java.util.List"), 64); ajc$tjp_6 = factory.makeSJP(str, factory.makeMethodSig("1", "getPictureParameterSets", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "", "", "", "java.util.List"), 68); ajc$tjp_7 = factory.makeSJP(str, factory.makeMethodSig("1", "setConfigurationVersion", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "int", "configurationVersion", "", "void"), 72); ajc$tjp_8 = factory.makeSJP(str, factory.makeMethodSig("1", "setAvcProfileIndication", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "int", "avcProfileIndication", "", "void"), 76); ajc$tjp_9 = factory.makeSJP(str, factory.makeMethodSig("1", "setProfileCompatibility", "com.mp4parser.iso14496.part15.AvcConfigurationBox", "int", "profileCompatibility", "", "void"), 80); } public AvcConfigurationBox() { super("avcC"); } public void setConfigurationVersion(int i) { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_7, this, this, Conversions.intObject(i))); this.avcDecoderConfigurationRecord.configurationVersion = i; } public void setAvcProfileIndication(int i) { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_8, this, this, Conversions.intObject(i))); this.avcDecoderConfigurationRecord.avcProfileIndication = i; } public void setProfileCompatibility(int i) { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_9, this, this, Conversions.intObject(i))); this.avcDecoderConfigurationRecord.profileCompatibility = i; } public void setAvcLevelIndication(int i) { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_10, this, this, Conversions.intObject(i))); this.avcDecoderConfigurationRecord.avcLevelIndication = i; } public void setLengthSizeMinusOne(int i) { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_11, this, this, Conversions.intObject(i))); this.avcDecoderConfigurationRecord.lengthSizeMinusOne = i; } public void setSequenceParameterSets(List<byte[]> list) { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_12, this, this, list)); this.avcDecoderConfigurationRecord.sequenceParameterSets = list; } public void setPictureParameterSets(List<byte[]> list) { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_13, this, this, list)); this.avcDecoderConfigurationRecord.pictureParameterSets = list; } public void setChromaFormat(int i) { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_15, this, this, Conversions.intObject(i))); this.avcDecoderConfigurationRecord.chromaFormat = i; } public void setBitDepthLumaMinus8(int i) { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_17, this, this, Conversions.intObject(i))); this.avcDecoderConfigurationRecord.bitDepthLumaMinus8 = i; } public void setBitDepthChromaMinus8(int i) { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_19, this, this, Conversions.intObject(i))); this.avcDecoderConfigurationRecord.bitDepthChromaMinus8 = i; } public void _parseDetails(ByteBuffer byteBuffer) { this.avcDecoderConfigurationRecord = new AvcDecoderConfigurationRecord(byteBuffer); } public long getContentSize() { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_24, this, this)); return this.avcDecoderConfigurationRecord.getContentSize(); } public void getContent(ByteBuffer byteBuffer) { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_25, this, this, byteBuffer)); this.avcDecoderConfigurationRecord.getContent(byteBuffer); } public String toString() { RequiresParseDetailAspect.aspectOf().before(Factory.makeJP(ajc$tjp_29, this, this)); StringBuilder stringBuilder = new StringBuilder("AvcConfigurationBox{avcDecoderConfigurationRecord="); stringBuilder.append(this.avcDecoderConfigurationRecord); stringBuilder.append('}'); return stringBuilder.toString(); } }
[ "crash@home.home.hr" ]
crash@home.home.hr
9d320060c3c66353114bfb9255a1bb9b80a34d24
27444d2b0cdc12e23acf963c34a211098062e30f
/src/main/java/com/DAO/ProductDAO.java
e1b639d3ad2dd7bbcc2aa7586e981f488bc0fab5
[]
no_license
kumaramit1989/LootleEcommerceproject1
4ce74e2f2e6166ee4dcc76a7f264517ffd78486a
3b87f9b1ae79110857261d9731cf61b52339454d
refs/heads/master
2020-09-13T11:13:43.381689
2016-09-06T19:34:13
2016-09-06T19:34:13
67,539,977
0
0
null
null
null
null
UTF-8
Java
false
false
1,275
java
package com.DAO; import java.util.List; import java.util.ArrayList; import org.springframework.stereotype.Repository; import com.model.Product; @Repository public class ProductDAO { public List<Product> addProduct() { ArrayList <Product>li=new ArrayList<Product>(); li.add(new Product(1, "Cinthol Men's Deo Stick Intense 40g", "Presenting Cinthol deo stick","s1",35.67f, 100)); li.add(new Product(2, "Nivea Fresh Active Original 48 Hours Deodorant, 150ml", "NIVEA Fresh Active Original","s2", 200.50f, 150)); li.add(new Product(3, "AXE Dark Temptation Deodorant 150 ml", "Just be you, a confident man who likes to take the world by storm.","s3", 21.00f, 400)); li.add(new Product(4, "Casio Edifice Tachymeter Chronograph Black Dial Men's Watch", "Dial Color: Black, Case Shape: Round, Dial Glass material: Mineral","s3", 21677.00f, 400)); li.add(new Product(5, "Golden Bell Analogue Black Dial Men's Watch-GB-201Blk", "Brass Steel Case : Disclaimer Chronograph are Dummy and do not Work","s3", 2981.00f, 400)); li.add(new Product(6, "Fitbit Surge Ultimate Fitness Super Watch, Large", "Maximize training, maintain intensity and monitor calorie burn with automatic wrist-based heart rate monitoring","s3", 234351.00f, 400)); return li; } }
[ "amityadav.niit" ]
amityadav.niit
1d8bff06e7a89257d012624c7df61aaa2a6d25fc
bbb8bacf0e8eac052de398d3e5d75da3ded226d2
/emulator_dev/src/main/java/gr/codebb/arcadeflex/WIP/v037b7/drivers/stactics.java
92fbc0f86510243630745a23da8ca3ce7da741dd
[]
no_license
georgemoralis/arcadeflex-037b7-deprecated
f9ab8e08b2e8246c0e982f2cfa7ff73b695b1705
0777b9c5328e0dd55e2059795738538fd5c67259
refs/heads/main
2023-05-31T06:55:21.979527
2021-06-16T17:47:07
2021-06-16T17:47:07
326,236,655
1
0
null
null
null
null
UTF-8
Java
false
false
12,643
java
/* * ported to v0.37b7 * using automatic conversion tool v0.01 */ package gr.codebb.arcadeflex.WIP.v037b7.drivers; import static gr.codebb.arcadeflex.WIP.v037b7.machine.stactics.*; import static gr.codebb.arcadeflex.WIP.v037b7.mame.common.*; import static gr.codebb.arcadeflex.WIP.v037b7.mame.commonH.*; import static gr.codebb.arcadeflex.WIP.v037b7.mame.drawgfxH.*; import static gr.codebb.arcadeflex.WIP.v037b7.mame.inptport.*; import static gr.codebb.arcadeflex.WIP.v037b7.mame.inptportH.*; import static gr.codebb.arcadeflex.WIP.v037b7.mame.memory.*; import static gr.codebb.arcadeflex.WIP.v037b7.mame.memoryH.*; import static gr.codebb.arcadeflex.WIP.v037b7.vidhrdw.generic.*; import static gr.codebb.arcadeflex.WIP.v037b7.vidhrdw.stactics.*; import static gr.codebb.arcadeflex.v037b7.common.fucPtr.*; import static gr.codebb.arcadeflex.v037b7.mame.driverH.*; public class stactics { static MemoryReadAddress readmem[] = { new MemoryReadAddress(0x0000, 0x2fff, MRA_ROM), new MemoryReadAddress(0x4000, 0x47ff, MRA_RAM), new MemoryReadAddress(0x5000, 0x5fff, input_port_0_r), new MemoryReadAddress(0x6000, 0x6fff, input_port_1_r), new MemoryReadAddress(0x7000, 0x7fff, stactics_port_2_r), new MemoryReadAddress(0x8000, 0x8fff, stactics_port_3_r), new MemoryReadAddress(0x9000, 0x9fff, stactics_vert_pos_r), new MemoryReadAddress(0xa000, 0xafff, stactics_horiz_pos_r), new MemoryReadAddress(0xb000, 0xb3ff, MRA_RAM), new MemoryReadAddress(0xb800, 0xbfff, MRA_RAM), new MemoryReadAddress(0xd000, 0xd3ff, MRA_RAM), new MemoryReadAddress(0xd600, 0xd7ff, MRA_RAM), /* Used as scratch RAM, high scores, etc. */ new MemoryReadAddress(0xd800, 0xdfff, MRA_RAM), new MemoryReadAddress(0xe000, 0xe3ff, MRA_RAM), new MemoryReadAddress(0xe600, 0xe7ff, MRA_RAM), /* Used as scratch RAM, high scores, etc. */ new MemoryReadAddress(0xe800, 0xefff, MRA_RAM), new MemoryReadAddress(0xf000, 0xf3ff, MRA_RAM), new MemoryReadAddress(0xf600, 0xf7ff, MRA_RAM), /* Used as scratch RAM, high scores, etc. */ new MemoryReadAddress(0xf800, 0xffff, MRA_RAM), new MemoryReadAddress(-1) /* end of table */}; static MemoryWriteAddress writemem[] = { new MemoryWriteAddress(0x4000, 0x47ff, MWA_RAM), new MemoryWriteAddress(0x6000, 0x6001, stactics_coin_lockout_w), new MemoryWriteAddress(0x6006, 0x6007, stactics_palette_w), /* new MemoryWriteAddress( 0x6010, 0x601f, stactics_sound_w ), */ new MemoryWriteAddress(0x6016, 0x6016, MWA_RAM, stactics_motor_on), /* Note: This overlaps rocket sound */ /* new MemoryWriteAddress( 0x6020, 0x602f, stactics_lamp_latch_w ), */ new MemoryWriteAddress(0x6030, 0x603f, stactics_speed_latch_w), new MemoryWriteAddress(0x6040, 0x604f, stactics_shot_trigger_w), new MemoryWriteAddress(0x6050, 0x605f, stactics_shot_flag_clear_w), new MemoryWriteAddress(0x6060, 0x606f, MWA_RAM, stactics_display_buffer), /* new MemoryWriteAddress( 0x60a0, 0x60ef, stactics_sound2_w ), */ new MemoryWriteAddress(0x8000, 0x8fff, stactics_scroll_ram_w, stactics_scroll_ram), new MemoryWriteAddress(0xb000, 0xb3ff, stactics_videoram_b_w, stactics_videoram_b, videoram_size), new MemoryWriteAddress(0xb400, 0xb7ff, MWA_RAM), /* Unused, but initialized */ new MemoryWriteAddress(0xb800, 0xbfff, stactics_chardata_b_w, stactics_chardata_b), new MemoryWriteAddress(0xc000, 0xcfff, MWA_NOP), /* according to the schematics, nothing is mapped here */ /* but, the game still tries to clear this out */ new MemoryWriteAddress(0xd000, 0xd3ff, stactics_videoram_d_w, stactics_videoram_d), new MemoryWriteAddress(0xd400, 0xd7ff, MWA_RAM), /* Used as scratch RAM, high scores, etc. */ new MemoryWriteAddress(0xd800, 0xdfff, stactics_chardata_d_w, stactics_chardata_d), new MemoryWriteAddress(0xe000, 0xe3ff, stactics_videoram_e_w, stactics_videoram_e), new MemoryWriteAddress(0xe400, 0xe7ff, MWA_RAM), /* Used as scratch RAM, high scores, etc. */ new MemoryWriteAddress(0xe800, 0xefff, stactics_chardata_e_w, stactics_chardata_e), new MemoryWriteAddress(0xf000, 0xf3ff, stactics_videoram_f_w, stactics_videoram_f), new MemoryWriteAddress(0xf400, 0xf7ff, MWA_RAM), /* Used as scratch RAM, high scores, etc. */ new MemoryWriteAddress(0xf800, 0xffff, stactics_chardata_f_w, stactics_chardata_f), new MemoryWriteAddress(-1) /* end of table */}; static InputPortPtr input_ports_stactics = new InputPortPtr() { public void handler() { PORT_START(); /* IN0 */ /*PORT_BIT (0x80, IP_ACTIVE_HIGH, IPT_UNUSED );Motor status. see stactics_port_0_r */ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON2); PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START1); PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON3); PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON4); PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON5); PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON6); PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON7); PORT_START(); /* IN1 */ PORT_DIPNAME(0x07, 0x07, DEF_STR("Coin_B")); PORT_DIPSETTING(0x01, DEF_STR("4C_1C")); PORT_DIPSETTING(0x05, DEF_STR("2C_1C")); PORT_DIPSETTING(0x07, DEF_STR("1C_1C")); PORT_DIPSETTING(0x06, DEF_STR("1C_2C")); PORT_DIPSETTING(0x04, DEF_STR("1C_3C")); PORT_DIPSETTING(0x02, DEF_STR("1C_4C")); PORT_DIPSETTING(0x00, DEF_STR("1C_5C")); PORT_DIPSETTING(0x03, DEF_STR("1C_6C")); PORT_DIPNAME(0x38, 0x38, DEF_STR("Coin_A")); PORT_DIPSETTING(0x08, DEF_STR("4C_1C")); PORT_DIPSETTING(0x28, DEF_STR("2C_1C")); PORT_DIPSETTING(0x38, DEF_STR("1C_1C")); PORT_DIPSETTING(0x30, DEF_STR("1C_2C")); PORT_DIPSETTING(0x20, DEF_STR("1C_3C")); PORT_DIPSETTING(0x10, DEF_STR("1C_4C")); PORT_DIPSETTING(0x00, DEF_STR("1C_5C")); PORT_DIPSETTING(0x18, DEF_STR("1C_6C")); PORT_DIPNAME(0x40, 0x00, "High Score Initial Entry"); PORT_DIPSETTING(0x40, DEF_STR("Off")); PORT_DIPSETTING(0x00, DEF_STR("On")); PORT_DIPNAME(0x80, 0x00, DEF_STR("Demo_Sounds")); PORT_DIPSETTING(0x80, DEF_STR("Off")); PORT_DIPSETTING(0x00, DEF_STR("On")); PORT_START(); /* IN2 */ /* This is accessed by stactics_port_2_r() */ /*PORT_BIT (0x0f, IP_ACTIVE_HIGH, IPT_UNUSED );Random number generator */ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_COIN1); PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_COIN2); PORT_DIPNAME(0x40, 0x40, DEF_STR("Free_Play")); PORT_DIPSETTING(0x40, DEF_STR("Off")); PORT_DIPSETTING(0x00, DEF_STR("On")); PORT_SERVICE(0x80, IP_ACTIVE_LOW); PORT_START(); /* IN3 */ /* This is accessed by stactics_port_3_r() */ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1); /* PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED );*/ PORT_DIPNAME(0x04, 0x04, "Number of Barriers"); PORT_DIPSETTING(0x04, "4"); PORT_DIPSETTING(0x00, "6"); PORT_DIPNAME(0x08, 0x08, "Bonus Barriers"); PORT_DIPSETTING(0x08, "1"); PORT_DIPSETTING(0x00, "2"); PORT_DIPNAME(0x10, 0x00, "Extended Play"); PORT_DIPSETTING(0x10, DEF_STR("Off")); PORT_DIPSETTING(0x00, DEF_STR("On")); PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY); PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY); /* PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED );*/ PORT_START(); /* FAKE */ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY); PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY); INPUT_PORTS_END(); } }; /* For the character graphics */ static GfxLayout gfxlayout = new GfxLayout( 8, 8, 256, 1, /* 1 bit per pixel */ new int[]{0}, new int[]{0, 1, 2, 3, 4, 5, 6, 7}, new int[]{0 * 8, 1 * 8, 2 * 8, 3 * 8, 4 * 8, 5 * 8, 6 * 8, 7 * 8}, 8 * 8 ); /* For the LED Fire Beam (made up) */ static GfxLayout firelayout = new GfxLayout( 16, 9, 256, 1, /* 1 bit per pixel */ new int[]{0}, new int[]{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7}, new int[]{0 * 8, 1 * 8, 2 * 8, 3 * 8, 4 * 8, 5 * 8, 6 * 8, 7 * 8, 8 * 8}, 8 * 9 ); static GfxDecodeInfo gfxdecodeinfo[] = { new GfxDecodeInfo(0, 0, gfxlayout, 0, 64 * 4), /* Dynamically decoded from RAM */ new GfxDecodeInfo(0, 0, gfxlayout, 1 * 2 * 16, 64 * 4), /* Dynamically decoded from RAM */ new GfxDecodeInfo(0, 0, gfxlayout, 2 * 2 * 16, 64 * 4), /* Dynamically decoded from RAM */ new GfxDecodeInfo(0, 0, gfxlayout, 3 * 2 * 16, 64 * 4), /* Dynamically decoded from RAM */ new GfxDecodeInfo(0, 0, firelayout, 0, 64 * 4), /* LED Fire beam (synthesized gfx) */ new GfxDecodeInfo(0, 0, gfxlayout, 0, 64 * 4), /* LED and Misc. Display characters */ new GfxDecodeInfo(-1) }; static MachineDriver machine_driver_stactics = new MachineDriver( /* basic machine hardware */ new MachineCPU[]{ new MachineCPU( CPU_8080, 1933560, readmem, writemem, null, null, stactics_interrupt, 1 ),}, 60, DEFAULT_60HZ_VBLANK_DURATION, 1, null, /* video hardware */ 32 * 8, 32 * 8, new rectangle(0 * 8, 32 * 8 - 1, 0 * 8, 32 * 8 - 1), gfxdecodeinfo, 16, 16 * 4 * 4 * 2, stactics_vh_convert_color_prom, VIDEO_TYPE_RASTER, null, stactics_vh_start, stactics_vh_stop, stactics_vh_screenrefresh, /* sound hardware */ 0, 0, 0, 0, null ); /** * ************************************************************************* * * Game driver(s) * ************************************************************************** */ static RomLoadPtr rom_stactics = new RomLoadPtr() { public void handler() { ROM_REGION(0x10000, REGION_CPU1);/* 64k for code */ ROM_LOAD("epr-218x", 0x0000, 0x0800, 0xb1186ad2); ROM_LOAD("epr-219x", 0x0800, 0x0800, 0x3b86036d); ROM_LOAD("epr-220x", 0x1000, 0x0800, 0xc58702da); ROM_LOAD("epr-221x", 0x1800, 0x0800, 0xe327639e); ROM_LOAD("epr-222y", 0x2000, 0x0800, 0x24dd2bcc); ROM_LOAD("epr-223x", 0x2800, 0x0800, 0x7fef0940); ROM_REGION(0x1060, REGION_GFX1 | REGIONFLAG_DISPOSE);/* gfx decoded in vh_start */ ROM_LOAD("epr-217", 0x0000, 0x0800, 0x38259f5f); /* LED fire beam data */ ROM_LOAD("pr55", 0x0800, 0x0800, 0xf162673b); /* timing PROM (unused) */ ROM_LOAD("pr65", 0x1000, 0x0020, 0xa1506b9d); /* timing PROM (unused) */ ROM_LOAD("pr66", 0x1020, 0x0020, 0x78dcf300); /* timing PROM (unused) */ ROM_LOAD("pr67", 0x1040, 0x0020, 0xb27874e7); /* LED timing ROM (unused) */ ROM_REGION(0x0800, REGION_PROMS); ROM_LOAD("pr54", 0x0000, 0x0800, 0x9640bd6e); /* color/priority prom */ ROM_END(); } }; public static GameDriver driver_stactics = new GameDriver("1981", "stactics", "stactics.java", rom_stactics, null, machine_driver_stactics, input_ports_stactics, null, ROT0, "Sega", "Space Tactics", GAME_NO_SOUND); }
[ "chusogar@gmail.com" ]
chusogar@gmail.com
1f5cd99466f57c448840bc4bb544e749e1ad538d
731637747803d09b306fcca355c1b370a700a634
/payroll/src/main/java/br/com/payroll/gateway/WorkerGateway.java
4bcdb1fcf273194d739c8f0e62f22c843eb7ff48
[]
no_license
devmorfeu/ms-projects
f9915fc5fdbbc436e2488386afa947e4ba128729
b115aba68c106dca2381445c5b7066914f4cb091
refs/heads/master
2023-04-19T17:57:03.992599
2021-05-09T18:54:44
2021-05-09T18:54:44
363,667,025
0
0
null
null
null
null
UTF-8
Java
false
false
553
java
package br.com.payroll.gateway; import br.com.payroll.entitie.Worker; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @Component @FeignClient(name = "worker", url = "${worker.url}", path = "${worker.path}") public interface WorkerGateway { @GetMapping("/{id}") ResponseEntity<Worker> findId(@PathVariable Long id); }
[ "gabriel.nogueira21@hotmail.com" ]
gabriel.nogueira21@hotmail.com
096304af7397fa67399e11e7c5580ecea680aa18
27926c6c630dc97ef744ec33869a9f3fefcb3adc
/Courses/Spring-Hibernate-for-Beginners-includes-Spring-Boot/hb-05-many-to-many/src/com/luv2code/hibernate/demo/entity/Student.java
1fa27494dc3058ae71345222d140f29cb8061405
[ "Apache-2.0" ]
permissive
SergiOn/java
3e09cf1c82ba6b90a6a498bbda9791b7505ba2e8
723483bec0ec8d9d6a1604d0bb29dc64e4383429
refs/heads/main
2021-06-08T04:44:51.967211
2020-04-18T19:14:01
2020-04-18T19:14:01
129,922,956
3
1
null
null
null
null
UTF-8
Java
false
false
2,044
java
package com.luv2code.hibernate.demo.entity; import javax.persistence.*; import java.util.ArrayList; import java.util.List; @Entity @Table(name = "student") public class Student { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private int id; @Column(name = "first_name") private String firstName; @Column(name = "last_name") private String lastName; @Column(name = "email") private String email; @ManyToMany(fetch = FetchType.LAZY, cascade = {CascadeType.DETACH, CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) @JoinTable( name = "course_student", joinColumns = @JoinColumn(name = "student_id"), inverseJoinColumns = @JoinColumn(name = "course_id") ) private List<Course> courses; public Student() { } public Student(String firstName, String lastName, String email) { this.firstName = firstName; this.lastName = lastName; this.email = email; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public List<Course> getCourses() { return courses; } public void setCourses(List<Course> courses) { this.courses = courses; } @Override public String toString() { return "Student{" + "id=" + id + ", firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + ", email='" + email + '\'' + '}'; } }
[ "onishhenko@gmail.com" ]
onishhenko@gmail.com
b8ee5d727daeaff4d27acac9ea80c0e651fcc73a
f41135abcf1ce3e23adfa7569d939de4d254f824
/algorithms/strings/MinimalStringPeriod.java
eb91adfd44dd6fe889dfb1267191027decd4f2f0
[]
no_license
AmazingAnu/competitive-programming
cc2f9fbcbbe0fa763baaecde80e4047b08455c84
d1fb464c25519fea2d3821be364f157991d9c848
refs/heads/master
2022-06-16T18:12:14.192521
2020-05-09T14:32:54
2020-05-09T14:32:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,691
java
package algorithms.strings; /** * Created by rene on 27/01/18. */ // Based on https://www.geeksforgeeks.org/find-given-string-can-represented-substring-iterating-substring-n-times/ public class MinimalStringPeriod { // Check if a string is 'n' times repetition of one of its substrings // Utility function to fill lps[] or compute prefix function used in KMP string matching algorithm. private static void computeLPSArray(String str, int M, int lps[]) { // lenght of the previous // longest prefix suffix int len = 0; int i; lps[0] = 0; // lps[0] is always 0 i = 1; // the loop calculates lps[i] // for i = 1 to M-1 while (i < M) { if (str.charAt(i) == str.charAt(len)) { len++; lps[i] = len; i++; } else {// (pat[i] != pat[len]) if (len != 0) { // This is tricky. Consider the // example AAACAAAA and i = 7. len = lps[len - 1]; // Also, note that we do not increment i here } else { // if (len == 0) lps[i] = 0; i++; } } } } // Returns true if string is repetition of one of its substrings else return false. private static boolean isRepeat(String string) { // Find length of string and create // an array to store lps values used in KMP int n = string.length(); int lps[] = new int[n]; // Preprocess the pattern (calculate lps[] array) computeLPSArray(string, n, lps); // Find length of longest suffix // which is also prefix of string. int len = lps[n - 1]; // If there exist a suffix which is also // prefix AND Length of the remaining substring // divides total length, then string[0..n-len-1] // is the substring that repeats n/(n-len) // times (Readers can print substring and // value of n/(n-len) for more clarity. if (len > 0) { System.out.println(string.substring(0, n - len)); } else { System.out.println(string); } return (len > 0 && n % (n - len) == 0); } // Driver program to test above function public static void main(String[] args) { String txt[] = {"ABCABC", "ABABAB", "ABCDABCD", "GEEKSFORGEEKS", "GEEKGEEK", "AAAACAAAAC", "ABCDABC", "abcab", "aaaaaa"}; for (int i = 0; i < txt.length; i++) { System.out.println(isRepeat(txt[i])); } } }
[ "rene.argento@gmail.com" ]
rene.argento@gmail.com
52253e5f2aba79fe19c8f7f3c3ef2c1e93c6fd4d
771fcbeb4101f5e3ca133557b15f6d8164de3cf6
/src/mygame/PowerUp.java
bf683c12619077bf53f756f45beeca182fca1050
[]
no_license
Jeffrey-Sardina/LD41
a8444c87f1fa14aa09e7aa9bf8a29625746a28ae
fbd80ff164a5d8db4252f2d6c2d358cd8af6121c
refs/heads/master
2020-03-12T03:34:39.465113
2018-04-23T23:21:23
2018-04-23T23:21:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
794
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 mygame; /** * * @author jeffr */ public enum PowerUp { NONE { @Override public float getValue() { return 0; } }, ADD_SPEARS { @Override public float getValue() { return 10; } }, ADD_SPEED { @Override public float getValue() { return .1f; } }, INVINCIBILITY { @Override public float getValue() { return 10f; } }; public abstract float getValue(); }
[ "artur.hawwkwing97@gmail.com" ]
artur.hawwkwing97@gmail.com
0452731b2ea4ab67f96d3612dfae3274b2c78e1c
17bff354e48afa1b381836a8cc803ad19a904000
/src/main/java/com/ctn/git/command/type/GitCommand.java
9423be13f5672af82990694976f4c51e572a6398
[]
no_license
imrecetin/git-command-executor
c825157d5f8993ec051c2f7d3aa6463bb4ce9f00
676506929de6927e0ef45febf4ac41741b93aefb
refs/heads/master
2022-12-20T12:46:13.517670
2020-07-14T12:18:32
2020-07-14T12:18:32
279,577,049
1
0
null
2020-10-13T23:34:12
2020-07-14T12:19:25
Java
UTF-8
Java
false
false
601
java
package com.ctn.git.command.type; import com.ctn.git.model.GitModel; public abstract class GitCommand extends CmdCommand { public final GitModel gitModel; public GitCommand(GitModel gitModel,ProcessBuilder processBuilder){ super(processBuilder); this.gitModel=gitModel; } @Override public String toString() { return "CmdCommand{"+ " Command Name= "+ this.getClass().toString() + " command= " + getExecuteCommand() + " branch Name= "+gitModel.getCurrentBranchName()+ '}'; } }
[ "DSK1112525@avivasa.com.tr" ]
DSK1112525@avivasa.com.tr
7746fd559623bed48d3885e3e9cc820a2b627a31
1081753457a947e708964db3aef3b9d4bd43b77d
/part10/10-2_The_Comparable_Interface/src/Exercises/E2_Students_on_alphabetical_order/Main.java
48242bf486523cabc49fada094dfc6b7cb03d4e5
[]
no_license
lightkun10/Java-Programming-II
87cf0640446b7c832d8c86774fe129442a4e8f5c
ac35c58145ef2b3ea8204548e380d6da9082a68b
refs/heads/master
2022-12-21T15:26:01.579854
2020-09-11T02:53:10
2020-09-11T02:53:10
287,518,398
0
0
null
null
null
null
UTF-8
Java
false
false
271
java
package Exercises.E2_Students_on_alphabetical_order; public class Main { public static void main(String[] args) { Student first = new Student("Aku"); Student second = new Student("Aapo"); System.out.println(first.compareTo(second)); } }
[ "lifeisubw@gmail.com" ]
lifeisubw@gmail.com
0a975e26b5a3195f6d435d4a68ef435ee262c131
add5e0af95a785041591f315ffab5f24a2acf3fd
/src/test/java/com/wandrell/example/mule/wss/testing/integration/client/cxf/unsecure/ITUnsecureClientCodeFirst.java
7484d63dd48204b2b0c48ff81d2704ece5147ab6
[ "MIT" ]
permissive
Bernardo-MG/mule-ws-security-soap-example
69d6bcfe249d5fda5aa7f371630e3a38a4134b71
0543d0bc2b4369491fe2a977ba515cc84f99fae1
refs/heads/master
2020-04-15T18:09:15.152685
2017-02-07T07:02:22
2017-02-07T07:02:22
51,694,150
4
7
null
2017-02-07T07:02:23
2016-02-14T12:41:24
Java
UTF-8
Java
false
false
2,134
java
/** * The MIT License (MIT) * <p> * Copyright (c) 2016 the original author or authors. * <p> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * <p> * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * <p> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.wandrell.example.mule.wss.testing.integration.client.cxf.unsecure; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import com.wandrell.example.mule.wss.testing.util.config.context.ClientContextPaths; import com.wandrell.example.mule.wss.testing.util.config.properties.ClientCodeFirstPropertiesPaths; import com.wandrell.example.mule.wss.testing.util.test.integration.client.AbstractITClientFlow; /** * Integration tests for an unsecure code-first client flow testing that it * handles messages correctly. * * @author Bernardo Mart&iacute;nez Garrido */ @ContextConfiguration(ClientContextPaths.UNSECURE) @TestPropertySource({ ClientCodeFirstPropertiesPaths.UNSECURE }) public final class ITUnsecureClientCodeFirst extends AbstractITClientFlow { /** * Default constructor. */ public ITUnsecureClientCodeFirst() { super(); } }
[ "programming@wandrell.com" ]
programming@wandrell.com
f58caeb49f29a0e1174bc30fef5d24caa3d7916b
e1f59efdb9d7cdeaa24d3b9322fda8af5c46a0f9
/src/main/java/com/ft/routerlatencymonitor/ExternalServiceResource.java
e1a9becde63396fd897f3ba66bb06f956682d46d
[ "MIT" ]
permissive
Financial-Times/router-latency-monitor
1eab3cc3d8e28c08b9e6daa2fa51f46020b7a0c7
ea39c040902f870592c74305f80bc3dc3d02d56b
refs/heads/master
2023-09-04T01:20:57.965604
2021-02-16T14:37:29
2021-02-16T14:37:29
68,607,044
0
3
MIT
2023-09-03T05:04:01
2016-09-19T13:11:07
Java
UTF-8
Java
false
false
377
java
package com.ft.routerlatencymonitor; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.client.Client; @Path("/foo") //@Timed public class ExternalServiceResource { private final Client client; public ExternalServiceResource(Client client) { this.client = client; } @GET public String doStuff() { return "bar"; } }
[ "anurag@beancrunch.com" ]
anurag@beancrunch.com
26ab8e5e38f7c002a67442668e46e2886dc1c8ce
9049b2934947f34317a92f50c03f3097ca365e60
/schemacrawler-tools/src/main/java/schemacrawler/tools/text/operation/Query.java
7727c9ef4005460b1eb6a0fe01c7b15277b73941
[]
no_license
xiaofeilong1987/SchemaCrawler
f5bdcd614e33e0a222de6efce7d513d221370766
7430e08592e7217372279941264a249916fd1d7d
refs/heads/master
2020-12-31T05:41:31.472530
2015-06-12T07:37:39
2015-06-12T07:37:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,909
java
/* * SchemaCrawler * http://sourceforge.net/projects/schemacrawler * Copyright (c) 2000-2015, Sualeh Fatehi. * This library is free software; you can redistribute it and/or modify it under * the terms * of the GNU Lesser General Public License as published by the Free Software * Foundation; * either version 2.1 of the License, or (at your option) any later version. * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License * along with this * library; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, * Boston, MA 02111-1307, USA. */ package schemacrawler.tools.text.operation; import java.io.Serializable; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import schemacrawler.schema.Column; import schemacrawler.schema.JavaSqlType.JavaSqlTypeGroup; import schemacrawler.schema.Table; import schemacrawler.utility.NamedObjectSort; import sf.util.TemplatingUtility; import sf.util.Utility; /** * A SQL query. May be parameterized with ant-like variable references. * * @author sfatehi */ public final class Query implements Serializable { private static final long serialVersionUID = 2820769346069413473L; private static String getColumnsListAsString(final List<Column> columns, final boolean omitLargeObjectColumns) { final StringBuilder buffer = new StringBuilder(); for (int i = 0; i < columns.size(); i++) { final Column column = columns.get(i); final JavaSqlTypeGroup javaSqlTypeGroup = column.getColumnDataType() .getJavaSqlType().getJavaSqlTypeGroup(); if (!(omitLargeObjectColumns && javaSqlTypeGroup == JavaSqlTypeGroup.large_object)) { if (i > 0) { buffer.append(", "); } buffer.append(column.getName()); } } return buffer.toString(); } private final String name; private final String query; /** * Definition of a query, including a name, and parameterized or * regular SQL. * * @param name * Query name. * @param query * Query SQL. */ Query(final String name, final String query) { final boolean isNameProvided = !Utility.isBlank(name); final boolean isQueryProvided = !Utility.isBlank(query); if (isNameProvided && isQueryProvided) { this.name = name; this.query = query; } else if (isNameProvided && !isQueryProvided) { this.name = this.query = name; } else { throw new IllegalArgumentException("No SQL found for query"); } } /** * Gets the query name. * * @return Query name */ public String getName() { return name; } /** * Gets the query SQL. * * @return Query SQL */ public String getQuery() { return TemplatingUtility.expandTemplate(query); } /** * Gets the query with parameters substituted. * * @param table * Table information * @return Ready-to-execute quer */ public String getQueryForTable(final Table table, final boolean isAlphabeticalSortForTableColumns) { final Map<String, String> tableProperties = new HashMap<>(); if (table != null) { final NamedObjectSort columnsSort = NamedObjectSort .getNamedObjectSort(isAlphabeticalSortForTableColumns); final List<Column> columns = table.getColumns(); Collections.sort(columns, columnsSort); if (table.getSchema() != null) { tableProperties.put("schema", table.getSchema().getFullName()); } tableProperties.put("table", table.getFullName()); tableProperties.put("columns", getColumnsListAsString(columns, false)); tableProperties.put("orderbycolumns", getColumnsListAsString(columns, true)); tableProperties.put("tabletype", table.getTableType().toString()); } String sql = query; sql = TemplatingUtility.expandTemplate(sql, tableProperties); sql = TemplatingUtility.expandTemplate(sql); return sql; } /** * Determines if this query has substitutable parameters, and whether * it should be run once for each table. * * @return If the query is to be run over each table */ public boolean isQueryOver() { final Set<String> keys = TemplatingUtility.extractTemplateVariables(query); return keys.contains("table"); } /** * {@inheritDoc} * * @see java.lang.Object#toString() */ @Override public String toString() { return name + ":" + query; } }
[ "messina@pa.icar.cnr.it" ]
messina@pa.icar.cnr.it
605b729c292bd6156893e44fa596187f9e024869
9ffe2749f9df7a50c04a8aea88e863b5bb64dabc
/JavaLogin/src/java4s/OnServletLogin.java
b3ed68fb98b38a9f4875f5ce130e2cf5653703a1
[]
no_license
prasanthkorada/JavaLogin
2cea15eb89d7c96d104cf9bd3ceb39f2aceb25ad
b4d8fcf4570bcc76470e8826245203a607f6c84a
refs/heads/master
2020-03-22T03:55:30.123476
2018-07-02T15:29:35
2018-07-02T15:29:35
139,460,728
0
0
null
null
null
null
UTF-8
Java
false
false
810
java
package java4s; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class OnServletLogin extends HttpServlet { protected void doPost(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException { PrintWriter pw=res.getWriter(); res.setContentType("text/html"); String user=req.getParameter("userName"); String pass=req.getParameter("userPassword"); pw.print("<font face='verdana'>"); if(user.equals("java4s")&&pass.equals("java4s")) pw.println("Login Success...!"); else pw.println("Login Failed...!"); pw.print("</font>"); pw.close(); } }
[ "prasanthkumarkorada@yahoo.com" ]
prasanthkumarkorada@yahoo.com
b47f0e915da9041c1a304417e12040833c4e44b0
2ae2c852dec41003c300afcaef93233def81edc2
/AVL/src/AUXILI/AVLTree.java
efefc142b956583d57c57d0b1eece82e78bc971f
[]
no_license
2XL/JavaHw
ce2601be9d9aab6e54e76b9f7eeae627afce3602
d5229ee9a73b607107ce39f8d8943941216ff09a
refs/heads/master
2021-05-25T18:14:16.415792
2020-04-07T17:22:13
2020-04-07T17:22:13
253,863,802
0
0
null
null
null
null
UTF-8
Java
false
false
10,617
java
package AUXILI; public class AVLTree<E extends Comparable<? super E>> { /** * @param rotateBase: The root of the subtree that is being rotated * @param rootAbove: The AVLNode that points to rotateBase * * This method rotates the subtree balancing it to within a margin of |1|. * */ AVLNode<E> rootAbove; public void rotate(AVLNode<E> rotateBase, AVLNode<E> rootAbove) { int balance = rotateBase.getBalance(); if(Math.abs(balance) < 2) { System.out.println("No rotate"); } //gets the child on the side with the greater height AVLNode<E> child = (balance < 0) ? rotateBase.getLeft() : rotateBase.getRight(); if(child == null) return; int childBalance = child.getBalance(); AVLNode<E> grandChild = null; //both the child and grandchild are on the //left side, so rotate the child up to the root position if(balance < -1 && childBalance < 0) { if(rootAbove != this.rootAbove && rootAbove.getRight() == rotateBase) { rootAbove.setRightNode(child); } else { rootAbove.setLeftNode(child); } grandChild = child.getRight(); child.setRightNode(rotateBase); rotateBase.setLeftNode(grandChild); return; } //both the child and the grandchild are on the //right side, so rotate the child up to the root position else { if(balance > 1 && childBalance > 0) { if(rootAbove != this.rootAbove && rootAbove.getRight() == rotateBase) { rootAbove.setRightNode(child); } else { rootAbove.setLeftNode(child); } grandChild = child.getLeft(); child.setLeftNode(rotateBase); rotateBase.setRightNode(grandChild); return; } } //the child is on the left side, but the grandchild is on the //right side, so rotate the grandchild up to the child position //so the condition of the first if statement is satisfied, //then recurse to have the first if statement evaluated // else if(balance < -1 && childBalance > 0) { grandChild = child.getRight(); rotateBase.setLeftNode(grandChild); child.setRightNode(grandChild.getLeft()); grandChild.setLeftNode(child); rotate(rotateBase, rootAbove); return; } //the child is on the right side, but the grandchild is on the //left side, so rotate the grandchild up to the child position //so the condition of the second if statement is satisfied, //then recurse to have the second if statement evaluated else if(balance > 1 && childBalance < 0) { grandChild = child.getLeft(); rotateBase.setRightNode(grandChild); child.setLeftNode(grandChild.getRight()); grandChild.setRightNode(child); rotate(rotateBase, rootAbove); return; } } /** * @param element: The element to insert into the Tree * * This method invokes a private helper method to insert the element. * It passes the root as the place to start. * */ public void insert(E element){ insert(element, rootAbove.getLeft()); } /** * @param element: The element to insert into the Tree * @param temp: The AVLNode to evaluate for recursive insertion * * This method recursively traverses the Tree, inserting the * element at the appropriate spot and incrementing the balance * factors for the subtrees as it evaluates. The Tree will then * recursively rebalance as necessary. * */ private void insert(E element, AVLNode<E> temp){ if(this.rootAbove.getLeft() == null){ this.rootAbove.setLeftNode(new AVLNode<E>(element)); return; } //travel left or right based on the //comparison of element to temp.element //remember that left means that element <= temp.element //and right means element > temp.element int compare = element.compareTo(temp.getElement()); //travel to the left of the Tree, inserting //if the bottom has been reached if(compare <= 0){ //System.out.println(temp.getLeft()); if(temp.getLeft() == null){ temp.setLeft(element); return; } insert(element, temp.getLeft()); } //otherwise, travelling to the right of the Tree, //inserting if the bottom has been reached else{ if(temp.getRight() == null){ temp.setRight(element); return; } insert(element, temp.getRight()); } //if the root is being evaluated it, rotate if necessary if(temp == rootAbove.getLeft()){ rotate(rootAbove.getLeft(), rootAbove); } //otherwise, rotate the left and right subtrees //as necessary if(temp.getLeft() != null){ rotate(temp.getLeft(), temp); } if(temp.getRight() != null){ rotate(temp.getRight(), temp); } } //end insert /** * @param element: The element to remove from the AVLTree * @param temp: The root node of the subtree * * This method recursively traverses the AVLTree based on * the ordering of the element with respect to the Tree's * elements. If the element is not found, then nothing happens. * Otherwise, the element is removed, and either the far-right * element on its left child or the far left element on its right * child replaces it. ***/ private void remove(E element, AVLNode<E> temp){ if(temp == null) return; int compare = 0; if(temp != rootAbove) compare = element.compareTo(temp.getElement()); boolean direction = (compare > 0 && temp != rootAbove); AVLNode<E> child = direction ? temp.getRight() : temp.getLeft(); if(child == null) return; //if the root is perfectly balanced, slide the left Node up //and reinsert the left.right element if necessary if(temp == rootAbove && child.getBalance() == 0 && child.getElement().equals(element)){ AVLNode<E> newRoot = child.getLeft(); if(newRoot == null){ rootAbove.setLeftNode(null); return; } else{ enactRemoval(temp, child, false); return; } } //if the element is found and the root is not // perfectly balanced, remove it using enactRemoval() else if(element.compareTo(child.getElement()) == 0){ enactRemoval(temp, child, direction); } //otherwise, recursively traverse the tree else{ remove(element, child); } } /** * @param parent: The parent of the element to be removed * @param remove: The element to remove from the Tree * @param direction: false if remove is to the left of parent, true otherwise * * This method physically removes the AVLNode with the element from the * AVLTree, replacing it with the appropriate successor. ***/ private void enactRemoval(AVLNode<E> parent, AVLNode<E> remove, boolean direction){ AVLNode<E> temp = null; AVLNode<E> left = remove.getLeft(); AVLNode<E> right = remove.getRight(); //if the Node to remove is not a leaf, find the appropriate successor if(left != null || right != null){ temp = findSuccessor(remove); } //if remove is the right child of parent, update parent's right node if(direction && (parent != rootAbove)){ parent.setRightNode(temp); } //otherwise, update its left node with the successor else parent.setLeftNode(temp); //and update temp to point to remove's children if(temp != null){ if(temp != left){ temp.setLeftNode(remove.getLeft()); } if(temp != right){ temp.setRightNode(remove.getRight()); } } //and finally, discard those references from remove //so that the removed Node is garbage collected sooner remove.setLeftNode(null); remove.setRightNode(null); } /** * @param root: The element for which to find a successor AVLNode * @return AVLNode<E>: The successor Node ***/ private AVLNode<E> findSuccessor(AVLNode<E> root){ AVLNode<E> temp = root; AVLNode<E> parent = null; //if the balance favors the right, traverse right //otherwise, traverse left boolean direction = (temp.getBalance() > 0); parent = temp; temp = (direction) ? temp.getRight() : temp.getLeft(); if(temp == null) return temp; //and find the farthest left-Node on the right side, //or the farthest right-Node on the left side while((temp.getRight() != null && !direction ) || (temp.getLeft() != null && direction)){ parent = temp; temp = (direction) ? temp.getLeft() : temp.getRight(); } //finally, update the successor's parent's references //to adjust for a left child on the right node, or a right //child on the left-node if(temp == parent.getLeft()){ parent.setLeftNode(temp.getRight()); temp.setRightNode(null); } else{ parent.setRightNode(temp.getLeft()); temp.setLeftNode(null); } return temp; } /** * @param element: The element to search for in the AVLTree * @return boolean: true if the element is found, false otherwise * * The contains method simply traverses the binary search tree based on * element's relation to the AVLNodes in the Tree until a match is found * or it hits the bottom of the Tree. * */ public boolean contains(E element){ AVLNode<E> temp = rootAbove.getLeft(); while(temp != null){ if(temp.getElement().equals(element)) return true; int balance = element.compareTo(temp.getElement()); temp = (balance < 0) ? temp.getLeft() : temp.getRight(); } return false; } }
[ "chenglong.zq@gmail.com" ]
chenglong.zq@gmail.com
1bc0e7169703b6d36160b547d1eee5edf27ac62e
adb0b6c69379ff74d89d6b2e82f17e86408925b0
/app/src/main/java/com/xyx/javadesignmode/ui/b19/ToolsViewModel.java
6019107e234c451b2b04ab162ca6ca310071f793
[]
no_license
a316375/JavaDesign_Mode
4a88d0cee8c0a93f85bd63ee39f09e9a0fa29723
97bd2dd51640fc30a341154382bcb25bc2721ff7
refs/heads/master
2020-07-17T13:14:37.054043
2020-02-26T03:34:27
2020-02-26T03:34:27
206,026,628
0
0
null
null
null
null
UTF-8
Java
false
false
5,399
java
package com.xyx.javadesignmode.ui.b19; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.ViewModel; public class ToolsViewModel extends ViewModel { private MutableLiveData<String> mText; public ToolsViewModel() { mText = new MutableLiveData<>(); mText.setValue("23 种设计模式(19):组合模式\n" + "概述:\n" + "将对象组合成树形结构以表示“部分-整体”的层次结构。“Composite 使得用户对单个对象和组合对象的使用具有一致性。”\n" + "类型:结构型模式。类图:\n" + "[code=img]design/composite.png\n" + "适用性:\n" + "1、你想表示对象的部分-整体层次结构。\n" + "2、你希望用户忽略组合对象与单个对象的不同,用户将统一地使用组合结构中的所有对象。\n" + "参与者:\n" + "1、Component\n" + "为组合中的对象声明接口。\n" + "在适当的情况下,实现所有类共有接口的缺省行为。\n" + " \n" + "声明一个接口用于访问和管理 Component 的子组件。\n" + "(可选)在递归结构中定义一个接口,用于访问一个父部件,并在合适的情况下实现它。\n" + "2、Leaf\n" + "在组合中表示叶节点对象,叶节点没有子节点。在组合中定义节点对象的行为。\n" + "3、Composite\n" + "定义有子部件的那些部件的行为。存储子部件。\n" + "在 Component 接口中实现与子部件有关的操作。\n" + "4、Client\n" + "通过 Component 接口操纵组合部件的对象。例子:\n" + "\n" + "public abstract class Employer {\nprivate String name;\n" + "public void setName(String name) {\nthis.name = name;\n" + "}\n" + "\n" + "public String getName() {\nreturn this.name;\n" + "}\n" + "\n" + "public abstract void add(Employer employer); public abstract void delete(Employer employer); public List employers;\n" + "public void printInfo() {\nSystem.out.println(name);\n" + "}\n" + "\n" + "public List getEmployers() {\nreturn this.employers;\n" + "}\n" + "}\n" + "\n" + "public class Programmer extends Employer {\n" + "\n" + "public Programmer(String name) {\nsetName(name);\n" + " \n" + "employers = null;// 程序员, 表示没有下属了\n" + "}\n" + "\n" + "public void add(Employer employer) {\n" + "\n" + "}\n" + "\n" + "public void delete(Employer employer) {\n" + "\n" + "}\n" + "}\n" + "\n" + "public class ProjectAssistant extends Employer {\n" + "\n" + "public ProjectAssistant(String name) {\nsetName(name);\n" + "employers = null;// 项目助理, 表示没有下属了\n" + "}\n" + "\n" + "public void add(Employer employer) {\n" + "\n" + "}\n" + "\n" + "public void delete(Employer employer) {\n" + "\n" + "}\n" + "}\n" + "\n" + "public class ProjectManager extends Employer {\n" + "\n" + "public ProjectManager(String name) {\nsetName(name);\n" + "employers = new ArrayList();\n" + "}\n" + "\n" + "public void add(Employer employer) {\nemployers.add(employer);\n" + "}\n" + "\n" + "public void delete(Employer employer) {\nemployers.remove(employer);\n" + "}\n" + "}\n" + " \n" + "public class Test {\n" + "\n" + "public static void main(String[] args) {\n Employer pm = new ProjectManager(\"项目经理\");\n" + "Employer pa = new ProjectAssistant(\"项目助理\"); Employer programmer1 = new Programmer(\"程序员一\"); Employer programmer2 = new Programmer(\"程序员二\");\n" + "\n" + "pm.add(pa);// 为项目经理添加项目助理\n" + "pm.add(programmer2);// 为项目经理添加程序员\n" + "\n" + "List<Employer> ems = pm.getEmployers(); for (Employer em : ems) {\n" + "System.out.println(em.getName());\n" + "}\n" + "}\n" + "}\n" + "\n" + "result:\n" + "\n" + "项目助理程序员二\n\n\n\n\n\n\n\n\n\n"); } public LiveData<String> getText() { return mText; } }
[ "xuyexu998@g,ail.com" ]
xuyexu998@g,ail.com
bb1bb04252d289bd89379dc4c638aba4f64c78fb
0f10abe516b7915e5336ed88eac9a08e74dd449a
/extensions/guacamole-auth-mssql/src/main/java/net/sourceforge/guacamole/net/auth/mssql/service/UserService.java
f5bc0a3fb51ff38ba04b72da5dac29e38ddbfcb0
[ "MIT" ]
permissive
ruben00/guacamole-client
c9d337ba587a52a1ac6edefe90d74204b7a3a24d
a5fe04da054889460cd3894727244608a33e8a39
refs/heads/master
2021-01-15T16:05:10.887036
2015-02-24T00:39:45
2015-02-24T00:39:45
31,142,295
0
0
null
2015-02-21T21:46:28
2015-02-21T21:46:28
null
UTF-8
Java
false
false
11,454
java
/* * Copyright (C) 2013 Glyptodon LLC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package net.sourceforge.guacamole.net.auth.mssql.service; import com.google.common.collect.Lists; import com.google.inject.Inject; import com.google.inject.Provider; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.glyptodon.guacamole.GuacamoleException; import org.glyptodon.guacamole.net.auth.Credentials; import net.sourceforge.guacamole.net.auth.mssql.MSSQLUser; import net.sourceforge.guacamole.net.auth.mssql.dao.UserMapper; import net.sourceforge.guacamole.net.auth.mssql.model.User; import net.sourceforge.guacamole.net.auth.mssql.model.UserExample; import net.sourceforge.guacamole.net.auth.mssql.model.UserWithBLOBs; /** * Service which provides convenience methods for creating, retrieving, and * manipulating users. * * @author Michael Jumper, James Muehlner */ public class UserService { /** * DAO for accessing users. */ @Inject private UserMapper userDAO; /** * Provider for creating users. */ @Inject private Provider<MSSQLUser> msSQLUserProvider; /** * Service for checking permissions. */ @Inject private PermissionCheckService permissionCheckService; /** * Service for encrypting passwords. */ @Inject private PasswordEncryptionService passwordService; /** * Service for generating random salts. */ @Inject private SaltService saltService; /** * Create a new MSSQLUser based on the provided User. * * @param user The User to use when populating the data of the given * MSSQLUser. * @return A new MSSQLUser object, populated with the data of the given * user. * * @throws GuacamoleException If an error occurs while reading the data * of the provided User. */ public MSSQLUser toMSSQLUser(org.glyptodon.guacamole.net.auth.User user) throws GuacamoleException { MSSQLUser msSQLUser = msSQLUserProvider.get(); msSQLUser.init(user); return msSQLUser; } /** * Create a new MSSQLUser based on the provided database record. * * @param user The database record describing the user. * @return A new MSSQLUser object, populated with the data of the given * database record. */ private MSSQLUser toMSSQLUser(UserWithBLOBs user) { // Retrieve user from provider MSSQLUser msSQLUser = msSQLUserProvider.get(); // Init with data from given database user msSQLUser.init( user.getUser_id(), user.getUsername(), null, permissionCheckService.retrieveAllPermissions(user.getUser_id()) ); // Return new user return msSQLUser; } /** * Retrieves the user having the given ID from the database. * * @param id The ID of the user to retrieve. * @return The existing MSSQLUser object if found, null otherwise. */ public MSSQLUser retrieveUser(int id) { // Query user by ID UserWithBLOBs user = userDAO.selectByPrimaryKey(id); // If no user found, return null if(user == null) return null; // Otherwise, return found user return toMSSQLUser(user); } /** * Retrieves the user having the given username from the database. * * @param name The username of the user to retrieve. * @return The existing MSSQLUser object if found, null otherwise. */ public MSSQLUser retrieveUser(String name) { // Query user by ID UserExample example = new UserExample(); example.createCriteria().andUsernameEqualTo(name); List<UserWithBLOBs> users = userDAO.selectByExampleWithBLOBs(example); // If no user found, return null if(users.isEmpty()) return null; // Otherwise, return found user return toMSSQLUser(users.get(0)); } /** * Retrieves the user corresponding to the given credentials from the * database. * * @param credentials The credentials to use when locating the user. * @return The existing MSSQLUser object if the credentials given are * valid, null otherwise. */ public MSSQLUser retrieveUser(Credentials credentials) { // No null users in database if (credentials.getUsername() == null) return null; // Query user UserExample userExample = new UserExample(); userExample.createCriteria().andUsernameEqualTo(credentials.getUsername()); List<UserWithBLOBs> users = userDAO.selectByExampleWithBLOBs(userExample); // Check that a user was found if (users.isEmpty()) return null; // Assert only one user found assert users.size() == 1 : "Multiple users with same username."; // Get first (and only) user UserWithBLOBs user = users.get(0); // Check password, if invalid return null if (!passwordService.checkPassword(credentials.getPassword(), user.getPassword_hash(), user.getPassword_salt())) return null; // Return found user return toMSSQLUser(user); } /** * Retrieves a translation map of usernames to their corresponding IDs. * * @param ids The IDs of the users to retrieve the usernames of. * @return A map containing the names of all users and their corresponding * IDs. */ public Map<String, Integer> translateUsernames(List<Integer> ids) { // If no IDs given, just return empty map if (ids.isEmpty()) return Collections.EMPTY_MAP; // Map of all names onto their corresponding IDs Map<String, Integer> names = new HashMap<String, Integer>(); // Get all users having the given IDs UserExample example = new UserExample(); example.createCriteria().andUser_idIn(ids); List<User> users = userDAO.selectByExample(example); // Produce set of names for (User user : users) names.put(user.getUsername(), user.getUser_id()); return names; } /** * Retrieves a map of all usernames for the given IDs. * * @param ids The IDs of the users to retrieve the usernames of. * @return A map containing the names of all users and their corresponding * IDs. */ public Map<Integer, String> retrieveUsernames(Collection<Integer> ids) { // If no IDs given, just return empty map if (ids.isEmpty()) return Collections.EMPTY_MAP; // Map of all names onto their corresponding IDs Map<Integer, String> names = new HashMap<Integer, String>(); // Get all users having the given IDs UserExample example = new UserExample(); example.createCriteria().andUser_idIn(Lists.newArrayList(ids)); List<User> users = userDAO.selectByExample(example); // Produce set of names for (User user : users) names.put(user.getUser_id(), user.getUsername()); return names; } /** * Creates a new user having the given username and password. * * @param username The username to assign to the new user. * @param password The password to assign to the new user. * @return A new MSSQLUser containing the data of the newly created * user. */ public MSSQLUser createUser(String username, String password) { // Initialize database user UserWithBLOBs user = new UserWithBLOBs(); user.setUsername(username); // Set password if specified if (password != null) { byte[] salt = saltService.generateSalt(); user.setPassword_salt(salt); user.setPassword_hash( passwordService.createPasswordHash(password, salt)); } // Create user userDAO.insert(user); return toMSSQLUser(user); } /** * Deletes the user having the given ID from the database. * @param user_id The ID of the user to delete. */ public void deleteUser(int user_id) { userDAO.deleteByPrimaryKey(user_id); } /** * Updates the user in the database corresponding to the given MSSQLUser. * * @param msSQLUser The MSSQLUser to update (save) to the database. This * user must already exist. */ public void updateUser(MSSQLUser msSQLUser) { UserWithBLOBs user = new UserWithBLOBs(); user.setUser_id(msSQLUser.getUserID()); user.setUsername(msSQLUser.getUsername()); // Set password if specified if (msSQLUser.getPassword() != null) { byte[] salt = saltService.generateSalt(); user.setPassword_salt(salt); user.setPassword_hash( passwordService.createPasswordHash(msSQLUser.getPassword(), salt)); } // Update the user in the database userDAO.updateByPrimaryKeySelective(user); } /** * Get the usernames of all the users defined in the system. * * @return A Set of usernames of all the users defined in the system. */ public Set<String> getAllUsernames() { // Set of all present usernames Set<String> usernames = new HashSet<String>(); // Query all usernames List<User> users = userDAO.selectByExample(new UserExample()); for (User user : users) usernames.add(user.getUsername()); return usernames; } /** * Get the user IDs of all the users defined in the system. * * @return A list of user IDs of all the users defined in the system. */ public List<Integer> getAllUserIDs() { // Set of all present user IDs List<Integer> userIDs = new ArrayList<Integer>(); // Query all user IDs List<User> users = userDAO.selectByExample(new UserExample()); for (User user : users) userIDs.add(user.getUser_id()); return userIDs; } }
[ "melo00@msn.com" ]
melo00@msn.com
e552afe8f81553a3dc2167dcfa10fafac2f4dca6
afc946fef753877d0409cd783807be8c25432110
/MagicLuoZookeeper/src/main/java/com/lcydream/project/operation/zkclient/ZkClientSession.java
3ca39e5fb6c37f848b3f87492a866586ae47210f
[]
no_license
LCY2013/magicLuoProject
9db59e882a22501fd537d19e2760500a09a2a2c8
940fc7c30dadd857cf55890736b641f13d6762b9
refs/heads/master
2022-12-22T20:49:35.528825
2019-11-28T02:38:26
2019-11-28T02:38:26
166,629,119
1
0
null
2022-12-16T04:37:13
2019-01-20T06:05:59
JavaScript
UTF-8
Java
false
false
554
java
package com.lcydream.project.operation.zkclient; import com.alibaba.fastjson.JSON; import org.I0Itec.zkclient.ZkClient; /** * ZkClientSession * * @author Luo Chun Yun * @date 2018/9/1 10:55 */ public class ZkClientSession { private final static String CONNECTSTRING="192.168.21.160:2181,192.168.21.163:2181,192.168.21.164:2181,192.168.21.165:2181"; public static void main(String[] args) { ZkClient zkClient = new ZkClient(CONNECTSTRING, 30000); System.out.println("连接成功:"+ JSON.toJSONString(zkClient)); } }
[ "1475653689@qq.com" ]
1475653689@qq.com
660f6375b99cc5ce5a0016d2e9739597e9baa6b0
f321db1ace514d08219cc9ba5089ebcfff13c87a
/generated-tests/random/tests/s43/5_la4j/evosuite-tests/org/la4j/Matrix_ESTest_scaffolding.java
70cca92a8b78848bdbde8c43808b8b42a534e865
[]
no_license
sealuzh/dynamic-performance-replication
01bd512bde9d591ea9afa326968b35123aec6d78
f89b4dd1143de282cd590311f0315f59c9c7143a
refs/heads/master
2021-07-12T06:09:46.990436
2020-06-05T09:44:56
2020-06-05T09:44:56
146,285,168
2
2
null
null
null
null
UTF-8
Java
false
false
19,583
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Mar 24 05:17:06 GMT 2019 */ package org.la4j; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; import static org.evosuite.shaded.org.mockito.Mockito.*; @EvoSuiteClassExclude public class Matrix_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.la4j.Matrix"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {} } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); java.lang.System.setProperty("user.dir", "/home/apaniche/performance/Dataset/gordon_scripts/projects/5_la4j"); java.lang.System.setProperty("java.io.tmpdir", "/tmp"); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Matrix_ESTest_scaffolding.class.getClassLoader() , "org.la4j.matrix.dense.Basic2DMatrix", "org.la4j.matrix.dense.Basic1DMatrix", "org.la4j.operation.ooplace.OoPlaceVectorsAddition", "org.la4j.matrix.functor.MatrixProcedure", "org.la4j.operation.VectorMatrixOperation", "org.la4j.decomposition.CholeskyDecompositor", "org.la4j.matrix.SparseMatrix$2", "org.la4j.matrix.SparseMatrix$1", "org.la4j.iterator.JoinFunction", "org.la4j.matrix.functor.MatrixPredicate", "org.la4j.vector.SparseVector", "org.la4j.matrix.SparseMatrix$4", "org.la4j.matrix.SparseMatrix$3", "org.la4j.iterator.RowMajorMatrixIterator", "org.la4j.Matrices$33", "org.la4j.matrix.functor.MatrixAccumulator", "org.la4j.matrix.functor.MatrixFunction", "org.la4j.operation.SymmetricMatrixMatrixOperation", "org.la4j.decomposition.RawLUDecompositor", "org.la4j.operation.ooplace.OoPlaceMatrixHadamardProduct", "org.la4j.inversion.NoPivotGaussInverter", "org.la4j.linear.AbstractSolver", "org.la4j.Vector$1", "org.la4j.linear.SeidelSolver", "org.la4j.operation.ooplace.OoPlaceMatricesSubtraction", "org.la4j.Matrices$30", "org.la4j.LinearAlgebra$DecompositorFactory", "org.la4j.matrix.functor.AdvancedMatrixPredicate", "org.la4j.LinearAlgebra", "org.la4j.iterator.ColumnMajorMatrixIterator", "org.la4j.vector.functor.VectorProcedure", "org.la4j.Matrices", "org.la4j.Vectors", "org.la4j.Vectors$1", "org.la4j.Vectors$2", "org.la4j.Vectors$3", "org.la4j.decomposition.RawQRDecompositor", "org.la4j.operation.SimpleMatrixMatrixOperation", "org.la4j.Vectors$4", "org.la4j.inversion.MatrixInverter", "org.la4j.operation.ooplace.OoPlaceMatrixByVectorMultiplication", "org.la4j.matrix.DenseMatrix", "org.la4j.operation.ooplace.OoPlaceKroneckerProduct", "org.la4j.Vectors$5", "org.la4j.inversion.GaussJordanInverter", "org.la4j.Vectors$6", "org.la4j.Vectors$7", "org.la4j.Vectors$8", "org.la4j.vector.VectorFactory", "org.la4j.Vector", "org.la4j.iterator.CursorIterator$IteratorState", "org.la4j.linear.LinearSystemSolver", "org.la4j.iterator.JoinFunction$5", "org.la4j.matrix.SparseMatrix", "org.la4j.operation.ooplace.OoPlaceOuterProduct", "org.la4j.iterator.JoinFunction$3", "org.la4j.iterator.JoinFunction$4", "org.la4j.decomposition.LUDecompositor", "org.la4j.Matrix", "org.la4j.Matrices$SymmetricMatrixPredicate", "org.la4j.decomposition.MatrixDecompositor", "org.la4j.iterator.JoinFunction$1", "org.la4j.iterator.CursorIterator", "org.la4j.iterator.JoinFunction$2", "org.la4j.operation.SymmetricVectorVectorOperation", "org.la4j.operation.ooplace.OoPlaceVectorByMatrixMultiplication", "org.la4j.Vectors$17", "org.la4j.Vectors$16", "org.la4j.Matrices$DiagonallyDominantPredicate", "org.la4j.Vectors$19", "org.la4j.iterator.CursorToColumnMajorMatrixIterator", "org.la4j.Vectors$18", "org.la4j.operation.VectorMatrixOperation$2", "org.la4j.operation.VectorMatrixOperation$1", "org.la4j.vector.functor.VectorFunction", "org.la4j.Matrix$4", "org.la4j.vector.sparse.CompressedVector$1", "org.la4j.Vectors$13", "org.la4j.vector.functor.VectorAccumulator", "org.la4j.Vectors$12", "org.la4j.linear.SquareRootSolver", "org.la4j.Matrix$2", "org.la4j.operation.ooplace.OoPlaceMatricesMultiplication", "org.la4j.linear.JacobiSolver", "org.la4j.Matrix$3", "org.la4j.vector.sparse.CompressedVector$2", "org.la4j.Vectors$10", "org.la4j.iterator.CursorToRowMajorMatrixIterator", "org.la4j.matrix.ColumnMajorSparseMatrix", "org.la4j.Matrix$1", "org.la4j.operation.VectorVectorOperation$2", "org.la4j.operation.VectorVectorOperation$1", "org.la4j.linear.ForwardBackSubstitutionSolver", "org.la4j.LinearAlgebra$SolverFactory$2", "org.la4j.operation.MatrixMatrixOperation$3", "org.la4j.LinearAlgebra$SolverFactory$1", "org.la4j.LinearAlgebra$SolverFactory$6", "org.la4j.LinearAlgebra$SolverFactory$5", "org.la4j.decomposition.SingularValueDecompositor", "org.la4j.LinearAlgebra$SolverFactory", "org.la4j.operation.MatrixMatrixOperation$2", "org.la4j.LinearAlgebra$SolverFactory$4", "org.la4j.operation.MatrixMatrixOperation$1", "org.la4j.LinearAlgebra$SolverFactory$3", "org.la4j.operation.CommonMatrixMatrixOperation", "org.la4j.iterator.MatrixIterator", "org.la4j.LinearAlgebra$SolverFactory$8", "org.la4j.LinearAlgebra$SolverFactory$7", "org.la4j.operation.VectorOperation", "org.la4j.vector.sparse.CompressedVector", "org.la4j.operation.MatrixVectorOperation", "org.la4j.iterator.CursorToVectorIterator", "org.la4j.iterator.VectorIterator", "org.la4j.Matrices$7", "org.la4j.Matrices$22", "org.la4j.vector.DenseVector", "org.la4j.operation.ooplace.OoPlaceMatricesAddition", "org.la4j.Matrices$8", "org.la4j.LinearAlgebra$InverterFactory$1", "org.la4j.Matrices$5", "org.la4j.Matrices$24", "org.la4j.LinearAlgebra$InverterFactory$2", "org.la4j.Matrices$6", "org.la4j.LinearAlgebra$InverterFactory$3", "org.la4j.Matrices$3", "org.la4j.Matrices$26", "org.la4j.matrix.sparse.CCSMatrix$1", "org.la4j.Matrices$4", "org.la4j.Matrices$25", "org.la4j.Matrices$1", "org.la4j.linear.LeastSquaresSolver", "org.la4j.Matrices$28", "org.la4j.LinearAlgebra$InverterFactory", "org.la4j.Matrices$2", "org.la4j.decomposition.AbstractDecompositor", "org.la4j.Matrices$27", "org.la4j.operation.VectorVectorOperation", "org.la4j.matrix.sparse.CCSMatrix$5", "org.la4j.matrix.sparse.CRSMatrix$2", "org.la4j.matrix.sparse.CCSMatrix$4", "org.la4j.matrix.sparse.CRSMatrix$1", "org.la4j.Matrices$29", "org.la4j.matrix.sparse.CCSMatrix$3", "org.la4j.matrix.sparse.CRSMatrix$4", "org.la4j.matrix.sparse.CCSMatrix$2", "org.la4j.matrix.sparse.CRSMatrix$3", "org.la4j.matrix.MatrixFactory", "org.la4j.matrix.RowMajorSparseMatrix", "org.la4j.matrix.sparse.CRSMatrix$5", "org.la4j.Matrices$9", "org.la4j.decomposition.EigenDecompositor", "org.la4j.LinearAlgebra$DecompositorFactory$5", "org.la4j.LinearAlgebra$DecompositorFactory$4", "org.la4j.LinearAlgebra$DecompositorFactory$3", "org.la4j.LinearAlgebra$DecompositorFactory$2", "org.la4j.LinearAlgebra$DecompositorFactory$1", "org.la4j.operation.ooplace.OoPlaceVectorHadamardProduct", "org.la4j.matrix.sparse.CRSMatrix", "org.la4j.operation.ooplace.OoPlaceInnerProduct", "org.la4j.matrix.sparse.CCSMatrix", "org.la4j.vector.functor.VectorPredicate", "org.la4j.operation.MatrixVectorOperation$3", "org.la4j.operation.MatrixVectorOperation$2", "org.la4j.Matrices$20", "org.la4j.operation.inplace.InPlaceCopyMatrixToMatrix", "org.la4j.operation.MatrixVectorOperation$1", "org.la4j.Matrices$11", "org.la4j.Matrices$10", "org.la4j.Matrices$13", "org.la4j.Matrices$12", "org.la4j.Matrices$15", "org.la4j.Matrices$14", "org.la4j.Matrices$17", "org.la4j.operation.ooplace.OoPlaceVectorsSubtraction", "org.la4j.Matrices$16", "org.la4j.iterator.CursorIterator$1", "org.la4j.Matrices$19", "org.la4j.iterator.CursorIterator$2", "org.la4j.decomposition.QRDecompositor", "org.la4j.Matrices$PositiveDefiniteMatrixPredicate", "org.la4j.LinearAlgebra$DecompositorFactory$7", "org.la4j.LinearAlgebra$DecompositorFactory$6", "org.la4j.Vectors$20", "org.la4j.linear.SweepSolver", "org.la4j.Vectors$24", "org.la4j.operation.ooplace.OoPlaceMatrixByItsTransposeMultiplication", "org.la4j.operation.MatrixOperation", "org.la4j.Vectors$21", "org.la4j.operation.MatrixMatrixOperation", "org.la4j.vector.dense.BasicVector" ); } private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException { mock(Class.forName("org.la4j.matrix.functor.MatrixFunction", false, Matrix_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.la4j.matrix.functor.MatrixPredicate", false, Matrix_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.la4j.matrix.functor.MatrixProcedure", false, Matrix_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.la4j.vector.functor.VectorAccumulator", false, Matrix_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.la4j.vector.functor.VectorFunction", false, Matrix_ESTest_scaffolding.class.getClassLoader())); mock(Class.forName("org.la4j.vector.functor.VectorProcedure", false, Matrix_ESTest_scaffolding.class.getClassLoader())); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(Matrix_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.la4j.Matrix", "org.la4j.iterator.CursorIterator$IteratorState", "org.la4j.iterator.CursorIterator", "org.la4j.iterator.MatrixIterator", "org.la4j.iterator.RowMajorMatrixIterator", "org.la4j.Matrix$1", "org.la4j.iterator.VectorIterator", "org.la4j.Matrix$3", "org.la4j.Matrix$4", "org.la4j.iterator.ColumnMajorMatrixIterator", "org.la4j.Matrix$2", "org.la4j.LinearAlgebra$SolverFactory", "org.la4j.LinearAlgebra$InverterFactory", "org.la4j.LinearAlgebra$DecompositorFactory", "org.la4j.operation.VectorVectorOperation", "org.la4j.operation.SymmetricVectorVectorOperation", "org.la4j.operation.ooplace.OoPlaceInnerProduct", "org.la4j.operation.ooplace.OoPlaceVectorsAddition", "org.la4j.operation.ooplace.OoPlaceVectorHadamardProduct", "org.la4j.operation.ooplace.OoPlaceVectorsSubtraction", "org.la4j.operation.VectorMatrixOperation", "org.la4j.operation.ooplace.OoPlaceVectorByMatrixMultiplication", "org.la4j.operation.ooplace.OoPlaceOuterProduct", "org.la4j.operation.MatrixMatrixOperation", "org.la4j.operation.SimpleMatrixMatrixOperation", "org.la4j.operation.inplace.InPlaceCopyMatrixToMatrix", "org.la4j.operation.SymmetricMatrixMatrixOperation", "org.la4j.operation.ooplace.OoPlaceMatricesAddition", "org.la4j.operation.MatrixVectorOperation", "org.la4j.operation.ooplace.OoPlaceMatrixByVectorMultiplication", "org.la4j.operation.ooplace.OoPlaceMatricesSubtraction", "org.la4j.operation.ooplace.OoPlaceMatrixHadamardProduct", "org.la4j.operation.MatrixOperation", "org.la4j.operation.ooplace.OoPlaceMatrixByItsTransposeMultiplication", "org.la4j.operation.CommonMatrixMatrixOperation", "org.la4j.operation.ooplace.OoPlaceKroneckerProduct", "org.la4j.operation.ooplace.OoPlaceMatricesMultiplication", "org.la4j.LinearAlgebra", "org.la4j.Matrices$1", "org.la4j.Matrices$2", "org.la4j.Matrices$3", "org.la4j.Matrices$4", "org.la4j.Matrices$5", "org.la4j.Matrices$6", "org.la4j.Matrices$7", "org.la4j.Matrices$8", "org.la4j.Matrices$9", "org.la4j.Matrices$10", "org.la4j.Matrices$SymmetricMatrixPredicate", "org.la4j.Matrices$DiagonallyDominantPredicate", "org.la4j.Matrices$PositiveDefiniteMatrixPredicate", "org.la4j.matrix.MatrixFactory", "org.la4j.Matrices$11", "org.la4j.Matrices$12", "org.la4j.Matrices$13", "org.la4j.Matrices$14", "org.la4j.Matrices$15", "org.la4j.Matrices$16", "org.la4j.Matrices$17", "org.la4j.Matrices", "org.la4j.vector.VectorFactory", "org.la4j.Vectors$1", "org.la4j.Vectors$2", "org.la4j.Vectors$3", "org.la4j.Vectors$4", "org.la4j.Vectors$5", "org.la4j.Vectors$6", "org.la4j.Vectors$7", "org.la4j.Vectors$8", "org.la4j.Vectors", "org.la4j.matrix.SparseMatrix", "org.la4j.matrix.ColumnMajorSparseMatrix", "org.la4j.matrix.sparse.CCSMatrix", "org.la4j.matrix.RowMajorSparseMatrix", "org.la4j.matrix.sparse.CRSMatrix", "org.la4j.matrix.sparse.CRSMatrix$3", "org.la4j.matrix.DenseMatrix", "org.la4j.matrix.dense.Basic2DMatrix", "org.la4j.matrix.dense.Basic1DMatrix", "org.la4j.Vector", "org.la4j.vector.DenseVector", "org.la4j.vector.dense.BasicVector", "org.la4j.operation.MatrixMatrixOperation$2", "org.la4j.Matrices$27", "org.la4j.Matrices$33", "org.la4j.matrix.sparse.CRSMatrix$1", "org.la4j.matrix.sparse.CRSMatrix$4", "org.la4j.iterator.CursorToRowMajorMatrixIterator", "org.la4j.iterator.JoinFunction$1", "org.la4j.iterator.JoinFunction$2", "org.la4j.iterator.JoinFunction$3", "org.la4j.iterator.JoinFunction$4", "org.la4j.iterator.JoinFunction$5", "org.la4j.iterator.JoinFunction", "org.la4j.iterator.CursorIterator$1", "org.la4j.vector.SparseVector", "org.la4j.Vector$1", "org.la4j.vector.sparse.CompressedVector", "org.la4j.vector.sparse.CompressedVector$1", "org.la4j.matrix.sparse.CCSMatrix$3", "org.la4j.matrix.sparse.CCSMatrix$1", "org.la4j.matrix.sparse.CCSMatrix$4", "org.la4j.matrix.sparse.CRSMatrix$2", "org.la4j.operation.MatrixMatrixOperation$1", "org.la4j.matrix.sparse.CCSMatrix$2", "org.la4j.inversion.GaussJordanInverter", "org.la4j.decomposition.AbstractDecompositor", "org.la4j.decomposition.RawLUDecompositor", "org.la4j.decomposition.LUDecompositor", "org.la4j.Matrices$20", "org.la4j.Matrices$22", "org.la4j.vector.sparse.CompressedVector$2", "org.la4j.Matrices$29", "org.la4j.Vectors$24", "org.la4j.Vectors$18", "org.la4j.operation.MatrixMatrixOperation$3", "org.la4j.Matrices$30", "org.la4j.matrix.sparse.CCSMatrix$5", "org.la4j.iterator.CursorToVectorIterator", "org.la4j.iterator.CursorIterator$2", "org.la4j.Matrices$26", "org.la4j.iterator.CursorToColumnMajorMatrixIterator", "org.la4j.Matrices$19", "org.la4j.matrix.SparseMatrix$4", "org.la4j.operation.VectorOperation", "org.la4j.operation.VectorVectorOperation$2", "org.la4j.matrix.sparse.CRSMatrix$5", "org.la4j.decomposition.SingularValueDecompositor", "org.la4j.matrix.SparseMatrix$3", "org.la4j.Matrices$28", "org.la4j.Matrices$24", "org.la4j.Vectors$17", "org.la4j.linear.AbstractSolver", "org.la4j.linear.SweepSolver", "org.la4j.matrix.SparseMatrix$2", "org.la4j.Vectors$12", "org.la4j.matrix.SparseMatrix$1", "org.la4j.operation.MatrixVectorOperation$2", "org.la4j.decomposition.RawQRDecompositor", "org.la4j.linear.SquareRootSolver", "org.la4j.Matrices$25", "org.la4j.Vectors$13", "org.la4j.Vectors$10", "org.la4j.Vectors$21", "org.la4j.decomposition.CholeskyDecompositor", "org.la4j.operation.VectorMatrixOperation$2", "org.la4j.linear.ForwardBackSubstitutionSolver", "org.la4j.linear.LeastSquaresSolver", "org.la4j.operation.VectorVectorOperation$1", "org.la4j.decomposition.QRDecompositor", "org.la4j.Vectors$19", "org.la4j.Vectors$20", "org.la4j.inversion.NoPivotGaussInverter", "org.la4j.operation.MatrixVectorOperation$1", "org.la4j.operation.MatrixVectorOperation$3", "org.la4j.linear.JacobiSolver", "org.la4j.decomposition.EigenDecompositor", "org.la4j.Vectors$16", "org.la4j.linear.SeidelSolver" ); } }
[ "granogiovanni90@gmail.com" ]
granogiovanni90@gmail.com
62878ee04d23dfac1d70c23fe47c12de0dc456c5
3835b1204637ca99f395f3d126088c71d91ae54e
/src/lvl1basic/p01start/p05multiple/Renderer.java
216718ada5ec40435bd968e9c140ce9a9f10dd31
[]
no_license
jardas7/GLSLSamples_MAC
b24e12ff1d9fb2d7569dada0d4b9cd0fefb94cca
28bd09b05d556f276c7c93d33eb0a5b91061afd2
refs/heads/master
2021-01-22T19:42:05.459063
2017-04-26T20:25:18
2017-04-26T20:25:18
85,229,789
0
0
null
null
null
null
UTF-8
Java
false
false
4,637
java
package lvl1basic.p01start.p05multiple; import com.jogamp.opengl.GL2GL3; import com.jogamp.opengl.GLAutoDrawable; import com.jogamp.opengl.GLEventListener; import oglutils.OGLBuffers; import oglutils.OGLTextRenderer; import oglutils.OGLUtils; import oglutils.ShaderUtils; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.event.MouseEvent; import java.awt.event.KeyListener; import java.awt.event.KeyEvent; /** * GLSL sample:<br/> * Draw two different geometries with two different shader programs<br/> * Requires JOGL 2.3.0 or newer * * @author PGRF FIM UHK * @version 2.0 * @since 2015-09-05 */ public class Renderer implements GLEventListener, MouseListener, MouseMotionListener, KeyListener { int width, height; OGLBuffers buffers, buffers2; //OGLTextRenderer textRenderer; int shaderProgram, shaderProgram2, locTime, locTime2; float time = 0; @Override public void init(GLAutoDrawable glDrawable) { // check whether shaders are supported OGLUtils.shaderCheck(glDrawable.getGL().getGL2GL3()); GL2GL3 gl = glDrawable.getGL().getGL2GL3(); OGLUtils.printOGLparameters(gl); //textRenderer = new OGLTextRenderer(gl, glDrawable.getSurfaceWidth(), glDrawable.getSurfaceHeight()); // shader files are in /shaders/ directory // shaders directory must be set as a source directory of the project // e.g. in Eclipse via main menu Project/Properties/Java Build Path/Source shaderProgram = ShaderUtils.loadProgram(gl, "/lvl1basic/p01start/p05multiple/start"); shaderProgram2 = ShaderUtils.loadProgram(gl, "/lvl1basic/p01start/p05multiple/start2"); createBuffers(gl); locTime = gl.glGetUniformLocation(shaderProgram, "time"); locTime2 = gl.glGetUniformLocation(shaderProgram2, "time"); } void createBuffers(GL2GL3 gl) { float[] vertexBufferData = { -1, -1, 0.7f, 0, 0, 1, 0, 0, 0.7f, 0, 0, 1, 0, 0, 0.7f }; int[] indexBufferData = { 0, 1, 2 }; OGLBuffers.Attrib[] attributes = { new OGLBuffers.Attrib("inPosition", 2), new OGLBuffers.Attrib("inColor", 3) }; buffers = new OGLBuffers(gl, vertexBufferData, attributes, indexBufferData); float[] vertexBufferDataPos = { -1, 1, 0.5f, 0, -0.5f, -1 }; float[] vertexBufferDataCol = { 0, 1, 1, 1, 0, 1, 1, 1, 1 }; OGLBuffers.Attrib[] attributesPos = { new OGLBuffers.Attrib("inPosition", 2), }; OGLBuffers.Attrib[] attributesCol = { new OGLBuffers.Attrib("inColor", 3) }; buffers2 = new OGLBuffers(gl, vertexBufferDataPos, attributesPos, indexBufferData); buffers2.addVertexBuffer(vertexBufferDataCol, attributesCol); } @Override public void display(GLAutoDrawable glDrawable) { GL2GL3 gl = glDrawable.getGL().getGL2GL3(); gl.glClearColor(0.1f, 0.1f, 0.1f, 1.0f); gl.glClear(GL2GL3.GL_COLOR_BUFFER_BIT); time += 0.1; // set the current shader to be used gl.glUseProgram(shaderProgram); gl.glUniform1f(locTime, time); // correct shader must be set before this // bind and draw buffers.draw(GL2GL3.GL_TRIANGLES, shaderProgram); // set the current shader to be used gl.glUseProgram(shaderProgram2); gl.glUniform1f(locTime2, time); // correct shader must be set before this // bind and draw buffers2.draw(GL2GL3.GL_TRIANGLES, shaderProgram2); //String text = new String(this.getClass().getName()); //textRenderer.drawStr2D(3, height - 20, text); //textRenderer.drawStr2D(width - 90, 3, " (c) PGRF UHK"); } @Override public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { this.width = width; this.height = height; //textRenderer.updateSize(width, height); } @Override public void mouseClicked(MouseEvent e) { } @Override public void mouseEntered(MouseEvent e) { } @Override public void mouseExited(MouseEvent e) { } @Override public void mousePressed(MouseEvent e) { } @Override public void mouseReleased(MouseEvent e) { } @Override public void mouseDragged(MouseEvent e) { } @Override public void mouseMoved(MouseEvent e) { } @Override public void keyPressed(KeyEvent e) { } @Override public void keyReleased(KeyEvent e) { } @Override public void keyTyped(KeyEvent e) { } @Override public void dispose(GLAutoDrawable glDrawable) { GL2GL3 gl = glDrawable.getGL().getGL2GL3(); gl.glDeleteProgram(shaderProgram); gl.glDeleteProgram(shaderProgram2); } }
[ "hnik@mcorecode.com" ]
hnik@mcorecode.com
6a14c3f385c3ac6483fb8136746d688abdd25456
3bbf0e3140fe9cc715bf149dabd383e168f84b2a
/app/src/main/java/com/kuruvatech/santoshkenchaamba/fragment/MainFragment.java
68e690d8c77ca74a757ebe84435c48807ce15d5a
[]
no_license
dayasudhan/santoshkenchamba
6cf3e235a38272b2f8f6e60536c03da033f845e3
7d75eaf454fdf7858b3cab155daaf68fef44d352
refs/heads/master
2021-03-27T06:24:06.888222
2018-01-16T13:21:37
2018-01-16T13:21:37
117,249,622
0
0
null
null
null
null
UTF-8
Java
false
false
21,435
java
package com.kuruvatech.santoshkenchaamba.fragment; import android.app.Dialog; import android.content.DialogInterface; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.support.v4.app.Fragment; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.AlertDialog; import android.support.v7.widget.CardView; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.TextView; import com.kuruvatech.santoshkenchaamba.MainActivity; import com.kuruvatech.santoshkenchaamba.R; import com.kuruvatech.santoshkenchaamba.adapter.FeedAdapter; import com.kuruvatech.santoshkenchaamba.adapter.MainAdapter; import com.kuruvatech.santoshkenchaamba.adapter.ScreenSlidePagerAdapter; import com.kuruvatech.santoshkenchaamba.model.FeedItem; import com.kuruvatech.santoshkenchaamba.utils.CirclePageIndicator; import com.kuruvatech.santoshkenchaamba.utils.Constants; import com.kuruvatech.santoshkenchaamba.utils.MyViewPager; import com.kuruvatech.santoshkenchaamba.utils.SessionManager; import com.kuruvatech.santoshkenchaamba.utils.ZoomOutPageTransformer; import org.json.JSONArray; import org.json.JSONObject; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import cz.msebera.android.httpclient.HttpEntity; import cz.msebera.android.httpclient.HttpResponse; import cz.msebera.android.httpclient.client.HttpClient; import cz.msebera.android.httpclient.client.methods.HttpGet; import cz.msebera.android.httpclient.impl.client.DefaultHttpClient; import cz.msebera.android.httpclient.protocol.HTTP; import cz.msebera.android.httpclient.util.EntityUtils; public class MainFragment extends Fragment { private static final String TAG_FEEDS = "newsfeed"; private static final String TAG_SCROLLIMAGES = "scrollimages"; private static final String TAG_HEADING = "heading"; private static final String TAG_DESCRIPTION = "description"; private static final String TAG_FEEDIMAGES = "feedimages"; private static final String TAG_URL = "url"; private static final String TAG_VIDEO = "feedvideo"; public static final String API_KEY = "AIzaSyBRLKO5KlEEgFjVgf4M-lZzeGXW94m9w3U"; public static final String VIDEO_ID = "gy5_T2ACerk"; private static final String TAG_TIME = "time"; private static final String TAG_FEEDVIDEOS = "feedvideos"; private static final String TAG_FEEDAUDIOS = "feedaudios"; Button btnshareApp; ArrayList<FeedItem> feedList; ArrayList<String> scrollimages; FeedAdapter adapter; MainAdapter adapter2; View rootview; //ListView listView; RecyclerView listView; TextView noFeedstv; boolean isSwipeRefresh; private SwipeRefreshLayout swipeRefreshLayout; SessionManager session; private MyViewPager pager; int sliderIndex=0,sliderMaxImages = 4; int delayMiliSec = 8000; private Handler handler; ScreenSlidePagerAdapter pagerAdapter; CirclePageIndicator indicator; CardView video_cardview; boolean isResponsereceived = true; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment rootview = inflater.inflate(R.layout.fragment_main, container, false); listView = (RecyclerView) rootview.findViewById(R.id.listView_feedlist); video_cardview = (CardView) rootview.findViewById(R.id.video_cardview); video_cardview.setVisibility(View.GONE); // recyclerView=(RecyclerView)view.findViewById(R.id.video_list); listView.setHasFixedSize(true); //to use RecycleView, you need a layout manager. default is LinearLayoutManager LinearLayoutManager linearLayoutManager=new LinearLayoutManager(getContext()); linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL); listView.setLayoutManager(linearLayoutManager); noFeedstv = (TextView)rootview.findViewById(R.id.textView_no_feeds); session = new SessionManager(getActivity().getApplicationContext()); swipeRefreshLayout = (SwipeRefreshLayout) rootview.findViewById(R.id.swipe_refresh_layout); ((MainActivity) getActivity()) .setActionBarTitle(getString(R.string.titletext)); isSwipeRefresh = false; // feedList =session.getLastNewsFeed(); // if(feedList !=null) // { // initAdapter(); // } handler = new Handler(); pager = (MyViewPager) rootview.findViewById(R.id.pager); // int displayWidth2 =pager.getWidth(); // int displayHeight2 = pager.getHeight(); // int displayHeight = getActivity().getWindowManager().getDefaultDisplay().getHeight(); int displayWidth = getActivity().getWindowManager().getDefaultDisplay().getWidth(); // String dimention = " height=>" + String.valueOf(displayHeight) + " width=>" + String.valueOf(displayWidth) + // " height2=>" + String.valueOf(displayHeight2) + "width2=>" + String.valueOf(displayWidth2); // alertMessage(dimention); pagerAdapter =new ScreenSlidePagerAdapter(getActivity().getSupportFragmentManager(),getActivity().getApplicationContext(),displayWidth); pager.setPageTransformer(true, new ZoomOutPageTransformer()); indicator = (CirclePageIndicator) rootview.findViewById(R.id.indicator); //pager.setMinimumHeight(); swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { swipeRefreshLayout.setRefreshing(false); // if(isResponsereceived) { // isSwipeRefresh = true; // isResponsereceived = false; // getFeeds(); // } } }); swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_light, R.color.colorAccent, R.color.colorPrimaryDark); swipeRefreshLayout.setProgressBackgroundColor(android.R.color.transparent); feedList = new ArrayList<FeedItem>(); initfromsession(); getFeeds(); return rootview; } @Override public void onResume() { super.onResume(); handler.postDelayed(runnable, delayMiliSec); } public void initfromsession() { String data = session.getLastNewsFeed(); if(data == null) { return; } feedList.clear(); try { JSONObject feed_object2 = new JSONObject(data); if (feed_object2.has(TAG_FEEDS)) { //feed_object2.getString(TAG_FEEDS); JSONArray feedsarray = new JSONArray(feed_object2.getString(TAG_FEEDS)); for (int i = feedsarray.length() - 1; i >= 0; i--) { JSONObject feed_object = feedsarray.getJSONObject(i); FeedItem feedItem = new FeedItem(); if (feed_object.has(TAG_HEADING)) { feedItem.setHeading(feed_object.getString(TAG_HEADING)); } if (feed_object.has(TAG_VIDEO)) { feedItem.setVideoid(feed_object.getString(TAG_VIDEO)); } if (feed_object.has(TAG_DESCRIPTION)) { feedItem.setDescription(TextUtils.htmlEncode(feed_object.getString(TAG_DESCRIPTION))); } if (feed_object.has(TAG_FEEDIMAGES)) { JSONArray feedimagesarray = feed_object.getJSONArray(TAG_FEEDIMAGES); ArrayList<String> strList = new ArrayList<String>(); strList.clear(); for (int j = 0; j < feedimagesarray.length(); j++) { JSONObject image_object = feedimagesarray.getJSONObject(j); if (image_object.has(TAG_URL)) { strList.add(image_object.getString(TAG_URL)); } } feedItem.setFeedimages(strList); } if (feed_object.has(TAG_TIME)) { String time = feed_object.getString(TAG_TIME); Date getDate = null; SimpleDateFormat existingUTCFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:s"); SimpleDateFormat fmtOut = new SimpleDateFormat("dd-MMM-yy HH:mm a"); try { getDate = existingUTCFormat.parse(time); feedItem.setTime(fmtOut.format(getDate).toString()); } catch (java.text.ParseException e) { e.printStackTrace(); } } if (feed_object.has(TAG_FEEDVIDEOS)) { JSONArray feedimagesarray = feed_object.getJSONArray(TAG_FEEDVIDEOS); ArrayList<String> strList = new ArrayList<String>(); strList.clear(); for (int j = 0; j < feedimagesarray.length(); j++) { JSONObject image_object = feedimagesarray.getJSONObject(j); if (image_object.has(TAG_URL)) { strList.add(image_object.getString(TAG_URL)); } } feedItem.setFeedvideos(strList); } if (feed_object.has(TAG_FEEDAUDIOS)) { JSONArray feedimagesarray = feed_object.getJSONArray(TAG_FEEDAUDIOS); ArrayList<String> strList = new ArrayList<String>(); strList.clear(); for (int j = 0; j < feedimagesarray.length(); j++) { JSONObject image_object = feedimagesarray.getJSONObject(j); if (image_object.has(TAG_URL)) { strList.add(image_object.getString(TAG_URL)); } } feedItem.setFeedaudios(strList); } feedList.add(feedItem); } } if (feed_object2.has(TAG_SCROLLIMAGES)) { JSONArray feedimagesarray = new JSONArray(feed_object2.getString(TAG_SCROLLIMAGES)); scrollimages = new ArrayList<String>(); scrollimages.clear(); for (int j = 0; j < feedimagesarray.length(); j++) { JSONObject image_object = feedimagesarray.getJSONObject(j); if (image_object.has(TAG_URL)) { scrollimages.add(image_object.getString(TAG_URL)); } } } initAdapter(); } catch (Exception e) { e.printStackTrace(); } } public void initAdapter() { // adapter = new FeedAdapter(getActivity(),R.layout.feeditem,feedList); adapter2 = new MainAdapter(getActivity(),feedList); adapter2.notifyDataSetChanged(); listView.setAdapter(adapter2); if(feedList.size() > 0 ) { noFeedstv.setVisibility(View.INVISIBLE); } else { noFeedstv.setVisibility(View.VISIBLE); } if(scrollimages.size()>2) { pagerAdapter.addAll(scrollimages); pager.setAdapter(pagerAdapter); indicator.setViewPager(pager); pager.setVisibility(View.VISIBLE); video_cardview.setVisibility(View.VISIBLE); } else { video_cardview.setVisibility(View.GONE); } } public void getFeeds() { String getFeedsUrl = Constants.GET_FEEDS_URL; getFeedsUrl = getFeedsUrl + Constants.USERNAME; new JSONAsyncTask().execute(getFeedsUrl); } public class JSONAsyncTask extends AsyncTask<String, Void, Boolean> { Dialog dialog; public JSONAsyncTask() { } @Override protected void onPreExecute() { super.onPreExecute(); if(isSwipeRefresh == false) { swipeRefreshLayout.setRefreshing(true); // dialog = new Dialog(getActivity(), android.R.style.Theme_Translucent); // dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // dialog.setContentView(R.layout.custom_progress_dialog); // dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); // dialog.show(); // dialog.setCancelable(true); } } @Override protected Boolean doInBackground(String... urls) { try { //------------------>> HttpGet request = new HttpGet(urls[0]); // request.addHeader(Constants.SECUREKEY_KEY, Constants.SECUREKEY_VALUE); // request.addHeader(Constants.VERSION_KEY, Constants.VERSION_VALUE); // request.addHeader(Constants.CLIENT_KEY, Constants.CLIENT_VALUE); HttpClient httpclient = new DefaultHttpClient(); HttpResponse response = httpclient.execute(request); int status = response.getStatusLine().getStatusCode(); //feedList = new ArrayList<FeedItem>(); feedList.clear(); if (status == 200) { HttpEntity entity = response.getEntity(); String data = EntityUtils.toString(entity,HTTP.UTF_8); session.setLastNewsFeed(data); //JSONArray feedsarray = new JSONArray(data); JSONObject feed_object2 = new JSONObject(data); if (feed_object2.has(TAG_FEEDS)) { //feed_object2.getString(TAG_FEEDS); JSONArray feedsarray = new JSONArray(feed_object2.getString(TAG_FEEDS)); for (int i = feedsarray.length() -1; i >= 0; i--) { JSONObject feed_object = feedsarray.getJSONObject(i); FeedItem feedItem = new FeedItem(); if (feed_object.has(TAG_HEADING)) { feedItem.setHeading(feed_object.getString(TAG_HEADING)); } if (feed_object.has(TAG_VIDEO)) { feedItem.setVideoid(feed_object.getString(TAG_VIDEO)); } if (feed_object.has(TAG_DESCRIPTION)) { feedItem.setDescription(TextUtils.htmlEncode(feed_object.getString(TAG_DESCRIPTION))); } if (feed_object.has(TAG_FEEDIMAGES)) { JSONArray feedimagesarray = feed_object.getJSONArray(TAG_FEEDIMAGES); ArrayList<String> strList = new ArrayList<String>(); strList.clear(); for (int j = 0; j < feedimagesarray.length(); j++) { JSONObject image_object = feedimagesarray.getJSONObject(j); if (image_object.has(TAG_URL)) { strList.add(image_object.getString(TAG_URL)); } } feedItem.setFeedimages(strList); } if (feed_object.has(TAG_TIME)) { String time = feed_object.getString(TAG_TIME); Date getDate = null; SimpleDateFormat existingUTCFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:s"); SimpleDateFormat fmtOut = new SimpleDateFormat("dd-MMM-yy HH:mm a"); try { getDate = existingUTCFormat.parse(time); feedItem.setTime(fmtOut.format(getDate).toString()); } catch (java.text.ParseException e) { e.printStackTrace(); } } if (feed_object.has(TAG_FEEDVIDEOS)) { JSONArray feedimagesarray = feed_object.getJSONArray(TAG_FEEDVIDEOS); ArrayList<String> strList = new ArrayList<String>(); strList.clear(); for (int j = 0; j < feedimagesarray.length(); j++) { JSONObject image_object = feedimagesarray.getJSONObject(j); if (image_object.has(TAG_URL)) { strList.add(image_object.getString(TAG_URL)); } } feedItem.setFeedvideos(strList); } if (feed_object.has(TAG_FEEDAUDIOS)) { JSONArray feedimagesarray = feed_object.getJSONArray(TAG_FEEDAUDIOS); ArrayList<String> strList = new ArrayList<String>(); strList.clear(); for (int j = 0; j < feedimagesarray.length(); j++) { JSONObject image_object = feedimagesarray.getJSONObject(j); if (image_object.has(TAG_URL)) { strList.add(image_object.getString(TAG_URL)); } } feedItem.setFeedaudios(strList); } feedList.add(feedItem); } } if(feed_object2.has(TAG_SCROLLIMAGES)) { JSONArray feedimagesarray = new JSONArray(feed_object2.getString(TAG_SCROLLIMAGES)); scrollimages = new ArrayList<String>(); scrollimages.clear(); for (int j = 0; j < feedimagesarray.length(); j++) { JSONObject image_object = feedimagesarray.getJSONObject(j); if (image_object.has(TAG_URL)) { scrollimages.add(image_object.getString(TAG_URL)); } } } return true; } } catch (IOException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return false; } protected void onPostExecute(Boolean result) { // if(dialog != null && isSwipeRefresh ==false) // dialog.cancel(); if(swipeRefreshLayout != null) swipeRefreshLayout.setRefreshing(false); isSwipeRefresh = false; isResponsereceived = true; if(getActivity() != null) { if (result == false) { // Toast.makeText(getActivity().getApplicationContext(), "Unable to fetch data from server", Toast.LENGTH_LONG).show(); alertMessage("Unable to fetch data from server"); } else { initAdapter(); } } } } public void alertMessage(String message) { DialogInterface.OnClickListener dialogClickListeneryesno = new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { switch (which) { case DialogInterface.BUTTON_NEUTRAL: break; } } }; AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setTitle(getString(R.string.app_name)); builder.setMessage(message).setNeutralButton("Ok", dialogClickListeneryesno) .setIcon(R.drawable.ic_action_about).show(); } @Override public void onPause() { super.onPause(); handler.removeCallbacks(runnable); } Runnable runnable = new Runnable() { public void run() { if (sliderMaxImages == sliderIndex) { sliderIndex = 0; } else { sliderIndex++; } pager.setCurrentItem(sliderIndex, true); handler.postDelayed(this, delayMiliSec); } }; }
[ "dayasudhankg@gmail.com" ]
dayasudhankg@gmail.com
bc2f5d838152f51a3b0f656faada2ab2dbd03e3d
4ef1b074ba1b4be703b8500259de402b77c97098
/app/src/main/java/cz/uhk/fim/kikm/navigation/activity/App.java
f4f92f31ef2cc6209ff27d35eb56ed9023939d41
[]
no_license
radek-bruha/Navigation
2ff88c8f8c21964b78ffa7445ac8b7daab18ed96
4a6d858e3cd77613343a38236514300905d3a187
refs/heads/master
2021-06-18T23:41:23.865543
2017-07-06T21:25:01
2017-07-06T21:25:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
510
java
package cz.uhk.fim.kikm.navigation.activity; import android.app.Application; import android.content.Context; import cz.uhk.fim.kikm.navigation.util.ExceptionHandler; /** * @author Bc. Radek Brůha <bruhara1@uhk.cz> */ public class App extends Application { private static Context context; public static Context getContext() { return context; } @Override public void onCreate() { super.onCreate(); context = this; Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this)); } }
[ "s.bruha@seznam.cz" ]
s.bruha@seznam.cz
a62914de33f302fdd5746d45133f5d9b3093bf29
909dfe1e3ae75f64a3d778680e4bd6eac3e24e1c
/app/src/main/java/org/sagebionetworks/research/mpower/tracking/view_model/configs/TrackingItemConfig.java
4f5b228256b531f5542e7a96fbce05227883ac58
[ "BSD-3-Clause" ]
permissive
nategbrown9/mPower-2-Android
3f8a7f3ba56b3e4edc9aacd45de8083a2cb09a3e
44aa99b57637184e2fba3ad19fb23c015f9be2c9
refs/heads/master
2023-05-11T00:28:25.345570
2019-02-01T07:40:41
2019-02-01T07:40:41
172,589,914
0
0
NOASSERTION
2019-02-25T21:43:48
2019-02-25T21:43:48
null
UTF-8
Java
false
false
945
java
package org.sagebionetworks.research.mpower.tracking.view_model.configs; import org.sagebionetworks.research.mpower.tracking.model.TrackingItem; /** * Represents a Selection from the selection screen of a Tracking Task, and any configuration options that need to * be added to it. For instance in the medication task the config would include information such as the time of day, * and dosage for the medication. */ public interface TrackingItemConfig { /** * Returns the identifier of this config. * @return the identifier of this config. */ String getIdentifier(); /** * Returns the tracking item for this config. * @return the tracking item for this config. */ TrackingItem getTrackingItem(); /** * Returns true if the user has configured this item, false otherwise. * @return true if the user has configured this item, false otherwise. */ boolean isConfigured(); }
[ "robert.kolmos@sagebase.org" ]
robert.kolmos@sagebase.org
239c5276c265d1b3c394ce2c977b2c0a4f2931e3
6eecfa39edc7628a2edbc7d678df95c5865476eb
/shop-system/src/main/java/com/ruoyi/service/IJcOrderService.java
d42b256e4c371e7de1ab0395c13028a053e4a396
[ "MIT" ]
permissive
hulinhao/shop
5898aa939543a1aabe1aaedfb3ffd3b8a2e8d9b5
9fee710c7469e856c9627614277ef605cfa34544
refs/heads/master
2022-07-28T14:19:00.233545
2021-03-12T10:22:29
2021-03-12T10:22:29
221,631,032
0
0
MIT
2020-07-02T01:16:39
2019-11-14T06:49:40
HTML
UTF-8
Java
false
false
1,182
java
package com.ruoyi.service; import java.util.List; import com.ruoyi.domain.JcOrder; /** * 订单管理Service接口 * * @author hlinhao Hu * @date 2021-01-05 */ public interface IJcOrderService { /** * 查询订单管理 * * @param id 订单管理ID * @return 订单管理 */ public JcOrder selectJcOrderById(Long id); /** * 查询订单管理列表 * * @param jcOrder 订单管理 * @return 订单管理集合 */ public List<JcOrder> selectJcOrderList(JcOrder jcOrder); /** * 新增订单管理 * * @param jcOrder 订单管理 * @return 结果 */ public int insertJcOrder(JcOrder jcOrder); /** * 修改订单管理 * * @param jcOrder 订单管理 * @return 结果 */ public int updateJcOrder(JcOrder jcOrder); /** * 批量删除订单管理 * * @param ids 需要删除的数据ID * @return 结果 */ public int deleteJcOrderByIds(String ids); /** * 删除订单管理信息 * * @param id 订单管理ID * @return 结果 */ public int deleteJcOrderById(Long id); }
[ "597014897@qq.com" ]
597014897@qq.com
b554dcf06209d4f20a5fabda5739d75da3d5c1cc
18d47a5e9b6b57b139565cd371587b333c5c2aaf
/app/src/test/java/com/example/growl/ExampleUnitTest.java
cb73851dc0ad43d5e8fffbd875c3d423412d35cc
[ "Apache-2.0" ]
permissive
abhinav12k/Growl
f860496ff0b3918b0cd89eb6815bee339b4c73cb
d6d2c5ffb4acb30697c2595dba09568926c49d02
refs/heads/master
2023-08-23T11:16:50.582559
2020-06-02T11:03:19
2020-06-02T11:03:19
237,563,206
0
0
Apache-2.0
2021-10-05T07:31:54
2020-02-01T04:45:36
PHP
UTF-8
Java
false
false
378
java
package com.example.growl; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "abhi2000.rtk@gmail.com" ]
abhi2000.rtk@gmail.com
c840c302b1013259aa07368b8ee09edd6ad5b8d4
0ebc805a5774003e8c2a3bfb73d938582c3c5bde
/src/main/java/com/cleycianefarias/cursomc/repositories/EnderecoRepository.java
36733cc72d3222dcc573c51259dc31ec5933dd11
[]
no_license
cleycianefarias/spring-boot-ionic-backend
c6078e66acf3aebb4e766b768623348d1dd850cf
70fb0d0dd061339554067c70473304244dc880ed
refs/heads/master
2021-07-17T16:51:33.316452
2020-08-08T15:42:50
2020-08-08T15:42:50
201,337,471
0
0
null
null
null
null
UTF-8
Java
false
false
311
java
package com.cleycianefarias.cursomc.repositories; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import com.cleycianefarias.cursomc.domain.Endereco; @Repository public interface EnderecoRepository extends JpaRepository<Endereco, Integer>{ }
[ "fariascleycianedelima@gmail.com" ]
fariascleycianedelima@gmail.com
9277f6270b86251844bbf7ba3d7d9280b1c5b2f0
849de15340bfe7e76fbd881653039f53e81e59a0
/sangamonecouse/sangamonecouse/src/main/java/sangamonecourse/com/domain/Studentdetails.java
ffd8488bd944fd927eaaec35b056bd5748d69b36
[]
no_license
laludash/Tutorpointnavigation-
0413ec9cb1640f76fec7353d114db0d85b54ea41
d811832e606398f6608ad58d1d7f1270c656fe03
refs/heads/main
2023-07-10T21:11:32.654110
2021-08-14T16:54:13
2021-08-14T16:54:13
396,069,467
0
1
null
null
null
null
UTF-8
Java
false
false
2,223
java
package sangamonecourse.com.domain; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "student") public class Studentdetails { // define filed @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column (name = "id") private int id; @Column (name = "student_first_name") private String firstName; @Column (name = "student_last_name") private String lastName; @Column (name = "student_email") private String email; @Column (name = "student_dob") private String dob; @Column (name = "student_mobile") private int mobileNumber; // define no argument constructor public Studentdetails() { } // generated constructor public Studentdetails(String firstName, String lastName, String email, String dob, int mobileNumber) { this.firstName = firstName; this.lastName = lastName; this.email = email; this.dob = dob; this.mobileNumber = mobileNumber; } // define getter and setter public int getId() { return id; } public void setId(int id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getDob() { return dob; } public void setDob(String dob) { this.dob = dob; } public int getMobileNumber() { return mobileNumber; } public void setMobileNumber(int mobileNumber) { this.mobileNumber = mobileNumber; } // define tostring @Override public String toString() { return "Studentdetails [id=" + id + ", firstName=" + firstName + ", lastName=" + lastName + ", email=" + email + ", dob=" + dob + ", mobileNumber=" + mobileNumber + "]"; } }
[ "noreply@github.com" ]
laludash.noreply@github.com
5f31506edf0e07606a5803c859bbf3a022f8b049
731a08ab422f463413ed8658a4d1243aeb392575
/febit-web/src/main/java/org/febit/web/filter/UTF8EncodingFilter.java
56445adca79640ccfa9620c2ff631a5b357e94be
[ "Apache-2.0" ]
permissive
restmad/febit
7ffb6db6397bfb05f375e7737c536c7c68a62bc5
2d532cdb9bf12d98b8b4155c919f60fa64461b3a
refs/heads/master
2021-01-01T17:09:04.341995
2017-07-20T03:19:05
2017-07-20T03:19:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,071
java
/** * Copyright 2013 febit.org (support@febit.org) * * 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.febit.web.filter; import org.febit.web.ActionRequest; import org.febit.web.RenderedFilter; /** * * @author zqq90 */ public class UTF8EncodingFilter implements RenderedFilter { @Override public Object invoke(final ActionRequest actionRequest) throws Exception { actionRequest.request.setCharacterEncoding("UTF-8"); actionRequest.response.setCharacterEncoding("UTF-8"); return actionRequest.invoke(); } }
[ "zqq_90@163.com" ]
zqq_90@163.com
db28535ccf6dd25476eff84ebafdc3a54b395a2e
5d18ac654080e1db513acce7fea1009cde186acc
/src/main/java/drethic/questbook/proxy/ServerProxy.java
935e22c5081bd1cb86cfcbfcf973c7fd2cf8fc2a
[]
no_license
Drethic/QuestBook
162ddcabd1dd5d9f7a6dcdaeae5ea74e0305d6e2
5175e06f1c1f4cf083a55d703105a4bfe23b4830
refs/heads/1.7.10
2021-01-10T17:06:57.042245
2017-01-02T16:51:26
2017-01-02T16:51:26
52,220,601
5
5
null
2017-01-02T16:51:27
2016-02-21T18:19:34
Java
UTF-8
Java
false
false
585
java
package drethic.questbook.proxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; public class ServerProxy extends CommonProxy { @Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); } @Override public void init(FMLInitializationEvent e) { super.init(e); } @Override public void postInit(FMLPostInitializationEvent e) { super.postInit(e); } }
[ "drethic@msn.com" ]
drethic@msn.com
1731c78395a6e5271e920b734ff589b849fcbb5f
24f49cd96a51d79c9545ff532b258e693c035c13
/src/main/java/com/cynichcf/hcf/server/conditional/staff/StaffCommands.java
7411f9e51fdc5724aa41b095e21d72aa4f8a0737
[]
no_license
strangepersona/CynicTeams
631764353fc0c7b8a0c7a22a4a3d6bb25d1e8844
345a66e7ea3b34efb3f8d2c55da567a056ef6cb5
refs/heads/main
2023-04-26T17:40:44.032009
2021-06-04T19:11:11
2021-06-04T19:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,472
java
package com.cynichcf.hcf.server.conditional.staff; import com.cynichcf.hcf.HCF; import rip.lazze.libraries.command.Command; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.entity.Player; import org.bukkit.metadata.FixedMetadataValue; public class StaffCommands { @Command(names = {"hidestaff", "showstaff"}, permission = "foxtrot.staff") public static void hidestaff(Player sender) { if (sender.hasMetadata("hidestaff")){ sender.sendMessage(ChatColor.GREEN + "Successfully shown staff!"); sender.removeMetadata("hidestaff", HCF.getInstance()); for (Player otherPlayer : Bukkit.getServer().getOnlinePlayers()){ // cant stack if (otherPlayer != sender){ if (otherPlayer.hasMetadata("modmode")){ sender.showPlayer(otherPlayer); } } } } else { sender.setMetadata("hidestaff", new FixedMetadataValue(HCF.getInstance(), true)); sender.sendMessage(ChatColor.GREEN + "Successfully hidden staff!"); for (Player otherPlayer : Bukkit.getServer().getOnlinePlayers()){ // cant stack them if (otherPlayer != sender){ if (otherPlayer.hasMetadata("modmode")){ sender.hidePlayer(otherPlayer); } } } } } }
[ "ccarcane@gmail.com" ]
ccarcane@gmail.com
e060bc5fd6f0eddd3ee021af0515fa70e6a1b621
608781970b3441ccfd060a58140218a9d84863ad
/src/server/ServerGrid.java
63bbe1c6173c6dbd66982a1cfd30716385c8aaa8
[]
no_license
kingkian/Pillage
156c8bb139d99e88cacc8afef4053280d93531c7
b3dc0ec8201b7800988f72e4e731bac726ee0a2a
refs/heads/master
2021-01-12T07:48:09.375660
2016-12-21T06:01:03
2016-12-21T06:01:03
77,022,383
0
0
null
null
null
null
UTF-8
Java
false
false
2,971
java
package server; import gameWorldObjects.TextTile; import sage.display.DisplaySystem; import sage.renderer.IRenderer; import sage.scene.SceneNode.RENDER_MODE; import sage.scene.state.BlendState; import sage.scene.state.RenderState.RenderStateType; public class ServerGrid { private ServerTextTile[][] tileGrid = new ServerTextTile[64][64]; public ServerGrid() { for(int i = 0; i<64; i++) { for(int j = 0; j<64; j++) { ServerTextTile textTile = new ServerTextTile(315 - (j*10), 5, (315 - (i*10)), i, j); tileGrid[i][j] = textTile; } } } public ServerTextTile[][] getTileGrid() { return tileGrid; } public void currentMap() { System.out.println("============================================================================================================================="); for(int i = 0; i<64; i++) { String s = "="; for(int j = 0; j<64; j++) { s += " " + tileGrid[i][j].toString(); } s += " ="; System.out.println(s); } System.out.println("=============================================================================================================================="); } public void currentMapLocations() { System.out.println("=============================================================================================================================="); for(int i = 0; i<64; i++) { String s = "="; for(int j = 0; j<64; j++) { s += " (" + tileGrid[i][j].getX() + ", " + tileGrid[i][j].getY() + ", " + tileGrid[i][j].getZ() + ")"; } s += " ="; System.out.println(s); } System.out.println("========================================================================================================================================================================================="); } public void currentGrid() { System.out.println("==================================================================="); for(int i = 0; i<64; i++) { String s = "="; for(int j = 0; j<64; j++) { s += " (" + tileGrid[i][j].getGridI() + ", " + tileGrid[i][j].getGridJ() + ")"; } s += " ="; System.out.println(s); } System.out.println("==================================================================="); } public void whereIsTheCursor() { System.out.println("===================================================================================================================="); for(int i = 0; i<64; i++) { String s = "="; for(int j = 0; j<64; j++) { if(tileGrid[i][j].isSelected()) { s += " Y"; } else { s += " N"; } } s += " ="; System.out.println(s); } System.out.println("======================================================================================================================="); } }
[ "kian_faroughi@yahoo.com" ]
kian_faroughi@yahoo.com
679361cb174e36ceba5d4203eaab17721882a4d4
4c53d0e53a34cb68ae3ccf84275acc433128145a
/app/src/test/java/demo/realm/crashsample/ExampleUnitTest.java
e06bde715ec74afc185e07a6f187f5696f0c40a9
[]
no_license
PiotrWpl/realmCrashSample
8618655b11b25fa3070716954a276af972969f3e
8a87b7c0cf9c37209e5927d77bafffa58de1f440
refs/heads/master
2021-01-11T19:15:46.640517
2017-01-18T14:01:11
2017-01-18T14:01:11
79,345,082
0
0
null
null
null
null
UTF-8
Java
false
false
400
java
package demo.realm.crashsample; 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); } }
[ "piotr.walczuk@agora.pl" ]
piotr.walczuk@agora.pl
27c3de926af29dd619c136b2431d3cbf21463953
9e4f7c79072e4c9fc3aca53ab5a932bc807193d3
/ABNegamax/app/src/main/java/com/sonhoai/sonho/tiktak/ChessBoard.java
309d9ec8bce81cf74cb10c043a31e664daf62afa
[]
no_license
nguyendinhtrieu1996/GameAIDemo
de6ee2144fe4078bc7fc8e2013577f433f62e10d
d815564504bb760a90d9a5b778383e45c2d69b84
refs/heads/master
2020-03-10T00:20:54.234719
2018-04-11T10:59:58
2018-04-11T10:59:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
12,279
java
package com.sonhoai.sonho.tiktak; import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Rect; import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.widget.Toast; import java.util.ArrayList; import java.util.List; /** * Created by sonho on 3/15/2018. */ public class ChessBoard { private Bitmap bitmap; private Canvas canvas; private Paint paint; private int[][] board;//cac buoc đã đi -1 là chưa đi, 0 la nguoi choi, 1 la may private int player;//nguoi choi nào private Context context; private int bitmapWidth, bitmapHeight, colQty,rowQty; private List<Line> lines; private Minimax minimax; private int winQty; private Move previousMove; private int winner; public static boolean isGameOver = false; private Bitmap playerA, playerB; public ChessBoard(Context context, int bitmapWidth, int bitmapHeight, int colQty, int rowQty) { this.context = context; this.bitmapWidth = bitmapWidth; this.bitmapHeight = bitmapHeight; this.colQty = colQty; this.rowQty = rowQty; } public void initBoard2() { winner = -1; previousMove = null; if (colQty > 5) { winQty = 4; } else { winQty = 2; } } public void init() { winner = -1; previousMove = null; minimax = new Minimax(); lines = new ArrayList<>(); bitmap = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Bitmap.Config.ARGB_8888); canvas = new Canvas(bitmap); paint = new Paint(); board = new int[rowQty][colQty]; playerA = BitmapFactory.decodeResource(context.getResources(),R.mipmap.ic_player_a); playerB = BitmapFactory.decodeResource(context.getResources(),R.drawable.ic_player_b); if (colQty > 5) { winQty = 4; } else { winQty = 2; } for(int i = 0; i<rowQty; i++){ for(int j = 0; j < colQty;j++){ board[i][j] = -1;//-1 là chưa đi } } player = 0; paint.setStrokeWidth(2); int celWidth = bitmapWidth/colQty; int celHeight = bitmapHeight/rowQty; for(int i = 0; i <= colQty; i++){ lines.add(new Line(celWidth*i, 0, celWidth*i, bitmapHeight)); } for(int i = 0; i <= rowQty; i++){ lines.add(new Line(0, i*celHeight, bitmapWidth, i*celHeight)); } } public Bitmap drawBoard(){ for(int i = 0; i < lines.size(); i++) { canvas.drawLine( lines.get(i).getX1(), lines.get(i).getY1(), lines.get(i).getX2(), lines.get(i).getY2(), paint ); } return bitmap; } public boolean negaABMovee(final View view, MotionEvent motionEvent) { if (winner == 0 || winner == 1) { return true; } final int cellWidth = bitmapWidth / colQty; final int cellHeight = bitmapHeight / rowQty; final int colIndex = (int) (motionEvent.getX() / (view.getWidth() / colQty)); final int rowIndex = (int) (motionEvent.getY() / (view.getHeight() / rowQty)); int count = getCurrentDept(); final int currentDetp = rowQty*colQty - count; Record record = minimax.minimaxRecode( ChessBoard.this, currentDetp, rowQty * colQty, Integer.MIN_VALUE, Integer.MAX_VALUE ); onDrawBoard(record.getMove().getRowIndex(), record.getMove().getColIndex() , cellWidth, cellHeight); makeMove(record.getMove()); if (isGameOver()) { isGameOver = true; if (winner == 1) { Toast.makeText(context, "Ban thua roi", Toast.LENGTH_LONG).show(); } else if (winner == 0) { Toast.makeText(context, "Ban thang roi", Toast.LENGTH_LONG).show(); } else { Toast.makeText(context, "Ban hoa", Toast.LENGTH_LONG).show(); } } view.invalidate(); return true; } public boolean onTouch(final View view, MotionEvent motionEvent){ final int cellWidth = bitmapWidth / colQty; final int cellHeight = bitmapHeight / rowQty; final int colIndex = (int) (motionEvent.getX() / (view.getWidth() / colQty)); final int rowIndex = (int) (motionEvent.getY() / (view.getHeight() / rowQty)); if(board[rowIndex][colIndex] != -1){ return true; } if (winner == 0 || winner == 1) { return true; } onDrawBoard(rowIndex, colIndex, cellWidth, cellHeight); view.invalidate(); makeMove(new Move(rowIndex, colIndex)); if(isGameOver()){ isGameOver = true; if (winner == 1) { Toast.makeText(context, "Ban thua roi", Toast.LENGTH_LONG).show(); } else if (winner == 0) { Toast.makeText(context, "Ban thang roi", Toast.LENGTH_LONG).show(); } else { Toast.makeText(context, "Ban hoa", Toast.LENGTH_LONG).show(); } return true; } return true; } public void onDrawBoard(int rowIndex, int colIndex, int cellWidth, int cellHeight){ int padding = 50; if(player == 0){ canvas.drawBitmap( playerA, new Rect(0,0,playerA.getWidth(), playerA.getHeight()), new Rect(colIndex*cellWidth+padding,rowIndex*cellHeight+padding,(colIndex+1)*cellWidth -padding, (rowIndex+1)*cellHeight -padding), paint); } else { canvas.drawBitmap( playerB, new Rect(0, 0, playerB.getWidth(), playerB.getHeight()), new Rect(colIndex * cellWidth, rowIndex * cellHeight, (colIndex + 1) * cellWidth, (rowIndex + 1) * cellHeight), paint); } } public boolean isGameOver(){ if (checkWin()) { return true; } int count = 0; for (int i = 0; i < rowQty; i++) { for (int j = 0; j < colQty; j++) { if (board[i][j] == -1) count++; } } if (count == 0){ winner = -1; return true; } return false; } private boolean checkWin() { if (previousMove == null) return false; if (checkRow(previousMove.getRowIndex()) || checkColumn(previousMove.getColIndex()) || checkDiagonalFromTopLeft(previousMove.getRowIndex(), previousMove.getColIndex()) || checkDiagonalFromTopRight(previousMove.getRowIndex(), previousMove.getColIndex())) { return true; } return false; } private Boolean checkRow (int row) { int count = 0; for (int i = 1; i < rowQty; i++) { if (board[row][i] == board[row][i-1] && board[row][i] != -1) { count++; if (count == winQty) { winner = board[row][i]; return true; } } else { count = 0; } } return false; } private boolean checkColumn (int column) { int count = 0; for (int i = 1; i < colQty; i++) { if (board[i][column] == board[i-1][column] && board[i][column] != -1) { count++; if (count == winQty) { winner = board[i][column]; return true; } } else { count = 0; } } return false; } private Boolean checkDiagonalFromTopRight (int row, int col) { int rowStart, colStart; int i = 0; int count = 0; if (row + col < colQty - 1) { colStart = row + col; rowStart = 0; } else { colStart = colQty - 1; rowStart = col + row - (colQty - 1); } while (colStart - i - 1 >= 0 && rowStart + i + 1 < colQty) { if (board[rowStart + i][colStart - i] == board[rowStart + i + 1][colStart - i - 1] && board[rowStart + i][colStart - i] != -1) { count++; if (count == winQty) { winner = board[rowStart + i][colStart - i]; return true; } } else { count = 0; } i++; } return false; } private Boolean checkDiagonalFromTopLeft (int row, int col) { int rowStart, colStart; int i = 0; int count = 0; if (row > col) { rowStart = row - col; colStart = 0; } else { rowStart = 0; colStart = col - row; } while (rowStart + i + 1 < colQty && colStart + i + 1 < rowQty) { if (board[rowStart + i][colStart + i] == board[rowStart + i + 1][colStart + i + 1] && board[rowStart + i][colStart + i] != -1) { count++; if (count == winQty) { winner = board[rowStart + i][colStart + i]; return true; } } else { count = 0; } i++; } return false; } public List<Move> getMove() { List<Move> moves = new ArrayList<>(); for (int i = 0; i < rowQty; i++) { for (int j = 0; j < colQty; j++) { if (board[i][j] == -1) moves.add(new Move(i, j));//có thể đi dc } } return moves; } public void makeMove(Move move) { previousMove = move; board[move.getRowIndex()][move.getColIndex()] = player; player = (player + 1) % 2; } //0 -1 1: quan sát trên ngườu chơi hiện tại //0 hoà //1 người chơi hiện tại thắng //winner: -1, 1, 0 public int evaluate() { if (winner == -1) { return 0; } if (winner == player) { return 1; } else { return -1; } } public int[][] getNewBoard(){ int[][] newBoard = new int[rowQty][colQty]; for (int i = 0; i < rowQty; i++) { for (int j = 0; j < colQty; j++) { newBoard[i][j] = board[i][j]; } } return newBoard; } public int getPlayer() { return player; } public void setPlayer(int player) { this.player = player; } public Context getContext() { return context; } public void setContext(Context context) { this.context = context; } public int getBitmapWidth() { return bitmapWidth; } public void setBitmapWidth(int bitmapWidth) { this.bitmapWidth = bitmapWidth; } public int getBitmapHeight() { return bitmapHeight; } public void setBitmapHeight(int bitmapHeight) { this.bitmapHeight = bitmapHeight; } public int getColQty() { return colQty; } public void setColQty(int colQty) { this.colQty = colQty; } public int getRowQty() { return rowQty; } public void setRowQty(int rowQty) { this.rowQty = rowQty; } public int[][] getBoard() { return board; } public void setBoard(int[][] board) { this.board = board; } public int getCurrentDept(){ int count = 0; for (int i = 0; i < rowQty; i++) { for (int j = 0; j < colQty; j++) { if (board[i][j] == -1) count++; } } return count; } public int getWinner() { return winner; } }
[ "nguyendinhtrieu1996@gmail.com" ]
nguyendinhtrieu1996@gmail.com
272da5e8b30d1a312cfec2cff6ceb8b20c8c20c8
97476ba6eb4fbe50162ac573fbc3788fd46d1733
/src/registros/Urna.java
ec06971983435204625d9919722b35fa9ef3ae67
[]
no_license
octaviolage/gerenciaEleicao
3af7a2177ca60e290ea6ebf4f70df9c56802ab3c
1245ab1e790568001c8c5a5d58af826787225cb3
refs/heads/master
2022-10-05T19:40:49.196395
2020-06-07T23:51:26
2020-06-07T23:51:26
263,466,281
0
0
null
null
null
null
UTF-8
Java
false
false
1,122
java
package registros; import arquivos.ArquivoEscrever; import registros.lista.Lista; public class Urna extends Registro{ //Classe para criacao de um objeto Urna. Mais informacoes no classe Registro; private String municipio; private int zona; private int secao; private Lista eleitores = new Lista(); public Urna(String linha) { String[] palavra = linha.split("; "); this.municipio = palavra[0]; this.zona = Integer.parseInt(palavra[1]); this.secao = Integer.parseInt(palavra[2]); } @Override public void exportar() { ArquivoEscrever arquivo = new ArquivoEscrever(); Registro[] aux = eleitores.getRegistro(); arquivo.abrirArquivo("Urna" + getIndice() +".txt"); arquivo.escrever(toString()); for (int i = 0; i < aux.length; i++) { arquivo.escrever(aux[i].toString()); } arquivo.fecharArquivo(); } @Override public void setRegistro(Registro eleitor) { eleitores.inserir(eleitor); } @Override public String getIndice() { return Integer.toString(zona) + Integer.toString(secao); } @Override public String toString() { return municipio + ";" + zona + ";" + secao; } }
[ "octavio.lage@hotmail.com" ]
octavio.lage@hotmail.com
db2fa1cbefedff1654b08518799c6fe36a5927c9
6a922e840b33f11ab3d0f154afa0b33cff272676
/src/main/java/org/docx4j/convert/out/common/AbstractWmlExporter.java
b559572da4e31620f8ecf5be926d2bd3a546c8cf
[ "Apache-2.0" ]
permissive
baochanghong/docx4j
912fc146cb5605e6f7869c4839379a83a8b4afd8
4c83d8999c9396067dd583b82a6fc892469a3919
refs/heads/master
2021-01-12T15:30:26.971311
2016-10-20T00:44:25
2016-10-20T00:44:25
71,792,895
3
0
null
2016-10-24T13:39:57
2016-10-24T13:39:57
null
UTF-8
Java
false
false
2,603
java
/* Licensed to Plutext Pty Ltd under one or more contributor license agreements. * This file is part of docx4j. docx4j is 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.docx4j.convert.out.common; import java.io.OutputStream; import org.docx4j.convert.out.AbstractConversionSettings; import org.docx4j.openpackaging.exceptions.Docx4JException; import org.docx4j.openpackaging.packages.WordprocessingMLPackage; /** Superclass for the export of WordprocessingMLPackage(s) * * @param <CS> */ public abstract class AbstractWmlExporter<CS extends AbstractConversionSettings, CC extends AbstractWmlConversionContext> extends AbstractExporter<CS, CC, WordprocessingMLPackage> { protected AbstractExporterDelegate<CS, CC> exporterDelegate = null; protected AbstractWmlExporter(AbstractExporterDelegate<CS, CC> exporterDelegate) { this.exporterDelegate = exporterDelegate; } @Override protected WordprocessingMLPackage preprocess(CS conversionSettings) throws Docx4JException { WordprocessingMLPackage wmlPackage = null; try { wmlPackage = (WordprocessingMLPackage)conversionSettings.getWmlPackage(); } catch (ClassCastException cce) { throw new Docx4JException("Invalid document package in the settings, it isn't a WordprocessingMLPackage"); } if (wmlPackage == null) { throw new Docx4JException("Missing WordprocessingMLPackage in the conversion settings"); } return Preprocess.process(wmlPackage, conversionSettings.getFeatures()); } @Override protected ConversionSectionWrappers createWrappers(CS conversionSettings, WordprocessingMLPackage preprocessedPackage) throws Docx4JException { ConversionSectionWrappers ret = null; ret = CreateWrappers.process(preprocessedPackage, conversionSettings.getFeatures()); return ret; } @Override protected void process(CS conversionSettings, CC conversionContext, OutputStream outputStream) throws Docx4JException { exporterDelegate.process(conversionSettings, conversionContext, outputStream); } }
[ "jason@plutext.org" ]
jason@plutext.org
70f6d5edc97b63ae573fae0664be73bfb9d510a6
980dcf736c429c30bece34c9821e6a9a5998de0e
/PrimitiveWrapperConversion2.java
ee2c5195d706c86d2fe19260d9f22e4db35786e2
[]
no_license
Maulikchhabra/Object-Oriented-Programming-with-Java
66175430889fcaa2c6627ffec4afb96df4f9b577
94f9924e75766ae3b1c673dbde132b96c9ffe807
refs/heads/master
2020-12-13T09:12:56.847851
2020-05-27T12:23:38
2020-05-27T12:23:38
234,372,484
0
0
null
null
null
null
UTF-8
Java
false
false
1,000
java
public class PrimitiveWrapperConversion2{ public static void main(String args[]){ //Converting float to Float float a = 50.0F; Float p = Float.valueOf(a); System.out.println("Float Wrapper value :"+p); //Converting Float to String Float q = new Float(24.5); String x = Float.toString(q); System.out.println("String value :"+x); //Converting String to float String y ="100.0"; float b = Float.parseFloat(y); System.out.println("float value :"+b); //Converting float to String float c = 75.5F; String z = Float.toString(c); System.out.println("String value :"+z); //Converting String to Float String w = "30.6"; Float r = Float.valueOf(w); System.out.println("Float Wrapper value :"+r); //Converting Float to float Float s = new Float(55.5); float d = s.floatValue(); System.out.println("float value :"+d); } }
[ "noreply@github.com" ]
Maulikchhabra.noreply@github.com
87dcc335343de243b9ab3f29713e4036969f9f36
a442cd1ec9c52b827a66370c15e3837b5dda03d9
/src/main/java/pl/edu/agh/rentableoffices/tenant/model/survey/AnswerCreator.java
322b3a3f741663fc3184f89546c21af2995f286b
[]
no_license
agh-office-management-system/rentable-offices-management-backend
a22daa698d956e92b630ee6c73cf07d07af4177e
5a799322ac739a623f5a9bb5ef2cc39a6272cce9
refs/heads/master
2021-03-05T21:20:29.296534
2020-06-17T21:28:28
2020-06-17T21:28:28
246,153,526
0
0
null
null
null
null
UTF-8
Java
false
false
1,135
java
package pl.edu.agh.rentableoffices.tenant.model.survey; import lombok.AccessLevel; import lombok.NoArgsConstructor; import pl.edu.agh.rentableoffices.tenant.dto.survey.answer.AnswerDto; import pl.edu.agh.rentableoffices.tenant.model.survey.answer.Answer; import pl.edu.agh.rentableoffices.tenant.model.survey.answer.BooleanAnswer; import pl.edu.agh.rentableoffices.tenant.model.survey.answer.RangeAnswer; import pl.edu.agh.rentableoffices.tenant.model.survey.answer.StringAnswer; @NoArgsConstructor(access = AccessLevel.PRIVATE) public class AnswerCreator { public static <T> Answer<T> create(Question question, AnswerDto<T> dto) { switch (question.getType()) { case STRING: return (Answer<T>) StringAnswer.create(question, (String) dto.getValue()); case BOOLEAN: return (Answer<T>) BooleanAnswer.create(question, (Boolean) dto.getValue()); case RANGE: return (Answer<T>) RangeAnswer.create((RangeQuestion) question, (Integer) dto.getValue()); default: throw new IllegalArgumentException(); } } }
[ "MrozowskiKonrad@gmail.com" ]
MrozowskiKonrad@gmail.com
e8db39a54c8046df0b44c3dec5873e6438e562b5
8dfc357515ce408af5f88e691020002bc2d39529
/figis-factsheets/src/test/java/org/fao/fi/figis/fs/dataset/countryprofile/CountryProfileServiceTest.java
b111ece7a53ed7342baec97dfdb0c459c1d3970e
[]
no_license
openfigis/figis
736b5173c9b63010ab3432bcff6112e3e03846be
e7923f8c17f51729e405cc6f92db4d249e1cf4e2
refs/heads/master
2021-01-19T18:11:46.184166
2015-08-24T14:14:41
2015-08-24T14:14:41
13,469,743
1
0
null
null
null
null
UTF-8
Java
false
false
487
java
package org.fao.fi.figis.fs.dataset.countryprofile; import static org.junit.Assert.assertTrue; import org.fao.fi.figis.fs.common.data.BaseTest; import org.junit.Test; public class CountryProfileServiceTest extends BaseTest { @Test public void testRetrieveCountryProfileAreas() { CountryProfileService s = new CountryProfileService(); assertTrue(s.retrieveCountryProfileAreas().size() > 0); System.out.println(s.retrieveCountryProfileAreas().size()); } }
[ "erikvaningen@gmail.com" ]
erikvaningen@gmail.com
70701113bc843b08d4abc92b2bdaf57a0e2d9b80
1703de07187d24002b35972d12466f7ff43afd51
/q6/src/listStack/ListStack.java
d11b306916df4e8ba172be41a9add0d8d6196886
[]
no_license
TerryFunggg/PADS
64083257f88080921688c3301076d8383b4e9a47
8a59bc93f8b68af4b727cd051377d10ab46d3beb
refs/heads/master
2020-09-02T14:01:40.435972
2019-11-28T14:24:42
2019-11-28T14:24:42
217,199,408
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
package listStack; import linkedList.*; public class ListStack extends LinkedList { public ListStack() { super(); } public boolean empty() {return isEmpty();} public void push(Object element) {addToHead(element);} public Object pop() throws EmptyListException { return removeFromHead(); } public Object peek() throws EmptyListException { Object element = removeFromHead(); addToHead(element); return element; } public int search(Object element) { int index = -1; ListNode current = head; while (!current.getData().equals(element)) { current = current.getNext(); index++; } return index + 2; } }
[ "terryyessfung@gmail.com" ]
terryyessfung@gmail.com
10c563baf63a7840ecbf46ddbaaec3b4df293a15
f92cb4e687a5bbb4497239e616280288eadc52c1
/FeatDiag/branches/LennyCan/src/com/eclipse/featdiag/parser/overlap/removal/ConstraintGraph.java
933b8ae158feb2d846fd74b20c6b6ac119204a19
[ "BSD-3-Clause" ]
permissive
ebenh/featdiag
7f1d6f2966f99c9d2ff040f767929c718fc01ff6
95939a96068340cc2cce0ae99dffc2a226ffee0b
refs/heads/master
2021-12-27T10:52:35.267574
2021-12-13T20:25:06
2021-12-13T20:25:06
38,296,512
0
0
null
2021-12-13T20:25:07
2015-06-30T08:13:40
Java
UTF-8
Java
false
false
12,876
java
package com.eclipse.featdiag.parser.overlap.removal; import static com.eclipse.featdiag.parser.overlap.removal.NodeOverlapRemoval.X; import static com.eclipse.featdiag.parser.overlap.removal.NodeOverlapRemoval.Y; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.PriorityQueue; import java.util.Queue; import java.util.Vector; import com.eclipse.featdiag.parser.meyers.ISOMLayout.Vertex; /** * Constraints to solve, stored as a directed graph. * Nodes from the original graph represents nodes in this graph. * Constraints between 2 nodes represent edges in this graph. * @author nic * */ public class ConstraintGraph { // The vertices in this graph private List<Vertex> vertices; // Maps a vertex to all it's outward edges (constraints) private Map<Vertex, List<Constraint>> outConstraints; // Maps a vertex to all it's incoming edges (constraints) private Map<Vertex, List<Constraint>> inConstraints; // Maps a vertex to the block it is assigned to private Map<Vertex, Block> blocks; // Maps a vertex to the distance from the reference point of it's block private Map<Vertex, Double> offset; // Either 0 or 1, (X or Y respectively) private int dimension; /** * Creates a new Constraint Graph with the given nodes, to be solved * in the given dimension. * @param vertices * @param dimension */ public ConstraintGraph(Collection<Vertex> vertices, int dimension) { this.outConstraints = new HashMap<Vertex, List<Constraint>>(); this.inConstraints = new HashMap<Vertex, List<Constraint>>(); this.vertices = new Vector<Vertex>(vertices); this.blocks = new HashMap<Vertex, Block>(); this.offset = new HashMap<Vertex, Double>(); this.dimension = dimension; } /** * Adds a new edge to this graph from left to right. * @param left * @param right */ public void addConstraint(Vertex left, Vertex right) { // Creates a new constraint from left to right. // Adds it to the maps. Constraint c = new Constraint(left, right, dimension); List<Constraint> leftConstraints = outConstraints.get(left); if (leftConstraints == null) { leftConstraints = new Vector<Constraint>(); } leftConstraints.add(c); outConstraints.put(left, leftConstraints); List<Constraint> rightConstraints = inConstraints.get(right); if (rightConstraints == null) { rightConstraints = new Vector<Constraint>(); } rightConstraints.add(c); inConstraints.put(right, rightConstraints); } /** * Goes through each vertex and solves it's constraints * by assigning vertices to blocks. * @return */ public Map<Vertex, Double> satisfy() { totalOrder(); for (Vertex v : vertices) { Block b = block(v); b = mergeLeft(b); blocks.put(v, b); } return shift(); } /** * Shifts all the nodes to the top left hand corner of the * screen after all overlap has been removed. * @return */ private Map<Vertex, Double> shift() { double shiftDist = Integer.MIN_VALUE; // Determine the node closest to 0 Map<Vertex, Double> retval = new HashMap<Vertex, Double>(); for (Vertex v : vertices) { Block b = blocks.get(v); Double o = offset.get(v); if (b == null || o == null) { continue; } double vPos = o + b.pos; retval.put(v, vPos); if (-vPos > shiftDist) { shiftDist = -vPos + 10; } } // Shift all nodes by the amount as to make the closest node // to 0 sit at 10 exactly. for (Vertex v : vertices) { Double d = retval.get(v); retval.put(v, d + shiftDist); } return retval; } /** * Returns a list of the vertices in this graph ordered as [v1...vn] * such that for all j>i there is no directed path in this constraint * graph from vj to vi. * (Root nodes with no in edges come first in the ordering and leaf * nodes with no out edges come last in the ordering.) * * @return */ private void totalOrder() { List<Vertex> roots = new Vector<Vertex>(); for (Vertex v : vertices) { if (inConstraints.get(v) == null) { roots.add(v); } } if (roots.isEmpty()) { // Problem.. there should be at least one node with no // edges. Graph is not acyclic. return; } // Each vertex is mapped to a number to later sort vertices. // Roots are stored with 1's, and for each node with numbering n, // it's children are stored with numbers >= n+1. Map<Vertex, Integer> retval = new HashMap<Vertex, Integer>(); for (Vertex v : vertices) { retval.put(v, new Integer(0)); } List<Vertex> toVisit = new Vector<Vertex>(); for (Vertex v : roots) { retval.put(v, new Integer(1)); toVisit.add(v); } retval = orderVertices(retval, toVisit); Collections.sort(vertices, new VertexComparator(retval)); } /** * Create a new block and add v to it. * @param v * @return */ private Block block(Vertex v) { Block b = new Block(); b.vars.add(v); b.pos = (dimension == X) ? v.x : v.y; b.in.addAll(inConstraints.get(v)); blocks.put(v, b); offset.put(v, 0.0); return b; } /** * Merges block b with the blocks of nodes to the left of b * with constraints with nodes in block b. Creates a new block * in the middle of the 2, and adds all nodes from both blocks * to it. Updates the offsets appropriately. * @param b * @return */ private Block mergeLeft(Block b) { while (!b.in.isEmpty()) { Constraint c = b.in.remove(); if (c.getViolation() > 0) { Block cBlock = blocks.get(c.source); Double cLeftOffset = offset.get(c.source); Double cRightOffset = offset.get(c.target); if (cBlock == null || cLeftOffset == null || cRightOffset == null) { return null; } double dist = Math.abs(cLeftOffset + c.gap - cRightOffset); if (b.vars.size() > cBlock.vars.size()) { mergeBlock(b, c, cBlock, dist); } else { mergeBlock(cBlock, c, b, -dist); b = cBlock; } } } return b; } /** * Merges blocks p and b. Constraint c is between a node in * block p and a node in block b. Dist is the added distances * between the nodes and their respective block's reference points. * @param p * @param c * @param b * @param dist */ private void mergeBlock(Block p, Constraint c, Block b, double dist) { p.pos += dist/2; // p.pos += b.pos - dist; for (Vertex v : b.vars) { blocks.put(v, p); Double vOffset = offset.get(v); if (vOffset == null) { return; } offset.put(v, vOffset - dist); } p.in.addAll(b.in); p.vars.addAll(b.vars); } /** * Assigns each vertex a number as described in totalOrder for sorting purposes. * @param vertices * @param toVisit * @return */ private Map<Vertex, Integer> orderVertices(Map<Vertex, Integer> vertices, List<Vertex> toVisit) { while (!toVisit.isEmpty()) { Vertex v = toVisit.remove(0); int n = vertices.get(v); List<Constraint> edges = outConstraints.get(v); if (edges != null) { for (Constraint c : edges) { Vertex child = c.target; if (!toVisit.contains(child)) { toVisit.add(child); } Integer existing = vertices.get(child); if (existing == null) { existing = -1; } vertices.put(child, Math.max(existing, new Integer(n + 1))); } } } return vertices; } /** * A comparator to sort vertices based on the number assigned to * them in by totalOrder. * @author nic * */ private class VertexComparator implements Comparator<Vertex> { private Map<Vertex, Integer> vertices; /** * Takes in a map of each vertex to it's number as given in * totalOrder. Used to determine the ordering of vertices. * @param vertices */ public VertexComparator(Map<Vertex, Integer> vertices) { this.vertices = vertices; } public int compare(Vertex v1, Vertex v2) { Integer i1 = vertices.get(v1); Integer i2 = vertices.get(v2); if (i1 == null && i2 == null) { return 0; } else if (i1 == null) { return -1; } else if (i2 == null) { return 1; } return (i1 > i2) ? 1 : (i1 == i2) ? 0 : -1; } } /** * Constraints between 2 overlapping nodes. Represents edges in * this graph. * @author nic * */ public class Constraint { // Source node private Vertex source; // Target node private Vertex target; // position of source node private double left; // position of target node private double right; // the minimum required gap between the 2 nodes // in order to remove overlap private int gap; /** * Creates a new constraint between left and right to be * solved in the given dimension. * @param left * @param right * @param dimension */ public Constraint(Vertex left, Vertex right, int dimension) { this.source = left; this.target = right; if (dimension == X) { this.left = left.x; this.right = right.x; this.gap = ((left.width + right.width)/2) + 10; } else if (dimension == Y) { this.left = left.y; this.right = right.y; this.gap = ((left.height + right.height)/2) + 10; } } /** * The amount of overlap between the 2 nodes. * @return */ public int getViolation() { double left = this.left; double right = this.right; Block b = blocks.get(source); Double o = offset.get(source); if (b != null && o != null) { left = b.pos + o; } b = blocks.get(target); o = offset.get(target); if (b != null && o != null) { right = b.pos + o; } return new Double(Math.ceil(left + gap - right)).intValue(); } public boolean equals(Object o) { if (o == null || !(o instanceof Constraint)) { return false; } Constraint c = (Constraint) o; return (source.equals(c.source) && target.equals(c.target) && left == c.left && right == c.right && gap == c.gap); } public String toString() { return source.name + " + " + gap + " <= " + target.name; } } /** * A block containing nodes that have been solved for all overlap. * @author nic * */ private class Block { // The nodes in this block. List<Vertex> vars; // A priority queue of the constraints between // nodes in this block and nodes to the left of // this block. Queue<Constraint> in; // The reference position of this block double pos; /** * Create a new block */ public Block() { vars = new Vector<Vertex>(); in = new InQueue(1, new ConstraintComparator(), this); pos = -1; } public boolean equals(Object o) { if (o == null || !(o instanceof Block)) { return false; } Block b = (Block) o; return (vars.equals(b.vars) && in.equals(b.in) && pos == b.pos); } /** * A comparator to sort constraints by violation, where * a greater violation means a larger contraint. * @author nic * */ private class ConstraintComparator implements Comparator<Constraint> { public int compare(Constraint c1, Constraint c2) { int c1Violation = c1.getViolation(); int c2Violation = c2.getViolation(); return (c1Violation > c2Violation) ? 1 : (c1Violation == c2Violation) ? 0 : -1; } } /** * A priority queue to store constraints. * @author nic * */ private class InQueue extends PriorityQueue<Constraint> { private static final long serialVersionUID = 1L; private Block b; /** * Creates this Priority Queue with the given initial capacity, * the given comparator for the constraints in this queue, and * the block of the nodes that are the targets of the constraints * in this queue * are * @param i * @param constraintComparator * @param b */ public InQueue(int i, ConstraintComparator constraintComparator, Block b) { super(i, constraintComparator); this.b = b; } /** * Adds all the given constraints. Silently deletes any constraints * between 2 nodes in the same block. */ public boolean addAll(Collection<? extends Constraint> toAdd) { if (toAdd == null) { return true; } List<Constraint> toRemove = new Vector<Constraint>(); for (Constraint c : toAdd) { if (blocks.get(c.source).equals(b)) { toRemove.add(c); } } toAdd.removeAll(toRemove); return super.addAll(toAdd); } } } }
[ "gvwilson@5f111cea-8ae1-11de-85c4-67bf107c5648" ]
gvwilson@5f111cea-8ae1-11de-85c4-67bf107c5648
451c50c7668c508f166b9ae219e0f2fec0ad2b86
edf39382c423e1a1146f5e675be1c0afa4b26cbd
/src/main/java/com/learncamel/learncamelspringboot/route/HealthCheckRoute.java
14947fd7815e1f3e0e3d658f1e50b2d4f2935f52
[]
no_license
amyzeta/learncamel-spring-boot
6963f10c8390a58dd15f443ece7e954b2e5acf27
2f32364a8bcf7f0446c009f2fa74b7b69761ac24
refs/heads/master
2022-03-08T04:50:39.553772
2019-10-27T22:02:16
2019-10-27T22:02:16
204,073,496
0
0
null
null
null
null
UTF-8
Java
false
false
1,235
java
package com.learncamel.learncamelspringboot.route; import com.learncamel.learncamelspringboot.process.MailProcessor; import com.learncamel.learncamelspringboot.process.HealthCheckProcessor; import org.apache.camel.Predicate; import org.apache.camel.builder.RouteBuilder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component public class HealthCheckRoute extends RouteBuilder { @Autowired HealthCheckProcessor healthCheckProcessor; @Autowired MailProcessor mailProcessor; @Override public void configure() throws Exception { final Predicate isNotMock = header("env").isNotEqualTo("mock"); from("{{healthRoute}}").routeId("healthRoute") .choice() .when(isNotMock) .pollEnrich("http://localhost:8080/actuator/health") .end() .process(healthCheckProcessor) .choice() .when(header("error").isEqualTo(true)) .choice() .when(isNotMock) .process(mailProcessor) .end() .end(); } }
[ "amy.zeta.wilson@gmail.com" ]
amy.zeta.wilson@gmail.com
a7b7e6b23f1497689b76ffe71d681f634e180106
d9589baf42d1f9550f0f0e03ea7b32b3cfa8eeb9
/src/main/java/com/avlija/parts/model/PartsInfo.java
46558d17a4a1d51218a57a353c66ebbf5473f30a
[]
no_license
jadilovic/car_parts_app
f5c62657feb2c16a78571b46aebf4ef3386c555a
3ff13e7d3c99420949020f88342a57b2ba232fc3
refs/heads/master
2022-07-12T08:56:40.606068
2020-05-13T18:35:28
2020-05-13T18:35:28
250,385,710
0
0
null
null
null
null
UTF-8
Java
false
false
2,466
java
package com.avlija.parts.model; public class PartsInfo { private String sifra; private String grupa; private String naziv; private String marka; private String automobil; private String modelauta; private int godina; private int kolicina; private float cijena; public PartsInfo() { } public PartsInfo(String sifra, String grupa, String naziv, String marka, String automobil, String modelauta, int godina, int kolicina, float cijena) { this.sifra = sifra; this.grupa = grupa; this.naziv = naziv; this.marka = marka; this.automobil = automobil; this.modelauta = modelauta; this.godina = godina; this.kolicina = kolicina; this.cijena = cijena; } public String getSifra() { return sifra; } /** * @param sifra the sifra to set */ public void setSifra(String sifra) { this.sifra = sifra; } /** * @return the grupa */ public String getGrupa() { return grupa; } /** * @param grupa the grupa to set */ public void setGrupa(String grupa) { this.grupa = grupa; } /** * @return the naziv */ public String getNaziv() { return naziv; } /** * @param naziv the naziv to set */ public void setNaziv(String naziv) { this.naziv = naziv; } /** * @return the marka */ public String getMarka() { return marka; } /** * @param marka the marka to set */ public void setMarka(String marka) { this.marka = marka; } /** * @return the automobil */ public String getAutomobil() { return automobil; } /** * @param automobil the automobil to set */ public void setAutomobil(String automobil) { this.automobil = automobil; } /** * @return the modelauta */ public String getModelauta() { return modelauta; } /** * @param modelauta the modelauta to set */ public void setModelauta(String modelauta) { this.modelauta = modelauta; } /** * @return the godina */ public int getGodina() { return godina; } /** * @param godina the godina to set */ public void setGodina(int godina) { this.godina = godina; } /** * @return the kolicina */ public int getKolicina() { return kolicina; } /** * @param kolicina the kolicina to set */ public void setKolicina(int kolicina) { this.kolicina = kolicina; } /** * @return the cijena */ public float getCijena() { return cijena; } /** * @param cijena the cijena to set */ public void setCijena(float cijena) { this.cijena = cijena; } }
[ "adilovic79@yahoo.com" ]
adilovic79@yahoo.com
7717d2e0065572d609649129481f558c722f528c
1df93f5055b3984b2609f68fa5cb7b6d3009018c
/src/main/java/rene/playground/cassandra/persistence/EventDAO.java
d4cd1056c7f062b1bb3720e1ffb6c442f78237c0
[]
no_license
Gattermeier/cassandra-playground
e19eddcfe5c55797f361d62d7f1c1657898ed3dc
6b22a81403a8b93a71bb383017251c1328b5cf8a
refs/heads/master
2020-02-26T14:23:33.649369
2015-11-13T22:14:45
2015-11-13T22:14:45
46,155,059
1
0
null
2015-11-14T00:58:25
2015-11-14T00:58:25
null
UTF-8
Java
false
false
429
java
package rene.playground.cassandra.persistence; import java.time.LocalDateTime; import rene.playground.cassandra.persistence.model.Event; import rx.Observable; /** * @author Rene Loperena <rene@vuh.io> * */ public interface EventDAO { /** * @param movie * @param startDate * @param endDate * @return */ Observable<Event> getMovieEventsByDateRange(String movie, LocalDateTime startDate, LocalDateTime endDate); }
[ "rene@implugd.com" ]
rene@implugd.com
72872445cd215deb21e47e54563a4465adbee5ba
aa0a9035a748f2bfc3147fd4a50d45db23152af2
/src/main/java/com/greelee/gllog/manager/impl/ApiLogRequestImpl.java
7f1649979ffeb239dba4f4a528cb645dc4578c81
[]
no_license
18882341560/gl-log
e5b406b101ee964f5e5386881ad71e146b4c4548
b0341e507586e9d027bb4a337672f94ef82aebbe
refs/heads/master
2020-04-27T23:59:51.957446
2019-04-05T13:04:08
2019-04-05T13:04:08
174,799,385
0
0
null
null
null
null
UTF-8
Java
false
false
772
java
package com.greelee.gllog.manager.impl; import com.greelee.gllog.dao.ApiLogDao; import com.greelee.gllog.manager.ApiLogRequest; import com.greelee.gllog.model.ApiLogDO; import gl.tool.component.exception.ServiceException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** * @author: gl * @Email: 110.com * @version: 1.0 * @Date: 2019/3/27 * @describe: */ @Component public class ApiLogRequestImpl implements ApiLogRequest { private ApiLogDao apiLogDao; @Autowired public ApiLogRequestImpl(ApiLogDao apiLogDao) { this.apiLogDao = apiLogDao; } @Override public Integer save(ApiLogDO object) throws ServiceException { return apiLogDao.save(object); } }
[ "gllovejava@163.com" ]
gllovejava@163.com
6f5603b643da6f6faaebc704a0dd0002c189c78d
e0fd7ae807162b77e47d27f2741329ca8571fcbe
/src/main/java/线程池/蔡佳新/MyThreadFactory.java
668754b75c0e6b3e43d502d24f6f5842391a8d83
[]
no_license
Jxin-Cai/arithmetic-study
19e08d0b58dadaacc200cd8f01f97b1d2dcfbebe
98d8c30aa59d22646ce41c11dadc4283a5cbcb23
refs/heads/master
2021-07-19T18:22:03.219833
2019-12-10T12:43:36
2019-12-10T12:43:36
223,112,189
0
0
null
2020-10-13T17:37:50
2019-11-21T07:17:14
Java
UTF-8
Java
false
false
1,125
java
package 线程池.蔡佳新; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.LongAdder; /** * @author 蔡佳新 * @version 1.0 * @since 2019/12/10 20:14 */ public class MyThreadFactory implements ThreadFactory { private final String namePre; private final LongAdder nextId = new LongAdder(); public MyThreadFactory(String namePre) { this.namePre = namePre; } @Override public Thread newThread(Runnable r) { nextId.increment(); final String name = namePre + nextId.longValue(); System.out.println(name); return new Thread(null, r, name); } static class Task implements Runnable{ private final AtomicInteger count = new AtomicInteger(0); @Override public void run() { try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println(Thread.currentThread().getName() + "_run :" + count.getAndIncrement()); } } }
[ "105760730@qq.com" ]
105760730@qq.com
d7a2813381aa1af9c911372cf0c2d7fe5a6f6010
48f27d36e641af6bda05e0fbb20f88dc18af2f8a
/secuhap/src/main/java/com/web/kong/sign/ISignService.java
d609eae875b17769a97a82bc42b4dcd3be51d4ac
[]
no_license
sooki0501/secuhap
62be371722842d927177556c9c54700da4eb65b8
9010ff8c7abe17cd3fc2b620c070625ceeb688b5
refs/heads/master
2020-03-19T12:55:39.595151
2018-06-19T01:46:09
2018-06-19T01:46:09
136,550,323
0
1
null
null
null
null
UTF-8
Java
false
false
134
java
package com.web.kong.sign; import com.web.kong.DTO.UserDTO; public interface ISignService { int userAdd(UserDTO dto); }
[ "sooki@redfox" ]
sooki@redfox
d8cc24c80513bc634c82929c1aa9b3f137fbc274
7016cec54fb7140fd93ed805514b74201f721ccd
/src/java/com/echothree/control/user/offer/common/form/SetDefaultOfferForm.java
928191ff77ae0d484adc030ffd634e376d0310df
[ "MIT", "Apache-1.1", "Apache-2.0" ]
permissive
echothreellc/echothree
62fa6e88ef6449406d3035de7642ed92ffb2831b
bfe6152b1a40075ec65af0880dda135350a50eaf
refs/heads/master
2023-09-01T08:58:01.429249
2023-08-21T11:44:08
2023-08-21T11:44:08
154,900,256
5
1
null
null
null
null
UTF-8
Java
false
false
1,005
java
// -------------------------------------------------------------------------------- // Copyright 2002-2023 Echo Three, LLC // // 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.echothree.control.user.offer.common.form; import com.echothree.control.user.offer.common.spec.OfferSpec; public interface SetDefaultOfferForm extends OfferSpec { // Nothing additional beyond OfferSpec }
[ "rich@echothree.com" ]
rich@echothree.com
dfda85c36d77317cbcb9556528b222abc3bd8ed7
9c570195cda23da2174c3607b443294e6f201ab1
/SpringBootSeed/src/main/java/com/github/nakjunizm/AppConfiguration.java
822430cc642db695936667b9e768948513e6e0f4
[ "Apache-2.0" ]
permissive
nakjunizm/SpringBootSeed
539fbc30db8c046285c4a6347309ed88a18f1eef
adeb973f91a0833aeddb8480ed0ec815826c6d88
refs/heads/master
2021-09-01T06:40:18.452057
2017-12-25T12:05:11
2017-12-25T12:05:11
114,523,571
0
0
null
null
null
null
UTF-8
Java
false
false
660
java
package com.github.nakjunizm; import java.text.SimpleDateFormat; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; @Configuration @EnableAutoConfiguration public class AppConfiguration { @Bean public Jackson2ObjectMapperBuilder jacksonBuilder() { Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder(); builder.indentOutput(true); builder.dateFormat(new SimpleDateFormat("yyyy-MM-dd hh:mm:ss")); return builder; } }
[ "nakjunizm@gmail.com" ]
nakjunizm@gmail.com
c02065056cfbcde875464ba4165933b348f0cbd7
3d75fce1855e91ddd188cde6bdf6506c85df90b5
/order-core/src/main/java/com/ai/yc/order/service/business/impl/OrdOdPersonInfoBusiSVImpl.java
8332fefc66d4d209db8b8dd2d78b17a03fef52ec
[]
no_license
xie-summer/yc-order
45d84c47548ef2a9e00a7aa32826b31b59b2e4e5
f51eb44fee5a233c33357793b469ad97dc1b5f1a
refs/heads/master
2021-06-16T15:19:32.754528
2017-05-23T09:59:21
2017-05-23T09:59:21
92,925,859
0
1
null
null
null
null
UTF-8
Java
false
false
259
java
package com.ai.yc.order.service.business.impl; import org.springframework.stereotype.Service; import com.ai.yc.order.service.business.interfaces.IOrdOdPersonInfoBusiSV; @Service public class OrdOdPersonInfoBusiSVImpl implements IOrdOdPersonInfoBusiSV { }
[ "409993207@qq.com" ]
409993207@qq.com
25f369ca5fec8c83f56b67e78e15d7966d77a403
0f78eb1bd70ee3ea0cbd7b795d7e946255366efd
/src-app/com/qfw/model/vo/custinfo/credit/Debts.java
77cda00246e82082a4e5707943c13bee8765add3
[]
no_license
xie-summer/sjct
b8484bc4ee7d61b3713fa2e88762002f821045a6
4674af9a0aa587b5765e361ecaa6a07f966f0edb
refs/heads/master
2021-06-16T22:06:06.646687
2017-05-12T09:24:52
2017-05-12T09:24:52
92,924,351
0
2
null
null
null
null
UTF-8
Java
false
false
5,523
java
package com.qfw.model.vo.custinfo.credit; import java.util.ArrayList; import java.util.List; /** * @Title: 负债记录 * @author ljn * @date 2016-6-3 */ public class Debts { private Integer creditLimitMax;// 0, //'信用卡限额最大额额度' private Integer creditLimitTotal;// 0, //'信用卡限额总额度' private Integer creditOrgCounts;// 0, //'信用卡机构总数' - 排除销户和准贷记卡 private Integer creditLimitUsed;// 0, //'已使用额度 + 逾期金额' private Integer creditLimitUseRate;// 0, //'信用卡额度使用率 creditLimitUsed/creditLimitTotal' private Integer loanAmts;// 0, //贷款总额(包括已结清和未结清) private Integer loanAmtsNoSettle;// 0, //未结清贷款总额 private Integer loanCounts;// 0, //'贷款总笔数' private Integer loanBalances;// 0, //'贷款总余额' private Integer loanBalanceCounts;// 0, //'未结清贷款总笔数 ' private Integer loanBalancesMortgage;// 0, //'房贷总余额' private Integer loanBalancesCar;// 0, //'车贷总余额' private Integer loanBalancesBiz;// 0, //'经营贷总余额' private Integer loanBalancesOther;// 0, //'其他贷总余额' private Integer loanBalancesMonth;// 0, //月还贷款总额 private Integer loanBalancesMortgageMonth;// 0, //月还房贷金额 private Integer loanBalancesCarMonth;// 0, //月还车贷 private Integer loanBalancesBizMonth;//0, //月还经营贷 private Integer loanBalancesOtherMonth;// 0, //月还其他贷总余额 //loanBalanceInfos// [//贷款余额详列 private List<LoanBalanceInfo> loanBalanceInfos=new ArrayList<LoanBalanceInfo>(); public Integer getCreditLimitMax() { return creditLimitMax; } public void setCreditLimitMax(Integer creditLimitMax) { this.creditLimitMax = creditLimitMax; } public Integer getCreditLimitTotal() { return creditLimitTotal; } public void setCreditLimitTotal(Integer creditLimitTotal) { this.creditLimitTotal = creditLimitTotal; } public Integer getCreditOrgCounts() { return creditOrgCounts; } public void setCreditOrgCounts(Integer creditOrgCounts) { this.creditOrgCounts = creditOrgCounts; } public Integer getCreditLimitUsed() { return creditLimitUsed; } public void setCreditLimitUsed(Integer creditLimitUsed) { this.creditLimitUsed = creditLimitUsed; } public Integer getCreditLimitUseRate() { return creditLimitUseRate; } public void setCreditLimitUseRate(Integer creditLimitUseRate) { this.creditLimitUseRate = creditLimitUseRate; } public Integer getLoanAmts() { return loanAmts; } public void setLoanAmts(Integer loanAmts) { this.loanAmts = loanAmts; } public Integer getLoanAmtsNoSettle() { return loanAmtsNoSettle; } public void setLoanAmtsNoSettle(Integer loanAmtsNoSettle) { this.loanAmtsNoSettle = loanAmtsNoSettle; } public Integer getLoanCounts() { return loanCounts; } public void setLoanCounts(Integer loanCounts) { this.loanCounts = loanCounts; } public Integer getLoanBalances() { return loanBalances; } public void setLoanBalances(Integer loanBalances) { this.loanBalances = loanBalances; } public Integer getLoanBalanceCounts() { return loanBalanceCounts; } public void setLoanBalanceCounts(Integer loanBalanceCounts) { this.loanBalanceCounts = loanBalanceCounts; } public Integer getLoanBalancesMortgage() { return loanBalancesMortgage; } public void setLoanBalancesMortgage(Integer loanBalancesMortgage) { this.loanBalancesMortgage = loanBalancesMortgage; } public Integer getLoanBalancesCar() { return loanBalancesCar; } public void setLoanBalancesCar(Integer loanBalancesCar) { this.loanBalancesCar = loanBalancesCar; } public Integer getLoanBalancesBiz() { return loanBalancesBiz; } public void setLoanBalancesBiz(Integer loanBalancesBiz) { this.loanBalancesBiz = loanBalancesBiz; } public Integer getLoanBalancesOther() { return loanBalancesOther; } public void setLoanBalancesOther(Integer loanBalancesOther) { this.loanBalancesOther = loanBalancesOther; } public Integer getLoanBalancesMonth() { return loanBalancesMonth; } public void setLoanBalancesMonth(Integer loanBalancesMonth) { this.loanBalancesMonth = loanBalancesMonth; } public Integer getLoanBalancesMortgageMonth() { return loanBalancesMortgageMonth; } public void setLoanBalancesMortgageMonth(Integer loanBalancesMortgageMonth) { this.loanBalancesMortgageMonth = loanBalancesMortgageMonth; } public Integer getLoanBalancesCarMonth() { return loanBalancesCarMonth; } public void setLoanBalancesCarMonth(Integer loanBalancesCarMonth) { this.loanBalancesCarMonth = loanBalancesCarMonth; } public Integer getLoanBalancesBizMonth() { return loanBalancesBizMonth; } public void setLoanBalancesBizMonth(Integer loanBalancesBizMonth) { this.loanBalancesBizMonth = loanBalancesBizMonth; } public Integer getLoanBalancesOtherMonth() { return loanBalancesOtherMonth; } public void setLoanBalancesOtherMonth(Integer loanBalancesOtherMonth) { this.loanBalancesOtherMonth = loanBalancesOtherMonth; } public List<LoanBalanceInfo> getLoanBalanceInfos() { return loanBalanceInfos; } public void setLoanBalanceInfos(List<LoanBalanceInfo> loanBalanceInfos) { this.loanBalanceInfos = loanBalanceInfos; } }
[ "271673805@qq.com" ]
271673805@qq.com
bb4b89300546842fc155ae80170d10a71d627546
5ed1cd47eacf53abfe7892130282dc49e4f41e7b
/mall-gateway/src/main/java/com/perenc/mall/gate/MallGateApplication.java
08e37acd288939049dde1a668181cc643b238f6e
[]
no_license
15116446660/mall-2
75a4068fd946b73d2d5026e1c3c8d170452f8881
ad1c351f9cd154428ef76c6d3a68f946093c86bd
refs/heads/master
2020-09-19T12:15:28.762837
2019-10-10T10:09:36
2019-10-10T10:09:36
224,227,748
4
1
null
2019-11-26T15:43:08
2019-11-26T15:43:08
null
UTF-8
Java
false
false
425
java
package com.perenc.mall.gate; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; @EnableDiscoveryClient @SpringBootApplication public class MallGateApplication { public static void main(String[] args) { SpringApplication.run(MallGateApplication.class, args); } }
[ "1084424111@qq.com" ]
1084424111@qq.com
41b5924e1222ce2cd07f2ca1fb4f6670871193b0
d51faba39771c6a170d9bc26379234547aef3118
/src/controller/event/events/event/add/EventAddUploader.java
838acbd751b40ec42e4e0549dfcf73079c86accb
[]
no_license
Ktechen/prog3
f2fd43eae0f0cfff6ef6e5a8dd64c674889a349e
92598fd04e28a5b5ea6669ee152d743b8725eae7
refs/heads/master
2023-03-16T11:03:50.144792
2021-03-08T00:41:34
2021-03-08T00:41:34
309,315,842
0
0
null
null
null
null
UTF-8
Java
false
false
217
java
package controller.event.events.event.add; import controller.event.Event; public class EventAddUploader extends Event { public EventAddUploader(Object source, String text) { super(source, text); } }
[ "kevHTW@gmx.de" ]
kevHTW@gmx.de
b01d650423ae3f0e232c8c43f794fccad0a7647e
2b9693d99bc0afd4d8af14a2d9a4651863d690c1
/src/main/java/com/ocdsoft/bacta/soe/chat/message/ChatOnSendInstantMessage.java
493fc6920f253bdfaf38d75cb88b942083f4c78b
[]
no_license
andir/soe
61b420a2d221d9f647ca1c60b61139c7a4894dc5
ef1889f3312057cd8014c10b8d353945880ad593
refs/heads/master
2020-12-31T02:32:33.532408
2015-03-02T21:27:48
2015-03-02T21:27:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
179
java
package com.ocdsoft.bacta.soe.chat.message; /** * Created by crush on 1/12/2015. */ public class ChatOnSendInstantMessage { private int result; private int sequence; }
[ "crush@nacmtampa.com" ]
crush@nacmtampa.com
fd6ad4ac75321d12b6a2f5d35ee3f6ea167c89ef
f3f958461a72fe06a5c676a6baeed50757de5a7a
/src/main/java/com/integrado/repository/RotacionRepository.java
d1a37bcc5d1c9d3cbf6ee224f0461aea906c1b7c
[]
no_license
carlosgl2017/siscam
7c8269d3745a87ec1720c231cf45850ea25011b9
7c619139e4931394fc7842ebbb48b4d116ff473e
refs/heads/master
2023-08-21T10:49:59.724151
2021-09-21T20:55:08
2021-09-21T20:55:08
407,926,045
1
0
null
null
null
null
UTF-8
Java
false
false
264
java
package com.integrado.repository; import java.util.List; import org.springframework.data.repository.CrudRepository; import com.integrado.entity.Rotacion; public interface RotacionRepository extends CrudRepository<Rotacion, Long> { List<Rotacion> findAll(); }
[ "carlos2017gl@gmail.com" ]
carlos2017gl@gmail.com
a79d44b56cb24bed8ec919ad9dacfe12b798d810
bf25ed76ddb97f02ae9e8856fd4946cf25f0bc0b
/src/controlador/cliente/AccionConsultaAutomaticaCliente.java
8963fd3661ce663f1eddfc5dac6a164a6f1ea70d
[]
no_license
Nizar4790k/Sistema-de-Facturacion
e36a117a81fd3392d178f48273c103026feb0d49
c2da733a014ef0d43ed8f73a27881d4f5c6138fc
refs/heads/master
2020-04-03T04:14:25.178029
2019-04-14T13:39:48
2019-04-14T13:39:48
155,008,003
1
0
null
null
null
null
UTF-8
Java
false
false
621
java
package controlador.cliente; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JRadioButton; import vista.cliente.ClienteForm; public class AccionConsultaAutomaticaCliente implements ActionListener { ClienteForm form; public AccionConsultaAutomaticaCliente(ClienteForm form) { this.form = form; } @Override public void actionPerformed(ActionEvent arg0) { if(form.getRadConsultar().isSelected()) { form.getBtnDale().setEnabled(false); }else { form.getBtnDale().setEnabled(true); } form.rellenarTablaConsulta(); } }
[ "nizar4790k@gmail.com" ]
nizar4790k@gmail.com
39b13f0321a6e9e6ef9f25e798379f4efac9eb0e
4198322ad2b49d5a5aa60ade595d9c8c216d30e1
/src/main/java/component_scan/xml/beans_a_scanner/Facture.java
74a11c09206a717b459e5d762cc115d7e34ff325
[]
no_license
tarik-mamou/formation_spring_5_partie_2
7942f14599633d4219e980be65d560e45c1078ae
0c2270b2a2a0dcc9d4435e8e2c74b09521df1e78
refs/heads/master
2023-07-29T09:44:50.404942
2021-09-10T07:20:04
2021-09-10T07:20:04
401,612,941
0
0
null
null
null
null
UTF-8
Java
false
false
427
java
package component_scan.xml.beans_a_scanner; import org.springframework.stereotype.Component; import java.util.Date; @Component public class Facture { Date date; Facture() { this.date = new Date(); } public Facture(Date date) { this.date = date; } @Override public String toString() { return "Facture{" + "date=" + date + '}'; } }
[ "" ]
b25a0e7b3f8914abd5055925019c6f6c95ca6a01
7ee2de6d6db11a38e8e5f618514a046f14e75c12
/jetpackdir/jetpackapp2/src/main/java/com/flannery/jetpackapp2/User.java
b77be715654ddde59a7c1a4db49e5c63d1a88260
[]
no_license
tinghaoMa/AndroidHelper
b015059da1443488eacd0a262b75e865b38ae8c3
ab94d7b02d680f4283715c3c3ab4d229820eb5e8
refs/heads/master
2023-06-26T08:40:09.145400
2021-07-25T13:03:18
2021-07-25T13:03:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
194
java
package com.flannery.jetpackapp2; public class User { String user; String pass; public User(String user, String pass) { this.user = user; this.pass = pass; } }
[ "18310579837@163.com" ]
18310579837@163.com
a551b71fc292fe1ac1d6bd4961285b6bc20a339f
862b73b78e823d492acfd434476af00d8c12a4af
/CODEGYMDN_CASE_STUDY/MODULE02_TRANMINHTRIEU/Castudy_Furama_HaveR/springboot_web_casestudy/src/main/java/vn/tmt/springboot_web_casestudy/service/impl/TypeServiceServiceImpl.java
1925659822af4ff06cb2ccd7f728b5c183342db9
[]
no_license
legendarytmt1205/TranMinhTrieu_CodeGymDaNang_C1119G1
42708673bc35b7e58e48ffdc9864b9c9970e2dfe
093308db2ec7ad8b81dbf90499af2043295f7a38
refs/heads/master
2020-09-16T19:04:49.593529
2020-04-12T03:31:03
2020-04-12T03:31:03
223,861,208
2
0
null
2020-03-05T00:31:35
2019-11-25T04:31:13
Java
UTF-8
Java
false
false
644
java
package vn.tmt.springboot_web_casestudy.service.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import vn.tmt.springboot_web_casestudy.entity.TypeServices; import vn.tmt.springboot_web_casestudy.repository.TypeServiceRepository; import vn.tmt.springboot_web_casestudy.service.TypeServiceService; @Service public class TypeServiceServiceImpl implements TypeServiceService { @Autowired TypeServiceRepository typeServiceRepository; @Override public Iterable<TypeServices> findAll() { return typeServiceRepository.findAll(); } }
[ "tranminhtrieudn@gmail.com" ]
tranminhtrieudn@gmail.com
7d3587a8e6574d4af38b20959288ebc69f0f0548
5b36f35fbb8f2a01dd904302d1f0450ea4d125c9
/j2me_cldc/samples/src/StarCruiser.java
f8b6ef1d9d65613d1d5e8ab6333c23bb64213474
[]
no_license
eruffaldi/pitos
8d312354a15ec7dd4dd5cd316e2768f35c65d3b8
8431f1c97d4b6747f42b31ef366738a3ea112bee
refs/heads/master
2016-08-05T23:24:47.292352
2014-11-14T17:16:46
2014-11-14T17:16:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
12,113
java
/* * Copyright (c) 1999 Sun Microsystems, Inc., 901 San Antonio Road, * Palo Alto, CA 94303, U.S.A. All Rights Reserved. * * Sun Microsystems, Inc. has intellectual property rights relating * to the technology embodied in this software. In particular, and * without limitation, these intellectual property rights may include * one or more U.S. patents, foreign patents, or pending * applications. Sun, Sun Microsystems, the Sun logo, Java, KJava, * and all Sun-based and Java-based marks are trademarks or * registered trademarks of Sun Microsystems, Inc. in the United * States and other countries. * * This software is distributed under licenses restricting its use, * copying, distribution, and decompilation. No part of this * software may be reproduced in any form by any means without prior * written authorization of Sun and its licensors, if any. * * FEDERAL ACQUISITIONS: Commercial Software -- Government Users * Subject to Standard License Terms and Conditions */ import com.sun.kjava.*; // Simple game application: steer a rocket // and avoid hitting the moving stars // Two different star creation strategies have // been implemented. One approach uses pre-created // star objects to minimize garbage collection, and // the other instantiates new star objects whenever // necessary. As obvious, the latter approach generates // a lot of garbage, making this a good stress test // program for the garbage collector. public class StarCruiser extends Spotlet { /*============================================================================== * Constants *============================================================================*/ // Maximum number of stars simultaneously on the screen static final int MAXSTARS = 30; // Maximum number of ships available in the game static final int NUMBEROFSHIPS = 6; // Interval for printing game status (3 seconds) static final int STATUSINTERVAL = 3000; // Interval for speeding up the game (10 seconds) static final int SPEEDUPINTERVAL = 10000; // Minimum interval for creating new starts (0.2 seconds) static final int MINIMUMSTARINTERVAL = 200; // Width of the ship bitmap in pixels static final int BITMAPWIDTH = 8; /*============================================================================== * Static variables *============================================================================*/ // random number generator static java.util.Random random = new java.util.Random(); // Handle on the singleton Graphics object static Graphics g = Graphics.getGraphics(); // Starship bitmap static Bitmap shipBitmap = new Bitmap((short)1, new byte[] { (byte)0x70, (byte)0x8C, (byte)0x82, (byte)0x81, (byte)0x81, (byte)0x82, (byte)0x8C, (byte)0x70 }); // Starship game (spotlet) instance static StarCruiser StarCruiserGame; static ScrollTextBox stb; // Play status static boolean play; // The GUI buttons static Button exitButton; static Button playButton; /*============================================================================== * Instance variables *============================================================================*/ // A array of star objects MovingStar[] stars; // The number of stars currently on display int numberOfStars; // Height of the ship int shipHeight; // The number of times the ship has hit a star int collisions; // Game start time long gameStartTime; // Scrolling delay int scrollDelay; // Star creation interval int starInterval; /*============================================================================== * Static methods *============================================================================*/ /** * The main method. */ public static void main(String[] args) { // Instantiate game StarCruiserGame = new StarCruiser(); String helpText = "Welcome to the Star Cruiser game!\nThe object of the Star Cruiser game is to avoid the oncoming asteroids with your Starcruiser ship and as you avoid them you get points (the score is shown in the middle of the screen). You have six lives (depicted in the lower left hand part of the screen) so use them sparingly. As you avoid more asteroids the asteroids come at you faster and faster. To play the game press the scroll button in the middle to move up and down (hold them down for faster movement), thus avoiding the oncoming asteroids.\n\nHave fun playing and may the asteroids be with you and not hitting you!"; stb = new ScrollTextBox(helpText, 5, 5, 150, 130); g.clearScreen(); stb.paint(); playButton.paint(); // Register event handlers StarCruiserGame.register(NO_EVENT_OPTIONS); while (!play) Thread.yield(); // Run the non-event-handling part of the app StarCruiserGame.letTheGameRoll(); } /*============================================================================== * Constructors *============================================================================*/ /** * Constructor. */ public StarCruiser() { // Initialize the array of stars stars = new MovingStar[MAXSTARS]; /* Alternative strategy: pre-create all stars (minimizes garbage collection) for (int i = 0; i < MAXSTARS; i++) stars[i] = new MovingStar(); */ // Number of stars is initially 0 numberOfStars = 0; // Initialize the number of collisions collisions = 0; // Initialize ship location shipHeight = 75; // Initialize scrolling delay (initially 0.2 seconds) scrollDelay = 200; // Initialize the maximum star creation interval // (initially 1 second) starInterval = 1000; // Create the necessary GUI buttons exitButton = new Button("Exit", 138, 146); playButton = new Button("Done", 60, 145); } /*============================================================================== * Instance methods *============================================================================*/ /** * Game main routine. Generates new star * objects randomly, scrolls them left, and * checks for collisions with the ship. * * Note that the operations in this function * could have been implemented as separate threads, * but let's use a more traditional solution * this time. */ public void letTheGameRoll() { // Get clock time at game initialization long scrollTime = gameStartTime; long newStarTime = scrollTime; long speedupTime = scrollTime; long statusTime = scrollTime; // Calculate a random value when to create // a new star int randomInterval = (random.nextInt()>>>1) % starInterval; while (true) { long timeNow = System.currentTimeMillis(); // Generate a new star at random intervals if (timeNow > newStarTime + randomInterval) { createNewStar(); randomInterval = (random.nextInt()>>>1) % starInterval; newStarTime = timeNow; } // If more than 'scrollDelay' time has passed // scroll all the stars left and check for // collisions. if (timeNow > scrollTime + scrollDelay) { scrollStarsLeft(); scrollTime = timeNow; // Paint the ship paintShip(); // Make game a little bit faster // as the game progresses. if (timeNow > speedupTime + SPEEDUPINTERVAL) { scrollDelay -= 10; if (scrollDelay <= 10) scrollDelay = 10; starInterval -= 50; if (starInterval <= MINIMUMSTARINTERVAL) starInterval = MINIMUMSTARINTERVAL; // After two minutes, make stars move faster if (timeNow > gameStartTime + 12000) MovingStar.boostSpeed(); speedupTime = timeNow; } // Update score periodically. if (timeNow > statusTime + STATUSINTERVAL) { paintScore(); statusTime = timeNow; } } } } /** * Scroll all the stars on the display left * and check for collisions. */ private void scrollStarsLeft() { for (int i = 0; i < numberOfStars; i++) { stars[i].scrollLeft(); // Check for collision with the ship if (stars[i].hitShip(shipHeight)) { collisions++; paintCollisionStatus(); if (collisions >= NUMBEROFSHIPS) exitGame(); stars[i].undraw(); removeStar(i); } // If the star went past the visible screen // area, make it inactive. Note: we assume // that all the stars move at the same speed, // i.e., stars at the beginning of the array // are always removed before stars located // later in the array. else if (stars[i].wentBy()) { stars[i].undraw(); removeStar(i); } } } /** * Create a new star object */ private void createNewStar() { if (numberOfStars < MAXSTARS) { stars[numberOfStars++] = new MovingStar(); } /* Alternative strategy with pre-created stars (minimizes garbage collection) if (numberOfStars < MAXSTARS) { stars[numberOfStars++].initialize(); } */ } /** * Remove the i'th star from list of stars */ private void removeStar(int i) { // Let's create garbage to stress-test the collector stars[i] = stars[numberOfStars-1]; stars[numberOfStars-1] = null; if (stars[i] != null) stars[i].scrollLeft(); /* Alternative strategy with pre-created stars (minimizes garbage collection) if (stars[i] != stars[numberOfStars-1]) { // Remove the star by swapping it with another // one, then decrease star count MovingStar temp = stars[i]; stars[i] = stars[numberOfStars-1]; stars[i].scrollLeft(); stars[numberOfStars-1] = temp; } */ numberOfStars--; } /** * Draw the ship in the current location. */ private void paintShip() { g.drawBitmap(1, shipHeight, shipBitmap); } /** * Undraw the ship in the current location. */ private void unpaintShip() { g.drawRectangle(1, shipHeight, BITMAPWIDTH, BITMAPWIDTH, g.ERASE, 0); } /** * Refresh the collision counter shown on the screen. */ private void paintCollisionStatus() { // Draw the number of collisions g.drawString("Collisions: " + collisions + "/" + NUMBEROFSHIPS, 1, 149); paintScore(); } /** * Refresh the score shown on the screen. */ private void paintScore() { // Draw the score and the number of collisions long timeNow = System.currentTimeMillis(); g.drawString("Score: " + (int)(timeNow-gameStartTime)/10, 70, 149); } /** * Get current ship location */ public int getShipHeight() { return shipHeight; } /** * Move ship lower */ public void moveShipLower() { unpaintShip(); shipHeight += 2; if (shipHeight >= 138) shipHeight = 138; paintShip(); } /** * Move ship higher */ public void moveShipHigher() { unpaintShip(); shipHeight -= 2; if (shipHeight <= 0) shipHeight = 0; paintShip(); } /** * Exit game. */ public void exitGame() { g.drawString("GAME OVER", 55, 70); // Wait 5 seconds, then exit try { Thread.sleep(5000); } catch (InterruptedException e) {} System.exit(0); } /*============================================================================== * Event handlers *============================================================================*/ /** * Handle a pen down event. */ public void penDown(int x, int y) { // handle prelude event (the prelude form) if ((! play) && playButton.pressed(x,y)) { // Clear the display g.clearScreen(); // Draw the exit button exitButton.paint(); // Print initial game status gameStartTime = System.currentTimeMillis(); paintCollisionStatus(); paintScore(); // change mode play = true; } if ((!play) && stb.contains(x,y)) { stb.handlePenDown(x,y); } if (play && exitButton.pressed(x,y)) { System.exit(0); } } public void penMove(int x, int y) { if((!play) && stb.contains(x,y)){ stb.handlePenMove(x, y); } } /** * Handle a key down event. */ public void keyDown(int keyCode) { if (!play) { stb.handleKeyDown(keyCode); return; } switch (keyCode) { case PAGEDOWN: moveShipLower(); break; case PAGEUP: moveShipHigher(); break; } } }
[ "e.ruffaldi@sssup.it" ]
e.ruffaldi@sssup.it
9b29d0189a38942b17ee8ed3206a5de20062de7c
8733a161539399145c50e6e2356fa309fbfedca5
/mall-statistics-service/src/main/java/com/fengchao/statistics/rpc/extmodel/OrderDetailBean.java
6da3f8677e9c75b658b02498566ae9f621c54053
[]
no_license
songbw/fengchao-mall-statistics
c443970183e575d7f3facc458ced2f38420c60b2
630ba98df96700bb7bc9ad19059d7d04bf4f1492
refs/heads/master
2023-06-09T03:09:18.885786
2019-09-16T06:08:52
2019-09-16T06:08:52
382,792,324
0
0
null
null
null
null
UTF-8
Java
false
false
2,429
java
package com.fengchao.statistics.rpc.extmodel; import lombok.Getter; import lombok.Setter; import java.math.BigDecimal; import java.util.Date; @Getter @Setter public class OrderDetailBean { private Integer id; private String openId; private String subOrderId; private String tradeNo; private String aoyiId; private String companyCustNo; private Integer merchantId; private String merchantNo; private String receiverName; private String telephone; private String mobile; private String email; private String provinceId; private String provinceName; private String cityId; private String cityName; private String countyId; private String countyName; private String townId; private String address; private String zip; private String remark; private String invoiceState; private String invoiceType; private String invoiceTitle; private String invoiceContent; private String payment; private Float servFee; private Float amount; private Integer status; private Integer type; private Date createdAt; private Date updatedAt; private String skuId; private Integer num; private BigDecimal unitPrice; private String image; private String model; private String name; private String paymentNo; private Date paymentAt; private String logisticsId; private String logisticsContent; private String outTradeNo; private Integer paymentAmount; // 商户号,充值钱包的时候没有 private String payee ; // 退款金额,退款时候有 private int refundFee; // 支付方式 private String payType; // 订单总金额 private int paymentTotalFee; // C端个人账号。 表示唯一用户 private String payer; // 支付状态 10初始创建订单 1下单成功,等待支付。 2支付中,3超时未支付 4支付失败 5支付成功 11支付成功,记账也成功 12支付成功,记账失败 14退款失败,15订单已退款 private int payStatus; // 1支付,2充值,3退款,4提现 private int payOrderCategory ; private Integer couponId; private String couponCode; private Float couponDiscount; private Integer promotionId; private BigDecimal promotionDiscount; private Float saleAmount; /** * 品类 */ private String category; }
[ "jingtao416@sina.com" ]
jingtao416@sina.com
7bba676ee1fec59fb22ec025b83a4a9f584cf3ea
16a976ef40fa7decb1837d0c58e789a158cb353b
/baselibrary/src/main/java/com/hyn/baselibrary/avc/core/BaseApplication.java
3bec0f95fc402efeb1c80bc6f124377bd057c946
[]
no_license
yananhuang0525/StudioFrame
b35d2962ba3b7e35969f344caa0908d4b7753598
3d019800255b50c073a163dbcd435d36fb6d1593
refs/heads/master
2021-01-01T05:13:28.640044
2017-04-07T03:39:56
2017-04-07T03:39:56
56,669,235
0
0
null
null
null
null
UTF-8
Java
false
false
3,317
java
package com.hyn.baselibrary.avc.core; import android.app.Application; import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.net.Uri; import android.os.Build; /** * author:admin on 2016/1/10 * mail:hyn_0525@sina.com */ public class BaseApplication extends Application { protected static Context _context; //上下文 protected static Resources _resource; //资源 private static boolean sIsAtLeastGB; /** * 调整信息(全局跳转参数定义) */ public static final String JUMP_INFO = "JUMP_INFO"; /** * 判断是否正常运行,如果为0,则为被回收过 */ public static int isRunning = 0; static { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { sIsAtLeastGB = true; } } /** * 初始化应用,父类什么也不干 */ public boolean init() { return true; } @Override public void onCreate() { super.onCreate(); if (_context == null) { //判断是否已经被初始化过 _context = getApplicationContext(); _resource = _context.getResources(); } // LeakCanary.install(this);//内存泄露展现工具 init(); registerUncaughtExceptionHandler(); } /** * 返回应用的主Scheme,继承应用可重写,这个是为了统一URI使用 * * @return */ protected String getPrimaryScheme() { return "qytxapp"; } /** * 根据应用的data来处理,目前data要符合XXX://intent * 注册的intent要符合隐式调用的规范,例如 * <activity * android:name="com.example.app016.SecondActivity"> * <intent-filter> * <action android:name="com.example.app016.SEND_EMAI"/> * <category android:name="android.intent.category.DEFAULT"/> * </intent-filter> * </activity> * * @param * @return */ // public Intent mapURI(Intent intent) { // // already specify a class, no need to map url // if (intent.getComponent() != null) // return intent; // //else if(intent.getAction()!=null) // // return intent; // else { // Uri uri = intent.getData(); // if (uri == null) // return intent; // else if (uri.getScheme() == null) // return intent; // else if (!(getPrimaryScheme().equalsIgnoreCase(uri.getScheme()))) // return intent; // else { // intent.setData(null); //这里是先不考虑外部URL拦截的情况 // String actionName = (uri.getHost() + uri.getPath()).replace("/", "."); //解决action android:name 字符问题 // intent.setAction(actionName); // return intent; // } // } // } public static synchronized BaseApplication context() { return (BaseApplication) _context; } public static Resources resources() { return _resource; } // 注册App异常崩溃处理器 private void registerUncaughtExceptionHandler() { Thread.setDefaultUncaughtExceptionHandler(AppException.getAppExceptionHandler()); } }
[ "hyn19910525+" ]
hyn19910525+
fede3e0f26958808234f5fc4e03dcbfabeb127f0
b907f692c0cdd412a6c0d1c947196e0ecd1747bb
/springboot/datasource/dynamic/src/main/java/alvin/study/springboot/ds/app/domain/service/common/BaseService.java
43e49cda934f39d8144323b3f2f644390d93b7f4
[]
no_license
alvin-qh/study-java
64af09464325ab9de09cde6ce6240cf8d3e1653d
63b9580f56575aa9d7b271756713a06c7e375c1a
refs/heads/master
2023-08-22T05:53:39.790527
2023-08-20T16:06:11
2023-08-20T16:06:11
150,560,041
1
0
null
null
null
null
UTF-8
Java
false
false
974
java
package alvin.study.springboot.ds.app.domain.service.common; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionStatus; /** * 所有服务类超类 */ public abstract class BaseService { // 注入事务管理器对象 @Autowired private PlatformTransactionManager tm; /** * 启动事务 * * @return 事务状态对象 */ protected TransactionStatus beginTransaction() { return tm.getTransaction(null); } /** * 提交事务 * * @param status 启动事务时获得的状态对象 */ protected void commit(TransactionStatus status) { tm.commit(status); } /** * 回滚事务 * * @param status 启动事务时获得的状态对象 */ protected void rollback(TransactionStatus status) { tm.rollback(status); } }
[ "quhao317@163.com" ]
quhao317@163.com
8b1156763025086a7a36211f7861be96e2101670
9b3f15e6b10c92dbd539b8141e4f8ac54e4ac032
/IMLib/build/generated/source/r/androidTest/debug/android/support/compat/R.java
7e6bb21c8d702ab0a6e27faa3b9e079c31fb9b92
[]
no_license
chenkexu/YiKu_New
a7175cbb70e8d1841e21e6e0f330772fee739649
006b17cc7b598a7d2571cf264204984bc236c355
refs/heads/master
2020-04-05T04:29:10.822466
2018-11-08T08:40:24
2018-11-08T08:40:24
156,553,433
0
0
null
null
null
null
UTF-8
Java
false
false
7,610
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package android.support.compat; public final class R { public static final class attr { public static final int font = 0x7f020000; public static final int fontProviderAuthority = 0x7f020001; public static final int fontProviderCerts = 0x7f020002; public static final int fontProviderFetchStrategy = 0x7f020003; public static final int fontProviderFetchTimeout = 0x7f020004; public static final int fontProviderPackage = 0x7f020005; public static final int fontProviderQuery = 0x7f020006; public static final int fontStyle = 0x7f020007; public static final int fontWeight = 0x7f020008; } public static final class bool { public static final int abc_action_bar_embed_tabs = 0x7f030000; } public static final class color { public static final int notification_action_color_filter = 0x7f040000; public static final int notification_icon_bg_color = 0x7f040001; public static final int ripple_material_light = 0x7f040002; public static final int secondary_text_default_material_light = 0x7f040003; } public static final class dimen { public static final int compat_button_inset_horizontal_material = 0x7f050000; public static final int compat_button_inset_vertical_material = 0x7f050001; public static final int compat_button_padding_horizontal_material = 0x7f050002; public static final int compat_button_padding_vertical_material = 0x7f050003; public static final int compat_control_corner_material = 0x7f050004; public static final int notification_action_icon_size = 0x7f050005; public static final int notification_action_text_size = 0x7f050006; public static final int notification_big_circle_margin = 0x7f050007; public static final int notification_content_margin_start = 0x7f050008; public static final int notification_large_icon_height = 0x7f050009; public static final int notification_large_icon_width = 0x7f05000a; public static final int notification_main_column_padding_top = 0x7f05000b; public static final int notification_media_narrow_margin = 0x7f05000c; public static final int notification_right_icon_size = 0x7f05000d; public static final int notification_right_side_padding_top = 0x7f05000e; public static final int notification_small_icon_background_padding = 0x7f05000f; public static final int notification_small_icon_size_as_large = 0x7f050010; public static final int notification_subtext_size = 0x7f050011; public static final int notification_top_pad = 0x7f050012; public static final int notification_top_pad_large_text = 0x7f050013; } public static final class drawable { public static final int notification_action_background = 0x7f060000; public static final int notification_bg = 0x7f060001; public static final int notification_bg_low = 0x7f060002; public static final int notification_bg_low_normal = 0x7f060003; public static final int notification_bg_low_pressed = 0x7f060004; public static final int notification_bg_normal = 0x7f060005; public static final int notification_bg_normal_pressed = 0x7f060006; public static final int notification_icon_background = 0x7f060007; public static final int notification_template_icon_bg = 0x7f060008; public static final int notification_template_icon_low_bg = 0x7f060009; public static final int notification_tile_bg = 0x7f06000a; public static final int notify_panel_notification_icon_bg = 0x7f06000b; } public static final class id { public static final int action_container = 0x7f070000; public static final int action_divider = 0x7f070001; public static final int action_image = 0x7f070002; public static final int action_text = 0x7f070003; public static final int actions = 0x7f070004; public static final int async = 0x7f070005; public static final int blocking = 0x7f070006; public static final int chronometer = 0x7f070007; public static final int forever = 0x7f070008; public static final int icon = 0x7f070009; public static final int icon_group = 0x7f07000a; public static final int info = 0x7f07000b; public static final int italic = 0x7f07000c; public static final int line1 = 0x7f07000d; public static final int line3 = 0x7f07000e; public static final int normal = 0x7f07000f; public static final int notification_background = 0x7f070010; public static final int notification_main_column = 0x7f070011; public static final int notification_main_column_container = 0x7f070012; public static final int right_icon = 0x7f070013; public static final int right_side = 0x7f070014; public static final int text = 0x7f070015; public static final int text2 = 0x7f070016; public static final int time = 0x7f070017; public static final int title = 0x7f070018; } public static final class integer { public static final int status_bar_notification_info_maxnum = 0x7f080003; } public static final class layout { public static final int notification_action = 0x7f090000; public static final int notification_action_tombstone = 0x7f090001; public static final int notification_template_custom_big = 0x7f090002; public static final int notification_template_icon_group = 0x7f090003; public static final int notification_template_part_chronometer = 0x7f090004; public static final int notification_template_part_time = 0x7f090005; } public static final class string { public static final int status_bar_notification_info_overflow = 0x7f0a0008; } public static final class style { public static final int TextAppearance_Compat_Notification = 0x7f0b0000; public static final int TextAppearance_Compat_Notification_Info = 0x7f0b0001; public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0b0002; public static final int TextAppearance_Compat_Notification_Time = 0x7f0b0003; public static final int TextAppearance_Compat_Notification_Title = 0x7f0b0004; public static final int Widget_Compat_NotificationActionContainer = 0x7f0b0005; public static final int Widget_Compat_NotificationActionText = 0x7f0b0006; } public static final class styleable { public static final int[] FontFamily = { 0x7f020001, 0x7f020002, 0x7f020003, 0x7f020004, 0x7f020005, 0x7f020006 }; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 1; public static final int FontFamily_fontProviderFetchStrategy = 2; public static final int FontFamily_fontProviderFetchTimeout = 3; public static final int FontFamily_fontProviderPackage = 4; public static final int FontFamily_fontProviderQuery = 5; public static final int[] FontFamilyFont = { 0x7f020000, 0x7f020007, 0x7f020008 }; public static final int FontFamilyFont_font = 0; public static final int FontFamilyFont_fontStyle = 1; public static final int FontFamilyFont_fontWeight = 2; } }
[ "953571793@qq.com" ]
953571793@qq.com
50fe2ac60237eb1e05520af0b1b4ac3c5403aab3
e55346ed4d5f87ef9a605fe22b3a63587d3d36c2
/shared/src/main/java/com/all/shared/util/UrnKeyGenerator.java
dd8a6dff96f2155455496ddd8b033bc5f98cd76d
[ "Apache-2.0" ]
permissive
josdem/client-control
31ba6a299b36cb0ceba9056f4eca1312a9adc9a9
bdeb27c56d976a57dcddef5fc4cd971be46b29d8
refs/heads/master
2020-05-03T17:31:25.648768
2012-06-22T16:25:15
2012-06-22T16:25:15
2,868,345
0
0
null
null
null
null
UTF-8
Java
false
false
12,713
java
/** Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2011 Eric Haddad Koenig 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.all.shared.util; import java.net.URI; import java.util.UUID; public class UrnKeyGenerator { // private static final Log log = LogFactory.getLog(UrnKeyGenerator.class); /** * This defines the URI scheme that we will be using to present IDs. * IDs are encoded for presentation into URIs (see * {@link <a href="http://www.ietf.org/rfc/rfc2396.txt">IETF RFC 2396 Uniform Resource Identifiers (URI) : Generic Syntax</a>} * ) as URNs (see * {@link <a href="http://www.ietf.org/rfc/rfc2141.txt">IETF RFC 2141 Uniform Resource Names (URN) Syntax</a>} * ). */ public static final String URIEncodingName = "urn"; /** * This defines the URN Namespace that we will be using to present IDs. * The namespace allows URN resolvers to determine which sub-resolver to use * to resolve URN references. All IDs are presented in this namespace. */ //TODO: Define this nameSpace public static final String URNNamespace = "all"; public static URI generateUrn(){ URI uri = URI.create(URIEncodingName + ":" + URNNamespace + ":uuid-" + UUID.randomUUID()); return uri; } }
[ "joseluis.delacruz@gmail.com" ]
joseluis.delacruz@gmail.com
8647806d8c6d2b2d9d7ebe5b1286f1660d599aa3
7e583b08291a389c295ecb0a5af8bfb35e96b098
/Boom/src/com/busted/boom/ConfirmationDialog.java
008e38d887dd48be4e4f45ffbf0b4f515942dbc5
[]
no_license
djhopper01/boom
9683e271d3ed01c5b56928f66d9daa96ce4333f2
3169991ebaef905e9fc3b6e382991288cdf1e278
refs/heads/master
2020-05-29T13:06:58.890652
2013-04-28T00:54:00
2013-04-28T00:54:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
617
java
package com.busted.boom; import android.app.Dialog; import android.content.Context; import android.view.View; import android.widget.Button; public class ConfirmationDialog extends Dialog { private Button mConfirmationClose; private Button mConfirmationCaption; public ConfirmationDialog(Context context) { super(context); this.setContentView(R.layout.confirmation_dialog); mConfirmationClose = (Button) findViewById(R.id.confirmation_close); mConfirmationClose.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); } }
[ "hopper.derek@gmail.com" ]
hopper.derek@gmail.com
0c7f8d825fb7d3ded7a73ee2d39640e7422855eb
2b76b27c893be5a1cfc5eb1c0f70a101219e3467
/afx6/src/main/java/com/alcatelsbell/nms/alarm/api/AlarmEventFilter.java
62ec0604ce6b5aae582c70c79afa8f9b33a4b4f4
[]
no_license
puppyriver/message6
8d575d97907c42ecc2c2a397db132a97b36c6c4d
625e6e22b4130cf0036cfe3ad1c5a0ac82c8b762
refs/heads/master
2021-05-03T22:31:18.003057
2017-01-24T13:21:26
2017-01-24T13:21:26
71,609,051
0
0
null
null
null
null
UTF-8
Java
false
false
462
java
package com.alcatelsbell.nms.alarm.api; import java.util.Hashtable; import java.util.Map; import com.alcatelsbell.nms.alarm.service.timefilter.AlarmEventProducer; import com.alcatelsbell.nms.valueobject.alarm.Alarminformation; /** * @author:LiXiaoBing * @date:2011-7-20 * @time:上午09:56:09 */ public interface AlarmEventFilter { public void alarmFilterProcessor(Alarminformation alarmInfo, AlarmEventProducer alarmEventProducer, Map vendorMap); }
[ "4278246@qq.com" ]
4278246@qq.com
b2bf2877ae4b958307a00ca763179bd511fb6ec6
8a6453cd49949798c11f57462d3f64a1fa2fc441
/aws-java-sdk-amplify/src/main/java/com/amazonaws/services/amplify/model/Step.java
d382f09d945fbcef31c126c9e8bdaa9c7cdc64eb
[ "Apache-2.0" ]
permissive
tedyu/aws-sdk-java
138837a2be45ecb73c14c0d1b5b021e7470520e1
c97c472fd66d7fc8982cb4cf3c4ae78de590cfe8
refs/heads/master
2020-04-14T14:17:28.985045
2019-01-02T21:46:53
2019-01-02T21:46:53
163,892,339
0
0
Apache-2.0
2019-01-02T21:38:39
2019-01-02T21:38:39
null
UTF-8
Java
false
false
13,713
java
/* * Copyright 2013-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.amplify.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** * <p> * Structure for an execution step for an execution job, for an Amplify App. * </p> * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/Step" target="_top">AWS API Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Step implements Serializable, Cloneable, StructuredPojo { /** * <p> * Name of the execution step. * </p> */ private String stepName; /** * <p> * Start date/ time of the execution step. * </p> */ private java.util.Date startTime; /** * <p> * Status of the execution step. * </p> */ private String status; /** * <p> * End date/ time of the execution step. * </p> */ private java.util.Date endTime; /** * <p> * Url to the logs for the execution step. * </p> */ private String logUrl; /** * <p> * Url to teh artifact for the execution step. * </p> */ private String artifactsUrl; /** * <p> * List of screenshot Urls for the execution step, if relevant. * </p> */ private java.util.Map<String, String> screenshots; /** * <p> * Name of the execution step. * </p> * * @param stepName * Name of the execution step. */ public void setStepName(String stepName) { this.stepName = stepName; } /** * <p> * Name of the execution step. * </p> * * @return Name of the execution step. */ public String getStepName() { return this.stepName; } /** * <p> * Name of the execution step. * </p> * * @param stepName * Name of the execution step. * @return Returns a reference to this object so that method calls can be chained together. */ public Step withStepName(String stepName) { setStepName(stepName); return this; } /** * <p> * Start date/ time of the execution step. * </p> * * @param startTime * Start date/ time of the execution step. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** * <p> * Start date/ time of the execution step. * </p> * * @return Start date/ time of the execution step. */ public java.util.Date getStartTime() { return this.startTime; } /** * <p> * Start date/ time of the execution step. * </p> * * @param startTime * Start date/ time of the execution step. * @return Returns a reference to this object so that method calls can be chained together. */ public Step withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** * <p> * Status of the execution step. * </p> * * @param status * Status of the execution step. * @see JobStatus */ public void setStatus(String status) { this.status = status; } /** * <p> * Status of the execution step. * </p> * * @return Status of the execution step. * @see JobStatus */ public String getStatus() { return this.status; } /** * <p> * Status of the execution step. * </p> * * @param status * Status of the execution step. * @return Returns a reference to this object so that method calls can be chained together. * @see JobStatus */ public Step withStatus(String status) { setStatus(status); return this; } /** * <p> * Status of the execution step. * </p> * * @param status * Status of the execution step. * @return Returns a reference to this object so that method calls can be chained together. * @see JobStatus */ public Step withStatus(JobStatus status) { this.status = status.toString(); return this; } /** * <p> * End date/ time of the execution step. * </p> * * @param endTime * End date/ time of the execution step. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** * <p> * End date/ time of the execution step. * </p> * * @return End date/ time of the execution step. */ public java.util.Date getEndTime() { return this.endTime; } /** * <p> * End date/ time of the execution step. * </p> * * @param endTime * End date/ time of the execution step. * @return Returns a reference to this object so that method calls can be chained together. */ public Step withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** * <p> * Url to the logs for the execution step. * </p> * * @param logUrl * Url to the logs for the execution step. */ public void setLogUrl(String logUrl) { this.logUrl = logUrl; } /** * <p> * Url to the logs for the execution step. * </p> * * @return Url to the logs for the execution step. */ public String getLogUrl() { return this.logUrl; } /** * <p> * Url to the logs for the execution step. * </p> * * @param logUrl * Url to the logs for the execution step. * @return Returns a reference to this object so that method calls can be chained together. */ public Step withLogUrl(String logUrl) { setLogUrl(logUrl); return this; } /** * <p> * Url to teh artifact for the execution step. * </p> * * @param artifactsUrl * Url to teh artifact for the execution step. */ public void setArtifactsUrl(String artifactsUrl) { this.artifactsUrl = artifactsUrl; } /** * <p> * Url to teh artifact for the execution step. * </p> * * @return Url to teh artifact for the execution step. */ public String getArtifactsUrl() { return this.artifactsUrl; } /** * <p> * Url to teh artifact for the execution step. * </p> * * @param artifactsUrl * Url to teh artifact for the execution step. * @return Returns a reference to this object so that method calls can be chained together. */ public Step withArtifactsUrl(String artifactsUrl) { setArtifactsUrl(artifactsUrl); return this; } /** * <p> * List of screenshot Urls for the execution step, if relevant. * </p> * * @return List of screenshot Urls for the execution step, if relevant. */ public java.util.Map<String, String> getScreenshots() { return screenshots; } /** * <p> * List of screenshot Urls for the execution step, if relevant. * </p> * * @param screenshots * List of screenshot Urls for the execution step, if relevant. */ public void setScreenshots(java.util.Map<String, String> screenshots) { this.screenshots = screenshots; } /** * <p> * List of screenshot Urls for the execution step, if relevant. * </p> * * @param screenshots * List of screenshot Urls for the execution step, if relevant. * @return Returns a reference to this object so that method calls can be chained together. */ public Step withScreenshots(java.util.Map<String, String> screenshots) { setScreenshots(screenshots); return this; } public Step addScreenshotsEntry(String key, String value) { if (null == this.screenshots) { this.screenshots = new java.util.HashMap<String, String>(); } if (this.screenshots.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.screenshots.put(key, value); return this; } /** * Removes all the entries added into Screenshots. * * @return Returns a reference to this object so that method calls can be chained together. */ public Step clearScreenshotsEntries() { this.screenshots = null; return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getStepName() != null) sb.append("StepName: ").append(getStepName()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getLogUrl() != null) sb.append("LogUrl: ").append(getLogUrl()).append(","); if (getArtifactsUrl() != null) sb.append("ArtifactsUrl: ").append(getArtifactsUrl()).append(","); if (getScreenshots() != null) sb.append("Screenshots: ").append(getScreenshots()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Step == false) return false; Step other = (Step) obj; if (other.getStepName() == null ^ this.getStepName() == null) return false; if (other.getStepName() != null && other.getStepName().equals(this.getStepName()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) return false; if (other.getLogUrl() == null ^ this.getLogUrl() == null) return false; if (other.getLogUrl() != null && other.getLogUrl().equals(this.getLogUrl()) == false) return false; if (other.getArtifactsUrl() == null ^ this.getArtifactsUrl() == null) return false; if (other.getArtifactsUrl() != null && other.getArtifactsUrl().equals(this.getArtifactsUrl()) == false) return false; if (other.getScreenshots() == null ^ this.getScreenshots() == null) return false; if (other.getScreenshots() != null && other.getScreenshots().equals(this.getScreenshots()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStepName() == null) ? 0 : getStepName().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getLogUrl() == null) ? 0 : getLogUrl().hashCode()); hashCode = prime * hashCode + ((getArtifactsUrl() == null) ? 0 : getArtifactsUrl().hashCode()); hashCode = prime * hashCode + ((getScreenshots() == null) ? 0 : getScreenshots().hashCode()); return hashCode; } @Override public Step clone() { try { return (Step) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.amplify.model.transform.StepMarshaller.getInstance().marshall(this, protocolMarshaller); } }
[ "" ]
f222780f107872a6d86a04b85b7fd5766aa21eab
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/1/org/apache/commons/math3/optim/AbstractOptimizer_getConvergenceChecker_145.java
2d78e8c512d1f9de5c6bbcf7293647730b865efc
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
753
java
org apach common math3 optim base implement optim boiler plate code count number evalu object function number iter algorithm store converg checker param pair type point pair return optim algorithm param optim type subclass paramet implement fluent api method upper level hierarchi fluent api requir actual type subclass return version abstract optim abstractoptim pair optim abstract optim abstractoptim pair optim converg checker object check converg converg checker convergencecheck pair converg checker getconvergencecheck checker
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
8295e06df61b13e58c181ea92d0549d47131f655
ff35f65e8c144cebe6e0bedaf28b2e2f2bdcb572
/app/src/main/java/com/example/myapplication1/response/Bounds.java
2a40efa9e782638c761811c5e641b46b8a5950e6
[]
no_license
erikahandayan1/UAS_ERIKA
ae286adadab59618b182e7c9159cad021b00fe39
07e114cca8359e7dbd95bca2deda4db011ab9405
refs/heads/master
2020-11-23T20:13:12.299266
2019-12-13T09:48:16
2019-12-13T09:48:16
227,795,471
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
package com.example.myapplication1.response; import com.google.gson.annotations.SerializedName; public class Bounds{ @SerializedName("southwest") private Southwest southwest; @SerializedName("northeast") private Northeast northeast; public void setSouthwest(Southwest southwest){ this.southwest = southwest; } public Southwest getSouthwest(){ return southwest; } public void setNortheast(Northeast northeast){ this.northeast = northeast; } public Northeast getNortheast(){ return northeast; } @Override public String toString(){ return "Bounds{" + "southwest = '" + southwest + '\'' + ",northeast = '" + northeast + '\'' + "}"; } }
[ "erikahandayani23@gmail.com" ]
erikahandayani23@gmail.com
81a82186748e4f7527a68035755419d8989ba015
3bb69cde42b2cf4f609c0ff09e02bebcb617230b
/baselibrary/src/main/java/rjw/net/baselibrary/widget/LRecyclerView/SuperViewHolder.java
bb5637fcf26e73c43d116ac2ba9ef07aa790a952
[]
no_license
2271115220/im_android
014295c6d17bb228485627be422f17fc0878b5ab
930f8f19765d6dfd7bf6d7e16330cc8e400b72e5
refs/heads/master
2022-12-10T19:40:10.574479
2020-09-02T09:33:25
2020-09-02T09:33:25
292,235,567
0
0
null
null
null
null
UTF-8
Java
false
false
695
java
package rjw.net.baselibrary.widget.LRecyclerView; import android.util.SparseArray; import android.view.View; import androidx.recyclerview.widget.RecyclerView; /** * ViewHolder基类 */ public class SuperViewHolder extends RecyclerView.ViewHolder { private SparseArray<View> views; public SuperViewHolder(View itemView) { super(itemView); this.views = new SparseArray<>(); } @SuppressWarnings("unchecked") public <T extends View> T getView(int viewId) { View view = views.get(viewId); if (view == null) { view = itemView.findViewById(viewId); views.put(viewId, view); } return (T) view; } }
[ "3179107497@qq.com" ]
3179107497@qq.com
1a7cf476aa4caa537ae0c83337ba4f0869d6ef8e
b111b77f2729c030ce78096ea2273691b9b63749
/db-example-large-multi-project/project3/src/test/java/org/gradle/test/performance/mediumjavamultiproject/project3/p15/Test309.java
746c3a16dbc9eb0bcf54562309caf1822a28b511
[]
no_license
WeilerWebServices/Gradle
a1a55bdb0dd39240787adf9241289e52f593ccc1
6ab6192439f891256a10d9b60f3073cab110b2be
refs/heads/master
2023-01-19T16:48:09.415529
2020-11-28T13:28:40
2020-11-28T13:28:40
256,249,773
1
0
null
null
null
null
UTF-8
Java
false
false
2,551
java
package org.gradle.test.performance.mediumjavamultiproject.project3.p15; import org.junit.Test; import static org.junit.Assert.*; public class Test309 { Production309 objectUnderTest = new Production309(); @Test public void testProperty0() throws Exception { String value = "value"; objectUnderTest.setProperty0(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty0()); } @Test public void testProperty1() throws Exception { String value = "value"; objectUnderTest.setProperty1(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty1()); } @Test public void testProperty2() throws Exception { String value = "value"; objectUnderTest.setProperty2(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty2()); } @Test public void testProperty3() throws Exception { String value = "value"; objectUnderTest.setProperty3(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty3()); } @Test public void testProperty4() throws Exception { String value = "value"; objectUnderTest.setProperty4(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty4()); } @Test public void testProperty5() throws Exception { String value = "value"; objectUnderTest.setProperty5(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty5()); } @Test public void testProperty6() throws Exception { String value = "value"; objectUnderTest.setProperty6(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty6()); } @Test public void testProperty7() throws Exception { String value = "value"; objectUnderTest.setProperty7(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty7()); } @Test public void testProperty8() throws Exception { String value = "value"; objectUnderTest.setProperty8(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty8()); } @Test public void testProperty9() throws Exception { String value = "value"; objectUnderTest.setProperty9(value); Thread.sleep(250); assertEquals(value, objectUnderTest.getProperty9()); } }
[ "nateweiler84@gmail.com" ]
nateweiler84@gmail.com
98c535c8b8be46f2e24c4d06ceff305736a34f5c
154cc2163d0e39bf4e7565a905960ab6ab10a6b4
/gosu-core/src/main/java/gw/internal/gosu/parser/ThisConstructorFunctionSymbol.java
6d6308883a350eaafd6a7b6e337f03f14c2c7bf0
[]
no_license
ddebowczyk/gosu
f5b6b0c9cd57be91ca745f70053d12a0030251a3
5c404f0ec542f1e46e03ce20e560224fce00a9f1
refs/heads/master
2021-01-21T00:59:35.901310
2012-12-05T17:44:28
2012-12-05T17:44:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,246
java
/* * Copyright 2012. Guidewire Software, Inc. */ package gw.internal.gosu.parser; import gw.internal.gosu.parser.statements.MethodCallStatement; import gw.lang.parser.IConstructorFunctionSymbol; import gw.lang.parser.IReducedDynamicFunctionSymbol; import gw.lang.parser.ISymbol; import gw.lang.parser.Keyword; import gw.lang.reflect.IConstructorInfo; public class ThisConstructorFunctionSymbol extends DynamicFunctionSymbol implements IConstructorFunctionSymbol { private DynamicFunctionSymbol _dfsDelegate; public ThisConstructorFunctionSymbol( DynamicFunctionSymbol dfsDelegate ) { super( dfsDelegate ); _dfsDelegate = dfsDelegate; setCaseInsensitiveName( getSignatureName( getDisplayName() ) ); } public ISymbol getLightWeightReference() { return this; } public String getDisplayName() { return Keyword.KW_this.toString(); } public MethodCallStatement getInitializer() { return _dfsDelegate.getInitializer(); } @Override public IConstructorInfo getConstructorInfo() { return (IConstructorInfo) _dfsDelegate.getMethodOrConstructorInfo(); } public IReducedDynamicFunctionSymbol createReducedSymbol() { return new ReducedThisConstructorFunctionSymbol(this); } }
[ "smckinney@guidewire.com" ]
smckinney@guidewire.com
77498b1fea161cd355daa8f98928bbf331c1a278
2a2e0d028f2136fcb2b057354b882c54b770bac6
/rxjava/src/main/java/custom/reactivex/subscribers/ResourceSubscriber.java
48391c4fdb379b9469f59fade1575adf1cd2e0ff
[]
no_license
tarek360/custom-rxjava
c2d9b04261cfa4a8f7d6ae1626122c783d833512
3a63e38ec1aa8dfa971d238d1f0ac10027c344e7
refs/heads/master
2021-01-11T14:28:58.414287
2017-02-09T11:36:28
2017-02-09T11:36:28
81,441,994
0
0
null
null
null
null
UTF-8
Java
false
false
3,833
java
/** * Copyright 2016 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See * the License for the specific language governing permissions and limitations under the License. */ package custom.reactivex.subscribers; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; import custom.reactivex.disposables.Disposable; import custom.reactivex.internal.disposables.ListCompositeDisposable; import custom.reactivex.internal.functions.ObjectHelper; import custom.reactivex.internal.subscriptions.SubscriptionHelper; /** * An abstract Subscriber that allows asynchronous cancellation of its subscription and associated resources. * * <p>This implementation let's you chose if the AsyncObserver manages resources or not, * thus saving memory on cases where there is no need for that. * * <p>All pre-implemented final methods are thread-safe. * * @param <T> the value type */ public abstract class ResourceSubscriber<T> implements Subscriber<T>, Disposable { /** The active subscription. */ private final AtomicReference<Subscription> s = new AtomicReference<Subscription>(); /** The resource composite, can never be null. */ private final ListCompositeDisposable resources = new ListCompositeDisposable(); /** Remembers the request(n) counts until a subscription arrives. */ private final AtomicLong missedRequested = new AtomicLong(); /** * Adds a resource to this AsyncObserver. * * @param resource the resource to add * * @throws NullPointerException if resource is null */ public final void add(Disposable resource) { ObjectHelper.requireNonNull(resource, "resource is null"); resources.add(resource); } @Override public final void onSubscribe(Subscription s) { if (SubscriptionHelper.deferredSetOnce(this.s, missedRequested, s)) { onStart(); } } /** * Called once the upstream sets a Subscription on this AsyncObserver. * * <p>You can perform initialization at this moment. The default * implementation requests Long.MAX_VALUE from upstream. */ protected void onStart() { request(Long.MAX_VALUE); } /** * Request the specified amount of elements from upstream. * * <p>This method can be called before the upstream calls onSubscribe(). * When the subscription happens, all missed requests are requested. * * @param n the request amount, must be positive */ protected final void request(long n) { SubscriptionHelper.deferredRequest(s, missedRequested, n); } /** * Cancels the subscription (if any) and disposes the resources associated with * this AsyncObserver (if any). * * <p>This method can be called before the upstream calls onSubscribe at which * case the Subscription will be immediately cancelled. */ @Override public final void dispose() { if (SubscriptionHelper.cancel(s)) { resources.dispose(); } } /** * Returns true if this AsyncObserver has been disposed/cancelled. * @return true if this AsyncObserver has been disposed/cancelled */ @Override public final boolean isDisposed() { return SubscriptionHelper.isCancelled(s.get()); } }
[ "ahmed.tarek@code95.com" ]
ahmed.tarek@code95.com
1fd2e84eeefafe6fdfea318fef2f9a59c5bb4330
78750bbbcfaeb8a5d914619d872f118602e75d5c
/droidium-native/arquillian-droidium-native/src/main/java/org/arquillian/droidium/native_/activity/NotUniqueWebDriverInstanceException.java
5b5f7344f61ebeaf34196eb0d66e473732abc5fb
[]
no_license
kpiwko/arquillian-droidium
3bb8ad2d28dc6ca789f46c5e124d7e15385feb39
2157933f811d5c7d9972d97b9f9b4b30658c350f
refs/heads/master
2021-01-15T16:15:04.074037
2014-03-28T09:52:23
2014-03-28T09:56:48
11,498,269
0
0
null
null
null
null
UTF-8
Java
false
false
1,799
java
/* * JBoss, Home of Professional Open Source * Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual * contributors by the @authors tag. See the copyright.txt in the * distribution for a full listing of individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.arquillian.droidium.native_.activity; /** * Thrown in case there are found two WebDriver instances for a simple class name. FQDN of classes can differ but their simple * name do not have to so we do not know what instance of WebDriver user wants to use. * * @author <a href="mailto:smikloso@redhat.com">Stefan Miklosovic</a> * */ public class NotUniqueWebDriverInstanceException extends RuntimeException { private static final long serialVersionUID = 5366362067032226785L; public NotUniqueWebDriverInstanceException() { } /** * @param message */ public NotUniqueWebDriverInstanceException(String message) { super(message); } /** * @param cause */ public NotUniqueWebDriverInstanceException(Throwable cause) { super(cause); } /** * @param message * @param cause */ public NotUniqueWebDriverInstanceException(String message, Throwable cause) { super(message, cause); } }
[ "smikloso@redhat.com" ]
smikloso@redhat.com
65aecfebb8a19a5b9e831e0d7d8aa14ae5372bb1
901d5517d522699adc2ee7345ba620093a172258
/src/main/java/de/blackcraze/grb/model/AbstractNamed.java
591d6a55afe04166c17740b5ce73f6bd59d31b78
[ "MIT" ]
permissive
BlackCraze/GameResourceBot
d33d7b9af6c6c7442a6a4c2be074d5b39acc750c
ce35b122fe6d8d3db6f54f03d862631399e4d30a
refs/heads/master
2022-09-27T17:28:24.250177
2020-11-03T00:33:09
2020-11-03T00:33:09
100,693,074
10
33
MIT
2022-09-22T17:55:14
2017-08-18T08:53:52
Java
UTF-8
Java
false
false
425
java
package de.blackcraze.grb.model; import javax.persistence.Column; import javax.persistence.MappedSuperclass; @MappedSuperclass public abstract class AbstractNamed extends AbstractUpdatable { private static final long serialVersionUID = 4608310922013562750L; @Column(nullable = false) String name; public String getName() { return name; } public void setName(String name) { this.name = name; update(); } }
[ "steve@thomszen.de" ]
steve@thomszen.de
fba609e9e6000e870b1eb60ad8f256cdcb6b8fcc
a770e95028afb71f3b161d43648c347642819740
/sources/org/telegram/messenger/ForwardingMessagesParams.java
ca3ff14587fc17e13a4d00db209871c03ebeda7c
[]
no_license
Edicksonjga/TGDecompiledBeta
d7aa48a2b39bbaefd4752299620ff7b72b515c83
d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b
refs/heads/master
2023-08-25T04:12:15.592281
2021-10-28T20:24:07
2021-10-28T20:24:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
14,796
java
package org.telegram.messenger; import android.util.LongSparseArray; import android.util.SparseBooleanArray; import java.util.ArrayList; import org.telegram.messenger.MessageObject; import org.telegram.tgnet.TLRPC$TL_messageMediaPoll; import org.telegram.tgnet.TLRPC$TL_pollAnswerVoters; public class ForwardingMessagesParams { public LongSparseArray<MessageObject.GroupedMessages> groupedMessagesMap = new LongSparseArray<>(); public boolean hasCaption; public boolean hasSenders; public boolean hideCaption; public boolean hideForwardSendersName; public boolean isSecret; public ArrayList<MessageObject> messages; public boolean multiplyUsers; public ArrayList<TLRPC$TL_pollAnswerVoters> pollChoosenAnswers = new ArrayList<>(); public ArrayList<MessageObject> previewMessages = new ArrayList<>(); public SparseBooleanArray selectedIds = new SparseBooleanArray(); public boolean willSeeSenders; /* JADX WARNING: Removed duplicated region for block: B:33:0x00f7 */ /* JADX WARNING: Removed duplicated region for block: B:36:0x011d */ /* JADX WARNING: Removed duplicated region for block: B:42:0x014b */ /* JADX WARNING: Removed duplicated region for block: B:80:0x01c0 A[SYNTHETIC] */ /* Code decompiled incorrectly, please refer to instructions dump. */ public ForwardingMessagesParams(java.util.ArrayList<org.telegram.messenger.MessageObject> r20, long r21) { /* r19 = this; r6 = r19 r7 = r20 r19.<init>() android.util.LongSparseArray r0 = new android.util.LongSparseArray r0.<init>() r6.groupedMessagesMap = r0 java.util.ArrayList r0 = new java.util.ArrayList r0.<init>() r6.previewMessages = r0 android.util.SparseBooleanArray r0 = new android.util.SparseBooleanArray r0.<init>() r6.selectedIds = r0 java.util.ArrayList r0 = new java.util.ArrayList r0.<init>() r6.pollChoosenAnswers = r0 r6.messages = r7 r8 = 0 r6.hasCaption = r8 r6.hasSenders = r8 boolean r0 = org.telegram.messenger.DialogObject.isEncryptedDialog(r21) r6.isSecret = r0 java.util.ArrayList r9 = new java.util.ArrayList r9.<init>() r10 = 0 L_0x0036: int r0 = r20.size() r11 = 1 if (r10 >= r0) goto L_0x01c7 java.lang.Object r0 = r7.get(r10) r12 = r0 org.telegram.messenger.MessageObject r12 = (org.telegram.messenger.MessageObject) r12 java.lang.CharSequence r0 = r12.caption boolean r0 = android.text.TextUtils.isEmpty(r0) if (r0 != 0) goto L_0x004e r6.hasCaption = r11 L_0x004e: android.util.SparseBooleanArray r0 = r6.selectedIds int r1 = r12.getId() r0.put(r1, r11) org.telegram.tgnet.TLRPC$TL_message r3 = new org.telegram.tgnet.TLRPC$TL_message r3.<init>() org.telegram.tgnet.TLRPC$Message r0 = r12.messageOwner int r1 = r0.id r3.id = r1 long r1 = r0.grouped_id r3.grouped_id = r1 org.telegram.tgnet.TLRPC$Peer r1 = r0.peer_id r3.peer_id = r1 org.telegram.tgnet.TLRPC$Peer r1 = r0.from_id r3.from_id = r1 java.lang.String r1 = r0.message r3.message = r1 org.telegram.tgnet.TLRPC$MessageMedia r1 = r0.media r3.media = r1 org.telegram.tgnet.TLRPC$MessageAction r1 = r0.action r3.action = r1 r3.edit_date = r8 r3.out = r11 r3.unread = r8 long r1 = r0.via_bot_id r3.via_bot_id = r1 org.telegram.tgnet.TLRPC$ReplyMarkup r1 = r0.reply_markup r3.reply_markup = r1 boolean r1 = r0.post r3.post = r1 boolean r1 = r0.legacy r3.legacy = r1 java.util.ArrayList<org.telegram.tgnet.TLRPC$TL_restrictionReason> r0 = r0.restriction_reason r3.restriction_reason = r0 int r0 = r12.currentAccount org.telegram.messenger.UserConfig r0 = org.telegram.messenger.UserConfig.getInstance(r0) long r0 = r0.clientUserId boolean r2 = r6.isSecret r13 = 0 if (r2 != 0) goto L_0x00f2 org.telegram.tgnet.TLRPC$Message r2 = r12.messageOwner org.telegram.tgnet.TLRPC$MessageFwdHeader r4 = r2.fwd_from if (r4 == 0) goto L_0x00c7 boolean r0 = r12.isDice() if (r0 != 0) goto L_0x00b1 r6.hasSenders = r11 goto L_0x00b3 L_0x00b1: r6.willSeeSenders = r11 L_0x00b3: org.telegram.tgnet.TLRPC$Peer r0 = r4.from_id if (r0 != 0) goto L_0x00c4 java.lang.String r0 = r4.from_name boolean r0 = r9.contains(r0) if (r0 != 0) goto L_0x00c4 java.lang.String r0 = r4.from_name r9.add(r0) L_0x00c4: r17 = r9 goto L_0x00f5 L_0x00c7: org.telegram.tgnet.TLRPC$Peer r4 = r2.from_id long r4 = r4.user_id int r16 = (r4 > r13 ? 1 : (r4 == r13 ? 0 : -1)) r17 = r9 if (r16 == 0) goto L_0x00db long r8 = r2.dialog_id int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1)) if (r2 != 0) goto L_0x00db int r2 = (r4 > r0 ? 1 : (r4 == r0 ? 0 : -1)) if (r2 == 0) goto L_0x00f4 L_0x00db: org.telegram.tgnet.TLRPC$TL_messageFwdHeader r4 = new org.telegram.tgnet.TLRPC$TL_messageFwdHeader r4.<init>() org.telegram.tgnet.TLRPC$Message r0 = r12.messageOwner org.telegram.tgnet.TLRPC$Peer r0 = r0.from_id r4.from_id = r0 boolean r0 = r12.isDice() if (r0 != 0) goto L_0x00ef r6.hasSenders = r11 goto L_0x00f5 L_0x00ef: r6.willSeeSenders = r11 goto L_0x00f5 L_0x00f2: r17 = r9 L_0x00f4: r4 = 0 L_0x00f5: if (r4 == 0) goto L_0x00ff r3.fwd_from = r4 int r0 = r3.flags r0 = r0 | 4 r3.flags = r0 L_0x00ff: r8 = r21 r3.dialog_id = r8 org.telegram.messenger.ForwardingMessagesParams$1 r5 = new org.telegram.messenger.ForwardingMessagesParams$1 int r2 = r12.currentAccount r4 = 1 r18 = 0 r0 = r5 r1 = r19 r15 = r5 r5 = r18 r0.<init>(r2, r3, r4, r5) r15.preview = r11 long r0 = r15.getGroupId() int r2 = (r0 > r13 ? 1 : (r0 == r13 ? 0 : -1)) if (r2 == 0) goto L_0x013f android.util.LongSparseArray<org.telegram.messenger.MessageObject$GroupedMessages> r0 = r6.groupedMessagesMap long r1 = r15.getGroupId() r3 = 0 java.lang.Object r0 = r0.get(r1, r3) org.telegram.messenger.MessageObject$GroupedMessages r0 = (org.telegram.messenger.MessageObject.GroupedMessages) r0 if (r0 != 0) goto L_0x013a org.telegram.messenger.MessageObject$GroupedMessages r0 = new org.telegram.messenger.MessageObject$GroupedMessages r0.<init>() android.util.LongSparseArray<org.telegram.messenger.MessageObject$GroupedMessages> r1 = r6.groupedMessagesMap long r2 = r15.getGroupId() r1.put(r2, r0) L_0x013a: java.util.ArrayList<org.telegram.messenger.MessageObject> r0 = r0.messages r0.add(r15) L_0x013f: java.util.ArrayList<org.telegram.messenger.MessageObject> r0 = r6.previewMessages r1 = 0 r0.add(r1, r15) boolean r0 = r12.isPoll() if (r0 == 0) goto L_0x01c0 org.telegram.tgnet.TLRPC$Message r0 = r12.messageOwner org.telegram.tgnet.TLRPC$MessageMedia r0 = r0.media org.telegram.tgnet.TLRPC$TL_messageMediaPoll r0 = (org.telegram.tgnet.TLRPC$TL_messageMediaPoll) r0 org.telegram.messenger.ForwardingMessagesParams$PreviewMediaPoll r2 = new org.telegram.messenger.ForwardingMessagesParams$PreviewMediaPoll r2.<init>() org.telegram.tgnet.TLRPC$Poll r3 = r0.poll r2.poll = r3 java.lang.String r3 = r0.provider r2.provider = r3 org.telegram.tgnet.TLRPC$TL_pollResults r3 = new org.telegram.tgnet.TLRPC$TL_pollResults r3.<init>() r2.results = r3 org.telegram.tgnet.TLRPC$PollResults r4 = r0.results int r4 = r4.total_voters r3.total_voters = r4 r2.totalVotersCached = r4 org.telegram.tgnet.TLRPC$Message r3 = r15.messageOwner r3.media = r2 boolean r3 = r12.canUnvote() if (r3 == 0) goto L_0x01c0 org.telegram.tgnet.TLRPC$PollResults r3 = r0.results java.util.ArrayList<org.telegram.tgnet.TLRPC$TL_pollAnswerVoters> r3 = r3.results int r3 = r3.size() r4 = 0 L_0x0180: if (r4 >= r3) goto L_0x01c0 org.telegram.tgnet.TLRPC$PollResults r5 = r0.results java.util.ArrayList<org.telegram.tgnet.TLRPC$TL_pollAnswerVoters> r5 = r5.results java.lang.Object r5 = r5.get(r4) org.telegram.tgnet.TLRPC$TL_pollAnswerVoters r5 = (org.telegram.tgnet.TLRPC$TL_pollAnswerVoters) r5 boolean r11 = r5.chosen if (r11 == 0) goto L_0x01b6 org.telegram.tgnet.TLRPC$TL_pollAnswerVoters r11 = new org.telegram.tgnet.TLRPC$TL_pollAnswerVoters r11.<init>() boolean r12 = r5.chosen r11.chosen = r12 boolean r12 = r5.correct r11.correct = r12 int r12 = r5.flags r11.flags = r12 byte[] r12 = r5.option r11.option = r12 int r5 = r5.voters r11.voters = r5 java.util.ArrayList<org.telegram.tgnet.TLRPC$TL_pollAnswerVoters> r5 = r6.pollChoosenAnswers r5.add(r11) org.telegram.tgnet.TLRPC$PollResults r5 = r2.results java.util.ArrayList<org.telegram.tgnet.TLRPC$TL_pollAnswerVoters> r5 = r5.results r5.add(r11) goto L_0x01bd L_0x01b6: org.telegram.tgnet.TLRPC$PollResults r11 = r2.results java.util.ArrayList<org.telegram.tgnet.TLRPC$TL_pollAnswerVoters> r11 = r11.results r11.add(r5) L_0x01bd: int r4 = r4 + 1 goto L_0x0180 L_0x01c0: int r10 = r10 + 1 r9 = r17 r8 = 0 goto L_0x0036 L_0x01c7: r17 = r9 r1 = 0 java.util.ArrayList r0 = new java.util.ArrayList r0.<init>() r2 = 0 L_0x01d0: int r3 = r20.size() if (r2 >= r3) goto L_0x0231 java.lang.Object r3 = r7.get(r2) org.telegram.messenger.MessageObject r3 = (org.telegram.messenger.MessageObject) r3 boolean r4 = r3.isFromUser() if (r4 == 0) goto L_0x01e9 org.telegram.tgnet.TLRPC$Message r3 = r3.messageOwner org.telegram.tgnet.TLRPC$Peer r3 = r3.from_id long r3 = r3.user_id goto L_0x021d L_0x01e9: int r4 = r3.currentAccount org.telegram.messenger.MessagesController r4 = org.telegram.messenger.MessagesController.getInstance(r4) org.telegram.tgnet.TLRPC$Message r5 = r3.messageOwner org.telegram.tgnet.TLRPC$Peer r5 = r5.peer_id long r8 = r5.channel_id java.lang.Long r5 = java.lang.Long.valueOf(r8) org.telegram.tgnet.TLRPC$Chat r4 = r4.getChat(r5) boolean r5 = org.telegram.messenger.ChatObject.isChannel(r4) if (r5 == 0) goto L_0x0216 boolean r4 = r4.megagroup if (r4 == 0) goto L_0x0216 boolean r4 = r3.isForwardedChannelPost() if (r4 == 0) goto L_0x0216 org.telegram.tgnet.TLRPC$Message r3 = r3.messageOwner org.telegram.tgnet.TLRPC$MessageFwdHeader r3 = r3.fwd_from org.telegram.tgnet.TLRPC$Peer r3 = r3.from_id long r3 = r3.channel_id goto L_0x021c L_0x0216: org.telegram.tgnet.TLRPC$Message r3 = r3.messageOwner org.telegram.tgnet.TLRPC$Peer r3 = r3.peer_id long r3 = r3.channel_id L_0x021c: long r3 = -r3 L_0x021d: java.lang.Long r5 = java.lang.Long.valueOf(r3) boolean r5 = r0.contains(r5) if (r5 != 0) goto L_0x022e java.lang.Long r3 = java.lang.Long.valueOf(r3) r0.add(r3) L_0x022e: int r2 = r2 + 1 goto L_0x01d0 L_0x0231: int r0 = r0.size() int r2 = r17.size() int r0 = r0 + r2 if (r0 <= r11) goto L_0x023e r6.multiplyUsers = r11 L_0x023e: r8 = 0 L_0x023f: android.util.LongSparseArray<org.telegram.messenger.MessageObject$GroupedMessages> r0 = r6.groupedMessagesMap int r0 = r0.size() if (r8 >= r0) goto L_0x0255 android.util.LongSparseArray<org.telegram.messenger.MessageObject$GroupedMessages> r0 = r6.groupedMessagesMap java.lang.Object r0 = r0.valueAt(r8) org.telegram.messenger.MessageObject$GroupedMessages r0 = (org.telegram.messenger.MessageObject.GroupedMessages) r0 r0.calculate() int r8 = r8 + 1 goto L_0x023f L_0x0255: return */ throw new UnsupportedOperationException("Method not decompiled: org.telegram.messenger.ForwardingMessagesParams.<init>(java.util.ArrayList, long):void"); } public void getSelectedMessages(ArrayList<MessageObject> arrayList) { arrayList.clear(); for (int i = 0; i < this.messages.size(); i++) { MessageObject messageObject = this.messages.get(i); if (this.selectedIds.get(messageObject.getId(), false)) { arrayList.add(messageObject); } } } public class PreviewMediaPoll extends TLRPC$TL_messageMediaPoll { public int totalVotersCached; public PreviewMediaPoll() { } } }
[ "fabian_pastor@msn.com" ]
fabian_pastor@msn.com
4c51d1bae8afef02e56b27eb2d5f71d979254e9c
7ccf81684e0c57b177e2a1024ee1495487dd1336
/core/src/main/java/run/mojo/annotations/FunctionType.java
baf50f8a09dad22f9ae198d84c42235ea1561170
[]
no_license
run-mojo/proto
9175de4698b11c4d4416957c5456763f019934f2
030da5ba5a10763f37a7f32cf20490bead64f58e
refs/heads/master
2020-04-08T18:06:55.781554
2018-10-20T12:52:39
2018-10-20T12:52:39
159,593,939
0
0
null
2018-11-29T02:14:01
2018-11-29T02:14:01
null
UTF-8
Java
false
false
228
java
package run.mojo.annotations; public @interface FunctionType { Kind value(); enum Kind { UNARY_ENQUEUE, UNARY, CLIENT_STREAMING, SERVER_STREAMING, DUPLEX_STREAMING, } }
[ "clay.molocznik@gmail.com" ]
clay.molocznik@gmail.com
d8d380ac5b88858862bf5f22e0aba9899f1a18ce
6ef4146923ccbbf8bca887523915c40452ec700b
/src/com/fox/exercise/publish/.svn/text-base/BitmapCache.java.svn-base
0f5431fe986a8db7c44a5ff587bc32588cb5ea17
[]
no_license
zhong19930928/diandianyundong
4e40ad739e399513c4ba089c683649ae3a40c3ba
7fa97cfd54f3397ed2334d706bf049dd17ede92e
refs/heads/master
2021-08-07T14:08:33.142599
2017-11-08T07:03:15
2017-11-08T07:03:15
109,936,849
0
1
null
null
null
null
UTF-8
Java
false
false
6,480
package com.fox.exercise.publish; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.lang.ref.SoftReference; import java.util.HashMap; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.media.ExifInterface; import android.os.Handler; import android.text.TextUtils; import android.util.Log; import android.widget.ImageView; public class BitmapCache extends Activity { public Handler h = new Handler(); public final String TAG = getClass().getSimpleName(); private HashMap<String, SoftReference<Bitmap>> imageCache = new HashMap<String, SoftReference<Bitmap>>(); public void put(String path, Bitmap bmp) { if (!TextUtils.isEmpty(path) && bmp != null) { imageCache.put(path, new SoftReference<Bitmap>(bmp)); } } public void displayBmp(final ImageView iv, final String thumbPath, final String sourcePath, final ImageCallback callback) { if (TextUtils.isEmpty(thumbPath) && TextUtils.isEmpty(sourcePath)) { Log.e(TAG, "no paths pass in"); return; } final String path; final boolean isThumbPath; if (!TextUtils.isEmpty(thumbPath)) { path = thumbPath; isThumbPath = true; } else if (!TextUtils.isEmpty(sourcePath)) { path = sourcePath; isThumbPath = false; } else { return; } if (imageCache.containsKey(path)) { SoftReference<Bitmap> reference = imageCache.get(path); Bitmap bmp = reference.get(); if (bmp != null) { if (callback != null) { callback.imageLoad(iv, bmp, sourcePath); } iv.setImageBitmap(bmp); Log.d(TAG, "hit cache"); return; } } iv.setImageBitmap(null); new Thread() { Bitmap thumb; public void run() { try { if (isThumbPath) { thumb = BitmapFactory.decodeFile(thumbPath); if (thumb == null) { thumb = revitionImageSize(sourcePath); } } else { thumb = revitionImageSize(sourcePath); } } catch (Exception e) { } if (thumb == null) { thumb = TestPicActivity.bimap; } int degree = getBitmapDegree(sourcePath); if (0 != degree) { Log.v(TAG, "wmh degree is " + degree); thumb = rotateBitmapByDegree(thumb, degree); } Log.e(TAG, "-------thumb------" + thumb); put(path, thumb); if (callback != null) { h.post(new Runnable() { @Override public void run() { callback.imageLoad(iv, thumb, sourcePath); } }); } } }.start(); } public Bitmap revitionImageSize(String path) throws IOException { BufferedInputStream in = new BufferedInputStream(new FileInputStream( new File(path))); BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeStream(in, null, options); in.close(); int i = 0; Bitmap bitmap = null; while (true) { if ((options.outWidth >> i <= 256) && (options.outHeight >> i <= 256)) { in = new BufferedInputStream( new FileInputStream(new File(path))); options.inSampleSize = (int) Math.pow(2.0D, i); options.inJustDecodeBounds = false; bitmap = BitmapFactory.decodeStream(in, null, options); break; } i += 1; } return bitmap; } public interface ImageCallback { public void imageLoad(ImageView imageView, Bitmap bitmap, Object... params); } /** * ��ȡͼƬ����ת�ĽǶ� * * @param path ͼƬ����·�� * @return ͼƬ����ת�Ƕ� */ public static int getBitmapDegree(String path) { int degree = 0; try { // ��ָ��·���¶�ȡͼƬ������ȡ��EXIF��Ϣ ExifInterface exifInterface = new ExifInterface(path); // ��ȡͼƬ����ת��Ϣ int orientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); switch (orientation) { case ExifInterface.ORIENTATION_ROTATE_90: degree = 90; break; case ExifInterface.ORIENTATION_ROTATE_180: degree = 180; break; case ExifInterface.ORIENTATION_ROTATE_270: degree = 270; break; } } catch (IOException e) { e.printStackTrace(); } return degree; } /** * ��ͼƬ����ij���ǶȽ�����ת * * @param bm ��Ҫ��ת��ͼƬ * @param degree ��ת�Ƕ� * @return ��ת���ͼƬ */ public static Bitmap rotateBitmapByDegree(Bitmap bm, int degree) { Bitmap returnBm = null; // ������ת�Ƕȣ�������ת���� Matrix matrix = new Matrix(); matrix.postRotate(degree); try { // ��ԭʼͼƬ������ת���������ת�����õ��µ�ͼƬ returnBm = Bitmap.createBitmap(bm, 0, 0, bm.getWidth(), bm.getHeight(), matrix, true); } catch (OutOfMemoryError e) { } if (returnBm == null) { returnBm = bm; } if (bm != returnBm) { bm.recycle(); bm = null; } return returnBm; } }
[ "912928250@qq.com" ]
912928250@qq.com
dc93097a9e4ca7494c29bfe6f32172588279e238
44e7adc9a1c5c0a1116097ac99c2a51692d4c986
/aws-java-sdk-iotsecuretunneling/src/main/java/com/amazonaws/services/iotsecuretunneling/model/transform/ListTunnelsRequestProtocolMarshaller.java
2315e57a5af42ae71856357dc4b1989533727f07
[ "Apache-2.0" ]
permissive
QiAnXinCodeSafe/aws-sdk-java
f93bc97c289984e41527ae5bba97bebd6554ddbe
8251e0a3d910da4f63f1b102b171a3abf212099e
refs/heads/master
2023-01-28T14:28:05.239019
2020-12-03T22:09:01
2020-12-03T22:09:01
318,460,751
1
0
Apache-2.0
2020-12-04T10:06:51
2020-12-04T09:05:03
null
UTF-8
Java
false
false
2,673
java
/* * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.iotsecuretunneling.model.transform; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.Request; import com.amazonaws.http.HttpMethodName; import com.amazonaws.services.iotsecuretunneling.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.protocol.*; import com.amazonaws.protocol.Protocol; import com.amazonaws.annotation.SdkInternalApi; /** * ListTunnelsRequest Marshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") @SdkInternalApi public class ListTunnelsRequestProtocolMarshaller implements Marshaller<Request<ListTunnelsRequest>, ListTunnelsRequest> { private static final OperationInfo SDK_OPERATION_BINDING = OperationInfo.builder().protocol(Protocol.AWS_JSON).requestUri("/") .httpMethodName(HttpMethodName.POST).hasExplicitPayloadMember(false).hasPayloadMembers(true).operationIdentifier("IoTSecuredTunneling.ListTunnels") .serviceName("AWSIoTSecureTunneling").build(); private final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory; public ListTunnelsRequestProtocolMarshaller(com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory) { this.protocolFactory = protocolFactory; } public Request<ListTunnelsRequest> marshall(ListTunnelsRequest listTunnelsRequest) { if (listTunnelsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { final ProtocolRequestMarshaller<ListTunnelsRequest> protocolMarshaller = protocolFactory.createProtocolMarshaller(SDK_OPERATION_BINDING, listTunnelsRequest); protocolMarshaller.startMarshalling(); ListTunnelsRequestMarshaller.getInstance().marshall(listTunnelsRequest, protocolMarshaller); return protocolMarshaller.finishMarshalling(); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
[ "" ]
a0c537f02973e5c9aa2c04d6e560ab9c24192b4b
04a47ea05cd4e70bfa85774e470d26de3630009b
/src/main/java/se/niteco/qa/Example.java
45e49ef15d3bbaa6f514e7613c1811beab7bb0f8
[]
no_license
ndkhoiits/qa_util
630195553bce08cf83ebd420cdd73c7350183130
d75e6ff8380c70c1bdf65bd3553b20a69f96c41c
refs/heads/master
2021-01-17T06:37:13.713913
2016-07-06T08:25:04
2016-07-06T08:25:04
62,702,854
0
0
null
null
null
null
UTF-8
Java
false
false
436
java
package se.niteco.qa; import se.niteco.qa.model.ExampleModel; import se.niteco.qa.utils.ExcelDeserializer; import java.util.List; /** * Created by khoi.nguyen on 7/6/2016. */ public class Example { public static void main(String[] args) { List<ExampleModel> listObj = new ExcelDeserializer().convert("D:\\test.xlsx", ExampleModel.class); for (ExampleModel model : listObj) { System.out.println(model.getEmail()); } } }
[ "ndkhoi168@gmail.com" ]
ndkhoi168@gmail.com
786dd06674ee4954d51cb862d03698fe4deb06ff
62fe89435f910d75a4563bcd48a77e2bf563cd90
/PtsApp/src/com/example/ptsapp/Sa4.java
da7d9ce8355d3092b04a7a895db3bbe71dec13f4
[]
no_license
LewisLim579/PTSProject_myFirstApp2013
f13b2acce6013150acd2d53e215adb0d4d34444f
1d2b0adb1733b9675b7ccefa9106cb164cc60dc4
refs/heads/master
2021-03-12T20:14:27.697743
2014-12-26T04:14:54
2014-12-26T04:14:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
914
java
package com.example.ptsapp; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ImageButton; public class Sa4 extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.sa4); ImageButton s3 = (ImageButton) findViewById(R.id.imageButton1); s3.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent intent = new Intent(Sa4.this, How10.class); startActivity(intent); } }); ImageButton s4 = (ImageButton) findViewById(R.id.imageButton2); s4.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent intent = new Intent(Sa4.this, How11.class); startActivity(intent); } }); } }
[ "samo57980@gmail.com" ]
samo57980@gmail.com
791d310814d241d3bf8038dcd6db4a4503210f8a
f257d21ac1705c3b207020a33686ea498e3bb9d9
/proxy/src/main/java/edu/hku/sdb/plan/NoResultFoundException.java
6d187539b27b805b204a9792c9559069a20e20e2
[ "Apache-2.0" ]
permissive
simonzhangsm/SecureDB
d1c600c12d1c14368aae8ac69f6ab1774317870c
a63b09d6e431b98ab508698a8b714004e2b10810
refs/heads/master
2020-12-30T11:59:40.887438
2017-05-16T16:38:22
2017-05-16T16:38:22
91,480,677
0
0
null
null
null
null
UTF-8
Java
false
false
1,235
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 edu.hku.sdb.plan; import edu.hku.sdb.parse.ParseError; import java.util.ArrayList; /** * Created by Eric Haibin Lin on 23/3/15. */ public class NoResultFoundException extends Exception { private static final long serialVersionUID = 11323L; String error; public NoResultFoundException(String error) { super(); this.error = error; } @Override public String getMessage() { return error; } }
[ "simon.zhangsm@gmail.com" ]
simon.zhangsm@gmail.com
09a1c055b99396ac80ce8c063aa745d8f414ae0b
071a9fa7cfee0d1bf784f6591cd8d07c6b2a2495
/corpus/norm-class/eclipse.jdt.ui/8438.java
2cc7a1c5ca2d348a34cca4636cfca21fdbbfb806
[ "MIT" ]
permissive
masud-technope/ACER-Replication-Package-ASE2017
41a7603117f01382e7e16f2f6ae899e6ff3ad6bb
cb7318a729eb1403004d451a164c851af2d81f7a
refs/heads/master
2021-06-21T02:19:43.602864
2021-02-13T20:44:09
2021-02-13T20:44:09
187,748,164
0
0
null
null
null
null
UTF-8
Java
false
false
92
java
control statement controlstatement test for assignment two testforassignmenttwo main foo foo
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
bf71116275ac67e06291736d7bae0348e305c0e8
93e3ed345704cd640c7e6881d1d7be004416a9fd
/OnlineFlatRental_Flat/src/main/java/com/ofr/service/IFlatService.java
ce79779dde9e9f8ba46097647a27aacf713aa25d
[]
no_license
NaveeBlue4399/Ofr-flat-Module
b47dc13f977f70163914ae5864ddf97cce69a59c
3389029c7d492269f00d897d4532ae0ebbb0aa89
refs/heads/main
2023-01-22T13:33:43.569268
2020-12-03T13:54:40
2020-12-03T13:54:40
317,841,011
0
0
null
null
null
null
UTF-8
Java
false
false
1,372
java
package com.ofr.service; import java.util.List; import java.util.Optional; import com.ofr.exception.FlatNotFoundException; import com.ofr.exception.ValidFlatDetailsException; import com.ofr.model.Flat; public interface IFlatService { /* * This method is used for add the flat * return type Flat * @param flat * exception ValidFlatDetailsException */ public Flat addFlat(Flat flat) throws ValidFlatDetailsException; /* * This method is used for update the flat * return type Flat * @param flat * exception FlatNotFoundException */ public Flat updateFlat(Flat flat) throws FlatNotFoundException; /* * This method is used for delete the flat * return type Flat * @param flat * exception FlatNotFoundException */ public Flat deleteFlat(Flat flat) throws FlatNotFoundException; /* * This method is used to view the flat by id * return type Flat * @param id * exception FlatNotFoundException */ public Optional<Flat> viewFlat(Integer id) throws FlatNotFoundException; /* * This method is used to view all the flat * return type Flat */ public List<Flat> viewAllFlat(); /* * This method is used for view the flat by cost and availability * return type Flat * @param cost,availability */ public List<Flat> viewAllFlatByCost(Float cost,String availability); }
[ "DELL@DESKTOP-6MH31PJ" ]
DELL@DESKTOP-6MH31PJ
21c20fcd41394c2826c41d244296f11b814b3cb2
2f70e8c32276fc6671189992d7dcde8c6e380f76
/Assignment/Assignment/src/com/techchefs/java/assessments/Animal.java
fc9c9cad7b95c8973995401e1bbafca4cb1b1758
[]
no_license
SindhuKarnic/ELF-06June19-Techchefs-SindhuKarnic
5dc73a472637b6ed650c128a40b9548b2dfcd115
31f2d0da44226d0186bd4ee0c63280d620320b3e
refs/heads/master
2022-12-22T10:46:25.665558
2019-08-23T12:15:17
2019-08-23T12:15:17
192,526,785
0
0
null
2022-12-15T23:54:44
2019-06-18T11:28:51
Rich Text Format
UTF-8
Java
false
false
84
java
package com.techchefs.java.assessments; public interface Animal { void sound(); }
[ "sindhukarnic@gmail.com" ]
sindhukarnic@gmail.com
ef5013a698b19d6526855437885191483d9f5502
1992bb22041ada64df86049c9dcfc16d33d481ad
/src/main/java/com/question/controller/UserQuestionController.java
4a76bc17027854a61361a6962b2f0040b6ee07e8
[]
no_license
Helloyyw/question
11057b13ff43ca78348f306493b5adc17d129ad4
99626e5653eb5969cd3d270de00d2cf9910db2c2
refs/heads/master
2021-06-20T02:32:32.027993
2019-07-05T03:39:08
2019-07-05T03:39:08
194,765,311
0
0
null
2021-03-31T21:23:03
2019-07-02T01:21:09
HTML
UTF-8
Java
false
false
2,311
java
package com.question.controller; import com.question.dto.QuestionBankDto; import com.question.entity.UserQustion; import com.question.service.QuestionService; import com.question.util.JsonData; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @RestController @RequestMapping("/question") @CrossOrigin("*") @Slf4j public class UserQuestionController { @Resource public QuestionService questionService; //添加问卷 @PostMapping("/add") public JsonData addQuestion(@RequestBody QuestionBankDto questionBankDto){ // log.info("dto对象:{}", JsonMapper.obj2String(questionBankDto)); log.info("dto对象:{}", questionBankDto); if(questionBankDto == null){ return JsonData.fail("添加失败 ,后台检测不到你输入的数据"); } JsonData jsonData = questionService.addQuestion(questionBankDto); return jsonData; } //查询所有的问卷列表 @GetMapping("/findAll") public JsonData findAll(){ return questionService.findAll(); } //删除问卷 //查询所有的问卷列表 @GetMapping("/delete") public JsonData deleteById(Integer id){ return questionService.deleteById(id); } //根据问卷对应的id查询到问卷的详细题集合 @GetMapping("/getBank") public JsonData findBankById(Integer quId){ return questionService.findBankById(quId); } //根据用户id来查询用户自己有哪些问卷 @GetMapping("/findByUserId") public JsonData findByUserId(Integer userId){ return questionService.findByUserId(userId); } //根据用户id查询已答问卷 @GetMapping("/findUserIded") public JsonData findUserIded(Integer userId){ return questionService.findUserIded(userId); } //查询用户没有填写的问卷列表 @GetMapping("/findNoWirte") public JsonData findNoWirte(Integer userId){ return questionService.findNoWirte(userId); } //保存用户的答案信息 @PostMapping("/saveAnswer") public JsonData saveAswer(UserQustion userQustion){ log.info("UserQustion:{}",userQustion.getQuId()); return questionService.saveAswer(userQustion); } }
[ "1475556814@qq.com" ]
1475556814@qq.com