blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 332 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 7 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 557 values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 17 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 82 values | src_encoding stringclasses 28 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 7 5.41M | extension stringclasses 11 values | content stringlengths 7 5.41M | authors listlengths 1 1 | author stringlengths 0 161 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6e721ae56f02604bd92ef570a80834410d29905a | db953af98881eaa2097542d7b19d1e66bc1cbb7a | /Q2.1/LinearRegression.java | 250a32bfec0ef68a27187b656bbc8512dd5f68db | [] | no_license | aidantc9/Linear-Regression-Assignment- | ae58e9eb5cd27d2e860a1ec356771a022bd17a11 | 6a638df2cf4084b5abffbb4fe9d0da66adeaaae6 | refs/heads/master | 2020-06-27T11:34:09.370997 | 2019-07-31T23:44:14 | 2019-07-31T23:44:14 | 199,943,075 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,543 | java | /**
* The class <b>LinearRegression</b> implements gradient
* descent for multiple variables
*
* @author gvj (gvj@eecs.uottawa.ca)
*
*/
public class LinearRegression{
/**
* Number of features (usually "n" in litterature)
*/
private int nbreOfFeatures;
/**
* Number of samples (usually "m" in litterature)
*/
private int nbreOfSamples;
/**
* the nbreOfFeatures X nbreOfSamples Matrix of samples
*/
private double[][] samplesMatrix;
/**
* the nbreOfSamples Matrix of samples target values
*/
private double[] samplesValues;
/**
* the nbreOfFeatures Matrix theta of current hypthesis function
*/
private double[] theta;
/**
* number of samples received so far
*/
private int currentNbreOfSamples;
/**
* a place holder for theta during descent calculation
*/
private double[] tempTheta;
/**
* counts how many iterations have been performed
*/
private int iteration;
private int pos;//holds current position of the array that is being added to
/**
* Object's contructor. The constructor initializes the instance
* variables. The starting hypthesis is theta[i]=0.0 for all i
*
* @param n the number of features that we will have
* @param m the number of samples that we will have
*
*/
public LinearRegression(int n, int m){
this.nbreOfFeatures = n+1;
this.nbreOfSamples =m;
samplesMatrix = new double[nbreOfSamples][nbreOfFeatures];
samplesValues = new double[nbreOfSamples];
iteration=0;
pos=0;
theta= new double[nbreOfFeatures];
tempTheta = new double[nbreOfFeatures];
for (int i =0;i<nbreOfFeatures;i++){ //sets all the starting theta values to 0.0
theta[i]=0.0;
tempTheta[i]=0.0;
}
}
/**
* Add a new sample to samplesMatrix and samplesValues
*
* @param x the vectors of samples
* @param y the coresponding expected value
*
*/
public void addSample(double[] x, double y){
double[] temp;
temp = new double[x.length];//makes a copy of the x array rather than using its reference which would cause many issues
for (int i=0;i<x.length;i++){
temp[i]=x[i];
}
samplesMatrix[pos]=temp;
samplesValues[pos]=y;
pos++;
}
/**
* Returns the current hypothesis for the value of the input
* @param x the input vector for which we want the current hypothesis
*
* @return h(x)
*/
private double hypothesis(double[] x){
double h,temp;
h=0;
for (int i=0;i<x.length;i++){//calculates hypothesis for n+1 thetas
h+=theta[i]*x[i];
}
return h;
}
/**
* Returns a string representation of hypthesis function
*
* @return the string "theta0 x_0 + theta1 x_1 + .. thetan x_n"
*/
public String currentHypothesis(){
String fin="";
for (int i=0;i<theta.length;i++){//creates a string that holds all the theta values in a string format
fin+= Double.toString(theta[i])+"x_"+i+" ";
}
return (fin);
}
/**
* Returns the current cost
*
* @return the current value of the cost function
*/
public double currentCost(){
double cost=0;
double temp=0;
for (int i=0;i<nbreOfSamples;i++){//calculates the summation of the cost function
temp+=(((hypothesis(samplesMatrix[i]))-samplesValues[i])*((hypothesis(samplesMatrix[i]))-samplesValues[i]));
}
cost=(1.0/(nbreOfSamples))*temp;
return(cost);
}
/**
* runs several iterations of the gradient descent algorithm
*
* @param alpha the learning rate
*
* @param numberOfSteps how many iteration of the algorithm to run
*/
public void gradientDescent(double alpha, int numberOfSteps) {
for (int k=0;k<numberOfSteps;k++){//for loop for each iteration
int len = nbreOfSamples;
iteration++;
for (int i=0;i<nbreOfFeatures;i++){// for loop for each feature
double sum=0;
for (int j=0;j<len;j++){//for loop that finds the summation from the given formula
sum+= ((hypothesis(samplesMatrix[j]))-samplesValues[j])*samplesMatrix[j][i];
}
tempTheta[i]=sum;//holds temperary theta values which will be added to the actual theta array later
}
for (int d=0;d<tempTheta.length;d++){
theta[d]= theta[d]-alpha*(2.0/(len))*tempTheta[d];
}
}
}
/**
* Getter for theta
*
* @return theta
*/
public double[] getTheta(){
return theta;
}
/**
* Getter for iteration
*
* @return iteration
*/
public int getIteration(){
return iteration;
}
} | [
"noreply@github.com"
] | noreply@github.com |
12c99d2b06b027f0d8879ba04dfeff88aecfa265 | 7b5ab977a5671d0d9902ba4a1e38326ba3fdf5fd | /src/test/java/AccessoriesTest/ValveOilTest.java | dbf51ea2e0199fc4ba4346401ea63c0f718e6f0c | [] | no_license | Jack-Portwood/Week12_Weekendhw_MusicShop | e88a857e7e2eb928dce23f0b4e56eb97294d39e3 | 964dbfa37918f52347ad0bff0dc29f551879d11c | refs/heads/master | 2021-05-17T15:15:11.865395 | 2020-03-29T14:26:34 | 2020-03-29T14:26:34 | 250,839,386 | 0 | 0 | null | 2020-10-13T20:43:35 | 2020-03-28T16:14:27 | Java | UTF-8 | Java | false | false | 722 | java | package AccessoriesTest;
import Accessories.ValveOil;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class ValveOilTest {
ValveOil valveOil;
@Before
public void before() {
valveOil = new ValveOil("150ml", 20.00, 50.00);
}
@Test
public void getVolume() {
assertEquals("150ml", valveOil.getVolume());
}
@Test
public void getUnitCost(){
assertEquals(20.00, valveOil.getUnitCost(),0.01);
}
@Test
public void getRRP(){
assertEquals(50.00, valveOil.getRRP(), 0.01);
}
@Test
public void getcalMarkup(){
assertEquals(30.00, valveOil.calMarkup(), 0.01);
}
}
| [
"callumhausrath@callumhrathsmbp.home"
] | callumhausrath@callumhrathsmbp.home |
d1076fa1807e53593b2e7e578a070e0ec892b281 | 1882cf0c267c7a11b8b84331639ca2b70b0fc82f | /src/bidi/Editora.java | 19dc207702b820a7ed0bb1784ed54ac6982808f1 | [] | no_license | netodeolino/Biblioteca | 9f352651c59f8b28a9b649266d2a185c29f96557 | f2562ca4f79b351049a6376af7cda48d8cfd86e3 | refs/heads/master | 2021-01-10T07:09:38.235952 | 2016-03-24T01:43:45 | 2016-03-24T01:43:45 | 54,604,008 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 606 | java | package bidi;
/**
* @author neto
*/
public class Editora {
private int id_editora;
private String nome;
/**
* @return the id_editora
*/
public int getId_editora() {
return id_editora;
}
/**
* @param id_editora the id_editora to set
*/
public void setId_editora(int id_editora) {
this.id_editora = id_editora;
}
/**
* @return the nome
*/
public String getNome() {
return nome;
}
/**
* @param nome the nome to set
*/
public void setNome(String nome) {
this.nome = nome;
}
}
| [
"netodeolino@gmail.com"
] | netodeolino@gmail.com |
12e0e551478ee272b269985c7cf26c7b656af718 | 6f0da3bd6141c9310595cbbef62c97c7450ca0cb | /Assignment3/final/CompressThread.java | af4ced0b348003727c378682a5fd0c695b8ee718 | [] | no_license | AjanJayant/cs131 | f20d9c490cc0b80824693234c54ba8a107ac04e1 | bdba0947e870b41d24f2fad27e971b208c497ed4 | refs/heads/master | 2021-01-18T14:09:40.120605 | 2013-03-26T18:25:29 | 2013-03-26T18:25:29 | 7,622,615 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,082 | java | import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.FileChannel;
import java.util.zip.CRC32;
import java.util.zip.Deflater;
import java.io.FileDescriptor;
import java.io.FileOutputStream;
public class CompressThread extends Thread
{
public static FileChannel infoWriter;
public static FileOutputStream dataWriter = new FileOutputStream(FileDescriptor.out);
public static int HEADER_LENGTH = 10;
public static int FOOTER_LENGTH = 8;
static byte[] input;
static byte[] prev;
static byte[] output;
private int status = 0;
CompressThread(byte[] b, int size)
{
infoWriter= new FileOutputStream(FileDescriptor.out).getChannel();
dataWriter = new FileOutputStream(FileDescriptor.out);
HEADER_LENGTH = 10;
FOOTER_LENGTH = 8;
input = b.clone();
}
public static void myHeaderWriter()
{
try
{
ByteBuffer header = ByteBuffer.allocate(HEADER_LENGTH);
header.order(ByteOrder.LITTLE_ENDIAN);
header.flip();
infoWriter.write(header);
}
catch (IOException e)
{
System.err.println("error");
};
}
public int getStatus()
{
return status;
}
public static void myFooterWriter(int value, int length)
{
try
{
ByteBuffer footer = ByteBuffer.allocate(FOOTER_LENGTH);
footer.order(ByteOrder.LITTLE_ENDIAN);
footer.putInt(value).putInt((int)(length % Math.pow(2, 32)));
footer.flip();
infoWriter.write(footer);
}
catch (IOException e)
{
System.err.println("error");
};
}
public void run()
{
CRC32 myCRC = new CRC32();
myCRC.reset();
byte[] output = new byte[100];
myCRC.update(input);
Deflater compressor = new Deflater(Deflater.DEFAULT_COMPRESSION, true);
compressor.setInput(input);
if(hasPrev)
compressor.setDictionary(prev);
compressor.deflate(output);
status = 1;
compressor.end();
}
}
| [
"ajanjayant@Ajans-MacBook-Pro.local"
] | ajanjayant@Ajans-MacBook-Pro.local |
86fd78e29b72d0796ac4b4f199a35c83a989c9d4 | 3cf97492a20fe70430f7e1c628f8365f5cde4892 | /src/main/java/exception/DataBaseConnectionException.java | 0ed707d85e1197908faffe1494e1671af7d0dfe9 | [] | no_license | olegvyacheslavowich/epamProject | 68d7e9380c7229a0ce9edafcf5fe12fee0da56f3 | ddb7b8be388dd7549f0e31086d08ff66dc2227e8 | refs/heads/master | 2021-01-23T02:16:26.894751 | 2017-06-09T09:18:54 | 2017-06-09T09:18:54 | 85,981,620 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 411 | java | package exception;
/**
* Created by 20_ok on 6/9/2017.
*/
public class DataBaseConnectionException extends Exception {
public DataBaseConnectionException(String message) {
super(message);
}
public DataBaseConnectionException(String message, Throwable cause) {
super(message, cause);
}
public DataBaseConnectionException(Throwable cause) {
super(cause);
}
}
| [
"20_ok_13@mail.ru"
] | 20_ok_13@mail.ru |
1ec67cb18a66674b91561292215d2ce6aec660f6 | a942a15083a829e99a8a8d3f5bc360b46225f29b | /ParamAnnotations/src/main/java/com/resource/ParamAnnotation.java | bbbac52981989fa28aa3fe5814b816e3cd4a06e1 | [] | no_license | SubhadeepSen/RESTFul-Web-Services | b78780cb50937ee550ca9c05878977c16240339b | 8a571ff53a27b8cc95ca9f23619507464c5145dd | refs/heads/master | 2020-04-04T22:36:13.291536 | 2018-11-06T05:19:00 | 2018-11-06T05:19:00 | 156,329,280 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,607 | java | package com.resource;
import javax.ws.rs.BeanParam;
import javax.ws.rs.CookieParam;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.MatrixParam;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import com.beanParam.BeanParamClass;
@Path("annotations")
public class ParamAnnotation {
//rest/annotations?queryParam=Query
//rest/annotations;matrixParam=Matrix
//@HeaderParam takes the value from request header. It needs to be set in the request header before sending the request
//@CookieParam takes the value from request cookie.
@GET
@Path("/{pathParam}")
@Produces(MediaType.TEXT_PLAIN)
public String getPathParam(@PathParam("pathParam") String pathParam){
return "Path Param : " + pathParam;
}
@GET
@Produces(MediaType.TEXT_PLAIN)
public String getParams(@QueryParam("queryParam") String queryParam,
@MatrixParam("matrixParam") String matrixParam,
@HeaderParam("headerParam") String headerParam,
@CookieParam("cookieParam") String cookieParam){
return "Query Param : " + queryParam + "\nMatrix Param : " + matrixParam +
"\nHeader Param : " + headerParam + "\nCookie Param : " + cookieParam;
}
@GET
@Path("/{name}/beanParam")
@Produces(MediaType.TEXT_PLAIN)
public String getBeanParam(@BeanParam BeanParamClass beanParam){
String response = "Name: "+beanParam.getPathParam()+" "+beanParam.getSurName()+"\nAge: "+beanParam.getAge();
return response;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
b83e90fb78a176cd53cc17382d98321e28b85e93 | 7caf50db50b1883ac867df0e3b0422d2ee947426 | /7models/ThreadsLocks/DiningPhilosophers/python/Philosopher.java | f7d890692ba2fe463e1a876ac3709d24a67ae664 | [] | no_license | GabrieldeFreire/concurrent | 9e3a635b8d6088866f108767bd6bfc28db991aac | 6b9aa8cdb32c7c8b6e1156d293746115843851e4 | refs/heads/master | 2022-02-12T10:10:01.727753 | 2019-08-05T00:34:28 | 2019-08-05T00:34:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,427 | java | /***
* Excerpted from "Seven Concurrency Models in Seven Weeks",
* published by The Pragmatic Bookshelf.
* Copyrights apply to this code. It may not be used to create training material,
* courses, books, articles, and the like. Contact us if you are in doubt.
* We make no guarantees that this code is fit for any purpose.
* Visit http://www.pragmaticprogrammer.com/titles/pb7con for more book information.
***/
import java.util.Random;
class Philosopher extends Thread {
final int eatGoal = 50;
private int id;
private Chopstick left, right;
private Random random;
private int eatCount;
public Philosopher(int id, Chopstick left, Chopstick right) {
this.id = id;
this.left = left; this.right = right;
random = new Random();
}
public String toString() {
return "Philosopher #" + id;
}
public void run() {
try {
while(eatCount < eatGoal) {
Thread.sleep(random.nextInt(10)); // Think for a while
synchronized(left) { // Grab left chopstick
synchronized(right) { // Grab right chopstick
Thread.sleep(random.nextInt(10)); // Eat for a while
++eatCount;
}
}
if (eatCount % 10 == 0)
System.out.println(this + " has eaten " + eatCount + " times.");
}
System.out.println(this + " is full.");
} catch(InterruptedException e) {}
}
}
| [
"luciano@ramalho.org"
] | luciano@ramalho.org |
fe42d8b592b59b87e8af88358eb8586518143c1f | da6ca2aa902643d9bcc0f6b0e35a16caab1d13ce | /MiChao/app/src/main/java/cniao5/com/cniao5shop/widget/CnToolbar.java | ae2210be6f8ffff08adab708fbbf2e74df8a9360 | [] | no_license | X-1944-X/MiChao | a7ecddc16ddec287b4852d22112ce99d97962ccf | 656339fd1a5676dae7e81f681be0608d9bdd002b | refs/heads/master | 2021-08-07T16:05:46.978262 | 2017-11-08T13:11:16 | 2017-11-08T13:11:16 | 109,975,284 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,150 | java | package cniao5.com.cniao5shop.widget;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.v4.view.GravityCompat;
import android.support.v7.internal.widget.TintTypedArray;
import android.support.v7.widget.Toolbar;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;
import cniao5.com.cniao5shop.R;
/**
* Created by Ivan on 15/9/28.
*/
public class CnToolbar extends Toolbar {
private LayoutInflater mInflater;
private View mView;
private TextView mTextTitle;
private EditText mSearchView;
private ImageButton mRightImageButton;
public CnToolbar(Context context) {
this(context,null);
}
public CnToolbar(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public CnToolbar(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initView();
setContentInsetsRelative(10,10);
if(attrs !=null) {
final TintTypedArray a = TintTypedArray.obtainStyledAttributes(getContext(), attrs,
R.styleable.CnToolbar, defStyleAttr, 0);
final Drawable rightIcon = a.getDrawable(R.styleable.CnToolbar_rightButtonIcon);
if (rightIcon != null) {
//setNavigationIcon(navIcon);
setRightButtonIcon(rightIcon);
}
boolean isShowSearchView = a.getBoolean(R.styleable.CnToolbar_isShowSearchView,false);
if(isShowSearchView){
showSearchView();
hideTitleView();
}
a.recycle();
}
}
private void initView() {
if(mView == null) {
mInflater = LayoutInflater.from(getContext());
mView = mInflater.inflate(R.layout.toolbar1, null);
mTextTitle = (TextView) mView.findViewById(R.id.toolbar1_title);
mSearchView = (EditText) mView.findViewById(R.id.toolbar1_searchview);
mRightImageButton = (ImageButton) mView.findViewById(R.id.toolbar1_rightButton);
LayoutParams lp = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.CENTER_HORIZONTAL);
addView(mView, lp);
}
}
public void setRightButtonIcon(Drawable icon){
if(mRightImageButton !=null){
mRightImageButton.setImageDrawable(icon);
mRightImageButton.setVisibility(VISIBLE);
}
}
public void setRightButtonOnClickListener(OnClickListener li){
mRightImageButton.setOnClickListener(li);
}
@Override
public void setTitle(int resId) {
setTitle(getContext().getText(resId));
}
@Override
public void setTitle(CharSequence title) {
initView();
if(mTextTitle !=null) {
mTextTitle.setText(title);
showTitleView();
}
}
public void showSearchView(){
if(mSearchView !=null)
mSearchView.setVisibility(VISIBLE);
}
public void hideSearchView(){
if(mSearchView !=null)
mSearchView.setVisibility(GONE);
}
public void showTitleView(){
if(mTextTitle !=null)
mTextTitle.setVisibility(VISIBLE);
}
public void hideTitleView() {
if (mTextTitle != null)
mTextTitle.setVisibility(GONE);
}
//
// private void ensureRightButtonView() {
// if (mRightImageButton == null) {
// mRightImageButton = new ImageButton(getContext(), null,
// android.support.v7.appcompat.R.attr.toolbarNavigationButtonStyle);
// final LayoutParams lp = generateDefaultLayoutParams();
// lp.gravity = GravityCompat.START | (Gravity.VERTICAL_GRAVITY_MASK);
// mRightImageButton.setLayoutParams(lp);
// }
// }
}
| [
"you@example.com"
] | you@example.com |
d423b7396a50e7957e27cbea90dff89ed3b685de | 786118870c5bc072f3e1616d90e91aa07bbac198 | /Practicas de Codigo/Clase10/src/clase10/TiposMusicales.java | 22bb745865e8cb51600a7c703e80ae11e5f14f3c | [] | no_license | rainthstrive/AD21-OOP | f88bd83166fcd663295fdfd7f84ba79f3b0ec54d | 5f9d955e8b40d8d6787eea2d3f6c5953c60c42a2 | refs/heads/main | 2023-08-23T17:56:06.757657 | 2021-10-27T14:01:41 | 2021-10-27T14:01:41 | 394,973,362 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 295 | java | package clase10;
public class TiposMusicales{
private String tipoMusica;
TiposMusicales(String tipo) {
setTipoMusica(tipo);
}
public String getTipoMusica(){
return tipoMusica;
}
public void setTipoMusica(String tipo){
tipoMusica = tipo;
}
} | [
"rainthstrive@gmail.com"
] | rainthstrive@gmail.com |
a90e74d7476029ad219fe56c3619a8a48d0d1d00 | 599bfdaa8629c9840138d2b0484baf64242c1755 | /app/src/main/java/com/example/lijin/kahani/util/SystemUiHiderHoneycomb.java | 0d494224f0c488688a177b231bee80a97c046a71 | [] | no_license | lijinc/Kahani | 5e3fa726973f5c6da5ea1cfab1c3003c64cd19c8 | 88c909d0a8b87f84b6d34fb19ed28f39507ebc0e | refs/heads/master | 2016-09-05T09:12:13.478546 | 2014-12-31T20:12:43 | 2014-12-31T20:12:43 | 28,522,147 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,988 | java | package com.example.lijin.kahani.util;
import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;
import android.view.View;
import android.view.WindowManager;
/**
* An API 11+ implementation of {@link SystemUiHider}. Uses APIs available in
* Honeycomb and later (specifically {@link View#setSystemUiVisibility(int)}) to
* show and hide the system UI.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class SystemUiHiderHoneycomb extends SystemUiHiderBase {
/**
* Flags for {@link View#setSystemUiVisibility(int)} to use when showing the
* system UI.
*/
private int mShowFlags;
/**
* Flags for {@link View#setSystemUiVisibility(int)} to use when hiding the
* system UI.
*/
private int mHideFlags;
/**
* Flags to test against the first parameter in
* {@link android.view.View.OnSystemUiVisibilityChangeListener#onSystemUiVisibilityChange(int)}
* to determine the system UI visibility state.
*/
private int mTestFlags;
/**
* Whether or not the system UI is currently visible. This is cached from
* {@link android.view.View.OnSystemUiVisibilityChangeListener}.
*/
private boolean mVisible = true;
/**
* Constructor not intended to be called by clients. Use
* {@link SystemUiHider#getInstance} to obtain an instance.
*/
protected SystemUiHiderHoneycomb(Activity activity, View anchorView, int flags) {
super(activity, anchorView, flags);
mShowFlags = View.SYSTEM_UI_FLAG_VISIBLE;
mHideFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE;
mTestFlags = View.SYSTEM_UI_FLAG_LOW_PROFILE;
if ((mFlags & FLAG_FULLSCREEN) != 0) {
// If the client requested fullscreen, add flags relevant to hiding
// the status bar. Note that some of these constants are new as of
// API 16 (Jelly Bean). It is safe to use them, as they are inlined
// at compile-time and do nothing on pre-Jelly Bean devices.
mShowFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
mHideFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_FULLSCREEN;
}
if ((mFlags & FLAG_HIDE_NAVIGATION) != 0) {
// If the client requested hiding navigation, add relevant flags.
mShowFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
mHideFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
mTestFlags |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
}
}
/**
* {@inheritDoc}
*/
@Override
public void setup() {
mAnchorView.setOnSystemUiVisibilityChangeListener(mSystemUiVisibilityChangeListener);
}
/**
* {@inheritDoc}
*/
@Override
public void hide() {
mAnchorView.setSystemUiVisibility(mHideFlags);
}
/**
* {@inheritDoc}
*/
@Override
public void show() {
mAnchorView.setSystemUiVisibility(mShowFlags);
}
/**
* {@inheritDoc}
*/
@Override
public boolean isVisible() {
return mVisible;
}
private View.OnSystemUiVisibilityChangeListener mSystemUiVisibilityChangeListener
= new View.OnSystemUiVisibilityChangeListener() {
@Override
public void onSystemUiVisibilityChange(int vis) {
// Test against mTestFlags to see if the system UI is visible.
if ((vis & mTestFlags) != 0) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
// Pre-Jelly Bean, we must manually hide the action bar
// and use the old window flags API.
mActivity.getActionBar().hide();
mActivity.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
// Trigger the registered listener and cache the visibility
// state.
mOnVisibilityChangeListener.onVisibilityChange(false);
mVisible = false;
} else {
mAnchorView.setSystemUiVisibility(mShowFlags);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
// Pre-Jelly Bean, we must manually show the action bar
// and use the old window flags API.
mActivity.getActionBar().show();
mActivity.getWindow().setFlags(
0,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
// Trigger the registered listener and cache the visibility
// state.
mOnVisibilityChangeListener.onVisibilityChange(true);
mVisible = true;
}
}
};
}
| [
"lijinc100@gmail.com"
] | lijinc100@gmail.com |
159514d619bbadbf47e0e97203408e14344d8abb | 6a5fa3cb75fb5fba6532eb8af0778fc6c04676e8 | /src/main/java/Snake/game/threads/thGenera.java | 946f63ef2e69d74bfeaf14f2e61d2b6a5e4ffd5f | [] | no_license | TheFedelino01/Snake | 17b867e033bd8b582ae42063d130ab9b4b0283c8 | b1811a7f355661003bd8eb7197e2975ac517acf1 | refs/heads/master | 2020-05-31T12:30:40.467904 | 2019-08-30T08:57:33 | 2019-08-30T08:57:33 | 190,281,353 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,049 | java | package Snake.game.threads;
import Snake.game.gioco;
import java.util.Random;
/**
@author Saccani Federico, federico.saccani01@gmail.com
@version 1.0
*/
/**
La classe corrisponde al thread incaricato nel generare la mela quando viene catturata
*/
public class thGenera extends Thread {
/**
@brief Costruttore senza parametri della classe
*/
public thGenera(){
}
/**
@brief Metodo run del thread
Se il serpente ha catturato la mela, il thread genera la posizione e dice alla vipera di cercarla
*/
@Override
public void run(){
while(!isInterrupted()){
gioco.getInstance().aspettoChePrendeMela();
// if(gioco.getInstance().isFindingMela()==false){
//Ha preso la mela e quindi ora la rigenero
generaPosizione();
//gioco.getInstance().setFindingMela(true);
// }
gioco.getInstance().dicoMelaGenerata();
//else sta ancora cercando la mela
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
/**
@brief Metodo genera la posizione della mela evitando che venga spawnata in corrispondenza di un blocco che compone la vipera
*/
private void generaPosizione(){
int xMax = gioco.getInstance().getDimensioneX();
int yMax = gioco.getInstance().getDimensioneY();
//Utilizzati per controlli spawn
int dimVipera = gioco.getInstance().getDimensione();
int dimSchermoX = gioco.getInstance().getDimensioneX();
int dimSchermoY = gioco.getInstance().getDimensioneY();
int posMelaX,posMelaY;
int checkRespawn=0;
do {
//Se e' diverso da 0 significa che ho richiamato il do while()
if(checkRespawn!=0){System.out.println("Mela spawnata in corrispondenza di un blocco... Respawning!");}
Random rn = new Random();
posMelaX = rn.nextInt(xMax);
rn = new Random();
posMelaY = rn.nextInt(yMax);
posMelaX = posMelaX-(posMelaX%dimVipera);
if(posMelaX==0){ posMelaX+=dimVipera; }else if(posMelaX==dimSchermoX){posMelaX-=dimVipera;}//Evito che finisca con un pezzo fuori dello schermo
posMelaY = posMelaY-(posMelaY%dimVipera);
if(posMelaY==0){ posMelaY+=dimVipera; }else if(posMelaY==dimSchermoY){posMelaY-=dimVipera;}//Evito che finisca con un pezzo fuori dello schermo
checkRespawn++;
//Se non riesco a spawnare la mela per 1000 tentativi, il gioco é finito
if(checkRespawn==1000){System.out.println(">>>>>>>>GIOCO FINITO!"); return;}
}while(gioco.getInstance().ePresenteUnBlocco(posMelaX,posMelaY)==true);//Se ho spawnato la mela in corrispondenza di un blocco, lo rispawno
System.out.println("Genero mela: "+"X:"+posMelaX+" Y:"+posMelaY);
gioco.getInstance().setPosMela(posMelaX, posMelaY);
}
}
| [
"federico.saccani01@gmail.com"
] | federico.saccani01@gmail.com |
46e58b50e7282e8c6e1ab7a3f391499a65bf2377 | b6bfba71956589aa6f56729ec9ebce824a5fb8f4 | /src/main/java/org/zhenchao/iterator/Iterator.java | e704356b6beb09d206beff551e9ea5c9b45693c9 | [
"Apache-2.0"
] | permissive | plotor/design-pattern | 5d78d0ef7349a2d637bea5b7270c9557820e5f60 | 4614bab50921b61610693b9b1ed06feddcee9ce6 | refs/heads/master | 2022-12-20T17:49:13.396939 | 2020-10-13T14:37:14 | 2020-10-13T14:37:14 | 67,619,122 | 0 | 0 | Apache-2.0 | 2020-10-13T14:37:15 | 2016-09-07T15:21:45 | Java | UTF-8 | Java | false | false | 385 | java | package org.zhenchao.iterator;
/**
* 迭代器接口
*
* @author zhenchao.wang 2019-11-19 17:26
* @version 1.0.0
*/
public interface Iterator {
/**
* 是否存在下一个元素
*
* @return
*/
boolean hasNext();
/**
* 获取下一个元素,同时会将迭代器移动到下一个元素
*
* @return
*/
Object next();
}
| [
"zhenchao.wang@hotmail.com"
] | zhenchao.wang@hotmail.com |
86acce58fb8079f995c7907cd83dbcf95ce1888d | 04cd8c95a681b091d1bd95000cf22fbdb62a0111 | /ntsiot-system/src/main/java/com/nts/iot/modules/system/dao/RealCheckPointMapper.java | d9b5eb27146612f8514eb749ba8c520fb76ffe02 | [
"Apache-2.0"
] | permissive | iOS-Lab/tracker-server | c2aa674989949d138fbfabf10e203c044c3a7477 | 74f81cc9e511c0bc75a98440d1fad2a25a827ce3 | refs/heads/master | 2023-01-08T14:33:44.711624 | 2020-11-04T06:31:40 | 2020-11-04T06:31:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 606 | java | package com.nts.iot.modules.system.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nts.iot.modules.system.dto.TaskDetailDto;
import com.nts.iot.modules.system.model.RealCheckPoint;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
@Repository
public interface RealCheckPointMapper extends BaseMapper<RealCheckPoint> {
/**
* 查询任务详细
* @param id
* @return
*/
List<TaskDetailDto> selectTaskDetail(@Param("id") Long id);
}
| [
"18687269789@163.com"
] | 18687269789@163.com |
4145d93dd36c0a626e69531dd8c75b680c40970e | e0214782b7347650c3178448cef539294fd61c5f | /src/main/java/com/example/moneytracker/models/Users.java | 849c3420ba50ec1f5e9b1a1cea3e895e5e5c84b4 | [] | no_license | tchahin1/budget-tracker-backend | a9e396a8bb0e3abc99ec56d1e0d93c73183334bf | a430aadc3bfe8ba19ca52ed2a8c558293c385dee | refs/heads/master | 2023-04-29T19:04:36.632886 | 2019-07-17T10:01:59 | 2019-07-17T10:01:59 | 197,349,845 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 925 | java | package com.example.moneytracker.models;
import javax.persistence.*;
@Entity
@Table(name = "users")
public class Users {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false)
private String name;
@Column(nullable = false)
private String last_name;
@Column(nullable = false)
private String email;
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 getLast_name() {
return last_name;
}
public void setLast_name(String last_name) {
this.last_name = last_name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}
| [
"abdurrazaky@gmail.com"
] | abdurrazaky@gmail.com |
25ec57605e1df3bbfabac4abd2e175fe3571649b | 2a0abe6cd019b7ee859e1298b8ff9c5cb9e5164e | /Semana 3/ex1/Paralelogramo.java | 931fd7aae864d74ea1a9b151ca9e5e3f5905425a | [] | no_license | guilherme-lima-ventre/Programacao-Orientada-a-Obejtos | 21fbc2397cee8126bb1d680de0dd56109408fbd3 | 2c866c53aa31d33eed9140a74e0e988c1aa308f7 | refs/heads/main | 2023-09-04T05:14:10.886267 | 2021-10-19T17:11:16 | 2021-10-19T17:11:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 582 | java | public class Paralelogramo {
private int area;
private String tipo;
public Paralelogramo(int ladoA) {
this.area = ladoA * ladoA;
this.tipo = "Paralelogramo quadrado";
}
public Paralelogramo(int ladoA, int ladoB) {
if(ladoA == ladoB)
this.tipo = "Paralelogramo quadrado";
else
this.tipo = "Paralelogramo retangulo";
this.area = ladoA * ladoB;
}
public int getArea() {
return this.area;
}
public String getTipo() {
return this.tipo;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
c7324f9eb422b81507595c4e72e2d4b656629dbe | daf7279637017da76dfbcbb68ff5eaf2ef04c994 | /reptileHello/src/main/java/cn/hncu/tool/Encoding.java | 1baa0ad9a48890edde4584e8405a03c05fb083bd | [] | no_license | chenhaoxiang/reptile | 6c23db3a405ba055354fa12bb1e0f6027c703c94 | d1a2b86cb6d7391ec8d95e353ec223a2b3daee46 | refs/heads/master | 2021-01-21T10:26:24.933649 | 2017-03-01T04:37:17 | 2017-03-01T04:37:17 | 83,432,242 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 519 | java | package cn.hncu.tool;
import java.io.UnsupportedEncodingException;
/**
* Created with IntelliJ IDEA.
* User: 陈浩翔.
* Date: 2017/2/27.
* Time: 下午 6:45.
* Explain:编码转换
*/
public class Encoding {
public static String encoding(String str){
if(str==null){
return null;
}
try {
str =new String(str.getBytes("GBK"),"UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return str;
}
}
| [
"chxpostbox@outlook.com"
] | chxpostbox@outlook.com |
22b3780a88919ef118b59628f324b5ee546c8d9d | 077a255f96f72b4195d5cb5cf15cb8c0570e6a6f | /SortAllApp/src/com/berry/sortapp/utils/PinyinComparator.java | 9ebf09d5e8b54cbdf42e8156a0f1045965cf1764 | [] | no_license | berrytao7/SortAllApp2 | 97991080ecc5b88c9b06a716b1e46fbc5692d242 | 597c41d036da7b253ba1da3a58c39971f50ed4c5 | refs/heads/master | 2021-01-23T12:06:59.056381 | 2015-09-22T10:01:45 | 2015-09-22T10:01:45 | 42,926,112 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 532 | java | package com.berry.sortapp.utils;
import java.util.Comparator;
import com.berry.sortapp.bean.SortModel;
/**
*
* @author berry
*
*/
public class PinyinComparator implements Comparator<SortModel> {
public int compare(SortModel o1, SortModel o2) {
if (o1.getSortLetters().equals("@")
|| o2.getSortLetters().equals("#")) {
return -1;
} else if (o1.getSortLetters().equals("#")
|| o2.getSortLetters().equals("@")) {
return 1;
} else {
return o1.getSortLetters().compareTo(o2.getSortLetters());
}
}
}
| [
"berrytao@pada.cc"
] | berrytao@pada.cc |
8c2bdd2511228538ff49fea3028358f6c7dc8331 | 55912d09492d307bad641c2527652a2c3813d340 | /url-shortening/src/main/java/com/smile/urlshortening/entity/ShortUrlRepository.java | d1482c4bee87f2c0c993b9087abdcf3ddd900846 | [] | no_license | LeeEungJae/urlshortner | f9d15b555a1070f269ba0b72de15a9c628d1afe2 | 531bc65298cd2f2b0ff8d27bb3a9dfa21fb851a0 | refs/heads/master | 2023-02-07T06:24:44.003423 | 2020-12-14T07:52:50 | 2020-12-14T07:52:50 | 321,246,452 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 347 | java | package com.smile.urlshortening.entity;
import org.springframework.data.jpa.repository.JpaRepository;
public interface ShortUrlRepository extends JpaRepository<ShortUrl, Long> {
boolean existsByShortenUrlOrOriginUrl(String shorten_url, String origin_url);
ShortUrl findByShortenUrlOrOriginUrl(String shorten_url, String origin_url);
}
| [
"god123564@naver.com"
] | god123564@naver.com |
7409c5c67be94717b2a17a9fb0e50e356e88f5c3 | 1aafe71cf93cedbdd7b990ccefb2c1e954e7886d | /src/io/TryWithResourcesMelhorForma.java | 15a99bfa461ad034b741b72bdb54c982ce30a1f5 | [
"MIT"
] | permissive | Daniel-Fonseca-da-Silva/Misto-de-arquivos-Java | 15e41c4915893d3565e385ff57217106776e9bc1 | ac887d72649378035c5db83c59657fbf9d703b34 | refs/heads/master | 2023-06-25T12:12:38.148154 | 2021-08-02T18:49:14 | 2021-08-02T18:49:14 | 392,059,709 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 588 | java | package io;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
public class TryWithResourcesMelhorForma {
public static void main(String[] args) {
String path = "/media/atharnan/6CB6EF182E4E9853/Java-SE/Java World/JavaCode/clientes.txt";
try (BufferedReader br = new BufferedReader(new FileReader(path)))
{
String line = br.readLine();
while (line != null)
{
System.out.println(line);
line = br.readLine();
}
}
catch( IOException e)
{
System.out.println("Error: " + e.getMessage());
}
}
}
| [
"developer-web@programmer.net"
] | developer-web@programmer.net |
5087249a9bfef882d654d4355b457120bf8d6e81 | e3fbca1cbc2f69a00d9b02d315fd39abdadcb1ba | /xmall-admin/src/main/java/com/yzsunlei/xmall/admin/controller/SmsHomeRecommendSubjectController.java | 40cd0e5dc39354eec6e9c5a3ef149772f6322ff9 | [
"MIT"
] | permissive | pipipapi/xmall | 27b63e8f06359dd627ee35e1d67f74f1307bd8d0 | 79a9d9ba77e92cc832063114c5a520cf111bff1f | refs/heads/master | 2020-09-23T20:52:23.766180 | 2019-12-03T17:28:56 | 2019-12-03T17:28:56 | 225,584,553 | 0 | 0 | MIT | 2019-12-03T09:47:11 | 2019-12-03T09:47:10 | null | UTF-8 | Java | false | false | 3,268 | java | package com.yzsunlei.xmall.admin.controller;
import com.yzsunlei.xmall.admin.dto.CommonResult;
import com.yzsunlei.xmall.db.model.SmsHomeRecommendSubject;
import com.yzsunlei.xmall.admin.service.SmsHomeRecommendSubjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 首页专题推荐管理Controller
* Created by macro on 2018/11/6.
*/
@Controller
@Api(tags = "SmsHomeRecommendSubjectController", description = "首页专题推荐管理")
@RequestMapping("/home/recommendSubject")
public class SmsHomeRecommendSubjectController {
@Autowired
private SmsHomeRecommendSubjectService recommendSubjectService;
@ApiOperation("添加首页推荐专题")
@RequestMapping(value = "/create", method = RequestMethod.POST)
@ResponseBody
public Object create(@RequestBody List<SmsHomeRecommendSubject> homeBrandList) {
int count = recommendSubjectService.create(homeBrandList);
if(count>0){
return new CommonResult().success(count);
}
return new CommonResult().failed();
}
@ApiOperation("修改推荐排序")
@RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST)
@ResponseBody
public Object updateSort(@PathVariable Long id, Integer sort) {
int count = recommendSubjectService.updateSort(id,sort);
if(count>0){
return new CommonResult().success(count);
}
return new CommonResult().failed();
}
@ApiOperation("批量删除推荐")
@RequestMapping(value = "/delete", method = RequestMethod.POST)
@ResponseBody
public Object delete(@RequestParam("ids") List<Long> ids) {
int count = recommendSubjectService.delete(ids);
if(count>0){
return new CommonResult().success(count);
}
return new CommonResult().failed();
}
@ApiOperation("批量修改推荐状态")
@RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST)
@ResponseBody
public Object updateRecommendStatus(@RequestParam("ids") List<Long> ids, @RequestParam Integer recommendStatus) {
int count = recommendSubjectService.updateRecommendStatus(ids,recommendStatus);
if(count>0){
return new CommonResult().success(count);
}
return new CommonResult().failed();
}
@ApiOperation("分页查询推荐")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public Object list(@RequestParam(value = "subjectName", required = false) String subjectName,
@RequestParam(value = "recommendStatus", required = false) Integer recommendStatus,
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
List<SmsHomeRecommendSubject> homeBrandList = recommendSubjectService.list(subjectName,recommendStatus,pageSize,pageNum);
return new CommonResult().pageSuccess(homeBrandList);
}
}
| [
"sun4763"
] | sun4763 |
ec570b2aece8c11771c160eaba026456d1da0ca4 | 9d2b59591c3839b2cbe6c7c7eba95676b23240c2 | /src/lambda/LambdaTest.java | 7e0631740e786fe14e8cb6d150e2d9cd51e5e5f4 | [] | no_license | JFourier/Test | a385bde68f97b6cad7c6e22809178257f68a360d | 7f39297dc6ae410e14b035d41b8db6c06b15b9db | refs/heads/master | 2020-04-02T20:25:58.750354 | 2019-10-28T08:30:33 | 2019-10-28T08:30:33 | 154,768,954 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 887 | java | package lambda;
import javax.swing.*;
import java.util.Arrays;
import java.util.Date;
/**
* @author He.H
* @date 2019/1/11 16:23
**/
public class LambdaTest {
public static void main(String[] args){
String[] planets = new String[] {"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"};
System.out.println(Arrays.toString(planets));
System.out.println("Sorted");
Arrays.sort(planets);
System.out.println(Arrays.toString(planets));
System.out.println("sorted by length");
Arrays.sort(planets, (f, s)-> f.length()-s.length());
System.out.println(Arrays.toString(planets));
Timer t = new Timer(1000, event ->
System.out.println(" time is" + new Date()));
t.start();
JOptionPane.showMessageDialog(null, "QUIT?");
System.exit(0);
}
}
| [
"934087288@qq.com"
] | 934087288@qq.com |
ea696a3f9175f426d392d58b378c24d99184200a | 417657ebd1bb1b35df4cc4750c12a334f1b308f1 | /Behavioural/src/sample/ChatRoom.java | 8c1be4c98455545f516833518b28e6183560f3a3 | [] | no_license | rahadiandwiputra/MediatorPattern | 6b564f29a75d68c49d1b0b097d6e019ac7c4c21c | 43a47e8859316512b62b42654d87485b5e1e3bf8 | refs/heads/master | 2022-11-25T00:50:14.906603 | 2020-08-07T18:57:41 | 2020-08-07T18:57:41 | 285,900,725 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 237 | java | package sample;
import java.util.Date;
public class ChatRoom {
public static void showMessage(User user, String message){
System.out.println(new Date().toString() + " [" + user.getName() + "] : " + message);
}
}
| [
"noreply@github.com"
] | noreply@github.com |
c3f18e76884d0d3d1ae341d12df12de91933141c | 18a3802a7b4c606f5ea64cee3942df4c060b16f3 | /app/src/main/java/com/example/leehuiqi/helloworld/MainActivity.java | 1e0f64acc214d4bdc2e8540718f42df887045303 | [] | no_license | leehuiqi/HelloWorld | 46d1699181db4bde6463d94df3c97cff316ae6fb | 2e7ff13622bc5a5dbcd8837e2d31cfa515173c62 | refs/heads/master | 2016-08-09T23:46:45.034281 | 2016-01-21T09:18:54 | 2016-01-21T09:18:54 | 50,095,742 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,802 | java | package com.example.leehuiqi.helloworld;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends AppCompatActivity {
//hiiiii
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
}
@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_main, 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();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
| [
"huiqi_1994@hotmail.com"
] | huiqi_1994@hotmail.com |
df20cf3405a9926fa37361229cc569e055f986d3 | 0dab9d8ab003b8e43b689f9060be88d5e8f330d9 | /src/main/java/com/antra/assignment/userproject/service/UserDeleteService.java | d7eac525f848ef9f339066f491bee8f63d5d25e1 | [] | no_license | ningdi1994/Assignment | 99ed5248782db8652440f673cd986c88f65550e0 | 93816dc5042c182caf6c275b827835c09f9fa1a9 | refs/heads/master | 2020-04-27T14:24:19.036495 | 2019-03-07T19:53:58 | 2019-03-07T19:53:58 | 174,409,107 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 681 | java | package com.antra.assignment.userproject.service;
import com.antra.assignment.userproject.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class UserDeleteService {
@Autowired
UserFindService userFindService;
@Autowired
UserRepository userRepository;
public void deleteUserById(Integer id){
userFindService.getUserById(id);
userRepository.deleteById(id);
}
}
| [
"ningdi1994@gmail.com"
] | ningdi1994@gmail.com |
e0dafd18db9de30411e7f3e9475ed8bbb106eade | f3311662a5c71e71e5c8769b27a20276b2701688 | /src/main/java/zk/example/MyViewModel.java | 5e0887dc901ebfe907823d2ebf89f1a6447722a1 | [
"Apache-2.0"
] | permissive | zkoss-demo/zk-cache-busting-on-demand | 6fae731e03cd748f52e54bdb765f20737dfa0278 | f18586ae96345d1aa94fcc13256bbdef89b278d9 | refs/heads/master | 2023-07-02T17:38:49.091554 | 2021-07-02T09:24:46 | 2021-07-02T09:24:54 | 381,640,287 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 363 | java | package zk.example;
import org.zkoss.bind.annotation.Command;
import org.zkoss.bind.annotation.Init;
import org.zkoss.bind.annotation.NotifyChange;
public class MyViewModel {
private int count;
@Init
public void init() {
count = 100;
}
@Command
@NotifyChange("count")
public void cmd() {
++count;
}
public int getCount() {
return count;
}
}
| [
"robertwenzel@potix.com"
] | robertwenzel@potix.com |
a413f7cbbae819de12e134318149adfeec4b373e | 7de64b6baf1b746e48a8642d9d3a527592ae04c7 | /workspace/retinoblastomaMovil/app/src/main/java/com/retinoblastoma/Service.java | cd21534c0de6daa402978efc06989e08e925eb0d | [] | no_license | saridsa1/retinoblastoma | 45c51ec3339d43c8b6b851929a771c9ef6709789 | 426f197849d7c8c8f2ac2f1beb055dfb38083dfa | refs/heads/master | 2020-05-25T06:57:54.025057 | 2016-04-12T03:14:14 | 2016-04-12T03:14:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 258 | java | package com.retinoblastoma;
import retrofit.Call;
import retrofit.http.Body;
import retrofit.http.POST;
public interface Service {
@POST("retinoblastoma/rest/imagen/upload_image")
Call<DTOJsonResponse> getResponse(@Body DTOJsonRequest params);
}
| [
"jtupacpa@gmail.com"
] | jtupacpa@gmail.com |
8cecc6905492e5fe9afbd475ed0dd27e73d6367f | 33186e547481c93f723a1397cd12217e1a256ad4 | /src/main/java/commander/Receiver.java | e3fb8155aeefd0112556b799228d4266fdc47163 | [] | no_license | DoranBlade/design | 3f06a92a0a0a5668ad97eb9f16b03545d21c1043 | 8966309cf225fa3918d3a1a821feb7d21746d2ee | refs/heads/master | 2020-03-09T15:11:02.466782 | 2018-11-05T09:14:04 | 2018-11-05T09:14:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 218 | java | package commander;
public class Receiver {
public void makeProductA() {
System.out.println("make product a");
}
public void makeProductB() {
System.out.println("make product b");
}
}
| [
"toericliu@qq.com"
] | toericliu@qq.com |
9c69ef4e130b776f034e1b1ae21bb5125ad9a6e3 | 2e74fab9478df86b5a695459121830b8bfeb2ea8 | /app/src/test/java/jp/ac/kanto_pc/ohmori/g_test04/ExampleUnitTest.java | bf90fd19bf9e7e076b02c688acf2e1590c4fcd58 | [] | no_license | mori73/G_test04 | b1dfa40470c6a4671cbcbc21e09206bad07652c9 | 1475a5758016b2e02d9cf2f62017eace23a117b5 | refs/heads/master | 2020-12-05T03:31:24.772981 | 2020-01-06T01:05:15 | 2020-01-06T01:05:15 | 231,998,202 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 407 | java | package jp.ac.kanto_pc.ohmori.g_test04;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"tomochin0629@gmail.com"
] | tomochin0629@gmail.com |
1beec78f74d8e900c16a2b79526dc12c2262671c | 8629effd250da40f6bb90ad172d90dd91b0f6a68 | /app/src/main/java/ru/slybeaver/githubclient/view/adapters/RepositoryListAdapter.java | 156e0406cb14d3bbb57613dee9b8ee6082f1e63d | [] | no_license | psinetron/AndroidGitHubClient | 94530a3c670ae73e9dfae7628892490203aa096f | be8bfca9f45571d0fc9e825c6ecf79ae07fc2586 | refs/heads/master | 2021-01-13T16:33:16.090553 | 2019-12-25T09:53:44 | 2019-12-25T09:53:44 | 79,196,381 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,831 | java | package ru.slybeaver.githubclient.view.adapters;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.squareup.picasso.Picasso;
import ru.slybeaver.githubclient.gitclientrxjava.R;
import ru.slybeaver.githubclient.model.dto.RepositoryDTO;
import ru.slybeaver.githubclient.presenter.RepositoriesPresenter;
import java.util.List;
/**
* Created by psinetron on 11.01.2017.
* http://slybeaver.ru
* slybeaver@slybeaver.ru
*/
public class RepositoryListAdapter extends RecyclerView.Adapter<RepositoryListAdapter.ViewHolder> {
private List<RepositoryDTO> repositories = null;
private Context context = null;
private RepositoriesPresenter presenter;
public RepositoryListAdapter(Context context, List<RepositoryDTO> repositories, RepositoriesPresenter presenter) {
this.context = context;
this.repositories = repositories;
this.presenter = presenter;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.template_repository, parent, false);
return new ViewHolder(v);
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
if (repositories == null) {
return;
}
final RepositoryDTO repository = repositories.get(position);
holder.tvRepoName.setText(repository.getName());
holder.tvRepoDescription.setText(repository.getDescription());
holder.tvRepoInfo.setText(context.getString(R.string.repo_info_line,repository.getLanguage(), repository.getStargazersCount(), repository.getOwner().getLogin()));
Picasso.with(context).load(repository.getOwner().getAvatarUrl()).resize(80, 80).into(holder.ivBuilderAva);
holder.itemView.setOnClickListener(v -> presenter.clickRepo(repository));
}
@Override
public int getItemCount() {
if (repositories == null) {
return 0;
}
return repositories.size();
}
class ViewHolder extends RecyclerView.ViewHolder {
private TextView tvRepoName;
private TextView tvRepoDescription;
private TextView tvRepoInfo;
private ImageView ivBuilderAva;
ViewHolder(View itemView) {
super(itemView);
tvRepoName = (TextView) itemView.findViewById(R.id.tvRepoName);
tvRepoDescription = (TextView) itemView.findViewById(R.id.tvRepoDescription);
tvRepoInfo = (TextView) itemView.findViewById(R.id.tvRepoInfo);
ivBuilderAva = (ImageView) itemView.findViewById(R.id.ivBuilderAva);
}
}
}
| [
"psinetron@mail.ru"
] | psinetron@mail.ru |
c4a841d7276f4dbe332b9d4f3237ff222bbae9a9 | 7a2081e056a062acba87d90328071cefdda48124 | /src/GasStation.java | 0baeca9e51e5a383c47e3c489867813cee93c115 | [
"MIT"
] | permissive | dengxiangjun/LeetCode | c19e513d44d89ae142fa2eaf69f3961948f32fbc | 36ab5bf3d58f350fd1ac1c121114decec96564f8 | refs/heads/master | 2021-10-20T14:30:32.685554 | 2019-02-28T08:42:36 | 2019-02-28T08:42:36 | 110,114,644 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 904 | java | /**
* https://leetcode.com/problems/gas-station/description/
* There are N gas stations along a circular route, where the amount of gas at station i is gas[i].
* <p/>
* You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its next station (i+1). You begin the journey with an empty tank at one of the gas stations.
* <p/>
* Return the starting gas station's index if you can travel around the circuit once, otherwise return -1.
* <p/>
* Note:
* The solution is guaranteed to be unique.
* Created by deng on 2018/4/9.
*/
public class GasStation {
public static void main(String[] args) {
int[] gas = {1, 2, 3, 2, 6};
int[] cost = {2, 1, 2, 5, 3};
int res = canCompleteCircuit(gas, cost);
System.out.println(res);
}
public static int canCompleteCircuit(int[] gas, int[] cost) {
return 0;
}
}
| [
"437833417@qq.com"
] | 437833417@qq.com |
5462d533583a2b381c884ccfe61b71b87b632127 | c4c34173dd5a15f23c41836f1388feb276e36f74 | /app/src/main/java/com/zhang/javabase/day21/test/Test5.java | d29d01b10345af467f0b7e8146f8387b45af15eb | [] | no_license | keeponZhang/JavaBase | dded4a6c9191b35679df2871d231b0c5618d2380 | c4fe1eeadbc35052c4e36b7bbf983d8eab23b23f | refs/heads/master | 2020-09-15T11:32:06.246228 | 2019-11-24T12:14:21 | 2019-11-24T12:14:21 | 223,432,550 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,157 | java | package com.zhang.javabase.day21.test;
import java.io.File;
import java.io.FileReader;
import java.util.Scanner;
public class Test5 {
/**
* 需求:从键盘输入接收一个文件夹路径,打印出该文件夹下所有的.java文件名
*
* 分析:
* 从键盘接收一个文件夹路径
* 1,如果录入的是不存在,给与提示
* 2,如果录入的是文件路径,给与提示
* 3,如果是文件夹路径,直接返回
*
* 打印出该文件夹下所有的.java文件名
* 1,获取到该文件夹路径下的所有的文件和文件夹,存储在File数组中
* 2,遍历数组,对每一个文件或文件夹做判断
* 3,如果是文件,并且后缀是.java的,就打印
* 4,如果是文件夹,就递归调用
*/
public static void main(String[] args) {
File dir = getDir();
printJavaFile(dir);
}
/*
* 获取键盘录入的文件夹路径
* 1,返回值类型File
* 2,不需要有参数
*/
public static File getDir() {
Scanner sc = new Scanner(System.in); //创建键盘录入对象
System.out.println("请输入一个文件夹路径");
while(true) {
String line = sc.nextLine(); //将键盘录入的文件夹路径存储
File dir = new File(line); //封装成File对象
if(!dir.exists()) {
System.out.println("您录入的文件夹路径不存在,请重新录入");
}else if(dir.isFile()) {
System.out.println("您录入的是文件路径,请重新录入文件夹路径");
}else {
return dir;
}
}
}
/*
* 获取文件夹路径下的所.java文件
* 1,返回值类型 void
* 2,参数列表File dir
*/
public static void printJavaFile(File dir) {
//1,获取到该文件夹路径下的所有的文件和文件夹,存储在File数组中
File[] subFiles = dir.listFiles();
//2,遍历数组,对每一个文件或文件夹做判断
for (File subFile : subFiles) {
//3,如果是文件,并且后缀是.java的,就打印
if(subFile.isFile() && subFile.getName().endsWith(".java")) {
System.out.println(subFile);
//4,如果是文件夹,就递归调用
}else if (subFile.isDirectory()){
printJavaFile(subFile);
}
}
}
}
| [
"zhangwengao@yy.com"
] | zhangwengao@yy.com |
518d9772b7de156bd0b3f22e2ef39ab44e971738 | 4b4c792fdcb8ea2372a6d93cb09b7ca25e8c29bd | /app/src/main/java/com/example/projekatispit/MainActivity.java | 4376ab85ee3c5153a640a6d15f24b737fa8d246f | [] | no_license | jovicn/RMA-Android | 9faf375bc764f1d38a161bff195a173a92757a52 | ba64cc85f1762c1fe07576a13a76d08370b1fd57 | refs/heads/main | 2023-06-24T17:53:46.697878 | 2021-07-24T10:09:25 | 2021-07-24T10:09:25 | 389,062,276 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,789 | java | package com.example.projekatispit;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import com.google.android.material.navigation.NavigationView;
public class MainActivity extends AppCompatActivity implements DrawerLocker, NavigationView.OnNavigationItemSelectedListener, LoginFragment.OnFragmentInteractionListener, BookListFragment.OnFragmentInteractionListener, RegistracijaFragment.OnFragmentInteractionListener, BasketListFragment.OnFragmentInteractionListener, OrderFinishFragment.OnFragmentInteractionListener{
private DrawerLayout drawer;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
drawer = findViewById(R.id.drawer_layout);
NavigationView navigationView = findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this,drawer,toolbar,R.string.navigation_drawer_open,R.string.navigation_drawer_close);
drawer.addDrawerListener(toggle);
toggle.syncState();
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new LoginFragment()).commit();
}
@Override
public void onBackPressed() {
if(drawer.isDrawerOpen(GravityCompat.START)){
drawer.closeDrawer(GravityCompat.START);
}else {
super.onBackPressed();
}
}
//Odavde
@Override
public void onLoginSuccess() {
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new BookListFragment()).addToBackStack(null).commit();
}
@Override
public void onRegisterOpen() {
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new RegistracijaFragment()).addToBackStack(null).commit();
}
@Override
public void onDeleteItemFromList() {
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new BasketListFragment()).addToBackStack(null).commit();
}
@Override
public void onCheckout() {
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new OrderFinishFragment()).addToBackStack(null).commit();
}
@Override
public void onBookSelect(String bookId) {
Fragment bookDetailFragment = new BookDetailFragment();
Bundle bundle = new Bundle();
bundle.putString("bookId", bookId);
bookDetailFragment.setArguments(bundle);
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, bookDetailFragment).addToBackStack(null).commit();
}
@Override
public void onRegistrySuccess() {
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new LoginFragment()).addToBackStack(null).commit();
}
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()){
case R.id.nav_profile:
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new ProfileFragment()).commit();
break;
case R.id.nav_books:
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new BookListFragment()).commit();
break;
case R.id.nav_basket:
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new BasketListFragment()).commit();
break;
/*case R.id.nav_ordered:
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new ProfileFragment()).commit();
break;*/
}
drawer.closeDrawer(GravityCompat.START);
return true;
}
@Override
public void lockDrawer() {
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
}
@Override
public void unlockDrawer() {
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_OPEN);
}
@Override
public void onFinishOrder() {
getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new BookListFragment()).addToBackStack(null).commit();
}
} | [
"79156648+jovicn@users.noreply.github.com"
] | 79156648+jovicn@users.noreply.github.com |
f5dfcb37ecf33d40d33e2d4492e6b33f5e3710d8 | 51aef8e206201568d04fb919bf54a3009c039dcf | /trunk/src/com/jmex/model/converters/maxutils/MaxChunkIDs.java | 99a42dbdc6caef93a80ee965873c7e175e82257c | [] | no_license | lihak/fairytale-soulfire-svn-to-git | 0b8bdbfcaf774f13fc3d32cc3d3a6fae64f29c81 | a85eb3fc6f4edf30fef9201902fcdc108da248e4 | refs/heads/master | 2021-02-11T15:25:47.199953 | 2015-12-28T14:48:14 | 2015-12-28T14:48:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,120 | java | /*
* Copyright (c) 2003-2008 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'jMonkeyEngine' nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.jmex.model.converters.maxutils;
/**
* Started Date: Jun 26, 2004<br><br>
*
* List of 3ds ChunkHeader ID #'s.
* @author Jack Lindamood
*/
interface MaxChunkIDs {
// These must all be diffrent values
static final int NULL_CHUNK =0x0000;
static final int UNKNOWN1 =0x0001;
static final int TDS_VERSION =0x0002;
static final int COLOR_FLOAT =0x0010;
static final int COLOR_BYTE =0x0011;
static final int CLR_BYTE_GAMA=0x0012;
static final int CLR_FLOAT_GAMA=0x0013;
static final int PRCT_INT_FRMT=0x0030;
static final int PRCT_FLT_FRMT=0x0031;
static final int MASTER_SCALE =0x0100;
static final int BACKGRD_BITMAP=0x1100;
static final int BACKGRD_COLOR=0x1200;
static final int USE_BCK_COLOR =0x1201;
static final int V_GRADIENT =0x1300;
static final int SHADOW_BIAS =0x1400;
static final int SHADOW_MAP_SIZE=0x1420;
static final int SHADOW_MAP_RANGE=0x1450;
static final int RAYTRACE_BIAS=0x1460;
static final int O_CONSTS =0x1500;
static final int GEN_AMB_COLOR=0x2100;
static final int FOG_FLAG =0x2200;
static final int FOG_BACKGROUND=0x2210;
static final int DISTANCE_QUEUE=0x2300;
static final int LAYERED_FOG_OPT=0x2302;
static final int DQUEUE_BACKGRND=0x2310;
static final int DEFAULT_VIEW =0x3000;
static final int VIEW_CAMERA =0x3080;
static final int EDIT_3DS =0x3d3d;
static final int MESH_VERSION =0x3d3e;
static final int NAMED_OBJECT =0x4000;
static final int OBJ_TRIMESH =0x4100;
static final int VERTEX_LIST =0x4110;
static final int VERTEX_OPTIONS =0x4111;
static final int FACES_ARRAY =0x4120;
static final int MESH_MAT_GROUP =0x4130;
static final int TEXT_COORDS =0x4140;
static final int SMOOTH_GROUP =0x4150;
static final int COORD_SYS =0x4160;
static final int MESH_COLOR =0x4165;
static final int MESH_TEXTURE_INFO=0x4170;
static final int LIGHT_OBJ =0x4600;
static final int LIGHT_SPOTLIGHT=0x4610;
static final int LIGHT_ATTENU_ON=0x4625;
static final int LIGHT_SPOT_SHADOWED=0x4630;
static final int LIGHT_LOC_SHADOW=0x4641;
static final int LIGHT_SEE_CONE=0x4650;
static final int LIGHT_SPOT_OVERSHOOT=0x4652;
static final int LIGHT_SPOT_ROLL=0x4656;
static final int LIGHT_SPOT_BIAS=0x4658;
static final int LIGHT_IN_RANGE =0x4659;
static final int LIGHT_OUT_RANGE=0x465a;
static final int LIGHT_MULTIPLIER=0x465b;
static final int CAMERA_FLAG =0x4700;
static final int CAMERA_RANGES =0x4720;
static final int MAIN_3DS =0x4D4D;
static final int KEY_VIEWPORT=0x7001;
static final int VIEWPORT_DATA=0x7011;
static final int VIEWPORT_DATA3=0x7012;
static final int VIEWPORT_SIZE=0x7020;
static final int XDATA_SECTION=0x8000;
static final int MAT_NAME =0xa000;
static final int MAT_AMB_COLOR=0xa010;
static final int MAT_DIF_COLOR=0xa020;
static final int MAT_SPEC_CLR =0xa030;
static final int MAT_SHINE =0xa040;
static final int MAT_SHINE_STR=0xa041;
static final int MAT_ALPHA =0xa050;
static final int MAT_ALPHA_FAL=0xa052;
static final int MAT_REF_BLUR =0xa053;
static final int MAT_TWO_SIDED =0xa081;
static final int MAT_SELF_ILUM=0xa084;
static final int MAT_WIREFRAME_ON=0xa085;
static final int MAT_WIRE_SIZE=0xa087;
static final int IN_TRANC_FLAG =0xa08a;
static final int MAT_SOFTEN =0xa08c;
static final int MAT_WIRE_ABS =0xa08e;
static final int MAT_SHADING =0xa100;
static final int TEXMAP_ONE =0xa200;
static final int MAT_REFLECT_MAP =0xa220;
static final int MAT_FALLOFF =0xa240;
static final int MAT_TEX_BUMP_PER=0xa252;
static final int MAT_TEX_BUMPMAP=0xa230;
static final int MAT_REFL_BLUR =0xa250;
static final int MAT_TEXNAME =0xa300;
static final int MAT_SXP_TEXT_DATA=0xa320;
static final int MAT_SXP_BUMP_DATA =0xa324;
static final int MAT_TEX2MAP =0xa33a;
static final int MAT_TEX_FLAGS =0xa351;
static final int MAT_TEX_BLUR =0xa353;
static final int TEXTURE_V_SCALE=0xa354;
static final int TEXTURE_U_SCALE=0xa356;
static final int MAT_BLOCK =0xafff;
static final int KEYFRAMES =0xb000;
static final int KEY_AMB_LI_INFO=0xb001;
static final int KEY_OBJECT =0xb002;
static final int KEY_CAMERA_OBJECT=0xb003;
static final int KEY_CAM_TARGET=0xb004;
static final int KEY_OMNI_LI_INFO=0xb005;
static final int KEY_SPOT_TARGET =0xb006;
static final int KEY_SPOT_OBJECT =0xb007;
static final int KEY_SEGMENT =0xb008;
static final int KEY_CURTIME =0xb009;
static final int KEY_HEADER=0xb00a;
static final int TRACK_HEADER =0xb010;
static final int TRACK_PIVOT =0xb013;
static final int BOUNDING_BOX =0xb014;
static final int MORPH_SMOOTH =0xb015;
static final int TRACK_POS_TAG=0xb020;
static final int TRACK_ROT_TAG=0xb021;
static final int TRACK_SCL_TAG=0xb022;
static final int KEY_FOV_TRACK =0xb023;
static final int KEY_ROLL_TRACK =0xb024;
static final int KEY_COLOR_TRACK=0xb025;
static final int KEY_HOTSPOT_TRACK=0xb027;
static final int KEY_FALLOFF_TRACK=0xb028;
static final int NODE_ID =0xb030;
} | [
"you@example.com"
] | you@example.com |
d6e76ef41ea0bd379616c041c27002969a394de5 | 43ea91f3ca050380e4c163129e92b771d7bf144a | /services/dcs/src/main/java/com/huaweicloud/sdk/dcs/v2/model/RestoreInstanceRequest.java | e449b7ddf777b3632ec621062b77ed5f8dfb4ce8 | [
"Apache-2.0"
] | permissive | wxgsdwl/huaweicloud-sdk-java-v3 | 660602ca08f32dc897d3770995b496a82a1cc72d | ee001d706568fdc7b852792d2e9aefeb9d13fb1e | refs/heads/master | 2023-02-27T14:20:54.774327 | 2021-02-07T11:48:35 | 2021-02-07T11:48:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,907 | java | package com.huaweicloud.sdk.dcs.v2.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.huaweicloud.sdk.dcs.v2.model.RestoreInstanceBody;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Request Object
*/
public class RestoreInstanceRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="instance_id")
private String instanceId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="body")
private RestoreInstanceBody body = null;
public RestoreInstanceRequest withInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
/**
* Get instanceId
* @return instanceId
*/
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public RestoreInstanceRequest withBody(RestoreInstanceBody body) {
this.body = body;
return this;
}
public RestoreInstanceRequest withBody(Consumer<RestoreInstanceBody> bodySetter) {
if(this.body == null ){
this.body = new RestoreInstanceBody();
bodySetter.accept(this.body);
}
return this;
}
/**
* Get body
* @return body
*/
public RestoreInstanceBody getBody() {
return body;
}
public void setBody(RestoreInstanceBody body) {
this.body = body;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RestoreInstanceRequest restoreInstanceRequest = (RestoreInstanceRequest) o;
return Objects.equals(this.instanceId, restoreInstanceRequest.instanceId) &&
Objects.equals(this.body, restoreInstanceRequest.body);
}
@Override
public int hashCode() {
return Objects.hash(instanceId, body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RestoreInstanceRequest {\n");
sb.append(" instanceId: ").append(toIndentedString(instanceId)).append("\n");
sb.append(" body: ").append(toIndentedString(body)).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 ");
}
}
| [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
208475eebb40d7f26bdf579fbbe78abc2fa61f3a | cf3c2e4a011fb1beb16f05ba21b447ba775b6e7b | /src/main/java/technopolisspring/technopolis/exception/AuthorizationException.java | 2e7e089e05436011bcfa1dbc23a391ade7d6014d | [] | no_license | PetarStefPetrov/Technopolis-Spring | 97f82222757cd9463819ae8eae11e100cd7fad1f | 75cbbdbe6347e195d3dae3a9710360573c108965 | refs/heads/master | 2020-12-05T07:35:06.256287 | 2020-01-17T09:26:30 | 2020-01-17T09:26:30 | 232,048,733 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 188 | java | package technopolisspring.technopolis.exception;
public class AuthorizationException extends RuntimeException {
public AuthorizationException(String msg){
super(msg);
}
}
| [
"59064606+HristoforHr@users.noreply.github.com"
] | 59064606+HristoforHr@users.noreply.github.com |
2a67d5b05291133610da511875cbe5acb79f2bb0 | 6d436e745c973fda04b979c9de32b7700a9a871a | /.svn/pristine/2a/2a67d5b05291133610da511875cbe5acb79f2bb0.svn-base | b5d38e98f0301bf09c1c506b24933c43a5e2fd6f | [] | no_license | andyzen619/FlightBookingApp | e765ed414733211f8f31fbdc39f7a2deeeb3481a | 2f6de3f6ef8ce5a5e03ca590ce2908ff357fb6ed | refs/heads/master | 2021-01-10T13:47:24.951078 | 2016-01-14T22:14:41 | 2016-01-14T22:14:41 | 49,678,735 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,360 | package cs.b07.cscb07project.backend.managers;
import cs.b07.cscb07project.backend.users.User;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* A database used to verify usernames and passwords.
* @author Raphael Alviz, Zain Amir, Ian Ferguson, Andy Liang, Johnathan Tsoi
*/
public class PasswordManager implements Serializable {
/**
* Serialization.
*/
private static final long serialVersionUID = 3609098958223080939L;
private HashMap<String, String> passwordDatabase;
private String filePath;
private static final Logger fLogger = Logger.getLogger(PasswordManager.class.getPackage()
.getName());
/**
* Creates a new PassManager for the users whose information
* is stored in file filePath.
* @throws IOException if filePath cannot be opened/created.
*/
public PasswordManager(File file) throws IOException {
passwordDatabase = new HashMap<>();
filePath = file.getPath();
// Populates the record list using stored data, if it exists.
if (file.exists()) {
readFromFile(filePath);
} else {
file.createNewFile();
}
}
/**
* Writes the passwords to file outputStream.
*/
public void saveToFile() {
try (
OutputStream file = new FileOutputStream(filePath);
OutputStream buffer = new BufferedOutputStream(file);
ObjectOutput output = new ObjectOutputStream(buffer)
) {
output.writeObject(passwordDatabase);
} catch (IOException ex) {
fLogger.log(Level.SEVERE, "Cannot perform output.", ex);
}
}
/**
* Given the file path to a .csv file of user usernames and passwords, will read file,
* and enter usernames and passwords into the PasswordManager.
* @param filePath A String giving the file path to a .csv file of correctly formated
* User data.
*/
public void uploadPasswordManager(String filePath) {
try {
BufferedReader br = new BufferedReader(new FileReader(filePath));
String line;
// Loop through each line in the CSV file
while ((line = br.readLine()) != null && !line.isEmpty()) {
String[] fields = line.split(",");
String username = fields[0];
String password = fields[1];
addUser(username, password);
}
br.close();
} catch (FileNotFoundException e) {
fLogger.log(Level.SEVERE, "Cannot perform upload. File not found.", e);
} catch (IOException e) {
fLogger.log(Level.SEVERE, "Cannot perform upload. I/O error occured while reading"
+ " from file.", e);
}
}
/**
* Adds a username and password pair to the PasswordDatabase using the given username as
* the key.
* @param username A String representation of the users username.
* @param password A String representation of the users password.
*/
public void addUser(String username, String password) {
passwordDatabase.put(username, password);
}
/**
* Adds a username and password pair to the PasswordDatabase using the given username as
* the key.
* @param user A User object to be added to the PasswordDatabase.
* @param password A String representation of the users password.
*/
public void addUser(User user, String password) {
passwordDatabase.put(user.getUserName(), password);
}
/**
* Returns true if and only if the given password is an exact match to the password
* associated with the given username.
* @param username A String representing the username to be verified.
* @param password A String representing the password to be checked against the given
* username.
* @return true if and only if the given password is an exact match to the password
* associated with the given username. (Case sensitive).
*/
public boolean verifyPassword(String username, String password) {
boolean isValid = false;
if (passwordDatabase.get(username).equals(password)) {
isValid = true;
}
return isValid;
}
@SuppressWarnings("unchecked")
private void readFromFile(String path) {
try (
InputStream file = new FileInputStream(path);
InputStream buffer = new BufferedInputStream(file);
ObjectInput input = new ObjectInputStream(buffer)
) {
//deserialize the Map
passwordDatabase = (HashMap<String, String>)input.readObject();
} catch (ClassNotFoundException ex) {
fLogger.log(Level.SEVERE, "Cannot perform input. Class not found.", ex);
} catch (IOException ex) {
fLogger.log(Level.SEVERE, "Cannot perform input.", ex);
}
}
}
| [
"andyzen619@gmail.com"
] | andyzen619@gmail.com | |
79edae34aa6a56f14ce62814b8bb745a269e1a47 | 01988a3293813d66817044a5db33441980dcf91a | /src/main/java/com/ibm/watson/developer_cloud/alchemy/v1/model/ImageFace.java | c55a39c28c90f5f9f905e1352ad317d565173a12 | [
"metamail",
"LicenseRef-scancode-other-permissive",
"Beerware",
"LicenseRef-scancode-zeusbench",
"Apache-1.1",
"LicenseRef-scancode-rsa-1990",
"LicenseRef-scancode-pcre",
"Spencer-94",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"NTP",
"LicenseRef-scancode-rsa-md4",
"MIT",
"HPND-sel... | permissive | debojyotiIBM/java-sdk | def56c9f76b21ca3254ab3c22afb1d83836cf3eb | a60589a1489d6afa4958ea22bfb4aa4cc48e9825 | refs/heads/master | 2020-12-02T15:05:46.054570 | 2015-11-03T16:37:00 | 2015-11-03T16:37:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,523 | java | /**
* Copyright 2015 IBM Corp. 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.
*/
package com.ibm.watson.developer_cloud.alchemy.v1.model;
import com.ibm.watson.developer_cloud.alchemy.v1.AlchemyVision;
import com.ibm.watson.developer_cloud.service.model.GenericModel;
/**
* ImageFace returned by {@link AlchemyVision#recognizeFaces(java.util.Map)}.
*
* @author Nizar Alseddeg (nmalsedd@us.ibm.com)
*/
public class ImageFace extends GenericModel {
/**
* Face Age range.
*/
public static class AgeRange extends GenericModel {
/** The age range. */
private String ageRange;
/** The score. */
private Double score;
/**
* Gets the age range.
*
* @return The ageRange
*/
public String getAgeRange() {
return ageRange;
}
/**
* Gets the score.
*
* @return The score
*/
public Double getScore() {
return score;
}
/**
* Sets the age range.
*
* @param ageRange The ageRange
*/
public void setAgeRange(String ageRange) {
this.ageRange = ageRange;
}
/**
* Sets the score.
*
* @param score The score
*/
public void setScore(Double score) {
this.score = score;
}
}
/**
* Face gender.
*/
public static class Gender extends GenericModel {
/** The gender. */
private String gender;
/** The score. */
private Double score;
/**
* Gets the gender.
*
* @return The gender
*/
public String getGender() {
return gender;
}
/**
* Gets the score.
*
* @return The score
*/
public Double getScore() {
return score;
}
/**
* Sets the gender.
*
* @param gender The gender
*/
public void setGender(String gender) {
this.gender = gender;
}
/**
* Sets the score.
*
* @param score The score
*/
public void setScore(Double score) {
this.score = score;
}
}
/** The age. */
private AgeRange age;
/** The gender. */
private Gender gender;
/** The height. */
private String height;
/** The identity. */
private Identity identity;
/** The position x. */
private String positionX;
/** The position y. */
private String positionY;
/** The width. */
private String width;
/**
* Gets the age.
*
* @return The age
*/
public AgeRange getAge() {
return age;
}
/**
* Gets the gender.
*
* @return The gender
*/
public Gender getGender() {
return gender;
}
/**
* Gets the height.
*
* @return The height
*/
public String getHeight() {
return height;
}
/**
* Gets the identity.
*
* @return The identity
*/
public Identity getIdentity() {
return identity;
}
/**
* Gets the position x.
*
* @return The positionX
*/
public String getPositionX() {
return positionX;
}
/**
* Gets the position y.
*
* @return The positionY
*/
public String getPositionY() {
return positionY;
}
/**
* Gets the width.
*
* @return The width
*/
public String getWidth() {
return width;
}
/**
* Sets the age.
*
* @param age The age
*/
public void setAge(AgeRange age) {
this.age = age;
}
/**
* Sets the gender.
*
* @param gender The gender
*/
public void setGender(Gender gender) {
this.gender = gender;
}
/**
* Sets the height.
*
* @param height The height
*/
public void setHeight(String height) {
this.height = height;
}
/**
* Sets the identity.
*
* @param identity The identity
*/
public void setIdentity(Identity identity) {
this.identity = identity;
}
/**
* Sets the position x.
*
* @param positionX The positionX
*/
public void setPositionX(String positionX) {
this.positionX = positionX;
}
/**
* Sets the position y.
*
* @param positionY The positionY
*/
public void setPositionY(String positionY) {
this.positionY = positionY;
}
/**
* Sets the width.
*
* @param width The width
*/
public void setWidth(String width) {
this.width = width;
}
}
| [
"germanattanasio@gmail.com"
] | germanattanasio@gmail.com |
b321f634959ada94f5ef74ede3cfc42a9aab05a5 | 9840ae9eddb271a4fd5a0a333e0244f64498b9b1 | /FiremanPro/database/src/main/java/com/project/test/database/imageSaver/SaveResourceImage.java | b1cfb2bc1102748c146d785de2efa2c151907500 | [] | no_license | zoky001/FiremanPro | 7a2c1f9fd42ecd7394b56505a950da64fa020503 | 311c3c413e44dcd44146829f3642327681a0c25f | refs/heads/master | 2021-09-08T15:39:11.221869 | 2018-01-22T14:27:20 | 2018-01-22T14:27:20 | 106,085,041 | 1 | 0 | null | 2018-01-22T14:27:21 | 2017-10-07T09:12:31 | Java | UTF-8 | Java | false | false | 3,093 | java | package com.project.test.database.imageSaver;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.ImageView;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.nostra13.universalimageloader.core.assist.FailReason;
import com.nostra13.universalimageloader.core.listener.SimpleImageLoadingListener;
import com.project.test.database.Entities.House;
import com.project.test.database.Entities.Photos;
import com.project.test.database.controllers.PhotosController;
import com.squareup.picasso.Picasso;
import com.squareup.picasso.Target;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.MessageDigest;
import java.util.List;
/**
* Created by Zoran on 1.11.2017..
*/
public class SaveResourceImage {
private PhotosController photosController = new PhotosController();
private List<House> houses;
private List<Photos> photos;
private Context context;
public SimpleImageLoadingListener simpleImageLoadingListener;
public SaveResourceImage(Context context, SimpleImageLoadingListener simpleImageLoadingListener) {
this.photos = photosController.GetAllRecordsFromTable();
this.simpleImageLoadingListener = simpleImageLoadingListener;
this.context = context;
}
public void SaveAllPhotoFromUrlToInternalStorage()
{
for (Photos h : photos
) {
SaveImageFromUrlToInternalStorage(h.getUrl());
}
}
private String SaveImageFromUrlToInternalStorage(String url) {
final String name = sha256(url);
System.out.println("URL_SLIKE: preuzimanje___:"+url);
//imageloader
// Create global configuration and initialize ImageLoader with this config
ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context).build();
ImageLoader.getInstance().init(config);
ImageLoader imageLoader = ImageLoader.getInstance(); // Get singleton instance
imageLoader.loadImage(url,
simpleImageLoadingListener
);
return name;
}
public static String sha256(String base) {
try {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
byte[] hash = digest.digest(base.getBytes("UTF-8"));
StringBuffer hexString = new StringBuffer();
for (int i = 0; i < hash.length; i++) {
String hex = Integer.toHexString(0xff & hash[i]);
if (hex.length() == 1) hexString.append('0');
hexString.append(hex);
}
return hexString.toString();//.substring(0,10);
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
}
| [
"zorhrncic@foi.hr"
] | zorhrncic@foi.hr |
003706906a299c140e70ef20be64db3f9e936703 | 58a38b68173a5eb61922f09cb729ef6302a27e6e | /common/src/main/java/com/cqlybest/common/bean/page/ProductCondition.java | 1179860ce6eebea65a46a037ab847a11233ea1a6 | [] | no_license | belerweb/cqlybest | 7baeeb07a6a54dfb599e0c6975dcb4b0ce216de8 | 178bfc6a67b066a727aad43bcc31e96858658c32 | refs/heads/master | 2023-09-01T00:19:05.952589 | 2013-11-03T08:19:23 | 2013-11-03T08:19:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,473 | java | package com.cqlybest.common.bean.page;
public class ProductCondition {
private Condition type; // 产品类型
private Condition name;// 产品名称
private BooleanCondition popular;// 热门
private BooleanCondition recommend;// 推荐
private BooleanCondition special;// 特价
private Condition departureCity;// 出发城市
private Condition recommendedMonth;// 推荐月份
public Condition getType() {
return type;
}
public void setType(Condition type) {
this.type = type;
}
public Condition getName() {
return name;
}
public void setName(Condition name) {
this.name = name;
}
public BooleanCondition getPopular() {
return popular;
}
public void setPopular(BooleanCondition popular) {
this.popular = popular;
}
public BooleanCondition getRecommend() {
return recommend;
}
public void setRecommend(BooleanCondition recommend) {
this.recommend = recommend;
}
public BooleanCondition getSpecial() {
return special;
}
public void setSpecial(BooleanCondition special) {
this.special = special;
}
public Condition getDepartureCity() {
return departureCity;
}
public void setDepartureCity(Condition departureCity) {
this.departureCity = departureCity;
}
public Condition getRecommendedMonth() {
return recommendedMonth;
}
public void setRecommendedMonth(Condition recommendedMonth) {
this.recommendedMonth = recommendedMonth;
}
}
| [
"belerweb@gmail.com"
] | belerweb@gmail.com |
7c8215d78869768356823faecbf7b297b96fd596 | 8ef558bdafaf0139cee8275b402a396ee763a042 | /app/src/test/java/com/example/swapanytime/ExampleUnitTest.java | e48756d353e2ea00e375523767c2e22cfbb782fe | [] | no_license | JWEIandroid/SwapAnyTime | 366fd19ce6422b9827beb450258826f539034a0f | 301eae58c69da36e4ef8cdb7939866537ae34dc0 | refs/heads/master | 2021-05-16T09:09:00.775200 | 2019-09-06T03:21:08 | 2019-09-06T03:21:08 | 104,368,990 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 401 | java | package com.example.swapanytime;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"807388755@qq.com"
] | 807388755@qq.com |
5d051d769e20bf5e24c943f6ed30f77f0608c143 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/plugin/finder/webview/j$$ExternalSyntheticLambda0.java | b5de652c8232928e46d7ab2d51d0dd78bbbd5ef5 | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 369 | java | package com.tencent.mm.plugin.finder.webview;
public final class j$$ExternalSyntheticLambda0
implements Runnable
{
public final void run() {}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar
* Qualified Name: com.tencent.mm.plugin.finder.webview.j..ExternalSyntheticLambda0
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
35650a35f307af1b5c28dfd457500bf08ef80def | 3da43c67db4aff631eb84beecd89fbe2197ea181 | /colorful/src/test/java/com/github/tommyettinger/colorful/ycwcm/YCwCmNamedDemo.java | 8a6cd860c28db6060d40cbeaa79ce0b2a1dad496 | [
"Apache-2.0"
] | permissive | tommyettinger/colorful-gdx | aa2ab5173a0bdf9485129873f58a419a17617af6 | fe4af63f34b0242059f41b12097361c72f5fed72 | refs/heads/master | 2023-08-05T20:43:59.823291 | 2023-07-29T03:15:38 | 2023-07-29T03:15:38 | 225,547,952 | 66 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,115 | java | /*
* Copyright (c) 2023 See AUTHORS file.
*
* 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.github.tommyettinger.colorful.ycwcm;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3WindowAdapter;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.utils.TimeUtils;
import com.badlogic.gdx.utils.viewport.ScreenViewport;
import com.badlogic.gdx.utils.viewport.Viewport;
import static com.badlogic.gdx.Gdx.input;
public class YCwCmNamedDemo extends ApplicationAdapter {
//public static final int backgroundColor = Color.rgba8888(Color.DARK_GRAY);
// public static final int SCREEN_WIDTH = 1531;
// public static final int SCREEN_HEIGHT = 862;
public static final int SCREEN_WIDTH = 808;
public static final int SCREEN_HEIGHT = 600;
private ColorfulBatch batch;
// private SpriteBatch basicBatch;
private Viewport screenView;
private Texture screenTexture;
private BitmapFont font;
private Texture blank;
private long lastProcessedTime = 0L;
private int selectedIndex;
private String selectedName;
private float selected;
private float luma = 0.5f, warm = 0.5f, mild = 0.5f, contrast = 0.5f;
public static void main(String[] arg) {
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
config.setTitle("Named Color Demo");
config.setWindowedMode(SCREEN_WIDTH, SCREEN_HEIGHT);
config.setIdleFPS(10);
config.useVsync(true);
// config.setResizable(false);
final YCwCmNamedDemo app = new YCwCmNamedDemo();
config.setWindowListener(new Lwjgl3WindowAdapter() {
@Override
public void filesDropped(String[] files) {
if (files != null && files.length > 0) {
if (files[0].endsWith(".png") || files[0].endsWith(".jpg") || files[0].endsWith(".jpeg"))
app.load(files[0]);
}
}
});
new Lwjgl3Application(app, config);
}
public void load(String name) {
//// loads a file by its full path, which we get via drag+drop
FileHandle file = Gdx.files.absolute(name);
if (!file.exists()) {
file = Gdx.files.classpath(name);
if (!file.exists())
return;
}
if (screenTexture != null) screenTexture.dispose();
screenTexture = new Texture(file);
screenTexture.setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest);
int width, height;
Gdx.graphics.setWindowedMode(width = Math.min(screenTexture.getWidth() * 2, Gdx.graphics.getDisplayMode().width),
height = Math.min(screenTexture.getHeight(), Gdx.graphics.getDisplayMode().height));
screenView.update(width, height);
screenView.getCamera().position.set(width * 0.5f, height * 0.5f, 0f);
}
@Override
public void create() {
Pixmap b = new Pixmap(1, 1, Pixmap.Format.RGBA8888);
b.drawPixel(0, 0, 0x7F7F81FF);
blank = new Texture(b);
font = new BitmapFont(Gdx.files.internal("font.fnt"));
font.setColor(1f, 0.5f, 0.5f, 1f);
// batch = Shaders.makeBatch(1.25f); // experimenting with slightly higher contrast
batch = new ColorfulBatch();
// basicBatch = new SpriteBatch();
screenView = new ScreenViewport();
screenView.getCamera().position.set(SCREEN_WIDTH * 0.5f, SCREEN_HEIGHT * 0.5f, 0);
screenView.update(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
batch.enableBlending();
for (int i = 0; i < Palette.NAMES_BY_HUE.size; i++) {
String name = Palette.NAMES_BY_HUE.get(i);
float color = Palette.NAMED.get(name, Palette.WHITE);
if (ColorTools.alphaInt(color) == 0)
Palette.NAMES_BY_HUE.removeIndex(i--);
}
selectedName = "Gray";
selectedIndex = Palette.NAMES_BY_HUE.indexOf("Gray", false);
selected = Palette.GRAY;
// selectedName = Palette.NAMES_BY_HUE.first();
// selectedIndex = 0;
// selected = Palette.NAMED.get(selectedName, Palette.GRAY);
// if you don't have these files on this absolute path, that's fine, and they will be ignored
// load("samples/Painting_by_Henri_Biva.jpg");
// load("samples/Among_the_Sierra_Nevada_by_Albert_Bierstadt.jpg");
load("samples/Color_Guard.png");
// load("samples/Mona_Lisa.jpg");
}
@Override
public void render() {
Gdx.gl.glClearColor(0.4f, 0.4f, 0.4f, 1f);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
handleInput();
batch.setProjectionMatrix(screenView.getCamera().combined);
// basicBatch.setProjectionMatrix(screenView.getCamera().combined);
if (screenTexture != null) {
batch.setPackedColor(selected);
batch.begin();
batch.setTweak(luma, warm, mild, contrast);
batch.draw(screenTexture, 0, 0);
int i = -1;
final float width = screenTexture.getWidth() / 5f, height = screenTexture.getHeight() / 51f;
for (int y = 0; y < 51; y++) {
for (int x = 0; x < 5; x++) {
String name = Palette.NAMES_BY_HUE.get(++i);
float color = Palette.NAMED.get(name, Palette.WHITE);
batch.setPackedColor(color);
batch.draw(blank, screenTexture.getWidth() + width * x, height * (50 - y), width, height);
}
}
// batch.end();
// basicBatch.begin();
i = -1;
for (int y = 0; y < 51; y++) {
for (int x = 0; x < 5; x++) {
if (++i == selectedIndex) {
font.setColor(0.5f, 0.5f, 0.5f, 1f);
font.draw(batch, Palette.NAMES_BY_HUE.get(i), screenTexture.getWidth() + width * x + 1f, height * (51 - y) - 1f);
}
}
}
// basicBatch.end();
batch.end();
}
}
@Override
public void resize(int width, int height) {
screenView.update(width, height);
screenView.getCamera().position.set(width * 0.5f, height * 0.5f, 0f);
screenView.getCamera().update();
}
public void handleInput() {
if (input.isKeyPressed(Input.Keys.Q) || input.isKeyPressed(Input.Keys.ESCAPE)) //quit
Gdx.app.exit();
else if (input.isKeyPressed(Input.Keys.SHIFT_LEFT)) {
if (input.isKeyPressed(Input.Keys.M))
load("samples/Mona_Lisa.jpg");
else if (input.isKeyPressed(Input.Keys.S)) //Sierra Nevada
load("samples/Among_the_Sierra_Nevada_by_Albert_Bierstadt.jpg");
else if (input.isKeyPressed(Input.Keys.B)) // Biva
load("samples/Painting_by_Henri_Biva.jpg");
else if (input.isKeyPressed(Input.Keys.C)) // Color Guard, pixel art cartoon-wargame style
load("samples/Color_Guard.png");
else if (input.isKeyPressed(Input.Keys.G)) // grayscale palette
load("samples/Grayscale_Spaceships.png");
else if (input.isKeyPressed(Input.Keys.A)) // higher-color atlas
load("samples/Spaceships.png");
} else if (TimeUtils.timeSinceMillis(lastProcessedTime) > 150) {
lastProcessedTime = TimeUtils.millis();
if (input.isKeyPressed(Input.Keys.RIGHT) || input.isKeyPressed(Input.Keys.DOWN)) {
selectedIndex = (selectedIndex + 1) % Palette.NAMES_BY_HUE.size;
selectedName = Palette.NAMES_BY_HUE.get(selectedIndex);
selected = Palette.NAMED.get(selectedName, Palette.GRAY);
} else if (input.isKeyPressed(Input.Keys.LEFT) || input.isKeyPressed(Input.Keys.UP)) {
selectedIndex = (selectedIndex + Palette.NAMES_BY_HUE.size - 1) % Palette.NAMES_BY_HUE.size;
selectedName = Palette.NAMES_BY_HUE.get(selectedIndex);
selected = Palette.NAMED.get(selectedName, Palette.GRAY);
} else if (input.isKeyPressed(Input.Keys.R)) // random
{
selectedIndex = MathUtils.random(Palette.NAMES_BY_HUE.size);
selectedName = Palette.NAMES_BY_HUE.get(selectedIndex);
selected = Palette.NAMED.get(selectedName, Palette.GRAY);
} else if (input.isKeyPressed(Input.Keys.P)) // print
System.out.println("Using color " + selectedName
+ " with luma="+ ColorTools.luma(selected) + ",warm="+ ColorTools.chromaWarm(selected)
+ ",mild="+ ColorTools.chromaMild(selected)+",alpha=1.0 .\nUsing tweak with luma="+luma
+ ",warm="+warm + ",mild="+mild+",contrast="+contrast + " .");
else if (input.isKeyPressed(Input.Keys.L)) //light
luma = MathUtils.clamp(luma + 0x3p-7f, 0f, 1f);
else if (input.isKeyPressed(Input.Keys.D)) //dark
luma = MathUtils.clamp(luma - 0x3p-7f, 0f, 1f);
else if (input.isKeyPressed(Input.Keys.W)) //warm
warm = MathUtils.clamp(warm + 0x3p-7f, 0f, 1f);
else if (input.isKeyPressed(Input.Keys.C)) //cool
warm = MathUtils.clamp(warm - 0x3p-7f, 0f, 1f);
else if (input.isKeyPressed(Input.Keys.M)) //mild
mild = MathUtils.clamp(mild + 0x3p-7f, 0f, 1f);
else if (input.isKeyPressed(Input.Keys.B)) //bold
mild = MathUtils.clamp(mild - 0x3p-7f, 0f, 1f);
else if (input.isKeyPressed(Input.Keys.S)) //sharp contrast
contrast = MathUtils.clamp(contrast + 0x3p-7f, 0f, 1f);
else if (input.isKeyPressed(Input.Keys.F)) //fuzzy contrast
contrast = MathUtils.clamp(contrast - 0x3p-7f, 0f, 1f);
else if (input.isKeyPressed(Input.Keys.BACKSPACE)) //reset
{
luma = 0.5f;
warm = 0.5f;
mild = 0.5f;
contrast = 0.5f;
}
}
}
}
| [
"tommy.ettinger@gmail.com"
] | tommy.ettinger@gmail.com |
3e68f279916f8a2e560eb4460c274f1851eee558 | 989e8ac12f157f1d8587e8f56efc2731e2241132 | /Area of Rectangle/Main.java | 320dd3597d88b45d0557e4565846583ce4b67974 | [] | no_license | RakeshKumar97/Playground | fbc87c3653059533386c8a3ab05763efe63ce9e5 | 3db6f2066c701020c674c8d15f77e1b5c37e2fbf | refs/heads/master | 2020-04-14T12:45:36.105549 | 2019-04-29T16:42:50 | 2019-04-29T16:42:50 | 163,849,796 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 263 | java | import java.util.Scanner;
class Main {
public static void main (String[] args) {
// Type your code here
Scanner in = new Scanner(System.in);
int l = in.nextInt();
int b = in.nextInt();
int area = l*b ;
System.out.print(area);
}
} | [
"46321721+RakeshKumar97@users.noreply.github.com"
] | 46321721+RakeshKumar97@users.noreply.github.com |
03802448737aeaf9d8d7e64beea5b8e62d34b8a6 | 590cebae4483121569983808da1f91563254efed | /Router/schemas-src/eps-fts-schemas/src/main/java/ru/acs/fts/schemas/album/MPOType.java | 62f83a304f5f7f2d3e6608bd66bf7b3c74e24474 | [] | no_license | ke-kontur/eps | 8b00f9c7a5f92edeaac2f04146bf0676a3a78e27 | 7f0580cd82022d36d99fb846c4025e5950b0c103 | refs/heads/master | 2020-05-16T23:53:03.163443 | 2014-11-26T07:00:34 | 2014-11-26T07:01:51 | null | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 1,837 | java |
package ru.acs.fts.schemas.album;
import org.joda.time.LocalDate;
/**
* Ðåã. íîìåð ÌÏÎ
*
* Schema fragment(s) for this class:
* <pre>
* <xs:complexType xmlns:ns="urn:customs.ru:Information:CustomsDocuments:PRTestRequest:5.4.4" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="MPOType">
* <xs:sequence>
* <xs:element type="xs:string" name="CustomsCode" minOccurs="0"/>
* <xs:element type="xs:date" name="RegistrationDate" minOccurs="0"/>
* <xs:element type="xs:string" name="MPO_Number"/>
* </xs:sequence>
* </xs:complexType>
* </pre>
*/
public class MPOType
{
private String customsCode;
private LocalDate registrationDate;
private String MPONumber;
/**
* Get the 'CustomsCode' element value.
*
* @return value
*/
public String getCustomsCode() {
return customsCode;
}
/**
* Set the 'CustomsCode' element value.
*
* @param customsCode
*/
public void setCustomsCode(String customsCode) {
this.customsCode = customsCode;
}
/**
* Get the 'RegistrationDate' element value.
*
* @return value
*/
public LocalDate getRegistrationDate() {
return registrationDate;
}
/**
* Set the 'RegistrationDate' element value.
*
* @param registrationDate
*/
public void setRegistrationDate(LocalDate registrationDate) {
this.registrationDate = registrationDate;
}
/**
* Get the 'MPO_Number' element value.
*
* @return value
*/
public String getMPONumber() {
return MPONumber;
}
/**
* Set the 'MPO_Number' element value.
*
* @param MPONumber
*/
public void setMPONumber(String MPONumber) {
this.MPONumber = MPONumber;
}
}
| [
"m@brel.me"
] | m@brel.me |
d86d79e04e2e896baec05e19f1610954649e0b1f | 95244fa6fd975913a5430c235675b659a8b6f5ca | /Acumen/src/com/example/acumen/LoginActivity.java | e8cc9da77f6e948b12750d64d441ab56e860915b | [] | no_license | danileao/estudo-pedido | 2f479f3666382d44809a84870dcebd2692051289 | b65e133c1e20b19b6fad3bd627b4eec34f48e479 | refs/heads/master | 2021-01-10T12:51:43.949109 | 2015-12-11T17:48:08 | 2015-12-11T17:48:08 | 47,840,277 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,175 | java | package com.example.acumen;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.StrictMode;
import android.provider.MediaStore;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import br.com.droid.model.Login;
import br.com.droid.webservice.CadastrarService;
public class LoginActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
.permitAll().build();
StrictMode.setThreadPolicy(policy);
Button btnEntrar = (Button) findViewById(R.id.btnEntrar);
Button btnCamera = (Button) findViewById(R.id.btnCamera);
final TextView txtUsuario = (TextView) findViewById(R.id.txtUser);
final TextView txtSenha = (TextView) findViewById(R.id.txtSenha);
btnEntrar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Login login = new Login();
login.setSenha(txtSenha.getText().toString());
login.setUsuario(txtUsuario.getText().toString());
CadastrarService cad = new CadastrarService();
cad.salvar(login);
}
});
btnCamera.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent,1);
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.login, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
| [
"daniele.evangelista@preventsenior.com.br"
] | daniele.evangelista@preventsenior.com.br |
8e4ce4be558ecd9edb1171ecfdc8d802aadc308b | 8cbcd5f3947f9eee134e696f685268bfc4f5af94 | /project/myGame/src/com/shoter/game_object/TreeBranch.java | 869fa5b2f919d3ca23ccde9a0b387e7c0eef28d9 | [
"Apache-2.0"
] | permissive | shoter/Autumn-Apple-Tree | c9f2d3b747ad3ca02021f95fe8922a8ce978e080 | bd47ccaac0fcd839f85a60e5939c1dde87eb4455 | refs/heads/master | 2020-04-10T04:10:51.156076 | 2013-10-22T20:45:00 | 2013-10-22T20:45:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 638 | java | package com.shoter.game_object;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Vector2;
import com.shoter.game.Game;
public class TreeBranch extends GameObject
{
Vector2 basePosition;
float resilience = 0.5f;
public TreeBranch(Vector2 position)
{
super("branch", position);
this.basePosition = new Vector2(position.x, position.y);
resilience += (Game.rand.nextFloat() * 200f);
}
@Override
public void Draw(SpriteBatch spriteBatch) {
setPosition(basePosition.cpy().add(new Vector2(Game.wind.direction.x * resilience , Game.wind.direction.y * resilience)));
super.Draw(spriteBatch);
}
}
| [
"damiansht@gmail.com"
] | damiansht@gmail.com |
06f896692471e190a2f2ddd8856cb205bf4e4eaa | d3d2cb2230f9f169126d1931df06e188e3c6e6af | /app/src/main/java/perusudroid/baseproject/data/model/api/request/LoginRequest.java | eb2f2c43c155f49417977c8ed0932d437139ae34 | [] | no_license | perusudroid/Base_Mvvm | 546b4b7de5816d3830b5bf489a1546ddb38e4b49 | ccb57209b8b4967fb7d6f96cb9d69962a8e70fa2 | refs/heads/master | 2020-07-07T23:28:18.444556 | 2019-08-21T05:57:22 | 2019-08-21T05:57:22 | 203,505,310 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 559 | java | package perusudroid.baseproject.data.model.api.request;
public class LoginRequest {
private String email;
private String password;
public LoginRequest(String email, String password) {
this.email = email;
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
| [
"Iamanindian7"
] | Iamanindian7 |
2c522acb6425a6ce636f7f0b559fff942c50d7e7 | 3b25cd48f5f8f07905f7012fce6f36ef37834551 | /BuroCredito/src/main/java/org/xmlsoap/schemas/soap/encoding/QName.java | 2fbdb4c168b85c12e06e6bb246951cea13a8e534 | [] | no_license | Alex-GT/SOA | 5c843517e92857f9fd58d9936d662a5ee93087b8 | cd36c0bff3897d13f910268908dd75fc2b947a62 | refs/heads/master | 2020-04-01T19:07:54.744749 | 2018-10-18T03:01:39 | 2018-10-18T03:01:39 | 153,536,682 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,991 | java | /*
* XML Type: QName
* Namespace: http://schemas.xmlsoap.org/soap/encoding/
* Java type: org.xmlsoap.schemas.soap.encoding.QName
*
* Automatically generated - do not modify.
*/
package org.xmlsoap.schemas.soap.encoding;
/**
* An XML QName(@http://schemas.xmlsoap.org/soap/encoding/).
*
* This is an atomic type that is a restriction of org.xmlsoap.schemas.soap.encoding.QName.
*/
public interface QName extends org.apache.xmlbeans.XmlQName
{
public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(QName.class.getClassLoader(), "schemaorg_apache_xmlbeans.system.sF2D098DA133E4BF83817F288C9D51B1B").resolveHandle("qnamea350type");
/**
* Gets the "id" attribute
*/
java.lang.String getId();
/**
* Gets (as xml) the "id" attribute
*/
org.apache.xmlbeans.XmlID xgetId();
/**
* True if has "id" attribute
*/
boolean isSetId();
/**
* Sets the "id" attribute
*/
void setId(java.lang.String id);
/**
* Sets (as xml) the "id" attribute
*/
void xsetId(org.apache.xmlbeans.XmlID id);
/**
* Unsets the "id" attribute
*/
void unsetId();
/**
* Gets the "href" attribute
*/
java.lang.String getHref();
/**
* Gets (as xml) the "href" attribute
*/
org.apache.xmlbeans.XmlAnyURI xgetHref();
/**
* True if has "href" attribute
*/
boolean isSetHref();
/**
* Sets the "href" attribute
*/
void setHref(java.lang.String href);
/**
* Sets (as xml) the "href" attribute
*/
void xsetHref(org.apache.xmlbeans.XmlAnyURI href);
/**
* Unsets the "href" attribute
*/
void unsetHref();
/**
* A factory class with static methods for creating instances
* of this type.
*/
public static final class Factory
{
public static org.xmlsoap.schemas.soap.encoding.QName newInstance() {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }
public static org.xmlsoap.schemas.soap.encoding.QName newInstance(org.apache.xmlbeans.XmlOptions options) {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }
/** @param xmlAsString the string value to parse */
public static org.xmlsoap.schemas.soap.encoding.QName parse(java.lang.String xmlAsString) throws org.apache.xmlbeans.XmlException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.QName parse(java.lang.String xmlAsString, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xmlAsString, type, options ); }
/** @param file the file from which to load an xml document */
public static org.xmlsoap.schemas.soap.encoding.QName parse(java.io.File file) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.QName parse(java.io.File file, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( file, type, options ); }
public static org.xmlsoap.schemas.soap.encoding.QName parse(java.net.URL u) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.QName parse(java.net.URL u, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( u, type, options ); }
public static org.xmlsoap.schemas.soap.encoding.QName parse(java.io.InputStream is) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.QName parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( is, type, options ); }
public static org.xmlsoap.schemas.soap.encoding.QName parse(java.io.Reader r) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.QName parse(java.io.Reader r, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, java.io.IOException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( r, type, options ); }
public static org.xmlsoap.schemas.soap.encoding.QName parse(javax.xml.stream.XMLStreamReader sr) throws org.apache.xmlbeans.XmlException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.QName parse(javax.xml.stream.XMLStreamReader sr, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( sr, type, options ); }
public static org.xmlsoap.schemas.soap.encoding.QName parse(org.w3c.dom.Node node) throws org.apache.xmlbeans.XmlException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, null ); }
public static org.xmlsoap.schemas.soap.encoding.QName parse(org.w3c.dom.Node node, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( node, type, options ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.xmlsoap.schemas.soap.encoding.QName parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, null ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.xmlsoap.schemas.soap.encoding.QName parse(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return (org.xmlsoap.schemas.soap.encoding.QName) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().parse( xis, type, options ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, null ); }
/** @deprecated {@link org.apache.xmlbeans.xml.stream.XMLInputStream} */
public static org.apache.xmlbeans.xml.stream.XMLInputStream newValidatingXMLInputStream(org.apache.xmlbeans.xml.stream.XMLInputStream xis, org.apache.xmlbeans.XmlOptions options) throws org.apache.xmlbeans.XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException {
return org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newValidatingXMLInputStream( xis, type, options ); }
private Factory() { } // No instance of this class allowed
}
}
| [
"inge.alejandro.gonzalez@gmail.com"
] | inge.alejandro.gonzalez@gmail.com |
b980220dfb2d5843de75c7f121168b2926c365cf | 8a7e485810a720bad45946b00671c0ada5928e39 | /src/ch03_1_operator_expression/ConditionalOperationExample.java | fbce07da855426d9cbd5d835f06f1caaa20f25ca | [] | no_license | OrangeHarry/Chapter03_Operator | 3640553bd57e1b97ed6f037ef81c6222b6457904 | 219285fede4cecd171d43c3649095a92b26e9e7a | refs/heads/master | 2023-07-13T02:13:15.820910 | 2021-08-16T03:06:10 | 2021-08-16T03:06:10 | 389,571,850 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 928 | java | package ch03_1_operator_expression;
public class ConditionalOperationExample {
public static void main(String[] args) {
int score = 61;
// char grade = (score > 90) ? 'A' : ((score > 80) ? 'B' : 'C'); // 80점이 넘으면 B, 80점이 넘지 않으면 C야
// char grade = (score > 90) ? 'A' : (score > 80) ? 'B' : ((score > 70) ? 'C' : 'D'); //이야 이런식으로 하면 끝도 없이 갈 수 있구나
// System.out.println(score + "점은 " + grade + "등급입니다.");
// System.out.printf("%d점은 %c등급입니다.", score, grade);
char grade;
if (score > 90) {
grade = 'A';
} else if (score >= 80 && score < 90) {
grade = 'B';
} else if (score >= 70 && score < 90) {
grade = 'C';
} else if (score >= 60 && score < 70) {
grade = 'D';
} else {
grade = 'F';
}
System.out.println("your grade is " + grade); // 위에 꺼랑 같다고 보면된다.
}
}
| [
"hhm12@LAPTOP-08SROAN1"
] | hhm12@LAPTOP-08SROAN1 |
b4508d7763752919a3b352c00fa10f932121711e | 1ebd71e2179be8a2baec90ff3f326a3f19b03a54 | /hybris/bin/modules/configurator-complex-products/ysapproductconfigaddon/src/de/hybris/platform/sap/productconfig/frontend/validator/ProductConfigurationValidator.java | 9c291bf1eaaf63c23d94da3346c62fba5a0c88ed | [] | no_license | shaikshakeeb785/hybrisNew | c753ac45c6ae264373e8224842dfc2c40a397eb9 | 228100b58d788d6f3203333058fd4e358621aba1 | refs/heads/master | 2023-08-15T06:31:59.469432 | 2021-09-03T09:02:04 | 2021-09-03T09:02:04 | 402,680,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,889 | java | /*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("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 SAP.
*/
package de.hybris.platform.sap.productconfig.frontend.validator;
import de.hybris.platform.sap.productconfig.facades.ConfigurationData;
import de.hybris.platform.sap.productconfig.facades.ConfigurationFacade;
import de.hybris.platform.sap.productconfig.facades.CsticData;
import de.hybris.platform.sap.productconfig.facades.UiGroupData;
import de.hybris.platform.sap.productconfig.frontend.util.ConfigDataMergeProcessor;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
/**
* CPQ UI Validator.<br>
* Will validate the user input received via HTTP. Ensures that the partial configuration send via HHTP is merged with
* the complete configuration state, so that all processing can access the whole configuration.<br>
* Validation itself will be delegated to Checker classes, such as the @ NumericChecker}.
*
* @see ConfigDataMergeProcessor
*/
public class ProductConfigurationValidator implements Validator
{
private ConfigDataMergeProcessor mergeProcessor;
private List<CsticValueValidator> csticValidators;
private ConfigurationFacade configurationFacade;
@Override
public boolean supports(final Class<?> classObj)
{
return ConfigurationData.class.equals(classObj);
}
@Override
public void validate(final Object configurationObj, final Errors errorObj)
{
final ConfigurationData configuration = (ConfigurationData) configurationObj;
// In case of session failover the previously cached ConfigModel and UiStatus are lost.
// In this case merge/completeInput is not possible.
// Update method in the related controller class checks this as well and navigate than to desired home/error page.
final String configId = configuration.getConfigId();
if (!getConfigurationFacade().isConfigurationAvailable(configId))
{
return;
}
mergeProcessor.completeInput(configuration);
final List<UiGroupData> groups = configuration.getGroups();
validateSubGroups(groups, errorObj, "groups");
}
protected void validateGroup(final UiGroupData group, final Errors errorObj)
{
final List<CsticData> cstics = group.getCstics();
validateCstics(cstics, errorObj);
final List<UiGroupData> subGroups = group.getSubGroups();
validateSubGroups(subGroups, errorObj, "subGroups");
}
protected void validateSubGroups(final List<UiGroupData> subGroups, final Errors errorObj, final String groupListName)
{
if (subGroups == null)
{
return;
}
for (int ii = 0; ii < subGroups.size(); ii++)
{
final UiGroupData subGroup = subGroups.get(ii);
final String prefix = groupListName + "[" + ii + "]";
errorObj.pushNestedPath(prefix);
validateGroup(subGroup, errorObj);
errorObj.popNestedPath();
}
}
protected void validateCstics(final List<CsticData> cstics, final Errors errorObj)
{
if (cstics == null)
{
return;
}
for (int ii = 0; ii < cstics.size(); ii++)
{
errorObj.pushNestedPath("cstics[" + ii + "]");
final CsticData csticData = cstics.get(ii);
validateCstic(errorObj, csticData);
errorObj.popNestedPath();
}
}
protected void validateCstic(final Errors errorObj, final CsticData csticData)
{
for (final CsticValueValidator validator : getCsticValidators())
{
if (validator.appliesTo(csticData))
{
validateWithModification(errorObj, csticData, validator);
}
}
}
protected void validateWithModification(final Errors errorObj, final CsticData csticData, final CsticValueValidator validator)
{
String value = csticData.getValue();
if (!StringUtils.isEmpty(value) && validator.appliesToValues())
{
value = validator.validate(csticData, errorObj, value);
csticData.setValue(value);
}
String additionalValue = csticData.getAdditionalValue();
if (!StringUtils.isEmpty(additionalValue) && validator.appliesToAdditionalValues())
{
additionalValue = validator.validate(csticData, errorObj, additionalValue);
csticData.setAdditionalValue(additionalValue);
}
String formattedValue = csticData.getFormattedValue();
if (!StringUtils.isEmpty(formattedValue) && validator.appliesToFormattedValues())
{
formattedValue = validator.validate(csticData, errorObj, formattedValue);
csticData.setFormattedValue(formattedValue);
}
}
/**
* @param mergeProcessor injects the merge processor, that will merge the partial configuration submitted from the UI with the
* complete configuration from the underlying layers
*/
public void setMergeProcessor(final ConfigDataMergeProcessor mergeProcessor)
{
this.mergeProcessor = mergeProcessor;
}
protected ConfigurationFacade getConfigurationFacade()
{
return configurationFacade;
}
@Required
public void setConfigurationFacade(final ConfigurationFacade configurationFacade)
{
this.configurationFacade = configurationFacade;
}
protected List<CsticValueValidator> getCsticValidators()
{
return Optional.ofNullable(csticValidators).map(List::stream).orElseGet(Stream::empty).collect(Collectors.toList());
}
/**
* @param csticValidators list of cstic validators to be called for validation
*/
public void setCsticValidators(final List<CsticValueValidator> csticValidators)
{
this.csticValidators = Optional.ofNullable(csticValidators).map(List::stream).orElseGet(Stream::empty).collect(Collectors.toList());
}
}
| [
"sauravkr82711@gmail.com"
] | sauravkr82711@gmail.com |
9abb327b257f252684815f9ededa3b01a2333b1a | 038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad | /schemaOrgDomaConv/src/org/kyojo/schemaorg/m3n5/doma/core/container/EligibleCustomerTypeConverter.java | f0937fe504981c029aa7f822dd971e000d89f1be | [
"Apache-2.0"
] | permissive | nagaikenshin/schemaOrg | 3dec1626781913930da5585884e3484e0b525aea | 4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8 | refs/heads/master | 2021-06-25T04:52:49.995840 | 2019-05-12T06:22:37 | 2019-05-12T06:22:37 | 134,319,974 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 639 | java | package org.kyojo.schemaorg.m3n5.doma.core.container;
import org.seasar.doma.ExternalDomain;
import org.seasar.doma.jdbc.domain.DomainConverter;
import org.kyojo.schemaorg.m3n5.core.impl.ELIGIBLE_CUSTOMER_TYPE;
import org.kyojo.schemaorg.m3n5.core.Container.EligibleCustomerType;
@ExternalDomain
public class EligibleCustomerTypeConverter implements DomainConverter<EligibleCustomerType, String> {
@Override
public String fromDomainToValue(EligibleCustomerType domain) {
return domain.getNativeValue();
}
@Override
public EligibleCustomerType fromValueToDomain(String value) {
return new ELIGIBLE_CUSTOMER_TYPE(value);
}
}
| [
"nagai@nagaikenshin.com"
] | nagai@nagaikenshin.com |
64d6be2b5d717409eba0a4132f1a3b9ff8d69f79 | d1a6d1e511df6db8d8dd0912526e3875c7e1797d | /genny_JavaWithoutLambdasApi21_ReducedClassCount/applicationModule/src/main/java/applicationModulepackageJava9/Foo587.java | a5b7077230c2b70bfbcd71b34c880f7e9f50814f | [] | no_license | NikitaKozlov/generated-project-for-desugaring | 0bc1443ab3ddc84cd289331c726761585766aea7 | 81506b3711004185070ca4bb9a93482b70011d36 | refs/heads/master | 2020-03-20T00:35:06.996525 | 2018-06-12T09:30:37 | 2018-06-12T09:30:37 | 137,049,317 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 506 | java | package applicationModulepackageJava9;
public class Foo587 {
public void foo0() {
new applicationModulepackageJava9.Foo586().foo9();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
public void foo7() {
foo6();
}
public void foo8() {
foo7();
}
public void foo9() {
foo8();
}
}
| [
"nikita.e.kozlov@gmail.com"
] | nikita.e.kozlov@gmail.com |
3a0bfc42b368d5dae2663ab21770142abf794766 | 9f3ea0adb9d3f4368f675aa31d74547fec58566a | /app/src/main/java/com/example/hp/volleytest/GetWord.java | 239ab92195eea551b3c8ce28cd982db7f3831efa | [] | no_license | liweixin/MyPracticeCode | c72234440fc893cc13cbcd9ba7328f200649a0e3 | fffcfd8613a97f01cc7114cb78e9cc8938befd82 | refs/heads/master | 2021-01-10T08:10:40.374650 | 2015-10-16T11:38:08 | 2015-10-16T11:38:08 | 44,380,797 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,416 | java | package com.example.hp.volleytest;
import java.util.List;
/**
* Created by HP on 2015/10/16.
*/
public class GetWord {
/**
* msg : SUCCESS
* status_code : 0
* data : {"target_retention":5,"uk_audio":"http://media.shanbay.com/audio/uk/hello.mp3","pronunciation":"hә'lәu","en_definition":{"pos":"n","defn":"an expression of greeting"},"content":"hello","cn_definition":{"pos":"","defn":"int.(见面打招呼或打电话用语)喂,哈罗"},"us_audio":"http://media.shanbay.com/audio/us/hello.mp3","definition":" int.(见面打招呼或打电话用语)喂,哈罗","id":3130,"audio":"http://media.shanbay.com/audio/us/hello.mp3","en_definitions":{"n":["an expression of greeting"]},"learning_id":2915819690,"retention":4}
*/
private String msg;
private int status_code;
private DataEntity data;
public String toString(){
if(status_code!=0)
return "Query Failed.";
else
return data.toString();
}
public void setMsg(String msg) {
this.msg = msg;
}
public void setStatus_code(int status_code) {
this.status_code = status_code;
}
public void setData(DataEntity data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public int getStatus_code() {
return status_code;
}
public DataEntity getData() {
return data;
}
public class DataEntity {
/**
* target_retention : 5
* uk_audio : http://media.shanbay.com/audio/uk/hello.mp3
* pronunciation : hә'lәu
* en_definition : {"pos":"n","defn":"an expression of greeting"}
* content : hello
* cn_definition : {"pos":"","defn":"int.(见面打招呼或打电话用语)喂,哈罗"}
* us_audio : http://media.shanbay.com/audio/us/hello.mp3
* definition : int.(见面打招呼或打电话用语)喂,哈罗
* id : 3130
* audio : http://media.shanbay.com/audio/us/hello.mp3
* en_definitions : {"n":["an expression of greeting"]}
* learning_id : 2915819690
* retention : 4
*/
private int target_retention;
private String uk_audio;
private String pronunciation;
private En_definitionEntity en_definition;
private String content;
private Cn_definitionEntity cn_definition;
private String us_audio;
private String definition;
private int id;
private String audio;
private En_definitionsEntity en_definitions;
private String learning_id;
private int retention;
public String toString(){
StringBuilder str = new StringBuilder();
if((en_definitions!=null)&&(!en_definitions.toString().equals(""))) str.append("解释:" + en_definitions.toString() + "\n");
if((en_definition!= null)&&(!en_definition.toString().equals(""))) str.append("英译:" + en_definition.toString() + "\n");
if((cn_definition!=null)&&(!cn_definition.toString().equals(""))) str.append("中译:" + cn_definition.toString() + "\n");
if((content!=null)&&(!content.toString().equals(""))) str.append("查询的单词:" + content + "\n\n");
if((pronunciation!=null)&&(pronunciation.toString().equals(""))) str.append("音标:\\" + pronunciation + "\\\n");
return str.toString();
}
public void setTarget_retention(int target_retention) {
this.target_retention = target_retention;
}
public void setUk_audio(String uk_audio) {
this.uk_audio = uk_audio;
}
public void setPronunciation(String pronunciation) {
this.pronunciation = pronunciation;
}
public void setEn_definition(En_definitionEntity en_definition) {
this.en_definition = en_definition;
}
public void setContent(String content) {
this.content = content;
}
public void setCn_definition(Cn_definitionEntity cn_definition) {
this.cn_definition = cn_definition;
}
public void setUs_audio(String us_audio) {
this.us_audio = us_audio;
}
public void setDefinition(String definition) {
this.definition = definition;
}
public void setId(int id) {
this.id = id;
}
public void setAudio(String audio) {
this.audio = audio;
}
public void setEn_definitions(En_definitionsEntity en_definitions) {
this.en_definitions = en_definitions;
}
public void setLearning_id(String learning_id) {
this.learning_id = learning_id;
}
public void setRetention(int retention) {
this.retention = retention;
}
public int getTarget_retention() {
return target_retention;
}
public String getUk_audio() {
return uk_audio;
}
public String getPronunciation() {
return pronunciation;
}
public En_definitionEntity getEn_definition() {
return en_definition;
}
public String getContent() {
return content;
}
public Cn_definitionEntity getCn_definition() {
return cn_definition;
}
public String getUs_audio() {
return us_audio;
}
public String getDefinition() {
return definition;
}
public int getId() {
return id;
}
public String getAudio() {
return audio;
}
public En_definitionsEntity getEn_definitions() {
return en_definitions;
}
public String getLearning_id() {
return learning_id;
}
public int getRetention() {
return retention;
}
public class En_definitionEntity {
/**
* pos : n
* defn : an expression of greeting
*/
private String pos;
private String defn;
public String toString(){
StringBuilder str = new StringBuilder();
if(pos!=null) str.append(pos + " ");
if(defn!=null) str.append(defn + "\n");
return str.toString();
}
public void setPos(String pos) {
this.pos = pos;
}
public void setDefn(String defn) {
this.defn = defn;
}
public String getPos() {
return pos;
}
public String getDefn() {
return defn;
}
}
public class Cn_definitionEntity {
/**
* pos :
* defn : int.(见面打招呼或打电话用语)喂,哈罗
*/
private String pos;
private String defn;
public String toString(){
StringBuilder str = new StringBuilder();
if(pos!=null) str.append(pos/* + "\n"*/);
if(defn!=null) str.append(defn + "\n");
return str.toString();
}
public void setPos(String pos) {
this.pos = pos;
}
public void setDefn(String defn) {
this.defn = defn;
}
public String getPos() {
return pos;
}
public String getDefn() {
return defn;
}
}
public class En_definitionsEntity {
/**
* n : ["an expression of greeting"]
*/
private List<String> n;
public String toString(){
if(n==null)
return null;
else {
StringBuilder str = new StringBuilder();
for (int i = 1; i <= n.size(); i++) {
str.append(i + "." + n.get(i-1) + "\n");
}
return str.toString();
}
}
public void setN(List<String> n) {
this.n = n;
}
public List<String> getN() {
return n;
}
}
}
}
| [
"627632598@qq.com"
] | 627632598@qq.com |
da50a2f7d073228bc97907fd297d9acec809f568 | 3c5795f763a24c60aeb27fd66fc02c4daa23c04b | /shiro-tags/src/main/java/com/lai/shirotags/utils/Md5Util.java | adc11f227a2e8b46da1eab8187e28eb396928960 | [] | no_license | xianghelai/bbdw | dbb3182eddb5a7800866ad6b7866f745ea9a0b5c | 77ea6173e3eb432a94ca381cd815f73d5200dd29 | refs/heads/master | 2022-07-11T05:17:46.937592 | 2019-10-16T01:57:17 | 2019-10-16T01:57:17 | 145,944,405 | 0 | 0 | null | 2022-06-17T02:34:56 | 2018-08-24T05:00:13 | Java | UTF-8 | Java | false | false | 1,017 | java | package com.lai.shirotags.utils;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* @author bbdw
* @date 2019/10/8 11:53
*/
public class Md5Util {
public static String md5(String buffer)
{
String string = null;
char hexDigist[] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
MessageDigest md;
try {
md = MessageDigest.getInstance("MD5");
md.update(buffer.getBytes());
byte[] datas = md.digest(); //16个字节的长整数
char[] str = new char[2*16];
int k = 0;
for(int i=0;i<16;i++)
{
byte b = datas[i];
str[k++] = hexDigist[b>>>4 & 0xf];//高4位
str[k++] = hexDigist[b & 0xf];//低4位
}
string = new String(str);
} catch (NoSuchAlgorithmException e)
{
e.printStackTrace();
}
return string;
}
}
| [
"1059653473@qq.com"
] | 1059653473@qq.com |
2e50d4f6af09bb9c4a9d5c767829fe874689d8f8 | e7d3a7d0c80bf6234453a36818833a01e8ca1879 | /src/main/java/connectFour/controller/ButtonBackgroundChangerAction.java | 5122e1abb509cac8ba0d5a5b0364bc3900e8697d | [] | no_license | mahirhiro/connectFour | 98371782c6018c183d63f7d1613ba762c95682a2 | 7be817a20c6d3db0724befccd44c5f787d4a0768 | refs/heads/master | 2020-06-29T11:47:26.638476 | 2019-08-15T11:37:06 | 2019-08-15T11:37:06 | 200,525,755 | 0 | 1 | null | 2019-08-09T00:20:21 | 2019-08-04T18:05:59 | Java | UTF-8 | Java | false | false | 841 | java | package connectFour.controller;
import connectFour.model.GameBoard;
import connectFour.view.GamePanel;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.util.Observable;
import java.util.Observer;
public class ButtonBackgroundChangerAction extends AbstractAction implements Observer {
private GameBoard board;
private GamePanel panel;
public ButtonBackgroundChangerAction(GameBoard board, GamePanel panel) {
super("Change Background Color");
this.board = board;
this.panel = panel;
}
@Override
public void update(Observable o, Object arg) {
}
@Override
public void actionPerformed(ActionEvent e) {
System.out.println("Changing background color");
Color color = panel.askNewColor();
board.setSbg(color);
}
}
| [
"mahirhiro@gmail.com"
] | mahirhiro@gmail.com |
4c4558d121a5d59ab724ba7f3238e17e2b9798e0 | 0d6d1ea55eb36a7bbeccdf638f2561ea3c4503b3 | /code/units/JavaOOConcepts/Lesson07_TieredAppDesign/DVDLibrary/src/dvdlibrary/ConsoleIO.java | cdd771328ff3fe40b75d7f7023bde00199d6187d | [] | no_license | lmgeorge/software-guild | 1588884608b6b5e6ac97cced6f4f8424eb095830 | d9d3eb04407afd1b13fd32479b51004530587706 | refs/heads/master | 2020-12-04T16:15:36.053599 | 2016-08-17T19:19:11 | 2016-08-17T19:19:11 | 65,935,465 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,763 | 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 dvdlibrary;
import java.util.ArrayList;
import java.util.Scanner;
/**
*
* @author lmgeorge <lauren.george@live.com>
*/
public class ConsoleIO {
private final Scanner ui = new Scanner(System.in);
private String str;
/**
* Equivalent to Scanner.nextLine()
*
* @return the user's input as a string
*/
public String gets() {
str = ui.nextLine();
return str;
}
/**
* Equivalent to Scanner.nextLine()
*
* @param prompt prints the prompt to the user = System.out.print();
* @return the user's input as a string
*/
public String gets(String prompt) {
print(prompt);
str = gets();
return str;
}
//integer methods
/**
* Equivalent to Scanner.nextLine() parsed using Integer.parseInt();
*
* Includes a prompt for to enter a number within a certain range print to the console
*
* @param prompt
* @param min inclusive
* @param max inclusive
* @return a parsed integer if in range, inclusive, includes try-catch
*/
public int getsNum(String prompt, int min, int max) {
int x = max + 1;
boolean badInput;
do {
badInput = false;
print(prompt);
str = gets();
try {
x = (Integer.parseInt(str));
} catch (NumberFormatException ex) {
badInput = true;
println("ERROR: " + ex.getMessage() + "\n");
}
} while (badInput || x > max || x < min);
return x;
}
/**
* Equivalent to Scanner.nextLine() parsed using Integer.parseInt()
*
* @param prompt prints the prompt to the user = System.out.print();
* @return a parsed integer, includes try-catch
*/
public int getsNum(String prompt) {
int x = 0;
print(prompt);
boolean badInput = true;
do {
try {
str = gets();
x = (Integer.parseInt(str));
badInput = false;
} catch (NumberFormatException ex) {
println("ERROR: " + ex.getMessage() + "\n");
}
} while (badInput);
return x;
}
/**
* Equivalent to Scanner.nextLine() parsed using Integer.parseInt()
*
* @return a parsed integer, includes try-catch
*/
public int getsNum() {
int x = 0;
boolean badInput = true;
do {
try {
str = gets();
x = (Integer.parseInt(str));
badInput = false;
} catch (NumberFormatException ex) {
println("ERROR: " + ex.getMessage() + "\n");
}
} while (badInput);
return x;
}
//Float methods
/**
* Equivalent to Scanner.nextLine() parsed using Float.parseFloat();
*
* Includes a prompt for to enter a number within a certain range print to the console
*
* @param prompt System.out.print(prompt) to user
* @param min inclusive
* @param max inclusive
* @return a parsed float if in range, inclusive, includes try-catch
*/
public float getsNum(String prompt, float min, float max) {
float x = max + 1;
boolean badInput;
do {
badInput = false;
print(prompt);
str = gets();
try {
x = (Float.parseFloat(str));
} catch (NumberFormatException ex) {
badInput = true;
println("ERROR: " + ex.getMessage() + "\n");
}
} while (badInput || x > max || x < min);
return x;
}
/**
* Equivalent to Scanner.nextLine() parsed using Float.parseFloat()
*
* @param prompt prints the prompt to the user = System.out.print();
* @return a parsed float, includes try-catch
*/
public float getsFloat(String prompt) {
float x = 0;
print(prompt);
boolean badInput = true;
do {
try {
str = gets();
x = (Float.parseFloat(str));
badInput = false;
} catch (NumberFormatException ex) {
println("ERROR: " + ex.getMessage() + "\n");
}
} while (badInput);
return x;
}
/**
* Equivalent to Scanner.nextLine() parsed using Float.parseFloat()
*
* @return a parsed float, includes try-catch
*/
public float getsFloat() {
float x = 0;
boolean badInput = true;
do {
try {
str = gets();
x = (Float.parseFloat(str));
badInput = false;
} catch (NumberFormatException ex) {
println("ERROR: " + ex.getMessage() + "\n");
}
} while (badInput);
return x;
}
//Double methods
/**
* Equivalent to Scanner.nextLine() parsed using Double.parseDouble();
*
* Includes a prompt for to enter a number within a certain range print to the console
*
* @param prompt
* @param min inclusive
* @param max inclusive
* @return a parsed double if in range, inclusive, includes try-catch
*/
public double getsNum(String prompt, double min, double max) {
double x = max + 1;
boolean badInput;
do {
badInput = false;
print(prompt);
str = gets();
try {
x = (Double.parseDouble(str));
} catch (NumberFormatException ex) {
badInput = true;
println("ERROR: " + ex.getMessage() + "\n");
}
} while (badInput || x > max || x < min);
return x;
}
/**
* Equivalent to Scanner.nextLine() parsed using Double.parseDouble();
*
* @param prompt prints the prompt to the user = System.out.print();
* @return a parsed double, includes try-catch
*/
public double getsDouble(String prompt) {
double x = 0;
print(prompt);
boolean badInput = true;
do {
try {
str = gets();
x = (Double.parseDouble(str));
badInput = false;
} catch (NumberFormatException ex) {
println("ERROR: " + ex.getMessage() + "\n");
}
} while (badInput);
return x;
}
/**
* Equivalent to Scanner.nextLine() parsed using Double.parseDouble()
*
* @return a parsed double, includes try-catch
*/
public double getsDouble() {
double x = 0;
boolean badInput = true;
do {
try {
str = gets();
x = (Double.parseDouble(str));
badInput = false;
} catch (NumberFormatException ex) {
println("ERROR: " + ex.getMessage() + "\n");
}
} while (badInput);
return x;
}
//Long methods
/**
* Equivalent to Scanner.nextLine() parsed using Long.parseLong();
*
* Includes a prompt for to enter a number within a certain range print to the console
*
* @param prompt A message to print to the user;
* @param min inclusive
* @param max inclusive
* @return a parsed long if in range, inclusive, includes try-catch
*/
public long getsNum(String prompt, long min, long max) {
long x = max + 1;
boolean badInput;
do {
badInput = false;
print(prompt);
str = gets();
try {
x = (Long.parseLong(str));
} catch (NumberFormatException ex) {
badInput = true;
println("ERROR: " + ex.getMessage() + "\n");
}
} while (badInput || x > max || x < min);
return x;
}
/**
* Equivalent to Scanner.nextLine() parsed using Long.parseLong();
*
* @param prompt prints the prompt to the user = System.out.print();
* @return a parsed long, includes try-catch
*/
public long getsLong(String prompt) {
long x = 0;
print(prompt);
boolean badInput = true;
do {
try {
str = gets();
x = (Long.parseLong(str));
badInput = false;
} catch (NumberFormatException ex) {
println("ERROR: " + ex.getMessage() + "\n");
}
} while (badInput);
return x;
}
//printing methods
public void println(String str) {
System.out.println(str);
}
public void print(String str) {
System.out.print(str);
}
public void println(int x) {
System.out.println(x);
}
public void print(int x) {
System.out.print(x);
}
public void println(float x) {
System.out.println(x);
}
public void print(float x) {
System.out.print(x);
}
public void println(double x) {
System.out.println(x);
}
public void print(double x) {
System.out.print(x);
}
public void println() {
System.out.println();
}
public void print(boolean x) {
System.out.print(x);
}
public void println(boolean x) {
System.out.println(x);
}
/**
* Takes an array list of strings and returns ONE string with a delimiter between each entry The delimiter is prepended to each entry
*
* @param aryL the array list to be converted to a string
* @param delimiter is added BEFORE each entry in the array list
* @param showIndex if true, prints the index + 1 in front of entry;
* @return a string with the specified delimiter between each entry
*/
public String toString(ArrayList<String> aryL, String delimiter, boolean showIndex) {
String word = "";
if (showIndex) {
for (int i = 0; i < aryL.size(); i++) {
word += delimiter + (1 + i) + ". " + aryL.get(i);
}
} else {
word = aryL.stream()
.map((aryL1) -> delimiter + aryL1)
.reduce(word,
String::concat);
}
return word;
}
/**
* Takes an array of strings and returns ONE string with a delimiter between each entry The delimiter is prepended to each entry
*
* @param ary the array list to be converted to a string
* @param delimiter is added BEFORE each entry in the array
* @return a string with the specified delimiter between each entry
*/
public String toString(String[] ary, String delimiter) {
String word = "";
for (String ary1 : ary) {
word += delimiter + ary1;
}
return word;
}
/**
* Takes an arraylist of integers and returns ONE string with a delimiter between each entry; The delimiter is prepended to each entry
*
* @param ary the array list to be converted to a string
* @param delimiter is added BEFORE each entry in the arraylist
* @return a string with the specified delimiter between each entry
*/
public String intsToString(ArrayList<Integer> ary, String delimiter) {
String word = "";
for (Integer ary1 : ary) {
word = word + ary1 + delimiter;
}
return word;
}
/**
* Takes an array of integers and returns ONE string with a delimiter between each entry; The delimiter is prepended to each entry
*
* @param ary the array list to be converted to a string
* @param delimiter is added BEFORE each entry in the array
* @return a string with the specified delimiter between each entry
*/
public String intsToString(Integer[] ary, String delimiter) {
String word = "";
for (Integer ary1 : ary) {
word = word + ary1 + delimiter;
}
return word;
}
}
| [
"kote1010@gmail.com"
] | kote1010@gmail.com |
2f1fc7aa0a19e40acbd6a4171449987f542b5938 | 9cc1896b6ad5ebf71822f3127f9f7b24e41ab81d | /XCocDomain/src/com/xcoc/billing/BillingService.java | 11acc31b8e63150dec9303c28733165554280d54 | [] | no_license | ercarval/DentalX | 115119c5f79e81b5119466ef88299d268ecfb16c | 708fe5e215babf8b9db49a3560f8f9d3092c5a99 | refs/heads/master | 2021-01-01T15:40:49.926006 | 2015-01-19T00:21:18 | 2015-01-19T00:21:18 | 1,172,831 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 524 | java | package com.xcoc.billing;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@Service
public class BillingService {
@Autowired
private BillingRepository repository;
public BillingService() {
}
@Transactional(propagation=Propagation.REQUIRES_NEW)
public void create (Billing billing) {
repository.create(billing);
}
}
| [
"ercarval@gmail.com"
] | ercarval@gmail.com |
92712fb677d19832d51ffc1f7a58e02d2f087b96 | e611fcb7f9312aace8bc34146d59e4dda917ff82 | /web1/src/main/java/com/mav/controller/Controlmore.java | a118a04b21f2f450dc53ba4c514a8d86363d5407 | [] | no_license | edgess/githubpg | 6054b244058995c2a7c8bef42c6deb50371c2ba1 | a5320df9f1ed83d02f972238b692cd2d5b1d336a | refs/heads/master | 2022-12-31T02:25:18.244993 | 2020-08-02T10:38:38 | 2020-08-02T10:38:38 | 303,061,731 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,775 | java | package com.mav.controller;
import com.google.zxing.WriterException;
import com.mav.dao.ItMapper;
import com.mav.excel.ExcelUtil;
import com.mav.excel.Tagserver;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Controller
public class Controlmore {
@Autowired
private ItMapper itMapper;
// 标签纸输出
@RequestMapping("gettagpaper")
public void gettagpaper(
@RequestParam(value = "equpstart", required = false, defaultValue = "1001") String equpstart,
@RequestParam(value = "equpstr", required = false, defaultValue = "http://192.168.10.30:12380/it/getone?equipno=SATC") String equpstr,
HttpServletResponse response, HttpServletRequest request) throws IOException, WriterException {
// 获取目录
String path = request.getSession().getServletContext().getRealPath("/");
int equipno = Integer.parseInt(equpstart);
List<Integer> list = new ArrayList<Integer>();
for (int i = 0; i < 24; i++) {
list.add(i, equipno + i);
}
String fileName = "tag-" + System.currentTimeMillis() + ".xls";
HSSFWorkbook wb = Tagserver.getTagPaper(list, equpstr, path);
// 发送文件
try {
this.setResponseHeader(response, fileName);
OutputStream os = response.getOutputStream();
wb.write(os);
os.flush();
os.close();
} catch (Exception e) {
e.printStackTrace();
}
}
// 台账输出
@RequestMapping("getfile")
public void getfile(@RequestParam(value = "p1", required = false, defaultValue = "") String p1,
@RequestParam(value = "p2", required = false, defaultValue = "") String p2,
@RequestParam(value = "p3", required = false, defaultValue = "") String p3,
@RequestParam(value = "p4", required = false, defaultValue = "") String p4,
@RequestParam(value = "p5", required = false, defaultValue = "") String p5,
@RequestParam(value = "p6", required = false, defaultValue = "") String p6,
@RequestParam(value = "p7", required = false, defaultValue = "") String p7, HttpServletResponse response,
HttpServletRequest request) throws IOException {
List<Map<Object, Object>> page = new ArrayList<Map<Object, Object>>();
// 管理分类判断
if (p6.equals("999")) {
page = itMapper.getMangerItWithMap(p1, p2, p3, p4, p5, p6, p7, 1, 2000);
} else {
page = itMapper.getAllItWithMap(p1, p2, p3, p4, p5, p6, p7, 1, 2000);
}
String fileName = "data" + System.currentTimeMillis() + ".xls"; // 文件名
String sheetName = "data";// sheet名
HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook(sheetName, page, null);
// 发送文件
try {
this.setResponseHeader(response, fileName);
OutputStream os = response.getOutputStream();
wb.write(os);
os.flush();
os.close();
} catch (Exception e) {
e.printStackTrace();
}
}
public void setResponseHeader(HttpServletResponse response, String fileName) {
try {
try {
fileName = new String(fileName.getBytes(), "ISO8859-1");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
response.setContentType("application/octet-stream;charset=ISO8859-1");
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
response.addHeader("Pargam", "no-cache");
response.addHeader("Cache-Control", "no-cache");
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
| [
"14781376@qq.com"
] | 14781376@qq.com |
f60d354d2e5b847d77b9e39fe4cba5aef0110952 | 5996a57022ba077bb9ac16ebd0627f7ec38b15e5 | /dynamic_programming/SolutionJumpGameArray.java | 9d05e40df2d86599f74f0f6be5a307cea988cbf9 | [] | no_license | robl2e/codepath-ipc-week06 | 32bc0df73309e1cfbe9cf699435583c2590ddae6 | 96b42c66dad8970cca4808f7b55f4aa705a9ee0c | refs/heads/master | 2021-05-05T17:08:23.571871 | 2018-02-04T22:36:32 | 2018-02-04T22:36:32 | 117,388,636 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 798 | java | public class SolutionJumpGameArray {
public static final int TRUE = 1;
public static final int FALSE = 0;
/*
A = [2,3,1,1,4], return 1 ( true ).
A = [3,2,1,0,4], return 0 ( false ).
*/
public int canJump(ArrayList<Integer> A) {
if (A == null || A.isEmpty()) return TRUE;
if (A.size() == 1) return TRUE;
int maxJump = A.get(0);
for (int i = 0; i < A.size(); i++) {
int jump = A.get(i);
if (maxJump <= i && jump == 0) {
return FALSE;
}
if (i + jump >= maxJump) {
maxJump = i+jump;
}
if (maxJump >= A.size()-1) {
return TRUE;
}
}
return TRUE;
}
}
| [
"robleewc@gmail.com"
] | robleewc@gmail.com |
827330a17a44e46a56a248e6568b30e8282e2ac4 | 5ca3901b424539c2cf0d3dda52d8d7ba2ed91773 | /src_cfr/y/h/dp.java | ab26a2a8619ddcd06c53df78430490b308c24410 | [] | no_license | fjh658/bindiff | c98c9c24b0d904be852182ecbf4f81926ce67fb4 | 2a31859b4638404cdc915d7ed6be19937d762743 | refs/heads/master | 2021-01-20T06:43:12.134977 | 2016-06-29T17:09:03 | 2016-06-29T17:09:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 21,342 | java | /*
* Decompiled with CFR 0_115.
*/
package y.h;
import java.awt.Cursor;
import java.awt.Graphics2D;
import java.awt.event.MouseEvent;
import java.awt.geom.Rectangle2D;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import y.c.C;
import y.c.d;
import y.c.e;
import y.c.f;
import y.c.p;
import y.c.q;
import y.d.r;
import y.d.t;
import y.g.o;
import y.h.a.a;
import y.h.a.v;
import y.h.aB;
import y.h.aC;
import y.h.az;
import y.h.bu;
import y.h.cW;
import y.h.ch;
import y.h.dI;
import y.h.dQ;
import y.h.dR;
import y.h.dS;
import y.h.dU;
import y.h.ek;
import y.h.el;
import y.h.fj;
import y.h.fu;
import y.h.gX;
import y.h.gg;
import y.h.ic;
import y.h.x;
import y.h.y;
import y.h.z;
public class dP
extends gX {
private double b;
private double c;
private double d;
private double e;
private boolean f;
private y.c.y g;
private List h;
private Cursor i;
private int j;
private f k;
private dU l;
private boolean m;
private byte n = 1;
private boolean o = true;
private boolean p;
private boolean q;
private az r;
private y.c.y s;
private y.c.y t;
private boolean u;
private boolean v;
private Map w;
private Rectangle2D.Double[] x;
private boolean y;
private y.c.y z;
private Set A;
private int B;
boolean a;
@Override
public void activate(boolean bl2) {
if (!bl2) {
this.c().f();
}
super.activate(bl2);
this.c().a(this.view);
}
public int a() {
return this.B;
}
protected boolean a(MouseEvent mouseEvent) {
if ((mouseEvent.getModifiers() & this.a()) == 0) return false;
return true;
}
public dU c() {
if (this.l != null) return this.l;
this.l = this.e();
return this.l;
}
protected dU e() {
return new dU(this.view);
}
public boolean f() {
return this.m;
}
public void a(boolean bl2) {
this.m = bl2;
}
public dP() {
this.r = new dQ(this);
this.A = Collections.EMPTY_SET;
this.B = 2;
}
@Override
public void mouseShiftPressedLeft(double d2, double d3) {
v v2 = this.i();
this.u = v2 != null && this.k();
this.a(d2, d3, this.u);
}
@Override
public void mousePressedLeft(double d2, double d3) {
this.u = false;
this.a(d2, d3, false);
}
@Override
public void mouseShiftReleasedLeft(double d2, double d3) {
this.v = this.a = this.k();
this.d(d2, d3);
this.v = false;
}
@Override
public void mouseReleasedLeft(double d2, double d3) {
this.a = this.u;
this.d(d2, d3);
}
/*
* Unable to fully structure code
*/
private void d(double var1_1, double var3_2) {
block9 : {
var9_3 = fj.z;
if (!this.f() || this.a(this.lastReleaseEvent)) ** GOTO lbl-1000
var5_4 = this.c().b(new t(var1_1, var3_2));
var1_1 = var5_4.a;
var3_2 = var5_4.b;
if (var9_3) lbl-1000: // 2 sources:
{
this.c().h();
var1_1 = this.getGridX(var1_1);
var3_2 = this.getGridY(var3_2);
}
var5_4 = this.getGraph2D();
this.view.updateWorldRect();
this.view.setDrawingMode(0);
if (this.k != null) {
for (var6_5 = this.k.k(); var6_5 != null; var6_5 = var6_5.a()) {
var7_6 = (d)var6_5.c();
var8_7 = var5_4.i((d)var7_6);
v0 = this.A.contains(var7_6);
if (!var9_3) {
if (!v0) continue;
fu.a((aB)var8_7);
if (!var9_3) continue;
}
break block9;
}
this.k = null;
}
v0 = this.y;
}
if (v0) {
block10 : {
var6_5 = new HashSet<E>();
var7_6 = this.getGraph2D().J();
while (var7_6.f()) {
var6_5.addAll(new f(var7_6.e().j()));
var7_6.g();
if (!var9_3) {
if (!var9_3) continue;
}
break block10;
}
if (this.h != null) {
for (Object var8_7 : this.h) {
if (!(var8_7 instanceof ek)) continue;
var6_5.add(((ek)var8_7).a().a());
if (var9_3 != false) return;
if (!var9_3) continue;
}
}
}
fu.a((bu)var5_4, (Collection)var6_5);
}
this.q();
this.c().f();
this.b(var1_1 - this.b, var3_2 - this.c, var1_1, var3_2);
this.view.setViewCursor(this.i);
this.i = null;
var5_4.T();
this.setEditing(false);
this.reactivateParent();
this.g = null;
this.A = Collections.EMPTY_SET;
this.h = null;
this.x = null;
}
private void m() {
boolean bl2 = fj.z;
if (this.view == null) return;
bu bu2 = this.view.getGraph2D();
if (bu2 == null) {
return;
}
if (this.j != 1) {
o.a((Object)new StringBuffer().append("Unexpected BracketCounter in MoveSelectionMode : ").append(this.j).toString());
}
do {
if (this.j <= 0) return;
--this.j;
bu2.s();
} while (!bl2);
}
@Override
public void reactivateParent() {
this.m();
super.reactivateParent();
}
/*
* Unable to fully structure code
*/
@Override
public void mouseDraggedLeft(double var1_1, double var3_2) {
var9_3 = fj.z;
if (!this.f() || this.a(this.lastDragEvent)) ** GOTO lbl-1000
var5_4 = this.c().b(new t(var1_1, var3_2));
var1_1 = var5_4.a;
var3_2 = var5_4.b;
if (var9_3) lbl-1000: // 2 sources:
{
var1_1 = this.getGridX(var1_1);
var3_2 = this.getGridY(var3_2);
this.c().h();
}
if (!this.f || !this.n() || !this.isGridMode()) ** GOTO lbl-1000
this.f = false;
this.d = var1_1;
this.e = var3_2;
if (var9_3) lbl-1000: // 2 sources:
{
var5_5 = var1_1 - this.d;
var7_6 = var3_2 - this.e;
if (var5_5 != 0.0 || var7_6 != 0.0) {
this.d = var1_1;
this.e = var3_2;
this.e(var1_1 - this.b, var3_2 - this.c);
this.a(var5_5, var7_6, var1_1, var3_2);
}
}
this.view.updateView();
}
private void e(double d2, double d3) {
Object object;
boolean bl2 = fj.z;
if (this.g == null) {
return;
}
bu bu2 = this.getGraph2D();
for (p p2 = this.g.k(); p2 != null; p2 = p2.a()) {
object = (q)p2.c();
try {
Rectangle2D.Double double_ = this.x[object.d()];
fj fj2 = bu2.t((q)object);
fj2.setLocation(double_.x + d2, double_.y + d3);
continue;
}
catch (ArrayIndexOutOfBoundsException var8_10) {
continue;
}
catch (NullPointerException var8_11) {
// empty catch block
}
if (!bl2) continue;
}
for (int i2 = 0; i2 < this.h.size(); ++i2) {
try {
object = (el)this.h.get(i2);
object.a(d2, d3);
if (bl2) return;
continue;
}
catch (NullPointerException var7_8) {
// empty catch block
}
if (!bl2) continue;
}
this.o();
}
/*
* Unable to fully structure code
*/
private void b(fj var1_1) {
var5_2 = fj.z;
var2_3 = var1_1.getNode();
var3_4 = this.getGraph2D();
for (var4_5 = var2_3.f(); var4_5 != null; var4_5 = var4_5.g()) {
v0 = this.A.contains(var4_5);
if (!var5_2) {
if (!v0) continue;
ic.a(this.view, var3_4.i(var4_5), true);
if (!var5_2) continue;
}
** GOTO lbl15
}
var4_5 = var2_3.g();
do {
if (var4_5 == null) return;
v0 = this.A.contains(var4_5);
lbl15: // 2 sources:
if (v0) {
ic.a(this.view, var3_4.i(var4_5), false);
}
var4_5 = var4_5.h();
} while (!var5_2);
}
protected void a(double d2, double d3) {
}
protected void a(double d2, double d3, double d4, double d5) {
if (this.s == null) return;
this.a(this.s);
}
private void a(y.c.y y2) {
boolean bl2 = fj.z;
bu bu2 = this.getGraph2D();
if (this.j() != 1) return;
p p2 = y2.k();
do {
if (p2 == null) return;
q q2 = (q)p2.c();
fj fj2 = bu2.t(q2);
a a2 = fj2.getAutoBoundsFeature();
if (a2 != null) {
Rectangle2D rectangle2D = (Rectangle2D)this.w.get(q2);
Rectangle2D rectangle2D2 = a2.getMinimalAutoBounds();
double d2 = Math.max(0.0, rectangle2D2.getX() - rectangle2D.getX());
double d3 = Math.max(0.0, rectangle2D2.getY() - rectangle2D.getY());
double d4 = Math.max(0.0, rectangle2D.getMaxX() - rectangle2D2.getMaxX());
double d5 = Math.max(0.0, rectangle2D.getMaxY() - rectangle2D2.getMaxY());
a2.setAutoBoundsInsets(new r(d3, d2, d5, d4));
}
p2 = p2.a();
} while (!bl2);
}
/*
* Exception decompiling
*/
protected void b(double var1_1, double var3_2, double var5_3, double var7_4) {
// This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
// org.benf.cfr.reader.util.ConfusedCFRException: Statement already marked as first in another block
// org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.markFirstStatementInBlock(Op03SimpleStatement.java:420)
// org.benf.cfr.reader.bytecode.analysis.opgraph.op3rewriters.Misc.markWholeBlock(Misc.java:219)
// org.benf.cfr.reader.bytecode.analysis.opgraph.op3rewriters.ConditionalRewriter.considerAsSimpleIf(ConditionalRewriter.java:619)
// org.benf.cfr.reader.bytecode.analysis.opgraph.op3rewriters.ConditionalRewriter.identifyNonjumpingConditionals(ConditionalRewriter.java:45)
// org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:681)
// org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:220)
// org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:165)
// org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:91)
// org.benf.cfr.reader.entities.Method.analyse(Method.java:354)
// org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:751)
// org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:683)
// org.benf.cfr.reader.Main.doJar(Main.java:129)
// org.benf.cfr.reader.Main.main(Main.java:181)
// the.bytecode.club.bytecodeviewer.decompilers.CFRDecompiler.decompileToZip(CFRDecompiler.java:245)
// the.bytecode.club.bytecodeviewer.gui.MainViewerGUI$18$1$3.run(MainViewerGUI.java:1107)
throw new IllegalStateException("Decompilation failed");
}
protected y.c.y g() {
boolean bl2 = fj.z;
y.c.y y2 = new y.c.y();
bu bu2 = this.getGraph2D();
y.c.x x2 = bu2.o();
do {
if (!x2.f()) return y2;
if (bu2.v(x2.e())) {
y2.add(x2.e());
}
x2.g();
} while (!bl2);
return y2;
}
protected z h() {
boolean bl2 = fj.z;
z z2 = new z();
bu bu2 = this.getGraph2D();
y y2 = bu2.D();
do {
if (!y2.f()) return z2;
x x2 = y2.a();
if (bu2.a(x2)) {
z2.b(x2);
}
y2.g();
} while (!bl2);
return z2;
}
private void a(y.c.y y2, z z2) {
v v2 = this.i();
if (v2 == null) {
this.s = null;
this.t = null;
y2.addAll(this.g());
z2.addAll(this.h());
if (!fj.z) return;
}
this.s = new y.c.y();
this.t = this.g();
y2.addAll(this.t);
z2.addAll(this.h());
this.a(y2, this.s, z2);
}
protected void a(y.c.y y2, y.c.y y3, z z2) {
HashSet hashSet = new HashSet(y2);
HashSet hashSet2 = new HashSet(z2);
gg.a(this.getGraph2D(), new dR(this, hashSet), new dS(this, hashSet2), y2, y3, z2);
}
/*
* Exception decompiling
*/
void a(double var1_1, double var3_2, boolean var5_3) {
// This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
// org.benf.cfr.reader.util.ConfusedCFRException: Statement already marked as first in another block
// org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.markFirstStatementInBlock(Op03SimpleStatement.java:420)
// org.benf.cfr.reader.bytecode.analysis.opgraph.op3rewriters.Misc.markWholeBlock(Misc.java:219)
// org.benf.cfr.reader.bytecode.analysis.opgraph.op3rewriters.ConditionalRewriter.considerAsSimpleIf(ConditionalRewriter.java:619)
// org.benf.cfr.reader.bytecode.analysis.opgraph.op3rewriters.ConditionalRewriter.identifyNonjumpingConditionals(ConditionalRewriter.java:45)
// org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:681)
// org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:220)
// org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:165)
// org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:91)
// org.benf.cfr.reader.entities.Method.analyse(Method.java:354)
// org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:751)
// org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:683)
// org.benf.cfr.reader.Main.doJar(Main.java:129)
// org.benf.cfr.reader.Main.main(Main.java:181)
// the.bytecode.club.bytecodeviewer.decompilers.CFRDecompiler.decompileToZip(CFRDecompiler.java:245)
// the.bytecode.club.bytecodeviewer.gui.MainViewerGUI$18$1$3.run(MainViewerGUI.java:1107)
throw new IllegalStateException("Decompilation failed");
}
protected boolean a(d d2) {
return aC.b(d2, this.getGraph2D());
}
private boolean n() {
if ((this.h != null ? this.h.size() : 0) + (this.g != null ? this.g.size() : 0) != 1) return false;
return true;
}
@Override
public void cancelEditing() {
this.c().f();
if (!this.isEditing()) return;
this.b(this.d - this.b, this.e - this.c, this.d, this.e);
this.q();
this.view.setDrawingMode(0);
if (this.i != null) {
this.view.setViewCursor(this.i);
this.i = null;
}
this.view.getGraph2D().T();
this.setEditing(false);
this.reactivateParent();
this.g = null;
this.A = Collections.EMPTY_SET;
this.h = null;
this.x = null;
}
protected Object b(double d2, double d3) {
bu bu2;
boolean bl2 = fj.z;
bu bu3 = this.getGraph2D();
cW cW2 = this.c(d2, d3);
if (!cW2.t()) {
return bu3;
}
v v2 = this.i();
C c2 = cW2.e();
while (c2.f()) {
q q2 = (q)c2.d();
bu2 = bu3;
if (bl2) return bu2;
if (!bu2.v(q2) && v2.k(q2)) {
return q2;
}
c2.g();
if (!bl2) continue;
}
bu2 = bu3;
return bu2;
}
protected cW c(double d2, double d3) {
return new cW(this.view, d2, d3, false, 4);
}
protected v i() {
return v.a(this.getGraph2D());
}
public byte j() {
return this.n;
}
public boolean k() {
return this.o;
}
public boolean l() {
return this.p;
}
protected void a(Graphics2D graphics2D, fj fj2) {
dI.b(graphics2D, fj2);
}
protected Rectangle2D a(fj fj2) {
return new Rectangle2D.Double(fj2.getX() - 10.0, fj2.getY() - 10.0, fj2.getWidth() + 20.0, fj2.getHeight() + 20.0);
}
private void o() {
boolean bl2 = fj.z;
if (this.k() && this.l()) {
boolean bl3;
MouseEvent mouseEvent = this.lastDragEvent != null ? this.lastDragEvent : this.lastPressEvent;
boolean bl4 = bl3 = mouseEvent != null && (mouseEvent.getModifiers() & 1) != 0;
if (bl3) {
this.p();
if (!bl2) return;
}
this.q();
if (!bl2) return;
}
this.q();
}
private void p() {
if (this.q) return;
this.q = true;
this.view.addDrawable(this.r);
}
private void q() {
if (!this.q) return;
this.view.removeDrawable(this.r);
this.q = false;
}
private void b(boolean bl2) {
boolean bl3;
block8 : {
Object object;
Object object2;
boolean bl4 = fj.z;
v v2 = this.i();
if (v2 == null) {
this.s = null;
return;
}
bu bu2 = this.getGraph2D();
if (this.s != null) {
bu2.a(this.s.a());
for (object = this.s.k(); object != null; object = object.a()) {
object2 = bu2.t((q)object.c());
object2.setLayer(0, true);
if (!bl4) {
if (!bl4) continue;
}
break;
}
} else {
this.w = new HashMap();
}
object = bu2.o();
while (object.f()) {
object2 = object.e();
bl3 = v2.k((q)object2);
if (!bl4) {
if (bl3) {
fj fj2 = bu2.t((q)object2);
this.w.put(object2, fj2.getBoundingBox());
}
object.g();
if (!bl4) continue;
}
break block8;
}
bl3 = bl2;
}
if (!bl3) return;
this.e(false);
}
private void d(boolean bl2) {
if (bl2) {
this.e(true);
}
this.s = null;
this.t = null;
this.w = null;
}
private void e(boolean bl2) {
p p2;
Object object;
Object object2;
boolean bl3 = fj.z;
bu bu2 = this.getGraph2D();
if (bl2) {
block6 : {
if (this.z == null) return;
for (p2 = this.z.k(); p2 != null; p2 = p2.a()) {
object = bu2.t((q)p2.c());
object2 = object.getAutoBoundsFeature();
if (!bl3) {
if (object2 == null) continue;
object2.setAutoBoundsEnabled(true);
if (!bl3) continue;
}
break block6;
}
this.z = null;
}
if (!bl3) return;
}
if (this.s == null) return;
if (this.z == null) {
this.z = new y.c.y();
}
p2 = this.s.k();
do {
if (p2 == null) return;
object = (q)p2.c();
object2 = bu2.t((q)object);
a a2 = object2.getAutoBoundsFeature();
if (a2 != null && a2.isAutoBoundsEnabled()) {
a2.setAutoBoundsEnabled(false);
this.z.add(object);
}
p2 = p2.a();
} while (!bl3);
}
@Override
public void mouseReleased(MouseEvent mouseEvent) {
super.mouseReleased(mouseEvent);
this.u = false;
}
@Override
public void mouseReleasedRight(double d2, double d3) {
this.mouseReleasedLeft(d2, d3);
}
@Override
public void mouseDraggedRight(double d2, double d3) {
this.mouseDraggedLeft(d2, d3);
}
static double a(dP dP2) {
return dP2.d;
}
static double b(dP dP2) {
return dP2.e;
}
}
| [
"manouchehri@riseup.net"
] | manouchehri@riseup.net |
977afaca3e330af17fb1a33cfde60bf77f1976ee | b36bd8bb1ba257d8d9e758f891c1b97caf14f624 | /src/main/java/com/bms/backend/config/MetricsConfiguration.java | 1e0832891db8111f7d8436c678fa2463fa0e8fed | [] | no_license | thinagaranMy/springBackend | 4494fdd7b96d665dbb4ecfecab8a6069b7a5d07e | 1f4c836edbb5b8653bb09c06e26463c7cf29bf61 | refs/heads/master | 2022-12-21T23:21:23.215783 | 2017-09-19T09:57:55 | 2017-09-19T09:57:55 | 104,058,204 | 0 | 1 | null | 2020-09-18T12:23:03 | 2017-09-19T09:58:21 | Java | UTF-8 | Java | false | false | 3,720 | java | package com.bms.backend.config;
import io.github.jhipster.config.JHipsterProperties;
import com.codahale.metrics.JmxReporter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Slf4jReporter;
import com.codahale.metrics.health.HealthCheckRegistry;
import com.codahale.metrics.jvm.*;
import com.ryantenney.metrics.spring.config.annotation.EnableMetrics;
import com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerAdapter;
import com.zaxxer.hikari.HikariDataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.*;
import javax.annotation.PostConstruct;
import java.lang.management.ManagementFactory;
import java.util.concurrent.TimeUnit;
@Configuration
@EnableMetrics(proxyTargetClass = true)
public class MetricsConfiguration extends MetricsConfigurerAdapter {
private static final String PROP_METRIC_REG_JVM_MEMORY = "jvm.memory";
private static final String PROP_METRIC_REG_JVM_GARBAGE = "jvm.garbage";
private static final String PROP_METRIC_REG_JVM_THREADS = "jvm.threads";
private static final String PROP_METRIC_REG_JVM_FILES = "jvm.files";
private static final String PROP_METRIC_REG_JVM_BUFFERS = "jvm.buffers";
private final Logger log = LoggerFactory.getLogger(MetricsConfiguration.class);
private MetricRegistry metricRegistry = new MetricRegistry();
private HealthCheckRegistry healthCheckRegistry = new HealthCheckRegistry();
private final JHipsterProperties jHipsterProperties;
private HikariDataSource hikariDataSource;
public MetricsConfiguration(JHipsterProperties jHipsterProperties) {
this.jHipsterProperties = jHipsterProperties;
}
@Autowired(required = false)
public void setHikariDataSource(HikariDataSource hikariDataSource) {
this.hikariDataSource = hikariDataSource;
}
@Override
@Bean
public MetricRegistry getMetricRegistry() {
return metricRegistry;
}
@Override
@Bean
public HealthCheckRegistry getHealthCheckRegistry() {
return healthCheckRegistry;
}
@PostConstruct
public void init() {
log.debug("Registering JVM gauges");
metricRegistry.register(PROP_METRIC_REG_JVM_MEMORY, new MemoryUsageGaugeSet());
metricRegistry.register(PROP_METRIC_REG_JVM_GARBAGE, new GarbageCollectorMetricSet());
metricRegistry.register(PROP_METRIC_REG_JVM_THREADS, new ThreadStatesGaugeSet());
metricRegistry.register(PROP_METRIC_REG_JVM_FILES, new FileDescriptorRatioGauge());
metricRegistry.register(PROP_METRIC_REG_JVM_BUFFERS, new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer()));
if (hikariDataSource != null) {
log.debug("Monitoring the datasource");
hikariDataSource.setMetricRegistry(metricRegistry);
}
if (jHipsterProperties.getMetrics().getJmx().isEnabled()) {
log.debug("Initializing Metrics JMX reporting");
JmxReporter jmxReporter = JmxReporter.forRegistry(metricRegistry).build();
jmxReporter.start();
}
if (jHipsterProperties.getMetrics().getLogs().isEnabled()) {
log.info("Initializing Metrics Log reporting");
final Slf4jReporter reporter = Slf4jReporter.forRegistry(metricRegistry)
.outputTo(LoggerFactory.getLogger("metrics"))
.convertRatesTo(TimeUnit.SECONDS)
.convertDurationsTo(TimeUnit.MILLISECONDS)
.build();
reporter.start(jHipsterProperties.getMetrics().getLogs().getReportFrequency(), TimeUnit.SECONDS);
}
}
}
| [
"Thinagaran.KHaridass@sicpa.com"
] | Thinagaran.KHaridass@sicpa.com |
9826f9da0656b9e1b64e1afa32b4bb0378a1a587 | aad37204ad22b8356aeee51f10c0ac3fc97302bb | /PicCategory/app/src/main/java/com/we/piccategory/test/QQPresenter.java | e2f5d65dc926e978234664051cf08d2538a0acd4 | [] | no_license | hou675/PicCategory | f31a83c3ac34fb7752af4865121fbd91de710605 | edde6aa216d49d8961fd4fc8c0933e04058f7457 | refs/heads/master | 2022-04-10T15:42:27.065909 | 2017-08-25T09:35:55 | 2017-08-25T09:35:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 291 | java | package com.we.piccategory.test;
/**
* 作者:潘浩
* 公司:圆周率网络科技
* 时间:17-8-24
*/
public class QQPresenter implements IService {
@Override
public void service() {
System.out.println("qq登錄了");
//...后台校验数据
}
}
| [
"861190079@qq.com"
] | 861190079@qq.com |
25266e350d88c33e0a1b42cd10e2efd828393d86 | 019c8e85ccdbe06144cbfa3c3490d8451e68a333 | /app/src/main/java/com/me/daily/ui/adapter/holder/DailyNewsItemViewHolder.java | 3a6c891a392aa2bf7807c9935308355c778b4256 | [] | no_license | wds609/zhiHu | eab3173b4adba093a5c91642da217c33fe75ec8f | ca8dc5e149c753bdf65b9e99b5a6e7ab694efc10 | refs/heads/master | 2021-01-10T01:37:41.640488 | 2015-10-27T08:03:37 | 2015-10-27T08:19:19 | 43,349,776 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 601 | java | package com.me.daily.ui.adapter.holder;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.me.daily.R;
import butterknife.Bind;
import butterknife.ButterKnife;
/**
* Created by wds on 9/22/2015.
*/
public class DailyNewsItemViewHolder extends RecyclerView.ViewHolder {
@Bind(R.id.image)
public ImageView image;
@Bind(R.id.title)
public TextView title;
public DailyNewsItemViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}
}
| [
"dongsheng.wang@agreeyamobility.net"
] | dongsheng.wang@agreeyamobility.net |
2ce53b188e9adcb9d1a21c194684f0ba13df3ddf | 89ca15ed5b6718c0b82c84c98df6a7598ee570d8 | /app/src/main/java/com/last/booking/ui/main/BusinessFragment.java | 8cf3063258ac83bad5bf280242de35527b843c3d | [] | no_license | ShinyGX/OrderSYS-android | 6dff21fb7ebfbf9983a35b625d8371ac9ba25454 | d6cf26a5743ecb1159b27da147ccb7112d8944b4 | refs/heads/master | 2022-07-28T08:48:23.598723 | 2020-05-25T11:25:06 | 2020-05-25T11:25:06 | 262,537,383 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,200 | java | package com.last.booking.ui.main;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import com.last.booking.R;
import com.last.booking.ui.booking.BookingActivity;
import com.last.booking.ui.businessDetail.BusinessDetailActivity;
import com.last.booking.ui.missionHistory.MissionHistoryActivity;
import com.last.booking.ui.officeMessage.OfficeMessageActivity;
public class BusinessFragment extends Fragment {
int userId = -1;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_main,null);
userId = getArguments() != null ? getArguments().getInt("userId", -1) : -1;
ImageButton ib_bookingOnline = view.findViewById(R.id.booking_online);
ib_bookingOnline.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
jumpOtherActivity(BookingActivity.class);
}
});
ImageButton ib_businessCheck = view.findViewById(R.id.business_check);
ib_businessCheck.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
jumpOtherActivity(OfficeMessageActivity.class);
}
});
ImageButton ib_messageRealtime = view.findViewById(R.id.mine_message_realtime);
ib_messageRealtime.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
jumpOtherActivity(MissionHistoryActivity.class);
}
});
return view;
}
private void jumpOtherActivity(Class<? extends Activity> cls)
{
Intent intent = new Intent(getActivity(),cls);
intent.putExtra("userId",userId);
startActivity(intent);
}
}
| [
"591243801@qq.com"
] | 591243801@qq.com |
3b1b9312d43659fc548b4726fabfc726dbcc5be9 | a64179ed78fcd9d652ce403d6e19d7a7678b3114 | /documentscanner/src/main/java/com/labters/documentscanner/data_table.java | f4a38a5966905754a88b41a94c43c5fe3374c716 | [
"MIT"
] | permissive | Qkprahlad101/AndroidTest | 73d95eb65494dae4b91c1fdd501965498a8647da | 1543826827a3240c8109a369f13a7cc74c685efe | refs/heads/master | 2023-02-16T16:11:41.007990 | 2021-01-07T05:02:47 | 2021-01-07T05:02:47 | 323,798,614 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,583 | java | package com.labters.documentscanner;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class data_table extends AppCompatActivity {
TextView nima, fname, blockconf, symconf, reqid, vertical, vehicleid, make, model, variant, fuel, cc, previnsu, mfgyear, regdate, expdate;
String resStr;
Button done;
String nima_score;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_data_table);
nima = findViewById(R.id.nima);
fname = findViewById(R.id.fname);
blockconf= findViewById(R.id.blockconf);
symconf = findViewById(R.id.symcon);
reqid = findViewById(R.id.reqid);
vertical = findViewById(R.id.vertical);
vehicleid = findViewById(R.id.vehicleid);
make = findViewById(R.id.make);
model = findViewById(R.id.model);
variant = findViewById(R.id.variant);
fuel = findViewById(R.id.fuel);
cc = findViewById(R.id.cc);
previnsu = findViewById(R.id.previnsu);
mfgyear = findViewById(R.id.mfg);
regdate = findViewById(R.id.regdate);
expdate = findViewById(R.id.expdate);
done = findViewById(R.id.done);
resStr = getIntent().getExtras().getString("response");
nima_score = getIntent().getExtras().getString("nima");
nima.setText(nima_score);
fname.setText(resStr.substring(18,46));
blockconf.setText(resStr.substring(69,83));
symconf.setText(resStr.substring(107,124));
reqid.setText(resStr.substring(147,158));
vertical.setText(resStr.substring(178,180));
vehicleid.setText(resStr.substring(199,205));
make.setText(resStr.substring(219,223));
model.setText(resStr.substring(240,249));
variant.setText(resStr.substring(268,283));
fuel.setText(resStr.substring(299,305));
cc.setText(resStr.substring(317,322));
previnsu.setText(resStr.substring(343,351));
mfgyear.setText(resStr.substring(366,371));
regdate.setText(resStr.substring(398,408));
expdate.setText(resStr.substring(431,441));
done.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setResult(RESULT_OK);
finish();
}
});
}
} | [
"73589696+prahlad-dev@users.noreply.github.com"
] | 73589696+prahlad-dev@users.noreply.github.com |
ce7a9165c7000a69321a8bca08b94cc6fd3cecda | c709b5c636b640ea0e64cafa8cc45a49ce6702d7 | /src/main/java/com/jdbc/wchallenge_api/repository/db/events/CommentModelListener.java | 2393d64012ab2283aaa485bdd280c06117dda15c | [
"MIT"
] | permissive | juandbc/WchallengeAPI | f36b1d96d43d7f95010dd01fe3387d0a0b24fe1c | 0bf6927250fed22f08b905f8006fb3de209becbb | refs/heads/master | 2022-12-12T19:34:49.955442 | 2020-09-09T05:04:37 | 2020-09-09T05:04:37 | 292,131,881 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,017 | java | package com.jdbc.wchallenge_api.repository.db.events;
import com.jdbc.wchallenge_api.model.Comment;
import com.jdbc.wchallenge_api.service.SequenceGeneratorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener;
import org.springframework.data.mongodb.core.mapping.event.BeforeConvertEvent;
import org.springframework.stereotype.Component;
/**
* @author Juan David Bermudez
* @version 1.0
*/
@Component
public class CommentModelListener extends AbstractMongoEventListener<Comment> {
private final SequenceGeneratorService sequenceGenerator;
@Autowired
public CommentModelListener(SequenceGeneratorService sequenceGenerator) {
this.sequenceGenerator = sequenceGenerator;
}
@Override
public void onBeforeConvert(BeforeConvertEvent<Comment> event) {
if (event.getSource().getId() < 1) {
event.getSource().setId(sequenceGenerator.generateSequence(Comment.SEQUENCE_NAME));
}
}
}
| [
"juanbermucele@gmail.com"
] | juanbermucele@gmail.com |
fd83a86735de6cb30a222c662e4587c963465d33 | 989ceec878334d6d250864b355363fae5d12c659 | /ProgrammingAssignment3/Point.java | 9fb4ec1548d275942ad413c551f78f69b8ee7d5e | [] | no_license | shamanengine/algorithms | 20cd6174489a74f92a0ddb99e0594b0d827353aa | 540b082bd3690b5313e6bad0a82b142ff7341d2a | refs/heads/master | 2021-01-11T03:15:18.914237 | 2016-10-08T12:20:09 | 2016-10-08T12:20:09 | 70,140,287 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,384 | java |
/******************************************************************************
* Compilation: javac Point.java
* Execution: java Point
* Dependencies: none
* <p>
* An immutable data type for points in the plane.
* For use on Coursera, Algorithms Part I programming assignment.
******************************************************************************/
import java.util.Comparator;
import java.util.Arrays;
import edu.princeton.cs.algs4.StdDraw;
import edu.princeton.cs.algs4.In;
import edu.princeton.cs.algs4.StdOut;
public class Point implements Comparable<Point> {
private final int x; // x-coordinate of this point
private final int y; // y-coordinate of this point
/**
* Initializes a new point.
*
* @param x the <em>x</em>-coordinate of the point
* @param y the <em>y</em>-coordinate of the point
*/
public Point(int x, int y) {
/* DO NOT MODIFY */
this.x = x;
this.y = y;
}
/**
* Draws this point to standard draw.
*/
public void draw() {
/* DO NOT MODIFY */
StdDraw.point(x, y);
}
/**
* Draws the line segment between this point and the specified point to
* standard draw.
*
* @param that the other point
*/
public void drawTo(Point that) {
/* DO NOT MODIFY */
StdDraw.line(this.x, this.y, that.x, that.y);
}
/**
* Returns the slope between this point and the specified point. Formally,
* if the two points are (x0, y0) and (x1, y1), then the slope is (y1 - y0)
* / (x1 - x0). For completeness, the slope is defined to be +0.0 if the
* line segment connecting the two points is horizontal;
* Double.POSITIVE_INFINITY if the line segment is vertical; and
* Double.NEGATIVE_INFINITY if (x0, y0) and (x1, y1) are equal.
*
* @param that the other point
* @return the slope between this point and the specified point
*/
public double slopeTo(Point that) {
/* YOUR CODE HERE */
if (this.x == that.x && this.y == that.y) {
return Double.NEGATIVE_INFINITY;
}
if (this.x == that.x) {
return Double.POSITIVE_INFINITY;
}
if (this.y == that.y) {
return +0.0;
}
return 1.0 * (this.y - that.y) / (this.x - that.x);
}
/**
* Compares two points by y-coordinate, breaking ties by x-coordinate.
* Formally, the invoking point (x0, y0) is less than the argument point
* (x1, y1) if and only if either y0 < y1 or if y0 = y1 and x0 < x1.
*
* @param that the other point
* @return the value <tt>0</tt> if this point is equal to the argument point
* (x0 = x1 and y0 = y1); a negative integer if this point is less
* than the argument point; and a positive integer if this point is
* greater than the argument point
* @throws NullPointerException if that is null
*/
public int compareTo(Point that) {
/* YOUR CODE HERE */
if (that == null) {
throw new NullPointerException("Null");
}
int dy = this.y - that.y;
return (dy == 0) ? this.x - that.x : dy;
}
/**
* Compares two points by the slope they make with this point.
* The slope is defined as in the slopeTo() method.
*
* @return the Comparator that defines this ordering on points
*/
public Comparator<Point> slopeOrder() {
/* YOUR CODE HERE */
return new SlopeOrder();
}
/**
* Compares point according to polar angle (between 0 and 2pi) it makes with this point
*/
private class SlopeOrder implements Comparator<Point> {
public int compare(Point q1, Point q2) {
double ds = slopeTo(q1) - slopeTo(q2);
return (ds < 0) ? -1 :
(ds > 0) ? 1 : 0;
}
}
/**
* Returns a string representation of this point. This method is provide for
* debugging; your program should not rely on the format of the string
* representation.
*
* @return a string representation of this point
*/
public String toString() {
/* DO NOT MODIFY */
return "(" + x + ", " + y + ")";
}
/**
* Unit tests the Point data type.
*/
public static void main(String[] args) {
/* YOUR CODE HERE */
// Rescale coordinates and turn on animation mode
StdDraw.setXscale(0, 32768);
StdDraw.setYscale(0, 32768);
StdDraw.show();
StdDraw.setPenRadius(0.01); // make the points a bit larger
// Reading from input
String filename = args[0];
In in = new In(filename);
int N = in.readInt();
Point[] points = new Point[N];
for (int i = 0; i < N; i++) {
int x = in.readInt();
int y = in.readInt();
Point p = new Point(x, y);
points[i] = p;
p.draw();
}
StdDraw.show();
// Reset the pen radius
StdDraw.setPenRadius();
// Line segments from p to each point, one at a time, in slope order
Arrays.sort(points);
StdOut.println("Sort by left endpoint");
Arrays.sort(points, points[0].slopeOrder());
for (Point point : points) StdOut.println(point.toString());
StdOut.println();
}
} | [
"noreply@github.com"
] | noreply@github.com |
4b1f7320424851818fb9a14c50a9f65fe4f64635 | de117207a360bef9358c56fdefb15075ddebd5f7 | /Vendor Client/src/co835/vailskiwear/vendorclient/net/packet/PacketBuilder.java | f1fff4f95cf69ecb68316007603e8a74e2c4a375 | [] | no_license | joshvm/COMPCO835-Final | 9c9d65ffc9efc9cddf9c33e13a951f72056d1008 | 06d09eb82bc247555bef19cdc1d71a28de9046bc | refs/heads/master | 2016-09-05T21:48:48.742019 | 2015-06-09T05:01:24 | 2015-06-09T05:01:24 | 37,110,734 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,097 | java | package co835.vailskiwear.vendorclient.net.packet;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.nio.ByteBuffer;
/**
* I Josh Maione, 000320309 certify that this material is my original work.
* No other person's work has been used without due acknowledgement.
* I have not made my work available to anyone else.
*/
public class PacketBuilder {
private final Opcode opcode;
private final DataOutputStream dos;
private final ByteArrayOutputStream baos;
public PacketBuilder(final Opcode opcode){
this.opcode = opcode;
baos = new ByteArrayOutputStream();
dos = new DataOutputStream(baos);
}
public PacketBuilder writeByte(final int b){
try{
dos.writeByte(b);
}catch(Exception ex){
ex.printStackTrace();
}
return this;
}
public PacketBuilder writeShort(final int s){
try{
dos.writeShort(s);
}catch(Exception ex){
ex.printStackTrace();
}
return this;
}
public PacketBuilder writeInt(final int i){
try{
dos.writeInt(i);
}catch(Exception ex){
ex.printStackTrace();
}
return this;
}
public PacketBuilder writeString(final String s){
writeShort(s.length());
for(final char c : s.toCharArray())
writeByte((byte)c);
return this;
}
public Packet build(){
final byte[] bytes = baos.toByteArray();
final int outLength = opcode.getOutgoingLength();
final int extra = outLength < 0 ? Math.abs(outLength) : 0;
final ByteBuffer buf = ByteBuffer.allocate(1 + extra + bytes.length);
buf.put((byte)opcode.getValue());
switch(outLength){
case -2:
buf.putShort((short)bytes.length);
break;
case -1:
buf.put((byte)bytes.length);
break;
}
buf.put(bytes);
return new Packet(opcode, buf);
}
}
| [
"joshua.maione@hotmail.com"
] | joshua.maione@hotmail.com |
4df30bbff7da06580a3893b2fc9ec7e14a2cbcfb | 62555ca6f7396a94ba9c20c0847d935cea0208ec | /src/creation/builder/Door.java | 8d0d05a5b165c339e40bdda8d310a31978de5d86 | [] | no_license | baont/designPatterns | 468a695505e3fb97bc761422b1a316dc60aa9077 | ea8fd84476088c316771c3fc2d10cdba435eea8f | refs/heads/master | 2020-04-23T10:28:30.376570 | 2019-03-10T09:24:59 | 2019-03-10T09:24:59 | 171,105,436 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 643 | java | package creation.builder;
public class Door {
private int w;
private int h;
private int color;
public int getW() {
return w;
}
public void setW(int w) {
this.w = w;
}
public int getH() {
return h;
}
public void setH(int h) {
this.h = h;
}
public int getColor() {
return color;
}
public void setColor(int color) {
this.color = color;
}
@Override
public String toString() {
return "Door{" +
"w=" + w +
", h=" + h +
", color=" + color +
'}';
}
}
| [
"baont.qn@gmail.com"
] | baont.qn@gmail.com |
060305c5a9e46079a16dafb855000df9b284288e | 0f21a9c14609390cea84317c932854530d059b4b | /src/main/java/com/codejek/inventory/management/repository/WarehouseRepository.java | 479fc66753078b102ce2ef639d51603067cc1b39 | [] | no_license | tummalalakshmi/inventory-management | 7db6ebdc50034fd12ecb67a0c4c711565597894a | 103de1523773b8337bf978756adab658be72aa5a | refs/heads/master | 2022-08-16T16:09:27.150341 | 2020-05-22T11:27:06 | 2020-05-22T11:27:06 | 266,093,385 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 268 | java | package com.codejek.inventory.management.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import com.codejek.inventory.management.entity.WarehouseEntity;
public interface WarehouseRepository extends JpaRepository<WarehouseEntity, Long>{
}
| [
"ltummala@opentext.com"
] | ltummala@opentext.com |
9d6b87ecff0bfe2ecdc938f8d63da8e3b724ed1f | d7640592ce30bdd8d2a5a9a8af7239ce03768913 | /Binary Search tree - Sum/Main.java | fc2f2fa0d95764afda7201469a98f0707dd25197 | [] | no_license | rohithreddy5/Playground | 37bead86f773297c45c1345f3fb6ae30da8ddd5f | fd9fc7bc9a4067c1f361664e40c16a5a7ffa4f57 | refs/heads/master | 2021-03-15T09:10:41.985154 | 2020-04-20T15:53:48 | 2020-04-20T15:53:48 | 246,839,666 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 207 | java | #include<iostream>
using namespace std;
int main()
{
int a[100],i=0,s=0;
while(1)
{
cin>>a[i];
s=s+a[i];
if(a[i]==-1) break;
i++;
}
cout<<"Sum of all nodes are "<<s+1;
return 0;
} | [
"51394210+rohithreddy5@users.noreply.github.com"
] | 51394210+rohithreddy5@users.noreply.github.com |
2fedbef84b11b3989b39fffc6d5a17f1fdba806c | 6817f4dcf7193217784c1cb7608becbaa5195236 | /src/model/MemberDTO.java | 6119fd296f94d6dd5322b63c5f85243eaa4d3887 | [] | no_license | bc0086/K09MariaDB | 436d7ee36a644fed78889a0b216e877bc328a14e | 7d815c12192aab1140b5d687a8a49346ac22d6cc | refs/heads/master | 2022-09-01T11:36:19.835630 | 2020-06-02T08:39:45 | 2020-06-02T08:39:45 | 267,836,262 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,616 | java | package model;
import java.sql.Date;
/*
DTO객체(Data Transfer Object)
: 데이터를 저장하기 위한 객체로 멤버변수, 생성자, getter/setter
메소드를 가지고 있는 클래스로 일반적인 자바빈(Bean)규약을 따른다.
*/
public class MemberDTO {
// 멤버변수 : 정보은닉을 위해 private으로 선언함.
private String id;
private String pass;
private String name;
private java.sql.Date regidate;
// 기본 생성자
public MemberDTO() {}
// 인자 생성자
public MemberDTO(String id, String pass, String name, Date regidate) {
super();
this.id = id;
this.pass = pass;
this.name = name;
this.regidate = regidate;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getPass() {
return pass;
}
public void setPass(String pass) {
this.pass = pass;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public java.sql.Date getRegidate() {
return regidate;
}
public void setRegidate(java.sql.Date regidate) {
this.regidate = regidate;
}
/*
Object클래스에서 제공하는 메소드로 객체를 문자열형태로 변형해서 반환해주는 역할을 한다.
toString()메소드를 오버라이딩하면 객체 자체를 그대로 print()하는것이 가능하다.
*/
@Override
public String toString() {
return String.format("아이디:%s, 비밀번호:%s, 이름:%s",
id, pass, name);
}
// getter/setter
}
| [
"bc0086@naver.com"
] | bc0086@naver.com |
e10429405934cb120367a95a032ae0396d75448e | cb2a2d4151334175adb874f0a2c426ddb424c559 | /src/main/java/com/ljp/controller/AssignmentsController.java | 2930ad813bfcbc20bc6d93ed9974fba815f3bd09 | [] | no_license | blssdr/dormitory | 031063550789c83ea5ae6bdce2816782b5384495 | 5bdf26fe582d011a346b3b3137a791bfeb7692e9 | refs/heads/main | 2023-07-02T21:22:15.828931 | 2021-08-04T08:14:19 | 2021-08-04T08:14:19 | 392,606,020 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,583 | java | package com.ljp.controller;
import com.ljp.entity.Admin;
import com.ljp.entity.Room;
import com.ljp.entity.Student;
import com.ljp.mapper.AdminDao;
import com.ljp.service.AdminService;
import com.ljp.service.RoomService;
import com.ljp.service.StudentService;
import com.ljp.utils.MapControl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/assignments")
public class AssignmentsController {
@Autowired
private StudentService studentService;
@Autowired
private RoomService roomService;
@PostMapping("/create")
@ResponseBody
public Map<String, Object> create(@RequestBody Student student){
int result = studentService.create(student);
if(result <= 0){
return MapControl.getInstance().error().getMap();
}
return MapControl.getInstance().success().getMap();
}
@PostMapping("/delete")
@ResponseBody
public Map<String, Object> delete(String ids){
// System.out.println(ids);
// int result = studentService.deleteBatch(ids);
// if(result <= 0){
// return MapControl.getInstance().error().getMap();
// }
// return MapControl.getInstance().success().getMap();
return null;
}
@PostMapping("/update")
@ResponseBody
public Map<String, Object> update(@RequestBody Student student){
int result = studentService.update(student);
if(result <= 0){
return MapControl.getInstance().error().getMap();
}
return MapControl.getInstance().success().getMap();
}
@PostMapping("/join/query")
@ResponseBody
public Map<String, Object> query(@RequestBody Student student){
student.setState("待分配");
List<Student> list = studentService.query(student);
Integer count = studentService.count(student);
return MapControl.getInstance().page(list,count).getMap();
}
@PostMapping("/leave/query")
@ResponseBody
public Map<String, Object> query2(@RequestBody Student student){
student.setState("已分配");
List<Student> list = studentService.query(student);
Integer count = studentService.count(student);
return MapControl.getInstance().page(list,count).getMap();
}
@GetMapping("/edit")
public String detail(Integer id, ModelMap modelMap) {
Student student = studentService.detail(id);
modelMap.addAttribute("student",student);
// modelMap.addAttribute(student);
return "student/edit";
}
@GetMapping("/join/checkin")
public String checkin(String ids,ModelMap modelMap) {
// ids = "ids=" + ids;
// modelMap.addAttribute("ids",ids);
// System.out.println(ids);
List<Integer> list = new ArrayList<Integer>();
String [] str = ids.split(",");
for (String s : str){
// System.out.println(Integer.parseInt(s));
list.add(Integer.parseInt(s));
}
modelMap.addAttribute("list",list);
return "assignments/join/checkin";
}
@GetMapping("/join/list")
public String list(){
return "assignments/join/list";
}
@GetMapping("/leave/list")
public String list2(){
return "assignments/leave/list";
}
@PostMapping("/join/queryRoom")
@ResponseBody
public Map<String, Object> query(@RequestBody Room room){
List<Room> list = roomService.query(room);
Integer count = roomService.count(room);
// room.setState("待入住");
// List<Room> list1 = roomService.query(room);
// Integer count1 = roomService.count(room);
// room.setState("有空位");
// List<Room> list2 = roomService.query(room);
// Integer count2 = roomService.count(room);
// List<Room> list = new ArrayList<Room>();
// list.addAll(list1);
// list.addAll(list1);
// Integer count = count1 + count2;
return MapControl.getInstance().page(list,count).getMap();
}
@PostMapping("/join/select")
@ResponseBody
public Map<String, Object> select(String ids){
System.out.println("ids="+ids);
List<Integer> list = new ArrayList<Integer>();
String [] str = ids.split(",");
for (String s : str){
// System.out.println(Integer.parseInt(s));
list.add(Integer.parseInt(s));
}
// 房间信息更改
Room room = roomService.detail(list.get(0));
System.out.println(list.size());
if ((room.getRules()-room.getCount()+1) < list.size()){
return MapControl.getInstance().error("房间不足").getMap();
}
if (room.getLeaderId()==null){
room.setLeaderId(list.get(1));
}
room.setCount(room.getCount()+list.size()-1);
if (room.getCount()==room.getRules()){
room.setState(Room.state_over);
}else{
room.setState(Room.state_exec);
}
int resultRoom = roomService.update(room);
if(resultRoom <= 0){
return MapControl.getInstance().error("房间更新失败").getMap();
}
// 学生信息更改
for (int i =1; i < list.size(); i++){
Student student = studentService.detail(list.get(i));
student.setRoomId(list.get(0));
student.setState(Student.state_exec);
// System.out.println(student.getStartTime());
// System.out.println(new Date());
student.setStartTime(new Date());
int resultStudent = studentService.update(student);
if(resultStudent <= 0){
return MapControl.getInstance().error("学生更新失败").getMap();
}
}
// int result = studentService.update(student);
// int result = studentService.deleteBatch(ids);
// if(result <= 0){
// return MapControl.getInstance().error().getMap();
// }
return MapControl.getInstance().success().getMap();
// return null;
}
@PostMapping("/leave/lea")
@ResponseBody
public Map<String, Object> lea(String ids){
System.out.println("ids="+ids);
List<Integer> list = new ArrayList<Integer>();
String [] str = ids.split(",");
for (String s : str){
System.out.println(Integer.parseInt(s));
list.add(Integer.parseInt(s));
}
// 学生信息更改
for (int i =0; i < list.size(); i++){
Student student = studentService.detail(list.get(i));
Room room = roomService.detail(student.getRoomId());
room.setCount(room.getCount()-1);
if (room.getCount() != room.getRules()){
room.setState(Room.state_exec);
}
if (room.getCount() == 0){
room.setState(Room.state_create);
}
if (room.getLeaderId() == student.getId()){
room.setLeaderId(0);
}
int resultRoom = roomService.update(room);
if(resultRoom <= 0){
return MapControl.getInstance().error("房间更新失败").getMap();
}
student.setRoomId(0);
student.setState(Student.state_over);
student.setEndTime(new Date());
int resultStudent = studentService.update(student);
if(resultStudent <= 0){
return MapControl.getInstance().error("学生更新失败").getMap();
}
}
return MapControl.getInstance().success().getMap();
}
// @GetMapping("/create")
// public void create(HttpServletResponse response){
// Student student = new Student();
// student.setAccount("xx");
// studentService.create(student);
// try {
// response.getWriter().println("success");
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
//
// @GetMapping("/delete")
// public void delete(HttpServletResponse response){
// studentService.delete(2);
// try {
// response.getWriter().println("success");
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
}
| [
"626334765@qq.com"
] | 626334765@qq.com |
c3268ec8d6d83ed36085be5bff867f3fc9b671fc | 6691c93c5fcc3e9a2cf676cbc4a860f2b6e8b69c | /CNU순환버스알리미 소스파일(안드로이드)/CNU/app/src/main/java/com/cnu_bus_alarm/cnu/AdminActivity.java | 5abb29ce331ab2e43d8a4acb1db92b56280e6cd6 | [] | no_license | hyenee/CNU_Bus_Application | 10310efa08e2faf9cf1015d32805ed598fbf7930 | ea7f9d02f82edf7fdb3995823f10a1b4de3149c5 | refs/heads/master | 2020-05-15T05:57:14.319332 | 2019-09-23T16:35:49 | 2019-09-23T16:35:49 | 182,114,301 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,096 | java | package com.cnu_bus_alarm.cnu;
import android.Manifest;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Criteria;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.os.StrictMode;
import android.provider.Settings;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import java.io.PrintWriter;
import java.net.Socket;
/**
* Created by 진수연 on 2018-01-18.
*/
public class AdminActivity extends AppCompatActivity implements LocationListener {
public static final int RequestPermissionCode = 1 ;
Button buttonEnable, buttonGet ;
TextView textViewLongitude, textViewLatitude ;
Context context;
Intent intent1 ;
Location location;
LocationManager locationManager ;
boolean GpsStatus = false ;
Criteria criteria ;
String Holder;
//소켓시작
public static Socket socket;
PrintWriter socket_out;
public static double choicelatitide = 0;
public static double choicelongitude=0;
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_admin);
EnableRuntimePermission();
buttonEnable = (Button)findViewById(R.id.gps_button1);
buttonGet = (Button)findViewById(R.id.gps_button2);
textViewLongitude = (TextView)findViewById(R.id.textView);
textViewLatitude = (TextView)findViewById(R.id.textView2);
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
criteria = new Criteria();
Holder = locationManager.getBestProvider(criteria, false);
context = getApplicationContext();
CheckGpsStatus();
buttonEnable.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
intent1 = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(intent1);
}
});
buttonGet.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
CheckGpsStatus();
if (GpsStatus == true) {
if (Holder != null) {
if (ActivityCompat.checkSelfPermission(
AdminActivity.this,
Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED
&&
ActivityCompat.checkSelfPermission(AdminActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION)
!= PackageManager.PERMISSION_GRANTED) {
return;
}
Log.e("서버전송:", "위치받아오기");
location = locationManager.getLastKnownLocation(Holder);//최근 위치 조회, 결과는 바로 얻을 수 있음
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, AdminActivity.this);
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, AdminActivity.this);
//결과는 locationListener을 통해 수신
Log.e("서버전송중", "위치받아오기 성공");
//socket시작
StrictMode.enableDefaults(); //소켓
try {
socket = new Socket("168.188.129.143", 5555);
socket_out = new PrintWriter(socket.getOutputStream(), true);
} catch (Exception e) {
e.printStackTrace();
}
String selectedData = "";
if (choicelatitide > -91.0 && choicelatitide < 91.0) {
selectedData += Double.toString(choicelatitide) + "|";
}
if (choicelongitude > -181.0 && choicelongitude < 181.0) {
selectedData += Double.toString(choicelongitude) + "|";
}
if (selectedData != "") {
Log.w("정보보내기", " " + selectedData);
selectedData += "A";
socket_out.println(selectedData);
} else {
socket_out.println("보낼 정보가 없습니다.");
}
}
} else {
Toast.makeText(AdminActivity.this, "Please Enable GPS First", Toast.LENGTH_LONG).show();
}
}
});
}
// @Override
public void onLocationChanged(Location location) {
choicelatitide = location.getLatitude();
choicelongitude = location.getLongitude();
textViewLongitude.setText("Longitude:" + choicelongitude);
textViewLatitude.setText("Latitude:" + choicelatitide);
}
// @Override
public void onStatusChanged(String s, int i, Bundle bundle) {
}
// @Override
public void onProviderEnabled(String s) {
}
//@Override
public void onProviderDisabled(String s) {
}
public void CheckGpsStatus(){
locationManager = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
GpsStatus = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
}
public void EnableRuntimePermission(){
if (ActivityCompat.shouldShowRequestPermissionRationale(AdminActivity.this,
Manifest.permission.ACCESS_FINE_LOCATION))
{
Toast.makeText(AdminActivity.this,"ACCESS_FINE_LOCATION permission allows us to Access GPS in app", Toast.LENGTH_LONG).show();
} else {
ActivityCompat.requestPermissions(AdminActivity.this,new String[]{
Manifest.permission.ACCESS_FINE_LOCATION}, RequestPermissionCode);
}
}
@Override
public void onRequestPermissionsResult(int RC, String per[], int[] PResult) {
switch (RC) {
case RequestPermissionCode:
if (PResult.length > 0 && PResult[0] == PackageManager.PERMISSION_GRANTED) {
Toast.makeText(AdminActivity.this,"Permission Granted, Now your application can access GPS.", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(AdminActivity.this,"Permission Canceled, Now your application cannot access GPS.", Toast.LENGTH_LONG).show();
}
break;
}
}
@Override
protected void onStop(){
super.onStop();
try{
socket.close();
}catch(Exception e){
e.printStackTrace();
}
}
} | [
"33437627+hyenee@users.noreply.github.com"
] | 33437627+hyenee@users.noreply.github.com |
3c4cdc7b4823be302dfdcfcc0854d8b5153747b3 | ef51db085cfafe331b530019fa7935addd60be64 | /SimpleAccessibility/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r/android/support/v7/viewpager/R.java | cfbfec3d07207ce3ab217fa336464cba9a6d0dda | [
"Apache-2.0"
] | permissive | pamunoz/android_advanced_codelabs | a4a6fb0ce0d3ba9d450f4def5e6897e58962de99 | 5fa158d1a71ac75f47e7572f96da738ce5447b7c | refs/heads/master | 2020-05-09T11:12:58.309903 | 2019-05-09T19:00:25 | 2019-05-09T19:00:25 | 181,048,736 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,459 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package android.support.v7.viewpager;
public final class R {
private R() {}
public static final class attr {
private attr() {}
public static final int alpha = 0x7f020027;
public static final int font = 0x7f02007a;
public static final int fontProviderAuthority = 0x7f02007c;
public static final int fontProviderCerts = 0x7f02007d;
public static final int fontProviderFetchStrategy = 0x7f02007e;
public static final int fontProviderFetchTimeout = 0x7f02007f;
public static final int fontProviderPackage = 0x7f020080;
public static final int fontProviderQuery = 0x7f020081;
public static final int fontStyle = 0x7f020082;
public static final int fontVariationSettings = 0x7f020083;
public static final int fontWeight = 0x7f020084;
public static final int ttcIndex = 0x7f02013c;
}
public static final class color {
private color() {}
public static final int notification_action_color_filter = 0x7f04003f;
public static final int notification_icon_bg_color = 0x7f040040;
public static final int ripple_material_light = 0x7f04004a;
public static final int secondary_text_default_material_light = 0x7f04004c;
}
public static final class dimen {
private dimen() {}
public static final int compat_button_inset_horizontal_material = 0x7f05004b;
public static final int compat_button_inset_vertical_material = 0x7f05004c;
public static final int compat_button_padding_horizontal_material = 0x7f05004d;
public static final int compat_button_padding_vertical_material = 0x7f05004e;
public static final int compat_control_corner_material = 0x7f05004f;
public static final int compat_notification_large_icon_max_height = 0x7f050050;
public static final int compat_notification_large_icon_max_width = 0x7f050051;
public static final int notification_action_icon_size = 0x7f05005b;
public static final int notification_action_text_size = 0x7f05005c;
public static final int notification_big_circle_margin = 0x7f05005d;
public static final int notification_content_margin_start = 0x7f05005e;
public static final int notification_large_icon_height = 0x7f05005f;
public static final int notification_large_icon_width = 0x7f050060;
public static final int notification_main_column_padding_top = 0x7f050061;
public static final int notification_media_narrow_margin = 0x7f050062;
public static final int notification_right_icon_size = 0x7f050063;
public static final int notification_right_side_padding_top = 0x7f050064;
public static final int notification_small_icon_background_padding = 0x7f050065;
public static final int notification_small_icon_size_as_large = 0x7f050066;
public static final int notification_subtext_size = 0x7f050067;
public static final int notification_top_pad = 0x7f050068;
public static final int notification_top_pad_large_text = 0x7f050069;
}
public static final class drawable {
private drawable() {}
public static final int notification_action_background = 0x7f060055;
public static final int notification_bg = 0x7f060056;
public static final int notification_bg_low = 0x7f060057;
public static final int notification_bg_low_normal = 0x7f060058;
public static final int notification_bg_low_pressed = 0x7f060059;
public static final int notification_bg_normal = 0x7f06005a;
public static final int notification_bg_normal_pressed = 0x7f06005b;
public static final int notification_icon_background = 0x7f06005c;
public static final int notification_template_icon_bg = 0x7f06005d;
public static final int notification_template_icon_low_bg = 0x7f06005e;
public static final int notification_tile_bg = 0x7f06005f;
public static final int notify_panel_notification_icon_bg = 0x7f060060;
}
public static final class id {
private id() {}
public static final int action_container = 0x7f07000d;
public static final int action_divider = 0x7f07000f;
public static final int action_image = 0x7f070010;
public static final int action_text = 0x7f070016;
public static final int actions = 0x7f070017;
public static final int async = 0x7f07001d;
public static final int blocking = 0x7f070020;
public static final int chronometer = 0x7f07002c;
public static final int forever = 0x7f070040;
public static final int icon = 0x7f070046;
public static final int icon_group = 0x7f070047;
public static final int info = 0x7f07004b;
public static final int italic = 0x7f07004d;
public static final int line1 = 0x7f07004f;
public static final int line3 = 0x7f070050;
public static final int normal = 0x7f070058;
public static final int notification_background = 0x7f070059;
public static final int notification_main_column = 0x7f07005a;
public static final int notification_main_column_container = 0x7f07005b;
public static final int right_icon = 0x7f070064;
public static final int right_side = 0x7f070065;
public static final int tag_transition_group = 0x7f070085;
public static final int tag_unhandled_key_event_manager = 0x7f070086;
public static final int tag_unhandled_key_listeners = 0x7f070087;
public static final int text = 0x7f070088;
public static final int text2 = 0x7f070089;
public static final int time = 0x7f07008c;
public static final int title = 0x7f07008d;
}
public static final class integer {
private integer() {}
public static final int status_bar_notification_info_maxnum = 0x7f080004;
}
public static final class layout {
private layout() {}
public static final int notification_action = 0x7f09001d;
public static final int notification_action_tombstone = 0x7f09001e;
public static final int notification_template_custom_big = 0x7f09001f;
public static final int notification_template_icon_group = 0x7f090020;
public static final int notification_template_part_chronometer = 0x7f090021;
public static final int notification_template_part_time = 0x7f090022;
}
public static final class string {
private string() {}
public static final int status_bar_notification_info_overflow = 0x7f0b002c;
}
public static final class style {
private style() {}
public static final int TextAppearance_Compat_Notification = 0x7f0c00ec;
public static final int TextAppearance_Compat_Notification_Info = 0x7f0c00ed;
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f0c00ee;
public static final int TextAppearance_Compat_Notification_Time = 0x7f0c00ef;
public static final int TextAppearance_Compat_Notification_Title = 0x7f0c00f0;
public static final int Widget_Compat_NotificationActionContainer = 0x7f0c0158;
public static final int Widget_Compat_NotificationActionText = 0x7f0c0159;
}
public static final class styleable {
private styleable() {}
public static final int[] ColorStateListItem = { 0x10101a5, 0x101031f, 0x7f020027 };
public static final int ColorStateListItem_android_color = 0;
public static final int ColorStateListItem_android_alpha = 1;
public static final int ColorStateListItem_alpha = 2;
public static final int[] FontFamily = { 0x7f02007c, 0x7f02007d, 0x7f02007e, 0x7f02007f, 0x7f020080, 0x7f020081 };
public static final int FontFamily_fontProviderAuthority = 0;
public static final int FontFamily_fontProviderCerts = 1;
public static final int FontFamily_fontProviderFetchStrategy = 2;
public static final int FontFamily_fontProviderFetchTimeout = 3;
public static final int FontFamily_fontProviderPackage = 4;
public static final int FontFamily_fontProviderQuery = 5;
public static final int[] FontFamilyFont = { 0x1010532, 0x1010533, 0x101053f, 0x101056f, 0x1010570, 0x7f02007a, 0x7f020082, 0x7f020083, 0x7f020084, 0x7f02013c };
public static final int FontFamilyFont_android_font = 0;
public static final int FontFamilyFont_android_fontWeight = 1;
public static final int FontFamilyFont_android_fontStyle = 2;
public static final int FontFamilyFont_android_ttcIndex = 3;
public static final int FontFamilyFont_android_fontVariationSettings = 4;
public static final int FontFamilyFont_font = 5;
public static final int FontFamilyFont_fontStyle = 6;
public static final int FontFamilyFont_fontVariationSettings = 7;
public static final int FontFamilyFont_fontWeight = 8;
public static final int FontFamilyFont_ttcIndex = 9;
public static final int[] GradientColor = { 0x101019d, 0x101019e, 0x10101a1, 0x10101a2, 0x10101a3, 0x10101a4, 0x1010201, 0x101020b, 0x1010510, 0x1010511, 0x1010512, 0x1010513 };
public static final int GradientColor_android_startColor = 0;
public static final int GradientColor_android_endColor = 1;
public static final int GradientColor_android_type = 2;
public static final int GradientColor_android_centerX = 3;
public static final int GradientColor_android_centerY = 4;
public static final int GradientColor_android_gradientRadius = 5;
public static final int GradientColor_android_tileMode = 6;
public static final int GradientColor_android_centerColor = 7;
public static final int GradientColor_android_startX = 8;
public static final int GradientColor_android_startY = 9;
public static final int GradientColor_android_endX = 10;
public static final int GradientColor_android_endY = 11;
public static final int[] GradientColorItem = { 0x10101a5, 0x1010514 };
public static final int GradientColorItem_android_color = 0;
public static final int GradientColorItem_android_offset = 1;
}
}
| [
"pfariasmunoz@gmail.com"
] | pfariasmunoz@gmail.com |
16bfbdab0ff6a92e480d67adf44d7dc6c55a0251 | ca0e9689023cc9998c7f24b9e0532261fd976e0e | /src/com/tencent/mm/sdk/platformtools/bo.java | 46ec6514c4363ca78fbf009b53476da2a94061f7 | [] | no_license | honeyflyfish/com.tencent.mm | c7e992f51070f6ac5e9c05e9a2babd7b712cf713 | ce6e605ff98164359a7073ab9a62a3f3101b8c34 | refs/heads/master | 2020-03-28T15:42:52.284117 | 2016-07-19T16:33:30 | 2016-07-19T16:33:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 616 | java | package com.tencent.mm.sdk.platformtools;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
final class bo
implements View.OnTouchListener
{
public final boolean onTouch(View paramView, MotionEvent paramMotionEvent)
{
switch (paramMotionEvent.getAction())
{
}
for (;;)
{
return false;
paramView.post(new bp(this, paramView));
continue;
paramView.setPressed(true);
}
}
}
/* Location:
* Qualified Name: com.tencent.mm.sdk.platformtools.bo
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
8083776a7848e8571d3767db46b3d46ade4bd8e5 | 62c818da788f24e490831fa2152fa9b7de360744 | /BookHome/src/views/Trans.java | 6418b8857a5ee264ee2942881c5251dadc84aa2d | [] | no_license | guanking/LR | 4612dadebac8c2402f04c5cb2439b7d721f2eb8d | cd8c1d3fea89931332f557392bf48ac54ade8d0c | refs/heads/master | 2021-05-05T16:01:08.051954 | 2018-01-13T13:42:09 | 2018-01-13T13:42:09 | 117,329,644 | 1 | 0 | null | null | null | null | GB18030 | Java | false | false | 10,712 | java | package views;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedList;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.filechooser.FileFilter;
import control.AbstractTranslation;
import control.DDDirTranslation;
import control.DDFileTranslation;
import control.DirTranslation;
import control.FileTranslation;
import control.QTDirTranslation;
import control.QTFileTranslation;
import control.TXDirTranslation;
import control.TXFileTranslation;
public class Trans extends JFrame {
public static final String TXFile = "TXFile", TXDir = "TXDir",
DDFile = "DDFile", DDDir = "DDDir", QTFile = "QTFile",
QTDir = "QTDir";
private String dirPath;
private HashMap<String, MyTextFiled> texts = new HashMap<String, MyTextFiled>();
private HashMap<String, MyButton> buttons = new HashMap<String, MyButton>();
private HashMap<String, MyButton> trans = new HashMap<String, MyButton>();
public Trans() {
// TODO Auto-generated constructor stub
this.setSize(800, 500);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setResizable(false);
this.setTitle("书房代码转化工具");
this.setLocationRelativeTo(null);
this.texts.put(TXFile, new MyTextFiled());
this.texts.put(TXDir, new MyTextFiled());
this.texts.put(DDFile, new MyTextFiled());
this.texts.put(DDDir, new MyTextFiled());
this.texts.put(QTFile, new MyTextFiled());
this.texts.put(QTDir, new MyTextFiled());
this.buttons.put(TXFile, new MyButton("选择文件", buttonClick, TXFile));
this.buttons.put(TXDir, new MyButton("选择文件夹", buttonClick, TXDir));
this.buttons.put(DDFile, new MyButton("选择文件", buttonClick, DDFile));
this.buttons.put(DDDir, new MyButton("选择文件夹", buttonClick, DDDir));
this.buttons.put(QTFile, new MyButton("选择文件", buttonClick, QTFile));
this.buttons.put(QTDir, new MyButton("选择文件夹", buttonClick, QTDir));
this.trans.put(TXFile, new MyButton("转化", transClick, TXFile));
this.trans.put(TXDir, new MyButton("批量转化", transClick, TXDir));
this.trans.put(DDFile, new MyButton("转化", transClick, DDFile));
this.trans.put(DDDir, new MyButton("批量转化", transClick, DDDir));
this.trans.put(QTFile, new MyButton("转化", transClick, QTFile));
this.trans.put(QTDir, new MyButton("批量转化", transClick, QTDir));
try {
Image image = ImageIO.read(new File("images/icon.png"));
this.setIconImage(image);
ImageIcon background = new ImageIcon("images\\background.png");
JLabel label = new JLabel(background);
label.setBounds(0, 0, 850, 650);
this.getLayeredPane().add(label, new Integer(Integer.MIN_VALUE));
((JPanel) this.getContentPane()).setOpaque(false);
} catch (IOException e) {
e.printStackTrace();
}
this.add(new MyLabel("书房代码转化工具").getTitle(), BorderLayout.NORTH);
this.add(leftPanel(), BorderLayout.WEST);
this.add(centerPanel(), BorderLayout.CENTER);
this.setVisible(true);
}
private JPanel leftPanel() {
JPanel panel = new JPanel(new GridLayout(3, 1));
panel.setOpaque(false);
JLabel label = new MyLabel("一、腾讯项目").getRegLabel();
JPanel tempPanel = new JPanel(new FlowLayout());
tempPanel.add(label);
tempPanel.setOpaque(false);
panel.add(tempPanel);
label = new MyLabel("二、当当项目").getRegLabel();
tempPanel = new JPanel(new FlowLayout());
tempPanel.add(label);
tempPanel.setOpaque(false);
panel.add(tempPanel);
label = new MyLabel("三、其他项目").getRegLabel();
tempPanel = new JPanel(new FlowLayout());
tempPanel.setOpaque(false);
tempPanel.add(label);
panel.add(tempPanel);
return panel;
}
private JPanel centerPanel() {
JPanel panel = new JPanel(new GridLayout(3, 1));
panel.setOpaque(false);
/* TX */
JPanel subPanel = getCenterSubPanel();
JPanel temp = new JPanel(new FlowLayout(FlowLayout.LEFT));
temp.setOpaque(false);
temp.add(buttons.get(TXFile));
temp.add(texts.get(TXFile));
temp.add(trans.get(TXFile));
subPanel.add(temp);
temp = new JPanel(new FlowLayout(FlowLayout.LEFT));
temp.setOpaque(false);
temp.add(buttons.get(TXDir));
temp.add(texts.get(TXDir));
temp.add(trans.get(TXDir));
subPanel.add(temp);
panel.add(subPanel);
/* DD */
subPanel = getCenterSubPanel();
temp = new JPanel(new FlowLayout(FlowLayout.LEFT));
temp.setOpaque(false);
temp.add(buttons.get(DDFile));
temp.add(texts.get(DDFile));
temp.add(trans.get(DDFile));
subPanel.add(temp);
temp = new JPanel(new FlowLayout(FlowLayout.LEFT));
temp.setOpaque(false);
temp.add(buttons.get(DDDir));
temp.add(texts.get(DDDir));
temp.add(trans.get(DDDir));
subPanel.add(temp);
panel.add(subPanel);
/* QT */
subPanel = getCenterSubPanel();
JLabel tempLabel = new JLabel();
tempLabel.setPreferredSize(new Dimension(100, 10));
temp = new JPanel(new FlowLayout(FlowLayout.LEFT));
temp.setOpaque(false);
temp.add(buttons.get(QTFile));
temp.add(texts.get(QTFile));
temp.add(trans.get(QTFile));
subPanel.add(temp);
temp = new JPanel(new FlowLayout(FlowLayout.LEFT));
temp.setOpaque(false);
temp.add(buttons.get(QTDir));
temp.add(texts.get(QTDir));
tempLabel = new JLabel();
tempLabel.setPreferredSize(new Dimension(100, 10));
temp.add(trans.get(QTDir));
subPanel.add(temp);
panel.add(subPanel);
return panel;
}
private JPanel getCenterSubPanel() {
JPanel panel = new JPanel(new GridLayout(2, 1));
panel.setOpaque(false);
return panel;
}
public static void main(String[] args) {
new Trans();
}
private ActionListener buttonClick = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String name = ((JButton) e.getSource()).getName();
String text;
if (name.endsWith("File")) {
text = getFileChoice();
} else {
text = getDirChoice();
}
Trans.this.texts.get(name).setText(text);
}
};
ActionListener transClick = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
String name = ((JButton) e.getSource()).getName();
String text = Trans.this.texts.get(name).getText();
if (text.equals("")) {
JOptionPane.showConfirmDialog(null, "请选择文件");
return;
} else {
switch (name) {
case TXFile:
(new Thread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
State d = new State(Trans.this);
String path = Trans.this.texts.get(TXFile)
.getText();
FileTranslation tr = new TXFileTranslation(path);
tr.setState(d);
new Thread(tr).start();
d.show();
}
})).start();
break;
case DDFile:
(new Thread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
State d = new State(Trans.this);
String path = Trans.this.texts.get(DDFile)
.getText();
FileTranslation tr = new DDFileTranslation(path);
tr.setState(d);
new Thread(tr).start();
d.show();
}
})).start();
break;
case QTFile:
new MyFrame(Trans.this, Trans.this.texts.get(QTFile)
.getText());
Trans.this.setEnabled(false);
break;
case TXDir:
new Thread(new Runnable() {
public void run() {
State d = new State(Trans.this);
String path = Trans.this.texts.get(TXDir).getText();
TXDirTranslation tr = new TXDirTranslation(path);
tr.setState(d);
new Thread(tr).start();
d.show();
}
}).start();
break;
case DDDir:
new Thread(new Runnable() {
public void run() {
State d = new State(Trans.this);
String path = Trans.this.texts.get(DDDir).getText();
DDDirTranslation tr = new DDDirTranslation(path);
tr.setState(d);
new Thread(tr).start();
d.show();
}
}).start();
break;
case QTDir:
new MyFrame(Trans.this, Trans.this.texts.get(QTDir)
.getText());
Trans.this.setEnabled(false);
break;
default:
JOptionPane.showConfirmDialog(null, "未匹配的标签名字 :" + name);
}
}
}
};
public void transQTFile(final LinkedList<LinkedList<String>> rules,
final boolean isFile) {
new Thread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
State d = new State(Trans.this);
String path = null;
AbstractTranslation tr = null;
if (isFile) {
path = Trans.this.texts.get(QTFile).getText();
tr = new QTFileTranslation(path, rules);
} else {
path = Trans.this.texts.get(QTDir).getText();
tr = new QTDirTranslation(path, rules);
}
tr.setState(d);
new Thread(tr).start();
d.show();
}
}).start();
}
private String getFileChoice() {
JFileChooser fileChoose = new JFileChooser();
fileChoose.setDialogTitle("选择文件");
fileChoose.setFont(MyLabel.font);
if (dirPath != null) {
fileChoose.setSelectedFile(new File(dirPath));
}
fileChoose.setFileFilter(new FileFilter() {
@Override
public String getDescription() {
return "*.epub";
}
@Override
public boolean accept(File f) {
return f.isDirectory() ? true : f.getName().endsWith(".epub");
}
});
fileChoose.showOpenDialog(null);
File file = fileChoose.getSelectedFile();
if (file != null) {
return file.getAbsolutePath();
} else {
JOptionPane.showConfirmDialog(null, "您未选择任何文件!");
return null;
}
}
private String getDirChoice() {
JFileChooser fileChoose = new JFileChooser();
fileChoose.setDialogTitle("选择文件夹");
fileChoose.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
fileChoose.setFont(MyLabel.font);
if (dirPath != null) {
fileChoose.setSelectedFile(new File(dirPath));
}
fileChoose.setFileFilter(new FileFilter() {
@Override
public String getDescription() {
return "*.dir";
}
@Override
public boolean accept(File f) {
return f.isDirectory();
}
});
fileChoose.showOpenDialog(null);
File file = fileChoose.getSelectedFile();
if (file != null) {
return file.getAbsolutePath();
} else {
JOptionPane.showConfirmDialog(null, "您未选择任何文件!");
return null;
}
}
}
| [
"guanking19@126.com"
] | guanking19@126.com |
718bd6042cc7fac8f37715baa86691a10e829ae5 | bb12ac447b03e21b2244a8bfb78dbe582e36c9ca | /rdf-patch/src/main/java/org/seaborne/patch/items/TxnBegin.java | c1169e9d268c99e249f3d456781d914091d112c6 | [
"Apache-2.0"
] | permissive | darrengarvey/rdf-delta | 315ac65c894b04820319744544f5e5898681d43f | 6d862e7f31cc838af6cf8c03d1dab98aaaaff839 | refs/heads/master | 2022-12-24T07:42:33.474883 | 2020-04-25T09:56:27 | 2020-04-25T09:56:27 | 275,591,612 | 0 | 0 | Apache-2.0 | 2020-06-28T13:33:23 | 2020-06-28T13:33:23 | null | UTF-8 | Java | false | false | 940 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*/
package org.seaborne.patch.items;
public class TxnBegin extends ChangeItem {
@Override
public int hashCode() {
return 15;
}
@Override
public boolean equals(Object other) {
return other instanceof TxnBegin;
}
}
| [
"andy@seaborne.org"
] | andy@seaborne.org |
ca32edbb42be4a803981959c97617ecf15a48cc2 | 8deb1dbdfb807cf3b22cba092bbdac8fb490ce9c | /src/java/cyr7/cfg/ir/opt/CopyPropagationOptimization.java | 8eab561863e1a5082d38b2e09a0d89231af810ea | [] | no_license | anthonyyangdev/cowabungaPlus | 0b98a14e642a07ab86693d389d75f72d5bbdc530 | 421ad6e0e0e5bb10d7f6bfe1d2640eb74143a538 | refs/heads/master | 2023-01-22T15:48:55.286393 | 2020-12-09T15:51:59 | 2020-12-09T15:51:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,836 | java | package cyr7.cfg.ir.opt;
import java.util.ArrayDeque;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
import java.util.stream.Collectors;
import cyr7.cfg.ir.dfa.CopyPropagationAnalysis;
import cyr7.cfg.ir.dfa.CopyPropagationAnalysis.CopyPropLattice;
import cyr7.cfg.ir.dfa.WorklistAnalysis;
import cyr7.cfg.ir.nodes.CFGBlockNode;
import cyr7.cfg.ir.nodes.CFGCallNode;
import cyr7.cfg.ir.nodes.CFGIfNode;
import cyr7.cfg.ir.nodes.CFGMemAssignNode;
import cyr7.cfg.ir.nodes.CFGNode;
import cyr7.cfg.ir.nodes.CFGReturnNode;
import cyr7.cfg.ir.nodes.CFGSelfLoopNode;
import cyr7.cfg.ir.nodes.CFGStartNode;
import cyr7.cfg.ir.nodes.CFGStubNode;
import cyr7.cfg.ir.nodes.CFGVarAssignNode;
import cyr7.cfg.ir.visitor.IrCFGVisitor;
import cyr7.ir.nodes.IRCallStmt;
import cyr7.ir.nodes.IRExpr;
public class CopyPropagationOptimization {
private CopyPropagationOptimization() {}
/**
* Performs one passing of copy propagation.
* <p>
* Generally, if copies of variables/temporariess are available for
* a variable {@code x}, then {@code x} is replaced with the variable
* in the set of copies with the earliest definition.
* <p>
* @param start The {@link CFGStartNode start} node of the IR CFG.
* @return The same {@code start} node, but the CFG has been optimized with
* one passing of copy propagation.
*/
public static CFGStartNode optimize(CFGNode start) {
// Mapping from CFGNode to the out lattices.
CFGStartNode startNode = (CFGStartNode)start;
final var visitor = new CFGVarReplacementVisitor(
WorklistAnalysis.analyze((CFGStartNode)start,
CopyPropagationAnalysis.INSTANCE).in());
Set<CFGNode> visited = new HashSet<>();
Queue<CFGNode> nextNodes = new ArrayDeque<>();
nextNodes.add(start);
while (!nextNodes.isEmpty()) {
var next = nextNodes.remove();
// Replaces variables with copies in the mapping,
// and updates the neighboring edges.
next.accept(visitor);
visited.add(next);
for (CFGNode out: next.out()) {
if (!visited.contains(out) && !nextNodes.contains(out)) {
nextNodes.add(out);
}
}
}
return startNode;
}
private static class CFGVarReplacementVisitor
implements IrCFGVisitor<CFGNode> {
private Map<CFGNode, CopyPropLattice> result;
public CFGVarReplacementVisitor(Map<CFGNode, CopyPropLattice> result) {
this.result = Collections.unmodifiableMap(result);
}
@Override
public CFGNode visit(CFGCallNode n) {
final var lattice = this.result.get(n);
final List<IRExpr> args = n.call.args().stream().map(arg -> {
return IRTempReplacer.replace(arg, lattice.copies);
}).collect(Collectors.toList());
final var call = new IRCallStmt(n.location(), n.call.collectors(),
n.call.target(), args);
n.call = call;
n.refreshDfaSets();
return n;
}
@Override
public CFGNode visit(CFGIfNode n) {
// For copy propagation, true and false are the same.
final var lattice = this.result.get(n);
final var condition = IRTempReplacer.replace(n.cond, lattice.copies);
n.cond = condition;
n.refreshDfaSets();
return n;
}
@Override
public CFGNode visit(CFGVarAssignNode n) {
final var lattice = this.result.get(n);
final var value = IRTempReplacer.replace(n.value, lattice.copies);
n.value = value;
n.refreshDfaSets();
return n;
}
@Override
public CFGNode visit(CFGMemAssignNode n) {
final var lattice = this.result.get(n);
final var value = IRTempReplacer.replace(n.value, lattice.copies);
final var mem = IRTempReplacer.replace(n.target, lattice.copies);
n.value = value;
n.target = mem;
n.refreshDfaSets();
return n;
}
@Override
public CFGNode visit(CFGBlockNode n) {
final var lattice = new HashMap<>(this.result.get(n).copies);
n.block = new CFGBlockVarReplacementVisitor(lattice, n).replaceBlock();
n.refreshDfaSets();
return n;
}
@Override
public CFGNode visit(CFGReturnNode n) {
return n;
}
@Override
public CFGNode visit(CFGStartNode n) {
return n;
}
@Override
public CFGNode visit(CFGSelfLoopNode n) {
return n;
}
private static class CFGBlockVarReplacementVisitor implements IrCFGVisitor<CFGNode> {
private final Map<String, String> copies;
private final CFGNode topNode;
public CFGBlockVarReplacementVisitor(Map<String, String> copies, CFGBlockNode node) {
this.copies = new HashMap<>(copies);
this.topNode = node.block;
}
public CFGNode replaceBlock() {
var nextNode = topNode;
while (!(nextNode instanceof CFGStubNode)) {
nextNode = nextNode.accept(this);
}
return topNode;
}
@Override
public CFGNode visit(CFGCallNode n) {
final var updatedArgs = n.call.args().stream().map(arg -> {
return IRTempReplacer.replace(arg, copies);
}).collect(Collectors.toList());
n.call = new IRCallStmt(n.location(),
n.call.collectors(), n.call.target(), updatedArgs);
n.refreshDfaSets();
copies.keySet().removeAll(n.call.collectors());
copies.values().removeAll(n.call.collectors());
return n.outNode();
}
@Override
public CFGNode visit(CFGVarAssignNode n) {
n.value = IRTempReplacer.replace(n.value, copies);
n.refreshDfaSets();
copies.keySet().removeAll(n.kills());
copies.values().removeAll(n.kills());
copies.putAll(n.gens());
return n.outNode();
}
@Override
public CFGNode visit(CFGMemAssignNode n) {
n.target = IRTempReplacer.replace(n.target, copies);
n.value = IRTempReplacer.replace(n.value, copies);
n.refreshDfaSets();
copies.keySet().removeAll(n.kills());
copies.values().removeAll(n.kills());
return n.outNode();
}
@Override
public CFGNode visit(CFGReturnNode n) {
throw new AssertionError("Node not allowed in block");
}
@Override
public CFGNode visit(CFGStartNode n) {
throw new AssertionError("Node not allowed in block");
}
@Override
public CFGNode visit(CFGSelfLoopNode n) {
throw new AssertionError("Node not allowed in block");
}
@Override
public CFGNode visit(CFGBlockNode n) {
throw new AssertionError("Node not allowed in block");
}
@Override
public CFGNode visit(CFGIfNode n) {
throw new AssertionError("Node not allowed in block");
}
}
}
}
| [
"ay339@cornell.edu"
] | ay339@cornell.edu |
fadcce5565c678ac9d4a9e96c62c1f90315abd23 | e0f920f3fd95499eafaacddbc6fed948d26c275a | /src/main/java/guru/springframework/config/GreetingServiceConfig.java | fc700aa4a22f2d417e6f1e713cbcfb154ca1930d | [] | no_license | tomskr/di-demo | 70f25a05ef2f27f4bf8207971754f7348b8aa14d | 29de9ddad1fbc77073cac41342cfaa6303bbef6d | refs/heads/master | 2020-04-21T19:29:35.483107 | 2019-02-09T16:16:42 | 2019-02-09T16:16:42 | 169,608,293 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,297 | java | package guru.springframework.config;
import guru.springframework.services.GreetingRepository;
import guru.springframework.services.GreetingService;
import guru.springframework.services.GreetingServiceFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Profile;
@Configuration
public class GreetingServiceConfig {
@Bean
GreetingServiceFactory greetingServiceFactory(GreetingRepository repository) {
return new GreetingServiceFactory(repository);
}
@Bean
@Primary
@Profile({"default", "en"})
GreetingService primaryGreetingService(GreetingServiceFactory greetingServiceFactory) {
return greetingServiceFactory.createGreetingService("en");
}
@Bean
@Primary
@Profile({"es"})
GreetingService primarySpanishGreetingService(GreetingServiceFactory greetingServiceFactory) {
return greetingServiceFactory.createGreetingService("es");
}
@Bean
@Primary
@Profile({"de"})
GreetingService primaryGermanGreetingService(GreetingServiceFactory greetingServiceFactory) {
return greetingServiceFactory.createGreetingService("de");
}
}
| [
"tomas14@uia.no"
] | tomas14@uia.no |
ef5a06aa258cb9226905dbac72af8abe90ed5119 | 5e8bd07aaa697aabf847a88b897c89414e6ef184 | /RCT-Dashboard/src/main/java/org/nesc/ecbd/mapper/RDBAnalyzeProvider.java | 9aa4212f3ba58658aa634aee68b2323be653ebb2 | [
"Apache-2.0"
] | permissive | Diffblue-benchmarks/RCT | 18591f1c9696603a5ea1ef35217a0a2aa45e57c7 | 262d6c25348716fea293400b43c77d5126527475 | refs/heads/master | 2020-05-20T15:09:26.169691 | 2019-04-12T00:43:21 | 2019-04-12T00:43:21 | 185,636,983 | 0 | 0 | Apache-2.0 | 2019-05-16T09:56:53 | 2019-05-08T15:50:17 | Java | UTF-8 | Java | false | false | 922 | java | package org.nesc.ecbd.mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.jdbc.SQL;
import org.nesc.ecbd.entity.RDBAnalyze;
/**
* @author kz37
* @version 1.0.0
*/
public class RDBAnalyzeProvider extends SQL {
private static final String TABLE_NAME = "rdb_analyze";
public String updateRdbAnalyze(@Param("rdbAnalyze") RDBAnalyze rdbAnalyze) {
return new SQL(){{
UPDATE(TABLE_NAME);
SET("auto_analyze = #{rdbAnalyze.autoAnalyze}");
SET("schedule = #{rdbAnalyze.schedule}");
SET("dataPath = #{rdbAnalyze.dataPath}");
SET("prefixes = #{rdbAnalyze.prefixes}");
SET("is_report = #{rdbAnalyze.report}");
SET("mailTo = #{rdbAnalyze.mailTo}");
SET("analyzer = #{rdbAnalyze.analyzer}");
WHERE("id = #{rdbAnalyze.id}");
}}.toString();
}
}
| [
"truman.p.du@gmail.com"
] | truman.p.du@gmail.com |
12d322759307e431809b33d37fa04b68427ea51f | 006c06f5cd5547b318e157ac1a3b1fc2484a3cb8 | /src/main/java/proxyfactory/proxyfactory/OracleDepartmentImpl.java | daf2aaae4029c52825845eeba203acc2c1e26155 | [] | no_license | hanzhonghua/design | 9e13765666804938320e8d9db83b817ad3d65068 | 4c618c8021514683db76a5fc6f07002a38dc3639 | refs/heads/master | 2022-07-17T22:17:48.761293 | 2020-10-13T03:00:46 | 2020-10-13T03:00:46 | 75,720,639 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 393 | java | package proxyfactory.proxyfactory;
public class OracleDepartmentImpl implements IDepartment {
private Department d;
@Override
public void insert(Department d) {
System.out.println("使用oracle添加一条Department");
}
@Override
public Department getDepartment(String id) {
System.out.println("使用oracle根据id查询一条Department");
return d;
}
}
| [
"hzh199094@163.com"
] | hzh199094@163.com |
c073f145a89476edfdf69cc322471f7420cd5421 | 48ac664bce121ff4280098457f84ac16ee8fca54 | /Labs/Objective9Lab5.java | a9c0544437ff923f501e9024f6cc5a137d892e33 | [] | no_license | A-Hanson/SDPre | 01a56068a187b1192305ac49baba4a3363387089 | 93e38cc108eeaf8bc895af6d586f9e8145859e1b | refs/heads/main | 2023-02-11T15:57:50.759335 | 2021-01-05T14:52:02 | 2021-01-05T14:52:02 | 324,234,462 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,689 | java | import java.util.Scanner;
public class Objective9Lab5 {
public static void main(String[] args){
Scanner kb = new Scanner(System.in);
double num1, num2;
boolean keepGoing = true;
int choice;
double answer = 0.0;
// Prompt and store num1
System.out.println("Please enter a number: ");
num1 = kb.nextDouble();
// Prompt and store num2
System.out.println("Please enter another number: ");
num2 = kb.nextDouble();
while (keepGoing) {
printMenu();
System.out.print("Which would you like to do? ");
choice = kb.nextInt();
switch (choice){
case 1:
// sum
double sum = findSum(num1, num2);
System.out.println(num1 + " + " + num2 + " = " + sum);
break;
case 2:
// find average
double average = findAverage(num1, num2);
System.out.println("The average of " + num1 + " and " + num2 + " is: " + average);
break;
case 3:
// calculate tax
double tax = calcTax(num1, num2);
System.out.println("The amount in tax to be collected from a purchase of " + num1 + " and " + num2 + "is: " + tax);
break;
case 4:
// exit
System.out.println("You've chosen to quit");
keepGoing = false;
break;
default:
// invalid
System.out.println("Invalid entry. Please try again.");
}
}
}
public static void printMenu(){
System.out.println();
System.out.println("========= MENU =========");
System.out.println("| |");
System.out.println("| 1. Add Numbers |");
System.out.println("| 2. Find Average |");
System.out.println("| 3. Calculate Tax |");
System.out.println("| 4. Exit |");
System.out.println("| |");
System.out.println("========================");
System.out.println();
}
public static double findSum(double x, double y){
// find sum
double sum = x + y;
return sum;
}
public static double findAverage(double x, double y){
// find average
double average = findSum(x, y) / 2;
return average;
}
public static double calcTax(double x, double y){
// find tax 8.31%
double sum = findSum(x, y);
double tax = sum * 0.0831;
return tax;
}
} | [
"hansonanna1988@gmail.com"
] | hansonanna1988@gmail.com |
df2212172f5aa218f39959a7cf9ab89f03e52255 | c201effa33574cfbb9af548717d823ace286ea03 | /app/src/main/java/com/acuratechglobal/bulkbilling/application/builder/NetworkModule.java | cb6dfb0f2a2c52b420b74a64605af284ba49c8d4 | [] | no_license | VipinSingh135/BulkBilling | a9969214856e09a65d3aedb87e7e26ccd6217077 | 3a9964cf09d3486b9433a3e16e53d47f811dc247 | refs/heads/master | 2020-04-19T22:35:07.855782 | 2019-04-04T12:36:02 | 2019-04-04T12:36:02 | 168,473,141 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,197 | java | package com.acuratechglobal.bulkbilling.application.builder;
import android.content.Context;
import java.io.File;
import javax.inject.Named;
import dagger.Module;
import dagger.Provides;
import okhttp3.Cache;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import timber.log.Timber;
@Module
class NetworkModule {
@AppScope
@Provides
OkHttpClient okHttpClient(HttpLoggingInterceptor loggingInterceptor, Cache cache) {
return new OkHttpClient.Builder().addNetworkInterceptor(loggingInterceptor).cache(cache).build();
}
@AppScope
@Provides
Cache cache(Context context, @Named("OkHttpCacheDir") String cacheDir,
@Named("OkHttpCacheSize") int cacheSize) {
return new Cache(new File(context.getFilesDir(), cacheDir), cacheSize);
}
@AppScope
@Provides
@Named("OkHttpCacheDir")
String cacheDir() {
return "OkHttpCache";
}
@AppScope
@Provides
@Named("OkHttpCacheSize")
int cacheSize() {
return 10 * 1024 * 1024; //10MB cache
}
@AppScope
@Provides
HttpLoggingInterceptor httpLoggingInterceptor() {
return new HttpLoggingInterceptor(Timber::i).setLevel(HttpLoggingInterceptor.Level.BODY);
}
} | [
"vipin.singh@acuratechglobal.com"
] | vipin.singh@acuratechglobal.com |
c1989c85be6175d986d20eab5b03b83c27c7b79c | 774fa647f948c364f9c19e691e8c1e079170428f | /PluginDemo/AutoUploadDemo/src/main/java/team/hnuwt/servicesoftware/prtcplugin/packet/PacketReadMeter.java | af99a02611abafe9be9bc109fec89cb592fe2b87 | [] | no_license | cyclone1517/ServiceSoftware | eb067ac66b2c53ed992310b2904a7352d81d15aa | da1bea161e1d8ed5846e0c2b25e8795c7b13bd48 | refs/heads/trunk2 | 2022-11-20T21:11:19.113840 | 2019-05-21T05:48:25 | 2019-05-21T05:48:25 | 144,522,241 | 3 | 0 | null | 2022-11-16T11:34:45 | 2018-08-13T02:57:31 | Java | UTF-8 | Java | false | false | 3,143 | java | package team.hnuwt.servicesoftware.prtcplugin.packet;
import team.hnuwt.servicesoftware.prtcplugin.model.Meter;
import java.util.List;
public class PacketReadMeter implements Packet{
private int firstStartChar; // 起始字符
private int firstLength; // 长度
private int secondLength; // 长度
private int secondStartChar; // 起始字符
private int control; // 控制域
private long address; // 地址域
private int afn;
private int seq;
private long dataId; // 数据单元标识
private int number; // 表数量
List<Meter> meter;
private int cs;
private int endChar; // 结束字符
public int getFirstStartChar()
{
return firstStartChar;
}
public void setFirstStartChar(int firstStartChar)
{
this.firstStartChar = firstStartChar;
}
public int getFirstLength()
{
return firstLength;
}
public void setFirstLength(int firstLength)
{
this.firstLength = firstLength;
}
public int getSecondLength()
{
return secondLength;
}
public void setSecondLength(int secondLength)
{
this.secondLength = secondLength;
}
public int getSecondStartChar()
{
return secondStartChar;
}
public void setSecondStartChar(int secondStartChar)
{
this.secondStartChar = secondStartChar;
}
public int getControl()
{
return control;
}
public void setControl(int control)
{
this.control = control;
}
public long getAddress()
{
return address;
}
public void setAddress(long address)
{
this.address = address;
}
public int getAfn()
{
return afn;
}
public void setAfn(int afn)
{
this.afn = afn;
}
public int getSeq()
{
return seq;
}
public void setSeq(int seq)
{
this.seq = seq;
}
public long getDataId()
{
return dataId;
}
public void setDataId(long dataId)
{
this.dataId = dataId;
}
public int getNumber()
{
return number;
}
public void setNumber(int number)
{
this.number = number;
}
public List<Meter> getMeter()
{
return meter;
}
public void setMeter(List<Meter> meter)
{
this.meter = meter;
}
public int getCs()
{
return cs;
}
public void setCs(int cs)
{
this.cs = cs;
}
public int getEndChar()
{
return endChar;
}
public void setEndChar(int endChar)
{
this.endChar = endChar;
}
@Override
public String toString()
{
return "PacketAutoUpload [firstStartChar=" + firstStartChar + ", firstLength=" + firstLength + ", secondLength="
+ secondLength + ", secondStartChar=" + secondStartChar + ", control=" + control + ", address="
+ address + ", afn=" + afn + ", seq=" + seq + ", dataId=" + dataId + ", number=" + number + ", meter="
+ meter + ", cs=" + cs + ", endChar=" + endChar + "]";
}
}
| [
"cyl1517@yeah.net"
] | cyl1517@yeah.net |
0b90d9783fd2563c12477f2d638241d5c2f012dc | a232c5071ad741b6e3bb1c9efbfa4508a8e6a517 | /Lab09_angular_slf4j_relations_mapping/gunshop-rest/catalog-core/src/main/java/ro/ubb/catalog/core/model/validators/GunTypeValidator.java | b5484b12c943899eec1e1ffa4dc528ff05445104 | [] | no_license | VaruTudor/Systems-for-Design-and-Implementation | 02ed729113103b1336b35e78ae96fea5edd42443 | 91d57e899ca46aa9be8e83cf36377cbea1eeea4b | refs/heads/master | 2023-08-15T05:18:34.372341 | 2021-10-09T09:01:26 | 2021-10-09T09:01:26 | 375,748,935 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,640 | java | package ro.ubb.catalog.core.model.validators;
import org.springframework.stereotype.Component;
import ro.ubb.catalog.core.model.Category;
import ro.ubb.catalog.core.model.GunType;
import ro.ubb.catalog.core.model.exceptions.ValidatorException;
import ro.ubb.catalog.core.utils.Pair;
import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;
@Component
public class GunTypeValidator implements Validator<GunType> {
/**
* Validates a given GunType entity.
* @param entity - non-null
* @throws ValidatorException if entity is invalid, meaning it doesn't have: a non-null name and a non-null category.
*/
@Override
public void validate(GunType entity) throws ValidatorException
{
Predicate<String> nameIsNull = (s) -> (s==null || s.equals(""));
boolean nameNotValid = nameIsNull.test(entity.getName());
String nameNotValidMessage = "Gun Types must have a name! ";
Predicate<String> categoryIsNull = (s) -> (s==null || s.equals(""));
boolean categoryNotValid = !Arrays.asList(Category.values()).contains(entity.getCategory());
String categoryNotValidMessage = "Gun Types category is incorrect!";
List<Pair<Boolean,String>> checkList = Arrays.asList(new Pair<Boolean,String>(nameNotValid,nameNotValidMessage),
new Pair<Boolean,String>(categoryNotValid,categoryNotValidMessage));
checkList.stream()
.filter(Pair::getFirst)
.map(Pair::getSecond)
.reduce(String :: concat)
.ifPresent(s -> { throw new ValidatorException(s); });
}
}
| [
"varutudor@gmail.com"
] | varutudor@gmail.com |
9b30087a8889c2bad7a95514d2bfa2eadfb8a59c | 88b198a3def52beda25891b749f5d3c8a7d44f20 | /samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java | b535ed95846f75896e5be16352114a3642f33312 | [
"Apache-2.0"
] | permissive | weaselflink/openapi-generator | 03e92fe5d2680a04bc136e83c6c7317a6db7774d | 129fd0ad5c95b8de90ba5a6350de725a12019071 | refs/heads/master | 2022-10-05T09:13:00.427796 | 2022-05-30T09:53:26 | 2022-05-30T09:53:26 | 207,326,774 | 0 | 0 | Apache-2.0 | 2023-09-05T10:22:02 | 2019-09-09T14:18:30 | Java | UTF-8 | Java | false | false | 7,202 | java | /*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
/**
* ReadOnlyFirst
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ReadOnlyFirst {
public static final String SERIALIZED_NAME_BAR = "bar";
@SerializedName(SERIALIZED_NAME_BAR)
private String bar;
public static final String SERIALIZED_NAME_BAZ = "baz";
@SerializedName(SERIALIZED_NAME_BAZ)
private String baz;
public ReadOnlyFirst() {
}
public ReadOnlyFirst(
String bar
) {
this();
this.bar = bar;
}
/**
* Get bar
* @return bar
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
}
public ReadOnlyFirst baz(String baz) {
this.baz = baz;
return this;
}
/**
* Get baz
* @return baz
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBaz() {
return baz;
}
public void setBaz(String baz) {
this.baz = baz;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o;
return Objects.equals(this.bar, readOnlyFirst.bar) &&
Objects.equals(this.baz, readOnlyFirst.baz);
}
@Override
public int hashCode() {
return Objects.hash(bar, baz);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ReadOnlyFirst {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append(" baz: ").append(toIndentedString(baz)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
public static HashSet<String> openapiFields;
public static HashSet<String> openapiRequiredFields;
static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet<String>();
openapiFields.add("bar");
openapiFields.add("baz");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>();
}
/**
* Validates the JSON Object and throws an exception if issues found
*
* @param jsonObj JSON Object
* @throws IOException if the JSON Object is invalid with respect to ReadOnlyFirst
*/
public static void validateJsonObject(JsonObject jsonObj) throws IOException {
if (jsonObj == null) {
if (ReadOnlyFirst.openapiRequiredFields.isEmpty()) {
return;
} else { // has required fields
throw new IllegalArgumentException(String.format("The required field(s) %s in ReadOnlyFirst is not found in the empty JSON string", ReadOnlyFirst.openapiRequiredFields.toString()));
}
}
Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();
// check to see if the JSON string contains additional fields
for (Entry<String, JsonElement> entry : entries) {
if (!ReadOnlyFirst.openapiFields.contains(entry.getKey())) {
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReadOnlyFirst` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
}
}
if (jsonObj.get("bar") != null && !jsonObj.get("bar").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `bar` to be a primitive type in the JSON string but got `%s`", jsonObj.get("bar").toString()));
}
if (jsonObj.get("baz") != null && !jsonObj.get("baz").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `baz` to be a primitive type in the JSON string but got `%s`", jsonObj.get("baz").toString()));
}
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
if (!ReadOnlyFirst.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'ReadOnlyFirst' and its subtypes
}
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter<ReadOnlyFirst> thisAdapter
= gson.getDelegateAdapter(this, TypeToken.get(ReadOnlyFirst.class));
return (TypeAdapter<T>) new TypeAdapter<ReadOnlyFirst>() {
@Override
public void write(JsonWriter out, ReadOnlyFirst value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}
@Override
public ReadOnlyFirst read(JsonReader in) throws IOException {
JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
validateJsonObject(jsonObj);
return thisAdapter.fromJsonTree(jsonObj);
}
}.nullSafe();
}
}
/**
* Create an instance of ReadOnlyFirst given an JSON string
*
* @param jsonString JSON string
* @return An instance of ReadOnlyFirst
* @throws IOException if the JSON string is invalid with respect to ReadOnlyFirst
*/
public static ReadOnlyFirst fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, ReadOnlyFirst.class);
}
/**
* Convert an instance of ReadOnlyFirst to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
}
| [
"noreply@github.com"
] | noreply@github.com |
9e8af2021d220518145ded5d0f26b891e949f38d | b1ac10e2fe705b49a1dd9e1ae9990e548b08ae02 | /app/src/main/java/com/sec/health/health/UserInfoFragment.java | 892b11bb54e093855810f7ec7eb9956732996943 | [] | no_license | jelychow/Health | 5b76325d6e02dd6a77567167eb949ad1931fc3a3 | 615791de1524535681b20d39094d51cdce5a8952 | refs/heads/master | 2021-01-20T06:19:52.220667 | 2015-05-13T10:48:33 | 2015-05-13T10:48:33 | 35,177,087 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,639 | java | package com.sec.health.health;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.sec.health.health.userdata.UserDataActivity;
public class UserInfoFragment extends Fragment {
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
private TextView tv_modify;
private String mParam1;
private String mParam2;
private Intent intent;
public UserInfoFragment() {
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_user_info, container, false);
tv_modify = (TextView) view.findViewById(R.id.tv_modify);
return view;
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
tv_modify.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
intent = new Intent(getActivity(), UserDataActivity.class);
startActivity(intent);
}
});
}
}
| [
"jelychow@gmail.com"
] | jelychow@gmail.com |
c632b22faf81a67e9db82c7b522d077409fa951f | 4bd1f0bb17d75156ac28d85e129f34fb838fd409 | /src/main/java/net/lantrack/framework/core/importexport/excel/reader/Excel.java | 5e6d4c3d49f90d3690e96534c04d1012f5978114 | [] | no_license | beardlin/god-server | 87c3c9a96c9d771e3bb65bfe5cd96dda5b2c5f24 | 21bf6541311c15bb3d889773c234a8d9774fa81a | refs/heads/master | 2020-05-24T10:20:17.424669 | 2019-05-17T14:48:35 | 2019-05-17T14:48:35 | 187,226,095 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 97 | java | package net.lantrack.framework.core.importexport.excel.reader;
public abstract class Excel {
}
| [
"luoxiaolin@lantrack.net"
] | luoxiaolin@lantrack.net |
98077a7b84d08becf02d7fed714e4f226bec294a | 1d8a8987d348a7f87f20a8ad6d5669f57a23923e | /Module 15/Assignments/15.05 Assignment/src/Truck.java | 1ae9b162a3ebc02580f49d277aaecdf86a5895da | [] | no_license | ColeHud/APComputerScience | 301ef1bbe98c029a30f6782449984b920e076099 | c05e8f84f11a178a700706f47149e30807cc60b5 | refs/heads/master | 2020-04-16T05:16:57.466839 | 2015-04-27T18:28:26 | 2015-04-27T18:28:26 | 34,072,596 | 2 | 5 | null | null | null | null | UTF-8 | Java | false | false | 176 | java | /*
* By Cole Hudson
*
* Date: 3/22/2015
*
* PMR in README.txt
*/
public class Truck extends Vehicle
{
Truck(String name, double cost)
{
super(name, cost);
}
}
| [
"cmhudson11@gmail.com"
] | cmhudson11@gmail.com |
27cbfeea73585340dc10754450d76f74232edf3b | f2abe2ffc661166dbae0d3b6168eb4a834c1724d | /spring/Qualifier/src/umapath/net/App.java | c9efda349ec8918b820f1c20216896ef775166fb | [] | no_license | prashantas/mySpring | 9feff276d89dd3936728be1d5d52ed33f027b6b3 | 1792f43b1ade1e89153f7d1e67761d2b566e063a | refs/heads/master | 2021-01-20T21:03:03.375350 | 2016-06-23T15:51:11 | 2016-06-23T15:51:11 | 61,817,515 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 758 | java | package umapath.net;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class App {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
ApplicationContext context = new ClassPathXmlApplicationContext("Beans.xml");
Profile profile = (Profile) context.getBean("profile");
ApplicationContext ctx = new AnnotationConfigApplicationContext(ProfileConfig.class);
Profile profile1 = (Profile) context.getBean("profile");
profile1.printAge();
profile.printName();
System.out.println(profile.isame());
}
}
| [
"prashanta.tezu@gmail.com"
] | prashanta.tezu@gmail.com |
58e508ae0a207316bc6d17f27f6dbeb581f1af83 | 455fccd8afb982c7980f0b73340bd6b79b9ce2e5 | /HonchiAndroid/app/src/main/java/com/honchipay/honchi_android/chat/model/socket/GetPriceRequest.java | 746a1bd391751a233d45c26e862d627569b95fa9 | [] | no_license | Honchi-Pay/Honchi-Android | 5d3fb6628e447b841b84fe6dda1eb63eb6cff497 | c95a8ea92a61dbc71f50d6d1538493aa6ac0564a | refs/heads/main | 2023-04-10T00:40:41.564834 | 2021-04-17T02:33:17 | 2021-04-17T02:33:17 | 303,878,456 | 0 | 1 | null | 2020-12-11T02:53:11 | 2020-10-14T02:12:01 | Java | UTF-8 | Java | false | false | 268 | java | package com.honchipay.honchi_android.chat.model.socket;
public class GetPriceRequest {
private String chatId;
private Integer price;
public GetPriceRequest(String chatId, Integer price) {
this.chatId = chatId;
this.price = price;
}
}
| [
"sirasatarato@gmail.com"
] | sirasatarato@gmail.com |
cd06cb855784858b75694ab83990db4a563e2a52 | 05e13c408bede78bb40cbaba237669064eddee10 | /src/main/java/com/fedex/ws/vacs/v14/NonBusinessTimeDetail.java | a81301754baef06a8c96c40da99fb3e02794e8c4 | [] | no_license | noboomu/shipping-carriers | f60ae167bd645368012df0817f0c0d54e8fff616 | 74b2a7b37ac36fe2ea16b4f79f2fb0f69113e0f6 | refs/heads/master | 2023-05-07T08:54:31.217066 | 2021-06-02T23:48:11 | 2021-06-02T23:48:11 | 373,320,009 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,526 | java |
package com.fedex.ws.vacs.v14;
import java.math.BigInteger;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
/**
* Specification for services performed during non-business hours and/or days.
*
* <p>Java class for NonBusinessTimeDetail complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="NonBusinessTimeDetail">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="PersonDays" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element name="PersonHours" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "NonBusinessTimeDetail", propOrder = {
"personDays",
"personHours"
})
public class NonBusinessTimeDetail {
@XmlElement(name = "PersonDays")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger personDays;
@XmlElement(name = "PersonHours")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger personHours;
/**
* Gets the value of the personDays property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getPersonDays() {
return personDays;
}
/**
* Sets the value of the personDays property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setPersonDays(BigInteger value) {
this.personDays = value;
}
/**
* Gets the value of the personHours property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getPersonHours() {
return personHours;
}
/**
* Sets the value of the personHours property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setPersonHours(BigInteger value) {
this.personHours = value;
}
}
| [
"bauer.j@gmail.com"
] | bauer.j@gmail.com |
0e73e29fe0c1e7f0d803fa3dd8fc9411f56ffa22 | 2986dc4fc2533469f28022a5add52ef393449355 | /src/main/java/phamnguyen/com/vn/config/AppInitializer.java | 462eb19d66034c0be0d64aaf694079c4826dca53 | [] | no_license | gnpham/QuanLyThietBi | c97f116c252637db474777e10889c8722c820d1e | 404a62b6a0c7e848bdd4b2779ffdaa90d7bd6dad | refs/heads/master | 2020-12-03T01:49:15.178919 | 2017-06-30T09:43:33 | 2017-06-30T09:43:33 | 95,870,151 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 963 | java | package phamnguyen.com.vn.config;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;
public class AppInitializer implements WebApplicationInitializer {
public void onStartup(ServletContext servletContext) throws ServletException {
// TODO Auto-generated method stub
AnnotationConfigWebApplicationContext appContext = new AnnotationConfigWebApplicationContext();
appContext.register(AppConfig.class);
ServletRegistration.Dynamic dispatcher = servletContext.addServlet("SpringDispatcher",
new DispatcherServlet(appContext));
dispatcher.addMapping("/");
dispatcher.setLoadOnStartup(1);
dispatcher.setInitParameter("contextClass", servletContext.getClass().getName());
}
}
| [
"tayanninh18@gmail.com"
] | tayanninh18@gmail.com |
7ae75ea3249e72148551b4539047ef798617a451 | 218f726aa4f72c33cd87ace201b45e664a77a26e | /src/main/java/com/example/boot/redis/RedisConfig.java | 71c252359f22b2c7c9ad8c4aca54c783501a7a82 | [] | no_license | GitJanus/boot | 5de183aed9cd17f0ce4d6edf269788f9d524b45d | b5c537008cb4959751babe0ee8544f85e943e656 | refs/heads/master | 2022-12-23T08:45:54.215776 | 2020-10-29T09:38:37 | 2020-10-29T09:38:37 | 160,149,217 | 0 | 0 | null | 2022-12-10T06:07:52 | 2018-12-03T07:23:32 | Java | UTF-8 | Java | false | false | 1,564 | java | package com.example.boot.redis;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
@Configuration
public class RedisConfig {
@Bean
public RedisTemplate<String, MessageEntity> redisTemplate(RedisConnectionFactory factory) {
RedisTemplate<String, MessageEntity> template = new RedisTemplate<String, MessageEntity>();
template.setConnectionFactory(factory);
Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<Object>(
Object.class);
ObjectMapper om = new ObjectMapper();
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jackson2JsonRedisSerializer.setObjectMapper(om);
template.setValueSerializer(jackson2JsonRedisSerializer);
template.setKeySerializer(new StringRedisSerializer());
template.setHashKeySerializer(new StringRedisSerializer());
template.afterPropertiesSet();
return template;
}
}
| [
"zoujianan@tass.com.cn"
] | zoujianan@tass.com.cn |
4de7f0496179e3e574339e5fb982f176c0aae9eb | 9789a6832bd3bac75b0f169bb7ca97c611724492 | /ud851-Exercises-student/Lesson05a-Android-Lifecycle/T05a.02-Exercise-PersistData/app/src/main/java/com/example/android/lifecycle/MainActivity.java | 9396bde98985fcb700ae5c36022f1dc530fb3366 | [
"Apache-2.0"
] | permissive | apoorva-asgekar/android-developer-nanodegree | 613975174829a8cc8f7cc3d355553dfd56f27bf4 | b092958173e846b173a5c4da031cab1625203e12 | refs/heads/master | 2021-01-22T23:34:31.396007 | 2017-10-31T00:27:29 | 2017-10-31T00:27:29 | 85,658,364 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,425 | java | package com.example.android.lifecycle;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
/*
* This tag will be used for logging. It is best practice to use the class's name using
* getSimpleName as that will greatly help to identify the location from which your logs are
* being posted.
*/
private static final String TAG = MainActivity.class.getSimpleName();
//Create a key String called LIFECYCLE_CALLBACKS_TEXT_KEY
private static final String LIFECYCLE_CALLBACKS_TEXT_KEY = "callbacks";
/* Constant values for the names of each respective lifecycle callback */
private static final String ON_CREATE = "onCreate";
private static final String ON_START = "onStart";
private static final String ON_RESUME = "onResume";
private static final String ON_PAUSE = "onPause";
private static final String ON_STOP = "onStop";
private static final String ON_RESTART = "onRestart";
private static final String ON_DESTROY = "onDestroy";
private static final String ON_SAVE_INSTANCE_STATE = "onSaveInstanceState";
/*
* This TextView will contain a running log of every lifecycle callback method called from this
* Activity. This TextView can be reset to its default state by clicking the Button labeled
* "Reset Log"
*/
private TextView mLifecycleDisplay;
/**
* Called when the activity is first created. This is where you should do all of your normal
* static set up: create views, bind data to lists, etc.
*
* Always followed by onStart().
*
* @param savedInstanceState The Activity's previously frozen state, if there was one.
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mLifecycleDisplay = (TextView) findViewById(R.id.tv_lifecycle_events_display);
//If savedInstanceState is not null and contains LIFECYCLE_CALLBACKS_TEXT_KEY, set that text on our TextView
if (savedInstanceState != null
&& savedInstanceState.containsKey(LIFECYCLE_CALLBACKS_TEXT_KEY)) {
mLifecycleDisplay.setText(savedInstanceState.getString(LIFECYCLE_CALLBACKS_TEXT_KEY));
}
logAndAppend(ON_CREATE);
}
/**
* Called when the activity is becoming visible to the user.
*
* Followed by onResume() if the activity comes to the foreground, or onStop() if it becomes
* hidden.
*/
@Override
protected void onStart() {
super.onStart();
logAndAppend(ON_START);
}
/**
* Called when the activity will start interacting with the user. At this point your activity
* is at the top of the activity stack, with user input going to it.
*
* Always followed by onPause().
*/
@Override
protected void onResume() {
super.onResume();
logAndAppend(ON_RESUME);
}
/**
* Called when the system is about to start resuming a previous activity. This is typically
* used to commit unsaved changes to persistent data, stop animations and other things that may
* be consuming CPU, etc. Implementations of this method must be very quick because the next
* activity will not be resumed until this method returns.
*
* Followed by either onResume() if the activity returns back to the front, or onStop() if it
* becomes invisible to the user.
*/
@Override
protected void onPause() {
super.onPause();
logAndAppend(ON_PAUSE);
}
/**
* Called when the activity is no longer visible to the user, because another activity has been
* resumed and is covering this one. This may happen either because a new activity is being
* started, an existing one is being brought in front of this one, or this one is being
* destroyed.
*
* Followed by either onRestart() if this activity is coming back to interact with the user, or
* onDestroy() if this activity is going away.
*/
@Override
protected void onStop() {
super.onStop();
logAndAppend(ON_STOP);
}
/**
* Called after your activity has been stopped, prior to it being started again.
*
* Always followed by onStart()
*/
@Override
protected void onRestart() {
super.onRestart();
logAndAppend(ON_RESTART);
}
/**
* The final call you receive before your activity is destroyed. This can happen either because
* the activity is finishing (someone called finish() on it, or because the system is
* temporarily destroying this instance of the activity to save space. You can distinguish
* between these two scenarios with the isFinishing() method.
*/
@Override
protected void onDestroy() {
super.onDestroy();
logAndAppend(ON_DESTROY);
}
//Override onSaveInstanceState
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
logAndAppend(ON_SAVE_INSTANCE_STATE);
String textFromTextView = mLifecycleDisplay.getText().toString();
outState.putString(LIFECYCLE_CALLBACKS_TEXT_KEY, textFromTextView);
}
//Call super.onSaveInstanceState
// Call logAndAppend with the ON_SAVE_INSTANCE_STATE String
// Put the text from the TextView in the outState bundle
/**
* Logs to the console and appends the lifecycle method name to the TextView so that you can
* view the series of method callbacks that are called both from the app and from within
* Android Studio's Logcat.
*
* @param lifecycleEvent The name of the event to be logged.
*/
private void logAndAppend(String lifecycleEvent) {
Log.d(TAG, "Lifecycle Event: " + lifecycleEvent);
mLifecycleDisplay.append(lifecycleEvent + "\n");
}
/**
* This method resets the contents of the TextView to its default text of "Lifecycle callbacks"
*
* @param view The View that was clicked. In this case, it is the Button from our layout.
*/
public void resetLifecycleDisplay(View view) {
mLifecycleDisplay.setText("Lifecycle callbacks:\n");
}
}
| [
"apoorva.asgekar@gmail.com"
] | apoorva.asgekar@gmail.com |
c94b69e8993c8c47490f17b8ffa2f61736d5ac92 | e3ae997120fc43f5386efe1234e30c8c1aa67d18 | /Database and API/TomatoVirusDB/build/generated-sources/ap-source-output/tovrestws/Choiceoption_.java | 7bf06de4f6b5aa7e7fa57b04bf36e87c9ac2525e | [] | no_license | niralalmeida/virusSafe-Agro | 8f6bd45cb4df78faf0905dfe0ab842e5ccb65c5b | 89985894bfba0cfadc7a916b967d6298d46544da | refs/heads/master | 2023-03-22T16:46:26.179933 | 2020-11-14T08:06:41 | 2020-11-14T08:06:41 | 343,794,474 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 705 | java | package tovrestws;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
import tovrestws.Choicequestion;
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2020-09-01T03:54:10")
@StaticMetamodel(Choiceoption.class)
public class Choiceoption_ {
public static volatile SingularAttribute<Choiceoption, Choicequestion> choiceOptionQuestionId;
public static volatile SingularAttribute<Choiceoption, String> choiceOptionContent;
public static volatile SingularAttribute<Choiceoption, Character> choiceOptionLabel;
public static volatile SingularAttribute<Choiceoption, Integer> choiceOptionId;
} | [
"hyan0050@student.monash.edu"
] | hyan0050@student.monash.edu |
ead47cbe472adbf3ee61a55bb2f8f6dc8ad1981f | 5fd165df05bb415955bc44f417802284fa31f26e | /src/main/java/NarasimhaKarumanchi/Java/_4_Queue/_1_FixedSizeArrayQueue/QueueApp.java | 51fbe07ec230ae8493939bd7550fa213082c7ad9 | [] | no_license | Divya0319/DataStructuresAndAlgorithms | e8e36e660bd5f45f7d5beb1b2a62b8d163f35d97 | d97be267ed92516f1fdcd26a332533f9b3110716 | refs/heads/master | 2023-08-03T15:49:20.495321 | 2021-09-15T07:43:25 | 2021-09-15T07:43:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 739 | java | package NarasimhaKarumanchi.Java._4_Queue._1_FixedSizeArrayQueue;
/**
* @author DOMAIN\md.tousif
*
*/
public class QueueApp {
public static void main(String[] args) {
QueueServiceImpl queue = new QueueServiceImpl(5);
queue.enQueue(10);
queue.enQueue(20);
queue.enQueue(30);
System.out.println(queue.toString());
queue.deQueue();
queue.deQueue();
System.out.println(queue.toString());
queue.enQueue(40);
queue.enQueue(50);
queue.enQueue(60);
queue.enQueue(70);
System.out.println(queue.toString());
queue.deQueue();
queue.deQueue();
System.out.println(queue.toString());
queue.enQueue(80);
System.out.println(queue.toString());
queue.enQueue(90);
System.out.println(queue.toString());
}
}
| [
"DOMAIN\\md.tousif@tousif-optiplex-3020.blr.cordis"
] | DOMAIN\md.tousif@tousif-optiplex-3020.blr.cordis |
a2fb79413e6b38b5f19cb70c6755b6515e7f43f5 | 30df2aea9e2013a859d5843c91b45e5bddccc312 | /src/com/jdlink/service/WarningService.java | 4e872354d9eb9f1ae783571f81de7e8c18c738e9 | [] | no_license | MattJasonLu/SVSP_0.4 | 1b43e8600a0e0b4e53c22726c85054d5b8fccf2c | 53497e6aa6df33fee2c8146dcc7938af923acf46 | refs/heads/master | 2020-03-19T09:04:02.291916 | 2019-02-11T07:51:04 | 2019-02-11T07:51:04 | 136,257,419 | 2 | 15 | null | 2019-04-08T07:38:29 | 2018-06-06T01:58:42 | JavaScript | UTF-8 | Java | false | false | 520 | java | package com.jdlink.service;
import com.jdlink.domain.Page;
import com.jdlink.domain.Warning;
import org.springframework.stereotype.Service;
import java.util.List;
public interface WarningService {
void add(Warning warning);
void updateWarning(Warning warning);
float getThresholdById(int id);
List<Warning> loadWarningList(Page page);
List<Warning> searchWaring(Warning warning);
void deleteWarning(int id);
int totalWarningRecord();
int searchWaringCount(Warning warning);
}
| [
"1169267380@qq.com"
] | 1169267380@qq.com |
58adfa6ec6efa3f5ffe1b12bb01b7544639d196b | 896fabf7f0f4a754ad11f816a853f31b4e776927 | /opera-mini-handler-dex2jar.jar/av.java | 88cbc57dab47106f21767900d36d82cd54f0530f | [] | no_license | messarju/operamin-decompile | f7b803daf80620ec476b354d6aaabddb509bc6da | 418f008602f0d0988cf7ebe2ac1741333ba3df83 | refs/heads/main | 2023-07-04T04:48:46.770740 | 2021-08-09T12:13:17 | 2021-08-09T12:04:45 | 394,273,979 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 208 | java | //
// Decompiled by Procyon v0.6-prerelease
//
public interface av
{
int Code(final int p0);
au Code(final int p0, final int p1);
au Code(final int p0, final int p1, final int p2);
}
| [
"commit+ghdevapi.up@users.noreply.github.com"
] | commit+ghdevapi.up@users.noreply.github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.