blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
861ae530d2f114b153b3395ac9d12c9a8c996060
dfa095684a8a484d6ece80eda2934fc32a7311a0
/src/main/java/com/gdd/videojuegos/domain/Videojuego.java
a7827563d66b094b0ba1d168037ddbd997e227a5
[]
no_license
gonzalodd/CatalogoVideoJuegos-con-Spring-Bootstrap
9cde0e49a2c33e579becfca0af05df87ab157c32
5eef82ad262bc6b70dbf2332d589a4fecec537ad
refs/heads/master
2021-04-02T08:05:27.645435
2020-09-15T16:09:25
2020-09-15T16:09:25
248,252,160
0
0
null
null
null
null
UTF-8
Java
false
false
1,525
java
package com.gdd.videojuegos.domain; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToOne; @Entity public class Videojuego { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; private String nombre; private String descripcion; private String imagenUrl; @ManyToOne private Distribuidor distribuidor; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } public String getDescripcion() { return descripcion; } public void setDescripcion(String descripcion) { this.descripcion = descripcion; } public String getImagenUrl() { return imagenUrl; } public void setImagenUrl(String imagenUrl) { this.imagenUrl = imagenUrl; } public Distribuidor getDistribuidor() { return distribuidor; } public void setDistribuidor(Distribuidor distribuidor) { this.distribuidor = distribuidor; } @Override public String toString() { return "Videojuego{" + "id=" + id + ", nombre=" + nombre + ", descripcion=" + descripcion + ", imagenUrl=" + imagenUrl + ", distribuidor=" + distribuidor.getId()+ '}'; } }
[ "gonzaloduval95@hotmail.com" ]
gonzaloduval95@hotmail.com
f9a54009d5b9fb70f9467599d91d58c7de34b125
3f50982ca12e467b6a48ab2735bd889b5a2eb530
/dianyu-web/src/main/java/com/haier/openplatform/ueditor/PathFormat.java
066c6137799260e1346291abf31c70a0116ea2d0
[]
no_license
527088995/dianyu
3c1229ca3bddc70ea20cfa733f5d25ee023a3131
ff9de3c731b65ba5ef230c3e3137f24042bbe822
refs/heads/master
2021-01-20T16:48:13.932544
2019-01-31T08:19:58
2019-01-31T08:19:58
90,849,027
0
0
null
null
null
null
UTF-8
Java
false
false
3,648
java
package com.haier.openplatform.ueditor; import java.text.SimpleDateFormat; import java.util.Date; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * 文件路径格式化,使用UEditor的路径规则 * @author L.cm */ public class PathFormat { private static final String TIME = "time"; private static final String FULL_YEAR = "yyyy"; private static final String YEAR = "yy"; private static final String MONTH = "mm"; private static final String DAY = "dd"; private static final String HOUR = "hh"; private static final String MINUTE = "ii"; private static final String SECOND = "ss"; private static final String RAND = "rand"; /** * 解析路径 * @param input 路径表达式 * @return 路径 */ public static String parse(String input) { return PathFormat.parse(input, null); } /** * 解析路径 * @param input 路径表达式 * @param filename 原文件名 * @return 路径 */ public static String parse(String input, String filename) { Pattern pattern = Pattern.compile("\\{([^\\}]+)\\}", Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(input); Date currentDate = new Date(); StringBuffer sb = new StringBuffer(); String matchStr = null; while (matcher.find()) { matchStr = matcher.group(1); if (null != filename && matchStr.indexOf("filename") != -1) { filename = filename.replace("$", "\\$").replaceAll("[\\/:*?\"<>|]", ""); matcher.appendReplacement(sb, filename); } else { matcher.appendReplacement(sb, PathFormat.getString(matchStr, currentDate)); } } matcher.appendTail(sb); return sb.toString(); } private static String getString(String pattern, Date currentDate) { pattern = pattern.toLowerCase(); // time 处理 if (pattern.indexOf(PathFormat.TIME) != -1) { return PathFormat.getTimestamp(); } else if (pattern.indexOf(PathFormat.FULL_YEAR) != -1) { return PathFormat.format(currentDate, "yyyy"); } else if (pattern.indexOf(PathFormat.YEAR) != -1) { return PathFormat.format(currentDate, "yy"); } else if (pattern.indexOf(PathFormat.MONTH) != -1) { return PathFormat.format(currentDate, "MM"); } else if (pattern.indexOf(PathFormat.DAY) != -1) { return PathFormat.format(currentDate, "dd"); } else if (pattern.indexOf(PathFormat.HOUR) != -1) { return PathFormat.format(currentDate, "HH"); } else if (pattern.indexOf(PathFormat.MINUTE) != -1) { return PathFormat.format(currentDate, "mm"); } else if (pattern.indexOf(PathFormat.SECOND) != -1) { return PathFormat.format(currentDate, "ss"); } else if (pattern.indexOf(PathFormat.RAND) != -1) { return PathFormat.getRandom(pattern); } return pattern; } private static String getTimestamp() { return String.valueOf(System.currentTimeMillis()); } /** * 格式化路径, 把windows路径替换成标准路径 * * @param input * 待格式化的路径 * @return 格式化后的路径 */ public static String format(String input) { return input.replace("\\", "/"); } /** * 日期格式化 * @param date 时间 * @param pattern 表达式 * @return 格式化后的时间 */ private static String format(Date date, String pattern) { SimpleDateFormat format = new SimpleDateFormat(pattern); return format.format(date); } private static String getRandom(String pattern) { int length = 0; pattern = pattern.split(":")[1].trim(); length = Integer.parseInt(pattern); return (Math.random() + "").replace(".", "").substring(0, length); } }
[ "527088995@qq.com" ]
527088995@qq.com
9282bdee01390dc2ca62542b8d3adc29e86d6ad8
c86c63e04aaa37b9a9f9f68fdf1dbbd74baa98d4
/android/src/com/android/tools/idea/run/deployment/Key.java
2fc8e7dab01896007b8dc9e434ba8a213c19c411
[ "Apache-2.0" ]
permissive
yang0range/android-1
8ea4bd40c0f2fb0f270309818267a5a3cd3b9b42
3b1eec683e9bc318d734c60f085f00e6d19343e7
refs/heads/master
2023-01-19T09:54:52.233899
2020-11-18T10:44:07
2020-11-18T19:35:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,175
java
/* * Copyright (C) 2019 The Android Open Source Project * * 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.android.tools.idea.run.deployment; import java.util.Objects; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** * A device identifier. When the selected device is persisted in the {@link com.intellij.ide.util.PropertiesComponent PropertiesComponent,} * the output of the device key's {@link #toString} method is what actually gets persisted. */ public final class Key { @NotNull private final String myDeviceKey; @Nullable private final String mySnapshotKey; public Key(@NotNull String key) { int index = key.indexOf('/'); if (index == -1) { myDeviceKey = key; mySnapshotKey = null; } else { myDeviceKey = key.substring(0, index); mySnapshotKey = key.substring(index + 1); } } Key(@NotNull String deviceKey, @Nullable Snapshot snapshot) { myDeviceKey = deviceKey; mySnapshotKey = snapshot == null ? null : snapshot.getDirectory().toString(); } @NotNull String getDeviceKey() { return myDeviceKey; } @Override public boolean equals(@Nullable Object object) { if (!(object instanceof Key)) { return false; } Key key = (Key)object; return myDeviceKey.equals(key.myDeviceKey) && Objects.equals(mySnapshotKey, key.mySnapshotKey); } @Override public int hashCode() { return 31 * myDeviceKey.hashCode() + Objects.hashCode(mySnapshotKey); } @NotNull @Override public String toString() { return mySnapshotKey == null ? myDeviceKey : myDeviceKey + '/' + mySnapshotKey; } }
[ "juancnuno@google.com" ]
juancnuno@google.com
f4a808451d405b8cbbaf466ae9defdb8d7974b52
65e1edfa7b788e0e6a333d19415770ae62984d24
/src/main/java/eu/stratosphere/pact/testing/GenericTestRecordsAssertor.java
c4dfaa82155a3586de9d83ece2a81599268305bd
[]
no_license
TU-Berlin/stratosphere-testing
1e2a30bd7de67d9b4ab0606eac602c3c139cfa07
4ac412c94acb5dda6136d86c8f6727e259fbdaea
refs/heads/master
2021-12-21T05:08:22.066012
2013-10-23T09:52:26
2013-10-23T09:52:26
13,799,210
0
0
null
2021-12-14T20:14:53
2013-10-23T09:51:06
Java
UTF-8
Java
false
false
6,531
java
/*********************************************************************************************************************** * * Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu) * * 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 eu.stratosphere.pact.testing; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import org.junit.Assert; import eu.stratosphere.nephele.types.Record; import eu.stratosphere.pact.generic.types.TypeSerializer; import eu.stratosphere.pact.testing.fuzzy.FuzzyValueMatcher; /** * Utility class that is used from {@link GenericTestRecords#assertEquals(GenericTestRecords)}.<br> * It tries to align all matching records by successively eliminating matching records from the multiset of expected and * actual values.<br> * To reduce memory consumption, only tuples with the same key are held within memory. The key is simply determined by * using all parts of the schema that implement {@link Key} and that are not matched fuzzily. * * @author Arvid Heise */ class GenericTestRecordsAssertor<T extends Record> { private GenericTestRecords<T> expectedValues, actualRecords; private Iterator<T> actualIterator; private Iterator<T> expectedIterator; private final TypeSerializer<T> typeSerializer; private final TypeStringifier<T> typeStringifier; private final KeyExtractor<T> keyExtractor; private final FuzzyValueMatcher<T> fuzzyMatcher; private final TypeConfig<T> typeConfig; public GenericTestRecordsAssertor(TypeConfig<T> typeConfig, GenericTestRecords<T> expectedValues, GenericTestRecords<T> actualRecords) { this.expectedValues = expectedValues; this.actualRecords = actualRecords; this.actualIterator = actualRecords.iterator(); this.expectedIterator = expectedValues.iterator(); this.typeConfig = typeConfig; this.fuzzyMatcher = typeConfig.getFuzzyValueMatcher(); this.keyExtractor = typeConfig.getKeyExtractor(); this.typeSerializer = typeConfig.getTypeSerializer(); this.typeStringifier = typeConfig.getTypeStringifier(); } @SuppressWarnings("unchecked") public void assertEquals() { try { // initialize with null final int keySize = this.keyExtractor.getKeySize(); Comparable<T>[] currentKeys = new Comparable[keySize]; Comparable<T>[] nextKeys = new Comparable[keySize]; int itemIndex = 0; List<T> expectedValuesWithCurrentKey = new ArrayList<T>(); List<T> actualValuesWithCurrentKey = new ArrayList<T>(); if (this.expectedIterator.hasNext()) { T expected = this.typeSerializer.createCopy(this.expectedIterator.next()); this.keyExtractor.fill(currentKeys, expected); expectedValuesWithCurrentKey.add(expected); // take chunks of expected values with the same keys and match them while (this.actualIterator.hasNext() && this.expectedIterator.hasNext()) { expected = this.typeSerializer.createCopy(this.expectedIterator.next()); this.keyExtractor.fill(nextKeys, expected); if (!Arrays.equals(currentKeys, nextKeys)) { this.matchValues(currentKeys, itemIndex, expectedValuesWithCurrentKey, actualValuesWithCurrentKey); this.keyExtractor.fill(currentKeys, expected); } expectedValuesWithCurrentKey.add(expected); itemIndex++; } // remaining values if (!expectedValuesWithCurrentKey.isEmpty()) this.matchValues(currentKeys, itemIndex, expectedValuesWithCurrentKey, actualValuesWithCurrentKey); } if (!expectedValuesWithCurrentKey.isEmpty() || this.expectedIterator.hasNext()) Assert.fail("More elements expected: " + expectedValuesWithCurrentKey + IteratorUtil.stringify(this.typeStringifier, this.expectedIterator)); if (!actualValuesWithCurrentKey.isEmpty() || this.actualIterator.hasNext()) Assert.fail("Less elements expected: " + actualValuesWithCurrentKey + IteratorUtil.stringify(this.typeStringifier, this.actualIterator)); } finally { this.actualRecords.close(); this.expectedValues.close(); } } @SuppressWarnings("unchecked") private void matchValues(Comparable<T>[] currentKeys, int itemIndex, List<T> expectedValuesWithCurrentKey, List<T> actualValuesWithCurrentKey) throws AssertionError { final int keySize = this.keyExtractor.getKeySize(); Comparable<T>[] actualKeys = new Comparable[keySize]; // collect all actual values with the same key T actualRecord = null; while (this.actualIterator.hasNext()) { actualRecord = this.typeSerializer.createCopy(this.actualIterator.next()); this.keyExtractor.fill(actualKeys, actualRecord); if (!Arrays.equals(currentKeys, actualKeys)) break; actualValuesWithCurrentKey.add(actualRecord); actualRecord = null; } if (actualValuesWithCurrentKey.isEmpty()) { final int diffIndex = itemIndex + expectedValuesWithCurrentKey.size() - 1; Assert.fail(String.format("No value for key %s @ %d, expected: %s, but was: %s", Arrays.toString(currentKeys), diffIndex, IteratorUtil.stringify(this.typeStringifier, expectedValuesWithCurrentKey.iterator()), this.typeStringifier.toString(actualRecord))); } // and invoke the fuzzy matcher this.fuzzyMatcher.removeMatchingValues(this.typeConfig, expectedValuesWithCurrentKey, actualValuesWithCurrentKey); if (!expectedValuesWithCurrentKey.isEmpty() || !actualValuesWithCurrentKey.isEmpty()) { int diffIndex = itemIndex - expectedValuesWithCurrentKey.size(); Assert.fail(String.format("Unmatched values for key %s @ %d, expected: %s, but was: %s", Arrays.toString(currentKeys), diffIndex, IteratorUtil.stringify(this.typeStringifier, expectedValuesWithCurrentKey.iterator()), IteratorUtil.stringify(this.typeStringifier, actualValuesWithCurrentKey.iterator()))); } // don't forget the first record that has a different key if (actualRecord != null) actualValuesWithCurrentKey.add(actualRecord); } }
[ "arvid.heise@hpi.uni-potsdam.de" ]
arvid.heise@hpi.uni-potsdam.de
b789c1bb4f9278d98234ed376b3a6372ddebe95c
badae85a191540952ee7b9a24596035a5c78e19c
/report/src/main/java/com/sun/mdm/index/report/client/ReportClient.java
491973d949abe63ca9e1ef64b52610719dce0f83
[]
no_license
ahimanikya/FrescoMDM
864849d48946e4905d7fb9b4523d810ca86909b9
0c71a8fcced848a7d7fcb0e1a17fb01b6bcdf170
refs/heads/master
2021-01-19T19:43:57.048569
2011-01-22T19:03:43
2011-01-22T19:03:43
3,086,550
1
0
null
null
null
null
UTF-8
Java
false
false
12,800
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. * * The contents of this file are subject to the terms of the Common * Development and Distribution License ("CDDL")(the "License"). You * may not use this file except in compliance with the License. * * You can obtain a copy of the License at * https://open-dm-mi.dev.java.net/cddl.html * or open-dm-mi/bootstrap/legal/license.txt. See the License for the * specific language governing permissions and limitations under the * License. * * When distributing the Covered Code, include this CDDL Header Notice * in each file and include the License file at * open-dm-mi/bootstrap/legal/license.txt. * If applicable, add the following below this CDDL Header, with the * fields enclosed by brackets [] replaced by your own identifying * information: "Portions Copyrighted [year] [name of copyright owner]" */ package com.sun.mdm.index.report.client; import com.sun.mdm.index.ejb.report.BatchReportGenerator; import java.util.Hashtable; import javax.naming.InitialContext; import javax.naming.Context; import javax.naming.NamingException; import javax.rmi.PortableRemoteObject; import java.io.File; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; /** * * @author rtam */ public class ReportClient { /** user name */ private static String username = null; /** password */ private static String password = null; /** output directory */ private static String outputDirectory = null; /** config file */ private static String configFile = null; /** application name */ private static String applicationName = null; /** application name */ private static String appServer = null; /** help flag */ private static final String HELP_FLAG = "-h"; /** username flag */ private static final String USERNAME_FLAG = "-u"; /** password flag */ private static final String PASSWORD_FLAG = "-p"; /** output directory flag */ private static final String OUTPUT_DIRECTORY_FLAG = "-d"; /** config file flag */ private static final String CONFIG_FILE_FLAG = "-f"; /** maximum number of command line arguments */ // TO DO: modify to "9" when IS has been fixed private static final int MAX_ARGS_LEN = 5; private static ReportWriter reportWriter = new ReportWriter(); /** Creates a new instance of Report */ public ReportClient() { } /** Returns the value of a command line argument as indicated by the flag * parameter. For example, suppose args is "-p Password1". If flag * is set to "-p", then "Password1" will be returned. * * @param args command line to process * @param flag flag to process * @returns value of the flag if found, null otherwise. */ public static String getParamValue(String args[], String flag) { if (args.length == 0 || flag == null) { return null; } int len = args.length; for (int i = 0; i < len; i++) { String arg = args[i]; if (arg.compareToIgnoreCase(flag) == 0) { if (i < (args.length - 1)) { return args[i + 1]; } else { return null; } } } return null; } /** Determine if a flag has been set in the command line. * * @param args command line to process * @param flag flag to process * @returns true if found, false otherwise. */ public static boolean checkFlag(String args[], String flag) { if (args.length == 0 || flag == null) { return false; } int len = args.length; for (int i = 0; i < len; i++) { String arg = args[i]; if (arg.compareToIgnoreCase(flag) == 0) { return true; } } return false; } /** Display the help screen * * @param errorMessage error message to print out */ public static void displayHelp(String errorMessage) { if (errorMessage != null) { System.out.println(errorMessage + "\n"); } System.out.println("ReportClient"); System.out.println("\nUsage:"); System.out.println("ReportClient -f ConfigurationFile -d OutputDirectory -h"); // TO DO: reinstate when IS has been fixed // System.out.println("ReportClient -uUsername -pPassword -fConfigurationFile -dOutputDirectory -h"); // System.out.println("\n-u: Username for server connection"); // System.out.println("-p: Password for server connection"); System.out.println("-f: XML configuration file"); System.out.println("-d: Output directory for reports (overrides XML configuration file)"); System.out.println("-h: This help screen"); System.out.println("All command line arguments are case-sensitive"); } /** Retrieve the JNDI context * * @param server server * @returns an initial context * @throws RuntimeException */ public static InitialContext getJndiContext(String server) { InitialContext jndiContext = null; try { Hashtable env = new Hashtable(); //using com.sun.jndi.cosnaming.CNCtxFactory does not need vendor specific library. //it needs ejb stub on the class path. env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory"); //For IBM Websphere the PROVIDER_URL is corbaname:iiop:host:port/NameServiceServerRoot env.put(Context.PROVIDER_URL, server); jndiContext = new InitialContext( env ); }catch (NamingException e) { System.out.println("Could not create JNDI API context: " + e.toString()); throw new RuntimeException(e.getMessage()); } return jndiContext; } /** Create a ReportGenerator instance * * @param jndiContext JNDI context * @param applicationName application Name * @returns a ReportGeneratorInstance * @throws Exception if necessary */ public static BatchReportGenerator getReportGenerator(Context jndiContext, String applicationName) throws Exception { BatchReportGenerator reportGen = null; if (applicationName == null) { throw new Exception("Error: applicationName cannot be null"); } try { String lookupString = "ejb/" + applicationName + "BatchReportGenerator"; reportGen = (BatchReportGenerator)jndiContext.lookup(lookupString); //BatchReportGeneratorHome home = (BatchReportGeneratorHome)PortableRemoteObject.narrow( obj, BatchReportGeneratorHome.class ); //reportGen = home.create(); } catch (Exception ne) { ne.printStackTrace(); } return reportGen; } /** Prompts the users if the want to continue and risk overwriting existing * report files. * * @param directoryPath directory path * @throws IOException * @returns true if user wants to continue, false otherwise. */ public static boolean promptToContinue(String directoryPath) throws IOException { System.out.println("Directory already exists: " + directoryPath); System.out.println("Generating reports will overwrite existing files"); System.out.println("Do you wish to continue? [Y|N] "); BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in)); String reply = stdin.readLine(); if (reply.compareToIgnoreCase("Y") == 0) { return true; } else { return false; } } /** * Main entry point * * @param args -d OutputDirectory -f ConfigFile -h */ public static void main(String args[]) { int argc = args.length; // parse command line arguments if (args.length != 0) { if (checkFlag(args, HELP_FLAG) == true) { displayHelp("Help Screen"); System.exit(0); } if (args.length > MAX_ARGS_LEN) { displayHelp("Invalid number of arguments"); System.exit(0); } } // TO DO: reinstate when IS has been fixed // username = getParamValue(args, USERNAME_FLAG); // password = getParamValue(args, PASSWORD_FLAG); configFile = getParamValue(args, CONFIG_FILE_FLAG); outputDirectory = getParamValue(args, OUTPUT_DIRECTORY_FLAG); // TO DO: reinstate when IS has been fixed /* if (username == null) { displayHelp("Error: Username is required"); System.exit(0); } if (password == null) { displayHelp("Error: Password is required"); System.exit(0); } */ if (configFile == null) { displayHelp("Error: Configuration File is required"); System.exit(0); } // Check if the configuration file exists. File configurationFile = new File(configFile); if (configurationFile.exists() == false) { displayHelp("Error: configuration file does not exist--> " + configFile); System.exit(0); } // parse the configuration file ReportConfigurationReader cfgReader = null; ReportConfiguration config = null; try { cfgReader = new ReportConfigurationReader(); cfgReader.setInputXml(configFile); cfgReader.setupHandlers(); config = cfgReader.parse(); } catch (Exception e) { System.err.println(e.getMessage()); System.exit(0); } // check if output directory exists. If not, create it. // If command line argument overrides XML value, then use the command line argument if (outputDirectory == null) { outputDirectory = config.getReportOutputFolder(); if (outputDirectory == null) { displayHelp("Error: output directory is required in either the " + "command line or the configuration file"); System.exit(0); } } File directory = new File(outputDirectory); // Directory should be empty. Otherwise, the reports will overwrite existing files. try { if (directory.exists() == false) { directory.mkdirs(); } else if (promptToContinue(outputDirectory) != true) { System.out.println("Report generation aborted."); System.exit(0); } } catch (IOException e) { e.printStackTrace(); System.exit(0); } // Generate the report(s) boolean retVal = false; BatchReportGenerator repgen = null; try { System.out.println("Generating reports. Please wait...."); applicationName = config.getApplication(); appServer = config.getApplicationServer(); repgen = getReportGenerator(getJndiContext(appServer), applicationName); retVal = reportWriter.createReports(repgen, username, password, directory, cfgReader); } catch (Exception e) { e.printStackTrace(); System.exit(0); } catch (NoClassDefFoundError e2) { System.out.println("Failed to connect to Report Generator"); System.exit(0); } finally { try { // repgen.remove(); } catch (Exception e) { e.printStackTrace(); System.exit(0); } } if (retVal == false) { System.out.println("Error: report generator failed"); System.out.println("Reports completed with error(s)"); System.exit(0); } System.out.println("Report files saved in " + outputDirectory); System.out.println("Reports completed"); System.exit(0); } }
[ "jialu@00cabb6a-c93c-0410-93ac-b9195fe8392e" ]
jialu@00cabb6a-c93c-0410-93ac-b9195fe8392e
af0f8d7400660e9380dba7557ffe48d192165971
8bc38100b4cb66f66ec0e8415804aad3a690374f
/src/main/java/com/fh/mall/controller/admin/MallGoodsInfoController.java
0f64479b5e4876049fe69a99c50eecaa83900f92
[ "MIT" ]
permissive
Smile-FH/Mall_Vue_SpringBoot
aed311fb19c4ccc5960a30bad49077bee0d4f46f
9c69bba673494b77d6850dca2be611c57d40c388
refs/heads/master
2023-01-05T09:42:59.308080
2020-10-26T00:26:50
2020-10-26T00:26:50
286,476,980
1
0
null
null
null
null
UTF-8
Java
false
false
7,631
java
package com.fh.mall.controller.admin; import com.fh.mall.common.MallCategoryLevelEnum; import com.fh.mall.entity.MallGoodsCategory; import com.fh.mall.entity.MallGoodsInfo; import com.fh.mall.service.MallGoodsCategoryService; import com.fh.mall.service.MallGoodsInfoService; import com.fh.mall.utils.Result; import com.fh.mall.utils.ResultGenerator; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletRequest; import java.util.*; /** * Description: 商城物品信息编辑控制层接口 * * @Author: HueFu * @Date: 2020-09-28 08:48 */ @Api(tags = "商城物品信息编辑") @Controller @RequestMapping("/admin") public class MallGoodsInfoController { @Autowired private MallGoodsInfoService mallGoodsInfoService; @Autowired private MallGoodsCategoryService mallGoodsCategoryService; /** * @param request * @return */ @ApiIgnore @GetMapping("/goodInfo") public String toGoodsInfo(HttpServletRequest request, @RequestParam(value = "goodId", required = false) Integer goodId) { MallGoodsCategory threeLevelObj; MallGoodsCategory secondLevelObj; MallGoodsCategory tempGoodsCategory; Integer tempCategoryId; MallGoodsInfo mallGoodsInfo = null; Integer secondLevelId = null; Integer firstLevelId = null; List<MallGoodsCategory> firstLevelList; List<MallGoodsCategory> secondLevelList = null; List<MallGoodsCategory> thirdLevelList = null; Map<String, Object> map = new HashMap<>(2); if (null != goodId) { mallGoodsInfo = this.mallGoodsInfoService.selectByPrimaryKey(goodId); if (null != mallGoodsInfo) { Integer goodThreeLevelId; goodThreeLevelId = mallGoodsInfo.getCategoryId(); threeLevelObj = this.mallGoodsCategoryService.selectByCategoryId(goodThreeLevelId); secondLevelId = threeLevelObj.getParentId(); secondLevelObj = this.mallGoodsCategoryService.selectByCategoryId(secondLevelId); firstLevelId = secondLevelObj.getParentId(); } } map.put("categoryLevel", MallCategoryLevelEnum.LEVEL_ONE.getLevel()); map.put("parentId", null); firstLevelList = this.mallGoodsCategoryService.selectByLevelParentId(map); if (!CollectionUtils.isEmpty(firstLevelList)) { map.replace("categoryLevel", MallCategoryLevelEnum.LEVEL_TWO.getLevel()); if (null != firstLevelId) { map.replace("parentId", firstLevelId); } else { tempGoodsCategory = firstLevelList.get(0); tempCategoryId = tempGoodsCategory.getCategoryId(); map.replace("parentId", tempCategoryId); } secondLevelList = this.mallGoodsCategoryService.selectByLevelParentId(map); if (!CollectionUtils.isEmpty(secondLevelList)) { map.replace("categoryLevel", MallCategoryLevelEnum.LEVEL_THREE.getLevel()); if (null != secondLevelId) { map.replace("parentId", secondLevelId); } else { tempGoodsCategory = secondLevelList.get(0); tempCategoryId = tempGoodsCategory.getCategoryId(); map.replace("parentId", tempCategoryId); } thirdLevelList = this.mallGoodsCategoryService.selectByLevelParentId(map); } } request.setAttribute("firstLevelId", firstLevelId); request.setAttribute("secondLevelId", secondLevelId); request.setAttribute("goodInfo", mallGoodsInfo); request.setAttribute("secondLevel", secondLevelList); request.setAttribute("thirdLevel", thirdLevelList); request.setAttribute("firstLevel", firstLevelList); request.setAttribute("path", "goodInfo"); return "admin/mall_goods_info"; } /** * 分类列表三级联动 * * @param categoryId * @return */ @ApiOperation("分类列表三级联动") @GetMapping("/goodInfo/levelList") @ResponseBody public Result getListLevel(@RequestParam("categoryId") Integer categoryId) { MallGoodsCategory mallGoodsCategory = this.mallGoodsCategoryService.selectByCategoryId(categoryId); // 如果level不是一级或者二级就返回错误信息 if (MallCategoryLevelEnum.LEVEL_ONE.getLevel() != mallGoodsCategory.getCategoryLevel().intValue() && MallCategoryLevelEnum.LEVEL_TWO.getLevel() != mallGoodsCategory.getCategoryLevel().intValue()) { return ResultGenerator.getFailResult("参数异常"); } Map<String, Object> categoryResult = new HashMap<>(2); Map<String, Object> param = new HashMap<>(); if (MallCategoryLevelEnum.LEVEL_ONE.getLevel() == mallGoodsCategory.getCategoryLevel()) { param.put("categoryLevel", MallCategoryLevelEnum.LEVEL_TWO.getLevel()); param.put("parentId", categoryId); List<MallGoodsCategory> secondList = this.mallGoodsCategoryService.selectByLevelParentId(param); categoryResult.put("secondList", secondList); param.put("categoryLevel", MallCategoryLevelEnum.LEVEL_THREE.getLevel()); param.put("parentId", secondList.get(0).getCategoryId()); List<MallGoodsCategory> thirdList = this.mallGoodsCategoryService.selectByLevelParentId(param); categoryResult.put("thirdList", thirdList); } if (MallCategoryLevelEnum.LEVEL_TWO.getLevel() == mallGoodsCategory.getCategoryLevel()) { // 二级分类返回该分类下的所有数据 param.put("categoryLevel", MallCategoryLevelEnum.LEVEL_THREE.getLevel()); param.put("parentId", categoryId); List<MallGoodsCategory> thirdList = this.mallGoodsCategoryService.selectByLevelParentId(param); categoryResult.put("thirdList", thirdList); } return ResultGenerator.getSuccessResult(categoryResult); } @ApiOperation("添加商品信息") @PostMapping("/goodInfo") @ResponseBody public Result saveGoods(@RequestBody MallGoodsInfo mallGoodsInfo) { System.out.println("添加商品信息方法开始执行------方法入参是------mallGoodsInfo:" + mallGoodsInfo); int i = this.mallGoodsInfoService.insertSelective(mallGoodsInfo); return ResultGenerator.getSuccessResult(""); } @ApiOperation("修改商品信息") @PutMapping("/goodInfo") @ResponseBody public Result editGoodInfo(@RequestBody MallGoodsInfo mallGoodsInfo) { System.out.println("the method editGoodInfo Began to run, the method param is: " + mallGoodsInfo); int i = this.mallGoodsInfoService.updateByPrimaryKeySelective(mallGoodsInfo); if (0 >= i) { return ResultGenerator.getFailResult("修改失败了,联系联系运维人员吧"); } return ResultGenerator.getSuccessResult("修改成功"); } @Override public String toString() { return "MallGoodsInfoController{" + "mallGoodsInfoService=" + mallGoodsInfoService + ", mallGoodsCategoryService=" + mallGoodsCategoryService + '}'; } }
[ "fu_hao_email@163.com" ]
fu_hao_email@163.com
3c55ca72d93f8d030d5ab07b47b84d8442c303fa
89264e9990a395732c410706ac93a0c143186c01
/src/test/java/com/mooo/swings/domain/shop/ShopTest.java
d0c34df1ffb356ade4c7057252a7a0dc8797d1de
[]
no_license
RoelGo/CandyShop
db9cb44237f11b45033e6b6aad804f854edbd635
764d7d5f0ed7c22ddc0bb29442d5e96ebd1cb5b5
refs/heads/master
2021-01-17T12:46:12.050311
2017-03-07T08:33:11
2017-03-07T08:33:11
84,073,811
0
0
null
null
null
null
UTF-8
Java
false
false
2,287
java
package com.mooo.swings.domain.shop; import com.mooo.swings.domain.candy.Candy; import com.mooo.swings.domain.candybag.CandyBag; import com.mooo.swings.supplier.SupplierInterface; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; import java.util.Arrays; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; /** * Created by roelg on 6/03/2017. */ public class ShopTest { @Rule public MockitoRule rule = MockitoJUnit.rule(); @InjectMocks private Shop shop; @Mock private SupplierInterface supplier; private Candy smurfjes; private Candy rolaCola; private Candy jellyBelly; private CandyBag pietersBag; private CandyBag seppesBag; private CandyBag emptyBag; @Before public void setUp() throws Exception { shop = new Shop(); smurfjes = new Candy("smurfjes", 4.99, 0.5); rolaCola = new Candy("Rola cola", 9.99, 0.5); jellyBelly = new Candy("Jelly Belly", 2.99, 0.25); pietersBag = new CandyBag(smurfjes, smurfjes, smurfjes); seppesBag = new CandyBag(rolaCola, rolaCola, rolaCola, rolaCola, rolaCola, rolaCola, rolaCola, smurfjes, smurfjes); emptyBag = new CandyBag(); } @Test public void a_new_shop_has_an_empty_non_null_supply() throws Exception { assertThat(shop.getSupply()).isNotEqualTo(null); assertThat(shop.getSupply().size()).isEqualTo(0); } @Test public void a_shop_can_store_bags_in_its_supply() throws Exception { shop.addBagsToSupply(pietersBag, pietersBag, seppesBag); assertThat(shop.getSupply()).contains(pietersBag); } @Test public void a_shop_can_store_bags_from_a_supplier() throws Exception { int before = shop.getSupply().size(); when(supplier.orderCandyBags(5)).thenReturn(Arrays.asList(emptyBag, emptyBag, emptyBag, emptyBag, emptyBag)); shop.addBagsFromSupplierToSupply(5, supplier); verify(supplier).orderCandyBags(5); assertThat(shop.getSupply().size()).isEqualTo(before + 5); } }
[ "roelgoossens22@hotmail.com" ]
roelgoossens22@hotmail.com
064102ac6bb24dadec6a4c7c19e86d3537d48b29
df5efae2d9c29a0a40f031761650e8ef89ab3c44
/shoppingCartService/src/main/java/com/globant/cartService/repositories/ShoppingCartRepository.java
f58426bf7775d17ad535b630fd4334a9406e1fa0
[]
no_license
Nico996/hello_app
d7b7c2bc04b879260382e5ada994034b888cf91f
ed6c5f7c0316be33f13c3601d2a0ed701ee54911
refs/heads/master
2020-03-30T21:39:59.989749
2018-10-07T16:01:08
2018-10-07T16:01:08
151,637,248
0
0
null
2018-10-04T21:20:02
2018-10-04T21:20:01
null
UTF-8
Java
false
false
313
java
package com.globant.cartService.repositories; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import com.globant.cartService.entities.ShoppingCart; @Repository public interface ShoppingCartRepository extends JpaRepository<ShoppingCart, Long> { }
[ "agustincipollone@gmail.com" ]
agustincipollone@gmail.com
2e54f805d9c116a13badf4c673bf3c546b7f1ad6
e90de6efb21d06049a7232412c77d7c36543b244
/KilbeesCORE/src/com/kilbees/bussiness/exception/KilbeesLoginException.java
e3a567e5b66fd012912167d7657201b9730d8367
[]
no_license
priyanga220/kilbees002
1a417aea8e150ba10981cde5e42f21684911dd43
4524152a0155e196b91c89061b5ca7d3b1e2dfb5
refs/heads/master
2016-09-01T17:58:18.253171
2014-11-16T13:08:02
2014-11-16T13:08:02
38,238,957
0
0
null
null
null
null
UTF-8
Java
false
false
248
java
package com.kilbees.bussiness.exception; public class KilbeesLoginException extends Exception { /** * */ private static final long serialVersionUID = 1L; public KilbeesLoginException(String arg) { super(arg); } }
[ "priyanga220@gmail.com" ]
priyanga220@gmail.com
29be57c0d00915ae93f501e80e91f192acc83458
3f01bc82689b09776b3e065f935ad6c6a5711c5e
/源码/blade/blade-kit/src/main/java/com/blade/kit/reflect/ClassDefine.java
fd9d634242101059a436fe5f1f081dead4b6ceda
[ "Apache-2.0" ]
permissive
bhsei/17TeamB_blade
c014b9a7fcca10cdd73400551285fd212611f6a3
01b1229672202ad85d1678de1a47aaece84f9010
refs/heads/master
2021-07-21T13:38:08.436599
2017-10-30T15:25:08
2017-10-30T15:25:08
84,550,839
1
6
null
2017-04-17T06:42:23
2017-03-10T10:57:31
Java
UTF-8
Java
false
false
3,108
java
package com.blade.kit.reflect; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.concurrent.ConcurrentHashMap; public final class ClassDefine { private static final ConcurrentHashMap<Class<?>, ClassDefine> pool = new ConcurrentHashMap<Class<?>, ClassDefine>(128); private final Class<?> clazz; private ClassDefine(Class<?> type) { this.clazz = type; } public static ClassDefine create(Class<?> clazz){ ClassDefine classDefine = pool.get(clazz); if (classDefine == null) { classDefine = new ClassDefine(clazz); ClassDefine old = pool.putIfAbsent(clazz, classDefine); if (old != null) { classDefine = old; } } return classDefine; } @SuppressWarnings("unchecked") public <T> Class<T> getType() { return (Class<T>) clazz; } public String getName() { return clazz.getName(); } public String getSimpleName() { return clazz.getSimpleName(); } public ClassDefine getSuperKlass() { Class<?> superKlass = clazz.getSuperclass(); return (superKlass == null) ? null : ClassDefine.create(superKlass); } public List<ClassDefine> getInterfaces() { Class<?>[] interfaces = clazz.getInterfaces(); if (interfaces.length == 0) { return Collections.emptyList(); } List<ClassDefine> results = new ArrayList<ClassDefine>(interfaces.length); for (Class<?> intf : interfaces) { results.add(ClassDefine.create(intf)); } return results; } // ------------------------------------------------------------------ public Annotation[] getAnnotations() { return clazz.getAnnotations(); } public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { return clazz.getAnnotation(annotationClass); } public <T extends Annotation> boolean isAnnotationPresent(Class<T> annotationClass) { return clazz.isAnnotationPresent(annotationClass); } public Field[] getDeclaredFields() { return clazz.getDeclaredFields(); } // ------------------------------------------------------------------ public int getModifiers() { return clazz.getModifiers(); } public boolean isInterface() { return Modifier.isInterface(getModifiers()); } public boolean isAbstract() { return Modifier.isAbstract(getModifiers()); } public boolean isStatic() { return Modifier.isStatic(getModifiers()); } public boolean isPrivate() { return Modifier.isPrivate(getModifiers()); } public boolean isProtected() { return Modifier.isProtected(getModifiers()); } public boolean isPublic() { return Modifier.isPublic(getModifiers()); } }
[ "hh23485@126.com" ]
hh23485@126.com
5b5422ebb063ca838bf07d368aa064b96f752040
5bbd2e95eee806178211160b1321dd620759dc66
/src/main/java/org/fstn/rawOrganizer/controller/viewer/RAWViewerController.java
cb0ff363ed4ab40176f0412d36b48139db4b6715
[]
no_license
fstn/rawOrganizer
84e2cc5f02e93048927eac715b60a4cade8ee953
9264f0898f21c46be2a94e969ca140001ea0f91c
refs/heads/master
2020-06-04T19:21:28.685111
2013-01-27T20:58:15
2013-01-27T20:58:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,590
java
package org.fstn.rawOrganizer.controller.viewer; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax.imageio.ImageIO; import javax.imageio.ImageReader; import javax.imageio.metadata.IIOMetadata; import org.fstn.rawOrganizer.event.EventType; import org.fstn.rawOrganizer.event.InitializedEvent; import org.fstn.rawOrganizer.util.SessionConstante; import org.fstn.rawOrganizer.util.Util; import org.fstn.rawOrganizer.view.viewer.PicsViewer; import org.fuid.Session; import org.fuid.controller.Controller; import org.fuid.event.FuidEvent; import org.fuid.event.FuidListener; public class RAWViewerController implements FuidListener, Controller { Logger logger = Logger.getLogger(RAWViewerController.class .getCanonicalName()); private PicsViewer picsViewer; public RAWViewerController() { Session.getInstance().addListener(this); } public PicsViewer getPicsViewer() { return picsViewer; } public void setPicsViewer(PicsViewer picsViewer) { this.picsViewer = picsViewer; } public void onEvent(FuidEvent event) { if (event.getType() == EventType.FILECHOOSE) { logger.info(this.getClass().getName() + ": Controller dossier choisi: " + event.getArg()); InitializedEvent initEvent = new InitializedEvent( EventType.SHOWFILES); if (event.getArg() != null) { File[] files = null; File directoryToScan = (File) event.getArg(); files = directoryToScan.listFiles(); for (File file : files) { String fileName = file.getName(); if (Util.isImage(fileName)) { try { String shortName = fileName.substring(1, fileName.lastIndexOf('.')); String extension = fileName.substring(fileName .lastIndexOf('.') + 1); ImageIO.scanForPlugins(); String[] list = ImageIO.getReaderFormatNames(); String sessionSelectedType = (String) Session .getInstance().getCurrent() .get(SessionConstante.SELECTED_FILE_TYPE); if (file.getName().toUpperCase().endsWith(".NEF") && sessionSelectedType .equals(SessionConstante.RAW)) { logger.info("Processing %s...\n" + file.getCanonicalPath()); final ImageReader reader = (ImageReader) ImageIO .getImageReaders(file).next(); reader.setInput(ImageIO .createImageInputStream(file)); final IIOMetadata metadata = reader .getImageMetadata(0); BufferedImage image = reader .readThumbnail(0, 0); //initEvent.addImage(image, file.getName(), // file.getAbsolutePath()); /** * final NEFMetadata nefMetadata = (NEFMetadata) * metadata; final IFD exifIFD = * nefMetadata.getExifIFD(); final TagRational * focalLength = exifIFD.getFocalLength(); **/ /** * IFD exifIFD = nefMetadata.get .getExifIFD(); * exifIFD.getImageDescription(); TagRational * focalLength = exifIFD.getFocalLength(); * System * .out.println(focalLength.doubleValue()); */ } } catch (StringIndexOutOfBoundsException e) { logger.log(Level.SEVERE, "", e); } catch (IOException e) { logger.log(Level.SEVERE, "", e); } } } Session.getInstance().fireEvent(initEvent); } } } public void clean() { Session.getInstance().removeListener(this); } }
[ "fstn11@gmail.com" ]
fstn11@gmail.com
7da258f7b2a111ad661a46eb5bfdf32c51f69376
3f154b64e92b4aba133d39cedb4474569edec29e
/app/src/main/java/com/jaydenxiao/androidfire/ui/more/activity/CompanyStationFragment.java
bab0c77be8a7ac9da3139d9e4f475b5dda975008
[]
no_license
anwz0611/bejxmkf
abed7a52fb17733d3cb35b34dfc63951edb2fe5b
3122da9c19d2a39eaf34b6efc94e00a9c3b16886
refs/heads/master
2020-03-24T00:02:47.802851
2018-10-29T01:21:42
2018-10-29T01:21:42
142,269,867
3
0
null
null
null
null
UTF-8
Java
false
false
9,026
java
package com.jaydenxiao.androidfire.ui.more.activity; import android.app.Activity; import android.content.BroadcastReceiver; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.database.Cursor; import android.os.Bundle; import android.provider.ContactsContract; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; import android.widget.ListView; import android.widget.TextView; import com.jaydenxiao.androidfire.R; import com.jaydenxiao.androidfire.bean.PhoneItemInfo; import com.jaydenxiao.androidfire.bean.addressBookInfoBeans; import com.jaydenxiao.androidfire.entity.ShapeLoadingDialog; import com.jaydenxiao.androidfire.ui.more.adapter.SortAdapter; import com.jaydenxiao.androidfire.utils.CharacterParser; import com.jaydenxiao.androidfire.utils.PinyinComparator; import com.jaydenxiao.androidfire.view.ClearEditText; import com.jaydenxiao.androidfire.view.SideBar; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /** * * Description:通讯录(按照姓名查询) * * */ public class CompanyStationFragment extends Activity { private static final String TAG = "TestFragment"; private ListView sortListView; private SideBar sideBar; private TextView dialog; private SortAdapter sortAdapter; private ClearEditText mClearEditText; private Context context; private CharacterParser characterParser; private List<addressBookInfoBeans.WaterBookDetailListBean> SourceDateList = new ArrayList<addressBookInfoBeans.WaterBookDetailListBean>(); private PinyinComparator pinyinComparator; private List<addressBookInfoBeans.WaterBookDetailListBean> lists = new ArrayList<addressBookInfoBeans.WaterBookDetailListBean>(); private ShapeLoadingDialog sDialog; private String loading_text; private List<Map<String, Boolean>> groupCheckBox = new ArrayList<Map<String, Boolean>>(); private static final String G_CB = "G_CB"; private List<String> listChoose = new ArrayList<String>(); private int show = 1; // 这两个List用于暂时存储联系人的名字和号码 List<String> myContactName = new ArrayList<String>(); List<String> myContactNumber = new ArrayList<String>(); private static final String[] CONTACTOR_ION = new String[] { ContactsContract.CommonDataKinds.Phone.CONTACT_ID, ContactsContract.Contacts.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.NUMBER }; // 开启广播监听是否发送成功! private BroadcastReceiver mBroadcast = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub String action = intent.getAction(); switch (action) { // 短信编辑页面返回取值 case "updata": show = 1; listChoose.clear(); sortAdapter = new SortAdapter(context, SourceDateList, show, groupCheckBox); sortListView.setAdapter(sortAdapter); sortAdapter.notifyDataSetChanged(); break; case "allSend": show = 2; listChoose = sortAdapter.getlistChoose(); sortAdapter = new SortAdapter(context, SourceDateList, show, groupCheckBox); sortListView.setAdapter(sortAdapter); sortAdapter.notifyDataSetChanged(); break; default: break; } } }; @Override public void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.company_name); context = this; IntentFilter mFilter = new IntentFilter(); mFilter.addAction("updata");// 更新 mFilter.addAction("allSend");// 群发 mFilter.addAction("allSendMes");// 群发 mFilter.addAction("Numpage");// 选中数量 context.registerReceiver(mBroadcast, mFilter); initViews(); } private void getPhoneList() { // getSimPhoneList(); Cursor phones = null; ContentResolver cr = getContentResolver(); try { phones = cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, CONTACTOR_ION, null, null, "sort_key"); if (phones != null) { final int displayNameIndex = phones.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME); final int phoneIndex = phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER); String phoneString, displayNameString; while (phones.moveToNext()) { phoneString = phones.getString(phoneIndex); displayNameString = phones.getString(displayNameIndex); if (phoneString.substring(0, 1).equals("0")) { continue; } myContactName.add(displayNameString); myContactNumber.add(phoneString); addressBookInfoBeans.WaterBookDetailListBean sortModel = new addressBookInfoBeans.WaterBookDetailListBean(); sortModel.setDwlxr(displayNameString); sortModel.setDwlxrdh(phoneString); lists.add(sortModel); } } } catch (Exception e) { } finally { if (phones != null) phones.close(); } SourceDateList = filledData(lists); // 根据a-z进行排序源数据 Collections.sort(SourceDateList, pinyinComparator); getListData(); sortAdapter = new SortAdapter(context, SourceDateList, show, groupCheckBox); sortListView.setAdapter(sortAdapter); sDialog.dismiss(); } /* * 初始化Adapter数据 */ private void getListData() { // TODO Auto-generated method stub if (groupCheckBox.size() != 0) { groupCheckBox.clear(); } for (int i = 0; i < SourceDateList.size(); i++) { Map<String, Boolean> curGB = new HashMap<String, Boolean>(); curGB.put(G_CB, false); groupCheckBox.add(curGB); } } private void initViews() { // TODO Auto-generated method stub sideBar = (SideBar) findViewById(R.id.sidrbar); dialog = (TextView) findViewById(R.id.dialog); sideBar.setTextView(dialog); loading_text = context.getString(R.string.loading_text); sDialog = new ShapeLoadingDialog(context); characterParser = CharacterParser.getInstance(); pinyinComparator = new PinyinComparator(); sideBar.setOnTouchingLetterChangedListener(new SideBar.OnTouchingLetterChangedListener() { @Override public void onTouchingLetterChanged(String s) { int position = sortAdapter.getPositionForSection(s.charAt(0)); if (position != -1) { sortListView.setSelection(position); } } }); sortListView = (ListView) findViewById(R.id.country_lvcountry); mClearEditText = (ClearEditText) findViewById(R.id.filter_edit); mClearEditText.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { filterData(s.toString()); } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void afterTextChanged(Editable s) { } }); sDialog.loading(loading_text); getPhoneList(); } /** * ListView * */ private List<addressBookInfoBeans.WaterBookDetailListBean> filledData(List<addressBookInfoBeans.WaterBookDetailListBean> list) { List<addressBookInfoBeans.WaterBookDetailListBean> mSortList = new ArrayList<addressBookInfoBeans.WaterBookDetailListBean>(); for (int i = 0; i < list.size(); i++) { addressBookInfoBeans.WaterBookDetailListBean sortModel = new addressBookInfoBeans.WaterBookDetailListBean(); sortModel.setDwlxr(list.get(i).getDwlxr().toString()); sortModel.setDwlxrdh(list.get(i).getDwlxrdh().toString()); // 汉字转换成拼音 String pinyin = characterParser.getSelling(list.get(i).getDwlxr()); String sortString = pinyin.substring(0, 1).toUpperCase(); // 正则表达式,判断首字母是否是英文字母 if (sortString.matches("[A-Z]")) { sortModel.setSortLetters(sortString.toUpperCase()); } else { sortModel.setSortLetters("#"); } mSortList.add(sortModel); } return mSortList; } /** * 根据输入框中的值来过滤数据并更新ListView * * @param filterStr */ private void filterData(String filterStr) { List<addressBookInfoBeans.WaterBookDetailListBean> filterDateList = new ArrayList<addressBookInfoBeans.WaterBookDetailListBean>(); if (TextUtils.isEmpty(filterStr)) { filterDateList = SourceDateList; } else { filterDateList.clear(); for (addressBookInfoBeans.WaterBookDetailListBean sortModel : SourceDateList) { String name = sortModel.getDwlxr();// 姓名 String phone = sortModel.getDwlxrdh();// 电话号码 if (name.indexOf(filterStr.toString()) != -1 || characterParser.getSelling(name).startsWith(filterStr.toString()) || phone.indexOf(filterStr.toString()) != -1 || characterParser.getSelling(phone).startsWith(filterStr.toString())) { filterDateList.add(sortModel); } } } // 根据a-z进行排序 Collections.sort(filterDateList, pinyinComparator); sortAdapter.updateListView(filterDateList); } @Override protected void onDestroy() { // TODO Auto-generated method stub super.onDestroy(); context.unregisterReceiver(mBroadcast); } }
[ "303438914@qq.com" ]
303438914@qq.com
943294b1d6db250aeb0064329a3306810c5037c4
854b6dd6de411e3a353542f303f6c30e9f55c0b7
/src/test/java/com/abh/totaller/impl/PriceTotallerTest.java
2cb7bf7451b0f64666947f3cc35ad1eb62010dc1
[]
no_license
alexyzhart/rbctest2
ad40938e535e5841547aa1527307585afdbd1d40
0b1e2ca61681815d7baf015a3075eb4b4bfbb598
refs/heads/master
2021-01-17T16:24:08.978678
2016-06-28T15:32:07
2016-06-28T15:32:07
62,147,522
0
0
null
null
null
null
UTF-8
Java
false
false
1,343
java
package com.abh.totaller.impl; import com.abh.item.IItem; import com.abh.item.impl.Item; import com.abh.totaller.IPriceTotaller; import junit.framework.Assert; import org.junit.Before; import org.junit.Test; import java.math.BigDecimal; import java.util.Arrays; import java.util.Collection; public class PriceTotallerTest { private static final BigDecimal PRICE_1 = new BigDecimal("1.23"); private static final BigDecimal PRICE_2 = new BigDecimal("3.57"); private static final BigDecimal PRICE_3 = new BigDecimal("5.89"); private static final BigDecimal PRICE_4 = new BigDecimal("7.21"); private static final BigDecimal TOTAL_PRICE = PRICE_1.add(PRICE_2).add(PRICE_3).add(PRICE_4); private IPriceTotaller priceTotaller; private Collection<IItem> testItems; @Before public void setup(){ priceTotaller = new PriceTotaller(); testItems = Arrays.asList( (IItem) new Item("Item1", PRICE_1), new Item("Item2", PRICE_2), new Item("Item3", PRICE_3), new Item("Item3", PRICE_4) ); } @Test public void testCalcTotalPrice() throws Exception { BigDecimal actual = priceTotaller.calcTotalPrice(testItems); Assert.assertEquals("PriceTotaller returned incorrect total", TOTAL_PRICE, actual); } }
[ "alexyzhart@yahoo.com" ]
alexyzhart@yahoo.com
c705ba47a9c71431dd5e7a4d6eadee7639e5e807
b13da067dacb3395e420fe051906f328a026b968
/app/src/main/java/com/example/myultra/servicecentre/MainActivity.java
f170389e218a2264d3da4ae0517d88aceb5c6d00
[]
no_license
prashantkumar1/servicecentre
18fac662040141a548d0e63f235c281e07314755
4720c54e7d7e3f1cdba0e3744f186b54284d5e83
refs/heads/master
2020-03-14T11:52:20.185560
2018-04-30T13:29:51
2018-04-30T13:29:51
131,598,709
0
0
null
null
null
null
UTF-8
Java
false
false
2,233
java
package com.example.myultra.servicecentre; import android.app.Activity; import android.app.TabActivity; import android.content.Intent; import android.content.SharedPreferences; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.widget.TabHost; public class MainActivity extends TabActivity { TabHost th; TabHost.TabSpec t1,t2; DataHelper dbHeplper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); SharedPreferences sp = getSharedPreferences("My_PREFS", Activity.MODE_PRIVATE); SharedPreferences.Editor edit = sp.edit(); boolean check = sp.getBoolean("check",true); if(check) { SamsungDatabase s = new SamsungDatabase(this); edit.putBoolean("check", false); edit.commit(); } th=(TabHost)findViewById(android.R.id.tabhost); th.setup(); t1=th.newTabSpec("tab1"); t2=th.newTabSpec("tab2"); Intent i1 = new Intent(this,MobileActivity.class); Intent i2 = new Intent(this,LaptopActivity.class); t1.setContent(R.id.tab1); t1.setIndicator("Mobiles"); t1.setContent(i1); t2.setContent(R.id.tab2); t2.setIndicator("Laptops"); t2.setContent(i2); th.addTab(t1); th.addTab(t2); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }
[ "prashant.1.kumar@gmail.com" ]
prashant.1.kumar@gmail.com
c729111ed45552f3676ed38258f77ce1d55597fe
14234d14c272d65ee875760b88cb490f89507264
/spring-actuator/src/main/java/se/jsquad/configuration/ApplicationConfiguration.java
f66839a3829343b8c371c0a02775b07ed83baa78
[ "Apache-2.0" ]
permissive
jsquad-consulting/openbank-jee
4b4789e03e1a6c8eb9d7207c17ab433d6105e945
4713bd782a978f34f6b8e30d275fb12655173f17
refs/heads/master
2021-06-16T19:56:43.294762
2021-03-13T17:10:43
2021-03-13T17:42:51
179,931,020
0
1
Apache-2.0
2021-03-13T17:42:52
2019-04-07T07:20:50
Java
UTF-8
Java
false
false
3,131
java
/* * Copyright 2020 JSquad AB * * 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 se.jsquad.configuration; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.InjectionPoint; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.boot.actuate.health.HealthIndicator; import org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.jdbc.DataSourceBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Scope; import org.springframework.jdbc.core.JdbcTemplate; import se.jsquad.component.database.OpenBankDatabaseConfiguration; @Configuration @ComponentScan(basePackages = {"se.jsquad"}) @EnableConfigurationProperties(value = {OpenBankDatabaseConfiguration.class}) public class ApplicationConfiguration { private OpenBankDatabaseConfiguration openBankDatabaseConfiguration; public ApplicationConfiguration(OpenBankDatabaseConfiguration openBankDatabaseConfiguration) { this.openBankDatabaseConfiguration = openBankDatabaseConfiguration; } @Bean("logger") @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE) Logger getLogger(final InjectionPoint injectionPoint) { return LogManager.getLogger(injectionPoint.getMember().getDeclaringClass().getName()); } @Bean @Qualifier("openBankJdbcTemplate") public JdbcTemplate openBankJdbcTemplate() { DataSourceBuilder dataSourceBuilder = DataSourceBuilder.create(); dataSourceBuilder.driverClassName(openBankDatabaseConfiguration.getDriverclassname()); dataSourceBuilder.url(openBankDatabaseConfiguration.getUrl()); dataSourceBuilder.username(openBankDatabaseConfiguration.getUsername()); dataSourceBuilder.password(openBankDatabaseConfiguration.getPassword()); return new JdbcTemplate(dataSourceBuilder.build(), true); } @Bean("openbankDatabaseHealthIndicator") public HealthIndicator openbankDatabaseHealthIndicator() { DataSourceHealthIndicator dataSourceHealthIndicator = new DataSourceHealthIndicator(openBankJdbcTemplate().getDataSource()); dataSourceHealthIndicator.setQuery("SELECT 1"); return dataSourceHealthIndicator; } }
[ "andy.holst85@gmail.com" ]
andy.holst85@gmail.com
7fcb6963168698990d437394432ed7b7b76e8e43
027cd7112ef70fbcdb2670a009654f360bb7e06e
/org/eclipse/swt/widgets/Monitor.java
8efbd002c254ad07046c94ff89c23a5c214250e4
[]
no_license
code4ghana/courseScheduler
1c968ebc249a75661bdc22075408fc60e6d0df19
9885df3638c6b287841f8a7b751cfe1523a68fb2
refs/heads/master
2016-08-03T14:06:38.715664
2014-08-03T03:37:36
2014-08-03T03:37:36
22,566,289
0
1
null
null
null
null
UTF-8
Java
false
false
973
java
package org.eclipse.swt.widgets; import org.eclipse.swt.graphics.Rectangle; public final class Monitor { int handle; int x; int y; int width; int height; int clientX; int clientY; int clientWidth; int clientHeight; public boolean equals(Object paramObject) { if (paramObject == this) return true; if (!(paramObject instanceof Monitor)) return false; Monitor localMonitor = (Monitor)paramObject; return this.handle == localMonitor.handle; } public Rectangle getBounds() { return new Rectangle(this.x, this.y, this.width, this.height); } public Rectangle getClientArea() { return new Rectangle(this.clientX, this.clientY, this.clientWidth, this.clientHeight); } public int hashCode() { return this.handle; } } /* Location: /Users/jeff.kusi/Downloads/AutomatedScheduler - Fakhry & Kusi.jar * Qualified Name: org.eclipse.swt.widgets.Monitor * JD-Core Version: 0.6.2 */
[ "jeff.kusi@willowtreeapps.com" ]
jeff.kusi@willowtreeapps.com
b61a0b685e3668d6a8848ddbf7b45c3218e95af1
cb6c3f0bee4b7b4955ba9707c65789a0be48b2ad
/src/com/minal/wtcaccessories/AmeiActivity.java
6beb33237f4a38d57a04863c66ae702fc0d121e6
[]
no_license
cucugendong/Tugas-MK-android
34d6e89f654e02077e989c04835add443772c36f
bc08ff43171e9d3084c27e9b90e646c14260e904
refs/heads/master
2016-09-03T02:46:41.358855
2014-12-07T06:09:48
2014-12-07T06:09:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,554
java
package com.minal.wtcaccessories; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBar; import android.support.v4.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.os.Build; public class AmeiActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_amei); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.amei, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } /** * A placeholder fragment containing a simple view. */ public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.activity_amei, container, false); return rootView; } } }
[ "ardy_butut@yahoo.com" ]
ardy_butut@yahoo.com
b85e0bd97c4154b52874f03eb0ff7cecde5d48ae
d92c24dd757039d0b5370b9a3c99831b7451ccf5
/fundraising_Admin/src/java/main/com/fundraising/admin/controller/login/LoginController.java
35ea935d97214982b6e5d06523f3d5092149895f
[]
no_license
koLaD/fundraising
736a444c3f5eb1b9935540081a849ef221a33117
407967157e7c5b35c50ea26d5c813e51ab66ad5b
refs/heads/main
2023-07-16T19:43:41.351215
2021-08-25T16:06:43
2021-08-25T16:06:43
398,866,640
0
0
null
null
null
null
UTF-8
Java
false
false
1,960
java
package com.fundraising.admin.controller.login; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; import com.fundraising.service.menu.MenuService; import com.fundraising.service.user.UserService; import com.fundraising.util.UserDTO; import com.fundraising.util.common.CommonConstant; @Controller public class LoginController { @Autowired private UserService userServiceImpl; @Autowired private MenuService menuService; @GetMapping(value = "/logIn") private String logInGet(Model model) { model.addAttribute("userDTO", new UserDTO()); return "logIn"; } @PostMapping(value = "/logIn") private String logInPost(@ModelAttribute("userDTO") UserDTO userDTO, HttpServletRequest request, Model model) { UserDTO loggedInUser = userServiceImpl.checkAuthentication(userDTO.getPhoneNo(), userDTO.getPassword()); if (loggedInUser != null) { loggedInUser.setPassword(""); request.getSession().setAttribute(CommonConstant.LOGIN_USER_SESSION_KEY, loggedInUser); model.addAttribute("userDTO", loggedInUser); request.getSession().setAttribute("menuList", menuService.getAllMenu()); return "redirect:/dashboard.html"; } else { userDTO.setPassword(""); model.addAttribute("userDTO", new UserDTO()); model.addAttribute("errorMsg", "please check Phone No or Password"); return "logIn"; } } @GetMapping(value = "/logOut") private String logOut(HttpServletRequest request, Model model) { request.getSession().setAttribute(CommonConstant.LOGIN_USER_SESSION_KEY, null); request.getSession().setAttribute("menuList", null); model.addAttribute("userDTO", new UserDTO()); return "logIn"; } }
[ "heinko9416@gmail.com" ]
heinko9416@gmail.com
03024eb247f2762ff74edc71585efc5ea29b76a4
2f8eb19fc2deeae0c75c9bebbf702b354f7563b1
/spring-mvc-demo/src/main/java/com/tx/demo/exceptions/SpringException.java
684ad8552d52d67cf6b1ed7d7b610b6cb1c69af1
[]
no_license
peter778899/spring-demo
491953a28e4c1fbf0f8bd5f73ffccdd36f1f077e
21a4de95ef92041c5286bffbbdf1375fcfb39010
refs/heads/master
2020-03-10T01:45:32.913388
2018-05-06T16:24:55
2018-05-06T16:24:55
129,110,796
0
0
null
null
null
null
UTF-8
Java
false
false
402
java
package com.tx.demo.exceptions; public class SpringException extends RuntimeException { private String exceptionMsg; public SpringException(String exceptionMsg) { this.exceptionMsg = exceptionMsg; } public String getExceptionMsg(){ return this.exceptionMsg; } public void setExceptionMsg(String exceptionMsg) { this.exceptionMsg = exceptionMsg; } }
[ "pantianx@4px.com" ]
pantianx@4px.com
d4df8bc49993646742f8f853c960721335abada9
dd6180c42bdbd78e1af087a616c086bccff4c428
/app/src/main/java/easeui/ui/EaseShowBigImageActivity.java
b85f9af1f7cec6a36402fe6017bd84931856c2d7
[]
no_license
zhaolei9527/Android_App_Company
a7f2f9fc751b5d08287d70c8cb424a4dd96b1271
024a2b7f9c407fa8ec7d472d6fdb75cc28d22598
refs/heads/master
2020-12-30T14:34:28.547896
2017-11-10T10:14:15
2017-11-10T10:14:15
91,068,621
0
0
null
null
null
null
UTF-8
Java
false
false
6,229
java
/** * Copyright (C) 2016 Hyphenate Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package easeui.ui; import android.annotation.SuppressLint; import android.app.ProgressDialog; import android.graphics.Bitmap; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.util.DisplayMetrics; import android.view.View; import android.view.View.OnClickListener; import android.widget.ProgressBar; import com.hyphenate.EMCallBack; import com.hyphenate.chat.EMClient; import com.hyphenate.chat.EMMessage; import com.hyphenate.util.EMLog; import com.hyphenate.util.ImageUtils; import com.yulian.platform.R; import java.io.File; import easeui.model.EaseImageCache; import easeui.utils.EaseLoadLocalBigImgTask; import easeui.widget.photoview.EasePhotoView; /** * download and show original image * */ public class EaseShowBigImageActivity extends EaseBaseActivity { private static final String TAG = "ShowBigImage"; private ProgressDialog pd; private EasePhotoView image; private int default_res = R.drawable.ease_default_image; private String localFilePath; private Bitmap bitmap; private boolean isDownloaded; @SuppressLint("NewApi") @Override protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.ease_activity_show_big_image); super.onCreate(savedInstanceState); image = (EasePhotoView) findViewById(R.id.image); ProgressBar loadLocalPb = (ProgressBar) findViewById(R.id.pb_load_local); default_res = getIntent().getIntExtra("default_image", R.drawable.ease_default_avatar); Uri uri = getIntent().getParcelableExtra("uri"); localFilePath = getIntent().getExtras().getString("localUrl"); String msgId = getIntent().getExtras().getString("messageId"); EMLog.d(TAG, "show big msgId:" + msgId ); //show the image if it exist in local path if (uri != null && new File(uri.getPath()).exists()) { EMLog.d(TAG, "showbigimage file exists. directly show it"); DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); // int screenWidth = metrics.widthPixels; // int screenHeight =metrics.heightPixels; bitmap = EaseImageCache.getInstance().get(uri.getPath()); if (bitmap == null) { EaseLoadLocalBigImgTask task = new EaseLoadLocalBigImgTask(this, uri.getPath(), image, loadLocalPb, ImageUtils.SCALE_IMAGE_WIDTH, ImageUtils.SCALE_IMAGE_HEIGHT); if (android.os.Build.VERSION.SDK_INT > 10) { task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } else { task.execute(); } } else { image.setImageBitmap(bitmap); } } else if(msgId != null) { downloadImage(msgId); }else { image.setImageResource(default_res); } image.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { finish(); } }); } /** * download image */ @SuppressLint("NewApi") private void downloadImage(final String msgId) { EMLog.e(TAG, "download with messageId: " + msgId); String str1 = getResources().getString(R.string.Download_the_pictures); pd = new ProgressDialog(this); pd.setProgressStyle(ProgressDialog.STYLE_SPINNER); pd.setCanceledOnTouchOutside(false); pd.setMessage(str1); pd.show(); File temp = new File(localFilePath); final String tempPath = temp.getParent() + "/temp_" + temp.getName(); final EMCallBack callback = new EMCallBack() { public void onSuccess() { EMLog.e(TAG, "onSuccess" ); runOnUiThread(new Runnable() { @Override public void run() { new File(tempPath).renameTo(new File(localFilePath)); DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); int screenWidth = metrics.widthPixels; int screenHeight = metrics.heightPixels; bitmap = ImageUtils.decodeScaleImage(localFilePath, screenWidth, screenHeight); if (bitmap == null) { image.setImageResource(default_res); } else { image.setImageBitmap(bitmap); EaseImageCache.getInstance().put(localFilePath, bitmap); isDownloaded = true; } if (isFinishing() || isDestroyed()) { return; } if (pd != null) { pd.dismiss(); } } }); } public void onError(int error, String msg) { EMLog.e(TAG, "offline file transfer error:" + msg); File file = new File(tempPath); if (file.exists()&&file.isFile()) { file.delete(); } runOnUiThread(new Runnable() { @Override public void run() { if (EaseShowBigImageActivity.this.isFinishing() || EaseShowBigImageActivity.this.isDestroyed()) { return; } image.setImageResource(default_res); pd.dismiss(); } }); } public void onProgress(final int progress, String status) { EMLog.d(TAG, "Progress: " + progress); final String str2 = getResources().getString(R.string.Download_the_pictures_new); runOnUiThread(new Runnable() { @Override public void run() { if (EaseShowBigImageActivity.this.isFinishing() || EaseShowBigImageActivity.this.isDestroyed()) { return; } pd.setMessage(str2 + progress + "%"); } }); } }; EMMessage msg = EMClient.getInstance().chatManager().getMessage(msgId); msg.setMessageStatusCallback(callback); EMLog.e(TAG, "downloadAttachement"); EMClient.getInstance().chatManager().downloadAttachment(msg); } @Override public void onBackPressed() { if (isDownloaded) setResult(RESULT_OK); finish(); } }
[ "879947745@qq.com" ]
879947745@qq.com
2d9b2fc3e7b5ac117cae12bf214c135fac52ba19
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/smallest/c868b30a4adebf62b0ed20170a14ee9e5f8bc62d827e9712294ffa4a10ab8423e3d903c29e2392c83963972019a470e667c1987e2547294d1e2d1df1db832912/000/mutations/335/smallest_c868b30a_000.java
ffa404d3dea5f3dd303cb47b6cd25175378265df
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,206
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class smallest_c868b30a_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { smallest_c868b30a_000 mainClass = new smallest_c868b30a_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj x = new IntObj (), i = new IntObj (), smallest = new IntObj (), j = new IntObj (), k = new IntObj (), temp = new IntObj (); int[] numbers = new int[4]; output += (String.format ("Please enter 4 numbers separated by spaces > ")); for (i.value = 0; i.value < 3; i.value++) { x.value = scanner.nextInt (); numbers[i.value] = x.value; } for (k.value = 3; k.value > 0; k.value--) { for (j.value = 1; j.value <= k.value; j.value++) { if (numbers[j.value - 1] > numbers[j.value]) { (j.value) - 1 = numbers[j.value - 1]; numbers[j.value - 1] = numbers[j.value]; numbers[j.value] = temp.value; } } } smallest.value = numbers[0]; output += (String.format ("%d is the smallest\n", smallest.value)); if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
71fe126ef130a187e5e821d201281f000dd3243e
df2232503e0a4e7d4ebdd8bf0f4a9e5c9c6453ad
/Construct Binary Tree from Preorder and Inorder Traversal.java
4f67d467592d6b0645647d477dac73e64ba92abe
[]
no_license
xixuan1124/leetcode
799ab1bab713599b8c7a3970e6bdc59448b60535
2faf226e7643c0fe2cadf4c8caf18e0b5aa134ff
refs/heads/master
2021-09-10T06:32:43.203643
2018-03-21T16:15:16
2018-03-21T16:15:16
15,108,221
0
0
null
null
null
null
UTF-8
Java
false
false
1,128
java
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class Solution { public TreeNode buildTree(int[] preorder, int[] inorder) { if(preorder.length<=0) return null; TreeNode root = buildTree2(preorder,0,preorder.length-1,inorder,0,inorder.length-1); return root; } public TreeNode buildTree2(int[] preorder, int prestart, int preend, int[] inorder, int instart, int inend){ if(prestart>preend) return null; if(instart > inend) return null; TreeNode root = new TreeNode(preorder[prestart]); int split = 0; for(int i = instart; i <= inend; i++){ if(inorder[i]==root.val){ split = i; break; } } root.left = buildTree2(preorder, prestart+1, prestart+split-instart, inorder, instart, split-1); root.right = buildTree2(preorder, prestart+split-instart+1,preend, inorder, split+1,inend); return root; } }
[ "xixuan1124@gmail.com" ]
xixuan1124@gmail.com
a17e2695deddc2ff5f862c36dbfd22ad8146171c
3accdf64c5515deed91ad1022e1de5e3ee63af1e
/app/src/test/java/com/cayhualla/ecommerce_cineplanet/ExampleUnitTest.java
925e7779523090471d340b95206aeeb6732430a3
[]
no_license
liset08/retoCP
09c4b277ac2428935cc062081545f1a6bed09c26
4d56cfd34190856bd642a0d674324ac647dd733a
refs/heads/master
2023-05-08T06:24:48.301423
2021-05-27T23:27:47
2021-05-27T23:27:47
371,527,445
2
0
null
null
null
null
UTF-8
Java
false
false
395
java
package com.cayhualla.ecommerce_cineplanet; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "liset.cayhualla@tecsup.edu.pe" ]
liset.cayhualla@tecsup.edu.pe
c7c461c630f2b46e476217515a21b7029a96ea94
97ca748140c7e194128287dde56cd4fdd1a8139a
/app/src/main/java/br/com/speedy/appapp_ma/EstoqueActivity.java
e74141728d65147d9d82516b8a34995fd3d11fe2
[]
no_license
henriquearaujoo/ipapp_ma
9a080db6ea756998cebafeddb2d6698c132a5c30
a744407fad7ad8be9edb7e9be5713835e0acc16b
refs/heads/master
2020-03-25T23:45:11.270613
2018-08-10T13:01:40
2018-08-10T13:01:40
144,290,890
0
0
null
null
null
null
UTF-8
Java
false
false
15,437
java
package br.com.speedy.appapp_ma; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.app.ProgressDialog; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.support.v4.app.DialogFragment; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.ActionBarActivity; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.ExpandableListView; import android.widget.TextView; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import br.com.speedy.appapp_ma.adapter.EstoqueAdapter; import br.com.speedy.appapp_ma.dialog.DialogFiltroPesquisaEstoque; import br.com.speedy.appapp_ma.model.TipoPeixe; import br.com.speedy.appapp_ma.util.DialogUtil; import br.com.speedy.appapp_ma.util.HttpConnection; import br.com.speedy.appapp_ma.util.ItemEstoque; import br.com.speedy.appapp_ma.util.SessionApp; import br.com.speedy.appapp_ma.util.SharedPreferencesUtil; import br.com.speedy.appapp_ma.util.TipoPeixeUtil; public class EstoqueActivity extends ActionBarActivity implements Runnable, SwipeRefreshLayout.OnRefreshListener { public static final int ATUALIZAR_LISTA = 1; public static final int ATUALIZAR_LISTA_SWIPE = 2; public static final int ABRIR_DIALOG_FILTRO = 3; private SwipeRefreshLayout refreshLayout; private View estoqueStatus; private View msgItensNaoEncontrados; private Thread threadEstoque; private EstoqueAdapter adapter; private List<ItemEstoque> itensEstoque; private List<TipoPeixe> tipos; private ExpandableListView listViewEstoque; private Button btPesquisar; private Button btFiltro; private Button btLimparFiltro; private BigDecimal totalPesoArm; private TextView txtTotalPesoArm; private ProgressDialog progressDialog; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_estoque); btFiltro = (Button) findViewById(R.id.btEFiltro); btFiltro.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { abrirFiltro(); } }); btLimparFiltro = (Button) findViewById(R.id.btELimparFiltro); btLimparFiltro.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { SessionApp.setFiltroDataFinal(null); SessionApp.setFiltroDataInicial(null); SessionApp.setFiltroTipo(null); SessionApp.setFiltroPeixe(null); DialogUtil.showDialogInformacao(EstoqueActivity.this, "O filtro de pesquisa foi limpo."); } }); btPesquisar = (Button) findViewById(R.id.btEPesquisar); btPesquisar.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { showProgress(true); threadEstoque = new Thread(EstoqueActivity.this); threadEstoque.start(); } }); estoqueStatus = (View) findViewById(R.id.estoque_status); msgItensNaoEncontrados = (View) findViewById(R.id.obs_msg_item_nao_encontrado); listViewEstoque = (ExpandableListView) findViewById(R.id.eList); txtTotalPesoArm = (TextView) findViewById(R.id.txtETotalPeso); initSwipeDownToRefresh(getWindow().getDecorView().getRootView()); } public void abrirFiltro(){ progressDialog = ProgressDialog.show(EstoqueActivity.this, "", "Carregando, aguarde.", false, false); new Thread(new Runnable() { @Override public void run() { callServerTipos("get-json", ""); Message msg = new Message(); msg.what = ABRIR_DIALOG_FILTRO; handler.sendMessage(msg); } }).start(); } public void limparFiltro(){ } public void getEstoqueJSON(String dados){ totalPesoArm = BigDecimal.ZERO; itensEstoque = new ArrayList<ItemEstoque>(); try{ JSONObject object = new JSONObject(dados); try{ JSONArray jEstoques = object.getJSONArray("estoques"); for (int i = 0; i < jEstoques.length() ; i++) { ItemEstoque itemEstoque = itemAdicionado(jEstoques.getJSONObject(i).getString("peixe"), jEstoques.getJSONObject(i).getString("camara")); if(itemEstoque == null){ itemEstoque = new ItemEstoque(); itemEstoque.setPeixe(jEstoques.getJSONObject(i).getString("peixe")); itemEstoque.setCamara(jEstoques.getJSONObject(i).getString("camara")); itensEstoque.add(itemEstoque); } TipoPeixeUtil tipoPeixeUtil = new TipoPeixeUtil(); tipoPeixeUtil.setTipo(jEstoques.getJSONObject(i).getString("tipo")); tipoPeixeUtil.setPeso(new BigDecimal(jEstoques.getJSONObject(i).getString("peso"))); tipoPeixeUtil.setPesoRetirada(new BigDecimal(jEstoques.getJSONObject(i).getString("pesoRetirada"))); if (itemEstoque.getTipos() == null || itemEstoque.getTipos().size() == 0){ itemEstoque.setTipos(new ArrayList<TipoPeixeUtil>()); itemEstoque.getTipos().add(tipoPeixeUtil); }else{ itemEstoque.getTipos().add(tipoPeixeUtil); } totalPesoArm = totalPesoArm.add(tipoPeixeUtil.getPeso().subtract(tipoPeixeUtil.getPesoRetirada())); } }catch (Exception e){ e.printStackTrace(); } }catch (Exception e){ e.printStackTrace(); } } public ItemEstoque itemAdicionado(String peixe, String camara){ for (ItemEstoque iea : itensEstoque){ if (iea.getPeixe().equals(peixe) && iea.getCamara().equals(camara)) return iea; } return null; } private void callServerEstoque(final String method, final String data){ String ipServidor = SharedPreferencesUtil.getPreferences(EstoqueActivity.this, "ip_servidor"); String endereco_ws = SharedPreferencesUtil.getPreferences(EstoqueActivity.this, "endereco_ws"); String porta_servidor = SharedPreferencesUtil.getPreferences(EstoqueActivity.this, "porta_servidor"); String resposta = HttpConnection.getSetDataWeb("http://" + ipServidor + ":" + porta_servidor + endereco_ws + "getEstoquePorCamara", method, data); if (!resposta.isEmpty()) getEstoqueJSON(resposta); } public void getTiposJSON(String dados){ tipos = new ArrayList<TipoPeixe>(); TipoPeixe tp = new TipoPeixe(); tp.setId(null); tp.setDescricao("Selecione o tipo"); tipos.add(tp); try{ JSONObject object = new JSONObject(dados); JSONArray jTipos = object.getJSONArray("tipos"); for (int i = 0; i < jTipos.length() ; i++) { TipoPeixe tipoPeixe = new TipoPeixe(); tipoPeixe.setId(jTipos.getJSONObject(i).getLong("id")); tipoPeixe.setDescricao(jTipos.getJSONObject(i).getString("descricao")); tipos.add(tipoPeixe); } }catch (Exception e){ e.printStackTrace(); } } private void callServerTipos(final String method, final String data){ String ipServidor = SharedPreferencesUtil.getPreferences(EstoqueActivity.this, "ip_servidor"); String endereco_ws = SharedPreferencesUtil.getPreferences(EstoqueActivity.this, "endereco_ws"); String porta_servidor = SharedPreferencesUtil.getPreferences(EstoqueActivity.this, "porta_servidor"); String resposta = HttpConnection.getSetDataWeb("http://" + ipServidor + ":" + porta_servidor + endereco_ws + "getTipos", method, data); if (!resposta.isEmpty()) getTiposJSON(resposta); } private void showProgress(final boolean show) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { int shortAnimTime = getResources().getInteger( android.R.integer.config_shortAnimTime); refreshLayout.setVisibility(show ? View.GONE : View.VISIBLE); refreshLayout.animate().setDuration(shortAnimTime) .alpha(show ? 0 : 1) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { refreshLayout.setVisibility(show ? View.GONE : View.VISIBLE); } }); estoqueStatus.setVisibility(View.VISIBLE); estoqueStatus.animate().setDuration(shortAnimTime) .alpha(show ? 1 : 0) .setListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { estoqueStatus.setVisibility(show ? View.VISIBLE : View.GONE); } }); } else { refreshLayout.setVisibility(show ? View.GONE : View.VISIBLE); estoqueStatus.setVisibility(show ? View.VISIBLE : View.GONE); } } private Handler handler = new Handler(){ @Override public void handleMessage(Message msg) { // TODO Auto-generated method stub switch (msg.what) { case ATUALIZAR_LISTA: adapter = new EstoqueAdapter(EstoqueActivity.this, itensEstoque); listViewEstoque.setAdapter(adapter); showProgress(false); if (itensEstoque != null && itensEstoque.size() > 0) { refreshLayout.setVisibility(View.VISIBLE); msgItensNaoEncontrados.setVisibility(View.GONE); }else{ refreshLayout.setVisibility(View.GONE); msgItensNaoEncontrados.setVisibility(View.VISIBLE); } for (int i = 0; i < adapter.getGroupCount(); i++) { listViewEstoque.expandGroup(i); } txtTotalPesoArm.setText(totalPesoArm.toString() + "kg"); break; case ATUALIZAR_LISTA_SWIPE: adapter = new EstoqueAdapter(EstoqueActivity.this, itensEstoque); listViewEstoque.setAdapter(adapter); for (int i = 0; i < adapter.getGroupCount(); i++) { listViewEstoque.expandGroup(i); } txtTotalPesoArm.setText(totalPesoArm.toString() + "kg"); stopSwipeRefresh(); break; case ABRIR_DIALOG_FILTRO: if (progressDialog != null && progressDialog.isShowing()){ progressDialog.dismiss(); progressDialog = null; } DialogFragment df = new DialogFiltroPesquisaEstoque(tipos); df.show(getSupportFragmentManager(), "filtroEstoque"); break; default: break; } } }; public void getEstoque(){ JSONObject object = new JSONObject(); try { object.put("id", SessionApp.getFiltroTipo() != null ? SessionApp.getFiltroTipo().getId() : null); object.put("descricao", SessionApp.getFiltroPeixe() != null && !SessionApp.getFiltroPeixe().isEmpty() ? SessionApp.getFiltroPeixe() : null); object.put("dataInicial", SessionApp.getFiltroDataInicial() != null && !SessionApp.getFiltroDataInicial().isEmpty() ? SessionApp.getFiltroDataInicial() : null); object.put("dataFinal", SessionApp.getFiltroDataFinal() != null && !SessionApp.getFiltroDataFinal().isEmpty() ? SessionApp.getFiltroDataFinal() : null); } catch (JSONException e) { e.printStackTrace(); } callServerEstoque("post-json", object.toString()); Message msg = new Message(); msg.what = ATUALIZAR_LISTA; handler.sendMessage(msg); } public void initSwipeDownToRefresh(View view){ refreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.refreshLayout); refreshLayout.setOnRefreshListener(this); refreshLayout.setColorScheme(android.R.color.holo_blue_light, android.R.color.white, android.R.color.holo_blue_light, android.R.color.white); } @Override public void onRefresh() { new Thread(new Runnable() { @Override public void run() { JSONObject object = new JSONObject(); try { object.put("id", SessionApp.getFiltroTipo() != null ? SessionApp.getFiltroTipo().getId() : null); object.put("descricao", SessionApp.getFiltroPeixe() != null && !SessionApp.getFiltroPeixe().isEmpty() ? SessionApp.getFiltroPeixe() : null); object.put("dataInicial", SessionApp.getFiltroDataInicial() != null && !SessionApp.getFiltroDataInicial().isEmpty() ? SessionApp.getFiltroDataInicial() : null); object.put("dataFinal", SessionApp.getFiltroDataFinal() != null && !SessionApp.getFiltroDataFinal().isEmpty() ? SessionApp.getFiltroDataFinal() : null); } catch (JSONException e) { e.printStackTrace(); } callServerEstoque("post-json", object.toString()); Message msg = new Message(); msg.what = ATUALIZAR_LISTA_SWIPE; handler.sendMessage(msg); } }).start(); } private void stopSwipeRefresh() { refreshLayout.setRefreshing(false); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_estoque, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_close) { finish(); return true; } return super.onOptionsItemSelected(item); } @Override public void run() { getEstoque(); } }
[ "henriquearaujoo@gmail.com" ]
henriquearaujoo@gmail.com
2a7bf13b7c96e5a367ce1ef77f650ea064af0550
880b3a4156a16f3417cb21d799224fce7125ef1f
/src/plotter/RealTimePlot.java
0847815b09403725c4df4caa095da933c0801865
[ "MIT" ]
permissive
hmart027/Plotter
584cf9969dc1465de409e5e2e60f6343613e88f7
1f1d912deb01e7f1330be76dee199e95398919b9
refs/heads/master
2021-07-06T12:42:00.627704
2020-11-14T12:48:48
2020-11-14T12:48:48
73,988,913
0
0
null
null
null
null
UTF-8
Java
false
false
2,112
java
package plotter; import java.awt.Color; import java.util.ArrayList; import java.util.List; public class RealTimePlot extends Plot{ protected List<Double> xPlot; protected List<Double> yPlot; public RealTimePlot(double x, double y){ this(x, y, 0, 0, Color.BLACK); } public RealTimePlot(double x, double y, Color c){ this(x, y, 0, 0, c); } public RealTimePlot(double x, double y, double xO, double yO, Color c){ this.xPlot = new ArrayList<>(); this.xPlot.add(x); this.yPlot = new ArrayList<>(); this.yPlot.add(y); this.xOffset = xO; this.yOffset = yO; this.color = c; minX = x; maxX = x; minY = y; maxY = y; } public RealTimePlot(double[] x, double[] y, double xO, double yO, Color c){ this.xPlot = toDoubleArray(x); this.yPlot = toDoubleArray(y); this.xOffset = xO; this.yOffset = yO; this.color = c; minX = x[0]; maxX = x[0]; minY = y[0]; maxY = y[0]; for(int i=0; i<x.length; i++){ double xV = x[i]; double yV = y[i]; if(xV<minX) minX = xV; if(xV>maxX) maxX = xV; if(yV<minY) minY = yV; if(yV>maxY) maxY = yV; } } private ArrayList<Double> toDoubleArray(double[] x){ ArrayList<Double> out = new ArrayList<>(); for(double d: x){ out.add(d); } return out; } public RealTimePlot(double[] x, double[] y, Color c){ this(x,y,0,0,c); } public void addPoint(double x, double y){ lastX = x; lastY = y; xPlot.add(x); yPlot.add(y); if(xPlot.size()>1){ if(x<minX) minX = x; if(x>maxX) maxX = x; if(y<minY) minY = y; if(y>maxY) maxY = y; } } public int getSize(){ return yPlot.size(); } public double getMaxX(){ return maxX; } public double getMinX(){ return minX; } public double getMaxY(){ return maxY; } public double getMinY(){ return minY; } public double getLastX(){ return lastX; } public double getLastY(){ return lastY; } public void clear(){ this.xPlot = new ArrayList<>(); this.yPlot = new ArrayList<>(); this.xOffset = 0; this.yOffset = 0; this.color = Color.BLACK; minX = 0; maxX = 0; minY = 0; maxY = 0; } }
[ "harold.martin92@gmail.com" ]
harold.martin92@gmail.com
d3479402e876c351dd9edf5916e7ccf1adb9834f
b1525c7c1662cb93eb0de6601c0bffa9a2fc91a9
/mobile-app-ws/src/main/java/com/rfz/app/ws/exceptions/NoRecordFoundExceptionMapper.java
6f9ffbaf52ec5df5e837f85e63f00e56dc7bef8d
[]
no_license
raafatzahran/My-courses
671f8b98432fa70c69d561d35fa70cf2bdaf329b
090c5871fb9fc1e3b5ccc16b42ae57051b4680cd
refs/heads/master
2020-03-20T18:57:02.858981
2018-12-02T13:42:52
2018-12-02T13:42:52
137,612,944
0
0
null
2018-11-07T19:14:17
2018-06-16T22:00:13
HTML
UTF-8
Java
false
false
903
java
package com.rfz.app.ws.exceptions; /* * 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. */ import com.rfz.app.ws.ui.model.response.ErrorMessage; import com.rfz.app.ws.ui.model.response.ErrorMessages; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; /** * * @author rfz */ @Provider public class NoRecordFoundExceptionMapper implements ExceptionMapper<NoRecordFoundException>{ public Response toResponse(NoRecordFoundException exception) { ErrorMessage errorMessage = new ErrorMessage(exception.getMessage(), ErrorMessages.NO_RECORD_FOUND.name(), "http://appsdeveloperblog.com"); return Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build(); } }
[ "raafat@telemagic.no" ]
raafat@telemagic.no
8754348995758cfb8d5550b5aeeca8f4a571d349
56bbd0af9e5c7c5d83b9470af401ef8912548f59
/app/src/main/java/com/fadhlan/bangundatar/Intent.java
b2d53793a3646a54b02b4016f0342000eace75fa
[]
no_license
FadhlanWahyudi/Bangundatar
e8f3027b7791a8020af16239f47eeb7de104ff32
19fce3fb645cf57e3c6886a6129e58ff72bdb97c
refs/heads/master
2022-01-10T14:15:07.773928
2019-05-06T02:12:52
2019-05-06T02:12:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
package com.fadhlan.bangundatar; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class Intent extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_intent); } }
[ "fadhlandeveloper@gmail.com" ]
fadhlandeveloper@gmail.com
3fe3dc9ebde1a63457a14edf5b3094ebd79fff9b
1ead1801cab1af5d3801deb16e252335ce18a175
/Math/HexToDec.java
bba471bca066d298110a8e7cd318168c64217b16
[]
no_license
ShidiDaisy/CodingInterview
eb922c08a73b7b494406c75ceb6cac1cc6d6d428
1d2d8fdac511756269a48e7b476f01cce57b0ecf
refs/heads/master
2021-06-14T02:58:25.461970
2021-03-05T05:52:12
2021-03-05T05:52:12
165,365,064
1
0
null
null
null
null
UTF-8
Java
false
false
660
java
package Math; /*Input: 0xA *Output: 10 * *Input: 0x76E Output: 1902*/ import java.util.Scanner; public class HexToDec { public static void main(String[] args) { Scanner sc = new Scanner(System.in); HexToDec hd = new HexToDec(); while(sc.hasNext()){ String hex = sc.nextLine(); System.out.println(hd.convertToDec(hex)); } } public int convertToDec(String hex){ String digits = "0123456789ABCDEF"; hex = hex.substring(2).toUpperCase(); int res = 0; int mul = 1; for(int i=hex.length()-1; i>=0; i--){ char c = hex.charAt(i); int val = digits.indexOf(c); res += val*mul; mul *= 16; } return res; } }
[ "nicebling@sina.com" ]
nicebling@sina.com
89d051f9eb089a561d0acc05730412c655319bc9
cf9efafa4b981fd1c3e91def415d71270afd3fb0
/src/DemandGenerator.java
1a744ad6feb5c414f0f4581e692c0bdc9a5c49ae
[]
no_license
PeijunYe/TravelCalibInSUMO
233c49d988073a167e4d9bfcf0779c67768eb1fd
60e5fd8b05bd788b9c48e0f95a641a2b8cd1fc09
refs/heads/master
2023-01-23T15:49:09.460173
2020-12-04T08:36:02
2020-12-04T08:36:02
316,421,440
0
0
null
null
null
null
UTF-8
Java
false
false
12,114
java
import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.text.DecimalFormat; import java.util.LinkedHashMap; import java.util.LinkedList; import javax.xml.transform.OutputKeys; import javax.xml.transform.Result; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamResult; import org.xml.sax.SAXException; import org.xml.sax.helpers.AttributesImpl; public class DemandGenerator implements Runnable { private int timeInter; private int scaleFactor; private boolean fromFlag; private LinkedHashMap<LinkedList<Integer>, Integer> pathVec; private LinkedHashMap<Integer, LinkedHashMap<String, Integer>> intervalLinkFlow; private LinkedHashMap<Integer, LinkedList<ODPathCollection>> pathSet; public DemandGenerator(int timeInter, int scaleFactor, boolean fromFlag, LinkedHashMap<Integer, LinkedHashMap<String, Integer>> intervalLinkFlow, LinkedHashMap<Integer, LinkedList<ODPathCollection>> pathSet) { super(); this.timeInter = timeInter; this.scaleFactor = scaleFactor; this.fromFlag = fromFlag; this.intervalLinkFlow = intervalLinkFlow; this.pathSet = pathSet; } @Override public void run() { DecimalFormat df = new DecimalFormat("0.00"); try { if (!fromFlag) { this.pathVec = PathODEstByLinkFlow(timeInter, 1, 5000); } else { this.pathVec = ReadPathFlowFromFile(); } SAXTransformerFactory tff = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); TransformerHandler handler; handler = tff.newTransformerHandler(); Transformer tr = handler.getTransformer(); tr.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); tr.setOutputProperty(OutputKeys.INDENT, "yes"); File f = new File("ODDemand/AbCDBy" + scaleFactor + "_" + timeInter + ".rou.xml"); if (!f.exists()) f.createNewFile(); Result result = new StreamResult(new FileOutputStream(f)); handler.setResult(result); handler.startDocument(); AttributesImpl attr = new AttributesImpl(); handler.startElement("", "", "routes", attr); attr.clear(); long vehID = 1; int totalDemand = 0; for (Integer demand : pathVec.values()) { totalDemand += demand; } int index = 0; totalDemand = (int) (((float) totalDemand) / scaleFactor); int interval = totalDemand / (10 * 60); if (interval <= 0) interval = 1; for (LinkedList<Integer> parPath : pathVec.keySet()) { int trafficDemand = pathVec.get(parPath); if (trafficDemand <= 0) continue; trafficDemand = (int) (((float) trafficDemand) / scaleFactor); for (int i = 0; i < trafficDemand; i++) { int offset = index / interval + 1; int departTime = timeInter * 15 * 60 + offset; LinkedList<Integer> filteredPath = new LinkedList<Integer>(); for (int j = 0; j < parPath.size(); j++) { if (parPath.get(j) != 52) filteredPath.add(parPath.get(j)); } if (filteredPath.size() <= 2) continue; if (filteredPath.get(0) == filteredPath.get(1)) { filteredPath.removeFirst(); } if (filteredPath.size() <= 2) continue; String pathStr = filteredPath.get(0) + "-" + filteredPath.get(1); for (int j = 1; j < filteredPath.size() - 1; j++) { pathStr += " " + filteredPath.get(j) + "-" + filteredPath.get(j + 1); } if (pathStr.contains("27-33 33-27")) { pathStr = pathStr.replace("27-33 33-27", "27-33 33-40"); } if (pathStr.contains("40-33 33-40")) { pathStr = pathStr.replace("40-33 33-40", "40-33 33-27"); } if (pathStr.contains("27-26 26-27")) { pathStr = pathStr.replace("27-26 26-27", "27-26 26-25"); } if (pathStr.contains("25-26 26-25")) { pathStr = pathStr.replace("25-26 26-25", "25-26 26-27"); } if (pathStr.startsWith("56-57 57-56")) { pathStr = pathStr.replace("56-57 57-56", "57-56"); } attr.clear(); attr.addAttribute("", "", "id", "", String.valueOf(vehID)); attr.addAttribute("", "", "depart", "", df.format(departTime)); handler.startElement("", "", "vehicle", attr); vehID++; attr.clear(); attr.addAttribute("", "", "edges", "", pathStr); handler.startElement("", "", "route", attr); handler.endElement("", "", "route"); handler.endElement("", "", "vehicle"); index++; } } handler.endElement("", "", "routes"); handler.endDocument(); System.out.println("timeInter = " + timeInter + " : " + totalDemand * scaleFactor + " / " + scaleFactor + " complete..."); } catch (TransformerConfigurationException | SAXException | IOException e) { e.printStackTrace(); } } private LinkedHashMap<LinkedList<Integer>, Integer> ReadPathFlowFromFile() throws NumberFormatException, IOException { String fileName = "AggrDemand/PathDemand_" + timeInter + ".txt"; File file = new File(fileName); if (!file.exists()) { System.out.println(fileName + " does not exit!!!"); return null; } LinkedHashMap<LinkedList<Integer>, Integer> pathFlowSet = new LinkedHashMap<LinkedList<Integer>, Integer>(); InputStreamReader reader = new InputStreamReader(new FileInputStream(fileName)); BufferedReader br = new BufferedReader(reader); String line = ""; while ((line = br.readLine()) != null) { String[] pathFlow = line.split(":"); String[] items = pathFlow[0].split("-"); LinkedList<Integer> path = new LinkedList<Integer>(); int flowNum = Integer.parseInt(pathFlow[1]); for (int j = 0; j < items.length; j++) { int nodeID = Integer.parseInt(items[j]); path.add(nodeID); } pathFlowSet.put(path, flowNum); } br.close(); reader.close(); return pathFlowSet; } public LinkedHashMap<LinkedList<Integer>, Integer> PathODEstByLinkFlow(int timeInter, int startIter, int endIter) throws IOException { LinkedHashMap<String, Integer> detectLinkFlow = new LinkedHashMap<String, Integer>(); for (String linkPair : intervalLinkFlow.get(timeInter).keySet()) { int linkFlow = intervalLinkFlow.get(timeInter).get(linkPair); detectLinkFlow.put(linkPair, linkFlow); } LinkedHashMap<LinkedList<Integer>, Integer> pathVec = new LinkedHashMap<LinkedList<Integer>, Integer>(); for (LinkedList<ODPathCollection> pathCollect : pathSet.values()) { for (ODPathCollection odPath : pathCollect) { for (LinkedList<Integer> path : odPath.pathTravelNum.keySet()) { boolean hasThePath = false; for (LinkedList<Integer> pathCand : pathVec.keySet()) { if (pathCand.size() != path.size()) continue; boolean nodeMatch = true; for (int i = 0; i < pathCand.size(); i++) { if (pathCand.get(i) != path.get(i)) { nodeMatch = false; break; } } if (nodeMatch) { int newTravNum = pathVec.get(pathCand) + odPath.pathTravelNum.get(path); pathVec.put(pathCand, newTravNum); hasThePath = true; break; } } if (!hasThePath) { pathVec.put(path, odPath.pathTravelNum.get(path)); } } } } LinkedHashMap<String, LinkedList<Integer>> coeffs = new LinkedHashMap<String, LinkedList<Integer>>(); for (String nodePair : detectLinkFlow.keySet()) { int linkStart = Integer.parseInt(nodePair.substring(nodePair.indexOf("(") + 1, nodePair.indexOf(","))); int linkEnd = Integer.parseInt(nodePair.substring(nodePair.indexOf(",") + 1, nodePair.indexOf(")"))); LinkedList<Integer> indexOfOnes = new LinkedList<Integer>(); int colIndex = 1; for (LinkedList<Integer> path : pathVec.keySet()) { boolean hasTheLink = false; for (int i = 0; i < path.size() - 1; i++) { if (path.get(i) == linkStart && path.get(i + 1) == linkEnd) { hasTheLink = true; } if (path.get(i) == linkEnd && path.get(i + 1) == linkStart) { hasTheLink = true; } } if (hasTheLink) { indexOfOnes.add(colIndex); } colIndex++; } coeffs.put(nodePair, indexOfOnes); } PathODEstByGD(pathVec, coeffs, detectLinkFlow, startIter, endIter); System.out.println(timeInter + " : relativeError = " + Evaluation(detectLinkFlow, pathVec)); return pathVec; } private void PathODEstByGD(LinkedHashMap<LinkedList<Integer>, Integer> pathVec, LinkedHashMap<String, LinkedList<Integer>> coeffs, LinkedHashMap<String, Integer> detectLinkFlow, int startIter, int endIter) { DecimalFormat df = new DecimalFormat(",###"); long error = ComputeODError(detectLinkFlow, pathVec, coeffs); System.out.println("Init error = " + df.format(error)); for (int i = startIter; i <= endIter; i++) { LinkedHashMap<LinkedList<Integer>, Long> gradient = new LinkedHashMap<LinkedList<Integer>, Long>(); for (String nodePair : detectLinkFlow.keySet()) { long detectFlow = detectLinkFlow.get(nodePair); long rowDev = 0; LinkedList<Integer> coefRow = coeffs.get(nodePair); if (coefRow.size() == 0) continue; int index = 1; for (LinkedList<Integer> path : pathVec.keySet()) { if (coefRow.contains(index)) { rowDev += pathVec.get(path); } index++; } rowDev = rowDev - detectFlow; index = 1; for (LinkedList<Integer> path : pathVec.keySet()) { if (coefRow.contains(index)) { if (gradient.containsKey(path)) { long newGradient = gradient.get(path) + rowDev; gradient.put(path, newGradient); } else { gradient.put(path, rowDev); } } index++; } } float dynStepLen = (float) 0.0001; for (LinkedList<Integer> path : pathVec.keySet()) { if (gradient.containsKey(path)) { int newTraNum = Math.round(pathVec.get(path) - dynStepLen * gradient.get(path)); if (newTraNum < 0) newTraNum = 0; pathVec.put(path, newTraNum); } } if (i % 1000 == 0) { error = ComputeODError(detectLinkFlow, pathVec, coeffs); System.out.println("Iter: " + i + "; error = " + df.format(error) + "; stepLen = " + dynStepLen); } } } private long ComputeODError(LinkedHashMap<String, Integer> detectLinkFlow, LinkedHashMap<LinkedList<Integer>, Integer> pathVec, LinkedHashMap<String, LinkedList<Integer>> coeffs) { long error = 0; for (String nodePair : detectLinkFlow.keySet()) { long detectFlow = detectLinkFlow.get(nodePair); long rowDev = 0; LinkedList<Integer> coefRow = coeffs.get(nodePair); int index = 1; for (LinkedList<Integer> path : pathVec.keySet()) { if (coefRow.contains(index)) { rowDev += pathVec.get(path); } index++; } if (coefRow.size() == 0) continue; rowDev = rowDev - detectFlow; error += Math.pow(rowDev, 2); } return Math.round(0.5 * error); } private float Evaluation(LinkedHashMap<String, Integer> detectLinkFlow, LinkedHashMap<LinkedList<Integer>, Integer> pathVec) { float relativeError = 0; for (String nodePair : detectLinkFlow.keySet()) { int link_StartNode = Integer.parseInt(nodePair.substring(nodePair.indexOf("(") + 1, nodePair.indexOf(","))); int link_EndNode = Integer.parseInt(nodePair.substring(nodePair.indexOf(",") + 1, nodePair.indexOf(")"))); long realLinkFlow = detectLinkFlow.get(nodePair); long reconsLinkFlow = 0; for (LinkedList<Integer> path : pathVec.keySet()) { for (int i = 0; i < path.size() - 1; i++) { if (path.get(i) == link_StartNode && path.get(i + 1) == link_EndNode) { reconsLinkFlow += pathVec.get(path); } if (path.get(i) == link_EndNode && path.get(i + 1) == link_StartNode) { reconsLinkFlow += pathVec.get(path); } } } if (realLinkFlow != 0) { relativeError += ((float) (Math.abs(reconsLinkFlow - realLinkFlow))) / realLinkFlow; } } return relativeError; } }
[ "peijun_ye@hotmail.com" ]
peijun_ye@hotmail.com
69ef7cef7474de5c67cb541cc9fc52a4f9d0010d
8bab7a200b1d2027618a4b596091ec7c528243aa
/app/src/main/java/com/example/bookingfilght/Fragment/AboutFragment.java
cd3e293b81c59aad937e56ddbf8c4b0cc6bdc31e
[]
no_license
vdai2000/LTLAirline
37ac0b1080ad5ac7ba1cf59d9e03bd57f37294a7
43692914069b99040f5eb09be1348fff0b932415
refs/heads/master
2023-06-26T03:08:26.752652
2021-07-19T11:18:35
2021-07-19T11:18:35
387,438,056
0
0
null
null
null
null
UTF-8
Java
false
false
3,868
java
package com.example.bookingfilght.Fragment; import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import com.example.bookingfilght.Activity.DashBoard; import com.example.bookingfilght.Activity.LoginActivity; import com.example.bookingfilght.Adapter.AdapterHistoryTick; import com.example.bookingfilght.Models.ChuyenBayDTO; import com.example.bookingfilght.Models.DataOuputHistory; import com.example.bookingfilght.Models.PhieuDatVeDTO; import com.example.bookingfilght.Models.VeChuyenBayDTO; import com.example.bookingfilght.R; import com.example.bookingfilght.SearchFlight.AdapterFlight; import java.util.ArrayList; import java.util.List; import static com.example.bookingfilght.Activity.LoginActivity.MyUSER; public class AboutFragment extends Fragment{ ListView listView; TextView toalVe, monny, nameUser; AdapterHistoryTick adapter; List<PhieuDatVeDTO> arrayListHistory = new ArrayList<>(); @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { ViewGroup root = (ViewGroup) inflater.inflate(R.layout.about_fragment, container, false); return root; } @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mapping(view); getDataPhieuDatVe(view); adapter = new AdapterHistoryTick(requireContext(), R.layout.item_historylist, arrayListHistory); listView.setAdapter(adapter); } private void mapping(View view) { listView = (ListView) view.findViewById(R.id.listFlightHistory); toalVe = (TextView) view.findViewById(R.id.toalVe); monny = (TextView) view.findViewById(R.id.monny); nameUser = (TextView) view.findViewById(R.id.nameUser); } private List<PhieuDatVeDTO> getDataPhieuDatVe(View view) { List<PhieuDatVeDTO> listPDV = DashBoard.listPDV; int toalV = 0; int toalgia = 0; // Get id cua khach hang tu session SharedPreferences sharedPreferences = view.getContext().getSharedPreferences(MyUSER, Context.MODE_PRIVATE); String name = sharedPreferences.getString("FullName", "null"); nameUser.setText(name); Long id = sharedPreferences.getLong("id", -1); for (PhieuDatVeDTO item:listPDV) { if (id == item.getNguoiDatVe_id() && item.getHoTenNhanVien().equals("Khách hàng đặt !!")) { for (VeChuyenBayDTO veItem: LoginActivity.listVCB){ long a = item.getVechuyenbayID(); long a1 = veItem.getId(); if (a == a1) { item.setIdChuyenBay(veItem.getChuyenBayID()); arrayListHistory.add(item); toalV ++; toalgia += item.getThanhTien().intValue(); break; } } } } monny.setText(xuLyGia(toalgia + "")); toalVe.setText(toalV + ""); return arrayListHistory; } public String xuLyGia(String gia) { int lenght = gia.length(); int sl = lenght / 3; sl = 0 < lenght%3 ? sl:sl-1; int index = 3; for (int i = 1; i <= sl; i++) { gia = gia.substring(0, lenght - index) + "." + gia.substring(lenght - index); index = 3 + 3; } return gia; } }
[ "dvdai26032000@gmail.com" ]
dvdai26032000@gmail.com
0457a73e884cf08ec79012bc6073f144b6b0120f
260ffca605956d7cb9490a8c33e2fe856e5c97bf
/src/com/google/android/gms/auth/api/proxy/ProxyGrpcRequest.java
720e88695af71ec2fa0f246e59bac219e3b0238f
[]
no_license
yazid2016/com.incorporateapps.fakegps.fre
cf7f1802fcc6608ff9a1b82b73a17675d8068beb
44856c804cea36982fcc61d039a46761a8103787
refs/heads/master
2021-06-02T23:32:09.654199
2016-07-21T03:28:48
2016-07-21T03:28:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,123
java
package com.google.android.gms.auth.api.proxy; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; public class ProxyGrpcRequest implements SafeParcelable { public static final Parcelable.Creator CREATOR = new zza(); public final byte[] body; public final String hostname; public final String method; public final int port; public final long timeoutMillis; final int versionCode; ProxyGrpcRequest(int paramInt1, String paramString1, int paramInt2, long paramLong, byte[] paramArrayOfByte, String paramString2) { versionCode = paramInt1; hostname = paramString1; port = paramInt2; timeoutMillis = paramLong; body = paramArrayOfByte; method = paramString2; } public int describeContents() { return 0; } public void writeToParcel(Parcel paramParcel, int paramInt) { zza.zza(this, paramParcel, paramInt); } } /* Location: * Qualified Name: com.google.android.gms.auth.api.proxy.ProxyGrpcRequest * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
a8d31c1550ee73602b7b10b79bf20e3295c848a3
c696fce66513b2174171a593f834be50c72b2411
/PersonalDataService/src/main/java/szczepaniak/ppss/PersonalDataService/infrastructure/config/RedisCacheConfig.java
5b45149450e209f761e24318848a181edf13649e
[]
no_license
Piotr95/PPS
6b4a297d92ddacba12fee4107b5000e6ab8cc11b
5291756c1498fbb1585060ac03c26c6bd9ea7f0a
refs/heads/master
2020-04-13T02:55:52.308374
2018-12-23T18:49:32
2018-12-23T18:49:32
161,396,638
0
0
null
null
null
null
UTF-8
Java
false
false
711
java
package szczepaniak.ppss.PersonalDataService.infrastructure.config; import org.springframework.cache.CacheManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.data.redis.cache.RedisCacheManager; import org.springframework.data.redis.connection.RedisConnectionFactory; @Configuration public class RedisCacheConfig { @Primary @Bean(name = "cacheManager") CacheManager redisCache(RedisConnectionFactory redisConnectionFactory) { return RedisCacheManager .builder(redisConnectionFactory) .build(); } }
[ "piotrszczepniak@gmail.com" ]
piotrszczepniak@gmail.com
ba517a49e8bbfad2135b3bacb9230b4d756e842e
f03492b8e9ffd59caa9351136c90f650b6f9ee76
/dubbo_ji/consumer/src/main/java/com/gavin/consumer/vo/ResultVo.java
5269741e91dd5588defb66937ac79853775be7b6
[]
no_license
zhulaoqi/Backend_development
e1498a0f3be9360b75930f307f4ba1e3751b7698
a69e436baeaa5b2730cfd72c68161de8f82643b1
refs/heads/master
2023-04-10T19:02:16.714090
2020-07-21T04:56:26
2020-07-21T04:56:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
814
java
package com.gavin.consumer.vo; import com.gavin.provider.dto.UserInfo; import java.io.Serializable; import java.util.List; /** * ********************************************************** * * @Project: * @Author : Gavincoder * @Mail : xunyegege@gmail.com * @Github : https://github.com/xunyegege * @ver : version 1.0 * @Date : 2019-09-29 15:27 * @description: ************************************************************/ public class ResultVo implements Serializable { private int tSize; List<UserInfo> list; public List<UserInfo> getList() { return list; } public void setList(List<UserInfo> list) { this.list = list; } public int gettSize() { return tSize; } public void settSize(int tSize) { this.tSize = tSize; } }
[ "907516241@qq.com" ]
907516241@qq.com
11f9f260c6c2d258788092729dce35027a766f13
94660fd7ea46d34bf5618115e48998d93ec4a464
/website-acuity-dashboard/src/main/java/com/acuitybotting/website/dashboard/DashboardApplication.java
fae8673725229c7c3e24b6e4e426fed82add63f2
[]
no_license
ramiamer234/Acuity
d88daa955a2b3670581c979e8179f131a23f7a6a
979ffd204735208cbf9bb9548af3b18c58a2ad36
refs/heads/master
2021-09-23T17:35:37.746341
2018-09-25T19:12:31
2018-09-25T19:12:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
672
java
package com.acuitybotting.website.dashboard; import com.vaadin.flow.server.VaadinServletConfiguration; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.context.annotation.ComponentScan; /** * Created by Zachary Herridge on 6/27/2018. */ @ComponentScan("com.acuitybotting") @SpringBootApplication public class DashboardApplication extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(DashboardApplication.class, args); } }
[ "zgherridge@gmail.com" ]
zgherridge@gmail.com
be0ac356f145a061aad779dcddcf8d4d252021d3
06d5c271d098c4327146bbb5433808e0af60a0f7
/src/main/java/co/closeit/tfrais/playground/hibernate/Constants.java
6e8aebb64c7a4bb97d2a989a621d278a1eac64cc
[]
no_license
CloseITsro/hibernate-batch-fetching-demo
d85f1cac181a12cf4732504050d8886a02133bbc
7b4771c6da804c7e869e898830b28137c0c0846e
refs/heads/master
2022-02-11T03:32:43.653620
2020-02-14T11:47:54
2020-02-14T11:47:54
240,470,897
0
0
null
2022-01-21T23:37:56
2020-02-14T09:21:13
Java
UTF-8
Java
false
false
1,317
java
package co.closeit.tfrais.playground.hibernate; public class Constants { public final static String LOADING_DATA_MESSAGE = "-------------------------------------------------------\n" + "-------------------------------------------------------\n" + "-------------------------------------------------------\n" + "-- LOADING DUMMY DATA ---------------------------------\n" + "-------------------------------------------------------\n" + "-------------------------------------------------------\n" + "-------------------------------------------------------\n"; public final static String FETCHING_DATA_MESSAGE = "-------------------------------------------------------\n" + "-------------------------------------------------------\n" + "-------------------------------------------------------\n" + "-- FETCHING DATA VIA JPA REPOSITORY -------------------\n" + "-------------------------------------------------------\n" + "-------------------------------------------------------\n" + "-------------------------------------------------------\n"; }
[ "tomas.frais@closeit.cz" ]
tomas.frais@closeit.cz
c013714ab9e6427c02313699042d06b805ce9ee9
db7d7fec417ba1491e5adb48ec46b868752020f6
/Binary Tree/BinaryTree.java
bcdf37da6347fcb42a9151635498256110dd939f
[]
no_license
osirot/Java-Data-Structures
f1d1d848aeef2bffca15fc4f554edf8aca99b1b7
84179ae8014519d1dc1f369baf8a4227f378159c
refs/heads/master
2021-01-01T18:31:07.414745
2017-07-25T22:25:25
2017-07-25T22:25:25
98,241,002
0
0
null
null
null
null
UTF-8
Java
false
false
2,512
java
import java.util.*; /** Olga Sirotinsky asg 7 ad 300 2016 This will be the binary tree class that will be used in the BTprogram that builds a Btree */ public class BinaryTree { private BTNode root; private int size; //constructor for BTree class public BinaryTree(){ root = null; size = 0; }//end constructor //public add method adds new nodes to tree public void add(int num){ if(root == null){//creating very first node root = new BTNode(num); }else{ addToSub(root, null, num); } }//end add //private method to search recursively and compare values to add to sub tree private void addToSub(BTNode child, BTNode parent, int num){ if(child == null){//create new root node if tree is empty size++; child = new BTNode(num); if(num > parent.data){ parent.right = child; } if(num < parent.data){ parent.left = child; } }else if(num > child.data){//add to the right sub tree addToSub(child.right, child, num); //traverse to end of tree until you get null }else if(num < child.data){//add to left subtree if data is less than current root data addToSub(child.left, child, num); //traverse recursively } //case when data is a duplicate we will skip it }//end add // method prints tree public void print(){ print(root); System.out.println(); }//end print //private method to use in print() & hide root node private void print(BTNode r){ //base case is to do nothing if its empty if(r != null){ //recursive case: print left, root, right print(r.left); System.out.print(r.data + " "); print(r.right); } }//end private print //private BTNode class that creates one node in above Btree private class BTNode { public BTNode left; public BTNode right; public int data; //constructor that creates a leaf node with data in param. public BTNode(int num){ this(num, null, null); }//end constructor //constructor for a branch node public BTNode(int data, BTNode left, BTNode right){ this.data = data; this.left = left; this.right = right; }//end constructor }//end node class }//end BT class
[ "sirotinsky206@hotmail.com" ]
sirotinsky206@hotmail.com
0a894b4615c10f8e67be9d937d7faed1481e7e9d
267a2858bc1823f71ceea66a603d5f880afb9fb8
/app/src/main/java/yh/app/model/ZiZhuMuBiaoModel.java
fb79762994c49d307076ae1e18d83085ddc1e8d5
[]
no_license
zsp19931222/LiGongApp
ad1d61f352481bb2ebecd059d0674f48e1ab6bef
1bc158c6c615afca490edc9ce229e8ad4f3ff35f
refs/heads/master
2020-03-23T07:21:09.914957
2018-08-13T03:05:27
2018-08-13T03:05:34
141,266,143
0
0
null
null
null
null
UTF-8
Java
false
false
8,633
java
package yh.app.model; import java.util.List; public class ZiZhuMuBiaoModel { /** * content : {"message":{"ongoing":[{"t_id":"100027","status":"0","status_name":"进行中","t_name":"测试目标100027"},{"t_id":"100066","status":"0","status_name":"进行中","t_name":"测试目标100066"},{"t_id":"100054","status":"0","status_name":"进行中","t_name":"测试目标100054"},{"t_id":"100048","status":"0","status_name":"进行中","t_name":"测试目标100048"},{"t_id":"100030","status":"0","status_name":"进行中","t_name":"测试目标100030"},{"t_id":"100026","status":"0","status_name":"进行中","t_name":"测试目标100026"},{"t_id":"100024","status":"0","status_name":"进行中","t_name":"测试目标100024"},{"t_id":"100014","status":"0","status_name":"进行中","t_name":"测试目标100014"},{"t_id":"10006","status":"0","status_name":"进行中","t_name":"测试目标10006"},{"t_id":"100080","status":"0","status_name":"进行中","t_name":"测试目标100080"},{"t_id":"AEN","status":"0","status_name":"进行中","t_name":"测试名称zy_05"},{"t_id":"100012","status":"0","status_name":"进行中","t_name":"测试目标100012"},{"t_id":"100096","status":"0","status_name":"进行中","t_name":"测试目标100096"},{"t_id":"0f393ca7-fa90-4917-9101-15db31a226dc","status":"0","status_name":"进行中","t_name":"123456"},{"t_id":"1710f8a5-7e0d-44d7-a398-56e938883259","status":"0","status_name":"进行中","t_name":"ujku"},{"t_id":"76fbf9c9-ef13-431e-bb95-82693fd756da","status":"0","status_name":"进行中","t_name":"测试201704101053px"},{"t_id":"3aabe82a-2d6c-4b11-9925-222d4e826f9c","status":"0","status_name":"进行中","t_name":"快快快快快快加"},{"t_id":"1dd742d4-763d-4d4e-b138-d32ae7a087e2","status":"0","status_name":"进行中","t_name":"12312"},{"t_id":"d4343cba-fc15-479b-a5c3-42cfa57ac7c7","status":"0","status_name":"进行中","t_name":"bbbbbbbbbbbbbbbbbbb"},{"t_id":"f0e37f25-d76d-4bff-ae46-ad8aa1212359","status":"0","status_name":"进行中","t_name":"xxxxxxxxxxxxxxxxxxxxxxxx"},{"t_id":"7a2ed2a3-d97d-4daa-9d69-8994bc7fe622","status":"0","status_name":"进行中","t_name":"测试201704141411"},{"t_id":"1c7f1316-6940-43b0-af5f-4be2982aef8c","status":"0","status_name":"进行中","t_name":"测试201704141416"},{"t_id":"KVF","status":"0","status_name":"进行中","t_name":"测试名称zy_83"},{"t_id":"5NC","status":"0","status_name":"进行中","t_name":"测试名称zy_17"},{"t_id":"6FK","status":"0","status_name":"进行中","t_name":"测试名称zy_80"},{"t_id":"13635","status":"0","status_name":"进行中","t_name":"仪表工"}],"completed":[]},"ticket":"faf9a792-a6dd-49e0-abe9-e606632ee827","status":"true","code":"60008"} * message : 成功 * code : 40001 */ private ContentBean content; private String message; private String code; public ContentBean getContent() { return content; } public void setContent(ContentBean content) { this.content = content; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public static class ContentBean { /** * message : {"ongoing":[{"t_id":"100027","status":"0","status_name":"进行中","t_name":"测试目标100027"},{"t_id":"100066","status":"0","status_name":"进行中","t_name":"测试目标100066"},{"t_id":"100054","status":"0","status_name":"进行中","t_name":"测试目标100054"},{"t_id":"100048","status":"0","status_name":"进行中","t_name":"测试目标100048"},{"t_id":"100030","status":"0","status_name":"进行中","t_name":"测试目标100030"},{"t_id":"100026","status":"0","status_name":"进行中","t_name":"测试目标100026"},{"t_id":"100024","status":"0","status_name":"进行中","t_name":"测试目标100024"},{"t_id":"100014","status":"0","status_name":"进行中","t_name":"测试目标100014"},{"t_id":"10006","status":"0","status_name":"进行中","t_name":"测试目标10006"},{"t_id":"100080","status":"0","status_name":"进行中","t_name":"测试目标100080"},{"t_id":"AEN","status":"0","status_name":"进行中","t_name":"测试名称zy_05"},{"t_id":"100012","status":"0","status_name":"进行中","t_name":"测试目标100012"},{"t_id":"100096","status":"0","status_name":"进行中","t_name":"测试目标100096"},{"t_id":"0f393ca7-fa90-4917-9101-15db31a226dc","status":"0","status_name":"进行中","t_name":"123456"},{"t_id":"1710f8a5-7e0d-44d7-a398-56e938883259","status":"0","status_name":"进行中","t_name":"ujku"},{"t_id":"76fbf9c9-ef13-431e-bb95-82693fd756da","status":"0","status_name":"进行中","t_name":"测试201704101053px"},{"t_id":"3aabe82a-2d6c-4b11-9925-222d4e826f9c","status":"0","status_name":"进行中","t_name":"快快快快快快加"},{"t_id":"1dd742d4-763d-4d4e-b138-d32ae7a087e2","status":"0","status_name":"进行中","t_name":"12312"},{"t_id":"d4343cba-fc15-479b-a5c3-42cfa57ac7c7","status":"0","status_name":"进行中","t_name":"bbbbbbbbbbbbbbbbbbb"},{"t_id":"f0e37f25-d76d-4bff-ae46-ad8aa1212359","status":"0","status_name":"进行中","t_name":"xxxxxxxxxxxxxxxxxxxxxxxx"},{"t_id":"7a2ed2a3-d97d-4daa-9d69-8994bc7fe622","status":"0","status_name":"进行中","t_name":"测试201704141411"},{"t_id":"1c7f1316-6940-43b0-af5f-4be2982aef8c","status":"0","status_name":"进行中","t_name":"测试201704141416"},{"t_id":"KVF","status":"0","status_name":"进行中","t_name":"测试名称zy_83"},{"t_id":"5NC","status":"0","status_name":"进行中","t_name":"测试名称zy_17"},{"t_id":"6FK","status":"0","status_name":"进行中","t_name":"测试名称zy_80"},{"t_id":"13635","status":"0","status_name":"进行中","t_name":"仪表工"}],"completed":[]} * ticket : faf9a792-a6dd-49e0-abe9-e606632ee827 * status : true * code : 60008 */ private MessageBean message; private String ticket; private String status; private String code; public MessageBean getMessage() { return message; } public void setMessage(MessageBean message) { this.message = message; } public String getTicket() { return ticket; } public void setTicket(String ticket) { this.ticket = ticket; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public static class MessageBean { private List<OngoingBean> ongoing; private List<?> completed; public List<OngoingBean> getOngoing() { return ongoing; } public void setOngoing(List<OngoingBean> ongoing) { this.ongoing = ongoing; } public List<?> getCompleted() { return completed; } public void setCompleted(List<?> completed) { this.completed = completed; } public static class OngoingBean { /** * t_id : 100027 * status : 0 * status_name : 进行中 * t_name : 测试目标100027 */ private String t_id; private String status; private String status_name; private String t_name; public String getT_id() { return t_id; } public void setT_id(String t_id) { this.t_id = t_id; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getStatus_name() { return status_name; } public void setStatus_name(String status_name) { this.status_name = status_name; } public String getT_name() { return t_name; } public void setT_name(String t_name) { this.t_name = t_name; } } } } }
[ "872126510@qq.com" ]
872126510@qq.com
edd681a688534021c8c4f7b87cb4ac1d1b0c73bd
7f1978e9cab3f2b9b070cca2c64a017398816c34
/src/main/java/Figure.java
8ea89dd1bfb24288472c429d164697df6b977d7a
[]
no_license
lilspikey/kite
54474cb86d4588e5dea69071c7be57d227eb4b6a
4e5480c8ef80199c1c07851660dd1f9b8c4399fe
refs/heads/master
2021-01-13T02:16:28.784379
2010-07-14T20:07:36
2010-07-14T20:07:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,394
java
import com.psychicorigami.physics.MultiBody; import com.psychicorigami.physics.Body2D; import com.psychicorigami.physics.Vector2D; import com.psychicorigami.physics.Constraint; import com.psychicorigami.physics.StickConstraint; import com.psychicorigami.scene.MultiShape; import com.psychicorigami.scene.Shape; import com.psychicorigami.scene.PhysicsShape; import java.awt.image.*; import javax.imageio.*; import java.io.IOException; import java.util.List; import java.util.Arrays; public class Figure implements MultiBody<Body2D,Vector2D>, MultiShape { private final Body2D top; private final Body2D bottom; private final Body2D rightShoulder; private final Body2D rightHand; private final Body2D rightHip; private final Body2D rightFoot; private final Body2D leftShoulder; private final Body2D leftHand; private final Body2D leftHip; private final Body2D leftFoot; private final List<Body2D> bodies; private final List<Constraint> constraints; private final PhysicsShape figureShape; private final PhysicsShape rightArmShape; private final PhysicsShape rightLegShape; private final PhysicsShape leftArmShape; private final PhysicsShape leftLegShape; private final List<Shape> shapes; public Figure(Vector2D center) { top = new Body2D(center.x, center.y + 30); bottom = new Body2D(center.x, center.y - 30); rightShoulder = new Body2D(center.x+5, center.y + 5); rightHand = new Body2D(center.x+25, center.y + 5); rightHip = new Body2D(center.x+8, center.y -22); rightFoot = new Body2D(center.x+9, center.y -48); leftShoulder = new Body2D(center.x-8, center.y + 5); leftHand = new Body2D(center.x-28, center.y + 5); leftHip = new Body2D(center.x-8, center.y -22); leftFoot = new Body2D(center.x-9, center.y -48); leftFoot.setMass(800); rightFoot.setMass(800); bodies = Arrays.asList(new Body2D[]{ top, bottom, rightShoulder, rightHand, rightHip, rightFoot, leftShoulder, leftHand, leftHip, leftFoot }); Constraint[] constraints = { new StickConstraint<Body2D, Vector2D>(top, bottom), new StickConstraint<Body2D, Vector2D>(top, rightShoulder), new StickConstraint<Body2D, Vector2D>(rightShoulder, bottom), new StickConstraint<Body2D, Vector2D>(rightShoulder, rightHand), new StickConstraint<Body2D, Vector2D>(top, leftShoulder), new StickConstraint<Body2D, Vector2D>(leftShoulder, bottom), new StickConstraint<Body2D, Vector2D>(leftShoulder, leftHand), new StickConstraint<Body2D, Vector2D>(bottom, rightHip), new StickConstraint<Body2D, Vector2D>(top, rightHip), new StickConstraint<Body2D, Vector2D>(rightHip, rightFoot), new StickConstraint<Body2D, Vector2D>(rightHip, leftFoot), new StickConstraint<Body2D, Vector2D>(bottom, leftHip), new StickConstraint<Body2D, Vector2D>(top, leftHip), new StickConstraint<Body2D, Vector2D>(leftHip, leftFoot), new StickConstraint<Body2D, Vector2D>(leftHip, rightFoot) }; this.constraints = Arrays.asList(constraints); // TODO load images via some other mechanism try { BufferedImage rightArmShapeImg = ImageIO.read(getClass().getResource("/images/figure-arm-right.png")); BufferedImage rightLegShapeImg = ImageIO.read(getClass().getResource("/images/figure-leg-right.png")); BufferedImage leftArmShapeImg = ImageIO.read(getClass().getResource("/images/figure-arm-left.png")); BufferedImage leftLegShapeImg = ImageIO.read(getClass().getResource("/images/figure-leg-left.png")); BufferedImage figBodyImg = ImageIO.read(getClass().getResource("/images/figure-body.png")); rightArmShape = new PhysicsShape(rightArmShapeImg, rightShoulder, rightHand); rightLegShape = new PhysicsShape(rightLegShapeImg, rightHip, rightFoot); leftArmShape = new PhysicsShape(leftArmShapeImg, leftShoulder, leftHand); leftLegShape = new PhysicsShape(leftLegShapeImg, leftHip, leftFoot); figureShape = new PhysicsShape(figBodyImg, top, bottom); this.shapes = Arrays.asList(new Shape[]{ rightArmShape, rightLegShape, leftArmShape, leftLegShape, figureShape }); } catch(IOException ioe) { throw new RuntimeException(ioe); } } public List<Body2D> getBodies() { return bodies; } public List<Constraint> getConstraints() { return constraints; } public List<Shape> getShapes() { return shapes; } public Body2D getRightShoulder() { return rightShoulder; } public Body2D getRightHand() { return rightHand; } public Body2D getLeftShoulder() { return leftShoulder; } public Body2D getLeftHand() { return leftHand; } public Body2D getTop() { return top; } public Body2D getBottom() { return bottom; } }
[ "john@littlespikeyland.com" ]
john@littlespikeyland.com
3246409319c83c0106674da79cc28afd211d5527
b760956c33c5371f1f58f7475ba476ae1e48e9bf
/srcgen/src/riseevents/ev/repository/ActivityRepository.java
ff2856eae8ea3ad6afe48e68e24b2c78ef9f0b4f
[]
no_license
Aniz/EvDSL
fab9670cae02b2fb91047400bae2235e93f4b91a
764ff59d473b8b009572a9e254ea740858373d6f
refs/heads/master
2021-01-23T05:18:40.864332
2018-06-02T11:19:03
2018-06-02T11:19:03
86,291,212
0
0
null
null
null
null
UTF-8
Java
false
false
1,585
java
//#if ${ActivityMinicurso} == "T" or ${ActivityTutorial} == "T" or ${ActivityPainel} == "T" or ${ActivityWorkshop} == "T" or ${ActivityMainTrack} == "T" package riseevents.ev.repository; import java.util.List; import riseevents.ev.data.Activity; import riseevents.ev.exception.ActivityNotFoundException; import riseevents.ev.exception.RepositoryException; public interface ActivityRepository { public void insert(Activity activity) throws RepositoryException; public void remove(int idActivity) throws ActivityNotFoundException, RepositoryException; public Activity search(int idActivity) throws ActivityNotFoundException, RepositoryException; public List<Activity> getActivityList() throws RepositoryException; public void update(Activity activityo) throws ActivityNotFoundException, RepositoryException; public boolean isThere(int idActivity) throws RepositoryException; public int getActivityLastId() throws RepositoryException; public int getActivityIdByName(String activityName) throws RepositoryException; public List<Activity> getActivitiesByEvent(int idEvent) throws RepositoryException; public float getEventMainTrackValue(int idEvent) throws RepositoryException; public int getActivityMainTrackId(int idEvent) throws RepositoryException; public int getEventbyActivity(int idActivity) throws RepositoryException; // Generated by DSL public List<String> getListOfAuthorsPerActivity(int idActivity) throws RepositoryException; // public List<String> getParticipantsPerActivity(int idActivity) throws RepositoryException; } //#endif
[ "aniz1987@hotmail.com" ]
aniz1987@hotmail.com
3a031e44039a5251fa1fc76e0fd31b53548da243
e4aee3aeaa085ec4a8eef21aac7f035d3e16c7e4
/FreeAngle/freeanglefront/src/main/java/com/soyoung/photo/entity/Chat.java
cd5450290d69ce9efc49b850a68da6a57ed8e4e7
[]
no_license
Wonie-SoYoung/java-project
ebdfb388329ba15cdd815fa48dd21def7a902159
dc0e89dad17406d20c3a419290244c462138f0ea
refs/heads/master
2023-01-19T17:50:12.812497
2020-11-24T09:49:44
2020-11-24T09:49:44
293,754,315
0
0
null
null
null
null
UTF-8
Java
false
false
2,356
java
package com.soyoung.photo.entity; import com.alibaba.fastjson.annotation.JSONField; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.enums.IdType; import java.util.Date; import com.baomidou.mybatisplus.annotations.TableId; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; /** * <p> * 私聊表 * </p> * * @author SoYoung * @since 2019-12-05 */ public class Chat implements Serializable { private static final long serialVersionUID = 1L; /** * id */ @TableId(value = "cid", type = IdType.AUTO) private Integer cid; /** * 人员外键 */ private Integer cozeid; //用户实体 @TableField(exist = false) private User cozeUser; /** * 人员外键 */ private Integer talkid; //用户实体 @TableField(exist = false) private User talkUser; /** * 内容 */ private String content; /** * 创建时间 */ @JSONField(format = "yyyy-MM-dd HH:mm") private Date createTime; public Integer getCid() { return cid; } public void setCid(Integer cid) { this.cid = cid; } public Integer getCozeid() { return cozeid; } public void setCozeid(Integer cozeid) { this.cozeid = cozeid; } public Integer getTalkid() { return talkid; } public void setTalkid(Integer talkid) { this.talkid = talkid; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public User getCozeUser() { return cozeUser; } public void setCozeUser(User cozeUser) { this.cozeUser = cozeUser; } public User getTalkUser() { return talkUser; } public void setTalkUser(User talkUser) { this.talkUser = talkUser; } @Override public String toString() { return "Chat{" + "cid=" + cid + ", cozeid=" + cozeid + ", talkid=" + talkid + ", content=" + content + ", createTime=" + createTime + "}"; } }
[ "1377763492@qq.com" ]
1377763492@qq.com
7bd4e60ef7974479d9a6019697ebf5f2eb198166
6845487751780e913e02a7dfd566e38bacedd6f4
/loanmanagement-api/src/main/java/com/rabo/loan/management/LoanmanagementApiApplication.java
bf7083996b20a5a4bcc4ab401d4bb9ad992a265f
[]
no_license
chandrajavalab/LoanManagementSystem
f3fae5b97884db7140dc6c40d3118b2dc9c8847f
cc16bd0ec2ff135db7cea01e5c440827a421a8a7
refs/heads/master
2022-11-24T01:40:39.830538
2020-07-28T06:00:52
2020-07-28T06:00:52
278,586,030
0
0
null
null
null
null
UTF-8
Java
false
false
339
java
package com.rabo.loan.management; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class LoanmanagementApiApplication { public static void main(String[] args) { SpringApplication.run(LoanmanagementApiApplication.class, args); } }
[ "ctsjava107@iiht.tech" ]
ctsjava107@iiht.tech
f84f3860bccf4c51e4ac0a749767702b6014f168
319758d78c7cc6e6b824af1c2fe39655653262b9
/src/boardgame/Position.java
9c4b532f24960eecb52b7be455aa94814a89bc9c
[]
no_license
luizffdemoraes/chess-system-java
87ae94ec9d16bcb8501e1468efec3550ce375bdc
1edbee80b0242f42bb8c6555ac2fc09d3228437b
refs/heads/main
2023-03-15T07:31:48.645281
2021-03-11T00:24:11
2021-03-11T00:24:11
343,411,244
0
0
null
null
null
null
UTF-8
Java
false
false
535
java
package boardgame; public class Position { private int row; private int column; public Position(int row, int column){ this.row = row; this.column = column; } public int getRow() { return row; } public void setRow(int row) { this.row = row; } public int getColumn() { return column; } public void setColumn(int column) { this.column = column; } @Override public String toString(){ return row + ", " + column; } }
[ "lffm1994@gmail.com" ]
lffm1994@gmail.com
02993ac0c859e2d9f4c412ddc41b4615363dc508
44e7adc9a1c5c0a1116097ac99c2a51692d4c986
/aws-java-sdk-appstream/src/main/java/com/amazonaws/services/appstream/model/Fleet.java
ac95eb4694f0035fe49a8b309718e59cb424f696
[ "Apache-2.0" ]
permissive
QiAnXinCodeSafe/aws-sdk-java
f93bc97c289984e41527ae5bba97bebd6554ddbe
8251e0a3d910da4f63f1b102b171a3abf212099e
refs/heads/master
2023-01-28T14:28:05.239019
2020-12-03T22:09:01
2020-12-03T22:09:01
318,460,751
1
0
Apache-2.0
2020-12-04T10:06:51
2020-12-04T09:05:03
null
UTF-8
Java
false
false
92,435
java
/* * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.appstream.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** * <p> * Describes a fleet. * </p> * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/appstream-2016-12-01/Fleet" target="_top">AWS API * Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Fleet implements Serializable, Cloneable, StructuredPojo { /** * <p> * The Amazon Resource Name (ARN) for the fleet. * </p> */ private String arn; /** * <p> * The name of the fleet. * </p> */ private String name; /** * <p> * The fleet name to display. * </p> */ private String displayName; /** * <p> * The description to display. * </p> */ private String description; /** * <p> * The name of the image used to create the fleet. * </p> */ private String imageName; /** * <p> * The ARN for the public, private, or shared image. * </p> */ private String imageArn; /** * <p> * The instance type to use when launching fleet instances. The following instance types are available: * </p> * <ul> * <li> * <p> * stream.standard.medium * </p> * </li> * <li> * <p> * stream.standard.large * </p> * </li> * <li> * <p> * stream.compute.large * </p> * </li> * <li> * <p> * stream.compute.xlarge * </p> * </li> * <li> * <p> * stream.compute.2xlarge * </p> * </li> * <li> * <p> * stream.compute.4xlarge * </p> * </li> * <li> * <p> * stream.compute.8xlarge * </p> * </li> * <li> * <p> * stream.memory.large * </p> * </li> * <li> * <p> * stream.memory.xlarge * </p> * </li> * <li> * <p> * stream.memory.2xlarge * </p> * </li> * <li> * <p> * stream.memory.4xlarge * </p> * </li> * <li> * <p> * stream.memory.8xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.large * </p> * </li> * <li> * <p> * stream.memory.z1d.xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.2xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.3xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.6xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.12xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.large * </p> * </li> * <li> * <p> * stream.graphics-design.xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.2xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-desktop.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.4xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.8xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.12xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.16xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.8xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.16xlarge * </p> * </li> * </ul> */ private String instanceType; /** * <p> * The fleet type. * </p> * <dl> * <dt>ALWAYS_ON</dt> * <dd> * <p> * Provides users with instant-on access to their apps. You are charged for all running instances in your fleet, * even if no users are streaming apps. * </p> * </dd> * <dt>ON_DEMAND</dt> * <dd> * <p> * Provide users with access to applications after they connect, which takes one to two minutes. You are charged for * instance streaming when users are connected and a small hourly fee for instances that are not streaming apps. * </p> * </dd> * </dl> */ private String fleetType; /** * <p> * The capacity status for the fleet. * </p> */ private ComputeCapacityStatus computeCapacityStatus; /** * <p> * The maximum amount of time that a streaming session can remain active, in seconds. If users are still connected * to a streaming instance five minutes before this limit is reached, they are prompted to save any open documents * before being disconnected. After this time elapses, the instance is terminated and replaced by a new instance. * </p> * <p> * Specify a value between 600 and 360000. * </p> */ private Integer maxUserDurationInSeconds; /** * <p> * The amount of time that a streaming session remains active after users disconnect. If they try to reconnect to * the streaming session after a disconnection or network interruption within this time interval, they are connected * to their previous session. Otherwise, they are connected to a new session with a new streaming instance. * </p> * <p> * Specify a value between 60 and 360000. * </p> */ private Integer disconnectTimeoutInSeconds; /** * <p> * The current state for the fleet. * </p> */ private String state; /** * <p> * The VPC configuration for the fleet. * </p> */ private VpcConfig vpcConfig; /** * <p> * The time the fleet was created. * </p> */ private java.util.Date createdTime; /** * <p> * The fleet errors. * </p> */ private java.util.List<FleetError> fleetErrors; /** * <p> * Indicates whether default internet access is enabled for the fleet. * </p> */ private Boolean enableDefaultInternetAccess; /** * <p> * The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active Directory * domain. * </p> */ private DomainJoinInfo domainJoinInfo; /** * <p> * The amount of time that users can be idle (inactive) before they are disconnected from their streaming session * and the <code>DisconnectTimeoutInSeconds</code> time interval begins. Users are notified before they are * disconnected due to inactivity. If users try to reconnect to the streaming session before the time interval * specified in <code>DisconnectTimeoutInSeconds</code> elapses, they are connected to their previous session. Users * are considered idle when they stop providing keyboard or mouse input during their streaming session. File uploads * and downloads, audio in, audio out, and pixels changing do not qualify as user activity. If users continue to be * idle after the time interval in <code>IdleDisconnectTimeoutInSeconds</code> elapses, they are disconnected. * </p> * <p> * To prevent users from being disconnected due to inactivity, specify a value of 0. Otherwise, specify a value * between 60 and 3600. The default value is 0. * </p> * <note> * <p> * If you enable this feature, we recommend that you specify a value that corresponds exactly to a whole number of * minutes (for example, 60, 120, and 180). If you don't do this, the value is rounded to the nearest minute. For * example, if you specify a value of 70, users are disconnected after 1 minute of inactivity. If you specify a * value that is at the midpoint between two different minutes, the value is rounded up. For example, if you specify * a value of 90, users are disconnected after 2 minutes of inactivity. * </p> * </note> */ private Integer idleDisconnectTimeoutInSeconds; /** * <p> * The ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the AWS Security * Token Service (STS) <code>AssumeRole</code> API operation and passes the ARN of the role to use. The operation * creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary credentials and creates * the <b>appstream_machine_role</b> credential profile on the instance. * </p> * <p> * For more information, see <a href= * "https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html" * >Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming * Instances</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>. * </p> */ private String iamRoleArn; /** * <p> * The AppStream 2.0 view that is displayed to your users when they stream from the fleet. When <code>APP</code> is * specified, only the windows of applications opened by users display. When <code>DESKTOP</code> is specified, the * standard desktop that is provided by the operating system displays. * </p> * <p> * The default value is <code>APP</code>. * </p> */ private String streamView; /** * <p> * The Amazon Resource Name (ARN) for the fleet. * </p> * * @param arn * The Amazon Resource Name (ARN) for the fleet. */ public void setArn(String arn) { this.arn = arn; } /** * <p> * The Amazon Resource Name (ARN) for the fleet. * </p> * * @return The Amazon Resource Name (ARN) for the fleet. */ public String getArn() { return this.arn; } /** * <p> * The Amazon Resource Name (ARN) for the fleet. * </p> * * @param arn * The Amazon Resource Name (ARN) for the fleet. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withArn(String arn) { setArn(arn); return this; } /** * <p> * The name of the fleet. * </p> * * @param name * The name of the fleet. */ public void setName(String name) { this.name = name; } /** * <p> * The name of the fleet. * </p> * * @return The name of the fleet. */ public String getName() { return this.name; } /** * <p> * The name of the fleet. * </p> * * @param name * The name of the fleet. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withName(String name) { setName(name); return this; } /** * <p> * The fleet name to display. * </p> * * @param displayName * The fleet name to display. */ public void setDisplayName(String displayName) { this.displayName = displayName; } /** * <p> * The fleet name to display. * </p> * * @return The fleet name to display. */ public String getDisplayName() { return this.displayName; } /** * <p> * The fleet name to display. * </p> * * @param displayName * The fleet name to display. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withDisplayName(String displayName) { setDisplayName(displayName); return this; } /** * <p> * The description to display. * </p> * * @param description * The description to display. */ public void setDescription(String description) { this.description = description; } /** * <p> * The description to display. * </p> * * @return The description to display. */ public String getDescription() { return this.description; } /** * <p> * The description to display. * </p> * * @param description * The description to display. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withDescription(String description) { setDescription(description); return this; } /** * <p> * The name of the image used to create the fleet. * </p> * * @param imageName * The name of the image used to create the fleet. */ public void setImageName(String imageName) { this.imageName = imageName; } /** * <p> * The name of the image used to create the fleet. * </p> * * @return The name of the image used to create the fleet. */ public String getImageName() { return this.imageName; } /** * <p> * The name of the image used to create the fleet. * </p> * * @param imageName * The name of the image used to create the fleet. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withImageName(String imageName) { setImageName(imageName); return this; } /** * <p> * The ARN for the public, private, or shared image. * </p> * * @param imageArn * The ARN for the public, private, or shared image. */ public void setImageArn(String imageArn) { this.imageArn = imageArn; } /** * <p> * The ARN for the public, private, or shared image. * </p> * * @return The ARN for the public, private, or shared image. */ public String getImageArn() { return this.imageArn; } /** * <p> * The ARN for the public, private, or shared image. * </p> * * @param imageArn * The ARN for the public, private, or shared image. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withImageArn(String imageArn) { setImageArn(imageArn); return this; } /** * <p> * The instance type to use when launching fleet instances. The following instance types are available: * </p> * <ul> * <li> * <p> * stream.standard.medium * </p> * </li> * <li> * <p> * stream.standard.large * </p> * </li> * <li> * <p> * stream.compute.large * </p> * </li> * <li> * <p> * stream.compute.xlarge * </p> * </li> * <li> * <p> * stream.compute.2xlarge * </p> * </li> * <li> * <p> * stream.compute.4xlarge * </p> * </li> * <li> * <p> * stream.compute.8xlarge * </p> * </li> * <li> * <p> * stream.memory.large * </p> * </li> * <li> * <p> * stream.memory.xlarge * </p> * </li> * <li> * <p> * stream.memory.2xlarge * </p> * </li> * <li> * <p> * stream.memory.4xlarge * </p> * </li> * <li> * <p> * stream.memory.8xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.large * </p> * </li> * <li> * <p> * stream.memory.z1d.xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.2xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.3xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.6xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.12xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.large * </p> * </li> * <li> * <p> * stream.graphics-design.xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.2xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-desktop.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.4xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.8xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.12xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.16xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.8xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.16xlarge * </p> * </li> * </ul> * * @param instanceType * The instance type to use when launching fleet instances. The following instance types are available:</p> * <ul> * <li> * <p> * stream.standard.medium * </p> * </li> * <li> * <p> * stream.standard.large * </p> * </li> * <li> * <p> * stream.compute.large * </p> * </li> * <li> * <p> * stream.compute.xlarge * </p> * </li> * <li> * <p> * stream.compute.2xlarge * </p> * </li> * <li> * <p> * stream.compute.4xlarge * </p> * </li> * <li> * <p> * stream.compute.8xlarge * </p> * </li> * <li> * <p> * stream.memory.large * </p> * </li> * <li> * <p> * stream.memory.xlarge * </p> * </li> * <li> * <p> * stream.memory.2xlarge * </p> * </li> * <li> * <p> * stream.memory.4xlarge * </p> * </li> * <li> * <p> * stream.memory.8xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.large * </p> * </li> * <li> * <p> * stream.memory.z1d.xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.2xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.3xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.6xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.12xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.large * </p> * </li> * <li> * <p> * stream.graphics-design.xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.2xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-desktop.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.4xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.8xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.12xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.16xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.8xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.16xlarge * </p> * </li> */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** * <p> * The instance type to use when launching fleet instances. The following instance types are available: * </p> * <ul> * <li> * <p> * stream.standard.medium * </p> * </li> * <li> * <p> * stream.standard.large * </p> * </li> * <li> * <p> * stream.compute.large * </p> * </li> * <li> * <p> * stream.compute.xlarge * </p> * </li> * <li> * <p> * stream.compute.2xlarge * </p> * </li> * <li> * <p> * stream.compute.4xlarge * </p> * </li> * <li> * <p> * stream.compute.8xlarge * </p> * </li> * <li> * <p> * stream.memory.large * </p> * </li> * <li> * <p> * stream.memory.xlarge * </p> * </li> * <li> * <p> * stream.memory.2xlarge * </p> * </li> * <li> * <p> * stream.memory.4xlarge * </p> * </li> * <li> * <p> * stream.memory.8xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.large * </p> * </li> * <li> * <p> * stream.memory.z1d.xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.2xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.3xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.6xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.12xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.large * </p> * </li> * <li> * <p> * stream.graphics-design.xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.2xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-desktop.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.4xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.8xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.12xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.16xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.8xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.16xlarge * </p> * </li> * </ul> * * @return The instance type to use when launching fleet instances. The following instance types are available:</p> * <ul> * <li> * <p> * stream.standard.medium * </p> * </li> * <li> * <p> * stream.standard.large * </p> * </li> * <li> * <p> * stream.compute.large * </p> * </li> * <li> * <p> * stream.compute.xlarge * </p> * </li> * <li> * <p> * stream.compute.2xlarge * </p> * </li> * <li> * <p> * stream.compute.4xlarge * </p> * </li> * <li> * <p> * stream.compute.8xlarge * </p> * </li> * <li> * <p> * stream.memory.large * </p> * </li> * <li> * <p> * stream.memory.xlarge * </p> * </li> * <li> * <p> * stream.memory.2xlarge * </p> * </li> * <li> * <p> * stream.memory.4xlarge * </p> * </li> * <li> * <p> * stream.memory.8xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.large * </p> * </li> * <li> * <p> * stream.memory.z1d.xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.2xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.3xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.6xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.12xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.large * </p> * </li> * <li> * <p> * stream.graphics-design.xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.2xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-desktop.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.4xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.8xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.12xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.16xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.8xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.16xlarge * </p> * </li> */ public String getInstanceType() { return this.instanceType; } /** * <p> * The instance type to use when launching fleet instances. The following instance types are available: * </p> * <ul> * <li> * <p> * stream.standard.medium * </p> * </li> * <li> * <p> * stream.standard.large * </p> * </li> * <li> * <p> * stream.compute.large * </p> * </li> * <li> * <p> * stream.compute.xlarge * </p> * </li> * <li> * <p> * stream.compute.2xlarge * </p> * </li> * <li> * <p> * stream.compute.4xlarge * </p> * </li> * <li> * <p> * stream.compute.8xlarge * </p> * </li> * <li> * <p> * stream.memory.large * </p> * </li> * <li> * <p> * stream.memory.xlarge * </p> * </li> * <li> * <p> * stream.memory.2xlarge * </p> * </li> * <li> * <p> * stream.memory.4xlarge * </p> * </li> * <li> * <p> * stream.memory.8xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.large * </p> * </li> * <li> * <p> * stream.memory.z1d.xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.2xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.3xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.6xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.12xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.large * </p> * </li> * <li> * <p> * stream.graphics-design.xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.2xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-desktop.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.4xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.8xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.12xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.16xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.8xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.16xlarge * </p> * </li> * </ul> * * @param instanceType * The instance type to use when launching fleet instances. The following instance types are available:</p> * <ul> * <li> * <p> * stream.standard.medium * </p> * </li> * <li> * <p> * stream.standard.large * </p> * </li> * <li> * <p> * stream.compute.large * </p> * </li> * <li> * <p> * stream.compute.xlarge * </p> * </li> * <li> * <p> * stream.compute.2xlarge * </p> * </li> * <li> * <p> * stream.compute.4xlarge * </p> * </li> * <li> * <p> * stream.compute.8xlarge * </p> * </li> * <li> * <p> * stream.memory.large * </p> * </li> * <li> * <p> * stream.memory.xlarge * </p> * </li> * <li> * <p> * stream.memory.2xlarge * </p> * </li> * <li> * <p> * stream.memory.4xlarge * </p> * </li> * <li> * <p> * stream.memory.8xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.large * </p> * </li> * <li> * <p> * stream.memory.z1d.xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.2xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.3xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.6xlarge * </p> * </li> * <li> * <p> * stream.memory.z1d.12xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.large * </p> * </li> * <li> * <p> * stream.graphics-design.xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.2xlarge * </p> * </li> * <li> * <p> * stream.graphics-design.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-desktop.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.2xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.4xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.8xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.12xlarge * </p> * </li> * <li> * <p> * stream.graphics.g4dn.16xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.4xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.8xlarge * </p> * </li> * <li> * <p> * stream.graphics-pro.16xlarge * </p> * </li> * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** * <p> * The fleet type. * </p> * <dl> * <dt>ALWAYS_ON</dt> * <dd> * <p> * Provides users with instant-on access to their apps. You are charged for all running instances in your fleet, * even if no users are streaming apps. * </p> * </dd> * <dt>ON_DEMAND</dt> * <dd> * <p> * Provide users with access to applications after they connect, which takes one to two minutes. You are charged for * instance streaming when users are connected and a small hourly fee for instances that are not streaming apps. * </p> * </dd> * </dl> * * @param fleetType * The fleet type.</p> * <dl> * <dt>ALWAYS_ON</dt> * <dd> * <p> * Provides users with instant-on access to their apps. You are charged for all running instances in your * fleet, even if no users are streaming apps. * </p> * </dd> * <dt>ON_DEMAND</dt> * <dd> * <p> * Provide users with access to applications after they connect, which takes one to two minutes. You are * charged for instance streaming when users are connected and a small hourly fee for instances that are not * streaming apps. * </p> * </dd> * @see FleetType */ public void setFleetType(String fleetType) { this.fleetType = fleetType; } /** * <p> * The fleet type. * </p> * <dl> * <dt>ALWAYS_ON</dt> * <dd> * <p> * Provides users with instant-on access to their apps. You are charged for all running instances in your fleet, * even if no users are streaming apps. * </p> * </dd> * <dt>ON_DEMAND</dt> * <dd> * <p> * Provide users with access to applications after they connect, which takes one to two minutes. You are charged for * instance streaming when users are connected and a small hourly fee for instances that are not streaming apps. * </p> * </dd> * </dl> * * @return The fleet type.</p> * <dl> * <dt>ALWAYS_ON</dt> * <dd> * <p> * Provides users with instant-on access to their apps. You are charged for all running instances in your * fleet, even if no users are streaming apps. * </p> * </dd> * <dt>ON_DEMAND</dt> * <dd> * <p> * Provide users with access to applications after they connect, which takes one to two minutes. You are * charged for instance streaming when users are connected and a small hourly fee for instances that are not * streaming apps. * </p> * </dd> * @see FleetType */ public String getFleetType() { return this.fleetType; } /** * <p> * The fleet type. * </p> * <dl> * <dt>ALWAYS_ON</dt> * <dd> * <p> * Provides users with instant-on access to their apps. You are charged for all running instances in your fleet, * even if no users are streaming apps. * </p> * </dd> * <dt>ON_DEMAND</dt> * <dd> * <p> * Provide users with access to applications after they connect, which takes one to two minutes. You are charged for * instance streaming when users are connected and a small hourly fee for instances that are not streaming apps. * </p> * </dd> * </dl> * * @param fleetType * The fleet type.</p> * <dl> * <dt>ALWAYS_ON</dt> * <dd> * <p> * Provides users with instant-on access to their apps. You are charged for all running instances in your * fleet, even if no users are streaming apps. * </p> * </dd> * <dt>ON_DEMAND</dt> * <dd> * <p> * Provide users with access to applications after they connect, which takes one to two minutes. You are * charged for instance streaming when users are connected and a small hourly fee for instances that are not * streaming apps. * </p> * </dd> * @return Returns a reference to this object so that method calls can be chained together. * @see FleetType */ public Fleet withFleetType(String fleetType) { setFleetType(fleetType); return this; } /** * <p> * The fleet type. * </p> * <dl> * <dt>ALWAYS_ON</dt> * <dd> * <p> * Provides users with instant-on access to their apps. You are charged for all running instances in your fleet, * even if no users are streaming apps. * </p> * </dd> * <dt>ON_DEMAND</dt> * <dd> * <p> * Provide users with access to applications after they connect, which takes one to two minutes. You are charged for * instance streaming when users are connected and a small hourly fee for instances that are not streaming apps. * </p> * </dd> * </dl> * * @param fleetType * The fleet type.</p> * <dl> * <dt>ALWAYS_ON</dt> * <dd> * <p> * Provides users with instant-on access to their apps. You are charged for all running instances in your * fleet, even if no users are streaming apps. * </p> * </dd> * <dt>ON_DEMAND</dt> * <dd> * <p> * Provide users with access to applications after they connect, which takes one to two minutes. You are * charged for instance streaming when users are connected and a small hourly fee for instances that are not * streaming apps. * </p> * </dd> * @see FleetType */ public void setFleetType(FleetType fleetType) { withFleetType(fleetType); } /** * <p> * The fleet type. * </p> * <dl> * <dt>ALWAYS_ON</dt> * <dd> * <p> * Provides users with instant-on access to their apps. You are charged for all running instances in your fleet, * even if no users are streaming apps. * </p> * </dd> * <dt>ON_DEMAND</dt> * <dd> * <p> * Provide users with access to applications after they connect, which takes one to two minutes. You are charged for * instance streaming when users are connected and a small hourly fee for instances that are not streaming apps. * </p> * </dd> * </dl> * * @param fleetType * The fleet type.</p> * <dl> * <dt>ALWAYS_ON</dt> * <dd> * <p> * Provides users with instant-on access to their apps. You are charged for all running instances in your * fleet, even if no users are streaming apps. * </p> * </dd> * <dt>ON_DEMAND</dt> * <dd> * <p> * Provide users with access to applications after they connect, which takes one to two minutes. You are * charged for instance streaming when users are connected and a small hourly fee for instances that are not * streaming apps. * </p> * </dd> * @return Returns a reference to this object so that method calls can be chained together. * @see FleetType */ public Fleet withFleetType(FleetType fleetType) { this.fleetType = fleetType.toString(); return this; } /** * <p> * The capacity status for the fleet. * </p> * * @param computeCapacityStatus * The capacity status for the fleet. */ public void setComputeCapacityStatus(ComputeCapacityStatus computeCapacityStatus) { this.computeCapacityStatus = computeCapacityStatus; } /** * <p> * The capacity status for the fleet. * </p> * * @return The capacity status for the fleet. */ public ComputeCapacityStatus getComputeCapacityStatus() { return this.computeCapacityStatus; } /** * <p> * The capacity status for the fleet. * </p> * * @param computeCapacityStatus * The capacity status for the fleet. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withComputeCapacityStatus(ComputeCapacityStatus computeCapacityStatus) { setComputeCapacityStatus(computeCapacityStatus); return this; } /** * <p> * The maximum amount of time that a streaming session can remain active, in seconds. If users are still connected * to a streaming instance five minutes before this limit is reached, they are prompted to save any open documents * before being disconnected. After this time elapses, the instance is terminated and replaced by a new instance. * </p> * <p> * Specify a value between 600 and 360000. * </p> * * @param maxUserDurationInSeconds * The maximum amount of time that a streaming session can remain active, in seconds. If users are still * connected to a streaming instance five minutes before this limit is reached, they are prompted to save any * open documents before being disconnected. After this time elapses, the instance is terminated and replaced * by a new instance. </p> * <p> * Specify a value between 600 and 360000. */ public void setMaxUserDurationInSeconds(Integer maxUserDurationInSeconds) { this.maxUserDurationInSeconds = maxUserDurationInSeconds; } /** * <p> * The maximum amount of time that a streaming session can remain active, in seconds. If users are still connected * to a streaming instance five minutes before this limit is reached, they are prompted to save any open documents * before being disconnected. After this time elapses, the instance is terminated and replaced by a new instance. * </p> * <p> * Specify a value between 600 and 360000. * </p> * * @return The maximum amount of time that a streaming session can remain active, in seconds. If users are still * connected to a streaming instance five minutes before this limit is reached, they are prompted to save * any open documents before being disconnected. After this time elapses, the instance is terminated and * replaced by a new instance. </p> * <p> * Specify a value between 600 and 360000. */ public Integer getMaxUserDurationInSeconds() { return this.maxUserDurationInSeconds; } /** * <p> * The maximum amount of time that a streaming session can remain active, in seconds. If users are still connected * to a streaming instance five minutes before this limit is reached, they are prompted to save any open documents * before being disconnected. After this time elapses, the instance is terminated and replaced by a new instance. * </p> * <p> * Specify a value between 600 and 360000. * </p> * * @param maxUserDurationInSeconds * The maximum amount of time that a streaming session can remain active, in seconds. If users are still * connected to a streaming instance five minutes before this limit is reached, they are prompted to save any * open documents before being disconnected. After this time elapses, the instance is terminated and replaced * by a new instance. </p> * <p> * Specify a value between 600 and 360000. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withMaxUserDurationInSeconds(Integer maxUserDurationInSeconds) { setMaxUserDurationInSeconds(maxUserDurationInSeconds); return this; } /** * <p> * The amount of time that a streaming session remains active after users disconnect. If they try to reconnect to * the streaming session after a disconnection or network interruption within this time interval, they are connected * to their previous session. Otherwise, they are connected to a new session with a new streaming instance. * </p> * <p> * Specify a value between 60 and 360000. * </p> * * @param disconnectTimeoutInSeconds * The amount of time that a streaming session remains active after users disconnect. If they try to * reconnect to the streaming session after a disconnection or network interruption within this time * interval, they are connected to their previous session. Otherwise, they are connected to a new session * with a new streaming instance.</p> * <p> * Specify a value between 60 and 360000. */ public void setDisconnectTimeoutInSeconds(Integer disconnectTimeoutInSeconds) { this.disconnectTimeoutInSeconds = disconnectTimeoutInSeconds; } /** * <p> * The amount of time that a streaming session remains active after users disconnect. If they try to reconnect to * the streaming session after a disconnection or network interruption within this time interval, they are connected * to their previous session. Otherwise, they are connected to a new session with a new streaming instance. * </p> * <p> * Specify a value between 60 and 360000. * </p> * * @return The amount of time that a streaming session remains active after users disconnect. If they try to * reconnect to the streaming session after a disconnection or network interruption within this time * interval, they are connected to their previous session. Otherwise, they are connected to a new session * with a new streaming instance.</p> * <p> * Specify a value between 60 and 360000. */ public Integer getDisconnectTimeoutInSeconds() { return this.disconnectTimeoutInSeconds; } /** * <p> * The amount of time that a streaming session remains active after users disconnect. If they try to reconnect to * the streaming session after a disconnection or network interruption within this time interval, they are connected * to their previous session. Otherwise, they are connected to a new session with a new streaming instance. * </p> * <p> * Specify a value between 60 and 360000. * </p> * * @param disconnectTimeoutInSeconds * The amount of time that a streaming session remains active after users disconnect. If they try to * reconnect to the streaming session after a disconnection or network interruption within this time * interval, they are connected to their previous session. Otherwise, they are connected to a new session * with a new streaming instance.</p> * <p> * Specify a value between 60 and 360000. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withDisconnectTimeoutInSeconds(Integer disconnectTimeoutInSeconds) { setDisconnectTimeoutInSeconds(disconnectTimeoutInSeconds); return this; } /** * <p> * The current state for the fleet. * </p> * * @param state * The current state for the fleet. * @see FleetState */ public void setState(String state) { this.state = state; } /** * <p> * The current state for the fleet. * </p> * * @return The current state for the fleet. * @see FleetState */ public String getState() { return this.state; } /** * <p> * The current state for the fleet. * </p> * * @param state * The current state for the fleet. * @return Returns a reference to this object so that method calls can be chained together. * @see FleetState */ public Fleet withState(String state) { setState(state); return this; } /** * <p> * The current state for the fleet. * </p> * * @param state * The current state for the fleet. * @see FleetState */ public void setState(FleetState state) { withState(state); } /** * <p> * The current state for the fleet. * </p> * * @param state * The current state for the fleet. * @return Returns a reference to this object so that method calls can be chained together. * @see FleetState */ public Fleet withState(FleetState state) { this.state = state.toString(); return this; } /** * <p> * The VPC configuration for the fleet. * </p> * * @param vpcConfig * The VPC configuration for the fleet. */ public void setVpcConfig(VpcConfig vpcConfig) { this.vpcConfig = vpcConfig; } /** * <p> * The VPC configuration for the fleet. * </p> * * @return The VPC configuration for the fleet. */ public VpcConfig getVpcConfig() { return this.vpcConfig; } /** * <p> * The VPC configuration for the fleet. * </p> * * @param vpcConfig * The VPC configuration for the fleet. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withVpcConfig(VpcConfig vpcConfig) { setVpcConfig(vpcConfig); return this; } /** * <p> * The time the fleet was created. * </p> * * @param createdTime * The time the fleet was created. */ public void setCreatedTime(java.util.Date createdTime) { this.createdTime = createdTime; } /** * <p> * The time the fleet was created. * </p> * * @return The time the fleet was created. */ public java.util.Date getCreatedTime() { return this.createdTime; } /** * <p> * The time the fleet was created. * </p> * * @param createdTime * The time the fleet was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withCreatedTime(java.util.Date createdTime) { setCreatedTime(createdTime); return this; } /** * <p> * The fleet errors. * </p> * * @return The fleet errors. */ public java.util.List<FleetError> getFleetErrors() { return fleetErrors; } /** * <p> * The fleet errors. * </p> * * @param fleetErrors * The fleet errors. */ public void setFleetErrors(java.util.Collection<FleetError> fleetErrors) { if (fleetErrors == null) { this.fleetErrors = null; return; } this.fleetErrors = new java.util.ArrayList<FleetError>(fleetErrors); } /** * <p> * The fleet errors. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setFleetErrors(java.util.Collection)} or {@link #withFleetErrors(java.util.Collection)} if you want to * override the existing values. * </p> * * @param fleetErrors * The fleet errors. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withFleetErrors(FleetError... fleetErrors) { if (this.fleetErrors == null) { setFleetErrors(new java.util.ArrayList<FleetError>(fleetErrors.length)); } for (FleetError ele : fleetErrors) { this.fleetErrors.add(ele); } return this; } /** * <p> * The fleet errors. * </p> * * @param fleetErrors * The fleet errors. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withFleetErrors(java.util.Collection<FleetError> fleetErrors) { setFleetErrors(fleetErrors); return this; } /** * <p> * Indicates whether default internet access is enabled for the fleet. * </p> * * @param enableDefaultInternetAccess * Indicates whether default internet access is enabled for the fleet. */ public void setEnableDefaultInternetAccess(Boolean enableDefaultInternetAccess) { this.enableDefaultInternetAccess = enableDefaultInternetAccess; } /** * <p> * Indicates whether default internet access is enabled for the fleet. * </p> * * @return Indicates whether default internet access is enabled for the fleet. */ public Boolean getEnableDefaultInternetAccess() { return this.enableDefaultInternetAccess; } /** * <p> * Indicates whether default internet access is enabled for the fleet. * </p> * * @param enableDefaultInternetAccess * Indicates whether default internet access is enabled for the fleet. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withEnableDefaultInternetAccess(Boolean enableDefaultInternetAccess) { setEnableDefaultInternetAccess(enableDefaultInternetAccess); return this; } /** * <p> * Indicates whether default internet access is enabled for the fleet. * </p> * * @return Indicates whether default internet access is enabled for the fleet. */ public Boolean isEnableDefaultInternetAccess() { return this.enableDefaultInternetAccess; } /** * <p> * The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active Directory * domain. * </p> * * @param domainJoinInfo * The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active * Directory domain. */ public void setDomainJoinInfo(DomainJoinInfo domainJoinInfo) { this.domainJoinInfo = domainJoinInfo; } /** * <p> * The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active Directory * domain. * </p> * * @return The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active * Directory domain. */ public DomainJoinInfo getDomainJoinInfo() { return this.domainJoinInfo; } /** * <p> * The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active Directory * domain. * </p> * * @param domainJoinInfo * The name of the directory and organizational unit (OU) to use to join the fleet to a Microsoft Active * Directory domain. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withDomainJoinInfo(DomainJoinInfo domainJoinInfo) { setDomainJoinInfo(domainJoinInfo); return this; } /** * <p> * The amount of time that users can be idle (inactive) before they are disconnected from their streaming session * and the <code>DisconnectTimeoutInSeconds</code> time interval begins. Users are notified before they are * disconnected due to inactivity. If users try to reconnect to the streaming session before the time interval * specified in <code>DisconnectTimeoutInSeconds</code> elapses, they are connected to their previous session. Users * are considered idle when they stop providing keyboard or mouse input during their streaming session. File uploads * and downloads, audio in, audio out, and pixels changing do not qualify as user activity. If users continue to be * idle after the time interval in <code>IdleDisconnectTimeoutInSeconds</code> elapses, they are disconnected. * </p> * <p> * To prevent users from being disconnected due to inactivity, specify a value of 0. Otherwise, specify a value * between 60 and 3600. The default value is 0. * </p> * <note> * <p> * If you enable this feature, we recommend that you specify a value that corresponds exactly to a whole number of * minutes (for example, 60, 120, and 180). If you don't do this, the value is rounded to the nearest minute. For * example, if you specify a value of 70, users are disconnected after 1 minute of inactivity. If you specify a * value that is at the midpoint between two different minutes, the value is rounded up. For example, if you specify * a value of 90, users are disconnected after 2 minutes of inactivity. * </p> * </note> * * @param idleDisconnectTimeoutInSeconds * The amount of time that users can be idle (inactive) before they are disconnected from their streaming * session and the <code>DisconnectTimeoutInSeconds</code> time interval begins. Users are notified before * they are disconnected due to inactivity. If users try to reconnect to the streaming session before the * time interval specified in <code>DisconnectTimeoutInSeconds</code> elapses, they are connected to their * previous session. Users are considered idle when they stop providing keyboard or mouse input during their * streaming session. File uploads and downloads, audio in, audio out, and pixels changing do not qualify as * user activity. If users continue to be idle after the time interval in * <code>IdleDisconnectTimeoutInSeconds</code> elapses, they are disconnected.</p> * <p> * To prevent users from being disconnected due to inactivity, specify a value of 0. Otherwise, specify a * value between 60 and 3600. The default value is 0. * </p> * <note> * <p> * If you enable this feature, we recommend that you specify a value that corresponds exactly to a whole * number of minutes (for example, 60, 120, and 180). If you don't do this, the value is rounded to the * nearest minute. For example, if you specify a value of 70, users are disconnected after 1 minute of * inactivity. If you specify a value that is at the midpoint between two different minutes, the value is * rounded up. For example, if you specify a value of 90, users are disconnected after 2 minutes of * inactivity. * </p> */ public void setIdleDisconnectTimeoutInSeconds(Integer idleDisconnectTimeoutInSeconds) { this.idleDisconnectTimeoutInSeconds = idleDisconnectTimeoutInSeconds; } /** * <p> * The amount of time that users can be idle (inactive) before they are disconnected from their streaming session * and the <code>DisconnectTimeoutInSeconds</code> time interval begins. Users are notified before they are * disconnected due to inactivity. If users try to reconnect to the streaming session before the time interval * specified in <code>DisconnectTimeoutInSeconds</code> elapses, they are connected to their previous session. Users * are considered idle when they stop providing keyboard or mouse input during their streaming session. File uploads * and downloads, audio in, audio out, and pixels changing do not qualify as user activity. If users continue to be * idle after the time interval in <code>IdleDisconnectTimeoutInSeconds</code> elapses, they are disconnected. * </p> * <p> * To prevent users from being disconnected due to inactivity, specify a value of 0. Otherwise, specify a value * between 60 and 3600. The default value is 0. * </p> * <note> * <p> * If you enable this feature, we recommend that you specify a value that corresponds exactly to a whole number of * minutes (for example, 60, 120, and 180). If you don't do this, the value is rounded to the nearest minute. For * example, if you specify a value of 70, users are disconnected after 1 minute of inactivity. If you specify a * value that is at the midpoint between two different minutes, the value is rounded up. For example, if you specify * a value of 90, users are disconnected after 2 minutes of inactivity. * </p> * </note> * * @return The amount of time that users can be idle (inactive) before they are disconnected from their streaming * session and the <code>DisconnectTimeoutInSeconds</code> time interval begins. Users are notified before * they are disconnected due to inactivity. If users try to reconnect to the streaming session before the * time interval specified in <code>DisconnectTimeoutInSeconds</code> elapses, they are connected to their * previous session. Users are considered idle when they stop providing keyboard or mouse input during their * streaming session. File uploads and downloads, audio in, audio out, and pixels changing do not qualify as * user activity. If users continue to be idle after the time interval in * <code>IdleDisconnectTimeoutInSeconds</code> elapses, they are disconnected.</p> * <p> * To prevent users from being disconnected due to inactivity, specify a value of 0. Otherwise, specify a * value between 60 and 3600. The default value is 0. * </p> * <note> * <p> * If you enable this feature, we recommend that you specify a value that corresponds exactly to a whole * number of minutes (for example, 60, 120, and 180). If you don't do this, the value is rounded to the * nearest minute. For example, if you specify a value of 70, users are disconnected after 1 minute of * inactivity. If you specify a value that is at the midpoint between two different minutes, the value is * rounded up. For example, if you specify a value of 90, users are disconnected after 2 minutes of * inactivity. * </p> */ public Integer getIdleDisconnectTimeoutInSeconds() { return this.idleDisconnectTimeoutInSeconds; } /** * <p> * The amount of time that users can be idle (inactive) before they are disconnected from their streaming session * and the <code>DisconnectTimeoutInSeconds</code> time interval begins. Users are notified before they are * disconnected due to inactivity. If users try to reconnect to the streaming session before the time interval * specified in <code>DisconnectTimeoutInSeconds</code> elapses, they are connected to their previous session. Users * are considered idle when they stop providing keyboard or mouse input during their streaming session. File uploads * and downloads, audio in, audio out, and pixels changing do not qualify as user activity. If users continue to be * idle after the time interval in <code>IdleDisconnectTimeoutInSeconds</code> elapses, they are disconnected. * </p> * <p> * To prevent users from being disconnected due to inactivity, specify a value of 0. Otherwise, specify a value * between 60 and 3600. The default value is 0. * </p> * <note> * <p> * If you enable this feature, we recommend that you specify a value that corresponds exactly to a whole number of * minutes (for example, 60, 120, and 180). If you don't do this, the value is rounded to the nearest minute. For * example, if you specify a value of 70, users are disconnected after 1 minute of inactivity. If you specify a * value that is at the midpoint between two different minutes, the value is rounded up. For example, if you specify * a value of 90, users are disconnected after 2 minutes of inactivity. * </p> * </note> * * @param idleDisconnectTimeoutInSeconds * The amount of time that users can be idle (inactive) before they are disconnected from their streaming * session and the <code>DisconnectTimeoutInSeconds</code> time interval begins. Users are notified before * they are disconnected due to inactivity. If users try to reconnect to the streaming session before the * time interval specified in <code>DisconnectTimeoutInSeconds</code> elapses, they are connected to their * previous session. Users are considered idle when they stop providing keyboard or mouse input during their * streaming session. File uploads and downloads, audio in, audio out, and pixels changing do not qualify as * user activity. If users continue to be idle after the time interval in * <code>IdleDisconnectTimeoutInSeconds</code> elapses, they are disconnected.</p> * <p> * To prevent users from being disconnected due to inactivity, specify a value of 0. Otherwise, specify a * value between 60 and 3600. The default value is 0. * </p> * <note> * <p> * If you enable this feature, we recommend that you specify a value that corresponds exactly to a whole * number of minutes (for example, 60, 120, and 180). If you don't do this, the value is rounded to the * nearest minute. For example, if you specify a value of 70, users are disconnected after 1 minute of * inactivity. If you specify a value that is at the midpoint between two different minutes, the value is * rounded up. For example, if you specify a value of 90, users are disconnected after 2 minutes of * inactivity. * </p> * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withIdleDisconnectTimeoutInSeconds(Integer idleDisconnectTimeoutInSeconds) { setIdleDisconnectTimeoutInSeconds(idleDisconnectTimeoutInSeconds); return this; } /** * <p> * The ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the AWS Security * Token Service (STS) <code>AssumeRole</code> API operation and passes the ARN of the role to use. The operation * creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary credentials and creates * the <b>appstream_machine_role</b> credential profile on the instance. * </p> * <p> * For more information, see <a href= * "https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html" * >Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming * Instances</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>. * </p> * * @param iamRoleArn * The ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the AWS * Security Token Service (STS) <code>AssumeRole</code> API operation and passes the ARN of the role to use. * The operation creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary * credentials and creates the <b>appstream_machine_role</b> credential profile on the instance.</p> * <p> * For more information, see <a href= * "https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html" * >Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming * Instances</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>. */ public void setIamRoleArn(String iamRoleArn) { this.iamRoleArn = iamRoleArn; } /** * <p> * The ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the AWS Security * Token Service (STS) <code>AssumeRole</code> API operation and passes the ARN of the role to use. The operation * creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary credentials and creates * the <b>appstream_machine_role</b> credential profile on the instance. * </p> * <p> * For more information, see <a href= * "https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html" * >Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming * Instances</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>. * </p> * * @return The ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the AWS * Security Token Service (STS) <code>AssumeRole</code> API operation and passes the ARN of the role to use. * The operation creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary * credentials and creates the <b>appstream_machine_role</b> credential profile on the instance.</p> * <p> * For more information, see <a href= * "https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html" * >Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming * Instances</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>. */ public String getIamRoleArn() { return this.iamRoleArn; } /** * <p> * The ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the AWS Security * Token Service (STS) <code>AssumeRole</code> API operation and passes the ARN of the role to use. The operation * creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary credentials and creates * the <b>appstream_machine_role</b> credential profile on the instance. * </p> * <p> * For more information, see <a href= * "https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html" * >Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming * Instances</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>. * </p> * * @param iamRoleArn * The ARN of the IAM role that is applied to the fleet. To assume a role, the fleet instance calls the AWS * Security Token Service (STS) <code>AssumeRole</code> API operation and passes the ARN of the role to use. * The operation creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary * credentials and creates the <b>appstream_machine_role</b> credential profile on the instance.</p> * <p> * For more information, see <a href= * "https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html" * >Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming * Instances</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>. * @return Returns a reference to this object so that method calls can be chained together. */ public Fleet withIamRoleArn(String iamRoleArn) { setIamRoleArn(iamRoleArn); return this; } /** * <p> * The AppStream 2.0 view that is displayed to your users when they stream from the fleet. When <code>APP</code> is * specified, only the windows of applications opened by users display. When <code>DESKTOP</code> is specified, the * standard desktop that is provided by the operating system displays. * </p> * <p> * The default value is <code>APP</code>. * </p> * * @param streamView * The AppStream 2.0 view that is displayed to your users when they stream from the fleet. When * <code>APP</code> is specified, only the windows of applications opened by users display. When * <code>DESKTOP</code> is specified, the standard desktop that is provided by the operating system * displays.</p> * <p> * The default value is <code>APP</code>. * @see StreamView */ public void setStreamView(String streamView) { this.streamView = streamView; } /** * <p> * The AppStream 2.0 view that is displayed to your users when they stream from the fleet. When <code>APP</code> is * specified, only the windows of applications opened by users display. When <code>DESKTOP</code> is specified, the * standard desktop that is provided by the operating system displays. * </p> * <p> * The default value is <code>APP</code>. * </p> * * @return The AppStream 2.0 view that is displayed to your users when they stream from the fleet. When * <code>APP</code> is specified, only the windows of applications opened by users display. When * <code>DESKTOP</code> is specified, the standard desktop that is provided by the operating system * displays.</p> * <p> * The default value is <code>APP</code>. * @see StreamView */ public String getStreamView() { return this.streamView; } /** * <p> * The AppStream 2.0 view that is displayed to your users when they stream from the fleet. When <code>APP</code> is * specified, only the windows of applications opened by users display. When <code>DESKTOP</code> is specified, the * standard desktop that is provided by the operating system displays. * </p> * <p> * The default value is <code>APP</code>. * </p> * * @param streamView * The AppStream 2.0 view that is displayed to your users when they stream from the fleet. When * <code>APP</code> is specified, only the windows of applications opened by users display. When * <code>DESKTOP</code> is specified, the standard desktop that is provided by the operating system * displays.</p> * <p> * The default value is <code>APP</code>. * @return Returns a reference to this object so that method calls can be chained together. * @see StreamView */ public Fleet withStreamView(String streamView) { setStreamView(streamView); return this; } /** * <p> * The AppStream 2.0 view that is displayed to your users when they stream from the fleet. When <code>APP</code> is * specified, only the windows of applications opened by users display. When <code>DESKTOP</code> is specified, the * standard desktop that is provided by the operating system displays. * </p> * <p> * The default value is <code>APP</code>. * </p> * * @param streamView * The AppStream 2.0 view that is displayed to your users when they stream from the fleet. When * <code>APP</code> is specified, only the windows of applications opened by users display. When * <code>DESKTOP</code> is specified, the standard desktop that is provided by the operating system * displays.</p> * <p> * The default value is <code>APP</code>. * @see StreamView */ public void setStreamView(StreamView streamView) { withStreamView(streamView); } /** * <p> * The AppStream 2.0 view that is displayed to your users when they stream from the fleet. When <code>APP</code> is * specified, only the windows of applications opened by users display. When <code>DESKTOP</code> is specified, the * standard desktop that is provided by the operating system displays. * </p> * <p> * The default value is <code>APP</code>. * </p> * * @param streamView * The AppStream 2.0 view that is displayed to your users when they stream from the fleet. When * <code>APP</code> is specified, only the windows of applications opened by users display. When * <code>DESKTOP</code> is specified, the standard desktop that is provided by the operating system * displays.</p> * <p> * The default value is <code>APP</code>. * @return Returns a reference to this object so that method calls can be chained together. * @see StreamView */ public Fleet withStreamView(StreamView streamView) { this.streamView = streamView.toString(); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDisplayName() != null) sb.append("DisplayName: ").append(getDisplayName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getImageName() != null) sb.append("ImageName: ").append(getImageName()).append(","); if (getImageArn() != null) sb.append("ImageArn: ").append(getImageArn()).append(","); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getFleetType() != null) sb.append("FleetType: ").append(getFleetType()).append(","); if (getComputeCapacityStatus() != null) sb.append("ComputeCapacityStatus: ").append(getComputeCapacityStatus()).append(","); if (getMaxUserDurationInSeconds() != null) sb.append("MaxUserDurationInSeconds: ").append(getMaxUserDurationInSeconds()).append(","); if (getDisconnectTimeoutInSeconds() != null) sb.append("DisconnectTimeoutInSeconds: ").append(getDisconnectTimeoutInSeconds()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getVpcConfig() != null) sb.append("VpcConfig: ").append(getVpcConfig()).append(","); if (getCreatedTime() != null) sb.append("CreatedTime: ").append(getCreatedTime()).append(","); if (getFleetErrors() != null) sb.append("FleetErrors: ").append(getFleetErrors()).append(","); if (getEnableDefaultInternetAccess() != null) sb.append("EnableDefaultInternetAccess: ").append(getEnableDefaultInternetAccess()).append(","); if (getDomainJoinInfo() != null) sb.append("DomainJoinInfo: ").append(getDomainJoinInfo()).append(","); if (getIdleDisconnectTimeoutInSeconds() != null) sb.append("IdleDisconnectTimeoutInSeconds: ").append(getIdleDisconnectTimeoutInSeconds()).append(","); if (getIamRoleArn() != null) sb.append("IamRoleArn: ").append(getIamRoleArn()).append(","); if (getStreamView() != null) sb.append("StreamView: ").append(getStreamView()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Fleet == false) return false; Fleet other = (Fleet) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDisplayName() == null ^ this.getDisplayName() == null) return false; if (other.getDisplayName() != null && other.getDisplayName().equals(this.getDisplayName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getImageName() == null ^ this.getImageName() == null) return false; if (other.getImageName() != null && other.getImageName().equals(this.getImageName()) == false) return false; if (other.getImageArn() == null ^ this.getImageArn() == null) return false; if (other.getImageArn() != null && other.getImageArn().equals(this.getImageArn()) == false) return false; if (other.getInstanceType() == null ^ this.getInstanceType() == null) return false; if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false) return false; if (other.getFleetType() == null ^ this.getFleetType() == null) return false; if (other.getFleetType() != null && other.getFleetType().equals(this.getFleetType()) == false) return false; if (other.getComputeCapacityStatus() == null ^ this.getComputeCapacityStatus() == null) return false; if (other.getComputeCapacityStatus() != null && other.getComputeCapacityStatus().equals(this.getComputeCapacityStatus()) == false) return false; if (other.getMaxUserDurationInSeconds() == null ^ this.getMaxUserDurationInSeconds() == null) return false; if (other.getMaxUserDurationInSeconds() != null && other.getMaxUserDurationInSeconds().equals(this.getMaxUserDurationInSeconds()) == false) return false; if (other.getDisconnectTimeoutInSeconds() == null ^ this.getDisconnectTimeoutInSeconds() == null) return false; if (other.getDisconnectTimeoutInSeconds() != null && other.getDisconnectTimeoutInSeconds().equals(this.getDisconnectTimeoutInSeconds()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getVpcConfig() == null ^ this.getVpcConfig() == null) return false; if (other.getVpcConfig() != null && other.getVpcConfig().equals(this.getVpcConfig()) == false) return false; if (other.getCreatedTime() == null ^ this.getCreatedTime() == null) return false; if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false) return false; if (other.getFleetErrors() == null ^ this.getFleetErrors() == null) return false; if (other.getFleetErrors() != null && other.getFleetErrors().equals(this.getFleetErrors()) == false) return false; if (other.getEnableDefaultInternetAccess() == null ^ this.getEnableDefaultInternetAccess() == null) return false; if (other.getEnableDefaultInternetAccess() != null && other.getEnableDefaultInternetAccess().equals(this.getEnableDefaultInternetAccess()) == false) return false; if (other.getDomainJoinInfo() == null ^ this.getDomainJoinInfo() == null) return false; if (other.getDomainJoinInfo() != null && other.getDomainJoinInfo().equals(this.getDomainJoinInfo()) == false) return false; if (other.getIdleDisconnectTimeoutInSeconds() == null ^ this.getIdleDisconnectTimeoutInSeconds() == null) return false; if (other.getIdleDisconnectTimeoutInSeconds() != null && other.getIdleDisconnectTimeoutInSeconds().equals(this.getIdleDisconnectTimeoutInSeconds()) == false) return false; if (other.getIamRoleArn() == null ^ this.getIamRoleArn() == null) return false; if (other.getIamRoleArn() != null && other.getIamRoleArn().equals(this.getIamRoleArn()) == false) return false; if (other.getStreamView() == null ^ this.getStreamView() == null) return false; if (other.getStreamView() != null && other.getStreamView().equals(this.getStreamView()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDisplayName() == null) ? 0 : getDisplayName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getImageName() == null) ? 0 : getImageName().hashCode()); hashCode = prime * hashCode + ((getImageArn() == null) ? 0 : getImageArn().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getFleetType() == null) ? 0 : getFleetType().hashCode()); hashCode = prime * hashCode + ((getComputeCapacityStatus() == null) ? 0 : getComputeCapacityStatus().hashCode()); hashCode = prime * hashCode + ((getMaxUserDurationInSeconds() == null) ? 0 : getMaxUserDurationInSeconds().hashCode()); hashCode = prime * hashCode + ((getDisconnectTimeoutInSeconds() == null) ? 0 : getDisconnectTimeoutInSeconds().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getVpcConfig() == null) ? 0 : getVpcConfig().hashCode()); hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); hashCode = prime * hashCode + ((getFleetErrors() == null) ? 0 : getFleetErrors().hashCode()); hashCode = prime * hashCode + ((getEnableDefaultInternetAccess() == null) ? 0 : getEnableDefaultInternetAccess().hashCode()); hashCode = prime * hashCode + ((getDomainJoinInfo() == null) ? 0 : getDomainJoinInfo().hashCode()); hashCode = prime * hashCode + ((getIdleDisconnectTimeoutInSeconds() == null) ? 0 : getIdleDisconnectTimeoutInSeconds().hashCode()); hashCode = prime * hashCode + ((getIamRoleArn() == null) ? 0 : getIamRoleArn().hashCode()); hashCode = prime * hashCode + ((getStreamView() == null) ? 0 : getStreamView().hashCode()); return hashCode; } @Override public Fleet clone() { try { return (Fleet) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.appstream.model.transform.FleetMarshaller.getInstance().marshall(this, protocolMarshaller); } }
[ "" ]
145db08e3f14d3a9c66a55edc6f0003810bd8b52
d1a6c455d5a7e73f2600ede97887a319bb610f28
/src/main/java/br/leandro/prova/service/CadastroTituloService.java
41acd2adceeea859997ef547e582c3f5ffcaa303
[]
no_license
leandrogneis/CrudSpringBoot
641c4137339424aa128cc96e2a91d873fa9b658d
b96428495347cf1dbe9bb4820db7a8b90410487f
refs/heads/master
2021-05-15T23:05:07.175626
2017-10-14T00:10:06
2017-10-14T00:10:06
106,884,097
0
1
null
null
null
null
UTF-8
Java
false
false
1,160
java
package br.leandro.prova.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataIntegrityViolationException; import org.springframework.stereotype.Service; import br.leandro.prova.model.StatusTitulo; import br.leandro.prova.model.Titulo; import br.leandro.prova.repository.Titulos; import br.leandro.prova.repository.filter.TituloFilter; @Service public class CadastroTituloService { @Autowired private Titulos titulos; public void salvar(Titulo titulo) { try { titulos.save(titulo); } catch (DataIntegrityViolationException e) { throw new IllegalArgumentException("Formato de data inválido"); } } public void excluir(Long codigo) { titulos.delete(codigo); } public String receber(Long codigo) { Titulo titulo = titulos.findOne(codigo); titulo.setStatus(StatusTitulo.RECEBIDO); titulos.save(titulo); return StatusTitulo.RECEBIDO.getDescricao(); } public List<Titulo> filtrar(TituloFilter filtro) { String descricao = filtro.getDescricao() == null ? "%" : filtro.getDescricao(); return titulos.findByDescricaoContaining(descricao); } }
[ "lgn200@gmail.com" ]
lgn200@gmail.com
b6819fe748b1b4a5baf171923ca33499c4e0c338
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-58b-10-11-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/optimization/fitting/CurveFitter_ESTest.java
da32033309f9d2ab59aabbe9e2e3fa855e333ebf
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
573
java
/* * This file was automatically generated by EvoSuite * Sat Apr 04 08:14:03 UTC 2020 */ package org.apache.commons.math.optimization.fitting; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class CurveFitter_ESTest extends CurveFitter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
5deadacc9db0a4e716eab934ded6c891940c59e7
457659447b33f479698398336ee955f2291a8361
/de.grammarcraft.csflow/src-gen/de/grammarcraft/csflow/flow/impl/FlowPackageImpl.java
a0ca686d0c4424f8df23004e13196d7df9dcb275
[]
no_license
kuniss/FlowEclipsePlugins
71b865768b776ebc05ac76ed93c0a78ed6e7e00d
9b42f96b7cb088683efdbfa5939e18907e476040
refs/heads/master
2021-01-10T19:38:59.779944
2012-10-22T08:29:13
2012-10-22T08:29:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
31,735
java
/** * <copyright> * </copyright> * */ package de.grammarcraft.csflow.flow.impl; import de.grammarcraft.csflow.flow.CSTypeParameter; import de.grammarcraft.csflow.flow.ClassOperation; import de.grammarcraft.csflow.flow.EbcOperation; import de.grammarcraft.csflow.flow.Flow; import de.grammarcraft.csflow.flow.FlowFactory; import de.grammarcraft.csflow.flow.FlowPackage; import de.grammarcraft.csflow.flow.FunctionUnit; import de.grammarcraft.csflow.flow.GenericType; import de.grammarcraft.csflow.flow.GlobalInputPort; import de.grammarcraft.csflow.flow.GlobalOutputPort; import de.grammarcraft.csflow.flow.Import; import de.grammarcraft.csflow.flow.LeftPort; import de.grammarcraft.csflow.flow.MethodOperation; import de.grammarcraft.csflow.flow.Model; import de.grammarcraft.csflow.flow.NamedPort; import de.grammarcraft.csflow.flow.NativeClass; import de.grammarcraft.csflow.flow.NativeMethod; import de.grammarcraft.csflow.flow.Operation; import de.grammarcraft.csflow.flow.OperationType; import de.grammarcraft.csflow.flow.OperationTypeParameters; import de.grammarcraft.csflow.flow.Port; import de.grammarcraft.csflow.flow.RightPort; import de.grammarcraft.csflow.flow.Signature; import de.grammarcraft.csflow.flow.Stream; import de.grammarcraft.csflow.flow.Type; import de.grammarcraft.csflow.flow.TypeParameter; import de.grammarcraft.csflow.flow.UnnamedSubFlowPort; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.impl.EPackageImpl; /** * <!-- begin-user-doc --> * An implementation of the model <b>Package</b>. * <!-- end-user-doc --> * @generated */ public class FlowPackageImpl extends EPackageImpl implements FlowPackage { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass modelEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass functionUnitEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass importEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass flowEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass streamEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass leftPortEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass globalInputPortEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass unnamedSubFlowPortEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass rightPortEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass globalOutputPortEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass portEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass namedPortEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass operationEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass ebcOperationEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass nativeClassEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass classOperationEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass methodOperationEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass signatureEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass genericTypeEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass operationTypeEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass operationTypeParametersEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass typeParameterEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass csTypeParameterEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass typeEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass nativeMethodEClass = null; /** * Creates an instance of the model <b>Package</b>, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package * package URI value. * <p>Note: the correct way to create the package is via the static * factory method {@link #init init()}, which also performs * initialization of the package, or returns the registered package, * if one already exists. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see org.eclipse.emf.ecore.EPackage.Registry * @see de.grammarcraft.csflow.flow.FlowPackage#eNS_URI * @see #init() * @generated */ private FlowPackageImpl() { super(eNS_URI, FlowFactory.eINSTANCE); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static boolean isInited = false; /** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link FlowPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static FlowPackage init() { if (isInited) return (FlowPackage)EPackage.Registry.INSTANCE.getEPackage(FlowPackage.eNS_URI); // Obtain or create and register package FlowPackageImpl theFlowPackage = (FlowPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FlowPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FlowPackageImpl()); isInited = true; // Create package meta-data objects theFlowPackage.createPackageContents(); // Initialize created meta-data theFlowPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theFlowPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(FlowPackage.eNS_URI, theFlowPackage); return theFlowPackage; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getModel() { return modelEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getModel_Name() { return (EAttribute)modelEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getModel_Imports() { return (EReference)modelEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getModel_FunctionUnits() { return (EReference)modelEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getFunctionUnit() { return functionUnitEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getFunctionUnit_Name() { return (EAttribute)functionUnitEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getImport() { return importEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getImport_ImportedNamespace() { return (EAttribute)importEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getFlow() { return flowEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getFlow_Streams() { return (EReference)flowEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getStream() { return streamEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getStream_LeftPort() { return (EReference)streamEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getStream_Message() { return (EAttribute)streamEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getStream_RightPort() { return (EReference)streamEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getLeftPort() { return leftPortEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getGlobalInputPort() { return globalInputPortEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getUnnamedSubFlowPort() { return unnamedSubFlowPortEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getRightPort() { return rightPortEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getGlobalOutputPort() { return globalOutputPortEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getPort() { return portEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getPort_FunctionUnit() { return (EReference)portEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getPort_Port() { return (EReference)portEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getNamedPort() { return namedPortEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getNamedPort_Name() { return (EAttribute)namedPortEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getOperation() { return operationEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getOperation_Class() { return (EReference)operationEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getEbcOperation() { return ebcOperationEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getNativeClass() { return nativeClassEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getNativeClass_Reference() { return (EAttribute)nativeClassEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getClassOperation() { return classOperationEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getMethodOperation() { return methodOperationEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getMethodOperation_Method() { return (EReference)methodOperationEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getMethodOperation_Signature() { return (EReference)methodOperationEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getSignature() { return signatureEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getSignature_Type() { return (EReference)signatureEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getGenericType() { return genericTypeEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getGenericType_OperationType() { return (EReference)genericTypeEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getGenericType_OperationTypeParameters() { return (EReference)genericTypeEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getOperationType() { return operationTypeEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getOperationType_Name() { return (EAttribute)operationTypeEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getOperationTypeParameters() { return operationTypeParametersEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getOperationTypeParameters_TypeParameter() { return (EReference)operationTypeParametersEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getOperationTypeParameters_TypeParameters() { return (EReference)operationTypeParametersEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getTypeParameter() { return typeParameterEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getCSTypeParameter() { return csTypeParameterEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getCSTypeParameter_TypeParameter() { return (EReference)csTypeParameterEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getType() { return typeEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getType_Reference() { return (EAttribute)typeEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getNativeMethod() { return nativeMethodEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getNativeMethod_Name() { return (EAttribute)nativeMethodEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public FlowFactory getFlowFactory() { return (FlowFactory)getEFactoryInstance(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private boolean isCreated = false; /** * Creates the meta-model objects for the package. This method is * guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features modelEClass = createEClass(MODEL); createEAttribute(modelEClass, MODEL__NAME); createEReference(modelEClass, MODEL__IMPORTS); createEReference(modelEClass, MODEL__FUNCTION_UNITS); functionUnitEClass = createEClass(FUNCTION_UNIT); createEAttribute(functionUnitEClass, FUNCTION_UNIT__NAME); importEClass = createEClass(IMPORT); createEAttribute(importEClass, IMPORT__IMPORTED_NAMESPACE); flowEClass = createEClass(FLOW); createEReference(flowEClass, FLOW__STREAMS); streamEClass = createEClass(STREAM); createEReference(streamEClass, STREAM__LEFT_PORT); createEAttribute(streamEClass, STREAM__MESSAGE); createEReference(streamEClass, STREAM__RIGHT_PORT); leftPortEClass = createEClass(LEFT_PORT); globalInputPortEClass = createEClass(GLOBAL_INPUT_PORT); unnamedSubFlowPortEClass = createEClass(UNNAMED_SUB_FLOW_PORT); rightPortEClass = createEClass(RIGHT_PORT); globalOutputPortEClass = createEClass(GLOBAL_OUTPUT_PORT); portEClass = createEClass(PORT); createEReference(portEClass, PORT__FUNCTION_UNIT); createEReference(portEClass, PORT__PORT); namedPortEClass = createEClass(NAMED_PORT); createEAttribute(namedPortEClass, NAMED_PORT__NAME); operationEClass = createEClass(OPERATION); createEReference(operationEClass, OPERATION__CLASS); ebcOperationEClass = createEClass(EBC_OPERATION); nativeClassEClass = createEClass(NATIVE_CLASS); createEAttribute(nativeClassEClass, NATIVE_CLASS__REFERENCE); classOperationEClass = createEClass(CLASS_OPERATION); methodOperationEClass = createEClass(METHOD_OPERATION); createEReference(methodOperationEClass, METHOD_OPERATION__METHOD); createEReference(methodOperationEClass, METHOD_OPERATION__SIGNATURE); signatureEClass = createEClass(SIGNATURE); createEReference(signatureEClass, SIGNATURE__TYPE); genericTypeEClass = createEClass(GENERIC_TYPE); createEReference(genericTypeEClass, GENERIC_TYPE__OPERATION_TYPE); createEReference(genericTypeEClass, GENERIC_TYPE__OPERATION_TYPE_PARAMETERS); operationTypeEClass = createEClass(OPERATION_TYPE); createEAttribute(operationTypeEClass, OPERATION_TYPE__NAME); operationTypeParametersEClass = createEClass(OPERATION_TYPE_PARAMETERS); createEReference(operationTypeParametersEClass, OPERATION_TYPE_PARAMETERS__TYPE_PARAMETER); createEReference(operationTypeParametersEClass, OPERATION_TYPE_PARAMETERS__TYPE_PARAMETERS); typeParameterEClass = createEClass(TYPE_PARAMETER); csTypeParameterEClass = createEClass(CS_TYPE_PARAMETER); createEReference(csTypeParameterEClass, CS_TYPE_PARAMETER__TYPE_PARAMETER); typeEClass = createEClass(TYPE); createEAttribute(typeEClass, TYPE__REFERENCE); nativeMethodEClass = createEClass(NATIVE_METHOD); createEAttribute(nativeMethodEClass, NATIVE_METHOD__NAME); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private boolean isInitialized = false; /** * Complete the initialization of the package and its meta-model. This * method is guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void initializePackageContents() { if (isInitialized) return; isInitialized = true; // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); // Create type parameters // Set bounds for type parameters // Add supertypes to classes flowEClass.getESuperTypes().add(this.getFunctionUnit()); globalInputPortEClass.getESuperTypes().add(this.getLeftPort()); unnamedSubFlowPortEClass.getESuperTypes().add(this.getLeftPort()); unnamedSubFlowPortEClass.getESuperTypes().add(this.getRightPort()); globalOutputPortEClass.getESuperTypes().add(this.getRightPort()); portEClass.getESuperTypes().add(this.getLeftPort()); portEClass.getESuperTypes().add(this.getRightPort()); operationEClass.getESuperTypes().add(this.getFunctionUnit()); ebcOperationEClass.getESuperTypes().add(this.getOperation()); classOperationEClass.getESuperTypes().add(this.getOperation()); methodOperationEClass.getESuperTypes().add(this.getOperation()); genericTypeEClass.getESuperTypes().add(this.getTypeParameter()); typeEClass.getESuperTypes().add(this.getTypeParameter()); // Initialize classes and features; add operations and parameters initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getModel_Name(), ecorePackage.getEString(), "name", null, 0, 1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getModel_Imports(), this.getImport(), null, "imports", null, 0, -1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getModel_FunctionUnits(), this.getFunctionUnit(), null, "functionUnits", null, 0, -1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(functionUnitEClass, FunctionUnit.class, "FunctionUnit", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getFunctionUnit_Name(), ecorePackage.getEString(), "name", null, 0, 1, FunctionUnit.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(importEClass, Import.class, "Import", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getImport_ImportedNamespace(), ecorePackage.getEString(), "importedNamespace", null, 0, 1, Import.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(flowEClass, Flow.class, "Flow", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getFlow_Streams(), this.getStream(), null, "streams", null, 0, -1, Flow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(streamEClass, Stream.class, "Stream", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getStream_LeftPort(), this.getLeftPort(), null, "leftPort", null, 0, 1, Stream.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getStream_Message(), ecorePackage.getEString(), "message", null, 0, 1, Stream.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getStream_RightPort(), this.getRightPort(), null, "rightPort", null, 0, 1, Stream.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(leftPortEClass, LeftPort.class, "LeftPort", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(globalInputPortEClass, GlobalInputPort.class, "GlobalInputPort", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(unnamedSubFlowPortEClass, UnnamedSubFlowPort.class, "UnnamedSubFlowPort", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(rightPortEClass, RightPort.class, "RightPort", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(globalOutputPortEClass, GlobalOutputPort.class, "GlobalOutputPort", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(portEClass, Port.class, "Port", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getPort_FunctionUnit(), this.getFunctionUnit(), null, "functionUnit", null, 0, 1, Port.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getPort_Port(), this.getNamedPort(), null, "port", null, 0, 1, Port.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(namedPortEClass, NamedPort.class, "NamedPort", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getNamedPort_Name(), ecorePackage.getEString(), "name", null, 0, 1, NamedPort.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(operationEClass, Operation.class, "Operation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getOperation_Class(), this.getNativeClass(), null, "class", null, 0, 1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(ebcOperationEClass, EbcOperation.class, "EbcOperation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(nativeClassEClass, NativeClass.class, "NativeClass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getNativeClass_Reference(), ecorePackage.getEString(), "reference", null, 0, 1, NativeClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(classOperationEClass, ClassOperation.class, "ClassOperation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(methodOperationEClass, MethodOperation.class, "MethodOperation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getMethodOperation_Method(), this.getNativeMethod(), null, "method", null, 0, 1, MethodOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getMethodOperation_Signature(), this.getSignature(), null, "signature", null, 0, 1, MethodOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(signatureEClass, Signature.class, "Signature", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getSignature_Type(), this.getGenericType(), null, "type", null, 0, 1, Signature.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(genericTypeEClass, GenericType.class, "GenericType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getGenericType_OperationType(), this.getOperationType(), null, "operationType", null, 0, 1, GenericType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getGenericType_OperationTypeParameters(), this.getOperationTypeParameters(), null, "operationTypeParameters", null, 0, 1, GenericType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(operationTypeEClass, OperationType.class, "OperationType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getOperationType_Name(), ecorePackage.getEString(), "name", null, 0, 1, OperationType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(operationTypeParametersEClass, OperationTypeParameters.class, "OperationTypeParameters", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getOperationTypeParameters_TypeParameter(), this.getTypeParameter(), null, "typeParameter", null, 0, 1, OperationTypeParameters.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getOperationTypeParameters_TypeParameters(), this.getCSTypeParameter(), null, "typeParameters", null, 0, -1, OperationTypeParameters.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(typeParameterEClass, TypeParameter.class, "TypeParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(csTypeParameterEClass, CSTypeParameter.class, "CSTypeParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getCSTypeParameter_TypeParameter(), this.getTypeParameter(), null, "typeParameter", null, 0, 1, CSTypeParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(typeEClass, Type.class, "Type", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getType_Reference(), ecorePackage.getEString(), "reference", null, 0, 1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(nativeMethodEClass, NativeMethod.class, "NativeMethod", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getNativeMethod_Name(), ecorePackage.getEString(), "name", null, 0, 1, NativeMethod.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Create resource createResource(eNS_URI); } } //FlowPackageImpl
[ "kuniss@grammarcraft.de" ]
kuniss@grammarcraft.de
221221c4e9d15e1769b6500965a595b4254704a4
2febde2f6eea434f7bfc443a04c3bc42878a510d
/src/es/uma/SSL/Ayuda.java
c52eab39327e10e56b48202b876f7e2ea697fcb8
[]
no_license
drando/desSonido
c00f4d252985fce849780603b54e531a04267dd0
ee91d96f51ca040a1d061839852c7eb84ba8502b
refs/heads/master
2021-01-19T15:27:18.119734
2014-01-21T11:31:00
2014-01-21T11:31:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,466
java
package es.uma.SSL; import android.app.Activity; import android.os.Bundle; import android.text.method.ScrollingMovementMethod; import android.widget.TextView; public class Ayuda extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.layayuda); // TODO Auto-generated method stub TextView instrucc = (TextView) findViewById(R.id.instrucciones); instrucc.setMovementMethod(new ScrollingMovementMethod()); instrucc.setText("INFORMACION DE LA PRACTICA\n\n" + "El objetivo es poder grabar un fichero de sonido .mp4, poder reproducirlo desde la " + "aplicación y poder cifrarlo y descifrarlo. El programa generará nombres del tipo " + "cifra[numero].mp4 dependiendo si el nombre ya está en uso, y guardará todos los cambios" + " en la tarjeta SD. Podemos usar cualquier otro nombre que queramos. Podremos reproducir/parar el fichero desde el boton play/stop y podremos" + " grabarlo desde el boton grabar. \n\n" + "Una vez cifrado un fichero, se generará el mismo con formato nombre_cifrado.mp4. Para descifrarlo " + "es necesario un fichero con este formato de nombre. Tras el descifrado generará otro llamado nombre_descifrado.mp4\n\n" + "Podemos copiar la clave para descifrar un fichero en cualquier momento."); } }
[ "david@davidrando.com" ]
david@davidrando.com
045b575416b190c8a2177080d6f5e083f65d3968
f6705883355d2007dbe88254137fcba7be60b91d
/src/az/soak/ConnectionHandler.java
fdd4ac27d8ee7051e201fac26671c0479e95d74d
[]
no_license
azawadzki/soak
f811174ffb1e26c0b7a45c8a52e29f4aec1f97b9
1ee65c3069e88feab464d92becb1dbde33169325
refs/heads/master
2020-06-08T20:38:31.896204
2012-02-13T21:50:18
2012-02-13T21:50:18
42,065,716
0
0
null
null
null
null
UTF-8
Java
false
false
3,500
java
/******************************************************************************* * Copyright (c) 2012, Andrzej Zawadzki (azawadzki@gmail.com) * * soak is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * soak is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with soak; if not, see <http ://www.gnu.org/licenses/>. ******************************************************************************/ package az.soak; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.net.Authenticator; import java.net.PasswordAuthentication; import java.net.URL; import java.util.Scanner; import javax.net.ssl.HttpsURLConnection; /** ConnectionHandler objects are used to access SpiderOak server and retrieve data in uniform manner. * The handler uses HTTP-based authentication, cookie-based access is not supported. */ public class ConnectionHandler { // number of times this class will retry connecting SpiderOak servers in case errors. final static int MAX_RETRY_NUMBER = 5; public ConnectionHandler(AccountInfo accountInfo) { mAccountInfo = accountInfo; System.setProperty("http.maxRedirects", Integer.toString(MAX_RETRY_NUMBER)); Authenticator.setDefault(new Auth()); } private class Auth extends Authenticator { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(mAccountInfo.getUserName(), mAccountInfo.getPassword().toCharArray()); } } /** Perform HTTP request of given type with submitted url. * @param url URL which the request will access. * @param method Type of request: POST, GET. * @return Upon completion the method returns data retrieved from the server. * @throws IOException Thrown if network error occurred or bad method type was used. * @throws BadLoginException Thrown in case of login/user name mismatch. */ public String performRequest(String url, String method) throws BadLoginException, IOException { URL u = new URL(url); HttpsURLConnection conn = (HttpsURLConnection) u.openConnection(); try { conn.setRequestMethod(method); if (conn.getResponseCode() == HttpsURLConnection.HTTP_UNAUTHORIZED) { throw new BadLoginException(); } return new Scanner(conn.getInputStream()).useDelimiter("\\A").next(); } finally { conn.disconnect(); } } /** Get InputStream object which gives access to data designated by URL. * @param url Address of object to retrieve * @return Stream which gives access to data designated by URL * @throws IOException Thrown if network error occurred. * @throws BadLoginException Thrown in case of login/user name mismatch. */ public InputStream getDownloadStream(String url) throws IOException, BadLoginException { URL u = new URL(url); HttpsURLConnection conn = (HttpsURLConnection) u.openConnection(); conn.connect(); if (conn.getResponseCode() == HttpsURLConnection.HTTP_UNAUTHORIZED) { throw new BadLoginException(); } return new BufferedInputStream(conn.getInputStream()); } AccountInfo mAccountInfo; }
[ "azawadzki@gmail.com" ]
azawadzki@gmail.com
78f5e1935d5825ae52565fb98f2ff2813e0aa844
dac4a710849a6c8976740a47c8e7edf263c7e1b6
/src/controllers/IndexServlet.java
e9ab432430b46ae95332f7ed83c663920df307f1
[]
no_license
strawberry39/kadai-tasklist-
09774b78e403357b8b34221a6eab0f38e4d73895
db36cd97f2ed9e62e2146d497754d9c16ff726c4
refs/heads/master
2020-04-25T18:52:21.541972
2019-02-27T22:18:05
2019-02-27T22:18:05
172,999,240
0
0
null
null
null
null
UTF-8
Java
false
false
2,084
java
package controllers; import java.io.IOException; import java.util.List; import javax.persistence.EntityManager; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import models.Task; import utils.DBUtil; /** * Servlet implementation class IndexServlet */ @WebServlet("/index") public class IndexServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public IndexServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { EntityManager em = DBUtil.createEntityManager(); int page = 1; try { page = Integer.parseInt(request.getParameter("page")); } catch(NumberFormatException e) {} List<Task> tasks = em.createNamedQuery("getAllTasks", Task.class) .setFirstResult(15 * (page - 1)) .setMaxResults(15) .getResultList(); long tasks_count = (long)em.createNamedQuery("getTasksCount", Long.class) .getSingleResult(); em.close(); request.setAttribute("tasks", tasks); request.setAttribute("tasks_count", tasks_count); request.setAttribute("page", page); if(request.getSession().getAttribute("flush") != null) { request.setAttribute("flush", request.getSession().getAttribute("flush")); request.getSession().removeAttribute("flush"); } RequestDispatcher rd = request.getRequestDispatcher("/WEB-INF/views/tasks/index.jsp"); rd.forward(request, response); } }
[ "miyukiomaron@gmail.com" ]
miyukiomaron@gmail.com
08f4b26494e7a09e1df0296b4d7981e8c98e8bb1
b28d60148840faf555babda5ed44ed0f1b164b2c
/java/misshare_cloud-multi-tenant/common-repo/src/main/java/com/qhieco/webmapper/DiscountPackageMapper.java
d1b0b8af34f3bd30773747a0710af873fb80101d
[]
no_license
soon14/Easy_Spring_Backend
e2ec16afb1986ea19df70821d96edcb922d7978e
49bceae4b0c3294945dc4ad7ff53cae586127e50
refs/heads/master
2020-07-26T16:12:01.337615
2019-04-09T08:15:37
2019-04-09T08:15:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,694
java
package com.qhieco.webmapper; import com.qhieco.request.web.DiscountPackageRequest; import com.qhieco.response.data.web.DiscountFormatSumData; import com.qhieco.response.data.web.DiscountPackageData; import com.qhieco.response.data.web.DiscountPackageStaticData; import com.qhieco.response.data.web.DiscountRuleTimeData; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; /** * @author 徐文敏 * @version 2.0.1 创建时间: 2018/7/11 10:50 * <p> * 类说明: * ${说明} */ @Mapper public interface DiscountPackageMapper { /** * 分页查询套餐信息 * * @param request * @return */ List<DiscountPackageData> pageDiscountPackage(DiscountPackageRequest request); /** * 查询套餐信息总记录数 * * @param request * @return */ Integer pageDiscountPackageTotalCount(DiscountPackageRequest request); /** * 分页查询套餐统计信息 * @param request * @return */ List<DiscountPackageData> pagePackageStatic(DiscountPackageRequest request); /** * 查询套餐统计总记录数 * @param request * @return */ Integer pagePackageStaticTotalCount(DiscountPackageRequest request); /** * 获取套餐详细 * @param request * @return */ DiscountPackageData findPackageDetailed(DiscountPackageRequest request); /** * 根据套餐获取时段详细列表 * @param request * @return */ List<DiscountRuleTimeData> findRuleTimeList(DiscountPackageRequest request); /** * 根据套餐获取规格列表 * @param request * @return */ List<DiscountFormatSumData> findFormatSumList(DiscountPackageRequest request); /** * 新增套餐详细 * @param request * @return */ int insertDiscountPackageData(DiscountPackageRequest request); /** * 修改套餐详细 * @param request * @return */ int updateDiscountPackageData(DiscountPackageRequest request); /** * 修改套餐展示状态 * @param request * @return */ int updateParklotState(DiscountPackageRequest request); /** * 修改时间段状态为禁用 * @param request * @return */ int updateRuleTimeState(DiscountPackageRequest request); /** * 根据套餐新增时段 * @param request * @return */ int insertRuleTimeData(DiscountPackageRequest request); /** * 导出套餐列表 * @param request * @return */ List<DiscountPackageData> excelPackage(DiscountPackageRequest request); /** * 根据小区获取绑定套餐 * @return */ DiscountPackageData findParklotPackageByParkId(Integer parklotId); /** * 删除小区套餐关联关系 * @return */ int delParklotByPackage(@Param("parklotId") Integer parklotId, @Param("packageId") Integer packageId); /** * 保存小区套餐关联关系 * @return */ int saveParklotByPackage(@Param("parklotId") Integer parklotId, @Param("packageId") Integer packageId, @Param("packageState") Integer packageState); /** * 导出套餐统计列表 * @param request * @return */ List<DiscountPackageStaticData> excelStaticPackage(DiscountPackageRequest request); /** * 保存套餐关联规格关系 * @param daytime,sumNumber,packageId */ void insertFormatSumData(@Param("daytime") String daytime, @Param("sumNumber") String sumNumber, @Param("packageId") Integer packageId); void delFormatSumData(Integer packageId); }
[ "k2160789@163.com" ]
k2160789@163.com
f783d552c07baeee69f0b700dbd39b9c83172c14
5723ca8be347866648da331176717785e7aac2e6
/main/Main.java
ea78c95b914b07dcc216099dcc5517c0699d27f1
[]
no_license
livalex/Project--Part2
54c9afbd0fe65fa568cb2824c4415f68176e7650
a9823e6ef97625947f3bc7ffca54d256154d0c8c
refs/heads/master
2022-04-07T06:47:49.323132
2020-01-04T10:12:17
2020-01-04T10:12:17
228,936,659
0
0
null
null
null
null
UTF-8
Java
false
false
1,146
java
package main; import players.Human; import players.PlayersFactory; import java.util.ArrayList; public final class Main { private Main() { } public static void main(final String[] args) { // Objects used to read and write data. InputLoader inputLoader = InputLoader.getInstance(args[0], args[1]); Input input = inputLoader.load(); // Instantiations. MapBuilder mapBuilder = MapBuilder.getInstance(input.getBattleGround()); VectorCreator vectorCreator = VectorCreator.getInstance(); ActionCreator actionCreator = ActionCreator.getInstance(); PlayersFactory playersFactory = PlayersFactory.getInstance(); // Build the 'map'. ArrayList<String> ground = mapBuilder.getBattleGround(); // Create the players array ArrayList<Human> players = vectorCreator.createVector(input.getP(), playersFactory, input); // Play game. players = actionCreator.createMoves(input.getR(), input.getP(), input, players, ground, inputLoader); // Display the output. inputLoader.exposeOutput(players); } }
[ "livadarualex@gmail.com" ]
livadarualex@gmail.com
71b7b1e4005c3637e99d3bf37802c2db470405e1
3025bf806b6e73b671d97af073f647fdb814f550
/src/main/java/com/ouqicha/europebusiness/shiro/CustomRealm.java
a18bbec6ed56d55fdf1fd0d4a3bbc523466543ab
[]
no_license
lhl1314/euroupe
0ac23d80f95bbb4e89e73eaa71f037c8dcac1c0d
594aba953cff773594946508a88a5cc49c088714
refs/heads/master
2020-05-01T13:13:39.199891
2019-03-25T00:24:27
2019-03-25T00:24:27
177,485,807
0
0
null
null
null
null
UTF-8
Java
false
false
2,945
java
package com.ouqicha.europebusiness.shiro; import com.ouqicha.europebusiness.bean.entity.AccountEntity; import com.ouqicha.europebusiness.bean.vo.AccountVO; import com.ouqicha.europebusiness.service.UserInfoService; import com.ouqicha.europebusiness.util.Utils; import org.apache.commons.lang.StringUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationInfo; import org.apache.shiro.authc.AuthenticationToken; import org.apache.shiro.authc.SimpleAuthenticationInfo; import org.apache.shiro.authz.AuthorizationInfo; import org.apache.shiro.authz.SimpleAuthorizationInfo; import org.apache.shiro.realm.AuthorizingRealm; import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.util.ByteSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Set; public class CustomRealm extends AuthorizingRealm { @Autowired private UserInfoService userInfoService; /** * 授权 * @param principalCollection * @return */ @Override protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) { System.out.println("----------这里是权限验证"); AccountVO vo = (AccountVO) principalCollection.getPrimaryPrincipal(); SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo(); /** * 获取用户的角色进行授权 */ Set<String> rolesSet = userInfoService.queryUserRole(vo.getMobile()); System.out.println("该用户具有的角色*****"+rolesSet); authorizationInfo.setRoles(rolesSet); /** * 获取该用户所有角色的权限 */ Set<String> permissionsSet = userInfoService.findPermissions(vo.getMobile()); System.out.println("该用户所具有的权限有"+permissionsSet); authorizationInfo.setStringPermissions(permissionsSet); return authorizationInfo; } /** * 认证登录 * @param authenticationToken * @return * @throws AuthenticationException */ @Override protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException { if (authenticationToken == null||StringUtils.isBlank((String) authenticationToken.getPrincipal())) { return null; } //根据token中的用户名查库,获得user对象 AccountVO user=null; String o = (String) authenticationToken.getPrincipal(); if (Utils.checkEmail(o)){ AccountVO vo = userInfoService.findByMailBox(o); user=vo; }else { user = userInfoService.findByMobile(o); } if (user == null) { return null; } return new SimpleAuthenticationInfo(user, user.getPassword(), getName()); } }
[ "1694190210@qq.com" ]
1694190210@qq.com
787bd05241e98e30701468f4af071d439ae49a2d
171c446fac24b6083aa29f4e99e7a76bd26115e5
/modules/core/src/main/java/no/kantega/publishing/common/data/AssociationCategory.java
ace3a85088e5c449c1635a76c7f803e054bab53e
[ "Apache-2.0" ]
permissive
kantega/Flyt-cms
0618992e9313e3e64f34d1f6a47ae5dfc9a48e21
c42e60f836803bb367611ae4402fddf93186c8a1
refs/heads/master
2023-04-30T15:18:09.626323
2022-06-09T12:59:51
2022-06-09T12:59:51
30,144,098
10
3
Apache-2.0
2023-04-14T18:05:14
2015-02-01T11:23:26
Java
UTF-8
Java
false
false
2,138
java
/* * Copyright 2009 Kantega AS * * 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 no.kantega.publishing.common.data; import no.kantega.publishing.api.model.PublicIdObject; import java.util.Date; /** * */ public class AssociationCategory implements PublicIdObject { private String name = null; private String description = null; private Date lastModified; private int id = -1; private String publicId = ""; public AssociationCategory() { } public AssociationCategory(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { if (description == null) { description = ""; } this.description = description; } public Date getLastModified() { return lastModified; } public void setLastModified(Date lastModified) { this.lastModified = lastModified; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getPublicId() { return publicId; } public void setPublicId(String publicId) { this.publicId = publicId; } public String toString() { String str = ""; if (publicId != null && publicId.length() > 0) { str = publicId; } if (id != -1) { str = str + "(" + id + ")"; } return str; } }
[ "Eirik.Bjorsnos@kantega.no" ]
Eirik.Bjorsnos@kantega.no
c3a65416f0b5fb54284980bb6e347258db1d4c49
6500848c3661afda83a024f9792bc6e2e8e8a14e
/gp_JADX/com/google/android/play/p179a/p352a/C6204o.java
2aee4dbf0b8a2d15f834880374b98c04c6be9e6f
[]
no_license
enaawy/gproject
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
91cb88559c60ac741d4418658d0416f26722e789
refs/heads/master
2021-09-03T03:49:37.813805
2018-01-05T09:35:06
2018-01-05T09:35:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,732
java
package com.google.android.play.p179a.p352a; import com.google.protobuf.nano.C0757i; import com.google.protobuf.nano.C0758b; import com.google.protobuf.nano.CodedOutputByteBufferNano; import com.google.protobuf.nano.a; public final class C6204o extends C0758b { public int f30984a; public String f30985b; public String f30986c; public int f30987d; public String f30988e; public String f30989f; public int f30990g; public String f30991h; public C6204o() { this.f30984a = 0; this.f30985b = ""; this.f30986c = ""; this.f30987d = 0; this.f30988e = ""; this.f30989f = ""; this.f30990g = 0; this.f30991h = ""; this.aO = null; this.aP = -1; } public final boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof C6204o)) { return false; } C6204o c6204o = (C6204o) obj; if ((this.f30984a & 1) != (c6204o.f30984a & 1)) { return false; } if (!this.f30985b.equals(c6204o.f30985b)) { return false; } if ((this.f30984a & 2) != (c6204o.f30984a & 2)) { return false; } if (!this.f30986c.equals(c6204o.f30986c)) { return false; } if ((this.f30984a & 4) != (c6204o.f30984a & 4)) { return false; } if (this.f30987d != c6204o.f30987d) { return false; } if ((this.f30984a & 8) != (c6204o.f30984a & 8)) { return false; } if (!this.f30988e.equals(c6204o.f30988e)) { return false; } if ((this.f30984a & 16) != (c6204o.f30984a & 16)) { return false; } if (!this.f30989f.equals(c6204o.f30989f)) { return false; } if ((this.f30984a & 32) != (c6204o.f30984a & 32)) { return false; } if (this.f30990g != c6204o.f30990g) { return false; } if ((this.f30984a & 64) != (c6204o.f30984a & 64)) { return false; } if (!this.f30991h.equals(c6204o.f30991h)) { return false; } if (this.aO != null && !this.aO.b()) { return this.aO.equals(c6204o.aO); } if (c6204o.aO == null || c6204o.aO.b()) { return true; } return false; } public final int hashCode() { int i; int hashCode = (((((((((((((((getClass().getName().hashCode() + 527) * 31) + this.f30985b.hashCode()) * 31) + this.f30986c.hashCode()) * 31) + this.f30987d) * 31) + this.f30988e.hashCode()) * 31) + this.f30989f.hashCode()) * 31) + this.f30990g) * 31) + this.f30991h.hashCode()) * 31; if (this.aO == null || this.aO.b()) { i = 0; } else { i = this.aO.hashCode(); } return i + hashCode; } public final void mo1127a(CodedOutputByteBufferNano codedOutputByteBufferNano) { if ((this.f30984a & 1) != 0) { codedOutputByteBufferNano.a(1, this.f30985b); } if ((this.f30984a & 2) != 0) { codedOutputByteBufferNano.a(2, this.f30986c); } if ((this.f30984a & 4) != 0) { codedOutputByteBufferNano.a(3, this.f30987d); } if ((this.f30984a & 8) != 0) { codedOutputByteBufferNano.a(4, this.f30988e); } if ((this.f30984a & 16) != 0) { codedOutputByteBufferNano.a(5, this.f30989f); } if ((this.f30984a & 32) != 0) { codedOutputByteBufferNano.a(6, this.f30990g); } if ((this.f30984a & 64) != 0) { codedOutputByteBufferNano.a(7, this.f30991h); } super.mo1127a(codedOutputByteBufferNano); } protected final int mo1128b() { int b = super.mo1128b(); if ((this.f30984a & 1) != 0) { b += CodedOutputByteBufferNano.b(1, this.f30985b); } if ((this.f30984a & 2) != 0) { b += CodedOutputByteBufferNano.b(2, this.f30986c); } if ((this.f30984a & 4) != 0) { b += CodedOutputByteBufferNano.d(3, this.f30987d); } if ((this.f30984a & 8) != 0) { b += CodedOutputByteBufferNano.b(4, this.f30988e); } if ((this.f30984a & 16) != 0) { b += CodedOutputByteBufferNano.b(5, this.f30989f); } if ((this.f30984a & 32) != 0) { b += CodedOutputByteBufferNano.d(6, this.f30990g); } if ((this.f30984a & 64) != 0) { return b + CodedOutputByteBufferNano.b(7, this.f30991h); } return b; } /* JADX WARNING: inconsistent code. */ /* Code decompiled incorrectly, please refer to instructions dump. */ private final com.google.android.play.p179a.p352a.C6204o m28650b(com.google.protobuf.nano.a r7) { /* r6 = this; L_0x0000: r0 = r7.a(); switch(r0) { case 0: goto L_0x000d; case 10: goto L_0x000e; case 18: goto L_0x001b; case 24: goto L_0x0028; case 34: goto L_0x0065; case 42: goto L_0x0072; case 48: goto L_0x007f; case 58: goto L_0x00be; default: goto L_0x0007; }; L_0x0007: r0 = super.m4918a(r7, r0); if (r0 != 0) goto L_0x0000; L_0x000d: return r6; L_0x000e: r0 = r7.f(); r6.f30985b = r0; r0 = r6.f30984a; r0 = r0 | 1; r6.f30984a = r0; goto L_0x0000; L_0x001b: r0 = r7.f(); r6.f30986c = r0; r0 = r6.f30984a; r0 = r0 | 2; r6.f30984a = r0; goto L_0x0000; L_0x0028: r1 = r6.f30984a; r1 = r1 | 4; r6.f30984a = r1; r1 = r7.o(); r2 = r7.i(); Catch:{ IllegalArgumentException -> 0x0054 } switch(r2) { case 0: goto L_0x005c; case 1: goto L_0x005c; case 2: goto L_0x005c; case 3: goto L_0x005c; default: goto L_0x0039; }; Catch:{ IllegalArgumentException -> 0x0054 } L_0x0039: r3 = new java.lang.IllegalArgumentException; Catch:{ IllegalArgumentException -> 0x0054 } r4 = 42; r5 = new java.lang.StringBuilder; Catch:{ IllegalArgumentException -> 0x0054 } r5.<init>(r4); Catch:{ IllegalArgumentException -> 0x0054 } r2 = r5.append(r2); Catch:{ IllegalArgumentException -> 0x0054 } r4 = " is not a valid enum DeviceType"; r2 = r2.append(r4); Catch:{ IllegalArgumentException -> 0x0054 } r2 = r2.toString(); Catch:{ IllegalArgumentException -> 0x0054 } r3.<init>(r2); Catch:{ IllegalArgumentException -> 0x0054 } throw r3; Catch:{ IllegalArgumentException -> 0x0054 } L_0x0054: r2 = move-exception; r7.e(r1); r6.m4918a(r7, r0); goto L_0x0000; L_0x005c: r6.f30987d = r2; Catch:{ IllegalArgumentException -> 0x0054 } r2 = r6.f30984a; Catch:{ IllegalArgumentException -> 0x0054 } r2 = r2 | 4; r6.f30984a = r2; Catch:{ IllegalArgumentException -> 0x0054 } goto L_0x0000; L_0x0065: r0 = r7.f(); r6.f30988e = r0; r0 = r6.f30984a; r0 = r0 | 8; r6.f30984a = r0; goto L_0x0000; L_0x0072: r0 = r7.f(); r6.f30989f = r0; r0 = r6.f30984a; r0 = r0 | 16; r6.f30984a = r0; goto L_0x0000; L_0x007f: r1 = r6.f30984a; r1 = r1 | 32; r6.f30984a = r1; r1 = r7.o(); r2 = r7.i(); Catch:{ IllegalArgumentException -> 0x00ab } switch(r2) { case 0: goto L_0x00b4; case 1: goto L_0x00b4; case 2: goto L_0x00b4; case 3: goto L_0x00b4; case 4: goto L_0x00b4; case 5: goto L_0x00b4; case 6: goto L_0x00b4; case 7: goto L_0x00b4; case 8: goto L_0x00b4; default: goto L_0x0090; }; Catch:{ IllegalArgumentException -> 0x00ab } L_0x0090: r3 = new java.lang.IllegalArgumentException; Catch:{ IllegalArgumentException -> 0x00ab } r4 = 38; r5 = new java.lang.StringBuilder; Catch:{ IllegalArgumentException -> 0x00ab } r5.<init>(r4); Catch:{ IllegalArgumentException -> 0x00ab } r2 = r5.append(r2); Catch:{ IllegalArgumentException -> 0x00ab } r4 = " is not a valid enum OsType"; r2 = r2.append(r4); Catch:{ IllegalArgumentException -> 0x00ab } r2 = r2.toString(); Catch:{ IllegalArgumentException -> 0x00ab } r3.<init>(r2); Catch:{ IllegalArgumentException -> 0x00ab } throw r3; Catch:{ IllegalArgumentException -> 0x00ab } L_0x00ab: r2 = move-exception; r7.e(r1); r6.m4918a(r7, r0); goto L_0x0000; L_0x00b4: r6.f30990g = r2; Catch:{ IllegalArgumentException -> 0x00ab } r2 = r6.f30984a; Catch:{ IllegalArgumentException -> 0x00ab } r2 = r2 | 32; r6.f30984a = r2; Catch:{ IllegalArgumentException -> 0x00ab } goto L_0x0000; L_0x00be: r0 = r7.f(); r6.f30991h = r0; r0 = r6.f30984a; r0 = r0 | 64; r6.f30984a = r0; goto L_0x0000; */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.play.a.a.o.b(com.google.protobuf.nano.a):com.google.android.play.a.a.o"); } public final /* synthetic */ C0757i mo1131a(a aVar) { return m28650b(aVar); } }
[ "genius.ron@gmail.com" ]
genius.ron@gmail.com
37e0ca2c8c29504ca2a3db2f620054d3be558891
828b5327357d0fb4cb8f3b4472f392f3b8b10328
/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/backpressure/StackTraceSampleCoordinator.java
e450de4bc949f8eaef22e17a3415847b78662a6d
[ "CC-BY-3.0", "LicenseRef-scancode-unknown-license-reference", "Unlicense", "ISC", "MIT-0", "GPL-2.0-only", "BSD-2-Clause-Views", "OFL-1.1", "Apache-2.0", "LicenseRef-scancode-jdom", "GCC-exception-3.1", "MPL-2.0", "CC-PDDC", "AGPL-3.0-only", "MPL-2.0-no-copyleft-exception", "LicenseRef...
permissive
Romance-Zhang/flink_tpc_ds_game
7e82d801ebd268d2c41c8e207a994700ed7d28c7
8202f33bed962b35c81c641a05de548cfef6025f
refs/heads/master
2022-11-06T13:24:44.451821
2019-09-27T09:22:29
2019-09-27T09:22:29
211,280,838
0
1
Apache-2.0
2022-10-06T07:11:45
2019-09-27T09:11:11
Java
UTF-8
Java
false
false
12,349
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.runtime.rest.handler.legacy.backpressure; import org.apache.flink.api.common.time.Time; import org.apache.flink.runtime.concurrent.FutureUtils; import org.apache.flink.runtime.execution.ExecutionState; import org.apache.flink.runtime.executiongraph.Execution; import org.apache.flink.runtime.executiongraph.ExecutionAttemptID; import org.apache.flink.runtime.executiongraph.ExecutionVertex; import org.apache.flink.runtime.messages.StackTraceSampleResponse; import org.apache.flink.util.Preconditions; import org.apache.flink.shaded.guava18.com.google.common.collect.Maps; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayDeque; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; import static org.apache.flink.util.Preconditions.checkArgument; import static org.apache.flink.util.Preconditions.checkNotNull; /** * A coordinator for triggering and collecting stack traces of running tasks. */ public class StackTraceSampleCoordinator { private static final Logger LOG = LoggerFactory.getLogger(StackTraceSampleCoordinator.class); private static final int NUM_GHOST_SAMPLE_IDS = 10; private final Object lock = new Object(); /** Executor used to run the futures. */ private final Executor executor; /** Time out after the expected sampling duration. */ private final long sampleTimeout; /** In progress samples (guarded by lock). */ private final Map<Integer, PendingStackTraceSample> pendingSamples = new HashMap<>(); /** A list of recent sample IDs to identify late messages vs. invalid ones. */ private final ArrayDeque<Integer> recentPendingSamples = new ArrayDeque<>(NUM_GHOST_SAMPLE_IDS); /** Sample ID counter (guarded by lock). */ private int sampleIdCounter; /** * Flag indicating whether the coordinator is still running (guarded by * lock). */ private boolean isShutDown; /** * Creates a new coordinator for the job. * * @param executor to use to execute the futures * @param sampleTimeout Time out after the expected sampling duration. * This is added to the expected duration of a * sample, which is determined by the number of * samples and the delay between each sample. */ public StackTraceSampleCoordinator(Executor executor, long sampleTimeout) { checkArgument(sampleTimeout >= 0L); this.executor = Preconditions.checkNotNull(executor); this.sampleTimeout = sampleTimeout; } /** * Triggers a stack trace sample to all tasks. * * @param tasksToSample Tasks to sample. * @param numSamples Number of stack trace samples to collect. * @param delayBetweenSamples Delay between consecutive samples. * @param maxStackTraceDepth Maximum depth of the stack trace. 0 indicates * no maximum and keeps the complete stack trace. * @return A future of the completed stack trace sample */ @SuppressWarnings("unchecked") public CompletableFuture<StackTraceSample> triggerStackTraceSample( ExecutionVertex[] tasksToSample, int numSamples, Time delayBetweenSamples, int maxStackTraceDepth) { checkNotNull(tasksToSample, "Tasks to sample"); checkArgument(tasksToSample.length >= 1, "No tasks to sample"); checkArgument(numSamples >= 1, "No number of samples"); checkArgument(maxStackTraceDepth >= 0, "Negative maximum stack trace depth"); // Execution IDs of running tasks ExecutionAttemptID[] triggerIds = new ExecutionAttemptID[tasksToSample.length]; Execution[] executions = new Execution[tasksToSample.length]; // Check that all tasks are RUNNING before triggering anything. The // triggering can still fail. for (int i = 0; i < triggerIds.length; i++) { Execution execution = tasksToSample[i].getCurrentExecutionAttempt(); if (execution != null && execution.getState() == ExecutionState.RUNNING) { executions[i] = execution; triggerIds[i] = execution.getAttemptId(); } else { return FutureUtils.completedExceptionally(new IllegalStateException("Task " + tasksToSample[i] .getTaskNameWithSubtaskIndex() + " is not running.")); } } synchronized (lock) { if (isShutDown) { return FutureUtils.completedExceptionally(new IllegalStateException("Shut down")); } final int sampleId = sampleIdCounter++; LOG.debug("Triggering stack trace sample {}", sampleId); final PendingStackTraceSample pending = new PendingStackTraceSample( sampleId, triggerIds); // Discard the sample if it takes too long. We don't send cancel // messages to the task managers, but only wait for the responses // and then ignore them. long expectedDuration = numSamples * delayBetweenSamples.toMilliseconds(); Time timeout = Time.milliseconds(expectedDuration + sampleTimeout); // Add the pending sample before scheduling the discard task to // prevent races with removing it again. pendingSamples.put(sampleId, pending); // Trigger all samples for (Execution execution: executions) { final CompletableFuture<StackTraceSampleResponse> stackTraceSampleFuture = execution.requestStackTraceSample( sampleId, numSamples, delayBetweenSamples, maxStackTraceDepth, timeout); stackTraceSampleFuture.handleAsync( (StackTraceSampleResponse stackTraceSampleResponse, Throwable throwable) -> { if (stackTraceSampleResponse != null) { collectStackTraces( stackTraceSampleResponse.getSampleId(), stackTraceSampleResponse.getExecutionAttemptID(), stackTraceSampleResponse.getSamples()); } else { cancelStackTraceSample(sampleId, throwable); } return null; }, executor); } return pending.getStackTraceSampleFuture(); } } /** * Cancels a pending sample. * * @param sampleId ID of the sample to cancel. * @param cause Cause of the cancelling (can be <code>null</code>). */ public void cancelStackTraceSample(int sampleId, Throwable cause) { synchronized (lock) { if (isShutDown) { return; } PendingStackTraceSample sample = pendingSamples.remove(sampleId); if (sample != null) { if (cause != null) { LOG.info("Cancelling sample " + sampleId, cause); } else { LOG.info("Cancelling sample {}", sampleId); } sample.discard(cause); rememberRecentSampleId(sampleId); } } } /** * Shuts down the coordinator. * * <p>After shut down, no further operations are executed. */ public void shutDown() { synchronized (lock) { if (!isShutDown) { LOG.info("Shutting down stack trace sample coordinator."); for (PendingStackTraceSample pending : pendingSamples.values()) { pending.discard(new RuntimeException("Shut down")); } pendingSamples.clear(); isShutDown = true; } } } /** * Collects stack traces of a task. * * @param sampleId ID of the sample. * @param executionId ID of the sampled task. * @param stackTraces Stack traces of the sampled task. * * @throws IllegalStateException If unknown sample ID and not recently * finished or cancelled sample. */ public void collectStackTraces( int sampleId, ExecutionAttemptID executionId, List<StackTraceElement[]> stackTraces) { synchronized (lock) { if (isShutDown) { return; } if (LOG.isDebugEnabled()) { LOG.debug("Collecting stack trace sample {} of task {}", sampleId, executionId); } PendingStackTraceSample pending = pendingSamples.get(sampleId); if (pending != null) { pending.collectStackTraces(executionId, stackTraces); // Publish the sample if (pending.isComplete()) { pendingSamples.remove(sampleId); rememberRecentSampleId(sampleId); pending.completePromiseAndDiscard(); } } else if (recentPendingSamples.contains(sampleId)) { if (LOG.isDebugEnabled()) { LOG.debug("Received late stack trace sample {} of task {}", sampleId, executionId); } } else { if (LOG.isDebugEnabled()) { LOG.debug("Unknown sample ID " + sampleId); } } } } private void rememberRecentSampleId(int sampleId) { if (recentPendingSamples.size() >= NUM_GHOST_SAMPLE_IDS) { recentPendingSamples.removeFirst(); } recentPendingSamples.addLast(sampleId); } int getNumberOfPendingSamples() { synchronized (lock) { return pendingSamples.size(); } } // ------------------------------------------------------------------------ /** * A pending stack trace sample, which collects stack traces and owns a * {@link StackTraceSample} promise. * * <p>Access pending sample in lock scope. */ private static class PendingStackTraceSample { private final int sampleId; private final long startTime; private final Set<ExecutionAttemptID> pendingTasks; private final Map<ExecutionAttemptID, List<StackTraceElement[]>> stackTracesByTask; private final CompletableFuture<StackTraceSample> stackTraceFuture; private boolean isDiscarded; PendingStackTraceSample( int sampleId, ExecutionAttemptID[] tasksToCollect) { this.sampleId = sampleId; this.startTime = System.currentTimeMillis(); this.pendingTasks = new HashSet<>(Arrays.asList(tasksToCollect)); this.stackTracesByTask = Maps.newHashMapWithExpectedSize(tasksToCollect.length); this.stackTraceFuture = new CompletableFuture<>(); } int getSampleId() { return sampleId; } long getStartTime() { return startTime; } boolean isDiscarded() { return isDiscarded; } boolean isComplete() { if (isDiscarded) { throw new IllegalStateException("Discarded"); } return pendingTasks.isEmpty(); } void discard(Throwable cause) { if (!isDiscarded) { pendingTasks.clear(); stackTracesByTask.clear(); stackTraceFuture.completeExceptionally(new RuntimeException("Discarded", cause)); isDiscarded = true; } } void collectStackTraces(ExecutionAttemptID executionId, List<StackTraceElement[]> stackTraces) { if (isDiscarded) { throw new IllegalStateException("Discarded"); } if (pendingTasks.remove(executionId)) { stackTracesByTask.put(executionId, Collections.unmodifiableList(stackTraces)); } else if (isComplete()) { throw new IllegalStateException("Completed"); } else { throw new IllegalArgumentException("Unknown task " + executionId); } } void completePromiseAndDiscard() { if (isComplete()) { isDiscarded = true; long endTime = System.currentTimeMillis(); StackTraceSample stackTraceSample = new StackTraceSample( sampleId, startTime, endTime, stackTracesByTask); stackTraceFuture.complete(stackTraceSample); } else { throw new IllegalStateException("Not completed yet"); } } @SuppressWarnings("unchecked") CompletableFuture<StackTraceSample> getStackTraceSampleFuture() { return stackTraceFuture; } } }
[ "1003761104@qq.com" ]
1003761104@qq.com
3fa3b35f85a5ba5e5d11e2eadc600c36956ad14b
14076d999bb51bafb73222c22b190d2edb1b1f86
/merchant-credit/debit-dao/src/main/java/com/shengpay/debit/dal/dataobject/DbThreadBatchPO.java
c0746f752bed742f8ded5a006f8477b8e87f03de
[]
no_license
kevinkerry/merchant-credit
d3a9b397ddcd79d28925fa42121264da46eb91d4
14d3ad60795dcf251bd3066de14f0a731f89b73f
refs/heads/master
2021-04-03T09:09:43.601015
2017-07-28T06:07:14
2017-07-28T06:07:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,916
java
package com.shengpay.debit.dal.dataobject; import java.io.Serializable; import java.util.Date; public class DbThreadBatchPO implements Serializable { private static final long serialVersionUID = 1L; /** * DECIMAL(18) 必填<br> * */ private Long id; /** * VARCHAR(32)<br> * 批处理编号 */ private String batchCode; /** * VARCHAR(32)<br> * 批次号 */ private String serilizeCode; /** * TIMESTAMP(11,6)<br> * 开始时间 */ private Date startTime; /** * TIMESTAMP(11,6)<br> * 结束时间 */ private Date endTime; /** * DECIMAL(5)<br> * 重试次数 */ private Integer retryCount; /** * DECIMAL(18)<br> * 影响数量 */ private Long recordCount; /** * DECIMAL(5)<br> * 执行结果 */ private Integer executeResult; /** * VARCHAR(200)<br> * 备注 */ private String memo; /** * TIMESTAMP(11,6) 必填<br> * 创建时间 */ private Date createTime; /** * TIMESTAMP(11,6) 必填<br> * 修改时间 */ private Date updateTime; /** * DECIMAL(5)<br> * 线程运行状态 */ private Integer runningStatus; /** * DECIMAL(18) 必填<br> */ public Long getId() { return id; } /** * DECIMAL(18) 必填<br> */ public void setId(Long id) { this.id = id; } /** * VARCHAR(32)<br> * 获得 批处理编号 */ public String getBatchCode() { return batchCode; } /** * VARCHAR(32)<br> * 设置 批处理编号 */ public void setBatchCode(String batchCode) { this.batchCode = batchCode == null ? null : batchCode.trim(); } /** * VARCHAR(32)<br> * 获得 批次号 */ public String getSerilizeCode() { return serilizeCode; } /** * VARCHAR(32)<br> * 设置 批次号 */ public void setSerilizeCode(String serilizeCode) { this.serilizeCode = serilizeCode == null ? null : serilizeCode.trim(); } /** * TIMESTAMP(11,6)<br> * 获得 开始时间 */ public Date getStartTime() { return startTime; } /** * TIMESTAMP(11,6)<br> * 设置 开始时间 */ public void setStartTime(Date startTime) { this.startTime = startTime; } /** * TIMESTAMP(11,6)<br> * 获得 结束时间 */ public Date getEndTime() { return endTime; } /** * TIMESTAMP(11,6)<br> * 设置 结束时间 */ public void setEndTime(Date endTime) { this.endTime = endTime; } /** * DECIMAL(5)<br> * 获得 重试次数 */ public Integer getRetryCount() { return retryCount; } /** * DECIMAL(5)<br> * 设置 重试次数 */ public void setRetryCount(Integer retryCount) { this.retryCount = retryCount; } /** * DECIMAL(18)<br> * 获得 影响数量 */ public Long getRecordCount() { return recordCount; } /** * DECIMAL(18)<br> * 设置 影响数量 */ public void setRecordCount(Long recordCount) { this.recordCount = recordCount; } /** * DECIMAL(5)<br> * 获得 执行结果 */ public Integer getExecuteResult() { return executeResult; } /** * DECIMAL(5)<br> * 设置 执行结果 */ public void setExecuteResult(Integer executeResult) { this.executeResult = executeResult; } /** * VARCHAR(200)<br> * 获得 备注 */ public String getMemo() { return memo; } /** * VARCHAR(200)<br> * 设置 备注 */ public void setMemo(String memo) { this.memo = memo == null ? null : memo.trim(); } /** * TIMESTAMP(11,6) 必填<br> * 获得 创建时间 */ public Date getCreateTime() { return createTime; } /** * TIMESTAMP(11,6) 必填<br> * 设置 创建时间 */ public void setCreateTime(Date createTime) { this.createTime = createTime; } /** * TIMESTAMP(11,6) 必填<br> * 获得 修改时间 */ public Date getUpdateTime() { return updateTime; } /** * TIMESTAMP(11,6) 必填<br> * 设置 修改时间 */ public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } /** * DECIMAL(5)<br> * 获得 线程运行状态 */ public Integer getRunningStatus() { return runningStatus; } /** * DECIMAL(5)<br> * 设置 线程运行状态 */ public void setRunningStatus(Integer runningStatus) { this.runningStatus = runningStatus; } }
[ "bishuai@shengpay.com" ]
bishuai@shengpay.com
c063676cbd0f2ee17f6751f66ef3f6f71f9fd092
d00712a983893497762c8b375d28060fad737c66
/springboot-rocketmq/src/main/java/it/share/practice/consumer/RocketMqConsumer.java
7f9a2e54a9e6d056bf93a0d0cae40901f7ea31dc
[]
no_license
zhangyb05/it-share
333e3fe8090f98f003ccf3e54113f7c563340961
a4b0dc21d5b7525a813dc898402150f19ce7665b
refs/heads/master
2023-02-14T19:28:19.517732
2021-01-11T14:28:16
2021-01-11T14:28:16
328,275,338
0
0
null
null
null
null
UTF-8
Java
false
false
832
java
package it.share.practice.consumer; import it.share.constant.RocketMqConstant; import org.apache.rocketmq.client.consumer.listener.MessageListener; /** * @author :zhangyabo872 * @description:TODO * @date :2020/9/19 11:32 */ public class RocketMqConsumer extends AbstractRocketMqConsumer { @Override protected String getNameServer() { return RocketMqConstant.NAME_SERVER; } @Override protected String getGroupName() { return RocketMqConstant.GROUP_NAME; } @Override protected String getTopicName() { return RocketMqConstant.TOPIC_NAME; } @Override protected String getTagName() { return RocketMqConstant.TAG_NAME; } @Override protected MessageListener getMsgListenre() { return new ConcurrentlyMessageListener(); } }
[ "462291441@qq.com" ]
462291441@qq.com
987e716e0e76bdfd3d81003958a6226bf6de5871
bc66959d2d8a0db71b140b25f8e128b29fb66f84
/src/Facade0/Developer.java
2ed5fe3332bfe3e22091fecd7bde69d8b17e485b
[]
no_license
MiddleTime/Patt
a8e02b5138b4275fb497f09598fe7b8111c984f4
f4c613629c4fba4b038307be8eeafb3e7ea7ee35
refs/heads/master
2020-04-14T17:18:44.842481
2019-03-15T13:03:10
2019-03-15T13:03:10
163,975,982
0
0
null
null
null
null
UTF-8
Java
false
false
320
java
package Facade0; public class Developer { public void doJobBeforeDeadline(BugTracker bugTracker) { if(bugTracker.isActiveSprint()){ System.out.println("Developer is working on project..."); }else { System.out.println("Developer is reading Oracle docs..."); } } }
[ "nadoroge@gmail.com" ]
nadoroge@gmail.com
7b6be555d4e83bbf343ac708217646beb80bc650
aba003fb0ca1a178de2badcd3b6df77b773dc0dc
/app/src/main/java/com/wongxd/shopunit/bean/China.java
e2b131eeb9d26d0c3bfb1bd89c8e848691d93ecb
[]
no_license
NamedJack/ShopUnit
a10f5eda7a8cd0decfaaba2b5e603898fad8bb80
90e4ed56d7e3287c0c6884fe4634f330190e1f48
refs/heads/master
2021-08-23T15:04:04.022482
2017-12-05T09:59:11
2017-12-05T09:59:14
113,165,007
0
0
null
null
null
null
UTF-8
Java
false
false
405
java
package com.wongxd.shopunit.bean; import java.util.ArrayList; public class China { public ArrayList<Province> citylist; public class Province { public ArrayList<Area> c ; public String p; public class Area{ public ArrayList<Street> a; public String n; public class Street{ public String s; } } } }
[ "1033675097@qq.com" ]
1033675097@qq.com
7ffcd0d0f8c88fb4b34cc9d10b2329216aed6bd6
114f13efad24838391fd1c6dc6894b116f959066
/src/main/java/com/xc/roadRisk/assessment/api/RainFallApi.java
4f87cbd5f65a63852a5ebcd2457da69c0aa2fd9a
[]
no_license
xc19950304/roadRiskBackendSystem
eae95c86f56916e78c9262b53edf8b5a44fb9a49
8207d438b40ac4d9f20672e6622dfb94dd535457
refs/heads/master
2020-05-24T07:51:55.208295
2019-05-19T15:55:55
2019-05-19T15:55:55
187,171,314
1
0
null
null
null
null
UTF-8
Java
false
false
287
java
package com.xc.roadRisk.assessment.api; import com.xc.roadRisk.assessment.entity.RainFall; import com.baomidou.mybatisplus.service.IService; /** * <p> * 服务类 * </p> * * @author xiongchang * @since 2019-05-06 */ public interface RainFallApi extends IService<RainFall> { }
[ "xiongchanggiser@163.com" ]
xiongchanggiser@163.com
a341bc630c4ac14d2066971d9a66bc7edbad9c92
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/mockito--mockito/eec5f6f09de4c6363b36131dfc0400d1a101e39f/before/MockitoJUnitRunnerTest.java
32fe44184f24b163e53774f88da2ffe780413df8
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,858
java
package org.mockitousage.junitrunner; import org.junit.Before; import org.junit.Test; import org.junit.runner.JUnitCore; import org.junit.runner.Result; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import org.mockitousage.IMethods; import org.mockitoutil.TestBase; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; /** * Created by sfaber on 4/22/16. */ public class MockitoJUnitRunnerTest extends TestBase { @Test public void succeeds_when_all_stubs_were_used() { JUnitCore runner = new JUnitCore(); //when Result result = runner.run( StubbingInConstructorUsed.class, StubbingInBeforeUsed.class, StubbingInTestUsed.class ); //then assertThat(result).isSuccessful(); } @Test public void fails_when_stubs_were_not_used() { JUnitCore runner = new JUnitCore(); Class<?>[] tests = {StubbingInConstructorUnused.class, StubbingInBeforeUnused.class, StubbingInTestUnused.class}; //when Result result = runner.run(tests); System.out.println(result.getFailures()); //then assertEquals(tests.length, result.getFailureCount()); } @RunWith(MockitoJUnitRunner.class) public static class StubbingInConstructorUsed extends StubbingInConstructorUnused { @Test public void test() { assertEquals("1", mock.simpleMethod(1)); } } @RunWith(MockitoJUnitRunner.class) public static class StubbingInConstructorUnused { IMethods mock = when(mock(IMethods.class).simpleMethod(1)).thenReturn("1").getMock(); @Test public void dummy() {} } @RunWith(MockitoJUnitRunner.class) public static class StubbingInBeforeUsed extends StubbingInBeforeUnused { @Test public void test() { assertEquals("1", mock.simpleMethod(1)); } } @RunWith(MockitoJUnitRunner.class) public static class StubbingInBeforeUnused { @Mock IMethods mock; @Before public void before() { when(mock.simpleMethod(1)).thenReturn("1"); } @Test public void dummy() {} } @RunWith(MockitoJUnitRunner.class) public static class StubbingInTestUsed { @Test public void test() { IMethods mock = mock(IMethods.class); when(mock.simpleMethod(1)).thenReturn("1"); assertEquals("1", mock.simpleMethod(1)); } } @RunWith(MockitoJUnitRunner.class) public static class StubbingInTestUnused { @Test public void test() { IMethods mock = mock(IMethods.class); when(mock.simpleMethod(1)).thenReturn("1"); mock.simpleMethod(2); //different arg } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
ffd87fdf024fd4bffeaf2b617a0ff0f0502a6418
6aa82336675adc8d21c05cedbe9c448a8b1a2d4c
/hybris/bin/custom/myaccelerator/myacceleratorfacades/src/com/demo/facades/process/email/context/OrderPartiallyRefundedEmailContext.java
490bf998916ac04dce6864df49d7c13df9332fcc
[]
no_license
ronaldkonjer/mycommerce
d6b8df099ad958857d9bd9188a04b42c7f4ffde7
45372746b36fef1a1e0f8f6dbb301dd8e930c250
refs/heads/master
2020-04-19T23:17:16.309603
2018-06-18T11:42:26
2018-06-18T11:42:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,828
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package com.demo.facades.process.email.context; import de.hybris.platform.acceleratorservices.model.cms2.pages.EmailPageModel; import de.hybris.platform.acceleratorservices.orderprocessing.model.OrderModificationProcessModel; import de.hybris.platform.commercefacades.order.data.OrderEntryData; import de.hybris.platform.commercefacades.product.data.PriceData; import java.math.BigDecimal; import java.util.List; /** * Velocity context for email about partially order refund */ public class OrderPartiallyRefundedEmailContext extends OrderPartiallyModifiedEmailContext { private PriceData refundAmount; @Override public void init(final OrderModificationProcessModel orderProcessModel, final EmailPageModel emailPageModel) { super.init(orderProcessModel, emailPageModel); calculateRefundAmount(); } protected void calculateRefundAmount() { BigDecimal refundAmountValue = BigDecimal.ZERO; PriceData totalPrice = null; for (final OrderEntryData entryData : getRefundedEntries()) { totalPrice = entryData.getTotalPrice(); refundAmountValue = refundAmountValue.add(totalPrice.getValue()); } if (totalPrice != null) { refundAmount = getPriceDataFactory().create(totalPrice.getPriceType(), refundAmountValue, totalPrice.getCurrencyIso()); } } public List<OrderEntryData> getRefundedEntries() { return super.getModifiedEntries(); } public PriceData getRefundAmount() { return refundAmount; } }
[ "m.perndorfer@gmx.at" ]
m.perndorfer@gmx.at
7f9cb5f2409cedb53bf440ee0d6c04764d8e93ad
cbea23d5e087a862edcf2383678d5df7b0caab67
/aws-java-sdk-forecast/src/main/java/com/amazonaws/services/forecast/model/AdditionalDataset.java
ae541df2e1a1b7fe43e5b92e89179b8a04e80951
[ "Apache-2.0" ]
permissive
phambryan/aws-sdk-for-java
66a614a8bfe4176bf57e2bd69f898eee5222bb59
0f75a8096efdb4831da8c6793390759d97a25019
refs/heads/master
2021-12-14T21:26:52.580137
2021-12-03T22:50:27
2021-12-03T22:50:27
4,263,342
0
0
null
null
null
null
UTF-8
Java
false
false
50,375
java
/* * Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.forecast.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** * <p> * Describes an additional dataset. This object is part of the <a>DataConfig</a> object. Forecast supports the Weather * Index and Holidays additional datasets. * </p> * <p> * <b>Weather Index</b> * </p> * <p> * The Amazon Forecast Weather Index is a built-in dataset that incorporates historical and projected weather * information into your model. The Weather Index supplements your datasets with over two years of historical weather * data and up to 14 days of projected weather data. For more information, see <a * href="https://docs.aws.amazon.com/forecast/latest/dg/weather.html">Amazon Forecast Weather Index</a>. * </p> * <p> * <b>Holidays</b> * </p> * <p> * Holidays is a built-in dataset that incorporates national holiday information into your model. It provides native * support for the holiday calendars of 66 countries. To view the holiday calendars, refer to the <a * href="http://jollyday.sourceforge.net/data.html">Jollyday</a> library. For more information, see <a * href="https://docs.aws.amazon.com/forecast/latest/dg/holidays.html">Holidays Featurization</a>. * </p> * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/forecast-2018-06-26/AdditionalDataset" target="_top">AWS API * Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AdditionalDataset implements Serializable, Cloneable, StructuredPojo { /** * <p> * The name of the additional dataset. Valid names: <code>"holiday"</code> and <code>"weather"</code>. * </p> */ private String name; /** * <p> * <b>Weather Index</b> * </p> * <p> * To enable the Weather Index, do not specify a value for <code>Configuration</code>. * </p> * <p> * <b>Holidays</b> * </p> * <p> * To enable Holidays, specify a country with one of the following two-letter country codes: * </p> * <ul> * <li> * <p> * "AL" - ALBANIA * </p> * </li> * <li> * <p> * "AR" - ARGENTINA * </p> * </li> * <li> * <p> * "AT" - AUSTRIA * </p> * </li> * <li> * <p> * "AU" - AUSTRALIA * </p> * </li> * <li> * <p> * "BA" - BOSNIA HERZEGOVINA * </p> * </li> * <li> * <p> * "BE" - BELGIUM * </p> * </li> * <li> * <p> * "BG" - BULGARIA * </p> * </li> * <li> * <p> * "BO" - BOLIVIA * </p> * </li> * <li> * <p> * "BR" - BRAZIL * </p> * </li> * <li> * <p> * "BY" - BELARUS * </p> * </li> * <li> * <p> * "CA" - CANADA * </p> * </li> * <li> * <p> * "CL" - CHILE * </p> * </li> * <li> * <p> * "CO" - COLOMBIA * </p> * </li> * <li> * <p> * "CR" - COSTA RICA * </p> * </li> * <li> * <p> * "HR" - CROATIA * </p> * </li> * <li> * <p> * "CZ" - CZECH REPUBLIC * </p> * </li> * <li> * <p> * "DK" - DENMARK * </p> * </li> * <li> * <p> * "EC" - ECUADOR * </p> * </li> * <li> * <p> * "EE" - ESTONIA * </p> * </li> * <li> * <p> * "ET" - ETHIOPIA * </p> * </li> * <li> * <p> * "FI" - FINLAND * </p> * </li> * <li> * <p> * "FR" - FRANCE * </p> * </li> * <li> * <p> * "DE" - GERMANY * </p> * </li> * <li> * <p> * "GR" - GREECE * </p> * </li> * <li> * <p> * "HU" - HUNGARY * </p> * </li> * <li> * <p> * "IS" - ICELAND * </p> * </li> * <li> * <p> * "IN" - INDIA * </p> * </li> * <li> * <p> * "IE" - IRELAND * </p> * </li> * <li> * <p> * "IT" - ITALY * </p> * </li> * <li> * <p> * "JP" - JAPAN * </p> * </li> * <li> * <p> * "KZ" - KAZAKHSTAN * </p> * </li> * <li> * <p> * "KR" - KOREA * </p> * </li> * <li> * <p> * "LV" - LATVIA * </p> * </li> * <li> * <p> * "LI" - LIECHTENSTEIN * </p> * </li> * <li> * <p> * "LT" - LITHUANIA * </p> * </li> * <li> * <p> * "LU" - LUXEMBOURG * </p> * </li> * <li> * <p> * "MK" - MACEDONIA * </p> * </li> * <li> * <p> * "MT" - MALTA * </p> * </li> * <li> * <p> * "MX" - MEXICO * </p> * </li> * <li> * <p> * "MD" - MOLDOVA * </p> * </li> * <li> * <p> * "ME" - MONTENEGRO * </p> * </li> * <li> * <p> * "NL" - NETHERLANDS * </p> * </li> * <li> * <p> * "NZ" - NEW ZEALAND * </p> * </li> * <li> * <p> * "NI" - NICARAGUA * </p> * </li> * <li> * <p> * "NG" - NIGERIA * </p> * </li> * <li> * <p> * "NO" - NORWAY * </p> * </li> * <li> * <p> * "PA" - PANAMA * </p> * </li> * <li> * <p> * "PY" - PARAGUAY * </p> * </li> * <li> * <p> * "PE" - PERU * </p> * </li> * <li> * <p> * "PL" - POLAND * </p> * </li> * <li> * <p> * "PT" - PORTUGAL * </p> * </li> * <li> * <p> * "RO" - ROMANIA * </p> * </li> * <li> * <p> * "RU" - RUSSIA * </p> * </li> * <li> * <p> * "RS" - SERBIA * </p> * </li> * <li> * <p> * "SK" - SLOVAKIA * </p> * </li> * <li> * <p> * "SI" - SLOVENIA * </p> * </li> * <li> * <p> * "ZA" - SOUTH AFRICA * </p> * </li> * <li> * <p> * "ES" - SPAIN * </p> * </li> * <li> * <p> * "SE" - SWEDEN * </p> * </li> * <li> * <p> * "CH" - SWITZERLAND * </p> * </li> * <li> * <p> * "UA" - UKRAINE * </p> * </li> * <li> * <p> * "AE" - UNITED ARAB EMIRATES * </p> * </li> * <li> * <p> * "US" - UNITED STATES * </p> * </li> * <li> * <p> * "UK" - UNITED KINGDOM * </p> * </li> * <li> * <p> * "UY" - URUGUAY * </p> * </li> * <li> * <p> * "VE" - VENEZUELA * </p> * </li> * </ul> */ private java.util.Map<String, java.util.List<String>> configuration; /** * <p> * The name of the additional dataset. Valid names: <code>"holiday"</code> and <code>"weather"</code>. * </p> * * @param name * The name of the additional dataset. Valid names: <code>"holiday"</code> and <code>"weather"</code>. */ public void setName(String name) { this.name = name; } /** * <p> * The name of the additional dataset. Valid names: <code>"holiday"</code> and <code>"weather"</code>. * </p> * * @return The name of the additional dataset. Valid names: <code>"holiday"</code> and <code>"weather"</code>. */ public String getName() { return this.name; } /** * <p> * The name of the additional dataset. Valid names: <code>"holiday"</code> and <code>"weather"</code>. * </p> * * @param name * The name of the additional dataset. Valid names: <code>"holiday"</code> and <code>"weather"</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public AdditionalDataset withName(String name) { setName(name); return this; } /** * <p> * <b>Weather Index</b> * </p> * <p> * To enable the Weather Index, do not specify a value for <code>Configuration</code>. * </p> * <p> * <b>Holidays</b> * </p> * <p> * To enable Holidays, specify a country with one of the following two-letter country codes: * </p> * <ul> * <li> * <p> * "AL" - ALBANIA * </p> * </li> * <li> * <p> * "AR" - ARGENTINA * </p> * </li> * <li> * <p> * "AT" - AUSTRIA * </p> * </li> * <li> * <p> * "AU" - AUSTRALIA * </p> * </li> * <li> * <p> * "BA" - BOSNIA HERZEGOVINA * </p> * </li> * <li> * <p> * "BE" - BELGIUM * </p> * </li> * <li> * <p> * "BG" - BULGARIA * </p> * </li> * <li> * <p> * "BO" - BOLIVIA * </p> * </li> * <li> * <p> * "BR" - BRAZIL * </p> * </li> * <li> * <p> * "BY" - BELARUS * </p> * </li> * <li> * <p> * "CA" - CANADA * </p> * </li> * <li> * <p> * "CL" - CHILE * </p> * </li> * <li> * <p> * "CO" - COLOMBIA * </p> * </li> * <li> * <p> * "CR" - COSTA RICA * </p> * </li> * <li> * <p> * "HR" - CROATIA * </p> * </li> * <li> * <p> * "CZ" - CZECH REPUBLIC * </p> * </li> * <li> * <p> * "DK" - DENMARK * </p> * </li> * <li> * <p> * "EC" - ECUADOR * </p> * </li> * <li> * <p> * "EE" - ESTONIA * </p> * </li> * <li> * <p> * "ET" - ETHIOPIA * </p> * </li> * <li> * <p> * "FI" - FINLAND * </p> * </li> * <li> * <p> * "FR" - FRANCE * </p> * </li> * <li> * <p> * "DE" - GERMANY * </p> * </li> * <li> * <p> * "GR" - GREECE * </p> * </li> * <li> * <p> * "HU" - HUNGARY * </p> * </li> * <li> * <p> * "IS" - ICELAND * </p> * </li> * <li> * <p> * "IN" - INDIA * </p> * </li> * <li> * <p> * "IE" - IRELAND * </p> * </li> * <li> * <p> * "IT" - ITALY * </p> * </li> * <li> * <p> * "JP" - JAPAN * </p> * </li> * <li> * <p> * "KZ" - KAZAKHSTAN * </p> * </li> * <li> * <p> * "KR" - KOREA * </p> * </li> * <li> * <p> * "LV" - LATVIA * </p> * </li> * <li> * <p> * "LI" - LIECHTENSTEIN * </p> * </li> * <li> * <p> * "LT" - LITHUANIA * </p> * </li> * <li> * <p> * "LU" - LUXEMBOURG * </p> * </li> * <li> * <p> * "MK" - MACEDONIA * </p> * </li> * <li> * <p> * "MT" - MALTA * </p> * </li> * <li> * <p> * "MX" - MEXICO * </p> * </li> * <li> * <p> * "MD" - MOLDOVA * </p> * </li> * <li> * <p> * "ME" - MONTENEGRO * </p> * </li> * <li> * <p> * "NL" - NETHERLANDS * </p> * </li> * <li> * <p> * "NZ" - NEW ZEALAND * </p> * </li> * <li> * <p> * "NI" - NICARAGUA * </p> * </li> * <li> * <p> * "NG" - NIGERIA * </p> * </li> * <li> * <p> * "NO" - NORWAY * </p> * </li> * <li> * <p> * "PA" - PANAMA * </p> * </li> * <li> * <p> * "PY" - PARAGUAY * </p> * </li> * <li> * <p> * "PE" - PERU * </p> * </li> * <li> * <p> * "PL" - POLAND * </p> * </li> * <li> * <p> * "PT" - PORTUGAL * </p> * </li> * <li> * <p> * "RO" - ROMANIA * </p> * </li> * <li> * <p> * "RU" - RUSSIA * </p> * </li> * <li> * <p> * "RS" - SERBIA * </p> * </li> * <li> * <p> * "SK" - SLOVAKIA * </p> * </li> * <li> * <p> * "SI" - SLOVENIA * </p> * </li> * <li> * <p> * "ZA" - SOUTH AFRICA * </p> * </li> * <li> * <p> * "ES" - SPAIN * </p> * </li> * <li> * <p> * "SE" - SWEDEN * </p> * </li> * <li> * <p> * "CH" - SWITZERLAND * </p> * </li> * <li> * <p> * "UA" - UKRAINE * </p> * </li> * <li> * <p> * "AE" - UNITED ARAB EMIRATES * </p> * </li> * <li> * <p> * "US" - UNITED STATES * </p> * </li> * <li> * <p> * "UK" - UNITED KINGDOM * </p> * </li> * <li> * <p> * "UY" - URUGUAY * </p> * </li> * <li> * <p> * "VE" - VENEZUELA * </p> * </li> * </ul> * * @return <b>Weather Index</b> </p> * <p> * To enable the Weather Index, do not specify a value for <code>Configuration</code>. * </p> * <p> * <b>Holidays</b> * </p> * <p> * To enable Holidays, specify a country with one of the following two-letter country codes: * </p> * <ul> * <li> * <p> * "AL" - ALBANIA * </p> * </li> * <li> * <p> * "AR" - ARGENTINA * </p> * </li> * <li> * <p> * "AT" - AUSTRIA * </p> * </li> * <li> * <p> * "AU" - AUSTRALIA * </p> * </li> * <li> * <p> * "BA" - BOSNIA HERZEGOVINA * </p> * </li> * <li> * <p> * "BE" - BELGIUM * </p> * </li> * <li> * <p> * "BG" - BULGARIA * </p> * </li> * <li> * <p> * "BO" - BOLIVIA * </p> * </li> * <li> * <p> * "BR" - BRAZIL * </p> * </li> * <li> * <p> * "BY" - BELARUS * </p> * </li> * <li> * <p> * "CA" - CANADA * </p> * </li> * <li> * <p> * "CL" - CHILE * </p> * </li> * <li> * <p> * "CO" - COLOMBIA * </p> * </li> * <li> * <p> * "CR" - COSTA RICA * </p> * </li> * <li> * <p> * "HR" - CROATIA * </p> * </li> * <li> * <p> * "CZ" - CZECH REPUBLIC * </p> * </li> * <li> * <p> * "DK" - DENMARK * </p> * </li> * <li> * <p> * "EC" - ECUADOR * </p> * </li> * <li> * <p> * "EE" - ESTONIA * </p> * </li> * <li> * <p> * "ET" - ETHIOPIA * </p> * </li> * <li> * <p> * "FI" - FINLAND * </p> * </li> * <li> * <p> * "FR" - FRANCE * </p> * </li> * <li> * <p> * "DE" - GERMANY * </p> * </li> * <li> * <p> * "GR" - GREECE * </p> * </li> * <li> * <p> * "HU" - HUNGARY * </p> * </li> * <li> * <p> * "IS" - ICELAND * </p> * </li> * <li> * <p> * "IN" - INDIA * </p> * </li> * <li> * <p> * "IE" - IRELAND * </p> * </li> * <li> * <p> * "IT" - ITALY * </p> * </li> * <li> * <p> * "JP" - JAPAN * </p> * </li> * <li> * <p> * "KZ" - KAZAKHSTAN * </p> * </li> * <li> * <p> * "KR" - KOREA * </p> * </li> * <li> * <p> * "LV" - LATVIA * </p> * </li> * <li> * <p> * "LI" - LIECHTENSTEIN * </p> * </li> * <li> * <p> * "LT" - LITHUANIA * </p> * </li> * <li> * <p> * "LU" - LUXEMBOURG * </p> * </li> * <li> * <p> * "MK" - MACEDONIA * </p> * </li> * <li> * <p> * "MT" - MALTA * </p> * </li> * <li> * <p> * "MX" - MEXICO * </p> * </li> * <li> * <p> * "MD" - MOLDOVA * </p> * </li> * <li> * <p> * "ME" - MONTENEGRO * </p> * </li> * <li> * <p> * "NL" - NETHERLANDS * </p> * </li> * <li> * <p> * "NZ" - NEW ZEALAND * </p> * </li> * <li> * <p> * "NI" - NICARAGUA * </p> * </li> * <li> * <p> * "NG" - NIGERIA * </p> * </li> * <li> * <p> * "NO" - NORWAY * </p> * </li> * <li> * <p> * "PA" - PANAMA * </p> * </li> * <li> * <p> * "PY" - PARAGUAY * </p> * </li> * <li> * <p> * "PE" - PERU * </p> * </li> * <li> * <p> * "PL" - POLAND * </p> * </li> * <li> * <p> * "PT" - PORTUGAL * </p> * </li> * <li> * <p> * "RO" - ROMANIA * </p> * </li> * <li> * <p> * "RU" - RUSSIA * </p> * </li> * <li> * <p> * "RS" - SERBIA * </p> * </li> * <li> * <p> * "SK" - SLOVAKIA * </p> * </li> * <li> * <p> * "SI" - SLOVENIA * </p> * </li> * <li> * <p> * "ZA" - SOUTH AFRICA * </p> * </li> * <li> * <p> * "ES" - SPAIN * </p> * </li> * <li> * <p> * "SE" - SWEDEN * </p> * </li> * <li> * <p> * "CH" - SWITZERLAND * </p> * </li> * <li> * <p> * "UA" - UKRAINE * </p> * </li> * <li> * <p> * "AE" - UNITED ARAB EMIRATES * </p> * </li> * <li> * <p> * "US" - UNITED STATES * </p> * </li> * <li> * <p> * "UK" - UNITED KINGDOM * </p> * </li> * <li> * <p> * "UY" - URUGUAY * </p> * </li> * <li> * <p> * "VE" - VENEZUELA * </p> * </li> */ public java.util.Map<String, java.util.List<String>> getConfiguration() { return configuration; } /** * <p> * <b>Weather Index</b> * </p> * <p> * To enable the Weather Index, do not specify a value for <code>Configuration</code>. * </p> * <p> * <b>Holidays</b> * </p> * <p> * To enable Holidays, specify a country with one of the following two-letter country codes: * </p> * <ul> * <li> * <p> * "AL" - ALBANIA * </p> * </li> * <li> * <p> * "AR" - ARGENTINA * </p> * </li> * <li> * <p> * "AT" - AUSTRIA * </p> * </li> * <li> * <p> * "AU" - AUSTRALIA * </p> * </li> * <li> * <p> * "BA" - BOSNIA HERZEGOVINA * </p> * </li> * <li> * <p> * "BE" - BELGIUM * </p> * </li> * <li> * <p> * "BG" - BULGARIA * </p> * </li> * <li> * <p> * "BO" - BOLIVIA * </p> * </li> * <li> * <p> * "BR" - BRAZIL * </p> * </li> * <li> * <p> * "BY" - BELARUS * </p> * </li> * <li> * <p> * "CA" - CANADA * </p> * </li> * <li> * <p> * "CL" - CHILE * </p> * </li> * <li> * <p> * "CO" - COLOMBIA * </p> * </li> * <li> * <p> * "CR" - COSTA RICA * </p> * </li> * <li> * <p> * "HR" - CROATIA * </p> * </li> * <li> * <p> * "CZ" - CZECH REPUBLIC * </p> * </li> * <li> * <p> * "DK" - DENMARK * </p> * </li> * <li> * <p> * "EC" - ECUADOR * </p> * </li> * <li> * <p> * "EE" - ESTONIA * </p> * </li> * <li> * <p> * "ET" - ETHIOPIA * </p> * </li> * <li> * <p> * "FI" - FINLAND * </p> * </li> * <li> * <p> * "FR" - FRANCE * </p> * </li> * <li> * <p> * "DE" - GERMANY * </p> * </li> * <li> * <p> * "GR" - GREECE * </p> * </li> * <li> * <p> * "HU" - HUNGARY * </p> * </li> * <li> * <p> * "IS" - ICELAND * </p> * </li> * <li> * <p> * "IN" - INDIA * </p> * </li> * <li> * <p> * "IE" - IRELAND * </p> * </li> * <li> * <p> * "IT" - ITALY * </p> * </li> * <li> * <p> * "JP" - JAPAN * </p> * </li> * <li> * <p> * "KZ" - KAZAKHSTAN * </p> * </li> * <li> * <p> * "KR" - KOREA * </p> * </li> * <li> * <p> * "LV" - LATVIA * </p> * </li> * <li> * <p> * "LI" - LIECHTENSTEIN * </p> * </li> * <li> * <p> * "LT" - LITHUANIA * </p> * </li> * <li> * <p> * "LU" - LUXEMBOURG * </p> * </li> * <li> * <p> * "MK" - MACEDONIA * </p> * </li> * <li> * <p> * "MT" - MALTA * </p> * </li> * <li> * <p> * "MX" - MEXICO * </p> * </li> * <li> * <p> * "MD" - MOLDOVA * </p> * </li> * <li> * <p> * "ME" - MONTENEGRO * </p> * </li> * <li> * <p> * "NL" - NETHERLANDS * </p> * </li> * <li> * <p> * "NZ" - NEW ZEALAND * </p> * </li> * <li> * <p> * "NI" - NICARAGUA * </p> * </li> * <li> * <p> * "NG" - NIGERIA * </p> * </li> * <li> * <p> * "NO" - NORWAY * </p> * </li> * <li> * <p> * "PA" - PANAMA * </p> * </li> * <li> * <p> * "PY" - PARAGUAY * </p> * </li> * <li> * <p> * "PE" - PERU * </p> * </li> * <li> * <p> * "PL" - POLAND * </p> * </li> * <li> * <p> * "PT" - PORTUGAL * </p> * </li> * <li> * <p> * "RO" - ROMANIA * </p> * </li> * <li> * <p> * "RU" - RUSSIA * </p> * </li> * <li> * <p> * "RS" - SERBIA * </p> * </li> * <li> * <p> * "SK" - SLOVAKIA * </p> * </li> * <li> * <p> * "SI" - SLOVENIA * </p> * </li> * <li> * <p> * "ZA" - SOUTH AFRICA * </p> * </li> * <li> * <p> * "ES" - SPAIN * </p> * </li> * <li> * <p> * "SE" - SWEDEN * </p> * </li> * <li> * <p> * "CH" - SWITZERLAND * </p> * </li> * <li> * <p> * "UA" - UKRAINE * </p> * </li> * <li> * <p> * "AE" - UNITED ARAB EMIRATES * </p> * </li> * <li> * <p> * "US" - UNITED STATES * </p> * </li> * <li> * <p> * "UK" - UNITED KINGDOM * </p> * </li> * <li> * <p> * "UY" - URUGUAY * </p> * </li> * <li> * <p> * "VE" - VENEZUELA * </p> * </li> * </ul> * * @param configuration * <b>Weather Index</b> </p> * <p> * To enable the Weather Index, do not specify a value for <code>Configuration</code>. * </p> * <p> * <b>Holidays</b> * </p> * <p> * To enable Holidays, specify a country with one of the following two-letter country codes: * </p> * <ul> * <li> * <p> * "AL" - ALBANIA * </p> * </li> * <li> * <p> * "AR" - ARGENTINA * </p> * </li> * <li> * <p> * "AT" - AUSTRIA * </p> * </li> * <li> * <p> * "AU" - AUSTRALIA * </p> * </li> * <li> * <p> * "BA" - BOSNIA HERZEGOVINA * </p> * </li> * <li> * <p> * "BE" - BELGIUM * </p> * </li> * <li> * <p> * "BG" - BULGARIA * </p> * </li> * <li> * <p> * "BO" - BOLIVIA * </p> * </li> * <li> * <p> * "BR" - BRAZIL * </p> * </li> * <li> * <p> * "BY" - BELARUS * </p> * </li> * <li> * <p> * "CA" - CANADA * </p> * </li> * <li> * <p> * "CL" - CHILE * </p> * </li> * <li> * <p> * "CO" - COLOMBIA * </p> * </li> * <li> * <p> * "CR" - COSTA RICA * </p> * </li> * <li> * <p> * "HR" - CROATIA * </p> * </li> * <li> * <p> * "CZ" - CZECH REPUBLIC * </p> * </li> * <li> * <p> * "DK" - DENMARK * </p> * </li> * <li> * <p> * "EC" - ECUADOR * </p> * </li> * <li> * <p> * "EE" - ESTONIA * </p> * </li> * <li> * <p> * "ET" - ETHIOPIA * </p> * </li> * <li> * <p> * "FI" - FINLAND * </p> * </li> * <li> * <p> * "FR" - FRANCE * </p> * </li> * <li> * <p> * "DE" - GERMANY * </p> * </li> * <li> * <p> * "GR" - GREECE * </p> * </li> * <li> * <p> * "HU" - HUNGARY * </p> * </li> * <li> * <p> * "IS" - ICELAND * </p> * </li> * <li> * <p> * "IN" - INDIA * </p> * </li> * <li> * <p> * "IE" - IRELAND * </p> * </li> * <li> * <p> * "IT" - ITALY * </p> * </li> * <li> * <p> * "JP" - JAPAN * </p> * </li> * <li> * <p> * "KZ" - KAZAKHSTAN * </p> * </li> * <li> * <p> * "KR" - KOREA * </p> * </li> * <li> * <p> * "LV" - LATVIA * </p> * </li> * <li> * <p> * "LI" - LIECHTENSTEIN * </p> * </li> * <li> * <p> * "LT" - LITHUANIA * </p> * </li> * <li> * <p> * "LU" - LUXEMBOURG * </p> * </li> * <li> * <p> * "MK" - MACEDONIA * </p> * </li> * <li> * <p> * "MT" - MALTA * </p> * </li> * <li> * <p> * "MX" - MEXICO * </p> * </li> * <li> * <p> * "MD" - MOLDOVA * </p> * </li> * <li> * <p> * "ME" - MONTENEGRO * </p> * </li> * <li> * <p> * "NL" - NETHERLANDS * </p> * </li> * <li> * <p> * "NZ" - NEW ZEALAND * </p> * </li> * <li> * <p> * "NI" - NICARAGUA * </p> * </li> * <li> * <p> * "NG" - NIGERIA * </p> * </li> * <li> * <p> * "NO" - NORWAY * </p> * </li> * <li> * <p> * "PA" - PANAMA * </p> * </li> * <li> * <p> * "PY" - PARAGUAY * </p> * </li> * <li> * <p> * "PE" - PERU * </p> * </li> * <li> * <p> * "PL" - POLAND * </p> * </li> * <li> * <p> * "PT" - PORTUGAL * </p> * </li> * <li> * <p> * "RO" - ROMANIA * </p> * </li> * <li> * <p> * "RU" - RUSSIA * </p> * </li> * <li> * <p> * "RS" - SERBIA * </p> * </li> * <li> * <p> * "SK" - SLOVAKIA * </p> * </li> * <li> * <p> * "SI" - SLOVENIA * </p> * </li> * <li> * <p> * "ZA" - SOUTH AFRICA * </p> * </li> * <li> * <p> * "ES" - SPAIN * </p> * </li> * <li> * <p> * "SE" - SWEDEN * </p> * </li> * <li> * <p> * "CH" - SWITZERLAND * </p> * </li> * <li> * <p> * "UA" - UKRAINE * </p> * </li> * <li> * <p> * "AE" - UNITED ARAB EMIRATES * </p> * </li> * <li> * <p> * "US" - UNITED STATES * </p> * </li> * <li> * <p> * "UK" - UNITED KINGDOM * </p> * </li> * <li> * <p> * "UY" - URUGUAY * </p> * </li> * <li> * <p> * "VE" - VENEZUELA * </p> * </li> */ public void setConfiguration(java.util.Map<String, java.util.List<String>> configuration) { this.configuration = configuration; } /** * <p> * <b>Weather Index</b> * </p> * <p> * To enable the Weather Index, do not specify a value for <code>Configuration</code>. * </p> * <p> * <b>Holidays</b> * </p> * <p> * To enable Holidays, specify a country with one of the following two-letter country codes: * </p> * <ul> * <li> * <p> * "AL" - ALBANIA * </p> * </li> * <li> * <p> * "AR" - ARGENTINA * </p> * </li> * <li> * <p> * "AT" - AUSTRIA * </p> * </li> * <li> * <p> * "AU" - AUSTRALIA * </p> * </li> * <li> * <p> * "BA" - BOSNIA HERZEGOVINA * </p> * </li> * <li> * <p> * "BE" - BELGIUM * </p> * </li> * <li> * <p> * "BG" - BULGARIA * </p> * </li> * <li> * <p> * "BO" - BOLIVIA * </p> * </li> * <li> * <p> * "BR" - BRAZIL * </p> * </li> * <li> * <p> * "BY" - BELARUS * </p> * </li> * <li> * <p> * "CA" - CANADA * </p> * </li> * <li> * <p> * "CL" - CHILE * </p> * </li> * <li> * <p> * "CO" - COLOMBIA * </p> * </li> * <li> * <p> * "CR" - COSTA RICA * </p> * </li> * <li> * <p> * "HR" - CROATIA * </p> * </li> * <li> * <p> * "CZ" - CZECH REPUBLIC * </p> * </li> * <li> * <p> * "DK" - DENMARK * </p> * </li> * <li> * <p> * "EC" - ECUADOR * </p> * </li> * <li> * <p> * "EE" - ESTONIA * </p> * </li> * <li> * <p> * "ET" - ETHIOPIA * </p> * </li> * <li> * <p> * "FI" - FINLAND * </p> * </li> * <li> * <p> * "FR" - FRANCE * </p> * </li> * <li> * <p> * "DE" - GERMANY * </p> * </li> * <li> * <p> * "GR" - GREECE * </p> * </li> * <li> * <p> * "HU" - HUNGARY * </p> * </li> * <li> * <p> * "IS" - ICELAND * </p> * </li> * <li> * <p> * "IN" - INDIA * </p> * </li> * <li> * <p> * "IE" - IRELAND * </p> * </li> * <li> * <p> * "IT" - ITALY * </p> * </li> * <li> * <p> * "JP" - JAPAN * </p> * </li> * <li> * <p> * "KZ" - KAZAKHSTAN * </p> * </li> * <li> * <p> * "KR" - KOREA * </p> * </li> * <li> * <p> * "LV" - LATVIA * </p> * </li> * <li> * <p> * "LI" - LIECHTENSTEIN * </p> * </li> * <li> * <p> * "LT" - LITHUANIA * </p> * </li> * <li> * <p> * "LU" - LUXEMBOURG * </p> * </li> * <li> * <p> * "MK" - MACEDONIA * </p> * </li> * <li> * <p> * "MT" - MALTA * </p> * </li> * <li> * <p> * "MX" - MEXICO * </p> * </li> * <li> * <p> * "MD" - MOLDOVA * </p> * </li> * <li> * <p> * "ME" - MONTENEGRO * </p> * </li> * <li> * <p> * "NL" - NETHERLANDS * </p> * </li> * <li> * <p> * "NZ" - NEW ZEALAND * </p> * </li> * <li> * <p> * "NI" - NICARAGUA * </p> * </li> * <li> * <p> * "NG" - NIGERIA * </p> * </li> * <li> * <p> * "NO" - NORWAY * </p> * </li> * <li> * <p> * "PA" - PANAMA * </p> * </li> * <li> * <p> * "PY" - PARAGUAY * </p> * </li> * <li> * <p> * "PE" - PERU * </p> * </li> * <li> * <p> * "PL" - POLAND * </p> * </li> * <li> * <p> * "PT" - PORTUGAL * </p> * </li> * <li> * <p> * "RO" - ROMANIA * </p> * </li> * <li> * <p> * "RU" - RUSSIA * </p> * </li> * <li> * <p> * "RS" - SERBIA * </p> * </li> * <li> * <p> * "SK" - SLOVAKIA * </p> * </li> * <li> * <p> * "SI" - SLOVENIA * </p> * </li> * <li> * <p> * "ZA" - SOUTH AFRICA * </p> * </li> * <li> * <p> * "ES" - SPAIN * </p> * </li> * <li> * <p> * "SE" - SWEDEN * </p> * </li> * <li> * <p> * "CH" - SWITZERLAND * </p> * </li> * <li> * <p> * "UA" - UKRAINE * </p> * </li> * <li> * <p> * "AE" - UNITED ARAB EMIRATES * </p> * </li> * <li> * <p> * "US" - UNITED STATES * </p> * </li> * <li> * <p> * "UK" - UNITED KINGDOM * </p> * </li> * <li> * <p> * "UY" - URUGUAY * </p> * </li> * <li> * <p> * "VE" - VENEZUELA * </p> * </li> * </ul> * * @param configuration * <b>Weather Index</b> </p> * <p> * To enable the Weather Index, do not specify a value for <code>Configuration</code>. * </p> * <p> * <b>Holidays</b> * </p> * <p> * To enable Holidays, specify a country with one of the following two-letter country codes: * </p> * <ul> * <li> * <p> * "AL" - ALBANIA * </p> * </li> * <li> * <p> * "AR" - ARGENTINA * </p> * </li> * <li> * <p> * "AT" - AUSTRIA * </p> * </li> * <li> * <p> * "AU" - AUSTRALIA * </p> * </li> * <li> * <p> * "BA" - BOSNIA HERZEGOVINA * </p> * </li> * <li> * <p> * "BE" - BELGIUM * </p> * </li> * <li> * <p> * "BG" - BULGARIA * </p> * </li> * <li> * <p> * "BO" - BOLIVIA * </p> * </li> * <li> * <p> * "BR" - BRAZIL * </p> * </li> * <li> * <p> * "BY" - BELARUS * </p> * </li> * <li> * <p> * "CA" - CANADA * </p> * </li> * <li> * <p> * "CL" - CHILE * </p> * </li> * <li> * <p> * "CO" - COLOMBIA * </p> * </li> * <li> * <p> * "CR" - COSTA RICA * </p> * </li> * <li> * <p> * "HR" - CROATIA * </p> * </li> * <li> * <p> * "CZ" - CZECH REPUBLIC * </p> * </li> * <li> * <p> * "DK" - DENMARK * </p> * </li> * <li> * <p> * "EC" - ECUADOR * </p> * </li> * <li> * <p> * "EE" - ESTONIA * </p> * </li> * <li> * <p> * "ET" - ETHIOPIA * </p> * </li> * <li> * <p> * "FI" - FINLAND * </p> * </li> * <li> * <p> * "FR" - FRANCE * </p> * </li> * <li> * <p> * "DE" - GERMANY * </p> * </li> * <li> * <p> * "GR" - GREECE * </p> * </li> * <li> * <p> * "HU" - HUNGARY * </p> * </li> * <li> * <p> * "IS" - ICELAND * </p> * </li> * <li> * <p> * "IN" - INDIA * </p> * </li> * <li> * <p> * "IE" - IRELAND * </p> * </li> * <li> * <p> * "IT" - ITALY * </p> * </li> * <li> * <p> * "JP" - JAPAN * </p> * </li> * <li> * <p> * "KZ" - KAZAKHSTAN * </p> * </li> * <li> * <p> * "KR" - KOREA * </p> * </li> * <li> * <p> * "LV" - LATVIA * </p> * </li> * <li> * <p> * "LI" - LIECHTENSTEIN * </p> * </li> * <li> * <p> * "LT" - LITHUANIA * </p> * </li> * <li> * <p> * "LU" - LUXEMBOURG * </p> * </li> * <li> * <p> * "MK" - MACEDONIA * </p> * </li> * <li> * <p> * "MT" - MALTA * </p> * </li> * <li> * <p> * "MX" - MEXICO * </p> * </li> * <li> * <p> * "MD" - MOLDOVA * </p> * </li> * <li> * <p> * "ME" - MONTENEGRO * </p> * </li> * <li> * <p> * "NL" - NETHERLANDS * </p> * </li> * <li> * <p> * "NZ" - NEW ZEALAND * </p> * </li> * <li> * <p> * "NI" - NICARAGUA * </p> * </li> * <li> * <p> * "NG" - NIGERIA * </p> * </li> * <li> * <p> * "NO" - NORWAY * </p> * </li> * <li> * <p> * "PA" - PANAMA * </p> * </li> * <li> * <p> * "PY" - PARAGUAY * </p> * </li> * <li> * <p> * "PE" - PERU * </p> * </li> * <li> * <p> * "PL" - POLAND * </p> * </li> * <li> * <p> * "PT" - PORTUGAL * </p> * </li> * <li> * <p> * "RO" - ROMANIA * </p> * </li> * <li> * <p> * "RU" - RUSSIA * </p> * </li> * <li> * <p> * "RS" - SERBIA * </p> * </li> * <li> * <p> * "SK" - SLOVAKIA * </p> * </li> * <li> * <p> * "SI" - SLOVENIA * </p> * </li> * <li> * <p> * "ZA" - SOUTH AFRICA * </p> * </li> * <li> * <p> * "ES" - SPAIN * </p> * </li> * <li> * <p> * "SE" - SWEDEN * </p> * </li> * <li> * <p> * "CH" - SWITZERLAND * </p> * </li> * <li> * <p> * "UA" - UKRAINE * </p> * </li> * <li> * <p> * "AE" - UNITED ARAB EMIRATES * </p> * </li> * <li> * <p> * "US" - UNITED STATES * </p> * </li> * <li> * <p> * "UK" - UNITED KINGDOM * </p> * </li> * <li> * <p> * "UY" - URUGUAY * </p> * </li> * <li> * <p> * "VE" - VENEZUELA * </p> * </li> * @return Returns a reference to this object so that method calls can be chained together. */ public AdditionalDataset withConfiguration(java.util.Map<String, java.util.List<String>> configuration) { setConfiguration(configuration); return this; } /** * Add a single Configuration entry * * @see AdditionalDataset#withConfiguration * @returns a reference to this object so that method calls can be chained together. */ public AdditionalDataset addConfigurationEntry(String key, java.util.List<String> value) { if (null == this.configuration) { this.configuration = new java.util.HashMap<String, java.util.List<String>>(); } if (this.configuration.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.configuration.put(key, value); return this; } /** * Removes all the entries added into Configuration. * * @return Returns a reference to this object so that method calls can be chained together. */ public AdditionalDataset clearConfigurationEntries() { this.configuration = null; return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getConfiguration() != null) sb.append("Configuration: ").append(getConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AdditionalDataset == false) return false; AdditionalDataset other = (AdditionalDataset) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getConfiguration() == null ^ this.getConfiguration() == null) return false; if (other.getConfiguration() != null && other.getConfiguration().equals(this.getConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode()); return hashCode; } @Override public AdditionalDataset clone() { try { return (AdditionalDataset) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.forecast.model.transform.AdditionalDatasetMarshaller.getInstance().marshall(this, protocolMarshaller); } }
[ "" ]
c190f57167dbecbcca5c05e3f2c46507a057a9cf
12a1902c34da37be2da6163547dd4bb096e7f399
/src/drug_side_effect_utils/Relation.java
6e0933205f3ea62bacadc143b7ca9690eddc9e20
[]
no_license
foxlf823/drug_side_effect
b21f3bbe9652673f91714d7b395262d5308847e8
3600d99834fd405cff6b0bb2dc52a11373b853fc
refs/heads/master
2021-01-10T11:41:02.303600
2016-09-04T06:24:05
2016-09-04T06:24:05
44,713,320
0
0
null
null
null
null
UTF-8
Java
false
false
1,178
java
package drug_side_effect_utils; import java.io.Serializable; public class Relation implements Serializable{ private static final long serialVersionUID = 1205844430364130631L; public String id; public String type; public String mesh1; public String type1; public String mesh2; public String type2; public Relation(String id, String type, String mesh1, String mesh2) { super(); this.id = id; this.type = type; this.mesh1 = mesh1; this.mesh2 = mesh2; } public Relation() { id = "-1"; type = ""; mesh1 = "-1"; type1 = ""; mesh2 = "-1"; type2 = ""; } @Override public boolean equals(Object obj) { if(obj == null || !(obj instanceof Relation)) return false; Relation o = (Relation)obj; if(o.type.equals(this.type)) { if(o.mesh1.equals(this.mesh1) && o.mesh2.equals(this.mesh2)) return true; else if(o.mesh1.equals(this.mesh2) && o.mesh2.equals(this.mesh1)) return true; else return false; } else return false; } @Override public int hashCode() { return type.hashCode()+mesh1.hashCode()+mesh2.hashCode(); } @Override public String toString() { return mesh1+" "+mesh2+" "+type; } }
[ "foxlf823@qq.com" ]
foxlf823@qq.com
f55830f653aec1c7a97f40bc708c2d0475f78cca
654b5c3e10ab69c2089b832a1c112fde73062a64
/other/kafka4st/src/main/java/poc/kafka/Util.java
2bf1953fa2a78f0fb97e2fcc92babe66cb4b8297
[]
no_license
santoshranjay/reference
7d94d12c712e64cf9825d0c3c3f269f0a184c16d
fe1453b7256af5355436636854c6e7d9693b47ed
refs/heads/master
2021-06-02T20:38:57.471403
2018-03-16T10:19:13
2018-03-16T10:19:13
24,537,017
0
0
null
null
null
null
UTF-8
Java
false
false
1,428
java
package poc.kafka; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.net.ServerSocket; import java.util.Random; class Util { private static final Random RANDOM = new Random(); private Util() { } public static File constructTempDir(String dirPrefix) { File file = new File(System.getProperty("java.io.tmpdir"), dirPrefix + RANDOM.nextInt(10000000)); if (!file.mkdirs()) { throw new RuntimeException("could not create temp directory: " + file.getAbsolutePath()); } file.deleteOnExit(); return file; } public static int getAvailablePort() { try { ServerSocket socket = new ServerSocket(0); try { return socket.getLocalPort(); } finally { socket.close(); } } catch (IOException e) { throw new IllegalStateException("Cannot find available port: " + e.getMessage(), e); } } public static boolean deleteFile(File path) throws FileNotFoundException { if (!path.exists()) { throw new FileNotFoundException(path.getAbsolutePath()); } boolean ret = true; if (path.isDirectory()) { for (File f : path.listFiles()) { ret = ret && deleteFile(f); } } return ret && path.delete(); } }
[ "santoshranjay@rediffmail.com" ]
santoshranjay@rediffmail.com
7589d95b19c6e45656eec7cb81d04f560bdf827e
6e34f7af6a6fbb8f50dccc2aaef71697ce52bf90
/app/src/main/java/com/template/domain/usecases/common/InteractorExecutorImpl.java
777b64e744ddba33b6df8db0cb06d5d4650ad818
[]
no_license
mamorenoa/template-mvp
15ce70cb57b09bd5c64f866b1e6afc247fae0ea5
eefa2a24b16811fec63aa01164a0b6a3c36a7429
refs/heads/master
2021-03-30T21:16:03.515130
2018-03-09T08:55:06
2018-03-09T08:55:06
124,512,072
0
0
null
null
null
null
UTF-8
Java
false
false
1,402
java
package com.template.domain.usecases.common; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.Future; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; public class InteractorExecutorImpl implements InteractorExecutor { private static final int POOL_SIZE = 3; private static final int MAX_POOL_SIZE = 6; private static final int TIMEOUT = 15; private ThreadPoolExecutor threadPoolExecutor; private List<Future> runnableList = new ArrayList<>(); public InteractorExecutorImpl() { threadPoolExecutor = new ThreadPoolExecutor(POOL_SIZE, MAX_POOL_SIZE, TIMEOUT, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(MAX_POOL_SIZE)); } public void execute(final BaseInteractor interactor) { execute(interactor, true); } public void execute(final BaseInteractor interactor, boolean cancelable) { Future future = threadPoolExecutor.submit(new Runnable() { @Override public void run() { interactor.executeInteractor(); } }); if (cancelable) { runnableList.add(future); } } public void stopInteractors() { for (Future future : runnableList) { future.cancel(true); } runnableList.clear(); } }
[ "cx02103@MacBook-Pro-3.local" ]
cx02103@MacBook-Pro-3.local
757f28d0b1becc7c77c0eba787e83c85fd5f614c
9946dd333b51137a9b341f05b1fa1db25b03e2a8
/dao-impl-db/src/main/java/com/github/maximkirko/testing/daodb/entitytomap/GradeToMap.java
58a97f9af13c47d58af2549c162a1390af926f9c
[]
no_license
MaksimKirko/training_2016_testing
96733928313b794d9ab5ba9d75a6f438eae19828
097c76eb8906c23745d37c4f90ee0abb4d475847
refs/heads/master
2021-06-10T03:24:17.298815
2016-12-20T14:28:02
2016-12-20T14:28:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
554
java
package com.github.maximkirko.testing.daodb.entitytomap; import java.util.HashMap; import java.util.Map; import com.github.maximkirko.testing.datamodel.models.Grade; public class GradeToMap implements IEntityToMap<Grade> { @Override public Map<String, Object> convert(Grade entity) { Map<String, Object> params = new HashMap<String, Object>(); params.put("mark", entity.getMark()); params.put("user_id", entity.getUser().getId()); params.put("quiz_id", entity.getQuiz().getId()); params.put("id", entity.getId()); return params; } }
[ "30max30max@gmail.com" ]
30max30max@gmail.com
4e9af20948018c416abee3827c0a053436d9ff1b
a2fcac776b8fe2f1e358fd96c65189c12762707c
/molgenis-core/src/main/java/org/molgenis/framework/server/services/MolgenisDataTableService.java
1d8077901f699441f85d4404adc9b1e61648fc36
[]
no_license
joerivandervelde/molgenis-legacy
b7895454d44adcf555eb21b00cd455b886d22998
51ac5e84c2364e781cde9417c4350ec287951f1a
refs/heads/master
2020-12-25T09:00:49.940877
2015-10-13T06:48:52
2015-10-13T06:48:52
4,674,333
0
0
null
null
null
null
UTF-8
Java
false
false
3,827
java
package org.molgenis.framework.server.services; import java.io.IOException; import java.io.PrintWriter; import java.text.ParseException; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; import org.molgenis.framework.db.Database; import org.molgenis.framework.db.DatabaseException; import org.molgenis.framework.db.Query; import org.molgenis.framework.server.MolgenisContext; import org.molgenis.framework.server.MolgenisRequest; import org.molgenis.framework.server.MolgenisResponse; import org.molgenis.framework.server.MolgenisService; import org.molgenis.util.Entity; import com.google.gson.JsonArray; import com.google.gson.JsonObject; /** Service to serve entities for datatable */ public class MolgenisDataTableService implements MolgenisService { Logger logger = Logger.getLogger(MolgenisDataTableService.class); // private MolgenisContext mc; public MolgenisDataTableService(MolgenisContext mc) { // this.mc = mc; } /** * Handle use of the XREF API. * * * @param request * @param response */ @Override public void handleRequest(MolgenisRequest req, MolgenisResponse res) throws ParseException, DatabaseException, IOException { HttpServletResponse response = res.getResponse(); try { response.setHeader("Cache-Control", "max-age=0"); // allow no client response.setContentType("application/json"); if (req.isNull("entity")) { throw new Exception("required parameter 'entity' is missing"); } // get parameters Class<? extends Entity> entityClass = req.getDatabase().getClassForName(req.getString("entity")); // iDisplayLenght = limit int iDisplayLength = 10; if (!req.isNull("iDisplayLength")) { iDisplayLength = req.getInt("iDisplayLength"); } // iDisplayStart = offset int iDisplayStart = 0; if (!req.isNull("iDisplayStart")) { iDisplayStart = req.getInt("iDisplayStart"); } // create a query on entity Database db = req.getDatabase(); Query<?> q = db.query(entityClass); // sorting // iSortCol_0 = sort column number // resolve using mDataProp_1='name' String sortField = req.getString("mDataProp_" + req.getString("iSortCol_0")); boolean asc = "asc".equals(req.getString("sSortDir_0")) ? true : false; if (asc) q.sortASC(sortField); else q.sortDESC(sortField); // iTotalRecords is unfiltered count! int count = q.count(); // sSearch = filtering string if (!"".equals(req.getString("sSearch"))) { q.search(req.getString("sSearch")); } // filtered count int filteredCount = q.count(); // iTotalDisplayRecords is filtered count // TODO implement filters q.offset(iDisplayStart); q.limit(iDisplayLength); List<? extends Entity> result = q.find(); JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("sEcho", req.getString("sEcho")); jsonObject.addProperty("iTotalRecords", count); jsonObject.addProperty("iTotalDisplayRecords", filteredCount); JsonArray jsonArray = new JsonArray(); for (Entity e : result) { JsonObject jsonValues = new JsonObject(); for (String field : e.getFields()) { if (e.get(field) != null) jsonValues.addProperty(field, e.get(field).toString()); else jsonValues.addProperty(field, ""); } jsonArray.add(jsonValues); } jsonObject.add("aaData", jsonArray); String json = jsonObject.toString(); logger.debug(json); // write out PrintWriter out = response.getWriter(); System.out.println("json\n" + json); out.print(json); out.close(); } catch (Exception e) { PrintWriter out = response.getWriter(); response.getWriter().print("{exception: '" + e.getMessage() + "'}"); out.close(); e.printStackTrace(); throw new DatabaseException(e); } } }
[ "d.hendriksen@umcg.nl" ]
d.hendriksen@umcg.nl
c3a0fc89afa0d2e3033580c0458d91598fb294a3
6d3453097b0fe8c7fb4c847b8a5d0575513b8742
/src/cn/wsxter/Service/ImageService.java
96cd02973c70e9874cd18f909081ca4b0c132247
[]
no_license
wsxter/graduationProgect-travelknow
12ca5e5ffcab8f87554952dd321e0275a04540cc
57c4529742012f62bfe8dcde8df93f9ebfce01fa
refs/heads/master
2022-12-28T03:01:55.055377
2020-06-25T06:34:28
2020-06-25T06:34:28
247,086,161
2
0
null
2020-10-14T00:33:11
2020-03-13T14:09:06
JavaScript
UTF-8
Java
false
false
135
java
package cn.wsxter.Service; import cn.wsxter.domain.Image; public interface ImageService { public void instrImage(Image image); }
[ "xutian583307987@gmail.com" ]
xutian583307987@gmail.com
68bf09bbef8c91e41e723069afac1f73f74a1d33
374e7f81e7b59496730e6b6a558b570223c02c47
/src/assignment4/Number21.java
a8f215e2d18d0916166681a489c68319bd3b1034
[]
no_license
lakpashonasherpa/Assignment
4d30d9ef153fd7f10cc8006c3aa9a36e4f3660e4
e6ea400f5de0d36fd3e3f2534cf317e3baebef1c
refs/heads/master
2022-12-01T16:55:34.542120
2020-07-24T00:52:09
2020-07-24T00:52:09
274,710,141
0
0
null
null
null
null
UTF-8
Java
false
false
1,021
java
package assignment4; import javax.swing.JOptionPane; //21.Program to input the number of (1...7) and translate to its equivalent name of the day of the week. public class Number21 { public static void main(String[] args) { String s=JOptionPane.showInputDialog("Enter the number to see the equivalent name of the week"); //int num=Integer.parseInt(s); if(s!=null) { int num=Integer.parseInt(s); switch(num) { case 1: JOptionPane.showMessageDialog(null, "Monday"); break; case 2: JOptionPane.showMessageDialog(null, "Tuesday"); break; case 3: JOptionPane.showMessageDialog(null, "Wednesday"); break; case 4: JOptionPane.showMessageDialog(null, "Thrusday"); break; case 5: JOptionPane.showMessageDialog(null, "Friday"); break; case 6: JOptionPane.showMessageDialog(null, "Saturday"); break; case 7: JOptionPane.showMessageDialog(null, "Sunday"); break; default: System.out.println("Enter the number valid number "); break; } } } }
[ "lakpashonasherpa@gmail.com" ]
lakpashonasherpa@gmail.com
27fdfeeab78a03bfcb9bb35269cce02ce77cd104
163fcbe4cfd35a43f2ac65032c410b0d8804ddd6
/app/src/main/java/com/weixinlite/android/util/Gettime.java
8d3c32f99f5b581991178fb3bf530a15deb995c3
[ "Apache-2.0" ]
permissive
chriswangdev/Weixinlite
6ca88738c18929bf6678b4b641ad2841243131c9
081b22007c7b7d96ff66686a8a8c45a8e57f47ba
refs/heads/master
2021-06-14T00:52:02.746280
2017-04-10T03:25:31
2017-04-10T03:25:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,103
java
package com.weixinlite.android.util; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; /** * Created by a on 2017/3/30 0030. */ public class Gettime { private static SimpleDateFormat simpleDateFormat; private static Date curDate; public static String getNowTime () { simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); curDate = new Date(System.currentTimeMillis()); return simpleDateFormat.format(curDate); } public static long getDiffer(String timeaffter, String timebefore) { return (getLongTime(timeaffter) - getLongTime(timebefore)); } public static long getLongTime(String time) { long timelong = 0; if (simpleDateFormat == null) { simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); } try { Date date = simpleDateFormat.parse(time); timelong = date.getTime(); } catch (ParseException e) { e.printStackTrace(); } return timelong; } }
[ "tony@gmail.com" ]
tony@gmail.com
2cef059a1de7a26bb29d204214dfe225036dfed8
756b56977aebe474633283d493bf91df52010673
/app/src/androidTest/java/com/hjm/notificationchanneltester/ExampleInstrumentedTest.java
6bbc2a3d24ab0900da1ad7a0a229588b72a4fa8c
[ "MIT" ]
permissive
hshiozawa/NotificationChannelTester
148641cc1a5fc277d0d9009679f0b5fde02bc70b
5ff2842965697f4f68737c300fe438de8e502c41
refs/heads/master
2021-08-22T19:18:26.765608
2017-12-01T01:52:54
2017-12-01T01:52:54
112,555,346
0
0
null
null
null
null
UTF-8
Java
false
false
770
java
package com.hjm.notificationchanneltester; 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.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.hjm.notificationchanneltester", appContext.getPackageName()); } }
[ "shiozawa@ripplex.com" ]
shiozawa@ripplex.com
a33f5b06b394ea56e7c9109713dff951e3b7eb03
1a4f5a8d250ebc7d7a8c9a13dda0de9a65e6254c
/tdt4100/src/objektstrukturer/saveInterface.java
b21ec9b7645fc4b5b4055729f071d68c725b335f
[ "Apache-2.0" ]
permissive
mariusmoe/tdt4100
8a23e4cea9943132fba23468dfc227434b9e082e
44ce738bfd25e6769089c59ba5d1e97196d78920
refs/heads/master
2020-06-04T21:08:04.844593
2015-08-27T07:51:43
2015-08-27T07:51:43
29,488,675
0
0
null
null
null
null
UTF-8
Java
false
false
138
java
package objektstrukturer; public interface saveInterface { String openFile(); Boolean getIsSave(); void saveFile(String s); }
[ "mariusomoe@gmail.com" ]
mariusomoe@gmail.com
75f41437207aaea434ea13b22a56a934d9ffe46e
8e232f7170a088f729074d7d9b8e41913fefd6da
/src/main/java/com/maestro/config/WebSecurityConfig.java
d57d80727c46a0b475119a5240adb18bb2bfd19f
[]
no_license
williamMDsilva/java-api-jwt
37b9bbc2f42031e7bf53933fc03b9292fb1ec1b2
773dad949d2c23d86a72185e52dc15f52e7ac8c3
refs/heads/master
2022-06-30T02:35:26.967092
2020-03-11T00:33:56
2020-03-11T00:33:56
263,965,523
0
0
null
2020-05-14T16:19:49
2020-05-14T16:18:52
Java
UTF-8
Java
false
false
2,738
java
package com.maestro.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import javax.annotation.Resource; @Configuration @EnableWebSecurity //@EnableGlobalMethodSecurity(securedEnabled = true) @EnableGlobalMethodSecurity(prePostEnabled = true) public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private UserDetailsService userDetailsService; @Autowired private JwtAuthenticationEntryPoint unauthorizedHandler; @Override @Bean public AuthenticationManager authenticationManagerBean() throws Exception { return super.authenticationManagerBean(); } @Autowired public void globalUserDetails(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(userDetailsService) .passwordEncoder(encoder()); } @Bean public JwtAuthenticationFilter authenticationTokenFilterBean() throws Exception { return new JwtAuthenticationFilter(); } @Override protected void configure(HttpSecurity http) throws Exception { http.cors().and().csrf().disable(). authorizeRequests() .antMatchers("/token/*", "/signup").permitAll() .anyRequest().authenticated() .and() .exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and() .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); http .addFilterBefore(authenticationTokenFilterBean(), UsernamePasswordAuthenticationFilter.class); } @Bean public BCryptPasswordEncoder encoder(){ return new BCryptPasswordEncoder(); } }
[ "william.moreirasilva@hotmail.com" ]
william.moreirasilva@hotmail.com
32a2e361bfc99ae8d4c37a75e0f679a02c72e793
b7fe1391e2203b5a1e9bb3c8a36d56e356e85c08
/src/main/java/nishantshinde/dojo/core/PrimitivesAndWrappersTest.java
7c51435be90a38e633e3cd93e20150710e789729
[]
no_license
nishantshinde/dojo
8b6c5feb2bf6ed9709e877374c5a59a52f83b288
03732296433cd244b3b320e4256674b1ac0e7182
refs/heads/master
2020-12-25T09:58:33.495601
2016-05-22T20:54:54
2016-05-22T20:54:54
57,144,488
0
0
null
null
null
null
UTF-8
Java
false
false
230
java
package nishantshinde.dojo.core; import java.io.ByteArrayOutputStream; public class PrimitivesAndWrappersTest { public static void main(String[] args) { Character d1 = 65; System.out.println(++d1); } }
[ "nishantshinde@gmail.com" ]
nishantshinde@gmail.com
9c016e405154f620e511ce186684f8bd5f1bca0d
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app98/source/nl/siegmann/epublib/domain/Identifier.java
96c1ac1ecc58e897b66f9b5f31df8065a54c3280
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
2,635
java
package nl.siegmann.epublib.domain; import java.io.Serializable; import java.util.Iterator; import java.util.List; import java.util.UUID; import nl.siegmann.epublib.util.StringUtil; public class Identifier implements Serializable { private static final long serialVersionUID = 955949951416391810L; private boolean bookId = false; private String scheme; private String value; public Identifier() { this("UUID", UUID.randomUUID().toString()); } public Identifier(String paramString1, String paramString2) { this.scheme = paramString1; this.value = paramString2; } public static Identifier getBookIdIdentifier(List<Identifier> paramList) { Object localObject2; if ((paramList == null) || (paramList.isEmpty())) { localObject2 = null; } Object localObject1; do { return localObject2; localObject2 = null; Iterator localIterator = paramList.iterator(); do { localObject1 = localObject2; if (!localIterator.hasNext()) { break; } localObject1 = (Identifier)localIterator.next(); } while (!((Identifier)localObject1).isBookId()); localObject2 = localObject1; } while (localObject1 != null); return (Identifier)paramList.get(0); } public boolean equals(Object paramObject) { if (!(paramObject instanceof Identifier)) { return false; } if ((StringUtil.equals(this.scheme, ((Identifier)paramObject).scheme)) && (StringUtil.equals(this.value, ((Identifier)paramObject).value))) {} for (boolean bool = true;; bool = false) { return bool; } } public String getScheme() { return this.scheme; } public String getValue() { return this.value; } public int hashCode() { return StringUtil.defaultIfNull(this.scheme).hashCode() ^ StringUtil.defaultIfNull(this.value).hashCode(); } public boolean isBookId() { return this.bookId; } public void setBookId(boolean paramBoolean) { this.bookId = paramBoolean; } public void setScheme(String paramString) { this.scheme = paramString; } public void setValue(String paramString) { this.value = paramString; } public String toString() { if (StringUtil.isBlank(this.scheme)) { return "" + this.value; } return "" + this.scheme + ":" + this.value; } public static abstract interface Scheme { public static final String ISBN = "ISBN"; public static final String URI = "URI"; public static final String URL = "URL"; public static final String UUID = "UUID"; } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
cb690941b95564627fe1ce4ae868884fd0ff4820
fdd78f5e692be40ecb69dcfdbdfb67f0c6a2c8c8
/src/main/java/egovframework/example/admin/sidebar/applyandoffer/dao/AdminOfferMapper.java
b9356c9b2fcb77536e7de8865efe24242396fe1b
[]
no_license
BKJang/jobQ
6db0ce3302ee1d28249167ec1c3ed19fe323117a
da8f28f2fb6cb1e7f8b11eec617bab203af937c1
refs/heads/master
2020-03-28T19:41:47.220236
2018-09-16T14:32:50
2018-09-16T14:32:50
149,000,856
4
0
null
null
null
null
UTF-8
Java
false
false
388
java
package egovframework.example.admin.sidebar.applyandoffer.dao; import java.util.Map; import egovframework.example.admin.cmmn.board.BoardSearch; import egovframework.example.admin.cmmn.board.BoardSelect; import egovframework.rte.psl.dataaccess.mapper.Mapper; @Mapper public interface AdminOfferMapper extends BoardSelect, BoardSearch{ public Map<String, String> getDetail(int no); }
[ "jp302119@gmail.com" ]
jp302119@gmail.com
c3b7d91327f5100d5eefa9d89d0e29e8c88ba131
8240b63a21bcabe3b951424d4b6ac7cfa6c3c5a4
/app/src/main/java/com/maha/leviathan/pockettemple/AddPura.java
669859b8d049a2c2f7b6b0c223bea9a18443e70b
[]
no_license
mahasadhu/PocketTemple
92da202d12abf5eb353a72eed6b2ec7403611b57
7019367a5c261b7db28d0f5edf838315a3b4af0b
refs/heads/master
2021-01-19T06:20:12.897949
2015-09-13T06:26:25
2015-09-13T06:26:25
41,196,974
0
0
null
null
null
null
UTF-8
Java
false
false
15,957
java
package com.maha.leviathan.pockettemple; import android.app.Activity; import android.app.Fragment; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Bundle; import android.os.Parcelable; import android.support.annotation.Nullable; import android.util.Log; import android.view.InflateException; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.Spinner; import android.widget.Toast; import com.afollestad.materialdialogs.AlertDialogWrapper; import com.android.volley.DefaultRetryPolicy; import com.android.volley.Request; import com.android.volley.Response; import com.android.volley.RetryPolicy; import com.android.volley.VolleyError; import com.android.volley.VolleyLog; import com.android.volley.toolbox.JsonArrayRequest; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapFragment; import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.Marker; import com.google.android.gms.maps.model.MarkerOptions; import com.maha.leviathan.pockettemple.controller.PocketTempleController; import com.maha.leviathan.pockettemple.objects.Desa; import com.maha.leviathan.pockettemple.objects.Karakterisasi; import com.maha.leviathan.pockettemple.other.CustomRequest; import com.maha.leviathan.pockettemple.other.Utility; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import nl.changer.polypicker.Config; import nl.changer.polypicker.ImagePickerActivity; /** * Created by Leviathan on 7/1/2015. */ public class AddPura extends Fragment implements OnMapReadyCallback { private static View view; EditText nama, alamat, deskripsi; Spinner karakterisasi, desa; Button save, addfoto; final String TAG = Main.class.getSimpleName(); ArrayList<String> listKarak = new ArrayList<String>(); ArrayList<Karakterisasi> karakterisasis = new ArrayList<Karakterisasi>(); ArrayList<String> listDesa = new ArrayList<String>(); ArrayList<Desa> desas= new ArrayList<Desa>(); GoogleMap googleMap; Marker marker; Utility utility; JsonArrayRequest getKarak, getDesa; CustomRequest addPura; Activity mActivity; String idKarak, idDesa; SharedPreferences sharedPreferences; ProgressDialog pDialog; int sudah = 0; int INTENT_REQUEST_GET_IMAGES = 10; @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == Activity.RESULT_OK) { if (requestCode == INTENT_REQUEST_GET_IMAGES) { Parcelable[] parcelableUris = data.getParcelableArrayExtra(ImagePickerActivity.EXTRA_IMAGE_URIS); if (parcelableUris == null) { return; } // Java doesn't allow array casting, this is a little hack Uri[] uris = new Uri[parcelableUris.length]; System.arraycopy(parcelableUris, 0, uris, 0, parcelableUris.length); if (uris != null) { for (Uri uri : uris) { Log.e("INI LIST GAMBAR", " uri: " + uri); // mMedia.add(uri); } // showMedia(); } } } } @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (view != null) { ViewGroup parent = (ViewGroup) view.getParent(); if (parent != null) parent.removeView(view); } try { view = inflater.inflate(R.layout.addpura_layout, container, false); } catch (InflateException e){ } pDialog = new ProgressDialog(mActivity); pDialog.setMessage("Loading..."); pDialog.show(); MapFragment mapFragment = (MapFragment) getFragmentManager() .findFragmentById(R.id.fragmentMapAddPura); mapFragment.getMapAsync(this); googleMap = mapFragment.getMap(); Log.e("latitude", String.valueOf(Utility.lat)); Log.e("longitude", String.valueOf(Utility.lng)); googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(Utility.lat, Utility.lng), 17)); if (marker != null){ marker = null; } marker = googleMap.addMarker(new MarkerOptions() .title("New Pura") .snippet("") .icon(BitmapDescriptorFactory.fromResource(R.drawable.puramarker)) .position(new LatLng(Utility.lat, Utility.lng)) ); sharedPreferences = mActivity.getSharedPreferences(getString(R.string.sharedprefname), Context.MODE_PRIVATE); nama = (EditText) view.findViewById(R.id.editTextNamaPuraInsert); alamat = (EditText) view.findViewById(R.id.editTextAlamatPuraInsert); deskripsi = (EditText) view.findViewById(R.id.editTextDeskripsiInsert); karakterisasi = (Spinner) view.findViewById(R.id.spinnerKarakterisasiInsert); desa = (Spinner) view.findViewById(R.id.spinnerDesaInsert); save = (Button) view.findViewById(R.id.buttonInsertData); addfoto = (Button) view.findViewById(R.id.buttonAddFoto); String url1 = "http://" + Utility.servernya + "/sipura/includes/web-services.php?flag=getKarak"; String url2 = "http://" + Utility.servernya + "/sipura/includes/web-services.php?flag=getDesa&address="+String.valueOf(Utility.lat)+","+String.valueOf(Utility.lng); Log.e("URL", url2); final String url3 = "http://" + Utility.servernya + "/sipura/includes/web-services.php?flag=mobileAddPura"; utility = new Utility(); save.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (!nama.getText().toString().equals("") && !alamat.getText().toString().equals("") && !deskripsi.getText().toString().equals("")) { final Map<String, String> post = new HashMap<String, String>(); final AlertDialogWrapper.Builder dialog = new AlertDialogWrapper.Builder(mActivity); dialog.setPositiveButton("Ok", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); mActivity.onBackPressed(); } }); dialog.setCancelable(false); post.put("lat", String.valueOf(Utility.lat)); post.put("lng", String.valueOf(Utility.lng)); post.put("nama_pura", nama.getText().toString()); post.put("alamat", alamat.getText().toString()); post.put("deskripsi", deskripsi.getText().toString()); post.put("id_kar", idKarak); post.put("id_desa", idDesa); post.put("iduser", sharedPreferences.getString("id", "null")); pDialog = new ProgressDialog(getActivity()); pDialog.setMessage("Loading..."); pDialog.show(); addPura = new CustomRequest(Request.Method.POST, url3, post, new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { try { String resStr = response.getString("status"); Log.e("STATUS", resStr); pDialog.dismiss(); if (resStr.equals("OK")) { dialog.setTitle("Data Saved. Please Wait for Admin approval"); dialog.setMessage("Please use the web application to add more detailed data."); dialog.show(); // mActivity.onBackPressed(); // Toast.makeText(mActivity, "Data Saved", Toast.LENGTH_SHORT).show(); } else if (resStr.equals("FAIL")) { Toast.makeText(mActivity, "Failed to Save Data", Toast.LENGTH_SHORT).show(); } } catch (JSONException e) { e.printStackTrace(); } // Log.e("RESPONSE INSERT", resStr); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { VolleyLog.d(TAG, "Error: " + error.getMessage()); utility.repeatRequestVolley(null, addPura, null, mActivity); Log.e("VOLLEY", error.toString()); } }); PocketTempleController.getInstance().addToRequestQueue(addPura); } else { Toast.makeText(mActivity, "Please Fill All Data", Toast.LENGTH_SHORT).show(); } } }); addfoto.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(mActivity, ImagePickerActivity.class); Config config = new Config.Builder() .setTabBackgroundColor(R.color.white) .setTabSelectionIndicatorColor(R.color.blue) .setCameraButtonColor(R.color.green) .setSelectionLimit(10) .build(); ImagePickerActivity.setConfig(config); startActivityForResult(intent, INTENT_REQUEST_GET_IMAGES); } }); getKarak = new JsonArrayRequest(url1, new Response.Listener<JSONArray>() { @Override public void onResponse(JSONArray response) { for (int i = 0; i<response.length(); i++){ try { JSONObject jsonObject = response.getJSONObject(i); Karakterisasi karakterisasi = new Karakterisasi(); karakterisasi.setIdKarakterisasi(jsonObject.getString("id")); karakterisasi.setKarakterisasi(jsonObject.getString("karakterisasi")); karakterisasis.add(karakterisasi); listKarak.add(jsonObject.getString("karakterisasi")); } catch (JSONException e) { e.printStackTrace(); } } karakterisasi.setAdapter(new ArrayAdapter<String>(mActivity, android.R.layout.simple_spinner_dropdown_item, listKarak)); karakterisasi.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { idKarak = karakterisasis.get(position).getIdKarakterisasi(); // String idSpin = karakterisasis.get(position).getIdKarakterisasi(); // String karakSpin = karakterisasis.get(position).getKarakterisasi(); // Log.e("IDDARISPINNER", idSpin); // Log.e("KARAKDARISPINNER", karakSpin); } @Override public void onNothingSelected(AdapterView<?> parent) { } }); sudah++; if (sudah == 2){ pDialog.dismiss(); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { VolleyLog.d(TAG, "Error: " + error.getMessage()); utility.repeatRequestVolley(getKarak, null, null, mActivity); } }); getDesa = new JsonArrayRequest(url2, new Response.Listener<JSONArray>() { @Override public void onResponse(JSONArray response) { for (int i = 0; i<response.length(); i++){ try { JSONObject jsonObject = response.getJSONObject(i); Desa desa = new Desa(); desa.setIdDesa(jsonObject.getString("id")); desa.setDesa(jsonObject.getString("desa")); desas.add(desa); listDesa.add(jsonObject.getString("desa")); } catch (JSONException e) { e.printStackTrace(); } } desa.setAdapter(new ArrayAdapter<String>(mActivity, android.R.layout.simple_spinner_dropdown_item, listDesa)); desa.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { idDesa = desas.get(position).getIdDesa(); // String idSpin = desas.get(position).getIdDesa(); // String karakSpin = desas.get(position).getDesa(); // Log.e("IDDARISPINNER", idSpin); // Log.e("KARAKDARISPINNER", karakSpin); } @Override public void onNothingSelected(AdapterView<?> parent) { } }); sudah++; if (sudah == 2){ pDialog.dismiss(); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { VolleyLog.d(TAG, "Error: " + error.getMessage()); utility.repeatRequestVolley(getDesa, null, null, mActivity); Log.e("ERRORDESA", error.toString()); } }); int socketTimeout = 30000; RetryPolicy policy = new DefaultRetryPolicy(socketTimeout, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT); getDesa.setRetryPolicy(policy); PocketTempleController.getInstance().addToRequestQueue(getKarak); PocketTempleController.getInstance().addToRequestQueue(getDesa); return view; } @Override public void onDestroy() { super.onDestroy(); marker.remove(); marker = null; } @Override public void onMapReady(GoogleMap googleMap) { } @Override public void onAttach(Activity activity) { super.onAttach(activity); mActivity = activity; if (Utility.lat == 3000 && Utility.lng == 3000){ Toast.makeText(mActivity, "Haven't found your location. Please Wait.", Toast.LENGTH_SHORT).show(); mActivity.onBackPressed(); } } }
[ "agus.mahasadhu@gmail.com" ]
agus.mahasadhu@gmail.com
9bbd7e9c5b9d5c7399859725f6fab865bc557085
6edc8b61e62cfdd00ddcbc96009a7aa0e2ece112
/src/main/java/com/reference/backendreference/config/SwaggerConfig.java
a8782a699ea7b85b4d3fcda36b95125a9862bfd5
[]
no_license
harshpatil/backend-reference-external-calls
933c39426dbfb288c9fbc2fa3b6a861eb24b851b
6952f53b7eb1dc9d0d692155d6c6ca3ba6e658f1
refs/heads/master
2021-08-28T00:38:46.168559
2017-12-10T22:19:20
2017-12-10T22:19:20
113,390,513
0
0
null
null
null
null
UTF-8
Java
false
false
891
java
package com.reference.backendreference.config; import com.google.common.base.Predicates; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; @Configuration @EnableSwagger2 public class SwaggerConfig { @Bean public Docket api(){ return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.reference.backendreference.controller")) .paths(Predicates.not(PathSelectors.regex("/error.*"))) .build(); } }
[ "patil.bmsce@gmail.com" ]
patil.bmsce@gmail.com
4ca8856b2198b61acde9cbfa73f7cd5a178fa805
0827f79059f68016504f579ec78a0951d3fbcfcd
/test-mainapp/app/Global.java
4ecffb156b8a29677ff8f4e5c825c169e6d9c1f1
[]
no_license
RuslanYanyuk/example
1406e35d63c4819b7490e050620b4e6ec2c0ddc6
e90577eb9ec05c2b9aee58c08d3ec64e9092c5fa
refs/heads/master
2021-01-10T15:31:42.551152
2015-02-06T12:45:43
2015-02-06T12:45:43
49,966,007
0
0
null
null
null
null
UTF-8
Java
false
false
883
java
import pages.usermgmt.LoginPageTemplateContainer; import pages.usermgmt.LogoutPageTemplateContainer; import pages.usermgmt.AdministrationPageTemplateContainer; import pages.usermgmt.PageTemplate; import play.Application; import play.GlobalSettings; import play.twirl.api.Html; import views.html.*; public class Global extends GlobalSettings { @Override public void onStart(Application app) { PageTemplate customTemplate = createCustomTemplate(); LoginPageTemplateContainer.getInstance().setPageTemplate(customTemplate); LogoutPageTemplateContainer.getInstance().setPageTemplate(customTemplate); AdministrationPageTemplateContainer.getInstance().setPageTemplate(customTemplate); } private static PageTemplate createCustomTemplate(){ return new PageTemplate() { @Override public Html render(Html content) { return main.render(content); } }; } }
[ "dgmilkyway@wds.co" ]
dgmilkyway@wds.co
9ed3d65613872ef8e16b87026018d6792d1541c7
e54bc53c7381551cbf0d3837705d30ed301c106e
/study-shiro-web/src/main/java/com/bage/constant/Constants.java
c9b658c717cc520c21782c5df1ed9cd4326531cd
[]
no_license
bage2014/study
8e72f85a02d63f957bf0b6d83955a8e5abe50fc7
bb124ef5fc4f8f7a51dba08b5a5230bc870245d0
refs/heads/master
2023-08-25T18:36:31.609362
2023-08-25T10:41:15
2023-08-25T10:41:15
135,044,737
347
87
null
2022-12-17T06:21:05
2018-05-27T12:35:53
Java
UTF-8
Java
false
false
126
java
package com.bage.constant; public class Constants { public static final String param_key_limit_resources = "resources"; }
[ "893542907@qq.com" ]
893542907@qq.com
1f7242f890de5d8cf8dc7f841119d874440ff780
16beaac3e52b21dda9b8ef85d4bbc0933cd532af
/src/main/java/com/bookpills/web/rest/errors/ErrorConstants.java
fb8a4468d4459a3cac1eb34125530261f3db32aa
[ "MIT" ]
permissive
rmpietro/bp
d8e71a2d2e748434651ecd92433adadb92dc5a29
0a8b80c1118a3c6c28fb7b5a3720a749dfe98632
refs/heads/master
2020-03-18T00:02:17.858439
2018-05-19T15:41:50
2018-05-19T15:41:50
134,074,741
0
0
null
null
null
null
UTF-8
Java
false
false
1,109
java
package com.bookpills.web.rest.errors; import java.net.URI; public final class ErrorConstants { public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure"; public static final String ERR_VALIDATION = "error.validation"; public static final String PROBLEM_BASE_URL = "http://www.jhipster.tech/problem"; public static final URI DEFAULT_TYPE = URI.create(PROBLEM_BASE_URL + "/problem-with-message"); public static final URI CONSTRAINT_VIOLATION_TYPE = URI.create(PROBLEM_BASE_URL + "/constraint-violation"); public static final URI PARAMETERIZED_TYPE = URI.create(PROBLEM_BASE_URL + "/parameterized"); public static final URI INVALID_PASSWORD_TYPE = URI.create(PROBLEM_BASE_URL + "/invalid-password"); public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used"); public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used"); public static final URI EMAIL_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/email-not-found"); private ErrorConstants() { } }
[ "rodrigo.mastropietro@sap.com" ]
rodrigo.mastropietro@sap.com
287dbeeb27abf956ae2a97088153098258ffc087
8b793a10342c8b8b3770e25ad9fe9bdbd1894ba3
/src/model/elites/deadnought/Dreadnought.java
c1833e2821702d66413081a6849e59d91a9b4101
[]
no_license
SneakyShrike/space-marine-army-builder
5232424d6ff33813c5d4399ba90cf48eec401745
76a7b7bb6cd531d8e2e52e72d28af670afe39629
refs/heads/master
2022-03-02T04:12:55.291972
2019-11-19T17:26:45
2019-11-19T17:26:45
111,225,771
4
0
null
null
null
null
UTF-8
Java
false
false
2,208
java
package model.elites.deadnought; import model.Unit; import model.wargear.weapon.WeaponList; public class Dreadnought extends Unit { protected int frontArmour, sideArmour, rearArmour, hitPoints; public Dreadnought() { super(); unitName = "Dreadnought Squad"; weapon = WeaponList.getDreadnoughtWeapon("Multi-Melta"); weaponTwo = WeaponList.getDreadnoughtWeapon("Power Fist With Built-In Storm Bolter"); points = 100 + weapon.getWeaponPoints() + weaponTwo.getWeaponPoints(); weaponSkill = 4; ballisticSkill = 4; strength = 6; frontArmour = 12; sideArmour = 12; rearArmour = 10; initiative = 4; attacks = 1; hitPoints = 3; unitWeaponsList.add(WeaponList.getDreadnoughtWeapon("Multi-Melta")); unitWeaponsList.add(WeaponList.getDreadnoughtWeapon("Twin-Linked Autocannon")); unitWeaponsList.add(WeaponList.getDreadnoughtWeapon("Twin-Linked Heavy Bolter")); unitWeaponsList.add(WeaponList.getDreadnoughtWeapon("Twin-Linked Heavy Flamer")); unitWeaponsList.add(WeaponList.getDreadnoughtWeapon("Plasma Cannon")); unitWeaponsList.add(WeaponList.getDreadnoughtWeapon("Assault Cannon")); unitWeaponsList.add(WeaponList.getDreadnoughtWeapon("Twin-Linked Lascannon")); unitSecondWeaponsList.add(WeaponList.getDreadnoughtWeapon("Missile Launcher")); unitSecondWeaponsList.add(WeaponList.getDreadnoughtWeapon("Power Fist With Built-In Heavy Flamer")); unitSecondWeaponsList.add(WeaponList.getDreadnoughtWeapon("Power Fist With Built-In Storm Bolter")); unitSecondWeaponsList.add(WeaponList.getDreadnoughtWeapon("Left Arm Twin-Linked Autocannon")); } @Override public String getUnitDetails() { return "|| " + "Weapons: " + weapon + " + " + weaponTwo + " || " + "Points: " + points; } @Override public String getCharacteristics() { return "Characteristics: WS: " + weaponSkill + " BS: " + ballisticSkill + " S: " + strength + " I: " + initiative + " A: " + attacks + " HP: " + hitPoints + " Armour: FA: " + frontArmour + " SA: " + sideArmour + " RA: " + rearArmour; } }
[ "gr412@hotmail.co.uk" ]
gr412@hotmail.co.uk
43680fdf8a22c017c6158ebfd87ebf1f4cfb38c3
ebd27141f26b8490d9c8c1b1d878e41e357a9ce9
/test-dao/src/main/java/org/test/dao/Dao.java
b823baa868a19ea329f44a3b39125c88d3e1a15a
[]
no_license
upenk982/SampleProjects
7e7d7cd16a9c63a13366489842a5b086eb3a497c
4a74c8a5557a34bb8ee0b0cc618d88774c3638de
refs/heads/master
2021-01-21T14:09:25.684479
2017-06-06T10:11:01
2017-06-06T10:11:01
59,076,273
0
0
null
null
null
null
UTF-8
Java
false
false
645
java
package org.test.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; public abstract class Dao<T> { protected abstract String setInsertquery(); protected abstract void setinsertFields(PreparedStatement preparedStatement, T t) throws SQLException; public void create(Connection connection, T t){ try{ PreparedStatement preparedStatement = connection.prepareStatement(setInsertquery()); setinsertFields(preparedStatement,t); preparedStatement.execute(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }; } }
[ "Unknown@DESKTOP-A0LQ3N3" ]
Unknown@DESKTOP-A0LQ3N3
467722cc83a9bdcc083f370ad52f65c47b3644f3
cd04ad09f28395feb4af84d9f6c80d22305f93de
/hw2/app/src/main/java/com/taifua/androidlearning/ToastUtil.java
e481655e92d8568bb63d7e5a788c7a1c90471baa
[]
no_license
Yueza/software-test-hw
6556d0ad12735dcb1a8e6de5d62a5476ea8b8696
4c3f530435616ed1fe42d8a2978917f364888653
refs/heads/main
2023-08-27T19:45:11.551913
2021-11-09T06:45:11
2021-11-09T06:45:11
421,001,962
0
0
null
null
null
null
UTF-8
Java
false
false
397
java
package com.taifua.androidlearning; import android.content.Context; import android.widget.Toast; public class ToastUtil { public static Toast mToast; public static void showMsg(Context context, String msg) { if (mToast == null) mToast = Toast.makeText(context, msg, Toast.LENGTH_LONG); else mToast.setText(msg); mToast.show(); } }
[ "zayue21@m.fudan.edu.cn" ]
zayue21@m.fudan.edu.cn
67de46d19ef9101121f2ba68199cebfc2dc9a539
3706c944d5402320cfc1eeb6b2a1029d748c0fda
/fiszkoteka/src/main/java/com/jl/spring/service/MailService.java
3c2a38939882a515bacd87c900c858ce82344096
[]
no_license
justyna/fiszki
492fbf3a14bcf26f263c6743ecfaa5860f2b9d26
68c90dd075945aeff437f230a8f7b3bca12adbbd
refs/heads/master
2021-01-10T20:35:41.221201
2018-12-23T11:03:12
2018-12-23T11:03:12
22,599,998
0
0
null
null
null
null
WINDOWS-1250
Java
false
false
1,651
java
package com.jl.spring.service; import java.util.Properties; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.PasswordAuthentication; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import org.springframework.stereotype.Service; @Service public class MailService { public void sendMail(String userEmail, String userPassword) { final String username = "test@yandex.com"; final String password = "test"; Properties props = new Properties(); props.put("mail.smtp.host", "smtp.yandex.com"); props.put("mail.smtp.socketFactory.port", "465"); props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); props.put("mail.smtp.auth", "true"); props.put("mail.smtp.port", "465"); Session session = Session.getDefaultInstance(props, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password); } }); try { Message message = new MimeMessage(session); message.setFrom(new InternetAddress("test@yandex.com")); message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(userEmail)); message.setSubject("Przypomnienie hasła"); message.setText("Drogi użytkowniku," + "\n\n Twoje hasło to: "+userPassword); Transport.send(message); System.out.println("Done"); } catch (MessagingException e) { e.printStackTrace(); } } }
[ "229775@abs.umk.pl" ]
229775@abs.umk.pl
962126d002f652dbbdd1217eec1bcb84990055da
dee93035a24dc7936c9c80fdb25cbaa506b6b70e
/viikko1/NhlStatistics1/src/test/java/ohtuesimerkki/StatisticsTest.java
45c92bff4c17557fd858bbf6cf6e0246a5c2b560
[]
no_license
riinaalisah/ohtu-tehtavat
c2e31055696aa827b6b4284b13cd145894843bbe
a45acea4912851423fc66c42172fb698e1364256
refs/heads/master
2020-08-30T23:18:54.062430
2019-12-05T14:12:37
2019-12-05T14:12:37
218,518,513
0
0
null
null
null
null
UTF-8
Java
false
false
1,562
java
package ohtuesimerkki; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; import java.util.List; import static org.junit.Assert.*; public class StatisticsTest { Reader readerStub = new Reader() { public List<Player> getPlayers() { ArrayList<Player> players = new ArrayList<>(); players.add(new Player("Semenko", "EDM", 4, 12)); players.add(new Player("Lemieux", "PIT", 45, 54)); players.add(new Player("Kurri", "EDM", 37, 53)); players.add(new Player("Yzerman", "DET", 42, 56)); players.add(new Player("Gretzky", "EDM", 35, 89)); return players; } }; Statistics stats; @Before public void setUp() { stats = new Statistics(readerStub); } @Test public void findsPlayerOnList() { Player returned = stats.search("Kurri"); assertNotNull(returned); } @Test public void doesNotFindPlayerNotOnList() { Player returned = stats.search("NoOne"); assertNull(returned); } @Test public void returnsPlayersOnTeam() { List<Player> players = stats.team("EDM"); assertEquals(3, players.size()); } @Test public void doesNotFindPlayersOnNonexistentTeam() { List<Player> players = stats.team("none"); assertEquals(0, players.size()); } @Test public void returnsThreeTopScorers() { List<Player> topScorers = stats.topScorers(2); assertEquals(3, topScorers.size()); } }
[ "riina-alisa.huotari@helsinki.fi" ]
riina-alisa.huotari@helsinki.fi
025194f085c7bd6c989f15927fef5ab2f5e81698
3fa93a64466d6c7d1b90862710ed92acd16b8cef
/황상필/src/main/java/com/edu/freeboard/mapper/FbcommentMapper.java
2b1b75bf13e34dffa9dd41331d35ad5e1e95c636
[]
no_license
purings2/classtudy
e0f25294b7290a8a0fb3d9223b6413a6b37219b2
9c1faa840d497208556fb5e6b2edb76aca2ec5bc
refs/heads/main
2023-02-01T23:19:54.894413
2020-12-21T07:28:56
2020-12-21T07:28:56
312,537,261
3
1
null
null
null
null
UTF-8
Java
false
false
1,264
java
package com.edu.freeboard.mapper; import java.util.List; import org.springframework.stereotype.Repository; import com.edu.freeboard.domain.FbcommentDTO; @Repository("com.edu.freeboard.mapper.FbcommentMapper") public interface FbcommentMapper { // 댓글 목록 보기 public List<FbcommentDTO> commentList(int boardNo, String memberId) throws Exception; // 댓글 작성 public int commentInsert(FbcommentDTO comment) throws Exception; // 댓글 수정 public int commentUpdate(String content, int commentNo) throws Exception; // 댓글 삭제 public int commentDelete(int commentNo) throws Exception; //게시글 좋아요수 증가 public int addLikes(int commentNo) throws Exception ; // 좋아요 테이블에 좋아요 내용 기록 public int writeLikes(int commentNo, String memberId) throws Exception; // 게시글 좋아요수 가져오기 public int getLikes(int commentNo) throws Exception; // 게시글 좋아요 여부 검사 public int likeCheck(int commentNo, String memberId) throws Exception; // 게시글 좋아요수 감소 public int subtractLikes(int commentNo) throws Exception; // 좋아요 테이블에 좋아요 내용 삭제 public int deleteLikes(int commentNo, String memberId) throws Exception; }
[ "purings2@kakao.com" ]
purings2@kakao.com
0c9c6880ee58c0f337e74c79c86a6726b5f9058b
391be6d444d3dc2cbb67214735d72511b50e585c
/08JavaWeb/Json/src/cn/bdqn/servlet/StudentServlet.java
372da64b7094ecdbaef2ef504dab4098e28076f3
[]
no_license
Macro-R/Java
134019c74be54cba04acff08de458b221df76615
ad6ee66eae2e52b652f1c49770823c3127f5eb53
refs/heads/master
2020-03-19T01:11:23.167394
2018-05-31T03:41:23
2018-05-31T03:41:23
135,304,288
0
0
null
null
null
null
GB18030
Java
false
false
1,569
java
package cn.bdqn.servlet; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import cn.bdqn.bean.User; import com.google.gson.Gson; @WebServlet("/StudentServlet") public class StudentServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { doPost(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // 加上响应头信息 resp.setHeader("Content-type", "text/html;charset=utf-8"); // 模拟从数据库中获取数据 User user1 = new User("admin1", "a1"); User user2 = new User("admin2", "a2"); User user3 = new User("admin3", "a3"); User user4 = new User("admin4", "a4"); User user5 = new User("admin5", "a5"); List<User> users = new ArrayList<User>(); users.add(user1); users.add(user2); users.add(user3); users.add(user4); users.add(user5); // 因为前台的dataType是json 我们需要把集合转换成json格式 之后再返回 Gson gson = new Gson(); String json = gson.toJson(users); System.out.println(json); // 给用户响应 PrintWriter pw = resp.getWriter(); pw.print(json);//在前端就可以把josn格式转换出来 pw.close(); } }
[ "1178622780@qq.com" ]
1178622780@qq.com
79ced41328fad4f2445554f25ffd84348200a13f
f4f536fe798e1861b01ddcdd2dc215dbe5924281
/src/biblioteca/UserChoice.java
73db29349d2500b571fab99861a7f0bd678f3a05
[]
no_license
ervinnecula/Biblioteca
06f68e1f067a774e06c83e5ebdc203e0a63c8eed
cff3400783cabc08413142af1d4e74c691e620e7
refs/heads/master
2016-09-05T14:26:50.654503
2015-01-25T16:54:57
2015-01-25T16:54:57
29,821,641
0
0
null
null
null
null
UTF-8
Java
false
false
13,072
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 biblioteca; import java.awt.BorderLayout; import java.awt.FlowLayout; import javax.swing.ImageIcon; import javax.swing.JLabel; /** * * @author Ervin */ public class UserChoice extends javax.swing.JFrame { /** * Creates new form Choice */ public UserChoice() { initComponents(); setResizable(false); load_background(); } public void load_background(){ setLayout(new BorderLayout()); JLabel background=new JLabel(new ImageIcon("bg2.jpg")); add(background); background.setLayout(new FlowLayout()); } /** * 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() { jLabel1 = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jSeparator2 = new javax.swing.JSeparator(); exit = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("Meniu Client"); jButton1.setBackground(new java.awt.Color(92, 83, 219)); jButton1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jButton1.setForeground(new java.awt.Color(255, 255, 255)); jButton1.setText("Imprumuta Carte"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setBackground(new java.awt.Color(15, 69, 255)); jButton2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jButton2.setForeground(new java.awt.Color(255, 255, 255)); jButton2.setText("Vezi carti imprumutate"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jButton3.setBackground(new java.awt.Color(255, 51, 51)); jButton3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jButton3.setForeground(new java.awt.Color(255, 255, 255)); jButton3.setText("Imprumuta film"); jButton3.setAutoscrolls(true); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jButton4.setBackground(new java.awt.Color(255, 0, 0)); jButton4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jButton4.setForeground(new java.awt.Color(255, 255, 255)); jButton4.setText("Vezi filmele imprumutate"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setText("Carti"); jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel3.setForeground(new java.awt.Color(255, 255, 255)); jLabel3.setText("Filme"); jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL); exit.setText("Exit"); exit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitActionPerformed(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() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jSeparator1) .addContainerGap()) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(exit, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(20, 20, 20)))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(97, 97, 97) .addComponent(jLabel2)) .addGroup(layout.createSequentialGroup() .addGap(53, 53, 53) .addComponent(jButton1)) .addGroup(layout.createSequentialGroup() .addGap(33, 33, 33) .addComponent(jButton2))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(55, 55, 55) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jLabel3) .addGap(90, 90, 90)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jButton4) .addGap(20, 20, 20)))) .addGroup(layout.createSequentialGroup() .addGap(87, 87, 87) .addComponent(jButton3)))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(exit)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel3) .addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jButton3, javax.swing.GroupLayout.Alignment.TRAILING)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton2) .addComponent(jButton4)))) .addGap(66, 66, 66)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed ImprumutaCarte c = new ImprumutaCarte(); c.setVisible(true); this.dispose(); }//GEN-LAST:event_jButton1ActionPerformed private void exitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitActionPerformed Login c = new Login(); c.setVisible(true); this.dispose(); }//GEN-LAST:event_exitActionPerformed private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed MyBooks c = new MyBooks(); c.setVisible(true); this.dispose(); }//GEN-LAST:event_jButton2ActionPerformed private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed ImprumutaFilm c = new ImprumutaFilm(); c.setVisible(true); this.dispose(); }//GEN-LAST:event_jButton3ActionPerformed private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed MyMovies c = new MyMovies(); c.setVisible(true); this.dispose(); }//GEN-LAST:event_jButton4ActionPerformed /** * @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(UserChoice.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(UserChoice.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(UserChoice.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(UserChoice.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 UserChoice().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton exit; private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JButton jButton4; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JSeparator jSeparator1; private javax.swing.JSeparator jSeparator2; // End of variables declaration//GEN-END:variables }
[ "ervinnecula@yahoo.com" ]
ervinnecula@yahoo.com
fb8bd73e7eb2deb5a106790c73e6366323a0da83
4ff77e6e97d3ab1073400578af0bd37d1b0693d9
/pocofilter/src/main/java/cn/poco/filter/util/MaskCreator.java
cb1d1767f0197ff3b9daf8bf4d8d12d977fe49f9
[]
no_license
urnotxs/POCO-Filter
f8b69c68535a9c497769f73bd36e6df17e758915
04d30595c048bf9599520ac7e194740a7456de3f
refs/heads/master
2020-04-07T22:51:51.183445
2018-11-23T10:11:47
2018-11-23T10:11:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,782
java
package cn.poco.filter.util; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.LinearGradient; import android.graphics.Paint; import android.graphics.RadialGradient; import android.graphics.Shader.TileMode; public class MaskCreator { public static Bitmap createMask(int width, int height, int color) { Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); canvas.drawColor(color); return bitmap; } public static Bitmap createMask(int width, int height, int r, int g, int b) { Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); canvas.drawRGB(r, g, b); return bitmap; } public static Bitmap createDarkCornerMask(int width, int height, int color1, int color2) { int[] colors = {color1, color2}; float[] stops = {0.0f, 1.0f}; return createDarkCornerMask(width, height, colors, stops); } public static Bitmap createDarkCornerMask(int width, int height, int color1, int color2, int color3, float position1, float position2, float position3) { int[] colors = {color1, color2, color3}; float[] stops = {position1, position2, position3}; return createDarkCornerMask(width, height, colors, stops); } public static Bitmap createDarkCornerMask(int width, int height, int color1, int color2, int color3, int color4, float stop1, float stop2, float stop3, float stop4) { int[] colors = {color1, color2, color3, color4}; float[] stops = {stop1, stop2, stop3, stop4}; return createDarkCornerMask(width, height, colors, stops); } public static Bitmap createDarkCornerMask(int width, int height, int color1, int color2, int color3, int color4, int color5, float stop1, float stop2, float stop3, float stop4, float stop5) { int[] colors = {color1, color2, color3, color4, color5}; float[] stops = {stop1, stop2, stop3, stop4, stop5}; return createDarkCornerMask(width, height, colors, stops); } public static Bitmap createDarkCornerMask(int width, int height, int[] colors, float[] stops) { Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); int halfWidth = width / 2; int halfHeight = height / 2; int radius = (int) Math.sqrt(halfWidth * halfWidth + halfHeight * halfHeight); RadialGradient shader = new RadialGradient(halfWidth, halfHeight, radius, colors, stops, TileMode.CLAMP); Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); paint.setShader(shader); canvas.drawCircle(halfWidth, halfHeight, radius, paint); return bitmap; } public static Bitmap createMagicPurpleMask(int width, int height) { Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); canvas.drawARGB(0, 0, 0, 0); int[] colors= new int[]{0xffffffff, 0x00000000, 0x00000000, 0xffffffff}; float[] stops= new float[]{0.0f, 0.4f, 0.6f, 1.0f}; Paint paint = new Paint(); LinearGradient shader = new LinearGradient(0, 0, width, height, colors, stops, TileMode.CLAMP); paint.setShader(shader); canvas.drawRect(0, 0, width, height, paint); return bitmap; } }
[ "532771504@qq.com" ]
532771504@qq.com
4458f048cbb6624141900875925c7be48357362e
2538af88a4b5af83651751178fa16cea3c48aed7
/src/main/java/br/ufes/jbocas/domain/Laudo.java
27d32ff4a07c9e380ee8fe7a7c694c8356bd84dd
[]
no_license
dwws-ufes/2018-JBocas
c691cb76d1cd98ee09bab8a124af348a83a3e7c9
1793b184c7c2bbd26d55a6ac9dfc0859f0d2fc01
refs/heads/master
2020-03-27T03:09:40.496850
2018-12-06T22:26:11
2018-12-06T22:26:11
145,842,408
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
package br.ufes.jbocas.domain; import java.util.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import lombok.Getter; import lombok.Setter; @Getter @Setter @Entity @Table(name = "laudo") public class Laudo { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String numero; @Temporal(TemporalType.DATE) private Date entrada; private String qualidadePeca; private String profissional; private String setor; private String resumoClinico; }
[ "bielgiorisatto@gmail.com" ]
bielgiorisatto@gmail.com
ecedbcb7f637bc7e8ab687e07b56355da2b93497
4627d514d6664526f58fbe3cac830a54679749cd
/results/evosuite5/closure-com.google.javascript.rhino.jstype.PrototypeObjectType-11/com/google/javascript/rhino/jstype/PrototypeObjectType_ESTest.java
f3d1e7188de8909a8e45076958c8ed02c37799cf
[]
no_license
STAMP-project/Cling-application
c624175a4aa24bb9b29b53f9b84c42a0f18631bd
0ff4d7652b434cbfd9be8d8bb38cfc8d8eaa51b5
refs/heads/master
2022-07-27T09:30:16.423362
2022-07-19T12:01:46
2022-07-19T12:01:46
254,310,667
2
2
null
2021-07-12T12:29:50
2020-04-09T08:11:35
null
UTF-8
Java
false
false
33,101
java
/* * This file was automatically generated by EvoSuite * Wed Aug 21 16:59:13 GMT 2019 */ package com.google.javascript.rhino.jstype; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import com.google.javascript.rhino.ErrorReporter; import com.google.javascript.rhino.JSDocInfo; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.SimpleErrorReporter; import com.google.javascript.rhino.jstype.BooleanType; import com.google.javascript.rhino.jstype.EnumElementType; import com.google.javascript.rhino.jstype.EnumType; import com.google.javascript.rhino.jstype.ErrorFunctionType; import com.google.javascript.rhino.jstype.FunctionType; import com.google.javascript.rhino.jstype.InstanceObjectType; import com.google.javascript.rhino.jstype.JSType; import com.google.javascript.rhino.jstype.JSTypeRegistry; import com.google.javascript.rhino.jstype.NoObjectType; import com.google.javascript.rhino.jstype.NoResolvedType; import com.google.javascript.rhino.jstype.NoType; import com.google.javascript.rhino.jstype.ObjectType; import com.google.javascript.rhino.jstype.PrototypeObjectType; import com.google.javascript.rhino.jstype.ProxyObjectType; import com.google.javascript.rhino.jstype.RecordType; import com.google.javascript.rhino.jstype.RecordTypeBuilder; import java.util.HashMap; import java.util.List; import java.util.Vector; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = false, useJEE = true) public class PrototypeObjectType_ESTest extends PrototypeObjectType_ESTest_scaffolding { @Test(timeout = 4000) public void test00() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); Node node0 = Node.newString(0, "Named type with empty name component"); RecordTypeBuilder.RecordProperty recordTypeBuilder_RecordProperty0 = new RecordTypeBuilder.RecordProperty(noResolvedType0, node0); HashMap<String, RecordTypeBuilder.RecordProperty> hashMap0 = new HashMap<String, RecordTypeBuilder.RecordProperty>(); hashMap0.put("Not declared as a constructor", recordTypeBuilder_RecordProperty0); RecordType recordType0 = jSTypeRegistry0.createRecordType(hashMap0); recordType0.matchConstraint(recordType0); assertFalse(recordType0.hasReferenceName()); assertFalse(recordType0.isNativeObjectType()); assertFalse(recordType0.hasCachedValues()); } @Test(timeout = 4000) public void test01() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); Node node0 = Node.newString(0, "Named type with empty name component"); RecordTypeBuilder.RecordProperty recordTypeBuilder_RecordProperty0 = new RecordTypeBuilder.RecordProperty(noResolvedType0, node0); HashMap<String, RecordTypeBuilder.RecordProperty> hashMap0 = new HashMap<String, RecordTypeBuilder.RecordProperty>(); hashMap0.put("toString", recordTypeBuilder_RecordProperty0); RecordType recordType0 = jSTypeRegistry0.createRecordType(hashMap0); noResolvedType0.matchConstraint(recordType0); assertTrue(recordType0.hasCachedValues()); assertTrue(noResolvedType0.hasCachedValues()); } @Test(timeout = 4000) public void test02() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "Not declared as a type name"); noResolvedType0.matchConstraint(errorFunctionType0); assertTrue(errorFunctionType0.isNominalConstructor()); } @Test(timeout = 4000) public void test03() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); Node node0 = Node.newString(0, "Named type with empty name component"); RecordTypeBuilder.RecordProperty recordTypeBuilder_RecordProperty0 = new RecordTypeBuilder.RecordProperty(noResolvedType0, node0); HashMap<String, RecordTypeBuilder.RecordProperty> hashMap0 = new HashMap<String, RecordTypeBuilder.RecordProperty>(); hashMap0.put("Not declared as a constructor", recordTypeBuilder_RecordProperty0); RecordType recordType0 = jSTypeRegistry0.createRecordType(hashMap0); RecordType recordType1 = (RecordType)recordType0.forceResolve(simpleErrorReporter0, recordType0); assertFalse(recordType1.hasReferenceName()); assertFalse(recordType1.isNativeObjectType()); } @Test(timeout = 4000) public void test04() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); HashMap<String, RecordTypeBuilder.RecordProperty> hashMap0 = new HashMap<String, RecordTypeBuilder.RecordProperty>(); RecordType recordType0 = jSTypeRegistry0.createRecordType(hashMap0); assertFalse(recordType0.hasReferenceName()); recordType0.setOwnerFunction(noResolvedType0); recordType0.getCtorImplementedInterfaces(); assertTrue(recordType0.hasReferenceName()); } @Test(timeout = 4000) public void test05() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); HashMap<String, RecordTypeBuilder.RecordProperty> hashMap0 = new HashMap<String, RecordTypeBuilder.RecordProperty>(); RecordType recordType0 = new RecordType(jSTypeRegistry0, hashMap0); recordType0.getCtorImplementedInterfaces(); assertFalse(recordType0.isNativeObjectType()); assertFalse(recordType0.hasReferenceName()); } @Test(timeout = 4000) public void test06() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "Unknown class name"); errorFunctionType0.setOwnerFunction(noResolvedType0); // Undeclared exception! try { errorFunctionType0.setOwnerFunction(noResolvedType0); fail("Expecting exception: IllegalStateException"); } catch(IllegalStateException e) { // // no message in exception (getMessage() returned null) // verifyException("com.google.common.base.Preconditions", e); } } @Test(timeout = 4000) public void test07() throws Throwable { JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry((ErrorReporter) null); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "Unknown class name"); errorFunctionType0.setOwnerFunction(noResolvedType0); errorFunctionType0.setOwnerFunction((FunctionType) null); assertTrue(errorFunctionType0.isNominalConstructor()); } @Test(timeout = 4000) public void test08() throws Throwable { JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry((ErrorReporter) null); NoType noType0 = new NoType(jSTypeRegistry0); InstanceObjectType instanceObjectType0 = new InstanceObjectType(jSTypeRegistry0, noType0); boolean boolean0 = instanceObjectType0.isSubtype(noType0); assertFalse(instanceObjectType0.isNativeObjectType()); assertTrue(boolean0); assertFalse(instanceObjectType0.isNominalType()); } @Test(timeout = 4000) public void test09() throws Throwable { JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry((ErrorReporter) null); HashMap<String, RecordTypeBuilder.RecordProperty> hashMap0 = new HashMap<String, RecordTypeBuilder.RecordProperty>(); RecordType recordType0 = jSTypeRegistry0.createRecordType(hashMap0); BooleanType booleanType0 = new BooleanType(jSTypeRegistry0); InstanceObjectType instanceObjectType0 = (InstanceObjectType)booleanType0.autoboxesTo(); recordType0.getTypesUnderInequality(instanceObjectType0); assertFalse(recordType0.hasReferenceName()); assertTrue(instanceObjectType0.isNativeObjectType()); assertTrue(instanceObjectType0.isNominalType()); } @Test(timeout = 4000) public void test10() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "Not declared as a constructor"); InstanceObjectType instanceObjectType0 = new InstanceObjectType(jSTypeRegistry0, noResolvedType0); assertFalse(instanceObjectType0.hasReferenceName()); noResolvedType0.setOwnerFunction(errorFunctionType0); noResolvedType0.matchConstraint(instanceObjectType0); assertTrue(instanceObjectType0.isNominalType()); assertTrue(instanceObjectType0.hasReferenceName()); } @Test(timeout = 4000) public void test11() throws Throwable { JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry((ErrorReporter) null); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "Unknown class name"); Node node0 = Node.newString("Not declared as a type name"); FunctionType functionType0 = jSTypeRegistry0.createFunctionType((JSType) noResolvedType0, node0); functionType0.setOwnerFunction(errorFunctionType0); assertTrue(errorFunctionType0.isNominalConstructor()); String string0 = functionType0.getReferenceName(); assertNotNull(string0); assertEquals("Unknown class name.prototype", string0); } @Test(timeout = 4000) public void test12() throws Throwable { JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry((ErrorReporter) null); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); Node node0 = Node.newString("Not declared as a type name"); FunctionType functionType0 = jSTypeRegistry0.createFunctionType((JSType) noResolvedType0, node0); String string0 = functionType0.getReferenceName(); assertNull(string0); } @Test(timeout = 4000) public void test13() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); Node node0 = Node.newString(0, "Named type with empty name component"); EnumType enumType0 = new EnumType(jSTypeRegistry0, "Not declared as a constructor", node0, noResolvedType0); EnumElementType enumElementType0 = enumType0.getElementsType(); JSType[] jSTypeArray0 = new JSType[3]; jSTypeArray0[0] = (JSType) noResolvedType0; jSTypeArray0[1] = (JSType) enumType0; jSTypeArray0[2] = (JSType) enumElementType0; jSTypeRegistry0.createOptionalParameters(jSTypeArray0); ProxyObjectType proxyObjectType0 = new ProxyObjectType(jSTypeRegistry0, noResolvedType0); // Undeclared exception! try { noResolvedType0.setImplicitPrototype(proxyObjectType0); fail("Expecting exception: IllegalStateException"); } catch(IllegalStateException e) { // // no message in exception (getMessage() returned null) // verifyException("com.google.common.base.Preconditions", e); } } @Test(timeout = 4000) public void test14() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoObjectType noObjectType0 = new NoObjectType(jSTypeRegistry0); InstanceObjectType instanceObjectType0 = new InstanceObjectType(jSTypeRegistry0, noObjectType0); String string0 = instanceObjectType0.toStringHelper(true); assertNotNull(string0); assertFalse(instanceObjectType0.isNativeObjectType()); assertEquals("?", string0); } @Test(timeout = 4000) public void test15() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); Node node0 = Node.newString("Not declared as a type name"); RecordTypeBuilder.RecordProperty recordTypeBuilder_RecordProperty0 = new RecordTypeBuilder.RecordProperty(noResolvedType0, node0); HashMap<String, RecordTypeBuilder.RecordProperty> hashMap0 = new HashMap<String, RecordTypeBuilder.RecordProperty>(); hashMap0.put("Not declared as a constructor", recordTypeBuilder_RecordProperty0); hashMap0.put("Unknown class name", recordTypeBuilder_RecordProperty0); RecordTypeBuilder.RecordProperty recordTypeBuilder_RecordProperty1 = new RecordTypeBuilder.RecordProperty(noResolvedType0, node0); hashMap0.put("Named type with empty name component", recordTypeBuilder_RecordProperty1); hashMap0.put("]Jd", recordTypeBuilder_RecordProperty1); RecordType recordType0 = jSTypeRegistry0.createRecordType(hashMap0); String string0 = recordType0.toStringHelper(false); assertEquals("{Named type with empty name component: NoResolvedType, Not declared as a constructor: NoResolvedType, Unknown class name: NoResolvedType, ]Jd: NoResolvedType, ...}", string0); assertNotNull(string0); } @Test(timeout = 4000) public void test16() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); Node node0 = Node.newString(0, "Named type with empty name component"); RecordTypeBuilder.RecordProperty recordTypeBuilder_RecordProperty0 = new RecordTypeBuilder.RecordProperty(noResolvedType0, node0); HashMap<String, RecordTypeBuilder.RecordProperty> hashMap0 = new HashMap<String, RecordTypeBuilder.RecordProperty>(); hashMap0.put("Not declared as a constructor", recordTypeBuilder_RecordProperty0); RecordType recordType0 = jSTypeRegistry0.createRecordType(hashMap0); String string0 = recordType0.toStringHelper(true); assertNotNull(string0); assertEquals("{Not declared as a constructor: ?}", string0); } @Test(timeout = 4000) public void test17() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "ya^"); EnumType enumType0 = new EnumType(jSTypeRegistry0, "}", (Node) null, errorFunctionType0); PrototypeObjectType prototypeObjectType0 = new PrototypeObjectType(jSTypeRegistry0, "ya^", enumType0, false); String string0 = prototypeObjectType0.toStringHelper(false); assertEquals("ya^", string0); assertFalse(prototypeObjectType0.isNativeObjectType()); } @Test(timeout = 4000) public void test18() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "~\"W~}\"|y)!1n%1\"0{"); JSType jSType0 = errorFunctionType0.unboxesTo(); assertTrue(errorFunctionType0.isNominalConstructor()); assertNull(jSType0); } @Test(timeout = 4000) public void test19() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "a0~xA"); FunctionType functionType0 = errorFunctionType0.cloneWithoutArrowType(); boolean boolean0 = functionType0.matchesNumberContext(); assertTrue(functionType0.hasCachedValues()); assertFalse(functionType0.isNominalConstructor()); assertFalse(boolean0); } @Test(timeout = 4000) public void test20() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "^=BLIZ"); boolean boolean0 = errorFunctionType0.matchesStringContext(); assertTrue(errorFunctionType0.isNominalConstructor()); assertFalse(boolean0); } @Test(timeout = 4000) public void test21() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); Node node0 = Node.newString(0, "Named type with empty name component"); RecordTypeBuilder.RecordProperty recordTypeBuilder_RecordProperty0 = new RecordTypeBuilder.RecordProperty(noResolvedType0, node0); HashMap<String, RecordTypeBuilder.RecordProperty> hashMap0 = new HashMap<String, RecordTypeBuilder.RecordProperty>(); hashMap0.put("toString", recordTypeBuilder_RecordProperty0); RecordType recordType0 = jSTypeRegistry0.createRecordType(hashMap0); boolean boolean0 = recordType0.matchesStringContext(); assertTrue(boolean0); assertFalse(recordType0.hasReferenceName()); } @Test(timeout = 4000) public void test22() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); JSDocInfo jSDocInfo0 = new JSDocInfo(); HashMap<String, RecordTypeBuilder.RecordProperty> hashMap0 = new HashMap<String, RecordTypeBuilder.RecordProperty>(); RecordType recordType0 = jSTypeRegistry0.createRecordType(hashMap0); recordType0.setPropertyJSDocInfo("Named type with empty name component", jSDocInfo0); assertTrue(recordType0.hasCachedValues()); } @Test(timeout = 4000) public void test23() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "ya^"); JSDocInfo jSDocInfo0 = new JSDocInfo(); errorFunctionType0.setPropertyJSDocInfo("ya^", jSDocInfo0); errorFunctionType0.setPropertyJSDocInfo("ya^", jSDocInfo0); assertTrue(errorFunctionType0.hasCachedValues()); } @Test(timeout = 4000) public void test24() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, ""); errorFunctionType0.setPropertyJSDocInfo("Not declared as a type name", (JSDocInfo) null); assertTrue(errorFunctionType0.isNominalConstructor()); assertFalse(errorFunctionType0.hasCachedValues()); } @Test(timeout = 4000) public void test25() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); Node node0 = Node.newString(0, "Named type with empty name component"); RecordTypeBuilder.RecordProperty recordTypeBuilder_RecordProperty0 = new RecordTypeBuilder.RecordProperty(noResolvedType0, node0); HashMap<String, RecordTypeBuilder.RecordProperty> hashMap0 = new HashMap<String, RecordTypeBuilder.RecordProperty>(); hashMap0.put("Not declared as a constructor", recordTypeBuilder_RecordProperty0); RecordType recordType0 = jSTypeRegistry0.createRecordType(hashMap0); recordType0.getOwnPropertyJSDocInfo("Not declared as a constructor"); assertFalse(recordType0.isNativeObjectType()); assertFalse(recordType0.hasReferenceName()); } @Test(timeout = 4000) public void test26() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoObjectType noObjectType0 = new NoObjectType(jSTypeRegistry0); InstanceObjectType instanceObjectType0 = new InstanceObjectType(jSTypeRegistry0, noObjectType0); instanceObjectType0.getOwnPropertyJSDocInfo("Unknown class name"); assertFalse(instanceObjectType0.hasReferenceName()); assertFalse(instanceObjectType0.isNativeObjectType()); } @Test(timeout = 4000) public void test27() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); InstanceObjectType instanceObjectType0 = new InstanceObjectType(jSTypeRegistry0, noResolvedType0); instanceObjectType0.getPropertyNode("Not declared as a constructor"); assertFalse(instanceObjectType0.isNativeObjectType()); assertFalse(instanceObjectType0.isNominalType()); } @Test(timeout = 4000) public void test28() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "~\"W~}\"|y)!1n%1\"0{"); JSDocInfo jSDocInfo0 = new JSDocInfo(); errorFunctionType0.setPropertyJSDocInfo("~\"W~}\"|y)!1n%1\"0{", jSDocInfo0); errorFunctionType0.getPropertyNode("~\"W~}\"|y)!1n%1\"0{"); assertTrue(errorFunctionType0.hasCachedValues()); } @Test(timeout = 4000) public void test29() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); Node node0 = noResolvedType0.getPropertyNode("Named type with empty name component"); assertNull(node0); } @Test(timeout = 4000) public void test30() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "ya^"); JSDocInfo jSDocInfo0 = new JSDocInfo(); errorFunctionType0.setPropertyJSDocInfo("ya^", jSDocInfo0); boolean boolean0 = errorFunctionType0.removeProperty("ya^"); assertTrue(errorFunctionType0.hasCachedValues()); assertTrue(boolean0); } @Test(timeout = 4000) public void test31() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, ""); boolean boolean0 = errorFunctionType0.removeProperty(""); assertTrue(errorFunctionType0.isNominalConstructor()); assertFalse(boolean0); } @Test(timeout = 4000) public void test32() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); boolean boolean0 = noResolvedType0.isPropertyInExterns(""); assertFalse(boolean0); } @Test(timeout = 4000) public void test33() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); InstanceObjectType instanceObjectType0 = new InstanceObjectType(jSTypeRegistry0, noResolvedType0); instanceObjectType0.isPropertyInExterns("Not declared as a constructor"); assertFalse(instanceObjectType0.isNativeObjectType()); assertFalse(instanceObjectType0.isNominalType()); } @Test(timeout = 4000) public void test34() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); BooleanType booleanType0 = new BooleanType(jSTypeRegistry0); EnumType enumType0 = jSTypeRegistry0.createEnumType("=]/XZ#.V5['uR", (Node) null, booleanType0); boolean boolean0 = enumType0.isPropertyTypeInferred("Unknown class name"); assertFalse(boolean0); } @Test(timeout = 4000) public void test35() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoObjectType noObjectType0 = new NoObjectType(jSTypeRegistry0); InstanceObjectType instanceObjectType0 = new InstanceObjectType(jSTypeRegistry0, noObjectType0); Node node0 = Node.newString(1, "", 1, 1); boolean boolean0 = instanceObjectType0.defineProperty("", noObjectType0, false, node0); boolean boolean1 = instanceObjectType0.isPropertyTypeInferred(""); assertFalse(boolean1 == boolean0); assertFalse(instanceObjectType0.isNativeObjectType()); assertFalse(instanceObjectType0.hasReferenceName()); assertFalse(boolean1); } @Test(timeout = 4000) public void test36() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); JSDocInfo jSDocInfo0 = new JSDocInfo(); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "^=BLIZ"); errorFunctionType0.setPropertyJSDocInfo("^=BLIZ", jSDocInfo0); errorFunctionType0.getPropertyNames(); assertTrue(errorFunctionType0.hasCachedValues()); } @Test(timeout = 4000) public void test37() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "ya^"); JSDocInfo jSDocInfo0 = new JSDocInfo(); errorFunctionType0.setPropertyJSDocInfo("ya^", jSDocInfo0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); Vector<JSType> vector0 = new Vector<JSType>(); Node node0 = jSTypeRegistry0.createParameters((List<JSType>) vector0); boolean boolean0 = errorFunctionType0.defineProperty("ya^", noResolvedType0, false, node0); assertTrue(errorFunctionType0.hasCachedValues()); assertTrue(boolean0); } @Test(timeout = 4000) public void test38() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); Node node0 = Node.newString(0, "Named type with empty name component"); RecordTypeBuilder.RecordProperty recordTypeBuilder_RecordProperty0 = new RecordTypeBuilder.RecordProperty(noResolvedType0, node0); HashMap<String, RecordTypeBuilder.RecordProperty> hashMap0 = new HashMap<String, RecordTypeBuilder.RecordProperty>(); hashMap0.put("Not declared as a constructor", recordTypeBuilder_RecordProperty0); hashMap0.put("Named type with empty name component", recordTypeBuilder_RecordProperty0); jSTypeRegistry0.createRecordType(hashMap0); RecordType recordType0 = jSTypeRegistry0.createRecordType(hashMap0); assertFalse(recordType0.isNativeObjectType()); assertFalse(recordType0.hasReferenceName()); } @Test(timeout = 4000) public void test39() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoResolvedType noResolvedType0 = new NoResolvedType(jSTypeRegistry0); InstanceObjectType instanceObjectType0 = new InstanceObjectType(jSTypeRegistry0, noResolvedType0); Node node0 = Node.newString(1, "Not declared as a type name", 0, 1); boolean boolean0 = instanceObjectType0.defineInferredProperty("Not declared as a constructor", noResolvedType0, node0); assertTrue(boolean0); instanceObjectType0.isPropertyInExterns("Not declared as a constructor"); assertFalse(instanceObjectType0.isNativeObjectType()); assertFalse(instanceObjectType0.isNominalType()); } @Test(timeout = 4000) public void test40() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); JSDocInfo jSDocInfo0 = new JSDocInfo(); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "^=BLIZ"); errorFunctionType0.setPropertyJSDocInfo("^=BLIZ", jSDocInfo0); int int0 = errorFunctionType0.getPropertiesCount(); assertTrue(errorFunctionType0.hasCachedValues()); assertEquals(1, int0); } @Test(timeout = 4000) public void test41() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); NoObjectType noObjectType0 = new NoObjectType(jSTypeRegistry0); InstanceObjectType instanceObjectType0 = new InstanceObjectType(jSTypeRegistry0, noObjectType0); instanceObjectType0.canBeCalled(); assertFalse(instanceObjectType0.hasReferenceName()); assertFalse(instanceObjectType0.isNativeObjectType()); } @Test(timeout = 4000) public void test42() throws Throwable { JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry((ErrorReporter) null); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "Not declared as a type name"); ObjectType objectType0 = errorFunctionType0.getTypeOfThis(); boolean boolean0 = objectType0.matchesObjectContext(); assertTrue(objectType0.isNativeObjectType()); assertTrue(boolean0); assertTrue(objectType0.isNominalType()); } @Test(timeout = 4000) public void test43() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, "Named type with empty name component"); boolean boolean0 = errorFunctionType0.isNumber(); assertFalse(boolean0); assertTrue(errorFunctionType0.isNominalConstructor()); } @Test(timeout = 4000) public void test44() throws Throwable { SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter(); JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0); ErrorFunctionType errorFunctionType0 = new ErrorFunctionType(jSTypeRegistry0, (String) null); String string0 = errorFunctionType0.toStringHelper(false); assertEquals("function (new:{...}, *=, *=, *=): {...}", string0); assertTrue(errorFunctionType0.isNominalConstructor()); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
73d91e6345a023c73ee176e57055f4184c0f1788
81c84a433dec87a456bdd1389166152a159936b0
/src/main/java/com/coduckfoilo/domain/project/Project.java
0a0888165ce08a18fd376f2470c89b39b60e8442
[]
no_license
gsg-java/developers-portfolio
ad1104e9e33d13d0f325797d7db910b173ab514d
b8197f4ef8be72e67582b42e168abb5325df0001
refs/heads/master
2021-05-05T11:50:25.275424
2018-02-18T15:00:48
2018-02-18T15:00:48
118,221,728
7
0
null
2018-02-25T05:31:07
2018-01-20T07:53:54
Java
UTF-8
Java
false
false
603
java
package com.coduckfoilo.domain.project; import lombok.Getter; import lombok.NoArgsConstructor; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import java.time.LocalDate; /** * Created by YG-MAC on 2018. 1. 21.. */ @Getter @NoArgsConstructor @Entity public class Project { @Id @Column(name = "PROJECT_ID") @GeneratedValue private long id; private long userId; private LocalDate startDate; private LocalDate endDate; private String title; private String description; }
[ "kingbbode@gmail.com" ]
kingbbode@gmail.com
72a44615edf0dae60d83eea7ef7f6a79e9fcafde
94cf630f5d1c69e9e7963cb782f23a0b2ab88dc1
/ASD Es27 PriorityQueue/src/PriorityQueue/Test.java
9b5bea8415c452a82efc72529bcef7e1d537e30f
[]
no_license
mircocrit/Java-workspace-ASD
bd307768bd232114cd86a5dd4290112c24189ac3
96dde8e4422734f98fd97c373117423bdd8ae61a
refs/heads/master
2020-05-19T11:54:30.691956
2019-06-06T13:01:33
2019-06-06T13:01:33
185,001,976
0
0
null
null
null
null
UTF-8
Java
false
false
1,586
java
package PriorityQueue; import PriorityQueue.Enum.State; public class Test { public static void main(String[] args) { CodaLL<Process> unrunnables = new CodaLL<Process>(); CodaLL<Process> runnables = new CodaLL<Process>(); CodaLL<Process> stopped = new CodaLL<Process>(); for (int i = 1; i < 16; i++) { Process p = new Process("C:/" + String.valueOf(i + (int) (Math.random() * 80)), (int) (Math.random() * 80)); unrunnables.insert(p, p.getPriority()); } for (Process i : unrunnables) { System.out.println(i); } System.out.println("\n \n"); // a capo while (unrunnables.size() > 0) { Process first = unrunnables.first(); unrunnables.delFirst(); first.setState(); runnables.insert(first, first.getPriority()); } for (Process i : runnables) { System.out.println(i); } while (runnables.size() > 0) { Process first = runnables.first(); runnables.delFirst(); int dado = (int) (Math.random() * 2); switch (dado) { case 0: first.setState(); break; case 1: first.setState(); first.setState(); break; default: break; } if (first.getState().equals(State.STOP)) stopped.insert(first, first.getPriority()); else if (first.getState().equals(State.UNRUNNABLE)) unrunnables.insert(first, first.getPriority()); } System.out.println("\n \n"); for (Process p : stopped) System.out.println(p); System.out.println("\n \n"); for (Process p : unrunnables) System.out.println(p); } }
[ "Mirco@DESKTOP-A55DTAV" ]
Mirco@DESKTOP-A55DTAV
77131455d3de9ffe3e8219d37b0fc4d52fdf1b37
06354d2ca7da31af4d7d6123f53952e9933cb3ab
/src/main/java/com/melot/kkgame/redis/UserHotSource.java
be2b6e6434c6cf465edd3ea2adfee4e2e63876ba
[]
no_license
sj123sheng/meShow
2e582e0fbb816d12c677636b4e0ca57b99176c6c
4e6fef5b4411a8257884229f34bebbaa97c003f2
refs/heads/feature/sheng_develop
2023-06-24T01:42:03.605265
2018-03-02T07:55:19
2018-03-02T07:55:19
123,651,311
0
0
null
2023-06-14T20:21:26
2018-03-03T02:18:46
Java
UTF-8
Java
false
false
3,272
java
package com.melot.kkgame.redis; import java.util.Map; import org.apache.log4j.Logger; import com.melot.kkgame.redis.support.RedisCallback; import com.melot.kkgame.redis.support.RedisException; import com.melot.kkgame.redis.support.RedisTemplate; import com.melot.kktv.util.ConfigHelper; import redis.clients.jedis.Jedis; /** * 用户热点数据源 * @author Administrator * */ public class UserHotSource extends RedisTemplate{ private static Logger logger = Logger.getLogger(UserHotSource.class); @Override public String getSourceName() { return "UserHot"; } public Map<String, String> getHotData(String key)throws RedisException { return hgetAll(key); } public String getHotFieldValue(String key, String field)throws RedisException { return hget(key, field); } public void setHotFieldValue(final String key, final String field, final String value, final int seconds)throws RedisException { execute(new RedisCallback<Object>() { public Object doInRedisClient(Jedis jedis) throws RedisException { jedis.hset(key, field, value); jedis.expire(key, seconds); return null; } }); } public void setHotFieldValue(String key,String field,String value)throws RedisException { hset(key, field, value); } public void setHotData(final String key, final Map<String,String> hotData, final int expireTime)throws RedisException { execute(new RedisCallback<Object>() { public Object doInRedisClient(Jedis jedis) throws RedisException { jedis.hmset(key, hotData); jedis.expire(key, expireTime); return null; } }); } public void delHotFieldValue(String key, String field)throws RedisException { hdel(key, field); } public long incHotFieldValue(String key, String field, int incValue)throws RedisException { return hincrBy(key, field, incValue); } /** * 更新开播用户登录Token信息 * @param userId * @param token */ public void updateUserToken(int userId, String token) { try { setHotFieldValue(String.valueOf(userId), "token", token, ConfigHelper.getRedisUserDataExpireTime()); } catch (RedisException e) { logger.error("updateUserToken", e); } } /** * 检测用户token是否是有效的token; */ public boolean checkToken(int userId, String token) { String getToken = null; if (userId > 0 && token != null) { try { getToken = getHotFieldValue(String.valueOf(userId), "token"); } catch (RedisException e) { return false; } } return getToken != null && getToken.equals(token); } /** * 用户登出 * @param userId */ public void logout(int userId) { // 清除热点用户token try { delHotFieldValue(String.valueOf(userId), "token"); } catch (RedisException e) { logger.error("用户登出失败", e); } } }
[ "songjianming@2fe1c438-e5a1-4f48-b1bb-90b7b6eba2af" ]
songjianming@2fe1c438-e5a1-4f48-b1bb-90b7b6eba2af
541c45bd168c4fa4fffd23e5690d005cccbdf004
8beae966c297e4ac6a1aadb2d129d19ac2b622e5
/src/main/java/com/fideuram/tracking/opr/utility/Constant.java
bbaa6534a6f57d58e4d635b3eadc594af6eb9871
[]
no_license
saimon77/trackingFideuram
1c4a5a20e0016efd8721138bbbfc57f3ac8a6de3
239ca4d44e1974df8fe67eea76fe769ef7897d84
refs/heads/main
2023-04-01T16:45:16.128708
2021-03-30T14:13:40
2021-03-30T14:13:40
351,816,313
0
0
null
null
null
null
UTF-8
Java
false
false
448
java
package com.fideuram.tracking.opr.utility; public interface Constant { static final String PUC_URL="puc.url"; static final String PUC_USER="puc.user"; static final String PUC_PWD="puc.pwd"; static final String PROD_URL="prod.url"; static final String PROD_USER="prod.user"; static final String PROD_PWD="prod.pwd"; static final String PUC_CLASS_NAME="puc.driverClassName"; static final String PROD_CLASS_NAME="prod.driverClassName"; }
[ "simone.bedotti@gmail.com" ]
simone.bedotti@gmail.com
a38a23d42c2d90107afb16926156d787f447f65f
cfb20df364d6a0ba6fea5d080e63067cd12654a7
/src/main/java/com/heeexy/example/config/system/DefaultView.java
2f901f52d8d9b06e402911f4b249aa56f14c561a
[]
no_license
Da-boy/SSM_HTH
38ab0d94aa9aa6a13aa62d9fc4927f240e3aa135
0ea87aa563013a07c7255e24eb61b28f94b877c5
refs/heads/master
2022-06-28T00:59:12.687766
2019-09-01T03:32:12
2019-09-01T03:32:12
201,267,094
0
0
null
null
null
null
UTF-8
Java
false
false
684
java
package com.heeexy.example.config.system; import org.springframework.context.annotation.Configuration; import org.springframework.core.Ordered; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; /** * @author: zandaoguang * @description: 设置首页 */ @Configuration public class DefaultView extends WebMvcConfigurerAdapter { @Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("forward:/index.html"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); super.addViewControllers(registry); } }
[ "1758738515@qq.com" ]
1758738515@qq.com
dabe65a18993012dccdf4216527b0286bb37b2b1
9e5125b5a79ffe0e892107b3abf607b31e6499b9
/src/main/java/cn/zz/threadConcurrent/chapter06/CountTask.java
6e5d3ca4af59b28f1aabd09b601601ccd089d83e
[]
no_license
zhou9233/zzThread
2d7c6030df901c9a1c05a8e466e727e12f64aaa3
7c97eef3d055e13914982c706d7a746359433879
refs/heads/master
2020-03-24T13:09:08.342807
2019-01-31T01:59:40
2019-01-31T01:59:40
142,736,384
0
0
null
null
null
null
UTF-8
Java
false
false
2,120
java
package cn.zz.threadConcurrent.chapter06; import java.util.concurrent.ExecutionException; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.Future; import java.util.concurrent.RecursiveTask; /** * 计算 1+2+3+4 * * @author tengfei.fangtf * @version $Id: CountTask.java, v 0.1 2015-8-1 ����12:00:29 tengfei.fangtf Exp $ */ public class CountTask extends RecursiveTask<Integer> { private static final int THRESHOLD = 2; // 阈值 private int start; private int end; public CountTask(int start, int end) { this.start = start; this.end = end; } @Override protected Integer compute() { int sum = 0; // 如果任务足够小就计算 boolean canCompute = (end - start) <= THRESHOLD; if (canCompute) { for (int i = start; i <= end; i++) { sum += i; } } else { // 如果任务大于阈值就分裂成两个子任务计算 int middle = (start + end) / 2; CountTask leftTask = new CountTask(start, middle); CountTask rightTask = new CountTask(middle + 1, end); //执行子任务,调用fork方法时又会进入compute leftTask.fork(); rightTask.fork(); //等待子任务执行完,并得到其结果 //使用join方法会等待子任务执行完并得到其结果 int leftResult = leftTask.join(); int rightResult = rightTask.join(); //合并子任务 sum = leftResult + rightResult; } return sum; } public static void main(String[] args) { ForkJoinPool forkJoinPool = new ForkJoinPool(); // 生成一个计算任务,负责计算 1+2+3+4 CountTask task = new CountTask(1, 4); // 执行一个任务 Future<Integer> result = forkJoinPool.submit(task); try { System.out.println(result.get()); } catch (InterruptedException e) { } catch (ExecutionException e) { } } }
[ "963384016@qq.com" ]
963384016@qq.com
383f39a75d4e636edc3f56b3feb7c2da97eb154e
6d56930293293ba858ae0fff73c4b4bb813abfaa
/app/src/main/java/com/bw/dianshangdemo25/bean/LearyBean.java
a1dce4c0560e117ec1d79eee82558d42043d3076
[]
no_license
nierunzhang01/DianshangDemo25
5cfc2fe87d6f2846f0ec308632c3d492880dc470
9e85ec5785c79d3ce1c1d7b1e63801bac187cc05
refs/heads/master
2021-04-16T05:53:03.229269
2020-03-23T04:04:43
2020-03-23T04:04:43
249,332,191
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
package com.bw.dianshangdemo25.bean; /** * <p>文件描述:<p> * <p>作者:聂润璋<p> * <p>创建时间:2020.3.22<p> * <p>更改时间:2020.3.22<p> */ public class LearyBean { public String name; public String info; public String avatar; public String url; public String content; public String publishedAt; }
[ "you@example.com" ]
you@example.com