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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10823156997ed1ce49a3a45022455d1f05ec9664 | 7ed8067219be1da9492e5fc2075cae03252fca2c | /sis_arriendo/src/arriendo/entidades/GEN_Estudiantes.java | e7dea57eb2d6ac41916361cc0486d24b2e4fa868 | [] | no_license | juank20097/Sis_Arriendo | 8092b82f9c36c15859b3a4ab6726365018f1fa10 | eff6fec0354a8be1807631f9ebe438da6ac4b910 | refs/heads/master | 2020-04-24T15:32:31.365236 | 2015-09-25T21:53:47 | 2015-09-25T21:53:47 | 39,957,489 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,092 | java | /***********************************************************************
* Module: GEN_Estudiantes.java
* Author: jestevez
* Purpose: Defines the Class GEN_Estudiantes
***********************************************************************/
package arriendo.entidades;
import java.util.*;
/** @pdOid 5aa94c32-d265-4dce-b1b3-dc7e977cbfa1 */
public class GEN_Estudiantes extends GEN_Personas {
/** @pdOid ad4227e2-7242-49d9-a72b-30481d9fd1c9 */
private String est_nro_carnet;
/** @pdOid 80d76245-adb6-4356-a772-4179857486a3 */
protected void finalize() {
// TODO: implement
}
/** @pdOid 1006cd95-2892-4b06-af41-8c28619fa5ea */
public String getEst_nro_carnet() {
return est_nro_carnet;
}
/** @param newEst_nro_carnet
* @pdOid 81611121-e605-4be7-8b0c-e05b281fcd19 */
public void setEst_nro_carnet(String newEst_nro_carnet) {
est_nro_carnet = newEst_nro_carnet;
}
/** @pdOid 22179cbc-644c-43c8-bfd0-d9fc5e484a8f */
public GEN_Estudiantes() {
// TODO: implement
}
} | [
"juank20097@gmail.com"
] | juank20097@gmail.com |
dda2bbdd421d9cfdb802a9e68f449365d808c37f | a83911d6b6a953966d2533e56df26db5bfcb37b3 | /src/com/lxl/test/JsonTest.java | df9cd99a0fcd491d79af79e3776febadfb709bc0 | [] | no_license | lxlzyc/DataStructuresAlgorithmsInJava | 8276b86ea95ec4bc23fadcdced39ecdbfaf9e541 | 8445dbfdf4d0bd78a1f8eb5761b4b5dee7d3f6a7 | refs/heads/master | 2021-01-21T13:48:16.278247 | 2016-05-23T07:55:27 | 2016-05-23T07:55:27 | 54,974,054 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 800 | java | package com.lxl.test;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
public class JsonTest {
private static ArrayList<String> filelist = new ArrayList<String>();
static void getFiles(String filePath) {
System.out.println(filePath);
File root = new File(filePath);
File[] files = root.listFiles();
for (File file : files) {
if (file.isDirectory()) {
getFiles(file.getAbsolutePath());
}else{
getallMes(file.getAbsolutePath());
}
}
}
static void getallMes(String filePath) {
String JsonContext = new Util().ReadFile(filePath);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
getFiles("C:\\Users\\lxl\\Desktop\\东秦信息\\");
}
}
| [
"lxldyx000@163.com"
] | lxldyx000@163.com |
66eb1980792a970e87c3cac56204c02d9f4bac0b | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/7/7_74daaf43e028b4f28954eaec7a462685b5ecbecd/Project/7_74daaf43e028b4f28954eaec7a462685b5ecbecd_Project_t.java | f44d29f9e8d7641c7cfdb9c643653a84297889be | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 11,507 | java | package br.ufpe.cin.groundhog;
import java.util.Date;
import java.util.List;
import com.google.common.collect.Lists;
import br.ufpe.cin.groundhog.util.Dates;
/**
* Represents a software project in Groundhog
* @author fjsj, gustavopinto, rodrigoalvesvieira
*/
public class Project {
private String name;
private String description;
private String language;
private User user;
private String iconURL;
private SCM scm;
private String scmURL;
private String sourceCodeURL;
private Date createdAt;
private Date lastPushedAt;
private boolean isFork;
private boolean hasDownloads;
private boolean hasIssues;
private boolean hasWiki;
private int watchersCount;
private int followersCount;
private int forks_count;
private int issuesCount;
public Project() {
}
/**
* 2-parameter constructor
* @param name the project name
* @param description description the project description
*/
public Project(String name, String description) {
this.name = name;
this.description = description;
}
/**
* 3-parameter constructor
* @param name the project name
* @param description the project description
* @param iconURL the project's icon URL
*/
public Project(String name, String description, String iconURL) {
this(name, description);
this.iconURL = iconURL;
}
public Project(String name, String description, String iconURL, String sourceCodeURL) {
this(name, description);
this.iconURL = iconURL;
this.sourceCodeURL = sourceCodeURL;
}
public Project(String name, String description, String iconURL, SCM scm, String scmURL) {
this(name, description, iconURL);
this.scm = scm;
this.scmURL = scmURL;
}
public Project(String name, String description, String iconURL, SCM scm, String scmURL,
String sourceCodeURL) {
this(name, description, iconURL, scm, scmURL);
this.sourceCodeURL = sourceCodeURL;
}
/**
* Informs the name of the project
* @return the name of the project
*/
public String getName() {
return this.name;
}
/**
* Sets the name of the project
* @param name a {@link String} for the project's name
*/
public void setName(String name) {
this.name = name;
}
/**
* Informs the description of the project
* @return the String description of the project
*/
public String getDescription() {
return this.description;
}
/**
* Sets the description of the project
* @param description a String for setting the description
*/
public void setDescription(String description) {
this.description = description;
}
/**
* Informs the project's author name
* @return a String correspondent to the name of the author of the project
*/
public User getOwner() {
return this.user;
}
/**
* Informs the project's author name
* @param owner a {@link String} for the name of the project's author
*/
public void setOwner(User owner) {
this.user = owner;
}
/**
* Informs the project's icon's URL
* @return
*/
public String getIconURL() {
return this.iconURL;
}
/**
* Informs the project's icon's URL
* @param iconURL
*/
public void setIconURL(String iconURL) {
this.iconURL = iconURL;
}
/**
* Informs the project's SCM
* @return
*/
public SCM getSCM() {
return this.scm;
}
public void setSCM(SCM scm) {
this.scm = scm;
}
/**
* Informs the project's SCM URL
* @return
*/
public String getScmURL() {
return this.scmURL;
}
/**
* Sets the project's SCM URL
* @param scmURL
*/
public void setScmURL(String scmURL) {
this.scmURL = scmURL;
}
/**
* Informs the source code URL of the project
* @return a String correspondent to the source code URL of the project in question
*/
public String getSourceCodeURL() {
return this.sourceCodeURL;
}
/**
* Sets the source code URL for the project
* @param sourceCodeURL sets the URL String of the project's source code
*/
public void setSourceCodeURL(String sourceCodeURL) {
this.sourceCodeURL = sourceCodeURL;
}
/**
* Informs whether a project allow downloads or not
* @return true if the project allows source code download. Returns false otherwise.
*/
public boolean hasDownloads() {
return this.hasDownloads;
}
/**
* Sets if a project allows downloads or not
* @param hasDownloads a {@link boolean} for setting whether the project enables downloads or not
*/
public void setHasDownloads(boolean hasDownloads) {
this.hasDownloads = hasDownloads;
}
/**
* @return true if the project has issues. Returns false otherwise.
*/
public boolean hasIssues() {
return this.hasIssues;
}
/**
* @param hasIssues a boolean value for setting if the project has Issues or not
*/
public void setHasIssues(boolean hasIssues) {
this.hasIssues = hasIssues;
}
/**
* Informs whether the project has its own Wiki or not.
* @return true if the project has a Wiki. Returns false otherwise.
*/
public boolean hasWiki() {
return this.hasWiki;
}
/**
* Sets whether a project has its own Wiki or not.
* @param hasWiki a {@link boolean} for setting whether the project has a Wiki or not.
*/
public void setHasWiki(boolean hasWiki) {
this.hasWiki = hasWiki;
}
/**
* Informs how many people are watching the project or have "starred" it
* @return an {@link integer} informing how many people are currently watching the project on its forge
*/
public int getWatchersCount() {
return this.watchersCount;
}
/**
* Sets how many people are watching the project
* @param watchersCount an integer for setting the number of people watching the project on its forge
*/
public void setWatchersCount(int watchersCount) {
this.watchersCount = watchersCount;
}
/**
*
* @return an integer informing the number of people following the project on its forge
*/
public int getFollowersCount() {
return this.followersCount;
}
/**
* Sets how many followers the project has on its forge
* @param followersCount an integer, the number of people following the project
*/
public void setFollowersCount(int followersCount) {
this.followersCount = followersCount;
}
/**
* Informs the number of forks the project has
* @return an integer correspondent to the number of forks
*/
public int getForksCount() {
return this.forks_count;
}
/**
* An indicator of how many times the project has been forked.
* @param forksCount an integer for setting the number of forks the project has.
*/
public void setForksCount(int forksCount) {
this.forks_count = forksCount;
}
/**
*
* Informs the number of open issues of the project
* @return an integer value correspondent to the amount of open issues
*/
public int getIssuesCount() {
return this.issuesCount;
}
/**
* Sets the number of issues of a project
* @param issuesCount an integer for setting the number of Issues of the project
*/
public void setIssuesCount(int issuesCount) {
this.issuesCount = issuesCount;
}
/**
* Tells whether a project is a fork of another or not
* @return a boolean value: true if it's a fork, false otherwise
*/
public boolean isFork() {
return this.isFork;
}
/**
* Sets if the project is a fork of another or not
* @param value a boolean value for informing whether the project is a fork of another or not
*/
public void setIsFork(boolean value) {
this.isFork = value;
}
/**
* Methods that deal with dates are below
* Notice that each setter method is overloaded to support Date and String parameters.
* When the parameter is provided as a String object, the setter method will perform the
* conversion to a date object
*/
/**
* Informs the creation date of the project
* @return a Date object correspondent to the project's creation date
*/
public Date getCreatedAt() {
return this.createdAt;
}
/**
* Sets the creation date of the project
* @param createdAt a Date object for setting the creation date of the project
*/
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
/**
* @param createdAtParam the String correspondent to the creation date of the project in question. e.g: 2012-04-28T15:40:35Z
*/
public void setCreatedAt(String createdAtParam) {
Date createAtDate = new Dates("yyyy-MM-dd HH:mm:ss").format(createdAtParam);
this.createdAt = createAtDate;
}
/**
* Returns the date of the latest push to the project
* @return a Date object of the latest push
*/
public Date getLastPushedAt() {
return this.lastPushedAt;
}
/**
* Sets the date on which the last push has been submitted to the project's source code
* @param lastPushedAtParam the Date object correspondent to the date of the last push to the project
* in question
*/
public void setLastPushedAt(Date lastPushedAtParam) {
this.lastPushedAt = lastPushedAtParam;
}
/**
* @param lastPushedAtParam the String correspondent to the date of the last push to the project
* in question. e.g: 2012-04-28T15:40:35Z
*/
public void setLastPushedAt(String lastPushedAtParam){
Date lastPushDate = new Dates("yyyy-MM-dd HH:mm:ss").format(lastPushedAtParam);
this.lastPushedAt = lastPushDate;
}
/**
* Informs the name of prevailing programming language in a project
* @return name of programming language
*/
public String getLanguage() {
return this.language;
}
/**
* Sets the name of prevailing programming language in a project
*/
public void setLanguage(String language) {
this.language = language;
}
/**
* Method to discover the percentage of projects that have forks
* @param The list of projects to be analyzed
* @return a double result - such that 0 <= result <= 1 - indicating how many of the informed projects have forks (were forked at least once)
*/
public static double getProjectsWithForksRate(List<Project> projects) {
double result = 0.0;
int projectsWithForks = 0, i = 0, listSize = projects.size();
if (listSize == 0) {
throw new IllegalArgumentException("List of projects can't be empty");
}
for (; i < listSize; i++) {
if (projects.get(i).getForksCount() > 0) {
projectsWithForks++;
}
}
result = (projectsWithForks / listSize);
return result;
}
/**
* Informs what is the overall percentage of the given projects that are forks
* With this method we can answer the question "What is the overall percentage of Github projects that ARE forks?"
* @return a double result - such that 0 <= result <= 1 - indicating how many of the informed projects are forks
*/
public static double getProjectsThatAreForks(List<Project> projects) {
double result = 0.0;
int projectsAreForks = 0, i = 0, listSize = projects.size();
if (listSize == 0) {
throw new IllegalArgumentException("List of projects can't be empty");
}
for (; i < listSize; i++) {
if (projects.get(i).isFork()) {
projectsAreForks++;
}
}
result = (projectsAreForks / listSize);
return result;
}
@Override
public String toString() {
return String.format("Project(%s, %s, %s, %s)",
this.name, this.description, this.sourceCodeURL, this.iconURL);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
5f75ba1e8af77969daebe6fefe3a70838baf3083 | 8b5b988d09e868a97f198f470f41297176188fcb | /MonProjetSpring-16-Security-Authentication-Authorization/src/main/java/com/btk/api/HelloSecurityController.java | bcd3b8e28412f7236c3868f49d7fac40f15fe09f | [] | no_license | benalayasalah/Formation_Spring | 45dfd694f13e3c10d6f5486e0beb981cb1855441 | 3b5e81774f0e130f4e6e090f7d409888d42043a3 | refs/heads/master | 2020-03-31T21:42:48.614761 | 2018-10-12T12:55:03 | 2018-10-12T12:55:03 | 152,590,891 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 415 | java | package com.btk.api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloSecurityController {
@GetMapping("/secret")
public String actionSecrete() {
return "Ceci est un secret, Gardez-le!!!!!!";
}
@GetMapping("/public")
public String actionPublique() {
return "Ceci est de l'ordre publique";
}
}
| [
"SALAH_BENALAYA@BTKD.LOCAL"
] | SALAH_BENALAYA@BTKD.LOCAL |
0067804293ac34c277365df8661a9ab5f36d2e46 | 13399d2f113b970f6c8fde652da8a114a21b619d | /src/org/ensembl/healthcheck/testcase/generic/BaseMetaKeys.java | f91e128d2567d7bb783d4bdc83e5ebaf87fdb49c | [
"Apache-2.0"
] | permissive | danstaines/ensj-healthcheck | 804707a7db6fba599b3fd84cfea46e30501a9750 | 7fb15c16400fb11a024e20a9498ff18d62fbecec | refs/heads/master | 2020-03-18T10:25:38.480069 | 2018-05-23T18:38:12 | 2018-05-23T18:38:12 | 24,145,176 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,599 | java | package org.ensembl.healthcheck.testcase.generic;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.ensembl.healthcheck.DatabaseRegistryEntry;
import org.ensembl.healthcheck.ReportManager;
import org.ensembl.healthcheck.testcase.SingleDatabaseTestCase;
import org.ensembl.healthcheck.util.DBUtils;
import org.ensembl.healthcheck.util.MapRowMapper;
import org.ensembl.healthcheck.util.SqlTemplate;
import org.ensembl.healthcheck.util.TestCaseUtils;
import org.testng.internal.collections.Pair;
/**
* Base class for checking on the contents of the meta tables to see for each
* species ID if:
* <ul>
* <li>all mandatory keys are present</li>
* <li>if keys have the correct cardinality</li>
* <li>if any keys are present that are not in the list</li>
* </ul>
* In addition, keys which are applicable to the whole schema are also checked
* if they are present and correct.
*
* @author dstaines
*
*/
public abstract class BaseMetaKeys extends SingleDatabaseTestCase {
/**
* Class encapsulating which keys are valid, mandatory and single value
*
* @author dstaines
*
*/
protected static class KeyDefinition {
public final Set<String> singleCardinality = new HashSet<>();
public final Set<String> validKeys = new HashSet<>();
public final Set<String> mandatoryKeys = new HashSet<>();
public void add(String[] cols) {
this.validKeys.add(cols[0]);
if (cols[2].equals(TRUE)) {
singleCardinality.add(cols[0]);
}
if (cols[3].equals(TRUE)) {
mandatoryKeys.add(cols[0]);
}
}
}
/**
* TSV boolean value
*/
private static final String TRUE = "1";
/**
* mapper class to populate a list of counts per key
*/
protected static final MapRowMapper<String, Integer> keyMapper = new MapRowMapper<String, Integer>() {
@Override
public void existingObject(Integer currentValue, ResultSet resultSet, int position) throws SQLException {
}
@Override
public String getKey(ResultSet resultSet) throws SQLException {
return resultSet.getString(1);
}
@Override
public Map<String, Integer> getMap() {
return new HashMap<>();
}
@Override
public Integer mapRow(ResultSet resultSet, int position) throws SQLException {
return resultSet.getInt(2);
}
};
public BaseMetaKeys() {
super();
}
/**
* Utility to compare a hash of keys vs a
*
* @param dbre
* since reporting requires it
* @param speciesString
* species-specific message
* @param keys
* keys with counts
* @param keyDefinition
* definition to test against
* @return true if all is well
*/
protected boolean checkKeys(DatabaseRegistryEntry dbre, String speciesString, Map<String, Integer> keys,
KeyDefinition keyDefinition) {
boolean ok = true;
// check mandatory are all present
for (String key : keyDefinition.mandatoryKeys) {
if (!keys.containsKey(key)) {
ok = false;
ReportManager.problem(this, dbre.getConnection(),
"Mandatory meta key " + key + " not found" + speciesString);
}
}
// check each key to see cardinality and if the keys are valid
for (Entry<String, Integer> e : keys.entrySet()) {
if (!keyDefinition.validKeys.contains(e.getKey())) {
ok = false;
ReportManager.problem(this, dbre.getConnection(),
"Meta key " + e.getKey() + " not valid" + speciesString);
}
if (e.getValue() > 1 && keyDefinition.singleCardinality.contains(e.getKey())) {
ok = false;
ReportManager.problem(this, dbre.getConnection(),
"Meta key " + e.getKey() + " should only have a single value" + speciesString);
}
}
return ok;
}
/**
* @return resource path for TSV file containing key definitions
*/
protected abstract String getMetaFile();
/**
* Parse a simple TSV file containing a list of meta keys and create sets
* containing different criteria. Could be replaced by call to production db?
*
* @return pair of meta key usage definitions (schema-wide, per-species)
*/
protected Pair<KeyDefinition, KeyDefinition> readDefs() {
KeyDefinition schemaKeys = new KeyDefinition();
KeyDefinition speciesKeys = new KeyDefinition();
for (String line : TestCaseUtils.resourceToStringList(getMetaFile())) {
// format is key per_species(1/0) single_value(1/0) required(1/0)
if (!line.startsWith("#")) {
String[] cols = line.split("\t");
if (cols.length != 4) {
throw new IllegalArgumentException(
"Cannot parse line " + line + " - should contain 4 columns but has " + cols.length + " ");
}
if (cols[1].equals(TRUE)) {
speciesKeys.add(cols);
} else {
schemaKeys.add(cols);
}
}
}
return Pair.of(schemaKeys, speciesKeys);
}
@Override
public boolean run(DatabaseRegistryEntry dbre) {
boolean passes = true;
Pair<KeyDefinition, KeyDefinition> defs = readDefs();
SqlTemplate template = DBUtils.getSqlTemplate(dbre);
// check schema-wide keys
passes &= checkKeys(dbre, StringUtils.EMPTY,
template.queryForMap("select meta_key,count(*) from meta where species_id is null group by meta_key",
keyMapper),
defs.first());
// check per species keys
for (int speciesId : dbre.getSpeciesIds()) {
passes &= checkKeys(dbre, " for species " + speciesId,
template.queryForMap("select meta_key,count(*) from meta where species_id=? group by meta_key",
keyMapper, speciesId),
defs.second());
}
return passes;
}
}
| [
"dstaines@ebi.ac.uk"
] | dstaines@ebi.ac.uk |
4f3e0e405937f3778c22f7027bc1dd6504365b15 | b50a3df0de9c646a69105fcd0f306d852bb23d70 | /app/src/main/java/br/com/felipedeveloper/gestaofinanceira/Telas/EmailCadastroFragment.java | 65125c0fd700754acaac710ba5c3f2eb49744a64 | [] | no_license | allefsousa/Gestao_FinanceiraApp | 59035228cf32064214a309cc3cce19d2d054c35a | c025f9170e663190227bdb8b937bc301764d1de1 | refs/heads/master | 2020-03-07T20:22:51.726977 | 2018-08-26T17:29:28 | 2018-08-26T17:29:28 | 127,695,900 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,628 | java | package br.com.felipedeveloper.gestaofinanceira.Telas;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.TextInputLayout;
import android.support.v4.app.Fragment;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseAuthInvalidCredentialsException;
import com.google.firebase.auth.FirebaseAuthUserCollisionException;
import com.google.firebase.auth.FirebaseAuthWeakPasswordException;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.auth.UserProfileChangeRequest;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import br.com.felipedeveloper.gestaofinanceira.Modelo.Usuario;
import br.com.felipedeveloper.gestaofinanceira.R;
import cn.pedant.SweetAlert.SweetAlertDialog;
public class EmailCadastroFragment extends Fragment {
//region Itens da View
private FloatingActionButton btaddusuario;
private EditText edtConfirmasenha;
private EditText edtemail;
private EditText edtnome;
private EditText edtsenha;
private TextInputLayout inputLayoutNome;
private TextInputLayout inputLayoutEmail;
private TextInputLayout inputLayoutSenha;
private TextInputLayout inputLayoutConfirma;
//endregion
//region Variaveis Globais-
private View rootView;
private FirebaseAuth firebaseAuth;
private Usuario user;
private DatabaseReference reference;
//endregion
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.email_cadastro_activity, container, false); // inflando a view email_cadastro
// cast dos botoes da view para poder ser utilizado
btaddusuario = rootView.findViewById(R.id.btnsalvar);
edtConfirmasenha = rootView.findViewById(R.id.editconfirmesenha);
edtnome = rootView.findViewById(R.id.editnome);
edtsenha = rootView.findViewById(R.id.editsenha);
edtemail = rootView.findViewById(R.id.editemail);
inputLayoutNome = rootView.findViewById(R.id.textInputLayout);
inputLayoutEmail = rootView.findViewById(R.id.textInputLayout2);
inputLayoutSenha = rootView.findViewById(R.id.textInputLayout3);
inputLayoutConfirma = rootView.findViewById(R.id.textInputLayout4);
// instanciando novos objetos
user = new Usuario();
inicializaFirebase();
firebaseAuth = FirebaseAuth.getInstance(); // pegando a instancia de login do firebase
//region Tratamento Labels erro view
edtnome.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
inputLayoutNome.setError("");
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
}
});
edtConfirmasenha.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
inputLayoutSenha.setError("");
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
}
});
edtemail.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
inputLayoutEmail.setError("");
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
}
});
edtConfirmasenha.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
inputLayoutConfirma.setError("");
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
}
});
//endregion
/**
* lisner do botao de adicionar um novo usuario
*/
btaddusuario.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
edtConfirmasenha.clearFocus();
boolean validaOk = false;
validaOk = ValidarCampos();
if (validaOk) {
// atribuindo valor das views para o objeto usuario
user.setUsuarioNome(edtnome.getText().toString());
user.setUsuarioEmail(edtemail.getText().toString());
user.setUsuarioSenha(edtsenha.getText().toString());
user.setUsuarioconfirmaSenha(edtConfirmasenha.getText().toString());
if (!user.getUsuarioEmail().isEmpty()) {
if (user.Verificasenha()) {
criarContaFirebase(user); // metodo que cria a conta
} else {
ExibirMensagem(rootView.getContext(), SweetAlertDialog.ERROR_TYPE, "Senhas nao conferem !");
}
}
}
}
});
return rootView;
}
/**
* validando os campos e retorna True se todos tiverem corretos
*
* @return
*/
private boolean ValidarCampos() {
Boolean retorno = false;
if (edtnome.getText().toString().isEmpty()) {
inputLayoutNome.setError("Nome Invalido.");
}
if (edtsenha.getText().toString().isEmpty()) {
inputLayoutSenha.setError("Senha Invalida.");
}
if (edtemail.getText().toString().isEmpty()) {
inputLayoutEmail.setError("Email Invalido.");
}
if (edtConfirmasenha.getText().toString().isEmpty()) {
inputLayoutConfirma.setError("senha Invalida");
}
if (edtnome.getText().toString().isEmpty() && edtsenha.getText().toString().isEmpty() && edtemail.getText().toString().isEmpty() && edtConfirmasenha.getText().toString().isEmpty()) {
retorno = true;
}
return retorno;
}
/**
* instancia do firebase para salvar o usuario logado no BD
*/
private void inicializaFirebase() {
FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();
reference = firebaseDatabase.getReference().child("usuario");
}
/**
* criando a conta do usuario no firebase
* porem essa conta só é criada com email e senha assim nao exibindo o nome do usuario em futuras consultas
* por isso um metodo de update do usuario foi criado para adicionar o nome do usuario
*
* @param user
*/
private void criarContaFirebase(final Usuario user) {
firebaseAuth.createUserWithEmailAndPassword(user.getUsuarioEmail(), user.getUsuarioSenha()).addOnCompleteListener((Activity) rootView.getContext(), new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
limparcampos();
FirebaseUser firebaseUser = FirebaseAuth.getInstance().getCurrentUser(); // pegando a instancia do usuario logado apos cadastro
// atualizando o usuario cadastrad para exibir o nome no app
UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()
.setDisplayName(user.getUsuarioNome())
.build();
if (firebaseUser != null) {
firebaseUser.updateProfile(profileUpdates);// atualizando perfil
}
salvarUsuarioBD(firebaseUser); // salvando usuario no BD
ExibirMensagem(rootView.getContext(), SweetAlertDialog.SUCCESS_TYPE, "Conta criada com sucesso !");
}
/**
* caso nao seja sucesso criar a conta
* abaixo segui o tratamento de erro
*/
if (!task.isSuccessful()) {
try {
throw task.getException();
} catch (FirebaseAuthWeakPasswordException e) {
ExibirMensagem(rootView.getContext(), SweetAlertDialog.ERROR_TYPE, "Senha Fraca, Utilize Numeros e Letras");
edtsenha.setText("");
edtConfirmasenha.setText("");
edtsenha.requestFocus();
inputLayoutSenha.setError("Senha Fraca, Utilize Numeros e Letras");
inputLayoutConfirma.setError("Senha Fraca, Utilize Numeros e Letras");
edtsenha.requestFocus();
} catch (FirebaseAuthInvalidCredentialsException c) {
edtemail.setText("");
edtemail.requestFocus();
inputLayoutEmail.setError("Email Invalido");
} catch (FirebaseAuthUserCollisionException d) {
ExibirMensagem(rootView.getContext(), SweetAlertDialog.ERROR_TYPE, "Usuario ja existe !!");
limparcampos();
} catch (Exception e) {
ExibirMensagem(rootView.getContext(), SweetAlertDialog.ERROR_TYPE, "Verifique sua conexao com a Internet");
limparcampos();
}
}
}
});
}
/**
* Exibir mensagem ao usuario
* @param context
* @param successType
* @param s
*/
private void ExibirMensagem(Context context, int successType, String s) {
new SweetAlertDialog(context, successType)
.setTitleText(getResources().getString(R.string.app_name))
.setContentText(s)
.show();
}
/**
* responsavel por salvar o usuario no BD do firebase
* @param firebaseUser
*/
private void salvarUsuarioBD(FirebaseUser firebaseUser) {
user.setUsuarioEmail(firebaseUser.getEmail());
user.setUsuarioNome(user.getUsuarioNome());
user.setIdUsuario(firebaseUser.getUid());
reference.child(user.getIdUsuario()).setValue(user);
}
private void limparcampos() {
edtConfirmasenha.setText("");
edtemail.setText("");
edtnome.setText("");
edtsenha.setText("");
}
}
| [
"allefsousa_1@hotmail.com"
] | allefsousa_1@hotmail.com |
dc26da64d3d10ea6ff4d9b996e6b2ecf6f880585 | 656c20921b4afa70533bbb77b708d3f0623413df | /src/main/java/au/gov/nsw/records/digitalarchives/dashboard/bean/JTableSimpleRow.java | bc9d417855e2022af88cb6d9c7b7624c4df80ea0 | [] | no_license | dannyarcher/Dashboard | 37baebcb7b42cc531170cd8bc753078a19f043f4 | eeef68943dd52dfa611cb667af8b5ed6f962758d | refs/heads/master | 2021-01-21T17:22:55.384371 | 2013-07-03T01:56:48 | 2013-07-03T01:56:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 592 | java | package au.gov.nsw.records.digitalarchives.dashboard.bean;
import com.google.gson.annotations.Expose;
public class JTableSimpleRow {
@Expose
private String label;
@Expose
private String value;
public JTableSimpleRow(String label, String value) {
super();
this.label = String.format("<b>%s</b>",label);
this.value = value;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = String.format("<b>%s</b>",label);
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
| [
"airgear01@gmail.com"
] | airgear01@gmail.com |
f968215b8444ac035a02b30b8641b205db703d0a | 3b27d3ed3e912699e211459d618210338fe24200 | /Project_1/CSC540Project/src/ViewObservations.java | 2adb2e9f999681fdc7d859eeaaf733794da300db | [] | no_license | sharathsreenivasan93/DBMS | 8e912d087fd7b708f07fbc8860effa1ae2f0ab53 | 9989eb56e5e2110f0ff7a9003734b96b40de7958 | refs/heads/master | 2021-01-21T20:34:40.215680 | 2017-05-24T06:14:08 | 2017-05-24T06:14:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,746 | java | import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;
import java.awt.event.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class ViewObservations extends JFrame {
JPanel contentPane;
JButton btnViewOwn;
JButton btnViewSupp;
JButton btnHome;
public static void main(String args[]) {
ViewObservations obj=new ViewObservations();
}
ViewObservations(){
setTitle("View Observation Data");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 650, 200);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
btnViewOwn = new JButton("View Own");
btnViewOwn.setBounds(150, 150, 100, 20);
contentPane.add(btnViewOwn);
btnViewSupp = new JButton("View Supportee");
btnViewSupp.setBounds(150, 200, 100, 20);
contentPane.add(btnViewSupp);
btnHome = new JButton("Home Page");
btnHome.setBounds(150,250,100,20);
contentPane.add(btnHome);
setVisible(true);
actionClickButtons();
}
public void actionClickButtons() {
btnViewOwn.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae) {
ViewOwnReco viewobj=new ViewOwnReco();
dispose();
}
});
btnViewSupp.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae) {
ViewSuppReco viewobj=new ViewSuppReco();
dispose();
}
});
btnHome.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae) {
dispose();
HomePage homePageFrame = new HomePage();
}
});
}
}
| [
"noreply@github.com"
] | noreply@github.com |
d8864cbd8d21d4c43d7babede063ccf6af4297c1 | 3809a2398524194a17f0e089e50f9a410941ab59 | /src/main/java/fr/univlorraine/ecandidat/views/CandidatCreerCompteView.java | ae5e02c4891b47dc087fffb09a68a9939860000d | [] | no_license | greenandro/ecandidat | b718b1631cbacd311cf56cbfe137bcd73bd17354 | b43f15fc29aa0b4993762e67291888e7ad3893e3 | refs/heads/master | 2020-12-02T20:57:35.752215 | 2016-03-12T09:43:29 | 2016-03-12T09:44:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 10,084 | java | package fr.univlorraine.ecandidat.views;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import org.springframework.context.ApplicationContext;
import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
import com.vaadin.server.FontAwesome;
import com.vaadin.server.ThemeResource;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.spring.annotation.SpringView;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Image;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;
import fr.univlorraine.ecandidat.StyleConstants;
import fr.univlorraine.ecandidat.controllers.CampagneController;
import fr.univlorraine.ecandidat.controllers.CandidatController;
import fr.univlorraine.ecandidat.controllers.I18nController;
import fr.univlorraine.ecandidat.controllers.TableRefController;
import fr.univlorraine.ecandidat.controllers.UserController;
import fr.univlorraine.ecandidat.entities.ecandidat.Langue;
/**
* Page de creation de compte du candidat
* @author Kevin Hergalant
*
*/
@SpringView(name = CandidatCreerCompteView.NAME)
public class CandidatCreerCompteView extends VerticalLayout implements View {
/** serialVersionUID **/
private static final long serialVersionUID = -1892026915407604201L;
public static final String NAME = "candidatCreerCompteView";
/* Injections */
@Resource
private transient ApplicationContext applicationContext;
@Resource
private transient UserController userController;
@Resource
private transient CandidatController candidatController;
@Resource
private transient TableRefController tableRefController;
@Resource
private transient CampagneController campagneController;
@Resource
private transient I18nController i18nController;
private Label labelTitle = new Label();
private Label labelAccueil = new Label();
private HorizontalLayout hlConnectedCreateCompte = new HorizontalLayout();
private Panel panelIsStudent = new Panel();
private Panel panelNotStudent = new Panel();
private Panel panelCreateCompte = new Panel();
private VerticalLayout vlConnexionIsStudent = new VerticalLayout();
private VerticalLayout vlConnexionNotStudent = new VerticalLayout();
private Button logBtnNoCompte = new Button(FontAwesome.SIGN_OUT);
/**
* Initialise la vue
*/
@PostConstruct
public void init() {
//candidatController.nettoyageCptMinInvalides();
/* Style */
setMargin(true);
setSpacing(true);
/* Titre */
HorizontalLayout hlLangue = new HorizontalLayout();
hlLangue.setWidth(100, Unit.PERCENTAGE);
hlLangue.setSpacing(true);
/*Le titre*/
labelTitle.setValue(applicationContext.getMessage(NAME + ".title", null, UI.getCurrent().getLocale()));
labelTitle.addStyleName(ValoTheme.LABEL_H2);
hlLangue.addComponent(labelTitle);
hlLangue.setExpandRatio(labelTitle, 1);
hlLangue.setComponentAlignment(labelTitle, Alignment.MIDDLE_LEFT);
if (tableRefController.getLangueEnService().size()>0){
Langue langueDef = tableRefController.getLangueDefault();
Image flagDef = new Image(null, new ThemeResource("images/flags/"+langueDef.getCodLangue()+".png"));
flagDef.addClickListener(e->changeLangue(langueDef));
flagDef.addStyleName(StyleConstants.CLICKABLE);
hlLangue.addComponent(flagDef);
hlLangue.setComponentAlignment(flagDef, Alignment.MIDDLE_CENTER);
tableRefController.getLangueEnService().forEach(langue->{
Image flag = new Image(null, new ThemeResource("images/flags/"+langue.getCodLangue()+".png"));
flag.addClickListener(e->changeLangue(langue));
flag.addStyleName(StyleConstants.CLICKABLE);
hlLangue.addComponent(flag);
hlLangue.setComponentAlignment(flag, Alignment.MIDDLE_CENTER);
});
}
addComponent(hlLangue);
/* Texte */
labelAccueil.setValue("");
labelAccueil.setContentMode(ContentMode.HTML);
addComponent(labelAccueil);
if (campagneController.getCampagneActive()==null){
addComponent(new Label(applicationContext.getMessage("accueilView.nocampagne", null, UI.getCurrent().getLocale())));
return;
}
/*Connexion CAS*/
panelIsStudent.setCaption(applicationContext.getMessage("accueilView.title.etu", new Object[]{applicationContext.getMessage("universite.title", null, UI.getCurrent().getLocale())}, UI.getCurrent().getLocale()));
panelIsStudent.setWidth(500, Unit.PIXELS);
panelIsStudent.addStyleName(StyleConstants.PANEL_COLORED);
vlConnexionIsStudent.setSpacing(true);
vlConnexionIsStudent.setMargin(true);
panelIsStudent.setContent(vlConnexionIsStudent);
addComponent(panelIsStudent);
/*Creation sans compte cas*/
panelNotStudent.setCaption(applicationContext.getMessage("accueilView.title.nonetu", new Object[]{applicationContext.getMessage("universite.title", null, UI.getCurrent().getLocale())}, UI.getCurrent().getLocale()));
panelNotStudent.setWidth(500, Unit.PIXELS);
panelNotStudent.addStyleName(StyleConstants.PANEL_COLORED);
vlConnexionNotStudent.setSpacing(true);
vlConnexionNotStudent.setMargin(true);
panelNotStudent.setContent(vlConnexionNotStudent);
addComponent(panelNotStudent);
/*Connecté mais sans compte candidat*/
hlConnectedCreateCompte.setWidth(500, Unit.PIXELS);
addComponent(hlConnectedCreateCompte);
panelCreateCompte.setCaption(applicationContext.getMessage("accueilView.title.nocompte", null, UI.getCurrent().getLocale()));
panelCreateCompte.addStyleName(StyleConstants.PANEL_COLORED);
VerticalLayout vlCreateCompte = new VerticalLayout();
vlCreateCompte.setSpacing(true);
vlCreateCompte.setMargin(true);
panelCreateCompte.setContent(vlCreateCompte);
hlConnectedCreateCompte.addComponent(panelCreateCompte);
logBtnNoCompte.setCaption(applicationContext.getMessage("accueilView.createaccount", null, UI.getCurrent().getLocale()));
logBtnNoCompte.addClickListener(e -> {
candidatController.createCompteMinima(false);
});
vlCreateCompte.addComponent(logBtnNoCompte);
}
/** Change la langue de l'utilisateur et rafraichi les infos
* @param langue
*/
private void changeLangue(Langue langue){
i18nController.changeLangue(langue);
labelTitle.setValue(applicationContext.getMessage(NAME + ".title", null, UI.getCurrent().getLocale()));
panelCreateCompte.setCaption(applicationContext.getMessage("accueilView.title.nocompte", null, UI.getCurrent().getLocale()));
logBtnNoCompte.setCaption(applicationContext.getMessage("accueilView.createaccount", null, UI.getCurrent().getLocale()));
setTxtMessageAccueil();
refreshLayoutConnexion();
}
/**
* Rafrachi le layout de connexion
*/
private void refreshLayoutConnexion(){
if (!userController.isAnonymous()){
panelIsStudent.setVisible(false);
panelNotStudent.setVisible(false);
if (!userController.isGestionnaire() && !userController.isCandidat()){
hlConnectedCreateCompte.setVisible(true);
}else{
hlConnectedCreateCompte.setVisible(false);
}
return;
}else{
hlConnectedCreateCompte.setVisible(false);
panelNotStudent.setVisible(true);
panelIsStudent.setVisible(true);
}
refreshConnexionPanelStudent();
refreshConnexionPanelNotStudent();
}
/**
* Rafraichi le panel de connexion sans compte
*/
private void refreshConnexionPanelStudent(){
vlConnexionIsStudent.removeAllComponents();
Button logBtn = new Button(applicationContext.getMessage("btnConnect", null, UI.getCurrent().getLocale()), FontAwesome.SIGN_OUT);
logBtn.addClickListener(e -> {
userController.connectCAS();
});
HorizontalLayout hlConnect = new HorizontalLayout();
hlConnect.setSpacing(true);
Label labelConnect = new Label(applicationContext.getMessage("accueilView.connect.cas", null, UI.getCurrent().getLocale()));
hlConnect.addComponent(labelConnect);
hlConnect.setComponentAlignment(labelConnect, Alignment.MIDDLE_LEFT);
hlConnect.addComponent(logBtn);
hlConnect.setComponentAlignment(logBtn, Alignment.MIDDLE_CENTER);
vlConnexionIsStudent.addComponent(hlConnect);
}
/**
* Rafraichi le panel de connexion sans compte
*/
private void refreshConnexionPanelNotStudent(){
vlConnexionNotStudent.removeAllComponents();
Button logBtnNoCompte = new Button(applicationContext.getMessage("accueilView.createaccount", null, UI.getCurrent().getLocale()), FontAwesome.SIGN_OUT);
logBtnNoCompte.addClickListener(e -> {
candidatController.createCompteMinima(false);
});
vlConnexionNotStudent.addComponent(logBtnNoCompte);
}
/**
* @return le texte de message d'accueil
*/
private String setTxtMessageAccueil(){
String txt = "";
if (!userController.isAnonymous()){
txt += applicationContext.getMessage("accueilView.welcome", null, UI.getCurrent().getLocale());
txt += applicationContext.getMessage("accueilView.connected", new Object[]{userController.getCurrentUserName()}, UI.getCurrent().getLocale());
if (userController.isGestionnaire()){
txt += applicationContext.getMessage("accueilView.role", new Object[]{userController.getCurrentAuthentication().getAuthorities()}, UI.getCurrent().getLocale());
}else if (userController.isCandidat()){
txt += applicationContext.getMessage("accueilView.cand.connected", null, UI.getCurrent().getLocale());
}
}
if (txt!=null && !txt.equals("")){
labelAccueil.setValue(txt);
labelAccueil.setVisible(true);
}else{
labelAccueil.setVisible(false);
}
return txt;
}
/**
* @see com.vaadin.navigator.View#enter(com.vaadin.navigator.ViewChangeListener.ViewChangeEvent)
*/
@Override
public void enter(ViewChangeEvent event) {
setTxtMessageAccueil();
refreshLayoutConnexion();
}
}
| [
"pascal.rigaux@univ-paris1.fr"
] | pascal.rigaux@univ-paris1.fr |
1cd72fcd2ba5557d59a41d3dad5b7051e6b57caa | 62d73604bfc539656f4b7b63fa09ebd1a89b4a56 | /src/main/java/com/github/jbrasileiro/dainichi/voting/VoteRequest.java | 77a2a0f5c666103b109df1d666a6d4fbf079a6d4 | [] | no_license | jbrasileiro/desafio-back-votos | 0ce20fcdafabb4da7b7d4582f28639a7f17b47f0 | 363980c7e95ee41398bad2b68c400ab99613e650 | refs/heads/master | 2022-07-29T01:14:31.770716 | 2020-05-20T12:18:55 | 2020-05-20T12:18:55 | 264,507,199 | 0 | 0 | null | 2020-05-16T19:04:09 | 2020-05-16T19:04:08 | null | UTF-8 | Java | false | false | 522 | java | package com.github.jbrasileiro.dainichi.voting;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@AllArgsConstructor
@Builder
@Data
public final class VoteRequest
implements
Serializable {
@NotNull
@JsonProperty("session_id")
private Integer session;
@NotNull
@JsonProperty("associate_id")
private Integer associate;
@NotNull
private Boolean vote;
}
| [
"jcbrasileiro@hotmail.com"
] | jcbrasileiro@hotmail.com |
0c3aa279fd3718af3fe595ffa84560dd83751944 | bfe73386844eaefa1d26717488160b6b4d21a10d | /DatabaseConnectivity/src/com/mohitpaudel/databaseconnectivity/dao/CourseDao.java | 5a1135aadc274810ee4b232d8e758a125b3362f3 | [] | no_license | equinoxmohit/JavaDatabaseConnectivity | 9cb781d1a875a0b6bd1d53077350c834937f1e14 | cc546753bb2431a64e329b348042e33e592dbde0 | refs/heads/master | 2021-01-17T06:30:26.930877 | 2016-06-30T06:46:31 | 2016-06-30T06:46:31 | 62,277,988 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 652 | 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 com.mohitpaudel.databaseconnectivity.dao;
import com.mohitpaudel.databaseconnectivity.entity.Course;
import java.sql.SQLException;
import java.util.ArrayList;
/**
*
* @author Mohit
*/
public interface CourseDao {
int insert(Course course) throws ClassNotFoundException, SQLException;
ArrayList<Course> displayAll() throws ClassNotFoundException, SQLException;
int delete(int id) throws ClassNotFoundException, SQLException;
}
| [
"mohit.paudel1996@gmail.com"
] | mohit.paudel1996@gmail.com |
df3a785f424438e5c96d11bbba87e0906358f62e | 3ab59fd75b5bd3543b678b727b88abe0cf78afa3 | /src/main/java/com/clk/clkdemo/model/entitis/Image.java | 83833b7a8943590172631edd7ccba7ffb7e50e1e | [] | no_license | LukaszDusza/clk-demo | 0d961040d7f56f7343296ed80d5deb25a66f015a | 5df39dc62d77e5586e873e1f66915e3b54faeac5 | refs/heads/master | 2020-03-07T05:40:58.744212 | 2018-04-27T07:24:08 | 2018-04-27T07:24:08 | 127,302,689 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,344 | java | package com.clk.clkdemo.model.entitis;
import javax.persistence.*;
import java.io.Serializable;
import java.sql.Date;
import java.util.Set;
@Entity
@Table(name = "image")
public class Image implements Serializable{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "image_id")
private long id;
private String name;
private String creation_date;
private Date createdUser;
private Date lasModifiedDate;
@ManyToMany (cascade = CascadeType.ALL)
@JoinTable(name = "image_minutia", joinColumns = @JoinColumn(name = "image_id"), inverseJoinColumns = @JoinColumn(name = "minutia_id"))
private Set<Minutia> minutia;
public Image() {
}
public Image(String name, String creation_date, Date createdUser, Date lasModifiedDate, Set<Minutia> minutia) {
this.name = name;
this.creation_date = creation_date;
this.createdUser = createdUser;
this.lasModifiedDate = lasModifiedDate;
this.minutia = minutia;
}
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 getCreation_date() {
return creation_date;
}
public void setCreation_date(Date creation_date) {
this.creation_date = creation_date;
}
public Set<Minutia> getMinutia() {
return minutia;
}
public Date getCreatedUser() {
return createdUser;
}
public void setCreatedUser(Date createdUser) {
this.createdUser = createdUser;
}
public Date getLasModifiedDate() {
return lasModifiedDate;
}
public void setLasModifiedDate(Date lasModifiedDate) {
this.lasModifiedDate = lasModifiedDate;
}
public void setMinutia(Set<Minutia> minutia) {
this.minutia = minutia;
}
@Override
public String toString() {
return "Image{" +
"id=" + id +
", name='" + name + '\'' +
", creation_date='" + creation_date + '\'' +
", createdUser=" + createdUser +
", lasModifiedDate=" + lasModifiedDate +
", minutia=" + minutia +
'}';
}
}
| [
"michalskiba.ms@gmail.com"
] | michalskiba.ms@gmail.com |
549fa12278f845a124d267777492abfc872cdbf5 | e62ecac09c74f6dd3c43fe61b259efdcdf9317c2 | /AA103G3_Mobile/src/com/bpcheck/model/BPCheckVO.java | 871e695b37119a794961d07bf10f8190ca34d807 | [] | no_license | sophieannachu/JBZ | a5cc5c146d8c5930492b561a82c1a703585d90c2 | 17414448a312f3d37ffb2e6dd42aeedfbd8e5d48 | refs/heads/master | 2021-02-14T11:40:10.195530 | 2020-03-04T04:20:12 | 2020-03-04T04:20:12 | 244,801,242 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 965 | java | package com.bpcheck.model;
import java.io.Serializable;
import java.util.Date;
public class BPCheckVO implements Serializable{
private Integer bpCheckno;
private Integer sPressure;
private Integer dPressure;
private Date checkDate;
private Integer memno;
public Integer getBpCheckno() {
return bpCheckno;
}
public void setBpCheckno(Integer bpCheckno) {
this.bpCheckno = bpCheckno;
}
public Integer getsPressure() {
return sPressure;
}
public void setsPressure(Integer sPressure) {
this.sPressure = sPressure;
}
public Integer getdPressure() {
return dPressure;
}
public void setdPressure(Integer dPressure) {
this.dPressure = dPressure;
}
public Date getCheckDate() {
return checkDate;
}
public void setCheckDate(Date checkDate) {
this.checkDate = checkDate;
}
public Integer getMemno() {
return memno;
}
public void setMemno(Integer memno) {
this.memno = memno;
}
}
| [
"mac@localhost"
] | mac@localhost |
7508b6e08b49ea56977ca786d2bf36b193b3dd57 | 94c988db47a997c2f3549678636e8b5839c44085 | /src/com/class4/AnnualSalary.java | 029817a17b6bea119cbaa21058bf753290d83dba | [] | no_license | Asha-Nomaan/JavaClass | c14888d9f2489786fb59c7e8fdefc42e59e3a2b6 | a4e02107a4be35153043bf955ac0f6a595b31869 | refs/heads/master | 2020-05-03T00:08:21.517132 | 2019-04-05T02:05:40 | 2019-04-05T02:05:40 | 178,301,862 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 454 | java | package com.class4;
public class AnnualSalary {
public static void main(String[] args) {
int years=4;
int years1=5;
int salary=50000;
int salary1=4999;
if(years<years1) {
System.out.println("You're eligible for the bonus");
if (salary>salary1) {
System.out.println(" Your bonus is 5000");
}else {
System.out.println("Your bonus is 3000");
}
}else {
System.out.println("You're not eligible for the bonus");
}
}
}
| [
"asha.nomaan@gmail.com"
] | asha.nomaan@gmail.com |
86d21b332abc04663e643d9ae6207471d22483ae | d349ed27f01e2c8e494c1c3cd18d165b9bd13c53 | /game-protocol/src/main/commons/com/sky/game/protocol/commons/GT0006Beans.java | 8ae03440af0be932580dc6b21744f08d80fb9227 | [] | no_license | autumnsparrow/poker-game | 385ce3e4146013caf894a4b80c4e1b74e5e826f9 | 7766a7529e4feed95c3a2c2cfc27ce25ad913bb6 | refs/heads/master | 2021-04-06T20:46:38.077347 | 2018-03-14T15:11:44 | 2018-03-14T15:11:44 | 125,230,336 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 965 | java | /**
*
* @Date:Nov 21, 2014 - 2:19:57 PM
* @Author: sparrow
* @Project :game-protocol
*
*
*/
package com.sky.game.protocol.commons;
import com.sky.game.context.annotation.HandlerRequestType;
import com.sky.game.context.annotation.introspector.IIdentifiedObject;
import com.sky.game.context.domain.BaseRequest;
/**
* @author sparrow
*
*/
public class GT0006Beans {
/**
*
*/
public GT0006Beans() {
// TODO Auto-generated constructor stub
}
@HandlerRequestType(transcode="GT0006")
public static class Request extends BaseRequest implements IIdentifiedObject{
Long id;
int action;
int chips;
public int getAction() {
return action;
}
public void setAction(int action) {
this.action = action;
}
public int getChips() {
return chips;
}
public void setChips(int chips) {
this.chips = chips;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}
}
| [
"ruiqiuzhang@gmail.com"
] | ruiqiuzhang@gmail.com |
a4a1448b61db3142c756f6aedceb13cd0b4d4031 | 513ad837aa210144bafc904f6714166d452a177c | /src/cliff/ford/algorithm/sort/insert/InsertSort.java | 3baa5e4b2d0762aace9f026e93c7e1ababf78163 | [] | no_license | Cliff-Ford/Cliff_Ford-Algorithm | 24a0c60be53009f2388d8fd8a377c11f7d9e96ba | 39bcc49d01b916bd813651ad2a8deffcedfc7e56 | refs/heads/master | 2020-05-03T22:04:44.350060 | 2019-04-15T10:29:11 | 2019-04-15T10:29:11 | 178,837,088 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 749 | java | package cliff.ford.algorithm.sort.insert;
import cliff.ford.algorithm.sort.Sort;
/**
* 插入排序
* @author Cliff_Ford
*/
public class InsertSort implements Sort {
/**
* 排序接口
* @param list 待排序序列
*/
@Override
public void sort(int[] list) {
if(list == null || list.length <= 1){
return;
}
int len = list.length;
for(int i = 1; i < len; i++){
int temp = list[i];
int j = i;
while(j > 0){
if(temp < list[j-1]){
list[j] = list[j-1];
j--;
}else{
break;
}
}
list[j] = temp;
}
}
}
| [
"31761320+Cliff-Ford@users.noreply.github.com"
] | 31761320+Cliff-Ford@users.noreply.github.com |
fa2b9414aec9a9fca4b0f621d29dc15e71b2a67c | 6fae5b7c701f1fac4fc81773e48d7362a45a3a00 | /C06_Multithreading/src/test/java/com/sabahtalateh/j4j/multithreading/oracle/sync/NonSyncCounterRunTest.java | 3b720373aa086c0d07d88c069be172f420a2723e | [] | no_license | sabahtalateh/j4j | 93b850d2b5060c4ba1d44d5ae42e609771601781 | 8f6b9a31805c3f3a4deed2a849c58fc4213d1e1b | refs/heads/master | 2021-06-26T11:18:23.628967 | 2018-06-25T16:09:36 | 2018-06-25T16:09:36 | 95,822,873 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 436 | java | package com.sabahtalateh.j4j.multithreading.oracle.sync;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.*;
/**
* NonSyncCounterRunTest.
*/
public class NonSyncCounterRunTest {
@Test
public void testNonSyncCounter() throws Exception {
int res1 = CounterRun.increment100();
int res2 = CounterRun.increment100();
assertThat(res1, not(res2));
}
} | [
"ak@4xxi.com"
] | ak@4xxi.com |
7ddf68ef510a2e16d2046ca8e2b796ed7ca4e024 | fc13020970611adf2405823ffe415311d5c7abe4 | /bitcamp-project-server/v-backup/v32_11/src/main/java/com/eomcs/lms/servlet/LessonListServlet.java | b5cef8b6710b6d26f6320f320035cf0fbe92663f | [] | no_license | sun-kyung/bitcamp-study | e6ab6d829226a2e7468d6846f3b6729999521fbb | 722733cba54abaa9a6aa77f571ffaebec0c2ba02 | refs/heads/master | 2020-09-23T12:37:15.319780 | 2020-04-20T09:28:26 | 2020-04-20T09:28:26 | 225,501,852 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 490 | java | package com.eomcs.lms.servlet;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import com.eomcs.lms.dao.LessonDao;
public class LessonListServlet implements Servlet {
LessonDao lessonDao;
public LessonListServlet(LessonDao lessonDao) {
this.lessonDao = lessonDao;
}
@Override
public void service(ObjectInputStream in, ObjectOutputStream out) throws Exception {
out.writeUTF("OK");
out.reset();
out.writeObject(lessonDao.findAll());
}
}
| [
"esun1801@naver.com"
] | esun1801@naver.com |
0771b9f54f3b7dccab55fd0ef714a12dab894335 | 0fe9265a6ff585f02a640429dc2444fd9d101a61 | /gulimall-pms/src/main/java/com/atguigu/gulimall/pms/GulimallPmsApplication.java | 393b3d3146dd7677e197e674b30ee828809dc297 | [
"Apache-2.0"
] | permissive | xiaoyumen/gulimall | 67928d883fade1679e70519e2af65bc180fd8a32 | c6ba2ff89d6333d9f088b4ac7312fa133c78587c | refs/heads/master | 2022-08-01T15:19:57.284676 | 2019-08-15T09:32:06 | 2019-08-15T09:32:06 | 200,015,549 | 0 | 0 | Apache-2.0 | 2022-07-06T20:40:00 | 2019-08-01T09:00:04 | JavaScript | UTF-8 | Java | false | false | 796 | java | package com.atguigu.gulimall.pms;
import com.alibaba.druid.pool.DruidAbstractDataSource;
import com.alibaba.druid.pool.DruidDataSource;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableAspectJAutoProxy(exposeProxy = true)
@EnableSwagger2
@MapperScan("com.atguigu.gulimall.pms.dao")
@SpringBootApplication
public class GulimallPmsApplication {
public static void main(String[] args) {
SpringApplication.run(GulimallPmsApplication.class, args);
}
}
| [
"1050696826@qq.com"
] | 1050696826@qq.com |
8d4c2a28ee95f0b70fadc49e57b4be4d0287b244 | 62e5e66246617ec5f030ce9711b855979d8fcb19 | /Sistemas Orientados a Objetos/Projeto Final/Projetos NetBeans/ELearningServices/build/generated-sources/jax-ws/ELearning/services/client/aluno/ProcurarAlunoResponse.java | 0eff25c9eea47ed74b04ab3f914a30f36934724c | [] | no_license | JaconsMorais/repcomputaria | 67fbdd4ceab7868a2bfac8f6a8b1ff969b41ca90 | eb53f788e885f93e6e2665f2e588ca16475b30ef | refs/heads/master | 2021-01-10T16:31:16.433608 | 2011-07-12T01:00:05 | 2011-07-12T01:00:05 | 51,807,319 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,929 | java |
package ELearning.services.client.aluno;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for procurarAlunoResponse complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="procurarAlunoResponse">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="return" type="{http://services.ELearning/}aluno" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "procurarAlunoResponse", propOrder = {
"_return"
})
public class ProcurarAlunoResponse {
@XmlElement(name = "return")
protected List<Aluno> _return;
/**
* Gets the value of the return property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the return property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getReturn().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Aluno }
*
*
*/
public List<Aluno> getReturn() {
if (_return == null) {
_return = new ArrayList<Aluno>();
}
return this._return;
}
}
| [
"discipulodopovo@gmail.com"
] | discipulodopovo@gmail.com |
3dc8f5da4c2a5e364fcfaf59ba8dce7f5146f1c6 | 058084a6fcb8ef947d0089d616881afdfc8d3edf | /src/java/controller/LoginServlet.java | e0db47275653241ed0b7ec0f299b3595e3aa29c1 | [] | no_license | greyhawndz/WEBAPDE-MP | 54595c257bb98832d5493810c17e8294066c1161 | 9feb800d4c925f68071c03d64a04c76eb3ea05cb | refs/heads/master | 2020-05-29T12:01:55.340852 | 2015-10-10T09:18:32 | 2015-10-10T09:18:32 | 32,806,823 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,527 | 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 controller;
import model.Photo;
import model.PhotoHandler;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import model.Account;
import model.AccountHandler;
/**
*
* @author WilliamPC
*/
@WebServlet(name = "LoginServlet", urlPatterns = {"/LoginServlet"})
public class LoginServlet extends HttpServlet {
/**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
/* TODO output your page here. You may use following sample code. */
out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet LoginServlet</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Servlet LoginServlet at " + request.getContextPath() + "</h1>");
out.println("</body>");
out.println("</html>");
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/**
* Handles the HTTP <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
/**
* Handles the HTTP <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// processRequest(request, response);
String usercheck = request.getParameter("uName"); //something
String passcheck = request.getParameter("pWord"); //something
Account user = AccountHandler.getInstance().check(usercheck, passcheck);
HttpSession session = request.getSession();
if(user != null){
Photo pic = PhotoHandler.getInstance().retrieve(user.getUsername());
session.setAttribute("username", user.getUsername());
session.setAttribute("password", user.getPassword());
session.setAttribute("aboutme", user.getAboutMe());
session.setAttribute("age", user.getAge());
session.setAttribute("sex", user.getSex());
session.setAttribute("email", user.getEmail());
session.setAttribute("image", pic);
Cookie userCookie = new Cookie("username", user.getUsername() );
Cookie passwordCookie = new Cookie("password", user.getPassword());
userCookie.setMaxAge(60*60);
passwordCookie.setMaxAge(60*60);
response.addCookie(userCookie);
response.addCookie(passwordCookie);
response.sendRedirect("account.jsp");
}
else{
response.sendRedirect("loginfail.jsp");
}
}
/**
* Returns a short description of the servlet.
*
* @return a String containing servlet description
*/
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
| [
"paolo_dionio@yahoo.com.ph"
] | paolo_dionio@yahoo.com.ph |
219d2a15a236db73963e2133eda57a9e8176ff8e | 9eaf4a9908e0d0fb148c6f67a5326123dd50c585 | /core/model/src/main/java/com/zuoer/netflix/bench/core/model/request/ArticleModifyRequest.java | bc1777e86c73f3ea8d90f4701b42d36ac10e6713 | [] | no_license | yswy/netflix_bench | 04f3124328916c3534d3e0821a32c37651fe8e8a | ba0cb2b83a00ff327d76d8e0de42e9879661fb34 | refs/heads/master | 2020-09-20T23:48:34.254604 | 2019-12-06T07:56:20 | 2019-12-06T07:56:20 | 224,620,257 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,480 | java | /**
* BenchCode.com Inc.
* Copyright (c) 2005-2009 All Rights Reserved.
*/
package com.zuoer.netflix.bench.core.model.request;
import java.util.List;
/**
* 文章创建请求
*
* @author zuoer
*
* @version $Id: ArticleCreateRequest.java, v 0.1 2019年11月28日 下午5:57:50 zuoer Exp $
*/
public class ArticleModifyRequest {
/**
* 主键id
*/
private int id;
/**
* 标题
*/
private String title;
/**
* 简介
*/
private String introduction;
/**
* 文章内容
*/
private String mdMaterial;
/**
* html 文章内容
*/
private String htmlMaterial;
/**
* 标签名字集合
*/
private List<String> tagNameList;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getIntroduction() {
return introduction;
}
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
public String getMdMaterial() {
return mdMaterial;
}
public void setMdMaterial(String mdMaterial) {
this.mdMaterial = mdMaterial;
}
public String getHtmlMaterial() {
return htmlMaterial;
}
public void setHtmlMaterial(String htmlMaterial) {
this.htmlMaterial = htmlMaterial;
}
public List<String> getTagNameList() {
return tagNameList;
}
public void setTagNameList(List<String> tagNameList) {
this.tagNameList = tagNameList;
}
}
| [
"zuoer@huored.com"
] | zuoer@huored.com |
5ca7cadddb6739eb5b7d72c8b6d1dc2cf8f75143 | cddd9fecbdb963c655307cc1e93a9c6151782517 | /app/src/main/java/com/example/admin/androidpokemon/Common/Common.java | d9746d79fe65d8c0dc5056149193f7de75ce4b86 | [] | no_license | internick13/AndroidPokemon | 916921f6cf053f3d4351c6161f0b3200dbb499b6 | 4593cad7dbacdf41a9f93fa47969518d0024f0fa | refs/heads/master | 2020-09-23T15:06:44.455763 | 2019-12-03T04:01:13 | 2019-12-03T04:01:13 | 225,527,295 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 670 | java | package com.example.admin.androidpokemon.Common;
import android.content.Intent;
import android.widget.ListView;
import com.example.admin.androidpokemon.Model.Pokemon;
import java.util.ArrayList;
import java.util.List;
public class Common {
public static final String KEY_ENABLE_HOME = "enable_home" ;
public static final String KEY_NUM_EVOLUTION = "num_evolution";
public static List<Pokemon> commonPokemonList = new ArrayList<>();
public static Pokemon findPokemonByNum(String num){
for(Pokemon pokemon:Common.commonPokemonList)
if (pokemon.getNum().equals(num))
return pokemon;
return null;
}
}
| [
"internick18@gmail.com"
] | internick18@gmail.com |
a5dc8f65190e9351a3688dafcb66b6f5455a0038 | cb4a826844156c3ce0e7c7f67a68c753fa322b51 | /app/src/main/java/com/uiu/kids/event/GeofenceEvent.java | a15debecbf64bfcdec4910b44964b248c2031435 | [] | no_license | wasim5390/KidsLauncher | d0cccd64ee5771a84e01132925bcc4db6dbb37c4 | e013532909924e85dc740fc9bce718a1e5d14f92 | refs/heads/master | 2020-03-21T05:06:28.309748 | 2019-02-28T13:52:37 | 2019-02-28T13:52:37 | 138,144,581 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 353 | java | package com.uiu.kids.event;
import com.uiu.kids.model.Location;
public class GeofenceEvent {
public int transition;
public Location getLocation() {
return location;
}
public Location location;
public GeofenceEvent(int enter, Location location) {
this.transition = enter;
this.location = location;
}
}
| [
"wasimamin538@gmail.com"
] | wasimamin538@gmail.com |
aaeaeac61a38f4e8e19bb870dafa66a23b74432e | 9d1139b336e1ea07d23e3f3439cd2e84d7be2fac | /app/src/androidTest/java/com/example/olskr/gittest/ExampleInstrumentedTest.java | bbcd2d308105d6b43b57e71e19238c4be70acbe0 | [] | no_license | OLskrain/GitTest | d9579b0ddb7ca69eeca9e04cac98f8aad3357e4a | b2925a6b30cd4bc8dad678a622ed2612b2dd0b33 | refs/heads/master | 2020-04-14T20:26:55.473841 | 2019-01-04T11:29:46 | 2019-01-04T11:29:46 | 164,094,009 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 734 | java | package com.example.olskr.gittest;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.olskr.gittest", appContext.getPackageName());
}
}
| [
"Olskrain2@yandex.ru"
] | Olskrain2@yandex.ru |
2e2af094ad9bf254ffe124df52aa1630ad42d85b | 95d31fc021cd4362ea3459b3ec5446def92a81df | /java/Shop/code/Shop2/src/com/example/shop/console/common/Constants.java | f13806fe1f85c7112b5458fa5c95539e9575d4b9 | [] | no_license | gongtengpangyi/share | cb623543115e82701ceee81e7561704ebf910e5f | d96757aeac97f7fea5833012cd95f67631b4da75 | refs/heads/master | 2021-01-22T23:00:39.226921 | 2017-06-23T07:58:44 | 2017-06-23T07:58:44 | 92,791,964 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 424 | java | package com.example.shop.console.common;
/**
* 工程常用参数设置类
* @author FRZ
*
*/
public class Constants {
/*
* time配置
*/
public static final String DATETIME_FORMAT="yyyy-MM-dd HH:mm:ss";
public static final String DATETIME_FORMAT_TIMESTAMP = "yyyyMMddHHmmss";
public static final String DATE_FORMAT = "yyyy-MM-dd";
public static final String DATE_FORMAT_TIMESTAMP = "yyyyMMdd";
}
| [
"1753934280@qq.com"
] | 1753934280@qq.com |
c50457984f369b8a7ab2f976b537270d8c7e0c2d | 14031ae875634fe02c5c3c5df0872fdd1bab33f9 | /src/main/java/com/sugarfree/dao/model/TCarousel.java | dfefa3e88cdac06d7bad5fecc6a99296a19c946b | [] | no_license | ltyuanmu/sugarfree | b3d8e0b01431d1cf8503e7542a6355eb26faee43 | 1639dc0dfe2aee7f1edf5c208fcd4f5070790218 | refs/heads/master | 2021-05-24T00:54:30.524428 | 2018-03-22T15:34:22 | 2018-03-22T15:34:22 | 74,001,522 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,666 | java | package com.sugarfree.dao.model;
import java.util.Date;
import javax.persistence.*;
@Table(name = "t_carousel")
public class TCarousel {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 管理员需要跳转的url
*/
private String url;
/**
* 管理员上传的图片
*/
private String image;
/**
* 是否删除0:未删除,1:已删除
*/
@Column(name = "delete_state")
private String deleteState;
/**
* 操作人
*/
@Column(name = "op_user")
private String opUser;
/**
* 操作时间
*/
@Column(name = "update_time")
private Date updateTime;
/**
* @return id
*/
public Integer getId() {
return id;
}
/**
* @param id
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取管理员需要跳转的url
*
* @return url - 管理员需要跳转的url
*/
public String getUrl() {
return url;
}
/**
* 设置管理员需要跳转的url
*
* @param url 管理员需要跳转的url
*/
public void setUrl(String url) {
this.url = url;
}
/**
* 获取管理员上传的图片
*
* @return image - 管理员上传的图片
*/
public String getImage() {
return image;
}
/**
* 设置管理员上传的图片
*
* @param image 管理员上传的图片
*/
public void setImage(String image) {
this.image = image;
}
/**
* 获取是否删除0:未删除,1:已删除
*
* @return delete_state - 是否删除0:未删除,1:已删除
*/
public String getDeleteState() {
return deleteState;
}
/**
* 设置是否删除0:未删除,1:已删除
*
* @param deleteState 是否删除0:未删除,1:已删除
*/
public void setDeleteState(String deleteState) {
this.deleteState = deleteState;
}
/**
* 获取操作人
*
* @return op_user - 操作人
*/
public String getOpUser() {
return opUser;
}
/**
* 设置操作人
*
* @param opUser 操作人
*/
public void setOpUser(String opUser) {
this.opUser = opUser;
}
/**
* 获取操作时间
*
* @return update_time - 操作时间
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* 设置操作时间
*
* @param updateTime 操作时间
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
} | [
"teng.liang@newtouch.cn"
] | teng.liang@newtouch.cn |
21a843e963ed865fa368cbd75dbdc139be3d859d | 542f0cc719f1ede8cd255686971912af158cda15 | /StopLimit2/src/stoplimit2/StopLimitFrame2.java | f7a4951955e15e3dd7e954d4221baef24715f75d | [] | no_license | yaakoubox/stoplimit2 | e33c056d833012da1c0bf138707c67ef894146fd | 780b2dd72c6dbf4747783f473d0444be37c35625 | refs/heads/master | 2020-04-04T17:13:26.169011 | 2018-11-04T18:31:27 | 2018-11-04T18:31:27 | 156,112,261 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,561 | 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 stoplimit2;
import java.awt.AWTException;
import java.awt.event.KeyEvent;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author YOUCEF2
*/
public class StopLimitFrame2 extends javax.swing.JFrame {
/**
* Creates new form StopLimitFrame2
*/
public StopLimitFrame2() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
TxtCeck = new javax.swing.JTextField();
jLabel1 = new javax.swing.JLabel();
BtnCheck = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
TxtCeck.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
TxtCeckActionPerformed(evt);
}
});
jLabel1.setText("Now Price");
BtnCheck.setText("Check");
BtnCheck.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
BtnCheckActionPerformed(evt);
}
});
jButton1.setText("Exit");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(165, 165, 165)
.addComponent(jLabel1)
.addGap(25, 25, 25)
.addComponent(TxtCeck, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(79, 79, 79)
.addComponent(BtnCheck)
.addGap(239, 239, 239)
.addComponent(jButton1)))
.addContainerGap(84, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(TxtCeck, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1))
.addGap(18, 18, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(BtnCheck)
.addComponent(jButton1))
.addGap(29, 29, 29))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void TxtCeckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TxtCeckActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_TxtCeckActionPerformed
private void BtnCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BtnCheckActionPerformed
try {
go g = new go();
CoinRobot c = new CoinRobot();
String afterchange =g.CheckAndChangePoint(TxtCeck.getText());
double diffrent = Double.parseDouble(afterchange)-Double.parseDouble(g.Get("NOW_PRICE"));
if (diffrent > 0) {
g.ChangeStopLitmitPrice(diffrent);
g.ChangeNowPrice(Double.parseDouble(afterchange));
c.oneLeftClickWithMouse(820, 570);// close the first program
c.wait(50);
c.oneLeftClickWithMouse(290, 870);// open the browser
c.wait(50);
c.oneLeftClickWithMouse(1220, 800);// cancel the old order
c.wait(50);
c.oneLeftClickWithMouse(740, 485);// confrmation of cancel the oreder
c.wait(50);
c.MouseMove(950, 598);
c.wait(50);
c.HoldMouse();
c.wait(50);
c.MouseMove(860, 598);
c.wait(50);
c.LetHoldMouse();
c.wait(150);
c.Typing(g.Get("STOP_LIMIT_PRICE"));// typinf the ,=new priccz
c.wait(150);
c.MouseMove(950, 627);
c.wait(50);
c.HoldMouse();
c.MouseMove(860, 627);
c.wait(50);
c.LetHoldMouse();
c.wait(150);
c.Typing(g.Get("STOP_LIMIT_PRICE"));// typinf the ,=new priccz
c.wait(150);
c.oneLeftClickWithMouse(1010, 670); //100%
c.wait(150);
c.oneLeftClickWithMouse(900, 730);// put the order
c.wait(50);
c.oneLeftClickWithMouse(740, 490);// confrmation of the oreder
c.wait(50);
c.oneLeftClickWithMouse(1506, 12);// hide the brwoser
c.wait(50);
c.oneLeftClickWithMouse(820, 570);// close the first programc.wait(100);
c.wait(50);
c.oneLeftClickWithMouse(220, 800);// open the first program
c.wait(50);
c.pressKeybord(KeyEvent.VK_ENTER);// pres enter for open the first program
c.wait(150);
c.oneLeftClickWithMouse(750, 575);//run the first prgram
} else {
c.wait(50);
c.oneLeftClickWithMouse(820, 570);// close the first programc.wait(100);
c.wait(50);
c.oneLeftClickWithMouse(220, 800);// open the first program
c.wait(50);
c.pressKeybord(KeyEvent.VK_ENTER);// pres enter for open the first program
c.wait(150);
c.oneLeftClickWithMouse(750, 575);//run the first prgram
}
} catch (AWTException ex) {
Logger.getLogger(StopLimitFrame2.class.getName()).log(Level.SEVERE, null, ex);
}
///////////////////////////////////////////////////////////////////////////////////////////////////
/* try {
go g = new go();
CoinRobot c = new CoinRobot();
String afterchange =g.CheckAndChangePoint(TxtCeck.getText());
double diffrent = Double.parseDouble(afterchange)-Double.parseDouble(g.Get("NOW_PRICE"));
if (diffrent > 0) {
g.ChangeStopLitmitPrice(diffrent);
g.ChangeNowPrice(Double.parseDouble(afterchange));
c.wait(100);
c.oneLeftClickWithMouse(1208, 805);
c.wait(100);
c.oneLeftClickWithMouse(660, 545);
c.wait(100);
c.MouseMove(950, 598);
c.HoldMouse();
c.wait(100);
c.MouseMove(870, 598);
c.LetHoldMouse();
c.Typing(g.Get("STOP_LIMIT_PRICE"));
c.wait(100);
//
//c.wait(100);
c.MouseMove(950, 625);
c.HoldMouse();
c.wait(100);
c.MouseMove(870, 625);
c.LetHoldMouse();
c.Typing(g.Get("STOP_LIMIT_PRICE"));
c.wait(100);
c.oneLeftClickWithMouse(1010, 670);
c.wait(500);
c.oneLeftClickWithMouse(900, 730);
c.wait(100);
c.oneLeftClickWithMouse(1506, 12);
c.wait(100);
c.oneLeftClickWithMouse(820, 570);
c.wait(100);
c.oneLeftClickWithMouse(30, 880);
c.wait(100);
c.Typing("mkmlksdijkjasbijj.java");//fitst program
c.wait(200);
c.pressKeybord(KeyEvent.VK_DOWN);
c.wait(200);
c.pressKeybord(KeyEvent.VK_DOWN);
c.wait(200);
c.pressKeybord(KeyEvent.VK_DOWN);
c.wait(200);
c.pressKeybord(KeyEvent.VK_DOWN);
c.wait(200);
c.pressKeybord(KeyEvent.VK_DOWN);
c.wait(200);
c.pressKeybord(KeyEvent.VK_ENTER);
c.oneLeftClickWithMouse(750, 575);
} else {
c.wait(100);
c.oneLeftClickWithMouse(1506, 12);
c.wait(100);
c.oneLeftClickWithMouse(820, 570);
c.wait(100);
c.oneLeftClickWithMouse(30, 880);
c.wait(100);
c.Typing("mkmlksdijkjasbijj.java");//fitst program
c.wait(500);
c.pressKeybord(KeyEvent.VK_DOWN);
c.wait(200);
c.pressKeybord(KeyEvent.VK_DOWN);
c.wait(200);
c.pressKeybord(KeyEvent.VK_DOWN);
c.wait(200);
c.pressKeybord(KeyEvent.VK_DOWN);
c.wait(200);
c.pressKeybord(KeyEvent.VK_DOWN);
c.wait(200);
c.pressKeybord(KeyEvent.VK_ENTER);
c.wait(200);
c.oneLeftClickWithMouse(750, 575);
}
} catch (AWTException ex) {
Logger.getLogger(StopLimitFrame2.class.getName()).log(Level.SEVERE, null, ex);
}*/ //////////////////////////////////////////////////////////////////////////////////////////////////////////////
}//GEN-LAST:event_BtnCheckActionPerformed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
System.exit(0); // TODO add your handling code here:
}//GEN-LAST:event_jButton1ActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(StopLimitFrame2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(StopLimitFrame2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(StopLimitFrame2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(StopLimitFrame2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new StopLimitFrame2().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton BtnCheck;
private javax.swing.JTextField TxtCeck;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
// End of variables declaration//GEN-END:variables
}
| [
"YOUCEF2@192.168.0.213"
] | YOUCEF2@192.168.0.213 |
1bd619e410fb4946ddb31a7dcb95e3c010c409ec | 437fa87a34a5521291ce650d046601dbf8d88c5e | /com/dark/rs2/content/skill/agility/Agility.java | 64f394d0832a71ef875b45407adf0e47d28cac1b | [] | no_license | royalsora/src | f42fe699785bb6a31f3d491d39da260e82bb069d | 6f86d9a4e69745c92e05033f8d969ff53d653b96 | refs/heads/Branch1 | 2020-06-15T11:52:11.160779 | 2016-11-27T19:45:13 | 2016-11-27T19:45:13 | 75,297,238 | 0 | 0 | null | 2016-12-01T13:54:35 | 2016-12-01T13:54:34 | null | UTF-8 | Java | false | false | 4,217 | java | package com.dark.rs2.content.skill.agility;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.HashMap;
import java.util.function.Consumer;
import com.dark.core.cache.map.RSObject;
import com.dark.rs2.content.skill.Skills;
import com.dark.rs2.content.skill.agility.obstacle.Obstacle;
import com.dark.rs2.content.skill.agility.obstacle.ObstacleType;
import com.dark.rs2.entity.Location;
import com.dark.rs2.entity.player.Player;
import com.dark.rs2.entity.player.net.out.impl.SendMessage;
import com.dark.rs2.entity.player.net.out.impl.SendRemoveInterfaces;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonIOException;
import com.google.gson.JsonSyntaxException;
public enum Agility {
SINGLETON;
public static final int GNOME_FLAGS = 0b0111_1111;
public static final int BARBARIAN_FLAGS = 0b0111_1111;
public static final int WILDERNESS_FLAGS = 0b0001_1111;
private static final HashMap<Location, Obstacle> obstacles = new HashMap<>();
public static void declare() {
try {
Obstacle[] loaded = new Gson().fromJson(new BufferedReader(new FileReader("./data/def/skills/agility.json")), Obstacle[].class);
for (Obstacle obstacle : loaded) {
obstacles.put(obstacle.getStart(), obstacle);
}
} catch (JsonSyntaxException | JsonIOException | FileNotFoundException e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
// Write the obstacles so we don't have to deal with ugly as fuck wall
// of code.
// obstacles.put(new Location(2551, 3554), new Obstacle.ObstacleBuilder(ObstacleType.ROPE_SWING, new Location(2551, 3554), new Location(2551, 3549))
// .setExperience(22f)
// .setLevel(35)
// .setOrdinal(0)
// .setNext(new Obstacle.ObstacleBuilder(ObstacleType.ROPE_SWING, new Location(2551, 3554), new Location(2551, 3549)).build())
// .build());
try (FileWriter writer = new FileWriter(new File("./data/def/skills/agility1.json"))) {
Gson builder = new GsonBuilder().setPrettyPrinting().create();
writer.write(builder.toJson(obstacles.values()).replaceAll("\\{\n \"x\"", "\\{ \"x\"").replaceAll(",\n \"y\"", ", \"y\"").replaceAll(",\n \"z\"", ", \"z\"").replaceAll("\n \\},", " \\},"));
} catch (Exception e) {
}
}
public boolean fireObjectClick(Player player, Location location, RSObject obj) {
Obstacle obstacle = obstacles.get(player.getLocation());
if (obstacle == null) {
return false;
}
if (player.getAttributes().get("AGILITY_FLAGS") == null) {
player.getAttributes().set("AGILITY_FLAGS", 0);
}
if (obstacle.getType() == ObstacleType.ROPE_SWING) {
player.getAttributes().set("AGILITY_OBJ", obj);
}
obstacle.execute(player);
return false;
}
public static double TICKET_EXPERIENCE = 2.5;
public static boolean clickButton(Player player, int buttonId) {
int amount = -1;
Consumer<Player> onClick = null;
switch (buttonId) {
case 32195:
amount = 1;
onClick = p -> p.getSkill().addExperience(Skills.AGILITY, TICKET_EXPERIENCE * 1);
break;
case 32197:
amount = 10;
onClick = p -> p.getSkill().addExperience(Skills.AGILITY, TICKET_EXPERIENCE * 10);
break;
case 32198:
amount = 25;
onClick = p -> p.getSkill().addExperience(Skills.AGILITY, TICKET_EXPERIENCE * 25);
break;
case 32199:
amount = 100;
onClick = p -> p.getSkill().addExperience(Skills.AGILITY, TICKET_EXPERIENCE * 100);
break;
case 32200:
amount = 1_000;
onClick = p -> p.getSkill().addExperience(Skills.AGILITY, TICKET_EXPERIENCE * 1000);
break;
case 32190:
break;
case 32201:
break;
case 32189:
amount = 800;
onClick = p -> p.getInventory().addOrCreateGroundItem(2997, 1, true);
break;
}
if (amount > -1 && onClick != null) {
if (player.getInventory().hasItemAmount(2996, amount)) {
player.getInventory().remove(2996, amount);
onClick.accept(player);
player.send(new SendRemoveInterfaces());
return true;
} else {
player.send(new SendMessage("You do not have enough agility tickets to purchase that."));
return true;
}
}
return false;
}
} | [
"woofacebook@live.com"
] | woofacebook@live.com |
7ea5363b0d1dc260530c05f8c208b1cc6baeda4a | 9f853e2132fc7f86d28e4badeaaae973f2ae0e0f | /src/main/java/com/wynprice/vestige/elementbehaviour/ElementExplosion.java | 224b16d83f31147426e213ead8e0e4c71533b624 | [] | no_license | Wyn-Price/Vestige | 4001f22aca93fab6029ee21bc7358ef98e96ada4 | 20a8b30b7f6d6232d3f3ec5217a2f5525e6462a8 | refs/heads/master | 2021-08-19T04:26:23.427046 | 2017-11-24T19:17:40 | 2017-11-24T19:17:40 | 110,468,681 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,743 | java | package com.wynprice.vestige.elementbehaviour;
import java.util.List;
import java.util.Random;
import java.util.Set;
import com.google.common.collect.Sets;
import net.minecraft.block.BlockLiquid;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.enchantment.EnchantmentProtection;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.play.server.SPacketExplosion;
import net.minecraft.util.DamageSource;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.Explosion;
import net.minecraft.world.World;
import net.minecraftforge.fluids.IFluidBlock;
public class ElementExplosion extends Explosion {
/** whether or not the explosion sets fire to blocks around it */
private final boolean causesFire;
/** whether or not this explosion spawns smoke particles */
private final boolean damagesTerrain;
private final Random random;
private final World world;
private final double x;
private final double y;
private final double z;
private final Entity exploder;
private final float size;
private final Vec3d position;
public ElementExplosion(World worldIn, Entity entityIn, double x, double y, double z, float size, boolean flaming,
boolean damagesTerrain) {
super(worldIn, entityIn, x, y, z, size, flaming, damagesTerrain);
this.random = new Random();
this.world = worldIn;
this.exploder = entityIn;
this.size = size;
this.x = x;
this.y = y;
this.z = z;
this.causesFire = flaming;
this.damagesTerrain = damagesTerrain;
this.position = new Vec3d(this.x, this.y, this.z);
}
@Override
public void doExplosionA()
{
Set<BlockPos> set = Sets.<BlockPos>newHashSet();
for (int j = 0; j < (int)this.size; ++j)
{
for (int k = 0; k < (int)this.size; ++k)
{
for (int l = 0; l < (int)this.size; ++l)
{
if ((j == 0 || j == (int)this.size - 1 || k == 0 || k == (int)this.size - 1 || l == 0 || l == (int)this.size - 1))
{
double d0 = (double)((float)j / ((int)this.size - 1) * 2.0F - 1.0F);
double d1 = (double)((float)k / ((int)this.size - 1) * 2.0F - 1.0F);
double d2 = (double)((float)l / ((int)this.size - 1) * 2.0F - 1.0F);
double d3 = Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2);
d0 = d0 / d3;
d1 = d1 / d3;
d2 = d2 / d3;
float f = this.size * (0.7F + this.world.rand.nextFloat() * 0.6F);
double d4 = this.x;
double d6 = this.y;
double d8 = this.z;
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F)
{
BlockPos blockpos = new BlockPos(d4, d6, d8);
if(new Vec3d(d4, d6, d8).distanceTo(new Vec3d(this.x, this.y, this.z)) > this.size * 0.5f && this.world.rand.nextInt(5) != 0)
continue;
IBlockState iblockstate = this.world.getBlockState(blockpos);
float f2 = iblockstate.getBlock().getExplosionResistance(world, blockpos, (Entity)null, this);
if (iblockstate.getMaterial() != Material.AIR && !(iblockstate.getBlock() instanceof IFluidBlock) && !(iblockstate.getBlock() instanceof BlockLiquid))
f -= f2 * 0.1F;
if (f > 0.0F )
set.add(blockpos);
d4 += d0 * 0.30000001192092896D;
d6 += d1 * 0.30000001192092896D;
d8 += d2 * 0.30000001192092896D;
}
}
}
}
}
this.getAffectedBlockPositions().addAll(set);
float f3 = this.size * 2.0F;
int k1 = MathHelper.floor(this.x - (double)f3 - 1.0D);
int l1 = MathHelper.floor(this.x + (double)f3 + 1.0D);
int i2 = MathHelper.floor(this.y - (double)f3 - 1.0D);
int i1 = MathHelper.floor(this.y + (double)f3 + 1.0D);
int j2 = MathHelper.floor(this.z - (double)f3 - 1.0D);
int j1 = MathHelper.floor(this.z + (double)f3 + 1.0D);
List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this.exploder, new AxisAlignedBB((double)k1, (double)i2, (double)j2, (double)l1, (double)i1, (double)j1));
Vec3d vec3d = new Vec3d(this.x, this.y, this.z);
for (int k2 = 0; k2 < list.size(); ++k2)
{
Entity entity = list.get(k2);
if (!entity.isImmuneToExplosions())
{
double d12 = entity.getDistance(this.x, this.y, this.z) / (double)f3;
if (d12 <= 1.0D)
{
double d5 = entity.posX - this.x;
double d7 = entity.posY + (double)entity.getEyeHeight() - this.y;
double d9 = entity.posZ - this.z;
double d13 = (double)MathHelper.sqrt(d5 * d5 + d7 * d7 + d9 * d9);
if (d13 != 0.0D)
{
d5 = d5 / d13;
d7 = d7 / d13;
d9 = d9 / d13;
double d14 = (double)this.world.getBlockDensity(vec3d, entity.getEntityBoundingBox());
double d10 = (1.0D - d12) * d14;
entity.attackEntityFrom(DamageSource.causeExplosionDamage(this), (float)((int)((d10 * d10 + d10) / 2.0D * 7.0D * (double)f3 + 1.0D)));
double d11 = d10;
if (entity instanceof EntityLivingBase)
{
d11 = EnchantmentProtection.getBlastDamageReduction((EntityLivingBase)entity, d10);
}
entity.motionX += d5 * d11;
entity.motionY += d7 * d11;
entity.motionZ += d9 * d11;
if (entity instanceof EntityPlayer)
{
EntityPlayer entityplayer = (EntityPlayer)entity;
if (!entityplayer.isSpectator() && (!entityplayer.isCreative() || !entityplayer.capabilities.isFlying))
{
this.getPlayerKnockbackMap().put(entityplayer, new Vec3d(d5 * d10, d7 * d10, d9 * d10));
}
}
}
}
}
}
}
public static void explode(World world, Vec3d pos, float strength)
{
Explosion explosion = new ElementExplosion(world, null, pos.x, pos.y, pos.z, strength, false, true);
explosion.doExplosionA();
explosion.doExplosionB(true);
for (EntityPlayer entityplayer : world.playerEntities)
if (entityplayer.getDistanceSq(pos.x, pos.y, pos.z) < 4096.0D)
((EntityPlayerMP)entityplayer).connection.sendPacket(new SPacketExplosion(pos.x, pos.y, pos.z, strength, explosion.getAffectedBlockPositions(), (Vec3d)explosion.getPlayerKnockbackMap().get(entityplayer)));
}
}
| [
"wynprice999@gmail.com"
] | wynprice999@gmail.com |
c934baec4f928135fddc4b55777e1bd243c24f3b | 94637b5520248ece1287e2d2a91930eac5cfab68 | /src/main/java/mod/rp/railnet/client/util/effects/package-info.java | da8a01aaae29de7ad90a9958a1f7e062799dc596 | [] | no_license | MajorR/RailNet | c10efaddb38247130cbf4647675796e926478a2b | a8ccd1dcf3d129f5f395f0e4baa8c96f46c15bc9 | refs/heads/master | 2016-08-12T17:42:11.309962 | 2016-01-01T12:03:28 | 2016-01-01T12:03:28 | 48,875,895 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 84 | java | /**
*
*/
/**
* @author MajorR
*
*/
package mod.rp.railnet.client.util.effects; | [
"michael.olsencm@live.com"
] | michael.olsencm@live.com |
36cdc48db004065f144ee0a16616f54cf047292d | b730a6a19e59c4337603c294b729bc264ef79296 | /src/main/java/com/epam/dmrval/hibernateDao/UserHibernateDaoImp.java | 861246b7e4619341f58bc79274cd712c1f6ce1b5 | [] | no_license | dgrushetskiy/MarketplaceOnline_Spring | 202a7499314e85ffc445f2c10938b74b01b81189 | 2a7d176792b9a14526927e86b29af42a29db9701 | refs/heads/master | 2023-04-22T03:19:04.940832 | 2019-11-12T06:21:52 | 2019-11-12T06:21:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,876 | java | package com.epam.dmrval.hibernateDao;
import com.epam.dmrval.entity.User;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.persistence.criteria.CriteriaQuery;
import java.io.Serializable;
import java.util.List;
/** Author - Damir_Valeev */
@Component
public class UserHibernateDaoImp implements UserHibernateDao {
@Autowired SessionFactory sessionFactory;
@Override
public User findByLogin(String login) {
sessionFactory.getCurrentSession().beginTransaction();
CriteriaQuery<User> criteriaQuery =
sessionFactory.getCurrentSession().getCriteriaBuilder().createQuery(User.class);
criteriaQuery.from(User.class);
List<User> list = sessionFactory.getCurrentSession().createQuery(criteriaQuery).getResultList();
for (User u : list) {
if (u.getLogin().equals(login)) {
User temp = u;
sessionFactory.getCurrentSession().getTransaction().commit();
sessionFactory.getCurrentSession().close();
return temp;
}
}
return null;
}
@Override
public User getUserById(int id) {
sessionFactory.getCurrentSession().beginTransaction();
User temp = sessionFactory.getCurrentSession().get(User.class, id);
sessionFactory.getCurrentSession().getTransaction().commit();
sessionFactory.getCurrentSession().close();
return temp;
}
@Override
public int getIdUserByLogin(String user_login) {
User result = findByLogin(user_login);
return result.getId();
}
@Override
public void saveUser(User user) {
sessionFactory.getCurrentSession().beginTransaction();
Serializable result = sessionFactory.getCurrentSession().save(user);
sessionFactory.getCurrentSession().getTransaction().commit();
sessionFactory.getCurrentSession().close();
}
}
| [
"dmrval@ibida.ru"
] | dmrval@ibida.ru |
ba00e7459c16f4637dce838e9ebee506675374cb | 7ca05a52b1772e15c4718fecec54abaa31249b7a | /src/main/java/slowserver/Client.java | 4c79a6fe9cfe52b993b52757c758e79b9703e002 | [] | no_license | martiner/slow | 624ac65f412e6b5f898cdeb17cbcc32462d9e642 | 122e130cef3fe63a14f97f3492ce91c1ac04247f | refs/heads/master | 2022-12-23T14:15:58.482119 | 2020-10-13T00:21:40 | 2021-04-29T09:38:24 | 24,992,227 | 1 | 0 | null | 2022-12-16T02:26:05 | 2014-10-09T14:14:19 | Java | UTF-8 | Java | false | false | 1,212 | java | package slowserver;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.springframework.http.ResponseEntity;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
import java.util.concurrent.TimeUnit;
import static slowserver.Server.PORT;
public class Client {
private static final int TIMEOUT = (int) TimeUnit.SECONDS.toMillis(10);
public static void main(String... args) {
final CloseableHttpClient client = HttpClientBuilder.create()
.setDefaultRequestConfig(RequestConfig.custom()
.setSocketTimeout(TIMEOUT)
.setConnectTimeout(TIMEOUT)
.setConnectionRequestTimeout(TIMEOUT)
.build())
.build();
final RestTemplate rest = new RestTemplate(new HttpComponentsClientHttpRequestFactory(client));
final ResponseEntity<String> entity = rest.getForEntity("http://localhost:" + PORT + "/dummy", String.class);
System.out.println(entity);
}
}
| [
"martin.caslavsky@gooddata.com"
] | martin.caslavsky@gooddata.com |
eee59236556fbcf964bdcfd760205ffa94417b76 | 5e4100a6611443d0eaa8774a4436b890cfc79096 | /src/main/java/com/alipay/api/domain/AlipayDataDataserviceAdCreativeQueryModel.java | 85136cdd54efd4ee712991fb45e457b95998c71f | [
"Apache-2.0"
] | permissive | coderJL/alipay-sdk-java-all | 3b471c5824338e177df6bbe73ba11fde8bc51a01 | 4f4ed34aaf5a320a53a091221e1832f1fe3c3a87 | refs/heads/master | 2020-07-15T22:57:13.705730 | 2019-08-14T10:37:41 | 2019-08-14T10:37:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 979 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 查询创意详情
*
* @author auto create
* @since 1.0, 2019-07-30 17:27:37
*/
public class AlipayDataDataserviceAdCreativeQueryModel extends AlipayObject {
private static final long serialVersionUID = 6238248658461352119L;
/**
* 灯火平台提供给外部系统的访问token
*/
@ApiField("biz_token")
private String bizToken;
/**
* 外部平台导入广告库后,广告投放创意对应的外部资源ID
*/
@ApiField("creative_outer_id")
private String creativeOuterId;
public String getBizToken() {
return this.bizToken;
}
public void setBizToken(String bizToken) {
this.bizToken = bizToken;
}
public String getCreativeOuterId() {
return this.creativeOuterId;
}
public void setCreativeOuterId(String creativeOuterId) {
this.creativeOuterId = creativeOuterId;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
e02a07b35a40f393942b5839588e5e5ea4d1be3e | dc74acb48b5bac4dad63fa7460ec0dd48b81beff | /src/main/java/io/swagger/client/model/GetLoanProductsPrincipalVariationsForBorrowerCycle.java | 9fe0b6dd138c3412268b196b0f0463a398a61f26 | [] | no_license | kangbreder/Swagger-codegen | cd6bbc7ba2653dfbefef7bb5d59e3e04ea5c5077 | 6b77816bfbe2b7380f917d2d625b2cfdd3619973 | refs/heads/master | 2022-06-28T04:11:36.746173 | 2019-07-18T19:31:50 | 2019-07-18T19:31:50 | 197,645,187 | 0 | 0 | null | 2022-05-20T21:03:05 | 2019-07-18T19:28:09 | Java | UTF-8 | Java | false | false | 8,521 | java | /*
* Apache Fineract API Documentation
* Apache Fineract is a secure, multi-tenanted microfinance platform. <br /> The goal of the Apache Fineract API is to empower developers to build apps on top of the Apache Fineract Platform. The reference app [ https://demo.openmf.org ] (username: mifos, password: password) works on the same demo tenant as the interactive links in this documentation. <br/>The API is organized around REST [ https://en.wikipedia.org/wiki/Representational_state_transfer ] <br/> Find out more about Apache Fineract on [ https://demo.openmf.org/api-docs/apiLive.htm#top ] <br/> You can Try The API From Your Browser itself at [ https://demo.openmf.org/api-docs/apiLive.htm#interact ] <br/> The Generic Options are available at [ https://demo.openmf.org/api-docs/apiLive.htm#genopts ] <br/> Find out more about Updating Dates and Numbers at [ https://demo.openmf.org/api-docs/apiLive.htm#dates_and_numbers ] <br/> For the Authentication and the Basic of HTTP and HTTPS refer [ https://demo.openmf.org/api-docs/apiLive.htm#authentication_overview ] <br/> Check about ERROR codes at [ https://demo.openmf.org/api-docs/apiLive.htm#errors ] <br/> <br/> Please refer to the old documentation for any documentation queries [ https://demo.openmf.org/api-docs/apiLive.htm ] <br/> ______________________________________________________________________________________________________________________________
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.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 io.swagger.client.model.GetLoanProductsParamType;
import io.swagger.client.model.GetLoanProductsValueConditionType;
import java.io.IOException;
/**
* GetLoanProductsPrincipalVariationsForBorrowerCycle
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-07-17T20:34:25.795+01:00")
public class GetLoanProductsPrincipalVariationsForBorrowerCycle {
@SerializedName("id")
private Integer id = null;
@SerializedName("borrowerCycleNumber")
private Integer borrowerCycleNumber = null;
@SerializedName("paramType")
private GetLoanProductsParamType paramType = null;
@SerializedName("valueConditionType")
private GetLoanProductsValueConditionType valueConditionType = null;
@SerializedName("minValue")
private Float minValue = null;
@SerializedName("maxValue")
private Float maxValue = null;
@SerializedName("defaultValue")
private Float defaultValue = null;
public GetLoanProductsPrincipalVariationsForBorrowerCycle id(Integer id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@ApiModelProperty(example = "21", value = "")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public GetLoanProductsPrincipalVariationsForBorrowerCycle borrowerCycleNumber(Integer borrowerCycleNumber) {
this.borrowerCycleNumber = borrowerCycleNumber;
return this;
}
/**
* Get borrowerCycleNumber
* @return borrowerCycleNumber
**/
@ApiModelProperty(example = "1", value = "")
public Integer getBorrowerCycleNumber() {
return borrowerCycleNumber;
}
public void setBorrowerCycleNumber(Integer borrowerCycleNumber) {
this.borrowerCycleNumber = borrowerCycleNumber;
}
public GetLoanProductsPrincipalVariationsForBorrowerCycle paramType(GetLoanProductsParamType paramType) {
this.paramType = paramType;
return this;
}
/**
* Get paramType
* @return paramType
**/
@ApiModelProperty(value = "")
public GetLoanProductsParamType getParamType() {
return paramType;
}
public void setParamType(GetLoanProductsParamType paramType) {
this.paramType = paramType;
}
public GetLoanProductsPrincipalVariationsForBorrowerCycle valueConditionType(GetLoanProductsValueConditionType valueConditionType) {
this.valueConditionType = valueConditionType;
return this;
}
/**
* Get valueConditionType
* @return valueConditionType
**/
@ApiModelProperty(value = "")
public GetLoanProductsValueConditionType getValueConditionType() {
return valueConditionType;
}
public void setValueConditionType(GetLoanProductsValueConditionType valueConditionType) {
this.valueConditionType = valueConditionType;
}
public GetLoanProductsPrincipalVariationsForBorrowerCycle minValue(Float minValue) {
this.minValue = minValue;
return this;
}
/**
* Get minValue
* @return minValue
**/
@ApiModelProperty(example = "2000.0", value = "")
public Float getMinValue() {
return minValue;
}
public void setMinValue(Float minValue) {
this.minValue = minValue;
}
public GetLoanProductsPrincipalVariationsForBorrowerCycle maxValue(Float maxValue) {
this.maxValue = maxValue;
return this;
}
/**
* Get maxValue
* @return maxValue
**/
@ApiModelProperty(example = "20000.0", value = "")
public Float getMaxValue() {
return maxValue;
}
public void setMaxValue(Float maxValue) {
this.maxValue = maxValue;
}
public GetLoanProductsPrincipalVariationsForBorrowerCycle defaultValue(Float defaultValue) {
this.defaultValue = defaultValue;
return this;
}
/**
* Get defaultValue
* @return defaultValue
**/
@ApiModelProperty(example = "15000.0", value = "")
public Float getDefaultValue() {
return defaultValue;
}
public void setDefaultValue(Float defaultValue) {
this.defaultValue = defaultValue;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetLoanProductsPrincipalVariationsForBorrowerCycle getLoanProductsPrincipalVariationsForBorrowerCycle = (GetLoanProductsPrincipalVariationsForBorrowerCycle) o;
return Objects.equals(this.id, getLoanProductsPrincipalVariationsForBorrowerCycle.id) &&
Objects.equals(this.borrowerCycleNumber, getLoanProductsPrincipalVariationsForBorrowerCycle.borrowerCycleNumber) &&
Objects.equals(this.paramType, getLoanProductsPrincipalVariationsForBorrowerCycle.paramType) &&
Objects.equals(this.valueConditionType, getLoanProductsPrincipalVariationsForBorrowerCycle.valueConditionType) &&
Objects.equals(this.minValue, getLoanProductsPrincipalVariationsForBorrowerCycle.minValue) &&
Objects.equals(this.maxValue, getLoanProductsPrincipalVariationsForBorrowerCycle.maxValue) &&
Objects.equals(this.defaultValue, getLoanProductsPrincipalVariationsForBorrowerCycle.defaultValue);
}
@Override
public int hashCode() {
return Objects.hash(id, borrowerCycleNumber, paramType, valueConditionType, minValue, maxValue, defaultValue);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GetLoanProductsPrincipalVariationsForBorrowerCycle {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" borrowerCycleNumber: ").append(toIndentedString(borrowerCycleNumber)).append("\n");
sb.append(" paramType: ").append(toIndentedString(paramType)).append("\n");
sb.append(" valueConditionType: ").append(toIndentedString(valueConditionType)).append("\n");
sb.append(" minValue: ").append(toIndentedString(minValue)).append("\n");
sb.append(" maxValue: ").append(toIndentedString(maxValue)).append("\n");
sb.append(" defaultValue: ").append(toIndentedString(defaultValue)).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 ");
}
}
| [
"kangbreder@gmail.com"
] | kangbreder@gmail.com |
42aa00fd4935799b79e217238b25acacee7a3b92 | bd04f017114ef09a71bdf0efc0a5a83d0c07db83 | /spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/support/SimpleObjectProvider.java | cce1ea4f89cc38fd467240baeeacca0c14d62a7d | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | qqqqqcjq/spring-cloud-commons-2.2.6.RELEASE | 0090ffd604707ec94730bb79129653e01dd99a28 | d56eb0b72736a0bdb9dc9b58631269698b7e3429 | refs/heads/master | 2023-03-20T21:20:20.757354 | 2021-03-22T09:30:15 | 2021-03-22T09:30:15 | 350,282,055 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,478 | java | /*
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.loadbalancer.support;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.ObjectProvider;
/**
* Wrapper for {@link ObjectProvider}.
*
* @param <T> type of the object to fetch
* @author Spencer Gibb
*/
public class SimpleObjectProvider<T> implements ObjectProvider<T> {
private final T object;
public SimpleObjectProvider(T object) {
this.object = object;
}
@Override
public T getObject(Object... args) throws BeansException {
return this.object;
}
@Override
public T getIfAvailable() throws BeansException {
return this.object;
}
@Override
public T getIfUnique() throws BeansException {
return this.object;
}
@Override
public T getObject() throws BeansException {
return this.object;
}
}
| [
"caverspark@163.com"
] | caverspark@163.com |
78b635852e951ab8af977777792a03667ff529bf | dec6c5fb96af2e6ac37eb53d5d110210e6144e42 | /app/src/main/java/edu/cnm/deepdive/healthtracker/entities/Hospitalization.java | bd390784005d76a055bbe219f43d34f5429fea2f | [] | no_license | PMSchultz/HealthTrackerApp | 26b1e1aaf460dcf028cc78a81732939366e99d9e | 9b3ec56658c2521edd1c27062e2199db4d254f15 | refs/heads/master | 2021-05-06T19:33:53.353313 | 2017-11-27T23:38:04 | 2017-11-27T23:38:04 | 112,140,814 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,442 | java | package edu.cnm.deepdive.healthtracker.entities;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
@DatabaseTable(tableName = "HOSPITALIZATION")
/**
* Creates HOSPITALIZATION entity
*/
public class Hospitalization {
/* Links database table name to Hospitalization class with hospitalization id key */
@DatabaseField(columnName = "HOSPITALIZATION_ID", generatedId = true)
private int id;
/* Required user input of hospital/facility name*/
@DatabaseField(columnName = "HOSPITAL", canBeNull = false)
private String hospital;
/* Links hospitalization record to patient ID*/
@DatabaseField(columnName = "PATIENT_ID", canBeNull = false, foreign = true, foreignAutoRefresh = true)
private Patient patient;
/* Required user input of admission to hospital date*/
@DatabaseField(columnName = "ADMIT_DATE",
format = "yyyy-MM-dd", canBeNull = false)
private Date admitDate;
/* User input of discharge date*/
@DatabaseField(columnName = "DISCHARGE_DATE",
format = "yyyy-MM-dd", canBeNull = true)
private Date dischargeDate;
/* Required user input of reason for hospitalization*/
@DatabaseField(columnName = "REASON", canBeNull = false)
private String reason;
/* User input of attending physician during hospitalization*/
@DatabaseField(columnName = "PROVIDER", canBeNull = true)
private String provider;
/* User input of notes about hospitalization*/
@DatabaseField(columnName = "NOTES", canBeNull = true)
private String notes;
/* Getter for hospitalization id*/
public int getId() {
return id;
}
/* Getter for hospital name*/
public String getHospital() {
return hospital;
}
/* Setter for hospital name*/
public void setHospital(String hospital) {
this.hospital = hospital;
}
/* Getter for admit date*/
public Date getAdmitDate() {
return admitDate;
}
/* Setter for admit date*/
public void setAdmitDate(Date admitDate) {
this.admitDate = admitDate;
}
/* Getter for discharge date*/
public Date getDischargeDate() {
return dischargeDate;
}
/* Setter for discharge date*/
public void setDischargeDate(Date dischargeDate) {
this.dischargeDate = dischargeDate;
}
/* Getter for reason for hospitalization*/
public String getReason() {
return reason;
}
/* Setter for reason for hospitalization*/
public void setReason(String reason) {
this.reason = reason;
}
/* Getter for attending physician during hospitalization*/
public String getProvider() {
return provider;
}
/* Setter for attending physician during hospitalization*/
public void setProvider(String provider) {
this.provider = provider;
}
/* Getter for notes*/
public String getNotes() {
return notes;
}
/* Setter for notes*/
public void setNotes(String notes) {
this.notes = notes;
}
/* Getter for patient id*/
public Patient getPatient() {
return patient;
}
/* Setter for patient id*/
public void setPatient(Patient patient) {
this.patient = patient;
}
@Override
public String toString() {
DateFormat format = new SimpleDateFormat("M/d/yy");
return format.format(admitDate) + ": " + hospital + ": Reason: " + reason + " : "
+ ((dischargeDate != null) ? ("Discharge date: " + format.format(dischargeDate)) : "");
}
}
| [
"bdauburn@comcast.net"
] | bdauburn@comcast.net |
64a9fda93230a7251db24fc1a664948cbe661436 | 0ba4323216fc2a871e81184200285a65799da429 | /restServer/src/main/java/actestDemo/common/Request.java | 06dd32d13fe088904ee0246415113fbad0fa5bf0 | [] | no_license | sutaiyun/actestDemo | b3f73f847e4bced2748f987bc9f1f2f39b31e57f | 6c7e1a2e140555353eb9cad21ac8a49a33028ae6 | refs/heads/master | 2020-04-06T06:58:24.020365 | 2016-09-11T03:10:10 | 2016-09-11T03:10:10 | 64,662,763 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 98 | java | package actestDemo.common;
/**
* Created by sutaiyun on 2016/8/15.
*/
public class Request {
}
| [
"sutaiyun@longcheer.net"
] | sutaiyun@longcheer.net |
90426ab721137ec1824b60d3ef91e8136f3dfcab | feae203bd6d5c8a0bfd8951ab8683651dabd3264 | /moneyjinn-server/src/test/java/org/laladev/moneyjinn/businesslogic/service/impl/ContractpartnerAccountServiceTest.java | 586e609a5868789029d014c6d6cb87c67d6b5528 | [
"BSD-2-Clause"
] | permissive | OlliL/moneyjinn-server | 8b6658daa7f43493ad58284d9dc55561ea21b605 | be42aa4b3c19dfe094c09cd8b942cb27843c7ade | refs/heads/master | 2023-08-17T10:43:19.614073 | 2023-08-12T10:17:09 | 2023-08-12T10:17:09 | 41,574,937 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,695 | java |
package org.laladev.moneyjinn.businesslogic.service.impl;
import jakarta.inject.Inject;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.laladev.moneyjinn.AbstractTest;
import org.laladev.moneyjinn.model.ContractpartnerAccount;
import org.laladev.moneyjinn.model.ContractpartnerAccountID;
import org.laladev.moneyjinn.model.ContractpartnerID;
import org.laladev.moneyjinn.model.access.UserID;
import org.laladev.moneyjinn.model.exception.BusinessException;
import org.laladev.moneyjinn.server.builder.ContractpartnerAccountTransportBuilder;
import org.laladev.moneyjinn.server.builder.ContractpartnerTransportBuilder;
import org.laladev.moneyjinn.server.builder.UserTransportBuilder;
import org.laladev.moneyjinn.service.api.IContractpartnerAccountService;
class ContractpartnerAccountServiceTest extends AbstractTest {
@Inject
private IContractpartnerAccountService contractpartnerAccountService;
@Test
void test_createWithInvalidEntity_raisesException() {
final ContractpartnerAccount contractpartnerAccount = new ContractpartnerAccount();
final UserID userId = new UserID(1l);
Assertions.assertThrows(BusinessException.class, () -> {
this.contractpartnerAccountService.createContractpartnerAccount(userId,
contractpartnerAccount);
});
}
@Test
void test_updateWithInvalidEntity_raisesException() {
final ContractpartnerAccount contractpartnerAccount = new ContractpartnerAccount();
final UserID userId = new UserID(1l);
Assertions.assertThrows(BusinessException.class, () -> {
this.contractpartnerAccountService.updateContractpartnerAccount(userId,
contractpartnerAccount);
});
}
@Test
void test_userAeditsContractpartnerAccount_userBsameGroupSeesCachedChange() {
final UserID user1Id = new UserID(UserTransportBuilder.USER1_ID);
final UserID user2Id = new UserID(UserTransportBuilder.USER2_ID);
// this caches
ContractpartnerAccount contractpartnerAccount = this.contractpartnerAccountService
.getContractpartnerAccountById(user2Id, new ContractpartnerAccountID(
ContractpartnerAccountTransportBuilder.CONTRACTPARTNER_ACCOUNT1_ID));
contractpartnerAccount = this.contractpartnerAccountService
.getContractpartnerAccountById(user1Id, new ContractpartnerAccountID(
ContractpartnerAccountTransportBuilder.CONTRACTPARTNER_ACCOUNT1_ID));
final String comment = String.valueOf(System.currentTimeMillis());
contractpartnerAccount.getBankAccount().setAccountNumber(comment);
// this should also modify the cache of user 1!
this.contractpartnerAccountService.updateContractpartnerAccount(user1Id,
contractpartnerAccount);
// this should now retrieve the changed cache entry!
contractpartnerAccount = this.contractpartnerAccountService
.getContractpartnerAccountById(user2Id, new ContractpartnerAccountID(
ContractpartnerAccountTransportBuilder.CONTRACTPARTNER_ACCOUNT1_ID));
Assertions.assertEquals(comment, contractpartnerAccount.getBankAccount().getAccountNumber());
}
@Test
void test_userAaddsAContractpartnerAccount_userBsameGroupSeessItTooBecauseCacheWasReset() {
final UserID user1Id = new UserID(UserTransportBuilder.USER1_ID);
final UserID user2Id = new UserID(UserTransportBuilder.USER2_ID);
final ContractpartnerID contractpartnerId = new ContractpartnerID(
ContractpartnerTransportBuilder.CONTRACTPARTNER1_ID);
// this caches
final List<ContractpartnerAccount> allContractpartnerAccounts1 = this.contractpartnerAccountService
.getContractpartnerAccounts(user1Id, contractpartnerId);
final ContractpartnerAccount contractpartnerAccount = this.contractpartnerAccountService
.getContractpartnerAccountById(user2Id, new ContractpartnerAccountID(
ContractpartnerAccountTransportBuilder.CONTRACTPARTNER_ACCOUNT1_ID));
final String comment = String.valueOf(System.currentTimeMillis());
contractpartnerAccount.getBankAccount().setAccountNumber(comment);
// this should also modify the cache of user 1!
this.contractpartnerAccountService.createContractpartnerAccount(user2Id,
contractpartnerAccount);
final List<ContractpartnerAccount> allContractpartnerAccounts2 = this.contractpartnerAccountService
.getContractpartnerAccounts(user1Id, contractpartnerId);
// Cache of user1 should have been invalidated and the added ContractpartnerAccount should
// be now in the List of all ContractpartnerAccounts.
Assertions.assertNotEquals(allContractpartnerAccounts1.size(),
allContractpartnerAccounts2.size());
}
}
| [
"lehmann@ans-netz.de"
] | lehmann@ans-netz.de |
279fd404978a950b8e7f1eab1a4256bd49ec8c30 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/49/org/apache/commons/math/genetics/ListPopulation_getFittestChromosome_103.java | ab6eee095d67564a58da3b5e7617d490780ab13a | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 534 | java |
org apach common math genet
popul chromosom repres link list
version
list popul listpopul popul
access fittest chromosom popul
fittest chromosom
chromosom fittest chromosom getfittestchromosom
chromosom chromosom bestchromosom chromosom
chromosom chromosom chromosom
chromosom compar compareto chromosom bestchromosom
chromosom found
chromosom bestchromosom chromosom
chromosom bestchromosom
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
fc19294039e45a47b16d8f4f35a5b7a14f4d79b3 | f4ba7572fa05c051b411e3c1a19da3dbe596fe9a | /hybris/bin/custom/applecommerce/applecommercestorefront/web/src/com/hybris/applecommerce/storefront/filters/RequestLoggerFilter.java | 1f622517230965c37d7907c3140521142a455cdb | [] | no_license | KhajaMohiddin-20198300/b2bpoc | be5ca095bab38ef1ed9b60e2941f15431f9cd786 | a6bedc077df99d617e443ff0023880cb5f51728f | refs/heads/main | 2023-04-29T20:09:12.860707 | 2021-05-18T02:02:10 | 2021-05-18T02:02:10 | 368,306,312 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,434 | java | /*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package com.hybris.applecommerce.storefront.filters;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
import org.apache.log4j.Logger;
import org.springframework.web.filter.OncePerRequestFilter;
import com.google.common.base.Stopwatch;
/**
* A filter that logs each request. This is a spring configured filter that is executed by the PlatformFilterChain.
*/
public class RequestLoggerFilter extends OncePerRequestFilter
{
private static final Logger LOG = Logger.getLogger(RequestLoggerFilter.class.getName());
@Override
public void doFilterInternal(final HttpServletRequest request, final HttpServletResponse response,
final FilterChain filterChain) throws IOException, ServletException
{
if (LOG.isDebugEnabled())
{
final String requestDetails = buildRequestDetails(request);
writeDebugLog(requestDetails, "Begin");
logCookies(request);
final ResponseWrapper wrappedResponse = new ResponseWrapper(response);
final Stopwatch stopwatch = Stopwatch.createUnstarted();
stopwatch.start();
try
{
filterChain.doFilter(request, wrappedResponse);
}
finally
{
stopwatch.stop();
final int status = wrappedResponse.getStatus();
if (status != 0)
{
writeDebugLog(requestDetails, stopwatch.toString(), " (", String.valueOf(status), ")");
}
else
{
writeDebugLog(requestDetails, stopwatch.toString());
}
}
return;
}
filterChain.doFilter(request, response);
}
protected void logCookies(final HttpServletRequest httpRequest)
{
if (LOG.isDebugEnabled())
{
final Cookie[] cookies = httpRequest.getCookies();
if (cookies != null)
{
for (final Cookie cookie : cookies)
{
writeDebugLog("COOKIE Name: [", cookie.getName(), "] Path: [", cookie.getPath(), "] Value: [", cookie.getValue(),
"]");
}
}
}
}
protected void writeDebugLog(final String... messages)
{
if (LOG.isDebugEnabled())
{
LOG.debug(String.join(" ", messages));
}
}
protected String buildRequestDetails(final HttpServletRequest request)
{
String queryString = request.getQueryString();
if (queryString == null)
{
queryString = "";
}
final String requestUri = request.getRequestURI();
final String securePrefix = request.isSecure() ? "s" : " ";
final String methodPrefix = request.getMethod().substring(0, 1);
return securePrefix + methodPrefix + " [" + requestUri + "] [" + queryString + "] ";
}
protected static class ResponseWrapper extends HttpServletResponseWrapper
{
private int status;
public ResponseWrapper(final HttpServletResponse response)
{
super(response);
}
@Override
public void setStatus(final int status)
{
super.setStatus(status);
this.status = status;
}
@Override
public int getStatus()
{
return status;
}
@Override
public void sendError(final int status, final String msg) throws IOException
{
super.sendError(status, msg); // NOSONAR
this.status = status;
}
@Override
public void sendError(final int status) throws IOException
{
super.sendError(status);
this.status = status;
}
}
}
| [
"khaja.mohiddin2@wipro.com"
] | khaja.mohiddin2@wipro.com |
9b743888e2bf37c94c782672f52613e868faa648 | 79acf5fee238b0dda26d062387086e278e620a1c | /demo/src/main/java/demos/components/ScrollPaneDemo.java | 4d88651d60384c037a408e1fbd6fa890cad2a9ab | [
"Apache-2.0"
] | permissive | luqiang1000/JFoenix | e4e6969c1db6333bcfc049777f839874fc95efeb | a737d335b35fdec43714cc920c17ff2381449dec | refs/heads/master | 2021-01-24T16:14:23.643374 | 2017-03-28T10:36:26 | 2017-03-28T10:36:26 | 86,521,319 | 1 | 0 | null | 2017-03-29T00:40:43 | 2017-03-29T00:40:43 | null | UTF-8 | Java | false | false | 2,227 | java | package demos.components;
import com.jfoenix.controls.JFXButton;
import com.jfoenix.controls.JFXListView;
import com.jfoenix.controls.JFXScrollPane;
import com.jfoenix.svg.SVGGlyph;
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.ScrollPane;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
public class ScrollPaneDemo extends Application{
int counter = 0 ;
@Override
public void start(Stage stage) throws Exception {
JFXListView<Label> list = new JFXListView<Label>();
for(int i = 0 ; i < 100 ; i++) list.getItems().add(new Label("Item " + i));
list.getStyleClass().add("mylistview");
list.setMaxHeight(3400);
StackPane container = new StackPane(list);
container.setPadding(new Insets(24));
JFXScrollPane pane = new JFXScrollPane();
pane.setContent(container);
JFXButton button = new JFXButton("");
SVGGlyph arrow = new SVGGlyph(0, "FULLSCREEN", "M402.746 877.254l-320-320c-24.994-24.992-24.994-65.516 0-90.51l320-320c24.994-24.992 65.516-24.992 90.51 0 24.994 24.994 24.994 65.516 0 90.51l-210.746 210.746h613.49c35.346 0 64 28.654 64 64s-28.654 64-64 64h-613.49l210.746 210.746c12.496 12.496 18.744 28.876 18.744 45.254s-6.248 32.758-18.744 45.254c-24.994 24.994-65.516 24.994-90.51 0z", Color.WHITE);
arrow.setSize(20, 16);
button.setGraphic(arrow);
button.setRipplerFill(Color.WHITE);
pane.getTopBar().getChildren().add(button);
Label title = new Label("Title");
pane.getBottomBar().getChildren().add(title);
title.setStyle("-fx-text-fill:WHITE; -fx-font-size: 40;");
JFXScrollPane.smoothScrolling((ScrollPane) pane.getChildren().get(0));
StackPane.setMargin(title, new Insets(0,0,0,80));
StackPane.setAlignment(title, Pos.CENTER_LEFT);
StackPane.setAlignment(button, Pos.CENTER_LEFT);
StackPane.setMargin(button, new Insets(0,0,0,20));
final Scene scene = new Scene(new StackPane(pane), 600, 600, Color.WHITE);
stage.setTitle("JFX ListView Demo ");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) { launch(args); }
}
| [
"sshahine@ccc.com.lb"
] | sshahine@ccc.com.lb |
c39bd071a0a2b93d3ce3d63e9c03d32e8b6cc00a | 5ab18a8c41279c1902bed51e221b4179ad48bbd2 | /FLongApis/src/main/java/com/yanShu/fLongs/controllers/Category_Controller.java | 83ac27cc400fa18c23933580b1f5746f8b55e822 | [] | no_license | Saber201314/FLongApis | bcb81da02fe703c386a5975ca7b86469abd30b0a | 682dc9b121519224c9b21e617057da63164472ab | refs/heads/master | 2020-12-30T15:41:36.414914 | 2017-05-16T10:57:21 | 2017-05-16T10:57:21 | 91,159,347 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,664 | java | package com.yanShu.fLongs.controllers;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
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.ResponseBody;
import com.alibaba.fastjson.JSON;
import com.yanShu.fLongs.entitys.CategoryEntity;
import com.yanShu.fLongs.services.Icategory_Service;
@Controller
public class Category_Controller {
/**
*类目查询的业务层接口
*/
@Autowired
private Icategory_Service _category_service;
/**
*
*使用ID查询
*/
@ResponseBody
@RequestMapping("/findById")
public String findById(HttpServletRequest request) {
// TODO Auto-generated method stub
Integer id = Integer.parseInt(request.getParameter("id"));
List<CategoryEntity> categorys = _category_service.findById(id);
String categoryJson = JSON.toJSONString(categorys);
return categoryJson;
}
/**
*使用类目名称查询
*/
@ResponseBody
@RequestMapping("/findByName")
public String findByName(HttpServletRequest request) {
// TODO Auto-generated method stub
String name = request.getParameter("name");
List<CategoryEntity> categorys = _category_service.findByName(name);
String categoryJson = JSON.toJSONString(categorys);
return categoryJson;
}
/**
*查询属于几级类目
*/
@ResponseBody
@RequestMapping("/findByType")
public String findByType(HttpServletRequest request) {
// TODO Auto-generated method stub
String type = request.getParameter("type");
List<CategoryEntity> categorys = _category_service.findByType(type);
String categoryJson = JSON.toJSONString(categorys);
return categoryJson;
}
/**
*使用类目在淘宝上的ID查询
*/
@ResponseBody
@RequestMapping("/findByLeafId")
public String findByLeafId(HttpServletRequest request) {
// TODO Auto-generated method stub
String leafId = request.getParameter("leafId");
List<CategoryEntity> categorys = _category_service.findByLeafId(leafId);
String categoryJson = JSON.toJSONString(categorys);
return categoryJson;
}
/**
*根据类目节点取
*/
@ResponseBody
@RequestMapping("/findByLevelNode")
public String findByLevelNode(HttpServletRequest request) {
// TODO Auto-generated method stub
String levelNode = request.getParameter("levelNode");
List<CategoryEntity> categorys = _category_service.findByLevelNode(levelNode);
String categoryJson = JSON.toJSONString(categorys);
return categoryJson;
}
} | [
"171553438@qq.com"
] | 171553438@qq.com |
20e97f31baf7c3ddbd86669dd866afcf4e14efb0 | 613ceeb382683760b3ac0aceb8d28ab04a694f2a | /src/main/java/com/xy1m/amplify/model/campaign/Campaign.java | 262f45325deaf0ef1d1f80b2f65ba4d53897b429 | [
"Apache-2.0"
] | permissive | xy1m/outbrain-amplify-api-java-client | 3d156de1cddb0baba438a6214973aa3f75c0d025 | 056f1367529c0c5812c82e3a1064f18892cddba9 | refs/heads/master | 2022-11-24T20:35:13.135344 | 2021-02-03T02:16:54 | 2021-02-03T02:16:54 | 251,541,633 | 2 | 3 | Apache-2.0 | 2022-11-16T09:25:53 | 2020-03-31T08:21:08 | Java | UTF-8 | Java | false | false | 10,893 | java | package com.xy1m.amplify.model.campaign;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.xy1m.amplify.annotations.ReadOnly;
import com.xy1m.amplify.model.budget.Budget;
import com.xy1m.amplify.model.reference.objects.Bids;
import com.xy1m.amplify.model.reference.objects.CampaignBlockedSites;
import com.xy1m.amplify.model.reference.objects.CampaignOnAirSchedulingRules;
import com.xy1m.amplify.model.reference.objects.CampaignOptimization;
import com.xy1m.amplify.model.reference.objects.LiveStatus;
import com.xy1m.amplify.model.reference.objects.Targeting;
import com.xy1m.amplify.model.reference.objects.TrackingPixel;
import com.xy1m.amplify.model.reference.types.CampaignObjective;
import com.xy1m.amplify.model.reference.types.CampaignOnAirType;
import com.xy1m.amplify.model.reference.types.ContentType;
import com.xy1m.amplify.model.reference.types.PreixTrackingCode;
import com.xy1m.amplify.model.reference.types.SuffixTrackingCode;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id",
"name",
"marketerId",
"enabled",
"cpc",
"minimumCpc",
"currency",
"autoArchived",
"targeting",
"feeds",
"autoExpirationOfPromotedLinks",
"contentType",
"budget",
"budgetId",
"suffixTrackingCode",
"lastModified",
"creationTime",
"liveStatus",
"cpcPerAdEnabled",
"campaignBlockedSites",
"startHour",
"trackingPixels",
"bids",
"campaignOptimization",
"onAirType",
"scheduling",
"objective",
})
@JsonIgnoreProperties(ignoreUnknown = true)
public class Campaign {
@JsonProperty("id")
private String id;
@JsonProperty("name")
private String name;
@JsonProperty("marketerId")
private String marketerId;
@JsonProperty("enabled")
private Boolean enabled;
@JsonProperty("cpc")
private BigDecimal cpc;
@JsonProperty("minimumCpc")
@ReadOnly
private BigDecimal minimumCpc;
@JsonProperty("currency")
@ReadOnly
private String currency;
@JsonProperty("autoArchived")
private Boolean autoArchived;
@JsonProperty("targeting")
private Targeting targeting;
@JsonProperty("feeds")
private List<String> feeds;
@JsonProperty("autoExpirationOfPromotedLinks")
private Integer autoExpirationOfPromotedLinks;
@JsonProperty("contentType")
private ContentType contentType;
@JsonProperty("budget")
@ReadOnly
private Budget budget;
@JsonProperty("budgetId")
private String budgetId;
@JsonProperty("suffixTrackingCode")
private SuffixTrackingCode suffixTrackingCode;
@JsonProperty("preixTrackingCode")
private PreixTrackingCode preixTrackingCode;
@JsonProperty("lastModified")
private LocalDateTime lastModified;
@JsonProperty("creationTime")
private LocalDateTime creationTime;
@JsonProperty("liveStatus")
private LiveStatus liveStatus;
@JsonProperty("cpcPerAdEnabled")
private Boolean cpcPerAdEnabled;
@JsonProperty("campaignBlockedSites")
private CampaignBlockedSites campaignBlockedSites;
@JsonProperty("startHour")
private String startHour;
@JsonProperty("trackingPixels")
private List<TrackingPixel> trackingPixels;
@JsonProperty("bids")
private Bids bids;
@JsonProperty("campaignOptimization")
private CampaignOptimization campaignOptimization;
@JsonProperty("onAirType")
private CampaignOnAirType onAirType;
@JsonProperty("scheduling")
private CampaignOnAirSchedulingRules scheduling;
@JsonProperty("objective")
private CampaignObjective objective;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getMarketerId() {
return marketerId;
}
public void setMarketerId(String marketerId) {
this.marketerId = marketerId;
}
public Boolean getEnabled() {
return enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
public BigDecimal getCpc() {
return cpc;
}
public void setCpc(BigDecimal cpc) {
this.cpc = cpc;
}
public BigDecimal getMinimumCpc() {
return minimumCpc;
}
public void setMinimumCpc(BigDecimal minimumCpc) {
this.minimumCpc = minimumCpc;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public Boolean getAutoArchived() {
return autoArchived;
}
public void setAutoArchived(Boolean autoArchived) {
this.autoArchived = autoArchived;
}
public Targeting getTargeting() {
return targeting;
}
public void setTargeting(Targeting targeting) {
this.targeting = targeting;
}
public List<String> getFeeds() {
return feeds;
}
public void setFeeds(List<String> feeds) {
this.feeds = feeds;
}
public Integer getAutoExpirationOfPromotedLinks() {
return autoExpirationOfPromotedLinks;
}
public void setAutoExpirationOfPromotedLinks(Integer autoExpirationOfPromotedLinks) {
this.autoExpirationOfPromotedLinks = autoExpirationOfPromotedLinks;
}
public ContentType getContentType() {
return contentType;
}
public void setContentType(ContentType contentType) {
this.contentType = contentType;
}
public Budget getBudget() {
return budget;
}
public void setBudget(Budget budget) {
this.budget = budget;
}
public String getBudgetId() {
return budgetId;
}
public void setBudgetId(String budgetId) {
this.budgetId = budgetId;
}
public SuffixTrackingCode getSuffixTrackingCode() {
return suffixTrackingCode;
}
public void setSuffixTrackingCode(SuffixTrackingCode suffixTrackingCode) {
this.suffixTrackingCode = suffixTrackingCode;
}
public PreixTrackingCode getPreixTrackingCode() {
return preixTrackingCode;
}
public void setPreixTrackingCode(PreixTrackingCode preixTrackingCode) {
this.preixTrackingCode = preixTrackingCode;
}
public LocalDateTime getLastModified() {
return lastModified;
}
public void setLastModified(LocalDateTime lastModified) {
this.lastModified = lastModified;
}
public LocalDateTime getCreationTime() {
return creationTime;
}
public void setCreationTime(LocalDateTime creationTime) {
this.creationTime = creationTime;
}
public LiveStatus getLiveStatus() {
return liveStatus;
}
public void setLiveStatus(LiveStatus liveStatus) {
this.liveStatus = liveStatus;
}
public Boolean getCpcPerAdEnabled() {
return cpcPerAdEnabled;
}
public void setCpcPerAdEnabled(Boolean cpcPerAdEnabled) {
this.cpcPerAdEnabled = cpcPerAdEnabled;
}
public CampaignBlockedSites getCampaignBlockedSites() {
return campaignBlockedSites;
}
public void setCampaignBlockedSites(CampaignBlockedSites campaignBlockedSites) {
this.campaignBlockedSites = campaignBlockedSites;
}
public String getStartHour() {
return startHour;
}
public void setStartHour(String startHour) {
this.startHour = startHour;
}
public List<TrackingPixel> getTrackingPixels() {
return trackingPixels;
}
public void setTrackingPixels(List<TrackingPixel> trackingPixels) {
this.trackingPixels = trackingPixels;
}
public Bids getBids() {
return bids;
}
public void setBids(Bids bids) {
this.bids = bids;
}
public CampaignOptimization getCampaignOptimization() {
return campaignOptimization;
}
public void setCampaignOptimization(CampaignOptimization campaignOptimization) {
this.campaignOptimization = campaignOptimization;
}
public CampaignOnAirType getOnAirType() {
return onAirType;
}
public void setOnAirType(CampaignOnAirType onAirType) {
this.onAirType = onAirType;
}
public CampaignOnAirSchedulingRules getScheduling() {
return scheduling;
}
public void setScheduling(CampaignOnAirSchedulingRules scheduling) {
this.scheduling = scheduling;
}
public CampaignObjective getObjective() {
return objective;
}
public void setObjective(CampaignObjective objective) {
this.objective = objective;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("Campaign{");
sb.append("id='").append(id).append('\'');
sb.append(", name='").append(name).append('\'');
sb.append(", marketerId='").append(marketerId).append('\'');
sb.append(", enabled=").append(enabled);
sb.append(", cpc=").append(cpc);
sb.append(", minimumCpc=").append(minimumCpc);
sb.append(", currency='").append(currency).append('\'');
sb.append(", autoArchived=").append(autoArchived);
sb.append(", targeting=").append(targeting);
sb.append(", feeds=").append(feeds);
sb.append(", autoExpirationOfPromotedLinks=").append(autoExpirationOfPromotedLinks);
sb.append(", contentType=").append(contentType);
sb.append(", budget=").append(budget);
sb.append(", budgetId='").append(budgetId).append('\'');
sb.append(", suffixTrackingCode=").append(suffixTrackingCode);
sb.append(", preixTrackingCode=").append(preixTrackingCode);
sb.append(", lastModified=").append(lastModified);
sb.append(", creationTime=").append(creationTime);
sb.append(", liveStatus=").append(liveStatus);
sb.append(", cpcPerAdEnabled=").append(cpcPerAdEnabled);
sb.append(", campaignBlockedSites=").append(campaignBlockedSites);
sb.append(", startHour='").append(startHour).append('\'');
sb.append(", trackingPixels=").append(trackingPixels);
sb.append(", bids=").append(bids);
sb.append(", campaignOptimization=").append(campaignOptimization);
sb.append(", onAirType=").append(onAirType);
sb.append(", scheduling=").append(scheduling);
sb.append(", objective=").append(objective);
sb.append('}');
return sb.toString();
}
}
| [
"zhangzhpeng@gmail.com"
] | zhangzhpeng@gmail.com |
a363d4ddbc525976c1b81d496736f62c59f1c419 | 7c331c4383092924de7e17a2b9b0afa5457a9231 | /ws-eclipse/funcoes_recebendo_funcoes/src/model/services/ProductService.java | 36642bd1c24c23ad21c260091133133bf0b8b41c | [
"MIT"
] | permissive | MateusMacial/Udemy_Java_Orientado_Objetos | 1d9791732bf4f588f075d5b73762978cd1f46cca | 368a976d11656a509228e6e004b63a4d0c396ac3 | refs/heads/main | 2023-06-02T18:09:43.014072 | 2021-06-14T23:24:04 | 2021-06-14T23:24:04 | 369,340,763 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 347 | java | package model.services;
import java.util.List;
import java.util.function.Predicate;
import entities.Product;
public class ProductService {
public double filteredSum(List<Product> list, Predicate<Product> criteria) {
double sum = 0.0;
for (Product p : list) {
if (criteria.test(p)) {
sum += p.getPrice();
}
}
return sum;
}
} | [
"mateus_macial@hotmail.com"
] | mateus_macial@hotmail.com |
babcb0adb4e7bbf15104f7e0de88ae3e216aaada | 91c39871a0c2f164dc1608898dba5cb6d02cc7a4 | /app/src/main/java/com/doronzehavi/dapper/model/entities/WatchesWrapper.java | a533fccbb2eec0d6d5e4448e7886ece72a5f664d | [] | no_license | doronz/Dapper | 4368c732ba0bc267eb7f2d5ea1161a868661d82f | 913291197fbad9ee47ff180ddee65ba048b77c21 | refs/heads/master | 2021-01-18T15:56:15.752961 | 2015-04-22T11:21:44 | 2015-04-22T11:21:44 | 34,370,683 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 348 | java | package com.doronzehavi.dapper.model.entities;
import java.io.Serializable;
import java.util.List;
public class WatchesWrapper implements Serializable {
private List<Watch> watches;
public WatchesWrapper(List<Watch> watches){
this.watches = watches;
}
public List<Watch> getWatches(){
return watches;
}
}
| [
"devdoron@gmail.com"
] | devdoron@gmail.com |
cf62379401e50c8afadca893f1da6a359f5c90f2 | c1f7a863e4937327f7252e63f27626bc53aa036a | /pet-clinic-data/src/main/java/guru/springframework/petclinic/repositories/PetTypeRepository.java | 6ee11a9c49c7f1813009924b0175434090b74d3f | [
"Apache-2.0"
] | permissive | ymaPereira/sfg-pet-clinic | 5add3ef7375f3e76207ae88997754d2da4a7db77 | a83145f4144bc57fe49ae629d6b99a7cdfeef7af | refs/heads/master | 2022-11-20T17:04:05.888559 | 2020-07-20T13:45:57 | 2020-07-20T13:45:57 | 276,390,242 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 253 | java | package guru.springframework.petclinic.repositories;
import org.springframework.data.repository.CrudRepository;
import guru.springframework.petclinic.models.PetType;
public interface PetTypeRepository extends CrudRepository<PetType, Long>{
}
| [
"emanueld.pereira2@gmail.com"
] | emanueld.pereira2@gmail.com |
4c2bfac78eafcab250a845c88cd3e7cf520e5bcf | 5b9099bb2b199316231aab57a67c7e1e999bef35 | /src/Paulo/exercises/WallArea.java | 64ffe724817f4ab9723cd50750de64134ae83220 | [] | no_license | buraksezgin/Java_Exercises | 4fad18c5879f1fb0841d0a21243212ea9e086899 | 203531842cdb1c6274879c326b256e0e3b77923f | refs/heads/master | 2022-03-15T19:08:39.993446 | 2019-11-15T15:57:04 | 2019-11-15T15:57:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 944 | java | package Paulo.exercises;
public class WallArea {
private double width;
private double height;
public WallArea() {
}
public WallArea(double width, double height) {
if(width<0) {
this.width = 0;
} else {
this.width = width;
}
if(height<0) {
this.height =0;
} else {
this.height = height;
}
}
public double getWidth() {
return this.width;
}
public double getHeight() {
return this.height;
}
public void setWidth(double width) {
if(width<0) {
this.width =0;
} else {
this.width = width;
}
}
public void setHeight(double height) {
if(height<0) {
this.height =0;
} else {
this.height = height;
}
}
public double getArea() {
return this.width * this.height;
}
}
| [
"36425309+PJOGomes@users.noreply.github.com"
] | 36425309+PJOGomes@users.noreply.github.com |
98f7c3942cd98f077dd6c4db32713ceca916d310 | fa4df98478b6685977bd74fff048549bc0bcfecd | /app/src/main/java/com/hdmoviesnew/hdmovies2020/vera_adapter/CountryAdapter.java | 05b793b58cd4e16bec461c553742d1f91126eb04 | [] | no_license | fandofastest/newmvvera | d61a03683ae982c13e00eb5b046e5340103da6a8 | b4911e8bbf843652f17f84596687bb624689cc90 | refs/heads/master | 2021-02-12T06:28:48.644026 | 2020-03-03T07:25:03 | 2020-03-03T07:25:03 | 244,568,892 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,736 | java | package com.hdmoviesnew.hdmovies2020.vera_adapter;
import android.content.Context;
import android.content.Intent;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.hdmoviesnew.hdmovies2020.ItemMovieActivity;
import com.hdmoviesnew.hdmovies2020.R;
import com.hdmoviesnew.hdmovies2020.vera_model.CommonModels;
import java.util.ArrayList;
import java.util.List;
public class CountryAdapter extends RecyclerView.Adapter<CountryAdapter.OriginalViewHolder> {
private List<CommonModels> items = new ArrayList<>();
private Context ctx;
private String type;
private int c=0;
public CountryAdapter(Context context, List<CommonModels> items,String type) {
this.items = items;
ctx = context;
this.type=type;
}
@Override
public CountryAdapter.OriginalViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
CountryAdapter.OriginalViewHolder vh;
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.card_country, parent, false);
vh = new CountryAdapter.OriginalViewHolder(v);
return vh;
}
@Override
public void onBindViewHolder(CountryAdapter.OriginalViewHolder holder, final int position) {
final CommonModels obj = items.get(position);
holder.name.setText(obj.getTitle());
holder.lyt_parent.setCardBackgroundColor(ctx.getResources().getColor(getColor()));
holder.lyt_parent.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(ctx, ItemMovieActivity.class);
intent.putExtra("id",obj.getId());
intent.putExtra("title",obj.getTitle());
intent.putExtra("type",type);
ctx.startActivity(intent);
}
});
}
@Override
public int getItemCount() {
return items.size();
}
public class OriginalViewHolder extends RecyclerView.ViewHolder {
public TextView name;
private CardView lyt_parent;
public OriginalViewHolder(View v) {
super(v);
name = v.findViewById(R.id.name);
lyt_parent=v.findViewById(R.id.lyt_parent);
}
}
private int getColor(){
int colorList[] = {R.color.red_400,R.color.blue_400,R.color.indigo_400,R.color.orange_400,R.color.light_green_400,R.color.blue_grey_400};
if (c>=6){
c=0;
}
int color = colorList[c];
c++;
return color;
}
} | [
"fandofast@gmail.com"
] | fandofast@gmail.com |
f9975b5915d9c2bafbcbc105685f69bb5a1b1520 | 8a6342942695cfd83cde43fbf9a64b5d697135c6 | /src/main/java/com/denis/sb/react/entity/CustomUser.java | fd4ab054bb115a4509fd1236daf9da5063911604 | [] | no_license | denisgulev/spring-boot-react-crud-app | 076b3e85bb4f199f34336ab7f11d14f3ac3f48bd | e3b769ccee42007de8c377386227831023fc03ca | refs/heads/main | 2023-04-11T10:13:04.588668 | 2021-04-26T22:10:52 | 2021-04-26T22:10:52 | 353,494,676 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,239 | java | package com.denis.sb.react.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "CUSTOM_USER")
public class CustomUser {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(nullable = false, updatable = false)
private long id;
@Column(nullable = false, unique = true)
private String username;
@Column(nullable = false)
private String password;
@Column(nullable = false)
private String role;
public CustomUser() {
}
public CustomUser(String username, String password, String role) {
this.username = username;
this.password = password;
this.role = role;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
}
| [
"denis_13@hotmail.it"
] | denis_13@hotmail.it |
4ee14d06ef49ae7c3e75cb9686f331ae70f878eb | b02cd9ff25f882782c1b57cf5e62af70bdd8ba2e | /persistence/src/main/java/br/ensalamento/persistence/ProfessorDAO.java | 18901a5a4a777559d053b104d192243a243b9032 | [] | no_license | fernandogodoy/ensalamento | dcc7c03f0dd9794d172e18284d50ac77350cee93 | 85479eecd4caf062b05aa3696e1a599301b18117 | refs/heads/master | 2021-01-21T04:40:33.857037 | 2016-06-22T05:44:11 | 2016-06-22T05:44:11 | 51,623,849 | 0 | 5 | null | 2016-06-22T05:44:11 | 2016-02-12T23:47:02 | Java | UTF-8 | Java | false | false | 209 | java | package br.ensalamento.persistence;
import java.util.List;
import br.ensalamento.domain.Professor;
public interface ProfessorDAO extends GenericDAO<Professor>{
List<Professor> consultar(String nome);
}
| [
"fernando.wesleypf@gmail.com"
] | fernando.wesleypf@gmail.com |
aa781e92203acded0677ec66bd5d22459fea403b | f3bef1c64c69801583d6739a8a1e6ef5aa17389d | /src/test/java/com/query/maker/Mail.java | 42aa42cc65cb675edbd7ef66be7c96685a3b1446 | [] | no_license | sdugene/query.maker.java | 3e74e2734a5898c0ca04eab1f314edcbe1843ced | c53b2a1630abe94815e4280f7f53c615d39ff6ee | refs/heads/master | 2021-01-12T05:52:29.761545 | 2018-08-29T14:58:14 | 2018-08-29T14:58:14 | 77,223,564 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 351 | java | package com.query.maker;
import javax.persistence.*;
@javax.persistence.Entity
@Table(name = "mail")
public class Mail extends Entity
{
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
@Override
public Long getId() { return id; }
public void setId(Long id) { this.id = id; }
} | [
"sebastien.dugene@gmail.com"
] | sebastien.dugene@gmail.com |
10e068d422c9f9f8eb518214e204863c57796008 | 46769f08bcc175b6bd6c61c0e6c9e0fccce4332d | /zip/Zip.java | 80d4c4cf781f63094ad455a8fee9fa29e9cadef6 | [] | no_license | DevendranR/Templates | 2737b99b8d164cff574f91b89edb36a330215f68 | b2b75a7eba5d6bed76f1acd61a48d1e62c931ddb | refs/heads/master | 2020-03-07T05:45:51.004544 | 2019-02-02T03:53:14 | 2019-02-02T03:53:14 | 127,304,930 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,035 | java | package zip;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
public class Zip {
public static void getAllFiles(File dir, List<File> fileList) {
try {
File[] files = dir.listFiles();
for (File file : files) {
fileList.add(file);
if (file.isDirectory()) {
getAllFiles(file, fileList);
} else {
System.out.println("No Files in path");
}
}
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
}
public static void writeZipFile(String pathOfResultantZippedFiles,File directoryToZip) {
try {
FileOutputStream fos = new FileOutputStream(pathOfResultantZippedFiles+directoryToZip.getName() + ".zip");
ZipOutputStream zos = new ZipOutputStream(fos);
List<File> fileList = new ArrayList<File>();
getAllFiles(directoryToZip, fileList);
for (File file : fileList) {
if (!file.isDirectory()) {
addToZip(directoryToZip, file, zos);
}
}
zos.close();
fos.close();
} catch (IOException e) {
System.out.println(e.getMessage());
}
}
public static void addToZip(File directoryToZip, File file, ZipOutputStream zos) {
try {
FileInputStream fis = new FileInputStream(file);
// we want the zipEntry's path to be a relative path that is relative
// to the directory being zipped, so chop off the rest of the path
String zipFilePath = file.getCanonicalPath().substring(directoryToZip.getCanonicalPath().length() + 1,
file.getCanonicalPath().length());
ZipEntry zipEntry = new ZipEntry(zipFilePath);
zos.putNextEntry(zipEntry);
IOUtils.copy(fis, zos);
zos.closeEntry();
fis.close();
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
}
| [
"35388086+DevendranR@users.noreply.github.com"
] | 35388086+DevendranR@users.noreply.github.com |
a472b0f67faf03212a1e39e85654d236809edbbe | 659c2ac96f662e60d685f1c1df0f843c2346e9fb | /src/main/java/io/kongcode/hatchery/Injector.java | 14ec858d6756d01cfbcf7dc8046a64bc2cde5d23 | [] | no_license | kongcode/hatchery | 076f296c883f0e32c610507a57686a889f032134 | 984257711b6d97e4db0c6f0ac7ec9753b447dba1 | refs/heads/master | 2020-04-10T03:11:34.058531 | 2015-08-14T05:06:42 | 2015-08-14T05:06:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 227 | java | package io.kongcode.hatchery;
/**
* Created by JoãoPedro on 13/08/2015.
*/
public interface Injector {
static Injector instance() {
return InjectorImpl.getInstance();
}
<T> T create(Class<T> clazz);
}
| [
"jpfperondini@gmail.com"
] | jpfperondini@gmail.com |
8d45f3042704c5964690e2c999500b13e5bb0253 | 29a143ed36df7ab5484d1c63e3ad8d95814896c0 | /flow_service/src/main/java/com/sky/flow/service/FlowActionService.java | e7b80eca38569b445f4b1d6db2355cb6c5af4371 | [] | no_license | sky5274/crawle_project | 02eceb8fcfb8ba1c845a147d81accc5152387613 | eb706b8bfcaef1fbf75ad76583d0568e9f93fa84 | refs/heads/master | 2022-12-21T06:47:53.406219 | 2021-02-15T14:53:49 | 2021-02-15T14:53:49 | 163,048,587 | 1 | 1 | null | 2022-12-16T09:41:16 | 2018-12-25T05:23:26 | Java | UTF-8 | Java | false | false | 333 | java | package com.sky.flow.service;
/**
* 流程操作
* @author 王帆
* @date 2019年5月16日 下午3:27:45
*/
public interface FlowActionService extends FlowDefinedActionService,FlowNodeActionService,FlowGroupActionService,
FlowNodeAttrActionService,FlowNodeEventActionService,FlowNodeLinkActionService{
}
| [
"tianlianyouren@163.com"
] | tianlianyouren@163.com |
066cafa6e56ec42943bfb44834cd980dc7f2b398 | c2d42d588410c0b71ac17a7bba5b8e09d0953442 | /src/com/barantschik/trinkets/raytracer/rendering/IntersectionData.java | c327b7979e2e83677fe4710825fc250a22f4cfe8 | [] | no_license | ben-baran/old-java-trinkets | 0890df60ffe3efdeddc45258526b6e79ddaa9185 | 0c1528c7e7d123acb7d4a4fe82842392acd243b3 | refs/heads/master | 2020-04-09T14:05:45.975241 | 2013-08-19T15:37:44 | 2013-08-19T15:37:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 567 | java | package com.barantschik.trinkets.raytracer.rendering;
public class IntersectionData
{
double t;
Renderable renderable;
int u, v;
int id;
public IntersectionData(double t, Renderable renderable)
{
this(t, renderable, -1, -1);
}
public IntersectionData(double t, Renderable renderable, int u, int v)
{
this(t, renderable, u, v, -1);
}
public IntersectionData(double t, Renderable renderable, int u, int v, int id)
{
this.t = t;
this.renderable = renderable;
this.u = u;
this.v = v;
this.id = id;
}
} | [
"bbarantschik@gmail.com"
] | bbarantschik@gmail.com |
a41fac310974d00862f1644e2aaf624b003f3264 | 7a9442951f08fc0242775e7e5ef9d941cb07cc45 | /SpringAOP_AsprctJ-XMLBased/src/Student.java | 907d59524ab3fd36ec155c609ffe2f68c29daeea | [] | no_license | gkota007/Spring-Examples | 3df2ac3bf2e80f34528d8fec5a160539a42c590e | c4b1d47a17de9c11bedd5e4701a8666c2936d69c | refs/heads/master | 2021-04-05T15:30:54.423943 | 2017-09-16T14:12:39 | 2017-09-16T14:12:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 165 | java |
public interface Student {
void addStudent();
String studentReturnValue();
void studentThrowException() throws Exception;
void studentAround(String name);
} | [
"hello@smlcodes.com"
] | hello@smlcodes.com |
793e1c8d8c2adc86fc3d1243ccb33b75e04fc10e | d883f3b07e5a19ff8c6eb9c3a4b03d9f910f27b2 | /Services/Aggregator/Lookup/src/main/java/com/sandata/one/aggregator/lookup/utils/adapter/DateAdapter.java | 0ba7ca2f24e75793fdc291674740921677f79a61 | [] | no_license | dev0psunleashed/Sandata_SampleDemo | ec2c1f79988e129a21c6ddf376ac572485843b04 | a1818601c59b04e505e45e33a36e98a27a69bc39 | refs/heads/master | 2021-01-25T12:31:30.026326 | 2017-02-20T11:49:37 | 2017-02-20T11:49:37 | 82,551,409 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 579 | java | package com.sandata.one.aggregator.lookup.utils.adapter;
import javax.xml.bind.DatatypeConverter;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
/**
* Date: 8/29/15
* Time: 9:45 AM
*/
public class DateAdapter {
public static Date parseDate(final String date) {
return DatatypeConverter.parseDate(date).getTime();
}
public static String printDate(final Date date) {
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
return DatatypeConverter.printDate(calendar);
}
}
| [
"pradeep.ganesh@softcrylic.co.in"
] | pradeep.ganesh@softcrylic.co.in |
53c0dfe53a144ecd96fbc00de34c394e7e2bffb8 | 73d3982ee8f747c4ad91335c8b9ccf2bd67bb58b | /app/src/main/java/com/androidmanifester/simpleemotionsgame/SelectWordActivity.java | 1598dfed994a7fa16d9ba3cab4f482f0ac696d0c | [] | no_license | ranjithstar256/EmotionsGame | 88547e771a953bdf9fb45f587a41fc7d4211da75 | 4d5cfc2a40fbb23608c7a7a61db19aabd915033f | refs/heads/master | 2021-01-19T14:41:36.971818 | 2017-08-21T05:24:32 | 2017-08-21T05:24:32 | 100,914,286 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,691 | java | package com.androidmanifester.simpleemotionsgame;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.ToggleButton;
import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.GravityEnum;
import com.afollestad.materialdialogs.MaterialDialog;
import com.afollestad.materialdialogs.Theme;
import java.util.ArrayList;
import java.util.List;
public class SelectWordActivity extends AppCompatActivity {
ArrayList<String> words;
ListView listView;
List<String> arrayAdapter;
String SelectedWord;
SharedPreferences sharedPreferences;
SharedPreferences.Editor editor;
ToggleButton toggleButton;
ImageView imageView;
int orientatn;
Integer[] imageId = {
R.drawable.happy,
R.drawable.sad,
R.drawable.good,
R.drawable.bad,
R.drawable.weird
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_select_word);
sharedPreferences=getSharedPreferences("sfname",MODE_PRIVATE);
orientatn=1;
editor=sharedPreferences.edit();
words=new ArrayList<String>();
words.add("Happy");
words.add("Sad");
words.add("Good");
words.add("Bad");
words.add("Weird");
listView=(ListView) findViewById(R.id.listv);
CustomList adapter = new
CustomList(SelectWordActivity.this, words, imageId);
/// arrayAdapter=new ArrayAdapter<String>(SelectWordActivity.this,android.R.layout.simple_list_item_1,words);
//listView.setAdapter(arrayAdapter);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
SelectedWord=words.get(position);
editor.putString("selectedword",SelectedWord).commit();
new MaterialDialog.Builder(SelectWordActivity.this)
.title("Select Orientation")
.content("")
.positiveText("portrait")
.negativeText("Landscape")
.positiveColorRes(R.color.material_red_400)
.negativeColorRes(R.color.material_red_400)
.titleGravity(GravityEnum.CENTER)
.titleColorRes(R.color.material_red_400)
.contentColorRes(android.R.color.white)
.iconRes(R.drawable.cool_blu)
.maxIconSize(50)
// .backgroundColorRes(R.color.material_blue_grey_800)
.dividerColorRes(R.color.accent)
// .btnSelector(R.drawable.md_btn_selector_custom, DialogAction.POSITIVE)
.positiveColor(Color.WHITE)
.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
orientatn=1;
startActivity(new Intent(SelectWordActivity.this, GameMode.class).putExtra("ori", orientatn));
}
})
.onNegative(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
orientatn=0;
startActivity(new Intent(SelectWordActivity.this, GameMode.class).putExtra("ori", orientatn));
}
})
.negativeColorAttr(android.R.attr.textColorSecondaryInverse)
.theme(Theme.DARK)
.show();
/*final Dialog dialog = new Dialog(SelectWordActivity.this);
dialog.setContentView(R.layout.dia);
toggleButton= (ToggleButton) dialog.findViewById(R.id.toggleButton2);
imageView= (ImageView) dialog.findViewById(R.id.imagev);
toggleButton.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
int orientation =getResources().getConfiguration().orientation;
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
orientatn=1;
} else {
orientatn=0;
}
}
});
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dialog.cancel();
startActivity(new Intent(SelectWordActivity.this,GameMode.class).putExtra("ori",orientatn));
}
});
dialog.show();*/
}
});
}
}
| [
"ranjithstar256@gmail.com"
] | ranjithstar256@gmail.com |
cb29cb2da9d74dd60e8f190a295f9a03ecb70998 | bd17bad8721a633dd7ce05d39e7dc92c545f2da8 | /src/main/java/com/bharath/flightreservation/controllers/ReservationRestController.java | 0d9ce9345ff7d9ad62f900cffcb128a5c731cdda | [] | no_license | tonysiao/flightreservation | 74e6a25b3c432b58b1c804ef98f86749e32032c3 | 4e89967d4c7e1b78f4ce11e8d7a24ab3e9f3690b | refs/heads/master | 2020-03-10T04:42:40.736050 | 2018-05-18T11:49:17 | 2018-05-18T11:49:17 | 129,198,976 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,199 | java | package com.bharath.flightreservation.controllers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bharath.flightreservation.dto.ReservationUpdateRequest;
import com.bharath.flightreservation.entities.Reservation;
import com.bharath.flightreservation.repos.ReservationRepository;
@RestController
public class ReservationRestController {
@Autowired
ReservationRepository reservationRepository;
@RequestMapping("/reservations/{id}")
public Reservation findReservation(@PathVariable("id") Long id) {
return reservationRepository.findOne(id);
}
@RequestMapping("/reservations")
public Reservation updateReservation(@RequestBody ReservationUpdateRequest request) {
Reservation reservation = reservationRepository.findOne(request.getId());
reservation.setNumberOfBags(request.getNumberOfBags());
reservation.setCheckedIn(request.getCheckedIn());
return reservationRepository.save(reservation);
}
}
| [
"tonysiao27@gmail.com"
] | tonysiao27@gmail.com |
03844a60a79709d995f40f97649d2adc9a6ac555 | 61004e474b7b2ad0071c16766f0f7874f04f9466 | /examples/gcs-to-bq-serverless-services/gcs2bq-spark/src/main/java/com/example/GCS2BQ.java | 276a383b44293827400a78bb38926c34ad1ea94d | [
"Apache-2.0"
] | permissive | GoogleCloudPlatform/professional-services | eb79751efae765a8c691a745e520f44f51bd715c | 0f51121b945bd74c7f667e74e8861fceda87565c | refs/heads/main | 2023-09-05T02:57:33.328973 | 2023-08-30T14:40:30 | 2023-08-30T14:40:30 | 91,730,359 | 2,626 | 1,381 | Apache-2.0 | 2023-09-14T20:13:42 | 2017-05-18T19:29:27 | Python | UTF-8 | Java | false | false | 6,118 | java | /*
* Copyright (C) 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.example;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutureCallback;
import com.google.api.core.ApiFutures;
import com.google.api.gax.rpc.ApiException;
import com.google.cloud.pubsub.v1.Publisher;
import com.google.cloud.spark.bigquery.repackaged.org.json.JSONObject;
import com.google.cloud.storage.Blob;
import com.google.cloud.storage.Storage;
import com.google.cloud.storage.Storage.BlobField;
import com.google.cloud.storage.Storage.BlobGetOption;
import com.google.cloud.storage.StorageOptions;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.protobuf.ByteString;
import com.google.pubsub.v1.PubsubMessage;
import com.google.pubsub.v1.TopicName;
import java.io.IOException;
import java.util.Arrays;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.SaveMode;
import org.apache.spark.sql.SparkSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
import picocli.CommandLine.Spec;
@Command(name = "defaults", mixinStandardHelpOptions = true, version = "defaults 0.1")
public class GCS2BQ implements Runnable {
public static final Logger LOGGER = LoggerFactory.getLogger(GCS2BQ.class);
@Option(
names = {"--projectId"},
required = true,
description = "Project Id to run serverless spark")
String projectId;
@Option(
names = {"--inputFileLocation"},
required = true,
description = "GCS location of the file")
String inputFileLocation;
@Option(
names = {"--bqDataset"},
required = true,
description = "BigQuery Dataset")
String bqDataset;
@Option(
names = {"--bqTable"},
required = true,
description = "BigQuery Table")
String bqTable;
@Option(
names = {"--bqTempBucket"},
required = true,
description = "BigQuery Temp Bucket")
String bqTempBucket;
@Option(
names = {"--deadLetterQueue"},
required = true,
description = "Dead letter Topic")
String dlq;
@Spec CommandLine.Model.CommandSpec spec;
@Override
public void run() {
SparkSession spark = null;
final String inputFileFormat = "CSV";
try {
spark = SparkSession.builder().appName("GCS to Bigquery load").getOrCreate();
Dataset<Row> inputData =
spark
.read()
.format(inputFileFormat)
.option("header", true)
.option("inferSchema", true)
.load(inputFileLocation);
inputData
.write()
.format("com.google.cloud.spark.bigquery")
.option("table", bqDataset + "." + bqTable)
.option("temporaryGcsBucket", bqTempBucket)
.mode(SaveMode.Append)
.save();
} catch (Exception th) {
LOGGER.error("Exception in GCStoBigquery", th);
JSONObject obj = new JSONObject();
obj.put("projectId", projectId);
obj.put("inputFileLocation", inputFileLocation);
obj.put("bqDataset", bqDataset);
obj.put("bqTable", bqTable);
obj.put("deadLetterQueue", dlq);
publishMessage(obj.toString());
if (Objects.nonNull(spark)) {
spark.stop();
}
}
}
public void publishMessage(String jsonString) {
String[] dlqElements = dlq.split("/");
TopicName topicName = TopicName.of(dlqElements[1], dlqElements[3]);
Publisher publisher = null;
Storage storage = StorageOptions.newBuilder().build().getService();
try {
String[] tokens = inputFileLocation.replace("gs://", "").split("/");
String bucketNme = tokens[0];
String object = String.join("/", Arrays.copyOfRange(tokens, 1, tokens.length));
Blob blobId = storage.get(bucketNme, object, BlobGetOption.fields(BlobField.values()));
publisher = Publisher.newBuilder(topicName).build();
ByteString data = ByteString.copyFromUtf8(jsonString);
PubsubMessage pubsubMessage =
PubsubMessage.newBuilder()
.setData(data)
.putAttributes("oid", blobId.getGeneratedId())
.build();
ApiFuture<String> future = publisher.publish(pubsubMessage);
ApiFutures.addCallback(
future,
new ApiFutureCallback<String>() {
@Override
public void onFailure(Throwable throwable) {
if (throwable instanceof ApiException) {
ApiException apiException = ((ApiException) throwable);
LOGGER.error(apiException.getMessage());
}
LOGGER.error("Error publishing message : {}", jsonString);
}
@Override
public void onSuccess(String messageId) {
// Once published, returns server-assigned message ids (unique within the topic)
LOGGER.info("Published message ID: {}", messageId);
}
},
MoreExecutors.directExecutor());
} catch (IOException e) {
} finally {
if (publisher != null) {
// When finished with the publisher, shutdown to free up resources.
publisher.shutdown();
try {
publisher.awaitTermination(1, TimeUnit.MINUTES);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
public static void main(String[] args) {
new CommandLine(new GCS2BQ()).execute(args);
}
}
| [
"noreply@github.com"
] | noreply@github.com |
5a091691f338d2cb7b77497f1f76733873bc273f | a48b4cabcece070b5a914103d34c86003fdf3ccc | /src/tut03/equals/employee/Manager.java | 7fd96ba8468e2431dec6121d56ca5c68cde18c6d | [] | no_license | bellarm/cs2511-18s2 | 4d154969553298d828ece5e6d5bdc8810a008198 | 306ed18ebd2ac926cd722416bb6dbb1ff1433508 | refs/heads/master | 2020-03-23T17:23:19.727390 | 2018-09-18T04:53:29 | 2018-09-18T04:53:29 | 141,857,517 | 10 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,089 | java | package tut03.equals.employee;
import java.time.LocalDate;
public class Manager extends Employee {
private LocalDate hireDate;
/**
* Constructor with 3 arguments.
*
* @param name name of the employee.
* @param salary salary in float.
* @param hireDate the date manager started working.
*/
public Manager(String name, float salary, LocalDate hireDate) {
super(name, salary);
this.hireDate = hireDate;
}
/**
* @return hireDate
*/
public LocalDate getHireDate() {
return hireDate;
}
/**
* @param hireDate a LocalData object of the starting date.
*/
public void setHireDate(LocalDate hireDate) {
// Creating a LocalDate object:
// LocalDate date = LocalDate.of(year, month, day);
this.hireDate = hireDate;
}
public String toString() {
return "Manager name: " + getName();
}
public boolean equals(Object obj) {
if (!obj.getClass().equals(this.getClass())) {
return false;
}
Manager manager = (Manager) obj;
if (super.equals(obj)
&& this.hireDate.equals(manager.hireDate)) {
return true;
}
return false;
}
}
| [
"rachelitabella@rocketmail.com"
] | rachelitabella@rocketmail.com |
79354dfa107bee2d51b7b634f5e74adc554e5320 | b7ed2de85ee53b849b4fa11271e4b95d9b049456 | /testing-web/src/test/java/com/example/testingweb/TestingWebApplicationTests.java | 64e05a375e90aa5bd15a73965fba33745eb31f05 | [] | no_license | hckim96/first-spring-boot | e48861224ef3495cfc8f5f58154cfce16a0a30b4 | ed29f5e84656d005ac264975d05f0d92c902b659 | refs/heads/master | 2022-12-29T06:24:18.036486 | 2020-07-23T12:14:00 | 2020-07-23T12:14:00 | 280,884,691 | 1 | 0 | null | 2020-10-13T23:43:59 | 2020-07-19T14:39:02 | Java | UTF-8 | Java | false | false | 254 | java | package com.example.testingweb;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class TestingWebApplicationTests {
@Test
void contextLoads() {
}
}
| [
"hyeoncheolkim96@gmail.com"
] | hyeoncheolkim96@gmail.com |
57b9bc3c9bf01a268ce47593ef38a652585bf9b3 | e776e90ef680183bbc2b47e31a3679fde5baa6fe | /src/test/java/com/example/emailvalidator/EmailValidatorApplicationTests.java | bf5bf5b140e68d028523d6b19906ef634b1de0c3 | [] | no_license | mitforu/email-count | 9432b4fdf9a9faa4d8542c0a8df5eb1a9a0baba9 | a86a9a00953786daf7b968e781029999a64db722 | refs/heads/master | 2021-04-18T13:23:34.033955 | 2020-03-23T21:35:57 | 2020-03-23T21:35:57 | 249,549,031 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 226 | java | package com.example.emailvalidator;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class EmailValidatorApplicationTests {
@Test
void contextLoads() {
}
}
| [
"mitforu@gmail.com"
] | mitforu@gmail.com |
191b43cc0f48d17fca91243cb7d4e33265a505ba | 9e755285782704775d7a1943338625db78c2fe2c | /com.star.mobile.video/src/com/star/mobile/video/adapter/AreaAdapter.java | d0b54af975f4bbee52690da9a1f817b015ce6878 | [] | no_license | XueBaoPeng/ppv_android | a3ba3038568134d8173ded828a41a92c9fefd26a | 7fde328847c250c4937e603179326d5976051113 | refs/heads/master | 2021-01-10T14:35:48.242575 | 2016-03-10T08:39:38 | 2016-03-10T08:39:38 | 53,650,310 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,543 | java | package com.star.mobile.video.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.star.mobile.video.R;
public class AreaAdapter extends BaseAdapter {
private Context context;
private String[] datas;
public AreaAdapter(Context context,String[] datas) {
this.context = context;
this.datas = datas;
}
@Override
public int getCount() {
return datas.length;
}
@Override
public Object getItem(int position) {
return datas[position];
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View view, ViewGroup parent) {
ViewHolder viewHolder = null;
if(view == null) {
viewHolder = new ViewHolder();
view = LayoutInflater.from(context).inflate(R.layout.view_select_date_item, null);
viewHolder.tvDate = (TextView) view.findViewById(R.id.tv_date);
viewHolder.line = view.findViewById(R.id.v_line);
viewHolder.tvDate.setTextSize(17.0f);
view.setTag(viewHolder);
} else {
viewHolder = (ViewHolder)view.getTag();
}
viewHolder.tvDate.setText(datas[position]);
if(position >= datas.length -1) {
viewHolder.line.setVisibility(View.GONE);
} else {
viewHolder.line.setVisibility(View.VISIBLE);
}
return view;
}
class ViewHolder {
public TextView tvDate;
public View line;
}
}
| [
"yaohonv@gmail.com"
] | yaohonv@gmail.com |
b5e4d339e62fd57dd4b4ae746dfe7fc6ac261112 | 255258241f03508d41f3cbea83f5029c98940724 | /api-feign-client/src/main/java/br/gov/mt/seguranca/ApiClientApplication.java | c83a64c39e4b626c2e4daab174480b91b4d31e63 | [] | no_license | denyshetzel/spring-cloud-feign-example | 7ade8bfc2bba15350aa333e6aadbd4074d985749 | 14b12e459f00f9757eeecb5868dcaad723b9d54a | refs/heads/master | 2022-04-12T15:43:12.043033 | 2020-04-07T00:53:00 | 2020-04-07T00:53:00 | 192,637,449 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 404 | java | package br.gov.mt.seguranca;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableFeignClients
public class ApiClientApplication {
public static void main(String[] args) {
SpringApplication.run(ApiClientApplication.class, args);
}
}
| [
"denys.hetzel@gmail.com"
] | denys.hetzel@gmail.com |
4f17d329fb5b9edd7ac97b6ee3a69fb5c0a26bfb | 66924e1b2fd648992337ee75d84d0f51f0365a3c | /app/src/main/java/com/timestudio/zhiyuanmovie/ui/activity/user/regist/RegistActivity.java | fcd381c82e7b49583deed8d86ed66bba86ec5fe9 | [] | no_license | MccreaBlackcat/ZhiyuanMovie | 4563da6d751993c01e283b0c4d22ed6f8cb93022 | 265bfc405231e9fdca6dfbc016d2f7f685e9c663 | refs/heads/master | 2021-01-20T13:45:46.414285 | 2017-05-19T09:55:36 | 2017-05-19T09:55:36 | 90,526,099 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,240 | java | package com.timestudio.zhiyuanmovie.ui.activity.user.regist;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.support.v7.widget.Toolbar;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.timestudio.zhiyuanmovie.R;
import com.timestudio.zhiyuanmovie.base.BaseActivity;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* @description 用户注册界面
* */
public class RegistActivity extends BaseActivity implements RegistView{
@Bind(R.id.regist_toolbar)
Toolbar regist_toolbar;
@Bind(R.id.et_userName)
EditText et_userName;
@Bind(R.id.et_account)
EditText et_account;
@Bind(R.id.et_password)
EditText et_password;
@Bind(R.id.et_verification)
EditText et_verification;
@Bind(R.id.btn_registered)
Button btn_registered;
@Bind(R.id.btn_getVerification)
Button btn_getVerification;
private RegistPresenter registPresenter = new RegistPresenter();
private String nickName;
private String phoneNumber;
private String password;
private String SMSCode;
private TimeCount time; //倒计时
@Override
public void onContentChanged() {
super.onContentChanged();
ButterKnife.bind(this);
setSupportActionBar(regist_toolbar);
getSupportActionBar().setTitle("");
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(setContent());
et_userName.addTextChangedListener(textWatcher);
et_account.addTextChangedListener(textWatcher);
et_password.addTextChangedListener(textWatcher);
et_verification.addTextChangedListener(textWatcher);
}
@Override
protected void onDestroy() {
super.onDestroy();
registPresenter.detachView();
}
@Override
protected int setContent() {
return R.layout.activity_regist;
}
@Override
protected void initView() {
registPresenter.attachView(this);
time = new TimeCount(60000,1000);
}
@Override
protected void initListener() {
}
@OnClick({R.id.btn_registered, R.id.btn_getVerification})
public void onClick(View view) {
switch (view.getId()) {
case R.id.btn_getVerification:
//获取 验证码
if (phoneNumber != "") {
registPresenter.getVerification(phoneNumber);
time.start();
}
break;
case R.id.btn_registered:
//先验证
registPresenter.onVerification(nickName, phoneNumber, password, SMSCode);
// registPresenter.userRegistered(nickName,phoneNumber,password);
break;
}
}
private void clearEditText() {
et_account.setText("");
et_password.setText("");
et_userName.setText("");
et_verification.setText("");
btn_registered.setEnabled(false);
}
@Override
public void registSuccess() {
Toast.makeText(this, "注册成功!", Toast.LENGTH_SHORT).show();
finish();
}
@Override
public void registFailure() {
clearEditText();
}
private class TimeCount extends CountDownTimer {
public TimeCount(long millisInFuture, long countDownInterval) {
super(millisInFuture, countDownInterval);
}
@Override
public void onTick(long l) {
btn_getVerification.setEnabled(false);
btn_getVerification.setText(l/1000 + "s后重新获取");
btn_getVerification.setBackgroundColor(getColor(R.color.colorButtonFalse));
}
@Override
public void onFinish() {
btn_getVerification.setText("再次获取");
btn_getVerification.setEnabled(true);
btn_getVerification.setBackgroundColor(getColor(R.color.colorButtonTrue));
}
}
private TextWatcher textWatcher = new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
nickName = et_userName.getText().toString();
phoneNumber = et_account.getText().toString();
password = et_password.getText().toString();
SMSCode = editable.toString();
boolean isRegist = !(TextUtils.isEmpty(nickName) || TextUtils.isEmpty(phoneNumber) ||
TextUtils.isEmpty(password) || TextUtils.isEmpty(SMSCode));
if (isRegist) {
btn_registered.setEnabled(isRegist);
btn_registered.setBackgroundResource(R.drawable.btn_sel_getverification);
} else {
btn_registered.setBackgroundResource(R.color.colorButtonFalse);
}
}
};
}
| [
"609900347@qq.com"
] | 609900347@qq.com |
fc2a669228018a98d62cd36d4603c0fffbea4b0c | b3721556420a2f927ba2a186f77919861c887bd4 | /FinalProject/eCommerce/src/test/java/miu/edu/ecommerce/ECommerceApplicationTests.java | d0e3f3c7a77c7a98529c86fc4263c9ad36499c77 | [] | no_license | duongkha/WAA | f11fc7d1f5509d58e25d88715a535add3f397e0e | 2f64abc8b9f09688de1a7b28544b335bbf5da15a | refs/heads/main | 2023-04-30T14:17:40.060711 | 2021-05-14T17:57:28 | 2021-05-14T17:57:28 | 363,977,779 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 221 | java | package miu.edu.ecommerce;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ECommerceApplicationTests {
@Test
void contextLoads() {
}
}
| [
"dknguyen@miu.edu"
] | dknguyen@miu.edu |
fc1c079d06a4bf66bcc002da99468a0a98ba9012 | ab3b3596ecb8247dbd83e70cd7439b86a4a60748 | /src/main/java/app/models/Passengerride.java | 57bcfb13ee44dc2626cc27131082445271ec9663 | [] | no_license | gilsonsouza/carona | 63395b48ef4093c745da9ae52f34e0bcfe0b0f7d | 3f2f271d84cb2f770aa6e2caed6d1de1fa676a4a | refs/heads/master | 2021-01-01T15:35:41.399598 | 2012-12-18T21:24:24 | 2012-12-18T21:24:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,750 | java | package app.models;
import app.controllers.PassengerrideController;
import app.controllers.RideController;
import java.util.List;
import javax.persistence.ElementCollection;
import javax.persistence.Transient;
import app.models.Ride;
import br.com.caelum.vraptor.restfulie.relation.RelationBuilder;
@javax.persistence.Entity
public class Passengerride extends Entity {
private String route;
private String passenger;
private String origin;
private String destiny;
private String ridedays;
@Transient
private List<Ride> rides;
public List<Ride> getRides() {
return rides;
}
public void setRides(List<Ride> rides) {
this.rides = rides;
}
public String getOrigin() {
return origin;
}
public void setOrigin(String origin) {
this.origin = origin;
}
public String getPassenger() {
return passenger;
}
public void setPassenger(String passanger) {
this.passenger = passanger;
}
public String getRidedays() {
return ridedays;
}
public void setRidedays(String ridedays) {
this.ridedays = ridedays;
}
public String getDestiny() {
return destiny;
}
public void setDestiny(String destiny) {
this.destiny = destiny;
}
public String getRoute() {
return route;
}
public void setRoute(String route) {
this.route = route;
}
@Override
public void configureRelations(RelationBuilder builder) {
Class<PassengerrideController> controller = PassengerrideController.class;
builder.relation("location").uses(controller).show(this);
builder.relation("update").uses(controller).update(this);
builder.relation("destroy").uses(controller).destroy(this);
try {
builder.relation("rides").uses(RideController.class).create(null);
} catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"gilson.s.s@gmail.com"
] | gilson.s.s@gmail.com |
860396d1310bcf9830385f6d59d64be00547f450 | a1c1a30f36bcfe456e697bd619b63fa12da0741f | /src/com/meizhuo/etips/adapter/NewFeedsAdapter.java | ff32ca92291ffc615fa62389f995bda1f531151f | [
"MIT"
] | permissive | kongoldwant/ETips | 6a17295dd78ac94a88604d15a91066698aa6cbfa | 3f21f69bf81d74c94a3bbe9753708f86ae7fc64d | refs/heads/master | 2020-12-11T05:39:17.217312 | 2015-03-08T12:54:38 | 2015-03-08T12:54:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,583 | java | package com.meizhuo.etips.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import butterknife.ButterKnife;
import butterknife.InjectView;
import com.meizhuo.etips.activities.R;
public class NewFeedsAdapter extends BaseAdapter {
private Context mContext;
public NewFeedsAdapter(Context context) {
this.mContext = context;
}
@Override public int getCount() {
return 20;
}
@Override public Object getItem(int position) {
// TODO Auto-generated method stub
return position;
}
@Override public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
@Override public View getView(int position, View convertView,
ViewGroup parent) {
ViewHolder h;
if (convertView == null) {
convertView = LayoutInflater.from(mContext).inflate(
R.layout.item_newfeeds, null);
h = new ViewHolder(convertView);
convertView.setTag(h);
} else {
h = (ViewHolder) convertView.getTag();
}
h.tv_title.setText("工业4.0: 颠覆全球制造业的新思维");
h.tv_from.setText("商业评论网");
h.tv_time.setText("2014-08-21");
return convertView;
}
static class ViewHolder {
@InjectView(R.id.tv_title) TextView tv_title;
@InjectView(R.id.tv_from) TextView tv_from;
@InjectView(R.id.tv_time) TextView tv_time;
public ViewHolder(View view) {
ButterKnife.inject(this, view);
}
}
}
| [
"tonjayin@gmail.com"
] | tonjayin@gmail.com |
930d98a089ed740dd51409371a6d544fbbd3a1ca | 513ee9c07a1dc8e5a1be94345954a578b741e90e | /src/org/kitteh/vnptest/sniffers/Sniffer5EntityEquipment.java | eac10c15923453c491143c144568b923789a57ad | [] | no_license | mbax/VNPTester | a0c93f9ccfbad00fa247a95d72c1e0f8a8cb75a3 | 26e1b26cb38b91e5e284437ccd39d1450c79b805 | refs/heads/master | 2021-01-10T21:42:28.585644 | 2012-02-03T22:19:28 | 2012-02-03T22:19:28 | 3,348,860 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 723 | java | package org.kitteh.vnptest.sniffers;
import net.minecraft.server.Packet5EntityEquipment;
import org.bukkit.entity.Player;
import org.getspout.spout.packet.standard.MCCraftPacket;
import org.getspout.spoutapi.packet.listener.PacketListener;
import org.getspout.spoutapi.packet.standard.MCPacket;
import org.kitteh.vnptest.VanishTest;
public class Sniffer5EntityEquipment implements PacketListener {
private final VanishTest vanish;
public Sniffer5EntityEquipment(VanishTest vanish) {
this.vanish = vanish;
}
@Override
public boolean checkPacket(Player player, MCPacket packet) {
return vanish.check(player,5,((Packet5EntityEquipment) ((MCCraftPacket) packet).getPacket()).a);
}
}
| [
"matt@phozop.net"
] | matt@phozop.net |
8b318e166b59cc44399a2fd15db15ac69267eb96 | 322baf156f54695a53246498ffb9a774f48ff094 | /src/main/java/com/dbkj/account/config/AppConfig.java | 58b05b31c8ac9af7bc3929851d650d66c94cb331 | [] | no_license | qinchunabng/AccountSys | 5754b499e83014f19ba3e4f8c5a4871fca21edd7 | bab6a2e949febaff6f372d6a2eaba7a07478469f | refs/heads/master | 2021-01-21T09:03:07.671973 | 2017-08-31T06:00:14 | 2017-08-31T06:00:14 | 101,964,302 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,888 | java | package com.dbkj.account.config;
import com.dbkj.account.controller.ForgetPasswordController;
import com.dbkj.account.controller.VertifyCodeController;
import com.dbkj.account.interceptor.AdminAuthorityTemplateDirectiveInterceptor;
import com.dbkj.account.interceptor.AuthInterceptor;
import com.dbkj.account.interceptor.LoginInterceptor;
import com.dbkj.account.interceptor.UserAuthorityTemplateDirectiveInterceptor;
import com.dbkj.account.model._MappingKit;
import com.dbkj.account.service.OperaTypeService;
import com.jfinal.config.Constants;
import com.jfinal.config.Handlers;
import com.jfinal.config.Interceptors;
import com.jfinal.config.JFinalConfig;
import com.jfinal.config.Plugins;
import com.jfinal.config.Routes;
import com.jfinal.core.JFinal;
import com.jfinal.ext.handler.ContextPathHandler;
import com.jfinal.kit.PropKit;
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
import com.jfinal.plugin.druid.DruidPlugin;
import com.jfinal.plugin.ehcache.EhCachePlugin;
import com.jfinal.render.ViewType;
import com.jfinal.template.Engine;
public class AppConfig extends JFinalConfig{
@Override
public void configConstant(Constants me) {
PropKit.use("config.properties");
//设置当前是否为开发模式
me.setDevMode(PropKit.getBoolean("devMode"));
//设置上传最大限制尺寸
me.setMaxPostSize(1024*1024*10);
me.setViewType(ViewType.FREE_MARKER);
me.setErrorView(403, "/pages/other/403.html");
me.setErrorView(404, "/pages/other/404.html");
me.setErrorView(500, "/pages/other/500.html");
}
@Override
public void configRoute(Routes me) {
me.add("/vertifyCode",VertifyCodeController.class);
me.add("/forget",ForgetPasswordController.class);
me.add(new ManageRoute());
}
@Override
public void configEngine(Engine me) {
}
@Override
public void configPlugin(Plugins me) {
DruidPlugin plugin = new DruidPlugin(PropKit.get("jdbcUrl"),PropKit.get("username"),PropKit.get("password"));
me.add(plugin);
ActiveRecordPlugin activeRecordPlugin = new ActiveRecordPlugin(plugin);
me.add(activeRecordPlugin);
_MappingKit.mapping(activeRecordPlugin);
me.add(new EhCachePlugin());
}
@Override
public void configInterceptor(Interceptors me) {
me.add(new LoginInterceptor());
me.add(new AuthInterceptor());
me.addGlobalActionInterceptor(new AdminAuthorityTemplateDirectiveInterceptor());
me.addGlobalActionInterceptor(new UserAuthorityTemplateDirectiveInterceptor());
}
@Override
public void configHandler(Handlers me) {
me.add(new ContextPathHandler("ctx"));
}
@Override
public void afterJFinalStart() {
//初始化操作类型信息
OperaTypeService.init();
}
public static void main(String[] args) {
JFinal.start("src/main/webapp", 80, "/");
}
}
| [
"373413704@qq.com"
] | 373413704@qq.com |
bdb071cad47a035ee29f334ebdd9444d858fc174 | 653bd81e4886bd75bb672dadc60c9c998f3c1ab1 | /takin-web-biz-service/src/main/java/io/shulie/takin/web/biz/pojo/output/probe/CreateProbeOutput.java | e6159fee21ab2b12be479908388ccdef9a440a94 | [] | no_license | shulieTech/Takin-web | f7fc06b4e5bcab366a60f64934cc3de495b9917e | f00bcd31e6fea795d8d718e59011b0c05fd6daf7 | refs/heads/main | 2023-08-31T07:38:15.352626 | 2023-07-03T03:03:47 | 2023-07-03T03:03:47 | 398,989,630 | 18 | 60 | null | 2023-08-22T09:50:23 | 2021-08-23T05:58:15 | Java | UTF-8 | Java | false | false | 446 | java | package io.shulie.takin.web.biz.pojo.output.probe;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* @author liuchuan
* @date 2021/6/11 1:33 下午
*/
@Data
@ApiModel("出参类-探针创建出参")
public class CreateProbeOutput {
@ApiModelProperty("探针记录 id")
private Long probeId;
@ApiModelProperty("探针 version")
private String probeVersion;
}
| [
"hezhongqi@shulie.io"
] | hezhongqi@shulie.io |
58843fc5db97e59f4631f3b60990e06987446f4e | 9f5c33079d56b01a05cb5c8ff7778eb6bad5473a | /ejbModule/it/polimi/db2/project/exceptions/InvalidInputArgumentException.java | 4ee00b6f85ac5ebea776c6d70cb4a62a1b484b54 | [] | no_license | sam98uele/DB2Project_EJB | 9108583d8fe8f2e04f1689904414092f800bb208 | 7b46e0b30e003c77db72620b59987d97bbecfff9 | refs/heads/main | 2023-05-01T04:46:20.038006 | 2021-05-13T16:38:26 | 2021-05-13T16:38:26 | 338,462,326 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 311 | java | package it.polimi.db2.project.exceptions;
/**
* It is raised if an passed to the EJB argument is invalid
*
*
*/
public class InvalidInputArgumentException extends Exception{
private static final long serialVersionUID = 1L;
public InvalidInputArgumentException(String message) {
super(message);
}
}
| [
"samu98p@gmail.com"
] | samu98p@gmail.com |
48f77cb531721e2df5a9c6ba41feb669715bb362 | e6a8902ad819690aff78362221c5b56e10754eeb | /GrabThePopcorn/app/src/main/java/com/example/android/testpopularmovies/models/SeasonTVShow.java | d83791f4a06d1daff7fc2ec28f2dd7318e382b9e | [] | no_license | enzobes/AndroidProject | 3d3feffe673da96a517cfd8d6d9fd326ad9ca563 | 19dfcaeb714ab53dec016d84d121de98a696ae25 | refs/heads/master | 2022-08-03T07:46:22.732343 | 2020-05-31T13:24:39 | 2020-05-31T13:24:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,421 | java | package com.example.android.testpopularmovies.models;
import java.io.Serializable;
public class SeasonTVShow implements Serializable {
private int id;
private String name;
private String overview;
private String airDate;
private String posterPath;
private int seasonNumber;
private int episodeCount;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getOverview() {
return overview;
}
public void setOverview(String overview) {
this.overview = overview;
}
public String getAirDate() {
return airDate;
}
public void setAirDate(String airDate) {
this.airDate = airDate;
}
public String getPosterPath() {
return "https://image.tmdb.org/t/p/w500"+posterPath;
}
public void setPosterPath(String posterPath) {
this.posterPath = posterPath;
}
public int getSeasonNumber() {
return seasonNumber;
}
public void setSeasonNumber(int seasonNumber) {
this.seasonNumber = seasonNumber;
}
public int getEpisodeCount() {
return episodeCount;
}
public void setEpisodeCount(int episodeCount) {
this.episodeCount = episodeCount;
}
}
| [
"baptiste.piofret@free.fr"
] | baptiste.piofret@free.fr |
50866a4c2272076d966f6b5f7ef0277cf095817a | 5df683d6ca7dc796dfddbdbdc1fa5d2a35913cd0 | /src/main/java/org/example/domain/OrderItem.java | ab2fb2d4db93ea6b4390035c48d8173ee15fff55 | [] | no_license | luizdorici/springboot-studies | f8bd5b6915b4ddf6cd70597357eb89dc0fb63cf3 | 5d8399dfc9021ac49dfeda0f6cf07e357ce8dd40 | refs/heads/master | 2023-03-21T14:14:43.156300 | 2021-03-11T14:03:54 | 2021-03-11T14:03:54 | 345,664,529 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,620 | java | package org.example.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import java.io.Serializable;
import java.text.NumberFormat;
import java.util.Locale;
import java.util.Objects;
@Entity
public class OrderItem implements Serializable {
private static final long serialVersionUID = 1L;
@JsonIgnore
@EmbeddedId
private OrderItemPK id = new OrderItemPK();
private Double discount;
private Integer quantity;
private Double price;
public OrderItem() {
}
public OrderItem(Order order, Product product, Double discount, Integer quantity, Double price) {
id.setOrder(order);
id.setProduct(product);
this.discount = discount;
this.quantity = quantity;
this.price = price;
}
public double getSubTotal() {
return (price - discount) * quantity;
}
@JsonIgnore
public Order getOrder () {
return id.getOrder();
}
public void setOrder(Order order) {
id.setOrder(order);
}
public Product getProduct() {
return id.getProduct();
}
public void setProduct(Product product) {
id.setProduct(product);
}
public OrderItemPK getId() {
return id;
}
public void setId(OrderItemPK id) {
this.id = id;
}
public Double getDiscount() {
return discount;
}
public void setDiscount(Double discount) {
this.discount = discount;
}
public Integer getQuantity() {
return quantity;
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
public Double getPrice() {
return price;
}
public void setPrice(Double price) {
this.price = price;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof OrderItem)) return false;
OrderItem orderItem = (OrderItem) o;
return id.equals(orderItem.id);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
@Override
public String toString() {
NumberFormat nf = NumberFormat.getCurrencyInstance(new Locale("pt", "BR"));
final StringBuffer sb = new StringBuffer();
sb.append(getProduct().getName());
sb.append(", quantidade: ").append(getQuantity());
sb.append(", preço unitário: ").append(nf.format(getPrice()));
sb.append(", subtotal: ").append(nf.format(getSubTotal()));
sb.append("\n");
return sb.toString();
}
}
| [
"luizdorici@gmail.com"
] | luizdorici@gmail.com |
041d7b6c10903d4d860713e1672bdfa098ea6312 | 13c2d3db2d49c40c74c2e6420a9cd89377f1c934 | /program_data/JavaProgramData/33/1586.java | ea2b9ab4b7fe8a8c3c43ccc45401b6e0ffc609ea | [
"MIT"
] | permissive | qiuchili/ggnn_graph_classification | c2090fefe11f8bf650e734442eb96996a54dc112 | 291ff02404555511b94a4f477c6974ebd62dcf44 | refs/heads/master | 2021-10-18T14:54:26.154367 | 2018-10-21T23:34:14 | 2018-10-21T23:34:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 913 | java | package <missing>;
public class GlobalMembers
{
public static int Main()
{
int n;
int i;
int j;
String t = new String(new char[256]);
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
for (i = 0;i < n;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
t = tempVar2.charAt(0);
}
for (j = 0;t.charAt(j) != '\0';j++)
{
if (t.charAt(j) == 'A')
{
t = tangible.StringFunctions.changeCharacter(t, j, 'T');
}
else if (t.charAt(j) == 'T')
{
t = tangible.StringFunctions.changeCharacter(t, j, 'A');
}
else if (t.charAt(j) == 'C')
{
t = tangible.StringFunctions.changeCharacter(t, j, 'G');
}
else if (t.charAt(j) == 'G')
{
t = tangible.StringFunctions.changeCharacter(t, j, 'C');
}
}
System.out.println(t);
}
return 0;
}
}
| [
"y.yu@open.ac.uk"
] | y.yu@open.ac.uk |
4c0fe464897762568673ad5b43cf6bafd7f0a0b1 | 0430b23846f01d53443d90500b8acd23ab4c0e38 | /ch20/src/service/BIListAction.java | 406ad1ffcd7b46317ccbe5bea16d395dfd658262 | [] | no_license | diannenote/jsp-class | b4e01e05174e217db713b22fdcba5cfe90d4dcdc | 006275879187f37eae0099a878954f72bf9ba3a9 | refs/heads/master | 2022-12-11T01:59:23.826514 | 2020-04-20T00:18:30 | 2020-04-20T00:18:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,311 | java | package service;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import dao.Board;
import dao.BoardDao;
import dao.BookIn;
import dao.BookMember;
import dao.BookMemberDao;
public class BIListAction implements CommandProcess {
public String requestPro(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
BookMemberDao bmd = BookMemberDao.getInstance();
try {
int totCnt = bmd.getBiTotalCnt(); // bookin
System.out.println("BIListAction getBiTotalCnt->" +totCnt);
String pageNum = request.getParameter("pageNum");
if (pageNum==null || pageNum.equals("")) { pageNum = "1"; }
int currentPage = Integer.parseInt(pageNum);
int pageSize = 10, blockSize = 10;
int startRow = (currentPage - 1) * pageSize + 1;
int endRow = startRow + pageSize - 1;
int startNum = totCnt - startRow + 1;
List<BookIn> list = bmd.biList(startRow, endRow); // 입고 List
int pageCnt = (int)Math.ceil((double)totCnt/pageSize);
int startPage = (int)(currentPage-1)/blockSize*blockSize + 1;
int endPage = startPage + blockSize -1;
if (endPage > pageCnt) endPage = pageCnt;
request.setAttribute("totCnt", totCnt);
request.setAttribute("pageNum", pageNum);
request.setAttribute("currentPage", currentPage);
request.setAttribute("startNum", startNum);
request.setAttribute("list", list);
request.setAttribute("blockSize", blockSize);
request.setAttribute("pageCnt", pageCnt);
request.setAttribute("startPage", startPage);
request.setAttribute("endPage", endPage);
System.out.println("-----------------------------------------------"); // /ch20/biList.do
System.out.println("startNum-->" + startNum);
System.out.println("totCnt-->" + totCnt);
System.out.println("currentPage-->" + currentPage);
System.out.println("blockSize-->" + blockSize);
System.out.println("pageSize-->" + pageSize);
System.out.println("pageCnt-->" + pageCnt);
System.out.println("startPage-->" + startPage);
System.out.println("endPage-->" + endPage);
} catch(Exception e) { System.out.println(e.getMessage()); }
return "biList.jsp";
}
} | [
"564486_v@naver.com"
] | 564486_v@naver.com |
9abbba295df9159bdeff1ff0dbe0d17e6a62e996 | 4b7ee22e6fd205ed0f900bfaa515354a0523afcf | /MigracionUMED/src/com/utez/integracion/entity/TipoDocumento.java | a115e85242ca849bbc9745dabeeb2d7a4a731324 | [] | no_license | xenonDevelopers/cdsPrueba | a7c1ff5f55ddec5ffa6bba57a65088f03c81dade | 0f8a9f4baa19168b8c531a5ac1f4e82831eb5db2 | refs/heads/master | 2020-06-05T09:35:26.135707 | 2014-07-21T15:57:15 | 2014-07-21T15:57:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,223 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.utez.integracion.entity;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
/**
*
* @author Sergio
*/
@Entity
@Table(name = "tipo_documento")
@NamedQueries({
@NamedQuery(name = "TipoDocumento.findAll", query = "SELECT t FROM TipoDocumento t"),
@NamedQuery(name = "TipoDocumento.findByIdTipodocumento", query = "SELECT t FROM TipoDocumento t WHERE t.idTipodocumento = :idTipodocumento"),
@NamedQuery(name = "TipoDocumento.findByDescripcionTipodocumento", query = "SELECT t FROM TipoDocumento t WHERE t.descripcionTipodocumento = :descripcionTipodocumento")})
public class TipoDocumento implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id_tipodocumento")
private Long idTipodocumento;
@Column(name = "descripcion_tipodocumento")
private String descripcionTipodocumento;
@OneToMany(mappedBy = "idTipodocumento")
private List<Documento> documentoList;
public TipoDocumento() {
}
public TipoDocumento(Long idTipodocumento) {
this.idTipodocumento = idTipodocumento;
}
public Long getIdTipodocumento() {
return idTipodocumento;
}
public void setIdTipodocumento(Long idTipodocumento) {
this.idTipodocumento = idTipodocumento;
}
public String getDescripcionTipodocumento() {
return descripcionTipodocumento;
}
public void setDescripcionTipodocumento(String descripcionTipodocumento) {
this.descripcionTipodocumento = descripcionTipodocumento;
}
public List<Documento> getDocumentoList() {
return documentoList;
}
public void setDocumentoList(List<Documento> documentoList) {
this.documentoList = documentoList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (idTipodocumento != null ? idTipodocumento.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof TipoDocumento)) {
return false;
}
TipoDocumento other = (TipoDocumento) object;
if ((this.idTipodocumento == null && other.idTipodocumento != null) || (this.idTipodocumento != null && !this.idTipodocumento.equals(other.idTipodocumento))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.utez.integracion.entity.TipoDocumento[ idTipodocumento=" + idTipodocumento + " ]";
}
}
| [
"Sergio@192.168.52.118"
] | Sergio@192.168.52.118 |
4693822fe3347ebf6ac05eb1e8dfc57afe50a4b9 | 099916ace579730e32902db7a77ae65faf06ed35 | /app/src/main/java/edu/eci/ieti/services4offer/LoginActivity.java | 3b050d96d113bf935c98732ac76bea6af9e18610 | [] | no_license | Services4All/Services4All-Android | f6f92dd59c5a4b7f11849171d5da515ae91544b0 | bb6acd5775ab287077d81e7052ee04dda469961c | refs/heads/main | 2023-04-25T04:21:36.906294 | 2021-05-20T15:52:25 | 2021-05-20T15:52:25 | 365,614,167 | 0 | 0 | null | 2021-05-20T15:52:26 | 2021-05-08T21:26:30 | Java | UTF-8 | Java | false | false | 1,328 | java | package edu.eci.ieti.services4offer;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
public class LoginActivity extends AppCompatActivity {
public static final String EXTRA_EMAIL = "edu.eci.IETI.secureapi.EMAIL";
public static final String EXTRA_PASSWORD = "edu.eci.IETI.secureapi.PASSWORD";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
}
public void login(View view) {
EditText editTextEmail = (EditText) findViewById(R.id.email);
String email = editTextEmail.getText().toString();
EditText editTextPassword = (EditText) findViewById(R.id.password);
String password = editTextPassword.getText().toString();
if (!email.equals("services4all")){
editTextEmail.setError("User not found");
} else if ( !password.equals("contraseña") ) {
editTextPassword.setError("Invalid password");
} else {
AlertDialog alertDialog1 = new AlertDialog.Builder(this).create();
alertDialog1.setTitle("Login Correcto");
alertDialog1.show();
}
}
}
| [
"estebanb0203@hotmail.com"
] | estebanb0203@hotmail.com |
4b07a62078b5a93996a8869104e3ded00f2d0fb8 | b6b0a751e203790f3798d6b0c02e7f0ad46a7b40 | /app/src/main/java/com/dossmann/jumper/Utils.java | f14f5eaf2129ea0f6047a04c623471ecf4c3cc7f | [] | no_license | brunoss0d/Jumper | c3bb00014efa902faf3a4c4d1678899a2bdcc223 | f748278595dc5f5b4f232dd9d9fd3c521f685a7b | refs/heads/master | 2020-08-31T19:06:08.665638 | 2019-11-26T15:50:35 | 2019-11-26T15:50:35 | 218,762,430 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 649 | java | package com.dossmann.jumper;
import android.content.Context;
import android.graphics.Point;
import android.view.Display;
import android.view.WindowManager;
import java.util.Random;
public class Utils {
public static Point getScreenSize(Context context) {
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay();
Point size = new Point();
display.getSize(size);
return size;
}
public static float getRandomInRange(int min, int max) {
Random r = new Random();
return r.nextInt((max - min) + 1) + min;
}
} | [
"dossmannb@gmail.com"
] | dossmannb@gmail.com |
1b46f56b1a6a4d0b2becc4e7a8a48ff33f4bcc89 | 0642397e9755b66848fea2624cb1f23b3380d727 | /src/main/java/nl/esciencecenter/ahn/pointcloud/db/PotreeExtentsDOA.java | 5b49347c4fe4b4c7998b463daee078888eb3a8c1 | [
"Apache-2.0"
] | permissive | soex0101/3d_portal_ahn-pointcloud-viewer-ws | ce1c500479c7e41a2434a7503cb7e888ddd9a072 | 70ad2caa6bc8e2bcd472f17d80498a2940ac8c42 | refs/heads/master | 2023-03-17T10:43:59.586709 | 2017-09-21T13:28:41 | 2017-09-21T13:28:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 874 | java | package nl.esciencecenter.ahn.pointcloud.db;
import nl.esciencecenter.ahn.pointcloud.core.Selection;
import org.skife.jdbi.v2.sqlobject.Bind;
import org.skife.jdbi.v2.sqlobject.BindBean;
import org.skife.jdbi.v2.sqlobject.SqlQuery;
public interface PotreeExtentsDOA {
@SqlQuery("SELECT "
+ " FLOOR(SUM(numberpoints * (ST_Area(ST_Intersection(geom, qgeom)) /ST_Area(geom)))) AS numpoints "
+ "FROM "
+ " extent_potree, "
+ " (SELECT ST_SetSRID(ST_MakeBox2D(ST_Point(:b.left, :b.bottom),ST_Point(:b.right, :b.top)), :srid) AS qgeom) AS B "
+ "WHERE level = :level "
+ "AND geom && qgeom "
+ "AND ST_Area(geom) != 0")
long getNumberOfPoints(@Bind("level") int level,
@BindBean("b") Selection bbox,
@Bind("srid") int srid);
}
| [
"s.verhoeven@esciencecenter.nl"
] | s.verhoeven@esciencecenter.nl |
ec1ada2e326e35578008cb71a86818d8460b048b | d1057dd7f1c0a72821e511f7587e511368f41f94 | /Project/woxingwoshow/app/src/main/java/sdwxwx/com/play/contract/PlayVideoContract.java | 959fa00c3df508daed258331a852f1244d334cfb | [] | no_license | hyb1234hi/Atom-Github | 1c7b1800c2dcf8a12af90bf54de2a5964c6d625e | 46bcb8cc204ef71f0d310d4bb9a3ae7cdf7b04a1 | refs/heads/master | 2020-08-27T16:23:50.568306 | 2018-07-06T01:26:17 | 2018-07-06T01:26:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 257 | java | package sdwxwx.com.play.contract;
import sdwxwx.com.base.BaseView;
/**
* create by 860115039
* date 2018/5/18
* time 16:30
*/
public interface PlayVideoContract {
interface View extends BaseView{
}
interface Presenter{
}
}
| [
"wufengfeilong@163.com"
] | wufengfeilong@163.com |
7902844329223aa7a3b013610ff4c83b62850918 | bc366e03592e92180f3f23e13dbf8d79a8e77566 | /tanhua-db-service/src/main/java/com/itheima/DbServiceApplication.java | 51a00ff303fbfd5bf93e6fe13ef187066205d6fe | [] | no_license | stephendengbl/tanhua | 136df8b168e9bf87061dcb73303ec93e30aed1ee | 53c8fb9317be7cbd0f7a53fceb8a2d6242f8d684 | refs/heads/main | 2023-06-11T23:17:55.282428 | 2021-07-11T09:15:13 | 2021-07-11T09:15:13 | 384,902,101 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 513 | java | package com.itheima;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
@SpringBootApplication(exclude = MongoAutoConfiguration.class)
@MapperScan("com.itheima.mapper")
public class DbServiceApplication {
public static void main(String[] args) {
SpringApplication.run(DbServiceApplication.class);
}
}
| [
"d_bliang@outlook.com"
] | d_bliang@outlook.com |
f348ed68dc8914d095ccb436a916433dae2dc4f9 | a0bdbfb24d87576a29bb2f766312a0b03398264c | /src/entity/Subject.java | 7e45fcee7921472df00ff90ae278ab3dcb6168f5 | [] | no_license | mr-yangchen/VoteOnline | 1f187a9c02ef8b90e154c7a2ba6b18688d5625c0 | 287b4a38c57a1048e750f57a4ce272d719aaccf6 | refs/heads/master | 2022-11-13T03:20:21.390310 | 2019-08-19T13:29:21 | 2019-08-19T13:29:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,523 | java | package entity;
public class Subject {
private int sId;
private String sTitle; //投票标题
private String sType; //投票类型
private int sBrowseTotal;//总浏览数
private int sParticipate;//总参与人数
private int sVotetotal;//总票数
private String sImage;//封面图片地址
public Subject() {
}
public Subject(int sId, String sTitle, String sType, int sBrowseTotal,
int sParticipate, int sVotetotal, String sImage) {
this.sId = sId;
this.sTitle = sTitle;
this.sType = sType;
this.sBrowseTotal = sBrowseTotal;
this.sParticipate = sParticipate;
this.sVotetotal = sVotetotal;
this.sImage = sImage;
}
public int getsId() {
return sId;
}
public void setsId(int sId) {
this.sId = sId;
}
public String getsTitle() {
return sTitle;
}
public void setsTitle(String sTitle) {
this.sTitle = sTitle;
}
public String getsType() {
return sType;
}
public void setsType(String sType) {
this.sType = sType;
}
public int getsBrowseTotal() {
return sBrowseTotal;
}
public void setsBrowseTotal(int sBrowseTotal) {
this.sBrowseTotal = sBrowseTotal;
}
public int getsParticipate() {
return sParticipate;
}
public void setsParticipate(int sParticipate) {
this.sParticipate = sParticipate;
}
public int getsVotetotal() {
return sVotetotal;
}
public void setsVotetotal(int sVotetotal) {
this.sVotetotal = sVotetotal;
}
public String getsImage() {
return sImage;
}
public void setsImage(String sImage) {
this.sImage = sImage;
}
}
| [
"2414726781@qq.com"
] | 2414726781@qq.com |
179f41336b3e64d1a1d80d4fe74a43d7821f8c70 | 49445d287c157966924a7597cfaeb62f2a52438b | /Adv_Java_SpringBoot/src/main/java/com/jbk/dao/EmployeeDaoIF.java | 61b8a891422a1054533b654424edc71a708e482f | [] | no_license | durgeshp11898/22.SpringBootLearningRepositry | e6c02902c5a00e509fc10f95edaaa31fea9d658e | 2f7f42a5fb846332478d58accc5beaf47b796eaf | refs/heads/master | 2023-06-19T15:58:28.323157 | 2021-07-21T10:25:56 | 2021-07-21T10:25:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 366 | java | package com.jbk.dao;
import java.io.Serializable;
import java.util.List;
import com.jbk.entity.Employee;
public interface EmployeeDaoIF {
public Serializable addEmployee(Employee employee);
public Employee getEmployee(int id);
public List<Employee> getAllEmployee();
public boolean deleteEmployee(int id);
public boolean updateEmployee(Employee employee);
}
| [
"durgeshpawar077@gmail.com"
] | durgeshpawar077@gmail.com |
ca0dfb6c67266e1e2b485f5da0ad0a8201c71a59 | b509b221bfe2f7a137a833a0f1f3531bf38b2c73 | /app/src/main/java/com/yifenglv/android/loginsystem/MainActivity.java | 4e74b32f11d5b825169cff36b6327654a0b31fb4 | [] | no_license | Yifeng-Lyu/LoginSystem | 82a232f410a36084d1f192dae41a7eda75885ed4 | 4171a96921c9fe9d1c0e9f0ff4d2201f15321e10 | refs/heads/master | 2023-08-05T05:40:25.121925 | 2017-07-25T03:52:51 | 2017-07-25T03:52:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 760 | java | package com.yifenglv.android.loginsystem;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button forceOffline = (Button) findViewById(R.id.force_offline);
forceOffline.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent("FORCE_OFFLINE");
sendBroadcast(intent);
}
});
}
}
| [
"yifenglv6@gmail.com"
] | yifenglv6@gmail.com |
93dd81eb64a9cae53d87a3dde010ca1dda8aff90 | d8e7ba205e18f50e5af0e490b65ce3ab09166937 | /app/src/main/java/com/test/catsanddogs/model/DataHolder.java | 85fd73e930845be2a64a1313d643c6e5ed9e2fc1 | [] | no_license | Wersar/CatsAndDogs | 336654d6c2e7a954b62de957e502c0a739f6b531 | 96660ac5efe72cf862d5aa1ccde36a01d0def500 | refs/heads/master | 2020-05-16T03:31:18.434990 | 2019-04-22T09:31:21 | 2019-04-22T09:31:21 | 182,724,747 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 833 | java | package com.test.catsanddogs.model;
import com.test.catsanddogs.PseudoCache;
import com.test.catsanddogs.data.Pet;
import java.util.List;
public class DataHolder extends PseudoCache<String, List<Pet>> {
private static final String DATA_KEY = "data";
private Observer observer;
public interface Observer {
void onChange(List<Pet> data);
}
@Override
public void put(String key, List<Pet> value) {
this.put(value);
}
public void put(List<Pet> data) {
super.put(DATA_KEY, data);
if (observer != null) {
observer.onChange(data);
}
}
public void observer(Observer observer) {
this.observer = observer;
List<Pet> data = get(DATA_KEY);
if (data != null) {
this.observer.onChange(data);
}
}
}
| [
"you@example.com"
] | you@example.com |
5c3c91cadae0e7916d0be32b519674e8c9b4739b | ed151fdffd07e6f8506b00b68eff03224f537f75 | /wildflycxfspring/src/main/resources/archetype-resources/common/src/main/java/dk/emstar/common/time/jpa/LocalDateTimePersistenceConverter.java | 179c0ff057a546b6c6469c28180901d3c6fc1153 | [] | no_license | mat013/maventemplates | 815441a07590084fdcba70ff8aa3cf96e5465308 | 50fc28d1e9e63bff82384ca6a51f451501b82c6d | refs/heads/master | 2016-09-11T13:48:39.194402 | 2016-02-20T18:38:31 | 2016-02-20T18:38:31 | 38,197,080 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 744 | java | #set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package dk.emstar.${artifactId}.time.jpa;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
@Converter(autoApply = true)
public class LocalDateTimePersistenceConverter implements
AttributeConverter<LocalDateTime, java.sql.Timestamp> {
@Override
public java.sql.Timestamp convertToDatabaseColumn(LocalDateTime entityValue) {
return Timestamp.valueOf(entityValue);
}
@Override
public LocalDateTime convertToEntityAttribute(java.sql.Timestamp databaseValue) {
return databaseValue.toLocalDateTime();
}
} | [
"mat013@8c0d3757-8840-4923-84ec-c338a6bcf567"
] | mat013@8c0d3757-8840-4923-84ec-c338a6bcf567 |
f4e0640dd9c7e3405f058e8594ddc8ff1dae15a4 | aefb4066a70abf72dddd5053dcedb079aaf1df3e | /ClienteSubastas/src/java/clientesubastas/VerSubastas.java | 08296f35cb844f909794fa8f844ea81a47084e82 | [] | no_license | elvis94/alvaro-luis-casasubastas | 36df83956a961612dfcfc0198b4c689b75d2a2ad | 7e7853359695088a71f3d4ffc6c03569aebcc3a7 | refs/heads/master | 2016-08-11T08:03:08.360780 | 2009-05-31T17:37:02 | 2009-05-31T17:37:02 | 45,443,677 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,812 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package clientesubastas;
import clientesubastas.servicios.ServicioWebSubastas;
import com.sun.data.provider.RowKey;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.webui.jsf.component.Hyperlink;
import com.sun.webui.jsf.component.ImageHyperlink;
import java.util.List;
import javax.faces.FacesException;
import services.Subasta;
/**
* <p>Page bean that corresponds to a similarly named JSP page. This
* class contains component definitions (and initialization code) for
* all components that you have defined on this page, as well as
* lifecycle methods and event handlers where you may add behavior
* to respond to incoming events.</p>
*
* @version VerSubastas.java
* @version Created on 28-abr-2009, 1:16:34
*/
public class VerSubastas extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
private void _init() throws Exception {
}
// </editor-fold>
private List<Subasta> listadoPublico;
private ImageHyperlink imghlIniciarSesion = new ImageHyperlink();
public ImageHyperlink getImghlIniciarSesion() {
return imghlIniciarSesion;
}
public void setImghlIniciarSesion(ImageHyperlink ih) {
this.imghlIniciarSesion = ih;
}
private ImageHyperlink imghlRegistrarse = new ImageHyperlink();
public ImageHyperlink getImghlRegistrarse() {
return imghlRegistrarse;
}
public void setImghlRegistrarse(ImageHyperlink ih) {
this.imghlRegistrarse = ih;
}
private ImageHyperlink imghlMisSubastas = new ImageHyperlink();
public ImageHyperlink getImghlMisSubastas() {
return imghlMisSubastas;
}
public void setImghlMisSubastas(ImageHyperlink ih) {
this.imghlMisSubastas = ih;
}
private ImageHyperlink imghlNuevaSubasta = new ImageHyperlink();
public ImageHyperlink getImghlNuevaSubasta() {
return imghlNuevaSubasta;
}
public void setImghlNuevaSubasta(ImageHyperlink ih) {
this.imghlNuevaSubasta = ih;
}
private ImageHyperlink imghlCerrarSesion = new ImageHyperlink();
public ImageHyperlink getImghlCerrarSesion() {
return imghlCerrarSesion;
}
public void setImghlCerrarSesion(ImageHyperlink ih) {
this.imghlCerrarSesion = ih;
}
/**
* <p>Construct a new Page bean instance.</p>
*/
public VerSubastas() {
}
/**
* <p>Callback method that is called whenever a page is navigated to,
* either directly via a URL, or indirectly via page navigation.
* Customize this method to acquire resources that will be needed
* for event handlers and lifecycle methods, whether or not this
* page is performing post back processing.</p>
*
* <p>Note that, if the current request is a postback, the property
* values of the components do <strong>not</strong> represent any
* values submitted with this request. Instead, they represent the
* property values that were saved for this view when it was rendered.</p>
*/
@Override
public void init() {
// Perform initializations inherited from our superclass
super.init();
// Perform application initialization that must complete
// *before* managed components are initialized
// TODO - add your own initialiation code here
setListadoPublico(ServicioWebSubastas.subastasPublicas());
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
// Initialize automatically managed components
// *Note* - this logic should NOT be modified
try {
_init();
} catch (Exception e) {
log("VerSubastas Initialization Failure", e);
throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
}
// </editor-fold>
// Perform application initialization that must complete
// *after* managed components are initialized
// TODO - add your own initialization code here
}
/**
* <p>Callback method that is called after the component tree has been
* restored, but before any event processing takes place. This method
* will <strong>only</strong> be called on a postback request that
* is processing a form submit. Customize this method to allocate
* resources that will be required in your event handlers.</p>
*/
@Override
public void preprocess() {
}
/**
* <p>Callback method that is called just before rendering takes place.
* This method will <strong>only</strong> be called for the page that
* will actually be rendered (and not, for example, on a page that
* handled a postback and then navigated to a different page). Customize
* this method to allocate resources that will be required for rendering
* this page.</p>
*/
@Override
public void prerender()
{
getRequestBean1().setMensajeAyuda("Utilice la tabla para navegar por las subastas públicas");
//setListadoPublico(ServicioWebSubastas.subastasPublicas());
if(getSessionBean1().getDatosPersonalesSesion() != null)
{
imghlIniciarSesion.setVisible(false);
imghlRegistrarse.setVisible(false);
}
else
{
imghlMisSubastas.setVisible(false);
imghlNuevaSubasta.setVisible(false);
imghlCerrarSesion.setVisible(false);
}
}
/**
* <p>Callback method that is called after rendering is completed for
* this request, if <code>init()</code> was called (regardless of whether
* or not this was the page that was actually rendered). Customize this
* method to release resources acquired in the <code>init()</code>,
* <code>preprocess()</code>, or <code>prerender()</code> methods (or
* acquired during execution of an event handler).</p>
*/
@Override
public void destroy() {
}
/**
* <p>Return a reference to the scoped data bean.</p>
*
* @return reference to the scoped data bean
*/
protected SessionBean1 getSessionBean1()
{
return (SessionBean1) getBean("SessionBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*
* @return reference to the scoped data bean
*/
protected RequestBean1 getRequestBean1()
{
return (RequestBean1) getBean("RequestBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*
* @return reference to the scoped data bean
*/
protected ApplicationBean1 getApplicationBean1()
{
return (ApplicationBean1) getBean("ApplicationBean1");
}
/**
* @return the listadoPublico
*/
public List<Subasta> getListadoPublico()
{
return listadoPublico;
}
/**
* @param listadoPublico the listadoPublico to set
*/
public void setListadoPublico(List<Subasta> listadoPublico)
{
this.listadoPublico = listadoPublico;
}
public String hlDetalles_action()
{
if( getSessionBean1().getDatosPersonalesSesion() == null)
return "iniciarSesion";
RowKey rk = (RowKey) getValue("#{currentRow.tableRow}");
if(rk != null) {
int fila = Integer.parseInt(rk.getRowId());
Subasta s = getListadoPublico().get(fila);
// Pasar la subasta por parámetro
DetallesSubasta detsub = (DetallesSubasta)getBean("DetallesSubasta");
detsub.setSubastaElegida(s);
System.out.println("SUBASTA ENCONTRADA: "+s.getNombre());
return "detallesSubasta";
}
return "detallesSubasta";
}
public String imghlIniciarSesion_action() {
// TODO: Replace with your code
return "iniciarSesion";
}
public String imghlRegistrarse_action() {
// TODO: Replace with your code
return "registro";
}
public String imghlMisSubastas_action() {
// TODO: Replace with your code
return "misSubastas";
}
public String imghlNuevaSubasta_action() {
// TODO: Replace with your code
return "nuevaSubasta";
}
public String imghlCerrarSesion_action() {
// TODO: Replace with your code
getSessionBean1().setDatosPersonalesSesion(null);
imghlIniciarSesion.setVisible(true);
imghlRegistrarse.setVisible(true);
return null;
}
}
| [
"LouisAntonioGarcia@gmail.com"
] | LouisAntonioGarcia@gmail.com |
88a47cf21877e3954eedb7b6041cb804df39fc8f | 2135ebe273ae9ad1fdb5726a257e28e9777c2464 | /src/main/java/com/model/goodss/domain/User.java | c97060e7ed7f3ccbe8c26d755968901f418576d0 | [] | no_license | Bumblee/goods | bde47456444faed843557e9511a6ce735d73d5b6 | cf1f2b00e5edc73fb0d6e20f1e65770d9e625d6d | refs/heads/master | 2021-07-22T20:36:42.735983 | 2017-11-01T01:40:43 | 2017-11-01T01:40:43 | 109,070,626 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,394 | java | package com.model.goodss.domain;
import java.io.Serializable;
public class User implements Serializable {
private static final long serialVersionUID = -1697566241408712446L;
private String id;
private String account;
private String code;
private String email;
private String mobile;
private String name;
private String image;
private String nickname;
private String mood;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public String getMood() {
return mood;
}
public void setMood(String mood) {
this.mood = mood;
}
}
| [
"865079657@qq.com"
] | 865079657@qq.com |
5e2cda1d28a7c3cfe025df0960f7f8d8b92cc888 | 1f15d4ae34280c05fa554c8e98d1b07014775f2c | /esup-pstagedata-dao/src/main/java/org/esupportail/pstagedata/dao/NafN5DaoServiceImpl.java | 696cbd02d7255cc9e1b213aac94b412588a79440 | [] | no_license | EsupPortail/esup-pstagedata | 671885e2d836e1d0a620128055b441944359ab87 | 3f8bae641230832dafbc7f7c3320886d05dccfdf | refs/heads/master | 2023-03-12T23:03:09.254733 | 2023-02-22T15:32:14 | 2023-02-22T15:34:28 | 7,019,367 | 8 | 4 | null | 2021-04-22T17:46:06 | 2012-12-05T15:08:37 | Java | UTF-8 | Java | false | false | 1,266 | java | /**
* ESUP-Portail PStageData - Copyright (c) 2006 ESUP-Portail consortium
* http://sourcesup.cru.fr/projects/esup-pstagedata
*/
package org.esupportail.pstagedata.dao;
import java.util.List;
import org.esupportail.pstagedata.domain.beans.NafN5;
/**
* NafN5 DAO service impl.
*/
/**
* @author Matthieu Manginot : matthieu.manginot@univ-nancy2.fr
*
*/
public class NafN5DaoServiceImpl extends AbstractIBatisDaoService implements NafN5DaoService {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* @see org.esupportail.pstagedata.dao.NafN5DaoService#getNafN5()
*/
@SuppressWarnings("unchecked")
public List<NafN5> getNafN5() {
return getSqlMapClientTemplate().queryForList("getNafN5");
}
/**
* @see org.esupportail.pstagedata.dao.NafN5DaoService#getNafN5FromCodeNafN1(java.lang.String)
*/
@SuppressWarnings("unchecked")
public List<NafN5> getNafN5FromCodeNafN1(String code) {
return getSqlMapClientTemplate().queryForList("getNafN5FromCodeNafN1", code);
}
/**
* @see org.esupportail.pstagedata.dao.NafN5DaoService#getNafN5FromCodeNafN5(java.lang.String)
*/
public NafN5 getNafN5FromCodeNafN5(String code) {
return (NafN5) getSqlMapClientTemplate().queryForObject("getNafN5FromCodeNafN5", code);
}
}
| [
"florian.garot@univ-artois.fr"
] | florian.garot@univ-artois.fr |
aef9a646abb413f0318793cf60f4dda9a092e40b | 65843af8791e4e96bcfed465df61b37bc2deb560 | /core/src/com/spacegame/game/model/builder/BuilderPlayerShip.java | da967c572e75407332841765079f9cf4836edd2c | [] | no_license | nbiryukov/SpaceGame | c5b7c4be2029b3e531ceb38ceb89fdf58c8591e1 | 8b9e171fbf32bc2757b764f41edcc07f4df162e5 | refs/heads/master | 2020-03-16T19:28:56.018011 | 2018-05-10T12:42:11 | 2018-05-10T12:42:11 | 113,740,463 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,383 | 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 com.spacegame.game.model.builder;
import com.badlogic.gdx.math.Rectangle;
import com.spacegame.game.Game;
import com.spacegame.game.model.Direction;
import com.spacegame.game.model.GameObject;
import com.spacegame.game.model.PlayerShip;
import com.spacegame.game.model.Ship;
import com.spacegame.game.model.Trajectory;
import com.spacegame.game.model.TypeObject;
import com.spacegame.game.model.Weapon;
import java.util.ArrayList;
/**
* Класс построения корабля игрока
* @author Никита
*/
public class BuilderPlayerShip implements BuilderGameObject {
private final int WIDTH = 102;
private final int HEIGHT = 34;
private Ship result;
/**
* Построить объект
* @param type тип объекта
*/
@Override
public void buildObject(TypeObject type) {
result = new PlayerShip(TypeObject.PLAYER, 250);
result.setHealth(3);
result.setRectangle(new Rectangle(0, Game.HEIGHT/2, WIDTH, HEIGHT));
ArrayList<Weapon> weapons = new ArrayList<Weapon>();
Weapon w = new Weapon((float)0.25, result);
w.setAngle(0);
w.setDirection(Direction.RIGHT);
weapons.add(w);
result.setWeapons(weapons);
}
/**
* Задать определенную траекторию
* @param trajectory траектория
*/
@Override
public void setTrajectory(Trajectory trajectory) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
/**
* Задать стартовую позицию
* @param x координата по x
* @param y координата по y
*/
@Override
public void setStartPosition(float x, float y) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
/**
* Получить игровой объект
* @return объект
*/
@Override
public GameObject getObject() {
return result;
}
}
| [
"biryukov.nikita96@mail.ru"
] | biryukov.nikita96@mail.ru |
2ddf87f39b856c9fcc695183a1f97f6c64758e9b | 7cb1ea39b2f439ebe7239a5027b1d5ba762cdc83 | /app/src/main/java/com/yzlm/cyl/cfragment/Communication/CommProtocol/Modbus/Rtu/RtuProtocol.java | 3d55824a849c220d1ca7ba4bd22ead65f2bbbf5c | [] | no_license | sikeziji/lvjieProject | dfea180f07cbdc0993f352c90eff7174637890b1 | 750495550ae9efcd02f11ac4b17c5d27a693f0c9 | refs/heads/master | 2022-12-30T03:00:56.514799 | 2020-10-13T07:24:59 | 2020-10-13T07:24:59 | 303,236,809 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 30,816 | java | package com.yzlm.cyl.cfragment.Communication.CommProtocol.Modbus.Rtu;
import com.yzlm.cyl.cfragment.Communication.Communication;
import com.yzlm.cyl.cfragment.Communication.Thread.SendManager;
import com.yzlm.cyl.cfragment.Config.Component.CfgTool.History;
import com.yzlm.cyl.cfragment.R;
import com.yzlm.cyl.clibrary.Util.DataUtil;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import static com.yzlm.cyl.cfragment.Config.Component.CfgTool.Config.getConfigData;
import static com.yzlm.cyl.cfragment.Config.Component.CfgTool.PublicConfig.getPublicConfigData;
import static com.yzlm.cyl.cfragment.Content.Component.List2.List2_Content2.getModePermissions;
import static com.yzlm.cyl.cfragment.DBConvert.BCDDeccode.str2Bcd;
import static com.yzlm.cyl.cfragment.DBConvert.MDBConvert.floatToBytesBigs;
import static com.yzlm.cyl.cfragment.DBConvert.MDBConvert.getSystemDateDay;
import static com.yzlm.cyl.cfragment.DBConvert.MDBConvert.getSystemDateHour;
import static com.yzlm.cyl.cfragment.DBConvert.MDBConvert.getSystemDateMin;
import static com.yzlm.cyl.cfragment.DBConvert.MDBConvert.getSystemDateMonth;
import static com.yzlm.cyl.cfragment.DBConvert.MDBConvert.getSystemDateSec;
import static com.yzlm.cyl.cfragment.DBConvert.MDBConvert.getSystemDateYear;
import static com.yzlm.cyl.cfragment.Global.IOBoardUsed;
import static com.yzlm.cyl.cfragment.Global.context;
import static com.yzlm.cyl.cfragment.Global.doControlJob;
import static com.yzlm.cyl.cfragment.Global.doFlowing;
import static com.yzlm.cyl.cfragment.Global.strComponent;
import static com.yzlm.cyl.clibrary.Util.DataUtil.bytesToHexString;
import static com.yzlm.cyl.clibrary.Util.DataUtil.copybyte;
import static com.yzlm.cyl.clibrary.Util.DataUtil.crc16;
import static java.lang.System.arraycopy;
/**
* Created by zwj on 2017/8/2.
*/
public class RtuProtocol {
/**
* MODBUSRTU1.0版本
*/
public static void ParsingProtocolRtu(Communication port, int sCom, byte[] rs, String sProtocol) {
if (rs != null && rs.length > 6) {
byte[] crc = new byte[2];
arraycopy(rs, rs.length - 2, crc, 0, 2);
byte[] RtuRs = new byte[rs.length - 2];
arraycopy(rs, 0, RtuRs, 0, RtuRs.length);
//若校验模式是低位,则先进行反转
if ("2".equals(getPublicConfigData(sProtocol + "_CRC_MODE"))) {
DataUtil.reverse(crc);
}
if (Arrays.equals(crc16(RtuRs, RtuRs.length), crc)) {
int addr = 0;
addr = Integer.parseInt(getPublicConfigData(sCom == 3 ? "RS485_DIGITAL_ADDR" : (sCom == 1 ? "DIGITAL_ADDR" : "PC_DIGITAL_ADDR")));
if (addr == RtuRs[0]) {
switch (RtuRs[1]) {
case 3:
List<Map> list;
History mHistory;
mHistory = new History(context);
byte[] dataBytes = new byte[256];
switch (RtuRs[2] * 0x100 + RtuRs[3]) {
case 0x00:
if (getModePermissions(strComponent.get(1)[0], "历史数据上传")) {
if (getPublicConfigData("CAL_DATA_UPDATE").equals("true")) {
list = mHistory.select(strComponent.get(1)[0], null, null, null, 0, 1);
} else {
list = mHistory.select(strComponent.get(1)[0], context.getString(R.string.ZY), null, null, 0, 1);
}
if (list.size() > 0) {
float data = Float.parseFloat(list.get(0).get("C").toString());
dataBytes = copybyte(floatToBytesBigs(data));
arraycopy(dataBytes, 0, dataBytes, 0, dataBytes.length);
ModbusSend(port, sCom, (byte) addr, dataBytes);
}
}
break;
case 0x02:
if (getModePermissions(strComponent.get(1)[1], "历史数据上传")) {
if (getPublicConfigData("CAL_DATA_UPDATE").equals("true")) {
list = mHistory.select(strComponent.get(1)[1], null, null, null, 0, 1);
} else {
list = mHistory.select(strComponent.get(1)[1], context.getString(R.string.ZY), null, null, 0, 1);
}
if (list.size() > 0) {
float data = Float.parseFloat(list.get(0).get("C").toString());
dataBytes = copybyte(floatToBytesBigs(data));
arraycopy(dataBytes, 0, dataBytes, 0, dataBytes.length);
ModbusSend(port, sCom, (byte) addr, dataBytes);
}
}
break;
case 0x04:
if (getModePermissions(strComponent.get(1)[2], "历史数据上传")) {
if (getPublicConfigData("CAL_DATA_UPDATE").equals("true")) {
list = mHistory.select(strComponent.get(1)[2], null, null, null, 0, 1);
} else {
list = mHistory.select(strComponent.get(1)[2], context.getString(R.string.ZY), null, null, 0, 1);
}
if (list.size() > 0) {
float data = Float.parseFloat(list.get(0).get("C").toString());
dataBytes = copybyte(floatToBytesBigs(data));
arraycopy(dataBytes, 0, dataBytes, 0, dataBytes.length);
ModbusSend(port, sCom, (byte) addr, dataBytes);
}
}
break;
case 0x06:
if (getModePermissions(strComponent.get(1)[3], "历史数据上传")) {
if (getPublicConfigData("CAL_DATA_UPDATE").equals("true")) {
list = mHistory.select(strComponent.get(1)[3], null, null, null, 0, 1);
} else {
list = mHistory.select(strComponent.get(1)[3], context.getString(R.string.ZY), null, null, 0, 1);
}
if (list.size() > 0) {
float data = Float.parseFloat(list.get(0).get("C").toString());
dataBytes = copybyte(floatToBytesBigs(data));
arraycopy(dataBytes, 0, dataBytes, 0, dataBytes.length);
ModbusSend(port, sCom, (byte) addr, dataBytes);
}
}
break;
case 0x08:
if (getModePermissions(strComponent.get(1)[4], "历史数据上传")) {
if (getPublicConfigData("CAL_DATA_UPDATE").equals("true")) {
list = mHistory.select(strComponent.get(1)[4], null, null, null, 0, 1);
} else {
list = mHistory.select(strComponent.get(1)[4], context.getString(R.string.ZY), null, null, 0, 1);
}
if (list.size() > 0) {
float data = Float.parseFloat(list.get(0).get("C").toString());
dataBytes = copybyte(floatToBytesBigs(data));
arraycopy(dataBytes, 0, dataBytes, 0, dataBytes.length);
ModbusSend(port, sCom, (byte) addr, dataBytes);
}
}
break;
case 0x63:
dataBytes = copybyte(str2Bcd(String.valueOf((short) (getSystemDateYear() - 2000))), str2Bcd(String.valueOf((short) (getSystemDateMonth()))),
str2Bcd(String.valueOf((short) (getSystemDateDay()))), str2Bcd(String.valueOf((short) (getSystemDateHour()))),
str2Bcd(String.valueOf((short) (getSystemDateMin()))), str2Bcd(String.valueOf((short) (getSystemDateSec()))));
arraycopy(dataBytes, 0, dataBytes, 0, dataBytes.length);
ModbusSend(port, sCom, (byte) addr, dataBytes);
break;
}
case 6:
String compName = null;
switch (RtuRs[2] * 0x100 + RtuRs[3]) {
case 0x21:
if (getModePermissions(strComponent.get(1)[0], "反控")) {
compName = strComponent.get(1)[0];
}
break;
case 0x22:
if (getModePermissions(strComponent.get(1)[1], "反控")) {
compName = strComponent.get(1)[1];
}
break;
case 0x23:
if (getModePermissions(strComponent.get(1)[2], "反控")) {
compName = strComponent.get(1)[2];
}
break;
case 0x24:
if (getModePermissions(strComponent.get(1)[3], "反控")) {
compName = strComponent.get(1)[3];
}
break;
case 0x25:
if (getModePermissions(strComponent.get(1)[4], "反控")) {
compName = strComponent.get(1)[4];
}
break;
default:
return;
}
if (compName != null) {
List<String> flows = new ArrayList<>();
String[] flowStr = {"反控" + context.getString(R.string.SDZY), "反控" + context.getString(R.string.SDJZ)};
if (RtuRs[4] * 0x100 + RtuRs[5] < flowStr.length) {
SendManager.SendCmd("IO" + "_" + (!IOBoardUsed ? "打印输出_0_0" : "ModbusRtu_09_" + (sCom == 3 ? "08" : (sCom == 1 ? "07" : "09"))), port, 1, 500, RtuRs);
if (doFlowing.get(compName).equals(context.getString(R.string.waiting_for_instructions))) {
doControlJob(compName, flowStr[RtuRs[4] * 0x100 + RtuRs[5]]);
}
}
} else {
SendManager.SendCmd("IO" + "_" + (!IOBoardUsed ? "打印输出_0_0" : "ModbusRtu_09_" + (sCom == 3 ? "08" : (sCom == 1 ? "07" : "09"))), port, 1, 500, RtuRs);
}
break;
}
}
}
}
}
/*
* 通过接收到地址找到对应组份
*/
public static String getCompName(int reAddr) {
if (strComponent.get(1).length > 0) {
for (String item : strComponent.get(1)) {
if (getConfigData(item, "RTU_ID").equals("")) {
continue;
}
if (getConfigData(item, "RTU_ID").equals(String.valueOf(reAddr))) {
return item;
}
}
if (getPublicConfigData("SYS_RTU_ID").equals(String.valueOf(reAddr))) {
return "SYSTEM";
}
}
return "";
}
public static String ModbusSend(Communication port, int sCom, byte addr, byte[] dataBytes) {
String sendMsg = "";
byte[] head = new byte[3];
head[0] = addr;
head[1] = 0x03;
head[2] = (byte) dataBytes.length;
byte[] sendBytes = copybyte(head, dataBytes);
if (getPublicConfigData("Modbus_Rtu_CRC_MODE").equals("2")) {
byte[] crc = crc16(sendBytes, sendBytes.length);
DataUtil.reverse(crc);
sendBytes = copybyte(sendBytes, crc);
} else {
sendBytes = copybyte(sendBytes, crc16(sendBytes, sendBytes.length));
}
//SendManager.SendCmd("IO" + "_" + "ModbusRtu_09_" + (sCom == 3 ? "08" : (sCom == 1 ? "07" : "09")), S1, 1, 500, sendBytes);
SendManager.SendCmd("IO" + "_" + (!IOBoardUsed ? "打印输出_0_0" : "ModbusRtu_09_" + (sCom == 3 ? "08" : (sCom == 1 ? "07" : "09"))), port, 1, 500, sendBytes);
sendMsg = bytesToHexString(sendBytes, sendBytes.length);
return sendMsg;
}
/*
MODBUS 2.0
public static String ModbusSend(int scom, byte addr, byte[] dataBytes) {
String sendMsg = "";
byte[] head = new byte[3];
head[0] = addr;
head[1] = 0x03;
head[2] = (byte) dataBytes.length;
byte[] sendBytes = copybyte(head, dataBytes);
sendBytes = copybyte(sendBytes, crc16(sendBytes, sendBytes.length));
SendManager.SendCmd("IO" + "_" + "ModbusRtu_09_" + (sCom == 3 ? "08" : (sCom == 1 ? "07" : "09")), S1, 1, 500, sendBytes);
sendMsg = bytesToHexString(sendBytes, sendBytes.length);
return sendMsg;
}
public static void ParsingProtocolRtu(int scom, byte[] rs) {
if (rs != null && rs.length > 10) {
byte[] crc = new byte[2];
arraycopy(rs, rs.length - 4, crc, 0, 2);
byte[] RtuRs = new byte[rs.length - 8];
System.arraycopy(rs, 6, RtuRs, 0, RtuRs.length);
if (Arrays.equals(crc16(RtuRs, RtuRs.length - 2), crc) == true) {
int addr = (scom == 1 ? getPublicConfigData("DIGITAL_ADDR").toString().equals("") ? 0 : Integer.valueOf(getPublicConfigData("DIGITAL_ADDR").toString()) :
getPublicConfigData("PC_DIGITAL_ADDR").toString().equals("") ? 0 : Integer.valueOf(getPublicConfigData("PC_DIGITAL_ADDR").toString()));
byte[] codeByte = new byte[]{RtuRs[2], RtuRs[3]};
reverse(codeByte);
int reReg = toInt(codeByte);
int who = 0;
for (int i = 0; i < strComponent.get(1).length; i++) {
if (reReg < (400 + (i * 300))) {
who = i;
break;
}
}
if (addr == RtuRs[0]) {
switch (RtuRs[1]) {
case 03:
List<Map> list;
History mHistory;
mHistory = new History(context);
byte[] allDataBytes = new byte[256];
int allDataCh = 0;
byte[] dataBytes = new byte[0];
byte[] reRegNumCodeByte = new byte[]{RtuRs[4], RtuRs[5]};
reverse(reRegNumCodeByte);
int reRegNum = toInt(reRegNumCodeByte);
int copyFlag = 1;
int startAddr = lRtuCmdData.get(RtuRs[1] == 3 ? "03" : "06").getRegObj((reReg - (who * 300))).getRegAddr();
int regAddr = startAddr;
for (int i = 0; i < reRegNum; regAddr += lRtuCmdData.get((RtuRs[1] == 3 ? "03" : "06")).getRegObj((regAddr)).getDataLen()) {
i += lRtuCmdData.get((RtuRs[1] == 3 ? "03" : "06")).getRegObj((regAddr)).getDataLen();
if (i > reRegNum) {
return;
}
switch (lRtuCmdData.get((RtuRs[1] == 3 ? "03" : "06")).getRegObj((regAddr)).getDescribe()) {
case "测量值":
who = lRtuCmdData.get((RtuRs[1] == 3 ? "03" : "06")).getRegObj((regAddr)).getRegAddr() / 2;
if (who < strComponent.get(1).length) {
if (getConfigData(strComponent.get(1)[who] , "CAL_DATA_UPDATE").equals("true")) {
list = mHistory.select(strComponent.get(1)[who], null, null, null, 0, 1);
} else {
list = mHistory.select(strComponent.get(1)[who], "做样", null, null, 0, 1);
}
if (list.size() > 0) {
float data = Float.parseFloat(list.get(0).get("C").toString());
dataBytes = copybyte(floatToBytesBigs(data));
} else {
*//*无数据不返回*//*
return;
}
} else {
return;
}
break;
case "工作状态":
int status = getCmds(strComponent.get(1)[who]).getCmd(51).getValue() == null ? 0 : Integer.parseInt((getCmds(strComponent.get(1)[who]).getCmd(51).getValue()).toString());
dataBytes = copybyte(shortToByteArray(status));
break;
case "工作模式":
break;
case "量程低":
dataBytes = copybyte(floatToBytesBigs(Float.valueOf(getConfigData(strComponent.get(1)[who] , "YBLCL").toString())));
break;
case "量程高":
dataBytes = copybyte(floatToBytesBigs(Float.valueOf(getConfigData(strComponent.get(1)[who] , "YBLCH").toString())));
break;
case "当前报错":
int errorNum = 0;
if (hasDigit(workState.get(strComponent.get(1)[who])) == true) {
errorNum = Integer.parseInt(getNumbers(workState.get(strComponent.get(1)[who])));
}
dataBytes = copybyte(shortToByteArray(errorNum));
break;
case "间隔做样小时":
dataBytes = copybyte(shortToByteArray(Integer.parseInt(getConfigData(strComponent.get(1)[who] , "lxclh").toString())));
break;
case "间隔做样分钟":
dataBytes = copybyte(shortToByteArray(Integer.parseInt(getConfigData(strComponent.get(1)[who] , "lxclm").toString())));
break;
case "整点测量0":
case "整点测量1":
case "整点测量2":
case "整点测量3":
case "整点测量4":
case "整点测量5":
case "整点测量6":
case "整点测量7":
case "整点测量8":
case "整点测量9":
case "整点测量10":
case "整点测量11":
case "整点测量12":
case "整点测量13":
case "整点测量14":
case "整点测量15":
case "整点测量16":
case "整点测量17":
case "整点测量18":
case "整点测量19":
case "整点测量20":
case "整点测量21":
case "整点测量22":
case "整点测量23":
int findTime = 0;
String[] strzqclh = getConfigData(strComponent.get(1)[who] , "zqclh").toString().split("[,,]");
for (int j = 0; j < strzqclh.length; j++) {
if (getNumbers(lRtuCmdData.get((RtuRs[1] == 3 ? "03" : "06")).getRegObj((regAddr)).getDescribe()).equals(strzqclh[j])) {
findTime = 1;
break;
}
}
dataBytes = copybyte(shortToByteArray(findTime));
break;
case "消解温度":
dataBytes = copybyte(shortToByteArray(Integer.parseInt(getConfigData(strComponent.get(1)[who] , "xjwd").toString())));
break;
case "消解时长":
dataBytes = copybyte(shortToByteArray(Integer.parseInt(getConfigData(strComponent.get(1)[who] , "xjsc").toString())));
break;
case "显色温度":
dataBytes = copybyte(shortToByteArray(Integer.parseInt(getConfigData(strComponent.get(1)[who] , "xswd").toString())));
break;
case "显示时长":
dataBytes = copybyte(shortToByteArray(Integer.parseInt(getConfigData(strComponent.get(1)[who] , "xssc").toString())));
break;
case "消解降温温度":
dataBytes = copybyte(shortToByteArray(Integer.parseInt(getConfigData(strComponent.get(1)[who] , "xjjw").toString())));
break;
case "显色降温温度":
dataBytes = copybyte(shortToByteArray(Integer.parseInt(getConfigData(strComponent.get(1)[who] , "xsjw").toString())));
break;
case "显色静置":
dataBytes = copybyte(shortToByteArray(Integer.parseInt(getConfigData(strComponent.get(1)[who] , "xsjz").toString())));
break;
case "量程1标1":
dataBytes = copybyte(floatToBytesBigs(Float.parseFloat(getConfigData(strComponent.get(1)[who] , "C0").toString())));
break;
case "量程2标1":
dataBytes = copybyte(floatToBytesBigs(Float.parseFloat(getConfigData(strComponent.get(1)[who] , "C2").toString())));
break;
case "量程3标1":
dataBytes = copybyte(floatToBytesBigs(Float.parseFloat(getConfigData(strComponent.get(1)[who] , "C4").toString())));
break;
case "量程1标2":
dataBytes = copybyte(floatToBytesBigs(Float.parseFloat(getConfigData(strComponent.get(1)[who] , "C1").toString())));
break;
case "量程2标2":
dataBytes = copybyte(floatToBytesBigs(Float.parseFloat(getConfigData(strComponent.get(1)[who] , "C3").toString())));
break;
case "量程3标2":
dataBytes = copybyte(floatToBytesBigs(Float.parseFloat(getConfigData(strComponent.get(1)[who] , "C5").toString())));
break;
case "量程1K":
dataBytes = copybyte(floatToBytesBigs(getNewestKBF(strComponent.get(1)[who], "1", "K")));
break;
case "量程2K":
dataBytes = copybyte(floatToBytesBigs(getNewestKBF(strComponent.get(1)[who], "2", "K")));
break;
case "量程3K":
dataBytes = copybyte(floatToBytesBigs(getNewestKBF(strComponent.get(1)[who], "3", "K")));
break;
case "量程1B":
dataBytes = copybyte(floatToBytesBigs(getNewestKBF(strComponent.get(1)[who], "1", "B")));
break;
case "量程2B":
dataBytes = copybyte(floatToBytesBigs(getNewestKBF(strComponent.get(1)[who], "2", "B")));
break;
case "量程3B":
dataBytes = copybyte(floatToBytesBigs(getNewestKBF(strComponent.get(1)[who], "3", "B")));
break;
default:
copyFlag = 0;
break;
}
if (copyFlag == 1) {
System.arraycopy(dataBytes, 0, allDataBytes, allDataCh, dataBytes.length);
allDataCh += dataBytes.length;
}
}
if (allDataCh != 0) {
byte[] sendData = new byte[allDataCh];
System.arraycopy(allDataBytes, 0, sendData, 0, allDataCh);
ModbusSend(scom, (byte) addr, sendData);
}
break;
case 06:
int setAddr = lRtuCmdData.get(RtuRs[1] == 3 ? "03" : "06").getRegObj((reReg - (who * 300))).getRegAddr();
switch (lRtuCmdData.get((RtuRs[1] == 3 ? "03" : "06")).getRegObj((setAddr)).getDescribe()) {
case "反控":
who = lRtuCmdData.get((RtuRs[1] == 3 ? "03" : "06")).getRegObj((setAddr)).getRegAddr() - 33;
if (who < strComponent.get(1).length) {
List<String> flows = new ArrayList<>();
String[] flowStr = {"手动做样", "手动校准", "仪表清洗", "零样测量", "标样1测量", "标样2测量"};
byte[] reRegDataByte = new byte[]{RtuRs[4], RtuRs[5]};
reverse(reRegDataByte);
int iRegData = toInt(reRegDataByte);
if (iRegData == 0xFF) {
stopWorking(strComponent.get(1)[who]);
} else {
if (iRegData < flowStr.length) {
SendManager.SendCmd("IO" + "_" + "ModbusRtu_09_" + (sCom == 3 ? "08" : (sCom == 1 ? "07" : "09")), S1, 1, 500, RtuRs);
flows.add(flowStr[iRegData]);
runFlows(strComponent.get(1)[who], flows);
}
}
}
break;
}
break;
}
}
}
}
}*/
}
| [
"1931696152@qq.com"
] | 1931696152@qq.com |
06e18cc597584bdfc16154b3a8e57fabe4e6a8cd | becf1be4537a87233f664586a552a880551caec1 | /Caja_Ahorros/test/ec/ups/edu/ec/Controlador/ControladorDetalleTest.java | a59da421290091b507a891a81a9583b0387eaf0c | [] | no_license | DavidSarumeno/Caja_Ahorros | 971c8f387226a6ebd5f1e47a02cbd02aa9e75176 | a3d34f20d31ce30f38543b54ca81cd8167697b9a | refs/heads/master | 2022-10-25T06:15:54.148730 | 2020-06-19T23:12:15 | 2020-06-19T23:12:15 | 273,600,922 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,621 | 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 ec.ups.edu.ec.Controlador;
import ec.ups.edu.clases.ControladorDetalle;
import ec.ups.edu.clases.Movimiento;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author David
*/
public class ControladorDetalleTest {
public ControladorDetalleTest() {
}
@BeforeClass
public static void setUpClass() {
}
@AfterClass
public static void tearDownClass() {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
/**
* Test of calcularSaldo method, of class ControladorDetalle.
*/
@Test
public void testCalcularSaldo() {
System.out.println("calcularSaldo");
Double saldo = null;
ControladorDetalle instance = new ControladorDetalle();
Double expResult = null;
Double result = instance.calcularSaldo(saldo);
assertEquals(expResult, result);
}
/**
* Test of agregarMovimiento method, of class ControladorDetalle.
*/
@Test
public void testAgregarMovimiento() {
System.out.println("agregarMovimiento");
Movimiento m = null;
ControladorDetalle instance = new ControladorDetalle();
instance.agregarMovimiento(m);
}
}
| [
"noreply@github.com"
] | noreply@github.com |
331ea65d92546fbcad7c94fe496a365733585cc3 | d232e51e489977a8134341dc4ad98922ebe8911d | /app/src/test/java/xyz/bnayagrawal/android/stopwatch/ExampleUnitTest.java | 0af12d85dca568c956da3f4953204d0a8caa74c7 | [] | no_license | bnayagrawal/Stopwatch | 733b654073c7a0680306b78637fdc4ed15f239a9 | 6f7703c4b603ae2413165e25e9b9612baf0f29de | refs/heads/master | 2021-01-21T09:14:05.236436 | 2017-05-18T04:25:10 | 2017-05-18T04:25:10 | 91,648,481 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 411 | java | package xyz.bnayagrawal.android.stopwatch;
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);
}
} | [
"bnayagrawal@gmail.com"
] | bnayagrawal@gmail.com |
011dc02331f70fe347845e27220dac7e94ed03db | e57d64aa6cae0b87df5776d9845ac5ac3bb46b74 | /RestExemplo1/src/br/com/rest/teste/HelloWordRest.java | af06f15b0d2e01c27e1961130305f6694d80a8d4 | [] | no_license | ThamiresZamai/AtividadeRest | 971790ff88f68f81d729c5ebda43f5fb14e246b8 | e3111fcd9335cdd1b5d01e9a2ca7c90859d6dd15 | refs/heads/master | 2020-05-03T11:30:29.008044 | 2019-03-30T19:31:31 | 2019-03-30T19:31:31 | 178,602,668 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 471 | java | package br.com.rest.teste;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
@Path("/helloword")
public class HelloWordRest {
@GET
@Path("show={param}")
public String show(@PathParam("param") String msg) {
String out = "Resultado: " + msg;
return out;
}
@GET
@Path("somar/{param1}/{param2}")
public String somar(@PathParam("param1") int a, @PathParam("param2") int b) {
String out = String.valueOf(a + b);
return out;
}
}
| [
"thamyzamai@gmail.com"
] | thamyzamai@gmail.com |
f8cb7715cc894a822d81191bf3b4f24ec5fdd098 | f2fc5c0c96db0c3b5326b579fd1dbbdca93aa5ed | /app/src/main/java/com/example/proyectofinal1eraunidad/elipse.java | 0f606e057b231d9c50e94aa1a0348aad8e46c6cc | [] | no_license | damianpeaf/ProyectoAplicacion1eraUnidad | 2ca86505e564f90d50497df48b9ffca00963d273 | d7d8498c1e38a050ae3d3d32685f10c3284e38cc | refs/heads/master | 2021-02-16T22:04:21.257541 | 2020-03-16T21:33:09 | 2020-03-16T21:33:09 | 245,047,475 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 764 | java | package com.example.proyectofinal1eraunidad;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class elipse extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_elipse);
Button btn1 = (Button) findViewById(R.id.volver);
btn1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getApplication(), MainActivity.class);
startActivity(intent);
}
});
}
}
| [
"damianpeaf@gmail.com"
] | damianpeaf@gmail.com |
b5a0ef94557ebd5b79b73686e58bb193e3e54594 | 1d3683159f9807c190a81c12b1ed457d6dedb5cc | /src/main/java/erebus/block/BlockCompletedPuzzle.java | 88bbfc5dcf60bbcc501d910b175c2deada17b678 | [] | no_license | Ghostlyr/TheErebus | 4074700cd73c18f8648dd41322fa830739642620 | b274c0cdc2c78d73bb876cf95b3202a6cc7c9c70 | refs/heads/master | 2021-01-22T13:37:42.876048 | 2016-05-21T20:03:47 | 2016-05-21T20:03:47 | 53,519,551 | 0 | 0 | null | 2016-03-09T18:01:41 | 2016-03-09T18:01:41 | null | UTF-8 | Java | false | false | 791 | java | package erebus.block;
import erebus.tileentity.TileEntityCompletedPuzzle;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class BlockCompletedPuzzle extends BlockContainer {
public BlockCompletedPuzzle() {
super(Material.rock);
setBlockUnbreakable();
setBlockName("erebus.completedPuzzle");
setBlockTextureName("erebus:anthillBlock");
}
@Override
public int getRenderType() {
return -1;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityCompletedPuzzle();
}
} | [
"foka_12@hotmail.com"
] | foka_12@hotmail.com |
b289c70a2505737b26369757ba8ab9843a0529b0 | cbc3700a4bc3fa0e05d4ba7132f3cf182346ebe2 | /src - Copy/main/java/org/bksport/annotatio/mvc/view/ui/StatisticDialog.java | 9c94158cbaa115cc76d99bbd32bea7fa14c7bfbe | [] | no_license | mrtamb9/BKSportAnnotation | 05f92719542948ee5961251d8db88473dfd4e27e | 1f842992d82d707cede0aad94d507f9e9514c183 | refs/heads/master | 2020-12-25T16:54:45.233944 | 2016-08-29T17:24:35 | 2016-08-29T17:24:35 | 66,863,523 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,811 | java | package org.bksport.annotation.mvc.view.ui;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.HashMap;
import java.util.Set;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.WindowConstants;
import javax.swing.table.DefaultTableModel;
/**
*
* @author congnh
*
*/
public class StatisticDialog extends JDialog {
private static final long serialVersionUID = -1652214797404984627L;
private JButton closeBtn;
private JComboBox docComboBox;
private JTable statTable;
HashMap<String, HashMap<String, Integer>> statistic;
public StatisticDialog(Frame parent, boolean modal) {
super(parent, modal);
initComponents();
}
private void initComponents() {
statTable = new JTable();
closeBtn = new JButton();
docComboBox = new JComboBox();
statTable.setModel(new DefaultTableModel(new Object[][] { { null, null },
{ null, null }, { null, null }, { null, null } }, new String[] {
"Class", "Number of instances" }) {
private static final long serialVersionUID = 448004062672618157L;
Class<?>[] types = new Class[] { java.lang.String.class,
java.lang.Integer.class };
public Class<?> getColumnClass(int columnIndex) {
return types[columnIndex];
}
});
closeBtn.setText("Close");
closeBtn.setToolTipText("View document");
closeBtn.setPreferredSize(new Dimension(90, 23));
closeBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
closeBtnActionPerformed(evt);
}
});
docComboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent evt) {
docComboBoxItemStateChanged(evt);
}
});
((BorderLayout) getLayout()).setVgap(5);
JPanel docPanel = new JPanel();
docPanel.setLayout(new BoxLayout(docPanel, BoxLayout.LINE_AXIS));
docPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
docPanel.add(docComboBox);
add(docPanel, BorderLayout.PAGE_START);
JScrollPane scrollPane = new JScrollPane();
scrollPane.setViewportView(statTable);
add(scrollPane, BorderLayout.CENTER);
JPanel buttonPanel = new JPanel();
buttonPanel.add(closeBtn);
add(buttonPanel, BorderLayout.PAGE_END);
pack();
setLocationRelativeTo(getParent());
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
}
private void closeBtnActionPerformed(ActionEvent evt) {
dispose();
}
private void docComboBoxItemStateChanged(ItemEvent evt) {
if (evt.getStateChange() == ItemEvent.SELECTED) {
viewDocumentStatistic((String) docComboBox.getSelectedItem());
}
}
private void viewDocumentStatistic(String docURL) {
HashMap<String, Integer> annSt = statistic.get(docURL);
Set<String> keySet = annSt.keySet();
DefaultTableModel tableModel = (DefaultTableModel) statTable.getModel();
for (int i = 0; i < tableModel.getRowCount(); i++) {
tableModel.removeRow(i);
}
tableModel.setRowCount(0);
for (String key : keySet) {
tableModel.addRow(new Object[] { key, annSt.get(key) });
}
}
public void setStatistic(HashMap<String, HashMap<String, Integer>> statistic) {
docComboBox.removeAllItems();
this.statistic = statistic;
Set<String> keySet = statistic.keySet();
for (String key : keySet) {
docComboBox.setSelectedItem(key);
docComboBox.addItem(key);
}
}
}
| [
"mrtamb9@gmail.com"
] | mrtamb9@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.