blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
b0c4297904f63ac5d014a2a5d0aea8234059696c
78e2c057922ec52863d07a24faeb5d8f3ba68d63
/freelancer-service/src/main/java/com/redhat/freelance4j/freelancer/rest/HealthCheckEndpoint.java
f603f9a1f74fc48bc63c2ff8521ae7f66ad73099
[]
no_license
lcoronad/CloudApplicationsOPC
11c388793b4c6da4d32dc62c55de6b93febf787e
355bbda58f5f8eef5c7fccba7676c3dd1027dc0a
refs/heads/master
2022-10-01T16:12:44.535500
2020-02-19T19:50:19
2020-02-19T19:50:19
194,459,291
0
0
null
2022-09-22T18:46:55
2019-06-30T00:19:15
Java
UTF-8
Java
false
false
649
java
package com.redhat.freelance4j.freelancer.rest; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.actuate.endpoint.HealthEndpoint; import org.springframework.boot.actuate.health.Health; import org.springframework.stereotype.Component; @Component @Path("/") public class HealthCheckEndpoint { @Autowired private HealthEndpoint health; @GET @Path("/health") @Produces(MediaType.APPLICATION_JSON) public Health getHealth() { return health.invoke(); } }
[ "lcoronad@localhost.localdomain" ]
lcoronad@localhost.localdomain
b7c21b7149fe2fd3fb79362b829fa9e6acdc71e3
6d4a383248416a867fdcf2bf3310e0d948412d98
/src/main/java/com/gyoomi/designpattern/strategy/demo02/Main.java
719bada8290d5a69ee54493913003ba93f2376bb
[]
no_license
gyoomi/design-pattern
156beaff80049fbe329ce818ed6245b8dfa12c68
a5d15ff8b98ef5249e51460f8f126708a924e782
refs/heads/master
2020-04-08T02:50:31.236753
2019-12-14T15:31:39
2019-12-14T15:31:39
158,951,025
0
1
null
null
null
null
UTF-8
Java
false
false
384
java
package com.gyoomi.designpattern.strategy.demo02; /** * 类功能描述 * * @author Leon * @version 2019/4/1 22:47 */ public class Main { public static void main(String[] args) { int a = 10, b = 21; SubCalculator sub = new SubCalculator(); Context ctx = new Context(sub); int exec = ctx.exec(a, b); System.out.println(exec); } }
[ "gyoomi0709@foxmail.com" ]
gyoomi0709@foxmail.com
48a413f190328522b82eb45de9d8e735693d8efc
6788a7baf6fc0a9c2a61fb9ac5f4f2f38c06317b
/VUE2/src/old/beans/VueBeans.java
f5950d0d6edba89f652a747bbad255542a9133a6
[]
no_license
VUE/VUE
6a3254ec7c9e6d84007ee41985c68d0e38d78742
25f3d22b787669ec9754a78991b3025ab4d5476e
refs/heads/master
2023-08-13T13:18:42.016986
2022-09-24T13:40:49
2022-09-24T13:40:49
6,150,700
553
160
null
2022-09-24T13:40:50
2012-10-10T01:50:41
Java
UTF-8
Java
false
false
5,108
java
/* * ----------------------------------------------------------------------------- * * <p><b>License and Copyright: </b>The contents of this file are subject to the * Mozilla Public License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License * at <a href="http://www.mozilla.org/MPL">http://www.mozilla.org/MPL/.</a></p> * * <p>Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License.</p> * * <p>The entire file consists of original code. Copyright &copy; 2003, 2004 * Tufts University. All rights reserved.</p> * * ----------------------------------------------------------------------------- */ /******* ** VuePropertyDescriptor ** ** *********/ package tufts.vue.beans; import java.io.*; import java.util.*; import java.awt.*; import java.lang.*; import java.awt.event.*; import java.beans.*; import javax.swing.*; import tufts.vue.*; /** * VueBeans * This class holds a list of properties and balues for a * given object and can manage chagnes to properties. * **/ public class VueBeans { ////////////// // Fields ///////////// /** a list of property mappers **/ static private Map sPropertyMappers = new HashMap(); /** proeprty map **/ private Map mDiscriptors = new HashMap(); ////////////////// // Constructor /////////////////// public VueBeans() { super(); } ///////////////////// // Methods //////////////////// /** * getBeanInfo * Looks up the VueBeanInfo based on the class or tries to build one * from scratch * $param pObject = the object to get info about * @return VueBeanInfo the info **/ static public VueBeanInfo getBeanInfo( Object pObject) { VuePropertyMapper mapper = null; VueBeanInfo info = null; mapper = getPropertyMapper( pObject); if( mapper != null) { info = mapper.getBeanInfo( pObject); } return info; } /** * getPropertyValue * Returns a property value given the object and the property name * @param pObject - the object * @param String the name * @return the vuale **/ static public Object getPropertyValue( Object pObject, String pName) { Object value = null; VuePropertyManager mgr = VuePropertyManager.getManager(); VuePropertyMapper mapper = mgr.getPropertyMapper( pObject); if( mapper != null) { value = mapper.getPropertyValue( pObject, pName); } return value; } /** * setPropertyValue * Sets the value for the given the object and the property name * @param pObject - the object * @param String the name * @param pValue the value **/ static public void setPropertyValue( Object pObject, String pName, Object pValue) { VuePropertyManager mgr = VuePropertyManager.getManager(); VuePropertyMapper mapper = mgr.getPropertyMapper( pObject); if( mapper != null) { mapper.setPropertyValue( pObject, pName, pValue); } else { System.out.println(" No mapper fournd for class: "+pObject.getClass().getName() ); } } /** * registerPropertyMapper * THis method registers a property mapper for a given class * @param Class the class * @param VueProeprtyMapper - the mapper for the class **/ static public void registerPropertyMapper( Class pClass, VuePropertyMapper pMapper) { sPropertyMappers.put( pClass.getName(), pMapper); } /** * getPropertyMapper * This method returns a VuePropertyMapper for the given object. * If not mapper can be found for the object, null is returned. * @param Object - the object in question * @return VuePropertyMapper teh mapper for the given object **/ static public VuePropertyMapper getPropertyMapper( Object pObject) { VuePropertyManager mgr = VuePropertyManager.getManager(); VuePropertyMapper mapper = mgr.getPropertyMapper( pObject); return mapper; } /** * getState * This returns a VueBeanState built from the passed bean. * @param Object the bean to generate a BeanState * @return VueBeanState - a property value set of the bean **/ static public VueBeanState getState( Object pBean) { VueBeanState state = new VueBeanState(); state.initializeFrom( pBean); return state; } static public void applyPropertyValueToSelection(LWSelection s, String pName, Object pValue) { if (s == null || s.isEmpty()) return; Iterator i = s.iterator(); // FIX: THis may be a bad assumption that the mapper will work for // all items in the selection. [it should apply properties as it can] while (i.hasNext()) { LWComponent c = (LWComponent) i.next(); if (c instanceof LWLink && pName == LWKey.FillColor.name) continue; if (tufts.vue.DEBUG.SELECTION) System.out.println("applying " + pName + " to " + c); c.setProperty(pName, pValue); //VueBeans.setPropertyValue(c, pName, pValue); } } }
[ "scott.fraize@gmail.com" ]
scott.fraize@gmail.com
184423de60520c268ed6c636839acb8db273a658
66afee4a06998aca0521cfcd96b30a1584a77262
/src/main/java/com/test/code/misc/Employee.java
3261710dacbef4fdf9640c1d64f4245dbd01ddd5
[]
no_license
Pratik2290/scratchpad
ea095ec24e042d06f332191638463f220b0db647
3d0856bcba96aa95d43f5e2efaf0c0474d399692
refs/heads/master
2022-11-23T15:44:48.834593
2020-01-20T16:43:06
2020-01-20T16:43:06
215,034,681
0
0
null
2022-11-15T23:54:01
2019-10-14T12:11:08
Java
UTF-8
Java
false
false
1,782
java
package com.test.code.misc; import java.util.HashMap; import java.util.Map; public class Employee { String name; int age; public Employee(String name,int age) { this.name=name; this.age=age; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + age; result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Employee other = (Employee) obj; if (age != other.age) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; return true; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } @Override public String toString() { return "Employee{" + "name='" + name + '\'' + ", age=" + age + '}'; } public static void main(String[] args) { Employee emp1=new Employee("Martin",27); Map<Employee,String> hm=new HashMap<Employee,String>(); hm.put(emp1, "Verified"); System.out.println(hm); emp1.setName("John"); System.out.println(emp1); System.out.println(hm.get(emp1)); System.out.println(hm); } }
[ "pratik.bajaj@aeratechnology.com" ]
pratik.bajaj@aeratechnology.com
e9363257d8a848b995839befc6338dcd5a686708
012b57329cba0c583daebe11ddf04601e965870c
/SENG SPACE EXPLORER/src/spaceExplorer/Food.java
94b44b104df4b701057e744af4ee649ed80eeb4d
[]
no_license
Ryankoo123/New-Project
28352e4ea9bfcbf2a73e490f3c6f5c49eae61835
5a5b14ed030cb4fb31dd1f8c4c6bb00ffbd91846
refs/heads/master
2020-05-29T13:25:05.248667
2019-05-30T13:15:31
2019-05-30T13:15:31
189,161,527
0
0
null
2019-05-30T13:11:23
2019-05-29T06:12:52
Java
UTF-8
Java
false
false
91
java
package spaceExplorer; public enum Food { CHICKEN, BURGER, TOFFEE, TEA, ICECREAM, BREAD }
[ "ryankoo@192.168.1.69" ]
ryankoo@192.168.1.69
872326c397f83845fbe879f03517796364a920a8
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/kickstarter--android-oss/09e40c807444074943a1068c5b4153e9f5106474/before/CommentsActivity.java
710e54cac57412c0586dc5aa124849fdc8643c15
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
8,715
java
package com.kickstarter.ui.activities; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.AlertDialog; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Pair; import android.view.View; import android.view.WindowManager; import android.widget.TextView; import com.jakewharton.rxbinding.view.RxView; import com.jakewharton.rxbinding.widget.RxTextView; import com.kickstarter.R; import com.kickstarter.libs.ActivityRequestCodes; import com.kickstarter.libs.BaseActivity; import com.kickstarter.libs.RecyclerViewPaginator; import com.kickstarter.libs.SwipeRefresher; import com.kickstarter.libs.qualifiers.RequiresActivityViewModel; import com.kickstarter.libs.rx.transformers.Transformers; import com.kickstarter.libs.utils.ObjectUtils; import com.kickstarter.libs.utils.ViewUtils; import com.kickstarter.models.Project; import com.kickstarter.ui.IntentKey; import com.kickstarter.ui.adapters.CommentsAdapter; import com.kickstarter.ui.data.LoginReason; import com.kickstarter.ui.viewholders.EmptyCommentsViewHolder; import com.kickstarter.ui.viewholders.ProjectContextViewHolder; import com.kickstarter.viewmodels.CommentsViewModel; import com.trello.rxlifecycle.ActivityEvent; import butterknife.Bind; import butterknife.BindString; import butterknife.ButterKnife; import butterknife.OnClick; import rx.Observable; import rx.android.schedulers.AndroidSchedulers; import rx.subjects.PublishSubject; import static com.kickstarter.libs.utils.TransitionUtils.slideInFromLeft; @RequiresActivityViewModel(CommentsViewModel.class) public final class CommentsActivity extends BaseActivity<CommentsViewModel> implements CommentsAdapter.Delegate { private CommentsAdapter adapter; private RecyclerViewPaginator recyclerViewPaginator; private SwipeRefresher swipeRefresher; private @NonNull PublishSubject<AlertDialog> alertDialog = PublishSubject.create(); protected @Bind(R.id.comment_button) TextView commentButtonTextView; protected @Bind(R.id.comments_swipe_refresh_layout) SwipeRefreshLayout swipeRefreshLayout; protected @Bind(R.id.comments_recycler_view) RecyclerView recyclerView; protected @BindString(R.string.social_error_could_not_post_try_again) String postCommentErrorString; protected @BindString(R.string.project_comments_posted) String commentPostedString; @Override protected void onCreate(final @Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.comments_layout); ButterKnife.bind(this); adapter = new CommentsAdapter(this); recyclerView.setAdapter(adapter); recyclerView.setLayoutManager(new LinearLayoutManager(this)); recyclerViewPaginator = new RecyclerViewPaginator(recyclerView, viewModel.inputs::nextPage); swipeRefresher = new SwipeRefresher(this, swipeRefreshLayout, viewModel.inputs::refresh, viewModel.outputs::isFetchingComments); final Observable<TextView> commentBodyEditText = alertDialog .map(a -> ButterKnife.findById(a, R.id.comment_body)); final Observable<TextView> postCommentButton = alertDialog .map(a -> ButterKnife.findById(a, R.id.post_button)); final Observable<TextView> cancelButton = alertDialog .map(a -> ButterKnife.findById(a, R.id.cancel_button)); cancelButton .switchMap(RxView::clicks) .observeOn(AndroidSchedulers.mainThread()) .compose(bindToLifecycle()) .subscribe(__ -> viewModel.inputs.commentDialogDismissed()); postCommentButton .switchMap(RxView::clicks) .compose(bindToLifecycle()) .subscribe(__ -> viewModel.inputs.postCommentClicked()); commentBodyEditText .switchMap(t -> RxTextView.textChanges(t).skip(1)) .map(CharSequence::toString) .compose(bindToLifecycle()) .subscribe(viewModel.inputs::commentBodyChanged); viewModel.outputs.currentCommentBody() .compose(Transformers.takePairWhen(commentBodyEditText)) .observeOn(AndroidSchedulers.mainThread()) .compose(bindToLifecycle()) .subscribe(ce -> ce.second.append(ce.first)); viewModel.outputs.commentsData() .compose(bindToLifecycle()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(adapter::takeData); viewModel.outputs.enablePostButton() .compose(Transformers.combineLatestPair(postCommentButton)) .compose(bindToLifecycle()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(bb -> setPostButtonEnabled(bb.second, bb.first)); viewModel.outputs.showCommentButton() .map(show -> show ? View.VISIBLE : View.GONE) .compose(bindToLifecycle()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(commentButtonTextView::setVisibility); viewModel.outputs.showCommentDialog() .filter(projectAndShow -> projectAndShow != null) .map(projectAndShow -> projectAndShow.first) .compose(bindToLifecycle()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::showCommentDialog); alertDialog .compose(Transformers.takeWhen(viewModel.outputs.dismissCommentDialog())) .observeOn(AndroidSchedulers.mainThread()) .compose(bindToLifecycle()) .subscribe(this::dismissCommentDialog); lifecycle() .compose(Transformers.combineLatestPair(alertDialog)) .filter(ad -> ad.first == ActivityEvent.DESTROY) .map(ad -> ad.second) .observeOn(AndroidSchedulers.mainThread()) // NB: We dont want to bind to lifecycle because we want the destroy event. // .compose(bindToLifecycle()) .take(1) .subscribe(this::dismissCommentDialog); toastMessages() .compose(bindToLifecycle()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(ViewUtils.showToast(this)); } @Override protected void onDestroy() { super.onDestroy(); recyclerViewPaginator.stop(); recyclerView.setAdapter(null); } @Nullable @OnClick(R.id.project_context_view) public void projectContextViewClick() { back(); } public void commentsLogin() { final Intent intent = new Intent(this, LoginToutActivity.class) .putExtra(IntentKey.LOGIN_REASON, LoginReason.COMMENT_FEED); startActivityForResult(intent, ActivityRequestCodes.LOGIN_FLOW); } @OnClick(R.id.comment_button) protected void commentButtonClicked() { viewModel.inputs.commentButtonClicked(); } public void dismissCommentDialog(final @Nullable AlertDialog dialog) { if (dialog != null) { dialog.dismiss(); } } public void showCommentDialog(final @NonNull Project project) { final AlertDialog commentDialog = new AlertDialog.Builder(this) .setView(R.layout.comment_dialog) .create(); commentDialog.show(); commentDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); /* Toolbar UI actions */ final TextView projectNameTextView = ButterKnife.findById(commentDialog, R.id.comment_project_name); projectNameTextView.setText(project.name()); // Handle cancel-click region outside of dialog modal. commentDialog.setOnCancelListener((final @NonNull DialogInterface dialogInterface) -> { viewModel.inputs.commentDialogDismissed(); }); alertDialog.onNext(commentDialog); } public void setPostButtonEnabled(final @Nullable TextView postCommentButton, final boolean enabled) { if (postCommentButton != null) { postCommentButton.setEnabled(enabled); } } @Override public void projectContextClicked(final @NonNull ProjectContextViewHolder viewHolder) { back(); } @Override public void emptyCommentsLoginClicked(final @NonNull EmptyCommentsViewHolder viewHolder) { commentsLogin(); } @Override protected void onActivityResult(final int requestCode, final int resultCode, final @Nullable Intent intent) { super.onActivityResult(requestCode, resultCode, intent); if (requestCode != ActivityRequestCodes.LOGIN_FLOW) { return; } if (resultCode != RESULT_OK) { return; } viewModel.inputs.loginSuccess(); } @Override protected @Nullable Pair<Integer, Integer> exitTransition() { return slideInFromLeft(); } private Observable<String> toastMessages() { return viewModel.outputs.showPostCommentErrorToast() .map(ObjectUtils.coalesceWith(postCommentErrorString)) .mergeWith(viewModel.outputs.showCommentPostedToast().map(__ -> commentPostedString)); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
88042e9b0b3cb673e66cec256705b0a69c8e86aa
86a701b01a4ae8beab8fe348643b2b85d6945f6d
/Generic Classes and Methods/WildcardTest.java
65c98b56c51ce29ab2ee46c14905af8efc59b5da
[]
no_license
Tolga-Karahan/JavaSE-Practices
eae6264986787f8b9704f31b1955cdb741268b2d
1a8af44babb9856d8488901e3ab92cf82bbb787d
refs/heads/master
2021-04-09T15:33:26.407713
2019-05-03T11:11:06
2019-05-03T11:11:06
125,831,959
6
2
null
null
null
null
UTF-8
Java
false
false
1,523
java
// Wildcard test program. import java.util.ArrayList; public class WildcardTest { public static void main(String[] args) { Integer[] integers = {5, 7, 12, 74}; ArrayList<Integer> integerList = new ArrayList<>(); for(Integer integerVal : integers) integerList.add(integerVal); System.out.printf("%nintegerList contains: %s%n", integerList); System.out.printf("Total of the elements in integerList: %.0f%n", sum(integerList)); Double[] doubles = {1.8, 3.7, 4.3, 10.7}; ArrayList<Double> doubleList = new ArrayList<>(); for(Double doubleVal : doubles) doubleList.add(doubleVal); System.out.printf("%ndoubleList contains: %s%n", doubleList); System.out.printf("Total of the elements in doubleList: %.1f%n", sum(doubleList)); Number[] numbers = {5, 1.8, 9, 3.2}; ArrayList<Number> numberList = new ArrayList<>(); for(Number number : numbers) numberList.add(number); System.out.printf("%nnumberList contains: %s%n", numberList); System.out.printf("Total of the elements in numberList: %.1f%n", sum(numberList)); } public static double sum(ArrayList<? extends Number> list) { double total = 0; for(Number element : list) total += element.doubleValue(); return total; } }
[ "tkarahan147@gmail.com" ]
tkarahan147@gmail.com
80b8c1e15deecd03eb0864d8ffad7ba09d0e21b3
e206a0c54a910befc122c4a5ac4da17c53084fbd
/osero/src/client/Login_display.java
dd9aad6770795b3b709cb9cd6b478b0beed6db55
[]
no_license
KHANGMINJE/Fgroup
7ae416678bfeeee61fc1fdb36ba0854582fe510a
a8846a95325bbb8e26b430e845474471c5486f09
refs/heads/master
2022-11-28T11:20:32.415223
2020-07-29T05:47:54
2020-07-29T05:47:54
270,906,701
0
0
null
2020-07-29T05:47:55
2020-06-09T04:59:28
Java
UTF-8
Java
false
false
3,956
java
package client; import java.awt.*; import java.awt.List; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.*; import java.net.*; import transData.*; public class Login_display extends JFrame implements ActionListener { static final long serialVersionUID = 1; JLabel label[] = new JLabel[2]; JTextField txt = new JTextField(); JPasswordField pwd = new JPasswordField(); JButton btn[] = new JButton[4]; Client client = null; Socket s = null; ObjectOutputStream oos = null; ObjectInputStream ois = null; JLabel label1[] = new JLabel[4]; JTextArea txt1[] = new JTextArea[3]; JButton btn1 = new JButton("送信する"); public Login_display(String title, Client client) { super(title); this.client = client; JPanel p = (JPanel) getContentPane(); p.setLayout(null); label[0] = new JLabel("プレイヤ名"); label[1] = new JLabel("パスワード"); btn[0] = new JButton("新規登録"); btn[1] = new JButton("ログイン"); btn[2] = new JButton("パスワード"); btn[3] = new JButton("ルール説明"); for (int i = 0; i < 4; i++) { btn[i].addActionListener(this); } label[0].setBounds(10, 10, 75, 20); label[1].setBounds(10, 30, 75, 20); txt.setBounds(90, 10, 120, 20); pwd.setBounds(90, 30, 120, 20); btn[0].setBounds(15, 60, 100, 20); btn[1].setBounds(125, 60, 100, 20); btn[2].setBounds(40, 90, 150, 20); btn[3].setBounds(40, 120, 150, 20); p.add(label[0]); p.add(label[1]); p.add(txt); p.add(pwd); p.add(btn[0]); p.add(btn[1]); p.add(btn[2]); p.add(btn[3]); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(250, 250); setVisible(true); setResizable(false); try { s = new Socket(client.ServerAddress, client.getLoginPort()); OutputStream os = s.getOutputStream(); oos = new ObjectOutputStream(os); InputStream is = s.getInputStream(); ois = new ObjectInputStream(is); client.ois = ois; client.oos = oos; } catch (Exception se) { System.out.println("Error(Login_display):Socket error"); se.printStackTrace(); } finally { } } public void actionPerformed(ActionEvent e) { // onclick // button 新規登録 if (e.getSource() == btn[0]) { try { new Register_display("Register",this.client); this.dispose(); } catch (Exception e1) { // TODO 自動生成された catch ブロック e1.printStackTrace(); } //this.setVisible(false); } // button ログイン if (e.getSource() == btn[1]) { String username = txt.getText(); // String username = "usr_1"; char[] password = pwd.getPassword(); String passwordstr = new String(password); // String passwordstr = "pass_1"; System.out.println("username=" + username + ",password=" + passwordstr); boolean flag = client.send_login_info(username, passwordstr, ois, oos); if (flag) { // login success client.choose_room(oos, ois); this.dispose(); /* * try { System.out.println("Login_display:socket close"); //s.close(); } catch * (IOException e1) { e1.printStackTrace(); }finally { */ /* * ObjectOutputStream oos_room = null; ObjectInputStream ois_room = null; try{ * Socket s_room = new Socket(client.ServerAddress,client.room_port); * OutputStream os_room = s_room.getOutputStream(); oos_room = new * ObjectOutputStream(os_room); * * InputStream is_room = s_room.getInputStream(); ois_room = new * ObjectInputStream(is_room); System.out.println("start oserov4"); new * Oserov4(client, oos_room, ois_room); }catch (Exception e1){ * //e.printStackTrace(); }finally { * * } */ // ->Display4 Action // } } else { // login failed // TODO show "login failed" System.out.println("Login Failed"); } } // osero 対局の終了 // button ルール説明 if (e.getSource() == btn[3]) { new Explain("Explaination", client); this.dispose(); } } }
[ "l.ee.ov98@gmail.com" ]
l.ee.ov98@gmail.com
5fd6e0c293dd85640361ef2cbeac644dd9fbabee
4b2269872bbfa8e6fe2e350aa88a0f904c886427
/src/com/expressflow/utils/Constants.java
9ab6bd6e5d5fc661058e0056ee5a33167d66a504
[]
no_license
abruckner/expressFlow-BPM
afc0ba40ead48de977b91757410e3afbdf5a8fec
485b17089c0ecc4644deffde9b7063e62cb6f74c
refs/heads/master
2016-09-08T00:26:32.168586
2011-11-18T18:09:54
2011-11-18T18:09:54
2,808,003
1
0
null
null
null
null
UTF-8
Java
false
false
274
java
package com.expressflow.utils; /* Copyright (c) 2011 Martin Vasko, Ph.D. licensing@expressflow.com http://expressflow.com/license */ public class Constants { public static String SESSION_EXPIRED = "SESSION-EXPIRED"; public static Long APPLICATION_ID = new Long("1"); }
[ "martin@expressflow.com" ]
martin@expressflow.com
33ca5a272cef03ded49f605273f777c92b44e9bc
df80021687d971cc7528347bdbf19c9dbf66def3
/app/src/androidTest/java/com/example/ern/lightmorse/ApplicationTest.java
1d5591fb5edc10a4d241f3a8c37ecfcc92b34f0e
[]
no_license
ernkanikula/LightMorse
59c1e239e003e442b2b704ea52cc6bc2abd51fc7
9c04181a8dd0339e82a90069b634e09c75ddc697
refs/heads/master
2020-12-24T19:45:32.691063
2016-04-14T20:08:37
2016-04-14T20:08:37
56,265,417
0
0
null
null
null
null
UTF-8
Java
false
false
357
java
package com.example.ern.lightmorse; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "kanikula.ernest@gmail.com" ]
kanikula.ernest@gmail.com
992f0be52f66dc5ca39272f3bad2abd063ba793d
dc19baef0715de3c7f1321bf4b7951ca4cdd7266
/src/main/java/queueCondition/Queue.java
b0d5900cd7e698c1161f6e44206b820dd492d55b
[]
no_license
charlesYangM/javaConcurrency
29feacc4707d0012d4000988e6aaafb630a4c7be
ab52a73658e33e55a10f809282cb7e7e259b2935
refs/heads/master
2020-03-18T11:12:52.039039
2018-07-13T08:44:24
2018-07-13T08:44:24
134,657,527
0
0
null
null
null
null
UTF-8
Java
false
false
1,368
java
package queueCondition; import java.nio.file.NotDirectoryException; import java.util.ArrayList; import java.util.Iterator; /** * Created by CharlesYang on 2018/5/31. */ public class Queue<Item> implements Iterable<Item> { private Node first; private Node last; private int N; private class Node { Item item; Node next; } public void enqueue(Item item){ Node oldLast = last;//如果是空队列那么此时oldLast将为Null last = new Node(); last.item = item; last.next = null; if (isEmpty()){ first = last; }else { oldLast.next = last; } N++; } public Item dequeue(){ Item item = first.item; first = first.next; if (isEmpty()){ last = null; } N--; return item; } public boolean isEmpty(){ return first == null; } public int size(){ return N; } // // private ArrayList<E> arrayList = new ArrayList<>(); // private int count; // // // public boolean put(Object<? extends E> ie){ // // arrayList.set(count - 1, ie); // count = arrayList.size(); // } // // public E get(){ // return arrayList.get(0); // } @Override public Iterator<Item> iterator() { return null; } }
[ "qazwer1314123@gmail.com" ]
qazwer1314123@gmail.com
838ce165d53840ea4a9998ae59a2cf90c589401c
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/ui/contact/a/c$a.java
bb45d4f1af63344cc8ed2706f92e56e3d4437954
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
499
java
package com.tencent.mm.ui.contact.a; import android.view.View; import android.widget.CheckBox; import android.widget.ImageView; import android.widget.TextView; import com.tencent.mm.ui.contact.a.a.a; public class c$a extends a { public View contentView; public ImageView iip; public TextView iiq; public TextView iir; public CheckBox iis; public TextView mPU; final /* synthetic */ c yVi; public c$a(c cVar) { this.yVi = cVar; super(cVar); } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
a7f599217fa1d08bb9dcecfba574303daa8e2751
549fd6144f3111f96f79d71be6c72917dc5e3772
/src/test/java/com/cc/web/rest/SocialSecurityBenefitsResourceIT.java
1ff5695370ca6a19d0ef2b54c080bfa90fc17d3c
[]
no_license
liuruoyan/RosterServer4
985053e7f6f9f53fd0e33022235b832b6f11ea1c
53edbf8f550b133489778a20e77db76cc761b815
refs/heads/master
2022-12-22T03:24:25.696050
2019-08-08T01:25:06
2019-08-08T01:25:06
201,153,763
0
0
null
2022-12-16T05:02:52
2019-08-08T01:24:16
Java
UTF-8
Java
false
false
86,948
java
package com.cc.web.rest; import com.cc.RosterServer4App; import com.cc.domain.SocialSecurityBenefits; import com.cc.domain.EnumPfType; import com.cc.domain.EnumPfStatus; import com.cc.domain.EnumPfPayScheme; import com.cc.domain.EnumSsPayScheme; import com.cc.domain.EnumSsStatus; import com.cc.domain.EnumEmpLaborType; import com.cc.domain.EnumEmpTaxerType; import com.cc.domain.EnumEmpTaxArea; import com.cc.domain.Employee; import com.cc.repository.SocialSecurityBenefitsRepository; import com.cc.service.SocialSecurityBenefitsService; import com.cc.service.dto.SocialSecurityBenefitsDTO; import com.cc.service.mapper.SocialSecurityBenefitsMapper; import com.cc.web.rest.errors.ExceptionTranslator; import com.cc.service.dto.SocialSecurityBenefitsCriteria; import com.cc.service.SocialSecurityBenefitsQueryService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.MockitoAnnotations; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import org.springframework.http.MediaType; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.Validator; import javax.persistence.EntityManager; import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZoneId; import java.util.List; import static com.cc.web.rest.TestUtil.createFormattingConversionService; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.hasItem; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; /** * Integration tests for the {@link SocialSecurityBenefitsResource} REST controller. */ @SpringBootTest(classes = RosterServer4App.class) public class SocialSecurityBenefitsResourceIT { private static final String DEFAULT_CODE = "AAAAAAAAAA"; private static final String UPDATED_CODE = "BBBBBBBBBB"; private static final String DEFAULT_PF_ACCOUNT = "AAAAAAAAAA"; private static final String UPDATED_PF_ACCOUNT = "BBBBBBBBBB"; private static final String DEFAULT_SPF_ACCOUNT = "AAAAAAAAAA"; private static final String UPDATED_SPF_ACCOUNT = "BBBBBBBBBB"; private static final LocalDate DEFAULT_PF_START_MONTH = LocalDate.ofEpochDay(0L); private static final LocalDate UPDATED_PF_START_MONTH = LocalDate.now(ZoneId.systemDefault()); private static final LocalDate SMALLER_PF_START_MONTH = LocalDate.ofEpochDay(-1L); private static final Integer DEFAULT_PF_BASE = 1; private static final Integer UPDATED_PF_BASE = 2; private static final Integer SMALLER_PF_BASE = 1 - 1; private static final LocalDate DEFAULT_PF_STOP_MONTH = LocalDate.ofEpochDay(0L); private static final LocalDate UPDATED_PF_STOP_MONTH = LocalDate.now(ZoneId.systemDefault()); private static final LocalDate SMALLER_PF_STOP_MONTH = LocalDate.ofEpochDay(-1L); private static final String DEFAULT_PF_REMARK = "AAAAAAAAAA"; private static final String UPDATED_PF_REMARK = "BBBBBBBBBB"; private static final String DEFAULT_SS_ACCOUNT = "AAAAAAAAAA"; private static final String UPDATED_SS_ACCOUNT = "BBBBBBBBBB"; private static final String DEFAULT_SS_CITY = "AAAAAAAAAA"; private static final String UPDATED_SS_CITY = "BBBBBBBBBB"; private static final LocalDate DEFAULT_SS_START_MONTH = LocalDate.ofEpochDay(0L); private static final LocalDate UPDATED_SS_START_MONTH = LocalDate.now(ZoneId.systemDefault()); private static final LocalDate SMALLER_SS_START_MONTH = LocalDate.ofEpochDay(-1L); private static final Integer DEFAULT_SS_BASE = 1; private static final Integer UPDATED_SS_BASE = 2; private static final Integer SMALLER_SS_BASE = 1 - 1; private static final LocalDate DEFAULT_SS_STOP_MONTH = LocalDate.ofEpochDay(0L); private static final LocalDate UPDATED_SS_STOP_MONTH = LocalDate.now(ZoneId.systemDefault()); private static final LocalDate SMALLER_SS_STOP_MONTH = LocalDate.ofEpochDay(-1L); private static final String DEFAULT_SS_REMARK = "AAAAAAAAAA"; private static final String UPDATED_SS_REMARK = "BBBBBBBBBB"; private static final BigDecimal DEFAULT_ALLOWANCE = new BigDecimal(1); private static final BigDecimal UPDATED_ALLOWANCE = new BigDecimal(2); private static final BigDecimal SMALLER_ALLOWANCE = new BigDecimal(1 - 1); private static final String DEFAULT_TAXPAYER = "AAAAAAAAAA"; private static final String UPDATED_TAXPAYER = "BBBBBBBBBB"; private static final Boolean DEFAULT_IS_SELF_VERIFY = false; private static final Boolean UPDATED_IS_SELF_VERIFY = true; private static final Boolean DEFAULT_IS_HR_VERIFY = false; private static final Boolean UPDATED_IS_HR_VERIFY = true; @Autowired private SocialSecurityBenefitsRepository socialSecurityBenefitsRepository; @Autowired private SocialSecurityBenefitsMapper socialSecurityBenefitsMapper; @Autowired private SocialSecurityBenefitsService socialSecurityBenefitsService; @Autowired private SocialSecurityBenefitsQueryService socialSecurityBenefitsQueryService; @Autowired private MappingJackson2HttpMessageConverter jacksonMessageConverter; @Autowired private PageableHandlerMethodArgumentResolver pageableArgumentResolver; @Autowired private ExceptionTranslator exceptionTranslator; @Autowired private EntityManager em; @Autowired private Validator validator; private MockMvc restSocialSecurityBenefitsMockMvc; private SocialSecurityBenefits socialSecurityBenefits; @BeforeEach public void setup() { MockitoAnnotations.initMocks(this); final SocialSecurityBenefitsResource socialSecurityBenefitsResource = new SocialSecurityBenefitsResource(socialSecurityBenefitsService, socialSecurityBenefitsQueryService); this.restSocialSecurityBenefitsMockMvc = MockMvcBuilders.standaloneSetup(socialSecurityBenefitsResource) .setCustomArgumentResolvers(pageableArgumentResolver) .setControllerAdvice(exceptionTranslator) .setConversionService(createFormattingConversionService()) .setMessageConverters(jacksonMessageConverter) .setValidator(validator).build(); } /** * Create an entity for this test. * * This is a static method, as tests for other entities might also need it, * if they test an entity which requires the current entity. */ public static SocialSecurityBenefits createEntity(EntityManager em) { SocialSecurityBenefits socialSecurityBenefits = new SocialSecurityBenefits() .code(DEFAULT_CODE) .pfAccount(DEFAULT_PF_ACCOUNT) .spfAccount(DEFAULT_SPF_ACCOUNT) .pfStartMonth(DEFAULT_PF_START_MONTH) .pfBase(DEFAULT_PF_BASE) .pfStopMonth(DEFAULT_PF_STOP_MONTH) .pfRemark(DEFAULT_PF_REMARK) .ssAccount(DEFAULT_SS_ACCOUNT) .ssCity(DEFAULT_SS_CITY) .ssStartMonth(DEFAULT_SS_START_MONTH) .ssBase(DEFAULT_SS_BASE) .ssStopMonth(DEFAULT_SS_STOP_MONTH) .ssRemark(DEFAULT_SS_REMARK) .allowance(DEFAULT_ALLOWANCE) .taxpayer(DEFAULT_TAXPAYER) .isSelfVerify(DEFAULT_IS_SELF_VERIFY) .isHrVerify(DEFAULT_IS_HR_VERIFY); return socialSecurityBenefits; } /** * Create an updated entity for this test. * * This is a static method, as tests for other entities might also need it, * if they test an entity which requires the current entity. */ public static SocialSecurityBenefits createUpdatedEntity(EntityManager em) { SocialSecurityBenefits socialSecurityBenefits = new SocialSecurityBenefits() .code(UPDATED_CODE) .pfAccount(UPDATED_PF_ACCOUNT) .spfAccount(UPDATED_SPF_ACCOUNT) .pfStartMonth(UPDATED_PF_START_MONTH) .pfBase(UPDATED_PF_BASE) .pfStopMonth(UPDATED_PF_STOP_MONTH) .pfRemark(UPDATED_PF_REMARK) .ssAccount(UPDATED_SS_ACCOUNT) .ssCity(UPDATED_SS_CITY) .ssStartMonth(UPDATED_SS_START_MONTH) .ssBase(UPDATED_SS_BASE) .ssStopMonth(UPDATED_SS_STOP_MONTH) .ssRemark(UPDATED_SS_REMARK) .allowance(UPDATED_ALLOWANCE) .taxpayer(UPDATED_TAXPAYER) .isSelfVerify(UPDATED_IS_SELF_VERIFY) .isHrVerify(UPDATED_IS_HR_VERIFY); return socialSecurityBenefits; } @BeforeEach public void initTest() { socialSecurityBenefits = createEntity(em); } @Test @Transactional public void createSocialSecurityBenefits() throws Exception { int databaseSizeBeforeCreate = socialSecurityBenefitsRepository.findAll().size(); // Create the SocialSecurityBenefits SocialSecurityBenefitsDTO socialSecurityBenefitsDTO = socialSecurityBenefitsMapper.toDto(socialSecurityBenefits); restSocialSecurityBenefitsMockMvc.perform(post("/api/social-security-benefits") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(socialSecurityBenefitsDTO))) .andExpect(status().isCreated()); // Validate the SocialSecurityBenefits in the database List<SocialSecurityBenefits> socialSecurityBenefitsList = socialSecurityBenefitsRepository.findAll(); assertThat(socialSecurityBenefitsList).hasSize(databaseSizeBeforeCreate + 1); SocialSecurityBenefits testSocialSecurityBenefits = socialSecurityBenefitsList.get(socialSecurityBenefitsList.size() - 1); assertThat(testSocialSecurityBenefits.getCode()).isEqualTo(DEFAULT_CODE); assertThat(testSocialSecurityBenefits.getPfAccount()).isEqualTo(DEFAULT_PF_ACCOUNT); assertThat(testSocialSecurityBenefits.getSpfAccount()).isEqualTo(DEFAULT_SPF_ACCOUNT); assertThat(testSocialSecurityBenefits.getPfStartMonth()).isEqualTo(DEFAULT_PF_START_MONTH); assertThat(testSocialSecurityBenefits.getPfBase()).isEqualTo(DEFAULT_PF_BASE); assertThat(testSocialSecurityBenefits.getPfStopMonth()).isEqualTo(DEFAULT_PF_STOP_MONTH); assertThat(testSocialSecurityBenefits.getPfRemark()).isEqualTo(DEFAULT_PF_REMARK); assertThat(testSocialSecurityBenefits.getSsAccount()).isEqualTo(DEFAULT_SS_ACCOUNT); assertThat(testSocialSecurityBenefits.getSsCity()).isEqualTo(DEFAULT_SS_CITY); assertThat(testSocialSecurityBenefits.getSsStartMonth()).isEqualTo(DEFAULT_SS_START_MONTH); assertThat(testSocialSecurityBenefits.getSsBase()).isEqualTo(DEFAULT_SS_BASE); assertThat(testSocialSecurityBenefits.getSsStopMonth()).isEqualTo(DEFAULT_SS_STOP_MONTH); assertThat(testSocialSecurityBenefits.getSsRemark()).isEqualTo(DEFAULT_SS_REMARK); assertThat(testSocialSecurityBenefits.getAllowance()).isEqualTo(DEFAULT_ALLOWANCE); assertThat(testSocialSecurityBenefits.getTaxpayer()).isEqualTo(DEFAULT_TAXPAYER); assertThat(testSocialSecurityBenefits.isIsSelfVerify()).isEqualTo(DEFAULT_IS_SELF_VERIFY); assertThat(testSocialSecurityBenefits.isIsHrVerify()).isEqualTo(DEFAULT_IS_HR_VERIFY); } @Test @Transactional public void createSocialSecurityBenefitsWithExistingId() throws Exception { int databaseSizeBeforeCreate = socialSecurityBenefitsRepository.findAll().size(); // Create the SocialSecurityBenefits with an existing ID socialSecurityBenefits.setId(1L); SocialSecurityBenefitsDTO socialSecurityBenefitsDTO = socialSecurityBenefitsMapper.toDto(socialSecurityBenefits); // An entity with an existing ID cannot be created, so this API call must fail restSocialSecurityBenefitsMockMvc.perform(post("/api/social-security-benefits") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(socialSecurityBenefitsDTO))) .andExpect(status().isBadRequest()); // Validate the SocialSecurityBenefits in the database List<SocialSecurityBenefits> socialSecurityBenefitsList = socialSecurityBenefitsRepository.findAll(); assertThat(socialSecurityBenefitsList).hasSize(databaseSizeBeforeCreate); } @Test @Transactional public void getAllSocialSecurityBenefits() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList restSocialSecurityBenefitsMockMvc.perform(get("/api/social-security-benefits?sort=id,desc")) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.[*].id").value(hasItem(socialSecurityBenefits.getId().intValue()))) .andExpect(jsonPath("$.[*].code").value(hasItem(DEFAULT_CODE.toString()))) .andExpect(jsonPath("$.[*].pfAccount").value(hasItem(DEFAULT_PF_ACCOUNT.toString()))) .andExpect(jsonPath("$.[*].spfAccount").value(hasItem(DEFAULT_SPF_ACCOUNT.toString()))) .andExpect(jsonPath("$.[*].pfStartMonth").value(hasItem(DEFAULT_PF_START_MONTH.toString()))) .andExpect(jsonPath("$.[*].pfBase").value(hasItem(DEFAULT_PF_BASE))) .andExpect(jsonPath("$.[*].pfStopMonth").value(hasItem(DEFAULT_PF_STOP_MONTH.toString()))) .andExpect(jsonPath("$.[*].pfRemark").value(hasItem(DEFAULT_PF_REMARK.toString()))) .andExpect(jsonPath("$.[*].ssAccount").value(hasItem(DEFAULT_SS_ACCOUNT.toString()))) .andExpect(jsonPath("$.[*].ssCity").value(hasItem(DEFAULT_SS_CITY.toString()))) .andExpect(jsonPath("$.[*].ssStartMonth").value(hasItem(DEFAULT_SS_START_MONTH.toString()))) .andExpect(jsonPath("$.[*].ssBase").value(hasItem(DEFAULT_SS_BASE))) .andExpect(jsonPath("$.[*].ssStopMonth").value(hasItem(DEFAULT_SS_STOP_MONTH.toString()))) .andExpect(jsonPath("$.[*].ssRemark").value(hasItem(DEFAULT_SS_REMARK.toString()))) .andExpect(jsonPath("$.[*].allowance").value(hasItem(DEFAULT_ALLOWANCE.intValue()))) .andExpect(jsonPath("$.[*].taxpayer").value(hasItem(DEFAULT_TAXPAYER.toString()))) .andExpect(jsonPath("$.[*].isSelfVerify").value(hasItem(DEFAULT_IS_SELF_VERIFY.booleanValue()))) .andExpect(jsonPath("$.[*].isHrVerify").value(hasItem(DEFAULT_IS_HR_VERIFY.booleanValue()))); } @Test @Transactional public void getSocialSecurityBenefits() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get the socialSecurityBenefits restSocialSecurityBenefitsMockMvc.perform(get("/api/social-security-benefits/{id}", socialSecurityBenefits.getId())) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.id").value(socialSecurityBenefits.getId().intValue())) .andExpect(jsonPath("$.code").value(DEFAULT_CODE.toString())) .andExpect(jsonPath("$.pfAccount").value(DEFAULT_PF_ACCOUNT.toString())) .andExpect(jsonPath("$.spfAccount").value(DEFAULT_SPF_ACCOUNT.toString())) .andExpect(jsonPath("$.pfStartMonth").value(DEFAULT_PF_START_MONTH.toString())) .andExpect(jsonPath("$.pfBase").value(DEFAULT_PF_BASE)) .andExpect(jsonPath("$.pfStopMonth").value(DEFAULT_PF_STOP_MONTH.toString())) .andExpect(jsonPath("$.pfRemark").value(DEFAULT_PF_REMARK.toString())) .andExpect(jsonPath("$.ssAccount").value(DEFAULT_SS_ACCOUNT.toString())) .andExpect(jsonPath("$.ssCity").value(DEFAULT_SS_CITY.toString())) .andExpect(jsonPath("$.ssStartMonth").value(DEFAULT_SS_START_MONTH.toString())) .andExpect(jsonPath("$.ssBase").value(DEFAULT_SS_BASE)) .andExpect(jsonPath("$.ssStopMonth").value(DEFAULT_SS_STOP_MONTH.toString())) .andExpect(jsonPath("$.ssRemark").value(DEFAULT_SS_REMARK.toString())) .andExpect(jsonPath("$.allowance").value(DEFAULT_ALLOWANCE.intValue())) .andExpect(jsonPath("$.taxpayer").value(DEFAULT_TAXPAYER.toString())) .andExpect(jsonPath("$.isSelfVerify").value(DEFAULT_IS_SELF_VERIFY.booleanValue())) .andExpect(jsonPath("$.isHrVerify").value(DEFAULT_IS_HR_VERIFY.booleanValue())); } @Test @Transactional public void getAllSocialSecurityBenefitsByCodeIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where code equals to DEFAULT_CODE defaultSocialSecurityBenefitsShouldBeFound("code.equals=" + DEFAULT_CODE); // Get all the socialSecurityBenefitsList where code equals to UPDATED_CODE defaultSocialSecurityBenefitsShouldNotBeFound("code.equals=" + UPDATED_CODE); } @Test @Transactional public void getAllSocialSecurityBenefitsByCodeIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where code in DEFAULT_CODE or UPDATED_CODE defaultSocialSecurityBenefitsShouldBeFound("code.in=" + DEFAULT_CODE + "," + UPDATED_CODE); // Get all the socialSecurityBenefitsList where code equals to UPDATED_CODE defaultSocialSecurityBenefitsShouldNotBeFound("code.in=" + UPDATED_CODE); } @Test @Transactional public void getAllSocialSecurityBenefitsByCodeIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where code is not null defaultSocialSecurityBenefitsShouldBeFound("code.specified=true"); // Get all the socialSecurityBenefitsList where code is null defaultSocialSecurityBenefitsShouldNotBeFound("code.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfAccountIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfAccount equals to DEFAULT_PF_ACCOUNT defaultSocialSecurityBenefitsShouldBeFound("pfAccount.equals=" + DEFAULT_PF_ACCOUNT); // Get all the socialSecurityBenefitsList where pfAccount equals to UPDATED_PF_ACCOUNT defaultSocialSecurityBenefitsShouldNotBeFound("pfAccount.equals=" + UPDATED_PF_ACCOUNT); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfAccountIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfAccount in DEFAULT_PF_ACCOUNT or UPDATED_PF_ACCOUNT defaultSocialSecurityBenefitsShouldBeFound("pfAccount.in=" + DEFAULT_PF_ACCOUNT + "," + UPDATED_PF_ACCOUNT); // Get all the socialSecurityBenefitsList where pfAccount equals to UPDATED_PF_ACCOUNT defaultSocialSecurityBenefitsShouldNotBeFound("pfAccount.in=" + UPDATED_PF_ACCOUNT); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfAccountIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfAccount is not null defaultSocialSecurityBenefitsShouldBeFound("pfAccount.specified=true"); // Get all the socialSecurityBenefitsList where pfAccount is null defaultSocialSecurityBenefitsShouldNotBeFound("pfAccount.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsBySpfAccountIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where spfAccount equals to DEFAULT_SPF_ACCOUNT defaultSocialSecurityBenefitsShouldBeFound("spfAccount.equals=" + DEFAULT_SPF_ACCOUNT); // Get all the socialSecurityBenefitsList where spfAccount equals to UPDATED_SPF_ACCOUNT defaultSocialSecurityBenefitsShouldNotBeFound("spfAccount.equals=" + UPDATED_SPF_ACCOUNT); } @Test @Transactional public void getAllSocialSecurityBenefitsBySpfAccountIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where spfAccount in DEFAULT_SPF_ACCOUNT or UPDATED_SPF_ACCOUNT defaultSocialSecurityBenefitsShouldBeFound("spfAccount.in=" + DEFAULT_SPF_ACCOUNT + "," + UPDATED_SPF_ACCOUNT); // Get all the socialSecurityBenefitsList where spfAccount equals to UPDATED_SPF_ACCOUNT defaultSocialSecurityBenefitsShouldNotBeFound("spfAccount.in=" + UPDATED_SPF_ACCOUNT); } @Test @Transactional public void getAllSocialSecurityBenefitsBySpfAccountIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where spfAccount is not null defaultSocialSecurityBenefitsShouldBeFound("spfAccount.specified=true"); // Get all the socialSecurityBenefitsList where spfAccount is null defaultSocialSecurityBenefitsShouldNotBeFound("spfAccount.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStartMonthIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStartMonth equals to DEFAULT_PF_START_MONTH defaultSocialSecurityBenefitsShouldBeFound("pfStartMonth.equals=" + DEFAULT_PF_START_MONTH); // Get all the socialSecurityBenefitsList where pfStartMonth equals to UPDATED_PF_START_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("pfStartMonth.equals=" + UPDATED_PF_START_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStartMonthIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStartMonth in DEFAULT_PF_START_MONTH or UPDATED_PF_START_MONTH defaultSocialSecurityBenefitsShouldBeFound("pfStartMonth.in=" + DEFAULT_PF_START_MONTH + "," + UPDATED_PF_START_MONTH); // Get all the socialSecurityBenefitsList where pfStartMonth equals to UPDATED_PF_START_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("pfStartMonth.in=" + UPDATED_PF_START_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStartMonthIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStartMonth is not null defaultSocialSecurityBenefitsShouldBeFound("pfStartMonth.specified=true"); // Get all the socialSecurityBenefitsList where pfStartMonth is null defaultSocialSecurityBenefitsShouldNotBeFound("pfStartMonth.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStartMonthIsGreaterThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStartMonth is greater than or equal to DEFAULT_PF_START_MONTH defaultSocialSecurityBenefitsShouldBeFound("pfStartMonth.greaterThanOrEqual=" + DEFAULT_PF_START_MONTH); // Get all the socialSecurityBenefitsList where pfStartMonth is greater than or equal to UPDATED_PF_START_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("pfStartMonth.greaterThanOrEqual=" + UPDATED_PF_START_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStartMonthIsLessThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStartMonth is less than or equal to DEFAULT_PF_START_MONTH defaultSocialSecurityBenefitsShouldBeFound("pfStartMonth.lessThanOrEqual=" + DEFAULT_PF_START_MONTH); // Get all the socialSecurityBenefitsList where pfStartMonth is less than or equal to SMALLER_PF_START_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("pfStartMonth.lessThanOrEqual=" + SMALLER_PF_START_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStartMonthIsLessThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStartMonth is less than DEFAULT_PF_START_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("pfStartMonth.lessThan=" + DEFAULT_PF_START_MONTH); // Get all the socialSecurityBenefitsList where pfStartMonth is less than UPDATED_PF_START_MONTH defaultSocialSecurityBenefitsShouldBeFound("pfStartMonth.lessThan=" + UPDATED_PF_START_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStartMonthIsGreaterThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStartMonth is greater than DEFAULT_PF_START_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("pfStartMonth.greaterThan=" + DEFAULT_PF_START_MONTH); // Get all the socialSecurityBenefitsList where pfStartMonth is greater than SMALLER_PF_START_MONTH defaultSocialSecurityBenefitsShouldBeFound("pfStartMonth.greaterThan=" + SMALLER_PF_START_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfBaseIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfBase equals to DEFAULT_PF_BASE defaultSocialSecurityBenefitsShouldBeFound("pfBase.equals=" + DEFAULT_PF_BASE); // Get all the socialSecurityBenefitsList where pfBase equals to UPDATED_PF_BASE defaultSocialSecurityBenefitsShouldNotBeFound("pfBase.equals=" + UPDATED_PF_BASE); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfBaseIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfBase in DEFAULT_PF_BASE or UPDATED_PF_BASE defaultSocialSecurityBenefitsShouldBeFound("pfBase.in=" + DEFAULT_PF_BASE + "," + UPDATED_PF_BASE); // Get all the socialSecurityBenefitsList where pfBase equals to UPDATED_PF_BASE defaultSocialSecurityBenefitsShouldNotBeFound("pfBase.in=" + UPDATED_PF_BASE); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfBaseIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfBase is not null defaultSocialSecurityBenefitsShouldBeFound("pfBase.specified=true"); // Get all the socialSecurityBenefitsList where pfBase is null defaultSocialSecurityBenefitsShouldNotBeFound("pfBase.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfBaseIsGreaterThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfBase is greater than or equal to DEFAULT_PF_BASE defaultSocialSecurityBenefitsShouldBeFound("pfBase.greaterThanOrEqual=" + DEFAULT_PF_BASE); // Get all the socialSecurityBenefitsList where pfBase is greater than or equal to UPDATED_PF_BASE defaultSocialSecurityBenefitsShouldNotBeFound("pfBase.greaterThanOrEqual=" + UPDATED_PF_BASE); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfBaseIsLessThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfBase is less than or equal to DEFAULT_PF_BASE defaultSocialSecurityBenefitsShouldBeFound("pfBase.lessThanOrEqual=" + DEFAULT_PF_BASE); // Get all the socialSecurityBenefitsList where pfBase is less than or equal to SMALLER_PF_BASE defaultSocialSecurityBenefitsShouldNotBeFound("pfBase.lessThanOrEqual=" + SMALLER_PF_BASE); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfBaseIsLessThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfBase is less than DEFAULT_PF_BASE defaultSocialSecurityBenefitsShouldNotBeFound("pfBase.lessThan=" + DEFAULT_PF_BASE); // Get all the socialSecurityBenefitsList where pfBase is less than UPDATED_PF_BASE defaultSocialSecurityBenefitsShouldBeFound("pfBase.lessThan=" + UPDATED_PF_BASE); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfBaseIsGreaterThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfBase is greater than DEFAULT_PF_BASE defaultSocialSecurityBenefitsShouldNotBeFound("pfBase.greaterThan=" + DEFAULT_PF_BASE); // Get all the socialSecurityBenefitsList where pfBase is greater than SMALLER_PF_BASE defaultSocialSecurityBenefitsShouldBeFound("pfBase.greaterThan=" + SMALLER_PF_BASE); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStopMonthIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStopMonth equals to DEFAULT_PF_STOP_MONTH defaultSocialSecurityBenefitsShouldBeFound("pfStopMonth.equals=" + DEFAULT_PF_STOP_MONTH); // Get all the socialSecurityBenefitsList where pfStopMonth equals to UPDATED_PF_STOP_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("pfStopMonth.equals=" + UPDATED_PF_STOP_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStopMonthIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStopMonth in DEFAULT_PF_STOP_MONTH or UPDATED_PF_STOP_MONTH defaultSocialSecurityBenefitsShouldBeFound("pfStopMonth.in=" + DEFAULT_PF_STOP_MONTH + "," + UPDATED_PF_STOP_MONTH); // Get all the socialSecurityBenefitsList where pfStopMonth equals to UPDATED_PF_STOP_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("pfStopMonth.in=" + UPDATED_PF_STOP_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStopMonthIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStopMonth is not null defaultSocialSecurityBenefitsShouldBeFound("pfStopMonth.specified=true"); // Get all the socialSecurityBenefitsList where pfStopMonth is null defaultSocialSecurityBenefitsShouldNotBeFound("pfStopMonth.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStopMonthIsGreaterThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStopMonth is greater than or equal to DEFAULT_PF_STOP_MONTH defaultSocialSecurityBenefitsShouldBeFound("pfStopMonth.greaterThanOrEqual=" + DEFAULT_PF_STOP_MONTH); // Get all the socialSecurityBenefitsList where pfStopMonth is greater than or equal to UPDATED_PF_STOP_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("pfStopMonth.greaterThanOrEqual=" + UPDATED_PF_STOP_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStopMonthIsLessThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStopMonth is less than or equal to DEFAULT_PF_STOP_MONTH defaultSocialSecurityBenefitsShouldBeFound("pfStopMonth.lessThanOrEqual=" + DEFAULT_PF_STOP_MONTH); // Get all the socialSecurityBenefitsList where pfStopMonth is less than or equal to SMALLER_PF_STOP_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("pfStopMonth.lessThanOrEqual=" + SMALLER_PF_STOP_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStopMonthIsLessThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStopMonth is less than DEFAULT_PF_STOP_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("pfStopMonth.lessThan=" + DEFAULT_PF_STOP_MONTH); // Get all the socialSecurityBenefitsList where pfStopMonth is less than UPDATED_PF_STOP_MONTH defaultSocialSecurityBenefitsShouldBeFound("pfStopMonth.lessThan=" + UPDATED_PF_STOP_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStopMonthIsGreaterThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfStopMonth is greater than DEFAULT_PF_STOP_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("pfStopMonth.greaterThan=" + DEFAULT_PF_STOP_MONTH); // Get all the socialSecurityBenefitsList where pfStopMonth is greater than SMALLER_PF_STOP_MONTH defaultSocialSecurityBenefitsShouldBeFound("pfStopMonth.greaterThan=" + SMALLER_PF_STOP_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfRemarkIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfRemark equals to DEFAULT_PF_REMARK defaultSocialSecurityBenefitsShouldBeFound("pfRemark.equals=" + DEFAULT_PF_REMARK); // Get all the socialSecurityBenefitsList where pfRemark equals to UPDATED_PF_REMARK defaultSocialSecurityBenefitsShouldNotBeFound("pfRemark.equals=" + UPDATED_PF_REMARK); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfRemarkIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfRemark in DEFAULT_PF_REMARK or UPDATED_PF_REMARK defaultSocialSecurityBenefitsShouldBeFound("pfRemark.in=" + DEFAULT_PF_REMARK + "," + UPDATED_PF_REMARK); // Get all the socialSecurityBenefitsList where pfRemark equals to UPDATED_PF_REMARK defaultSocialSecurityBenefitsShouldNotBeFound("pfRemark.in=" + UPDATED_PF_REMARK); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfRemarkIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where pfRemark is not null defaultSocialSecurityBenefitsShouldBeFound("pfRemark.specified=true"); // Get all the socialSecurityBenefitsList where pfRemark is null defaultSocialSecurityBenefitsShouldNotBeFound("pfRemark.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsAccountIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssAccount equals to DEFAULT_SS_ACCOUNT defaultSocialSecurityBenefitsShouldBeFound("ssAccount.equals=" + DEFAULT_SS_ACCOUNT); // Get all the socialSecurityBenefitsList where ssAccount equals to UPDATED_SS_ACCOUNT defaultSocialSecurityBenefitsShouldNotBeFound("ssAccount.equals=" + UPDATED_SS_ACCOUNT); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsAccountIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssAccount in DEFAULT_SS_ACCOUNT or UPDATED_SS_ACCOUNT defaultSocialSecurityBenefitsShouldBeFound("ssAccount.in=" + DEFAULT_SS_ACCOUNT + "," + UPDATED_SS_ACCOUNT); // Get all the socialSecurityBenefitsList where ssAccount equals to UPDATED_SS_ACCOUNT defaultSocialSecurityBenefitsShouldNotBeFound("ssAccount.in=" + UPDATED_SS_ACCOUNT); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsAccountIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssAccount is not null defaultSocialSecurityBenefitsShouldBeFound("ssAccount.specified=true"); // Get all the socialSecurityBenefitsList where ssAccount is null defaultSocialSecurityBenefitsShouldNotBeFound("ssAccount.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsCityIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssCity equals to DEFAULT_SS_CITY defaultSocialSecurityBenefitsShouldBeFound("ssCity.equals=" + DEFAULT_SS_CITY); // Get all the socialSecurityBenefitsList where ssCity equals to UPDATED_SS_CITY defaultSocialSecurityBenefitsShouldNotBeFound("ssCity.equals=" + UPDATED_SS_CITY); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsCityIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssCity in DEFAULT_SS_CITY or UPDATED_SS_CITY defaultSocialSecurityBenefitsShouldBeFound("ssCity.in=" + DEFAULT_SS_CITY + "," + UPDATED_SS_CITY); // Get all the socialSecurityBenefitsList where ssCity equals to UPDATED_SS_CITY defaultSocialSecurityBenefitsShouldNotBeFound("ssCity.in=" + UPDATED_SS_CITY); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsCityIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssCity is not null defaultSocialSecurityBenefitsShouldBeFound("ssCity.specified=true"); // Get all the socialSecurityBenefitsList where ssCity is null defaultSocialSecurityBenefitsShouldNotBeFound("ssCity.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStartMonthIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStartMonth equals to DEFAULT_SS_START_MONTH defaultSocialSecurityBenefitsShouldBeFound("ssStartMonth.equals=" + DEFAULT_SS_START_MONTH); // Get all the socialSecurityBenefitsList where ssStartMonth equals to UPDATED_SS_START_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("ssStartMonth.equals=" + UPDATED_SS_START_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStartMonthIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStartMonth in DEFAULT_SS_START_MONTH or UPDATED_SS_START_MONTH defaultSocialSecurityBenefitsShouldBeFound("ssStartMonth.in=" + DEFAULT_SS_START_MONTH + "," + UPDATED_SS_START_MONTH); // Get all the socialSecurityBenefitsList where ssStartMonth equals to UPDATED_SS_START_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("ssStartMonth.in=" + UPDATED_SS_START_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStartMonthIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStartMonth is not null defaultSocialSecurityBenefitsShouldBeFound("ssStartMonth.specified=true"); // Get all the socialSecurityBenefitsList where ssStartMonth is null defaultSocialSecurityBenefitsShouldNotBeFound("ssStartMonth.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStartMonthIsGreaterThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStartMonth is greater than or equal to DEFAULT_SS_START_MONTH defaultSocialSecurityBenefitsShouldBeFound("ssStartMonth.greaterThanOrEqual=" + DEFAULT_SS_START_MONTH); // Get all the socialSecurityBenefitsList where ssStartMonth is greater than or equal to UPDATED_SS_START_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("ssStartMonth.greaterThanOrEqual=" + UPDATED_SS_START_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStartMonthIsLessThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStartMonth is less than or equal to DEFAULT_SS_START_MONTH defaultSocialSecurityBenefitsShouldBeFound("ssStartMonth.lessThanOrEqual=" + DEFAULT_SS_START_MONTH); // Get all the socialSecurityBenefitsList where ssStartMonth is less than or equal to SMALLER_SS_START_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("ssStartMonth.lessThanOrEqual=" + SMALLER_SS_START_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStartMonthIsLessThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStartMonth is less than DEFAULT_SS_START_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("ssStartMonth.lessThan=" + DEFAULT_SS_START_MONTH); // Get all the socialSecurityBenefitsList where ssStartMonth is less than UPDATED_SS_START_MONTH defaultSocialSecurityBenefitsShouldBeFound("ssStartMonth.lessThan=" + UPDATED_SS_START_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStartMonthIsGreaterThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStartMonth is greater than DEFAULT_SS_START_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("ssStartMonth.greaterThan=" + DEFAULT_SS_START_MONTH); // Get all the socialSecurityBenefitsList where ssStartMonth is greater than SMALLER_SS_START_MONTH defaultSocialSecurityBenefitsShouldBeFound("ssStartMonth.greaterThan=" + SMALLER_SS_START_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsBaseIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssBase equals to DEFAULT_SS_BASE defaultSocialSecurityBenefitsShouldBeFound("ssBase.equals=" + DEFAULT_SS_BASE); // Get all the socialSecurityBenefitsList where ssBase equals to UPDATED_SS_BASE defaultSocialSecurityBenefitsShouldNotBeFound("ssBase.equals=" + UPDATED_SS_BASE); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsBaseIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssBase in DEFAULT_SS_BASE or UPDATED_SS_BASE defaultSocialSecurityBenefitsShouldBeFound("ssBase.in=" + DEFAULT_SS_BASE + "," + UPDATED_SS_BASE); // Get all the socialSecurityBenefitsList where ssBase equals to UPDATED_SS_BASE defaultSocialSecurityBenefitsShouldNotBeFound("ssBase.in=" + UPDATED_SS_BASE); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsBaseIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssBase is not null defaultSocialSecurityBenefitsShouldBeFound("ssBase.specified=true"); // Get all the socialSecurityBenefitsList where ssBase is null defaultSocialSecurityBenefitsShouldNotBeFound("ssBase.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsBaseIsGreaterThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssBase is greater than or equal to DEFAULT_SS_BASE defaultSocialSecurityBenefitsShouldBeFound("ssBase.greaterThanOrEqual=" + DEFAULT_SS_BASE); // Get all the socialSecurityBenefitsList where ssBase is greater than or equal to UPDATED_SS_BASE defaultSocialSecurityBenefitsShouldNotBeFound("ssBase.greaterThanOrEqual=" + UPDATED_SS_BASE); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsBaseIsLessThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssBase is less than or equal to DEFAULT_SS_BASE defaultSocialSecurityBenefitsShouldBeFound("ssBase.lessThanOrEqual=" + DEFAULT_SS_BASE); // Get all the socialSecurityBenefitsList where ssBase is less than or equal to SMALLER_SS_BASE defaultSocialSecurityBenefitsShouldNotBeFound("ssBase.lessThanOrEqual=" + SMALLER_SS_BASE); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsBaseIsLessThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssBase is less than DEFAULT_SS_BASE defaultSocialSecurityBenefitsShouldNotBeFound("ssBase.lessThan=" + DEFAULT_SS_BASE); // Get all the socialSecurityBenefitsList where ssBase is less than UPDATED_SS_BASE defaultSocialSecurityBenefitsShouldBeFound("ssBase.lessThan=" + UPDATED_SS_BASE); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsBaseIsGreaterThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssBase is greater than DEFAULT_SS_BASE defaultSocialSecurityBenefitsShouldNotBeFound("ssBase.greaterThan=" + DEFAULT_SS_BASE); // Get all the socialSecurityBenefitsList where ssBase is greater than SMALLER_SS_BASE defaultSocialSecurityBenefitsShouldBeFound("ssBase.greaterThan=" + SMALLER_SS_BASE); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStopMonthIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStopMonth equals to DEFAULT_SS_STOP_MONTH defaultSocialSecurityBenefitsShouldBeFound("ssStopMonth.equals=" + DEFAULT_SS_STOP_MONTH); // Get all the socialSecurityBenefitsList where ssStopMonth equals to UPDATED_SS_STOP_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("ssStopMonth.equals=" + UPDATED_SS_STOP_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStopMonthIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStopMonth in DEFAULT_SS_STOP_MONTH or UPDATED_SS_STOP_MONTH defaultSocialSecurityBenefitsShouldBeFound("ssStopMonth.in=" + DEFAULT_SS_STOP_MONTH + "," + UPDATED_SS_STOP_MONTH); // Get all the socialSecurityBenefitsList where ssStopMonth equals to UPDATED_SS_STOP_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("ssStopMonth.in=" + UPDATED_SS_STOP_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStopMonthIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStopMonth is not null defaultSocialSecurityBenefitsShouldBeFound("ssStopMonth.specified=true"); // Get all the socialSecurityBenefitsList where ssStopMonth is null defaultSocialSecurityBenefitsShouldNotBeFound("ssStopMonth.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStopMonthIsGreaterThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStopMonth is greater than or equal to DEFAULT_SS_STOP_MONTH defaultSocialSecurityBenefitsShouldBeFound("ssStopMonth.greaterThanOrEqual=" + DEFAULT_SS_STOP_MONTH); // Get all the socialSecurityBenefitsList where ssStopMonth is greater than or equal to UPDATED_SS_STOP_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("ssStopMonth.greaterThanOrEqual=" + UPDATED_SS_STOP_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStopMonthIsLessThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStopMonth is less than or equal to DEFAULT_SS_STOP_MONTH defaultSocialSecurityBenefitsShouldBeFound("ssStopMonth.lessThanOrEqual=" + DEFAULT_SS_STOP_MONTH); // Get all the socialSecurityBenefitsList where ssStopMonth is less than or equal to SMALLER_SS_STOP_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("ssStopMonth.lessThanOrEqual=" + SMALLER_SS_STOP_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStopMonthIsLessThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStopMonth is less than DEFAULT_SS_STOP_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("ssStopMonth.lessThan=" + DEFAULT_SS_STOP_MONTH); // Get all the socialSecurityBenefitsList where ssStopMonth is less than UPDATED_SS_STOP_MONTH defaultSocialSecurityBenefitsShouldBeFound("ssStopMonth.lessThan=" + UPDATED_SS_STOP_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStopMonthIsGreaterThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssStopMonth is greater than DEFAULT_SS_STOP_MONTH defaultSocialSecurityBenefitsShouldNotBeFound("ssStopMonth.greaterThan=" + DEFAULT_SS_STOP_MONTH); // Get all the socialSecurityBenefitsList where ssStopMonth is greater than SMALLER_SS_STOP_MONTH defaultSocialSecurityBenefitsShouldBeFound("ssStopMonth.greaterThan=" + SMALLER_SS_STOP_MONTH); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsRemarkIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssRemark equals to DEFAULT_SS_REMARK defaultSocialSecurityBenefitsShouldBeFound("ssRemark.equals=" + DEFAULT_SS_REMARK); // Get all the socialSecurityBenefitsList where ssRemark equals to UPDATED_SS_REMARK defaultSocialSecurityBenefitsShouldNotBeFound("ssRemark.equals=" + UPDATED_SS_REMARK); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsRemarkIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssRemark in DEFAULT_SS_REMARK or UPDATED_SS_REMARK defaultSocialSecurityBenefitsShouldBeFound("ssRemark.in=" + DEFAULT_SS_REMARK + "," + UPDATED_SS_REMARK); // Get all the socialSecurityBenefitsList where ssRemark equals to UPDATED_SS_REMARK defaultSocialSecurityBenefitsShouldNotBeFound("ssRemark.in=" + UPDATED_SS_REMARK); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsRemarkIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where ssRemark is not null defaultSocialSecurityBenefitsShouldBeFound("ssRemark.specified=true"); // Get all the socialSecurityBenefitsList where ssRemark is null defaultSocialSecurityBenefitsShouldNotBeFound("ssRemark.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsByAllowanceIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where allowance equals to DEFAULT_ALLOWANCE defaultSocialSecurityBenefitsShouldBeFound("allowance.equals=" + DEFAULT_ALLOWANCE); // Get all the socialSecurityBenefitsList where allowance equals to UPDATED_ALLOWANCE defaultSocialSecurityBenefitsShouldNotBeFound("allowance.equals=" + UPDATED_ALLOWANCE); } @Test @Transactional public void getAllSocialSecurityBenefitsByAllowanceIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where allowance in DEFAULT_ALLOWANCE or UPDATED_ALLOWANCE defaultSocialSecurityBenefitsShouldBeFound("allowance.in=" + DEFAULT_ALLOWANCE + "," + UPDATED_ALLOWANCE); // Get all the socialSecurityBenefitsList where allowance equals to UPDATED_ALLOWANCE defaultSocialSecurityBenefitsShouldNotBeFound("allowance.in=" + UPDATED_ALLOWANCE); } @Test @Transactional public void getAllSocialSecurityBenefitsByAllowanceIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where allowance is not null defaultSocialSecurityBenefitsShouldBeFound("allowance.specified=true"); // Get all the socialSecurityBenefitsList where allowance is null defaultSocialSecurityBenefitsShouldNotBeFound("allowance.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsByAllowanceIsGreaterThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where allowance is greater than or equal to DEFAULT_ALLOWANCE defaultSocialSecurityBenefitsShouldBeFound("allowance.greaterThanOrEqual=" + DEFAULT_ALLOWANCE); // Get all the socialSecurityBenefitsList where allowance is greater than or equal to UPDATED_ALLOWANCE defaultSocialSecurityBenefitsShouldNotBeFound("allowance.greaterThanOrEqual=" + UPDATED_ALLOWANCE); } @Test @Transactional public void getAllSocialSecurityBenefitsByAllowanceIsLessThanOrEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where allowance is less than or equal to DEFAULT_ALLOWANCE defaultSocialSecurityBenefitsShouldBeFound("allowance.lessThanOrEqual=" + DEFAULT_ALLOWANCE); // Get all the socialSecurityBenefitsList where allowance is less than or equal to SMALLER_ALLOWANCE defaultSocialSecurityBenefitsShouldNotBeFound("allowance.lessThanOrEqual=" + SMALLER_ALLOWANCE); } @Test @Transactional public void getAllSocialSecurityBenefitsByAllowanceIsLessThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where allowance is less than DEFAULT_ALLOWANCE defaultSocialSecurityBenefitsShouldNotBeFound("allowance.lessThan=" + DEFAULT_ALLOWANCE); // Get all the socialSecurityBenefitsList where allowance is less than UPDATED_ALLOWANCE defaultSocialSecurityBenefitsShouldBeFound("allowance.lessThan=" + UPDATED_ALLOWANCE); } @Test @Transactional public void getAllSocialSecurityBenefitsByAllowanceIsGreaterThanSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where allowance is greater than DEFAULT_ALLOWANCE defaultSocialSecurityBenefitsShouldNotBeFound("allowance.greaterThan=" + DEFAULT_ALLOWANCE); // Get all the socialSecurityBenefitsList where allowance is greater than SMALLER_ALLOWANCE defaultSocialSecurityBenefitsShouldBeFound("allowance.greaterThan=" + SMALLER_ALLOWANCE); } @Test @Transactional public void getAllSocialSecurityBenefitsByTaxpayerIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where taxpayer equals to DEFAULT_TAXPAYER defaultSocialSecurityBenefitsShouldBeFound("taxpayer.equals=" + DEFAULT_TAXPAYER); // Get all the socialSecurityBenefitsList where taxpayer equals to UPDATED_TAXPAYER defaultSocialSecurityBenefitsShouldNotBeFound("taxpayer.equals=" + UPDATED_TAXPAYER); } @Test @Transactional public void getAllSocialSecurityBenefitsByTaxpayerIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where taxpayer in DEFAULT_TAXPAYER or UPDATED_TAXPAYER defaultSocialSecurityBenefitsShouldBeFound("taxpayer.in=" + DEFAULT_TAXPAYER + "," + UPDATED_TAXPAYER); // Get all the socialSecurityBenefitsList where taxpayer equals to UPDATED_TAXPAYER defaultSocialSecurityBenefitsShouldNotBeFound("taxpayer.in=" + UPDATED_TAXPAYER); } @Test @Transactional public void getAllSocialSecurityBenefitsByTaxpayerIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where taxpayer is not null defaultSocialSecurityBenefitsShouldBeFound("taxpayer.specified=true"); // Get all the socialSecurityBenefitsList where taxpayer is null defaultSocialSecurityBenefitsShouldNotBeFound("taxpayer.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsByIsSelfVerifyIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where isSelfVerify equals to DEFAULT_IS_SELF_VERIFY defaultSocialSecurityBenefitsShouldBeFound("isSelfVerify.equals=" + DEFAULT_IS_SELF_VERIFY); // Get all the socialSecurityBenefitsList where isSelfVerify equals to UPDATED_IS_SELF_VERIFY defaultSocialSecurityBenefitsShouldNotBeFound("isSelfVerify.equals=" + UPDATED_IS_SELF_VERIFY); } @Test @Transactional public void getAllSocialSecurityBenefitsByIsSelfVerifyIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where isSelfVerify in DEFAULT_IS_SELF_VERIFY or UPDATED_IS_SELF_VERIFY defaultSocialSecurityBenefitsShouldBeFound("isSelfVerify.in=" + DEFAULT_IS_SELF_VERIFY + "," + UPDATED_IS_SELF_VERIFY); // Get all the socialSecurityBenefitsList where isSelfVerify equals to UPDATED_IS_SELF_VERIFY defaultSocialSecurityBenefitsShouldNotBeFound("isSelfVerify.in=" + UPDATED_IS_SELF_VERIFY); } @Test @Transactional public void getAllSocialSecurityBenefitsByIsSelfVerifyIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where isSelfVerify is not null defaultSocialSecurityBenefitsShouldBeFound("isSelfVerify.specified=true"); // Get all the socialSecurityBenefitsList where isSelfVerify is null defaultSocialSecurityBenefitsShouldNotBeFound("isSelfVerify.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsByIsHrVerifyIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where isHrVerify equals to DEFAULT_IS_HR_VERIFY defaultSocialSecurityBenefitsShouldBeFound("isHrVerify.equals=" + DEFAULT_IS_HR_VERIFY); // Get all the socialSecurityBenefitsList where isHrVerify equals to UPDATED_IS_HR_VERIFY defaultSocialSecurityBenefitsShouldNotBeFound("isHrVerify.equals=" + UPDATED_IS_HR_VERIFY); } @Test @Transactional public void getAllSocialSecurityBenefitsByIsHrVerifyIsInShouldWork() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where isHrVerify in DEFAULT_IS_HR_VERIFY or UPDATED_IS_HR_VERIFY defaultSocialSecurityBenefitsShouldBeFound("isHrVerify.in=" + DEFAULT_IS_HR_VERIFY + "," + UPDATED_IS_HR_VERIFY); // Get all the socialSecurityBenefitsList where isHrVerify equals to UPDATED_IS_HR_VERIFY defaultSocialSecurityBenefitsShouldNotBeFound("isHrVerify.in=" + UPDATED_IS_HR_VERIFY); } @Test @Transactional public void getAllSocialSecurityBenefitsByIsHrVerifyIsNullOrNotNull() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); // Get all the socialSecurityBenefitsList where isHrVerify is not null defaultSocialSecurityBenefitsShouldBeFound("isHrVerify.specified=true"); // Get all the socialSecurityBenefitsList where isHrVerify is null defaultSocialSecurityBenefitsShouldNotBeFound("isHrVerify.specified=false"); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfTypeIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); EnumPfType pfType = EnumPfTypeResourceIT.createEntity(em); em.persist(pfType); em.flush(); socialSecurityBenefits.setPfType(pfType); socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); Long pfTypeId = pfType.getId(); // Get all the socialSecurityBenefitsList where pfType equals to pfTypeId defaultSocialSecurityBenefitsShouldBeFound("pfTypeId.equals=" + pfTypeId); // Get all the socialSecurityBenefitsList where pfType equals to pfTypeId + 1 defaultSocialSecurityBenefitsShouldNotBeFound("pfTypeId.equals=" + (pfTypeId + 1)); } @Test @Transactional public void getAllSocialSecurityBenefitsByPfStatusIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); EnumPfStatus pfStatus = EnumPfStatusResourceIT.createEntity(em); em.persist(pfStatus); em.flush(); socialSecurityBenefits.setPfStatus(pfStatus); socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); Long pfStatusId = pfStatus.getId(); // Get all the socialSecurityBenefitsList where pfStatus equals to pfStatusId defaultSocialSecurityBenefitsShouldBeFound("pfStatusId.equals=" + pfStatusId); // Get all the socialSecurityBenefitsList where pfStatus equals to pfStatusId + 1 defaultSocialSecurityBenefitsShouldNotBeFound("pfStatusId.equals=" + (pfStatusId + 1)); } @Test @Transactional public void getAllSocialSecurityBenefitsByProvidentPaySchemeIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); EnumPfPayScheme providentPayScheme = EnumPfPaySchemeResourceIT.createEntity(em); em.persist(providentPayScheme); em.flush(); socialSecurityBenefits.setProvidentPayScheme(providentPayScheme); socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); Long providentPaySchemeId = providentPayScheme.getId(); // Get all the socialSecurityBenefitsList where providentPayScheme equals to providentPaySchemeId defaultSocialSecurityBenefitsShouldBeFound("providentPaySchemeId.equals=" + providentPaySchemeId); // Get all the socialSecurityBenefitsList where providentPayScheme equals to providentPaySchemeId + 1 defaultSocialSecurityBenefitsShouldNotBeFound("providentPaySchemeId.equals=" + (providentPaySchemeId + 1)); } @Test @Transactional public void getAllSocialSecurityBenefitsBySocialSecurityPaySchemeIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); EnumSsPayScheme socialSecurityPayScheme = EnumSsPaySchemeResourceIT.createEntity(em); em.persist(socialSecurityPayScheme); em.flush(); socialSecurityBenefits.setSocialSecurityPayScheme(socialSecurityPayScheme); socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); Long socialSecurityPaySchemeId = socialSecurityPayScheme.getId(); // Get all the socialSecurityBenefitsList where socialSecurityPayScheme equals to socialSecurityPaySchemeId defaultSocialSecurityBenefitsShouldBeFound("socialSecurityPaySchemeId.equals=" + socialSecurityPaySchemeId); // Get all the socialSecurityBenefitsList where socialSecurityPayScheme equals to socialSecurityPaySchemeId + 1 defaultSocialSecurityBenefitsShouldNotBeFound("socialSecurityPaySchemeId.equals=" + (socialSecurityPaySchemeId + 1)); } @Test @Transactional public void getAllSocialSecurityBenefitsBySsStatusIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); EnumSsStatus ssStatus = EnumSsStatusResourceIT.createEntity(em); em.persist(ssStatus); em.flush(); socialSecurityBenefits.setSsStatus(ssStatus); socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); Long ssStatusId = ssStatus.getId(); // Get all the socialSecurityBenefitsList where ssStatus equals to ssStatusId defaultSocialSecurityBenefitsShouldBeFound("ssStatusId.equals=" + ssStatusId); // Get all the socialSecurityBenefitsList where ssStatus equals to ssStatusId + 1 defaultSocialSecurityBenefitsShouldNotBeFound("ssStatusId.equals=" + (ssStatusId + 1)); } @Test @Transactional public void getAllSocialSecurityBenefitsByLaborTypeIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); EnumEmpLaborType laborType = EnumEmpLaborTypeResourceIT.createEntity(em); em.persist(laborType); em.flush(); socialSecurityBenefits.setLaborType(laborType); socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); Long laborTypeId = laborType.getId(); // Get all the socialSecurityBenefitsList where laborType equals to laborTypeId defaultSocialSecurityBenefitsShouldBeFound("laborTypeId.equals=" + laborTypeId); // Get all the socialSecurityBenefitsList where laborType equals to laborTypeId + 1 defaultSocialSecurityBenefitsShouldNotBeFound("laborTypeId.equals=" + (laborTypeId + 1)); } @Test @Transactional public void getAllSocialSecurityBenefitsByTaxerTypeIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); EnumEmpTaxerType taxerType = EnumEmpTaxerTypeResourceIT.createEntity(em); em.persist(taxerType); em.flush(); socialSecurityBenefits.setTaxerType(taxerType); socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); Long taxerTypeId = taxerType.getId(); // Get all the socialSecurityBenefitsList where taxerType equals to taxerTypeId defaultSocialSecurityBenefitsShouldBeFound("taxerTypeId.equals=" + taxerTypeId); // Get all the socialSecurityBenefitsList where taxerType equals to taxerTypeId + 1 defaultSocialSecurityBenefitsShouldNotBeFound("taxerTypeId.equals=" + (taxerTypeId + 1)); } @Test @Transactional public void getAllSocialSecurityBenefitsByTaxAreaIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); EnumEmpTaxArea taxArea = EnumEmpTaxAreaResourceIT.createEntity(em); em.persist(taxArea); em.flush(); socialSecurityBenefits.setTaxArea(taxArea); socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); Long taxAreaId = taxArea.getId(); // Get all the socialSecurityBenefitsList where taxArea equals to taxAreaId defaultSocialSecurityBenefitsShouldBeFound("taxAreaId.equals=" + taxAreaId); // Get all the socialSecurityBenefitsList where taxArea equals to taxAreaId + 1 defaultSocialSecurityBenefitsShouldNotBeFound("taxAreaId.equals=" + (taxAreaId + 1)); } @Test @Transactional public void getAllSocialSecurityBenefitsByEmpIsEqualToSomething() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); Employee emp = EmployeeResourceIT.createEntity(em); em.persist(emp); em.flush(); socialSecurityBenefits.setEmp(emp); socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); Long empId = emp.getId(); // Get all the socialSecurityBenefitsList where emp equals to empId defaultSocialSecurityBenefitsShouldBeFound("empId.equals=" + empId); // Get all the socialSecurityBenefitsList where emp equals to empId + 1 defaultSocialSecurityBenefitsShouldNotBeFound("empId.equals=" + (empId + 1)); } /** * Executes the search, and checks that the default entity is returned. */ private void defaultSocialSecurityBenefitsShouldBeFound(String filter) throws Exception { restSocialSecurityBenefitsMockMvc.perform(get("/api/social-security-benefits?sort=id,desc&" + filter)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.[*].id").value(hasItem(socialSecurityBenefits.getId().intValue()))) .andExpect(jsonPath("$.[*].code").value(hasItem(DEFAULT_CODE))) .andExpect(jsonPath("$.[*].pfAccount").value(hasItem(DEFAULT_PF_ACCOUNT))) .andExpect(jsonPath("$.[*].spfAccount").value(hasItem(DEFAULT_SPF_ACCOUNT))) .andExpect(jsonPath("$.[*].pfStartMonth").value(hasItem(DEFAULT_PF_START_MONTH.toString()))) .andExpect(jsonPath("$.[*].pfBase").value(hasItem(DEFAULT_PF_BASE))) .andExpect(jsonPath("$.[*].pfStopMonth").value(hasItem(DEFAULT_PF_STOP_MONTH.toString()))) .andExpect(jsonPath("$.[*].pfRemark").value(hasItem(DEFAULT_PF_REMARK))) .andExpect(jsonPath("$.[*].ssAccount").value(hasItem(DEFAULT_SS_ACCOUNT))) .andExpect(jsonPath("$.[*].ssCity").value(hasItem(DEFAULT_SS_CITY))) .andExpect(jsonPath("$.[*].ssStartMonth").value(hasItem(DEFAULT_SS_START_MONTH.toString()))) .andExpect(jsonPath("$.[*].ssBase").value(hasItem(DEFAULT_SS_BASE))) .andExpect(jsonPath("$.[*].ssStopMonth").value(hasItem(DEFAULT_SS_STOP_MONTH.toString()))) .andExpect(jsonPath("$.[*].ssRemark").value(hasItem(DEFAULT_SS_REMARK))) .andExpect(jsonPath("$.[*].allowance").value(hasItem(DEFAULT_ALLOWANCE.intValue()))) .andExpect(jsonPath("$.[*].taxpayer").value(hasItem(DEFAULT_TAXPAYER))) .andExpect(jsonPath("$.[*].isSelfVerify").value(hasItem(DEFAULT_IS_SELF_VERIFY.booleanValue()))) .andExpect(jsonPath("$.[*].isHrVerify").value(hasItem(DEFAULT_IS_HR_VERIFY.booleanValue()))); // Check, that the count call also returns 1 restSocialSecurityBenefitsMockMvc.perform(get("/api/social-security-benefits/count?sort=id,desc&" + filter)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(content().string("1")); } /** * Executes the search, and checks that the default entity is not returned. */ private void defaultSocialSecurityBenefitsShouldNotBeFound(String filter) throws Exception { restSocialSecurityBenefitsMockMvc.perform(get("/api/social-security-benefits?sort=id,desc&" + filter)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$").isArray()) .andExpect(jsonPath("$").isEmpty()); // Check, that the count call also returns 0 restSocialSecurityBenefitsMockMvc.perform(get("/api/social-security-benefits/count?sort=id,desc&" + filter)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(content().string("0")); } @Test @Transactional public void getNonExistingSocialSecurityBenefits() throws Exception { // Get the socialSecurityBenefits restSocialSecurityBenefitsMockMvc.perform(get("/api/social-security-benefits/{id}", Long.MAX_VALUE)) .andExpect(status().isNotFound()); } @Test @Transactional public void updateSocialSecurityBenefits() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); int databaseSizeBeforeUpdate = socialSecurityBenefitsRepository.findAll().size(); // Update the socialSecurityBenefits SocialSecurityBenefits updatedSocialSecurityBenefits = socialSecurityBenefitsRepository.findById(socialSecurityBenefits.getId()).get(); // Disconnect from session so that the updates on updatedSocialSecurityBenefits are not directly saved in db em.detach(updatedSocialSecurityBenefits); updatedSocialSecurityBenefits .code(UPDATED_CODE) .pfAccount(UPDATED_PF_ACCOUNT) .spfAccount(UPDATED_SPF_ACCOUNT) .pfStartMonth(UPDATED_PF_START_MONTH) .pfBase(UPDATED_PF_BASE) .pfStopMonth(UPDATED_PF_STOP_MONTH) .pfRemark(UPDATED_PF_REMARK) .ssAccount(UPDATED_SS_ACCOUNT) .ssCity(UPDATED_SS_CITY) .ssStartMonth(UPDATED_SS_START_MONTH) .ssBase(UPDATED_SS_BASE) .ssStopMonth(UPDATED_SS_STOP_MONTH) .ssRemark(UPDATED_SS_REMARK) .allowance(UPDATED_ALLOWANCE) .taxpayer(UPDATED_TAXPAYER) .isSelfVerify(UPDATED_IS_SELF_VERIFY) .isHrVerify(UPDATED_IS_HR_VERIFY); SocialSecurityBenefitsDTO socialSecurityBenefitsDTO = socialSecurityBenefitsMapper.toDto(updatedSocialSecurityBenefits); restSocialSecurityBenefitsMockMvc.perform(put("/api/social-security-benefits") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(socialSecurityBenefitsDTO))) .andExpect(status().isOk()); // Validate the SocialSecurityBenefits in the database List<SocialSecurityBenefits> socialSecurityBenefitsList = socialSecurityBenefitsRepository.findAll(); assertThat(socialSecurityBenefitsList).hasSize(databaseSizeBeforeUpdate); SocialSecurityBenefits testSocialSecurityBenefits = socialSecurityBenefitsList.get(socialSecurityBenefitsList.size() - 1); assertThat(testSocialSecurityBenefits.getCode()).isEqualTo(UPDATED_CODE); assertThat(testSocialSecurityBenefits.getPfAccount()).isEqualTo(UPDATED_PF_ACCOUNT); assertThat(testSocialSecurityBenefits.getSpfAccount()).isEqualTo(UPDATED_SPF_ACCOUNT); assertThat(testSocialSecurityBenefits.getPfStartMonth()).isEqualTo(UPDATED_PF_START_MONTH); assertThat(testSocialSecurityBenefits.getPfBase()).isEqualTo(UPDATED_PF_BASE); assertThat(testSocialSecurityBenefits.getPfStopMonth()).isEqualTo(UPDATED_PF_STOP_MONTH); assertThat(testSocialSecurityBenefits.getPfRemark()).isEqualTo(UPDATED_PF_REMARK); assertThat(testSocialSecurityBenefits.getSsAccount()).isEqualTo(UPDATED_SS_ACCOUNT); assertThat(testSocialSecurityBenefits.getSsCity()).isEqualTo(UPDATED_SS_CITY); assertThat(testSocialSecurityBenefits.getSsStartMonth()).isEqualTo(UPDATED_SS_START_MONTH); assertThat(testSocialSecurityBenefits.getSsBase()).isEqualTo(UPDATED_SS_BASE); assertThat(testSocialSecurityBenefits.getSsStopMonth()).isEqualTo(UPDATED_SS_STOP_MONTH); assertThat(testSocialSecurityBenefits.getSsRemark()).isEqualTo(UPDATED_SS_REMARK); assertThat(testSocialSecurityBenefits.getAllowance()).isEqualTo(UPDATED_ALLOWANCE); assertThat(testSocialSecurityBenefits.getTaxpayer()).isEqualTo(UPDATED_TAXPAYER); assertThat(testSocialSecurityBenefits.isIsSelfVerify()).isEqualTo(UPDATED_IS_SELF_VERIFY); assertThat(testSocialSecurityBenefits.isIsHrVerify()).isEqualTo(UPDATED_IS_HR_VERIFY); } @Test @Transactional public void updateNonExistingSocialSecurityBenefits() throws Exception { int databaseSizeBeforeUpdate = socialSecurityBenefitsRepository.findAll().size(); // Create the SocialSecurityBenefits SocialSecurityBenefitsDTO socialSecurityBenefitsDTO = socialSecurityBenefitsMapper.toDto(socialSecurityBenefits); // If the entity doesn't have an ID, it will throw BadRequestAlertException restSocialSecurityBenefitsMockMvc.perform(put("/api/social-security-benefits") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(socialSecurityBenefitsDTO))) .andExpect(status().isBadRequest()); // Validate the SocialSecurityBenefits in the database List<SocialSecurityBenefits> socialSecurityBenefitsList = socialSecurityBenefitsRepository.findAll(); assertThat(socialSecurityBenefitsList).hasSize(databaseSizeBeforeUpdate); } @Test @Transactional public void deleteSocialSecurityBenefits() throws Exception { // Initialize the database socialSecurityBenefitsRepository.saveAndFlush(socialSecurityBenefits); int databaseSizeBeforeDelete = socialSecurityBenefitsRepository.findAll().size(); // Delete the socialSecurityBenefits restSocialSecurityBenefitsMockMvc.perform(delete("/api/social-security-benefits/{id}", socialSecurityBenefits.getId()) .accept(TestUtil.APPLICATION_JSON_UTF8)) .andExpect(status().isNoContent()); // Validate the database contains one less item List<SocialSecurityBenefits> socialSecurityBenefitsList = socialSecurityBenefitsRepository.findAll(); assertThat(socialSecurityBenefitsList).hasSize(databaseSizeBeforeDelete - 1); } @Test @Transactional public void equalsVerifier() throws Exception { TestUtil.equalsVerifier(SocialSecurityBenefits.class); SocialSecurityBenefits socialSecurityBenefits1 = new SocialSecurityBenefits(); socialSecurityBenefits1.setId(1L); SocialSecurityBenefits socialSecurityBenefits2 = new SocialSecurityBenefits(); socialSecurityBenefits2.setId(socialSecurityBenefits1.getId()); assertThat(socialSecurityBenefits1).isEqualTo(socialSecurityBenefits2); socialSecurityBenefits2.setId(2L); assertThat(socialSecurityBenefits1).isNotEqualTo(socialSecurityBenefits2); socialSecurityBenefits1.setId(null); assertThat(socialSecurityBenefits1).isNotEqualTo(socialSecurityBenefits2); } @Test @Transactional public void dtoEqualsVerifier() throws Exception { TestUtil.equalsVerifier(SocialSecurityBenefitsDTO.class); SocialSecurityBenefitsDTO socialSecurityBenefitsDTO1 = new SocialSecurityBenefitsDTO(); socialSecurityBenefitsDTO1.setId(1L); SocialSecurityBenefitsDTO socialSecurityBenefitsDTO2 = new SocialSecurityBenefitsDTO(); assertThat(socialSecurityBenefitsDTO1).isNotEqualTo(socialSecurityBenefitsDTO2); socialSecurityBenefitsDTO2.setId(socialSecurityBenefitsDTO1.getId()); assertThat(socialSecurityBenefitsDTO1).isEqualTo(socialSecurityBenefitsDTO2); socialSecurityBenefitsDTO2.setId(2L); assertThat(socialSecurityBenefitsDTO1).isNotEqualTo(socialSecurityBenefitsDTO2); socialSecurityBenefitsDTO1.setId(null); assertThat(socialSecurityBenefitsDTO1).isNotEqualTo(socialSecurityBenefitsDTO2); } @Test @Transactional public void testEntityFromId() { assertThat(socialSecurityBenefitsMapper.fromId(42L).getId()).isEqualTo(42); assertThat(socialSecurityBenefitsMapper.fromId(null)).isNull(); } }
[ "cc@dev.com" ]
cc@dev.com
112298e79e5debbbd6ef35f0654c87dc9e83e544
21e3866b79f17105d1a7f7102a0066a476e35f6b
/src/de/joergjahnke/common/util/Observable.java
c449e2f1c37ccd371f25de2656b8d31a8d28f74f
[]
no_license
noxo/jmec64-javafx
4aec3bcfb77c287c8c9d5d08c82c2764e0fae606
3be88998ffe6a854b5041dac1d4fde3898c1f618
refs/heads/master
2020-06-05T17:26:58.974644
2013-02-06T20:50:49
2013-02-06T20:50:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,363
java
/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation. For the full * license text, see http://www.gnu.org/licenses/gpl.html. */ package de.joergjahnke.common.util; /** * Interface an observable object has to implement. * This interface is similar in appearance to java.util.Observable but may * be used when a class cannot be extended as it already extends another * class. * * @author Joerg Jahnke (joergjahnke@users.sourceforge.net) * @see java.util.Observable * @see de.joergjahnke.common.util.Observer */ public interface Observable { /** * Adds an observer to the set of observers for this object * * @param o an observer to be added. */ void addObserver( Observer o ); /** * Deletes an observer from the set of observers of this object. * This is an optional operation and may have an empty implementation. * * @param o the observer to be deleted */ void deleteObserver( Observer o ); /** * If this object has changed then notify all of its observers * * @see de.joergjahnke.common.util.Observable#notifyObservers */ void notifyObservers(); /** * If this object has changed then notify all of its observers and pass an * object to the observer. * * @param arg argument to pass to the observers * @see de.joergjahnke.common.util.Observable#notifyObservers */ void notifyObservers( Object arg ); /** * Clears the observer list so that this object no longer has any observers. * This is an optional operation and may have an empty implementation. */ void deleteObservers(); /** * Marks this observable object as either changed or unchanged, depending on the state passed * * @param state the new change state, true for a changed object, otherwise false */ void setChanged( boolean state ); /** * Tests if this object has changed */ boolean hasChanged(); /** * Returns the number of observers of this observable object. * * @return the number of observers of this object. */ int countObservers(); }
[ "enoksoko@yahoo.com" ]
enoksoko@yahoo.com
a8ca1f7795ab351408a63b18a4fa9f396f4bf9a8
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_16563.java
280b233a5fa5710c306aebddcd5d461b061a1656
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
127
java
@Override public OrgRelations org(){ return new DefaultOrgRelations(serviceContext,createLazyIdSupplier(this::getAllOrg)); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
d1c22bc91657550849fe81990ef562d84d9d954c
f3d3c009823a9a40e68f219df08131e6edf3b560
/Java版飞机大战/src/com/wowowo/model/Item.java
bbf96d753fb85282116a3ee49e7e91c134c3ae3e
[]
no_license
upupoo00/Project
5706fd46f6523f189d59d358b60a18c22ba23976
9a08fb4fd4cc79ad1d8592f0b53041fcd623ffb4
refs/heads/master
2023-06-23T16:11:49.640527
2021-07-13T09:25:04
2021-07-13T09:25:11
350,588,831
1
0
null
null
null
null
GB18030
Java
false
false
1,079
java
package com.wowowo.model; import java.awt.Graphics; import java.awt.Image; import com.wowowo.view.BaseFrame; import com.wowowo.view.MyPanel; public class Item { public MyPanel myPanel; public int width; public int height; public int x; public int y; public Image[] images; public int imageindex=0; public int speed; public int imageSpeed; public int count; //道具对应的分数 public Item(MyPanel myPanel) { this.myPanel=myPanel; } public void drawSelf(Graphics g) { g.drawImage(images[imageindex],x, y,width, height,null); if(myPanel.timer%imageSpeed==0) { imageindex++; if(imageindex==this.images.length) imageindex=0; } if(myPanel.timer%speed==0) { y++; if(y>=BaseFrame.frameHeight) this.myPanel.items.remove(this); } } public void eated() { //当道具被吃掉,应该将其分数累加到玩家的总分中 this.myPanel.player.count+=this.count; this.myPanel.items.remove(this); } }
[ "upupoo0@163.com" ]
upupoo0@163.com
aba2f01aaf090a615a4363b5ccbcd693f0893574
7adaa8c476add4ae34604fb0750f257f76996a37
/mapreduce/src/main/java/per/zengwei/Order/Order_2/OrderIdGroupingComparator.java
58c5ab4cb09a3baee61317540ddbdde3e670b29c
[]
no_license
Liveinthecloud/Java
064c2491c57e036500761a822fbd79bdd44cc582
9f8a31ad7d2dabb70ae506661ea83d6399bb0de2
refs/heads/master
2020-04-07T19:19:52.174761
2019-05-18T15:35:55
2019-05-18T15:35:55
158,644,326
0
0
null
null
null
null
UTF-8
Java
false
false
519
java
package per.zengwei.Order.Order_2; import org.apache.hadoop.io.WritableComparable; import org.apache.hadoop.io.WritableComparator; public class OrderIdGroupingComparator extends WritableComparator { public OrderIdGroupingComparator() { super(OrderBean_2.class,true); } @Override public int compare(WritableComparable a, WritableComparable b) { OrderBean_2 o1=(OrderBean_2)a; OrderBean_2 o2=(OrderBean_2)b; return o1.getOrderId().compareTo(o2.getOrderId()); } }
[ "zv279901034@gmail.com" ]
zv279901034@gmail.com
7a88ddf6419ebe9df1ba8a6cb0d722f8368d8761
675fac38581700785c91f2aaad5470850808953a
/src/dao/ManagerDao.java
cec5fe326da3bd9b5cee1c42e50a54834176d560
[]
no_license
linyuanbin/TotemDown2.0
8c858870db9896088c2d0d9c93a75911a339777b
8bd022e764fa5b6d01763b64d12f499390ac4914
refs/heads/master
2021-01-20T05:22:17.688922
2017-05-21T07:36:50
2017-05-21T07:36:50
89,773,941
1
0
null
null
null
null
GB18030
Java
false
false
534
java
package dao; import model.Manager; import model.User; public interface ManagerDao { //用户注册方法 public String register(Manager u); //用户登录 public String login(String mName,String mPassword); public boolean deleteManager(String mId); public boolean updateManager(Manager m); public Manager selectManager(String mName); //判断是否存在该用户 public boolean senseManager(String mID); //展现用户 public Manager showManager(String mID); public String getManagerID(String mName); }
[ "893239524@qq.com" ]
893239524@qq.com
ddeb08f02a4c5ff4c7631f00a4471ed62f23117c
70803bb4a57fbc0f3ea07b4870e665a96c406284
/app/src/main/java/com/example/sowjireddy/myapp4/Flower2.java
7edacf28e0b961a5f8d13423bbd4e9d7659d8137
[]
no_license
sowjireddy/Bouquet
75d5fa1095916474dc75e73bb7f4451025a85ae3
a7c766d631e34be4df4a8c3b251e75415c9831cd
refs/heads/master
2020-03-07T05:01:37.269424
2018-03-29T11:45:06
2018-03-29T11:45:06
127,282,366
0
0
null
null
null
null
UTF-8
Java
false
false
920
java
package com.example.sowjireddy.myapp4; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; public class Flower2 extends AppCompatActivity implements View.OnClickListener { Button btnsd2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate( savedInstanceState ); setContentView( R.layout.activity_flower2 ); btnsd2=findViewById( R.id.btnsd2 ); btnsd2.setOnClickListener( this ); } @Override public void onClick(View view) { if(view == btnsd2) { btnsd2.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { startActivity( new Intent( Flower2.this, Detail.class ) ); } } ); } } }
[ "sowjanyareddy612@gmail.com" ]
sowjanyareddy612@gmail.com
ed447316acf350d961b6b076b4c703b3591a5cdd
4145643c1732b4d08b755f36418b8dc235ebc847
/src/java/models/CrmUser.java
04fd53a8ccc0aa6d672fd135509472b532042c50
[]
no_license
khachornchit/java-restful-api
4f60ab2df9b46fa515e9b3fa48a21bee8371da69
90d6e33b1e126fc1189216b3d5c5f17112b01db5
refs/heads/master
2021-06-13T18:50:51.606478
2017-03-27T11:05:51
2017-03-27T11:05:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
354
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 Models; /** * * @author kajornjit.songsaen */ public class CrmUser { private Long id; private String address; public void doStuff() { } }
[ "kajornjit@gmail.com" ]
kajornjit@gmail.com
33e9caf291bcaa2d05d0d1f4541aab6cd2512c48
e5d4ed8cce11b91198db55d92e11ad571f11b774
/app/src/main/java/com/soropromo/trivia/controller/SummaryActivity.java
a776ce69deeae396a743040b2c0c67911e7996ca
[]
no_license
mountaineer59/Trivia
b077c4d535118f70961c47cd1d8e2c30e8124e4f
45d8ebec1adf32601708da02437a109cf90ea062
refs/heads/master
2020-05-15T08:17:50.372264
2019-04-22T08:11:20
2019-04-22T08:11:20
182,157,049
0
0
null
null
null
null
UTF-8
Java
false
false
1,295
java
package com.soropromo.trivia.controller; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.TextView; import com.soropromo.trivia.R; public class SummaryActivity extends AppCompatActivity { private TextView summaryTxtTV; private TextView summaryQuestionTV; private String name; private String question; private String answer; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_summary); summaryTxtTV = findViewById(R.id.summary_txt_id); summaryQuestionTV = findViewById(R.id.summary_questionTxt); summaryTxtTV.setText("Hello " + name + "\nHere are the answers selected:"); //todo fetch current user's data //get name and Q&As. //after fetching summaryQuestionTV.setText("Q." + question + "\n" + "Ans: " + answer + "\n" + "Q." + question + "\n" + "Ans: " + answer); //run in for loop to set questions from list } public void onFinishTapped(View view) { Intent intent = new Intent(SummaryActivity.this, MainActivity.class); startActivity(intent); } }
[ "sourabh29wasnik@gmail.com" ]
sourabh29wasnik@gmail.com
7a6ff3a9fdf4212ee2a7c0abacebcbb89691406f
39ebdc47572fc632ca0e64c10e7addfe8f967a27
/news-spring/src/main/java/com/laptrinhweb/run/NewsWebappApplication.java
e700e6085a0184dd6c4a451c3ad17ccfcc345098
[]
no_license
tannghia025/news-spring
725f7ab824f33386a7bee097ed336406d57cdb21
7f906aa7823f04c81083f04eebfb6c7a0f5c217c
refs/heads/main
2023-01-01T12:55:40.057053
2020-10-24T15:49:43
2020-10-24T15:49:43
306,396,108
0
0
null
null
null
null
UTF-8
Java
false
false
461
java
package com.laptrinhweb.run; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration; @SpringBootApplication(exclude = {SecurityAutoConfiguration.class }) public class NewsWebappApplication { public static void main(String[] args) { SpringApplication.run(NewsWebappApplication.class, args); } }
[ "nghia02584@gmail.com" ]
nghia02584@gmail.com
48faa0e09b71349e1ccea95ee7e6e84f79f7e826
d2b6a013dc5bc19aff11b117dd23015f9f8447e2
/TestAnimales/src/testanimales/Araña.java
ed8beea8be3af1664bd4385948db064e13991b82
[]
no_license
FlaviaDanila/Animales
df17dda0f5771504f543a3d450b6b8b2db760cf0
cfe7424b021da723d6fab81e118234c4f41c393d
refs/heads/master
2021-04-09T13:04:25.643109
2018-03-20T20:47:58
2018-03-20T20:47:58
125,622,398
0
0
null
null
null
null
UTF-8
Java
false
false
256
java
package testanimales; /** * * @author Cele&Fla */ public class Araña extends Patas { public Araña() { super(8); } @Override public void comer() { System.out.println("La araña come insectos"); } }
[ "yaki3011@gmail.com" ]
yaki3011@gmail.com
8f62f518824c3cee612cf9924e2e650608763301
147af3fadf4cc7c98c0a241118db2edad205dfb0
/src/gp/db/IContact.java
20d85d96bd5ea4db292bec9816ad70bc75685850
[]
no_license
quokkaquokka/GestionPlanning
aca1c2af2ffe7aecfc9a4c0acd32e1d9665a7e0c
5dcb9343ec5de65ee74011c20131716c90c76ae0
refs/heads/master
2020-04-12T15:30:22.464368
2018-12-21T10:11:06
2018-12-21T10:11:06
162,582,086
0
0
null
null
null
null
UTF-8
Java
false
false
337
java
package gp.db; import java.util.ArrayList; import gp.utilisateur.Contact; public interface IContact { public Contact creeContact(String nom, String prenom, String adresse, String telephone, String email, Long matricule); public void supprimerContact(); public ArrayList<Contact> getContact(Long matricule); public Long getId(); }
[ "mouttecam@gmail.com" ]
mouttecam@gmail.com
968c4bb374c018eb712d99ada2944f69160b4d16
bf0b347e9f0b2950eb5fe1f47be86244e201055f
/src/main/java/com/lhkbob/imaje/color/transform/Identity.java
6d1fb17cc5a9b9c486065be07b3d3ff09ac74f26
[ "BSD-3-Clause" ]
permissive
lhkbob/imaje
7791a77e151b6be0b07b891a5f818ea9c9be84c5
fa5b8693c1edc7231305d77da60c7fa94a287d15
refs/heads/main
2022-05-19T12:49:31.135776
2018-06-15T23:11:15
2018-06-15T23:11:15
254,251,232
0
0
null
null
null
null
UTF-8
Java
false
false
5,468
java
/* * BSD 3-Clause License - imaJe * * Copyright (c) 2016, Michael Ludwig * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * * Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.lhkbob.imaje.color.transform; import com.lhkbob.imaje.color.Vector; import com.lhkbob.imaje.color.VectorSpace; import com.lhkbob.imaje.util.Arguments; import java.util.Arrays; import java.util.Objects; import java.util.Optional; /** * Identity * ======== * * The Identity transform returns the input channel values without modification, although it does * allow changing the vector space for the output space. If this is done, this transformation acts * much like a type-casting operation. * * The identity transform has several modes of operation depending on the dimensionality of the * input and output spaces. If both spaces have the same dimensionality, then the input values are * passed through unmodified. If the input space is 1D, but the output space has more, then the * input value is used for every output channel value. If the output space is 1D, but the input * space has a higher dimensionality, then the output value is set to the average of the input * channels. * * @author Michael Ludwig */ public class Identity<A extends Vector<A, SA>, SA extends VectorSpace<A, SA>, B extends Vector<B, SB>, SB extends VectorSpace<B, SB>> implements Transform<A, SA, B, SB> { private final SA inSpace; private final SB outSpace; private final Identity<B, SB, A, SA> inverse; /** * Create a new Identity transform that goes between the given input and output vector spaces. * If both spaces have dimensionality above one, then they must have the same dimensionality. * If either space has a dimensionality of one, then the identity transformation behaves in * a modified form, as described above. * * @param inSpace The input space * @param outSpace The output space */ public Identity(SA inSpace, SB outSpace) { if (inSpace.getChannelCount() != 1 && outSpace.getChannelCount() != 1) { Arguments.equals("channel count", inSpace.getChannelCount(), outSpace.getChannelCount()); } // else if either space only has a single channel that will be duplicated or averaged this.inSpace = inSpace; this.outSpace = outSpace; inverse = new Identity<>(this); } private Identity(Identity<B, SB, A, SA> inverse) { inSpace = inverse.getOutputSpace(); outSpace = inverse.getInputSpace(); this.inverse = inverse; } @Override public Optional<Identity<B, SB, A, SA>> inverse() { return Optional.of(inverse); } @Override public SA getInputSpace() { return inSpace; } @Override public SB getOutputSpace() { return outSpace; } @Override public boolean applyUnchecked(double[] input, double[] output) { Arguments.equals("input.length", inSpace.getChannelCount(), input.length); Arguments.equals("output.length", outSpace.getChannelCount(), output.length); if (input.length == output.length) { // Copy input to output System.arraycopy(input, 0, output, 0, input.length); } else if (input.length == 1) { // Set every channel in output equal to input[0] Arrays.fill(output, input[0]); } else { // Set single output channel to average of input double v = 0; for (int i = 0; i < input.length; i++) { v += input[i]; } output[0] = v / input.length; } return true; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof Identity)) { return false; } Identity i = (Identity) o; return Objects.equals(i.inSpace, inSpace) && Objects.equals(i.outSpace, outSpace); } @Override public int hashCode() { int result = 17; result = 31 * result + inSpace.hashCode(); result = 31 * result + outSpace.hashCode(); return result; } @Override public String toString() { return String.format("Identity %s -> %s", inSpace, outSpace); } }
[ "lhkbob@gmail.com" ]
lhkbob@gmail.com
18bdee9a11ad4cd89d17b7260435af7deeb03c63
09a379795e9027a9d1f9b8a35acf2efcedca3fb8
/test/ContactTest.java
c7c704a3d9d3f711984a773b1f9a5af07b1a5b0f
[]
no_license
IdiotAlliance/PARAM_CLIENT
5233b46cf932ff3975484b74ff08fad6b01e7f7c
36de4323ae3c86071e8f193e0d76e9b1b1721165
refs/heads/master
2021-01-16T22:42:50.620861
2013-01-19T07:07:19
2013-01-19T07:07:19
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
567
java
import static org.junit.Assert.*; import java.util.Arrays; import org.junit.Before; import org.junit.Test; import com.dt.bean.Contact; public class ContactTest { private Contact[] contacts; @Before public void setup(){ contacts = new Contact[]{ new Contact("1","1","ÂÀÏè","15250991986"), new Contact("2","2","½âùƽ","15298387110"), new Contact("3","3","13337812390","13337812390") }; } @Test public void sortTest(){ Arrays.sort(contacts); assertEquals(contacts[0],new Contact("3","3","13337812390","13337812390")); } }
[ "496906781@qq.com" ]
496906781@qq.com
c6fe29d22b738e57be8d5f71c7b26dba32829dc0
c5e5de07beff2424697ea8f15a5a6adfa4d65417
/les_7/src/main/java/ru/green/avi/spring/MusicPlayer.java
4e9033b4e527ab294007a483fbfad5763c728bde
[]
no_license
Alex-Green-2015/AlishevSpringLessons
fec2c6d1ed0b31906cbaf3c8448f09a020aff643
70597972c92e41fd73021a85cffe87e46d14aed5
refs/heads/master
2023-08-16T19:52:07.455300
2023-08-13T07:50:00
2023-08-13T07:50:00
235,429,658
0
0
null
2022-12-16T05:11:42
2020-01-21T19:56:40
Java
UTF-8
Java
false
false
863
java
package ru.green.avi.spring; import java.util.ArrayList; import java.util.List; public class MusicPlayer { private List<Music> musicList = new ArrayList<>(); private String name; private int volume; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getVolume() { return volume; } public void setVolume(int volume) { this.volume = volume; } public void setMusicList(List<Music> musicList) { this.musicList = musicList; } public void playMusic() throws InterruptedException { for (Music music : musicList) { System.out.println("Musical genre: \"" + music.getClass().getSimpleName() + "\". Song name: \"" + music.getSong() + "\""); Thread.sleep(1000); } } }
[ "test@gmail.com" ]
test@gmail.com
7970a6502eb03860c9bc9a8ea6879b3087619cbb
6990a32cf4f05c53056a8c89bd608ef8ce5daa87
/src/main/java/cmpe273/BankAccount.java
b6047c9a97dd3899fb267c1f6a001aa9318e6cf2
[]
no_license
SwethaAmbati/cmpe273submission
66b0d70acc7563edaa18414c26c7960580045444
11fd2da386c82b93bb0e215f30a316a3137d6450
refs/heads/master
2016-08-04T18:47:32.552864
2014-10-02T05:45:34
2014-10-02T05:45:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
880
java
package cmpe273; import org.hibernate.validator.constraints.NotEmpty; public class BankAccount { @NotEmpty private String account_name; @NotEmpty private String account_number; @NotEmpty private String routing_number; private String ba_id; public BankAccount() { } public String getBa_id() { return ba_id; } public void setBa_id(String ba_id) { this.ba_id = ba_id; } public String getAccount_name() { return account_name; } public void setAccount_name(String account_name) { this.account_name = account_name; } public String getRouting_number() { return routing_number; } public void setRouting_number(String routing_number) { this.routing_number = routing_number; } public String getAccount_number() { return account_number; } public void setAccount_number(String account_number) { this.account_number = account_number; } }
[ "ambati.swe@gmail.com" ]
ambati.swe@gmail.com
367299f8eca4d68635fbc7a786d37c993697f58e
175150cd3fb63440b656429438b4fcbb261ca851
/src/eastern/enterprice/admin_billing.java
e88c2d83be79f8bd3066d762979a026a2b0b9a53
[]
no_license
sachithariyathilaka/Eastern-Enterprice
2b449caaba7f38a6dc0ea9cb449886929e7e9322
81f2468142f439f2413b2434dd14ffefc7633309
refs/heads/master
2022-06-30T13:28:49.552000
2022-06-03T10:48:22
2022-06-03T10:48:22
172,486,802
0
0
null
null
null
null
UTF-8
Java
false
false
37,325
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 eastern.enterprice; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.text.MessageFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import javax.swing.JOptionPane; import javax.swing.JTable; import javax.swing.table.DefaultTableModel; /** * * @author sachith ariahilaka */ public final class admin_billing extends javax.swing.JFrame { /** * Creates new form createbill */ public admin_billing() { initComponents(); billno(); showdate(); this.setLocation(260, 10); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jMenuItem2 = new javax.swing.JMenuItem(); jDesktopPane1 = new javax.swing.JDesktopPane(); jLabel3 = new javax.swing.JLabel(); qnt = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); price = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); warranty = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); discount = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); billno = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); total = new javax.swing.JTextField(); jLabel9 = new javax.swing.JLabel(); date = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); table = new javax.swing.JTable(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); customer = new javax.swing.JTextField(); code = new javax.swing.JTextField(); jLabel10 = new javax.swing.JLabel(); add = new javax.swing.JButton(); net = new javax.swing.JTextField(); print = new javax.swing.JButton(); cal = new javax.swing.JButton(); jLabel12 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jLabel11 = new javax.swing.JLabel(); discount1 = new javax.swing.JTextField(); cal1 = new javax.swing.JButton(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); jMenuItem3 = new javax.swing.JMenuItem(); jMenuItem2.setText("jMenuItem2"); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jDesktopPane1.setBackground(new java.awt.Color(255, 255, 255)); jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel3.setText("Quantity"); qnt.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel4.setText("Price"); price.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel5.setText("Warranty(Months)"); warranty.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel6.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel6.setText("Special Discount"); discount.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel1.setText("Bill No"); jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel2.setText("Item Code"); total.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N total.setHighlighter(null); total.setMargin(new java.awt.Insets(2, 4, 2, 2)); total.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { totalActionPerformed(evt); } }); jLabel9.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel9.setText("Date"); date.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N table.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "Date", "Billno", "Name", "Item Code", "Price", "Quantity", "Net Price", "Warranty" } )); table.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tableMouseClicked(evt); } }); jScrollPane1.setViewportView(table); jLabel7.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel7.setText("Total"); jLabel8.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel8.setText("Customer Name"); customer.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N code.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel10.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel10.setText("Net Price"); add.setBackground(new java.awt.Color(255, 255, 255)); add.setText("Add"); add.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addActionPerformed(evt); } }); net.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N print.setBackground(new java.awt.Color(255, 255, 255)); print.setText("Print"); print.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { printActionPerformed(evt); } }); cal.setBackground(new java.awt.Color(255, 255, 255)); cal.setText("Calculate"); cal.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { calActionPerformed(evt); } }); jLabel12.setFont(new java.awt.Font("Times New Roman", 1, 24)); // NOI18N jLabel12.setText("Billing"); jButton1.setText("Submit"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jLabel11.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N jLabel11.setText("Discount"); discount1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N cal1.setBackground(new java.awt.Color(255, 255, 255)); cal1.setText("Apply Discount"); cal1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cal1ActionPerformed(evt); } }); jDesktopPane1.setLayer(jLabel3, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(qnt, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jLabel4, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(price, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jLabel5, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(warranty, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jLabel6, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(discount, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(billno, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jLabel2, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(total, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jLabel9, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(date, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jScrollPane1, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jLabel7, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jLabel8, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(customer, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(code, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jLabel10, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(add, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(net, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(print, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(cal, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jLabel12, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jButton1, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(jLabel11, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(discount1, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane1.setLayer(cal1, javax.swing.JLayeredPane.DEFAULT_LAYER); javax.swing.GroupLayout jDesktopPane1Layout = new javax.swing.GroupLayout(jDesktopPane1); jDesktopPane1.setLayout(jDesktopPane1Layout); jDesktopPane1Layout.setHorizontalGroup( jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addContainerGap() .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addComponent(jLabel8) .addGap(71, 71, 71) .addComponent(customer, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jDesktopPane1Layout.createSequentialGroup() .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(qnt, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(code, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(price, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(warranty, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(discount, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(discount1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jDesktopPane1Layout.createSequentialGroup() .addComponent(jLabel10) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(net, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(add, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane1))) .addContainerGap()) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(38, 38, 38) .addComponent(cal)) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addGap(69, 69, 69) .addComponent(cal1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addGap(130, 130, 130) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(43, 43, 43) .addComponent(date, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(142, 142, 142)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jDesktopPane1Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jDesktopPane1Layout.createSequentialGroup() .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(28, 28, 28) .addComponent(total, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jDesktopPane1Layout.createSequentialGroup() .addComponent(print, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(167, 167, 167)))))))) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addGap(359, 359, 359) .addComponent(jLabel12)) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(47, 47, 47) .addComponent(billno, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(0, 0, Short.MAX_VALUE)) ); jDesktopPane1Layout.setVerticalGroup( jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addContainerGap(49, Short.MAX_VALUE) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(billno, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(86, 86, 86) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel8) .addComponent(customer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(code, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(qnt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3)) .addGap(18, 18, 18) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(price, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4)) .addGap(20, 20, 20) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(warranty, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5)) .addGap(18, 18, 18) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(discount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel11)) .addGap(18, 18, 18) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(discount1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)) .addGap(18, 18, 18) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel10) .addComponent(net, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addComponent(jLabel12) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(date, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel9)) .addGap(18, 18, 18) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 339, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7) .addComponent(total, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(print) .addGap(25, 25, 25)) .addGroup(jDesktopPane1Layout.createSequentialGroup() .addGap(35, 35, 35) .addGroup(jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(cal) .addComponent(add)) .addGap(28, 28, 28) .addComponent(cal1) .addGap(0, 44, Short.MAX_VALUE)))) ); jMenu1.setText("File"); jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); jMenuItem1.setText("Search"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu1.add(jMenuItem1); jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F12, 0)); jMenuItem3.setText("Exit"); jMenuItem3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem3ActionPerformed(evt); } }); jMenu1.add(jMenuItem3); jMenuBar1.add(jMenu1); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(0, 0, 0) .addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jDesktopPane1)) ); pack(); }// </editor-fold>//GEN-END:initComponents public void billno() { String sql1="SELECT COUNT(*) FROM billing"; Connection con; PreparedStatement pst; ResultSet rs1; try{ con=DriverManager.getConnection("jdbc:mysql://localhost:3306/eastern", "root", ""); pst=con.prepareStatement(sql1); rs1=pst.executeQuery(); while(rs1.next()) { int g=Integer.parseInt(rs1.getString(1)); g=g+1; billno.setText(String.valueOf(g)); } } catch(NumberFormatException | SQLException e) { JOptionPane.showMessageDialog(null,e); } } //insert data into billtable public void billupdate() { String Admin="Admin"; String query="INSERT INTO billing(billno,cname,code,quantity,price,total,user) VALUES("+billno.getText()+",'"+customer.getText()+"','"+code.getText()+"','"+qnt.getText()+"','"+price.getText()+"','"+net.getText()+"','"+Admin+"')"; Connection con; Statement st; try{ con = con=DriverManager.getConnection("jdbc:mysql://localhost:3306/eastern", "root", ""); st = con.createStatement(); st.executeUpdate(query); } catch(SQLException e) { JOptionPane.showMessageDialog(null ,e); } } private void totalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_totalActionPerformed // TODO add your handling code here: }//GEN-LAST:event_totalActionPerformed private void tableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableMouseClicked DefaultTableModel model =(DefaultTableModel) table.getModel(); qnt.setText(model.getValueAt( table.getSelectedRow(), 0).toString()); net.setText(model.getValueAt( table.getSelectedRow(), 2).toString()); customer.setText(model.getValueAt( table.getSelectedRow(), 1).toString()); }//GEN-LAST:event_tableMouseClicked public static String DateFormat = "yyyy-MM-dd"; public void showdate() { Calendar cal= Calendar.getInstance(); SimpleDateFormat format = new SimpleDateFormat(DateFormat); date.setText(format.format(cal.getTime())); } private void addActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addActionPerformed DefaultTableModel model =(DefaultTableModel) table.getModel(); billupdate(); String s2= qnt.getText(); String s1=price.getText(); String s3=discount.getText(); int d=Integer.parseInt(s3); int a=Integer.parseInt(s1); int b; b = Integer.parseInt(s2); int e=a-((d*a)/100); int c = e * b; String result=String.valueOf(c); net.setText(result); model.addRow(new Object[]{date.getText(),billno.getText(),customer.getText(),code.getText(),price.getText(),qnt.getText(),net.getText(),warranty.getText(),result}); // Update query; String sql1="UPDATE price_list SET Quantity=(Quantity+1) WHERE item_code='"+code.getText()+"' "; Connection con; Statement st; // ResultSet rs1; try{ con=DriverManager.getConnection("jdbc:mysql://localhost:3306/eastern", "root", ""); st=con.createStatement(); st.executeUpdate(sql1); } catch(SQLException e1) { JOptionPane.showMessageDialog(null,e1); } //int sum=0; //for(int i=0; i<table.getRowCount(); i++) //{ // sum = sum + Integer.parseInt(table.getValueAt(i,3).toString()); //} //total.setText(Integer.toString(sum)); total.setText(result); }//GEN-LAST:event_addActionPerformed private void printActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_printActionPerformed billupdate(); MessageFormat header=new MessageFormat("User Report"); MessageFormat footer=new MessageFormat("Page{0,number,integer}"); try{ table.print(JTable.PrintMode.NORMAL, header, footer ); } catch(java.awt.print.PrinterException e) { System.err.format("Cannot print %%n",e.getMessage()); } }//GEN-LAST:event_printActionPerformed private void calActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_calActionPerformed String s2= qnt.getText(); String s1=price.getText(); String s3=discount.getText(); int d=Integer.parseInt(s3); int a=Integer.parseInt(s1); int b; b = Integer.parseInt(s2); int e=a-((d*a)/100); int c = e * b; String result=String.valueOf(c); net.setText(result); }//GEN-LAST:event_calActionPerformed private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed dispose(); }//GEN-LAST:event_jMenuItem3ActionPerformed private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed Connection conn=null; Statement st=null; try{ Class.forName("com.mysql.jdbc.Driver"); conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/eastern","root",""); st = conn.createStatement(); String input=code.getText(); String sql = "SELECT *FROM price_list WHERE item_code='"+input+"'"; ResultSet rs = st.executeQuery(sql); while(rs.next()) { int i=Integer.parseInt(rs.getString("price")); price.setText(rs.getString("price")); int j=Integer.parseInt(rs.getString("discount")); discount.setText(rs.getString("discount")); warranty.setText(rs.getString("Warranty")); } }catch(Exception e) { e.printStackTrace(); } }//GEN-LAST:event_jButton1ActionPerformed private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed searchbill bill=new searchbill(); bill.setVisible(true); }//GEN-LAST:event_jMenuItem1ActionPerformed private void cal1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cal1ActionPerformed String s2= qnt.getText(); String s1=price.getText(); String s3=discount.getText(); String s4=discount1.getText(); int d=Integer.parseInt(s3); int a=Integer.parseInt(s1); int u=Integer.parseInt(s4); int b; b = Integer.parseInt(s2); int e=a-((d*a)/100); int c = e * b; int v=e-((c*u)/100); int w=v*b; String result=String.valueOf(w); net.setText(result); }//GEN-LAST:event_cal1ActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(admin_billing.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(admin_billing.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(admin_billing.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(admin_billing.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new admin_billing().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton add; private javax.swing.JTextField billno; private javax.swing.JButton cal; private javax.swing.JButton cal1; private javax.swing.JTextField code; private javax.swing.JTextField customer; private javax.swing.JTextField date; private javax.swing.JTextField discount; private javax.swing.JTextField discount1; private javax.swing.JButton jButton1; private javax.swing.JDesktopPane jDesktopPane1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private javax.swing.JMenu jMenu1; private javax.swing.JMenuBar jMenuBar1; private javax.swing.JMenuItem jMenuItem1; private javax.swing.JMenuItem jMenuItem2; private javax.swing.JMenuItem jMenuItem3; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTextField net; private javax.swing.JTextField price; private javax.swing.JButton print; private javax.swing.JTextField qnt; private javax.swing.JTable table; private javax.swing.JTextField total; private javax.swing.JTextField warranty; // End of variables declaration//GEN-END:variables }
[ "sachith.vidu@yahoo.com" ]
sachith.vidu@yahoo.com
35dcd2e3526278308a74889fa8bb8d6aef69aabe
2b52acd4f48baee1f605db8bb88e4c5686caebb2
/src/main/java/com/baodanyun/websocket/util/CommonConfig.java
500e6f536eae31c073e5253e0cc400f28c61ee0b
[]
no_license
liaowuhen88/wxmpp_product
ccba5c2290becb1c3b8164bc4419ead80e68f8de
c1dc522618e49ae282ce78d66a0952df20149c7d
refs/heads/master
2021-01-20T15:04:50.077517
2017-11-06T07:18:51
2017-11-06T07:18:51
90,714,943
0
0
null
null
null
null
UTF-8
Java
false
false
1,984
java
package com.baodanyun.websocket.util; /** * Created by liaowuhen on 2017/2/16. */ public class CommonConfig { //业务线定义 otype public static final int Event_OType_OTHER = 0; //其他业务线 public static final int Event_OType_H5_KF = 1; //h5客服业务线 public static final int Event_OType_WX_KF = 2; //微信客服业务线 //用户交互事件的事件类型 event public static final String MSG_BIZ_KF_ENTER = "0101"; //进入客服 public static final String MSG_BIZ_KF_CHAT = "010101"; //与客服聊天 public static final String MSG_BIZ_KF_QUIT = "0102"; //退出客服 public static final String MSG_BIZ_KF_LEAVE_MESSAGE = "0103"; //用户留言 // 缓存常量 public static final String USER_INFO_KEY = "KF_USER_INFO_KY_";//用户信息 public static final String USER_ACCOUNT_KEY = "KF_USER_ACCOUNT_KY_";//UserAccount public static final String USER_VISITOR= "USER_VISITOR";//客服 public static final String USER_CUSTOMER = "USER_CUSTOMER";//访客 //public static final String USER_HISTORY = "USER_HISTORY";//历史聊天记录人 public static final String USER_ONLINE = "USER_ONLINE";//在线 public static final String USER_WAIT = "USER_WAIT";//等待队列 public static final String USER_BACKUP= "USER_BACKUP";//备份 public static final String USER_COMPANY_KEY = "USER_COMPANY_KEY";//订单信息 public static final String USER_ORDER_KEY = "USER_ORDER_KEY_";//订单信息 public static final String USER_CLAIMS_KEY = "USER_CLAIMS_KEY_";//理赔信息 public static final String USER_CONTRACT_KEY = "USER_CONTRACT_KEY_";//合同信息 public static final String USER_OPENID_KEY = "USER_OPENID_KEY";//openId public static final String PC_CUSTOMER = "pc_customer";//openId public static final String MOBILE_CUSTOMER = "mobile_customer";//openId public static final String ZX_CJ_INFO = "zx_cj_info";//坐席插件是否在线的key }
[ "296558063@qq.com" ]
296558063@qq.com
a0b24306e482930aecf08aca51210016d317dad5
0d7664c1314c4f5c655d6bfdebf5067779999852
/app/src/main/java/es/upm/miw/dasm/marvelfanatics/adapters/SavedComicsAdapter.java
be655c1f40a311ca4629ab99f5a2aeb3260fbdbe
[]
no_license
fer2d2/MarvelFanatics
016e1a1e0fab114e0c8f77715c86c42bf563045c
d3d52f0120eab389b99ed8365dc0eed376f37302
refs/heads/master
2021-01-10T12:14:35.164597
2015-11-09T17:00:48
2015-11-09T17:00:48
45,842,159
0
0
null
null
null
null
UTF-8
Java
false
false
4,980
java
package es.upm.miw.dasm.marvelfanatics.adapters; import android.content.Context; import android.content.Intent; import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.j256.ormlite.dao.Dao; import org.androidannotations.annotations.AfterInject; import org.androidannotations.annotations.EBean; import org.androidannotations.annotations.RootContext; import java.sql.SQLException; import java.util.List; import es.upm.miw.dasm.marvelfanatics.ComicDetailActivity_; import es.upm.miw.dasm.marvelfanatics.R; import es.upm.miw.dasm.marvelfanatics.api.db.helpers.marvel.MarvelDBHelper; import es.upm.miw.dasm.marvelfanatics.api.models.marvel.Comic; @EBean public class SavedComicsAdapter extends RecyclerView.Adapter<SavedComicsAdapter.ComicDataHolder> { private List<Comic> savedComics; private Dao<Comic, Integer> comicDao; @RootContext Context context; @AfterInject void initAdapter() { this.initializeComicDao(); this.populateSavedComicsList(); } private void initializeComicDao() { MarvelDBHelper marvelDBHelper = new MarvelDBHelper(context); try { comicDao = marvelDBHelper.getComicDao(); } catch (SQLException e) { e.printStackTrace(); } } private void populateSavedComicsList() { try { this.savedComics = comicDao.query( comicDao.queryBuilder().where() .eq("read", true) .or() .eq("favourite", true) .prepare() ); } catch (SQLException e) { e.printStackTrace(); } } @Override public ComicDataHolder onCreateViewHolder(ViewGroup parent, int viewType) { View itemView = LayoutInflater. from(parent.getContext()). inflate(R.layout.saved_comic_card, parent, false); Log.i("onCreateViewHolder", itemView.toString()); return new ComicDataHolder(itemView); } @Override public void onBindViewHolder(ComicDataHolder holder, int position) { Comic selectedComic = savedComics.get(position); holder.savedComicCardTitle.setText(selectedComic.getTitle()); setIconsVisibility(holder, selectedComic); final int listenerPosition = position; holder.savedComicData.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { Comic selectedComic = savedComics.get(listenerPosition); Intent comicDetailIntent = new Intent(context, ComicDetailActivity_.class); comicDetailIntent.putExtra("COMIC_DETAIL", selectedComic); context.startActivity(comicDetailIntent); } }); } @Override public int getItemCount() { return savedComics.size(); } public static class ComicDataHolder extends RecyclerView.ViewHolder { protected TextView savedComicCardTitle; protected CardView savedComicData; protected ImageView listButtonFavourite; protected ImageView listButtonUnfavourite; protected ImageView listButtonRead; protected ImageView listButtonUnread; public ComicDataHolder(View itemView) { super(itemView); this.savedComicCardTitle = (TextView) itemView.findViewById(R.id.savedComicCardTitle); this.savedComicData = (CardView) itemView.findViewById(R.id.savedComicData); this.listButtonFavourite = (ImageView) itemView.findViewById(R.id.listButtonFavourite); this.listButtonUnfavourite = (ImageView) itemView.findViewById(R.id.listButtonUnfavourite); this.listButtonRead = (ImageView) itemView.findViewById(R.id.listButtonRead); this.listButtonUnread = (ImageView) itemView.findViewById(R.id.listButtonUnread); } } private void setIconsVisibility(ComicDataHolder holder, Comic comic) { if (comic.isFavourite()) { holder.listButtonFavourite.setVisibility(View.VISIBLE); holder.listButtonUnfavourite.setVisibility(View.GONE); } else { holder.listButtonFavourite.setVisibility(View.GONE); holder.listButtonUnfavourite.setVisibility(View.VISIBLE); } if (comic.isRead()) { holder.listButtonRead.setVisibility(View.VISIBLE); holder.listButtonUnread.setVisibility(View.GONE); } else { holder.listButtonRead.setVisibility(View.GONE); holder.listButtonUnread.setVisibility(View.VISIBLE); } } }
[ "morohernandez.fernando@gmail.com" ]
morohernandez.fernando@gmail.com
538750340e0c61d33473a6d0fb6441dc065a129f
ffb4a487311d07057c3280bb280b3ce4fa8ab7e4
/src/main/java/com/objectway/stage/crud/ActorCrudImpl.java
a210d5f23f7118a9daf4d3157b9755c9c2147e8a
[]
no_license
francesco995/JPAMovies
596c5f6e999da32793c2dfeda1b55bd027a63f0c
424fc6fcd21b41f0cb0c42995093b00d39260f2c
refs/heads/master
2021-08-14T10:34:58.300773
2017-11-15T11:26:31
2017-11-15T11:26:31
110,824,495
0
0
null
null
null
null
UTF-8
Java
false
false
1,115
java
package com.objectway.stage.crud; import com.objectway.stage.EntityManagerUtil; import com.objectway.stage.model.Actor; import javax.persistence.EntityManager; import javax.persistence.Query; import java.util.List; public class ActorCrudImpl implements ActorCrud { public List<Actor> findAllActors() { EntityManager em = EntityManagerUtil.getEntityManager(); Query query = em.createNamedQuery(Actor.FIND_ALL); return query.getResultList(); } public Actor saveActor(Actor actor) { EntityManager em = EntityManagerUtil.getEntityManager(); em.getTransaction().begin(); em.persist(actor); em.getTransaction().commit(); return actor; } public Actor updateActor(Actor actor) { EntityManager em = EntityManagerUtil.getEntityManager(); em.getTransaction().begin(); em.merge(actor); em.getTransaction().commit(); return actor; } public Actor findActorById(int id) { EntityManager em = EntityManagerUtil.getEntityManager(); return em.find(Actor.class, id); } }
[ "francesco.gianni@objectway.it" ]
francesco.gianni@objectway.it
2038c549e9013cede2044de66361738e695e4ef4
235b28e89fca05575b9ca266e18c3c91c2f461fc
/app/src/main/java/com/android/DeteksiTypus/LoginActivity.java
28443122e0873a553347d7ad681ce851ff4ce081
[]
no_license
faozi07/DeteksiTypus
144de12d3c425587f1e4ed282b6f3cca38179546
07d3aa6a49380a523c57c6f679e8bf4dc0e5607a
refs/heads/master
2020-03-23T23:26:59.157222
2018-08-11T13:06:00
2018-08-11T13:06:00
142,234,864
0
0
null
null
null
null
UTF-8
Java
false
false
3,770
java
package com.android.DeteksiTypus; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; public class LoginActivity extends AppCompatActivity { Button btnLogin, btnRegister; EditText editUsername, editPassword; public static boolean isTerdaftar = false; public static String username = "", nama = "", umur = "", jenkel = ""; UserDB userDB = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); userDB = new UserDB(this); btnLogin = findViewById(R.id.btnLogin); btnRegister = findViewById(R.id.btnRegister); editUsername = findViewById(R.id.username); editPassword = findViewById(R.id.textPassword); btnLogin.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { View view = getCurrentFocus(); if (view != null) { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } } if (editUsername.getText().toString().equals("") || editPassword.getText().toString().equals("")) { Toast.makeText(LoginActivity.this, "Isi data dengan lengkap", Toast.LENGTH_LONG).show(); } else { userDB.login(editUsername.getText().toString(), editPassword.getText().toString()); final ProgressDialog progressDialog = new ProgressDialog(LoginActivity.this); progressDialog.setMessage("Login ..."); progressDialog.setCancelable(false); progressDialog.show(); new Handler().postDelayed(new Runnable() { @Override public void run() { progressDialog.dismiss(); cekDataUser(); } }, 3000); } } }); btnRegister.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(LoginActivity.this, RegisterActivity.class)); } }); } private void cekDataUser() { if (isTerdaftar) { finish(); SharedPreferences spLogin = getSharedPreferences(StaticVars.SP_LOGIN, MODE_PRIVATE); SharedPreferences.Editor loginEditor = spLogin.edit(); loginEditor.putString(StaticVars.SP_LOGIN_USERNAME, username); loginEditor.putString(StaticVars.SP_LOGIN_NAMA, nama); loginEditor.putString(StaticVars.SP_LOGIN_UMUR, umur); loginEditor.putString(StaticVars.SP_LOGIN_JENIS_KELAMIN, jenkel); loginEditor.putString(StaticVars.SP_LOGIN_SOLUSI_DIAGNOSA, ""); loginEditor.apply(); startActivity(new Intent(LoginActivity.this, MainActivity.class)); } else { Toast.makeText(LoginActivity.this, "Login gagal, silahkan coba lagi", Toast.LENGTH_LONG).show(); } } }
[ "syaeful.faozi93@gmail.com" ]
syaeful.faozi93@gmail.com
760532cd0be507e8136499ea28e7f45b8a40d53e
0ec360d50bca05fcb50439fe67d044852580afa8
/src/main/java/it/poliba/sisinflab/simlib/neighborhood/pathbaseditem/ReachablePaths.java
c6a09283a14db5570a84849bdb45cdc84626d708
[ "MIT" ]
permissive
sisinflab/simlib
4c8fbd4c7dda6d9c6a1cdb46b2c3ff5d0b802de5
70bc0d59e1ea7ef5de5e3498e868bf9dd439214c
refs/heads/master
2020-07-07T01:46:19.057182
2017-06-06T08:55:32
2017-06-06T08:55:32
67,815,112
2
1
null
2016-09-12T12:40:14
2016-09-09T16:35:22
Java
UTF-8
Java
false
false
7,016
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 it.poliba.sisinflab.simlib.neighborhood.pathbaseditem; import it.poliba.sisinflab.simlib.datamodel.Arrow; import it.poliba.sisinflab.simlib.datamodel.Node; import it.poliba.sisinflab.simlib.neighborhood.NeighborGraph; import java.util.HashSet; import java.util.LinkedList; /** * * @author Corrado on 04/04/2016. */ public final class ReachablePaths { //nodo item del neighborhood graph protected Node item; //profondità massima graph protected Integer hop; //paths percorribili dall'item i protected HashSet<EntityPath> entitypaths = new HashSet<>(); //nodi from root to create paths protected LinkedList<Node> nodesfromroot = new LinkedList<>(); //sub-paths di ogni path percorribile dall'item i protected LinkedList<EntityPath> entitysubpaths = new LinkedList<>(); public ReachablePaths(NeighborGraph ng){ this.hop = ng.getHop(); //this.graph = ng.getGraph(); this.item = ng.getItem(); calculateReachablePaths(hop,item); System.out.println("For item:"+ item.getId()+" number of mainpaths :"+entitypaths.size()); calculateReachableSubPaths(); System.out.println("For item:"+ item.getId()+" number of all subpaths :"+entitysubpaths.size()); System.out.println(); } public HashSet<EntityPath> getEntitypaths() { return entitypaths; } public void setEntitypaths(HashSet<EntityPath> entitypaths) { this.entitypaths = entitypaths; } public LinkedList<EntityPath> getEntitysubpaths() { return entitysubpaths; } public void setEntitysubpaths(LinkedList<EntityPath> entitysubpaths) { this.entitysubpaths = entitysubpaths; } public Node getItem() { return item; } public void setItem(Node item) { this.item = item; } public void setHop(Integer hop) { this.hop = hop; } public void calculateReachableSubPaths(){ entitysubpaths.clear(); //verifica inserimento parallel stream? entitypaths.forEach((EntityPath path)->{entitysubpaths.addAll(path.getSubPathList());}); } public HashSet<Node> calculateReachablePaths(int distance,Node nodeitem){ HashSet<Node> nodivicini1 = new HashSet<>(); HashSet<Node> nodi2 = new HashSet<>(); if(distance>0) { //ottengo tutti i nodi vicini all'item a distanza 1 //nodi2.addAll(nodeitem.getInOutNeighbors(1)); nodi2.clear(); nodi2.addAll(nodeitem.getNeighbors(1,Arrow.DIR_UND)); int s = hop-distance; //verifico la lunghezza del percorso dal root if(nodesfromroot.size()== s) { nodesfromroot.addLast(nodeitem); }else { //elimino i nodi in nodesfromroot in base alla profondità in cui mi trovo per aggiungere il successivo(es. 486-90-1,486-90-2,...per //passare al nodo 34 per eseguire 486-34-5,486-34-7, e così via) do{ nodesfromroot.removeLast(); }while(s!= nodesfromroot.size()); nodesfromroot.addLast(nodeitem); } distance--; //s>0 stiamo esaminando dal secondo passo in poi.. if(s>0) { //rimuovo dai nodi vicini il nodo già visitato(es. 486-187 se calcolo //i vicini di 187 riavrò 486 ma non devo considerarlo poichè sono arrivato a 187 da 486 if(nodi2.contains(nodesfromroot.get(s-1))) { nodi2.remove(nodesfromroot.get(s-1)); } } if(!nodi2.isEmpty() && distance>0) { for (Node entry : nodi2) { //verifico se il nodo è stato già visitato(ulteriore verifica) if(!nodesfromroot.contains(entry)) { nodivicini1 = calculateReachablePaths(distance,entry); //nodesfromroot.remove(nodeitem); } } }else { //creo path entity //caso in cui la distanza è 0(si è raggiunta la profondità richiesta dai paths) LinkedList<Node> list = new LinkedList<>(); if(!nodi2.isEmpty()) { for(Node n : nodi2 ) { list.clear(); EntityPath ep = new EntityPath(); list.addAll(nodesfromroot); //per non inserire nodi già visitati if(!list.contains(n)) { list.addLast(n); //list.add(nodeitem); ep.setPathList(list); EntityPath w = new EntityPath(ep.getPathList(),ep.calculateReachableSubPaths()); entitypaths.add(w); //writeOnOutput(ep,w.getSubPathList()); } } }else if(nodi2.isEmpty()) { //caso in cui la distanza>0 ma non ci sono vicini per il nodoitem EntityPath ep = new EntityPath(); //LinkedList<Node> list = new LinkedList<>(); list.clear(); list.addAll(nodesfromroot); ep.setPathList(list); //calculate subpaths EntityPath w = new EntityPath(ep.getPathList(),ep.calculateReachableSubPaths()); //salvo il path corredato dei subpaths entitypaths.add(w); //writeOnOutput(ep,w.getSubPathList()); } nodesfromroot.remove(nodeitem); } } return nodivicini1; } public void writeOnOutput(EntityPath ep,LinkedList<EntityPath> listsubpath) { System.out.println("\033[31m MAINPATH:"); for(int i=0;i<ep.getPathList().size();i++) { System.out.print("node :" + ep.getPathList().get(i).getId()+" "); } System.out.println(); System.out.println("\033[34m SUBPATHS:"); for(EntityPath e:listsubpath) { e.getPathList().stream().forEach((n) -> { System.out.print("\033[0m node :" + n.getId()+" "); }); System.out.println(); } System.out.println(); } }
[ "paolo.tomeo@poliba.it" ]
paolo.tomeo@poliba.it
aa363e571fd035c3a2b96e59faada1c2b013e1a7
f43504b11e935796128f07ab166e7d47a248f204
/Low_level_Design_Problems/parkinglot/src/main/java/com/gb/parkinglot/exceptions/InvlaidParkingFloorException.java
c2b5358f8c2f52ee0c91b16e08c342b31f67825d
[ "Apache-2.0" ]
permissive
vish35/LLD
4e3b4b6a22e334e1ab69871e5ded526613bb73f8
1d8f209213f74395fc1121a5862ce2a467b09f94
refs/heads/main
2023-07-30T09:10:39.696754
2021-09-15T05:46:45
2021-09-15T05:46:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
191
java
package com.gb.parkinglot.exceptions; public class InvlaidParkingFloorException extends Exception { public InvlaidParkingFloorException(String message) { super(message); } }
[ "gowtkum@amazon.com" ]
gowtkum@amazon.com
e26d738301ede9c704c3e293f7e4ca1da6adeb7f
447da1e18d522f0049014c9ab91a8d6e49805bba
/src/main/java/com/giftcard/dtos/ShippingAddressDTO.java
f42867e1516dbcd54157451629f78d9c4bbc5570
[]
no_license
AssessmentRepository/Giftcard-Junior-FSE-Java
5a4ba6d3880707d79212aabfdc6fc3482559630d
75407b6e7121c5115b6dc3c670ce4dd5175e033d
refs/heads/master
2023-04-13T11:54:30.233646
2020-06-10T10:17:53
2020-06-10T10:17:53
271,189,237
0
0
null
2021-04-26T20:22:23
2020-06-10T05:42:59
Java
UTF-8
Java
false
false
1,087
java
package com.giftcard.dtos; import org.hibernate.validator.constraints.Length; public class ShippingAddressDTO { private String shippingId; private String streetName; private String cityName; private String state; private String country; @Length(min = 6, max = 6) private String pincode; public String getShippingId() { return shippingId; } public void setShippingId(String shippingId) { this.shippingId = shippingId; } public String getStreetName() { return streetName; } public void setStreetName(String streetName) { this.streetName = streetName; } public String getCityName() { return cityName; } public void setCityName(String cityName) { this.cityName = cityName; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public String getPincode() { return pincode; } public void setPincode(String pincode) { this.pincode = pincode; } }
[ "murali.itservice@gmail.com" ]
murali.itservice@gmail.com
214117bf40a1643ae7cecb7902dd5725851d9807
08e43889681c374ff1578065ab2c7373b0bc49ee
/OracleJavaProAssign1/src/Test3.java
c961051a10686136a9fa1f988909a45654a40c45
[]
no_license
mohithreddy50/OracleJavaProAssign1
4bbdf6a669593b762ef707bb325b8bb840fd7c3f
94e2224dce84c89c97fdc9adf170e87b682292d7
refs/heads/master
2020-09-27T07:51:47.720975
2019-12-07T06:51:52
2019-12-07T06:51:52
226,468,481
0
0
null
null
null
null
UTF-8
Java
false
false
316
java
public class Test3 { public void and(int a,int b) { int c=a&b; System.out.println("Bitwise and "+c); } public void or(int a,int b) { int c=a|b; System.out.println("Bitwise or"+c); } public void exclusiveOr(int a,int b) { int c=a^b; System.out.println("exclusive or" + c); } }
[ "Lab-1@DESKTOP-UHM8TAB" ]
Lab-1@DESKTOP-UHM8TAB
fefcf09c83ea9cf311e722221e245e4a9ef8300b
3a9f51007bc57b520d2321ef3c27d323c9aaa1ea
/src/main/java/helpers/OutputType.java
043df12372d291654ffedc96b7375c44fea4c8e1
[ "Apache-2.0" ]
permissive
assaad/PenroseTiling
5588f31164c835a2786773e0aa0587f5a3dd8af0
582ef76248daec2d0d0a25b2c2ce0e5f98916c65
refs/heads/main
2023-01-11T09:15:03.297296
2020-11-21T07:25:39
2020-11-21T07:25:39
314,747,930
0
0
null
null
null
null
UTF-8
Java
false
false
1,195
java
/* * Copyright 2019 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package helpers; import com.beust.jcommander.IStringConverter; public enum OutputType { SVG, SVGLINE; public static class Converter implements IStringConverter<OutputType> { @Override public OutputType convert(String value) { value = value.toUpperCase(); if ("SVG".equals(value)) { return SVG; } else if ("SVGLINE".equals(value)) { return SVGLINE; } throw new IllegalArgumentException( String.format("%s is not a valid output type", value)); } } }
[ "assaad.moawad@datathings.com" ]
assaad.moawad@datathings.com
c9747c79c076bf1b0ef46827906d87585aa61c90
4e997957a62c38b2e651ab1f494c8546d088c437
/rei-admin/src/main/java/com/bynow/rei/modular/blog/service/ICategoryService.java
9831784a8e77493d7bec87a8790cf7900f690266
[]
no_license
YourHands/rei
d82d53b454fd1fa8245cadbf0b5a1a45f7058399
3be7e5226204cafdb36f4f2bb3f88ef3e447331b
refs/heads/master
2020-03-17T14:16:05.025041
2018-05-16T08:04:07
2018-05-16T08:04:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
308
java
package com.bynow.rei.modular.blog.service; import com.bynow.rei.modular.blog.model.Category; import com.baomidou.mybatisplus.service.IService; /** * <p> * 博客类别表 服务类 * </p> * * @author bynow123 * @since 2018-05-15 */ public interface ICategoryService extends IService<Category> { }
[ "thc19940301" ]
thc19940301
c7ecfa87761032fdd84755c2129c30f234c4aefe
7c7e2d485522032e86fe5a8e6ed971d4db7f591c
/4Semestre/LinguagensDeProgramação/Lista12/src/questao3/Main.java
0b3b8a2917e1959e3917e484eae5a05cd04da44d
[]
no_license
vinicius-lds/FURB
3e952c31f999d8cffbaf7c63625caf7899ba7cd3
f0470cedf9350ed80b638e0181ef8254397a652f
refs/heads/master
2020-03-22T03:52:01.770963
2018-10-31T20:29:32
2018-10-31T20:29:32
139,456,947
0
1
null
null
null
null
UTF-8
Java
false
false
534
java
package questao3; import java.util.Random; /** * @author Vinícius Luis da Silva */ public class Main { public static final long TEMPO_IMPRESSAO = 1000; public static void main(String[] args) { Servidor servidor = new Servidor(); for (int i = 0; i < 3; i++) { new Impressora(servidor, "Impressora" + (i + 1)); } Random r = new Random(); for (int i = 0; i < 10; i++) { new Computador(servidor, r.nextInt(10) + 1, "Computador" + (i + 1)); } } }
[ "vinicius.lds.br@gmail.com" ]
vinicius.lds.br@gmail.com
9076985f22c05f942ff7c0cd8f8b7de572e893f6
6b737ec5f0ed1b93dc36015b0f4a78470f4b9ab8
/kodilla-testing/src/main/java/com/kodilla/testing/shape/ShapeCollector.java
5e9c3959643ebc7b950336b26344873c79f3ee41
[]
no_license
mzieniewicz/michalina-zieniewicz-kodilla-java
2b683add168c04865cfbfcd54b627c75a398b7ba
f3d51547153cf0004577a3c73b212c8008d053d5
refs/heads/master
2021-05-17T03:39:27.117759
2020-11-19T20:19:41
2020-11-19T20:19:41
250,602,844
0
0
null
null
null
null
UTF-8
Java
false
false
966
java
package com.kodilla.testing.shape; import java.util.ArrayList; public class ShapeCollector { private Shape shape; private ArrayList<Shape> listOfFigures = new ArrayList<Shape>(); public ShapeCollector() { } public void addFigure(Shape shape) { listOfFigures.add(shape); } public Shape getFigure(int shapeNumber) { Shape shape = null; if (shapeNumber >= 0 && shapeNumber < listOfFigures.size()) { shape = listOfFigures.get(shapeNumber); } return shape; } public boolean removeFigure(Shape shape) { boolean result = false; if (listOfFigures.contains(shape)) { listOfFigures.remove(shape); result = true; } return result; } public int getFigureQuantity() { return listOfFigures.size(); } public void showFigures() { System.out.println(" Figure is: a " + shape.getShapeName()); } }
[ "mzieniewicz@gmail.com" ]
mzieniewicz@gmail.com
1885599e6c8959a5b51ebb0bf279938ffb171058
0b7a9d62eab6c5e3377191ce8976297418115b68
/lib_magicindicator/src/main/java/com/zhuwb/lib_magicindicator/buildins/commonnavigator/indicators/TestPagerIndicator.java
ce0ce3fda30904ac591a094b41e8f8b640a02344
[]
no_license
ZhuWenBin97/MyBoBaoGe
7667eb21b06c8bce36c22f7ddca0b10a73f85683
e15b000e2e027513499d5332052927e8821ae561
refs/heads/master
2021-08-23T18:17:35.822065
2017-12-06T01:47:23
2017-12-06T01:47:23
110,338,991
0
0
null
null
null
null
UTF-8
Java
false
false
3,484
java
package com.zhuwb.lib_magicindicator.buildins.commonnavigator.indicators; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.RectF; import android.view.View; import com.zhuwb.lib_magicindicator.FragmentContainerHelper; import com.zhuwb.lib_magicindicator.buildins.commonnavigator.abs.IPagerIndicator; import com.zhuwb.lib_magicindicator.buildins.commonnavigator.model.PositionData; import java.util.List; /** * 用于测试的指示器,可用来检测自定义的IMeasurablePagerTitleView是否正确测量内容区域 * 博客: http://hackware.lucode.net * Created by hackware on 2016/6/26. */ public class TestPagerIndicator extends View implements IPagerIndicator { private Paint mPaint; private int mOutRectColor; private int mInnerRectColor; private RectF mOutRect = new RectF(); private RectF mInnerRect = new RectF(); private List<PositionData> mPositionDataList; public TestPagerIndicator(Context context) { super(context); init(context); } private void init(Context context) { mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mPaint.setStyle(Paint.Style.STROKE); mOutRectColor = Color.RED; mInnerRectColor = Color.GREEN; } @Override protected void onDraw(Canvas canvas) { mPaint.setColor(mOutRectColor); canvas.drawRect(mOutRect, mPaint); mPaint.setColor(mInnerRectColor); canvas.drawRect(mInnerRect, mPaint); } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { if (mPositionDataList == null || mPositionDataList.isEmpty()) { return; } // 计算锚点位置 PositionData current = FragmentContainerHelper.getImitativePositionData(mPositionDataList, position); PositionData next = FragmentContainerHelper.getImitativePositionData(mPositionDataList, position + 1); mOutRect.left = current.mLeft + (next.mLeft - current.mLeft) * positionOffset; mOutRect.top = current.mTop + (next.mTop - current.mTop) * positionOffset; mOutRect.right = current.mRight + (next.mRight - current.mRight) * positionOffset; mOutRect.bottom = current.mBottom + (next.mBottom - current.mBottom) * positionOffset; mInnerRect.left = current.mContentLeft + (next.mContentLeft - current.mContentLeft) * positionOffset; mInnerRect.top = current.mContentTop + (next.mContentTop - current.mContentTop) * positionOffset; mInnerRect.right = current.mContentRight + (next.mContentRight - current.mContentRight) * positionOffset; mInnerRect.bottom = current.mContentBottom + (next.mContentBottom - current.mContentBottom) * positionOffset; invalidate(); } @Override public void onPageSelected(int position) { } @Override public void onPageScrollStateChanged(int state) { } @Override public void onPositionDataProvide(List<PositionData> dataList) { mPositionDataList = dataList; } public int getOutRectColor() { return mOutRectColor; } public void setOutRectColor(int outRectColor) { mOutRectColor = outRectColor; } public int getInnerRectColor() { return mInnerRectColor; } public void setInnerRectColor(int innerRectColor) { mInnerRectColor = innerRectColor; } }
[ "911152556@qq.com" ]
911152556@qq.com
21e88b79bacd1df2ad9cdf4ebfa542fd4d609334
5e4cb292cf626e840752fe821ad80b1751edda42
/Hadoop/src/main/java/MapReduce/WordCount.java
956d15a8086c1e2353a0a0f04b0e972faf1e3a34
[]
no_license
halfOfGame/ChongChongChong
06ad96961b02bce7c81b441d4999df8a4ba7eda9
9f0422f0074a1f995299a6a7e39bdb7c88fdbd7e
refs/heads/master
2023-01-06T07:09:32.783935
2020-11-04T01:34:39
2020-11-04T01:34:39
301,149,864
0
0
null
null
null
null
UTF-8
Java
false
false
2,909
java
package MapReduce; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.hadoop.util.GenericOptionsParser; import java.io.IOException; import java.util.Iterator; import java.util.StringTokenizer; public class WordCount { public WordCount() { } public static void main(String[] args) throws Exception { Configuration conf = new Configuration(); String[] otherArgs = (new GenericOptionsParser(conf, args)).getRemainingArgs(); if (otherArgs.length < 2) { System.err.println("Usage: wordcount <in> [<in>...] <out>"); System.exit(2); } Job job = Job.getInstance(conf, "word count"); job.setJarByClass(WordCount.class); job.setMapperClass(TokenizerMapper.class); job.setCombinerClass(IntSumReducer.class); job.setReducerClass(IntSumReducer.class); job.setOutputKeyClass(Text.class); job.setOutputValueClass(IntWritable.class); for (int i = 0; i < otherArgs.length - 1; ++i) { FileInputFormat.addInputPath(job, new Path(otherArgs[i])); } FileOutputFormat.setOutputPath(job, new Path(otherArgs[otherArgs.length - 1])); System.exit(job.waitForCompletion(true) ? 0 : 1); } public static class TokenizerMapper extends Mapper<Object, Text, Text, IntWritable> { private static final IntWritable one = new IntWritable(1); private Text word = new Text(); public TokenizerMapper() { } public void map(Object key, Text value, Mapper<Object, Text, Text, IntWritable>.Context context) throws IOException, InterruptedException { StringTokenizer itr = new StringTokenizer(value.toString()); while (itr.hasMoreTokens()) { this.word.set(itr.nextToken()); context.write(this.word, one); } } } public static class IntSumReducer extends Reducer<Text, IntWritable, Text, IntWritable> { private IntWritable result = new IntWritable(); public IntSumReducer() { } public void reduce(Text key, Iterable<IntWritable> values, Reducer<Text, IntWritable, Text, IntWritable>.Context context) throws IOException, InterruptedException { int sum = 0; IntWritable val; for (Iterator i$ = values.iterator(); i$.hasNext(); sum += val.get()) { val = (IntWritable) i$.next(); } this.result.set(sum); context.write(key, this.result); } } }
[ "halfofgame@foxmail.com" ]
halfofgame@foxmail.com
df0d71fbff84d1215e5777bc901d6dd0cee2386e
94228df04c8d71ef72d0278ed049e9eac43566bc
/modules/marketdevelopment/marketdevelopment-provider/src/main/java/com/bjike/goddess/marketdevelopment/api/DayPlanApiImpl.java
68f7a954561ff18b38c3eef07f2b5b9014a2d7c9
[]
no_license
yang65700/goddess-java
b1c99ac4626c29651250969d58d346b7a13eb9ad
3f982a3688ee7c97d8916d9cb776151b5af8f04f
refs/heads/master
2021-04-12T11:10:39.345659
2017-09-12T02:32:51
2017-09-12T02:32:51
126,562,737
0
0
null
2018-03-24T03:33:53
2018-03-24T03:33:53
null
UTF-8
Java
false
false
2,372
java
package com.bjike.goddess.marketdevelopment.api; import com.bjike.goddess.common.api.exception.SerException; import com.bjike.goddess.common.utils.bean.BeanTransform; import com.bjike.goddess.marketdevelopment.bo.DayPlanBO; import com.bjike.goddess.marketdevelopment.dto.DayPlanDTO; import com.bjike.goddess.marketdevelopment.service.DayPlanSer; import com.bjike.goddess.marketdevelopment.to.CollectTO; import com.bjike.goddess.marketdevelopment.to.DayPlanTO; import com.bjike.goddess.marketdevelopment.to.GuidePermissionTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * 天计划业务接口实现 * * @Author: [ dengjunren ] * @Date: [ 2017-03-22 07:08 ] * @Description: [ 天计划业务接口实现 ] * @Version: [ v1.0.0 ] * @Copy: [ com.bjike ] */ @Service("dayPlanApiImpl") public class DayPlanApiImpl implements DayPlanAPI { @Autowired private DayPlanSer dayPlanSer; @Override public Boolean guidePermission(GuidePermissionTO guidePermissionTO) throws SerException { return dayPlanSer.guidePermission(guidePermissionTO); } @Override public DayPlanBO save(DayPlanTO to) throws SerException { return dayPlanSer.save(to); } @Override public DayPlanBO update(DayPlanTO to) throws SerException { return dayPlanSer.update(to); } @Override public DayPlanBO delete(DayPlanTO to) throws SerException { return dayPlanSer.delete(to); } @Override public List<DayPlanBO> findByDate(String start, String end) throws SerException { return dayPlanSer.findByDate(start, end); } @Override public List<DayPlanBO> findByDate(String date) throws SerException { return dayPlanSer.findByDate(date); } @Override public DayPlanBO getById(String id) throws SerException { return BeanTransform.copyProperties(dayPlanSer.findById(id), DayPlanBO.class); } @Override public List<DayPlanBO> maps(DayPlanDTO dto) throws SerException { return dayPlanSer.maps(dto); } @Override public Integer getTotal() throws SerException { return dayPlanSer.findAll().size(); } @Override public byte[] exportExcel(CollectTO to) throws SerException { return dayPlanSer.exportExcel(to); } }
[ "196329217@qq.com" ]
196329217@qq.com
1e08c162e70b9cee1e79846f0bf45da6b842dbda
0d1ed7f001bec8cf29e66a85af5ae380b7afc4f4
/app/src/main/java/com/example/ihahire/models/Business.java
dd4fb844f84b9f36261a27559dd3d56566c8418e
[]
no_license
mybene/Ihahire2
caf48d48999f6515895f92f7b14c6e594e09f539
77e1297dac73d9cf0bd0bd9a46da9cda06d866f7
refs/heads/master
2020-08-23T00:52:06.083713
2019-10-26T13:05:36
2019-10-26T13:05:36
216,510,014
0
0
null
null
null
null
UTF-8
Java
false
false
4,899
java
package com.example.ihahire; import java.util.List; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class Business { @SerializedName("id") @Expose private String id; @SerializedName("alias") @Expose private String alias; @SerializedName("name") @Expose private String name; @SerializedName("image_url") @Expose private String imageUrl; @SerializedName("is_closed") @Expose private Boolean isClosed; @SerializedName("url") @Expose private String url; @SerializedName("review_count") @Expose private Integer reviewCount; @SerializedName("categories") @Expose private List<Category> categories = null; @SerializedName("rating") @Expose private Integer rating; @SerializedName("coordinates") @Expose private Coordinates coordinates; @SerializedName("transactions") @Expose private List<Object> transactions = null; @SerializedName("location") @Expose private Location location; @SerializedName("phone") @Expose private String phone; @SerializedName("display_phone") @Expose private String displayPhone; @SerializedName("distance") @Expose private Double distance; /** * No args constructor for use in serialization * */ public Business() { } /** * * @param displayPhone * @param distance * @param rating * @param coordinates * @param transactions * @param url * @param isClosed * @param reviewCount * @param phone * @param imageUrl * @param name * @param alias * @param location * @param id * @param categories */ public Business(String id, String alias, String name, String imageUrl, Boolean isClosed, String url, Integer reviewCount, List<Category> categories, Integer rating, Coordinates coordinates, List<Object> transactions, Location location, String phone, String displayPhone, Double distance) { super(); this.id = id; this.alias = alias; this.name = name; this.imageUrl = imageUrl; this.isClosed = isClosed; this.url = url; this.reviewCount = reviewCount; this.categories = categories; this.rating = rating; this.coordinates = coordinates; this.transactions = transactions; this.location = location; this.phone = phone; this.displayPhone = displayPhone; this.distance = distance; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getAlias() { return alias; } public void setAlias(String alias) { this.alias = alias; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getImageUrl() { return imageUrl; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public Boolean getIsClosed() { return isClosed; } public void setIsClosed(Boolean isClosed) { this.isClosed = isClosed; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public Integer getReviewCount() { return reviewCount; } public void setReviewCount(Integer reviewCount) { this.reviewCount = reviewCount; } public List<Category> getCategories() { return categories; } public void setCategories(List<Category> categories) { this.categories = categories; } public Integer getRating() { return rating; } public void setRating(Integer rating) { this.rating = rating; } public Coordinates getCoordinates() { return coordinates; } public void setCoordinates(Coordinates coordinates) { this.coordinates = coordinates; } public List<Object> getTransactions() { return transactions; } public void setTransactions(List<Object> transactions) { this.transactions = transactions; } public Location getLocation() { return location; } public void setLocation(Location location) { this.location = location; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getDisplayPhone() { return displayPhone; } public void setDisplayPhone(String displayPhone) { this.displayPhone = displayPhone; } public Double getDistance() { return distance; } public void setDistance(Double distance) { this.distance = distance; } }
[ "chelseasabinesangwa@gmail.com" ]
chelseasabinesangwa@gmail.com
c8e7888dd5b53472096b2e943d039544c6ee0e9a
47321d514cd65983bc396ded2fdcea389340e983
/src/main/java/w5d5/Playlist.java
48000c099d435aa4df34e2735b19202c6359d1e1
[]
no_license
n0rb1v/SeniorGyak
07cb5bb22f525b60096865d320091b7b96366177
04e32066837f570b59dabdd89a3c768affadaf3e
refs/heads/master
2023-03-13T18:54:32.085364
2021-03-22T15:23:09
2021-03-22T15:23:09
346,717,999
0
0
null
null
null
null
UTF-8
Java
false
false
479
java
package w5d5; import java.util.ArrayList; import java.util.List; public class Playlist { private List<Song> songs; public Playlist(List<Song> songs) { this.songs = songs; } public List<Song> findByLengthGreaterThan(int mins) { List<Song> result = new ArrayList<>(); for (Song item: songs) { if (item.getLenghtInSeconds() > mins*60) { result.add(item); } } return result; } }
[ "n0rb1v@gmail.com" ]
n0rb1v@gmail.com
49d776739e5020a34e2703d8efff8ef8bc315f0a
0e3c2e25c0ff2582e6838b491c584bcd7a35a5e7
/src/sort/insert/InsertSort1.java
4544919390f0140668dfdba9728a20a5d64dc65b
[]
no_license
MISAKIGA/AlgrSolution
6104bc7048d57089b06a91e22a50c42506133930
f3b8fdb6056d19d558e8a65e0f54f0509e604575
refs/heads/master
2021-07-03T21:00:28.934849
2021-06-22T19:07:06
2021-06-22T19:07:06
226,003,305
0
0
null
null
null
null
UTF-8
Java
false
false
582
java
package sort.insert; import java.util.Arrays; public class InsertSort1 { public static void main(String[] args) { int[] arr = {7,8,9,4,5,2,32,1,0,25,4,78}; insertSort(arr); System.out.println(Arrays.toString(arr)); } public static void insertSort(int[] arr) { for (int i = 1; i < arr.length; i++) { int val = arr[i]; int current = i - 1; //拿下一个数遍历之前排序好的 i-1数组 while(current >= 0 && arr[current] > val) { arr[current + 1] = arr[current]; current--; } arr[current + 1] = val; } } }
[ "example127298925@qq.com" ]
example127298925@qq.com
80453c262fa474eb9d24391695bb514de88e1132
df2c882ebdf21d5d0af1a25b0ea984f7377ef042
/org.joclal.browserAutomation.interpreter/src/org/joclal/browserautomation/interpreter/exception/InterpreterException.java
7ab80898996b330cdd873ed6c30afdb9686ecc70
[]
no_license
jonag/browser-automation
c0aa6dd92c8933746c98d313427d7a571ee85c9f
1deb01b9c3e439c5cb56a0d78c172bd78350d27a
refs/heads/master
2021-01-01T19:11:53.990478
2015-02-26T20:36:19
2015-02-26T20:36:19
30,249,780
0
0
null
null
null
null
UTF-8
Java
false
false
192
java
package org.joclal.browserautomation.interpreter.exception; public class InterpreterException extends RuntimeException { public InterpreterException(String string) { super(string); } }
[ "clement.guyonnet@gmail.com" ]
clement.guyonnet@gmail.com
9fad51c3c2ee5f10019c849b87cac127139a535b
1384a50ad32c420b7ea716da5b72cb68c0616388
/core/src/main/java/ca/ulaval/glo4002/theproject/domain/request/value/RequestTerminal.java
e34333afa4e77cec082e02b99066c65a7e740e3b
[ "MIT" ]
permissive
vincentbeaudoin/transaction_system
b748d4258870dc060fc8b0dfbb57f0949b4113c1
8510f06412cc28a042b28101e00d5666548ed77d
refs/heads/master
2023-02-14T02:13:12.843058
2016-04-05T23:03:16
2016-04-05T23:03:16
329,790,196
0
0
null
null
null
null
UTF-8
Java
false
false
610
java
package ca.ulaval.glo4002.theproject.domain.request.value; import org.hibernate.annotations.Immutable; import javax.persistence.Column; import javax.persistence.Embeddable; @Embeddable @Immutable public final class RequestTerminal { @Column(name = "terminal") private final String value; public RequestTerminal() { value = ""; } public RequestTerminal(String value) { this.value = value; } public String getValue() { return value; } public boolean equals(RequestTerminal terminal) { return value.equals(terminal.getValue()); } }
[ "alexandre.picardlemieux@gmail.com" ]
alexandre.picardlemieux@gmail.com
b3ed96f14740104ee429ff14d3abba1cd2faebd8
4a143dd438cd2b8a7127caafb541513b99ff4ab4
/src/com/goods/dao/GoodsMapper.java
9fcbca3b0e5caea1269641aa733d562d396e7200
[]
no_license
sunmaio159/goods
f69c6380e3ca92c4d74087423f0813bee6e5022a
bdc5f83aca53380e5ad05226c05f6ddae56e193b
refs/heads/master
2020-03-13T22:05:37.989459
2018-05-23T14:22:36
2018-05-23T14:22:36
131,309,791
0
0
null
null
null
null
UTF-8
Java
false
false
637
java
package com.goods.dao; import java.util.List; import com.goods.entity.Goods; import com.goods.entity.GoodsList; public interface GoodsMapper { public int deleteByPrimaryKey(Integer goodsid); public int insert(Goods record); public int insertSelective(Goods record); public Goods selectByPrimaryKey(Integer goodsid); public int updateByPrimaryKeySelective(Goods record); public int updateByPrimaryKey(Goods record); public int addgoods(Goods goods); public List<Goods> goodList(String userid); public int updateList(Goods goods); public int deleteList(String goodsid); public Goods getgoods(String goodsid); }
[ "sunmiao159@gmail.com" ]
sunmiao159@gmail.com
ac61958f685b92aa9556b809f3d0652840a2a957
04345843c72b94a18f4ee70af360c490552ed684
/src/net/upd4ting/uhcreloaded/team/TeamCommand.java
ee77d7799e29e66e04f9ec2fa79381e565a9bf1d
[]
no_license
writeescape/UHC
d3e70c7affc638cf295ec27d4b48e3a2db0442f5
ebfcaecaaa4d28d5f89fe649fa90d3f434503e12
refs/heads/master
2020-04-05T01:14:17.459317
2018-11-06T19:42:37
2018-11-06T19:42:37
156,428,712
1
0
null
null
null
null
UTF-8
Java
false
false
5,345
java
package net.upd4ting.uhcreloaded.team; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; import net.upd4ting.uhcreloaded.UHCPlayer; import net.upd4ting.uhcreloaded.UHCReloaded; import net.upd4ting.uhcreloaded.configuration.configs.LangConfig; import net.upd4ting.uhcreloaded.configuration.configs.TeamConfig; import net.upd4ting.uhcreloaded.util.Util; import net.upd4ting.uhcreloaded.util.Util.ActionMessage; public class TeamCommand implements CommandExecutor { @Override public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if (!(sender instanceof Player)) return true; final Player p = (Player) sender; LangConfig config = UHCReloaded.getLangConfiguration(); TeamConfig teamConfig = UHCReloaded.getTeamConfiguration(); String teamPrefix = config.getTeamPrefix() + " "; if (!teamConfig.isEnabled()) return false; if (teamConfig.isGUIEnabled()) { Util.sendConfigMessage(teamPrefix, p, config.getGuiActived()); return true; } if (!UHCReloaded.getGame().isWaiting()) { Util.sendConfigMessage(teamPrefix, p, config.getCommandDisabled()); return true; } if (args.length != 1 && args.length != 0) { Util.sendConfigMessage(teamPrefix, p, config.getWrongSyntax()); return true; } // Help message if (args.length == 0) { for (String s : config.getHelpMessage()) Util.sendConfigMessage("", p, s); return true; } // Leave command if (args[0].equals("leave")) { leaveTeam(p, true); return true; } String target = args[0]; Player invited = Bukkit.getPlayer(target); // Pas en ligne if (invited == null || !invited.isOnline()) { Util.sendConfigMessage(teamPrefix, p, config.getPlayerNotOnline().replace("%p", target)); return true; } UHCPlayer up = UHCPlayer.instanceOf(p); final UHCPlayer upi = UHCPlayer.instanceOf(invited); // On accepte l'invitation if (up.hasInvitation(invited)) { // On check si le gars qui invite a une team Team t = null; if (Team.hasTeam(invited)) t = Team.getTeam(invited); else { t = Team.createTeam(invited.getName()); t.join(invited); } // Le joueur qui rejoint on doit lui faire leave son autre team leaveTeam(p, false); // Ajout du joueur qui rejoint t.join(p); // Message a tout le monde t.joinMessage(p); // On accepte l'invit du coup up.acceptInvitation(invited); return true; } // Check si owner Team current = Team.getTeam(p); if (current != null && !current.getOwner().equals(p.getName())) { Util.sendConfigMessage(teamPrefix, p, config.getNotOwner()); return true; } // Déja dans la team if (current != null && current.getPlayers().contains(invited)) { Util.sendConfigMessage(teamPrefix, p, config.getAlreadyInTeam().replace("%p", invited.getName())); return true; } // Déja invité if (upi.hasInvitation(p)) { Util.sendConfigMessage(teamPrefix, p, config.getAlreadyInvited().replace("%p", target)); return true; } // On invite mais check si pas full + task de X secondes configurables ! Integer curSize = Team.hasTeam(p) ? Team.getTeam(p).getPlayers().size() : 0; // Team Full if (curSize >= teamConfig.getTeamSize()) { Util.sendConfigMessage(teamPrefix, p, config.getTeamFull()); return true; } up.sendInvitation(invited); Util.sendConfigMessage(teamPrefix, p, config.getSendInvitation().replace("%p", target).replace("%t", Integer.toString(teamConfig.getExpireTime()))); Util.sendConfigMessage(teamPrefix, invited, config.getReceivedInvitation().replace("%p", p.getName()).replace("%t", Integer.toString(teamConfig.getExpireTime()))); // Task pour supprimer l'invitation new BukkitRunnable() { @Override public void run() { if (upi.hasInvitation(p)) upi.acceptInvitation(p); } }.runTaskLater(UHCReloaded.getInstance(), teamConfig.getExpireTime() * 20); return true; } public void leaveTeam(Player p, Boolean messageIfNotTeam) { LangConfig config = UHCReloaded.getLangConfiguration(); String teamPrefix = config.getTeamPrefix() + " "; final Team current = Team.getTeam(p); // Si il est pas dans une team et qu'il essaie de leave on le préviens if (current == null) { if (messageIfNotTeam) Util.sendConfigMessage(teamPrefix, p, config.getNotInTeam()); } else { // On lui fait quitter sa team et on redéfini le nouvelle owner // On le fait leave current.leave(p); // Message a sa team comme quoi il est parti current.leaveMessage(p); if (current.getPlayers().size() == 0) { Team.getTeams().remove(current); } else if (current.getOwner().equals(p.getName())) { // Nouveau owner String newOwner = current.getPlayers().get(0).getName(); current.setOwner(newOwner); // Message a tout le monde final String message = teamPrefix + config.getNewTeamOwner().replace("%p", newOwner); Util.sendActionConfigMessage(message, new ActionMessage() { @Override public void run() { for (Player cur : current.getPlayers()) cur.sendMessage(message); } }); } } } }
[ "WriteEscape@gmail.com" ]
WriteEscape@gmail.com
67ced7aaa0181fc6993ae629f6c09c396ea125ae
b616285f63bad58d079d797b61ce40fd52c1e40c
/Android/com.motlee.android.MotleeLoginActivity/src/com/motlee/android/layouts/RoundedBackgroundTableLayout.java
c0e7f5a84b6c2452fe7cda853f994b27ef64d1dc
[]
no_license
scottkacyn/Motlee-Android
acf5f6cd6c29551469569258753db1706f826cbc
7c50431a4dd8d8bd03338aaac75698b0f1e1809a
refs/heads/master
2021-05-01T01:42:41.302678
2013-05-06T16:26:30
2013-05-06T16:26:30
6,149,567
0
0
null
null
null
null
UTF-8
Java
false
false
512
java
package com.motlee.android.layouts; import android.content.Context; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.widget.TableLayout; public class RoundedBackgroundTableLayout extends TableLayout { public RoundedBackgroundTableLayout(Context context) { super(context); } public RoundedBackgroundTableLayout(Context context, AttributeSet attrs) { super(context, attrs); } @Override public void setBackgroundDrawable(Drawable drawable) { } }
[ "zackmartinsek@ubuntu.ubuntu-domain" ]
zackmartinsek@ubuntu.ubuntu-domain
03736330ca0e914174a9893a7d8ad96b9502c956
c29507aa0e3730393b6e7308f18357ea01bb434e
/src/main/java/it/units/malelab/sse/Util.java
29fee67aee9e6fdbe0b40ef932d7d0465382d01b
[]
no_license
ericmedvet/string-similarity-evolver
72ef02ebd2ded5b3e2b524ebacfef3191a32e769
2616ca29306f9b76a545f01e16284c7d446e682d
refs/heads/master
2021-01-10T12:37:26.934386
2016-03-07T23:23:49
2016-03-07T23:23:49
52,830,542
1
0
null
null
null
null
UTF-8
Java
false
false
2,202
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 it.units.malelab.sse; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Random; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * * @author eric */ public class Util { public static Map<Boolean, List<String>> loadStrings(String fileName, Random random) throws FileNotFoundException, IOException { BufferedReader br = new BufferedReader(new FileReader(fileName)); Pattern pattern = Pattern.compile(br.readLine()); StringBuilder sb = new StringBuilder(); while (true) { String line = br.readLine(); if (line==null) { break; } sb.append(line+"\n"); } Matcher matcher = pattern.matcher(sb.toString()); int lastEnd = 0; Set<String> negativesSet = new LinkedHashSet<>(); Set<String> positivesSet = new LinkedHashSet<>(); while (matcher.find()) { int start = matcher.start(1); if (start>lastEnd) { negativesSet.add(sb.substring(lastEnd, start)); } positivesSet.add(matcher.group(1)); lastEnd = matcher.end(1); } List<String> positives = new ArrayList<>(positivesSet); List<String> negatives = new ArrayList<>(); for (String negative : negativesSet) { int length = positives.get(random.nextInt(positives.size())).length(); if (negative.length()>length) { int start = random.nextInt(negative.length()-length); negatives.add(negative.substring(start, length+start)); } else { negatives.add(negative); } } Map<Boolean, List<String>> strings = new HashMap<>(); strings.put(Boolean.TRUE, positives); strings.put(Boolean.FALSE, negatives); return strings; } }
[ "eric@eric-xps13" ]
eric@eric-xps13
7025e263dae3d8079f8e0bcb943f9847700b3ce3
7e19349271d4d408d727c64552461b42532df105
/labs/8/problem11_1/Triangle.java
4d10b68f09f1de7a5989c1e98aaf61b07f8cd8ae
[]
no_license
myturnbecausemynameismia/cmpt220-201delara
6dfda711aaeed7aac94735cbfb76312ae0fb4d39
92c49df8ee896a81a981aa450047eb5876b62c76
refs/heads/master
2021-09-13T22:15:30.293891
2018-05-04T23:20:35
2018-05-04T23:20:35
118,973,794
0
0
null
null
null
null
UTF-8
Java
false
false
1,249
java
public class Triangle extends GeometricObject { private double side1 = 1.0; private double side2 = 1.0; private double side3 = 1.0; public double getSide1() { return side1; } public void setSide1(double side1) { this.side1 = side1; } public double getSide2() { return side2; } public void setSide2(double side2) { this.side2 = side2; } public double getSide3() { return side3; } public void setSide3(double side3) { this.side3 = side3; } Triangle() {} Triangle(double side1, double side2, double side3) { if(side1 > 0 && side2 > 0 && side3 > 0 && (side1 + side2 > side3) ) { this.side1 = side1; this.side2 = side2; this.side3 = side3; } } @Override public double getArea() { double s = (side1 + side2 + side3) / 2; double area = Math.sqrt(s * (s - side1) * (s - side2) * (s - side3)); return area; } @Override public double getPerimeter() { return side1 + side2 + side3; } @Override public String toString() { return "Triangle: side1 = " + side1 + " side2 = " + side2 + " side3 = " + side3; } // public double getArea1() { // double s = (side1 + side2 + side3) / 2; // double area = Math.sqrt(s * (s - side1) * (s - side2) * (s - side3)); // return area; // } }
[ "mia.delara1@marist.edu" ]
mia.delara1@marist.edu
ea29f05f94ecee3fc822a4da7ebd72a627315e24
5f26b1dcb5294ebc47bdbcea77fe5b4c9f3f17b6
/find-peak-element/find-peak-element.java
67e8e7a5f2b4466b316d26e23d14efe744b0e47f
[]
no_license
Krishna714/LeetcodePractice
fc219f4cf165d64d4d6b9765a9789339e466c49d
158648f6eca23dbd57b21b0860785f65bf5f3a82
refs/heads/main
2023-08-24T09:00:32.300534
2021-10-14T17:12:34
2021-10-14T17:12:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
379
java
class Solution { public int findPeakElement(int[] nums) { int max=Integer.MIN_VALUE; TreeMap<Integer,Integer>map=new TreeMap<>(); for(int i=0;i<nums.length;i++) { if(!map.containsKey(nums[i])) { max=Math.max(max,nums[i]); map.put(nums[i],i); } } return map.get(max); } }
[ "61285739+akasharora506@users.noreply.github.com" ]
61285739+akasharora506@users.noreply.github.com
a88623f126af1efd1d802aaaf68e41a375572b6f
acccf0a70553b5badc59635b2e14c889d57b3e5c
/src/com/oa/struts/actions/AlterInfoAction.java
59e1a6d3798ac1ce13a09e76aeb383a14fcf51e8
[]
no_license
lovelease/OA
220c175659a21f7561dfcd952937e77f506b6357
7bd8c79b27e973997ec61873001686bc9b5fc035
refs/heads/master
2016-09-05T09:40:15.103217
2012-09-01T03:48:28
2012-09-01T03:48:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,002
java
package com.oa.struts.actions; import java.io.PrintWriter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import com.oa.hibernate.beans.Staff; import com.oa.hibernate.dao.StaffDao; public class AlterInfoAction extends Action{ private StaffDao staffDao; public StaffDao getStaffDao() { return staffDao; } public void setStaffDao(StaffDao staffDao) { this.staffDao = staffDao; } public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception{ request.setCharacterEncoding("utf-8"); response.setContentType("text/xml; charset=UTF-8"); response.setHeader("Cache-Control", "no-cache"); PrintWriter out=response.getWriter(); HttpSession session = request.getSession(false); String password=request.getParameter("nwpd"); String address=request.getParameter("nwad"); String mobile=request.getParameter("nwmb"); String email=request.getParameter("nwem"); String id=request.getParameter("idInfo"); Staff staff=staffDao.getStaff(Long.valueOf(id)); staff.setPassword(password); staff.setAddress(address); staff.setMobile(Long.valueOf(mobile)); staff.setEmail(email); out.println("<response>"); if(staffDao.update(staff)){ session.setAttribute("staff", staffDao.getStaff(Long.valueOf(id))); session.setAttribute("allStaff", staffDao.getStaff()); out.println("<res>修改成功!</res>"); out.println("<res>"+address+"</res>"); out.println("<res>"+mobile+"</res>"); out.println("<res>"+email+"</res>"); out.println("<res>"+id+"</res>"); }else{ out.println("<res>修改失败,请重新操作!</res>"); } out.println("</response>"); out.close(); return null; } }
[ "lovelease@gmail.com" ]
lovelease@gmail.com
ecea3af2c8833356eea63f37c6ff6ce40bf37538
38a8c6c8575935870c8ba992db7cac1e116cc420
/src/test/java/com/reggiemcdonald/neural/feedforward/net/math/OutputNeuronLearnerTest.java
8234581d595c84ef6b1175c0373b7175da0c59fb
[ "MIT" ]
permissive
reggiemcdonald/new-neural-net-number-reader
a891b5dace7c18480286791ff7a6380282e94ff7
de62d28ef250027972578aad899995f0c7871098
refs/heads/master
2021-07-11T01:30:38.720781
2020-05-11T22:35:09
2020-05-11T22:35:09
204,790,487
1
0
MIT
2020-10-13T15:37:49
2019-08-27T21:05:46
Java
UTF-8
Java
false
false
587
java
package com.reggiemcdonald.neural.feedforward.net.math; import com.reggiemcdonald.neural.feedforward.net.Neuron; import com.reggiemcdonald.neural.feedforward.net.OutputNeuron; import com.reggiemcdonald.neural.feedforward.net.SigmoidNeuron; import static org.mockito.Mockito.mock; public class OutputNeuronLearnerTest extends AbstractNeuronLearnerTest { @Override protected NeuronLearner newLearner() { return new OutputNeuronLearner(new OutputNeuron(0, 0)); } @Override protected Neuron newMockNeuron() { return mock(SigmoidNeuron.class); } }
[ "regmcdonald95@gmail.com" ]
regmcdonald95@gmail.com
cbc78dfc1d8609f4d04d2d81185374e0c53a514e
7fccc66415ff56bdd3421425cc994c040a24953a
/src/org/fenixsoft/clazz/Person.java
cee0b3b80e1b55d5b80264cb1170526aa0e733f5
[]
no_license
lihangeng/myReposity
376214b66150361c8fafd6a8c73e4b339fb20a97
03d0444d3078465189958700820e04c14af0a340
refs/heads/master
2021-01-20T06:33:55.981539
2017-05-01T03:04:34
2017-05-01T03:04:34
89,893,996
0
0
null
null
null
null
UTF-8
Java
false
false
353
java
package org.fenixsoft.clazz; public class Person { private String name="Person"; public String email = "1234"; int age = 0; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }
[ "John@192.168.1.103" ]
John@192.168.1.103
41e4ce8e6c0f2b11bde6cb1178ddb039e96da9a0
6cba9978835ed0a8d5760da130021ab80d52c74f
/src/git/Git.java
1c8a876cac83550a26d20223e446a7163d2bbd3b
[]
no_license
amandeepkaure50/github
d844787bcc52813ebd39703a22ee0ac4b7dba945
11c3c95b8d1a9378cf69ff5e487f7c3e35351216
refs/heads/master
2021-01-11T11:37:47.795055
2017-02-10T16:55:11
2017-02-10T16:55:11
80,036,986
0
0
null
null
null
null
UTF-8
Java
false
false
545
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 git; /** * * @author Amandeep */ public class Git { /** * @param args the command line arguments */ public static void main(String[] args) { System.out.println("Wahoo - I have created a repository in GitHub"); System.out.println("Here is a change to the repository"); } }
[ "200332905@student.georgianc.on.ca" ]
200332905@student.georgianc.on.ca
bf6374600818b0caf5be656492af31defaf6ba1f
b511b73b9f25989f79b34dde37464c45714cd397
/src/main/java/com/lbo/code/timeqinsociety/web/dto/req/QueryStudentReqDto.java
ae0176451a198c61eef229a2717303fc231c768d
[]
no_license
liubo5400/time-qin-society
66f01552ba02c1352e419ce7797ee8dc57e81d02
377feb54c1200bcf3cfed39979d338817de493c4
refs/heads/master
2022-06-26T16:11:21.361528
2022-06-25T10:53:22
2022-06-25T10:53:22
230,878,187
0
1
null
2022-06-21T02:33:28
2019-12-30T08:28:39
Java
UTF-8
Java
false
false
1,082
java
package com.lbo.code.timeqinsociety.web.dto.req; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import javax.validation.constraints.NotBlank; @Data @AllArgsConstructor @NoArgsConstructor @Builder public class QueryStudentReqDto extends PagingReqDto { @ApiModelProperty(value = "id") private Long id; @ApiModelProperty(value = "学生姓名") private String name; @ApiModelProperty(value = "学生昵称") private String nickname; @ApiModelProperty(value = "学生生日") private String birthday; @ApiModelProperty(value = "学生学校") private String school; @ApiModelProperty(value = "学生住址") private String address; @ApiModelProperty(value = "联系人") private String liaison; @ApiModelProperty(value = "手机号") private String mobile; @ApiModelProperty(value = "邮箱") private String email; @ApiModelProperty(value = "学生来源") private String source; }
[ "18611137477@163.com" ]
18611137477@163.com
3670bd6b21a9bc8d710a6c3acb361ee99b8cb593
97137dff3c474bc9d3ee964268dfa64e63536c2b
/workspace/glaf-form/src/main/java/com/glaf/form/core/export/xml/FormXmlExporter.java
ca156fdec78a1b37b466ed0ad3c6cdf98cc86ce9
[ "Apache-2.0" ]
permissive
xrogzu/glaf
00ad543f5c2a227ff3900b3d5d1f40c649cc8cdf
f0ae2c8e07f0dcd7870caad0da0eb8ad843a128e
refs/heads/master
2020-12-27T20:38:15.676070
2014-12-28T01:26:19
2014-12-28T01:26:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,934
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.glaf.form.core.export.xml; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.dom4j.Document; import com.glaf.core.base.DataModel; import com.glaf.form.core.context.FormContext; import com.glaf.form.core.domain.FormDefinition; import com.glaf.form.core.graph.def.FormNode; public class FormXmlExporter { public Document export(DataModel dataModel, FormContext formContext) { Document doc = null; FormDefinition formDefinition = formContext.getFormDefinition(); if (formDefinition != null) { List<FormNode> nodes = formDefinition.getNodes(); Map<String, Object> dataMap = dataModel.getDataMap(); Iterator<FormNode> iterator = nodes.iterator(); while (iterator.hasNext()) { FormNode node = iterator.next(); String name = node.getName(); if (StringUtils.isEmpty(name)) { continue; } Object value = dataMap.get(name); node.setValue(value); } FormModelXmlWriter xmlWriter = new FormModelXmlWriter( formDefinition); doc = xmlWriter.writeFormDefinition(); } return doc; } }
[ "jior2008@gmail.com" ]
jior2008@gmail.com
fafe1510822030f16a4c1ad451ff1f97e0b84261
27c342ce6c679cc12659f896016bcb096d1fe4e2
/ConferenceMangement/src/com/conference/main/ConferenceMain.java
7adb901d602f53b0c327a7d3f59c180a842c1e09
[]
no_license
rishabhkashyap/ConferenceTrackManagement
372e41229f7db1a99c83f593faa9cd46cd449e20
423dd47c3c7964dcdc5d32a477d823dd86a2ea01
refs/heads/master
2021-01-13T11:58:29.190742
2017-03-27T09:21:29
2017-03-27T09:21:29
81,145,073
1
0
null
null
null
null
UTF-8
Java
false
false
968
java
package com.conference.main; import java.util.Scanner; import com.conference.ConferenceInput; import com.conference.ConferenceManager; import com.conference.exceptions.InvalidTalkException; import com.conference.model.Conference; public class ConferenceMain { public static void main(String[] args) { String fileName = null; System.out.println("Please enter file path = "); Scanner scanner=new Scanner(System.in); fileName=scanner.nextLine(); if(fileName.length()>0){ fileName=fileName.replaceAll("\\\\", "/"); }else{ System.out.println("Data will be read from default file "); fileName=null; } ConferenceManager conferenceManager = new ConferenceManager(new ConferenceInput(),new Conference(240,180)); try { conferenceManager.scheduleConference(fileName); } catch (InvalidTalkException ite) { ite.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } }
[ "kashyap.rishab@hotmail.com" ]
kashyap.rishab@hotmail.com
f5f3244813ba0bb941a410f6a8c0d49a2e7b4adb
6b3302dd2593f897a1da06bf38a6087d57f26bd9
/test/src/javaandroidvn/JavaAndroidVn.java
c11e0906854c936f655d1ebbf75325236b2420aa
[]
no_license
luongnhatduy/oop
6188441eb2b3c497aead7b8effd694aefd5775f4
dd79b289da83aa26e2dc925918b42d77ec76370c
refs/heads/master
2020-03-26T11:57:34.516944
2018-08-20T14:43:24
2018-08-20T14:43:24
144,867,917
0
0
null
null
null
null
UTF-8
Java
false
false
1,744
java
package javaandroidvn; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Scanner; class SinhVien { public String hoTen; public int diem; } public class JavaAndroidVn { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Nhập số sinh viên: "); int n = input.nextInt(); ArrayList<SinhVien> danhSach = new ArrayList(); for (int i = 0; i < n; i++) { // input.nextLine(); SinhVien x = new SinhVien(); System.out.println("Thông tin sinh viên thứ " + i); System.out.print("Họ và Tên: "); input = new Scanner(System.in); x.hoTen = input.nextLine(); System.out.print("Điểm: "); input = new Scanner(System.in); x.diem = input.nextInt(); danhSach.add(x); } //Sắp xếp danh sách theo số điểm giảm dần! Collections.sort(danhSach, new Comparator<SinhVien>() { @Override public int compare(SinhVien sv1, SinhVien sv2) { if (sv1.diem < sv2.diem) { return 1; } else { if (sv1.diem == sv2.diem) { return 0; } else { return -1; } } } }); System.out.println("Danh sách sắp xếp theo thứ tự điểm giảm dần là: "); for (int i = 0; i < danhSach.size(); i++) { System.out.println("Tên: " + danhSach.get(i).hoTen + " Điểm: " + danhSach.get(i).diem); } } }
[ "=" ]
=
e9134c035229f22e3bcd18cc06ce1cc2fb952c0a
a92420e515b5b270a5d9f44884073ec5beeee275
/mmps-daemon-console-app/src/main/java/com/zzvc/mmps/daemon/console/DaemonConsoleClientApp.java
c6316a9b27f895b1db92966e8d2ff046973d8ba2
[]
no_license
cuihbin/mmps-daemon
bd15a31ebbf989cfb08296ab6fb64e0be569c3e1
8b5ad4753779bd4d66f1143f1cbe29c6c5b5850c
refs/heads/master
2021-01-04T02:37:12.618567
2013-01-29T06:44:44
2013-01-29T06:44:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
492
java
package com.zzvc.mmps.daemon.console; import javax.annotation.Resource; import com.zzvc.mmps.app.AppSupport; public class DaemonConsoleClientApp extends AppSupport { @Resource private DaemonConsoleClientHandler handler; public DaemonConsoleClientApp() { super(); pushBundle("DaemonConsoleResources"); } @Override public void afterStartup() { handler.init(); handler.connect(); } @Override public void beforeShutdown() { handler.quit(); } }
[ "cuihbin@gmail.com" ]
cuihbin@gmail.com
a55268da46b4ec1a484446af5aafa52e5bf0a8b7
8b593df036dcf027ee9dc4558f0540d5eea1323d
/Cafeteria/src/frames/menu.java
20f039d49550635fabed5f98bae3b921cc1cd240
[]
no_license
ErickLima98/ProyectoBD
0840add78e57a4355992fe27be6107ae0b8db127
a8419590f773e9a31006fa09da8321248ae55f27
refs/heads/master
2022-07-13T16:39:33.042463
2020-05-05T06:55:34
2020-05-05T06:55:34
260,082,803
0
0
null
2020-05-07T23:58:12
2020-04-30T01:13:08
Java
UTF-8
Java
false
false
24,706
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 frames; import java.sql.ResultSet; import java.sql.Connection; import javax.swing.ImageIcon; import Seguridad.Usuario; import java.awt.Image; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.Icon; /** * * @author donald */ public class menu extends javax.swing.JFrame { private static Usuario user;//variable global del usuario logeado /** * Creates new form menu */ public menu() { initComponents(); this.setLocationRelativeTo(null); setIconImage(new ImageIcon(getClass().getResource("/Imagen/cafe.png")).getImage()); } public menu(Usuario user) {//metodo constructor que recibe el usuario logeados initComponents(); this.user=user;//Se asigna el usuaario que hizo login this.setLocationRelativeTo(null); setIconImage(new ImageIcon(getClass().getResource("/Imagen/cafe.png")).getImage()); } public void seguridad(){ System.out.println("nivel de acceso: "+user.getNivelAcceso()); if(user.getNivelAcceso()==1){ jButtonInventario.setVisible(true); jButtonCierre.setVisible(true); jButtonVenta.setVisible(true); jButtonCliente.setVisible(true); jButtonProveedores.setVisible(true); jButtonCompras.setVisible(true); jButtonUsuarios.setVisible(true); jButtonAnadirUsuario.setVisible(true); jButtonCerrarSesion.setVisible(true); }else if(user.getNivelAcceso()==2){ jButtonInventario.setVisible(true); jButtonInventario.setEnabled(true); jButtonCierre.setVisible(true); jButtonCierre.setEnabled(false); jButtonVenta.setVisible(true); jButtonVenta.setEnabled(true); jButtonCliente.setVisible(true); jButtonCliente.setEnabled(true); jButtonProveedores.setVisible(true); jButtonProveedores.setEnabled(false); jButtonCompras.setVisible(true); jButtonCompras.setEnabled(false); jButtonUsuarios.setVisible(true); jButtonUsuarios.setEnabled(false); jButtonAnadirUsuario.setVisible(true); jButtonAnadirUsuario.setEnabled(false); jButtonCerrarSesion.setVisible(true); jButtonAnadirUsuario.setVisible(true); jButtonCliente.setVisible(true); jButtonInventario.setVisible(true); jButtonUsuarios.setVisible(true); jButtonVenta.setVisible(true); }else if(user.getNivelAcceso()==2){ jButtonAnadirUsuario.setVisible(true); jButtonCliente.setVisible(true); jButtonInventario.setVisible(true); jButtonUsuarios.setVisible(true); jButtonVenta.setVisible(true); } } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jButtonUsuarios = new javax.swing.JButton(); jButtonAnadirUsuario = new javax.swing.JButton(); jButtonVenta = new javax.swing.JButton(); jButtonInventario = new javax.swing.JButton(); jButtonCliente = new javax.swing.JButton(); jButtonCerrarSesion = new javax.swing.JButton(); btnCerrar = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jButtonCompras = new javax.swing.JButton(); jLabel8 = new javax.swing.JLabel(); jButtonProveedores = new javax.swing.JButton(); jButtonCierre = new javax.swing.JButton(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); jLabelFondo = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Menu"); setUndecorated(true); setResizable(false); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jButtonUsuarios.setBackground(new java.awt.Color(255, 153, 102)); jButtonUsuarios.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/usuarios2.png"))); // NOI18N jButtonUsuarios.setToolTipText("<html>\n<head>\n\t<style>\n\t\t #contenido{ \n\t\tbackground: #111111; /*Se le da un color de fondo*/\n\t\tcolor: white;\t\t /*Color a la letra*/\n\t\t}\n\t</style>\n</head>\n<body>\n\t<div id=contenido>\n\t\t<h4>USUARIOS</h4>\n\t</div>\n</body>\n</html>"); jButtonUsuarios.setBorder(new javax.swing.border.MatteBorder(null)); jButtonUsuarios.setPreferredSize(new java.awt.Dimension(98, 74)); jButtonUsuarios.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/usuarios.png"))); // NOI18N jButtonUsuarios.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonUsuariosActionPerformed(evt); } }); getContentPane().add(jButtonUsuarios, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 440, 140, 110)); jButtonAnadirUsuario.setBackground(new java.awt.Color(255, 153, 102)); jButtonAnadirUsuario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/añadirUsuario.png"))); // NOI18N jButtonAnadirUsuario.setToolTipText("<html>\n<head>\n\t<style>\n\t\t #contenido{ \n\t\tbackground: #111111; /*Se le da un color de fondo*/\n\t\tcolor: white;\t\t /*Color a la letra*/\n\t\t}\n\t</style>\n</head>\n<body>\n\t<div id=contenido>\n\t\t<h4>AÑADIR USUARIO</h4>\n\t</div>\n</body>\n</html>"); jButtonAnadirUsuario.setBorder(new javax.swing.border.MatteBorder(null)); jButtonAnadirUsuario.setPreferredSize(new java.awt.Dimension(98, 74)); jButtonAnadirUsuario.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/añadirUsuario2.png"))); // NOI18N jButtonAnadirUsuario.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonAnadirUsuarioActionPerformed(evt); } }); getContentPane().add(jButtonAnadirUsuario, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 440, 140, 110)); jButtonVenta.setBackground(new java.awt.Color(255, 153, 102)); jButtonVenta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/Venta2.png"))); // NOI18N jButtonVenta.setToolTipText("<html>\n<head>\n\t<style>\n\t\t #contenido{ \n\t\tbackground: #111111; /*Se le da un color de fondo*/\n\t\tcolor: white;\t\t /*Color a la letra*/\n\t\t}\n\t</style>\n</head>\n<body>\n\t<div id=contenido>\n\t\t<h4>VENTAS</h4>\n\t</div>\n</body>\n</html>"); jButtonVenta.setBorder(new javax.swing.border.MatteBorder(null)); jButtonVenta.setPreferredSize(new java.awt.Dimension(98, 74)); jButtonVenta.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/Venta.png"))); // NOI18N jButtonVenta.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonVentaActionPerformed(evt); } }); getContentPane().add(jButtonVenta, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 120, 140, 110)); jButtonInventario.setBackground(new java.awt.Color(255, 153, 102)); jButtonInventario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/Inventario.png"))); // NOI18N jButtonInventario.setToolTipText("<html>\n<head>\n\t<style>\n\t\t #contenido{ \n\t\tbackground: #111111; /*Se le da un color de fondo*/\n\t\tcolor: white;\t\t /*Color a la letra*/\n\t\t}\n\t</style>\n</head>\n<body>\n\t<div id=contenido>\n\t\t<h4>INVENTARIO</h4>\n\t</div>\n</body>\n</html>"); jButtonInventario.setBorder(new javax.swing.border.MatteBorder(null)); jButtonInventario.setPreferredSize(new java.awt.Dimension(98, 74)); jButtonInventario.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/controlar.png"))); // NOI18N jButtonInventario.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonInventarioActionPerformed(evt); } }); getContentPane().add(jButtonInventario, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 120, 140, 110)); jButtonCliente.setBackground(new java.awt.Color(255, 153, 102)); jButtonCliente.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/clientes.png"))); // NOI18N jButtonCliente.setToolTipText("<html>\n<head>\n\t<style>\n\t\t #contenido{ \n\t\tbackground: #111111; /*Se le da un color de fondo*/\n\t\tcolor: white;\t\t /*Color a la letra*/\n\t\t}\n\t</style>\n</head>\n<body>\n\t<div id=contenido>\n\t\t<h4>CLIENTES</h4>\n\t</div>\n</body>\n</html>"); jButtonCliente.setBorder(new javax.swing.border.MatteBorder(null)); jButtonCliente.setPreferredSize(new java.awt.Dimension(98, 74)); jButtonCliente.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/clientes2.png"))); // NOI18N jButtonCliente.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonClienteActionPerformed(evt); } }); getContentPane().add(jButtonCliente, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 270, 140, 110)); jButtonCerrarSesion.setBackground(new java.awt.Color(255, 153, 102)); jButtonCerrarSesion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/salir.png"))); // NOI18N jButtonCerrarSesion.setToolTipText("<html>\n<head>\n\t<style>\n\t\t #contenido{ \n\t\tbackground: #111111; /*Se le da un color de fondo*/\n\t\tcolor: white;\t\t /*Color a la letra*/\n\t\t}\n\t</style>\n</head>\n<body>\n\t<div id=contenido>\n\t\t<h4>CERRAR SESION</h4>\n\t</div>\n</body>\n</html>"); jButtonCerrarSesion.setBorder(new javax.swing.border.MatteBorder(null)); jButtonCerrarSesion.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/salir2.png"))); // NOI18N jButtonCerrarSesion.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCerrarSesionActionPerformed(evt); } }); getContentPane().add(jButtonCerrarSesion, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 440, 140, 110)); btnCerrar.setBackground(new java.awt.Color(255, 153, 102)); btnCerrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/salir.png"))); // NOI18N btnCerrar.setToolTipText("<html>\n<head>\n\t<style>\n\t\t #contenido{ \n\t\tbackground: #111111; /*Se le da un color de fondo*/\n\t\tcolor: white;\t\t /*Color a la letra*/\n\t\t}\n\t</style>\n</head>\n<body>\n\t<div id=contenido>\n\t\t<h4>CERRAR SESION</h4>\n\t</div>\n</body>\n</html>"); btnCerrar.setBorder(new javax.swing.border.MatteBorder(null)); btnCerrar.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/salir2.png"))); // NOI18N btnCerrar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCerrarActionPerformed(evt); } }); getContentPane().add(btnCerrar, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 440, 140, 110)); jLabel5.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel5.setText("CERRAR SESION"); getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 550, -1, -1)); jLabel2.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel2.setText("INVENTARIO"); getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 230, 90, -1)); jLabel3.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel3.setText("VENTAS"); getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(500, 230, 60, -1)); jLabel4.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel4.setText("CLIENTES"); getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 380, -1, -1)); jLabel6.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel6.setText("USUARIOS"); getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 550, -1, -1)); jLabel7.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel7.setText("AÑADIR USUARIO"); getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 550, -1, -1)); jButtonCompras.setBackground(new java.awt.Color(255, 153, 102)); jButtonCompras.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/compras.png"))); // NOI18N jButtonCompras.setToolTipText("<html>\n<head>\n\t<style>\n\t\t #contenido{ \n\t\tbackground: #111111; /*Se le da un color de fondo*/\n\t\tcolor: white;\t\t /*Color a la letra*/\n\t\t}\n\t</style>\n</head>\n<body>\n\t<div id=contenido>\n\t\t<h4>COMPRAS</h4>\n\t</div>\n</body>\n</html>"); jButtonCompras.setBorder(new javax.swing.border.MatteBorder(null)); jButtonCompras.setPreferredSize(new java.awt.Dimension(98, 74)); jButtonCompras.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/compras2.png"))); // NOI18N jButtonCompras.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonComprasActionPerformed(evt); } }); getContentPane().add(jButtonCompras, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 270, 140, 110)); jLabel8.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel8.setText("COMPRAS"); getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 380, -1, -1)); jButtonProveedores.setBackground(new java.awt.Color(255, 153, 102)); jButtonProveedores.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/proveedor.png"))); // NOI18N jButtonProveedores.setToolTipText("<html>\n<head>\n\t<style>\n\t\t #contenido{ \n\t\tbackground: #111111; /*Se le da un color de fondo*/\n\t\tcolor: white;\t\t /*Color a la letra*/\n\t\t}\n\t</style>\n</head>\n<body>\n\t<div id=contenido>\n\t\t<h4>PROVEEDORES</h4>\n\t</div>\n</body>\n</html>"); jButtonProveedores.setBorder(new javax.swing.border.MatteBorder(null)); jButtonProveedores.setPreferredSize(new java.awt.Dimension(98, 74)); jButtonProveedores.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/proveedor2.png"))); // NOI18N jButtonProveedores.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonProveedoresActionPerformed(evt); } }); getContentPane().add(jButtonProveedores, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 270, 140, 110)); jButtonCierre.setBackground(new java.awt.Color(255, 153, 102)); jButtonCierre.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/cierre.png"))); // NOI18N jButtonCierre.setToolTipText("<html>\n<head>\n\t<style>\n\t\t #contenido{ \n\t\tbackground: #111111; /*Se le da un color de fondo*/\n\t\tcolor: white;\t\t /*Color a la letra*/\n\t\t}\n\t</style>\n</head>\n<body>\n\t<div id=contenido>\n\t\t<h4>CIERRE</h4>\n\t</div>\n</body>\n</html>"); jButtonCierre.setBorder(new javax.swing.border.MatteBorder(null)); jButtonCierre.setPreferredSize(new java.awt.Dimension(98, 74)); jButtonCierre.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/cierre2.png"))); // NOI18N jButtonCierre.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCierreActionPerformed(evt); } }); getContentPane().add(jButtonCierre, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 120, 140, 110)); jLabel9.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel9.setText("CIERRE"); getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 230, -1, -1)); jLabel10.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel10.setText("PROVEEDORES"); getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 380, -1, -1)); jLabel11.setFont(new java.awt.Font("Times New Roman", 1, 36)); // NOI18N jLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/cafe.png"))); // NOI18N jLabel11.setText("MENU"); getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 10, 320, 100)); jLabelFondo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabelFondo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagen/blanco.jpg"))); // NOI18N getContentPane().add(jLabelFondo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 690, 590)); pack(); }// </editor-fold>//GEN-END:initComponents private void jButtonInventarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonInventarioActionPerformed Inventario in = new Inventario(user); this.setVisible(false); in.setVisible(true); }//GEN-LAST:event_jButtonInventarioActionPerformed private void jButtonClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonClienteActionPerformed Cliente cliente = new Cliente(user); this.setVisible(false); cliente.setVisible(true); }//GEN-LAST:event_jButtonClienteActionPerformed private void jButtonAnadirUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAnadirUsuarioActionPerformed AnadirUsuario usuar = new AnadirUsuario(); this.setVisible(false); usuar.setVisible(true); }//GEN-LAST:event_jButtonAnadirUsuarioActionPerformed private void jButtonUsuariosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonUsuariosActionPerformed Usuarios usuar = new Usuarios(); this.setVisible(false); usuar.setVisible(true); }//GEN-LAST:event_jButtonUsuariosActionPerformed private void jButtonVentaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonVentaActionPerformed Venta venta = new Venta(); this.setVisible(false); venta.setVisible(true); }//GEN-LAST:event_jButtonVentaActionPerformed private void jButtonCerrarSesionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCerrarSesionActionPerformed Inicio otro = new Inicio(); otro.setVisible(true); this.setVisible(false); }//GEN-LAST:event_jButtonCerrarSesionActionPerformed private void btnCerrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCerrarActionPerformed // TODO add your handling code here: Inicio otro = new Inicio(); otro.setVisible(true); this.setVisible(false); }//GEN-LAST:event_btnCerrarActionPerformed private void jButtonComprasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonComprasActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jButtonComprasActionPerformed private void jButtonProveedoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonProveedoresActionPerformed Proveedores proveedor = new Proveedores(user); proveedor.setVisible(true); this.setVisible(false); }//GEN-LAST:event_jButtonProveedoresActionPerformed private void jButtonCierreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCierreActionPerformed Visualizar_Ventas Vv; try { Vv = new Visualizar_Ventas(user); Vv.setVisible(true); } catch (SQLException ex) { Logger.getLogger(menu.class.getName()).log(Level.SEVERE, null, ex); } this.setVisible(false); }//GEN-LAST:event_jButtonCierreActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(menu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(menu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(menu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(menu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new menu(user).setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButtonAnadirUsuario; private javax.swing.JButton jButtonCerrarSesion; private javax.swing.JButton btnCerrar; private javax.swing.JButton jButtonAnadirUsuario; private javax.swing.JButton jButtonCierre; private javax.swing.JButton jButtonCliente; private javax.swing.JButton jButtonCompras; private javax.swing.JButton jButtonInventario; private javax.swing.JButton jButtonProveedores; private javax.swing.JButton jButtonUsuarios; private javax.swing.JButton jButtonVenta; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private javax.swing.JLabel jLabelFondo; // End of variables declaration//GEN-END:variables }
[ "erickdrodas@gmail.com" ]
erickdrodas@gmail.com
b6e7d57354f35860d6bfc1b071637d0658c72033
19a152878aeb398618e9d8ea21071a40e7cfbb9f
/src/main/java/jpabook/jpashop/domain/Order.java
9b3c105858170539d97862e93e2e0d81673b9136
[]
no_license
hmcck27/jpashop
8b670130630a9b5a8afb2688eff7e619eb9f6b6d
0c9dfe4cd09a1757c1ed112536bda21d6da901c6
refs/heads/master
2023-09-04T05:37:59.415883
2021-10-28T06:34:36
2021-10-28T06:34:36
399,055,147
0
0
null
null
null
null
UTF-8
Java
false
false
3,872
java
package jpabook.jpashop.domain; import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.hibernate.annotations.BatchSize; import javax.persistence.*; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import static javax.persistence.FetchType.*; @Entity @Table(name = "orders") @Getter @Setter @NoArgsConstructor(access = AccessLevel.PROTECTED) public class Order { /** * protected로 적어놓으면, 생성자를 사용할 수 없게 되고, 다 로직적으로 접근해야만 한다. * 항상 코드는 제약이 많이야지 유지보수에 유리하다. */ @Id @GeneratedValue @Column(name = "order_id") private Long id; @ManyToOne(fetch = LAZY) @JoinColumn(name = "member_id") private Member member; @BatchSize(size = 1000) @OneToMany(mappedBy = "order", cascade = CascadeType.ALL) private List<OrderItem> orderItems = new ArrayList<>(); @OneToOne(fetch = LAZY, cascade = CascadeType.ALL) @JoinColumn(name = "delivery_id") private Delivery delivery; private LocalDateTime orderDate; @Enumerated(EnumType.STRING) private OrderStatus orderStatus; //==연관 관계 편의 메소드== /* 양방향 연관 관계에서는 서로가 서로를 갖고 있다. 주문에서 회원을 추가하고 동시에 회원이 갖고 있는 주문 리스트에 현재 주문을 추가해야되는데, 이러면 두번의 set을 호출해야 되니까 귀찮다.. 따라서 미리 주문의 setMember에다가 오버라이딩해서 멤버의 주문 리스트에 주문을 추가하는 형태의 메소드를 만든다. 이러면 두번 챙길 필요가 없으니까 이 메소드의 위치는 핵심적인 컨트롤의 주권을 가진 객체 쪽에 넣는게 좋다. */ public void setMember(Member member) { this.member = member; member.getOrders().add(this); } public void addOrderItem(OrderItem orderItem) { orderItems.add(orderItem); orderItem.setOrder(this); } public void setDelivery(Delivery delivery) { this.delivery = delivery; delivery.setOrder(this); } //==생성 로직==// /** * 주문은 하나만 생성하면 안된다. 주문을 생성하면, 그에 따르는 배송과 orderItem도 * 만들어야 한다. 이를 단순히 order를 생성하고 하는게 아니라 * createOrder method를 통해서 다 묶어서 생성할 수 있게 한다. * 앞으로 생서하는 로직을 수정하게 되면 여기만 보면 된다. * 이게 도메인에 생성 로직을 넣는 이유. */ public static Order createOrder(Member member, Delivery delivery, OrderItem... orderItems) { Order order = new Order(); order.setMember(member); order.setDelivery(delivery); for (OrderItem orderItem : orderItems) { order.addOrderItem(orderItem); } order.setOrderStatus(OrderStatus.ORDER); order.setOrderDate(LocalDateTime.now()); return order; } //==비즈니스 로직==// /** * 주문 취소 */ public void cancel() { if (delivery.getStatus() == DeliveryStatus.COMP) { throw new IllegalStateException("이미 배송 완료된 상품은 취소가 불가능합니다."); } this.setOrderStatus(OrderStatus.CANCEL); for (OrderItem orderItem : this.orderItems) { orderItem.cancel(); } } //==조회 로직==// /** * 전체 주문 가격 조회 */ public int getTotalPrice() { int totalPrice = this.orderItems.stream() .mapToInt(OrderItem::getTotalPrice) .sum(); return totalPrice; } }
[ "backend@JK.local" ]
backend@JK.local
3aeb8f938f573fdbfcbf94fb5c3e204fc2681506
5ba707b2dc7cf04a2db7fbdd741c869108b428ad
/src/org/jcodings/unicode/CR_Deseret.java
dd87503f2ca689a4e024a85c662d0ccfdf8f9764
[]
no_license
lopex/jcodings
aab14e87d7504d043310c6aeb55ffbe4f9477070
7258cb78e01c7ab615b58d33595f059eea1881d4
refs/heads/master
2021-01-17T21:51:58.267134
2012-02-14T02:32:08
2012-02-14T02:32:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,304
java
/* * 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 org.jcodings.unicode; import org.jcodings.Config; public class CR_Deseret { static final int Table[] = Config.USE_UNICODE_PROPERTIES ? new int[] { 1, 0x10400, 0x1044f, } : null; }
[ "lopx@gazeta.pl" ]
lopx@gazeta.pl
614d020bcae80fbfdfecbb1eb056e82f99b52fd2
5be6b4253ec0558fa53922c5816fe7729b9de366
/app/src/test/java/com/apps/igmwork/ExampleUnitTest.java
659c4daccd6b398c14c3d1cc2296c3f8d389ae9f
[]
no_license
smallpotato560/igmwork
61f880cf53b342f55bdf05ac35c7f2833503ead9
5d2608c4a95d7f3b874f2967e0f3d67e7915a45b
refs/heads/master
2020-04-02T17:06:18.598624
2019-06-12T03:03:01
2019-06-12T03:03:01
154,601,579
0
0
null
null
null
null
UTF-8
Java
false
false
377
java
package com.apps.igmwork; 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); } }
[ "smallpotato560@gmail.com" ]
smallpotato560@gmail.com
966fa958f5e90b2268fe85bd8e954d43ee30e872
dce2c18a72bfb2a9df3b24f36deef32bb04ffd48
/src/com/user/GetStudentServlet.java
004257932df1e0f608ed0f1afe98582b4a961221
[]
no_license
lizardkingLK/SchoolManager
8591d813960c9657ff10b057a4f2cda3b0605ac3
b0493798c892e5ea7762cf73f27b021dbbd485ec
refs/heads/master
2020-07-03T09:57:23.871923
2020-02-15T09:57:06
2020-02-15T09:57:06
240,680,148
0
1
null
null
null
null
UTF-8
Java
false
false
1,391
java
package com.user; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet("/GetStudentServlet") public class GetStudentServlet extends HttpServlet { private static final long serialVersionUID = 1L; public GetStudentServlet() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); String thisstudentid = request.getParameter("studentidradio"); Student thisStudent = StudentDao.getStudent(thisstudentid); try { request.setAttribute("gotname",thisStudent.getName()); request.setAttribute("gotcurrentgrade",thisStudent.getCurrentGrade()); request.setAttribute("gotbirthday",thisStudent.getBirthdate()); request.setAttribute("gotphone",thisStudent.getPhone()); request.setAttribute("gotaddress",thisStudent.getAddress()); request.getRequestDispatcher("admin.jsp").forward(request, response); } catch(Exception e) { e.printStackTrace(); } } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // } }
[ "chansanfdo1996@outlook.com" ]
chansanfdo1996@outlook.com
2d4bf788cddedfa61e3bbd25e47eb659b1897eda
6a8481539a68d3cb1b67b62791500daa50449f3a
/renren-security/renren-modules/renren-modules-request/renren-modules-request-sys/src/main/java/io/renren/modules/sys/request/SysAuthoritiesResourcesDelRequest.java
8a7a2624a710bfcf465d205ebdde03a98097aa65
[ "Apache-2.0" ]
permissive
whmine/renren-security
59fc048d9e947da141fd0ebe1f53d258e65d424e
dbfee0341741eb135cb8bb207017e294abe11953
refs/heads/master
2022-07-01T03:47:22.867186
2019-10-16T02:31:03
2019-10-16T02:31:03
214,927,833
2
1
null
2022-06-21T02:02:22
2019-10-14T02:10:17
Vue
UTF-8
Java
false
false
1,050
java
package io.renren.modules.sys.request; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.renren.common.base.BaseRequest; import lombok.Data; import io.renren.common.base.IDRequest; import io.swagger.annotations.Api; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.util.Date; /** * 系统权限资源关系 * * @author Shark * @email shark@126.com * @date 2019-08-21 09:55:54 */ @Data @Api("系统权限资源关系-删除") public class SysAuthoritiesResourcesDelRequest extends BaseRequest { /** * 系统权限 */ @ApiModelProperty(value = "系统权限") @NotBlank(message = "系统权限不能为空") private String sysAuthoritiesId; /** * 系统资源 */ @ApiModelProperty(value = "系统资源") @NotBlank(message = "系统资源不能为空") private String sysResourcesId; }
[ "whmine@126.com" ]
whmine@126.com
ad11b77fb0582eca98d75b9b6a72acdd6126b5a2
3233dd8c2dd34eb3fd44f6e31b6a788afc706f72
/src/com/company/OOP/Task13/Constants.java
dc94605dd580f3feed66452eae409094de3e5fd4
[]
no_license
Marija26/Java_for_interview
0316798b5a20e02acb8a8be6dc18c09aa76fe7f6
72968bb86c10f95598b6225d1caea01aa4519f55
refs/heads/master
2021-01-21T17:29:03.643158
2017-06-21T18:25:49
2017-06-21T18:25:49
85,594,785
0
0
null
null
null
null
UTF-8
Java
false
false
284
java
package com.company.OOP.Task13; import java.io.BufferedReader; import java.io.InputStreamReader; /** * Created by ПК on 30.01.2017. */ public class Constants { static String FILE_NAME = "C:\\Users\\ПК\\IdeaProjects\\Marijapr\\src\\com\\company\\OOP\\Task13\\FileName"; }
[ "35735@ukr.net" ]
35735@ukr.net
886d9353463b0677ab35a8286bcb8bc2e81aedb7
d0d2a7575e753844751956277f4fb1e02f89e1da
/src/TechFundamentals/ObjectsAndClasses/Exercise/AdvertisementMessage.java
1272bd23ea27466af7bc8837bf4c19c5e4195ae8
[]
no_license
StefanUrilski/MyProjects
093f420ea6622dc8dbee08cce665ad6f382e9b94
9046030c978cfead9e725c2ac24072f67ed674e3
refs/heads/master
2020-06-27T19:53:11.528532
2019-08-01T11:01:01
2019-08-01T11:01:01
200,034,010
0
0
null
null
null
null
UTF-8
Java
false
false
1,611
java
package TechFundamentals.ObjectsAndClasses.Exercise; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Random; public class AdvertisementMessage { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String[] phrases = new String[]{"Excellent product.", "Such a great product.", "I always use that product.", "Best product of its category.", "Exceptional product.", "I can’t live without this product."}; String[] events = new String[]{"Now I feel good.", "I have succeeded with this product.", "Makes miracles. I am happy of the results!", "I cannot believe but now I feel awesome.", "Try it yourself, I am very satisfied.", "I feel great!"}; String[] authors = new String[]{"Diana", "Petya", "Stella", "Elena", "Katya", "Iva", "Annie", "Eva"}; String[] cities = new String[]{"Burgas", "Sofia", "Plovdiv", "Varna", "Ruse"}; int n = Integer.valueOf(reader.readLine()); Random rnd = new Random(); for (int i = 0; i < n; i++) { String phrase = phrases[rnd.nextInt(phrases.length)]; String author = authors[rnd.nextInt(authors.length)]; String city = cities[rnd.nextInt(cities.length)]; String event = events[rnd.nextInt(events.length)]; System.out.println(phrase + " " + event + " " + author + " - " + city); } //P.S. not a correct solving to the MortalEngines!!! } }
[ "urilskistefan@gmail.com" ]
urilskistefan@gmail.com
487d764e5698c4e41aef6b59da7e62801416e907
6eb6208086ff82002218bf0480016fe867a8fb13
/src/main/java/com/ds/expanse/app/api/service/MapElementsService.java
7fbb7c9f327a8e7b6c509418af3a9268538363b5
[ "MIT" ]
permissive
arronaxian/expanse-orig
d8c62b3687450d382edaccc61ce85edca151cbac
b1cc25850ca4d4e71c663f3d22d62782ff8c8793
refs/heads/master
2020-04-21T04:59:47.547580
2019-03-01T02:37:53
2019-03-01T02:37:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
382
java
package com.ds.expanse.app.api.service; import com.ds.expanse.app.api.controller.model.MapElements; import com.ds.expanse.app.repository.MapElementsRepository; import org.springframework.beans.factory.annotation.Autowired; import java.io.InputStream; public interface MapElementsService { void saveMap(String name, InputStream mapElementsStream, String startHereRoomName); }
[ "contact@theduquettes.net" ]
contact@theduquettes.net
2828b407e78cef1db98f71a10993fc7c8acce758
183d913e7d53d52377c6b897d097801080e6c896
/solo-core/src/main/java/cn/sexycode/util/core/cls/internal/JavaXType.java
070c84f45b80a64264461e3221b3771316fcc318
[]
no_license
qzztf/solo
3e7930acc8d138efc15f99730af950bcb4ad9087
905e0cdecffc05ca56686b2e74a9c9e42345d07d
refs/heads/master
2023-04-01T23:33:26.106544
2021-04-05T13:45:22
2021-04-05T13:45:22
173,111,465
0
0
null
2021-03-29T09:24:52
2019-02-28T12:50:41
Java
UTF-8
Java
false
false
1,377
java
package cn.sexycode.util.core.cls.internal; import cn.sexycode.util.core.cls.TypeUtils; import cn.sexycode.util.core.cls.XClass; import java.lang.reflect.Type; import java.util.Collection; /** * The Java X-layer equivalent to a Java <code>Type</code>. */ abstract class JavaXType { private final TypeEnvironment context; private final JavaReflectionManager factory; private final Type approximatedType; private final Type boundType; protected JavaXType(Type unboundType, TypeEnvironment context, JavaReflectionManager factory) { this.context = context; this.factory = factory; this.boundType = context.bind(unboundType); this.approximatedType = factory.toApproximatingEnvironment(context).bind(unboundType); } abstract public boolean isArray(); abstract public boolean isCollection(); abstract public XClass getElementClass(); abstract public XClass getClassOrElementClass(); abstract public Class<? extends Collection> getCollectionClass(); abstract public XClass getMapKey(); abstract public XClass getType(); public boolean isResolved() { return TypeUtils.isResolved(boundType); } protected Type approximate() { return approximatedType; } protected XClass toXClass(Type type) { return factory.toXClass(type, context); } }
[ "qinzaizhen@ddjf.com.cn" ]
qinzaizhen@ddjf.com.cn
820f5c402cae1b2371b218f07b5d60c19cdc3924
3b749105e1988bc2d8739cea5b9d47928ba189ba
/src/test/java/servicebroker/pinpoiont/restTest/CatalogMockTest.java
d4bded0a747ce919098643a779c3ebe606b78261
[ "Apache-2.0" ]
permissive
PaaS-TA/OPENPAAS-SERVICE-JAVA-BROKER-PINPOINT
816704aa3c34c1e599714c632590749d727f2ef5
0389e365b5a2ea7a70705cec06a32cf2c274106c
refs/heads/master
2021-07-20T17:39:16.224597
2021-04-30T01:52:48
2021-04-30T01:52:48
120,260,528
19
0
Apache-2.0
2021-04-30T01:52:48
2018-02-05T05:47:10
Java
UTF-8
Java
false
false
1,648
java
package servicebroker.pinpoiont.restTest; import static org.hamcrest.Matchers.containsInAnyOrder; import org.junit.Test; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.openpaas.servicebroker.controller.CatalogController; import org.openpaas.servicebroker.service.CatalogService; import org.springframework.http.MediaType; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import servicebroker.model.fixture.CatalogFixture; import servicebroker.model.fixture.ServiceFixture; import static org.hamcrest.Matchers.hasSize; import static org.mockito.Mockito.when; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; public class CatalogMockTest { MockMvc mockMvc; @InjectMocks CatalogController controller; @Mock CatalogService catalogService; @Test public void catalogIsRetrievedCorrectly() throws Exception { when(catalogService.getCatalog()).thenReturn(CatalogFixture.getCatalog()); this.mockMvc.perform(get(CatalogController.BASE_PATH) .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON)) .andExpect(jsonPath("$.services.", hasSize(1))) .andExpect(jsonPath("$.services[*].id", containsInAnyOrder(ServiceFixture.getService().getId()))); } }
[ "swmoon@bluedigm.com" ]
swmoon@bluedigm.com
52c4d56f9bc756783e1b80f63dab25e48c4d7c28
4981fc0e1e82dc9226116aa8f0a29413c947b0ec
/Build/src/tests/junit/org/apache/tools/ant/taskdefs/optional/XmlValidateCatalogTest.java
64db8e742c417cb146e8995b0eff3332d2f1163d
[ "W3C", "GPL-1.0-or-later", "SAX-PD", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown", "MIT" ]
permissive
Mayo-WE01051879/mayosapp
7e33d4b73b20e6f58f0ae593ae7c9ac10afff20c
4c678635cfd2823c2df6937165e102fdac72cb86
refs/heads/master
2022-12-10T01:22:54.629304
2021-02-24T20:16:36
2021-02-24T20:16:36
16,258,006
0
0
MIT
2022-12-05T23:23:59
2014-01-26T17:50:40
Java
UTF-8
Java
false
false
2,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 org.apache.tools.ant.taskdefs.optional; import org.apache.tools.ant.BuildFileTest; /** * Tests the XMLValidate optional task with nested external catalogs. * * @see XmlValidateTest * @since Ant 1.6 */ public class XmlValidateCatalogTest extends BuildFileTest { /** * where tasks run */ private final static String TASKDEFS_DIR = "src/etc/testcases/taskdefs/optional/"; /** * Constructor * * @param name testname */ public XmlValidateCatalogTest(String name) { super(name); } /** * The JUnit setup method */ public void setUp() { configureProject(TASKDEFS_DIR + "xmlvalidate.xml"); } /** * The teardown method for JUnit */ public void tearDown() { } /** * catalogfiles fileset should be ignored * if resolver.jar is not present, but will * be used if it is. either way, test should * work b/c we have a nested dtd with the same * entity */ public void testXmlCatalogFiles() { executeTarget("xmlcatalogfiles"); } /** * Test nested catalogpath. * It should be ignored if resolver.jar is not * present, but will be used if it is. either * way, test should work b/c we have a nested * dtd with the same entity */ public void testXmlCatalogPath() { executeTarget("xmlcatalogpath"); } }
[ "delapaz.mayo@gmail.com" ]
delapaz.mayo@gmail.com
7a36e8b98b992b3de3354832d1ddfd0c029dad1c
706ad94aa27f98388a609a828cdd3c24ef42173c
/src/main/java/cn/edu/zju/socialnetwork/service/impl/MessageServiceImp.java
93b1061f49961a2026e319102d6487634a1173d7
[]
no_license
May-Wang-666/FindFriends
944f6306623b34091f75fc62c28716b1733eac6d
8769571893387449d66ec98c6d7b51479c065e05
refs/heads/master
2020-04-13T13:37:26.011806
2019-07-21T04:57:20
2019-07-21T04:57:20
163,236,639
2
1
null
2019-05-19T06:14:30
2018-12-27T02:19:58
Java
UTF-8
Java
false
false
2,890
java
package cn.edu.zju.socialnetwork.service.impl; import cn.edu.zju.socialnetwork.entity.Message; import cn.edu.zju.socialnetwork.entity.User; import cn.edu.zju.socialnetwork.repository.MessageRepository; import cn.edu.zju.socialnetwork.repository.UserRepository; import cn.edu.zju.socialnetwork.service.MessageService; import cn.edu.zju.socialnetwork.util.GeneralUtil; import cn.edu.zju.socialnetwork.util.StaticValues; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.servlet.http.HttpServletRequest; import java.util.List; @Service public class MessageServiceImp implements MessageService { @Autowired private UserRepository userRepository; @Autowired private MessageRepository messageRepository; /** * 向数据库中写入留言 * * @param fromAccount 留言者 * @param toAccount 被留言者 * @param text 留言内容 * @param time 留言时间 * @return success */ @Override public String leaveMessage(String fromAccount, String toAccount, String text, String time) { User from = userRepository.findByEmail(fromAccount); User to = userRepository.findByEmail(toAccount); if (from == null) { return "invalid fromAccout"; } if (to == null) { return "invalid toAccount"; } Message newMessage = new Message(text, time, from); newMessage.setOwner(from); to.addMessage(newMessage); messageRepository.save(newMessage); userRepository.save(to); return "success"; } // 根据留言id删除留言 @Override public String deleteMessage(Long id, HttpServletRequest request) { Message message = messageRepository.findMessageById(id); if (message == null) { return "no message has id " + id; } else { messageRepository.deleteById(id); String currentAccount = GeneralUtil.getCurrentUserFromCookie(request); int numOfMessages = messageRepository.findTotalMessageByEmail(currentAccount); return String.valueOf(numOfMessages); } } @Override public List<Message> findMessagesByAccount(String account, int pageNumber) { int form = StaticValues.numInOnePage * (pageNumber-1); int to = StaticValues.numInOnePage * pageNumber; return messageRepository.findMessagesByAccount(account,form,to); } @Override public int findTotalMessageByAccount(String account) { return messageRepository.findTotalMessageByEmail(account); } @Override public Message findMessageById(Long id) { return messageRepository.findMessageById(id); } @Override public void saveMessage(Message message) { messageRepository.save(message); } }
[ "1746952456@qq.com" ]
1746952456@qq.com
430db06fbab2a060f3e22c8a05d69909d63be8aa
0732828a0ca43ac26b81d146a7eddd8b48f7ebf9
/app/src/main/java/com/example/drogomierz/SettingsActivity.java
77f3a7c6de7a7e80c728cf2cc48589451e5485ef
[]
no_license
czapiewskimateusz/drogomierz
30ecbb6b4d5d2ca5500a29a15f1e71fce3333a07
ce03e4ec5e16b2d1b3f6bd4a79e686255656468b
refs/heads/master
2021-01-01T19:41:37.441776
2017-08-07T16:01:12
2017-08-07T16:01:12
98,652,458
0
0
null
null
null
null
UTF-8
Java
false
false
615
java
package com.example.drogomierz; import android.app.Activity; import android.os.Bundle; import android.preference.PreferenceActivity; import android.support.v4.app.FragmentActivity; public class SettingsActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings); getActionBar().setDisplayHomeAsUpEnabled(true); getFragmentManager().beginTransaction() .replace(R.id.fragment_container, new SettingsFragment()) .commit(); } }
[ "matis1enator@gmail.com" ]
matis1enator@gmail.com
08f29fc092cddccf492f7b4b779c46266afd09c6
2faaf066717407e513de70cc8fbf4358cb1ed3da
/java-basic/src/main/java/com/eomcs/basic/ex02/Exam0130.java
49d017a26c03d8de3dca8c04892e8d0fa5d91dd6
[]
no_license
woohyeongminn/bitcamp-study
0983aebe51ed6815c4f25bdf1341adec5cf6e277
28dcc540da14e3577c97f76f7af76ce16d1c1c73
refs/heads/main
2023-08-31T17:11:23.558226
2021-11-16T04:51:39
2021-11-16T04:51:39
380,931,262
0
0
null
null
null
null
UTF-8
Java
false
false
878
java
// String - hashCode() package com.eomcs.basic.ex02; public class Exam0130 { public static void main(String[] args) { String s1 = new String("Hello"); String s2 = new String("Hello"); // Object의 hashCode()는 인스턴스 마다 다르다. System.out.println(s1 == s2); System.out.println(s1.hashCode() == s2.hashCode()); // true // // 그러나, String의 hashCode()은 // 문자열이 같으면 같은 hashCode()를 리턴하도록 오버라이딩 하였다. // 이유? // - 문자열이 같은 경우 같은 객체로 다루기 위함이다. // - HashSet 에서 객체를 저장할 때 이 메서드의 리턴 값으로 저장 위치를 계산한다. // - HashMap이나 Hashtable에서는 Key를 다룰 때 이 메서드의 리턴 값을 사용한다. // - 보통 equals()를 함께 오버라이딩 한다. } }
[ "gudals.woo@gmail.com" ]
gudals.woo@gmail.com
e2fbe01b0e81f802e489396dbcce26c6fc68027e
6713fb4af23df08efc5da9c630f8052984bcb781
/src/main/java/com/example/algamoneyapi1/service/PessoaService.java
f0f67e699f517dc001299043835368d4d1676143
[]
no_license
ThayanaRMachado/AlgamoneyApi1Hero
3c91cbd926599892ea8bf96a245ab7dd3ed741c1
6b94d8c561cc72fdb8d2ecb2ef15748fae236c1b
refs/heads/master
2023-02-12T11:27:47.661588
2021-01-07T15:06:18
2021-01-07T15:06:18
327,379,865
0
0
null
null
null
null
UTF-8
Java
false
false
1,450
java
package com.example.algamoneyapi1.service; import java.util.Optional; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.ResponseStatus; import com.example.algamoneyapi1.model.Pessoa; import com.example.algamoneyapi1.repository.PessoaRepository; @Service public class PessoaService { @Autowired private PessoaRepository pessoaRepository; public Pessoa atualizar(Long codigo, Pessoa pessoa) { Pessoa pessoaSalva = this.pessoaRepository.findById(codigo).orElseThrow(() -> new EmptyResultDataAccessException(1)); BeanUtils.copyProperties(pessoa, pessoaSalva, "codigo"); return pessoaRepository.save(pessoaSalva); } public void atualizarPropriedadeAtivo(Long codigo, Boolean ativo) { Pessoa pessoaSalva = buscarPeloCodigo(codigo); pessoaSalva.setAtivo(ativo); pessoaRepository.save(pessoaSalva); } public Pessoa buscarPeloCodigo(Long codigo) { Optional<Pessoa> pessoa = pessoaRepository.findById(codigo); return pessoa.orElseThrow(() -> new EmptyResultDataAccessException(1)); } }
[ "thayanarm@hotmail.com" ]
thayanarm@hotmail.com
b8b874f70286db735ac8627831cc5e9db1eab02c
9254e7279570ac8ef687c416a79bb472146e9b35
/sofa-20190815/src/main/java/com/aliyun/sofa20190815/models/GetDWSSubsTaskMetricsResponseBody.java
27ca7c3a0414321c9e386e2dcc265854de7d9d88
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,002
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.sofa20190815.models; import com.aliyun.tea.*; public class GetDWSSubsTaskMetricsResponseBody extends TeaModel { @NameInMap("RequestId") public String requestId; @NameInMap("ResultCode") public String resultCode; @NameInMap("ResultMessage") public String resultMessage; @NameInMap("Data") public GetDWSSubsTaskMetricsResponseBodyData data; public static GetDWSSubsTaskMetricsResponseBody build(java.util.Map<String, ?> map) throws Exception { GetDWSSubsTaskMetricsResponseBody self = new GetDWSSubsTaskMetricsResponseBody(); return TeaModel.build(map, self); } public GetDWSSubsTaskMetricsResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public GetDWSSubsTaskMetricsResponseBody setResultCode(String resultCode) { this.resultCode = resultCode; return this; } public String getResultCode() { return this.resultCode; } public GetDWSSubsTaskMetricsResponseBody setResultMessage(String resultMessage) { this.resultMessage = resultMessage; return this; } public String getResultMessage() { return this.resultMessage; } public GetDWSSubsTaskMetricsResponseBody setData(GetDWSSubsTaskMetricsResponseBodyData data) { this.data = data; return this; } public GetDWSSubsTaskMetricsResponseBodyData getData() { return this.data; } public static class GetDWSSubsTaskMetricsResponseBodyDataMetric extends TeaModel { @NameInMap("ConsumptionLatency") public Long consumptionLatency; @NameInMap("ConsumptionRps") public Long consumptionRps; @NameInMap("DailyConsumedRecords") public Long dailyConsumedRecords; @NameInMap("SampleTime") public String sampleTime; @NameInMap("SlowestPartition") public String slowestPartition; public static GetDWSSubsTaskMetricsResponseBodyDataMetric build(java.util.Map<String, ?> map) throws Exception { GetDWSSubsTaskMetricsResponseBodyDataMetric self = new GetDWSSubsTaskMetricsResponseBodyDataMetric(); return TeaModel.build(map, self); } public GetDWSSubsTaskMetricsResponseBodyDataMetric setConsumptionLatency(Long consumptionLatency) { this.consumptionLatency = consumptionLatency; return this; } public Long getConsumptionLatency() { return this.consumptionLatency; } public GetDWSSubsTaskMetricsResponseBodyDataMetric setConsumptionRps(Long consumptionRps) { this.consumptionRps = consumptionRps; return this; } public Long getConsumptionRps() { return this.consumptionRps; } public GetDWSSubsTaskMetricsResponseBodyDataMetric setDailyConsumedRecords(Long dailyConsumedRecords) { this.dailyConsumedRecords = dailyConsumedRecords; return this; } public Long getDailyConsumedRecords() { return this.dailyConsumedRecords; } public GetDWSSubsTaskMetricsResponseBodyDataMetric setSampleTime(String sampleTime) { this.sampleTime = sampleTime; return this; } public String getSampleTime() { return this.sampleTime; } public GetDWSSubsTaskMetricsResponseBodyDataMetric setSlowestPartition(String slowestPartition) { this.slowestPartition = slowestPartition; return this; } public String getSlowestPartition() { return this.slowestPartition; } } public static class GetDWSSubsTaskMetricsResponseBodyData extends TeaModel { @NameInMap("Consumer") public String consumer; @NameInMap("Group") public String group; @NameInMap("Id") public Long id; @NameInMap("Name") public String name; @NameInMap("TableId") public String tableId; @NameInMap("Metric") public GetDWSSubsTaskMetricsResponseBodyDataMetric metric; public static GetDWSSubsTaskMetricsResponseBodyData build(java.util.Map<String, ?> map) throws Exception { GetDWSSubsTaskMetricsResponseBodyData self = new GetDWSSubsTaskMetricsResponseBodyData(); return TeaModel.build(map, self); } public GetDWSSubsTaskMetricsResponseBodyData setConsumer(String consumer) { this.consumer = consumer; return this; } public String getConsumer() { return this.consumer; } public GetDWSSubsTaskMetricsResponseBodyData setGroup(String group) { this.group = group; return this; } public String getGroup() { return this.group; } public GetDWSSubsTaskMetricsResponseBodyData setId(Long id) { this.id = id; return this; } public Long getId() { return this.id; } public GetDWSSubsTaskMetricsResponseBodyData setName(String name) { this.name = name; return this; } public String getName() { return this.name; } public GetDWSSubsTaskMetricsResponseBodyData setTableId(String tableId) { this.tableId = tableId; return this; } public String getTableId() { return this.tableId; } public GetDWSSubsTaskMetricsResponseBodyData setMetric(GetDWSSubsTaskMetricsResponseBodyDataMetric metric) { this.metric = metric; return this; } public GetDWSSubsTaskMetricsResponseBodyDataMetric getMetric() { return this.metric; } } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
c62f8c7dbc1a1ce934c02cd187bd1ee8c38e024e
81efd186aeb500bbedf29efc37e0027557d42885
/src/main/java/com/BrowserConfig/ChromeConfig.java
00f5d04e697453ddb056993f3101f64bed840425
[]
no_license
rahul11071995/TestAutomationBITM09
135e8848883bb10a2d48389c5c577fd9b848bad4
c32146551543842e4f576adc5fa4a0f719a32969
refs/heads/master
2023-08-12T00:50:16.452779
2021-09-19T10:03:08
2021-09-19T10:03:08
405,869,876
0
0
null
null
null
null
UTF-8
Java
false
false
857
java
package com.BrowserConfig; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class ChromeConfig { public static WebDriver driver; public static void main(String[] args) { launch_Chrome (); //close_Chrome(); quit_Chrome(); } public static void launch_Chrome (){ System.setProperty("webdriver.chrome.driver","./src/main/resources/chromedriver.exe"); // System.out.println("webdriver.chrome.driver","F:\\study materils\\SQA\\BITM\\Automation\\Tools"); driver = new ChromeDriver(); driver.manage().window().maximize(); //maximize window } public static void close_Chrome (){ driver.close(); // close only active tab } public static void quit_Chrome (){ driver.quit(); //close full browser } }
[ "shimanto.joy@gmail.com" ]
shimanto.joy@gmail.com
9170439798cf18d22719cf34d1f050bd9bd66a12
6e21cc085f55c4975d90a22fd2078e6d44a26ad4
/src/main/java/ch/sebooom/jelastic/usersservice/web/AuthController.java
88657bab4d4573ec5a1a34b57524047b7d1d6e66
[]
no_license
sebChevre/jelastic-user-service
6f5916ee48a29f6ebb704a6a82f40d95ac94e095
2db0e6868576de8f29316a10e73fd41f4909a58f
refs/heads/master
2020-04-02T06:43:58.747584
2018-10-22T15:17:51
2018-10-22T15:17:51
154,165,331
0
0
null
null
null
null
UTF-8
Java
false
false
1,117
java
package ch.sebooom.jelastic.usersservice.web; import ch.sebooom.jelastic.usersservice.domaine.User; import ch.sebooom.jelastic.usersservice.domaine.UserRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; @RestController @RequestMapping("/auth") public class AuthController { @Autowired UserRepository userRepository; @PostMapping public ResponseEntity login(@Valid @RequestBody Login login){ Boolean loginOk = userRepository.login(login.getLogin(),login.getPassword()); if(loginOk){ return ResponseEntity.ok(new AuthResult(Boolean.TRUE)); }else{ return ResponseEntity.status(HttpStatus.UNAUTHORIZED).body(new AuthResult(Boolean.FALSE)); } } }
[ "sce@gglobaz.ch" ]
sce@gglobaz.ch
13c06af452ded5f5db655cb591a1b7c28f91849b
dee143bd512ee5389173d2bd754ced6d3ff1e86c
/quarkus-test-core/src/main/java/io/quarkus/test/bootstrap/ServiceContext.java
85c88b704351461719dd11d12e40d8b8e672b264
[ "Apache-2.0" ]
permissive
fabiobrz/quarkus-test-framework
9c6c852f8f7d84e1f66448d4e1b7fd5806116486
be443b8fd61c8f1c498a8288f15b13259ddf1736
refs/heads/main
2023-05-19T09:25:40.878303
2021-06-07T08:59:28
2021-06-07T08:59:47
373,764,156
0
0
Apache-2.0
2021-06-04T07:52:47
2021-06-04T07:52:47
null
UTF-8
Java
false
false
1,116
java
package io.quarkus.test.bootstrap; import java.io.File; import java.nio.file.Path; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.extension.ExtensionContext; public final class ServiceContext { private final Service owner; private final ExtensionContext testContext; private final Path serviceFolder; private final Map<String, Object> store = new HashMap<>(); protected ServiceContext(Service owner, ExtensionContext testContext) { this.owner = owner; this.testContext = testContext; this.serviceFolder = new File("target", getName()).toPath(); } public Service getOwner() { return owner; } public String getName() { return owner.getName(); } public ExtensionContext getTestContext() { return testContext; } public Path getServiceFolder() { return serviceFolder; } public void put(String key, Object value) { store.put(key, value); } @SuppressWarnings("unchecked") public <T> T get(String key) { return (T) store.get(key); } }
[ "josecarvajalhilario@gmail.com" ]
josecarvajalhilario@gmail.com
ec87eb099e64e3d93daae9f595c07b3e4d514ea2
081e5cc928819b6ce75a85b10ec5cdeaf604faf6
/gateway/src/main/java/com/aubay/gateway/GatewayApplication.java
cab1924fa957723184a74d7c9546d07bfdd055fd
[]
no_license
Tomasoares/mentoria-fagner
b78a45a5dec7a15e90a105dfbdc21259a3455907
5bc316b3f75907396822130f327d859c83e90991
refs/heads/main
2023-08-24T16:45:14.209960
2021-10-23T17:08:18
2021-10-23T17:08:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
312
java
package com.aubay.gateway; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class GatewayApplication { public static void main(String[] args) { SpringApplication.run(GatewayApplication.class, args); } }
[ "tomasoares@gmail.com" ]
tomasoares@gmail.com
d321cf66fcca8dddd2565f8fbc429792d5a77b95
89f7aef00d1a33a9c157af5c42667f53ae2cee63
/src/main/java/com/woniuxy/domain/Emp.java
1a862e29aed521bb3cbfcca1bd0e9f46ee51ee20
[]
no_license
zhangsaiCSDN/ssh2CRUD-
f41702b7e5457b11693f2fb1fe6140b5dea05ae3
ca654447499ea52ddc912b96a3231525ea5efa52
refs/heads/master
2022-12-16T10:22:19.128022
2019-09-01T11:23:17
2019-09-01T11:23:17
205,665,001
0
0
null
2022-12-10T03:42:56
2019-09-01T11:08:12
Java
UTF-8
Java
false
false
1,282
java
package com.woniuxy.domain; // Generated 2019-8-30 15:11:07 by Hibernate Tools 5.4.2.Final import java.util.Date; /** * Emp generated by hbm2java */ public class Emp implements java.io.Serializable { private Integer eid; private Dept dept; private String ename; private Double sal; private Date hiredate; public Emp() { } public Emp(Dept dept, String ename, Double sal, Date hiredate) { this.dept = dept; this.ename = ename; this.sal = sal; this.hiredate = hiredate; } public Integer getEid() { return this.eid; } public void setEid(Integer eid) { this.eid = eid; } public Dept getDept() { return this.dept; } public void setDept(Dept dept) { this.dept = dept; } public String getEname() { return this.ename; } public void setEname(String ename) { this.ename = ename; } public Double getSal() { return this.sal; } public void setSal(Double sal) { this.sal = sal; } public Date getHiredate() { return this.hiredate; } public void setHiredate(Date hiredate) { this.hiredate = hiredate; } @Override public String toString() { return "Emp [eid=" + eid + ", ename=" + ename + ", sal=" + sal + ", hiredate=" + hiredate + "]"; } }
[ "1095726563.com" ]
1095726563.com
f829f0d9a93512d35f4044b3d6b45cc50f7db2d9
76b3c4825c95b60290319c409816faa7504da659
/src/main/java/com/game/model/User.java
9cd89714c47fce9481dd47ac693e52fc392becff
[]
no_license
samirnaqvi/RacingRally
c324a438185fb2ccd166c6a7ee5e97067b82523e
5cffb55b305420702af5fd93bab505bcff68997e
refs/heads/master
2021-08-30T19:34:10.844809
2017-12-19T06:30:47
2017-12-19T06:30:47
114,726,598
0
0
null
null
null
null
UTF-8
Java
false
false
2,295
java
package com.game.model; public class User implements Comparable { private int id; private String name; private int highestScore; public User(String name) { this.name = name; } /*Attributes of the User include the ID, the name, and the user's highest score, which is also recorded for the top 10 scorer in the database and the high scores section.*/ public User(int id, String name, int highestScore) { this.id = id; this.name = name; this.highestScore = highestScore; } public User(int id, String name) { this.id = id; this.name = name; } public User(String name, int highestScore) { this.name = name; this.highestScore = highestScore; } public User() { } public int getId() { return id;//gets id of the User } public void setId(int id) { this.id = id; } public String getName() { return name;//gets the Name of the user, custom created by the User him/herself } public void setName(String name) { this.name = name; } public int getHighestScore() { return highestScore; } public void setHighestScore(int highestScore) { this.highestScore = highestScore; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; if (id != user.id) return false; if (highestScore != user.highestScore) return false; return !(name != null ? !name.equals(user.name) : user.name != null); } @Override public int hashCode() { int result = id; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + highestScore; return result; } @Override public String toString() { return name; } @Override public int compareTo(Object o) { //sorts the highest scoring users if (this.highestScore > ((User) o).getHighestScore()) return -1; else if (this.highestScore == ((User) o).getHighestScore()) return 0; else return 1; } }
[ "samirnaqvi@Samirs-MBP.attlocal.net" ]
samirnaqvi@Samirs-MBP.attlocal.net
f8959757a598e29ceef5800d6c00ca0573100c8b
9a5fab23027523fa1375199f8048386f91c51cbf
/src/ch4/ArrayEx12.java
1c2f4a81cfcbf1e8537da53759da795931c5e4eb
[]
no_license
ektha4903/javasource
7076810adfe2d5919bb9632bc1c70404766ce2a1
5d4d25adbc3d435e140ca4ebce7c8b02ccd96102
refs/heads/master
2023-04-20T16:38:22.420850
2021-04-30T08:46:28
2021-04-30T08:46:28
357,107,832
0
0
null
null
null
null
UTF-8
Java
false
false
542
java
package ch4; public class ArrayEx12 { public static void main(String[] args) { int oldArray[]= {10,20,30}; int newArray[]=new int[5]; //oldArray => newArray로 copy //(Object src, int srcPos, Object dest, int destPos, int length) // (원본 배열, 원본배열의 0번부터, 목적지-어디로 갈거냐, 뉴 배열의 0번부터, 원본배열의 길이만큼) System.arraycopy(oldArray, 0, newArray, 1, oldArray.length); for(int i:newArray) { System.out.print(i+"\t"); } } }
[ "ektha4903@gmail.com" ]
ektha4903@gmail.com
75c758eb4034bde135f419b52ced3bb507347b8b
6304607dac469b0484dfb6f8671e6dbeab116b5b
/AndroidAnimation/app/src/main/java/com/example/marci/androidanimation/MainActivity.java
548d72b82850822a4ae65f74f66003d15d88f9a5
[]
no_license
marcioaleson/Android
128cebf7f8f34c8fe009bc2c927cc5d22273c8dc
17c6192d934e2209294972505a019aaf8ff763f0
refs/heads/master
2021-01-17T01:19:22.520675
2018-02-08T02:26:49
2018-02-08T02:26:49
37,694,046
0
0
null
null
null
null
UTF-8
Java
false
false
1,857
java
package com.example.marci.androidanimation; import android.os.Bundle; import android.app.Activity; import android.support.v7.app.AppCompatActivity; import android.view.Menu; import android.view.MenuItem; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.ImageView; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } public boolean onOptionsItemSelected(MenuItem item) { super.onOptionsItemSelected(item); switch (item.getItemId()) { case R.id.zoomInOut: ImageView image = (ImageView) findViewById(R.id.imageView1); Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.myanimation); image.startAnimation(animation); return true; case R.id.rotate360: ImageView image1 = (ImageView) findViewById(R.id.imageView1); Animation animation1 = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.clockwise); image1.startAnimation(animation1); return true; case R.id.fadeInOut: ImageView image2 = (ImageView) findViewById(R.id.imageView1); Animation animation2 = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.fade); image2.startAnimation(animation2); return true; } return false; } }
[ "marcioaleson@gmail.com" ]
marcioaleson@gmail.com
b77a1e0e3bc7c2e50e15bcc6680d88af1db50920
ac0a272aa839bc8178cb52c3d3b6b91674e3ab10
/src/test/java/com/swacorp/training/StrategySolverTest.java
dd0c533a95de0e43279875ceadd359614756e8d1
[]
no_license
sergiopedraza/SWA_Challenge2
2e1990f5d175875de9ce3b482808ebe7c7fe5142
02b359ccaca0e1a531329171c92bf85916ee1ad4
refs/heads/master
2016-09-14T03:55:52.184867
2016-04-11T22:10:03
2016-04-11T22:10:03
56,011,104
0
0
null
null
null
null
UTF-8
Java
false
false
2,176
java
package com.swacorp.training; import static org.testng.AssertJUnit.assertEquals; import org.testng.annotations.Test; import org.testng.annotations.Test; import org.testng.annotations.Test; public class StrategySolverTest { private StrategySolver toTest; private static final String COMPLETE_STATUS = "COMPLETE"; private static final String SUCCESSFUL_TYPE = "SUCCESSFUL"; @Test public void shouldGetASuccessfulResponse(){ String message = "Test Complete Message"; toTest = new StrategySolver(COMPLETE_STATUS, message); StrategyResult strategyResult = toTest.messageDecode(); assertEquals("Type not expected", strategyResult.getResponseType(), SUCCESSFUL_TYPE); } @Test public void shouldGetServerErrorResponseAnalyzingMessageWithColonInFirstLine(){ StringBuilder message = new StringBuilder("Test Complete Message"); message.append(" for ServerErrorStrategy"); message.append(":").append(" ").append(ServerErrorStrategy.ERROR_NOT_MESSAGE); message.append("\n").append(" An important error message"); toTest = new StrategySolver(ServerErrorStrategy.SERVER_ERROR, message.toString()); StrategyResult strategyResult = toTest.messageDecode(); assertEquals("SERVER_ERROR", strategyResult.getResponseDescription()); } @Test public void shouldGetServerErrorResponseAnalyzingMessageWithOutColonInFirstLine(){ StringBuilder message = new StringBuilder(ServerErrorStrategy.ERROR_NOT_MESSAGE); message.append("\n").append(" An important error message"); toTest = new StrategySolver(ServerErrorStrategy.SERVER_ERROR, message.toString()); StrategyResult strategyResult = toTest.messageDecode(); assertEquals("SERVER_ERROR", strategyResult.getResponseDescription()); } @Test public void shouldGetServerErrorResponseAnalyzingStatus(){ StringBuilder message = new StringBuilder(" An important error message"); toTest = new StrategySolver(ServerErrorStrategy.SERVER_ERROR, message.toString()); StrategyResult strategyResult = toTest.messageDecode(); assertEquals("SERVER_ERROR", strategyResult.getResponseType()); } }
[ "sergio.pedraza@globant.com" ]
sergio.pedraza@globant.com
9b6366a6cca2d08b108791fb5ecdae491c04922d
e323ccdd2af8b4c3174a2120adb48adc3d8f6fb7
/src/main/java/com/mry/service/UserCardManageService.java
8ccdc89718a23f5c0d98ce1415335f117436b070
[]
no_license
ma349432587/mry
aa46ec3886d38a0a6861818164a47f3b3e9a1787
12e51a97eff2b14f8cf8b88a7353a2cb4d597480
refs/heads/master
2023-03-22T00:26:57.540209
2019-09-27T15:33:38
2019-09-27T15:33:38
525,328,477
0
0
null
2022-08-16T10:18:47
2022-08-16T10:18:46
null
UTF-8
Java
false
false
12,834
java
package com.mry.service; import java.util.List; import javax.annotation.Resource; import com.mry.enums.DateFormat; import com.mry.enums.UserCardTypes; import com.mry.model.*; import com.mry.repository.*; import com.mry.utils.CommonUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; @Service @Transactional public class UserCardManageService { @Resource private UserCardManageRepository userCardManageRepository; @Resource private MemCardManageRepository memCardManageRepository; @Resource private MemCardItemsRepository memCardItemsRepository; @Resource private ExtCardRepository extCardRepository; @Resource private ExtCardItemRepository extCardItemRepository; @Resource private ActivityCardRepository activityCardRepository; @Resource private ActivityCardRechargeItemRepository activityCardRechargeItemRepository; @Resource private UserCardMemItemRepository userCardMemItemRepository; @Resource private UserCardExtItemRepository userCardExtItemRepository; @Resource private UserCardActItemRepository userCardActItemRepository; @Resource private UserCardManageRecordsRepository userCardManageRecordsRepository; // 添加一条用户卡管理记录 public int addUserCardManageInfo(UserCardManage userCardManage) { UserCardManage originUserCardManage = userCardManageRepository.getUserCardManageByCardType(userCardManage.getStoreId(), userCardManage.getUserId(), userCardManage.getCardType()); // 如果有重复记录就将其覆盖 if(null != originUserCardManage) { userCardManage.setId(originUserCardManage.getId()); } userCardManageRepository.save(userCardManage); // 查出关于用户卡的详情,初始化为用户关联卡项目 String cardType = userCardManage.getCardType(); // 卡类型是 会员卡 if(UserCardTypes.equals(cardType, UserCardTypes.memCardType)) { MemCardManage memCardManage = memCardManageRepository.getMemCardManageByCardName(userCardManage.getStoreId(), userCardManage.getCardOption()); if(null != memCardManage) { List<MemCardItems> memCardItems = memCardItemsRepository.getMemCardItemsByMemCardId(memCardManage.getStoreId(), memCardManage.getId()); // 创建与用户卡关联的项目 List<UserCardMemItem> userCardMemItems = UserCardMemItem.bindUserCardMemItemInfo(userCardManage.getStoreId(), userCardManage.getUserId(), userCardManage.getId(), memCardItems); // 如果已经有关于卡关联的卡项目信息,将其删除,重新添加 userCardMemItemRepository.deleteUserCardMemItemByScuId(userCardManage.getStoreId(), userCardManage.getId(), userCardManage.getUserId()); userCardMemItemRepository.saveAll(userCardMemItems); } // 卡类型是 拓客卡 } else if(UserCardTypes.equals(cardType, UserCardTypes.extCardType)) { ExtCard extCard = extCardRepository.getExtCardByName(userCardManage.getStoreId(), userCardManage.getCardOption()); if(null != extCard) { List<ExtCardItem> extCardItems = extCardItemRepository.getExtCardItemsByExtCardId(extCard.getStoreId(), extCard.getId()); List<UserCardExtItem> userCardExtItems = UserCardExtItem.bindUserCardExtItemInfo(userCardManage.getStoreId(), userCardManage.getUserId(), userCardManage.getId(), extCardItems); // 如果已经有关于卡关联的卡项目信息,将其删除,重新添加 userCardExtItemRepository.deleteUserCardExtItemByUserId(userCardManage.getStoreId(), userCardManage.getId(), userCardManage.getUserId()); userCardExtItemRepository.saveAll(userCardExtItems); } // 卡类型是 活动卡 } else if(UserCardTypes.equals(cardType, UserCardTypes.actCardType)) { ActivityCard activityCard = activityCardRepository.getActivityCardByActiName(userCardManage.getStoreId(), userCardManage.getCardOption()); if(null != activityCard) { List<ActivityCardRechargeItem> actCardItems = activityCardRechargeItemRepository.getActivityCardRechargeItemByActCardId(activityCard.getStoreId(), activityCard.getId()); List<UserCardActItem> userCardActItems = UserCardActItem.bindUserCardActItemInfo(userCardManage.getStoreId(), userCardManage.getUserId(), userCardManage.getId(), actCardItems); // 如果已经有关于卡关联的卡项目信息,将其删除,重新添加 userCardActItemRepository.deleteUserCardActItemByUserId(userCardManage.getStoreId(), userCardManage.getId(), userCardManage.getUserId()); userCardActItemRepository.saveAll(userCardActItems); } } return userCardManage.getStoreId(); } // 编辑一条用户卡管理信息 public int editUserCardManageInfo(UserCardManage userCardManage) { userCardManageRepository.save(userCardManage); return userCardManage.getId(); } // 修改卡余额 public double editUserCardBalance(int id, double money, String discount, String consDesc) { // 获取卡的余额 UserCardManage userCardManage = userCardManageRepository.getUserCardManageById(id); // 没有卡的记录 if(null == userCardManage) { return -1; } // 卡的状态不可用(不为1) if(!userCardManage.getCardStatus().equals("1")) { return -2; } // 卡是否过期 if(!CommonUtils.validExpireDate(userCardManage.getCardExceDate())) { return -3; } String sCardBalance = userCardManage.getCardBalance(); // 卡的余额为空 if(StringUtils.isEmpty(sCardBalance)) { return -4; } else { // 卡上余额 Double dCardBalance = Double.parseDouble(sCardBalance); // 卡的余额不足 if(dCardBalance <= 0) { return -5; } // 计算要扣除的金额 // 先处理克扣格式 Double dDiscount = parseDiscount(discount); Double dedMoney = money; // 如果有折扣 if(dDiscount > 0.0) { // 折扣的钱 Double disCountMoney = CommonUtils.doubleCalculation(money, dDiscount, "*"); // 要扣除的钱 dedMoney = CommonUtils.doubleCalculation(dedMoney, disCountMoney, "-"); // 需要记录到卡扣历史记录中 UserCardManageRecords userCardManageRecords = recordCardConsumption(userCardManage, dedMoney, consDesc); userCardManageRecordsRepository.save(userCardManageRecords); } // 扣除完毕后,卡上的余额 Double balance = CommonUtils.doubleCalculation(dCardBalance, dedMoney, "-"); // 更新卡的余额 userCardManageRepository.editUserCardBalance(id, Double.toString(balance)); return balance; } } // 生成消费记录 public UserCardManageRecords recordCardConsumption(UserCardManage userCardManage, Double dedMoney, String consDesc) { UserCardManageRecords userCardManageRecords = new UserCardManageRecords(); userCardManageRecords.setStoreId(userCardManage.getStoreId()); userCardManageRecords.setUserId(userCardManage.getUserId()); userCardManageRecords.setCardId(userCardManage.getId()); userCardManageRecords.setCardItemId(0); userCardManageRecords.setCardType(userCardManage.getCardType()); userCardManageRecords.setCardOption(userCardManage.getCardOption()); userCardManageRecords.setConsType(UserCardTypes.consType1.type()); userCardManageRecords.setConsMoney(String.valueOf(dedMoney)); userCardManageRecords.setConsDate(CommonUtils.currentDate(DateFormat.FORMAT1.getFormat())); userCardManageRecords.setConsDesc(consDesc); userCardManageRecords.setCardItem(""); return userCardManageRecords; } // 处理折扣的格式 public static Double parseDiscount(String disCount) { if(disCount.contains("%")) { disCount = disCount.replace("%", ""); return CommonUtils.doubleCalculation(Double.parseDouble(disCount), 100, "/"); } return CommonUtils.doubleCalculation(Double.parseDouble(disCount), 100, "/"); } public static void main(String[] args) { Double o = parseDiscount("0"); System.out.println(o); } // 根据 storeId + id 查询一条用户卡管理记录 public UserCardManage getUserCardManageById(int storeId, int id) { return getUserCardItem(userCardManageRepository.getUserCardManageById(storeId, id)); } // 根据 storeId + userId + cardName 查询一条用户卡管理记录 public UserCardManage getUserCardManageByCardType(int storeId, int userId, String cardType) { return getUserCardItem(userCardManageRepository.getUserCardManageByCardType(storeId, userId, cardType)); } // 根据 storeId + userId 查询该用户下所有卡记录 public List<UserCardManage> getUserCardManageByUserId(int storeId, int userId) { List<UserCardManage> userCardManages = userCardManageRepository.getUserCardManageByUserId(storeId, userId); for(UserCardManage userCardManage : userCardManages) { userCardManage = getUserCardItem(userCardManage); } return userCardManages; } // 根据 storeId 查询该门店下所有卡记录 public List<UserCardManage> getUserCardManageByStoreId(int storeId) { List<UserCardManage> userCardManages = userCardManageRepository.getUserCardManageByStoreId(storeId); for(UserCardManage userCardManage : userCardManages) { userCardManage = getUserCardItem(userCardManage); } return userCardManages; } // 根据 storeId + id 删除一条用户卡记录 public int deleteUserCardManageById(int storeId, int id) { UserCardManage userCardManage = getUserCardManageById(storeId, id); int deleteCount = 0; if(null != userCardManage) { deleteCount += deleteUserCardItem(userCardManage); deleteCount += userCardManageRepository.deleteUserCardManageById(storeId, id); } return deleteCount; } // 根据 storeId + userId 删除该用户所有卡记录 public int deleteUserCardManageByUserId(int storeId, int userId) { List<UserCardManage> userCardManages = getUserCardManageByUserId(storeId, userId); int deleteCount = 0; if(!userCardManages.isEmpty()) { for(UserCardManage userCardManage : userCardManages) { deleteCount += deleteUserCardItem(userCardManage); } deleteCount += userCardManageRepository.deleteUserCardManageByUserId(storeId, userId); } return deleteCount; } // 根据 storeId 删除该门店下所有用户卡记录 public int deleteUserCardManageByStoreId(int storeId) { List<UserCardManage> userCardManages = getUserCardManageByStoreId(storeId); int deleteCount = 0; if(!userCardManages.isEmpty()) { for(UserCardManage userCardManage : userCardManages) { deleteCount += deleteUserCardItem(userCardManage); deleteCount += userCardManageRepository.deleteUserCardManageByStoreId(storeId); } } return deleteCount; } // 查询与用户卡关联的卡项目 public UserCardManage getUserCardItem(UserCardManage userCardManage) { // 查出关于用户卡的详情,获取用户关联卡项目 String cardType = userCardManage.getCardType(); // 卡类型是 会员卡 if(UserCardTypes.equals(cardType, UserCardTypes.memCardType)) { List<UserCardMemItem> userCardMemItems = userCardMemItemRepository.getUserCardMemItemByUserId(userCardManage.getStoreId(), userCardManage.getId(), userCardManage.getUserId()); userCardManage.getCardItem().put("userCardMemItem", userCardMemItems); // 卡类型是 拓客卡 } else if(UserCardTypes.equals(cardType, UserCardTypes.extCardType)) { List<UserCardExtItem> userCardExtItems = userCardExtItemRepository.getUserCardExtItemByUserId(userCardManage.getStoreId(), userCardManage.getId(), userCardManage.getUserId()); userCardManage.getCardItem().put("userCardExtItem", userCardExtItems); // 卡类型是 活动卡 } else if(UserCardTypes.equals(cardType, UserCardTypes.actCardType)) { List<UserCardActItem> userCardActItems = userCardActItemRepository.getUserCardActItemByUserId(userCardManage.getStoreId(), userCardManage.getId(), userCardManage.getUserId()); userCardManage.getCardItem().put("userCardActItem", userCardActItems); } return userCardManage; } // 删除与用户卡关联的卡项目 public int deleteUserCardItem(UserCardManage userCardManage) { // 查出关于用户卡的详情,获取用户关联卡项目 String cardType = userCardManage.getCardType(); int userCardItemNum = 0; // 卡类型是 会员卡 if(UserCardTypes.equals(cardType, UserCardTypes.memCardType)) { userCardItemNum = userCardMemItemRepository.deleteUserCardMemItemByScuId(userCardManage.getStoreId(), userCardManage.getId(), userCardManage.getUserId()); // 卡类型是 拓客卡 } else if(UserCardTypes.equals(cardType, UserCardTypes.extCardType)) { userCardItemNum = userCardExtItemRepository.deleteUserCardExtItemByUserId(userCardManage.getStoreId(), userCardManage.getId(), userCardManage.getUserId()); // 卡类型是 活动卡 } else if(UserCardTypes.equals(cardType, UserCardTypes.actCardType)) { userCardItemNum = userCardActItemRepository.deleteUserCardActItemByUserId(userCardManage.getStoreId(), userCardManage.getId(), userCardManage.getUserId()); } return userCardItemNum; } }
[ "cddufu@cn.ibm.com" ]
cddufu@cn.ibm.com
faaea982feebe4d5944554d6336041984a1599ab
a3c4dfc8079e39bc246565a490d42b17f89f3d15
/webapp/Recipe_Management_System/src/main/java/com/csye/recipe/pojo/NutritionInformation.java
6dbd072a17e9e289fdc6f56545ba1c41930da603
[ "Apache-2.0" ]
permissive
khizarkhanhoti/Cloud-Computing-Project
3b9bb6275ccce5090d4b5ba1ce4f08838d0211b4
57e692f6a5bb19b973dc255191d50384c326901f
refs/heads/master
2023-01-03T13:08:09.021093
2020-10-27T03:44:21
2020-10-27T03:44:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,894
java
package com.csye.recipe.pojo; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import javax.persistence.*; @Entity public class NutritionInformation { @Id @GeneratedValue(strategy = GenerationType.AUTO) // @JsonIgnore // @JsonProperty(value="nutritionId") private int nutritionId; @Column private int calories; @Column private float cholesterolInMg; @Column private int sodiumInMg; @Column private float carbohydratesInGrams; @Column private float proteinInGrams; @OneToOne(mappedBy="nutritionInformation",fetch = FetchType.LAZY, cascade = CascadeType.ALL) private Recipe recipe; public NutritionInformation() { } @JsonIgnore @JsonProperty(value = "nutritionId") public int getNutritionId() { return nutritionId; } public void setNutritionId(int nutritionId) { this.nutritionId = nutritionId; } public int getCalories() { return calories; } public void setCalories(int calories) { this.calories = calories; } public float getCholesterolInMg() { return cholesterolInMg; } public void setCholesterolInMg(float cholesterolInMg) { this.cholesterolInMg = cholesterolInMg; } public int getSodiumInMg() { return sodiumInMg; } public void setSodiumInMg(int sodiumInMg) { this.sodiumInMg = sodiumInMg; } public float getCarbohydratesInGrams() { return carbohydratesInGrams; } public void setCarbohydratesInGrams(float carbohydratesInGrams) { this.carbohydratesInGrams = carbohydratesInGrams; } public float getProteinInGrams() { return proteinInGrams; } public void setProteinInGrams(float proteinInGrams) { this.proteinInGrams = proteinInGrams; } }
[ "joshi.vara@husky.neu.edu" ]
joshi.vara@husky.neu.edu
586353b9a96af588fc208896409b128cb55a33f8
08a95d58927c426e515d7f6d23631abe734105b4
/Project/bean/com/dimata/harisma/form/payroll/FrmProcenPresence.java
7ac413290bb228d76b93cc0acde48a43a949cc26
[]
no_license
Bagusnanda90/javaproject
878ce3d82f14d28b69b7ef20af675997c73b6fb6
1c8f105d4b76c2deba2e6b8269f9035c67c20d23
refs/heads/master
2020-03-23T15:15:38.449142
2018-07-21T00:31:47
2018-07-21T00:31:47
141,734,002
0
1
null
null
null
null
UTF-8
Java
false
false
2,374
java
/* * FrmTaxType.java * * Created on March 30, 2007, 6:01 PM */ package com.dimata.harisma.form.payroll; /* java package */ import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; /* qdep package */ import com.dimata.qdep.form.*; /* project package */ import com.dimata.harisma.entity.payroll.*; /** * * @author emerliana */ public class FrmProcenPresence extends FRMHandler implements I_FRMInterface, I_FRMType { private ProcenPresence procenPresence; public static final String FRM_PROCEN_PRESENCE = "FRM_PROCEN_PRESENCE" ; public static final int FRM_FIELD_PROCEN_PRESENCE_ID = 0 ; public static final int FRM_FIELD_PROCEN_PRESENCE = 1 ; public static final int FRM_FIELD_ABSENCE_DAY = 2 ; public static String[] fieldNames = { "FRM_FIELD_PROCEN_PRESENCE_ID", "FRM_FIELD_PROCEN_PRESENCE", "FRM_FIELD_ABSENCE_DAY" } ; public static int[] fieldTypes = { TYPE_LONG, TYPE_FLOAT + ENTRY_REQUIRED, TYPE_INT + ENTRY_REQUIRED } ; /** Creates a new instance of FrmTaxType */ public FrmProcenPresence() { } public FrmProcenPresence(ProcenPresence procenPresence){ this.procenPresence = procenPresence; } public FrmProcenPresence(HttpServletRequest request, ProcenPresence procenPresence){ super(new FrmProcenPresence(procenPresence), request); this.procenPresence = procenPresence; } public String[] getFieldNames() { return fieldNames; } public int getFieldSize() { return fieldNames.length; } public int[] getFieldTypes() { return fieldTypes; } public String getFormName() { return FRM_PROCEN_PRESENCE; } public ProcenPresence getEntityObject(){ return procenPresence; } public void requestEntityObject(ProcenPresence procenPresence) { try{ this.requestParam(); //employee.setPositionId(getLong(FRM_FIELD_POSITION_ID)); procenPresence.setProcenPresence(getDouble(FRM_FIELD_PROCEN_PRESENCE)); procenPresence.setAbsenceDay(getInt(FRM_FIELD_ABSENCE_DAY)); }catch(Exception e){ System.out.println("Error on requestEntityObject : "+e.toString()); } } }
[ "agungbagusnanda90@gmai.com" ]
agungbagusnanda90@gmai.com
87519816aa2ea7bdfcac5fd746c514b965f9550c
ef71494fef6618b48cfbcce2904dfd74b12a8948
/icloud-common/framework-spiderbrowser/src/main/java/org/lobobrowser/html/domimpl/HTMLScriptElementImpl.java
55837f86e9d8e6347af22ac441cc27309586c940
[]
no_license
djgrasss/icloud-2
128d8ba977afc1787f280c9b524d1704035476d7
796c0b53af2c05e82ef68f8c140a726e19a0e1ce
refs/heads/master
2021-01-21T23:58:10.983738
2014-09-03T01:41:55
2014-09-03T01:41:55
23,603,476
1
1
null
null
null
null
UTF-8
Java
false
false
5,950
java
/* GNU LESSER GENERAL PUBLIC LICENSE Copyright (C) 2006 The Lobo Project 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Contact info: xamjadmin@users.sourceforge.net */ /* * Created on Oct 8, 2005 */ package org.lobobrowser.html.domimpl; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.logging.Level; import java.util.logging.Logger; import org.lobobrowser.html.HttpRequest; import org.lobobrowser.html.UserAgentContext; import org.lobobrowser.html.js.Executor; import org.mozilla.javascript.Context; import org.mozilla.javascript.EcmaError; import org.mozilla.javascript.Scriptable; import org.w3c.dom.Document; import org.w3c.dom.UserDataHandler; import org.w3c.dom.html2.HTMLScriptElement; public class HTMLScriptElementImpl extends HTMLElementImpl implements HTMLScriptElement { private static final Logger logger = Logger.getLogger(HTMLScriptElementImpl.class.getName()); private static final boolean loggableInfo = logger.isLoggable(Level.INFO); public HTMLScriptElementImpl() { super("SCRIPT", true); } public HTMLScriptElementImpl(String name) { super(name, true); } private String text; public String getText() { String t = this.text; if(t == null) { return this.getRawInnerText(true); } else { return t; } } public void setText(String text) { this.text = text; } public String getHtmlFor() { return this.getAttribute("htmlFor"); } public void setHtmlFor(String htmlFor) { this.setAttribute("htmlFor", htmlFor); } public String getEvent() { return this.getAttribute("event"); } public void setEvent(String event) { this.setAttribute("event", event); } private boolean defer; public boolean getDefer() { return this.defer; } public void setDefer(boolean defer) { this.defer = defer; } public String getSrc() { return this.getAttribute("src"); } public void setSrc(String src) { this.setAttribute("src", src); } public String getType() { return this.getAttribute("type"); } public void setType(String type) { this.setAttribute("type", type); } public Object setUserData(String key, Object data, UserDataHandler handler) { if(org.lobobrowser.html.parser.HtmlParser.MODIFYING_KEY.equals(key) && data != Boolean.TRUE) { this.processScript(); } return super.setUserData(key, data, handler); } protected final void processScript() { UserAgentContext bcontext = this.getUserAgentContext(); if(bcontext == null) { throw new IllegalStateException("No user agent context."); } if(bcontext.isScriptingEnabled()) { String text; final String scriptURI; int baseLineNumber; String src = this.getSrc(); Document doc = this.document; if(!(doc instanceof HTMLDocumentImpl)) { throw new IllegalStateException("no valid document"); } boolean liflag = loggableInfo; if(src == null) { text = this.getText(); scriptURI = doc.getBaseURI(); baseLineNumber = 1; //TODO: Line number of inner text?? } else { this.informExternalScriptLoading(); java.net.URL scriptURL = ((HTMLDocumentImpl) doc).getFullURL(src); scriptURI = scriptURL == null ? src : scriptURL.toExternalForm(); long time1 = liflag ? System.currentTimeMillis() : 0; try { final HttpRequest request = bcontext.createHttpRequest(); // Perform a synchronous request SecurityManager sm = System.getSecurityManager(); if(sm == null) { request.open("GET", scriptURI, false); } else { AccessController.doPrivileged(new PrivilegedAction() { public Object run() { // Code might have restrictions on accessing // items from elsewhere. request.open("GET", scriptURI, false); return null; } }); } int status = request.getStatus(); if(status != 200 && status != 0) { this.warn("Script at [" + scriptURI + "] failed to load; HTTP status: " + status + "."); return; } text = request.getResponseText(); } finally { if(liflag) { long time2 = System.currentTimeMillis(); logger.info("processScript(): Loaded external Javascript from URI=[" + scriptURI + "] in " + (time2 - time1) + " ms."); } } baseLineNumber = 1; } Context ctx = Executor.createContext(this.getDocumentURL(), bcontext); try { Scriptable scope = (Scriptable) doc.getUserData(Executor.SCOPE_KEY); if(scope == null) { throw new IllegalStateException("Scriptable (scope) instance was expected to be keyed as UserData to document using " + Executor.SCOPE_KEY); } try { long time1 = liflag ? System.currentTimeMillis() : 0; ctx.evaluateString(scope, text, scriptURI, baseLineNumber, null); if(liflag) { long time2 = System.currentTimeMillis(); logger.info("addNotify(): Evaluated (or attempted to evaluate) Javascript in " + (time2 - time1) + " ms."); } } catch(EcmaError ecmaError) { this.warn("Javascript error at " + ecmaError.getSourceName() + ":" + ecmaError.getLineNumber() + ": " + ecmaError.getMessage()); } catch(Throwable err) { this.warn("Unable to evaluate Javascript code", err); } } finally { Context.exit(); } } } }
[ "jiangning.cui2@travelzen.com" ]
jiangning.cui2@travelzen.com
e6ee39c864805594b917b93c492be1807c0d189e
832a25d71428fcc97554ead3184c34c7668c13f6
/src/main/java/com/jeeplus/modules/report/ironfoinforexperiencereport/dao/IronfoinformationexperienceReportDao.java
ed3100ff5c74c4931210d1ea8f977ae4b8ab3571
[]
no_license
wxbing2015/jeeplusS
bb3b2bc7e475a7042c9a147952008ca93de59feb
faf39d547fad5fad9ff0e046fd9a657f2202a886
refs/heads/master
2020-07-19T11:44:35.847707
2018-05-02T11:59:39
2018-05-02T11:59:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
607
java
/** * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved. */ package com.jeeplus.modules.report.ironfoinforexperiencereport.dao; import com.jeeplus.common.persistence.CrudDao; import com.jeeplus.common.persistence.annotation.MyBatisDao; import com.jeeplus.modules.report.ironfoinforexperiencereport.entity.IronfoinformationexperienceReport; /** * 4.3信息化系统使用体验DAO接口 * @author anti_magina * @version 2018-04-20 */ @MyBatisDao public interface IronfoinformationexperienceReportDao extends CrudDao<IronfoinformationexperienceReport> { }
[ "anti_magina@yeah.net" ]
anti_magina@yeah.net
132ae51c5ddecdcbdcc23c1715f0b007fdcffbe5
350663f1140c8ab2e09ad4f5f97f89f38ff5e004
/src/lab05/DNAsim.java
a02c1fd538fc6016af63b1a06b1cd955079e1565
[]
no_license
mgavars/csci205
7b0a6a678dc5e8c2158b550e873ff263107746d8
1abc74731f58eb2f5d5668fe8d0a5439259433b5
refs/heads/master
2020-12-22T01:24:29.219653
2019-03-25T03:57:35
2019-03-25T03:57:35
236,628,197
0
0
null
null
null
null
UTF-8
Java
false
false
4,329
java
/* ***************************************** * CSCI205 - Software Engineering and Design * Spring 2019 * * Name: Mitch Gavars * Date: Jan 31, 2019 * Time: 6:59:03 PM * * Project: csci205 * Package: lab05 * File: DNAsim * Description: * * **************************************** */ package lab05; import static java.lang.Integer.parseInt; import java.util.Random; import java.util.Scanner; /** * A class to design arrays of DNA * * @author mag051 */ public class DNAsim { /** * Welcomes user and asks for input on the DNA arrays. */ public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("Hello. Welcome to the DNA Simulator"); System.out.print( "Enter length of a DNA Sequence to be simulated (integer): "); int length = parseInt(in.next()); System.out.print("Enter GC-content desired as a percent (without %): "); double gcContentPct = parseInt(in.next()); printDNAStats(generateDNA(length, gcContentPct)); printLongestRepeat(generateDNA(length, gcContentPct)); } /** * Generates an array of characters: G, C, A, or T * * @param length The desired length of the array * @param gcContentPct The requested percent of G's and C's to be in the * array */ public static char[] generateDNA(int length, double gcContentPct) { Random rand = new Random(); int x; double gBound = gcContentPct / 2; double cBound = gcContentPct; double aBound = gcContentPct + (100.0 - gcContentPct) / 2; char[] dna = new char[length]; for (int i = 0; i < length; i++) { x = rand.nextInt(100); if (x <= gBound) { dna[i] = 'G'; } else if (x > gBound && x <= cBound) { dna[i] = 'C'; } else if (x > cBound && x <= aBound) { dna[i] = 'A'; } else { dna[i] = 'T'; } } return dna; } /** * Prints the number of times each character is found in the array * * @param dna An array of G, C, A , or T characters */ public static void printDNAStats(char[] dna) { int totalCount = 0; int gCount = 0; int cCount = 0; int aCount = 0; int tCount = 0; for (int i = 0; i < dna.length; i++) { switch (dna[i]) { case 'G': gCount += 1; break; case 'C': cCount += 1; break; case 'A': aCount += 1; break; default: tCount += 1; break; } totalCount += 1; } double gPct = (double) gCount / totalCount; double aPct = (double) aCount / totalCount; double cPct = (double) cCount / totalCount; double tPct = (double) tCount / totalCount; System.out.printf("A: %d (%.2f)\n", aCount, aPct * 100.0); System.out.printf("C: %d (%.2f)\n", cCount, cPct * 100.0); System.out.printf("G: %d (%.2f)\n", gCount, gPct * 100.0); System.out.printf("T: %d (%.2f)\n", tCount, tPct * 100.0); } /** * Prints the index, character, and count of the longest repeat found in an * array of characters G, C, A, or T * * @param dna An array of G, C, A, and T characters */ public static void printLongestRepeat(char[] dna) { int longestRepeat = 0; int index = 0; int curCount; char longestChar = 'A'; for (int i = 0; i < dna.length; i++) { curCount = 1; for (int j = i + 1; j < dna.length; j++) { if (dna[i] != dna[j]) { break; } curCount += 1; } if (curCount > longestRepeat) { longestRepeat = curCount; index = i; longestChar = dna[i]; } } System.out.printf("Longest repeated nucleotide: %d %c's [index: %d]\n", longestRepeat, longestChar, index); } }
[ "mag051@bucknell.edu" ]
mag051@bucknell.edu
6136457d095e3375c580106011fd8df4211342e0
7549350d2b2c810077bca0f347b51fc8a710f40d
/1941720233/Jobsheet11/src/MainLinkedLists.java
3897fb1b9d592a31b191cde38b11fc1c385a1b6e
[]
no_license
nazariosafariesqi/AlgoritmaStrukturData
63b61ef53c85b494fd491f525fb0a66773e9514a
d87d68ab890aa3859d1d40c66029e47e82d9b926
refs/heads/master
2022-11-19T09:58:11.460934
2022-11-01T10:20:26
2022-11-01T10:20:26
240,147,351
1
0
null
2020-02-13T00:53:44
2020-02-13T00:53:43
null
UTF-8
Java
false
false
4,127
java
import java.util.Scanner; public class MainLinkedLists { public static void main(String[]args){ LinkedLists data = new LinkedLists(); Scanner Nazario = new Scanner(System.in); int pilih ; System.out.println("1.Tambah"); System.out.println("2.Hapus"); System.out.println("3.Cari"); System.out.println("4.Keluar"); System.out.println("Pilih Menu :"); pilih = Nazario.nextInt(); try { switch(pilih){ case 1 : System.out.println("------------------"); System.out.println("a.Tambah"); System.out.println("b.Tambah(index)"); System.out.println("c.Tambah(last)"); System.out.println("Pilih :"); String z = Nazario.next(); if(z.equalsIgnoreCase("a")){ System.out.println("Masukkan Angka Node Awal : "); int awal = Nazario.nextInt(); data.addFirst(awal); }else if(z.equalsIgnoreCase("b")){ System.out.println("Masukkan Angka Node : "); int tambah = Nazario.nextInt(); System.out.println("Masukkan Index : "); int index = Nazario.nextInt(); data.add(tambah,index); }else if(z.equalsIgnoreCase("c")){ System.out.println("Masukkan Angka Node Akhir : "); int akhir = Nazario.nextInt(); data.addLast(akhir); }else{ System.out.println("Input Yang Anda Masukkan Salah ! "); }break ; case 2 : System.out.println("------------------"); System.out.println("a.Hapus(index)"); System.out.println("b.Hapus(key)"); System.out.println("c.Clear"); System.out.println("Pilih : "); String x = Nazario.next(); if(x.equalsIgnoreCase("a")){ System.out.println("Masukkan Nilai Index Yang Dihapus : "); int hapus = Nazario.nextInt(); data.remove(hapus); }else if(x.equalsIgnoreCase("b")){ System.out.println("Masukkan Nilai Yang Dihapus : "); int hapusn = Nazario.nextInt(); data.removeByValue(hapusn); }else if(x.equalsIgnoreCase("c")){ System.out.println("Data Sudah Dikosongkan : "); data.clear(); }else{ System.out.println("Input Yang Anda Masukkan Salah ! "); }break ; case 3 : System.out.println("------------------"); System.out.println("a.Cari(index)"); System.out.println("b.Cari(key)"); System.out.println("Pilih : "); String y = Nazario.next(); if(y.equalsIgnoreCase("a")){ System.out.println("Masukkan Nilai Index Yang Dicari : "); int cari = Nazario.nextInt(); data.indexOf(cari); }else if(y.equalsIgnoreCase("b")){ System.out.println("Masukkan Nilai Yang Dicari : "); int cari2 = Nazario.nextInt(); data.indexOf(cari2); }else{ System.out.println("Input Yang Anda Masukkan Salah ! "); }break ; case 4 : System.exit(0); break; } }catch(Exception e){ // } } }
[ "nazariotyo@gmail.com" ]
nazariotyo@gmail.com
61d7fe5a564dd8eb147cc86aaacdce84f738fe51
962d83b5e90a336ab039ff62c381978880830bf4
/app/src/main/java/com/example/orderus/Employee.java
aab2faaf46476a371c57b717ca33c023ee64277c
[]
no_license
IT19216256DM/MAD_Evaluvation_01
70ef8d1fea2818469e18cdb6fd71e76f751528c3
9ae614bca003f76a538733d9dd2b8bb82301c2b3
refs/heads/master
2022-12-27T18:02:23.027778
2020-10-04T16:11:29
2020-10-04T16:11:29
287,940,461
0
0
null
null
null
null
UTF-8
Java
false
false
1,114
java
package com.example.orderus; public class Employee { private String txtId; private String txtName; private String txtAdd; private Integer txtNum; private String txtMail; private Integer txtOwn; public Employee() { } public String getTxtId() { return txtId; } public void setTxtId(String txtId) { this.txtId = txtId; } public String getTxtName() { return txtName; } public void setTxtName(String txtName) { this.txtName = txtName; } public String getTxtAdd() { return txtAdd; } public void setTxtAdd(String txtAdd) { this.txtAdd = txtAdd; } public Integer getTxtNum() { return txtNum; } public void setTxtNum(Integer txtNum) { this.txtNum = txtNum; } public String getTxtMail() { return txtMail; } public void setTxtMail(String txtMail) { this.txtMail = txtMail; } public Integer getTxtOwn() { return txtOwn; } public void setTxtOwn(Integer txtOwn) { this.txtOwn = txtOwn; } }
[ "dewmini970915@gmail.com" ]
dewmini970915@gmail.com
c5065d696a0fd5bb9f177e8f0b3bf931bdefd579
91c886b326b996deb8ca1826214e279ba7d08511
/tiaoShi/app/src/main/java/com/brandsh/tiaoshi/widget/FlexibleDividerDecoration.java
ec275a20ba1a4b29eab763d84390c22b8e73348f
[]
no_license
luckpoly/myProject
347c343f88e0a416c984e60901b33b76ac0f55c5
cd94d9168c14996f8f70bee6403310b6d458afda
refs/heads/master
2021-06-30T16:53:02.574958
2017-09-19T02:23:38
2017-09-19T02:23:38
101,276,985
1
0
null
null
null
null
UTF-8
Java
false
false
10,862
java
package com.brandsh.tiaoshi.widget; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.support.annotation.ColorRes; import android.support.annotation.DimenRes; import android.support.annotation.DrawableRes; import android.support.v4.view.ViewCompat; import android.support.v7.widget.RecyclerView; import android.view.View; /** * Created by yqritc on 2015/01/08. */ public abstract class FlexibleDividerDecoration extends RecyclerView.ItemDecoration { private static final int DEFAULT_SIZE = 2; private static final int[] ATTRS = new int[]{ android.R.attr.listDivider }; protected enum DividerType { DRAWABLE, PAINT, COLOR } protected DividerType mDividerType = DividerType.DRAWABLE; protected VisibilityProvider mVisibilityProvider; protected PaintProvider mPaintProvider; protected ColorProvider mColorProvider; protected DrawableProvider mDrawableProvider; protected SizeProvider mSizeProvider; protected boolean mShowLastDivider; private Paint mPaint; protected FlexibleDividerDecoration(Builder builder) { if (builder.mPaintProvider != null) { mDividerType = DividerType.PAINT; mPaintProvider = builder.mPaintProvider; } else if (builder.mColorProvider != null) { mDividerType = DividerType.COLOR; mColorProvider = builder.mColorProvider; mPaint = new Paint(); setSizeProvider(builder); } else { mDividerType = DividerType.DRAWABLE; if (builder.mDrawableProvider == null) { TypedArray a = builder.mContext.obtainStyledAttributes(ATTRS); final Drawable divider = a.getDrawable(0); a.recycle(); mDrawableProvider = new DrawableProvider() { @Override public Drawable drawableProvider(int position, RecyclerView parent) { return divider; } }; } else { mDrawableProvider = builder.mDrawableProvider; } mSizeProvider = builder.mSizeProvider; } mVisibilityProvider = builder.mVisibilityProvider; mShowLastDivider = builder.mShowLastDivider; } private void setSizeProvider(Builder builder) { mSizeProvider = builder.mSizeProvider; if (mSizeProvider == null) { mSizeProvider = new SizeProvider() { @Override public int dividerSize(int position, RecyclerView parent) { return DEFAULT_SIZE; } }; } } @Override public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) { int lastChildPosition = -1; int childCount = mShowLastDivider ? parent.getChildCount() : parent.getChildCount() - 1; for (int i = 0; i < childCount; i++) { View child = parent.getChildAt(i); int childPosition = parent.getChildPosition(child); if (childPosition < lastChildPosition) { // Avoid remaining divider when animation starts continue; } lastChildPosition = childPosition; if (ViewCompat.getAlpha(child) < 1) { // Avoid remaining divider when animation starts continue; } if (mVisibilityProvider.shouldHideDivider(childPosition, parent)) { continue; } Rect bounds = getDividerBound(childPosition, parent, child); switch (mDividerType) { case DRAWABLE: Drawable drawable = mDrawableProvider.drawableProvider(childPosition, parent); drawable.setBounds(bounds); drawable.draw(c); break; case PAINT: mPaint = mPaintProvider.dividerPaint(childPosition, parent); c.drawLine(bounds.left, bounds.top, bounds.right, bounds.bottom, mPaint); break; case COLOR: mPaint.setColor(mColorProvider.dividerColor(childPosition, parent)); mPaint.setStrokeWidth(mSizeProvider.dividerSize(childPosition, parent)); c.drawLine(bounds.left, bounds.top, bounds.right, bounds.bottom, mPaint); break; } } } @Override public void getItemOffsets(Rect rect, View v, RecyclerView parent, RecyclerView.State state) { int position = parent.getChildPosition(v); setItemOffsets(rect, position, parent); } protected abstract Rect getDividerBound(int position, RecyclerView parent, View child); protected abstract void setItemOffsets(Rect outRect, int position, RecyclerView parent); /** * Interface for controlling divider visibility */ public interface VisibilityProvider { /** * Returns true if divider should be hidden. * * @param position Divider position * @param parent RecyclerView * @return True if the divider at position should be hidden */ boolean shouldHideDivider(int position, RecyclerView parent); } /** * Interface for controlling paint instance for divider drawing */ public interface PaintProvider { /** * Returns {@link Paint} for divider * * @param position Divider position * @param parent RecyclerView * @return Paint instance */ Paint dividerPaint(int position, RecyclerView parent); } /** * Interface for controlling divider color */ public interface ColorProvider { /** * Returns {@link android.graphics.Color} value of divider * * @param position Divider position * @param parent RecyclerView * @return Color value */ int dividerColor(int position, RecyclerView parent); } /** * Interface for controlling drawable object for divider drawing */ public interface DrawableProvider { /** * Returns drawable instance for divider * * @param position Divider position * @param parent RecyclerView * @return Drawable instance */ Drawable drawableProvider(int position, RecyclerView parent); } /** * Interface for controlling divider size */ public interface SizeProvider { /** * Returns size value of divider. * Height for horizontal divider, width for vertical divider * * @param position Divider position * @param parent RecyclerView * @return Size of divider */ int dividerSize(int position, RecyclerView parent); } public static class Builder<T extends Builder> { private Context mContext; protected Resources mResources; private PaintProvider mPaintProvider; private ColorProvider mColorProvider; private DrawableProvider mDrawableProvider; private SizeProvider mSizeProvider; private VisibilityProvider mVisibilityProvider = new VisibilityProvider() { @Override public boolean shouldHideDivider(int position, RecyclerView parent) { return false; } }; private boolean mShowLastDivider = false; public Builder(Context context) { mContext = context; mResources = context.getResources(); } public T paint(final Paint paint) { return paintProvider(new PaintProvider() { @Override public Paint dividerPaint(int position, RecyclerView parent) { return paint; } }); } public T paintProvider(PaintProvider provider) { mPaintProvider = provider; return (T) this; } public T color(final int color) { return colorProvider(new ColorProvider() { @Override public int dividerColor(int position, RecyclerView parent) { return color; } }); } public T colorResId(@ColorRes int colorId) { return color(mResources.getColor(colorId)); } public T colorProvider(ColorProvider provider) { mColorProvider = provider; return (T) this; } public T drawable(@DrawableRes int id) { return drawable(mResources.getDrawable(id)); } public T drawable(final Drawable drawable) { return drawableProvider(new DrawableProvider() { @Override public Drawable drawableProvider(int position, RecyclerView parent) { return drawable; } }); } public T drawableProvider(DrawableProvider provider) { mDrawableProvider = provider; return (T) this; } public T size(final int size) { return sizeProvider(new SizeProvider() { @Override public int dividerSize(int position, RecyclerView parent) { return size; } }); } public T sizeResId(@DimenRes int sizeId) { return size(mResources.getDimensionPixelSize(sizeId)); } public T sizeProvider(SizeProvider provider) { mSizeProvider = provider; return (T) this; } public T visibilityProvider(VisibilityProvider provider) { mVisibilityProvider = provider; return (T) this; } public T showLastDivider() { mShowLastDivider = true; return (T) this; } protected void checkBuilderParams() { if (mPaintProvider != null) { if (mColorProvider != null) { throw new IllegalArgumentException( "Use setColor method of Paint class to specify line color. Do not provider ColorProvider if you set PaintProvider."); } if (mSizeProvider != null) { throw new IllegalArgumentException( "Use setStrokeWidth method of Paint class to specify line size. Do not provider SizeProvider if you set PaintProvider."); } } } } }
[ "zhaozengju@163.com" ]
zhaozengju@163.com
a11d5c99ee0063b406e3e5c819e13c5fca47b937
5305e28121da0ae7ec4b8ee3e44900f6e36b24b0
/api_src/main/java/com/sonicwall/api/Session.java
7239d78f71da6d2c32043369386aebbd22303e59
[ "Apache-2.0" ]
permissive
binaryzhang/Angular2_SpringBoot
59e70305b994a9f30feb51d56a91699590b4a9f0
51adb5892251b3fcc9e8e858cae811816ace7a9a
refs/heads/master
2021-01-12T06:55:52.922340
2016-12-09T19:37:42
2016-12-09T19:37:42
76,867,389
0
1
null
2016-12-19T14:07:40
2016-12-19T14:07:40
null
UTF-8
Java
false
false
758
java
package com.sonicwall.api; import io.swagger.annotations.*; import org.springframework.web.bind.annotation.*; import com.sonicwall.model.*; import com.sonicwall.model.security.SessionResponse; /* This is a dummy rest controller, for the purpose of documentation (/session) path is map to a filter */ @RestController @Api(tags = {"Authentication"}) public class Session { @ApiResponses(value = { @ApiResponse(code = 200, message = "Will return a security token, which must be passed in every request", response = SessionResponse.class) }) @RequestMapping(value = "/session", method = RequestMethod.POST) public SessionResponse newSession(@RequestBody LoginModel loginDetails) { SessionResponse r = new SessionResponse(); return r; } }
[ "mrin@Mrinmoys-MacBook-Pro.local" ]
mrin@Mrinmoys-MacBook-Pro.local