blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
sequencelengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
131 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
32 values
content
stringlengths
3
9.45M
authors
sequencelengths
1
1
author_id
stringlengths
0
313
9895da6251160afd7d25aa03d6ecc62dbda46818
16415fe96d23b61b0727505bc38bd1b015bd8684
/Finder/app/src/main/java/com/finra/pennapps/finder/activities/AdvisorActivity.java
2a177eef63b2ab0dcd9224bde68a556ba749430e
[]
no_license
JustinHoUMD/Fin-der
3d3bf727f38e025bab487238e8ec2cc0396c42e9
d0bcb2cdb64b0e4ef4f257db80b48c07105d742c
refs/heads/master
2016-09-06T00:59:14.067764
2015-09-06T13:07:10
2015-09-06T13:07:10
41,959,608
0
0
null
null
null
null
UTF-8
Java
false
false
6,689
java
package com.finra.pennapps.finder.activities; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.webkit.WebView; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; import com.finra.pennapps.finder.R; import com.parse.GetCallback; import com.parse.Parse; import com.parse.ParseException; import com.parse.ParseObject; import com.parse.ParseQuery; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; public class AdvisorActivity extends ActionBarActivity { public static final String TAG = "AdvisorActivity"; private ArrayList<ParseObject> advisors = new ArrayList<ParseObject>(); private ListView listview; private AdvisorAdapter adapter; private Activity activity = this; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_advisor); setTitle("Saved Advisors"); getAdvisors(); listview = (ListView) findViewById(R.id.advisorList); listview.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Log.d(TAG,"Clicked: "+position); ParseObject object = advisors.get(position); JSONObject info = object.getJSONObject("Info"); try { String url = info.getString("@link"); WebView myWebView = (WebView) findViewById(R.id.webview); myWebView.setVisibility(View.VISIBLE); myWebView.loadUrl(url); } catch (JSONException e) { e.printStackTrace(); } } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_advisor, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); return super.onOptionsItemSelected(item); } public void getAdvisors() { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); String uid = prefs.getString("uid", ""); if (!uid.isEmpty()) { ParseQuery<ParseObject> query = ParseQuery.getQuery("User"); query.getInBackground(uid, new GetCallback<ParseObject>() { public void done(ParseObject object, ParseException e) { if (e == null) { List<String> advisorIDs = object.getList("advisors"); for (String id:advisorIDs) { ParseQuery<ParseObject> query2 = ParseQuery.getQuery("FinraAdvisors"); query2.getInBackground(id, new GetCallback<ParseObject>() { @Override public void done(ParseObject parseObject, ParseException e) { advisors.add(parseObject); adapter = new AdvisorAdapter(activity, advisors); listview.setAdapter(adapter); adapter.notifyDataSetChanged(); Log.d(TAG, "Advisors: "+advisors.toString()); } }); } } else { // something went wrong } } }); } } private class AdvisorAdapter extends ArrayAdapter { private Context context; private ArrayList<ParseObject> advisors; public AdvisorAdapter(Context context, List<ParseObject> advisors) { super(context, R.layout.advisor_list_item, advisors); this.advisors = (ArrayList<ParseObject>) advisors; this.context = context; } public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); View rowView = inflater.inflate(R.layout.advisor_list_item, parent, false); ParseObject s = (ParseObject) advisors.get(position); TextView name = (TextView) rowView.findViewById(R.id.textView); TextView companyName2 = (TextView) rowView.findViewById(R.id.textView2); JSONObject info = s.getJSONObject("Info"); try { String firstname = info.getString("@firstNm"); String lastname = info.getString("@lastNm"); name.setText(capitalize(firstname + " " + lastname)); String companyName = ""; JSONObject currReg = s.getJSONObject("CrntEmps"); if (currReg != null) { JSONObject currReg2 = currReg.getJSONObject("CrntEmp"); if (currReg2 != null) { companyName = currReg2.getString("@orgNm"); } } companyName2.setText(capitalize(companyName)); } catch (JSONException e) { e.printStackTrace(); } return rowView; } public String capitalize(String s){ StringTokenizer tokenizer = new StringTokenizer(s); StringBuffer sb = new StringBuffer(); while (tokenizer.hasMoreTokens()) { String word = tokenizer.nextToken(); sb.append(word.substring(0, 1).toUpperCase()); sb.append(word.substring(1).toLowerCase()); sb.append(' '); } String text = sb.toString(); return text; } } }
cac9b580dd28900b694a886f9c811c6fe13777b8
619f7a8c98754b8379bf83ac43784a2633515839
/src/game/controllers/GameController.java
f217a2438ff8491de82ff30e26379274c5ebe426
[]
no_license
borowka/RocketGame
935aebecd9c9155b5d504d24a787aab50a1a7be7
ec4d5d6d34c74fe9a34c35f2fd995e4567b47c84
refs/heads/master
2020-04-15T11:07:10.323370
2019-01-19T13:00:22
2019-01-19T13:00:22
164,614,852
0
0
null
null
null
null
UTF-8
Java
false
false
4,148
java
package game.controllers; import game.Main; import game.MovementRunnable; import game.updater.LabelUpdater; import game.updater.MovementDataUpdater; import game.model.State; import game.model.RocketImage; import game.updater.ChartUpdater; import game.updater.RocketMovementUpdater; import javafx.animation.TranslateTransition; import javafx.application.Platform; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.chart.NumberAxis; import javafx.scene.chart.ScatterChart; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.Slider; import javafx.scene.image.ImageView; import javafx.scene.input.MouseEvent; import javafx.scene.layout.AnchorPane; import java.net.URL; import java.text.DecimalFormat; import java.util.ResourceBundle; public class GameController implements Initializable { MovementRunnable movementRunnable; MovementDataUpdater movementDataUpdater = new MovementDataUpdater(); TranslateTransition translateTransition = new TranslateTransition(); @FXML private ImageView winView; @FXML private ImageView failureView; @FXML private ImageView flameView; @FXML private Button btnMenu; @FXML private Button btnExit; @FXML private Button playGameButton; @FXML private AnchorPane spaceAnimationPane; @FXML private AnchorPane statisticsPane; @FXML private ImageView rocket; @FXML private Slider propulsivePower; @FXML private Label fuelBurningLabel; @FXML private Label propulsivePowerLabel; @FXML private Label velocityLabel; @FXML private Label heightLabel; @FXML private Label massLabel; @FXML private Label fuelLevelLabel; @FXML private ScatterChart<Number, Number> phaseChart; @FXML private NumberAxis vAxis; @FXML private NumberAxis hAxis; @FXML void clickExit(ActionEvent event) { Platform.exit(); } @FXML void clickMenu(ActionEvent event) { Main.setPane(1); movementRunnable.stop(); } @FXML void playGame(ActionEvent event) { phaseChart.getData().clear(); double fuelBurning = propulsivePower.getValue() * (-16.5) / 100; State state = movementDataUpdater.getMovementState(); movementRunnable = new MovementRunnable(propulsivePower, state, winView, failureView, flameView); ChartUpdater chartUpdater = new ChartUpdater(vAxis, hAxis, phaseChart); LabelUpdater labelUpdater = new LabelUpdater(heightLabel, velocityLabel, fuelLevelLabel, massLabel); translateTransition.setNode(rocket); RocketMovementUpdater rocketMovementUpdater = new RocketMovementUpdater(rocket); movementRunnable.addObserver(rocketMovementUpdater); movementRunnable.addObserver(labelUpdater); movementRunnable.addObserver(movementDataUpdater); movementRunnable.addObserver(chartUpdater); movementRunnable.start(); } @FXML void changePropulsivePower(MouseEvent event) { new Thread(() -> { Platform.runLater(() -> { propulsivePower.setDisable(true); System.out.println(propulsivePower.getValue()); }); try { Thread.sleep(1000); } catch (InterruptedException ex) { ex.printStackTrace(); } Platform.runLater(() -> propulsivePower.setDisable(false)); }).start(); DecimalFormat df = new DecimalFormat("###.###"); String propulsivePowerValue = df.format(Double.valueOf(propulsivePower.getValue())); propulsivePowerLabel.textProperty().set(propulsivePowerValue); String fuelBurning = df.format(Double.valueOf(propulsivePower.getValue() * (-16.5) / 100)); fuelBurningLabel.textProperty().set(fuelBurning); } @Override public void initialize(URL location, ResourceBundle resources) { RocketImage.INSTANCE.setImageView(rocket); rocket.setY(-178); rocket.setX(-10); } }
1c0d82aa62e826ab2ed5b373f39b6eb1c4943bbc
50ea7a7a5730f4e8691f42a3341434cc701612dc
/MyCategoryConfig.java
3b70e9b8146d96bf2c1a59f6641c05574a1152d6
[]
no_license
Dixitkolupula/E-commerce-Project
0e56c6a27cd06e1c2ffff58077dee793de9bd273
9d7cb29c58e6077e173c3d19a57ef4c1b388802d
refs/heads/main
2023-03-22T13:34:20.670498
2021-03-05T09:55:04
2021-03-05T09:55:04
344,761,563
0
0
null
null
null
null
UTF-8
Java
false
false
554
java
package com.ecomm.model; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration public class MyCategoryConfig { @Bean(name="category") public Category getBean() { System.out.println("======Bean method called==========="); Category category=new Category(); category.setCategoryId(1001); category.setCategoryName("Mobiles"); category.setCategoryDesc("4G Mobiles"); return category; } }
af16b467cbc20790c43ea7a8d5941f2f47df16a3
112936aaac70eee60128eb494075590f954ba16b
/src/main/java/uk/gov/hmcts/reform/em/orchestrator/service/dto/CcdBundleFolderDTO.java
4621e91454bcb5c367dfbd56f85b1f7887c761bc
[ "MIT" ]
permissive
jackmaloney/rpa-em-ccd-orchestrator
119df14ac73c6e41744d1894b6d2f20591678f9f
057d69a2c048bcb5bc56973b38df9927ac3d146e
refs/heads/master
2020-12-13T06:34:45.208281
2020-01-16T11:32:29
2020-01-16T11:32:29
234,336,855
0
0
MIT
2020-01-16T14:21:59
2020-01-16T14:21:58
null
UTF-8
Java
false
false
1,278
java
package uk.gov.hmcts.reform.em.orchestrator.service.dto; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import java.util.ArrayList; @JsonIgnoreProperties(ignoreUnknown = true) public class CcdBundleFolderDTO { private String name; private ArrayList<CcdValue<CcdBundleDocumentDTO>> documents = new ArrayList<>(); private ArrayList<CcdValue<CcdBundleFolderDTO>> folders = new ArrayList<>(); private int sortIndex; public String getName() { return name; } public void setName(String name) { this.name = name; } public ArrayList<CcdValue<CcdBundleDocumentDTO>> getDocuments() { return documents; } public void setDocuments(ArrayList<CcdValue<CcdBundleDocumentDTO>> documents) { this.documents = documents; } @JsonInclude(JsonInclude.Include.NON_EMPTY) public ArrayList<CcdValue<CcdBundleFolderDTO>> getFolders() { return folders; } public void setFolders(ArrayList<CcdValue<CcdBundleFolderDTO>> folders) { this.folders = folders; } public int getSortIndex() { return sortIndex; } public void setSortIndex(int sortIndex) { this.sortIndex = sortIndex; } }
468cb707b0e2ce0487fe929691cc1b4e15c55fa3
372476aefb16fe6b129ee99416cabdefe8ba1483
/src/main/java/com/lbt/designPattern/annotation/CourseInfoAnnotation.java
fd9cee7faa43fbb3aa256ef27a0261ddc94a037a
[]
no_license
lbt31/study-lbt
0224428ff4527187688f9b9a4a03bd8ef12b534c
b8e0a0c904a4994bd1cebed5c81f635bae43b3b0
refs/heads/master
2023-06-29T02:13:33.577221
2021-07-30T14:41:49
2021-07-30T14:41:49
311,097,011
0
0
null
null
null
null
UTF-8
Java
false
false
549
java
package com.lbt.designPattern.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface CourseInfoAnnotation { //课程名称 public String courseName(); //课程标签 public String courseTag(); //课程简介 public String courseProfile(); //课程序号 public int courseIndex() default 303; }
872f108c8b0a46f14861d908788cdf57445e20d3
0a2b48e598b6e048c5ece28d42a6f0d758897ad5
/src/edu/rice/cs/bioinfo/programs/phylonet/algos/MCMCsnapp/felsenstein/substitution/SubstitutionModel.java
bd11add7c772453468ad8cc61e9a04f061a1222e
[]
no_license
NakhlehLab/PhyloNet
385c6644a9659a037ab740ab9ababd4242ed5739
c642a7ab6dbad18681f3860a880fe8abd8d94017
refs/heads/master
2022-11-29T15:54:37.978375
2022-10-19T19:24:56
2022-10-19T19:24:56
364,690,719
11
1
null
2022-03-03T21:38:59
2021-05-05T19:54:36
Roff
UTF-8
Java
false
false
1,699
java
package edu.rice.cs.bioinfo.programs.phylonet.algos.MCMCsnapp.felsenstein.substitution; import edu.rice.cs.bioinfo.programs.phylonet.algos.MCMCsnapp.core.StateNode; /** * Created by wendingqiao on 5/3/16. * Specifies substitution model from which a transition probability matrix for a given distance can be obtained. */ public interface SubstitutionModel { /** * Gets the transition probability matrix where distance = (startTime - endTime) * rate. */ void getTransitionProbabilities(double startTime, double endTime, double rate, double[] matrix); /** * Gets matrix Q. */ double[][] getRateMatrix(); double[] getFrequencies(); int getStateCount(); /** * Gets the Eigen decomposition of matrix Q. */ EigenDecomposition getEigenDecomposition(); /** * returns whether substitution model can return complex diagonalizations. */ boolean canReturnComplexDiagonalization(); /** * basic implementation of substitution model */ abstract class Base extends StateNode implements SubstitutionModel { protected Frequencies _frequencies; protected int _nrOfStates; public Base(Frequencies freq) { _frequencies = freq; } @Override public double[] getFrequencies() { return _frequencies.getFreqs(); } @Override public int getStateCount() { return _nrOfStates; } @Override public double[][] getRateMatrix() { return null; } @Override public boolean canReturnComplexDiagonalization() { return false; } } }
fd7522aa47e02c97ff2d1a1b581eee45c7ec8bf4
d4f7f1462c25b2e07ee9c614673f043827368d42
/src/lesson002/homeTask02/task03/Car.java
49b9e92ccba467b55163e212dc9726f10c1d1905
[]
no_license
danta-m/java-essential
ed95319cb6290bd7786287cb0fb3499373c55a76
9728e5944bc8fd1a936a0d3de0831483c81efdf0
refs/heads/master
2023-06-27T22:23:27.994191
2021-07-22T19:50:08
2021-07-22T19:50:08
375,453,504
0
0
null
2021-06-14T20:08:00
2021-06-09T18:27:28
Java
UTF-8
Java
false
false
955
java
// // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) // package lesson002.homeTask02.task03; public class Car { int year; double speed; int weight; String color; public Car() { this.year = 2000; this.speed = 250.0D; this.weight = 1800; this.color = "white"; } public Car(int year) { this.year = year; this.speed = 200.0D; this.weight = 2000; this.color = "black"; } public Car(int year, double speed) { this(year); this.speed = 265.0D; this.weight = 1960; this.color = "grey"; } public Car(int year, double speed, int weight) { this(year, speed); this.weight = 1855; this.color = "navy"; } public Car(int year, double speed, int weight, String color) { this(year, speed, weight); this.color = "yellow"; } }
7b5cddb3be5aa9339d851600002e33d08a1c1ed2
2703ab60e058e02b95160c6acf6ece0ede7fd9e7
/src/main/java/com/xiaogch/wechat/common/service/TokenAndTicketService.java
89ed4199cd8fc9cc4205db1decce96997a4958ba
[]
no_license
xiaoguichang/learn_demo
83e090a89097d949f205d57cf3f564a1d6ab5e70
68157bf69b64cb5a4d20de534f277e97de3a90aa
refs/heads/master
2018-10-28T00:58:54.361161
2018-09-14T10:35:28
2018-09-14T10:35:28
121,190,863
2
1
null
null
null
null
UTF-8
Java
false
false
3,073
java
/** * ProjectName: jobrecommend-service <BR> * File name: TokenAndTicketService.java <BR> * Author: guich <BR> * Project: jobrecommend-service <BR> * Version: v 1.0 <BR> * Date: 2017/10/24 17:16 <BR> * Description: 微信accesstoken、ticket获取服务 <BR> * Function List: 1、获取微信accesstoken<BR> * 2、获取微信WxCardTicket<BR> * 3、获取微信JsapiTicket<BR> */ package com.xiaogch.wechat.common.service; public interface TokenAndTicketService { /*** * 功能描述:获取微信JsapiTicket * * @param appId 微信公众号、微信小程序appId * @param secret 微信公众号、微信小程序secret * * @return 成功返回JsapiTicket * * @author guich * @since 2017/10/24 * @update:[变更日期YYYY-MM-DD][更改人姓名][变更描述] */ String getJsapiTicket(String appId, String secret); /*** * 功能描述:获取微信WxCardTicket,用于微信卡包 * * @param appId 微信公众号、微信小程序appId * @param secret 微信公众号、微信小程序secret * * @return 成功返回WxCardTicket * * @author guich * @since 2017/10/24 * @update:[变更日期YYYY-MM-DD][更改人姓名][变更描述] */ String getWxCardTicket(String appId, String secret); /*** * 功能描述:获取微信accessToken * * @param appId 微信公众号、微信小程序appId * * @param secret 微信公众号、微信小程序secret * * @return 成功返回accessToken * * @author guich * @since 2017/10/24 * @update:[变更日期YYYY-MM-DD][更改人姓名][变更描述] */ String getAccessToken(String appId, String secret); /** * 功能描述:清理微信accessToken * @param appId 微信公众号、微信小程序appId * @return */ boolean clearAccessToken(String appId); /** * 功能描述:清理微信JsapiTicket * @param appId 微信公众号、微信小程序appId * @return */ boolean clearJsapiTicket(String appId); /** * 功能描述:清理微信WxCardTicket,用于微信卡包 * @param appId 微信公众号、微信小程序appId * @return */ boolean clearWxCardTicket(String appId); /** * 功能描述:更新微信accessToken * * @param appId 微信公众号、微信小程序appId * * @param secret 微信公众号、微信小程序secret * * @return 是否更新成功 * */ boolean updateAccessToken(String appId, String secret); /** * 功能描述:强制更新微信accessToken * * @param appId 微信公众号、微信小程序appId * * @param secret 微信公众号、微信小程序secret * * @return 是否更新成功 * */ boolean forceUpdateAccessToken(String appId, String secret); void compareAndUpdateAccessToken(String oldAccessToken, String appId, String secret); }
b14601ad824db53af91aa33446a7d5e32d4d81fe
1da03c8e8f941cdaeedff748f38eb3370cea5256
/src/perfil/business/Dica.java
71b10c72e7e3bf239e0739d7b461578828eed0a9
[]
no_license
alexqno/perfil
168f3341898a7b850913e1594bd1a97b68e81a89
267d7b37f9a1a5b05d6b9030f2561888ab2009cd
refs/heads/master
2020-04-25T16:14:20.015101
2019-07-26T19:53:57
2019-07-26T19:53:57
172,903,589
0
0
null
null
null
null
UTF-8
Java
false
false
1,138
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 perfil.business; import java.util.Objects; /** * * @author alexqno */ public class Dica { private String dica; public Dica(String dica) { this.dica = dica; } public String getDica() { return dica; } public void setDica(String dica) { this.dica = dica; } @Override public int hashCode() { int hash = 3; hash = 17 * hash + Objects.hashCode(this.dica); return hash; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Dica other = (Dica) obj; if (!Objects.equals(this.dica, other.dica)) { return false; } return true; } }
dbce3b1e7864779d7897115bdb12742873e0bfda
7ef695764750860d774bd68bbe503a5320afdf29
/src/webservice/TraceStolenParts.java
6983ba4b234e7093fcd5cc26cafe2741b246f5c1
[]
no_license
MirceaMelinte/sdj3ca
7abb0d82964a7e1948a24eebba927fb2eed9e911
b7b75942f5c21b6e569c465186dd0f4c4682618c
refs/heads/master
2020-03-11T18:16:34.270140
2018-05-13T20:00:04
2018-05-13T20:00:04
130,172,675
0
0
null
null
null
null
UTF-8
Java
false
false
16,531
java
/** * TraceStolenParts.java * * This file was auto-generated from WSDL * by the Apache Axis2 version: 1.7.7 Built on : Nov 20, 2017 (11:41:50 GMT) */ package webservice; /** * TraceStolenParts bean class */ @SuppressWarnings({"unchecked", "unused" }) public class TraceStolenParts implements org.apache.axis2.databinding.ADBBean { public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://webservice", "traceStolenParts", "ns1"); /** * field for Args0 */ protected java.lang.String localArgs0; /* This tracker boolean wil be used to detect whether the user called the set method * for this attribute. It will be used to determine whether to include this field * in the serialized XML */ protected boolean localArgs0Tracker = false; public boolean isArgs0Specified() { return localArgs0Tracker; } /** * Auto generated getter method * @return java.lang.String */ public java.lang.String getArgs0() { return localArgs0; } /** * Auto generated setter method * @param param Args0 */ public void setArgs0(java.lang.String param) { localArgs0Tracker = true; this.localArgs0 = param; } /** * * @param parentQName * @param factory * @return org.apache.axiom.om.OMElement */ public org.apache.axiom.om.OMElement getOMElement( final javax.xml.namespace.QName parentQName, final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException { return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource( this, MY_QNAME)); } public void serialize(final javax.xml.namespace.QName parentQName, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException { serialize(parentQName, xmlWriter, false); } public void serialize(final javax.xml.namespace.QName parentQName, javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType) throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException { java.lang.String prefix = null; java.lang.String namespace = null; prefix = parentQName.getPrefix(); namespace = parentQName.getNamespaceURI(); writeStartElement(prefix, namespace, parentQName.getLocalPart(), xmlWriter); if (serializeType) { java.lang.String namespacePrefix = registerPrefix(xmlWriter, "http://webservice"); if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)) { writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", namespacePrefix + ":traceStolenParts", xmlWriter); } else { writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", "traceStolenParts", xmlWriter); } } if (localArgs0Tracker) { namespace = "http://webservice"; writeStartElement(null, namespace, "args0", xmlWriter); if (localArgs0 == null) { // write the nil attribute writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "nil", "1", xmlWriter); } else { xmlWriter.writeCharacters(localArgs0); } xmlWriter.writeEndElement(); } xmlWriter.writeEndElement(); } private static java.lang.String generatePrefix(java.lang.String namespace) { if (namespace.equals("http://webservice")) { return "ns1"; } return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); } /** * Utility method to write an element start tag. */ private void writeStartElement(java.lang.String prefix, java.lang.String namespace, java.lang.String localPart, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String writerPrefix = xmlWriter.getPrefix(namespace); if (writerPrefix != null) { xmlWriter.writeStartElement(writerPrefix, localPart, namespace); } else { if (namespace.length() == 0) { prefix = ""; } else if (prefix == null) { prefix = generatePrefix(namespace); } xmlWriter.writeStartElement(prefix, localPart, namespace); xmlWriter.writeNamespace(prefix, namespace); xmlWriter.setPrefix(prefix, namespace); } } /** * Util method to write an attribute with the ns prefix */ private void writeAttribute(java.lang.String prefix, java.lang.String namespace, java.lang.String attName, java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String writerPrefix = xmlWriter.getPrefix(namespace); if (writerPrefix != null) { xmlWriter.writeAttribute(writerPrefix, namespace, attName, attValue); } else { xmlWriter.writeNamespace(prefix, namespace); xmlWriter.setPrefix(prefix, namespace); xmlWriter.writeAttribute(prefix, namespace, attName, attValue); } } /** * Util method to write an attribute without the ns prefix */ private void writeAttribute(java.lang.String namespace, java.lang.String attName, java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { if (namespace.equals("")) { xmlWriter.writeAttribute(attName, attValue); } else { xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace), namespace, attName, attValue); } } /** * Util method to write an attribute without the ns prefix */ private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName, javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String attributeNamespace = qname.getNamespaceURI(); java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace); if (attributePrefix == null) { attributePrefix = registerPrefix(xmlWriter, attributeNamespace); } java.lang.String attributeValue; if (attributePrefix.trim().length() > 0) { attributeValue = attributePrefix + ":" + qname.getLocalPart(); } else { attributeValue = qname.getLocalPart(); } if (namespace.equals("")) { xmlWriter.writeAttribute(attName, attributeValue); } else { registerPrefix(xmlWriter, namespace); xmlWriter.writeAttribute(attributePrefix, namespace, attName, attributeValue); } } /** * method to handle Qnames */ private void writeQName(javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String namespaceURI = qname.getNamespaceURI(); if (namespaceURI != null) { java.lang.String prefix = xmlWriter.getPrefix(namespaceURI); if (prefix == null) { prefix = generatePrefix(namespaceURI); xmlWriter.writeNamespace(prefix, namespaceURI); xmlWriter.setPrefix(prefix, namespaceURI); } if (prefix.trim().length() > 0) { xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString( qname)); } else { // i.e this is the default namespace xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString( qname)); } } else { xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString( qname)); } } private void writeQNames(javax.xml.namespace.QName[] qnames, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { if (qnames != null) { // we have to store this data until last moment since it is not possible to write any // namespace data after writing the charactor data java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer(); java.lang.String namespaceURI = null; java.lang.String prefix = null; for (int i = 0; i < qnames.length; i++) { if (i > 0) { stringToWrite.append(" "); } namespaceURI = qnames[i].getNamespaceURI(); if (namespaceURI != null) { prefix = xmlWriter.getPrefix(namespaceURI); if ((prefix == null) || (prefix.length() == 0)) { prefix = generatePrefix(namespaceURI); xmlWriter.writeNamespace(prefix, namespaceURI); xmlWriter.setPrefix(prefix, namespaceURI); } if (prefix.trim().length() > 0) { stringToWrite.append(prefix).append(":") .append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString( qnames[i])); } else { stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString( qnames[i])); } } else { stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString( qnames[i])); } } xmlWriter.writeCharacters(stringToWrite.toString()); } } /** * Register a namespace prefix */ private java.lang.String registerPrefix( javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException { java.lang.String prefix = xmlWriter.getPrefix(namespace); if (prefix == null) { prefix = generatePrefix(namespace); javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext(); while (true) { java.lang.String uri = nsContext.getNamespaceURI(prefix); if ((uri == null) || (uri.length() == 0)) { break; } prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); } xmlWriter.writeNamespace(prefix, namespace); xmlWriter.setPrefix(prefix, namespace); } return prefix; } /** * Factory class that keeps the parse method */ public static class Factory { private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class); /** * static method to create the object * Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable * If this object is not an element, it is a complex type and the reader is at the event just after the outer start element * Postcondition: If this object is an element, the reader is positioned at its end element * If this object is a complex type, the reader is positioned at the end element of its outer element */ public static TraceStolenParts parse( javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception { TraceStolenParts object = new TraceStolenParts(); int event; javax.xml.namespace.QName currentQName = null; java.lang.String nillableValue = null; java.lang.String prefix = ""; java.lang.String namespaceuri = ""; try { while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); currentQName = reader.getName(); if (reader.getAttributeValue( "http://www.w3.org/2001/XMLSchema-instance", "type") != null) { java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type"); if (fullTypeName != null) { java.lang.String nsPrefix = null; if (fullTypeName.indexOf(":") > -1) { nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(":")); } nsPrefix = (nsPrefix == null) ? "" : nsPrefix; java.lang.String type = fullTypeName.substring(fullTypeName.indexOf( ":") + 1); if (!"traceStolenParts".equals(type)) { //find namespace for the prefix java.lang.String nsUri = reader.getNamespaceContext() .getNamespaceURI(nsPrefix); return (TraceStolenParts) webservice.ExtensionMapper.getTypeObject(nsUri, type, reader); } } } // Note all attributes that were handled. Used to differ normal attributes // from anyAttributes. java.util.Vector handledAttributes = new java.util.Vector(); reader.next(); while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement() && new javax.xml.namespace.QName("http://webservice", "args0").equals(reader.getName())) { nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "nil"); if (!"true".equals(nillableValue) && !"1".equals(nillableValue)) { java.lang.String content = reader.getElementText(); object.setArgs0(org.apache.axis2.databinding.utils.ConverterUtil.convertToString( content)); } else { reader.getElementText(); // throw away text nodes if any. } reader.next(); } // End of if for expected property start element else { } while (!reader.isStartElement() && !reader.isEndElement()) reader.next(); if (reader.isStartElement()) { // 2 - A start element we are not expecting indicates a trailing invalid property throw new org.apache.axis2.databinding.ADBException( "Unexpected subelement " + reader.getName()); } } catch (javax.xml.stream.XMLStreamException e) { throw new java.lang.Exception(e); } return object; } } //end of factory class }
f41f43506fa5ecb70f01a1b0cc3f3f9054b29787
44a82478ae5391b2244b28117f83b9793fe11b68
/test/main/java/arclightes/log3r/TestLog3rUtilsPerformance.java
faceeb2a450950e1638ef742f915d30d488a909c
[ "Apache-2.0" ]
permissive
abissell/log3r
1128deddddc73d5dc55d9e49588fecb0b936abbf
5309fcbc2fd9b2fc15372ca03d5445594669f811
refs/heads/master
2020-06-03T23:23:31.047211
2013-04-12T11:34:34
2013-04-12T11:34:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,410
java
package main.java.arclightes.log3r; import com.carrotsearch.junitbenchmarks.AbstractBenchmark; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import java.text.ParseException; import java.util.Random; public class TestLog3rUtilsPerformance extends AbstractBenchmark { private static final int TESTS_PER_ITER = 5000; private static final int DECIMAL_TESTS_PER_ITER = 500; private static final int NUM_ITER = 1000; private static final Random RANDOM_LONG = new Random(System.currentTimeMillis()); private static final int RANDOM_SIZE = Math.max(TESTS_PER_ITER, DECIMAL_TESTS_PER_ITER); private static final char[] RANDOM_CHARS = new char[TESTS_PER_ITER]; private static final int[] RANDOM_INTS = new int[TESTS_PER_ITER]; private static final int[] RANDOM_INTS_2 = new int[TESTS_PER_ITER]; private static final double[] RANDOM_DOUBLES = new double[TESTS_PER_ITER]; private static int RESULT_1 = 0; private static int RESULT_2 = 0; private static int RESULT_3 = 0; public TestLog3rUtilsPerformance() { } @BeforeClass public static void setup() { fillRandomChars(); fillRandomInts(); fillRandomDoubles(); System.out.println("starting tests"); } private static void fillRandomChars() { for (int i = 0; i < RANDOM_SIZE; i++) { int randomInt = getRandomInt(10); final String asString = Integer.toString(randomInt); final char c = asString.charAt(0); RANDOM_CHARS[i] = c; } } private static void fillRandomInts() { for (int i = 0; i < RANDOM_SIZE; i++) { RANDOM_INTS[i] = getRandomInt(14); RANDOM_INTS_2[i] = getRandomInt(10); } } private static void fillRandomDoubles() { for (int i = 0; i < RANDOM_SIZE; i++) { final long randomLong = RANDOM_LONG.nextLong(); RANDOM_DOUBLES[i] = Double.longBitsToDouble(randomLong); } } private static int getRandomInt(final int n) { int random = TestUtils.randomInt(n); if (random == n) return 0; else return random; } // @Test public void testCharIntConversion() { for (int i = 0; i < NUM_ITER; i++) { for (int j = 0; j < TESTS_PER_ITER; j++) { final int convertedInt = RANDOM_CHARS[j] - '0'; RESULT_1 += convertedInt; } } } // @Test public void testSwitchingCharIntConversion() { for (int i = 0; i < NUM_ITER; i++) { for (int j = 0; j < TESTS_PER_ITER; j++) { final int convertedInt = getIntSwitch(RANDOM_CHARS[j]); RESULT_1 += convertedInt; } } } private static int getIntSwitch(char i) { switch (i) { case '1': return 1; case '2': return 2; case '3': return 3; case '4': return 4; case '5': return 5; case '6': return 6; case '7': return 7; case '8': return 8; case '9': return 9; default: return 0; } } // @Test public void testDecimalPlaceCalcFloorRange() { for (int i = 0; i < NUM_ITER; i++) { for (int j = 0; j < TESTS_PER_ITER; j++) { int decimalPlace = 0; double tmp = RANDOM_DOUBLES[j]; while (Math.abs(Math.floor(tmp) - tmp) > 0.0000000001) { decimalPlace++; tmp *= 10; } RESULT_1 += decimalPlace; } } } private static char getCharSwitch(int i) { switch (i) { case 1: return '1'; case 2: return '2'; case 3: return '3'; case 4: return '4'; case 5: return '5'; case 6: return '6'; case 7: return '7'; case 8: return '8'; case 9: return '9'; default: return '0'; } } @Test public void testVeryLongSwitchingRaiseToPowersOfTen() { try { for (int i = 0; i < NUM_ITER; i++) { for (int j = 0; j < TESTS_PER_ITER; j++) { final double d = RANDOM_DOUBLES[j]; final double raised = veryLongRaiseToPowerOfTen(d, RANDOM_INTS[j]); final long cast = (long) raised; RESULT_3 += cast; } } } catch (Exception e) { System.out.println(e.getMessage()); } } private static double veryLongRaiseToPowerOfTen(double val, int power) throws ParseException { switch (power) { case 0: return val; case 1: return val*10; case 2: return val*100; case 3: return val*1000; case 4: return val*10000; case 5: return val*100000; case 6: return val*1000000; case 7: return val*10000000; case 8: return val*100000000; case 9: return val*1000000000; case 10: return val*10000000000L; case 11: return val*100000000000L; case 12: return val*1000000000000L; case 13: return val*10000000000000L; case 14: return val*100000000000000L; case 15: return val*1000000000000000L; case 16: return val*10000000000000000L; case 17: return val*100000000000000000L; case 18: return val*1000000000000000000L; default: throw new ParseException("Unhandled power of ten: " + power, 0); } } @Test public void testSwitchingRaiseToPowersOfTen() { try { for (int i = 0; i < NUM_ITER; i++) { for (int j = 0; j < TESTS_PER_ITER; j++) { final double d = RANDOM_DOUBLES[j]; final double raised = Log3rUtil.raiseToPowerOfTen(d, RANDOM_INTS[j]); final long cast = (long) raised; RESULT_1 += cast; } } } catch (Exception e) { System.out.println(e.getMessage()); } } // @Test public void testCompactSwitchingRaiseToPowersOfTen() { try { for (int i = 0; i < NUM_ITER; i++) { for (int j = 0; j < TESTS_PER_ITER; j++) { final double d = RANDOM_DOUBLES[j]; final double raised = raiseToPowerOfTenCompact(d, RANDOM_INTS[j]); final long cast = (long) raised; RESULT_2 += cast; } } } catch (Exception e) { System.out.println(e.getMessage()); } } private static double raiseToPowerOfTenCompact(double val, int power) throws ParseException { switch (power) { case 0: return val; case 1: return val*10; case 2: return val*100; case 3: return val*1000; case 4: return val*10000; case 5: return val*100000; case 6: return val*1000000; case 7: return val*10000000; case 8: return val*100000000; case 9: return val*1000000000; default: throw new ParseException("Unhandled power of ten: " + power, 0); } } @AfterClass public static void printResultToPreventOptimization() { System.out.println("tests finished, RESULT_1=" + RESULT_1 + ", RESULT_2=" + RESULT_2 + ", RESULT_3=" + RESULT_3); } }
36a1e6e2404df1437d3f7d18d10228c93bf5f449
10eec5ba9e6dc59478cdc0d7522ff7fc6c94cd94
/maind/src/main/java/com/vvt/capture/telegram/internal/TLRPC$PeerNotifyEvents.java
7c031d8693eda97d833af9e46508720b76524cf0
[]
no_license
EchoAGI/Flexispy.re
a2f5fec409db083ee3fe0d664dc2cca7f9a4f234
ba65a5b8b033b92c5867759f2727c5141b7e92fc
refs/heads/master
2023-04-26T02:52:18.732433
2018-07-16T07:46:56
2018-07-16T07:46:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,475
java
package com.vvt.capture.telegram.internal; public class TLRPC$PeerNotifyEvents extends TLObject { public static PeerNotifyEvents TLdeserialize(AbstractSerializedData paramAbstractSerializedData, int paramInt, boolean paramBoolean) { Object localObject = null; switch (paramInt) { } while ((localObject == null) && (paramBoolean)) { localObject = new java/lang/RuntimeException; Object[] arrayOfObject = new Object[1]; Integer localInteger = Integer.valueOf(paramInt); arrayOfObject[0] = localInteger; String str = String.format("can't parse magic %x in PeerNotifyEvents", arrayOfObject); ((RuntimeException)localObject).<init>(str); throw ((Throwable)localObject); localObject = new com/vvt/capture/telegram/internal/TLRPC$TL_peerNotifyEventsEmpty; ((TLRPC.TL_peerNotifyEventsEmpty)localObject).<init>(); continue; localObject = new com/vvt/capture/telegram/internal/TLRPC$TL_peerNotifyEventsAll; ((TLRPC.TL_peerNotifyEventsAll)localObject).<init>(); } if (localObject != null) { ((PeerNotifyEvents)localObject).readParams(paramAbstractSerializedData, paramBoolean); } return (PeerNotifyEvents)localObject; } } /* Location: /Volumes/D1/codebase/android/POC/assets/product/maind/classes-enjarify.jar!/com/vvt/capture/telegram/internal/TLRPC$PeerNotifyEvents.class * Java compiler version: 5 (49.0) * JD-Core Version: 0.7.1 */
041f1c37819096b06141823c8507c9d5adc85072
d159e61b1c09db150ac0485cf9b1fe205bfbf030
/SimpleDatacenter/src/com/good/plat/datacenter/datastat/mapper/players/DeviceMapper.java
4f2fb9e425234b18fe512a412b0a6a3ad1f0811e
[]
no_license
Dhcy/Simpledatacenter
c4654f682bf4cba44cacfd4123f0e0ca9233605c
579c10f4883e700e687e8e1a47058b0e5a0375cf
refs/heads/master
2020-03-27T04:47:31.411272
2018-08-28T06:12:05
2018-08-28T06:12:05
145,968,636
0
0
null
null
null
null
UTF-8
Java
false
false
949
java
package com.good.plat.datacenter.datastat.mapper.players; import java.util.List; import com.good.plat.datacenter.common.base.BaseSearchData; import com.good.plat.datacenter.datastat.entity.players.Device; import com.good.plat.datacenter.datastat.entity.players.PlayersChurn; /** * * @ClassName: DeviceMapper * @Description: TODO * @author moxw * @date 2016年4月27日 上午11:02:55 */ public interface DeviceMapper { /** * * @Title: selectPlayerMachineModel * @Description: TODO * @param searchData * @return * List<Device> * @author moxw * @date 2016年4月27日 上午11:02:19 */ List<Device> selectPlayerMachineModel (BaseSearchData searchData); /** * * @Title: selectPlayerOperationSystem * @Description: TODO * @param searchData * @return * List<Device> * @author moxw * @date 2016年4月27日 上午11:02:48 */ List<Device> selectPlayerOperationSystem (BaseSearchData searchData); }
d80ffc264e90174d9684afb6a99d2fd0d414516e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_bdd3eb42e72625535ef845589801497033abff9c/AllTests/14_bdd3eb42e72625535ef845589801497033abff9c_AllTests_s.java
e33e65d2a9132e0520b441139522b164f3db64d2
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,388
java
/** * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.inject; import com.google.inject.internal.FinalizableReferenceQueueTest; import com.google.inject.internal.ImmutableSet; import com.google.inject.internal.Jsr166HashMapTest; import com.google.inject.internal.LineNumbersTest; import com.google.inject.internal.MapMakerTestSuite; import com.google.inject.internal.ProxyFactoryTest; import com.google.inject.internal.UniqueAnnotationsTest; import com.google.inject.matcher.MatcherTest; import com.google.inject.name.NamesTest; import com.google.inject.spi.BindingTargetVisitorTest; import com.google.inject.spi.ElementApplyToTest; import com.google.inject.spi.ElementsTest; import com.google.inject.spi.HasDependenciesTest; import com.google.inject.spi.InjectionPointTest; import com.google.inject.spi.ModuleRewriterTest; import com.google.inject.spi.ProviderMethodsTest; import com.google.inject.spi.SpiBindingsTest; import com.google.inject.util.NoopOverrideTest; import com.google.inject.util.ProvidersTest; import com.google.inject.util.TypesTest; import com.googlecode.guice.BytecodeGenTest; import com.googlecode.guice.Jsr330Test; import com.googlecode.guice.GuiceTck; import java.util.Enumeration; import java.util.Set; import junit.framework.Test; import junit.framework.TestSuite; /** * @author [email protected] (Bob Lee) */ public class AllTests { private static final Set<String> SUPPRESSED_TEST_NAMES = ImmutableSet.of( "testUnscopedProviderWorksOutsideOfRequestedScope(" + ScopesTest.class.getName() + ")", "testCannotConvertUnannotatedBindings(" + TypeConversionTest.class.getName() + ")" ); public static Test suite() { TestSuite suite = new TestSuite(); suite.addTest(GuiceTck.suite()); suite.addTestSuite(BinderTest.class); suite.addTest(BinderTestSuite.suite()); suite.addTestSuite(BindingAnnotationTest.class); suite.addTestSuite(BindingOrderTest.class); suite.addTestSuite(BindingTest.class); suite.addTestSuite(BoundInstanceInjectionTest.class); suite.addTestSuite(BoundProviderTest.class); suite.addTestSuite(CircularDependencyTest.class); // ErrorHandlingTest.class is not a testcase suite.addTestSuite(EagerSingletonTest.class); suite.addTestSuite(GenericInjectionTest.class); suite.addTestSuite(ImplicitBindingTest.class); suite.addTestSuite(TypeListenerTest.class); suite.addTestSuite(InjectorTest.class); // IntegrationTest is AOP-only suite.addTestSuite(KeyTest.class); suite.addTestSuite(LoggerInjectionTest.class); // MethodInterceptionTest is AOP-only suite.addTestSuite(MembersInjectorTest.class); suite.addTestSuite(ModulesTest.class); suite.addTestSuite(ModuleTest.class); suite.addTestSuite(NullableInjectionPointTest.class); suite.addTestSuite(OptionalBindingTest.class); suite.addTestSuite(OverrideModuleTest.class); suite.addTestSuite(ParentInjectorTest.class); suite.addTestSuite(PrivateModuleTest.class); suite.addTestSuite(ProviderInjectionTest.class); suite.addTestSuite(ProvisionExceptionTest.class); // ProxyFactoryTest is AOP-only suite.addTestSuite(ReflectionTest.class); suite.addTestSuite(RequestInjectionTest.class); suite.addTestSuite(ScopesTest.class); suite.addTestSuite(SerializationTest.class); suite.addTestSuite(SuperclassTest.class); suite.addTestSuite(TypeConversionTest.class); suite.addTestSuite(TypeLiteralInjectionTest.class); suite.addTestSuite(TypeLiteralTest.class); suite.addTestSuite(TypeLiteralTypeResolutionTest.class); // internal suite.addTestSuite(FinalizableReferenceQueueTest.class); suite.addTestSuite(Jsr166HashMapTest.class); suite.addTestSuite(LineNumbersTest.class); suite.addTest(MapMakerTestSuite.suite()); suite.addTestSuite(UniqueAnnotationsTest.class); // matcher suite.addTestSuite(MatcherTest.class); // names suite.addTestSuite(NamesTest.class); // spi suite.addTestSuite(BindingTargetVisitorTest.class); suite.addTestSuite(ElementsTest.class); suite.addTestSuite(ElementApplyToTest.class); suite.addTestSuite(HasDependenciesTest.class); suite.addTestSuite(InjectionPointTest.class); suite.addTestSuite(ModuleRewriterTest.class); suite.addTestSuite(ProviderMethodsTest.class); suite.addTestSuite(SpiBindingsTest.class); // tools // suite.addTestSuite(JmxTest.class); not a testcase // util suite.addTestSuite(NoopOverrideTest.class); suite.addTestSuite(ProvidersTest.class); suite.addTestSuite(TypesTest.class); /*if[AOP]*/ suite.addTestSuite(ProxyFactoryTest.class); suite.addTestSuite(IntegrationTest.class); suite.addTestSuite(MethodInterceptionTest.class); suite.addTestSuite(com.googlecode.guice.BytecodeGenTest.class); suite.addTest(com.googlecode.guice.StrictContainerTestSuite.suite()); /*end[AOP]*/ // googlecode.guice suite.addTestSuite(BytecodeGenTest.class); suite.addTestSuite(Jsr330Test.class); return removeSuppressedTests(suite, SUPPRESSED_TEST_NAMES); } public static TestSuite removeSuppressedTests(TestSuite suite, Set<String> suppressedTestNames) { TestSuite result = new TestSuite(suite.getName()); for(Enumeration e = suite.tests(); e.hasMoreElements(); ) { Test test = (Test) e.nextElement(); if (suppressedTestNames.contains(test.toString())) { continue; } if (test instanceof TestSuite) { result.addTest(removeSuppressedTests((TestSuite) test, suppressedTestNames)); } else { result.addTest(test); } } return result; } }
95d47e0b182a26b2de0e45fe2cb5796fe01212a8
43f1c777fdc18731bf7001635e86cfabc0ba3719
/src/test/java/com/tourist/platform/media/MediaApplicationTests.java
e230f6cd9bec5f35a37e6524ffc7a0d6a886b8df
[]
no_license
JKashperuk/media
83f933220cbe914cd4aa333b0c09ad1d16859cff
c8c701f1817b6b5e84ec2f1b9500e26ec5f02af5
refs/heads/master
2021-08-28T13:40:46.081769
2017-12-07T12:54:31
2017-12-07T12:54:31
113,296,861
0
2
null
null
null
null
UTF-8
Java
false
false
342
java
package com.tourist.platform.media; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class MediaApplicationTests { @Test public void contextLoads() { } }
7a3145a4f6017aa1d635d9d5b998e31749f54b0e
b3ea51607ebec665ff21b1b4afd08f40d72056f7
/src/test/java/unit/org/craftedsw/tww/trips/TripTest.java
409ebe0e76735788bb1140e802730969778aaac0
[]
no_license
sandromancuso/tww-java
fe2d1077a28b050877eb722e1279d6a11a4bb530
889f98a7cbc2d75bd650c9983a775ca25a30b737
refs/heads/master
2020-05-15T06:03:22.556821
2012-05-12T02:05:56
2012-05-12T02:05:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
339
java
package unit.org.craftedsw.tww.trips; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; import org.craftedsw.tww.trips.Trip; import org.junit.Test; public class TripTest { @Test public void shoudl_have_a_name() { Trip trip = new Trip("Europe"); assertThat(trip.getName(), is("Europe")); } }
f2f931ed5bcb2b3e1bfe570a92152facc11420ed
14755b80b5860af4d46c16b851e84ccf9d12506e
/java/joa/src-gen/com/wilutions/mslib/outlook/OlGender.java
a7646c1387ac1819086b6fe0173de561b31215ca
[ "MIT" ]
permissive
wolfgangimig/joa
cdabaf1386dcc40c53a0279659666e7a83af3d89
a74bbab92eab2e3a7e525728ed318537c2b6a42a
refs/heads/master
2022-04-30T09:24:25.177264
2022-04-24T09:03:42
2022-04-24T09:03:42
26,138,099
12
14
null
null
null
null
UTF-8
Java
false
false
1,707
java
/* ** GENEREATED FILE - DO NOT MODIFY ** */ package com.wilutions.mslib.outlook; import com.wilutions.com.*; /** * OlGender. * */ @SuppressWarnings("all") @CoInterface(guid="{00000000-0000-0000-0000-000000000000}") public class OlGender implements ComEnum { static boolean __typelib__loaded = __TypeLib.load(); // Typed constants public final static OlGender olUnspecified = new OlGender(0); public final static OlGender olFemale = new OlGender(1); public final static OlGender olMale = new OlGender(2); // Integer constants for bitsets and switch statements public final static int _olUnspecified = 0; public final static int _olFemale = 1; public final static int _olMale = 2; // Value, readonly field. public final int value; // Private constructor, use valueOf to create an instance. private OlGender(int value) { this.value = value; } // Return one of the predefined typed constants for the given value or create a new object. public static OlGender valueOf(int value) { switch(value) { case 0: return olUnspecified; case 1: return olFemale; case 2: return olMale; default: return new OlGender(value); } } public String toString() { switch(value) { case 0: return "olUnspecified"; case 1: return "olFemale"; case 2: return "olMale"; default: { StringBuilder sbuf = new StringBuilder(); sbuf.append("[").append(value).append("="); if ((value & 0) != 0) sbuf.append("|olUnspecified"); if ((value & 1) != 0) sbuf.append("|olFemale"); if ((value & 2) != 0) sbuf.append("|olMale"); return sbuf.toString(); } } } }
6c4f83ad8662da4350d1f36c4e45683e87c1c310
981419e4b53082423193e9591fc1bc2829eb9eac
/DogPalsForum/src/main/java/com/dogpals/forum/domain/package-info.java
793214b738d6bad666d2a98e9c9b5fed438373a0
[]
no_license
bharatkareti95/Team19_DogPals
19d94ea521df67a263c05090e6e750902b6f6889
ee754d6ae9dbdbafe0ed05e4f056d68f43274a02
refs/heads/main
2023-06-03T06:38:23.400878
2021-06-18T07:07:04
2021-06-18T07:07:04
346,010,761
0
2
null
null
null
null
UTF-8
Java
false
false
65
java
/** * JPA domain objects. */ package com.dogpals.forum.domain;
1d52d232a1512ab040108bee0a29feb98408eaf8
67e735ab2b0f3190968aa248e80a7b3a570f1101
/JspAndServlets/06_CustomerApp/src/com/customerapp/web/controller/CustomerController.java
06cf4469d2fbfaacfc1dd81151d7b37f12e0fc92
[]
no_license
DivyaMaddipudi/HCL_Training
7ed68a19552310093895e12deacf0f019b07b49c
c7a6bd9fbac7f3398e7d68e8dce5f72ed13d14ec
refs/heads/master
2023-01-28T18:33:04.969333
2020-12-08T18:05:32
2020-12-08T18:05:32
304,354,730
0
1
null
null
null
null
UTF-8
Java
false
false
3,447
java
package com.customerapp.web.controller; import java.io.IOException; import java.sql.Connection; import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.List; import javax.servlet.RequestDispatcher; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.customerapp.model.Customer; import com.customerapp.model.CustomerDao; import com.customerapp.model.CustomerDaoImpl; public class CustomerController extends HttpServlet { private static final long serialVersionUID = 1L; private static Connection con = null; @Override public void init(ServletConfig config) throws ServletException { super.init(config); con = (Connection) config.getServletContext().getAttribute("con"); } private CustomerDao dao; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); if(action.equals("showall")) { dao = new CustomerDaoImpl(); List<Customer> customers = dao.getAllCustomers(); request.setAttribute("customers", customers); RequestDispatcher dispatcher = request.getRequestDispatcher("/WEB-INF/views/getAllCustomers.jsp"); dispatcher.forward(request, response); } else if(action.equals("addcustomer")) { RequestDispatcher rd = request.getRequestDispatcher("/WEB-INF/views/add.jsp"); rd.forward(request, response); } else if(action.equals("deletecustomer")) { int id = Integer.parseInt(request.getParameter("id").trim()); dao.delCustomer(id); response.sendRedirect("customercontroller.do?action=showall"); } else if(action.equals("updatecustomer")) { int id = Integer.parseInt(request.getParameter("id").trim()); Customer customer = dao.getCustomerById(id); //put the customer obj in the req scope request.setAttribute("customer", customer); RequestDispatcher rd = request.getRequestDispatcher("/WEB-INF/views/update.jsp"); rd.forward(request, response); } } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int id = Integer.parseInt(request.getParameter("id").trim()); String address = request.getParameter("address"); String email = request.getParameter("email"); String phone = request.getParameter("phone"); String purchage_capacityString= request.getParameter("purchage_capacity"); int purchaseCapacity = Integer.parseInt(purchage_capacityString); Customer customer; if(id > 0) { customer = new Customer(address, email, phone, purchaseCapacity); dao.updateCustomer(id, customer); response.sendRedirect("customercontroller.do?action=showall"); } else { String name = request.getParameter("name"); String dobString = request.getParameter("dob"); DateTimeFormatter fmt = DateTimeFormatter.ofPattern("d/MM/yyyy"); LocalDate dateTemp = LocalDate.parse(dobString, fmt); java.sql.Date dob=java.sql.Date.valueOf(dateTemp); customer = new Customer(name, address, email, phone, dob, purchaseCapacity); dao.addCustomer(customer); //dont forget prg response.sendRedirect("customercontroller.do?action=showall"); } } }
13b3af095adf6f11f63bb630eb4b6decaa805558
ff4d0adb35d0fd9ccb5e9c5b13f018e1e87bc6ba
/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/util/YamlUtils.java
b50d180babc80e34e054d5836955a5c79574c329
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "GPL-2.0-only", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "CDDL-1.1", "Classpath-exception-2.0", "MIT", "BSD-3-Clause", "LicenseRef-scancode-unknown" ]
permissive
lowc1012/submarine
6b06879648cda7bca1bb557fe3d85aa695eeab72
806fcb2181e5cef5f40f4e57aa941fae53ee5217
refs/heads/master
2022-09-10T12:50:59.318252
2022-08-27T12:23:38
2022-08-29T02:59:35
218,705,609
1
0
Apache-2.0
2019-10-31T07:10:50
2019-10-31T07:10:47
null
UTF-8
Java
false
false
2,553
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.submarine.server.submitter.k8s.util; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator; import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import com.fasterxml.jackson.datatype.joda.JodaModule; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; /** * Support the conversion of objects to yaml format, * so that the resource information can be displayed on the log in a more k8s declarative and readable manner */ public class YamlUtils { private static final YAMLMapper YAML_MAPPER = YAMLMapper.builder(new YAMLFactory() .disable(YAMLGenerator.Feature.USE_NATIVE_TYPE_ID)) .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .disable(SerializationFeature.FAIL_ON_EMPTY_BEANS) .enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS) .disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER) .build(); static { YAML_MAPPER.registerModule(new JavaTimeModule()) .registerModule(new JodaModule()) .setSerializationInclusion(JsonInclude.Include.NON_NULL); } public static String toPrettyYaml(Object pojoObject) { try { return YAML_MAPPER.writeValueAsString(pojoObject); } catch (JsonProcessingException ex) { throw new RuntimeException("Parse yaml failed! " + pojoObject.getClass().getName(), ex); } } }
b5730d3460ab97b9705b10258d47c1c7a3f37468
c144ad4b3cc6d070d122fa763fa15c179bf1aa85
/protop/src/main/java/com/example/tarena/protop/view/MainNews.java
174aeead40482367ebccd16e0a31c44907637de5
[]
no_license
lqCoding/ProTop
c7c322ce4e5981adb46a8df402674048ab3af36d
1c13833c55ac07cdc2e42e6ebbcd3ddc4776f0d9
refs/heads/master
2021-01-17T13:08:31.138420
2016-06-28T08:08:10
2016-06-28T08:08:10
59,806,113
3
1
null
null
null
null
UTF-8
Java
false
false
20,293
java
package com.example.tarena.protop.view; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.animation.Animation; import android.view.animation.ScaleAnimation; import android.widget.Button; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RadioGroup; import android.widget.Toast; import com.example.tarena.protop.R; import com.example.tarena.protop.adapter.MyViewPagerAdapter; import com.example.tarena.protop.biz.NewsBiz; import com.yalantis.guillotine.animation.GuillotineAnimation; import java.io.File; import java.io.FileInputStream; import java.text.DecimalFormat; import me.majiajie.pagerbottomtabstrip.Controller; import me.majiajie.pagerbottomtabstrip.PagerBottomTabLayout; import me.majiajie.pagerbottomtabstrip.TabItemBuilder; import me.majiajie.pagerbottomtabstrip.listener.OnTabItemSelectListener; public class MainNews extends AppCompatActivity implements OnTabItemSelectListener { private static final long RIPPLE_DURATION = 250; ViewPager vp ; PagerBottomTabLayout bottomTabLayout; Controller c; RadioGroup rg; //两个二级菜单布局 LinearLayout clear_cache; //两个布局状态显示器 ImageView iv_skin_orientation,iv_clear_orientation; //两个删除缓存的按钮 Button btn_clear_db,btn_clear_web; //业务类 NewsBiz biz; ImageView iv_back; //是否可点击 boolean isClick=false; // @InjectView @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main_news); // LinearLayout ll = (LinearLayout) findViewById(R.id.ll_linearlayout); initView(); } @Override protected void onResume() { super.onResume(); if(isClick) { iv_back.performClick(); isClick=false; } } /** * create:2016/5/14 * description:初始化视图 添加旋转菜单,Tabs */ private void initView() { //业务类 biz = new NewsBiz(this); // biz.clearDB("tb_android"); //radioGroup rg= (RadioGroup) findViewById(R.id.rg_color); //旋转菜单 Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); FrameLayout root = (FrameLayout) findViewById(R.id.root); View contentHamburger = findViewById(R.id.content_hamburger); if (toolbar != null) { setSupportActionBar(toolbar); getSupportActionBar().setTitle(null); } View guillotineMenu = LayoutInflater.from(this).inflate(R.layout.guillotine, null); // skin = (LinearLayout) guillotineMenu.findViewById(R.id.ll_skin); iv_back= (ImageView)guillotineMenu.findViewById(R.id.guillotine_hamburger); clear_cache= (LinearLayout) guillotineMenu.findViewById(R.id.ll_clear_cache); // iv_skin_orientation= (ImageView) guillotineMenu.findViewById(R.id.skin_orientation); iv_clear_orientation= (ImageView) guillotineMenu.findViewById(R.id.clear_orientation); btn_clear_db= (Button) clear_cache.findViewById(R.id.btn_clear_db); btn_clear_web= (Button) clear_cache.findViewById(R.id.btn_clear_web); root.addView(guillotineMenu); new GuillotineAnimation.GuillotineBuilder(guillotineMenu, guillotineMenu.findViewById(R.id.guillotine_hamburger), contentHamburger) .setStartDelay(RIPPLE_DURATION) .setActionBarViewForAnimation(toolbar) .setClosedOnStart(true) .build(); /** * 初始化动态菜单 */ bottomTabLayout = (PagerBottomTabLayout) findViewById(R.id.tab); // .setMode(TabLayoutMode.HIDE_TEXT | TabLayoutMode.CHANGE_BACKGROUND_COLOR) TabItemBuilder tabItemBuilder = new TabItemBuilder(this).create() .setDefaultColor(Color.parseColor("#a9b7b7")) .setSelectedColor(Color.parseColor("#00BCD4")) .setDefaultIcon(R.drawable.android01) .setText("Android") .build(); TabItemBuilder tabItemBuilder2 = new TabItemBuilder(this).create() .setDefaultColor(Color.parseColor("#a9b7b7")) .setSelectedColor(Color.parseColor("#00BCD4")) .setDefaultIcon(R.drawable.ios01) .setText("IOS") .build(); TabItemBuilder tabItemBuilder3 = new TabItemBuilder(this).create() .setDefaultColor(Color.parseColor("#a9b7b7")) .setSelectedColor(Color.parseColor("#00BCD4")) .setDefaultIcon(R.drawable.web01) .setText("Web前端") .build(); TabItemBuilder tabItemBuilder4 = new TabItemBuilder(this).create() .setDefaultColor(Color.parseColor("#a9b7b7")) .setSelectedColor(Color.parseColor("#00BCD4")) .setDefaultIcon(R.drawable.setting01) .setText("拓展资源") .build(); /* TabItemBuilder tabItemBuilder5 = new TabItemBuilder(this).create() .setDefaultColor(Color.parseColor("#a9b7b7")) .setSelectedColor(Color.parseColor("#00BCD4")) .setDefaultIcon(R.drawable.question) .setText("面试题") .build();*/ c= bottomTabLayout.builder() .addTabItem(tabItemBuilder) .addTabItem(tabItemBuilder2) .addTabItem(tabItemBuilder3) .addTabItem(tabItemBuilder4) // .addTabItem(tabItemBuilder5) .build(); c.addTabItemClickListener(this); //c.setMessageNumber(0,5); /** * 初始化fragment */ vp= (ViewPager) findViewById(R.id.vp_allnews); MyViewPagerAdapter adapter = new MyViewPagerAdapter(getSupportFragmentManager()); vp.setAdapter(adapter); vp.setOnPageChangeListener(new ViewPager.OnPageChangeListener() { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { for(int i=0;i<=3;i++){ rg.getChildAt(i).setBackgroundColor(Color.WHITE);} rg.getChildAt(position).setBackgroundColor(Color.parseColor("#00BCD4")); c.setSelect(position); } @Override public void onPageScrollStateChanged(int state) { } }); } /** * 弹出或者隐藏更换布局的二级菜单 * @param v */ /* public void onClick_skin(View v){ if(skin.getVisibility()==View.VISIBLE){ ScaleAnimation anim = new ScaleAnimation(1,0,1,0, Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f); anim.setDuration(500); skin.setAnimation(anim); skin.startAnimation(anim); skin.setVisibility(View.GONE); iv_skin_orientation.setImageResource(R.drawable.down); }else{ ScaleAnimation anim = new ScaleAnimation(0,1,0,1,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f); anim.setDuration(1000); skin.setAnimation(anim); skin.startAnimation(anim); skin.setVisibility(View.VISIBLE); iv_skin_orientation.setImageResource(R.drawable.up); } } */ /** * 已浏览过的文章 * @param v */ public void onClick_read(View v){ Intent intent = new Intent(this,MyReadActivity.class); startActivity(intent); isClick=true; } public void onClick_fav(View v){ Intent intent = new Intent(this,FavoActivity.class); startActivity(intent); isClick=true; } /** * 知识点模块(取消) * @param v */ public void onClick_question(View v){ // Toast.makeText(this,"面试题",Toast.LENGTH_LONG).show(); } /** * 弹出或者隐藏清除缓存的二级菜单 * @param v */ public void onClick_cache(View v){ // Toast.makeText(this,"清除缓存",Toast.LENGTH_LONG).show(); if(clear_cache.getVisibility()==View.VISIBLE){ ScaleAnimation anim = new ScaleAnimation(1,0,1,0,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f); // TranslateAnimation anim = new TranslateAnimation(); anim.setDuration(500); clear_cache.setAnimation(anim); clear_cache.startAnimation(anim); clear_cache.setVisibility(View.GONE); iv_clear_orientation.setImageResource(R.drawable.down); }else{ ScaleAnimation anim = new ScaleAnimation(0,1,0,1,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f); anim.setDuration(1000); clear_cache.setAnimation(anim); clear_cache.startAnimation(anim); clear_cache.setVisibility(View.VISIBLE); iv_clear_orientation.setImageResource(R.drawable.up); } String state = Environment.getExternalStorageState(); File dir = (!state.equals(Environment.MEDIA_MOUNTED)||!state.equals(Environment.MEDIA_REMOVED)?getExternalCacheDir():getCacheDir()); // Toast.makeText(this,getCacheSize(dir),Toast.LENGTH_SHORT).show();"占用空间: "+FormetFileSize(blockSize) getWebCacheSize(); File dir2 = new File("/data/data/" + getPackageName() + "/databases/news.db"); Log.i("TAG", "onClick_cache: " + dir2.getAbsolutePath()); String size=(FormetFileSize(getCacheSize(dir2)).equals("40.00KB")?"0KB":FormetFileSize(getCacheSize(dir2))); btn_clear_db.setText("清除列表缓存\n\n" +"占用空间: "+size); } /** * 我的博客 * @param v */ public void onClick_MyBlog(View v){ Intent intent = new Intent(this,MyBlogActivity.class); intent.putExtra("url","http://lqcoding.github.io"); startActivity(intent); isClick=true; } /** * 关于软件 * @param v */ public void onClick_about(View v) { Toast.makeText(this, "ProTop 版本1.0\n作者:Linqiang\n邮箱:[email protected]", Toast.LENGTH_LONG).show(); } /** * 清除数据库缓存 * @param v */ public void onClick_Clear_DB(View v) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("缓存删除"); builder.setIcon(android.R.drawable.ic_menu_info_details); builder.setMessage("确定要删除列表数据库缓存吗?\r\n(删除后需要重新联网更新)"); builder.setPositiveButton("狠心删除", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { try { int num = biz.clearDB("tb_android"); Toast.makeText(MainNews.this, "数据库删除!总共删除" + num + "条数据!", Toast.LENGTH_LONG).show(); //FindFragmentByTag("Android:switcher:" + R.id.viewpager + ":0"); // Fragment androidFragment = MainNews.this.getSupportFragmentManager().findFragmentByTag("Android:switcher:" + R.id.vp_allnews + ":0"); FragmentPagerAdapter f = (FragmentPagerAdapter) vp.getAdapter(); for (int i = 0; i < 4; i++) { Fragment androidFragment = (Fragment) f.instantiateItem(vp, i); if (androidFragment != null) { androidFragment.onResume(); } else { // Toast.makeText(MainNews.this,"fragment=null",Toast.LENGTH_SHORT).show(); } } File dir2 = new File("/data/data/" + getPackageName() + "/databases/news.db"); Log.i("TAG", "onClick_cache: " + dir2.getAbsolutePath()); String size=(FormetFileSize(getCacheSize(dir2)).equals("40.00KB")?"0KB":FormetFileSize(getCacheSize(dir2))); btn_clear_db.setText("清除列表缓存\n\n" +"占用空间: "+size); } catch (Exception e) { Toast.makeText(MainNews.this, "删除数据库失败!", Toast.LENGTH_LONG).show(); e.printStackTrace(); } } }); builder.setNegativeButton("我再想想", null); builder.create().show(); } public void getWebCacheSize(){ // long size=getCacheSize(new File("/data/data/" + getPackageName() + "/cache"+"/webviewCacheChromium")); File dir = new File("/data/data/" + getPackageName() + "/cache"); long size=getCacheSize(dir); size+=getCacheSize(new File("/data/data/" + getPackageName() + "/databases/")); // size+=getCacheSize(new File("/data/data/" + getPackageName() + "/databases/webview.db-journal")); // size+=getCacheSize(new File("/data/data/" + getPackageName() + "/databases/webviewCookiesChromium.db")); // size+=getCacheSize(new File("/data/data/" + getPackageName() + "/databases/webviewCookiesChromiumPrivate.db")); btn_clear_web.setText("清除网页缓存\n\n" + "占用空间: " + FormetFileSize(size)); } /** * 清除网页缓存 * @param v */ public void onClick_Clear_WEB(View v){ AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("缓存删除"); builder.setIcon(android.R.drawable.ic_menu_info_details); builder.setMessage("确定要删除列表数据库缓存吗?\r\n(删除后将失去以前缓存的网页)"); builder.setPositiveButton("狠心删除", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { try { FragmentPagerAdapter f = (FragmentPagerAdapter) vp.getAdapter(); for (int i = 0; i < 4; i++) { Fragment androidFragment = (Fragment) f.instantiateItem(vp, i); if (androidFragment != null) { androidFragment.onResume(); } else { // Toast.makeText(MainNews.this,"fragment=null",Toast.LENGTH_SHORT).show(); } } deleteFile(new File("/data/data/" + getPackageName() + "/cache/webviewCacheChromium")); deleteFile(new File("/data/data/" + getPackageName() + "/databases/webview.db")); deleteFile(new File("/data/data/" + getPackageName() + "/databases/webview.db-journal")); deleteFile(new File("/data/data/" + getPackageName() + "/databases/webviewCookiesChromium.db")); deleteFile(new File("/data/data/" + getPackageName() + "/databases/webviewCookiesChromiumPrivate.db")); getWebCacheSize(); } catch (Exception e) { Toast.makeText(MainNews.this, "删除数据库失败!", Toast.LENGTH_LONG).show(); e.printStackTrace(); } } }); builder.setNegativeButton("我再想想", null); builder.create().show(); } /** * 递归删除 文件/文件夹 * * @param file */ public void deleteFile(File file) { Log.i("TAG", "delete file path=" + file.getAbsolutePath()); if (file.exists()) { if (file.isFile()) { file.delete(); } else if (file.isDirectory()) { File files[] = file.listFiles(); for (int i = 0; i < files.length; i++) { deleteFile(files[i]); } } file.delete(); } else { Log.e("TAG", "delete file no exists " + file.getAbsolutePath()); } } /*** * 计算缓存占用空间大小 * @param file * @return */ private long getCacheSize(File file){ long blockSize=0; try { if(file.isDirectory()){ blockSize = getFileSizes(file); }else{ // Toast.makeText(this,"===="+blockSize,Toast.LENGTH_SHORT).show(); blockSize = getFileSize(file); } } catch (Exception e) { e.printStackTrace(); Log.e("获取文件大小", "获取失败!"); } return blockSize; } private static long getFileSize(File file) throws Exception { long size = 0; if (file.exists()){ FileInputStream fis = null; fis = new FileInputStream(file); size = fis.available(); Log.i("TAG", "文件名======" +file.getName()); } else{ file.createNewFile(); Log.e("获取文件大小","文件不存在!"); } return size; } private static String FormetFileSize(long fileS) { DecimalFormat df = new DecimalFormat("#.00"); String fileSizeString = ""; String wrongSize="0B"; if(fileS==0){ return wrongSize; } if (fileS < 1024){ fileSizeString = df.format((double) fileS) + "B"; } else if (fileS < 1048576){ fileSizeString = df.format((double) fileS / 1024) + "KB"; } else if (fileS < 1073741824){ fileSizeString = df.format((double) fileS / 1048576) + "MB"; } else{ fileSizeString = df.format((double) fileS / 1073741824) + "GB"; } return fileSizeString; } /** * 获取指定文件夹 * @param f * @return * @throws Exception */ private static long getFileSizes(File f) throws Exception { long size = 0; File flist[] = f.listFiles(); for (int i = 0; i < flist.length; i++){ if (flist[i].isDirectory()){ size = size + getFileSizes(flist[i]); } else{ size =size + getFileSize(flist[i]); } } return size; } /** * 以下两个方法监听Tab选中事件 ,tab选中切换viewpager * @param index * @param tag */ //选中触发此事件 @Override public void onSelected(int index, Object tag) { // Toast.makeText(this,""+index,Toast.LENGTH_SHORT).show(); vp.setCurrentItem(index); for(int i=0;i<=3;i++){ rg.getChildAt(i).setBackgroundColor(Color.WHITE);} rg.getChildAt(index).setBackgroundColor(Color.parseColor("#00BCD4")); } //重复选中触发此事件 @Override public void onRepeatClick(int index, Object tag) { } boolean isExit =false; @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode==KeyEvent.KEYCODE_BACK&&event.getRepeatCount()==0) { if (!isExit) { isExit = true; Toast.makeText(this, "再按一次退出", Toast.LENGTH_SHORT).show(); new Handler(Looper.getMainLooper()) { public void handleMessage(Message msg) { isExit = false; } }.sendEmptyMessageDelayed(1, 3000); return true; } else { finish(); return true; } }else { return false; } } }
e3faa760e16387e566599a468a4a840bef9cf0b0
44037bb8ed04b53b4e3717dd977b754de953c22b
/src/test/java/com/in/fmc/userservice/UserServiceApplicationTests.java
731413d546290a0536c9dc852fdeaced8d4cb9e4
[]
no_license
prarabdhchauhan/user-service
c189a711c0dba5912c3d4d0957db928359f8f5c2
7580c6825a6697b6e7ab49138c5e2fa806644c36
refs/heads/master
2023-06-16T10:23:04.449023
2021-07-09T06:15:13
2021-07-09T06:15:13
384,059,548
0
0
null
2021-07-21T06:16:52
2021-07-08T08:45:25
Java
UTF-8
Java
false
false
219
java
package com.in.fmc.userservice; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class UserServiceApplicationTests { @Test void contextLoads() { } }
db8be78dafd955605446f91779a970d136b301ff
11d95440d0c62bdf4e113c79b7e59e8cbc4b3b02
/src/main/java/com/demo/booking/service/MovieService.java
4619e9753770b37556c8f5b18ed7af479982254b
[]
no_license
Ganesh-c07/MOvie
c7bbb0939e22d18e0075ad7dac69f5bc7926a92a
dab719c1fcd1e4e528633aa66ea10c610a2b5be3
refs/heads/master
2022-06-27T00:04:28.583660
2020-05-13T06:02:13
2020-05-13T06:02:13
263,430,080
0
0
null
null
null
null
UTF-8
Java
false
false
318
java
package com.demo.booking.service; import java.util.List; import com.demo.booking.dto.MovieDTO; public interface MovieService { List<MovieDTO> viewAllMovies(); boolean addMovie(MovieDTO Movie); String editMovie(MovieDTO Movie); boolean deleteMovie(MovieDTO movie); String searchMovie(String movieName); }
135c8ec8c4a4d77917d88f48fbccae7442caad10
aa193c0f28ade299ecc2dffefcb129565baa5253
/app/src/androidTest/java/com/example/panea/myapplication/ExampleInstrumentedTest.java
10bf7879034202cf26944ef48f2d18fa82f4b1db
[]
no_license
cod-r/CardApp
7719bdf4731a1485c0b28ccf0cf89fdd5a9f5f98
0b0fcb424d70a4e120f9788e2c8f5338ef626837
refs/heads/master
2021-09-13T06:28:41.443835
2018-04-25T19:21:40
2018-04-25T19:21:40
114,622,031
0
0
null
null
null
null
UTF-8
Java
false
false
763
java
package com.example.panea.myapplication; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.panea.myapplication", appContext.getPackageName()); } }
a31735a2c66c6fa86df82b0c1e8e7546a4e2cdb7
1566df40584175cdc4fdd6ae504dacc45460476e
/SOAP-JAXWS/TPO-10JAXWS-Client/src/employee/services/EmployeeServiceImplService.java
7ee1bb230c50a4378ed55ee86e82afa5728d0718
[]
no_license
sametcem/Java-TPO
1946eaa0b439bba38e0413cb9cf7c832b950fa97
08475da3350440ae6727d28fd118be085abca486
refs/heads/master
2020-08-15T17:34:13.671322
2019-12-03T16:19:37
2019-12-03T16:19:37
215,380,903
2
0
null
null
null
null
UTF-8
Java
false
false
3,431
java
package employee.services; import java.net.MalformedURLException; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceException; import javax.xml.ws.WebServiceFeature; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.9-b130926.1035 * Generated source version: 2.2 * */ @WebServiceClient(name = "EmployeeServiceImplService", targetNamespace = "http://services.employee/", wsdlLocation = "http://localhost:7700/samet/s17181/employeeservice?wsdl") public class EmployeeServiceImplService extends Service { private final static URL EMPLOYEESERVICEIMPLSERVICE_WSDL_LOCATION; private final static WebServiceException EMPLOYEESERVICEIMPLSERVICE_EXCEPTION; private final static QName EMPLOYEESERVICEIMPLSERVICE_QNAME = new QName("http://services.employee/", "EmployeeServiceImplService"); static { URL url = null; WebServiceException e = null; try { url = new URL("http://localhost:7700/samet/s17181/employeeservice?wsdl"); } catch (MalformedURLException ex) { e = new WebServiceException(ex); } EMPLOYEESERVICEIMPLSERVICE_WSDL_LOCATION = url; EMPLOYEESERVICEIMPLSERVICE_EXCEPTION = e; } public EmployeeServiceImplService() { super(__getWsdlLocation(), EMPLOYEESERVICEIMPLSERVICE_QNAME); } public EmployeeServiceImplService(WebServiceFeature... features) { super(__getWsdlLocation(), EMPLOYEESERVICEIMPLSERVICE_QNAME, features); } public EmployeeServiceImplService(URL wsdlLocation) { super(wsdlLocation, EMPLOYEESERVICEIMPLSERVICE_QNAME); } public EmployeeServiceImplService(URL wsdlLocation, WebServiceFeature... features) { super(wsdlLocation, EMPLOYEESERVICEIMPLSERVICE_QNAME, features); } public EmployeeServiceImplService(URL wsdlLocation, QName serviceName) { super(wsdlLocation, serviceName); } public EmployeeServiceImplService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { super(wsdlLocation, serviceName, features); } /** * * @return * returns EmployeeServiceImpl */ @WebEndpoint(name = "EmployeeServiceImplPort") public EmployeeServiceImpl getEmployeeServiceImplPort() { return super.getPort(new QName("http://services.employee/", "EmployeeServiceImplPort"), EmployeeServiceImpl.class); } /** * * @param features * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. * @return * returns EmployeeServiceImpl */ @WebEndpoint(name = "EmployeeServiceImplPort") public EmployeeServiceImpl getEmployeeServiceImplPort(WebServiceFeature... features) { return super.getPort(new QName("http://services.employee/", "EmployeeServiceImplPort"), EmployeeServiceImpl.class, features); } private static URL __getWsdlLocation() { if (EMPLOYEESERVICEIMPLSERVICE_EXCEPTION!= null) { throw EMPLOYEESERVICEIMPLSERVICE_EXCEPTION; } return EMPLOYEESERVICEIMPLSERVICE_WSDL_LOCATION; } }
9de89fa8fbc8e126afabeee84725219bffca5d4a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_23a7d85acafd7260e686028059434243260c928a/POSTRequest/2_23a7d85acafd7260e686028059434243260c928a_POSTRequest_s.java
6e428a28026e47c60fbdcede458c6fe7c123cc1b
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,814
java
package org.letstalktech.aahw; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; import java.util.Map; import org.apache.http.HttpEntity; import org.apache.http.ParseException; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.CookieStore; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.BufferedHttpEntity; import org.apache.http.entity.mime.HttpMultipartMode; import org.apache.http.entity.mime.MultipartEntity; import org.apache.http.entity.mime.content.FileBody; import org.apache.http.entity.mime.content.StringBody; import org.apache.http.params.CoreProtocolPNames; import org.apache.http.util.EntityUtils; import org.json.JSONException; import org.json.JSONObject; import android.graphics.BitmapFactory; public class POSTRequest extends HTTPRequest { HttpPost post; public POSTRequest(CookieStore cookieStore, Callback cb){ super(cookieStore,cb); } public POSTRequest(CookieStore cookieStore, Callback cb, Callback errorCallback){ super(cookieStore,cb,errorCallback); } public POSTRequest(){ super(); } public POSTRequest(CookieStore cookieStore){ super(cookieStore); } @Override protected Result doInBackground(Parameters... parameters) { Result result = new Result(); android.util.Log.v("POSTRequest","Entered the POSTRequest"); try { String postURL = serverAddress+parameters[0].getPath(); post = new HttpPost(postURL); android.util.Log.e("POSTRequest",postURL); if(parameters[0].getUserAgent().length() > 0) post.getParams().setParameter(CoreProtocolPNames.USER_AGENT, parameters[0].getUserAgent()); //List<NameValuePair> params = new ArrayList<NameValuePair>(); MultipartEntity ent = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); Charset chars = Charset.forName("UTF-8"); for (Map.Entry<String, Object> e : parameters[0].getParams().entrySet()) { post.addHeader(e.getKey(), e.getValue().toString()); } for (Map.Entry<String, Object> e : parameters[0].getParams().entrySet()) { // params.add(new BasicNameValuePair(e.getKey(), e.getValue().toString())); if(e.getValue().getClass().getSimpleName().contentEquals("File")) ent.addPart(e.getKey(),new FileBody((File)e.getValue())); else{ StringBody test = new StringBody(e.getValue().toString(),"text/plain",chars); ent.addPart(e.getKey(),test); } } //UrlEncodedFormEntity ent = new UrlEncodedFormEntity(params,HTTP.UTF_8); //post.addHeader("Content-Type", "multipart/form-data"); post.setEntity(ent); response = httpclient.execute(post,localContext); result.setStatus(response.getStatusLine().getStatusCode()); android.util.Log.v("POSTRequest",String.valueOf(result.getStatus())); HttpEntity resEntity = response.getEntity(); if (resEntity != null) { try{ android.util.Log.v("POSTRequest", response.getHeaders("Content-Type")[0].getValue()); if(response.getHeaders("Content-Type")[0].getValue().contains("image")){ android.util.Log.e("POSTRequest","I'm an image!"); BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(resEntity); InputStream is = bufHttpEntity.getContent(); result.setResponse(BitmapFactory.decodeStream(is)); } else if(response.getHeaders("Content-Type")[0].getValue().contains("json")){ JSONObject json = null; try { String teste = EntityUtils.toString(resEntity); android.util.Log.e("POSTRequest",teste); json=new JSONObject(teste); // android.util.Log.e("POSTRequest",json.toString()); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } result.setResponse(json); } else if(response.getHeaders("Content-Type")[0].getValue().contains("text/html")){ result.setResponse(EntityUtils.toString(resEntity)); android.util.Log.e("POSTRequest",(String) result.getResponse()); } }catch(NullPointerException e){ result.setResponse(new String("null")); } } } catch (ClientProtocolException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return result; } // protected void onPostExecute(Result result){ // android.util.Log.v("POSTRequest",String.valueOf(result.getStatus())); // if(callback != null) // callback.run(result); // } }
2dc14963ce4895bd494f7afe98faef6472c91b8c
eed7c048ccd674c3fe1c4c2d077d45a182b1787b
/LogisticsSystemSSM/src/main/java/com/logistics/po/Attendance.java
6124e506faae5a7b6d2228a745c996acb200d577
[]
no_license
wang1024it/SSM_Git
254dcd3bcdcd799bcea2183bb8b17d0455573f57
678acc4577be8c0f9493b843f76e9a63e5041885
refs/heads/master
2022-12-22T07:23:15.866243
2019-10-28T13:25:12
2019-10-28T13:25:12
217,006,065
0
0
null
2019-10-23T08:26:25
2019-10-23T08:24:22
Java
UTF-8
Java
false
false
4,815
java
package com.logistics.po; import java.io.Serializable; import java.util.Date; /** * @author */ public class Attendance implements Serializable { /** * 考勤ID */ private Integer attendanceid; /** * 审核人ID */ private Integer auditorid; /** * 用户ID */ private Integer userid; /** * 车辆ID */ private Integer carid; /** * 批准否 */ private Boolean isratification; /** * 上班时间 */ private Date startworktime; /** * 下班时间 */ private Date offwork; /** * 备注 */ private String remark; /** * 区分上下班 */ private String mark; /** * 审核否 */ private Boolean isaudit; /** * 审核时间 */ private Date audittime; /** * 申请时间 */ private Date applicationtime; /** * 请假理由 */ private String reason; /** * 请假天数 */ private String leaveday; /** * 上班的车辆里程 */ private Float startmileage; /** * 上班车辆油量 */ private Float startoilmass; /** * 上班车辆位置 */ private String startlocation; /** * 下帮的车辆里程 */ private Float offmileage; /** * 下班的车辆油量 */ private Float offoilmass; /** * 下班的车辆位置 */ private String offlocation; private static final long serialVersionUID = 1L; public Integer getAttendanceid() { return attendanceid; } public void setAttendanceid(Integer attendanceid) { this.attendanceid = attendanceid; } public Integer getAuditorid() { return auditorid; } public void setAuditorid(Integer auditorid) { this.auditorid = auditorid; } public Integer getUserid() { return userid; } public void setUserid(Integer userid) { this.userid = userid; } public Integer getCarid() { return carid; } public void setCarid(Integer carid) { this.carid = carid; } public Boolean getIsratification() { return isratification; } public void setIsratification(Boolean isratification) { this.isratification = isratification; } public Date getStartworktime() { return startworktime; } public void setStartworktime(Date startworktime) { this.startworktime = startworktime; } public Date getOffwork() { return offwork; } public void setOffwork(Date offwork) { this.offwork = offwork; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getMark() { return mark; } public void setMark(String mark) { this.mark = mark; } public Boolean getIsaudit() { return isaudit; } public void setIsaudit(Boolean isaudit) { this.isaudit = isaudit; } public Date getAudittime() { return audittime; } public void setAudittime(Date audittime) { this.audittime = audittime; } public Date getApplicationtime() { return applicationtime; } public void setApplicationtime(Date applicationtime) { this.applicationtime = applicationtime; } public String getReason() { return reason; } public void setReason(String reason) { this.reason = reason; } public String getLeaveday() { return leaveday; } public void setLeaveday(String leaveday) { this.leaveday = leaveday; } public Float getStartmileage() { return startmileage; } public void setStartmileage(Float startmileage) { this.startmileage = startmileage; } public Float getStartoilmass() { return startoilmass; } public void setStartoilmass(Float startoilmass) { this.startoilmass = startoilmass; } public String getStartlocation() { return startlocation; } public void setStartlocation(String startlocation) { this.startlocation = startlocation; } public Float getOffmileage() { return offmileage; } public void setOffmileage(Float offmileage) { this.offmileage = offmileage; } public Float getOffoilmass() { return offoilmass; } public void setOffoilmass(Float offoilmass) { this.offoilmass = offoilmass; } public String getOfflocation() { return offlocation; } public void setOfflocation(String offlocation) { this.offlocation = offlocation; } }
0777d009cb5ffa90719e5faa710e3e30c6ecfb34
78a2f9309c2556f0db5342c97558be0f4d8543b8
/src/test/java/com/jamadeu/SpringBootEssentialsApplicationTests.java
691e481511ad78e0334fb4053ada365fedff83b1
[]
no_license
jamadeu/spring-boot
8d25d311ae2bf0aae3a21926c9f55f813f699435
762f4545d19b57a56509247138185f0e01a2b941
refs/heads/master
2022-11-17T02:10:22.432262
2020-07-18T14:26:32
2020-07-18T14:26:32
278,852,151
0
0
null
null
null
null
UTF-8
Java
false
false
226
java
package com.jamadeu; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class springBootEssentialsApplicationTests { @Test void contextLoads() { } }
b20853ef42fe844a41adc7f331f5768b7a36ae5c
de9cc79a83fc69893a8dc544ebd1f9807d96bc12
/Web/src/main/java/com/meitan/lubov/services/util/ControlledResourceBundleMessageSource.java
6e04389b2eb0b3c18aef9bbd6232586a6664cbe4
[]
no_license
denisk20/Meitan
4f23f18850043f2309c7eb529df572f5532a5d8c
23a115dabe7a090e5d6a894e6dc74c6dcaf796a8
refs/heads/master
2021-01-18T21:33:36.808400
2011-01-11T11:15:03
2011-01-11T11:15:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
781
java
package com.meitan.lubov.services.util; import org.springframework.context.support.ResourceBundleMessageSource; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; /** * Date: Nov 12, 2010 * Time: 12:36:13 PM * * @author denisk */ public class ControlledResourceBundleMessageSource extends ResourceBundleMessageSource { private ResourceBundle.Control control; public ResourceBundle.Control getControl() { return control; } public void setControl(ResourceBundle.Control control) { this.control = control; } @Override protected ResourceBundle doGetBundle(String basename, Locale locale) throws MissingResourceException { return ResourceBundle.getBundle(basename, locale, getBundleClassLoader(), control); } }
bc71df5e88c97240bae900d2eac066df234d5cec
28255f56bbd3d57fd0721b4fc8e1242f8add6dce
/src/main/java/sec/project/controller/SignupController.java
6c9dfd556e3243661237a9a5e23dd1b1b960480e
[]
no_license
jarkkokovala/cybersecuritybase
8c97e8e29e54e83d8298b8bddf77a391037be040
f317feadc0053a324b4800df0b4a1b4d9d811780
refs/heads/master
2020-04-12T14:31:06.710554
2018-12-26T14:55:19
2018-12-26T14:55:19
162,554,789
0
0
null
null
null
null
UTF-8
Java
false
false
3,059
java
package sec.project.controller; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletResponse; import org.springframework.web.bind.annotation.CookieValue; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.security.core.Authentication; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import sec.project.domain.Account; import sec.project.repository.AccountRepository; import sec.project.domain.Signup; import sec.project.repository.SignupRepository; @Controller public class SignupController { @Autowired private SignupRepository signupRepository; @Autowired private AccountRepository accountRepository; @RequestMapping("*") public String defaultMapping() { return "redirect:/form"; } @RequestMapping(value = "/signups", method = RequestMethod.GET) public String list(Model model) { model.addAttribute("signups", signupRepository.findAll()); return "signups"; } @RequestMapping(value = "/signups/{id}", method = RequestMethod.GET) public String viewSignup(@PathVariable Long id, Model model) { model.addAttribute("signup", signupRepository.findOne(id)); return "view"; } @RequestMapping(value = "/signups/{id}", method = RequestMethod.DELETE) public String remove(@CookieValue("account") String account, @PathVariable Long id) { String[] user = account.split(":"); if(user[2].equals("admin")) signupRepository.delete(id); return "redirect:/admin"; } @RequestMapping(value = "/admin", method = RequestMethod.GET) public String list(HttpServletResponse response, Authentication authentication, Model model) { Account account = accountRepository.findByUsername(authentication.getName()); model.addAttribute("signups", signupRepository.findAll()); model.addAttribute("account", account); response.addCookie(new Cookie("account", account.toString())); return "admin"; } @RequestMapping(value = "/form", method = RequestMethod.GET) public String loadForm() { return "form"; } @RequestMapping(value = "/logout_success", method = RequestMethod.GET) public String logoutSuccess() { return "logout_success"; } @RequestMapping(value = "/form", method = RequestMethod.POST) public String submitForm(@RequestParam String name, @RequestParam String address) { signupRepository.save(new Signup(name, address)); return "done"; } }
7bad0f753bee420082445fe180dcbdb8cd7c2253
42a2454fc1b336fd7e00c3583f379f03516d50e0
/platform/lang-impl/src/com/intellij/psi/impl/source/tree/injected/InjectionResult.java
1e33cf99e20001661cf67e6be4833acbdf7ec75b
[ "Apache-2.0" ]
permissive
meanmail/intellij-community
f65893f148b2913b18ec4787a82567c8b41c2e2b
edeb845e7c483d852d807eb0015d28ee8a813f87
refs/heads/master
2021-01-11T02:53:33.903981
2019-03-01T18:42:10
2019-03-01T18:42:10
70,822,840
1
1
Apache-2.0
2019-03-01T18:42:11
2016-10-13T15:49:45
Java
UTF-8
Java
false
false
2,225
java
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.psi.impl.source.tree.injected; import com.intellij.openapi.util.Pair; import com.intellij.psi.PsiFile; import com.intellij.psi.PsiLanguageInjectionHost; import com.intellij.psi.injection.ReferenceInjector; import java.util.List; class InjectionResult { final List<? extends PsiFile> files; final List<? extends Pair<ReferenceInjector, Place>> references; private final long myModificationCount; InjectionResult(List<? extends PsiFile> files, List<? extends Pair<ReferenceInjector, Place>> references) { this.files = files; this.references = references; myModificationCount = calcModCount(); if (files == null && references == null) throw new IllegalArgumentException("At least one argument must not be null"); } boolean isValid() { if (files != null) { for (PsiFile file : files) { if (!file.isValid()) return false; } } else { for (Pair<ReferenceInjector, Place> pair : references) { Place place = pair.getSecond(); if (!place.isValid()) return false; } } return true; } boolean isModCountUpToDate() { return myModificationCount == calcModCount(); } private long calcModCount() { long modCount = 0; if (files != null) { for (PsiFile file : files) { if (!file.isValid()) return -1; modCount += file.getModificationStamp(); modCount += file.getManager().getModificationTracker().getModificationCount(); } } if (references != null) { for (Pair<ReferenceInjector, Place> pair : references) { Place place = pair.getSecond(); if (!place.isValid()) return -1; for (PsiLanguageInjectionHost.Shred shred : place) { PsiLanguageInjectionHost host = shred.getHost(); if (host == null || !host.isValid()) return -1; PsiFile file = host.getContainingFile(); modCount += file.getModificationStamp(); modCount += file.getManager().getModificationTracker().getModificationCount(); } } } return modCount; } }
e24793fa635e72fce26817d1f1033f295b7f5c88
57ef10c54c82f078fa2b77d9680650057c286e7e
/webos.plugins.vfs4hdfs/src/main/java/org/pentaho/hdfs/vfs/HDFSFileObject.java
d7d83a4ccb7ce0970ab619c5a3c9ba09ff87737e
[]
no_license
jachicore/WebOSServer
7cd88050605fa35eca41ee1f3235bb0583ccbf48
0c92a8af8741f7190eeafba8f40ddc2b2df23c82
refs/heads/master
2020-12-24T15:05:27.226207
2014-05-23T05:21:45
2014-05-23T05:21:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,723
java
/* * Copyright 2010 Pentaho Corporation. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * 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. * * @author Michael D'Amour */ package org.pentaho.hdfs.vfs; import java.io.InputStream; import java.io.OutputStream; import java.net.URLDecoder; import java.net.URLEncoder; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.FileType; import org.apache.commons.vfs2.provider.AbstractFileName; import org.apache.commons.vfs2.provider.AbstractFileObject; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; public class HDFSFileObject extends AbstractFileObject implements FileObject { private FileSystem hdfs; protected HDFSFileObject(final AbstractFileName name, final HDFSFileSystem fileSystem) throws FileSystemException { super(name, fileSystem); hdfs = fileSystem.getHDFSFileSystem(); } protected long doGetContentSize() throws Exception { return hdfs.getFileStatus(new Path(getName().getPath())).getLen(); } protected OutputStream doGetOutputStream(boolean append) throws Exception { if (append) { FSDataOutputStream out = hdfs.append(new Path(getName().getPath())); return out; } else { FSDataOutputStream out = hdfs.create(new Path(getName().getPath())); return out; } } protected InputStream doGetInputStream() throws Exception { FSDataInputStream in = hdfs.open(new Path(getName().getPath())); return in; } protected FileType doGetType() throws Exception { FileStatus status = null; try { status = hdfs.getFileStatus(new Path(URLDecoder.decode(getName().getPath(), "UTF-8").replaceAll(" ", "+"))); } catch (Exception ex) { } if (status == null) { return FileType.IMAGINARY; } else if (status.isDir()) { return FileType.FOLDER; } else { return FileType.FILE; } } public void doCreateFolder() throws Exception { hdfs.mkdirs(new Path(getName().getPath())); } public void doDelete() throws Exception { hdfs.delete(new Path(getName().getPath()), true); } protected void doRename(FileObject newfile) throws Exception { hdfs.rename(new Path(getName().getPath()), new Path(newfile.getName().getPath())); } protected long doGetLastModifiedTime() throws Exception { return hdfs.getFileStatus(new Path(getName().getPath())).getModificationTime(); } @Override protected boolean doSetLastModifiedTime(long modtime) throws Exception { hdfs.setTimes(new Path(getName().getPath()), modtime, System.currentTimeMillis()); return true; } protected String[] doListChildren() throws Exception { FileStatus[] statusList = hdfs.listStatus(new Path(getName().getPath())); String[] children = new String[statusList.length]; for (int i = 0; i < statusList.length; i++) { children[i] = URLEncoder.encode(statusList[i].getPath().getName(), "UTF-8"); } return children; } }
3c9f6a2b3fbc150a6ffe7b0d6e19a9dfbd22a71f
caa0b6dc88481e11529f7864db38c0e80ab6bf33
/messaging-logic/src/main/java/com/akutin/messaginglogic/services/EmailService.java
467743efd22669ba9a17c896048af8192ae7979f
[]
no_license
Jho00/web-messanger
934870ddfb14ff696d01fa70684f7fd3a3d640f5
f22224f3bbfb2d12bc9188aa439f1156483a87e1
refs/heads/master
2023-06-03T04:21:41.123680
2020-07-18T10:59:29
2020-07-18T10:59:29
280,637,679
0
0
null
2021-06-27T19:08:55
2020-07-18T10:58:27
Vue
UTF-8
Java
false
false
887
java
package com.akutin.messaginglogic.services; import com.akutin.messaginglogic.entity.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.mail.SimpleMailMessage; import org.springframework.mail.javamail.JavaMailSender; import org.springframework.stereotype.Service; @Service public class EmailService { private final JavaMailSender javaMailSender; public EmailService(JavaMailSender javaMailSender) { this.javaMailSender = javaMailSender; } public void sendMessage(String subject, String text, User target) { try { SimpleMailMessage msg = new SimpleMailMessage(); msg.setTo(target.getEmail()); msg.setSubject(subject); msg.setText(text); javaMailSender.send(msg); } catch (Throwable e) { e.printStackTrace(); } } }
240dfcaa11b4ac09d74fa6b7d3a39bc77601a604
e56e440bc59599bea5a915a0f7b8ccb8a24e54e9
/hackathon/FirstFactorial.java
f897e85a295ced541fa29f1fcff9ceca43e4884f
[]
no_license
nhunam/CrackingCodingInterview
c06fb3bd12bcf7bb89118a314ec599ec729cbcf7
22299675ee6f84823d7efadc320ab099ed245e06
refs/heads/master
2021-01-03T08:57:56.069726
2020-08-10T10:12:05
2020-08-10T10:12:05
240,009,035
0
0
null
null
null
null
UTF-8
Java
false
false
237
java
package hackathon; public class FirstFactorial { public static void main(String[] args) { // TODO Auto-generated method stub int num = 8; int res = 1; for(int i = num; i > 0; i--) res *= i; System.out.println(res); } }
ba392b339694c8fa24c7ca3c2493076a1196a37e
51d69360cd045f557060a4474c0132d9cbcbc692
/MLRHR/src/main/java/com/jfn/vo/TeamSecondTrial.java
c4a5ba49dada6a44980903ba7393882b54d8d1d2
[]
no_license
MLHRH/cxrc
c1f42ed5773567132e5620d128ca8a83cfa9b580
9f3110c1def2403622df5e282d1339781b555f0f
refs/heads/master
2020-07-18T02:42:59.782510
2018-12-11T13:29:51
2018-12-11T13:30:25
66,753,619
1
0
null
null
null
null
UTF-8
Java
false
false
1,099
java
package com.jfn.vo; /** * Created by xubin on 2017/5/14 */ public class TeamSecondTrial extends TeamBaseExcel{ private double voteRate; private Integer agreeNum; private Integer disagreeNum; private Integer waiverNum; public double getVoteRate(){ return voteRate; } public void setVoteRate(double voteRate){ this.voteRate = voteRate; } public Integer getAgreeNum(){ return agreeNum; } public void setAgreeNum(Integer agreeNum){ this.agreeNum = agreeNum; } public Integer getDisagreeNum(){ return disagreeNum; } public void setDisagreeNum(Integer disagreeNum){ this.disagreeNum = disagreeNum; } public Integer getWaiverNum(){ return waiverNum; } public void setWaiverNum(Integer waiverNum){ this.waiverNum = waiverNum; } @Override public String toString(){ return "TeamSecondTrial{" + "voteRate=" + voteRate + ", agreeNum=" + agreeNum + ", disagreeNum=" + disagreeNum + ", waiverNum=" + waiverNum + '}'; } }
bc16e2202496926b9044aa3b2bdc772b8e419692
73a31434d48208bbcb4842e90be173c3ee8a44f2
/06_Spring_DI_annotation_XML/src/main/java/di_annotation/AppleSpeaker.java
522bad16f694af7235d39c13289ce6576ea26e0c
[]
no_license
dusjh/Spring
c5790340a5e1d4f95b65f37be58bc2463e1ad39a
9598c32e620c5d8ea341815da200b4cdb6b7c17f
refs/heads/main
2023-06-14T00:29:57.837014
2021-07-15T12:51:20
2021-07-15T12:51:20
379,876,147
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package di_annotation; public class AppleSpeaker implements Speaker { public AppleSpeaker() { System.out.println(">> AppleSpeaker 생성"); } public void volumeUp() { System.out.println(">> AppleSpeaker 소리 크게"); } public void volumeDown() { System.out.println(">> AppleSpeaker 소리 작게"); } }
15d0582f7853f2d479d2e33174cd6d01c56af8a1
6539d90d49d5aa4f6a1ffd0712541df1627fb9cc
/Textprocessing/src/main/java/jw/docx/TableRead.java
55f0396010ff3c75580443976ceb876a51c68471
[]
no_license
INTP2/java-works
ceaca97b58af4d38947bf265a0a8df6f5f995dfd
c4d883fdd5eed9b2d5fbcc447efb2ca4f57f4bf1
refs/heads/master
2023-02-18T17:13:45.223705
2021-01-20T08:22:33
2021-01-20T08:22:33
331,239,274
0
0
null
null
null
null
UTF-8
Java
false
false
3,804
java
package jw.docx; /** * 本类完成docx的表格内容读取 */ import java.io.FileInputStream; import java.io.InputStream; import java.util.Iterator; import java.util.List; import org.apache.poi.poifs.filesystem.POIFSFileSystem; import org.apache.poi.xwpf.usermodel.BodyElementType; import org.apache.poi.xwpf.usermodel.IBodyElement; import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.apache.poi.xwpf.usermodel.XWPFParagraph; import org.apache.poi.xwpf.usermodel.XWPFRun; import org.apache.poi.xwpf.usermodel.XWPFTable; import org.apache.poi.xwpf.usermodel.XWPFTableCell; import org.apache.poi.xwpf.usermodel.XWPFTableRow; public class TableRead { public static void main(String[] args) throws Exception { testTable(); } public static void testTable() throws Exception { InputStream is = new FileInputStream("simple2.docx"); XWPFDocument xwpf = new XWPFDocument(is); List<XWPFParagraph> paras = xwpf.getParagraphs(); //List<POIXMLDocumentPart> pdps = xwpf.getRelations(); List<IBodyElement> ibs= xwpf.getBodyElements(); for(IBodyElement ib:ibs) { BodyElementType bet = ib.getElementType(); if(bet== BodyElementType.TABLE) { //表格 System.out.println("table" + ib.getPart()); XWPFTable table = (XWPFTable) ib; List<XWPFTableRow> rows=table.getRows(); //读取每一行数据 for (int i = 0; i < rows.size(); i++) { XWPFTableRow row = rows.get(i); //读取每一列数据 List<XWPFTableCell> cells = row.getTableCells(); for (int j = 0; j < cells.size(); j++) { XWPFTableCell cell=cells.get(j); System.out.println(cell.getText()); List<XWPFParagraph> cps = cell.getParagraphs(); System.out.println(cps.size()); } } } else { //段落 XWPFParagraph para = (XWPFParagraph) ib; System.out.println("It is a new paragraph....The indention is " + para.getFirstLineIndent() + "," + para.getIndentationFirstLine() + "," + para.getIndentationHanging()+"," + para.getIndentationLeft() + "," + para.getIndentationRight() + "," + para.getIndentFromLeft() + "," + para.getIndentFromRight()+"," + para.getAlignment().getValue()); //System.out.println(para.getAlignment()); //System.out.println(para.getRuns().size()); List<XWPFRun> res = para.getRuns(); System.out.println("run"); if(res.size()<=0) { System.out.println("empty line"); } for(XWPFRun re: res) { if(null == re.text()||re.text().length()<=0) { if(re.getEmbeddedPictures().size()>0) { System.out.println("image***" + re.getEmbeddedPictures().size()); } else { System.out.println("objects:" + re.getCTR().getObjectList().size()); System.out.println(re.getCTR().xmlText()); } } else { System.out.println("===" + re.text()); } } } } is.close(); } }
90f4fead530b4744fc352a2952af91118613e5dc
b565daab75a8d198ed02541b6c0492a8a2cad312
/gmall-sms/src/main/java/com/atguigu/gmall/sms/dao/SpuBoundsDao.java
2f951544fa490b2f583a3b599c1278c9d1d1c6be
[ "Apache-2.0" ]
permissive
zhangqiperfect/gmall-new
2f487f0813ad3725e5626304288fe75928865eba
bf1264119f57a7d48cfb70251aa21762ccb6b7bc
refs/heads/master
2022-12-22T10:21:09.304678
2019-11-20T14:33:17
2019-11-20T14:33:17
220,237,549
1
1
Apache-2.0
2022-12-16T14:50:47
2019-11-07T12:57:48
JavaScript
UTF-8
Java
false
false
383
java
package com.atguigu.gmall.sms.dao; import com.atguigu.gmall.sms.entity.SpuBoundsEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; /** * 商品spu积分设置 * * @author qinhan * @email [email protected] * @date 2019-10-28 20:50:51 */ @Mapper public interface SpuBoundsDao extends BaseMapper<SpuBoundsEntity> { }
7850e1694ba792bd0e73d03a05e56e4c22a4d58a
e201ffe6c42c8ba343cb41ec6b404da293710dea
/web4t/step12/src/main/java/net/bitacademy/java67/exception/LogException.java
7607a0c6565b0735be517385f93fcc0291b454f4
[]
no_license
eomjinyoung/Java67
1b6b1577dc2cc5b7c5f16c128e6ab29fdad0e978
d7631dcd6a219e7c73d89830ef737b42718849f4
refs/heads/master
2021-01-19T06:27:06.995456
2016-02-26T08:25:00
2016-02-26T08:25:00
31,700,412
14
15
null
null
null
null
UTF-8
Java
false
false
605
java
package net.bitacademy.java67.exception; public class LogException extends RuntimeException { private static final long serialVersionUID = 1L; public LogException() { super(); } public LogException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } public LogException(String message, Throwable cause) { super(message, cause); } public LogException(String message) { super(message); } public LogException(Throwable cause) { super(cause); } }
093cc65f8dd02fbcfe30fc20fa781daceb1fef2b
31db11d726cad5f39bfabc445704dc8c17a48016
/BookLibrary/lab5_v4/src/main/java/notDefault/Reader.java
cd436b0478960b897f3081ace16a23cedab9f7e1
[]
no_license
koalabzium/SOA
d0dab14476bdb5878ca0e9f943ac55d6b4794af9
a0efb6e5dd8b1c8c1e2357e47410a9dcd6157172
refs/heads/master
2020-04-30T07:37:04.399625
2019-05-08T06:45:43
2019-05-08T06:45:43
176,689,969
2
0
null
null
null
null
UTF-8
Java
false
false
1,538
java
package notDefault; import javax.persistence.*; import java.util.List; @Entity public class Reader { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private int id; private String name; private String surname; @OneToMany(mappedBy = "reader", orphanRemoval=true) private List<Order> orders; public int getId() { return id; } public void setId(int id) { this.id = id; } public List<Order> getOrders() { return orders; } public void setOrders(List<Order> orders) { this.orders = orders; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSurname() { return surname; } public void setSurname(String surname) { this.surname = surname; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Reader reader = (Reader) o; if (id != reader.id) return false; if (name != null ? !name.equals(reader.name) : reader.name != null) return false; return surname != null ? surname.equals(reader.surname) : reader.surname == null; } @Override public int hashCode() { int result = id; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (surname != null ? surname.hashCode() : 0); return result; } }
b7781c403f70d0b7e63dd0c5220f8043152c4290
3814d5882b6521fadb7a018a5fe1f57244012bf4
/app/models/uk/org/siri/siri/RoutePointTypeEnumeration.java
9f53c11df4d04265a4883fc7fa8828de75aa38ec
[]
no_license
sergmor/busteller
d41692cf2bd6e1c30e985401ac7290c6adb91440
b3f9802a1fd217f920c8bcf1ad72bdae4c1ab5b4
refs/heads/master
2021-01-01T16:31:19.876063
2014-04-30T23:43:15
2014-04-30T23:43:15
18,954,897
2
0
null
null
null
null
UTF-8
Java
false
false
5,353
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2010.11.14 at 03:28:36 PM PST // package models.uk.org.siri.siri; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for RoutePointTypeEnumeration. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="RoutePointTypeEnumeration"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN"> * &lt;enumeration value="pti15_0"/> * &lt;enumeration value="unknown"/> * &lt;enumeration value="pti15_1"/> * &lt;enumeration value="startPoint"/> * &lt;enumeration value="pti15_2"/> * &lt;enumeration value="destination"/> * &lt;enumeration value="pti15_3"/> * &lt;enumeration value="stop"/> * &lt;enumeration value="pti15_4"/> * &lt;enumeration value="via"/> * &lt;enumeration value="pti15_5"/> * &lt;enumeration value="notStopping"/> * &lt;enumeration value="pti15_6"/> * &lt;enumeration value="temporaryStop"/> * &lt;enumeration value="pti15_7"/> * &lt;enumeration value="temporarilyNotStopping"/> * &lt;enumeration value="pti15_8"/> * &lt;enumeration value="exceptionalStop"/> * &lt;enumeration value="pti15_9"/> * &lt;enumeration value="additionalStop"/> * &lt;enumeration value="pti15_10"/> * &lt;enumeration value="requestStop"/> * &lt;enumeration value="pti15_11"/> * &lt;enumeration value="frontTrainDestination"/> * &lt;enumeration value="pti15_12"/> * &lt;enumeration value="rearTrainDestination"/> * &lt;enumeration value="pti15_13"/> * &lt;enumeration value="throughServiceDestination"/> * &lt;enumeration value="pti15_14"/> * &lt;enumeration value="notVia"/> * &lt;enumeration value="pti15_15"/> * &lt;enumeration value="alteredStartPoint"/> * &lt;enumeration value="pti15_16"/> * &lt;enumeration value="alteredDestination"/> * &lt;enumeration value="pti15_255"/> * &lt;enumeration value="undefinedRoutePoint"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "RoutePointTypeEnumeration") @XmlEnum public enum RoutePointTypeEnumeration { @XmlEnumValue("pti15_0") PTI_15_0("pti15_0"), @XmlEnumValue("unknown") UNKNOWN("unknown"), @XmlEnumValue("pti15_1") PTI_15_1("pti15_1"), @XmlEnumValue("startPoint") START_POINT("startPoint"), @XmlEnumValue("pti15_2") PTI_15_2("pti15_2"), @XmlEnumValue("destination") DESTINATION("destination"), @XmlEnumValue("pti15_3") PTI_15_3("pti15_3"), @XmlEnumValue("stop") STOP("stop"), @XmlEnumValue("pti15_4") PTI_15_4("pti15_4"), @XmlEnumValue("via") VIA("via"), @XmlEnumValue("pti15_5") PTI_15_5("pti15_5"), @XmlEnumValue("notStopping") NOT_STOPPING("notStopping"), @XmlEnumValue("pti15_6") PTI_15_6("pti15_6"), @XmlEnumValue("temporaryStop") TEMPORARY_STOP("temporaryStop"), @XmlEnumValue("pti15_7") PTI_15_7("pti15_7"), @XmlEnumValue("temporarilyNotStopping") TEMPORARILY_NOT_STOPPING("temporarilyNotStopping"), @XmlEnumValue("pti15_8") PTI_15_8("pti15_8"), @XmlEnumValue("exceptionalStop") EXCEPTIONAL_STOP("exceptionalStop"), @XmlEnumValue("pti15_9") PTI_15_9("pti15_9"), @XmlEnumValue("additionalStop") ADDITIONAL_STOP("additionalStop"), @XmlEnumValue("pti15_10") PTI_15_10("pti15_10"), @XmlEnumValue("requestStop") REQUEST_STOP("requestStop"), @XmlEnumValue("pti15_11") PTI_15_11("pti15_11"), @XmlEnumValue("frontTrainDestination") FRONT_TRAIN_DESTINATION("frontTrainDestination"), @XmlEnumValue("pti15_12") PTI_15_12("pti15_12"), @XmlEnumValue("rearTrainDestination") REAR_TRAIN_DESTINATION("rearTrainDestination"), @XmlEnumValue("pti15_13") PTI_15_13("pti15_13"), @XmlEnumValue("throughServiceDestination") THROUGH_SERVICE_DESTINATION("throughServiceDestination"), @XmlEnumValue("pti15_14") PTI_15_14("pti15_14"), @XmlEnumValue("notVia") NOT_VIA("notVia"), @XmlEnumValue("pti15_15") PTI_15_15("pti15_15"), @XmlEnumValue("alteredStartPoint") ALTERED_START_POINT("alteredStartPoint"), @XmlEnumValue("pti15_16") PTI_15_16("pti15_16"), @XmlEnumValue("alteredDestination") ALTERED_DESTINATION("alteredDestination"), @XmlEnumValue("pti15_255") PTI_15_255("pti15_255"), @XmlEnumValue("undefinedRoutePoint") UNDEFINED_ROUTE_POINT("undefinedRoutePoint"); private final String value; RoutePointTypeEnumeration(String v) { value = v; } public String value() { return value; } public static RoutePointTypeEnumeration fromValue(String v) { for (RoutePointTypeEnumeration c: RoutePointTypeEnumeration.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
81c9349e1ffe051b869bf42c8c6f393074971649
323361b2828d61b0c17391aca5b6d3014dee2d4d
/openidm-webapp/src/main/java/org/openidmframework/web/config/ConfigBeansWeb.java
2b5a12c91d9ba14288391a3db58e9573feb712d9
[ "Apache-2.0" ]
permissive
sauloaalmeida/openidm
3d39e00f89dfdddf825e36b3ae84d6f205695cb4
79c78693ad8484b83f3d8fcc24332db40dc6d0a5
refs/heads/master
2021-01-10T20:04:42.403183
2015-01-27T11:23:42
2015-01-27T11:23:42
29,816,869
0
0
null
null
null
null
UTF-8
Java
false
false
750
java
package org.openidmframework.web.config; /* import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.view.JstlView; import org.springframework.web.servlet.view.UrlBasedViewResolver; @Configuration @ComponentScan(basePackages = "br.com.infowhere") */ public class ConfigBeansWeb { /* @Bean public UrlBasedViewResolver setupViewResolver() { UrlBasedViewResolver resolver = new UrlBasedViewResolver(); resolver.setPrefix("/WEB-INF/views/"); resolver.setSuffix(".jsp"); resolver.setViewClass(JstlView.class); return resolver; } */ }
a019b9348c3d273b396b3dc25dad0dee9595a64a
2fd7166256aa0d48fde8511284cb32bc230ca836
/OOP/RectangleAbstract.java
5e2f3d49fab2c614a5b78ed20235e99e8f7a8f7a
[]
no_license
sourabhpatidar38/Core-java
86d7ac772dd5c81096a050b9d60b74752cf20d7b
bc0073d0036c4477877436a9babee2d586a1c3a9
refs/heads/master
2023-06-28T23:17:22.608203
2021-07-30T11:39:03
2021-07-30T11:39:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
536
java
package com.sourabhproject.oop; public class RectangleAbstract extends ShapeAbstract{ private int length = 0; private int width = 0; public RectangleAbstract() {} public RectangleAbstract(int a, int b) { length = a; width = b; } public int getLength() { return length; } public void setLength(int length) { this.length = length; } public int getWidth() { return width; } public void setWidth(int width) { this.width = width; } public double area() { double ar = length * width; return ar; } }
8f4dcef07db5dc0c40bbadc19fb62b492a751b18
40aee6efbea7296eefb323ece339715a56021952
/src/crawler/src/java/com/leancog/crawl/SfdcDataSourceFactory.java
c2fbbd85273ef8473c181be073de9fc66978594c
[]
no_license
pureyang/SfdcCrawler
47827f05525b7a37b0286145b4b5eacbde834118
9e9c1a84b88432c38769792403c50cfa4d76b45a
refs/heads/master
2021-03-27T20:53:38.696228
2013-11-20T05:27:09
2013-11-20T05:27:09
6,258,250
0
0
null
null
null
null
UTF-8
Java
false
false
1,939
java
package com.leancog.crawl; import java.util.Map; import com.lucid.admin.collection.datasource.DataSource; import com.lucid.admin.collection.datasource.FieldMapping; import com.lucid.admin.collection.datasource.FieldMappingUtil; import com.lucid.crawl.CrawlDataSource; import com.lucid.crawl.CrawlerController; import com.lucid.crawl.DataSourceFactory; import com.lucid.crawl.DataSourceFactoryException; /** * Sfdc data source factory responsible for reporting the list * of supported data source types and for the creation of data source instances * from a map of parameters. Most of this happens in {@link DataSourceFactory}, * here we just need to initialize the list of supported types and their * specifications. */ public class SfdcDataSourceFactory extends DataSourceFactory { public SfdcDataSourceFactory(CrawlerController cc) { super(cc); // map type names to specifications types.put("salesforce", new SfdcSpec()); // map names to implementation classes impls.put("salesforce", CrawlDataSource.class); // everything else (instantiation, validation, etc) is // handled by the magic of DataSourceFactory } /** * Override this method to perform some other data source initialization. * Here we initialize the field mapping properties with some default mappings. */ @Override public DataSource create(Map<String, Object> m, String collection) throws DataSourceFactoryException { // TODO Auto-generated method stub DataSource ds = super.create(m, collection); Map<String,Object> mapping = (Map<String,Object>)m.get(DataSource.FIELD_MAPPING); if (mapping != null && !mapping.isEmpty()) { // deserialize & set as overrides FieldMapping.fromMap(ds.getFieldMapping(), mapping); } // overlay with the default Tika mappings FieldMappingUtil.addTikaFieldMapping(ds.getFieldMapping(), ds.getCollection(), false); return ds; } }
140ca7ed87dffd45a4a94b80375e85d929b76bf5
fa01087bb5eb9ed7b382454564b2bff8bcfd7dd3
/java/src/main/java/online/leetcode/Fibonacci.java
740c5d288825825c9098ed2c058fc07db9ca2e1b
[]
no_license
htbkoo/java
bdeec81c4a3702c281d9a085cc2c222b8643a11f
fa9f3ffeb4cb706c980a0419a3f12240838217ee
refs/heads/master
2022-06-23T19:58:56.442937
2020-10-14T08:50:54
2020-10-14T08:50:54
70,448,095
1
0
null
2022-01-04T16:32:33
2016-10-10T03:20:15
Java
UTF-8
Java
false
false
1,134
java
package online.leetcode; /* https://leetcode.com/problems/fibonacci-number/ The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That is, F(0) = 0, F(1) = 1 F(N) = F(N - 1) + F(N - 2), for N > 1. Given N, calculate F(N). Example 1: Input: 2 Output: 1 Explanation: F(2) = F(1) + F(0) = 1 + 0 = 1. Example 2: Input: 3 Output: 2 Explanation: F(3) = F(2) + F(1) = 1 + 1 = 2. Example 3: Input: 4 Output: 3 Explanation: F(4) = F(3) + F(2) = 2 + 1 = 3. Note: 0 ≤ N ≤ 30. */ public class Fibonacci { static class Solution { public int fib(int N) { if (N == 0) { return 0; } else if (N == 1) { return 1; } else { int minus2 = 0, minus1 = 1, sum = 1; while (N > 1) { sum = minus2 + minus1; minus2 = minus1; minus1 = sum; N--; } return sum; } } } }
ae9521b1287b8475c7b04941c060c3c06c5a2822
fc56ac78ea7081dd13fb58d1a66718e121005d6a
/src/main/java/com/exe/itwillTour/ItwillTourController12_ok.java
bc3ca79132ee0c682d461d4460b381ceb504af2d
[]
no_license
greetoss/itwillTour
b57646e8a9832b76752ee5b16a6d0b64d7c2e1c2
8a2f1c0300b91c960522ca4c888a44797f0cbfb7
refs/heads/main
2023-02-17T09:51:08.041426
2021-01-07T14:59:04
2021-01-07T14:59:04
326,011,589
0
0
null
null
null
null
UTF-8
Java
false
false
894
java
package com.exe.itwillTour; import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; import com.exe.itwillTourService.ItwillTourService12_ok; @Controller public class ItwillTourController12_ok { @Autowired ItwillTourService12_ok serv; @RequestMapping ("/itwillTour12_ok") public String itwillTour12_ok (Model model) { //test String subject = "테스트3"; //test model.addAttribute("noticeCon", serv.getNoticeCon(subject)); return "/itwillTour10to19/itwillTour12_ok"; } }
320f4b9c9046cc932f671a5094187539030853a0
6d2739c5040279b5fe60438e457574410fc8ba63
/KG2020_G41_Task2/src/com/slenS/Main.java
04339085943425a3267f5434f9306c9413cfe733
[]
no_license
SlenSL/KG2020_G41_Task2
1818155b080f694c0184805fb5b01a49f412dae0
2e899f401ca54f96238a2a1eea2a224ffa807159
refs/heads/master
2023-01-02T05:38:18.784410
2020-10-23T21:21:29
2020-10-23T21:21:29
296,353,889
0
0
null
null
null
null
UTF-8
Java
false
false
371
java
package com.slenS; import com.slenS.graphics.MainWindow; import javax.swing.*; public class Main { public static void main(String[] args) { MainWindow mainWindow = new MainWindow(); mainWindow.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); mainWindow.setSize(800,600); mainWindow.setVisible(true); } }
58437a6dbed932c9e5f530dbd75c27f5c16c9f67
6c1b893d175d0644dd8d5d257d898eb1768e98f0
/design-patterns/Factory/src/main/java/com/ftfetter/sandbox/designpatterns/factory/races/Race.java
ea02eb92a62b344bd5ee1612256450a60bd20ebc
[]
no_license
ftfetter/sandbox-java
84a7d682d2c70552ef1eb70329c60b505f668029
c3ad3a46b60b0f1bde18cd3eee8e1fbd263c210b
refs/heads/master
2021-06-25T12:45:48.711793
2018-08-09T01:49:04
2018-08-09T01:49:04
95,563,678
0
0
null
null
null
null
UTF-8
Java
false
false
192
java
package com.ftfetter.sandbox.designpatterns.factory.races; import com.ftfetter.sandbox.designpatterns.factory.classes.Class; public interface Race { Class getClass(String className); }
5869c64247de2893ec8585465e0d17936a39f25f
f5a2705c96c93029a5bc8d9ebcb1ccf6525a8406
/app/src/androidTest/java/com/mark_brennan/celebrityguess/ApplicationTest.java
0568a9e9e9b8474c47943935b2aa930dc6fe18ca
[]
no_license
markdbrennan/CelebrityGuess
8c9f1930fae4a3223558a43158c72de5af2c812d
07b733582203686474b42896de8ccb44f92dde0c
refs/heads/master
2020-12-24T12:29:52.413167
2016-11-06T13:18:41
2016-11-06T13:18:41
72,991,866
0
0
null
null
null
null
UTF-8
Java
false
false
362
java
package com.mark_brennan.celebrityguess; 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); } }
209d26453b682679e76ecf6aae31fa642f2f10b0
ac7e916a54afb8c42e2122373e54d79bf1bf9137
/src/main/java/com/example/demo/model/Personne.java
4510edfcb06e2304f340d35309867e28920554f6
[]
no_license
Kyo-A/springboot
dfc4cfe1391ef1e96efece586b058032d953a91f
00c5e688bad2e577c9d4341dc115895d021f2040
refs/heads/main
2023-08-19T09:05:43.114410
2021-10-11T08:51:15
2021-10-11T08:51:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,424
java
package com.example.demo.model; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import com.example.demo.dto.PersonneDto; // TODO: Auto-generated Javadoc /** * The Class Personne. * * @author Damien Monchaty */ @Entity @Table(name = "personnes") public class Personne implements Serializable { /** The num. */ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long num; /** The nom. */ @Column(name = "nom", nullable = false) private String nom; /** The prenom. */ @Column(name = "prenom", nullable = false) private String prenom; /** * Instantiates a new personne. */ public Personne() { } /** * Instantiates a new personne. * * @param personneDto the personne dto */ public Personne(PersonneDto personneDto) { this.setNum(personneDto.getNum()); this.setNom(personneDto.getNom()); this.setPrenom(personneDto.getPrenom()); } /** * Instantiates a new personne. * * @param num the num * @param nom the nom * @param prenom the prenom */ public Personne(Long num, String nom, String prenom) { super(); this.num = num; this.nom = nom; this.prenom = prenom; } /** * Instantiates a new personne. * * @param nom the nom * @param prenom the prenom */ public Personne(String nom, String prenom) { this.nom = nom; this.prenom = prenom; } /** * Gets the num. * * @return the num */ public Long getNum() { return num; } /** * Sets the num. * * @param num the new num */ public void setNum(Long num) { this.num = num; } /** * Gets the nom. * * @return the nom */ public String getNom() { return nom; } /** * Sets the nom. * * @param nom the new nom */ public void setNom(String nom) { this.nom = nom; } /** * Gets the prenom. * * @return the prenom */ public String getPrenom() { return prenom; } /** * Sets the prenom. * * @param prenom the new prenom */ public void setPrenom(String prenom) { this.prenom = prenom; } /** * To string. * * @return the string */ @Override public String toString() { return "Personne [num=" + num + ", nom=" + nom + ", prenom=" + prenom + "]"; } /** * Hash code. * * @return the int */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((nom == null) ? 0 : nom.hashCode()); result = prime * result + ((num == null) ? 0 : num.hashCode()); result = prime * result + ((prenom == null) ? 0 : prenom.hashCode()); return result; } /** * Equals. * * @param obj the obj * @return true, if successful */ @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Personne other = (Personne) obj; if (nom == null) { if (other.nom != null) return false; } else if (!nom.equals(other.nom)) return false; if (num == null) { if (other.num != null) return false; } else if (!num.equals(other.num)) return false; if (prenom == null) { if (other.prenom != null) return false; } else if (!prenom.equals(other.prenom)) return false; return true; } }
a1145e072eba5745a2b5ef9ac7ddd646fe6181d5
ec7630c1c96e1bea0d8fdd6d85aab3be32c07809
/src/main/java/consul/model/health/Check.java
c9bacb6ce7f38bcf774f5084bbfda668110deccb
[ "MIT" ]
permissive
Tradeshift/elasticsearch-consul-discovery
fb27572c86e1576b58d60c324fa4ecf32ce4837e
cff5b4d087a3f6db7c1bde8f891e4e61cf4d4d19
refs/heads/master
2023-04-02T19:19:55.814563
2022-06-02T13:35:46
2022-06-02T13:35:46
53,117,786
1
6
NOASSERTION
2023-03-29T10:53:07
2016-03-04T07:52:02
Java
UTF-8
Java
false
false
6,036
java
package consul.model.health; /** * Copyright © 2015 Lithium Technologies, Inc. All rights reserved subject to the terms of * the MIT License located at * <p/> * <p/> * LICENSE FILE DISCLOSURE STATEMENT AND COPYRIGHT NOTICE This LICENSE.txt file sets forth * the general licensing terms and attributions for the “Elasticsearch Consul Discovery * plugin” project software provided by Lithium Technologies, Inc. (“Lithium”). This * software is based upon certain software files authored by Grant Rodgers in 2015 as part * of the “Elasticsearch SRV discovery plugin” project. As a result, some of the files in * this Elasticsearch Consul Discovery plugin” project software are wholly authored by * Lithium, some are wholly authored by Grant Rodgers, and others are originally authored * by Grant Rodgers and subsequently modified by Lithium. Files that were either modified * or wholly authored by Lithium contain an additional LICENSE.txt file indicating whether * they were modified or wholly authored by Lithium. Any LICENSE.txt files, copyrights or * attribution originally included in the files of the original “Elasticsearch SRV * discovery plugin” remain unchanged. Copyright Notices The following copyright notice * applies to only those files and modifications authored by Lithium: Copyright © 2015 * Lithium Technologies, Inc. All rights reserved subject to the terms of the MIT License * below. The following copyright notice applies to only those files in the original * “Elasticsearch SRV discovery plugin” project software excluding any modifications by * Lithium: Copyright (c) 2015 Grant Rodgers License The following MIT License, as * originally presented in the “Elasticsearch SRV discovery plugin” project software, also * applies to files authored or modified by Lithium. Your use of the “Elasticsearch * Consul Discovery plugin” project software is therefore subject to the terms of the * following MIT License. Except as may be granted herein or by separate express written * agreement, this file provides no license to any Lithium patents, trademarks, * copyrights, or other intellectual property. MIT License 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. * <p/> * <p/> * <p/> * Created by Jigar Joshi on 8/9/15. */ public class Check { private String CheckID; private String Name; private String Node; private String Notes; private String Output; private String ServiceID; private String ServiceName; private String Status; public String getCheckID() { return CheckID; } public void setCheckID(String CheckID) { this.CheckID = CheckID; } public String getName() { return Name; } public void setName(String Name) { this.Name = Name; } public String getNode() { return Node; } public void setNode(String Node) { this.Node = Node; } public String getNotes() { return Notes; } public void setNotes(String Notes) { this.Notes = Notes; } public String getOutput() { return Output; } public void setOutput(String Output) { this.Output = Output; } public String getServiceID() { return ServiceID; } public void setServiceID(String ServiceID) { this.ServiceID = ServiceID; } public String getServiceName() { return ServiceName; } public void setServiceName(String ServiceName) { this.ServiceName = ServiceName; } public String getStatus() { return Status; } public void setStatus(String Status) { this.Status = Status; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Check check = (Check) o; if (CheckID != null ? !CheckID.equals(check.CheckID) : check.CheckID != null) return false; if (Name != null ? !Name.equals(check.Name) : check.Name != null) return false; if (Node != null ? !Node.equals(check.Node) : check.Node != null) return false; if (Notes != null ? !Notes.equals(check.Notes) : check.Notes != null) return false; if (Output != null ? !Output.equals(check.Output) : check.Output != null) return false; if (ServiceID != null ? !ServiceID.equals(check.ServiceID) : check.ServiceID != null) return false; if (ServiceName != null ? !ServiceName.equals(check.ServiceName) : check.ServiceName != null) return false; if (Status != null ? !Status.equals(check.Status) : check.Status != null) return false; return true; } @Override public int hashCode() { int result = CheckID != null ? CheckID.hashCode() : 0; result = 31 * result + (Name != null ? Name.hashCode() : 0); result = 31 * result + (Node != null ? Node.hashCode() : 0); result = 31 * result + (Notes != null ? Notes.hashCode() : 0); result = 31 * result + (Output != null ? Output.hashCode() : 0); result = 31 * result + (ServiceID != null ? ServiceID.hashCode() : 0); result = 31 * result + (ServiceName != null ? ServiceName.hashCode() : 0); result = 31 * result + (Status != null ? Status.hashCode() : 0); return result; } }
c1739a2423f19ad66e877d33404e7c3320c82a21
e7f2da06d8be42f5c8d2e1802f5ce70c5fd2e2fb
/src/bankomat/main/Main.java
92c369362542312c9defb1f62deb8262952ceb39
[]
no_license
Feri1987/bankomat
4afba8bd6ef9c755ad317605257df7689e4b1156
9856ec7511ced1944956dd72953c95c52e84fc3c
refs/heads/master
2020-09-01T02:42:44.913628
2019-11-04T04:05:24
2019-11-04T04:05:24
218,860,881
0
0
null
null
null
null
UTF-8
Java
false
false
888
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 bankomat.main; import bankomat.startPoint.BankomatStart; import java.io.FileInputStream; import java.util.logging.LogManager; import java.util.logging.Logger; /** * * @author Denis */ public class Main { public static Logger LOGGER; static { try (FileInputStream ins = new FileInputStream("src/bankomat/logger.properties")) { LogManager.getLogManager().readConfiguration(ins); LOGGER = Logger.getLogger(Main.class.getName()); } catch (Exception ignore) { ignore.printStackTrace(); } } public static void main(String[] args) { BankomatStart start = new BankomatStart(); start.start(); } }
7a5650c26f6a57c2f692828af4f096a9eb9e58ec
9923e30eb99716bfc179ba2bb789dcddc28f45e6
/swagger-codegen/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/AssetReeferResponseReeferStatsFuelPercentage.java
5bb99d6dc3c2ccb623e022064675d1c312246dfb
[]
no_license
silverspace/samsara-sdks
cefcd61458ed3c3753ac5e6bf767229dd8df9485
c054b91e488ab4266f3b3874e9b8e1c9e2d4d5fa
refs/heads/master
2020-04-25T13:16:59.137551
2019-03-01T05:49:05
2019-03-01T05:49:05
172,804,041
2
0
null
null
null
null
UTF-8
Java
false
false
2,698
java
package io.swagger.model; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import javax.validation.constraints.*; import io.swagger.annotations.*; import java.util.Objects; import javax.xml.bind.annotation.*; public class AssetReeferResponseReeferStatsFuelPercentage { private Long changedAtMs = null; private Long fuelPercentage = null; /** * Timestamp in Unix milliseconds since epoch. **/ public AssetReeferResponseReeferStatsFuelPercentage changedAtMs(Long changedAtMs) { this.changedAtMs = changedAtMs; return this; } @ApiModelProperty(example = "1453449599999", value = "Timestamp in Unix milliseconds since epoch.") @JsonProperty("changedAtMs") public Long getChangedAtMs() { return changedAtMs; } public void setChangedAtMs(Long changedAtMs) { this.changedAtMs = changedAtMs; } /** * Fuel percentage of the reefer. **/ public AssetReeferResponseReeferStatsFuelPercentage fuelPercentage(Long fuelPercentage) { this.fuelPercentage = fuelPercentage; return this; } @ApiModelProperty(example = "99", value = "Fuel percentage of the reefer.") @JsonProperty("fuelPercentage") public Long getFuelPercentage() { return fuelPercentage; } public void setFuelPercentage(Long fuelPercentage) { this.fuelPercentage = fuelPercentage; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AssetReeferResponseReeferStatsFuelPercentage assetReeferResponseReeferStatsFuelPercentage = (AssetReeferResponseReeferStatsFuelPercentage) o; return Objects.equals(changedAtMs, assetReeferResponseReeferStatsFuelPercentage.changedAtMs) && Objects.equals(fuelPercentage, assetReeferResponseReeferStatsFuelPercentage.fuelPercentage); } @Override public int hashCode() { return Objects.hash(changedAtMs, fuelPercentage); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AssetReeferResponseReeferStatsFuelPercentage {\n"); sb.append(" changedAtMs: ").append(toIndentedString(changedAtMs)).append("\n"); sb.append(" fuelPercentage: ").append(toIndentedString(fuelPercentage)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
fe13b920663ee7cfae78d9f7c5e52a3883f5a8f5
37c6c74ca17b01b3bf6cb8c516c2f9abb2a58faa
/src/main/java/com/matrix/BeanProfileApplication.java
50534c49fdbfdf30b0a436bbf3282ae4a38e30be
[ "Apache-2.0" ]
permissive
PowerYangcl/api-matrix-web
2d5711caca3e47b03d487ee76ccbcbafad7374ad
0f67bd5d26ecf2f87e6e422325d03bae3f3f86df
refs/heads/main
2023-03-25T02:21:03.431811
2021-01-22T03:00:47
2021-01-22T03:00:47
315,907,774
0
2
null
null
null
null
UTF-8
Java
false
false
1,956
java
package com.matrix; import com.matrix.entity.Cat; import com.matrix.entity.Dog; import com.matrix.entity.People; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; //@Configuration public class BeanProfileApplication { public static void main(String[] args) { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); context.getEnvironment().setActiveProfiles("cat-lover"); context.register(BeanProfileApplication.class); context.refresh(); People people = context.getBean("people", People.class); System.out.println(people.getName()); people.getCat().shout(); people.getDog().shout(); } @Profile("dog-lover") @Bean(name = "people") public People initDogLoverPeople(@Value("爱狗人士")String name) { People people = new People(); people.setName(name); return people; } @Profile("cat-lover") @Bean(name = "people") public People initCatLoverPeople(@Value("爱猫人士")String name) { People people = new People(); people.setName(name); return people; } @Profile("bird-lover") @Bean(name = "people") public People initBirdLoverPeople(@Value("爱鸟儿人士")String name) { People people = new People(); people.setName(name); return people; } @Bean public Dog initDog() { return new Dog(); } @Bean public Cat initCat() { return new Cat(); } } /** People master = context.getBean("initPeople", People.class); master.getCat().shout(); master.getDog().shout(); System.out.println(master.getName()); @Bean(name = "people") public People initPeople(@Value("青铜时代号")String name) { People people = new People(); people.setName(name); return people; } */
1d7b396c91ff3d687afdfeaba68748808858c379
9b4b990a5a22ed7581d7da98105af52fb6ace42d
/gs-serving-web-content-complete/src/main/java/com/redeyedmars/app/service/LoginController.java
b38360dda48158bc2e00b373d293b8842a801ee1
[]
no_license
RedEyedMars/GeoSpring
4d685a5f8f6d488023d5770526f55bfbf63b2a8c
59ffb2c425de2c3f5ac63831284e9470b8dca3f8
refs/heads/master
2020-09-16T04:31:21.484919
2019-11-30T07:24:14
2019-11-30T07:24:14
223,654,020
0
0
null
null
null
null
UTF-8
Java
false
false
1,685
java
package com.redeyedmars.app.service; import com.redeyedmars.app.service.messages.ChatMessage; import com.redeyedmars.app.service.messages.LoginReply; import com.redeyedmars.app.service.messages.LoginMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.handler.annotation.MessageMapping; import org.springframework.messaging.handler.annotation.Payload; import org.springframework.messaging.handler.annotation.SendTo; import org.springframework.messaging.simp.SimpMessageHeaderAccessor; import org.springframework.messaging.simp.SimpMessageSendingOperations; import org.springframework.messaging.simp.SimpMessagingTemplate; import org.springframework.stereotype.Controller; @Controller public class LoginController { private static final Logger logger = LoggerFactory.getLogger(WebSocketEventListener.class); @Autowired private SimpMessagingTemplate template; @MessageMapping("/chat.login") public void addUser(@Payload LoginMessage loginMessage, SimpMessageHeaderAccessor headerAccessor) { logger.info("Received a new chat user:"+headerAccessor.getUser().getName()); // Add username in web socket session headerAccessor.getSessionAttributes().put("username", loginMessage.getSender()); if(true) { LoginReply reply = new LoginReply(); reply.setType(LoginReply.MessageType.FAIL); reply.setError(LoginReply.FailureType.CREDS); template.convertAndSendToUser(headerAccessor.getUser().getName(),"/queue/login", reply); } } }
9e7fc8fd3761bac2219ccc6fe08381dfde16b15e
fb12e01db8111bc661ad6ff766f1190ebd018c1c
/src/main/java/com/syz/community/model/GithubUser.java
712a7da0258eeadc6b28468313c5182990d1cdb5
[]
no_license
suyizhen-source/community
0e58083465a8b114c08aaf8019c4c9ba87066e0d
0bfbdd039f6ff6d0c12d0afca6e7e7f4bfdae222
refs/heads/main
2023-04-12T21:32:35.111214
2021-05-09T10:47:50
2021-05-09T10:47:50
345,004,802
0
0
null
null
null
null
UTF-8
Java
false
false
189
java
package com.syz.community.model; import lombok.Data; @Data public class GithubUser { private String name; private Long id; private String bio; private String avatarUrl; }
ffaf65a91b275021440c302e5a878a86a10fd268
02e77032b8a8b9c66dd0d6e1320622363733daac
/src/node.java
1eb49d4213fe525791e3c7477f17400d0e6d7edd
[]
no_license
elena-ramezani/Inventory_System
1dc067588d206531e628d99d8a1b0abc8e246f94
19af1d7ec05e1494b97659173aba713e6d12a273
refs/heads/master
2021-06-20T20:23:03.775007
2017-06-24T02:18:53
2017-06-24T02:18:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
590
java
public class node< K extends Comparable<K>, V > { private K key; private V value; private node<K,V> left; private node<K,V> right; private boolean red; private boolean black ; node(K keyarg, V valarg){ key = keyarg; value = valarg; left = null; right = null; red = true; black = false; } public boolean containskey(K keyarg){ node tmp = this; while (tmp != null) { if (keyarg.compareTo((K) tmp.key) == 0) return true; } return false; } }
a510b434c6e28d48ad31bc8ec0425a300b93fdad
596dfe48511cc2e203251750fa8e1f756fb41a0e
/src/main/java/nl/rutgerkok/climatechanger/util/MathUtil.java
debeb63b696574761511e5bb23a9611f25092e45
[ "LicenseRef-scancode-public-domain" ]
permissive
rutgerkok/ClimateChanger
f498ded406d16e867bfb8160452ae1e9d8252b5b
4fd23016f848e215ad6e8d363c0ae8c3c12a303c
refs/heads/master
2022-06-14T06:11:13.202160
2022-06-08T18:06:19
2022-06-08T18:06:19
13,810,527
1
2
null
2021-05-30T16:00:16
2013-10-23T18:02:53
Java
UTF-8
Java
false
false
1,756
java
package nl.rutgerkok.climatechanger.util; /** * Methods for performing mathematicial calculations. * */ public final class MathUtil { private static float[] sinCache = new float[65536]; static { for (int i = 0; i < 65536; i++) { sinCache[i] = (float) Math.sin(i * Math.PI * 2.0 / sinCache.length); } } public static float cos(float radians) { return sinCache[((int) (radians * 10430.378F + 16384.0F) & 0xFFFF)]; } /** * Returns the largest (closest to positive infinity) double value that is * less than or equal to the argument and is equal to a mathematical * integer. So 2.999 -> 2, 0.123 -> 0, -0.14235 -> -1. * <p> * Special cases: * * <ul> * <li>If the argument value is already equal to a mathematical integer, * then the result is the same as the argument.</li> * <li>If the argument is NaN or an infinity or positive zero or negative * zero, then the result is the same as the argument.</li> * </ul> * * @param num * The number to floor. * @return The floored number. */ public static int floor(double num) { if (num >= 0) { // 10.1 -> 10 // 10.0 -> 10 // 9.9 -> 9 return (int) num; } else { // Subtracting 0.999999 is more reliable than subtracting 1: // -3.1 -> -4.099999 -> -4 // -3.0 -> -3.999999 -> -3 // -2.9 -> -3.899999 -> -3 return (int) (num - 0.999999); } } public static float sin(float radians) { return sinCache[((int) (radians * 10430.378F) & 0xFFFF)]; } private MathUtil() { // No instances } }
40df906b38fb0d928ae663c7339be4f601f6b6e5
a1c0c5966600f5ec07ea47cd72ec87ae262211bf
/masterprojectfinal/src/main/java/com/webcore/app/loan/main/ServletInitializer.java
b9794697a2e6e2ed0e57067406dd6ebd8acf1cf1
[]
no_license
PersonalLoan-B113/TeamShyamMS
b86da10adeed12a253a30f01882f3577c6d81b39
2bf3be187901c2f1106f81fc2070e87f5cc8df89
refs/heads/master
2023-08-04T15:02:28.688683
2020-03-01T05:26:18
2020-03-01T05:26:18
241,365,157
0
0
null
2023-07-23T06:02:25
2020-02-18T13:16:30
Java
UTF-8
Java
false
false
427
java
package com.webcore.app.loan.main; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; public class ServletInitializer extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(MasterprojectfinalApplication.class); } }
7c43561209217a872dcbb7bb88124602d8ebe3a1
4cfea6f03b4bf01681c89ce39e84837e4f9b787e
/SmartRHomes/src/main/java/com/smartrhomes/greendata/dao/Column.java
c23b41f502ea990c46fe395233d1544b402b3fc9
[]
no_license
gaurava/masaqali
6d76f495ff0f695d01ed6fb23404992bbba0e1c0
3f27bde81deb78ed5ee26e64ea4ae62369761a28
refs/heads/master
2016-09-09T20:30:44.749320
2013-09-01T15:27:17
2013-09-01T15:27:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,134
java
package com.smartrhomes.greendata.dao; /** * @author "Gaurava Srivastava" * * @param <T> */ public class Column<T> { private final String columnName; private final T columnValue; private DataType dataType; //expires never private int ttl=-1; public Column(String columnName, T columnValue) { this(columnName, columnValue,null); } public Column(String columnName, T columnValue, DataType dataType) { this.columnName = columnName; this.columnValue = columnValue; if(dataType!=null){ this.dataType = dataType; }else{ if(columnValue instanceof String){ this.dataType = DataType.StringType; }else if (columnValue instanceof Long) { this.dataType = DataType.LongType; }else if(columnValue instanceof byte[]){ this.dataType = DataType.ByteType; }else if(columnValue instanceof Boolean){ this.dataType = DataType.BooleanType; }else if(columnValue instanceof Double){ this.dataType = DataType.DoubleType; } } } public Column(String columnName, T columnValue, DataType dataType,int ttl) { this(columnName,columnValue,dataType); this.ttl = ttl; } public String getColumnName() { return columnName; } public T getColumnValue() { return columnValue; } public DataType getDataType() { return dataType; } public int getTtl(){ return this.ttl; } @Override public boolean equals(Object obj) { String col = ((Column<T>)obj).columnName; return this.columnName.equals(col); } @Override public int hashCode() { int r = 17*columnName.hashCode(); return r+(this.columnValue.hashCode()*37); } @Override public String toString() { return "Column{" + "columnName='" + columnName + '\'' + ", columnValue=" + columnValue + ", dataType=" + dataType + ", ttl=" + ttl + '}'; } }
a80f36e9cee673b70199eae40ee83e17871011d3
9f313c9a1e93d0f9859a6749dd3a1bb73dbafa5a
/src/test/java/com/template/PageObjectManager.java
3d8eab11b9802471a3638594af375552ff7e07ad
[]
no_license
WWienckowski/Cucumber-Template
b685a73172bf4a4300e41fb724f0b4cd8a465eee
4328ebf41e67ff33b3f0b339e980b04ed5fe3b05
refs/heads/master
2021-07-08T21:32:22.761583
2019-10-11T16:49:22
2019-10-11T16:49:22
199,888,472
0
1
null
2019-10-02T18:06:14
2019-07-31T16:03:42
Java
UTF-8
Java
false
false
1,297
java
package com.template; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.ui.WebDriverWait; import com.template.page_objects.BagPage; import com.template.page_objects.CheckoutPage; import com.template.page_objects.ConfirmationPage; import com.template.page_objects.Global; import com.template.page_objects.HomePage; import com.template.page_objects.ProductDetailPage; import cucumber.api.Scenario; public class PageObjectManager { public Global global; public HomePage home; public ProductDetailPage detail; public CheckoutPage checkout; public BagPage bag; public ConfirmationPage confirmation; // add each page object here and they will be instantiated when the scenario starts public PageObjectManager(WebDriver driver, WebDriverWait wait, Scenario scenario) { if (global == null) { global = new Global(driver, wait, scenario); } if (home == null) { home = new HomePage(driver, wait, scenario); } if (detail == null) { detail = new ProductDetailPage(driver, wait, scenario); } if (checkout == null) { checkout = new CheckoutPage(driver, wait, scenario); } if (bag == null) { bag = new BagPage(driver, wait, scenario); } if (confirmation == null) { confirmation = new ConfirmationPage(driver, wait, scenario); } } }
0d6235759c3cb2c55643ab3bc25b04338773238d
ff153fe8a67b3535d0aa292255c29f8ffb3760c0
/Jgrasp/PriorityQueue.java
e1532109491ed18194dfe09fb6ce09d9f1ee057d
[]
no_license
jamesnguyen92/PriorityHeap
96d471b6b28ed306b6cbe034f6b257a8585e74f1
ff352e9a7020d44720a887a3b2e3c9bb3c7688cd
refs/heads/main
2023-07-15T05:40:10.174600
2021-08-29T03:09:43
2021-08-29T03:09:43
400,938,722
0
0
null
null
null
null
UTF-8
Java
false
false
4,796
java
public class PriorityQueue { private PriorityCustomer[] heap; private int size; private PriorityCustomer serviced = null; PriorityQueue(){ //constructor heap = new PriorityCustomer[60]; size = 0; } public PriorityQueue(int s){ heap = new PriorityCustomer[s]; size = 0; } public void add(PriorityCustomer c){ if(size + 2 > heap.length){ System.out.println("The heap is full"); return; } //increase the size size++; //add new object to the next open position in heap heap[size]= c; //create a variable to keep track of the object's location in the heap int index = size; //Compare objet to it's parent until it's at the root. Using loop while(index > 1){ //get parent index int parentIndex = index/2; //if parent index is the front of the line, being serviced. no switch if(heap[parentIndex] == heap[1]){ break; } //compare object to it's parent to see if it need to be swap else if(heap[index].getPriority() > heap[parentIndex].getPriority()){ //swap objects PriorityCustomer temporary = heap[index]; //empty variable to hold object inside the index being swap out heap[index] = heap[parentIndex]; heap[parentIndex] = temporary; //place the swap index held inside the empty(hold) variable in //update index to parent index after swap index = parentIndex; } else{ //parent value is larger. break; } } } public PriorityCustomer remove(){ /*remove root take the last child and move it to the root position. swap around until the largest become the new parent ************************************************** */ //check to make sure the heap isn't already empty if(size == 0){ System.out.println(" The heap is already empty"); return null; } //temporary reference variable to store root object, to be returned later PriorityCustomer temporary = heap[1]; //move object in the last position to the root(last child) heap[1] = heap[size]; heap[size] = null; size --; // ******control statement - control how the code flows. like if, loops, etc.****** //store the index of the object we moved to the root int index = 1; //compare root to child, as long as there are child while(index <= size/2){ //store index and value of child int leftChildIndex = index * 2; int rightChildIndex = leftChildIndex +1; int leftChildValue = heap [leftChildIndex].getPriority (); int rightChildValue = Integer.MIN_VALUE; //is therea right child? if(rightChildIndex <= size){ rightChildValue = heap[rightChildIndex].getPriority(); } //determine the larger of the 2 child int largerValue; int largerIndex; if(rightChildValue > leftChildValue){ largerValue = rightChildValue; largerIndex = rightChildIndex; }else{ largerValue = leftChildValue; largerIndex = leftChildIndex; } //determine if a swap is needed between child and parent, all the way to root if(heap[index].getPriority() < largerValue){ PriorityCustomer swap = heap[index]; heap[index] = heap[largerIndex]; heap[largerIndex] = swap; //update index since it was moved to child position index = largerIndex; }else{ //parent value is larger, no swap is needed. done break; } } //return the original root return temporary; } public PriorityCustomer inServiced(){ //if nothing is in the heap, nothing can be serviced //System.out.println("the current heap size is: " + size); if( size == 0){ return null; }else{ //if something is in the heap, serviced is equal to the first of the heap serviced = heap[1]; return serviced; } } //return the size of queue public int getSize() { return size; } }
b80625e7f2fd9b9e0a0a8397efee169a2ff45df0
624b8a7a09db4032dee385ca7757281e1151d032
/java/Rec.java
fad0a336ed5bb57b09f6a409414cf21461b94db2
[]
no_license
prathibhasudarshan/Manthan-ELF-16th-Oct-PRATHIBHA-S
7282d7cbcf36763977d19913343777a807e5dc58
7b3ce08a4f812ca235d3ac43df9ecab03888af13
refs/heads/master
2020-09-16T21:35:15.149572
2019-12-09T10:18:15
2019-12-09T10:18:15
223,893,287
0
1
null
null
null
null
UTF-8
Java
false
false
188
java
class Rec { static int factt(int n) { if(n==0) { return 1; } return n*factt(n-1); } public static void main(String args[]) { int j=factt(6); System.out.println(j); } }
848b6a3892cbcd6dc03dcd15fe178799d670d89d
42fbed5ab6eff81fa6b298f7f48400cc9956ba54
/MaterialDrawer-develop/library/src/main/java/hu/py82c7/homework/model/BaseDrawerItem.java
b9af4e3b40b4647611b1810c24c303d6adc8d887
[ "Apache-2.0" ]
permissive
takilevi/android
199211fa2d4ecccd702cb33922b488b47c56628a
fd18a33a4fcf16763c4c564a5c88284b51275857
refs/heads/master
2021-05-03T21:04:19.861252
2016-12-14T20:56:08
2016-12-14T20:56:08
71,473,324
1
0
null
null
null
null
UTF-8
Java
false
false
10,301
java
package hu.py82c7.homework.model; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Build; import android.support.annotation.ColorInt; import android.support.annotation.ColorRes; import android.support.annotation.DrawableRes; import android.support.annotation.StringRes; import android.support.v7.widget.RecyclerView; import android.util.Pair; import com.mikepenz.iconics.typeface.IIcon; import hu.py82c7.homework.holder.ColorHolder; import hu.py82c7.homework.holder.ImageHolder; import hu.py82c7.homework.holder.StringHolder; import hu.py82c7.homework.model.interfaces.Iconable; import hu.py82c7.homework.model.interfaces.Nameable; import hu.py82c7.homework.model.interfaces.Tagable; import hu.py82c7.homework.model.interfaces.Typefaceable; import hu.py82c7.homework.util.DrawerUIUtils; /** * Created by mikepenz on 03.02.15. */ public abstract class BaseDrawerItem<T, VH extends RecyclerView.ViewHolder> extends AbstractDrawerItem<T, VH> implements Nameable<T>, Iconable<T>, Tagable<T>, Typefaceable<T> { protected ImageHolder icon; protected ImageHolder selectedIcon; protected StringHolder name; protected boolean iconTinted = false; protected ColorHolder selectedColor; protected ColorHolder textColor; protected ColorHolder selectedTextColor; protected ColorHolder disabledTextColor; protected ColorHolder iconColor; protected ColorHolder selectedIconColor; protected ColorHolder disabledIconColor; protected Typeface typeface = null; protected Pair<Integer, ColorStateList> colorStateList; protected int level = 1; public T withIcon(ImageHolder icon) { this.icon = icon; return (T) this; } public T withIcon(Drawable icon) { this.icon = new ImageHolder(icon); return (T) this; } public T withIcon(@DrawableRes int iconRes) { this.icon = new ImageHolder(iconRes); return (T) this; } public T withSelectedIcon(Drawable selectedIcon) { this.selectedIcon = new ImageHolder(selectedIcon); return (T) this; } public T withSelectedIcon(@DrawableRes int selectedIconRes) { this.selectedIcon = new ImageHolder(selectedIconRes); return (T) this; } public T withIcon(IIcon iicon) { this.icon = new ImageHolder(iicon); //if we are on api 21 or higher we use the IconicsDrawable for selection too and color it with the correct color //else we use just the one drawable and enable tinting on press if (Build.VERSION.SDK_INT >= 21) { this.selectedIcon = new ImageHolder(iicon); } else { this.withIconTintingEnabled(true); } return (T) this; } public T withName(StringHolder name) { this.name = name; return (T) this; } public T withName(String name) { this.name = new StringHolder(name); return (T) this; } public T withName(@StringRes int nameRes) { this.name = new StringHolder(nameRes); return (T) this; } public T withSelectedColor(@ColorInt int selectedColor) { this.selectedColor = ColorHolder.fromColor(selectedColor); return (T) this; } public T withSelectedColorRes(@ColorRes int selectedColorRes) { this.selectedColor = ColorHolder.fromColorRes(selectedColorRes); return (T) this; } public T withTextColor(@ColorInt int textColor) { this.textColor = ColorHolder.fromColor(textColor); return (T) this; } public T withTextColorRes(@ColorRes int textColorRes) { this.textColor = ColorHolder.fromColorRes(textColorRes); return (T) this; } public T withSelectedTextColor(@ColorInt int selectedTextColor) { this.selectedTextColor = ColorHolder.fromColor(selectedTextColor); return (T) this; } public T withSelectedTextColorRes(@ColorRes int selectedColorRes) { this.selectedTextColor = ColorHolder.fromColorRes(selectedColorRes); return (T) this; } public T withDisabledTextColor(@ColorInt int disabledTextColor) { this.disabledTextColor = ColorHolder.fromColor(disabledTextColor); return (T) this; } public T withDisabledTextColorRes(@ColorRes int disabledTextColorRes) { this.disabledTextColor = ColorHolder.fromColorRes(disabledTextColorRes); return (T) this; } public T withIconColor(@ColorInt int iconColor) { this.iconColor = ColorHolder.fromColor(iconColor); return (T) this; } public T withIconColorRes(@ColorRes int iconColorRes) { this.iconColor = ColorHolder.fromColorRes(iconColorRes); return (T) this; } public T withSelectedIconColor(@ColorInt int selectedIconColor) { this.selectedIconColor = ColorHolder.fromColor(selectedIconColor); return (T) this; } public T withSelectedIconColorRes(@ColorRes int selectedColorRes) { this.selectedIconColor = ColorHolder.fromColorRes(selectedColorRes); return (T) this; } public T withDisabledIconColor(@ColorInt int disabledIconColor) { this.disabledIconColor = ColorHolder.fromColor(disabledIconColor); return (T) this; } public T withDisabledIconColorRes(@ColorRes int disabledIconColorRes) { this.disabledIconColor = ColorHolder.fromColorRes(disabledIconColorRes); return (T) this; } /** * will tint the icon with the default (or set) colors * (default and selected state) * * @param iconTintingEnabled * @return */ public T withIconTintingEnabled(boolean iconTintingEnabled) { this.iconTinted = iconTintingEnabled; return (T) this; } @Deprecated public T withIconTinted(boolean iconTinted) { this.iconTinted = iconTinted; return (T) this; } /** * for backwards compatibility - withIconTinted.. * * @param iconTinted * @return */ @Deprecated public T withTintSelectedIcon(boolean iconTinted) { return withIconTintingEnabled(iconTinted); } public T withTypeface(Typeface typeface) { this.typeface = typeface; return (T) this; } public T withLevel(int level) { this.level = level; return (T) this; } public ColorHolder getSelectedColor() { return selectedColor; } public ColorHolder getTextColor() { return textColor; } public ColorHolder getSelectedTextColor() { return selectedTextColor; } public ColorHolder getDisabledTextColor() { return disabledTextColor; } public boolean isIconTinted() { return iconTinted; } public ImageHolder getIcon() { return icon; } public ImageHolder getSelectedIcon() { return selectedIcon; } public StringHolder getName() { return name; } public ColorHolder getDisabledIconColor() { return disabledIconColor; } public ColorHolder getSelectedIconColor() { return selectedIconColor; } public ColorHolder getIconColor() { return iconColor; } public Typeface getTypeface() { return typeface; } public int getLevel() { return level; } /** * helper method to decide for the correct color * * @param ctx * @return */ protected int getSelectedColor(Context ctx) { return ColorHolder.color(getSelectedColor(), ctx, hu.py82c7.homework.R.attr.material_drawer_selected, hu.py82c7.homework.R.color.material_drawer_selected); } /** * helper method to decide for the correct color * * @param ctx * @return */ protected int getColor(Context ctx) { int color; if (this.isEnabled()) { color = ColorHolder.color(getTextColor(), ctx, hu.py82c7.homework.R.attr.material_drawer_primary_text, hu.py82c7.homework.R.color.material_drawer_primary_text); } else { color = ColorHolder.color(getDisabledTextColor(), ctx, hu.py82c7.homework.R.attr.material_drawer_hint_text, hu.py82c7.homework.R.color.material_drawer_hint_text); } return color; } /** * helper method to decide for the correct color * * @param ctx * @return */ protected int getSelectedTextColor(Context ctx) { return ColorHolder.color(getSelectedTextColor(), ctx, hu.py82c7.homework.R.attr.material_drawer_selected_text, hu.py82c7.homework.R.color.material_drawer_selected_text); } /** * helper method to decide for the correct color * * @param ctx * @return */ public int getIconColor(Context ctx) { int iconColor; if (this.isEnabled()) { iconColor = ColorHolder.color(getIconColor(), ctx, hu.py82c7.homework.R.attr.material_drawer_primary_icon, hu.py82c7.homework.R.color.material_drawer_primary_icon); } else { iconColor = ColorHolder.color(getDisabledIconColor(), ctx, hu.py82c7.homework.R.attr.material_drawer_hint_icon, hu.py82c7.homework.R.color.material_drawer_hint_icon); } return iconColor; } /** * helper method to decide for the correct color * * @param ctx * @return */ protected int getSelectedIconColor(Context ctx) { return ColorHolder.color(getSelectedIconColor(), ctx, hu.py82c7.homework.R.attr.material_drawer_selected_text, hu.py82c7.homework.R.color.material_drawer_selected_text); } /** * helper to get the ColorStateList for the text and remembering it so we do not have to recreate it all the time * * @param color * @param selectedTextColor * @return */ protected ColorStateList getTextColorStateList(@ColorInt int color, @ColorInt int selectedTextColor) { if (colorStateList == null || color + selectedTextColor != colorStateList.first) { colorStateList = new Pair<>(color + selectedTextColor, DrawerUIUtils.getTextColorStateList(color, selectedTextColor)); } return colorStateList.second; } }
84313c40471c2ff1ef6186b0e1b74061ae826618
69b3f791e9fa3c5b606626ac325df172ac6128ce
/src/main/java/pojo/Person.java
b732a16c6e60beb117b80454d7710fa6930c71a1
[]
no_license
KanBen86/testmavenintellij
a2699660ebdb7a3d14a33f326fd656261b6e605c
ea2d082e29fea2e43e14529ea95aa3a8e4e9e6c2
refs/heads/master
2020-03-28T02:17:16.745533
2018-09-05T12:10:40
2018-09-05T12:10:40
147,560,314
0
0
null
null
null
null
UTF-8
Java
false
false
1,371
java
package pojo; import org.hibernate.envers.Audited; import javax.persistence.*; import java.io.Serializable; import java.time.LocalDateTime; @Entity @Table @Audited public class Person implements Serializable { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) private long id; @Column private String name; @Column private String firstname; @Column private LocalDateTime dateOfBirth; @Column private int age; @Transient private Address address; public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public LocalDateTime getDateOfBirth() { return dateOfBirth; } public void setDateOfBirth(LocalDateTime dateOfBirth) { this.dateOfBirth = dateOfBirth; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public Address getAddress() { return address; } public void setAddress(Address address) { this.address = address; } }
4ccee0fc607fc260cffc1848dba234e24158d92c
24132848ccd5612fffe662ade90c5570709e9f94
/AdventureText/src/objects/Player.java
278f15faa111c131ce2daa4ee50e0851e021e9f3
[]
no_license
JimboSwaggins/gitb
8d0f33ad2b6b17dbf004bc76beedf95e3617eb7d
04510dab7ca0754e6dab0a7767925b2045c5b9b6
refs/heads/master
2021-07-06T01:44:46.028821
2017-10-02T20:11:39
2017-10-02T20:11:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
153
java
package objects; public class Player extends Organic { public Player() { super("Jeff"); this.BaseHealth = 100; this.Health = BaseHealth; } }
406bf89a9d837e073a322550ecafd2be5b17b908
64c20d5eae6f7784cfed1a6b4e1c126c7bc04994
/app/src/main/java/com/eacpay/presenter/customviews/BRLockScreenConstraintLayout.java
c728aa0be6ac25d64a65c2d8d2ca7e3f26452e50
[ "MIT" ]
permissive
oldfeel/eacpay-android
ffb70181f4b37b3c11ddd95db81bf25eb0d320fe
ec80428f901e60cfccad1396c7cd44bd8813bddf
refs/heads/master
2023-07-16T13:49:33.133822
2021-08-30T09:44:57
2021-08-30T09:44:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,368
java
package com.eacpay.presenter.customviews; import android.content.Context; import androidx.constraintlayout.widget.ConstraintLayout; import android.util.AttributeSet; public class BRLockScreenConstraintLayout extends ConstraintLayout { public static final String TAG = BRLockScreenConstraintLayout.class.getName(); private int width; private int height; private boolean created; public BRLockScreenConstraintLayout(Context context) { super(context); init(); } public BRLockScreenConstraintLayout(Context context, AttributeSet attrs) { super(context, attrs); init(); } public BRLockScreenConstraintLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(); } private void init() { } @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { long start = System.currentTimeMillis(); super.onMeasure(widthMeasureSpec, heightMeasureSpec); int width = MeasureSpec.getSize(widthMeasureSpec); int height = MeasureSpec.getSize(heightMeasureSpec); // Correct any translations set before the measure was set } }
652e91d592b5bbffe349f419fcdd2df41000896a
88fa489bbd89608f23e8ee41033d2369977bab5d
/Trabalho 1/minijava/ast/While.java
939a1880f27bdbe1671ebe6bcc8903e3f06a4cf7
[]
no_license
estevangladstone/Compiladores-2017.1
0a1cb58912f40303f8440144d6311f1b3005b6b5
5ef0d168c6bcd1df1450f2ba59a20ef435f120d2
refs/heads/master
2021-01-23T16:05:25.732781
2017-06-24T03:21:19
2017-06-24T03:21:19
93,282,508
0
0
null
null
null
null
UTF-8
Java
false
false
307
java
package minijava.ast; public class While implements Cmd { public Exp cond; public Cmd corpo; public int lin; public While(Exp _cond, Cmd _corpo, int _lin) { cond = _cond; corpo = _corpo; lin = _lin; } public String toString() { return "while(" + cond + ") " + corpo; } }
993f7a59119d610adee8ce0447c2a3a44ba35c97
0876976acaaf4eafa78b301de3afcdf898c675df
/Bomberman/src/graphics/rooms/pauseMenu/PauseMenuRepository.java
c01f6078d16c8010817e62055371392d7cc3c73b
[ "MIT" ]
permissive
EquipoJP/SuperBomberman
ccd0502963e8e3a5775fa7dccf1432e6b7254e2f
bf956b45fd212636101d5573474f99073757c665
refs/heads/master
2021-01-18T22:46:43.775110
2016-06-02T08:23:51
2016-06-02T08:23:51
51,514,774
3
0
null
2016-04-18T10:17:54
2016-02-11T13:00:12
HTML
UTF-8
Java
false
false
1,470
java
/** * Class containing the resources for the pause menu */ package graphics.rooms.pauseMenu; import logic.Sprite; import main.Initialization; /** * @author Patricia Lazaro Tello (554309) * @author Jaime Ruiz-Borau Vizarraga (546751) */ public class PauseMenuRepository { static Sprite background = null; static Sprite titleButton = null; static Sprite continueButton = null; static Sprite quitButton = null; /** * Load the resources */ public static void load() { loadBackground(); loadTitleButton(); loadContinueButton(); loadQuitButton(); } /** * Load the background */ private static void loadBackground() { if (background == null) { background = Initialization .getSpriteFromMenu(Initialization.MENUS.BACKGROUND .toString()); } } /** * Load the title button */ private static void loadTitleButton() { if (titleButton == null) { titleButton = Initialization .getSpriteFromMenu(Initialization.MENUS.TITLE_BUTTON .toString()); } } /** * Load continue button */ private static void loadContinueButton() { if (continueButton == null) { continueButton = Initialization .getSpriteFromMenu(Initialization.MENUS.CONTINUE_BUTTON .toString()); } } /** * Load quit button */ private static void loadQuitButton() { if (quitButton == null) { quitButton = Initialization .getSpriteFromMenu(Initialization.MENUS.QUIT_BUTTON .toString()); } } }
22b819c5998895c7fdc3d27a7a6eb1cfa1c1d7f4
24cac0c883d2984f7ea26b8a15e0e6a3cff86825
/src/Models/employee.java
93af730053290aba7102e4f5435e66ca999f64da
[]
no_license
Demiana123/company
495d5ce5ce53b17edcb313862c5af0fbd8e6d089
b6bd24d1076575126e89f40da351df66690d17a2
refs/heads/master
2020-06-14T00:16:52.674363
2019-07-02T11:08:02
2019-07-02T11:08:02
194,833,360
0
0
null
null
null
null
UTF-8
Java
false
false
1,126
java
package Models; public class employee { private int employee_id; private String employee_firstname; private String employee_lastname; private String birth_date; private String hire_date; private int department_id; //constructor public employee(int employee_id,String employee_firstname,String employee_lastname,String birth_date,String hire_date,int department_id) { this.employee_id=employee_id; this.employee_firstname=employee_firstname; this.employee_lastname=employee_lastname; this.birth_date=birth_date; this.hire_date=hire_date; this.department_id=department_id; } //getters public int getEmployee_id() { return employee_id; } public String getEmployee_firstname() { return employee_firstname; } public String getEmployee_lastname() { return employee_lastname; } public String getBirth_date() { return birth_date; } public String getHire_date() { return hire_date; } public int getDepartment_id() { return department_id; } }
87a3e6f101e14dda8aa502a70128f2dc8283c04b
0eb774ffefc35cf1a0faa5ae527587859f189fab
/app/src/main/java/com/projectsecond/adapter/BaseRecyclerAdapter.java
97b22603c10d867a22941ac5f9469b42ffd7c1a2
[]
no_license
MarsKang1/ProjectSecond
71e4f660b4b1b977d51d0ce85e0ac8c68b8abfc1
fc6db538b4bfc78591f5be2f032b2df1104354f5
refs/heads/master
2021-05-16T08:20:54.751884
2017-09-19T09:13:38
2017-09-19T09:13:38
104,052,541
0
0
null
null
null
null
UTF-8
Java
false
false
5,535
java
package com.projectsecond.adapter; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.view.animation.DecelerateInterpolator; import com.projectsecond.utils.UIUtils; import java.util.ArrayList; import java.util.List; /** * RecyclerView适配器基类 */ public abstract class BaseRecyclerAdapter<T> extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements CommonHolder.OnNotifyChangeListener { public final static int TYPE_HEAD = 0; public static final int TYPE_CONTENT = 1; protected List<T> dataList = new ArrayList<>(); protected boolean animationsLocked = false; CommonHolder headHolder; ViewGroup rootView; private boolean enableHead = false; private int lastAnimatedPosition = -1; private boolean delayEnterAnimation = true; @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int position) { rootView = parent; //设置ViewHolder int type = getItemViewType(position); if (type == TYPE_HEAD) { return headHolder; } else { return setViewHolder(parent); } } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { // runEnterAnimation(holder.itemView, position); //数据绑定 if (enableHead) { if (position == 0) { ((CommonHolder) holder).bindHeadData(); } else { ((CommonHolder) holder).bindData(dataList.get(position - 1)); } } else { ((CommonHolder) holder).bindData(dataList.get(position)); } ((CommonHolder) holder).setOnNotifyChangeListener(this); } public ViewGroup getRootView() { return rootView; } @Override public int getItemCount() { if (enableHead) { return dataList.size() + 1; } return dataList.size(); } @Override public int getItemViewType(int position) { if (enableHead) { if (position == 0) { return TYPE_HEAD; } else { return TYPE_CONTENT; } } else { return TYPE_CONTENT; } } private void runEnterAnimation(View view, int position) { if (animationsLocked) return; if (position > lastAnimatedPosition) { lastAnimatedPosition = position; view.setTranslationY(UIUtils.dip2px(view.getContext(), 100));//(position+1)*50f view.setAlpha(0.f); view.animate() .translationY(0).alpha(1.f) .setStartDelay(delayEnterAnimation ? 20 * (position) : 0) .setInterpolator(new DecelerateInterpolator(2.f)) .setDuration(500) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { animationsLocked = true; } }).start(); } } @Override public void onNotify() { //提供给CommonHolder方便刷新视图 notifyDataSetChanged(); } public void setDataList(List<T> datas) { dataList.clear(); if (null != datas) { dataList.addAll(datas); } notifyDataSetChanged(); } public void clearDatas() { dataList.clear(); notifyDataSetChanged(); } /** * 添加数据到前面 */ public void addItemsAtFront(List<T> datas) { if (null == datas) return; dataList.addAll(0, datas); notifyDataSetChanged(); } /** * 添加数据到尾部 */ public void addItems(List<T> datas) { if (null == datas) return; dataList.addAll(datas); notifyDataSetChanged(); } /** * 添加单条数据 */ public void addItem(T data) { if (null == data) return; dataList.add(data); notifyDataSetChanged(); } /** * 删除单条数据 */ public void deletItem(T data) { dataList.remove(data); Log.d("deletItem: ", dataList.remove(data) + ""); notifyDataSetChanged(); } /** * 设置是否显示head * * @param ifEnable 是否显示头部 */ public void setEnableHead(boolean ifEnable) { enableHead = ifEnable; } public void setHeadHolder(CommonHolder headHolder1) { enableHead = true; headHolder = headHolder1; } public CommonHolder getHeadHolder() { return headHolder; } public void setHeadHolder(View itemView) { enableHead = true; headHolder = new HeadHolder(itemView); notifyItemInserted(0); } /** * 子类重写实现自定义ViewHolder */ public abstract CommonHolder<T> setViewHolder(ViewGroup parent); public class HeadHolder extends CommonHolder<Void> { public HeadHolder(View itemView) { super(itemView); } public HeadHolder(Context context, ViewGroup root, int layoutRes) { super(context, root, layoutRes); } @Override public void bindData(Void aVoid) {//不用实现 } } }
394ba447d27461f6906fe76b29af575a31f3ae02
f28e7f86bce3a5608715881c2043b31e5d94ffde
/src/test/java/com/zmkid/sell/repository/OrderMasterRepositoryTest.java
d6fe5f9502f1f4e30d15099e0b7bd3a27d465696
[]
no_license
enterpriseih/WechatSell
01bcfe19419c74e19da1fd530aab9bff119e8eff
d021f7bf253a4e767880966965bc20133ac6fc7b
refs/heads/master
2023-08-28T16:26:05.177884
2021-07-07T09:34:50
2021-07-07T09:34:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
545
java
package com.zmkid.sell.repository; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; /** * @author zhang man * @Description: * @date 2021/6/7 */ @SpringBootTest @RunWith(SpringRunner.class) public class OrderMasterRepositoryTest { @Autowired private OrderMasterRepository repository; @Test public void findBuyerOpenId() { } }
0012588662f681c0e4caeff8d5f257ccfbb2b6df
d32ec1fa198a8d390cd3b8b0851e577210d5cbc3
/hold-web/src/main/java/com/qianshanding/holdall/db/entity/TableCarray.java
1e746b0526be15d78ab6a21465fb5fd172e00df8
[]
no_license
qianshanding/hold-all
2de774c3d8dfd1fa5a3ee63e37616179112451d2
715344c9fab2ff2f63ac76170ba7af66a118e760
refs/heads/master
2021-06-14T13:34:34.564852
2017-04-10T12:31:22
2017-04-10T12:31:22
83,866,818
2
1
null
null
null
null
UTF-8
Java
false
false
870
java
package com.qianshanding.holdall.db.entity; import lombok.Data; /** * 表字段 * * @author Fish * */ @Data public class TableCarray { private String carrayName;// 原名称 private String carrayName_d;// 首字母大写 private String carrayName_x;// 首字母小写 private String carrayName_Java;//Java语法规范的命名规则 private String carrayType;// 字段类型 private String carrayType_d;// 大写字段类型 private String comment; public TableCarray(String carrayName, String carrayNameD, String carrayNameX, String carrayName_Java,String carrayType,String carrayType_d,String comment) { super(); this.carrayName = carrayName; carrayName_d = carrayNameD; carrayName_x = carrayNameX; this.carrayName_Java = carrayName_Java; this.carrayType = carrayType; this.carrayType_d = carrayType_d; this.comment = comment; } }
97cb8b74cbb99848378b35dfea7c51f4927d26b6
07e99185a517ae50981c94bec153da70c16aa490
/SpringBootJwtOAuth2ResourceServerTutorial/src/main/java/com/warumono/resource/enums/Gender.java
98f1ca2654176b9c0a639db125ba0ced6eaca7d4
[ "Apache-2.0" ]
permissive
warumono-for-develop/spring-boot-jwt-oauth2-resource-server-tutorial
d3ef9691f676e5e1b666c98c40c955ba848b2f96
aede2aeb13fedb9a2892c9a94e1f462f7af3aeee
refs/heads/master
2021-04-03T11:44:12.027368
2018-03-12T16:13:36
2018-03-12T16:13:36
124,916,351
1
0
null
null
null
null
UTF-8
Java
false
false
863
java
package com.warumono.resource.enums; import java.util.Arrays; import com.warumono.resource.enums.converters.AbstractEnumeratable; import lombok.AllArgsConstructor; import lombok.Getter; /** * <pre> * 선택 안함 NOT_SELECTED("ETC"), * 남자 MALE("MAL"), * 여자 FEMALE("FEM"), * </pre> * * @author warumono * */ @AllArgsConstructor @Getter public enum Gender implements AbstractEnumeratable<Gender> { /** * 선택 안함: ETC */ NOT_SELECTED("ETC"), /** * 남자: MAL */ MALE("MAL"), /** * 여자: FEM */ FEMALE("FEM"); private String dbData; @Override public String getToDatabaseColumn(Gender attribute) { return dbData; } @Override public Gender getToEntityAttribute(String dbData) { return Arrays.stream(Gender.values()).filter(e -> e.getDbData().equals(dbData)).findFirst().orElseThrow(null); } }
615c0d2fc6d458917c721a3a6847b1bb387ff1b8
9832ce8c95ca2716449db021e2dc9db93bb7b22f
/data-sim-client/src/main/java/com/atg/openssp/dspSim/model/dsp/DspModel.java
05035fe0197b3a72ec4467b79ae221f745cb4113
[ "MIT" ]
permissive
Alex-Gramm/openssp
63f33be9340180f30fbc123744a45ce469fd2adb
3d4cc35499c4425303a5651cfa849b801dbb163d
refs/heads/master
2023-01-30T13:36:03.838592
2020-12-12T19:59:46
2020-12-12T19:59:46
314,264,241
0
0
MIT
2020-11-19T20:34:32
2020-11-19T13:58:06
null
UTF-8
Java
false
false
2,582
java
package com.atg.openssp.dspSim.model.dsp; import com.atg.openssp.dspSim.ServerHandler; import com.atg.openssp.dspSim.model.BaseModel; import com.atg.openssp.dspSim.model.ModelException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.swing.*; import java.util.*; /** * @author Brian Sorensen */ public class DspModel extends BaseModel { private static final Logger log = LoggerFactory.getLogger(DspModel.class); private final Properties props; private DefaultListModel<SimBidder> mBidders = new DefaultListModel(); private final ServerHandler serverHandler; public DspModel(Properties props) throws ModelException { this.props = props; serverHandler = new ServerHandler(this); } public String lookupProperty(String key) { return props.getProperty(key); } public String lookupProperty(String key, String defaultValue) { String v = lookupProperty(key); if (v == null) { return defaultValue; } else { return v; } } private HashMap<String, SimBidder> getBidders() { HashMap<String, SimBidder> map = new HashMap(); for (int i=0; i<mBidders.size(); i++) { map.put(mBidders.get(i).getId(), mBidders.get(i)); } return map; } public DefaultListModel<SimBidder> getBidderModel() { return mBidders; } public void start() { serverHandler.start(); } public void handleList(List<SimBidder> bidders) { HashMap<String, SimBidder> map = getBidders(); for (SimBidder bidder : bidders) { SimBidder check = map.get(bidder.getId()); if (check == null) { mBidders.addElement(bidder); } else { map.remove(bidder.getId()); check.setPrice(bidder.getPrice()); } } // if any are left, remove them as extras for (Map.Entry<String, SimBidder> tBidder : map.entrySet()) { mBidders.removeElement(tBidder.getValue()); } } public void sendAddCommand(float price) throws ModelException { SimBidder sb = new SimBidder(UUID.randomUUID().toString()); sb.setPrice(price); serverHandler.sendAddCommand(sb); } public void sendUpdateCommand(SimBidder sb, float newPrice) throws ModelException { serverHandler.sendUpdateCommand(sb, newPrice); } public void sendRemoveCommand(SimBidder sb) throws ModelException { serverHandler.sendRemoveCommand(sb); } }
250711cf0305c295526cfa1c8503bd5d1b3d2af0
f1a2a051542706d747edf70786f1e89055a2d256
/untitled/src/com/company/Main.java
7cb514c0d5c0104e4437d8ce45cbee0882ed3c78
[]
no_license
aplmhd/JAVAFall
d89e3ba3b5a75b114eedf990181ddc0accea349e
e65bb774f0f06b2376865bd59d8781e294843bb0
refs/heads/master
2021-08-18T19:19:41.498098
2017-11-23T16:13:05
2017-11-23T16:13:05
111,828,361
0
0
null
null
null
null
UTF-8
Java
false
false
534
java
package com.company; public class Main { public static void main(String[] args) { //est pk = new Test(); Box objectPass = new Box(1,2,3); //objectPass.show(); Box obj1 = new Box(20,30,40); BoxWeight obj2 = new BoxWeight(10,20,30,40); obj2.display(); System.out.println(obj1.volume()); obj1 = obj2; obj1.width=100000; System.out.println("after modification:"+obj2.volume()); System.out.println(obj1.volume()); } }
f2ef329cad868314c7ebd82a3ff909b8e4cffe87
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/smallest/48b82975576f07f162163145b334648a73321d003a0a8cd4577172e48ce4836e63953dffd4460a9a7aadc511a695ff93de0ce2baf953e4b78b747440caa736a6/000/mutations/383/smallest_48b82975_000.java
5529817c43dca39de43093534570f1de5f5ff56e
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,088
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class smallest_48b82975_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { smallest_48b82975_000 mainClass = new smallest_48b82975_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj a = new IntObj (), b = new IntObj (), c = new IntObj (), d = new IntObj (), r = new IntObj (); output += (String.format ("Please enter 4 numbers seperated by spaces > ")); a.value = scanner.nextInt (); b.value = scanner.nextInt (); c.value = scanner.nextInt (); d.value = scanner.nextInt (); if (a.value < b.value && a.value < c.value && a.value < d.value) { r.value = a.value; } else if (b.value < a.value && b.value < c.value && b.value < d.value) { r.value = b.value; } else if ((a.value) < (b.value) && c.value < d.value) { r.value = c.value; } else { r.value = d.value; } output += (String.format ("%d is the smallest\n", r.value)); if (true) return;; } }
66a728c2dd7d4013b0237a6c6bcfbe7b6eaa00fc
20dd87324d7f2ca7e9776dd9adddbaed41afe1a2
/blockchain-agent-sphereon-proof/src/main/java/com/sphereon/alfresco/blockchain/agent/sphereon/proof/ProofApiUtils.java
4ed1896a57132a31c795315784355ea8082d1a3b
[ "Apache-2.0" ]
permissive
Sphereon-Opensource/alfresco-blockchain-agent
025eda9c573d1f6dafd928be4819b26254d6afba
9075a8e7d83ca92cd4d4840dc9547315d583674c
refs/heads/master
2021-06-13T17:47:27.583998
2020-11-17T14:57:26
2020-11-17T14:57:26
188,196,460
0
2
Apache-2.0
2021-04-26T19:44:33
2019-05-23T08:49:55
Java
UTF-8
Java
false
false
2,720
java
package com.sphereon.alfresco.blockchain.agent.sphereon.proof; import com.sphereon.alfresco.blockchain.agent.model.BlockchainRegistrationState; import com.sphereon.alfresco.blockchain.agent.rest.model.VerifyBlockchainEntry; import com.sphereon.alfresco.blockchain.agent.rest.model.VerifyBlockchainEntryChainType; import com.sphereon.alfresco.blockchain.agent.rest.model.VerifyContentBlockchainResponse; import com.sphereon.sdk.blockchain.proof.model.VerifyContentResponse; import org.springframework.stereotype.Component; import java.util.List; import java.util.Optional; import java.util.stream.Stream; import static com.sphereon.alfresco.blockchain.agent.model.BlockchainRegistrationState.BC_NOT_REGISTERED; import static com.sphereon.alfresco.blockchain.agent.model.BlockchainRegistrationState.BC_PENDING; import static com.sphereon.alfresco.blockchain.agent.model.BlockchainRegistrationState.BC_REGISTERED; import static java.util.stream.Collectors.toList; @Component public class ProofApiUtils { public VerifyContentBlockchainResponse toBlockchainResponse(final VerifyContentResponse verifyResponse) { final var hash = verifyResponse.getHash(); final var sigHex = verifyResponse.getHexSignature(); final var sigBase64 = verifyResponse.getBase64Signature(); final var time = verifyResponse.getRegistrationTime(); final var entries = entriesFrom(verifyResponse); final var state = this.blockchainStateFrom(verifyResponse.getRegistrationState()); return new VerifyContentBlockchainResponse(hash, sigHex, sigBase64, time, entries, state); } private List<VerifyBlockchainEntry> entriesFrom(final VerifyContentResponse verification) { final var singleChain = Optional.of(verification.getSingleProofChain()) .map(entry -> new VerifyBlockchainEntry(VerifyBlockchainEntryChainType.SINGLE_CHAIN, entry.getChainId())); final var perHashChain = Optional.of(verification.getPerHashProofChain()) .map(entry -> new VerifyBlockchainEntry(VerifyBlockchainEntryChainType.PER_HASH_CHAIN, entry.getChainId())); return Stream.concat(singleChain.stream(), perHashChain.stream()) .collect(toList()); } public BlockchainRegistrationState blockchainStateFrom(final VerifyContentResponse.RegistrationStateEnum state) { switch (state) { case NOT_REGISTERED: return BC_NOT_REGISTERED; case PENDING: return BC_PENDING; case REGISTERED: return BC_REGISTERED; } throw new IllegalStateException("Cannot map " + state + " to " + BlockchainRegistrationState.class.toString()); } }
bd8e32c2dcef0e58a1da02272d20c237db872693
1b69d2ed7b31b74011e11b9fd5537a2b3f443713
/snippets-validation/src/main/java/cn/javaer/snippets/validation/AllOrNoneEmpty.java
062de5955cb1c3251a6aa0438b8e2e52826aff0b
[ "Apache-2.0" ]
permissive
cn-src/snippets-java
1aa6023f176652e8be39d321060e85b47806d58c
576913b2389baa21ba88c90139cafa2324e8e30f
refs/heads/master
2023-09-03T11:02:51.794697
2021-11-02T06:01:54
2021-11-02T06:01:54
276,255,960
3
2
Apache-2.0
2021-11-02T06:00:00
2020-07-01T02:20:32
Java
UTF-8
Java
false
false
1,093
java
package cn.javaer.snippets.validation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Repeatable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import cn.javaer.snippets.validation.AllOrNoneEmpty.List; import javax.validation.Constraint; import javax.validation.Payload; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * 一组数据要么同时为空,要么同时不为空。 * * @author cn-src */ @Documented @Constraint(validatedBy = AllOrNoneEmptyValidator.class) @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Repeatable(List.class) public @interface AllOrNoneEmpty { String message() default "{snippets.validation.constraints.NotEmptyGroup.message}"; Class<?>[] groups() default {}; Class<? extends Payload>[] payload() default {}; String[] value(); @Target({ElementType.TYPE}) @Retention(RUNTIME) @Documented @interface List { AllOrNoneEmpty[] value(); } }
643a55d8c3f1f9843cff373d3c2d99957adac39b
369d58ab843508017c24bb429298466fe950462e
/limits-service/src/test/java/com/limits/service/app/LimitsServiceApplicationTests.java
6c8a40b3ffb36b9363afef8d37e618b349613d31
[]
no_license
Gowtham0499/spring-microservices-tutorials
2421a1181a7f637f0f4cf09906918fd54c115489
d3b588f615c49b2a7722586ad92daa74e14143c5
refs/heads/master
2023-02-27T13:16:37.229564
2021-02-11T08:55:10
2021-02-11T08:55:10
336,966,141
0
0
null
null
null
null
UTF-8
Java
false
false
221
java
package com.limits.service.app; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class LimitsServiceApplicationTests { @Test void contextLoads() { } }
49bc4b1b9b8ea3337bba5ca90dcea555b91627a5
a9e8b7a9aaa9a88bf67207b4b4a71293797c2a96
/service/service_hospital/src/main/java/com/atguigu/yygh/hosp/service/impl/DepartmentServiceImpl.java
4b4811f1d24f513c0771c358a55dff2bb343c710
[]
no_license
wlw-super/Hospital_2021
5ef49187efa50a01ca198a7d5798c8f41fc1e3ad
9fb649f48b05035e83614b06510f5f15ccdf56a6
refs/heads/master
2023-04-10T21:57:52.444186
2021-04-12T18:24:55
2021-04-12T18:24:55
354,706,415
0
0
null
null
null
null
UTF-8
Java
false
false
2,844
java
package com.atguigu.yygh.hosp.service.impl; import com.alibaba.fastjson.JSONObject; import com.atguigu.yygh.hosp.repository.DepartmentRepository; import com.atguigu.yygh.hosp.service.DepartmentService; import com.atguigu.yygh.model.hosp.Department; import com.atguigu.yygh.model.vo.hosp.DepartmentQueryVo; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.data.domain.*; import org.springframework.stereotype.Service; import java.util.Date; import java.util.Map; @Service public class DepartmentServiceImpl implements DepartmentService { @Autowired private DepartmentRepository departmentRepository; //上传科室接口 @Override public void save(Map<String, Object> paramMap) { String jsonString = JSONObject.toJSONString(paramMap); Department department = JSONObject.parseObject(jsonString,Department.class); //判断医院和科室的编号 Department existDepartment = departmentRepository.getDepartmentByHoscodeAndDepcode(department.getHoscode(), department.getDepcode()); if (null != existDepartment) { department.setId(existDepartment.getId()); department.setCreateTime(existDepartment.getCreateTime()); department.setUpdateTime(new Date()); department.setIsDeleted(0); departmentRepository.save(department); } else { department.setCreateTime(new Date()); department.setUpdateTime(new Date()); department.setIsDeleted(0); departmentRepository.save(department); } } //分页查询 @Override public Page<Department> findPageDepartment(int page, int limit, DepartmentQueryVo departmentQueryVo) { Department department = new Department(); department.setIsDeleted(0); BeanUtils.copyProperties(departmentQueryVo,department); ExampleMatcher exampleMatcher = ExampleMatcher.matching() .withStringMatcher(ExampleMatcher.StringMatcher.CONTAINING) .withIgnoreCase(true); Example<Department> example = Example.of(department, exampleMatcher); Sort sort = Sort.by(Sort.Direction.DESC,"depcode"); Pageable pageable = PageRequest.of(page-1,limit,sort); Page<Department> departmentPage = departmentRepository.findAll(example,pageable); return departmentPage; } @Override public void remove(String hoscode, String depcode) { //根据科室编号和医院编号查询 Department department = departmentRepository.getDepartmentByHoscodeAndDepcode(hoscode, depcode); if (null != department) { departmentRepository.delete(department); } } }
d3e55d67845e6662becae0351e8289608c60ce14
a0f9039856cf136a907085bad9195ec0f0d3ee73
/src/schedule/query/ScheduleDetailQuery.java
f6555d6bea8508432738a94848c8e51354ade6fa
[]
no_license
jyl212/Trip-Money
725346343f72d967ddb6128b3d401508524e018b
2171bdd2c8d0bbfa847d051d02b9be9c4a4db282
refs/heads/master
2020-03-12T20:45:21.448775
2018-04-24T07:21:32
2018-04-24T07:21:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
501
java
package schedule.query; public class ScheduleDetailQuery { public static String insert="insert into SCHEDULE_DETAIL values(?,?,?,?,?,?,?)"; public static String select="select mapx,mapy,schedule_title,img,contentid from schedule_detail where schedule_days_no=? order by schedule_order"; public static String delete="delete SCHEDULE_DETAIL where schedule_days_no=? and contentid=?"; public static String selectmaxorder="select max(schedule_order) from schedule_detail where schedule_days_no=?"; }
adcd1b93f2d5f642c8cfaa66da7a307dd01714a6
4588a2a9485054c358f4c0c8b7b9cd7935f92c10
/app/src/main/java/com/pethotel/betatest/News.java
70823ed6bc66f9c08618e4e4e1fbc8f8300b4a04
[]
no_license
hellopethotel/betatest
c4369977607196730d59f54b73630aba3340bd03
a34d84e76b8b95950d2a3f204d7738f5e85da42d
refs/heads/master
2020-03-22T05:05:08.834926
2018-07-03T07:14:07
2018-07-03T07:14:07
139,541,171
0
0
null
null
null
null
UTF-8
Java
false
false
326
java
package com.pethotel.betatest; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class News extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_news); } }
1364579b39557ffdc90c4ce406836a54fb130e97
af91c43f5e587588714c70b518c3fd8025d08740
/EaseMyTripDemo/src/test/java/test/LoginSearch.java
1fbad0abae3acf4be48f5b513540a7344143be42
[]
no_license
eramn22/EaseMyTripPilot
c47cb59c2a83d621de33ac627cdb36cfab1a44a6
868f7cd5b9b0c31ec8bd99a3e5ea2930a0b9134e
refs/heads/master
2023-02-21T11:14:40.672439
2021-01-22T10:47:26
2021-01-22T10:47:26
331,914,284
0
0
null
null
null
null
UTF-8
Java
false
false
5,086
java
package test; import org.openqa.selenium.Alert; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.Assert; import org.testng.annotations.AfterSuite; import org.testng.annotations.BeforeSuite; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import utils.Excelutils; public class LoginSearch { WebDriver driver=null; @BeforeSuite public void setupTest() { String projectpath=System.getProperty("user.dir"); System.setProperty("webdriver.gecko.driver", projectpath+"\\browserdrivers\\gecko\\geckodriver.exe"); driver=new FirefoxDriver(); } @Test(dataProvider="logintest1") public void test1(String Username,String Password) throws Exception{ driver.get("https://www.easemytrip.com/"); driver.findElement(By.xpath("//*[@id=\"spnMyAcc\"]")).click(); WebElement ele = driver.findElement(By.xpath("/html/body/form/div[3]/div/div[2]/div[2]/div[4]/div[2]/div/div[2]/a[1]")); JavascriptExecutor executor = (JavascriptExecutor)driver; executor.executeScript("arguments[0].click();", ele); //driver.findElement(By.xpath("/html/body/form/div[3]/div/div[2]/div[2]/div[4]/div[2]/div/div[2]/a[1]")).click(); driver.findElement(By.id("txtusername")).sendKeys(Username); driver.findElement(By.id("Password1")).sendKeys(Password); Thread.sleep(10000); driver.findElement(By.xpath("/html/body/form/div[10]/div[1]/div[2]/div/div[11]/input")).click(); Thread.sleep(10000); driver.findElement(By.xpath("/html/body/form/div[3]/div/div[2]/div[2]/div[4]/div[2]")).click(); Thread.sleep(3000); //Validate String actualUrl="https://www.easemytrip.com/"; String expectedUrl= driver.getCurrentUrl(); Assert.assertEquals(actualUrl, expectedUrl); } @Test(dataProvider="booktest1") public void booktest1(String From,String To,String Depart,String Return, String Adult, String Children,String Infant, String Economy) throws Exception{ System.out.println(From+" | "+To+" | "+Depart+" | "+Return+" | "+Adult+" | "+Children+" | "+Infant+" | "+Economy); driver.get("https://www.easemytrip.com/"); // Click on roundtrip radio button driver.findElement(By.xpath("/html/body/form/div[14]/div[2]/div[1]/ul/li[2]")).click(); // Insert data into Flying from text box driver.findElement(By.id("FromSector_show")).sendKeys(From); //To data driver.findElement(By.xpath("//*[@id=\"Editbox13_show\"]")).sendKeys(To); driver.findElement(By.xpath("/html/body/form/div[14]/div[2]/div[3]/div[1]/div[7]/input")).click(); Thread.sleep(10000); driver.findElement(By.xpath("//*[@id=\"BtnBookNow\"]")).click(); Thread.sleep(3000); } @Test public void logouttest() throws Exception{ driver.findElement(By.xpath("/html/body/form/div[6]/div/div[3]/div[2]/div[3]/div[2]")).click(); WebElement ele1 = driver.findElement(By.xpath("/html/body/form/div[3]/div/div[2]/div[2]/div[4]/div[2]/div/div[3]/span/a[2]")); JavascriptExecutor executor1 = (JavascriptExecutor)driver; executor1.executeScript("arguments[0].click();", ele1); try{ } catch (Exception e) { if(e.toString().contains("org.openqa.selenium.UnhandledAlertException")) { Alert alert = driver.switchTo().alert(); alert.accept(); } } } @DataProvider(name="booktest1") public Object[][] BookingData() { String ep="C:\\Users\\eramn\\eclipse-workspace\\EaseMyTripDemo\\Excel\\bookingtest.xlsx"; Object data[][]=testbookData(ep,"Sheet2"); return data; } public Object[][] testbookData(String ep, String sn) { Excelutils excel=new Excelutils(ep,sn); int rowCount=excel.getRowcount(); int colCount=excel.getColcount(); Object data[][]=new Object[rowCount-1][colCount]; for(int i=1;i<rowCount;i++) { for(int j=0;j<colCount;j++) { String celldata=excel.getCelldataString(i, j); //System.out.print(celldata+" | "); data[i-1][j]=celldata; } //System.out.println(); } return data; } @DataProvider(name="logintest1") public Object[][] getLoginData() { String ep="C:\\Users\\eramn\\eclipse-workspace\\EaseMyTripDemo\\Excel\\test_input.xlsx"; Object data[][]=testData(ep,"Sheet1"); return data; } public Object[][] testData(String ep, String sn) { Excelutils excel=new Excelutils(ep,sn); int rowCount=excel.getRowcount(); int colCount=excel.getColcount(); Object data[][]=new Object[rowCount-1][colCount]; for(int i=1;i<rowCount;i++) { for(int j=0;j<colCount;j++) { String celldata=excel.getCelldataString(i, j); //System.out.print(celldata+" | "); data[i-1][j]=celldata; } //System.out.println(); } return data; } // Closing the browser session after completing each test case @AfterSuite public void tearDown() throws Exception { driver.quit(); } }
[ "eramn@DESKTOP-0NUUHCS" ]
eramn@DESKTOP-0NUUHCS
e2b3e4d7e12955e8a3c594fdc77d6f523a2b008c
18f59c5325b32199b9da56ca9db2c23623be67f2
/examples/group-validation/validation-server-extendable-model/src/main/java/io/rxmicro/examples/validation/server/extendable/model/child_model_without_fields/parent/Parent.java
983d29e7a87219744f8d585e075ec2bf89c774c1
[ "Classpath-exception-2.0", "SSPL-1.0", "PostgreSQL", "GPL-2.0-only", "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
rxmicro/rxmicro-usage
87f6cc0fb38995b850eb2366c81ae57f3276fa65
57fad6d2f168dddda68c4ce38214de024c475f42
refs/heads/master
2022-12-23T17:56:41.534691
2022-12-14T17:53:12
2022-12-14T18:28:47
248,581,825
0
0
Apache-2.0
2022-12-13T11:39:41
2020-03-19T18:56:25
Java
UTF-8
Java
false
false
954
java
/* * Copyright (c) 2020. http://rxmicro.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.rxmicro.examples.validation.server.extendable.model.child_model_without_fields.parent; import io.rxmicro.examples.validation.server.extendable.model.child_model_without_fields.grand.GrandParent; import io.rxmicro.validation.constraint.Uppercase; public class Parent extends GrandParent { @Uppercase String parentParameter; }
598a14141d9283bb3a20bef9afc1b9d49454975f
ec6e67cbd5116f12aaed88be7457049c308bbb80
/src/test/java/OrgAnnotator.java
28ea33fb6b993c5bbfb983d712e4d7b0f1fdebd5
[]
no_license
bilbelg/Uima_encours_sans_interface
75174ad2e8cd5a9efdab7985ea5d40a0beef6cb8
c131b95c865eeaa366bb636d2c2a78bb66bff8c3
refs/heads/master
2020-04-06T06:44:58.283989
2014-07-18T13:21:43
2014-07-18T13:21:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,394
java
import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; import org.apache.uima.analysis_component.JCasAnnotator_ImplBase; import org.apache.uima.analysis_engine.AnalysisEngineProcessException; import org.apache.uima.jcas.JCas; import org.apache.uima.resource.ResourceAccessException; import org.jdom.Element; public class OrgAnnotator extends JCasAnnotator_ImplBase { private StringMapResource mMap; static org.jdom.Document document; static Element racine; public void process(JCas aJCas) throws AnalysisEngineProcessException { //tokenisation de profil String text=aJCas.getDocumentText(); int pos = 0; int pos2=0; int pos3=0; String token=""; try { mMap=(StringMapResource)getContext().getResourceObject("organization"); } catch (ResourceAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } StringTokenizer tokenizer =new StringTokenizer(text," \t\n\r.<.>/?\";:[{]}\\|=+()!", true); String tokPres=""; String PresdePres=""; while (tokenizer.hasMoreTokens()) { String doubleMot=""; String triMot=""; if (!(token.equals(" ")||token.equals(","))){ PresdePres=tokPres; tokPres=token; } token = tokenizer.nextToken(); if (!(token.equals(" ")||token.equals(","))){ if((token.matches("^[A-Z].*"))){ if((tokPres.matches("^[A-Z].*"))){ doubleMot=tokPres+" "+token; if((PresdePres.matches("^[A-Z].*"))){ triMot=PresdePres+" "+doubleMot; } } } } String expandedForm = mMap.get(token); String expandedForm2=mMap.get(doubleMot); String expandedForm3=mMap.get(triMot); if ((expandedForm != null)) { // create annotation Org annot = new Org(aJCas, pos, pos + token.length(), token); annot.addToIndexes(); } if ((expandedForm2 != null)) { // create annotation Org annot2 = new Org(aJCas, pos2, pos2 + doubleMot.length(), doubleMot); annot2.addToIndexes(); } if ((expandedForm3 != null)) { // create annotation Org annot3 = new Org(aJCas, pos2, pos2 + triMot.length(), triMot); annot3.addToIndexes(); } // incrememnt pos and go to next token pos += token.length(); pos2 += doubleMot.length(); pos3 +=triMot.length(); } } /* public static void afficheAll(){ HashMap<String,Integer> organization=new HashMap<String, Integer>(); List listeOrg=racine.getChildren(); //crée un Iterator pour parcourir la liste System.out.println("\t ya rabiiiiiiiiii \t"); Iterator i=listeOrg.iterator(); while(i.hasNext()){ Element courant =(Element) i.next(); if(courant.getAttributeValue("expandedForm") !=null){ //System.out.println(courant.getAttributeValue("expandedForm")); organization.put(courant.getAttributeValue("expandedForm"),1); } } for (String organisation : organization.keySet()){ System.out.println("organisation "+organisation); } }*/ }
192a31c0756ff0ce53c46acb9e4ad8372280de44
ff289e13059969aa99b4d355af2acec37ddcfc3a
/app/src/main/java/com/mytsyk/sommelier/sommelier/ui/home/MenuAdapter.java
a1c1580f9946faba161adb88721522193afb0e05
[]
no_license
tedpreved/Sommelie
8cf559b01f88e14fd57204dcee2a9aef82b6cf8a
09da1320a38cd04d19e171e1da00140c5ced34cf
refs/heads/master
2021-01-01T03:32:39.184369
2016-04-13T08:17:39
2016-04-13T08:17:39
56,133,762
0
0
null
null
null
null
UTF-8
Java
false
false
1,843
java
package com.mytsyk.sommelier.sommelier.ui.home; import android.content.Context; import android.support.v4.content.ContextCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import com.mytsyk.sommelier.sommelier.R; public class MenuAdapter extends BaseAdapter { private Context mContext; private int[] mIcons; private String[] mIconNames; public MenuAdapter(Context mContext, int[] mIcons, String[] mIconNames) { this.mContext = mContext; this.mIcons = mIcons; this.mIconNames = mIconNames; } @Override public int getCount() { return mIcons == null ? 0 : mIcons.length; } @Override public Object getItem(int position) { return position; } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; final HolderMenu holder; if (view == null) { view = LayoutInflater.from(mContext).inflate(R.layout.item_menu_listview, parent, false); holder = new HolderMenu(); holder.mIcon = (ImageView) view.findViewById(R.id.item_menu_im_icon); holder.mName = (TextView) view.findViewById(R.id.item_menu_tv_name); view.setTag(holder); } else { holder = (HolderMenu) view.getTag(); } holder.mIcon.setImageDrawable(ContextCompat.getDrawable(mContext, mIcons[position])); holder.mName.setText(mIconNames[position]); return view; } private class HolderMenu { private ImageView mIcon; private TextView mName; } }
8747003c6bb21f20ed2008dbca9097315618dc8d
8a9b5d1936230b45ea1e3942df340fc7c5ecf1a8
/td3/src/td3_2/Boite.java
771d3ce10fba38460e30c00f784171e3e1b929b9
[]
no_license
steve-strz/JavaCours
2bec6eff274e9cfc58b0b396f255a4cfcef66216
9a350a559eba5fcb859e7b209459a3fe81970b65
refs/heads/master
2020-12-13T23:02:57.843525
2020-03-06T07:55:17
2020-03-06T07:55:17
234,556,223
0
0
null
null
null
null
UTF-8
Java
false
false
1,110
java
package td3_2; import java.awt.*; public class Boite { private static final int MAX_BOITES = 5; private java.awt.Color color; private Objet obj; private Boite[] tab = new Boite[MAX_BOITES]; private int nbBoite = 0; public Boite(Color c){ color = c; } public Boite(Color c, Objet o){ color = c; obj = o; } public Boite(Color c, Boite b){ color = c; tab[0] = b; nbBoite += 1; } public Boite(Color c, Boite b, Objet o){ color = c; tab[0] = b; nbBoite += 1; obj = o; } public Objet getObjet(){ return this.obj; } public Color getColor(){ return this.color; } public void contientObjet(Objet o){ if(o == this.obj){ System.out.println("L'objet correspond"); }else{ System.out.println("L'objet ne correspond pas"); } } public void estVide(){ if(this.obj == null && nbBoite == 0){ System.out.println("La boite est vide"); } else{ System.out.println("La boite n'est pas vide"); } } public void ajouteBoite(Boite b){ if(nbBoite < 5){ tab[nbBoite] = b; this.nbBoite++; }else { System.out.println("Boite pleine"); } } }
9911ef3af1d5deeb9b8dc48e4e56bb7b61c799a4
e3daa88c05e53ca3e71ca8917b86e6c05e690761
/androidlibrary/src/main/java/com/exampleapp/android/androidlibrary/CountriesFragment.java
e3eb38032d899276f6728e10797045e9199afb4d
[ "Apache-2.0" ]
permissive
Aimannab/SpinMeTo
844159e6728e47dab60cf7bccd9ec85ddff3cf8e
d94c3772ef0ac699909d514ac70c44ffaa21548c
refs/heads/master
2022-11-12T14:00:24.874956
2020-07-01T15:52:12
2020-07-01T15:52:12
167,832,626
1
0
null
null
null
null
UTF-8
Java
false
false
5,913
java
package com.exampleapp.android.androidlibrary; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.ShareCompat; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.exampleapp.android.countrieslibrary.CountryData; import com.google.gson.Gson; import java.util.ArrayList; import java.util.List; /** * Created by Aiman Nabeel on 24/10/2018. */ public class CountriesFragment extends Fragment { public static final String COUNTRIES_KEY_EXTRA = "country"; public static final String COUNTRIES_KEY_EXTRA_ID = "id"; public CountriesFragment() { } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_countries, container, false); setRandomCountry(view); //Connecting Share FAB view.findViewById(R.id.share_fab).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = getActivity().getIntent(); CountryData country = (CountryData) intent.getExtras().getSerializable(COUNTRIES_KEY_EXTRA); String googleplaystore = "https://goo.gl/AXjdvy"; // TODO Add app link once shared on Google Play Store startActivity(Intent.createChooser(ShareCompat.IntentBuilder.from(getActivity()) .setType("text/plain") .setText("#SpinMeTo " + country.getCountryName() + ".\n" + "Where will #SpinMeTo take you? Download the app here:" + "\n" + googleplaystore) .getIntent(), getString(R.string.action_share))); } }); //Connecting Google Maps FAB view.findViewById(R.id.map_fab).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(getActivity(), MapsActivity.class); startActivity(intent); } }); //Connecting Skyscanner FAB view.findViewById(R.id.skyscanner_fab).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String url = "https://www.skyscanner.net/"; Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); startActivity(intent); } }); //Connecting Tripadvisor FAB view.findViewById(R.id.tripadvisor_fab).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String url = "https://www.tripadvisor.co.uk/"; Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); startActivity(intent); } }); //Connecting Airbnb FAB view.findViewById(R.id.airbnb_fab).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String url = "https://www.airbnb.co.uk/"; Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); startActivity(intent); } }); //update widget //CountriesWidgetService.startRandomCountriesListService(getContext(), country); return view; } private void setRandomCountry(View view) { Intent intent = getActivity().getIntent(); //String country = intent.getStringExtra(COUNTRIES_KEY_EXTRA); //String id = intent.getStringExtra(COUNTRIES_KEY_EXTRA_ID); CountryData country = (CountryData) intent.getExtras().getSerializable(COUNTRIES_KEY_EXTRA); if (country != null) { TextView textView = view.findViewById(R.id.random_country); textView.setText(country.getCountryName()); } if (country != null) { //Saving random country names in DB List<ContentValues> list = new ArrayList<ContentValues>(); Context context = view.getContext(); ContentValues cv = new ContentValues(); cv.put(CountriesDBContract.RandomCountriesList.COLUMN_RANDOM_COUNTRY_NAME, country.getCountryName()); //cv.put(CountriesDBContract.RandomCountriesList.COLUMN_RANDOM_COUNTRY_LAT, country.getCountryLat()); //cv.put(CountriesDBContract.RandomCountriesList.COLUMN_RANDOM_COUNTRY_LNG, country.getCountryLng()); //cv.put(CountriesDBContract.RandomCountriesList.COLUMN_RANDOM_COUNTRY_ID, id); list.add(cv); //Inserting new random country name via ContentResolver Uri uri = getActivity().getContentResolver().insert(CountriesDBContract.RandomCountriesList.CONTENT_URI, cv); //Saving CountryData object here to be used in MapsActivity.java + GridWidgetService for widget //https://stackoverflow.com/questions/5418160/store-and-retrieve-a-class-object-in-shared-preference SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); SharedPreferences.Editor prefsEditor = prefs.edit(); Gson gson = new Gson(); String json = gson.toJson(country); // myObject - instance of MyObject prefsEditor.putString("country", json); prefsEditor.commit(); } } }
f9e010ad83c71e452fb0c3a6395d1c81fd69cd51
ccd21a0a11d760c49b645bf298f066eab25acfd0
/main/java-maven/newapp/src/main/java/com/ecofactor/qa/automation/newapp/util/TestDataConfig.java
ff2796b59a37c5ae926f3d336b4dbc4ab2975a45
[]
no_license
vselvaraj-ecofactor/QA-Automation
71a73f895b17f9a4bdcdd6c4c68b18ba52467b8b
b84d7c8c94ecbede3709d00817c6e87fac21f6d1
refs/heads/master
2021-01-01T08:53:34.406991
2015-02-24T06:17:13
2015-02-24T06:17:13
30,956,434
0
0
null
null
null
null
UTF-8
Java
false
false
1,867
java
/* * TestDataConfig.java * Copyright (c) 2013, EcoFactor, All Rights Reserved. * * This software is the confidential and proprietary information of EcoFactor * ("Confidential Information"). You shall not disclose such Confidential Information and shall use * it only in accordance with the terms of the license agreement you entered into with * EcoFactor. */ package com.ecofactor.qa.automation.newapp.util; import java.util.List; import java.util.Map; /** * The Class TestDataConfig. * * @author $Author:$ * @version $Rev:$ $Date:$ */ public class TestDataConfig { private String id; private List<UserConfig> userConfigs; private Map<String, String> configs; private List<String> globalFeatures; /** * Gets the id. * @return the id */ public String getId() { return id; } /** * Sets the id. * @param id the new id */ public void setId(final String id) { this.id = id; } /** * Gets the user configs. * @return the user configs */ public List<UserConfig> getUserConfigs() { return userConfigs; } /** * Sets the user configs. * @param userConfigs the new user configs */ public void setUserConfigs(final List<UserConfig> userConfigs) { this.userConfigs = userConfigs; } /** * Gets the configs. * @return the configs */ public Map<String, String> getConfigs() { return configs; } /** * Sets the configs. * @param configs the configs */ public void setConfigs(final Map<String, String> configs) { this.configs = configs; } /** * Gets the global features. * @return the global features */ public List<String> getGlobalFeatures() { return globalFeatures; } /** * Sets the global features. * @param globalFeatures the new global features */ public void setGlobalFeatures(final List<String> globalFeatures) { this.globalFeatures = globalFeatures; } }
66339444b776d86815e8680dc05f241e7d69b787
adbb90258043d5c1f6f0c8f14c7b79b0d63d7876
/src/desafio/Desafio.java
cb54aac6e642971a9cf75c28d9d7f4194b4d28dd
[]
no_license
DGuardado19/DesafioTSC
2399870e8172322d8eb969fb58b8ef3be90c2f89
b5800ca59701ccdf0bd51c4b488ef82c0b3a21db
refs/heads/master
2022-11-10T17:11:50.161728
2020-07-01T23:05:13
2020-07-01T23:05:13
275,996,514
0
0
null
null
null
null
UTF-8
Java
false
false
481
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 desafio; /** * * @author David */ public class Desafio { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here new PInicial().show(); } }
8f7a6d7cbd36c23976673e32e7b49f54abbcfba1
7f062838d26703455ec6734f5785d12aee766720
/Progetto Biblioteca/Biblioteca/src/dao/RichiestaDao.java
882135d556c3d03de7803ce5843728e0c4873cca
[]
no_license
Romeo-Dev/Progetti-Java
6867e6a1522034a8461d4b93f32f2fa4a3124b2c
ce5b920214a86ddcbcf01aa95ae96c348bf637cb
refs/heads/master
2020-03-25T02:12:53.853948
2019-11-11T17:53:09
2019-11-11T17:53:09
143,278,854
0
0
null
null
null
null
UTF-8
Java
false
false
1,986
java
package dao; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import dto.RichiestaDto; import dto.UtenteDto; public class RichiestaDao { public RichiestaDao() throws SQLException, DatabaseException { new ConnectionManager(); ConnectionManager.openConnection(); } public static void accettarichiesta(Connection c, Integer _id) throws DatabaseException { PreparedStatement ps = null; ResultSet rs = null; try { ps = c.prepareStatement("DELETE FROM `eramodb`.`richiesta` WHERE `ID`= ?"); ps.setInt(1,_id); int affected = ps.executeUpdate(); } catch (SQLException ex) { throw new DatabaseException("Errore di esecuzione della query", ex); } finally { ConnectionManager.closeResources(ps,rs); } } public static ArrayList<RichiestaDto> vistaRichieste(Connection c) throws DatabaseException{ PreparedStatement ps = null; ResultSet rs = null; try { ps = c.prepareStatement("select r.ID, o.titolo, p.numero_pagina , r.descr, r.ora_richiesta, r.stato from opera o join pagine p on (o.ID=p.ID_opera) join richiesta r on(p.ID=r.ID_pagina)"); rs = ps.executeQuery(); ArrayList<RichiestaDto> listarichiestedto = new ArrayList<RichiestaDto>(); while (rs.next()) { RichiestaDto richdto = new RichiestaDto(); richdto.setID_richiestaDto(rs); richdto.setTitoloOperaDto(rs); richdto.setNumeroPaginaDto(rs); richdto.setDescrizioneDto(rs); richdto.setOraRichiestaDto(rs); richdto.setStatoDto(rs); listarichiestedto.add(richdto); } System.out.println(listarichiestedto); return listarichiestedto; } catch (SQLException ex) { throw new DatabaseException("Errore di esecuzione della query", ex); } finally { ConnectionManager.closeResources(ps,rs); } } }
76616044fcd43c95a4a24fe09a12cfdef740abbb
b6e99b0346572b7def0e9cdd1b03990beb99e26f
/src/gcom/gui/atendimentopublico/FiltrarMotivoCorteActionForm.java
d8659461a6716ca21550c88fabb167ab530b7f28
[]
no_license
prodigasistemas/gsan
ad64782c7bc991329ce5f0bf5491c810e9487d6b
bfbf7ad298c3c9646bdf5d9c791e62d7366499c1
refs/heads/master
2023-08-31T10:47:21.784105
2023-08-23T17:53:24
2023-08-23T17:53:24
14,600,520
19
20
null
2015-07-29T19:39:10
2013-11-21T21:24:16
Java
UTF-8
Java
false
false
1,328
java
package gcom.gui.atendimentopublico; import org.apache.struts.validator.ValidatorForm; /** * [UC0755]FILTRAR MOTIVO DE CORTE * * @author Vinicius Medeiros * @date 02/04/2008 */ public class FiltrarMotivoCorteActionForm extends ValidatorForm { private static final long serialVersionUID = 1L; private String idMotivoCorte; private String descricao; private String indicadorUso; private String tipoPesquisa; private String indicadorAtualizar; public String getIndicadorAtualizar() { return indicadorAtualizar; } public void setIndicadorAtualizar(String indicadorAtualizar) { this.indicadorAtualizar = indicadorAtualizar; } public String getDescricao() { return descricao; } public void setDescricao(String descricao) { this.descricao = descricao; } public String getIdMotivoCorte() { return idMotivoCorte; } public void setIdMotivoCorte(String idMotivoCorte) { this.idMotivoCorte = idMotivoCorte; } public String getIndicadorUso() { return indicadorUso; } public void setIndicadorUso(String indicadorUso) { this.indicadorUso = indicadorUso; } public String getTipoPesquisa() { return tipoPesquisa; } public void setTipoPesquisa(String tipoPesquisa) { this.tipoPesquisa = tipoPesquisa; } }
81ee92bc0981cfdf3d2f83c5b4df74e1099f3cfa
c9578926823151cec7479c6fa0bcae9a8399595e
/org.modeldriven.alf.fuml.impl/src/org/modeldriven/alf/fuml/impl/uml/ActivityEdge.java
2cc95fb4c89b554bc0e0e8a30dc6528f18fe1f41
[]
no_license
ModelDriven/Alf-Reference-Implementation
1eb6f3b08fbbce72523bf0ab4dddb42101862281
36ad46b9201138b1392ea9aa8f2038550f00fa19
refs/heads/master
2023-04-06T20:57:11.180992
2023-03-28T20:37:40
2023-03-28T21:06:14
47,217,748
33
3
null
2020-10-21T14:13:21
2015-12-01T21:12:48
Java
UTF-8
Java
false
false
2,148
java
/******************************************************************************* * Copyright 2011, 2013 Model Driven Solutions, Inc. * All rights reserved worldwide. This program and the accompanying materials * are made available for use under the terms of the GNU General Public License * (GPL) version 3 that accompanies this distribution and is available at * http://www.gnu.org/licenses/gpl-3.0.html. For alternative licensing terms, * contact Model Driven Solutions. *******************************************************************************/ package org.modeldriven.alf.fuml.impl.uml; public abstract class ActivityEdge extends RedefinableElement implements org.modeldriven.alf.uml.ActivityEdge { public ActivityEdge( fUML.Syntax.Activities.IntermediateActivities.ActivityEdge base) { super(base); } public fUML.Syntax.Activities.IntermediateActivities.ActivityEdge getBase() { return (fUML.Syntax.Activities.IntermediateActivities.ActivityEdge) this.base; } public org.modeldriven.alf.uml.Activity getActivity() { return (Activity)wrap(this.getBase().activity); } public org.modeldriven.alf.uml.ActivityNode getSource() { return (ActivityNode)wrap(this.getBase().source); } public void setSource(org.modeldriven.alf.uml.ActivityNode source) { this.getBase().setSource(source==null? null: ((ActivityNode) source).getBase()); } public org.modeldriven.alf.uml.ActivityNode getTarget() { return (ActivityNode)wrap(this.getBase().target); } public void setTarget(org.modeldriven.alf.uml.ActivityNode target) { this.getBase().setTarget(target==null? null: ((ActivityNode) target).getBase()); } public org.modeldriven.alf.uml.ValueSpecification getGuard() { return (ValueSpecification)wrap(this.getBase().guard); } public void setGuard(org.modeldriven.alf.uml.ValueSpecification guard) { this.getBase().setGuard(guard==null? null: ((ValueSpecification) guard).getBase()); } public org.modeldriven.alf.uml.StructuredActivityNode getInStructuredNode() { return (StructuredActivityNode)wrap(this.getBase().inStructuredNode); } }
00f8717ff21791dcc3480f010dd55051f548e69d
7d1b25e3b875cf22e3bc283820d5df207452e4dd
/AlpineMinerSDK/src/com/alpine/datamining/api/impl/db/attribute/model/variable/AnalysisDerivedFieldItem.java
dafd3f70897b34d8290714523bd108f0ae112f2d
[]
no_license
thyferny/indwa-work
6e0aea9cbd7d8a11cc5f7333b4a1c3efeabb1ad0
53a3c7d9d831906837761465433e6bfd0278c94e
refs/heads/master
2020-05-20T01:26:56.593701
2015-12-28T05:40:29
2015-12-28T05:40:29
42,904,565
0
0
null
null
null
null
UTF-8
Java
false
false
2,508
java
/** * ClassName DerivedFieldItem.java * * Version information: 1.00 * * Data: 2010-8-9 * * COPYRIGHT (C) 2010 Alpine Solutions. All Rights Reserved. **/ package com.alpine.datamining.api.impl.db.attribute.model.variable; import com.alpine.datamining.api.impl.db.attribute.model.ModelUtility; /** * @author zhaoyong * */ public class AnalysisDerivedFieldItem { public static final String TAG_NAME="DerivedFieldItem"; private static final String ATTR_COLUMNNAME = "columnName"; private static final String ATTR_DATATYPE = "dataType"; private static final String ATTR_EXPRESSION = "expression"; String resultColumnName = null; String dataType = null; String sqlExpression = null; /** * @param resultColumnName * @param dataType * @param sqlExpression */ public AnalysisDerivedFieldItem(String resultColumnName, String dataType, String sqlExpression) { this.resultColumnName = resultColumnName; this.dataType = dataType; this.sqlExpression = sqlExpression; } public String getResultColumnName() { return resultColumnName; } public void setResultColumnName(String resultColumnName) { this.resultColumnName = resultColumnName; } public String getDataType() { return dataType; } public void setDataType(String dataType) { this.dataType = dataType; } public String getSqlExpression() { return sqlExpression; } public void setSqlExpression(String sqlExpression) { this.sqlExpression = sqlExpression; } public boolean equals(Object obj) { if(obj==this){ return true; } else if(obj instanceof AnalysisDerivedFieldItem){ AnalysisDerivedFieldItem item = (AnalysisDerivedFieldItem)obj; return ModelUtility.nullableEquales(item.getDataType(),this.getDataType()) && ModelUtility.nullableEquales(item.getResultColumnName(),this.getResultColumnName()) && ModelUtility.nullableEquales(item.getSqlExpression(),this.getSqlExpression()) ; }else{ return false; } } /** * @return */ public AnalysisDerivedFieldItem clone() { AnalysisDerivedFieldItem item = new AnalysisDerivedFieldItem(resultColumnName,dataType,sqlExpression); return item; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(ATTR_COLUMNNAME).append(":").append(resultColumnName).append(","); sb.append(ATTR_DATATYPE).append(":").append(dataType); sb.append(ATTR_EXPRESSION).append(":").append(sqlExpression).append("\n"); return sb.toString(); } }
90b6495bc82cb9cc370d35aff6ab3d548b1e8311
4198c061003c27046c3bb3549ba9f94acf8bad18
/src/main/java/net/idea/i5wscli/documentaccess/SessionFaultException.java
e556ccea071639641f9b0874170466fda83a9b52
[]
no_license
ideaconsult/iuclid5-ws-cli
240a0986fe8878f7b26d2529c68e8e57e3fe5044
a76ef5fcdf85b7dfc45b4ff59438dd925f7cd59a
refs/heads/master
2021-01-01T15:43:58.970450
2013-02-24T10:34:15
2013-02-24T10:39:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,141
java
/** * SessionFaultException.java * * This file was auto-generated from WSDL * by the Apache Axis2 version: 1.6.2 Built on : Apr 17, 2012 (05:33:49 IST) */ package net.idea.i5wscli.documentaccess; public class SessionFaultException extends java.lang.Exception{ private static final long serialVersionUID = 1361697992299L; private net.idea.i5wscli.documentaccess.DocumentAccessEngineStub.SessionFault faultMessage; public SessionFaultException() { super("SessionFaultException"); } public SessionFaultException(java.lang.String s) { super(s); } public SessionFaultException(java.lang.String s, java.lang.Throwable ex) { super(s, ex); } public SessionFaultException(java.lang.Throwable cause) { super(cause); } public void setFaultMessage(net.idea.i5wscli.documentaccess.DocumentAccessEngineStub.SessionFault msg){ faultMessage = msg; } public net.idea.i5wscli.documentaccess.DocumentAccessEngineStub.SessionFault getFaultMessage(){ return faultMessage; } }
477fe70ae585af33b4362168a8b7b3355a7d5f43
78ba3c9dbc19fefa4ba81795017a3b67f2b87edc
/Java2/src/pk26/treeset/MemberTreeSetTest.java
44f2ff8c5abb211a2ede038e35639fd9d9f89f03
[]
no_license
kimjeen/Java2
0e434bccc3863e7fa5f62ee5086093ed9a5b2718
ebe1d8f2b4068f389f7743e972dac4977da06e60
refs/heads/master
2022-11-13T13:36:13.955867
2020-07-10T09:18:04
2020-07-10T09:18:04
276,334,817
1
0
null
null
null
null
UHC
Java
false
false
677
java
package pk26.treeset; import pk26.Member; public class MemberTreeSetTest { public static void main(String[] args) { //1. MemberTreeSet 객체 생성 MemberTreeSet membertreeset = new MemberTreeSet(); //2. member 객체 생성 Member member1 = new Member(1001, "손흥민"); Member member2 = new Member(1002, "이청용"); Member member3 = new Member(1003, "황희찬"); //3. MemberTreeSet 이용해서 member 객체 추가 membertreeset.addMemeber(member1); membertreeset.addMemeber(member2); membertreeset.addMemeber(member3); //4. show 함수 이용해서 출력. membertreeset.showAllMember(); } }
[ "soldesk@DESKTOP-6GKKE6P" ]
soldesk@DESKTOP-6GKKE6P
63514365175e9c49715931465c3386cc0d9e400d
42104317ce6ee1cadcb00896a9884c4be8396572
/src/main/java/com/platform/house/services/AreaDivisionService.java
f29fb1d0580253bd1b2360b060c225900ec2f557
[]
no_license
Zeldikus/house-platform
129f86cab584962969dffa5b7cabb7a1787914e9
c15d451e15b0fedd744e760a04a77d6015f451eb
refs/heads/master
2023-03-22T07:09:39.810198
2021-03-16T14:31:48
2021-03-16T14:31:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,153
java
package com.platform.house.services; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.github.stuxuhai.jpinyin.PinyinException; import com.github.stuxuhai.jpinyin.PinyinFormat; import com.github.stuxuhai.jpinyin.PinyinHelper; import com.platform.house.dto.AreaDivision; import org.apache.commons.io.FileUtils; import org.apache.log4j.Logger; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import java.io.File; import java.io.IOException; import java.util.Comparator; import java.util.List; import java.util.Objects; /** * Created by Office on 2018/6/17. */ @Service public class AreaDivisionService { private static final Logger log = Logger.getLogger(AreaDivisionService.class); private static JSONArray provinces; private static JSONArray cities; private static JSONArray areas; private static JSONArray streets; static { String path = Objects.requireNonNull(AreaDivisionService.class.getClassLoader().getResource("")).getPath(); try { File provinceFile = new File(path + "json_file/provinces.json"); String provinceStr = FileUtils.readFileToString(provinceFile, "UTF-8"); provinces = JSONArray.parseArray(provinceStr); File cityFile = new File(path + "json_file/cities.json"); String cityStr = FileUtils.readFileToString(cityFile, "UTF-8"); cities = JSONArray.parseArray(cityStr); File areaFile = new File(path + "json_file/areas.json"); String areaStr = FileUtils.readFileToString(areaFile, "UTF-8"); areas = JSONArray.parseArray(areaStr); File streetFile = new File(path + "json_file/streets.json"); String streetStr = FileUtils.readFileToString(streetFile, "UTF-8"); streets = JSONArray.parseArray(streetStr); } catch (IOException e) { log.error(e); } } @Cacheable(cacheNames = "provinces") public JSONArray getProvinces() { return provinces; } @Cacheable(cacheNames = "cities") public JSONArray getCities() { return cities; } @Cacheable(cacheNames = "areas") public JSONArray getAreas() { return areas; } @Cacheable(cacheNames = "streets") public JSONArray getStreets() { return streets; } @Cacheable(cacheNames = "citiesByProvince") public JSONArray getCitiesByProvince(String code) { return getJsonArrayByParentCode(code, cities); } @Cacheable(cacheNames = "areasByCity") public JSONArray getAreasByCity(String code) { return getJsonArrayByParentCode(code, areas); } @Cacheable(cacheNames = "streetsByArea") public JSONArray getStreetsByArea(String code) { return getJsonArrayByParentCode(code, streets); } private JSONArray getJsonArrayByParentCode(String code, JSONArray originJsonArray) { JSONArray returnJsonArray = new JSONArray(); JSONObject jsonObject = null; for(Object object : originJsonArray) { jsonObject = (JSONObject) object; if(jsonObject.get("parent_code").equals(code)) { returnJsonArray.add(jsonObject); } } return returnJsonArray; } @Cacheable(cacheNames = "citiesOrderByLetter") public List<AreaDivision> getCitiesOrderByLetter() throws PinyinException { List<AreaDivision> cityList = cities.toJavaList(AreaDivision.class); for(AreaDivision areaDivistion : cityList) { areaDivistion.setFirst_letters(PinyinHelper.convertToPinyinString(areaDivistion.getName(), "", PinyinFormat.WITHOUT_TONE)); areaDivistion.setInitial(PinyinHelper.getShortPinyin(areaDivistion.getName().substring(0, 1)).toUpperCase()); } cityList.sort(Comparator.comparing(AreaDivision::getFirst_letters)); return cityList; } public JSONObject getCityByCode(String code) throws PinyinException { JSONArray cityList = getCities(); JSONObject jsonObject = null; for(Object object : cityList) { jsonObject = (JSONObject) object; if(jsonObject.get("code").equals(code)) { String name = jsonObject.get("name").toString().replace("市", ""); jsonObject.put("shortPY", PinyinHelper.getShortPinyin(name)); break; } } return jsonObject; } public JSONObject getAreaByCityCodeAndName(String cityCode, String name) { JSONArray areaList = getAreasByCity(cityCode); JSONObject jsonObject = null; for(Object object : areaList) { jsonObject = (JSONObject) object; if(jsonObject.get("name").toString().contains(name)) { break; } } return jsonObject; } public static void main(String[] args) { try { JSONObject s = new AreaDivisionService().getCityByCode("1101"); System.out.println(s); } catch (PinyinException e) { e.printStackTrace(); } } }
089082a2b769859a3666d24142c2a94a8ecaa889
7ffb06851bd6ce9aa15a90903881f86fcb3e2c86
/discovery-service/src/main/java/com/booking/services/discovery/DiscoveryApp.java
63822a8f6b09b4eac439f624e61c4b46be331ca2
[]
no_license
ravitejasrt/moviebooking
28d34e0801cff93e6cd9c999a67ac63193d0d465
d102500a554ce341329126d2c2b631f5566f8e3a
refs/heads/master
2023-07-15T14:04:03.945311
2021-09-07T07:34:11
2021-09-07T07:34:11
403,858,008
0
0
null
null
null
null
UTF-8
Java
false
false
446
java
package com.booking.services.discovery; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; @SpringBootApplication @EnableEurekaServer public class DiscoveryApp { public static void main(String[] args) { new SpringApplicationBuilder(DiscoveryApp.class).run(args); } }
80ecbbdb2bdde3498ca0f53facbf542b5516c988
68c262ef689ecbeb7da787334f4a3219bc122596
/src/test/java/org/sdmlib/examples/emfstudyright/EMFStudyRightModel/util/UniversityPOCreator.java
45119318814617b99a941af4466e30acd99b08b3
[]
no_license
fujaba/SDMLib-EMF
0011cdf7fefeb778d3983a7ae3bd45a9e870c50a
e22a6fa5b65739296d753ffffde4ef43619b8424
refs/heads/master
2021-01-17T13:43:56.210200
2016-07-01T14:20:45
2016-07-01T14:20:45
21,420,238
0
0
null
null
null
null
UTF-8
Java
false
false
694
java
package org.sdmlib.examples.emfstudyright.EMFStudyRightModel.util; import org.sdmlib.models.pattern.util.PatternObjectCreator; import de.uniks.networkparser.IdMap; import org.sdmlib.examples.emfstudyright.EMFStudyRightModel.University; public class UniversityPOCreator extends PatternObjectCreator { @Override public Object getSendableInstance(boolean reference) { if(reference) { return new UniversityPO(new University[]{}); } else { return new UniversityPO(); } } public static IdMap createIdMap(String sessionID) { return org.sdmlib.examples.emfstudyright.EMFStudyRightModel.util.CreatorCreator.createIdMap(sessionID); } }