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
bb69d35f888d2dff04ad9df95368e1d01abb4106
2f2d943eb1058652bb1bb3c3526164aa7fee1576
/src/test/java/com/synchronisys/automation/selenium/FirstTest.java
a52920bdd7b850a3e5a40f06c88decb907f53618
[]
no_license
adityavashisht/automation_selenium
22c9f79e26a22304147e5498e1121e17a6f9a7eb
79519f7bb4ae2d58f7675784e9e0a2abf149ad7d
refs/heads/master
2020-05-16T22:32:07.139371
2015-08-17T21:48:50
2015-08-17T21:48:50
40,567,325
0
1
null
null
null
null
UTF-8
Java
false
false
1,053
java
package com.synchronisys.automation.selenium; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.annotations.Test; import java.util.List; /** * Created by vashishta on 8/11/15. */ public class FirstTest { @Test public void first() throws Exception { System.out.println("Test"); } @Test public void driver() throws Exception { WebDriver driver = new FirefoxDriver(); driver.get("https://github.com/explore"); WebElement element = driver.findElement(By.name("q")); element.clear(); element.sendKeys("automation_selenium"); element.submit(); List<WebElement> results = driver.findElements(By.tagName("em")); for (WebElement result : results) { if (result.getText() != null && result.getText().equalsIgnoreCase("automation_selenium")) { System.out.println("Hooray"); } } } }
[ "adi.vashisht@agilex.com" ]
adi.vashisht@agilex.com
5dcd4effc63053a6930b1feadb5f18410ab257c7
53e6a6b7c53bd50def19f8a58528a1e06085bb40
/JSONComponents/JSONArray.java
9b9ee47db4c3739a40e924af45d710d62c77f015
[]
no_license
smathog/TestJavaParsers
abd614cb1039dc7f5365622f80ff41b0e4a2e4ed
ca3ff1a89ef3149874c10198b0749cdf686bd0ae
refs/heads/master
2023-02-08T21:58:51.193780
2021-01-06T14:54:20
2021-01-06T14:54:20
326,114,122
0
0
null
null
null
null
UTF-8
Java
false
false
827
java
package com.Parsers.JSONComponents; import java.util.ArrayList; public class JSONArray extends JSONContainer { private final ArrayList<JSONComponent> elements; public JSONArray() { elements = new ArrayList<>(); } public JSONComponent[] getElements() { return (JSONComponent[]) elements.toArray(); } public void add(JSONComponent jc) { elements.add(jc); } @Override public String JSONRepresentation() { StringBuilder sb = new StringBuilder(); sb.append('['); for (int i = 0; i < elements.size(); ++i) { sb.append(' '); sb.append(elements.get(i).JSONRepresentation()); if (i != elements.size() - 1) sb.append(','); } sb.append(']'); return sb.toString(); } }
[ "smathog@gmail.com" ]
smathog@gmail.com
9b9aa3394a3ab901b4919d78b0999c43736603c4
0989ac766fe06c6116919b3b1e9bd03300d42042
/_2007_2008/src/C1JR_Triangle.java
b71e0f508864cd861668c3a3742440b31a46cc16
[]
no_license
wonup2/ACSL
7d18d0f89f3c7b52a05e917162ec6c3363e26903
935fa22dc9b8178e45b5f314b6c0c989952df57a
refs/heads/master
2023-09-01T05:18:47.230803
2023-08-21T22:57:13
2023-08-21T22:57:13
199,730,824
0
0
null
null
null
null
UTF-8
Java
false
false
822
java
import java.util.*; import java.io.*; public class C1JR_Triangle { static Scanner in; static double t1[], t2[]; public static void main(String[] args) throws IOException { in = new Scanner(new File("c1jr_triangle.in")); for(int i=0; i<5; i++) { try { init(); //get data solve(); //processing and output }catch(Exception e) { e.printStackTrace(); } } in.close(); } static void init() { t1=new double[3]; t2=new double[3]; for(int j=0; j<3; j++) t1[j]=in.nextDouble(); for(int j=0; j<3; j++) t2[j]=in.nextDouble(); } static void solve() { int cnt = 0; for(int j=0; j<3; j++) { for(int k=0; k<3; k++) { if(t1[j]==t2[k]) { cnt++; t2[k]=0; } } } System.out.println(cnt); } }
[ "wonup2@hotmail.com" ]
wonup2@hotmail.com
d0f01acd09be5c1d92c3ce5bda7453edb0b6e175
cd258adaaad6060cb0a56dfb771eb53770993ecb
/Library_network/src/main/java/com/tde/network/core/log/Printer.java
76ec63533ac1a69451e7f202554d0ea9ff52a8a7
[]
no_license
larboy1991/library_network
be8586d7d5715b33d79bfee1d6d8994ffc4161c9
c6b2befcae88a85b863c8b94494c8a9378747103
refs/heads/master
2023-03-16T06:22:39.918632
2021-03-10T14:11:34
2021-03-10T14:11:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
11,007
java
package com.tde.network.core.log; import android.text.TextUtils; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.io.IOException; import java.util.List; import okhttp3.FormBody; import okhttp3.Request; import okio.Buffer; class Printer { private static final int JSON_INDENT = 3; private static final String LINE_SEPARATOR = System.getProperty("line.separator"); private static final String DOUBLE_SEPARATOR = LINE_SEPARATOR + LINE_SEPARATOR; private static final String[] OMITTED_RESPONSE = {LINE_SEPARATOR, "Omitted response body"}; private static final String[] OMITTED_REQUEST = {LINE_SEPARATOR, "Omitted request body"}; private static final String N = "\n"; private static final String T = "\t"; private static final String REQUEST_UP_LINE = "โ”Œโ”€โ”€โ”€โ”€โ”€โ”€ Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€"; private static final String END_LINE = "โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€"; private static final String RESPONSE_UP_LINE = "โ”Œโ”€โ”€โ”€โ”€โ”€โ”€ Response โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€"; private static final String BODY_TAG = "Body:"; private static final String URL_TAG = "URL: "; private static final String METHOD_TAG = "Method: @"; private static final String HEADERS_TAG = "Headers:"; private static final String STATUS_CODE_TAG = "Status Code: "; private static final String RECEIVED_TAG = "Received in: "; private static final String CORNER_UP = "โ”Œ "; private static final String CORNER_BOTTOM = "โ”” "; private static final String CENTER_LINE = "โ”œ "; private static final String DEFAULT_LINE = "โ”‚ "; protected Printer() { throw new UnsupportedOperationException(); } private static boolean isEmpty(String line) { return TextUtils.isEmpty(line) || N.equals(line) || T.equals(line) || TextUtils.isEmpty(line.trim()); } static void printJsonRequest(LoggingInterceptor.Builder builder, Request request) { String requestBody = LINE_SEPARATOR + BODY_TAG + LINE_SEPARATOR + bodyToString(request); String tag = builder.getTag(true); if (builder.getLogger() == null) I.log(builder.getType(), tag, REQUEST_UP_LINE); logLines(builder.getType(), tag, new String[]{URL_TAG + request.url()}, builder.getLogger(), false); logLines(builder.getType(), tag, getRequest(request, builder.getLevel()), builder.getLogger(), true); if (request.body() instanceof FormBody) { StringBuilder formBody = new StringBuilder(); FormBody body = (FormBody) request.body(); if (body != null && body.size() != 0) { for (int i = 0; i < body.size(); i++) { formBody.append(body.encodedName(i) + "=" + body.encodedValue(i) + "&"); } formBody.delete(formBody.length() - 1, formBody.length()); logLines(builder.getType(), tag, new String[]{formBody.toString()}, builder.getLogger(), true); } } if (builder.getLevel() == Level.BASIC || builder.getLevel() == Level.BODY) { logLines(builder.getType(), tag, requestBody.split(LINE_SEPARATOR), builder.getLogger(), true); } if (builder.getLogger() == null) I.log(builder.getType(), tag, END_LINE); } static void printJsonResponse(LoggingInterceptor.Builder builder, long chainMs, boolean isSuccessful, int code, String headers, String bodyString, List<String> segments) { String responseBody = LINE_SEPARATOR + BODY_TAG + LINE_SEPARATOR + getJsonString(bodyString); String tag = builder.getTag(false); if (builder.getLogger() == null) I.log(builder.getType(), tag, RESPONSE_UP_LINE); logLines(builder.getType(), tag, getResponse(headers, chainMs, code, isSuccessful, builder.getLevel(), segments), builder.getLogger(), true); if (builder.getLevel() == Level.BASIC || builder.getLevel() == Level.BODY) { logLines(builder.getType(), tag, responseBody.split(LINE_SEPARATOR), builder.getLogger(), true); } if (builder.getLogger() == null) I.log(builder.getType(), tag, END_LINE); } static void printFileRequest(LoggingInterceptor.Builder builder, Request request) { String tag = builder.getTag(true); if (builder.getLogger() == null) I.log(builder.getType(), tag, REQUEST_UP_LINE); logLines(builder.getType(), tag, new String[]{URL_TAG + request.url()}, builder.getLogger(), false); logLines(builder.getType(), tag, getRequest(request, builder.getLevel()), builder.getLogger(), true); if (request.body() instanceof FormBody) { StringBuilder formBody = new StringBuilder(); FormBody body = (FormBody) request.body(); if (body != null && body.size() != 0) { for (int i = 0; i < body.size(); i++) { formBody.append(body.encodedName(i) + "=" + body.encodedValue(i) + "&"); } formBody.delete(formBody.length() - 1, formBody.length()); logLines(builder.getType(), tag, new String[]{formBody.toString()}, builder.getLogger(), true); } } if (builder.getLevel() == Level.BASIC || builder.getLevel() == Level.BODY) { logLines(builder.getType(), tag, OMITTED_REQUEST, builder.getLogger(), true); } if (builder.getLogger() == null) I.log(builder.getType(), tag, END_LINE); } static void printFileResponse(LoggingInterceptor.Builder builder, long chainMs, boolean isSuccessful, int code, String headers, List<String> segments) { String tag = builder.getTag(false); if (builder.getLogger() == null) I.log(builder.getType(), tag, RESPONSE_UP_LINE); logLines(builder.getType(), tag, getResponse(headers, chainMs, code, isSuccessful, builder.getLevel(), segments), builder.getLogger(), true); logLines(builder.getType(), tag, OMITTED_RESPONSE, builder.getLogger(), true); if (builder.getLogger() == null) I.log(builder.getType(), tag, END_LINE); } private static String[] getRequest(Request request, Level level) { String message; String header = request.headers().toString(); boolean loggableHeader = level == Level.HEADERS || level == Level.BASIC; message = METHOD_TAG + request.method() + DOUBLE_SEPARATOR + (isEmpty(header) ? "" : loggableHeader ? HEADERS_TAG + LINE_SEPARATOR + dotHeaders(header) : ""); return message.split(LINE_SEPARATOR); } private static String[] getResponse(String header, long tookMs, int code, boolean isSuccessful, Level level, List<String> segments) { String message; boolean loggableHeader = level == Level.HEADERS || level == Level.BASIC; String segmentString = slashSegments(segments); message = ((!TextUtils.isEmpty(segmentString) ? segmentString + " - " : "") + "is success : " + isSuccessful + " - " + RECEIVED_TAG + tookMs + "ms" + DOUBLE_SEPARATOR + STATUS_CODE_TAG + code + DOUBLE_SEPARATOR + (isEmpty(header) ? "" : loggableHeader ? HEADERS_TAG + LINE_SEPARATOR + dotHeaders(header) : "")); return message.split(LINE_SEPARATOR); } private static String slashSegments(List<String> segments) { StringBuilder segmentString = new StringBuilder(); for (String segment : segments) { segmentString.append("/").append(segment); } return segmentString.toString(); } private static String dotHeaders(String header) { String[] headers = header.split(LINE_SEPARATOR); StringBuilder builder = new StringBuilder(); String tag = "โ”€ "; if (headers.length > 1) { for (int i = 0; i < headers.length; i++) { if (i == 0) { tag = CORNER_UP; } else if (i == headers.length - 1) { tag = CORNER_BOTTOM; } else { tag = CENTER_LINE; } builder.append(tag).append(headers[i]).append("\n"); } } else { for (String item : headers) { builder.append(tag).append(item).append("\n"); } } return builder.toString(); } private static void logLines(int type, String tag, String[] lines, Logger logger, boolean withLineSize) { for (String line : lines) { int lineLength = line.length(); int MAX_LONG_SIZE = withLineSize ? 110 : lineLength; for (int i = 0; i <= lineLength / MAX_LONG_SIZE; i++) { int start = i * MAX_LONG_SIZE; int end = (i + 1) * MAX_LONG_SIZE; end = end > line.length() ? line.length() : end; if (logger == null) { I.log(type, tag, DEFAULT_LINE + line.substring(start, end)); } else { logger.log(type, tag, line.substring(start, end)); } } } } private static String bodyToString(final Request request) { try { final Request copy = request.newBuilder().build(); final Buffer buffer = new Buffer(); if (copy.body() == null) return ""; copy.body().writeTo(buffer); return getJsonString(buffer.readUtf8()); } catch (final IOException e) { return "{\"err\": \"" + e.getMessage() + "\"}"; } } static String getJsonString(String msg) { String message; try { if (msg.startsWith("{")) { JSONObject jsonObject = new JSONObject(msg); message = jsonObject.toString(JSON_INDENT); } else if (msg.startsWith("[")) { JSONArray jsonArray = new JSONArray(msg); message = jsonArray.toString(JSON_INDENT); } else { message = msg; } } catch (JSONException e) { message = msg; } return message; } }
[ "296550494@qq.com" ]
296550494@qq.com
b8b0b2e9f6d75e94aac5dadacdb0a3608026f9ed
4b7559367b9cd3d5a7728cd9244f8a545b356125
/TestCommandBot/src/edu/wpi/first/wpilibj/templates/OI.java
c3b3cac726659727ff1b4a1f1cb31799a81b0605
[]
no_license
Team708/Team-708-Hardwired-Fusion
1d54ca6cfa0e3562ba975a2489ff3755e55ab6f0
b757b5c4553acfb3d3524d4409b1b9aa734338cb
refs/heads/master
2020-05-29T11:42:43.125115
2014-05-10T19:44:40
2014-05-10T19:44:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,514
java
package edu.wpi.first.wpilibj.templates; import Team708Classes.Gamepad; import edu.wpi.first.wpilibj.buttons.Button; import edu.wpi.first.wpilibj.buttons.JoystickButton; import edu.wpi.first.wpilibj.command.Scheduler; import edu.wpi.first.wpilibj.templates.commands.SpinMotor; /** * This class is the glue that binds the controls on the physical operator * interface to the commands and command groups that allow control of the robot. */ public class OI { //// CREATING BUTTONS // One type of button is a joystick button which is any button on a joystick. // You create one by telling it which joystick it's on and which button // number it is. // Joystick stick = new Joystick(port); // Button button = new JoystickButton(stick, buttonNumber); private Gamepad driverpad; private Button button1; public OI() { driverpad = new Gamepad(RobotMap.driverGamepad); button1 = new JoystickButton(driverpad,Gamepad.button_A); button1.whenPressed(new SpinMotor(5.0)); } public double getDriveAxis() { return driverpad.getAxis(Gamepad.leftStick_Y); } public double getRotationAxis() { return driverpad.getAxis(Gamepad.rightStick_X); } // Another type of button you can create is a DigitalIOButton, which is // a button or switch hooked up to the cypress module. These are useful if // you want to build a customized operator interface. // Button button = new DigitalIOButton(1); // There are a few additional built in buttons you can use. Additionally, // by subclassing Button you can create custom triggers and bind those to // commands the same as any other Button. //// TRIGGERING COMMANDS WITH BUTTONS // Once you have a button, it's trivial to bind it to a button in one of // three ways: // Start the command when the button is pressed and let it run the command // until it is finished as determined by it's isFinished method. // button.whenPressed(new ExampleCommand()); // Run the command while the button is being held down and interrupt it once // the button is released. // button.whileHeld(new ExampleCommand()); // Start the command when the button is released and let it run the command // until it is finished as determined by it's isFinished method. // button.whenReleased(new ExampleCommand()); }
[ "connor.willison@gmail.com" ]
connor.willison@gmail.com
b8fdcfdee0f4728c1b714657dfbd5daf5bb8d41b
e9efd209af720c3a2b5951382e55b309fd57adc2
/jeecms2012/src/org/javacoo/crawler/util/DefaultURIHelper.java
08fb5fd9be86997a505d8e68f03ae8151c2be759
[]
no_license
lianxiaopeng/crawer
c457c47f549f501a9d6a4ca9859392df910eb143
a95ad4f52260f21d2f38be982730e61b9cf1f34d
refs/heads/master
2021-01-10T08:39:01.610632
2016-02-27T07:46:21
2016-02-27T07:46:21
52,655,924
0
0
null
null
null
null
UTF-8
Java
false
false
3,834
java
package org.javacoo.crawler.util; import java.net.URI; import java.net.URISyntaxException; import org.apache.commons.lang.StringUtils; import org.javacoo.crawler.constants.Constants; import org.javacoo.crawler.data.CrawlLinkURI; import org.javacoo.crawler.data.CrawlResURI; import org.javacoo.crawler.data.CrawlScope; import org.javacoo.crawler.data.CrawlURI; /** * URIๅธฎๅŠฉ็ฑปๆŽฅๅฃๅฎž็Žฐ็ฑป * @author javacoo * @since 2012-05-15 */ public class DefaultURIHelper implements URIHelper{ /**็ˆฌ่™ซๅ‚ๆ•ฐ*/ private CrawlScope crawlScope; public DefaultURIHelper(CrawlScope crawlScope) { super(); this.crawlScope = crawlScope; } /** * ็ป„่ฃ… CrawlURIๅฏน่ฑก * @param crawlURI ็ˆถURIๅฏน่ฑก * @param urlStr url * @param title ๆ ‡้ข˜ * @param type ็ฑปๅž‹ * @return CrawlURI */ public CrawlLinkURI populateCrawlURI(CrawlURI parentCrawlURI,String urlStr,String title){ CrawlLinkURI crawlURI = new CrawlLinkURI(); if(StringUtils.isNotBlank(urlStr)){ try { String pathType = Constants.PATH_TYPE_0; //็›ธๅฏนๅฝ“ๅ‰่ทฏๅพ„ if(!urlStr.startsWith("http://") && !urlStr.startsWith("https://") && !urlStr.startsWith("/")){ urlStr = "/"+urlStr; pathType = Constants.PATH_TYPE_2; }else if(!urlStr.startsWith("http://") && !urlStr.startsWith("https://") && urlStr.startsWith("/")){ pathType = Constants.PATH_TYPE_1; } urlStr = StringUtils.trim(urlStr); URI uri = new URI(urlStr); crawlURI.setParentURI(parentCrawlURI); crawlURI.setUrl(urlStr); crawlURI.setTitle(StringUtils.trim(title)); crawlURI.setPathType(pathType); crawlURI.setHost(uri.getHost()); crawlURI.setPort(uri.getPort()); crawlURI.setRawPath(uri.getRawPath()); } catch (URISyntaxException e) { e.printStackTrace(); } } return crawlURI; } /** * ็ป„่ฃ… ResURIๅฏน่ฑก * * @param parentCrawlURI ็ˆถURIๅฏน่ฑก * @param originUrl ๆบURL * @param newUrl ๆ–ฐURL * @param resType ่ต„ๆบ็ฑปๅž‹ * @return ResURI */ public CrawlResURI populateResURI(CrawlURI parentCrawlURI,String originUrl,String newUrl,String resType){ CrawlResURI resURI = new CrawlResURI(); if(StringUtils.isNotBlank(originUrl)){ try { String pathType = Constants.PATH_TYPE_0; String currUrl = originUrl; //็›ธๅฏนๅฝ“ๅ‰่ทฏๅพ„ if(!originUrl.startsWith("http://") && !originUrl.startsWith("https://") && !originUrl.startsWith("/")){ originUrl = "/"+originUrl; if(null != parentCrawlURI && StringUtils.isNotBlank(parentCrawlURI.getUrl())){ String parentUrl = parentCrawlURI.getUrl(); currUrl = parentUrl.substring(0, parentUrl.lastIndexOf("/"))+originUrl; } pathType = Constants.PATH_TYPE_2; }else if(!originUrl.startsWith("http://") && !originUrl.startsWith("https://") && originUrl.startsWith("/")){ pathType = Constants.PATH_TYPE_1; if(null != parentCrawlURI && StringUtils.isNotBlank(parentCrawlURI.getUrl())){ StringBuilder surUrl = new StringBuilder(); currUrl = surUrl.append(Constants.HTTP_FILL_KEY).append(parentCrawlURI.getHost()).append(":").append(parentCrawlURI.getPort()).append(originUrl).toString(); } } if(crawlScope.isExtractContentRes()){ currUrl = newUrl; } originUrl = StringUtils.trim(originUrl); URI uri = new URI(originUrl); resURI.setParentURI(parentCrawlURI); resURI.setOriginResUrl(originUrl); resURI.setNewResUrl(newUrl); resURI.setUrl(currUrl); resURI.setPathType(pathType); resURI.setHost(uri.getHost()); resURI.setPort(uri.getPort()); resURI.setRawPath(uri.getRawPath()); resURI.setResType(resType); } catch (URISyntaxException e) { e.printStackTrace(); } } return resURI; } }
[ "Administrator@WIN-PSR9Q3VBN4I" ]
Administrator@WIN-PSR9Q3VBN4I
ff387182a1c2451ef34fb91ed6bba827df780724
981fa2e6ad94cee012758e7eb107bef75024ac2c
/app/src/androidTest/java/com/gasiorek/pawel/personaltrainer/ExampleInstrumentedTest.java
c2f2cfd6e031d72dec5ee8ccc4fbad4308c00c13
[]
no_license
dczyzowski/PersonalTrainer
fff6341457165b0afcf04287a6f29f9009c3aaa1
415efd561fea98f0e4aa1d576a8790cc44570a65
refs/heads/master
2021-01-22T08:47:35.512157
2017-05-28T00:54:24
2017-05-28T00:54:24
92,632,233
0
0
null
null
null
null
UTF-8
Java
false
false
772
java
package com.gasiorek.pawel.personaltrainer; 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.gasiorek.pawel.personaltrainer", appContext.getPackageName()); } }
[ "dczyzowski@gmail.com" ]
dczyzowski@gmail.com
41aff997ebb9d9d30136df84d62b4e2cc6c14e3d
3b2d7941687c8a7ead6ef5b400d93d514d56330a
/src/main/java/eu/mrndesign/matned/rpggame/core/game/IHero.java
48c31e27d7e05e61f8568fbe2878ca6efe6bc2b4
[]
no_license
matned666/rpg-game
3dc310138ba8dea0e41f41853ef48c007e67a168
e67b74879ccbab1c177c7d3b6d8fd4fff365f05c
refs/heads/master
2023-06-19T11:02:45.417191
2021-07-15T04:01:08
2021-07-15T04:01:08
385,055,562
0
0
null
null
null
null
UTF-8
Java
false
false
1,882
java
package eu.mrndesign.matned.rpggame.core.game; import eu.mrndesign.matned.rpggame.core.IObserver; import eu.mrndesign.matned.rpggame.core.data.items.ICreature; import eu.mrndesign.matned.rpggame.core.data.items.IInventory; import java.util.List; public interface IHero { List<IInventory> getInventoryInBackpack(); ICreature get(); int getX(); int getY(); int getPrevX(); int getPrevY(); void setX(int val); void setY(int val); void setPrevX(int val); void setPrevY(int val); void attackAction(ICreature creature); void moveEast(); void moveWest(); void moveNorth(); void moveSouth(); void talk(ICreature creature); void runAway(); void pickUpItems(List<IInventory> items); void barter(); void putHelmet(IInventory inventory); void removeHelmet(); IInventory getHelmet(); void putArmor(IInventory inventory); void removeArmor(); IInventory getArmor(); void putShoes(IInventory inventory); void removeShoes(); IInventory getShoes(); void putGloves(IInventory inventory); void removeGloves(); IInventory getGloves(); void putBelt(IInventory inventory); void removeBelt(); IInventory getBelt(); void putPrimaryMeleeWeapon(IInventory inventory); void removePrimaryMeleeWeapon(); IInventory getPrimaryMeleeWeapon(); void putSecondaryMeleeWeapon(IInventory inventory); void removeSecondaryMeleeWeapon(); IInventory getSecondaryMeleeWeapon(); void putRangedWeapon(IInventory inventory); void removeRangedWeapon(); IInventory getRangedWeapon(); void putAmulet(IInventory inventory); void removeAmulet(); IInventory getAmulet(); void putItemOnSlot1(IInventory item); void putItemOnSlot2(IInventory item); void useItem(IInventory item); void dropItem(IInventory item); }
[ "mat.niedbal@yahoo.com" ]
mat.niedbal@yahoo.com
1806cb713c60f8f143ed41931f2ce8f098b925e5
9d9f3278b8c56fb781784c7e9d9fdac85db8f1eb
/tools/PacketSamuraiAE/src/packetsamurai/gui/logrepo/LogDetailsPane.java
886e4985fb92ed0109d248a83720203cfcca2dc6
[]
no_license
zhouxiaoxiaoxujian/exs-aion-emu
4f81d87930f065d5c26e91964a8bbce275c9e653
82edeace1c0e932442a82f6a9c8b738105008e6c
refs/heads/master
2021-01-19T14:34:18.029843
2017-09-18T01:04:25
2017-09-18T01:04:25
14,447,053
1
1
null
null
null
null
UTF-8
Java
false
false
5,294
java
/** * */ package packetsamurai.gui.logrepo; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.text.DateFormat; import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JEditorPane; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import packetsamurai.logrepo.LogFile; import packetsamurai.logrepo.LogRepository; import packetsamurai.logrepo.RemoteLogRepositoryBackend; /** * @author Ulysses R. Ribeiro * */ @SuppressWarnings("serial") class LogDetailsPanel extends JPanel { private JLabel _fileNameLabel = new JLabel("Filename: "); private JLabel _fileStatusLabel = new JLabel("Local: "); private JLabel _fileInfoLabel = new JLabel(""); private JButton _saveButton = new JButton("Save"); private JEditorPane _commentEditor = new JEditorPane(); private LogFile _logFile; public LogDetailsPanel(String name) { _saveButton.setEnabled(false); this.setBorder(BorderFactory.createCompoundBorder( BorderFactory.createTitledBorder(name), BorderFactory.createEmptyBorder(2,2,2,2))); this.setLayout(new GridBagLayout()); GridBagConstraints cons = new GridBagConstraints(); _saveButton.addActionListener(new SaveButtonListener()); _saveButton.setActionCommand("save"); cons.insets = new Insets(2,2,2,2); cons.anchor = GridBagConstraints.NORTHWEST; this.add(_fileNameLabel, cons); cons.gridx = 1; cons.anchor = GridBagConstraints.NORTHEAST; this.add(_saveButton, cons); cons.fill = GridBagConstraints.BOTH; cons.anchor = GridBagConstraints.NORTHWEST; cons.gridx = 0; cons.gridy = 1; this.add(_fileStatusLabel, cons); cons.gridy = 2; this.add(_fileInfoLabel, cons); cons.weighty = 0.5; cons.gridy = 3; cons.gridheight = 5; this.add(new JScrollPane(_commentEditor), cons); } public void showDetails(LogFile logFile) { _saveButton.setEnabled(true); _logFile = logFile; this.setFileName(logFile.getName()); this.setStatus(logFile.isLocal(), logFile.isRemote()); this.setFileInfo(logFile); this.setCommentText(logFile.getComments()); } protected void setFileName(String name) { _fileNameLabel.setText("Filename: "+name); } protected void setStatus(boolean isLocal, boolean isRemote) { _fileStatusLabel.setText("<html>Local: <font color="+(isLocal ? "green" : "red")+">"+(isLocal ? "YES" : "NO")+"</font> Remote: <font color="+(isRemote ? "green" : "red")+">"+(isRemote ? "YES" : "NO")+"</font></html>"); } protected void setFileInfo(LogFile logFile) { String lastModified; String uploaded; if (logFile.isLocal()) { Calendar calendar = Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault()); calendar.setTimeInMillis(logFile.getFile().lastModified()); lastModified = DateFormat.getInstance().format(calendar.getTime()); if (logFile.isRemote()) { calendar.setTimeInMillis(logFile.getUploadedTime()); uploaded = DateFormat.getInstance().format(calendar.getTime()); } else { uploaded = "N/A"; } } else { Calendar calendar = Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault()); calendar.setTimeInMillis(logFile.getUploadedTime()); uploaded = DateFormat.getInstance().format(calendar.getTime()); lastModified = "N/A"; } _fileInfoLabel.setText("<html><font color=blue>Filesize:</font> "+logFile.getSize()+" bytes&nbsp<font color=blue>Last-Modified:</font> "+lastModified+"&nbsp<font color=blue>Uploaded:</font> "+uploaded+"</html>"); } protected void setCommentText(String text) { _commentEditor.setText(text); } class SaveButtonListener implements ActionListener { public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); if (cmd.equals("save")) { _logFile.setComments(_commentEditor.getText()); } Thread update = new Thread ( new Runnable() { public void run() { RemoteLogRepositoryBackend.getInstance().updateLogDetails(_logFile); } } ); update.setName("LogFile Details Updater Thread"); update.start(); LogRepository.getInstance().runSaveDatabase(); } } }
[ "greggianbayocboc@gmail.com@85287832-b594-7149-79f4-51bc24f57482" ]
greggianbayocboc@gmail.com@85287832-b594-7149-79f4-51bc24f57482
653bd533c2bf81cb77c90d4be7d849836a2ca6e2
02a1b85c2af8faf51c50ed28b9bdead31d2f4b83
/src/test/java/stepDefinitions/InviteAFriendTest.java
0bb7ccdb11728508197357953e73edc406b4c7ec
[]
no_license
Lara624/ClarkProjects
ab79e415c3ad6cc73968c9e651f090a25966fa08
66a28f49450f6b86ece7d8fcf2b8feff05223754
refs/heads/master
2020-08-28T22:12:30.008494
2019-09-19T09:08:46
2019-09-19T09:08:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,321
java
package stepDefinitions; import cucumber.api.java.en.Given; import cucumber.api.java.en.When; import cucumber.api.java.en.Then; import cucumber.api.java.en.And; import cucumber.api.junit.Cucumber; import java.util.concurrent.TimeUnit; import org.junit.runner.RunWith; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.testng.Assert; import Reusable.BasePropertyTest; @RunWith(Cucumber.class) public class InviteAFriendTest extends BasePropertyTest { WebDriver driver; @Given("^User is logged into the application$") public void user_is_logged_into_the_application() throws Throwable { // This steps opens the browser and logs in a user into the application. SetUp (); } @When("^User clicks the Freunde einladen$") public void user_clicks_the_freunde_einladen() throws Throwable { driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); WebElement invite = driver.findElement(By.xpath("//a[@class='page-navigation__link--invite _sections-link_dyd59d _action_dyd59d _base-action_dyd59d']")); invite.click(); } @Then("^User scrolls to the per E-mail einladen text box$") public void user_scrolls_to_the_per_email_einladen_text_box() throws Throwable { JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("window.scrollBy(0,250)", ""); } @Then("^User clicks the E-mail einladen$") public void user_clicks_the_email_einladen() throws Throwable { WebElement inputEmail = driver.findElement(By.xpath("//input[@id='email']")); inputEmail.sendKeys("haywaii90@yahoo.com"); WebElement sendInvite = driver.findElement(By.xpath("//button[@id='sendInvitationEmail']")); sendInvite.click(); } @And("^User verifies that an onscreen notification message is recieved$") public void user_verifies_that_an_onscreen_notification_message_is_recieved() throws Throwable { WebElement msg = driver.findElement(By.xpath("//div[@class='success-text']")); String txt = msg.getText(); String ExpectedText = "erfolgreich versendet"; Assert.assertEquals(txt, ExpectedText); } }
[ "Ayobami.Elutade@outlook.com" ]
Ayobami.Elutade@outlook.com
830c8a082b184c853640dd50bc3bd399ac8aa2ae
4f9e893cedd8f25557239f939edee6bcb1246715
/jinghua/dmm_xg/src/main/java/cn/gilight/dmm/xg/dao/ChangeBadDao.java
4d6f8beeae809d6bde2163bb954d237e8a942163
[]
no_license
yangtie34/projects
cc9ba22c1fd235dadfe18509bc6951e21e9d3be4
5a3a86116e385db1086f8f6e9eb07198432fec27
refs/heads/master
2020-06-29T11:04:26.615952
2017-07-25T03:28:15
2017-07-25T03:28:15
74,436,105
1
4
null
null
null
null
UTF-8
Java
false
false
140
java
package cn.gilight.dmm.xg.dao; /** * * * @author xuebl * @date 2016ๅนด5ๆœˆ10ๆ—ฅ ไธ‹ๅˆ5:57:24 */ public interface ChangeBadDao { }
[ "yangtie34@163.com" ]
yangtie34@163.com
d4c2350977ce9e74a639c112cf2c0a55dea38ea3
00a2d1a60e8e70a2ea01cc370122594c655a11b0
/src/test/Test1.java
677493d273f719a4d4253fa5a0a896b27d91a7b8
[]
no_license
fazil-git/Shopping-mall-billing-web-application
5df33c0c7267dfcd2060cd9444a60b8926928586
403045bad8c8199cd827ba817b1c00a8921fdcaa
refs/heads/master
2023-03-11T08:40:01.794330
2021-03-02T11:40:50
2021-03-02T11:40:50
343,751,947
0
0
null
null
null
null
UTF-8
Java
false
false
88
java
package test; public class Test1 { public static void main(String[] args) { } }
[ "qfazil.lee@gmail.com" ]
qfazil.lee@gmail.com
058adf975e8afeae720e76c595208e1fbf0221ea
06faaf8e930c168dc861d2995f7f55d491981587
/app/src/main/java/it/curdrome/timetogo/connection/server/CategoriesAsyncTask.java
e7812fa173593ab721d0e6cac46dca2d4c5b1e05
[]
no_license
drobishman/TimeToGo
13253887d723b43ec97518cc6de095f106b53e54
9873f177abfeac42144d12c514afe689433a2294
refs/heads/master
2021-01-11T23:51:55.319151
2017-07-10T16:31:18
2017-07-10T16:31:18
78,631,433
0
0
null
null
null
null
UTF-8
Java
false
false
2,397
java
package it.curdrome.timetogo.connection.server; import android.os.AsyncTask; import org.json.JSONArray; import org.json.JSONException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; /** * Created by adrian on 16/01/2017. * * Class used to get Categories from our servers * * @author Drob Adrian Mihai * @version 2 * */ public class CategoriesAsyncTask extends AsyncTask<String, String, String> { public CategoriesResponse response = null; private String[] stringArray; /** * Http request * * @param strings default parameter * @return null */ @Override protected String doInBackground(String... strings) { String stringUrl = "http://projectis-curdrome.rhcloud.com/listcategories"; StringBuilder response = new StringBuilder(); try { URL url = new URL(stringUrl); HttpURLConnection httpconn = (HttpURLConnection) url .openConnection(); if (httpconn.getResponseCode() == HttpURLConnection.HTTP_OK) { BufferedReader input = new BufferedReader( new InputStreamReader(httpconn.getInputStream()), 8192); String strLine = null; while ((strLine = input.readLine()) != null) { response.append(strLine); } input.close(); } String jsonOutput = response.toString(); return jsonOutput; } catch (Exception e) { e.printStackTrace(); } return null; } /** * all categories will be added to a String array and send as response * @param result */ @Override protected void onPostExecute(String result) { super.onPostExecute(result); if(result == null){ response.taskResult(null); } else try { JSONArray ja = new JSONArray(result); stringArray = new String[ja.length()]; for (int i=0; i<ja.length();i++) { stringArray[i]=ja.getJSONObject(i).getString("name"); } } catch (JSONException e) { e.printStackTrace(); } response.taskResult(stringArray); } }
[ "adrian.drob88@gmail.com" ]
adrian.drob88@gmail.com
66d36eee8a18d9dbda9a2dfef1580f6fa01ad2da
698f3c7e14821285332f12e531810a44e8529442
/src/main/java/com/cdkj/loan/domain/CarDealer.java
2a38e77cfa324071b558294859be1c422c18e884
[]
no_license
ITessence/xn-htwt
20e144b4f2dcd7261c5ddc4ed98c73899cd672d3
8f369d5b589d04800f5d2999858d6e666ab873a0
refs/heads/master
2020-05-30T20:37:27.120890
2019-04-22T05:44:22
2019-04-22T05:44:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,385
java
package com.cdkj.loan.domain; import java.util.Date; import java.util.List; import com.cdkj.loan.dao.base.ABaseDO; public class CarDealer extends ABaseDO { /** * @Fields serialVersionUID : TODO(็”จไธ€ๅฅ่ฏๆ่ฟฐ่ฟ™ไธชๅ˜้‡่กจ็คบไป€ไนˆ) */ private static final long serialVersionUID = 1L; private String code;// ็ผ–ๅท private String fullName;// ๅ…จ็งฐ private String abbrName;// ็ฎ€็งฐ private String isSelfDevelop;// ๆ˜ฏๅฆ่‡ชไธปๅผ€ๅ‘ private String address;// ๅœฐๅ€ private String carDealerType;// ่ฝฆ่กŒ็ป่ฅๆ€ง่ดจ private String mainContact;// ไธป่ฆ่”็ณปไบบ private Long contactPhone;// ่”็ณปไบบ็”ต่ฏ private String mainBrand;// ไธป่ฅๅ“็‰Œ private String parentGroup;// ๆ‰€ๅฑž้›†ๅ›ข private String agreement;// ๅ่ฎฎ private Date agreementValidDate;// ๅˆไฝœๅ่ฎฎๆœ‰ๆ•ˆๆœŸ private String agreementStatus;// ๅ่ฎฎ็Šถๆ€ private String agreementPic;// ่ฝฆๅ•†ๅˆไฝœๅ่ฎฎ private String settleWay;// ็ป“็ฎ—ๆ–นๅผ private String businessArea;// ไธšๅŠกๅŒบๅŸŸ private String belongBranchCompany;// ๅฝ’ๅฑžๅˆ†ๅ…ฌๅธ private String curNodeCode;// ๅฝ“ๅ‰่Š‚็‚น็ผ–ๅท private String approveNote;// ๅฎกๆ ธ่ฏดๆ˜Ž private String policyNote;// ๆ”ฟ็ญ–่ฏดๆ˜Ž private String remark;// ๅค‡ๆณจ /*--------่พ…ๅŠฉๅญ—ๆฎต----------*/ private List<CollectBankcard> collectBankcardList; private List<CollectBankcard> jxsCollectBankcardList;// ็ป้”€ๅ•†ๆ”ถๆฌพ่ดฆๅทๅˆ—่กจ private List<CarDealerProtocol> CarDealerProtocolList;// ็ป้”€ๅ•†ๅ่ฎฎ่กจ private List<CollectBankcard> gsCollectBankcardList;// ๅทฅๅ•†้“ถ่กŒ่ฟ”็‚น่ดฆๅทๅˆ—่กจ private List<CollectBankcard> zhCollectBankcardList;// ไธญ่กŒ้“ถ่กŒ่ฟ”็‚น่ดฆๅทๅˆ—่กจ private List<CollectBankcard> jhCollectBankcardList;// ๅปบ่กŒ้“ถ่กŒ่ฟ”็‚น่ดฆๅทๅˆ—่กจ public List<CollectBankcard> getCollectBankcardList() { return collectBankcardList; } public void setCollectBankcardList( List<CollectBankcard> collectBankcardList) { this.collectBankcardList = collectBankcardList; } public List<CarDealerProtocol> getCarDealerProtocolList() { return CarDealerProtocolList; } public void setCarDealerProtocolList( List<CarDealerProtocol> carDealerProtocolList) { CarDealerProtocolList = carDealerProtocolList; } public List<CollectBankcard> getJxsCollectBankcardList() { return jxsCollectBankcardList; } public void setJxsCollectBankcardList( List<CollectBankcard> jxsCollectBankcardList) { this.jxsCollectBankcardList = jxsCollectBankcardList; } public List<CollectBankcard> getGsCollectBankcardList() { return gsCollectBankcardList; } public void setGsCollectBankcardList( List<CollectBankcard> gsCollectBankcardList) { this.gsCollectBankcardList = gsCollectBankcardList; } public List<CollectBankcard> getZhCollectBankcardList() { return zhCollectBankcardList; } public void setZhCollectBankcardList( List<CollectBankcard> zhCollectBankcardList) { this.zhCollectBankcardList = zhCollectBankcardList; } public List<CollectBankcard> getJhCollectBankcardList() { return jhCollectBankcardList; } public void setJhCollectBankcardList( List<CollectBankcard> jhCollectBankcardList) { this.jhCollectBankcardList = jhCollectBankcardList; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getFullName() { return fullName; } public void setFullName(String fullName) { this.fullName = fullName; } public String getAbbrName() { return abbrName; } public void setAbbrName(String abbrName) { this.abbrName = abbrName; } public String getIsSelfDevelop() { return isSelfDevelop; } public void setIsSelfDevelop(String isSelfDevelop) { this.isSelfDevelop = isSelfDevelop; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getCarDealerType() { return carDealerType; } public void setCarDealerType(String carDealerType) { this.carDealerType = carDealerType; } public String getMainContact() { return mainContact; } public void setMainContact(String mainContact) { this.mainContact = mainContact; } public Long getContactPhone() { return contactPhone; } public void setContactPhone(Long contactPhone) { this.contactPhone = contactPhone; } public String getMainBrand() { return mainBrand; } public void setMainBrand(String mainBrand) { this.mainBrand = mainBrand; } public String getParentGroup() { return parentGroup; } public void setParentGroup(String parentGroup) { this.parentGroup = parentGroup; } public String getAgreement() { return agreement; } public void setAgreement(String agreement) { this.agreement = agreement; } public Date getAgreementValidDate() { return agreementValidDate; } public void setAgreementValidDate(Date agreementValidDate) { this.agreementValidDate = agreementValidDate; } public String getAgreementStatus() { return agreementStatus; } public void setAgreementStatus(String agreementStatus) { this.agreementStatus = agreementStatus; } public String getAgreementPic() { return agreementPic; } public void setAgreementPic(String agreementPic) { this.agreementPic = agreementPic; } public String getSettleWay() { return settleWay; } public void setSettleWay(String settleWay) { this.settleWay = settleWay; } public String getBusinessArea() { return businessArea; } public void setBusinessArea(String businessArea) { this.businessArea = businessArea; } public String getBelongBranchCompany() { return belongBranchCompany; } public void setBelongBranchCompany(String belongBranchCompany) { this.belongBranchCompany = belongBranchCompany; } public String getCurNodeCode() { return curNodeCode; } public void setCurNodeCode(String curNodeCode) { this.curNodeCode = curNodeCode; } public String getApproveNote() { return approveNote; } public void setApproveNote(String approveNote) { this.approveNote = approveNote; } public String getPolicyNote() { return policyNote; } public void setPolicyNote(String policyNote) { this.policyNote = policyNote; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } }
[ "yunlai0821@163.com" ]
yunlai0821@163.com
a815074e81fd2a6cb413c7432279e7b4510b20f0
e31bdf51566f48f22c2cd9f2a04588fe018b9387
/core/src/com/mygdx/screen/CharacterChangeScreen.java
5f55d105a11233eef69ee6d964b1a97d0acc13c5
[]
no_license
CienProject2014/OneLevelHero
49e542eb8e4c457d071c5753a7a0aabdc5df4f7f
cca98719fba4cf89cfc843a519eb51a25a1a242f
refs/heads/Developer
2020-12-24T16:31:44.382612
2016-04-03T07:51:38
2016-04-03T07:51:38
21,557,302
14
9
null
2015-12-10T14:12:53
2014-07-07T05:03:51
Java
UTF-8
Java
false
false
681
java
package com.mygdx.screen; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.InputMultiplexer; import com.badlogic.gdx.scenes.scene2d.Stage; import com.mygdx.enums.StageEnum; public class CharacterChangeScreen extends BaseScreen { private Stage characterChangeStage; @Override public void render(float delta) { super.render(delta); characterChangeStage.draw(); characterChangeStage.act(delta); } @Override public void show() { characterChangeStage = stageFactory.makeStage(StageEnum.CHARACTER_CHANGE); InputMultiplexer multiplexer = new InputMultiplexer(); multiplexer.addProcessor(0, characterChangeStage); Gdx.input.setInputProcessor(multiplexer); } }
[ "leset912@gmail.com" ]
leset912@gmail.com
f23292eccd6e3914f0b1710aa126132b8303812e
692c0aa86a803eb057b2661266c2b25b810716e2
/src/main/java/br/com/zup/xyinc/common/entity/Poi.java
ac6a3fcca86598268a385898b42292373e4e3e5e
[]
no_license
alexfabgarcia/xy-inc
be7f17471b08d182a5abbcc9b95f84b682a7a258
56f69d3237dc755075651b4c1c103cbbf729853f
refs/heads/master
2020-03-18T13:14:55.853269
2018-05-30T04:44:30
2018-05-30T04:44:30
134,771,387
0
0
null
null
null
null
UTF-8
Java
false
false
689
java
package br.com.zup.xyinc.common.entity; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.springframework.data.annotation.Id; import org.springframework.data.geo.Point; import org.springframework.data.mongodb.core.mapping.Document; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; /** * Entitade que representa um ponto de interesse (POI). */ @Getter @Setter @NoArgsConstructor @Document public class Poi { @Id private String id; @NotEmpty(message = "xyinc.poi.name.mandatory") private String name; @NotNull(message = "xyinc.poi.position.mandatory") private Point position; }
[ "agarcia46@dxc.com" ]
agarcia46@dxc.com
8403385f6832c1577ae2ce6941cab92a5b1995c4
7d0b74590136fed78c9c6997a46b95dc5ca2e9ab
/src/com/soumyadeep/threads/waitNotifyNotifyAll/WaitNotifyTest.java
e18d89577bbd00322ac43d648fd86056f6dcf5df
[]
no_license
soumyadeep-saha/ThreadsJournaldev
0603334103d2928576b0edb26b96c3c57bcfcf90
9b0ce081c644914ea5682ef56474238e74308f1e
refs/heads/master
2020-04-13T05:09:20.102192
2018-12-24T11:22:26
2018-12-24T11:22:26
162,983,100
0
0
null
null
null
null
UTF-8
Java
false
false
467
java
package com.soumyadeep.threads.waitNotifyNotifyAll; public class WaitNotifyTest { public static void main(String[] args) { Message msg = new Message("process it"); Waiter waiter = new Waiter(msg); new Thread(waiter, "waiter").start(); Waiter waiter1 = new Waiter(msg); new Thread(waiter1, "waiter1").start(); Notifier notifier = new Notifier(msg); new Thread(notifier, "notifier").start(); System.out.println("All the threads are started"); } }
[ "SOUMYADEEP_SAHA@CRGL-THIRDPARTY.COM" ]
SOUMYADEEP_SAHA@CRGL-THIRDPARTY.COM
747d83459d2ba96b1e238a657f6825ec13c31ab3
ebeb92dd54e191a001c4597c612a61198dd946f2
/bootstrap-primefaces/web/src/main/java/org/bootstrap/util/LocaleBean.java
942714e1ea833e5c78f814788189eba8f30c3e84
[]
no_license
hkarakose/bootstraps
6b196d8462b354c5d560a6cab39ccf16d95e7a2a
3e62b404f467d2b2d897f0a874edd7dd8f2fbe3e
refs/heads/master
2020-12-24T15:59:13.873358
2013-10-14T20:49:04
2013-10-14T20:49:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,840
java
package org.bootstrap.util; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.context.FacesContext; import javax.faces.model.SelectItem; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Locale; @ManagedBean @SessionScoped public class LocaleBean { private Locale locale; @PostConstruct public void init() { locale = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale(); } public Locale getLocale() { return locale; } public void setLocale(Locale locale) { this.locale = locale; } public SelectItem[] getLocales() { List<SelectItem> items = new ArrayList<SelectItem>(); Iterator<Locale> supportedLocales = FacesContext.getCurrentInstance().getApplication().getSupportedLocales(); while (supportedLocales.hasNext()) { Locale locale = supportedLocales.next(); items.add(new SelectItem(locale.toString(), locale.getDisplayName())); } return items.toArray(new SelectItem[] {}); } public String getSelectedLocale() { return getLocale().toString(); } public void setSelectedLocale() { setSelectedLocale(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("locale")); } public void setSelectedLocale(String localeString) { Iterator<Locale> supportedLocales = FacesContext.getCurrentInstance().getApplication().getSupportedLocales(); while (supportedLocales.hasNext()) { Locale locale = supportedLocales.next(); if (locale.toString().equals(localeString)) { this.locale = locale; break; } } } }
[ "halilkarakose@gmail.com" ]
halilkarakose@gmail.com
395e290c9397b413655563075bf6eda92251d7c4
8f20d77c60553047b5b967d7676abf4d278f4dc2
/src/changhong_Practice/image_operate/TimeimageLoader.java
1227889cdf2e29d3cad15fd81556af4435b31b3a
[]
no_license
jchanghong/changhong_Practice
211318bbd1b6f206ffc458ab972cb4574764dd69
d407ce1799541dd502a63dd55687be39e3c1c098
refs/heads/master
2021-06-07T04:28:17.061463
2016-10-18T04:34:42
2016-10-18T04:34:42
18,941,022
6
0
null
null
null
null
UTF-8
Java
false
false
6,708
java
package changhong_Practice.image_operate; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.support.v4.content.AsyncTaskLoader; import changhong_Practice.config.Constants; import changhong_Practice.image_object.TimeImage; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; /** * Created by ่’‹้•ฟๅฎ on 2014/4/10 0002. * at jiangchanghong163@163.com * ๆœฌๅฎšไน‰ๅชๆ˜ฏๆขๅ›ž็ป“ๆžœไธๅŒ */ public class TimeimageLoader extends AsyncTaskLoader<List<TimeImage>> { final ForceLoadContentObserver mObserver; Uri mUri; String[] mProjection; String mSelection; String[] mSelectionArgs; String mSortOrder; Cursor mCursor; Cursor mcurCursor; List<TimeImage> mtimeImages=null; /* Runs on a worker thread */ @Override public List<TimeImage> loadInBackground() { Cursor cursor = getContext().getContentResolver().query(mUri, mProjection, mSelection, mSelectionArgs, mSortOrder); mcurCursor=cursor; List<TimeImage> timeImages=null; if (cursor != null) { // Ensure the cursor window is filled // cursor.getCount(); timeImages = new ArrayList<TimeImage>(); cursor.registerContentObserver(mObserver); while (cursor.moveToNext()) { String path = cursor.getString(Constants.INDEX_DATA); long id = cursor.getLong(Constants.INDEX_ID); long time = cursor.getLong(Constants.INDEX_DATE_TAKEN); TimeImage timeImage = new TimeImage(id,null, path, null, time); timeImage.id = id; timeImages.add(timeImage); } } return timeImages; } /* Runs on the UI thread */ @Override public void deliverResult(List<TimeImage> timeImageList) { if (isReset()) { // An async query came in while the loader is stopped if (mcurCursor != null) { mcurCursor.close(); } if (timeImageList != null) { timeImageList.clear(); } return; } List<TimeImage> old=mtimeImages; mtimeImages=timeImageList; Cursor oldCursor = mCursor; mCursor = mcurCursor; if (isStarted()) { super.deliverResult(timeImageList); } if (old != null) { old.clear(); } if (oldCursor != null && oldCursor != mcurCursor && !oldCursor.isClosed()) { oldCursor.close(); } } /** * Creates an empty unspecified CursorLoader. You must follow this with * calls to {@link #setUri(Uri)}, {@link #setSelection(String)}, etc * to specify the query to perform. */ public TimeimageLoader(Context context) { super(context); mObserver = new ForceLoadContentObserver(); } /** * Creates a fully-specified CursorLoader. See * {@link android.content.ContentResolver#query(Uri, String[], String, String[], String) * ContentResolver.query()} for documentation on the meaning of the * parameters. These will be passed as-is to that call. */ public TimeimageLoader(Context context, Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { super(context); mObserver = new ForceLoadContentObserver(); mUri = uri; mProjection = projection; mSelection = selection; mSelectionArgs = selectionArgs; mSortOrder = sortOrder; } /** * Starts an asynchronous load of the contacts list data. When the result is ready the callbacks * will be called on the UI thread. If a previous load has been completed and is still valid * the result may be passed to the callbacks immediately. * * Must be called from the UI thread */ @Override protected void onStartLoading() { if (mCursor != null&&mtimeImages!=null) { deliverResult(mtimeImages); } if (takeContentChanged() || mCursor == null) { forceLoad(); } } /** * Must be called from the UI thread */ @Override protected void onStopLoading() { // Attempt to cancel the current load task if possible. cancelLoad(); } @Override public void onCanceled(List<TimeImage> timeImageList) { if (mcurCursor != null && !mcurCursor.isClosed()) { mcurCursor.close(); } if (timeImageList != null) { timeImageList.clear(); } } @Override protected void onReset() { super.onReset(); // Ensure the loader is stopped onStopLoading(); if (mCursor != null && !mCursor.isClosed()) { mCursor.close(); } if (mtimeImages != null) { mtimeImages.clear(); } mtimeImages=null; mCursor = null; } public Uri getUri() { return mUri; } public void setUri(Uri uri) { mUri = uri; } public String[] getProjection() { return mProjection; } public void setProjection(String[] projection) { mProjection = projection; } public String getSelection() { return mSelection; } public void setSelection(String selection) { mSelection = selection; } public String[] getSelectionArgs() { return mSelectionArgs; } public void setSelectionArgs(String[] selectionArgs) { mSelectionArgs = selectionArgs; } public String getSortOrder() { return mSortOrder; } public void setSortOrder(String sortOrder) { mSortOrder = sortOrder; } @Override public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) { super.dump(prefix, fd, writer, args); // writer.print(prefix); writer.print("mUri="); writer.println(mUri); // writer.print(prefix); writer.print("mProjection="); // writer.println(Arrays.toString(mProjection)); // writer.print(prefix); writer.print("mSelection="); writer.println(mSelection); // writer.print(prefix); writer.print("mSelectionArgs="); // writer.println(Arrays.toString(mSelectionArgs)); // writer.print(prefix); writer.print("mSortOrder="); writer.println(mSortOrder); // writer.print(prefix); writer.print("mCursor="); writer.println(mCursor); // writer.print(prefix); writer.print("mContentChanged="); // writer.println(mContentChanged); } }
[ "183788460@qq.com" ]
183788460@qq.com
0fde15e3eab146688e5b4422726b23eba2b5c565
1ab5fce02b27d98f6182f1bf8aef967129b44856
/app/src/test/java/com/cnwir/gongxin/ExampleUnitTest.java
856ae1191a373c3d8983c0b5134dade389e30972
[]
no_license
chengfangpeng/Qingting_Tab
18a33e0e6efec49cd9a6753e5e8cc00594c0708c
e6d5993947f4bcaf0a0b9d76f86a9f036ceddc20
refs/heads/master
2020-05-30T21:57:15.476720
2015-09-23T09:09:20
2015-09-23T09:09:20
42,561,779
0
0
null
null
null
null
UTF-8
Java
false
false
310
java
package com.cnwir.gongxin; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "chengfangpeng@foxmail.com" ]
chengfangpeng@foxmail.com
c471d582eec7903856b3b2237da6b5e5ccad40f2
c7ea7a0fec664554f8c5787e76a33d9e0dc5b12f
/project/smarthome/src/main/java/be/pxl/smarthome/service/api/impl/IkeaApiImpl.java
27947c1936de079ce3abd37762c6226beac1aeab
[]
no_license
pxlit-projects/entmob20-21-SvenWynantsPXL
9e99e3ae52ee63e75a6770a4643c184fc7fb938d
6ccb15314162d28f47e0c04b950cef5de8727645
refs/heads/main
2023-02-22T00:29:58.396372
2021-01-28T09:41:10
2021-01-28T09:41:10
301,419,241
0
0
null
null
null
null
UTF-8
Java
false
false
1,974
java
package be.pxl.smarthome.service.api.impl; import be.pxl.smarthome.models.Light; import be.pxl.smarthome.models.LightManufacturer; import be.pxl.smarthome.service.api.LightApi; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.stereotype.Service; import javax.annotation.PostConstruct; import java.net.http.HttpClient; import java.util.ArrayList; import java.util.List; @Service public class IkeaApiImpl implements LightApi { private static Logger logger = LogManager.getLogger(IkeaApiImpl.class); private HttpClient client; @PostConstruct public void createClient(){ client = HttpClient.newHttpClient(); } @Override public LightManufacturer getManufacturer() { return LightManufacturer.IKEA; } public List<Light> getAllLights(){ /*var request = HttpRequest.newBuilder( URI.create("https://ikeabridge/api/<username>/lights")) .build(); */ logger.info("All lights from ikea requested"); return new ArrayList<>(); } @Override public void addLight(Light light) { logger.info("a light was added to the ikea bridge"); return; } @Override public void removeLight(String name) { logger.info("light was removed from the bridge"); } @Override public Light getLightByName(String name) { logger.info("light from ikea api requested"); return null; } @Override public void changeState(Light light) { logger.info("State of ikea light changed to" + light.getOnState()); } @Override public void turnOnLight(Light light) { logger.info("Ikea light turned on"); } @Override public void turnOffLight(Light light) { logger.info("Ikea light turned off"); } @Override public void updateLight(Light light) { logger.info("Ikea light updated"); } }
[ "sven.wynants@hotmail.com" ]
sven.wynants@hotmail.com
543a7be546bc1611ba929db5f4dbd60c3523fcc6
2e96561958ef2e63d2da608908575c6ef2439960
/src/main/java/com/qa/pageobjects/DuckDuckGoLandingPage.java
270fb08c5bb0cd93954d6e3486a2c0b4c52293a1
[ "MIT" ]
permissive
tihomirt/qaExampleJunit5
44dbd6a6228814318b4e4675cd4e0141dded4501
7fc3113261a85b1342f6b7773df07108e6833606
refs/heads/master
2020-05-30T00:18:07.185519
2019-05-30T19:24:55
2019-05-30T19:24:55
189,456,323
0
0
null
null
null
null
UTF-8
Java
false
false
884
java
package com.qa.pageobjects; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import com.qa.testbase.BrowsersEnum; import com.qa.utils.WaitConstants; import com.qa.utils.WaitForElementToAppear; public class DuckDuckGoLandingPage extends BasePage { @FindBy(id = "search_form_input_homepage") private WebElement searchField; public DuckDuckGoLandingPage(WebDriver driver, BrowsersEnum browser) { super(driver, browser); } @Override protected void isLoaded() throws Error { driver.get(WaitConstants.URL); new WaitForElementToAppear(driver).apply(searchField); } public DuckDuckGoResultsPage fillSearchFieldAndClickEnter(String text) { searchField.sendKeys(text); searchField.sendKeys(Keys.ENTER); return new DuckDuckGoResultsPage(driver, browser); } }
[ "tihomir@wedoqa.com" ]
tihomir@wedoqa.com
a310c2c8d294926e48d67704c6cd7e15e619256e
81719679e3d5945def9b7f3a6f638ee274f5d770
/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/transform/BackupDetailsMarshaller.java
421ae02c7d8090fd4efb239e09a296fdea913ddc
[ "Apache-2.0" ]
permissive
ZeevHayat1/aws-sdk-java
1e3351f2d3f44608fbd3ff987630b320b98dc55c
bd1a89e53384095bea869a4ea064ef0cf6ed7588
refs/heads/master
2022-04-10T14:18:43.276970
2020-03-07T12:15:44
2020-03-07T12:15:44
172,681,373
1
0
Apache-2.0
2019-02-26T09:36:47
2019-02-26T09:36:47
null
UTF-8
Java
false
false
3,994
java
/* * Copyright 2014-2019 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.dynamodbv2.model.transform; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.services.dynamodbv2.model.*; import com.amazonaws.protocol.*; import com.amazonaws.annotation.SdkInternalApi; /** * BackupDetailsMarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") @SdkInternalApi public class BackupDetailsMarshaller { private static final MarshallingInfo<String> BACKUPARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD) .marshallLocationName("BackupArn").build(); private static final MarshallingInfo<String> BACKUPNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("BackupName").build(); private static final MarshallingInfo<Long> BACKUPSIZEBYTES_BINDING = MarshallingInfo.builder(MarshallingType.LONG) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("BackupSizeBytes").build(); private static final MarshallingInfo<String> BACKUPSTATUS_BINDING = MarshallingInfo.builder(MarshallingType.STRING) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("BackupStatus").build(); private static final MarshallingInfo<String> BACKUPTYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("BackupType").build(); private static final MarshallingInfo<java.util.Date> BACKUPCREATIONDATETIME_BINDING = MarshallingInfo.builder(MarshallingType.DATE) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("BackupCreationDateTime").timestampFormat("unixTimestamp").build(); private static final MarshallingInfo<java.util.Date> BACKUPEXPIRYDATETIME_BINDING = MarshallingInfo.builder(MarshallingType.DATE) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("BackupExpiryDateTime").timestampFormat("unixTimestamp").build(); private static final BackupDetailsMarshaller instance = new BackupDetailsMarshaller(); public static BackupDetailsMarshaller getInstance() { return instance; } /** * Marshall the given parameter object. */ public void marshall(BackupDetails backupDetails, ProtocolMarshaller protocolMarshaller) { if (backupDetails == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(backupDetails.getBackupArn(), BACKUPARN_BINDING); protocolMarshaller.marshall(backupDetails.getBackupName(), BACKUPNAME_BINDING); protocolMarshaller.marshall(backupDetails.getBackupSizeBytes(), BACKUPSIZEBYTES_BINDING); protocolMarshaller.marshall(backupDetails.getBackupStatus(), BACKUPSTATUS_BINDING); protocolMarshaller.marshall(backupDetails.getBackupType(), BACKUPTYPE_BINDING); protocolMarshaller.marshall(backupDetails.getBackupCreationDateTime(), BACKUPCREATIONDATETIME_BINDING); protocolMarshaller.marshall(backupDetails.getBackupExpiryDateTime(), BACKUPEXPIRYDATETIME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
[ "" ]
20c2c819a24f039bce745fbcaff53cadbadd4c5d
ed45ae30d67ea02a94346ca3a9e644bcdc58e916
/ly-upload/src/main/java/com/leyou/LyUploadApplication.java
fbc2297f1e9adf73911871134d8dd66cb4fdc4e1
[]
no_license
sunshinehubery/leyou
4676a10118b8214a006ade5c6867589d1620dbd8
7cd74e8e5900878acd7ea2d3a26469ee699fbadc
refs/heads/master
2022-06-28T12:05:51.618392
2019-06-01T14:12:11
2019-06-01T14:12:11
185,955,310
1
0
null
2022-06-21T01:07:14
2019-05-10T08:59:57
Java
UTF-8
Java
false
false
465
java
package com.leyou; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; /** * @author: furong * @date: 2019/4/7 * @description: */ @SpringBootApplication @EnableDiscoveryClient public class LyUploadApplication { public static void main(String[] args) { SpringApplication.run(LyUploadApplication.class); } }
[ "1036317945@qq.com" ]
1036317945@qq.com
30e5e29fd814bc550f6adb6dd44b0ac38303b444
ec2c25188e8714bca6587c1396e87725ad8fa443
/ethereum/graphqlrpc/src/main/java/tech/pegasys/pantheon/ethereum/graphqlrpc/internal/pojoadapter/BlockAdapterBase.java
3fa2b8f3d0841e78639deed8de889dfde6d23b0b
[ "Apache-2.0" ]
permissive
notlesh/pantheon
e2e74ece0ec992d89bd5deaf61caa356372202a8
2e5833d26c37d6f82138b9bd7f840f208bfa879b
refs/heads/master
2020-05-05T09:44:58.549814
2019-05-14T00:32:48
2019-05-14T15:22:38
179,915,313
0
0
Apache-2.0
2019-07-03T22:48:11
2019-04-07T03:50:20
Java
UTF-8
Java
false
false
8,199
java
/* * Copyright 2019 ConsenSys AG. * * 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 tech.pegasys.pantheon.ethereum.graphqlrpc.internal.pojoadapter; import tech.pegasys.pantheon.ethereum.core.Address; import tech.pegasys.pantheon.ethereum.core.BlockHeader; import tech.pegasys.pantheon.ethereum.core.Hash; import tech.pegasys.pantheon.ethereum.core.LogTopic; import tech.pegasys.pantheon.ethereum.core.Wei; import tech.pegasys.pantheon.ethereum.core.WorldState; import tech.pegasys.pantheon.ethereum.graphqlrpc.GraphQLDataFetcherContext; import tech.pegasys.pantheon.ethereum.graphqlrpc.internal.BlockWithMetadata; import tech.pegasys.pantheon.ethereum.graphqlrpc.internal.BlockchainQuery; import tech.pegasys.pantheon.ethereum.graphqlrpc.internal.LogWithMetadata; import tech.pegasys.pantheon.ethereum.graphqlrpc.internal.LogsQuery; import tech.pegasys.pantheon.ethereum.graphqlrpc.internal.TransactionWithMetadata; import tech.pegasys.pantheon.ethereum.mainnet.ProtocolSchedule; import tech.pegasys.pantheon.ethereum.transaction.CallParameter; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulator; import tech.pegasys.pantheon.ethereum.transaction.TransactionSimulatorResult; import tech.pegasys.pantheon.util.bytes.Bytes32; import tech.pegasys.pantheon.util.bytes.BytesValue; import tech.pegasys.pantheon.util.uint.UInt256; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; import com.google.common.primitives.Longs; import graphql.schema.DataFetchingEnvironment; @SuppressWarnings("unused") // reflected by GraphQL public class BlockAdapterBase extends AdapterBase { private final BlockHeader header; BlockAdapterBase(final BlockHeader header) { this.header = header; } public Optional<NormalBlockAdapter> getParent(final DataFetchingEnvironment environment) { final BlockchainQuery query = getBlockchainQuery(environment); final Hash parentHash = header.getParentHash(); final Optional<BlockWithMetadata<TransactionWithMetadata, Hash>> block = query.blockByHash(parentHash); return block.map(NormalBlockAdapter::new); } public Optional<Bytes32> getHash() { return Optional.of(header.getHash()); } public Optional<BytesValue> getNonce() { final long nonce = header.getNonce(); final byte[] bytes = Longs.toByteArray(nonce); return Optional.of(BytesValue.wrap(bytes)); } public Optional<Bytes32> getTransactionsRoot() { return Optional.of(header.getTransactionsRoot()); } public Optional<Bytes32> getStateRoot() { return Optional.of(header.getStateRoot()); } public Optional<Bytes32> getReceiptsRoot() { return Optional.of(header.getReceiptsRoot()); } public Optional<AccountAdapter> getMiner(final DataFetchingEnvironment environment) { final BlockchainQuery query = getBlockchainQuery(environment); long blockNumber = header.getNumber(); final Long bn = environment.getArgument("block"); if (bn != null) { blockNumber = bn; } return Optional.of( new AccountAdapter(query.getWorldState(blockNumber).get().get(header.getCoinbase()))); } public Optional<BytesValue> getExtraData() { return Optional.of(header.getExtraData()); } public Optional<Long> getGasLimit() { return Optional.of(header.getGasLimit()); } public Optional<Long> getGasUsed() { return Optional.of(header.getGasUsed()); } public Optional<UInt256> getTimestamp() { return Optional.of(UInt256.of(header.getTimestamp())); } public Optional<BytesValue> getLogsBloom() { return Optional.of(header.getLogsBloom().getBytes()); } public Optional<Bytes32> getMixHash() { return Optional.of(header.getMixHash()); } public Optional<UInt256> getDifficulty() { return Optional.of(header.getDifficulty()); } public Optional<Bytes32> getOmmerHash() { return Optional.of(header.getOmmersHash()); } public Optional<Long> getNumber() { final long bn = header.getNumber(); return Optional.of(bn); } public Optional<AccountAdapter> getAccount(final DataFetchingEnvironment environment) { final BlockchainQuery query = getBlockchainQuery(environment); final long bn = header.getNumber(); final WorldState ws = query.getWorldState(bn).get(); if (ws != null) { final Address addr = environment.getArgument("address"); return Optional.of(new AccountAdapter(ws.get(addr))); } return Optional.empty(); } public List<LogAdapter> getLogs(final DataFetchingEnvironment environment) { final Map<String, Object> filter = environment.getArgument("filter"); @SuppressWarnings("unchecked") final List<Address> addrs = (List<Address>) filter.get("addresses"); @SuppressWarnings("unchecked") final List<List<Bytes32>> topics = (List<List<Bytes32>>) filter.get("topics"); final List<List<LogTopic>> transformedTopics = new ArrayList<>(); for (final List<Bytes32> topic : topics) { transformedTopics.add(topic.stream().map(LogTopic::of).collect(Collectors.toList())); } final LogsQuery query = new LogsQuery.Builder().addresses(addrs).topics(transformedTopics).build(); final BlockchainQuery blockchain = getBlockchainQuery(environment); final Hash hash = header.getHash(); final List<LogWithMetadata> logs = blockchain.matchingLogs(hash, query); final List<LogAdapter> results = new ArrayList<>(); for (final LogWithMetadata log : logs) { results.add(new LogAdapter(log)); } return results; } public Optional<Long> getEstimateGas(final DataFetchingEnvironment environment) { final Optional<CallResult> result = executeCall(environment); return result.map(CallResult::getGasUsed); } public Optional<CallResult> getCall(final DataFetchingEnvironment environment) { return executeCall(environment); } private Optional<CallResult> executeCall(final DataFetchingEnvironment environment) { final Map<String, Object> callData = environment.getArgument("data"); final Address from = (Address) callData.get("from"); final Address to = (Address) callData.get("to"); final Long gas = (Long) callData.get("gas"); final UInt256 gasPrice = (UInt256) callData.get("gasPrice"); final UInt256 value = (UInt256) callData.get("value"); final BytesValue data = (BytesValue) callData.get("data"); final BlockchainQuery query = getBlockchainQuery(environment); final ProtocolSchedule<?> protocolSchedule = ((GraphQLDataFetcherContext) environment.getContext()).getProtocolSchedule(); final long bn = header.getNumber(); final TransactionSimulator transactionSimulator = new TransactionSimulator( query.getBlockchain(), query.getWorldStateArchive(), protocolSchedule); long gasParam = -1; Wei gasPriceParam = null; Wei valueParam = null; if (gas != null) { gasParam = gas; } if (gasPrice != null) { gasPriceParam = Wei.of(gasPrice); } if (value != null) { valueParam = Wei.of(value); } final CallParameter param = new CallParameter(from, to, gasParam, gasPriceParam, valueParam, data); final Optional<TransactionSimulatorResult> opt = transactionSimulator.process(param, bn); if (opt.isPresent()) { final TransactionSimulatorResult result = opt.get(); long status = 0; if (result.isSuccessful()) { status = 1; } final CallResult callResult = new CallResult(status, result.getGasEstimate(), result.getOutput()); return Optional.of(callResult); } return Optional.empty(); } }
[ "stephen@stephenashelton.com" ]
stephen@stephenashelton.com
d2106d093c97f31965faffa2661e8e81c8c2c231
06f7b6f5ac91dde29de3df072f4466c607daf205
/src/main/java/charsheet/services/events/LevelUp.java
cdb4aaba527ad89fe949a2eaefb7406f69fd6dba
[]
no_license
herbertkb/enterprise_dnd
2901d236fd46988a308bce7fafd0a1709dc1309c
7dcda13c477c21fa5802393390854d0658a527ed
refs/heads/master
2020-12-25T14:48:13.931268
2016-09-29T18:02:48
2016-09-29T18:02:48
66,579,478
0
0
null
null
null
null
UTF-8
Java
false
false
276
java
package charsheet.services.events; import javax.enterprise.context.RequestScoped; @RequestScoped public class LevelUp { private String forWhom; public String getForWhom() { return forWhom; } public void setForWhom(String forWhom) { this.forWhom = forWhom; } }
[ "herbertkb@vcu.edu" ]
herbertkb@vcu.edu
b01cb5df5a1bd93cc0cb5e48235b3dc0bf753a51
37a2b673e1d73c34cc6494387fdb1695e0c0c843
/src/bookapp20/gui/ManageStudentFrame.java
b40c3fbd3ec2c2911f3b6f716de1190da834ead7
[]
no_license
aosmanemender/Book-App
3bbbd0a8cf76b7258e43dc90838f7d8711b18a84
5061a403b3f703af79de73a3b20d429cd23e2365
refs/heads/main
2023-06-02T13:25:07.689384
2021-06-17T11:36:22
2021-06-17T11:36:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
23,510
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 bookapp20.gui; import bookapp20.controllers.StudentController; import bookapp20.entities.Student; import bookapp20.utilities.StudentTableModel; import java.sql.SQLException; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JTable; import javax.swing.SwingWorker; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; /** * * @author hover */ public class ManageStudentFrame extends javax.swing.JInternalFrame { private final StudentTableModel stdModel = new StudentTableModel(); private Student currentStudent = null; public ManageStudentFrame() { initComponents(); initialize(); } private void initialize() { this.setLocation(50, 50); disableAll(); editBtn.setEnabled(false); saveBtn.setEnabled(false); deleteBtn.setEnabled(false); stdTable.setModel(stdModel); stdTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); stdTable.getColumnModel().getColumn(0).setMinWidth(64); stdTable.getColumnModel().getColumn(0).setMaxWidth(64); stdTable.getColumnModel().getColumn(1).setMinWidth(128); stdTable.getColumnModel().getColumn(1).setMaxWidth(128); stdTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { tableRowSelectedPerformed(e); } }); } private void enableAll() { idField.setEditable(true); firstField.setEditable(true); lastField.setEditable(true); } private void disableAll() { idField.setEditable(false); firstField.setEditable(false); lastField.setEditable(false); } private void clearFields() { idField.setText(null); firstField.setText(null); lastField.setText(null); } public void reset() { sidField.setText(null); sfirstField.setText(null); slastField.setText(null); stdModel.removeAll(); clearFields(); saveBtn.setEnabled(false); editBtn.setEnabled(false); deleteBtn.setEnabled(false); } /** * 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() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); sidField = new javax.swing.JTextField(); sfirstField = new javax.swing.JTextField(); slastField = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); searchBtn = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); stdTable = new javax.swing.JTable(); jPanel2 = new javax.swing.JPanel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); idField = new javax.swing.JTextField(); firstField = new javax.swing.JTextField(); lastField = new javax.swing.JTextField(); cancelBtn = new javax.swing.JButton(); deleteBtn = new javax.swing.JButton(); editBtn = new javax.swing.JButton(); saveBtn = new javax.swing.JButton(); newBtn = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE); setTitle("Manage Student"); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Search Student")); jLabel1.setText("ID"); sidField.setColumns(8); sfirstField.setColumns(10); slastField.setColumns(10); jLabel2.setText("First Name"); jLabel3.setText("Last Name"); searchBtn.setText("Search"); searchBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchBtnActionPerformed(evt); } }); stdTable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { } )); stdTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); jScrollPane1.setViewportView(stdTable); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(sidField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1)) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(sfirstField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2)) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(slastField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(searchBtn))))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jLabel2) .addComponent(jLabel3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(sidField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(sfirstField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(slastField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(searchBtn)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Add or Edit Student")); jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel4.setText("ID"); jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel5.setText("First Name"); jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel6.setText("Last Name"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(idField, javax.swing.GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lastField)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(firstField))) .addContainerGap()) ); jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel4, jLabel5, jLabel6}); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(idField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(firstField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent(lastField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); cancelBtn.setText("Cancel"); cancelBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelBtnActionPerformed(evt); } }); deleteBtn.setText("Delete"); deleteBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteBtnActionPerformed(evt); } }); editBtn.setText("Edit"); editBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { editBtnActionPerformed(evt); } }); saveBtn.setText("Save"); saveBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveBtnActionPerformed(evt); } }); newBtn.setText("New"); newBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newBtnActionPerformed(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(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(newBtn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(editBtn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(deleteBtn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(saveBtn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cancelBtn))) .addContainerGap()) ); layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cancelBtn, deleteBtn, editBtn, newBtn, saveBtn}); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cancelBtn) .addComponent(deleteBtn) .addComponent(editBtn) .addComponent(saveBtn) .addComponent(newBtn)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void tableRowSelectedPerformed(ListSelectionEvent e) { saveBtn.setEnabled(false); if (stdTable.getSelectedRow() >= 0) { disableAll(); currentStudent = stdModel.get(stdTable.getSelectedRow()); idField.setText(currentStudent.getId()); firstField.setText(currentStudent.getFirstName()); lastField.setText(currentStudent.getLastName()); editBtn.setEnabled(true); deleteBtn.setEnabled(true); } else { clearFields(); editBtn.setEnabled(false); deleteBtn.setEnabled(false); currentStudent = null; } } private void cancelBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelBtnActionPerformed this.setVisible(false); }//GEN-LAST:event_cancelBtnActionPerformed private void newBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newBtnActionPerformed clearFields(); enableAll(); idField.requestFocus(); stdTable.clearSelection(); saveBtn.setEnabled(true); currentStudent = null; }//GEN-LAST:event_newBtnActionPerformed private void saveBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveBtnActionPerformed String id = idField.getText(); String first = firstField.getText(); String last = lastField.getText(); disableAll(); saveBtn.setEnabled(false); if (stdTable.getSelectedRow() < 0) { //save new SaveStudentWorker(new Student(id, first, last)).execute(); clearFields(); } else { currentStudent.setFirstName(first); currentStudent.setLastName(last); new UpdateStudentWorker(currentStudent).execute(); } }//GEN-LAST:event_saveBtnActionPerformed private void editBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editBtnActionPerformed enableAll(); saveBtn.setEnabled(true); editBtn.setEnabled(false); }//GEN-LAST:event_editBtnActionPerformed private void deleteBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteBtnActionPerformed deleteBtn.setEnabled(false); if (currentStudent != null) { new DeleteStudentWorker(currentStudent).execute(); } }//GEN-LAST:event_deleteBtnActionPerformed private class UpdateStudentWorker extends SwingWorker<String, Void> { private Student student; public UpdateStudentWorker(Student student) { this.student = student; } @Override protected String doInBackground() throws Exception { StudentController.instance.update(student); return null; } @Override public void done() { try { if (get() == null) { stdModel.update(student); } } catch (InterruptedException | ExecutionException ex) { Logger.getLogger(ManageStudentFrame.class.getName()).log(Level.SEVERE, null, ex); } } } private class SaveStudentWorker extends SwingWorker<String, Void> { private Student student; public SaveStudentWorker(Student student) { this.student = student; } @Override protected String doInBackground() throws Exception { try { StudentController.instance.create(student); } catch (SQLException ex) { return ex.getMessage(); } return null; } @Override public void done() { try { if (get() == null) { stdModel.add(student); } } catch (InterruptedException | ExecutionException ex) { Logger.getLogger(ManageStudentFrame.class.getName()).log(Level.SEVERE, null, ex); } } } private class DeleteStudentWorker extends SwingWorker<String, Void> { private Student std; public DeleteStudentWorker(Student std) { this.std = std; } @Override protected String doInBackground() throws Exception { StudentController.instance.deleteByKey(std); return null; } @Override public void done() { try { if (get() == null) { stdTable.clearSelection(); stdModel.remove(std); currentStudent = null; } } catch (InterruptedException | ExecutionException ex) { Logger.getLogger(ManageStudentFrame.class.getName()).log(Level.SEVERE, null, ex); } } } private void searchBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchBtnActionPerformed String subId = sidField.getText(); String subFirst = sfirstField.getText(); String subLast = slastField.getText(); stdModel.removeAll(); new SearchStudentWorker(subId, subFirst, subLast).execute(); }//GEN-LAST:event_searchBtnActionPerformed private class SearchStudentWorker extends SwingWorker<List<Student>, Void> { private final String subId; private final String subFirst; private final String subLast; public SearchStudentWorker(String subId, String subFirst, String subLast) { this.subId = subId; this.subFirst = subFirst; this.subLast = subLast; } @Override protected List<Student> doInBackground() throws Exception { return StudentController.instance.findByLike(subId, subFirst, subLast); } @Override public void done() { try { stdModel.set(get()); } catch (InterruptedException | ExecutionException ex) { Logger.getLogger(ManageStudentFrame.class.getName()).log(Level.SEVERE, null, ex); } } } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton cancelBtn; private javax.swing.JButton deleteBtn; private javax.swing.JButton editBtn; private javax.swing.JTextField firstField; private javax.swing.JTextField idField; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTextField lastField; private javax.swing.JButton newBtn; private javax.swing.JButton saveBtn; private javax.swing.JButton searchBtn; private javax.swing.JTextField sfirstField; private javax.swing.JTextField sidField; private javax.swing.JTextField slastField; private javax.swing.JTable stdTable; // End of variables declaration//GEN-END:variables }
[ "Abedelmonhem.Osman@st.ul.edu.lb" ]
Abedelmonhem.Osman@st.ul.edu.lb
a3b346b9a09f8f9eee74c1725d15f943f72fb1f3
ae61c63add0cda41102785bcd4cacd42355c3202
/src/easy/Atoi.java
d7b57c88cfafcff3dc2c4edac54bd9cbc05dfb5f
[]
no_license
ansitun/practiceleetcode
9ccd59f941235b3e2a6fa7c3676c3ad959cdb051
d48751af1ebd6ab308756a07e1ebe7a4015ab5b1
refs/heads/master
2023-05-23T02:06:07.895776
2021-06-18T03:11:24
2021-06-18T03:11:24
372,561,787
0
0
null
null
null
null
UTF-8
Java
false
false
1,448
java
package easy; public class Atoi { public int myAtoi(String s) { char temp; int lastIndex = -1, sign = 1, result = 0, oldResult; boolean number = false; for(int i=0; i<s.length(); i++) { temp = s.charAt(i); if (!number) { if(temp == ' ' && lastIndex+1 == i) { lastIndex = i; continue; } if(lastIndex+1 == i && temp == '-' && i+1 < s.length() && (int)s.charAt(i+1) >= 48 && (int)s.charAt(i+1) <= 57) { sign = -1; lastIndex = i; } else if(lastIndex+1 == i && temp == '+' && i+1 < s.length() && (int)s.charAt(i+1) >= 48 && (int)s.charAt(i+1) <= 57) { sign = 1; lastIndex = i; } } if(lastIndex+1 == i && (int)temp >= 48 && (int)temp <=57) { number = true; lastIndex = i; oldResult = result; result = result*10 + (int)temp - 48; if (oldResult != result/10) { if (sign == 1) return Integer.MAX_VALUE; else return Integer.MIN_VALUE; } } } return result*sign; } public static void main(String[] args) { Atoi atoi = new Atoi(); System.out.println(atoi.myAtoi("+-12")); } }
[ "ansurajkhadanga@Ansurajs-MacBook-Air.local" ]
ansurajkhadanga@Ansurajs-MacBook-Air.local
21a8cab1afd0d6afa16fb15e38e2ba12ee5f0719
5589807afeec73f2bde51a8ce81d2963b3db538a
/app/src/main/java/c/project_2/Adapter/My_Pharma_Adapter.java
8f9e98187a3ceb5e6e71e4b1b57a7e34c8a116e0
[]
no_license
abj676/Project-2
ac413bf34b363e641eaa393e1c5c2e90c02b1d35
17aa265cc9c39604b7841636c99a1d304a15f689
refs/heads/master
2021-05-12T00:41:36.349302
2018-01-15T12:05:05
2018-01-15T12:05:05
117,540,319
0
0
null
null
null
null
UTF-8
Java
false
false
3,263
java
package c.project_2.Adapter; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.text.util.Linkify; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import android.widget.Toast; import c.project_2.Model.Pharma_model; import c.project_2.R; import java.util.ArrayList; public class My_Pharma_Adapter extends RecyclerView.Adapter<My_Pharma_Adapter.My_Pharma_ViewHolder> { Context con; ArrayList<Pharma_model> mypharmaarraylist; ClickInterfacePharma clickinterfacephrma; public interface ClickInterfacePharma { public void onsingleclicknumber(int position); public void onLongclick(int position); } public void delete(int position) { mypharmaarraylist.remove(position); notifyItemRemoved(position); } public void deleteallphar() { mypharmaarraylist.clear(); notifyDataSetChanged(); } public void setClickintefacepharma(ClickInterfacePharma clickinterfacepharma) { this.clickinterfacephrma=clickinterfacepharma; } public My_Pharma_Adapter(Context con, ArrayList<Pharma_model> mypharmaarraylist) { this.con = con; this.mypharmaarraylist = mypharmaarraylist; } @Override public My_Pharma_ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.model_pharmacy_det,parent,false); return new My_Pharma_ViewHolder(view,con); } @Override public void onBindViewHolder(My_Pharma_ViewHolder holder, int position) { holder.pharma_name.setText(mypharmaarraylist.get(position).getPharma_name()); holder.pharma_number.setText(mypharmaarraylist.get(position).getPharma_number()); holder.pharma_address.setText(mypharmaarraylist.get(position).getPharma_address()); holder.pharma_id.setText(String.valueOf(mypharmaarraylist.get(position).getPharma_id())); } @Override public int getItemCount() { return mypharmaarraylist.size(); } public class My_Pharma_ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener,View.OnLongClickListener{ TextView pharma_name,pharma_number,pharma_address,pharma_id; Context context; public My_Pharma_ViewHolder(View itemView,Context c) { super(itemView); this.context=c; pharma_name=(TextView)itemView.findViewById(R.id.pharma_name); pharma_number=(TextView)itemView.findViewById(R.id.pharma_num); pharma_address=(TextView)itemView.findViewById(R.id.pharma_address); pharma_id=(TextView)itemView.findViewById(R.id.pharma_id); itemView.setOnLongClickListener(this); itemView.setOnClickListener(this); } @Override public boolean onLongClick(View v) { clickinterfacephrma.onLongclick(getAdapterPosition()); delete(getAdapterPosition()); return true; } @Override public void onClick(View v) { clickinterfacephrma.onsingleclicknumber(getAdapterPosition()); } } }
[ "abj676@gmail.com" ]
abj676@gmail.com
d89bd5185fcf3c89128b82a4edbca99b1b6c93fd
06b8510b58261f69748ad6f4b7b1bd029a634c9f
/ExampleApp/src/main/java/com/badoo/chateau/example/ui/conversations/list/ConversationListActivity.java
bb66b7861d81deed0ca8a2df2a899675f2964169
[ "MIT" ]
permissive
erikandre/Chateau
7c306688d12e4b86d677a7379f5a48ef66e17973
1d162e6e44726349cc928f59cc636ce0a0ba996c
refs/heads/master
2021-01-21T05:55:05.934800
2016-03-25T09:00:14
2016-03-25T09:00:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,530
java
package com.badoo.chateau.example.ui.conversations.list; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.badoo.chateau.example.R; import com.badoo.chateau.data.models.BaseConversation; import com.badoo.chateau.example.ui.BaseActivity; import com.badoo.chateau.example.ui.Injector; import com.badoo.chateau.example.ui.chat.ChatActivity; import com.badoo.chateau.example.ui.conversations.create.selectusers.SelectUserActivity; import com.badoo.chateau.example.ui.util.ViewFinder; import com.badoo.chateau.ui.conversations.list.ConversationListPresenter; import com.badoo.chateau.ui.conversations.list.ConversationListPresenterImpl; import com.badoo.chateau.ui.conversations.list.ConversationListView; public class ConversationListActivity extends BaseActivity implements ConversationListPresenter.ConversationListFlowListener { public static class DefaultConfiguration extends Injector.BaseConfiguration<ConversationListActivity> { @Override public void inject(ConversationListActivity target) { final ConversationListView view = createView(target); final ConversationListPresenter presenter = createPresenter(); bind(view, presenter, target); target.setConversationListPresenter(presenter); } protected ConversationListView createView(ConversationListActivity activity) { return new ConversationListViewImpl(ViewFinder.from(activity), activity.getToolbar()); } protected ConversationListPresenter createPresenter() { return new ConversationListPresenterImpl(); } } @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_conversations); setTitle(R.string.title_activity_conversations); Injector.inject(this); } public void setConversationListPresenter(@NonNull ConversationListPresenter presenter) { registerPresenter(presenter); } @Override public void openConversation(@NonNull BaseConversation conversation) { final Intent intent = ChatActivity.create(this, conversation.getId(), conversation.getName()); startActivity(intent); } @Override public void createNewConversation() { final Intent intent = new Intent(this, SelectUserActivity.class); startActivity(intent); } }
[ "rich.king@corp.badoo.com" ]
rich.king@corp.badoo.com
5c09c1eae0f0b401e015786b284f36a3f176e3c5
11b3a7425529a9ef4db18884ddaaacb21e03649b
/src/main/java/cn/com/esrichina/gcloud/commons/service/SystemService.java
52ac04d933ba23acd2e5dffe8055f4118cdd8414
[]
no_license
mouse3150/gisdrive
f0330da3d5773f52038bf7e192696f71da2871eb
6ae8abdf6a0249a59e08de39715ce69ef15dc1f2
refs/heads/master
2021-01-01T05:42:16.869075
2015-09-02T02:22:42
2015-09-02T02:22:42
41,771,625
1
0
null
null
null
null
UTF-8
Java
false
false
12,766
java
//package cn.com.esrichina.gcloud.commons.service; // //import java.util.ArrayList; //import java.util.Collection; //import java.util.List; //import java.util.Map; // //import javax.annotation.Resource; // //import org.springframework.security.core.GrantedAuthority; //import org.springframework.stereotype.Service; // //import cn.com.esrichina.commons.utils.ConfigContext; //import cn.com.esrichina.gcloud.business.domain.AGSSite; //import cn.com.esrichina.gcloud.business.domain.AGSSiteApply; //import cn.com.esrichina.gcloud.business.domain.Account; //import cn.com.esrichina.gcloud.business.domain.SiteLeaseApply; //import cn.com.esrichina.gcloud.business.domain.VM; //import cn.com.esrichina.gcloud.business.domain.repository.AGSSiteApplyRepository; //import cn.com.esrichina.gcloud.business.domain.repository.AGSSiteRepository; //import cn.com.esrichina.gcloud.business.domain.repository.SiteLeaseApplyRepository; //import cn.com.esrichina.gcloud.business.domain.repository.VMRepository; //import cn.com.esrichina.gcloud.business.services.AccountService; //import cn.com.esrichina.gcloud.business.services.GLogService; //import cn.com.esrichina.gcloud.business.services.VmService; //import cn.com.esrichina.gcloud.business.web.vo.AccountVO; //import cn.com.esrichina.gcloud.business.web.vo.SelfVO; //import cn.com.esrichina.gcloud.commons.LicenseContext; //import cn.com.esrichina.gcloud.commons.domain.Config; //import cn.com.esrichina.gcloud.commons.dto.SystemInfo; //import cn.com.esrichina.gcloud.commons.dto.UserResourceInfo; //import cn.com.esrichina.gcloud.commons.license.GCloudLicense; //import cn.com.esrichina.gcloud.security.SecurityContext; //import cn.com.esrichina.gcloud.security.UserService; //import cn.com.esrichina.gcloud.security.domain.User; //import cn.com.esrichina.gcloud.security.domain.UserConfig; //import cn.com.esrichina.gcloud.security.domain.repository.UserRepository; //import cn.com.esrichina.gcloud.security.dto.UserDetailInfo; //import cn.com.esrichina.gcloud.security.web.vo.UserVO; //import cn.com.esrichina.genericdao.search.Field; //import cn.com.esrichina.genericdao.search.Search; // //@Service //public class SystemService { // // @Resource // private SecurityContext securityContext; // // @Resource // private AccountService accountService; // // @Resource // private UserService userService; // // @Resource // private VmService vmService; // // @Resource // private AGSSiteApplyRepository siteApplyRepository; // // @Resource // private SiteLeaseApplyRepository siteLeaseApplyRepository; // // @Resource // private AGSSiteRepository siteRepository; // // // TODO ไปฅๅŽไธ่ƒฝ่ฟ™ๆ ท // @Resource // private UserRepository userRepository; // // @Resource // private VMRepository vmRepository; // // @Resource // private GLogService logService; // // @Resource // private ConfigService configService; // // @Resource // private AlertMsgService alertMsgService; // // public SystemInfo getSystemInfo() { // SystemInfo info = new SystemInfo(); // // if (securityContext.isLogin()) { // User user = userService.getUser(SecurityContext.getUser().getId()); // // Boolean isAccountAdmin = false; // Boolean isSuperAdmin = false; // Collection<GrantedAuthority> auths = user.getAuthorities(); // for (GrantedAuthority grantedAuthority : auths) { // if (grantedAuthority.getAuthority().equals("AUTH_ACCOUNT_SELF_MNG")) { // isAccountAdmin = true; // } else if (grantedAuthority.getAuthority().equals("AUTH_SUPER_ADMIN")) { // isSuperAdmin = true; // } // } // Search search = null; // // Search search = new Search(Iptable.class); // // Integer totalIpNum = iptableRepository.count(search); // // // // search = new Search(Iptable.class); // // search.addFilterEqual("used", false); // // Integer unusedIpNum = iptableRepository.count(search); // // // // info.setTotalIpNum(totalIpNum); // // info.setUnusedIpNum(unusedIpNum); // // if (isAccountAdmin) { // // ็ซ™็‚น็”ณ่ฏท // search = new Search(AGSSiteApply.class); // search.addFilterEqual("accountId", SecurityContext.getAccountId()); // Integer allSiteApplyNum = siteApplyRepository.count(search); // // search = new Search(AGSSiteApply.class); // search.addFilterEqual("accountId", SecurityContext.getAccountId()); // search.addFilterEqual("status", AGSSiteApply.APPLY_STATUS_UNCONFIRM); // Integer unconfirmSiteApplyNum = siteApplyRepository.count(search); // // search = new Search(AGSSiteApply.class); // search.addFilterEqual("accountId", SecurityContext.getAccountId()); // search.addFilterEqual("status", AGSSiteApply.APPLY_STATUS_CONFIRM); // Integer confirmSiteApplyNum = siteApplyRepository.count(search); // // search = new Search(AGSSiteApply.class); // search.addFilterEqual("accountId", SecurityContext.getAccountId()); // search.addFilterEqual("status", AGSSiteApply.APPLY_STATUS_UNAPPROVED); // Integer unapprovedSiteApplyNum = siteApplyRepository.count(search); // // // ็ปญ็งŸ็”ณ่ฏท // search = new Search(SiteLeaseApply.class); // search.addFilterEqual("accountId", SecurityContext.getAccountId()); // Integer allSiteLeaseApplyNum = siteLeaseApplyRepository.count(search); // // search = new Search(SiteLeaseApply.class); // search.addFilterEqual("accountId", SecurityContext.getAccountId()); // search.addFilterEqual("status", SiteLeaseApply.STATUS_UNCONFIRMED); // Integer unconfirmSiteLeaseApplyNum = siteLeaseApplyRepository.count(search); // // search = new Search(SiteLeaseApply.class); // search.addFilterEqual("accountId", SecurityContext.getAccountId()); // search.addFilterEqual("status", SiteLeaseApply.STATUS_CONFIRMED); // Integer confirmSiteLeaseApplyNum = siteLeaseApplyRepository.count(search); // // search = new Search(SiteLeaseApply.class); // search.addFilterEqual("accountId", SecurityContext.getAccountId()); // search.addFilterEqual("status", SiteLeaseApply.STATUS_UNAPPROVED); // Integer unapprovedSiteLeaseApplyNum = siteLeaseApplyRepository.count(search); // // search = new Search(User.class); // search.addFilterEqual("account.id", SecurityContext.getAccountId()); // Integer allUserNum = userRepository.count(search); // // search = new Search(User.class); // search.addFilterEqual("account.id", SecurityContext.getAccountId()); // search.addFilterEqual("isLocked", true); // Integer lockUserNum = userRepository.count(search); // // search = new Search(User.class); // search.addFilterEqual("account.id", SecurityContext.getAccountId()); // search.addFilterEqual("isEnabled", false); // Integer disableUserNum = userRepository.count(search); // // info.setAllSiteApplyNum(allSiteApplyNum); // info.setUnconfirmSiteApplyNum(unconfirmSiteApplyNum); // info.setConfirmSiteApplyNum(confirmSiteApplyNum); // info.setUnapprovedSiteApplyNum(unapprovedSiteApplyNum); // // info.setAllSiteLeaseApplyNum(allSiteLeaseApplyNum); // info.setUnconfirmSiteLeaseApplyNum(unconfirmSiteLeaseApplyNum); // info.setConfirmSiteLeaseApplyNum(confirmSiteLeaseApplyNum); // info.setUnapprovedSiteLeaseApplyNum(unapprovedSiteLeaseApplyNum); // // info.setAllUserNum(allUserNum); // info.setLockUserNum(lockUserNum); // info.setDisableUserNum(disableUserNum); // } // if (isAccountAdmin || isSuperAdmin) { // search = new Search(VM.class); // search.addFilterEqual("type", VM.TYPE_AGS); // search.addField("cpuNum", Field.OP_SUM, "totalCpuNum"); // search.addField("memoryNum", Field.OP_SUM, "totalMemoryNum"); // if (isAccountAdmin) { // search.addFilterEqual("accountId", SecurityContext.getAccountId()); // } // search.setResultMode(Search.RESULT_MAP); // List<Map<String, Object>> result = vmRepository.search(search); // Map<String, Object> resultMap = result.get(0); // // Integer allVCpu = Integer.valueOf(LicenseContext.getInstance().getLicense().getMaxCpuNum()); // Long usedVCpu = (Long) resultMap.get("totalCpuNum"); // Long usedMemory = (Long) resultMap.get("totalMemoryNum"); // // info.setAllVCpu(allVCpu); // info.setUsedMemory(usedMemory == null ? 0 : usedMemory); // info.setUsedVCpu(usedVCpu == null ? 0 : usedVCpu); // } // // if (isSuperAdmin) { // List<Config> configs = configService.getAllConfig(); // info.setConfigs(configs); // // // List<SystemStatus> list = new ArrayList<SystemStatus>(); // // SystemStatus autoProxyStatus = new SystemStatus(); // // autoProxyStatus.setSystemName("ไปฃ็†ๆœๅŠกๅ™จ"); // // try { // // String proxyServerUrl = // // ConfigContext.getInstance().getString("autoproxy.url"); // // restTemplate.getForObject(proxyServerUrl + // // "/rest/autoproxy/info", RestResponse.class); // // autoProxyStatus.setSystemStatus(SystemStatus.SYSTEM_STATUS_NORMAL); // // } catch (Exception e) { // // autoProxyStatus.setSystemStatus(SystemStatus.SYSTEM_STATUS_ERROR); // // } // // list.add(autoProxyStatus); // // info.setStatus(list); // // Integer alertMsgErrorCount = alertMsgService.getErrorCount(); // Integer alertMsgInfoCount = alertMsgService.getInfoCount(); // Integer alertMsgWarnCount = alertMsgService.getWarnCount(); // Integer alertMsgResolvedCount = alertMsgService.getResolvedCount(); // // info.setAlertMsgErrorCount(alertMsgErrorCount); // info.setAlertMsgInfoCount(alertMsgInfoCount); // info.setAlertMsgResolvedCount(alertMsgResolvedCount); // info.setAlertMsgWarnCount(alertMsgWarnCount); // // } // // SelfVO selfVO = new SelfVO(); // // UserDetailInfo detail = userService.getUserDetail(user.getId()); // // UserVO userVO = new UserVO(user); // selfVO.setUser(userVO); // selfVO.setUserDetailInfo(detail); // selfVO.setResourceInfo(getUserResourceInfo(user.getId())); // } // // List<AccountVO> accountVOList = new ArrayList<AccountVO>(); // List<Account> accountList = accountService.getAllAccount(); // for (Account account : accountList) { // accountVOList.add(new AccountVO(account.getId(), account.getShortName(), account.getName())); // } // info.setAccounts(accountVOList); // info.setPlatform(ConfigContext.getInstance().getString("platform")); // // info.setInit(ConfigContext.getInstance().getBoolean("init")); // info.setLicenseInfo(LicenseContext.getInstance().getLicense()); // return info; // } // // public UserResourceInfo getUserResourceInfo(String userId) { // UserResourceInfo info = new UserResourceInfo(); // // GCloudLicense licenseInfo = LicenseContext.getInstance().getLicense(); // info.setSystemVCpu(Integer.parseInt(licenseInfo.getMaxCpuNum())); // // UserConfig userConfig = userService.getUserConfig(userId); // if (userConfig == null || userConfig.getMaxNode() == null) { // info.setMaxSiteNum(0); // } else { // info.setMaxSiteNum(userConfig.getMaxSite()); // } // // Search search = new Search(AGSSite.class); // search.addFilterEqual("user.id", userId); // Integer currentSiteNum = siteRepository.count(search); // info.setCurrentSiteNum(currentSiteNum); // info.setAvailableSiteNum(info.getMaxSiteNum() - info.getCurrentSiteNum()); // // Integer usedVCpuNum = 0; // search = new Search(VM.class); // search.addFilterEqual("type", VM.TYPE_AGS); // List<VM> agsvmList = vmRepository.search(search); // for (VM agsvm : agsvmList) { // usedVCpuNum = usedVCpuNum + agsvm.getCpuNum(); // } // info.setUsedVCpuNum(usedVCpuNum); // info.setAvailableVCpuNum(info.getSystemVCpu() - usedVCpuNum); // // User user = userService.getUser(userId); // if (user.getAccount() != null) { // Account account = accountService.getAccount(user.getAccount().getId()); // Integer accountMaxSite = account.getMaxSite(); // // search = new Search(AGSSite.class); // search.addFilterEqual("accountId", account.getId()); // Integer accountSiteNum = siteRepository.count(search); // // info.setAccountCurrentSiteNum(accountSiteNum); // info.setAccountMaxSiteNum(accountMaxSite); // info.setAvailableAccountSiteNum(accountMaxSite - accountSiteNum); // } // return info; // } // // public Integer getUnusedVCpuNum() { // Search search = new Search(VM.class); // search.addFilterEqual("type", VM.TYPE_AGS); // search.addField("cpuNum", Field.OP_SUM, "totalCpuNum"); // search.addField("memoryNum", Field.OP_SUM, "totalMemoryNum"); // search.setResultMode(Search.RESULT_MAP); // List<Map<String, Object>> result = vmRepository.search(search); // Map<String, Object> resultMap = result.get(0); // // Integer allVCpu = Integer.valueOf(LicenseContext.getInstance().getLicense().getMaxCpuNum()); // Long usedVCpu = (Long) resultMap.get("totalCpuNum"); // if (usedVCpu == null) { // usedVCpu = 0l; // } // return allVCpu - usedVCpu.intValue(); // } //}
[ "mouse3150@163.com" ]
mouse3150@163.com
72b31655dace0fcaa39ed49b16eb0c7210bf769f
bd82b3ae29e0c61a88623bb0c3513e1ef58bedc5
/src/lab9/Main.java
f196bfef1506e941480b207ecb9c83a3a4e924aa
[]
no_license
Aelita0319/OOADProject
edea40485cc9551c04abccb2ab2e28cad6e90d40
048f57aa396a111d43483141f57019942abcc7b8
refs/heads/master
2023-02-07T13:30:10.642578
2020-12-27T03:19:40
2020-12-27T03:19:40
324,473,609
0
0
null
null
null
null
UTF-8
Java
false
false
265
java
package lab9; import javax.swing.*; public class Main { public static void main(String[] args) { SwingUtilities.invokeLater(() -> { MainFrame mainGameFrame = new MainFrame(); mainGameFrame.setVisible(true); }); } }
[ "386339484@qq.com" ]
386339484@qq.com
6306f96766d6e9cd854367388ffada85524f4e2d
0e81247e404755acc33205836a15aaa83a589ce5
/kc_project3.1_GitHub/src/main/java/org/kuali/kra/budget/printing/print/BudgetCumulativePrint.java
c02ad41db529b8319eeea2370c665f596c8c0ad1
[]
no_license
ajeeshg/KC3Remote
e2d88bb8efe6384083a6b3978a405b51e998f361
941646814a7a11237ce4ed1f844941182e357ec9
refs/heads/master
2016-09-10T20:07:05.685013
2012-07-17T15:52:59
2012-07-17T15:52:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,855
java
/* * Copyright 2005-2010 The Kuali Foundation * * Licensed under the Educational Community 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.opensource.org/licenses/ecl1.php * * 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.kuali.kra.budget.printing.print; import java.util.ArrayList; import java.util.List; import javax.xml.transform.Source; import org.kuali.kra.bo.KraPersistableBusinessObjectBase; import org.kuali.kra.budget.printing.BudgetPrintType; import org.kuali.kra.document.ResearchDocumentBase; import org.kuali.kra.printing.print.AbstractPrint; import org.kuali.kra.printing.util.PrintingUtils; /** * This class provides the implementation for printing Budget Cumulative Report. * It generates XML that conforms with Summary Report XSD, fetches XSL * style-sheets applicable to this XML, returns XML and XSL for any consumer * that would use this XML and XSls for any purpose like report generation, PDF * streaming etc. * */ public class BudgetCumulativePrint extends AbstractPrint { /** * This method fetches the XSL style-sheets required for transforming the * generated XML into PDF. * * @return {@link ArrayList}} of {@link Source} XSLs */ public List<Source> getXSLTemplates() { ArrayList<Source> sourceList = PrintingUtils .getXSLTforReport(BudgetPrintType.BUDGET_CUMULATIVE_REPORT .getBudgetPrintType()); return sourceList; } }
[ "naira@campusad.msu.edu" ]
naira@campusad.msu.edu
f61e4de7ffdb4f6d5b0064948ac2b48ee56a8eec
05b0fc02c9b050e39e62d99af773ea648eb947a3
/src/main/java/com/example/algamoney/api/resource/TokenResource.java
9f1e7dd102e64396cee6034f34b7964048ca4cca
[]
no_license
danylomarx/Spring-teste
ee7eaa64f87a455ab3629e9eecaa029050d0aa88
57a8f99c66ceb9bf9be3280bbb5e6aab820f9b16
refs/heads/master
2021-01-09T02:33:19.522643
2020-02-21T19:47:13
2020-02-21T19:47:13
242,217,427
0
0
null
null
null
null
UTF-8
Java
false
false
1,128
java
package com.example.algamoney.api.resource; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.example.algamoney.api.config.property.AlgamoneyApiProperty; @RestController @RequestMapping("/tokens") public class TokenResource { @Autowired private AlgamoneyApiProperty algamoneyApiProperty; @DeleteMapping("/revoke") public void revoke(HttpServletRequest req, HttpServletResponse resp) { Cookie cookie = new Cookie("refreshToken", null); cookie.setHttpOnly(true); cookie.setSecure(algamoneyApiProperty.getSeguranca().isEnableHttps()); //TODO: Em producao sera true cookie.setPath(req.getContextPath() + "/oauth/token"); cookie.setMaxAge(0); resp.addCookie(cookie); resp.setStatus(HttpStatus.NO_CONTENT.value()); } }
[ "danylomarx99@gmail.com" ]
danylomarx99@gmail.com
28912ef10f4eb19b8af656eff3c522d22720daaf
ca951d4010629b05a5bddd76b5350f5d7f8b1346
/workbox/workbox-service/src/main/java/oneapp/incture/workbox/pmc/dto/RuleManagementDto.java
f974f60a308f4e28d8110e348c4fcdfa090dfc76
[]
no_license
polireddym/workbox_spring
7eb0bcdeaf225940ca1350131a0d1eca5ec7ba6e
b4d9647b63562ae17cd5dad2fd7a1bcb286f84be
refs/heads/master
2020-03-23T22:12:11.586196
2018-07-24T13:14:30
2018-07-24T13:14:30
142,160,208
0
0
null
null
null
null
UTF-8
Java
false
false
4,868
java
package oneapp.incture.workbox.pmc.dto; import javax.xml.bind.annotation.XmlRootElement; import oneapp.incture.workbox.poadapter.dto.BaseDto; import oneapp.incture.workbox.util.EnOperation; import oneapp.incture.workbox.util.InvalidInputFault; @XmlRootElement public class RuleManagementDto extends BaseDto { private String ruleId; private String type; private String name; private String thresholdLimitUnit; private String thresholdLimitCount; private String action; private String status; private String thresholdUnitOld; private String thresholdCountOld; private String actionOld; private String statusOld; private String change; private String taskName; private String slaUnit; private String slaCount; private String slaId; private String emailIdList; private String emailSubject; private String emailBody; private String processDisplayName; public String getProcessDisplayName() { return processDisplayName; } public void setProcessDisplayName(String processDisplayName) { this.processDisplayName = processDisplayName; } public String getEmailIdList() { return emailIdList; } public void setEmailIdList(String emailIdList) { this.emailIdList = emailIdList; } public String getEmailSubject() { return emailSubject; } public void setEmailSubject(String emailSubject) { this.emailSubject = emailSubject; } public String getEmailBody() { return emailBody; } public void setEmailBody(String emailBody) { this.emailBody = emailBody; } public String getTaskName() { return taskName; } public void setTaskName(String taskName) { this.taskName = taskName; } public String getChange() { return change; } public void setChange(String change) { this.change = change; } public String getRuleId() { return ruleId; } public void setRuleId(String ruleId) { this.ruleId = ruleId; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAction() { return action; } public void setAction(String action) { this.action = action; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getThresholdLimitUnit() { return thresholdLimitUnit; } public void setThresholdLimitUnit(String thresholdLimitUnit) { this.thresholdLimitUnit = thresholdLimitUnit; } public String getThresholdLimitCount() { return thresholdLimitCount; } public void setThresholdLimitCount(String thresholdLimitCount) { this.thresholdLimitCount = thresholdLimitCount; } public String getThresholdUnitOld() { return thresholdUnitOld; } public void setThresholdUnitOld(String thresholdUnitOld) { this.thresholdUnitOld = thresholdUnitOld; } public String getThresholdCountOld() { return thresholdCountOld; } public void setThresholdCountOld(String thresholdCountOld) { this.thresholdCountOld = thresholdCountOld; } public String getActionOld() { return actionOld; } public void setActionOld(String actionOld) { this.actionOld = actionOld; } public String getStatusOld() { return statusOld; } public void setStatusOld(String statusOld) { this.statusOld = statusOld; } @Override public Boolean getValidForUsage() { // TODO Auto-generated method stub return null; } @Override public void validate(EnOperation enOperation) throws InvalidInputFault { // TODO Auto-generated method stub } public String getSlaUnit() { return slaUnit; } public void setSlaUnit(String slaUnit) { this.slaUnit = slaUnit; } public String getSlaCount() { return slaCount; } public void setSlaCount(String slaCount) { this.slaCount = slaCount; } @Override public String toString() { return "RuleManagementDto [ruleId=" + ruleId + ", type=" + type + ", name=" + name + ", thresholdLimitUnit=" + thresholdLimitUnit + ", thresholdLimitCount=" + thresholdLimitCount + ", action=" + action + ", status=" + status + ", thresholdUnitOld=" + thresholdUnitOld + ", thresholdCountOld=" + thresholdCountOld + ", actionOld=" + actionOld + ", statusOld=" + statusOld + ", change=" + change + ", taskName=" + taskName + ", slaUnit=" + slaUnit + ", slaCount=" + slaCount + ", slaId=" + slaId + ", emailIdList=" + emailIdList + ", emailSubject=" + emailSubject + ", emailBody=" + emailBody + ", processDisplayName=" + processDisplayName + "]"; } public String getSlaId() { return slaId; } public void setSlaId(String slaId) { this.slaId = slaId; } }
[ "abhishek.mishra@incture.com" ]
abhishek.mishra@incture.com
54d0fad4f3d6df00930343ce403407cac43d1679
8efe3abe5ed747a0d2d9e136c11ce42fa8d536f3
/src/org/pentaho/di/trans/steps/salesforcedelete/SalesforceDeleteMeta.java
2409de55e4f849563bcea0a9e550f00824eebcf9
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
jianjunchu/etl_designer_2.0
e07dfb6e630da765fb8198adb875cf850a2c87b1
5ceea8ce7d457fd207f40730aa178cc02db681a8
refs/heads/master
2021-04-03T07:56:15.132047
2018-04-12T08:52:34
2018-04-12T08:52:34
125,075,004
1
1
null
null
null
null
UTF-8
Java
false
false
12,203
java
/******************************************************************************* * * Pentaho Data Integration * * Copyright (C) 2002-2012 by Pentaho : http://www.pentaho.com * ******************************************************************************* * * 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 org.pentaho.di.trans.steps.salesforcedelete; import org.w3c.dom.Node; import java.util.List; import java.util.Map; import org.pentaho.di.core.encryption.Encr; import org.pentaho.di.core.CheckResult; import org.pentaho.di.core.CheckResultInterface; import org.pentaho.di.core.Const; import org.pentaho.di.core.Counter; import org.pentaho.di.core.row.RowMetaInterface; import org.pentaho.di.core.variables.VariableSpace; import org.pentaho.di.core.xml.XMLHandler; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.exception.KettleStepException; import org.pentaho.di.core.exception.KettleXMLException; import org.pentaho.di.repository.ObjectId; import org.pentaho.di.repository.Repository; import org.pentaho.di.trans.Trans; import org.pentaho.di.trans.TransMeta; import org.pentaho.di.trans.step.BaseStepMeta; import org.pentaho.di.trans.step.StepDataInterface; import org.pentaho.di.trans.step.StepInterface; import org.pentaho.di.trans.step.StepMeta; import org.pentaho.di.trans.step.StepMetaInterface; import org.pentaho.di.trans.steps.salesforceinput.SalesforceConnectionUtils; import org.pentaho.di.i18n.BaseMessages; public class SalesforceDeleteMeta extends BaseStepMeta implements StepMetaInterface { private static Class<?> PKG = SalesforceDeleteMeta.class; // for i18n purposes, needed by Translator2!! $NON-NLS-1$ /** The salesforce url*/ private String targeturl; /** The userName*/ private String username; /** The password*/ private String password; /** The module*/ private String module; /** Deletefield */ private String DeleteField; /** Batch size */ private String batchSize; /** The time out */ private String timeout; private boolean useCompression; private boolean rollbackAllChangesOnError; public SalesforceDeleteMeta() { super(); // allocate BaseStepMeta } /** * @return Returns the rollbackAllChangesOnError. */ public boolean isRollbackAllChangesOnError() { return rollbackAllChangesOnError; } /** * @param rollbackAllChangesOnError The rollbackAllChangesOnError to set. */ public void setRollbackAllChangesOnError(boolean rollbackAllChangesOnError) { this.rollbackAllChangesOnError = rollbackAllChangesOnError; } /** * @return Returns the useCompression. */ public boolean isUsingCompression() { return useCompression; } /** * @param useCompression The useCompression to set. */ public void setUseCompression(boolean useCompression) { this.useCompression = useCompression; } /** * @return Returns the TimeOut. */ public String getTimeOut() { return timeout; } /** * @param TimeOut The TimeOut to set. */ public void setTimeOut(String TimeOut) { this.timeout = TimeOut; } /** * @return Returns the UserName. */ public String getUserName() { return username; } /** * @param user_name The UserNAme to set. */ public void setUserName(String user_name) { this.username = user_name; } /** * @return Returns the Password. */ public String getPassword() { return password; } /** * @param passwd The password to set. */ public void setPassword(String passwd) { this.password = passwd; } /** * @return Returns the module. */ public String getModule() { return module; } /** * @param module The module to set. */ public void setModule(String module) { this.module = module; } /** * @param DeleteField The DeleteField to set. */ public void setDeleteField(String DeleteField) { this.DeleteField = DeleteField; } /** * @return Returns the DeleteField. */ public String getDeleteField() { return this.DeleteField; } /** * @param batch size. */ public void setBatchSize(String value) { this.batchSize = value; } /** * @return Returns the batchSize. */ public String getBatchSize() { return this.batchSize; } public int getBatchSizeInt() { return Const.toInt(this.batchSize, 10); } /** * @return Returns the targeturl. */ public String getTargetURL() { return targeturl; } /** * @param url The url to set. */ public void setTargetURL(String urlvalue) { this.targeturl = urlvalue; } public void loadXML(Node stepnode, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleXMLException { readData(stepnode); } public Object clone() { SalesforceDeleteMeta retval = (SalesforceDeleteMeta)super.clone(); return retval; } public String getXML() { StringBuffer retval=new StringBuffer(); retval.append(" "+XMLHandler.addTagValue("targeturl", targeturl)); retval.append(" "+XMLHandler.addTagValue("username", username)); retval.append(" "+XMLHandler.addTagValue("password", Encr.encryptPasswordIfNotUsingVariables(password), false)); retval.append(" "+XMLHandler.addTagValue("module", module)); retval.append(" "+XMLHandler.addTagValue("DeleteField", DeleteField)); retval.append(" "+XMLHandler.addTagValue("batchSize", batchSize)); retval.append(" "+XMLHandler.addTagValue("timeout", timeout)); retval.append(" "+XMLHandler.addTagValue("useCompression", useCompression)); retval.append(" "+XMLHandler.addTagValue("rollbackAllChangesOnError", rollbackAllChangesOnError)); return retval.toString(); } private void readData(Node stepnode) throws KettleXMLException { try { targeturl = XMLHandler.getTagValue(stepnode, "targeturl"); username = XMLHandler.getTagValue(stepnode, "username"); password = XMLHandler.getTagValue(stepnode, "password"); if (password != null && password.startsWith("Encrypted")){ password = Encr.decryptPassword(password.replace("Encrypted","").replace(" ", "")); } module = XMLHandler.getTagValue(stepnode, "module"); DeleteField= XMLHandler.getTagValue(stepnode, "DeleteField"); batchSize = XMLHandler.getTagValue(stepnode, "batchSize"); useCompression = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "useCompression")); timeout = XMLHandler.getTagValue(stepnode, "timeout"); rollbackAllChangesOnError = "Y".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, "rollbackAllChangesOnError")); } catch(Exception e) { throw new KettleXMLException("Unable to load step info from XML", e); } } public void setDefault() { targeturl=SalesforceConnectionUtils.TARGET_DEFAULT_URL ; password = ""; module = "Account"; DeleteField = null; batchSize="10"; useCompression=false; rollbackAllChangesOnError=false; timeout= "60000"; } /* This function adds meta data to the rows being pushed out */ public void getFields(RowMetaInterface r, String name, RowMetaInterface info[], StepMeta nextStep, VariableSpace space) throws KettleStepException { } public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException { try { targeturl = rep.getStepAttributeString (id_step, "targeturl"); module = rep.getStepAttributeString(id_step, "module"); DeleteField = rep.getStepAttributeString(id_step, "DeleteField"); username = rep.getStepAttributeString(id_step, "username"); password = rep.getStepAttributeString(id_step, "password"); batchSize = rep.getStepAttributeString(id_step, "batchSize"); useCompression = rep.getStepAttributeBoolean(id_step, "useCompression"); timeout = rep.getStepAttributeString(id_step, "timeout"); rollbackAllChangesOnError = rep.getStepAttributeBoolean(id_step, "rollbackAllChangesOnError"); } catch(Exception e) { throw new KettleException(BaseMessages.getString(PKG, "SalesforceDeleteMeta.Exception.ErrorReadingRepository"), e); } } public void saveRep(Repository rep, ObjectId id_transformation, ObjectId id_step) throws KettleException { try { rep.saveStepAttribute(id_transformation, id_step, "targeturl", targeturl); rep.saveStepAttribute(id_transformation, id_step, "batchSize", batchSize); rep.saveStepAttribute(id_transformation, id_step, "module", module); rep.saveStepAttribute(id_transformation, id_step, "DeleteField", DeleteField); rep.saveStepAttribute(id_transformation, id_step, "username", username); rep.saveStepAttribute(id_transformation, id_step, "password", password); rep.saveStepAttribute(id_transformation, id_step, "useCompression", useCompression); rep.saveStepAttribute(id_transformation, id_step, "timeout", timeout); rep.saveStepAttribute(id_transformation, id_step, "rollbackAllChangesOnError", rollbackAllChangesOnError); } catch(Exception e) { throw new KettleException(BaseMessages.getString(PKG, "SalesforceDeleteMeta.Exception.ErrorSavingToRepository", ""+id_step), e); } } public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String input[], String output[], RowMetaInterface info) { CheckResult cr; // See if we get input... if (input.length>0) cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "SalesforceDeleteMeta.CheckResult.NoInputExpected"), stepMeta); else cr = new CheckResult(CheckResult.TYPE_RESULT_OK, BaseMessages.getString(PKG, "SalesforceDeleteMeta.CheckResult.NoInput"), stepMeta); remarks.add(cr); // check URL if(Const.isEmpty(targeturl)) cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "SalesforceDeleteMeta.CheckResult.NoURL"), stepMeta); else cr = new CheckResult(CheckResult.TYPE_RESULT_OK, BaseMessages.getString(PKG, "SalesforceDeleteMeta.CheckResult.URLOk"), stepMeta); remarks.add(cr); // check username if(Const.isEmpty(username)) cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "SalesforceDeleteMeta.CheckResult.NoUsername"), stepMeta); else cr = new CheckResult(CheckResult.TYPE_RESULT_OK, BaseMessages.getString(PKG, "SalesforceDeleteMeta.CheckResult.UsernameOk"), stepMeta); remarks.add(cr); // check module if(Const.isEmpty(module)) cr = new CheckResult(CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString(PKG, "SalesforceDeleteMeta.CheckResult.NoModule"), stepMeta); else cr = new CheckResult(CheckResult.TYPE_RESULT_OK, BaseMessages.getString(PKG, "SalesforceDeleteMeta.CheckResult.ModuleOk"), stepMeta); remarks.add(cr); } public StepInterface getStep(StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta transMeta, Trans trans) { return new SalesforceDelete(stepMeta, stepDataInterface, cnr, transMeta, trans); } public StepDataInterface getStepData() { return new SalesforceDeleteData(); } public boolean supportsErrorHandling() { return true; } }
[ "jianjunchu@gmail.com" ]
jianjunchu@gmail.com
e8ede1d3294ad975d1a7bc2d841af081ef3c17f7
03fc654da679bd28018d8185da728febbe1fd125
/app/src/main/java/au/edu/jcu/cp3402/almmrr/AppAssist/GalleryTutorialFragment2.java
9a382efe8798ebdc07df1ee3a88abaec1973411f
[]
no_license
magnus-jcu-persson/cp3402-almmrr-appsistant
1b6fc7bee91026f5a5c2a8a3ee5e81ba443a31e6
80a0025e6d2d27a2356ed4b984c427554c68d545
refs/heads/master
2023-01-05T11:35:42.151834
2020-11-01T02:12:21
2020-11-01T02:12:21
291,171,052
1
0
null
2020-10-27T05:09:10
2020-08-29T00:22:20
Java
UTF-8
Java
false
false
814
java
package au.edu.jcu.cp3402.almmrr.AppAssist; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import androidx.fragment.app.Fragment; public class GalleryTutorialFragment2 extends Fragment { ImageView indicatorArrow; public GalleryTutorialFragment2() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_gallery_tutorial2, container, false); // Inflate the layout for this fragment indicatorArrow = view.findViewById(R.id.calendar_indicator_arrow_1); return view; } }
[ "robert.sinclair@my.jcu.edu.au" ]
robert.sinclair@my.jcu.edu.au
82178157543280a6471c1b10d3890fae49b35952
b4c02f0dbd4390b5f67f8593bf0dffa0b7e9809d
/src/module1/FirstClass.java
a241966eb38860c035ab3a0cbf06ca601e305409
[]
no_license
alesnykh/JavaCourse
e8fecf7c1a5fad22898112fcc2274d727d43bb63
fa2b876c9052ccad9aeccbf8b640a40545332470
refs/heads/master
2020-04-06T07:09:25.876610
2016-09-05T00:16:52
2016-09-05T00:16:52
65,613,297
0
0
null
null
null
null
UTF-8
Java
false
false
194
java
package module1; /** * Created by alesnykh on 13/8/16. */ public class FirstClass { public static void main(String[] args) { System.out.println("My first class on Java"); } }
[ "andriy.lesnykh@gmail.com" ]
andriy.lesnykh@gmail.com
81c0038a89f9e6f1bca3769f2d12f604adc9ab3e
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
/schemaOrgDomaConv/src/org/kyojo/schemaOrg/m3n3/doma/healthLifesci/clazz/MuscleConverter.java
b695c7eb0826307bb00212ffbada470224066da9
[ "Apache-2.0" ]
permissive
nagaikenshin/schemaOrg
3dec1626781913930da5585884e3484e0b525aea
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
refs/heads/master
2021-06-25T04:52:49.995840
2019-05-12T06:22:37
2019-05-12T06:22:37
134,319,974
1
0
null
null
null
null
UTF-8
Java
false
false
556
java
package org.kyojo.schemaorg.m3n3.doma.healthLifesci.clazz; import org.seasar.doma.ExternalDomain; import org.seasar.doma.jdbc.domain.DomainConverter; import org.kyojo.schemaorg.m3n3.healthLifesci.impl.MUSCLE; import org.kyojo.schemaorg.m3n3.healthLifesci.Clazz.Muscle; @ExternalDomain public class MuscleConverter implements DomainConverter<Muscle, String> { @Override public String fromDomainToValue(Muscle domain) { return domain.getNativeValue(); } @Override public Muscle fromValueToDomain(String value) { return new MUSCLE(value); } }
[ "nagai@nagaikenshin.com" ]
nagai@nagaikenshin.com
0c9c56502c4efb40954f778e231179ebd09fa7ae
c4eef639c18cd124f3586d24feede7e10a2c5495
/app/src/main/java/com/example/android/sunshine/data/WeatherDbHelper.java
23a0f9d32e895bd28c3249b2e369d494e0c196b0
[ "Apache-2.0" ]
permissive
send2deb/S07.01-Exercise-DatabaseCreation
df5f1adfe4286c6bf7e0f0a9dc01bdc4903f15a7
2093595a79e40e57d39d7fb23e1e376ee29688fe
refs/heads/master
2021-08-16T13:33:53.638159
2017-11-19T23:34:40
2017-11-19T23:34:40
111,341,007
0
0
null
null
null
null
UTF-8
Java
false
false
2,776
java
/* * Copyright (C) 2016 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.example.android.sunshine.data; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; /** * Manages a local database for weather data. */ // COMPLETED (11) Extend SQLiteOpenHelper from WeatherDbHelper public class WeatherDbHelper extends SQLiteOpenHelper { // COMPLETED (12) Create a public static final String called DATABASE_NAME with value "weather.db" private static final String DATABASE_NAME = "weather.db"; // COMPLETED (13) Create a private static final int called DATABASE_VERSION and set it to 1 private static final int DATABASE_VERSION = 1; // COMPLETED (14) Create a constructor that accepts a context and call through to the superclass constructor public WeatherDbHelper(Context context) { super(context,DATABASE_NAME,null,DATABASE_VERSION); } // COMPLETED (15) Override onCreate and create the weather table from within it @Override public void onCreate(SQLiteDatabase db) { final String SQL_CREATE_WEATHER_TABLE = "CREATE TABLE " + WeatherContract.WeatherEntry.TABLE_NAME + " (" + WeatherContract.WeatherEntry._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + WeatherContract.WeatherEntry.COLUMN_DATE + " TEXT NOT NULL, " + WeatherContract.WeatherEntry.COLUMN_WEATHER_ID + " TEXT NOT NULL, " + WeatherContract.WeatherEntry.COLUMN_MIN_TEMP + " TEXT NOT NULL, " + WeatherContract.WeatherEntry.COLUMN_MAX_TEMP + " TEXT NOT NULL, " + WeatherContract.WeatherEntry.COLUMN_HUMIDITY + " TEXT NOT NULL, " + WeatherContract.WeatherEntry.COLUMN_PRESSURE + " TEXT NOT NULL, " + WeatherContract.WeatherEntry.COLUMN_WIND_SPEED + " TEXT NOT NULL, " + WeatherContract.WeatherEntry.COLUMN_DEGREES + " TEXT NOT NULL" + ");"; db.execSQL(SQL_CREATE_WEATHER_TABLE); } // COMPLETED (16) Override onUpgrade, but don't do anything within it yet @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { } }
[ "send2deb@gmail.com" ]
send2deb@gmail.com
4a263965fa9625996281d66f004e5b88cf15bf19
ab8d10f02716519aadd66ecef4d0c799e15aa517
/src/main/java/jxl/read/biff/DefaultColumnWidthRecord.java
43081fba4b7eadd0188f9568850614128a347fc4
[]
no_license
caiqiqi/EngineerMode
cc767ddcde7ccaf0ef15ec7ef8837a70a671b183
09a87a94ceb0d38b97d3fbe0e03086e9ee53a0f3
refs/heads/master
2021-08-12T07:45:06.927619
2017-11-14T14:54:58
2017-11-14T14:54:58
110,684,973
0
0
null
2017-11-14T12:02:58
2017-11-14T12:02:58
null
UTF-8
Java
false
false
392
java
package jxl.read.biff; import jxl.biff.IntegerHelper; import jxl.biff.RecordData; class DefaultColumnWidthRecord extends RecordData { private int width; public DefaultColumnWidthRecord(Record t) { super(t); byte[] data = t.getData(); this.width = IntegerHelper.getInt(data[0], data[1]); } public int getWidth() { return this.width; } }
[ "elliot.alderson@ecorp.com" ]
elliot.alderson@ecorp.com
c385f8ad76526873081b52fe9fb7d9444e35df46
b5b4cf99ff324e371efd3a811137c87abf78e21f
/src/main/java/com/wanfin/fpd/common/utils/SendMailUtil.java
322c7224a6d363202a2d12a9eaf34bd3ca30c159
[ "Apache-2.0" ]
permissive
shimaomao/fpd
2692f950a36ad7137d14e902d4bc7dff7de53aa2
aedd8f053de1ff9288dbafca9b4b26fe9cc2bc50
refs/heads/master
2021-06-30T02:00:27.652743
2017-09-13T03:49:41
2017-09-13T03:49:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,593
java
/** * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.wanfin.fpd.common.utils; import java.io.File; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.mail.HtmlEmail; import org.springframework.ui.freemarker.FreeMarkerTemplateUtils; import freemarker.template.Configuration; import freemarker.template.Template; /** * ๅ‘้€็”ตๅญ้‚ฎไปถ */ public class SendMailUtil { // private static final String smtphost = "192.168.1.70"; private static final String from = "997844676@qq.com"; private static final String fromName = "ๆต‹่ฏ•ๅ…ฌๅธ"; private static final String charSet = "utf-8"; private static final String username = "jianpenggd@163.com"; private static final String password = "jianpeng141525"; private static Map<String, String> hostMap = new HashMap<String, String>(); static { // 126 hostMap.put("smtp.126", "smtp.126.com"); // qq // hostMap.put("smtp.qq", "smtp.qq.com"); hostMap.put("smtp.qq", "smtp.qq.com"); // 163 hostMap.put("smtp.163", "smtp.163.com"); // sina hostMap.put("smtp.sina", "smtp.sina.com.cn"); // tom hostMap.put("smtp.tom", "smtp.tom.com"); // 263 hostMap.put("smtp.263", "smtp.263.net"); // yahoo hostMap.put("smtp.yahoo", "smtp.mail.yahoo.com"); // hotmail hostMap.put("smtp.hotmail", "smtp.live.com"); // gmail hostMap.put("smtp.gmail", "smtp.gmail.com"); hostMap.put("smtp.port.gmail", "465"); } public static String getHost(String email) throws Exception { Pattern pattern = Pattern.compile("\\w+@(\\w+)(\\.\\w+){1,2}"); Matcher matcher = pattern.matcher(email); String key = "unSupportEmail"; if (matcher.find()) { key = "smtp." + matcher.group(1); } if (hostMap.containsKey(key)) { return hostMap.get(key); } else { throw new Exception("unSupportEmail"); } } public static int getSmtpPort(String email) throws Exception { Pattern pattern = Pattern.compile("\\w+@(\\w+)(\\.\\w+){1,2}"); Matcher matcher = pattern.matcher(email); String key = "unSupportEmail"; if (matcher.find()) { key = "smtp." + matcher.group(1); } if (hostMap.containsKey(key)) { return Integer.parseInt(hostMap.get(key)); } else { return 25; } } /** * ๅ‘้€ๆจกๆฟ้‚ฎไปถ * * @param toMailAddr * ๆ”ถไฟกไบบๅœฐๅ€ * @param subject * emailไธป้ข˜ * @param templatePath * ๆจกๆฟๅœฐๅ€ * @param map * ๆจกๆฟmap */ public static void sendFtlMail(String toMailAddr, String subject, String templatePath, Map<String, Object> map) { Template template = null; Configuration freeMarkerConfig = null; HtmlEmail hemail = new HtmlEmail(); try { hemail.setHostName(getHost(from)); hemail.setSmtpPort(getSmtpPort(from)); hemail.setCharset(charSet); hemail.addTo(toMailAddr); hemail.setFrom(from, fromName); hemail.setAuthentication(username, password); hemail.setSubject(subject); freeMarkerConfig = new Configuration(); freeMarkerConfig.setDirectoryForTemplateLoading(new File( getFilePath())); // ่Žทๅ–ๆจกๆฟ template = freeMarkerConfig.getTemplate(getFileName(templatePath), new Locale("Zh_cn"), "UTF-8"); // ๆจกๆฟๅ†…ๅฎน่ฝฌๆขไธบstring String htmlText = FreeMarkerTemplateUtils .processTemplateIntoString(template, map); System.out.println(htmlText); hemail.setMsg(htmlText); hemail.send(); System.out.println("email send true!"); } catch (Exception e) { e.printStackTrace(); System.out.println("email send error!"); } } /** * ๅ‘้€ๆ™ฎ้€š้‚ฎไปถ * * @param toMailAddr * ๆ”ถไฟกไบบๅœฐๅ€ * @param subject * emailไธป้ข˜ * @param message * ๅ‘้€emailไฟกๆฏ */ public static void sendCommonMail(String toMailAddr, String subject, String message) { HtmlEmail hemail = new HtmlEmail(); try { hemail.setHostName(getHost(from)); hemail.setSmtpPort(getSmtpPort(from)); hemail.setCharset(charSet); hemail.addTo(toMailAddr); hemail.setFrom(from, fromName); hemail.setAuthentication(username, password); hemail.setSubject(subject); hemail.setMsg(message); hemail.send(); System.out.println("email send true!"); } catch (Exception e) { e.printStackTrace(); System.out.println("email send error!"); } } public static String getHtmlText(String templatePath, Map<String, Object> map) { Template template = null; String htmlText = ""; try { Configuration freeMarkerConfig = null; freeMarkerConfig = new Configuration(); freeMarkerConfig.setDirectoryForTemplateLoading(new File( getFilePath())); // ่Žทๅ–ๆจกๆฟ template = freeMarkerConfig.getTemplate(getFileName(templatePath), new Locale("Zh_cn"), "UTF-8"); // ๆจกๆฟๅ†…ๅฎน่ฝฌๆขไธบstring htmlText = FreeMarkerTemplateUtils.processTemplateIntoString( template, map); System.out.println(htmlText); } catch (Exception e) { e.printStackTrace(); } return htmlText; } private static String getFilePath() { String path = getAppPath(SendMailUtil.class); path = path + File.separator + "mailtemplate" + File.separator; path = path.replace("\\", "/"); System.out.println(path); return path; } private static String getFileName(String path) { path = path.replace("\\", "/"); System.out.println(path); return path.substring(path.lastIndexOf("/") + 1); } // @SuppressWarnings("unchecked") public static String getAppPath(Class<?> cls) { // ๆฃ€ๆŸฅ็”จๆˆทไผ ๅ…ฅ็š„ๅ‚ๆ•ฐๆ˜ฏๅฆไธบ็ฉบ if (cls == null) throw new java.lang.IllegalArgumentException("ๅ‚ๆ•ฐไธ่ƒฝไธบ็ฉบ๏ผ"); ClassLoader loader = cls.getClassLoader(); // ่Žทๅพ—็ฑป็š„ๅ…จๅ๏ผŒๅŒ…ๆ‹ฌๅŒ…ๅ String clsName = cls.getName() + ".class"; // ่Žทๅพ—ไผ ๅ…ฅๅ‚ๆ•ฐๆ‰€ๅœจ็š„ๅŒ… Package pack = cls.getPackage(); String path = ""; // ๅฆ‚ๆžœไธๆ˜ฏๅŒฟๅๅŒ…๏ผŒๅฐ†ๅŒ…ๅ่ฝฌๅŒ–ไธบ่ทฏๅพ„ if (pack != null) { String packName = pack.getName(); // ๆญคๅค„็ฎ€ๅ•ๅˆคๅฎšๆ˜ฏๅฆๆ˜ฏJavaๅŸบ็ก€็ฑปๅบ“๏ผŒ้˜ฒๆญข็”จๆˆทไผ ๅ…ฅJDKๅ†…็ฝฎ็š„็ฑปๅบ“ if (packName.startsWith("java.") || packName.startsWith("javax.")) throw new java.lang.IllegalArgumentException("ไธ่ฆไผ ้€็ณป็ปŸ็ฑป๏ผ"); // ๅœจ็ฑป็š„ๅ็งฐไธญ๏ผŒๅŽปๆމๅŒ…ๅ็š„้ƒจๅˆ†๏ผŒ่Žทๅพ—็ฑป็š„ๆ–‡ไปถๅ clsName = clsName.substring(packName.length() + 1); // ๅˆคๅฎšๅŒ…ๅๆ˜ฏๅฆๆ˜ฏ็ฎ€ๅ•ๅŒ…ๅ๏ผŒๅฆ‚ๆžœๆ˜ฏ๏ผŒๅˆ™็›ดๆŽฅๅฐ†ๅŒ…ๅ่ฝฌๆขไธบ่ทฏๅพ„๏ผŒ if (packName.indexOf(".") < 0) path = packName + "/"; else {// ๅฆๅˆ™ๆŒ‰็…งๅŒ…ๅ็š„็ป„ๆˆ้ƒจๅˆ†๏ผŒๅฐ†ๅŒ…ๅ่ฝฌๆขไธบ่ทฏๅพ„ int start = 0, end = 0; end = packName.indexOf("."); while (end != -1) { path = path + packName.substring(start, end) + "/"; start = end + 1; end = packName.indexOf(".", start); } path = path + packName.substring(start) + "/"; } } // ่ฐƒ็”จClassLoader็š„getResourceๆ–นๆณ•๏ผŒไผ ๅ…ฅๅŒ…ๅซ่ทฏๅพ„ไฟกๆฏ็š„็ฑปๆ–‡ไปถๅ java.net.URL url = loader.getResource(path + clsName); // ไปŽURLๅฏน่ฑกไธญ่Žทๅ–่ทฏๅพ„ไฟกๆฏ String realPath = url.getPath(); // ๅŽปๆމ่ทฏๅพ„ไฟกๆฏไธญ็š„ๅ่ฎฎๅ"file:" int pos = realPath.indexOf("file:"); if (pos > -1) realPath = realPath.substring(pos + 5); // ๅŽปๆމ่ทฏๅพ„ไฟกๆฏๆœ€ๅŽๅŒ…ๅซ็ฑปๆ–‡ไปถไฟกๆฏ็š„้ƒจๅˆ†๏ผŒๅพ—ๅˆฐ็ฑปๆ‰€ๅœจ็š„่ทฏๅพ„ pos = realPath.indexOf(path + clsName); realPath = realPath.substring(0, pos - 1); // ๅฆ‚ๆžœ็ฑปๆ–‡ไปถ่ขซๆ‰“ๅŒ…ๅˆฐJAR็ญ‰ๆ–‡ไปถไธญๆ—ถ๏ผŒๅŽปๆމๅฏนๅบ”็š„JAR็ญ‰ๆ‰“ๅŒ…ๆ–‡ไปถๅ if (realPath.endsWith("!")) realPath = realPath.substring(0, realPath.lastIndexOf("/")); /*------------------------------------------------------------ ClassLoader็š„getResourceๆ–นๆณ•ไฝฟ็”จไบ†utf-8ๅฏน่ทฏๅพ„ไฟกๆฏ่ฟ›่กŒไบ†็ผ–็ ๏ผŒๅฝ“่ทฏๅพ„ ไธญๅญ˜ๅœจไธญๆ–‡ๅ’Œ็ฉบๆ ผๆ—ถ๏ผŒไป–ไผšๅฏน่ฟ™ไบ›ๅญ—็ฌฆ่ฟ›่กŒ่ฝฌๆข๏ผŒ่ฟ™ๆ ท๏ผŒๅพ—ๅˆฐ็š„ๅพ€ๅพ€ไธๆ˜ฏๆˆ‘ไปฌๆƒณ่ฆ ็š„็œŸๅฎž่ทฏๅพ„๏ผŒๅœจๆญค๏ผŒ่ฐƒ็”จไบ†URLDecoder็š„decodeๆ–นๆณ•่ฟ›่กŒ่งฃ็ ๏ผŒไปฅไพฟๅพ—ๅˆฐๅŽŸๅง‹็š„ ไธญๆ–‡ๅŠ็ฉบๆ ผ่ทฏๅพ„ -------------------------------------------------------------*/ try { realPath = java.net.URLDecoder.decode(realPath, "utf-8"); } catch (Exception e) { throw new RuntimeException(e); } System.out.println("realPath----->" + realPath); return realPath; } // private static File getFile(String path){ // File file = // SendMail.class.getClassLoader().getResource("mailtemplate/test.ftl").getFile(); // return file; // } // public static void main(String[] args) { // HtmlEmail hemail = new HtmlEmail(); // try { // hemail.setHostName("smtp.exmail.qq.com"); // hemail.setCharset("utf-8"); // hemail.addTo("fly.1206@qq.com"); // hemail.setFrom("zhoujunfeng@et-bank.com", "ๅ‘จไฟŠๅณฐ"); // hemail.setAuthentication("zhoujunfeng@et-bank.com", "31415926@aa"); // hemail.setSubject("sendemail test!"); // hemail.setMsg("<a href=\"http://www.google.cn\">่ฐทๆญŒ</a><br/>"); // hemail.send(); // System.out.println("email send true!"); // } catch (Exception e) { // e.printStackTrace(); // System.out.println("email send error!"); // } // try { // System.out.println(getSmtpPort("997844676@qq.com")); // }catch (Exception e){ // e.printStackTrace(); // } Map<String, Object> map = new HashMap<String, Object>(); map.put("subject", "ๆต‹่ฏ•ๆ ‡้ข˜"); map.put("content", "ๆต‹่ฏ• ๅ†…ๅฎน"); String templatePath = "mailtemplate/test.ftl"; sendFtlMail("jianpenggd@163.com", "sendemail test!", templatePath, map); // System.out.println(getFileName("mailtemplate/test.ftl")); } }
[ "lengzhijun@wanfin.com" ]
lengzhijun@wanfin.com
f3b651da6981fd3b7df6ddc21a8172f48190f184
8ff95ccf3b5662bf1b810a8c97767600069ae0b6
/src/test/java/affiche/ManagerTest.java
f0350a67d10b9922d3994f0e7a5755c69f8da5fc
[]
no_license
KolominD/FilmsManagerV0.1
71e7b5429b82d54f9098cdfa151fc79aaf5719ee
888f2c84e386bbf22e1c1d2630ea07f7ecea43c7
refs/heads/master
2023-09-03T10:44:46.378149
2021-10-25T12:46:29
2021-10-25T12:46:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
573
java
package affiche; import org.junit.Test; import static org.junit.jupiter.api.Assertions.*; class ManagerTest { @Test public void films() { Manager man = new Manager(10); String[] actual = man.addFilm(); String[] expected = { "Bloodshot", "Forward", "Hotel <Belgrad>", "Gentlemen", "Invisible man", "Trolls. Worldwide tour", "Number One", "Road" }; assertArrayEquals(expected, actual); } }
[ "bogkolomind@gmail.com" ]
bogkolomind@gmail.com
9381587dcee4490273cd597aac9e67f270a548c9
f259c358ea3b5a44a4c188dc35d5ff84b2bd266c
/14301028/JSP/work/indexServlet.java
78a3278fd4c06b20bfc83f7cb3047624d7fd38ee
[]
no_license
zydmzzzjf/homework
4f0d76ce71049cdf8212b2ca16b349826467dfe3
305bda970d8c438fb298d3b6bb68b377c22bbbd5
refs/heads/master
2021-01-15T08:27:34.286805
2016-12-04T02:56:19
2016-12-04T02:56:19
68,515,211
0
0
null
null
null
null
UTF-8
Java
false
false
1,067
java
import java.io.IOException; import java.io.PrintWriter; import javax.servlet.Servlet; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; public class indexServlet implements Servlet { public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println("HTTP/1.1 200 OK\r\n"); out.println("<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /> <title>hello</title> </head> <body> <form action=\"myForm\" method=\"post\"> <input type=\"text\" name=\"text1\" value=\"China\"> <input type=\"submit\" value=\"submit myForm\"> </form> </body> </html> "); } public void destroy() { } public ServletConfig getServletConfig() { return null; } public String getServletInfo() { return null; } public void init(ServletConfig arg0) throws ServletException { } }
[ "14301028@bjtu.edu.cn" ]
14301028@bjtu.edu.cn
24988bed9b2cc987a116bea2f1236acbffa8860a
a7f7fefc9f9650c8e5e8bd09d61a5975f425ed47
/service/service_msm/src/main/java/com/atguigu/msmservice/utils/RandomUtil.java
dabdfbe2398b6c72587fac7f49870a0f10458253
[]
no_license
redcools/gulixueyuan
63c1d3298d901eb4fb3be8594dacd1f7a8b31e61
cbb00ad061c021a8e803f9f83ae5751aeb48f6bd
refs/heads/master
2023-03-12T13:59:05.841052
2021-02-26T00:28:06
2021-02-26T00:28:06
330,900,249
0
0
null
null
null
null
UTF-8
Java
false
false
1,438
java
package com.atguigu.msmservice.utils; import com.cloopen.rest.sdk.BodyType; import com.cloopen.rest.sdk.CCPRestSmsSDK; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Random; /** * ่Žทๅ–้šๆœบๆ•ฐ * * @author qianyi * */ public class RandomUtil { private static final Random random = new Random(); private static final DecimalFormat fourdf = new DecimalFormat("0000"); private static final DecimalFormat sixdf = new DecimalFormat("000000"); public static String getFourBitRandom() { return fourdf.format(random.nextInt(10000)); } public static String getSixBitRandom() { return sixdf.format(random.nextInt(1000000)); } /** * ็ป™ๅฎšๆ•ฐ็ป„๏ผŒๆŠฝๅ–nไธชๆ•ฐๆฎ * @param list * @param n * @return */ public static ArrayList getRandom(List list, int n) { Random random = new Random(); HashMap<Object, Object> hashMap = new HashMap<Object, Object>(); // ็”Ÿๆˆ้šๆœบๆ•ฐๅญ—ๅนถๅญ˜ๅ…ฅHashMap for (int i = 0; i < list.size(); i++) { int number = random.nextInt(100) + 1; hashMap.put(number, i); } // ไปŽHashMapๅฏผๅ…ฅๆ•ฐ็ป„ Object[] robjs = hashMap.values().toArray(); ArrayList r = new ArrayList(); // ้ๅކๆ•ฐ็ป„ๅนถๆ‰“ๅฐๆ•ฐๆฎ for (int i = 0; i < n; i++) { r.add(list.get((int) robjs[i])); System.out.print(list.get((int) robjs[i]) + "\t"); } System.out.print("\n"); return r; } }
[ "3210440242@qq.com" ]
3210440242@qq.com
362a4be6f18c8c370a88b811e20a05f0f1169c73
48116c8d80cb92da584a571595f223d34f2173cf
/src/main/java/first/sample/com/web/rest/errors/FieldErrorVM.java
941c63dcb92102d24eb6a94185b2625b26f12bcd
[]
no_license
abdou-93/jhipsterSampleApplication
3ad5578bafcf6ccee32271c14349901fe693936c
dbdadf720207b4b15a62e59a9aa34275ce045b4c
refs/heads/master
2021-07-18T05:11:34.017882
2017-10-23T11:38:28
2017-10-23T11:38:28
107,973,818
0
0
null
null
null
null
UTF-8
Java
false
false
648
java
package first.sample.com.web.rest.errors; import java.io.Serializable; public class FieldErrorVM implements Serializable { private static final long serialVersionUID = 1L; private final String objectName; private final String field; private final String message; public FieldErrorVM(String dto, String field, String message) { this.objectName = dto; this.field = field; this.message = message; } public String getObjectName() { return objectName; } public String getField() { return field; } public String getMessage() { return message; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
3c3ac6516b1522a88b49899d864850065b1f874d
30472cec0dbe044d52b029530051ab404701687f
/src/main/java/com/nawforce/platform/SObjects/UserAppMenuCustomization.java
893201cff8894002a0dd7c3ba65a40b3870ae7cd
[ "BSD-3-Clause" ]
permissive
madmax983/ApexLink
f8e9dcf8f697ed4e34ddcac353c13bec707f3670
30c989ce2c0098097bfaf586b87b733853913155
refs/heads/master
2020-05-07T16:03:15.046972
2019-04-08T21:08:06
2019-04-08T21:08:06
180,655,963
1
0
null
2019-04-10T20:08:30
2019-04-10T20:08:30
null
UTF-8
Java
false
false
1,909
java
/* [The "BSD licence"] Copyright (c) 2019 Kevin Jones All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.nawforce.platform.SObjects; import com.nawforce.platform.System.Id; import com.nawforce.platform.System.Integer; import com.nawforce.platform.System.SObject; import com.nawforce.platform.System.String; @SuppressWarnings("unused") public class UserAppMenuCustomization extends SObject { public Id ApplicationId; public ConnectedApplication Application; public String CurrencyIsoCode; public Id OwnerId; public Group Owner; public Integer SortOrder; }
[ "nawforce@gmail.com" ]
nawforce@gmail.com
fc0a1e293aed47f515d1a765dfae2141cfaa1037
98291c2bbdb889335994697f315760e265277f98
/PgBulkInsert/src/main/java/de/bytefish/pgbulkinsert/pgsql/handlers/LocalDateValueHandler.java
c907622c949d51025d3a1b3081e610994b34ca50
[ "MIT" ]
permissive
paplorinc/PgBulkInsert
36d65aa9605d20c43b4990ff38a74432d7c27b7b
119c7175d7bd815a1f48a10e246f2dc7ebf3de0f
refs/heads/master
2020-11-23T23:11:07.367219
2020-01-03T10:57:54
2020-01-03T11:15:23
227,858,466
0
0
MIT
2019-12-13T14:34:01
2019-12-13T14:34:00
null
UTF-8
Java
false
false
977
java
// Copyright (c) Philipp Wagner. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. package de.bytefish.pgbulkinsert.pgsql.handlers; import de.bytefish.pgbulkinsert.pgsql.converter.IValueConverter; import de.bytefish.pgbulkinsert.pgsql.converter.LocalDateConverter; import java.io.DataOutputStream; import java.time.LocalDate; public class LocalDateValueHandler extends BaseValueHandler<LocalDate> { private IValueConverter<LocalDate, Integer> dateConverter; public LocalDateValueHandler() { this(new LocalDateConverter()); } public LocalDateValueHandler(IValueConverter<LocalDate, Integer> dateTimeConverter) { this.dateConverter = dateTimeConverter; } @Override protected void internalHandle(DataOutputStream buffer, final LocalDate value) throws Exception { buffer.writeInt(4); buffer.writeInt(dateConverter.convert(value)); } }
[ "bytefish@gmx.de" ]
bytefish@gmx.de
963d505f11e45415e97a55d031618e57b7be62c7
e350163d7829fb77357ba467ad5e7889d7fd1f2d
/ReclAutomationNewFramework/src/main/java/com/tests/transaction/CreateNewAccessoryPOCompanyTest.java
72e30dc8c9c4604e9ea7517f63b02776dfb68f32
[]
no_license
amolo123/Automation-Projects
e6e18aef9002de2073cf1f1b7a61da3dc184a690
ee917ce3e7ade26a8a3ebb0be1a97b35896907d6
refs/heads/master
2022-07-06T10:17:59.660464
2021-02-19T06:27:48
2021-02-19T06:27:48
247,007,688
0
0
null
2022-03-08T21:25:48
2020-03-13T07:00:16
Java
UTF-8
Java
false
false
1,742
java
package com.tests.transaction; import java.io.IOException; import org.testng.annotations.Test; import com.tests.StartTest; public class CreateNewAccessoryPOCompanyTest extends StartTest{ @Test(priority=1) public void createNewPO() throws IOException { test=extent.createTest("Create New PO"); homePage.accessoryClick(); try {Thread.sleep(2000);} catch (InterruptedException e) {e.printStackTrace();} homePage.createNewAccessory(); createNewAccessoryPoPage.companyNameSelect("Maharashtra Explosives Pvt Ltd"); createNewAccessoryPoPage.customerNameSelect("GANPATI ENTERPRISES"); try {Thread.sleep(2000);} catch (InterruptedException e) {e.printStackTrace();} createNewAccessoryPoPage.exfactoryRadioButtonSelect(); createNewAccessoryPoPage.vehicleNoSelect(); createNewAccessoryPoPage.magazineCode("Mag/Det/3456434r"); try {Thread.sleep(2000);} catch (InterruptedException e) {e.printStackTrace();} createNewAccessoryPoPage.re11No("454677"); createNewAccessoryPoPage.browseSelect("/home/ankita/Downloads/sample.pdf"); try {Thread.sleep(2000);} catch (InterruptedException e) {e.printStackTrace();} //driver.quit(); createNewAccessoryPoPage.re11DateSelect("12-02-2020"); createNewAccessoryPoPage.itemSelect("SUPER ELECTRIC DETONATOR(White) 1.5 Mtrs"); createNewAccessoryPoPage.re11QtyInp(); try {Thread.sleep(2000);} catch (InterruptedException e) {e.printStackTrace();} createNewAccessoryPoPage.orderBox(); //createNewPoPage.orderQty(); try {Thread.sleep(2000);} catch (InterruptedException e) {e.printStackTrace();} createNewAccessoryPoPage.submit(); createNewAccessoryPoPage.submitchk(); } }
[ "ankita@ankita-ThinkPad-E470" ]
ankita@ankita-ThinkPad-E470
e3f6e61a1f8f802f25128a1cc552ee752d8fc5c2
11b26e42f4a95ad20f98d801c438029c3b546724
/framework-core2/src/main/java/cn/newcapec/framework/core/context/Keys.java
1b4feedac161cd1e9225b5eb6bf33aa5080cbbcd
[ "MIT" ]
permissive
3203317/ppp
48a81592feddc102c279affe7ed212b494bcada9
3d60ca71ac3ab4ccd3210fef42f535220cd79447
refs/heads/master
2021-01-17T10:42:47.761033
2016-03-25T14:57:07
2016-03-25T14:57:07
26,523,690
0
1
null
null
null
null
UTF-8
Java
false
false
1,578
java
package cn.newcapec.framework.core.context; public abstract interface Keys { public static final String CONTEXT_PAHT = "contextPath"; public static final String VERSION = "version"; public static final String WEBAPP = "webapp"; public static final String YYYY = "yyyy"; public static final String MM = "mm"; public static final String ID = "ID"; public static final String DEV_MODE = "devMode"; public static final String LANG = "lang"; public static final String USER_ID = "userId"; public static final String ORG_ID = "orgId"; public static final String DEPT_ID = "deptId"; public static final String CUR_DATE = "curDate"; public static final String CUR_DATE_10 = "curDate10"; public static final String CUR_YEAR = "curYear"; public static final String CUR_MONTH = "curMonth"; public static final String CUR_QUARTER = "curQuarter"; public static final String CURRENCY_BITS = "currencyBits"; public static final String CURRENCY_UNIT = "currencyUnit"; public static final String USER = "user"; public static final String USER_NAME = "userName"; public static final String DEPT_NAME = "deptName"; public static final String CORR_NAME = "corrName"; public static final String USER_TYPE = "userType"; public static final String TREE_ROOT_VALUE = "ROOT"; public static final String LOAD_CLAZZ = "loadClass"; public static final String CACHE_MINUTES = "cacheMinutes"; public static final String ORG_NAME = "orgName"; public static final String SEQ_NO = "_SEQ_NO"; public static final String DATA_SOURCE_URL = "dataSource"; }
[ "3203317@qq.com" ]
3203317@qq.com
4caef6f71c32bea1babb96f8bb24481b48e1d2fa
70d0ed72638cadbe19730a3f6b321221b425d872
/android/app/src/main/java/com/mogujie/tt/utils/DateUtil.java
310e2fb7a2beff242de98417ca02fdb69c00eff3
[ "Apache-2.0" ]
permissive
ccfish86/sctalk
0bb4edf5ad3407e8177827b4975a279248d72c88
0ec0cbbba3034c22ba65eca1bbcfa2181f93f296
refs/heads/master
2023-07-23T11:33:05.443159
2023-06-09T07:21:06
2023-06-09T07:21:06
90,029,031
177
102
Apache-2.0
2023-07-05T20:53:30
2017-05-02T12:06:14
Java
UTF-8
Java
false
false
8,527
java
package com.mogujie.tt.utils; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; /** * ไธป่ฆ็ปˆไบŽ้กต้ขๆ—ถ้—ด็š„่ฝฌๅŒ– * ๆ—ฅๆœŸๅทฅๅ…ท็ฑป * @yingmu * */ public class DateUtil { /** * ๆ–ฐ็‰ˆๆ—ถ้—ดๅฑ•็คบ ่Šๅคฉ้กต้ข * @param mTimeStamp * @return * ใ€ๅค‡ๆณจใ€‘ๆณจๆ„ๆ—ถ้—ดๅ•ไฝๆ˜ฏๆฏซ็ง’ */ public static String getSessionTime(int mTimeStamp) { if (mTimeStamp <= 0) { return null; } String[] weekDays = { "ๆ˜ŸๆœŸๆ—ฅ", "ๆ˜ŸๆœŸไธ€", "ๆ˜ŸๆœŸไบŒ", "ๆ˜ŸๆœŸไธ‰", "ๆ˜ŸๆœŸๅ››", "ๆ˜ŸๆœŸไบ”", "ๆ˜ŸๆœŸๅ…ญ" }; String strDesc = null; SimpleDateFormat formatYear = new SimpleDateFormat("yy/MM/dd"); SimpleDateFormat formatToday = new SimpleDateFormat("HH:mm"); /**ๆถˆๆฏๆ—ถ้—ดๆˆณ*/ long changeTime = (long) mTimeStamp; long messageTimeStamp = changeTime * 1000; /**ๅฝ“ๅ‰็š„ๆ—ถ้—ดๆˆณ*/ long currentTimeStamp =System.currentTimeMillis(); /**่Žทๅ–ไปŠๅคฉ็š„ 0 ็‚นๆ—ถ้—ดๆˆณ*/ long todayTimeStamp = getTimesmorning(); /**่Žทๅ– ไธŠไธ€ๅ‘จ 0็‚นๆ—ถ้—ดๆˆณ*/ long rangeWeekStamp = todayTimeStamp - 86400000*6; /**ไปŠๅคฉ็š„ๆ˜พ็คบ hh:mm (ไปŠๅคฉๆ˜ŸๆœŸไธ‰) * ๆ˜จๅคฉ * ๆ˜ŸๆœŸไธ€ * ๆ˜ŸๆœŸๆ—ฅ ใ€ ๆ˜ŸๆœŸๅ…ญใ€ ๆ˜ŸๆœŸไบ”ใ€ๆ˜ŸๆœŸๅ›› * yy-hh-mm * */ do{ long diff = currentTimeStamp - messageTimeStamp; long diffToday = currentTimeStamp - todayTimeStamp; /**ไปŠๅคฉไน‹ๅ†…็š„*/ if(diff < diffToday){ strDesc = formatToday.format(messageTimeStamp); break; } long diffWeek = currentTimeStamp - rangeWeekStamp; /**ๆœ€่ฟ‘ไธ€ๅ‘จ็š„ๅˆคๆ–ญ*/ if(diff < diffWeek){ /**ๆ˜จๅคฉ้›ถ็‚น็š„ๆ—ถ้—ด*/ long yesterday = todayTimeStamp - 86400000; long diffYesterday = currentTimeStamp - yesterday; if(diff < diffYesterday){ strDesc = "ๆ˜จๅคฉ"; }else{ Calendar weekCal = Calendar.getInstance(); weekCal.setTimeInMillis(messageTimeStamp); int w = weekCal.get(Calendar.DAY_OF_WEEK) -1; w = w<0?0:w; strDesc = weekDays[w]; } break; } /**ๅนดๆœˆๆ—ฅๆ˜พ็คบ*/ strDesc = formatYear.format(messageTimeStamp); }while(false); return strDesc; } /** * ่Žทๅ–ๅฝ“ๅคฉ ้›ถ็‚น็š„ๆ—ถ้—ดๆˆณใ€linuxใ€‘ * @return */ public static long getTimesmorning() { Calendar cal = Calendar.getInstance(); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.MILLISECOND, 0); return cal.getTimeInMillis(); } public static boolean needDisplayTime(int predateTime, int curdateTime) { long timediff = (curdateTime - predateTime); return (timediff >= 5 * 60 ); } public static String getTimeDiffDesc(Date date) { if (date == null) { return null; } String strDesc = null; Calendar curCalendar = Calendar.getInstance(); Date curDate = new Date(); curCalendar.setTime(curDate); Calendar thenCalendar = Calendar.getInstance(); thenCalendar.setTime(date); String[] weekDays = { "ๆ˜ŸๆœŸๆ—ฅ", "ๆ˜ŸๆœŸไธ€", "ๆ˜ŸๆœŸไบŒ", "ๆ˜ŸๆœŸไธ‰", "ๆ˜ŸๆœŸๅ››", "ๆ˜ŸๆœŸไบ”", "ๆ˜ŸๆœŸๅ…ญ" }; int w = thenCalendar.get(Calendar.DAY_OF_WEEK) - 1; if (w < 0) w = 0; // SimpleDateFormat format = new // SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Calendar current = Calendar.getInstance(); Calendar today = Calendar.getInstance(); // ไปŠๅคฉ today.set(Calendar.YEAR, current.get(Calendar.YEAR)); today.set(Calendar.MONTH, current.get(Calendar.MONTH)); today.set(Calendar.DAY_OF_MONTH, current.get(Calendar.DAY_OF_MONTH)); today.set(Calendar.HOUR_OF_DAY, 0); today.set(Calendar.MINUTE, 0); today.set(Calendar.SECOND, 0); // Date datetoday = today.getTime(); // System.out.println(format.format(datetoday)); Calendar yesterday = Calendar.getInstance(); // ๆ˜จๅคฉ yesterday.setTime(curDate); yesterday.add(Calendar.DATE, -1); yesterday.set(Calendar.HOUR_OF_DAY, 0); yesterday.set(Calendar.MINUTE, 0); yesterday.set(Calendar.SECOND, 0); // Date dateyestoday = yesterday.getTime(); // System.out.println(format.format(dateyestoday)); Calendar sevendaysago = Calendar.getInstance(); // 7ๅคฉ sevendaysago.setTime(curDate); sevendaysago.add(Calendar.DATE, -7); sevendaysago.set(Calendar.HOUR_OF_DAY, 0); sevendaysago.set(Calendar.MINUTE, 0); sevendaysago.set(Calendar.SECOND, 0); // Date datesevenago = sevendaysago.getTime(); // System.out.println(format.format(datesevenago)); /* * Date tasktime = yesterday.getTime(); SimpleDateFormat df=new * SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); * System.out.println(df.format(tasktime)); */ int thenMonth = thenCalendar.get(Calendar.MONTH); int thenDay = thenCalendar.get(Calendar.DAY_OF_MONTH); int h = thenCalendar.get(Calendar.HOUR_OF_DAY); int m = thenCalendar.get(Calendar.MINUTE); String sh = "", sm = ""; if (h < 10) sh = "0"; if (m < 10) sm = "0"; if (thenCalendar.after(today))// today { if (h < 6) { strDesc = "ๅ‡Œๆ™จ " + sh + h + ":" + sm + m; } else if (h < 12) { strDesc = "ไธŠๅˆ " + sh + h + ":" + sm + m; } else if (h < 13) { strDesc = "ไธ‹ๅˆ " + h + ":" + sm + m; } else if (h < 19) { strDesc = "ไธ‹ๅˆ " + (h - 12) + ":" + sm + m; } else { strDesc = "ๆ™šไธŠ " + (h - 12) + ":" + sm + m; } } else if (thenCalendar.before(today) && thenCalendar.after(yesterday)) {// yestoday // System.out.println("yestoday"); if (h < 6) { strDesc = "ๆ˜จๅคฉๅ‡Œๆ™จ " + sh + h + ":" + sm + m; } else if (h < 12) { strDesc = "ๆ˜จๅคฉไธŠๅˆ " + sh + h + ":" + sm + m; } else if (h < 13) { strDesc = "ๆ˜จๅคฉไธ‹ๅˆ " + h + ":" + sm + m; } else if (h < 19) { strDesc = "ๆ˜จๅคฉไธ‹ๅˆ " + (h - 12) + ":" + sm + m; } else { strDesc = "ๆ˜จๅคฉๆ™šไธŠ " + (h - 12) + ":" + sm + m; } } else if (thenCalendar.before(yesterday) && thenCalendar.after(sevendaysago)) {// 2 ~ 7days ago // System.out.println("2~7"); if (h < 6) { strDesc = weekDays[w] + "ๅ‡Œๆ™จ " + sh + h + ":" + sm + m; } else if (h < 12) { strDesc = weekDays[w] + "ไธŠๅˆ " + sh + h + ":" + sm + m; } else if (h < 13) { strDesc = weekDays[w] + "ไธ‹ๅˆ " + h + ":" + sm + m; } else if (h < 19) { strDesc = weekDays[w] + "ไธ‹ๅˆ " + (h - 12) + ":" + sm + m; } else { strDesc = weekDays[w] + "ๆ™šไธŠ " + (h - 12) + ":" + sm + m; } } else { // System.out.println("7~"); if (h < 6) { strDesc = (thenMonth + 1) + "ๆœˆ" + thenDay + "ๆ—ฅ" + "ๅ‡Œๆ™จ " + sh + h + ":" + sm + m; } else if (h < 12) { strDesc = (thenMonth + 1) + "ๆœˆ" + thenDay + "ๆ—ฅ" + "ไธŠๅˆ " + sh + h + ":" + sm + m; } else if (h < 13) { strDesc = (thenMonth + 1) + "ๆœˆ" + thenDay + "ๆ—ฅ" + "ไธ‹ๅˆ " + h + ":" + sm + m; } else if (h < 19) { strDesc = (thenMonth + 1) + "ๆœˆ" + thenDay + "ๆ—ฅ" + "ไธ‹ๅˆ " + (h - 12) + ":" + sm + m; } else { strDesc = (thenMonth + 1) + "ๆœˆ" + thenDay + "ๆ—ฅ" + "ๆ™šไธŠ " + (h - 12) + ":" + sm + m; } } // System.out.println(strDesc); return strDesc; } }
[ "ccfish@ccfish.net" ]
ccfish@ccfish.net
7abd68c82d0b93572c3e86c4ab46d8d3d5f34d35
4c32f2e91f2c4a2199c09e97c6109a70b301e804
/src/main/java/org/iata/iata/edist/RenderingParameterType.java
05bd4b4b212df89e5894e089862c2bd78cdd016d
[]
no_license
ejohnsonw/ndc-xsd-162
47f7b130b88d5af550a093529fa13a573ec628e0
76d0099233aad0c3d8663cc6e1c2cbf2435986f6
refs/heads/master
2020-12-30T13:28:16.667965
2017-05-14T02:56:01
2017-05-14T02:56:01
91,215,700
0
0
null
2017-05-14T02:47:21
2017-05-14T02:47:21
null
UTF-8
Java
false
false
6,590
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.05.13 at 10:55:06 PM EDT // package org.iata.iata.edist; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlIDREF; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * A data type for a Rendering Parameter, typically for XSLT. * * <p>Java class for RenderingParameterType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="RenderingParameterType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Parameter" maxOccurs="unbounded"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Name" type="{http://www.iata.org/IATA/EDIST}ShortDescSimpleType"/> * &lt;element name="Value"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;minLength value="1"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;/sequence> * &lt;attGroup ref="{http://www.iata.org/IATA/EDIST}ObjAssociationAttrGroup"/> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RenderingParameterType", propOrder = { "parameter" }) @XmlSeeAlso({ org.iata.iata.edist.RenderingInstructionsType.Parameters.class }) public class RenderingParameterType { @XmlElement(name = "Parameter", required = true) protected List<RenderingParameterType.Parameter> parameter; @XmlAttribute(name = "refs") @XmlIDREF protected List<Object> refs; /** * Gets the value of the parameter property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the parameter property. * * <p> * For example, to add a new item, do as follows: * <pre> * getParameter().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link RenderingParameterType.Parameter } * * */ public List<RenderingParameterType.Parameter> getParameter() { if (parameter == null) { parameter = new ArrayList<RenderingParameterType.Parameter>(); } return this.parameter; } /** * Gets the value of the refs property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the refs property. * * <p> * For example, to add a new item, do as follows: * <pre> * getRefs().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Object } * * */ public List<Object> getRefs() { if (refs == null) { refs = new ArrayList<Object>(); } return this.refs; } /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Name" type="{http://www.iata.org/IATA/EDIST}ShortDescSimpleType"/> * &lt;element name="Value"> * &lt;simpleType> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;minLength value="1"/> * &lt;/restriction> * &lt;/simpleType> * &lt;/element> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "name", "value" }) public static class Parameter { @XmlElement(name = "Name", required = true) protected String name; @XmlElement(name = "Value", required = true) protected String value; /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } } }
[ "ejohnson@ngeosone.com" ]
ejohnson@ngeosone.com
a733e7890493ead2dfd2f629622f8262e4365b88
cef012768301b8d1e4618dbd49f3fd7828bd8f42
/jusbilee-app/jusbilee-service/src/main/java/com/jusbilee/app/api/user/account/param/Credentials.java
34a3a69a2d24c196cbe2365918bbbfc5a58c322d
[ "Apache-2.0" ]
permissive
rockitall/jusbilee
1ae0633d37959e885a2bd8c6266633788495bd5a
50c327714e312b1537ff51eb52f0463abdb8a95a
refs/heads/master
2021-01-10T22:14:21.790536
2016-10-08T14:00:39
2016-10-08T14:00:39
70,335,722
0
0
null
null
null
null
UTF-8
Java
false
false
1,006
java
package com.jusbilee.app.api.user.account.param; import com.rockit.core.constraints.annotation.ID; import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.NotBlank; public class Credentials { @NotBlank(message = "็™ปๅฝ•ๅไธ่ƒฝไธบ็ฉบ") @ID(message = "็™ปๅฝ•ๅๅช่ƒฝๅŒ…ๅซๅคงๅฐๅ†™ๅญ—ๆฏใ€ๆ•ฐๅญ—ใ€ไธ‹ๅˆ’็บฟใ€ๆจช็บฟใ€@็ฌฆๅทๅŠๅฐๆ•ฐ็‚น็ฌฆๅท๏ผŒไธ”้ฆ–ๅฐพๅช่ƒฝไธบๅญ—ๆฏๆ•ฐๅญ—") @Length(min = 4, max = 16, message = "็™ปๅฝ•ๅ้•ฟๅบฆๆœ€ๅฐ‘4ไธชๅญ—็ฌฆ๏ผŒๆœ€ๅคš16ไธชๅญ—็ฌฆ") private String username; @NotBlank(message = "ๅฏ†็ ไธ่ƒฝไธบ็ฉบ") @Length(max = 32, message = "ๅฏ†็ ไธ่ƒฝ่ถ…่ฟ‡32ไธชๅญ—็ฌฆ") private String password; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
[ "44709809@qq.com" ]
44709809@qq.com
2af980c33da91aaf94fcef04afd76f0804b67c8f
d8a6ae3a9801f16bbf0f4ec8477ed6c60efe240b
/app/src/main/java/com/brandhype/medixfora/models/PharmacyItem.java
909a11acb9a5cd8ddbbdebbc4a7d0f40e83fbe86
[]
no_license
wbgtanmoy/Medixfora
d464ffdcae97b014299b7d38b002984e1ab5f2d1
5d39e443215ffcb368a25be39543ce74b1ec7a57
refs/heads/master
2020-03-31T13:32:56.982104
2018-10-09T14:03:13
2018-10-09T14:03:13
152,260,274
0
0
null
null
null
null
UTF-8
Java
false
false
817
java
package com.brandhype.medixfora.models; /** * Created by tanmoy on 29/07/15. */ public class PharmacyItem { private String title; private String id; private String _image; private String image_name; public PharmacyItem() { } public String getImage_name() { return image_name; } public void setImage_name(String image_name) { this.image_name = image_name; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String get_Image() { return _image; } public void set_Image(String image) { this._image = image; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } }
[ "tanmoy_india@yahoo.com" ]
tanmoy_india@yahoo.com
965219e4d967fdd465476075bb833807964b10d3
8021e7f653fb1a768272c5a4cb999b639d4089f4
/YZGJavaUtil/src/com/light/internet/TestInternet.java
833c8a33c869c517f9fa4b32cec5569b05788f71
[]
no_license
NElight/javaee_eclipse
76d260e5838ee68f05bbdbb5a20b7ed8f7c8b6a2
d7e3f2610cad21f5bfb03a5a08b98b49bf0236f6
refs/heads/master
2020-03-22T20:53:41.963376
2019-03-08T05:42:50
2019-03-08T05:42:50
140,639,979
0
0
null
null
null
null
UTF-8
Java
false
false
464
java
package com.light.internet; import java.util.Locale; import java.util.ResourceBundle; import javax.annotation.Resource; public class TestInternet { public static void main(String[] args) { Locale locale = new Locale("zh", "CN"); Locale locale2 = new Locale("en", "US"); Locale locale_default = Locale.getDefault(); ResourceBundle bundle = ResourceBundle.getBundle("com.light.internet.info"); System.out.println(bundle.getString("system.name")); } }
[ "15225160180@163.com" ]
15225160180@163.com
a156cd832a6fd22e2ac7c763dcf279621afcf3cf
10cc5a84789e9238dd973fbdb701bbeb3a822da0
/src/ConnectionMaintenance.java
16646a1bd84bd9f8fe383fdec02ccd72519ff667
[]
no_license
quake0day/gurutella
4dd24ec13c4e5cc59b17d78d0089b85700122806
59636c031725e21b6327551862c68d10e9f8a21a
refs/heads/master
2021-01-10T20:32:46.079943
2012-12-06T04:51:42
2012-12-06T04:51:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,788
java
/** * */ import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.io.IOException; import java.net.InetAddress; import java.net.Socket; /** * @author Tianmiao * */ public class ConnectionMaintenance implements ActionListener { private ConnectionInfoList _connectionL; NetworkServerList _nwkList; MessageIDList _mID; QueryResultList _queryList; FileInfoList _fileList; MonitorNetwork _monNetwork; GUID _guID; InetAddress _myIP; int _downPort; InfoParameters _iF; private Monitor _monitor; public ConnectionMaintenance (InetAddress IP, int tcpDown, Monitor mo , ConnectionInfoList cL, MessageIDList mID, NetworkServerList nL , QueryResultList qrL, FileInfoList fIL, MonitorNetwork mN, GUID gID , InfoParameters ifo) { _myIP = IP; _connectionL = cL; _nwkList = nL; _monitor = mo; _connectionL = cL; _mID = mID; _nwkList = nL; _queryList = qrL; _fileList = fIL; _monNetwork = mN; _guID = gID; _downPort = tcpDown; _iF = ifo; } public void actionPerformed(ActionEvent e) { while (_connectionL.size() > 0 && _connectionL.size() < 2) { System.out.println("Automatically maintaining a connection..."); if (_nwkList.size() > _connectionL.size()) { System.out.println("in nwkList"); ServerInfo sI = _nwkList.getServer(_connectionL); if (sI != null) { System.out.println("go to connect"); _monitor.createConn(sI.getIP().toString().split("/")[1] , String.valueOf(sI.getPort()), _downPort, _connectionL , _mID, _nwkList, _queryList, _myIP, _fileList, _monNetwork , _guID, _iF); } } else { System.out.println("to ELSE"); break; } } } }
[ "tianmiao@buffalo.edu" ]
tianmiao@buffalo.edu
0ece1245b28e8b35c2d884033c241f57a50816bb
6c4025a9290525f6700adf37b811098eab85cba0
/app/src/main/java/com/jzbwlkj/travelletv/retrofit/RetrofitInterface.java
7e9f4811139856979d75b31899632fa1b3da9d62
[]
no_license
gaoyuan117/TravelLetv
5019ea4645f453f8099516383dffadad236c5ddd
b59c281657cc37d24ea32342e3731be5aed45295
refs/heads/master
2021-01-22T04:34:02.124459
2017-03-29T07:24:35
2017-03-29T07:24:35
81,556,148
0
0
null
null
null
null
UTF-8
Java
false
false
3,245
java
package com.jzbwlkj.travelletv.retrofit; import com.jzbwlkj.travelletv.base.HttpResult; import com.jzbwlkj.travelletv.bean.CommonBean; import com.jzbwlkj.travelletv.bean.OrderBean; import com.jzbwlkj.travelletv.bean.login.CashBondBean; import com.jzbwlkj.travelletv.bean.my.ApkBean; import com.jzbwlkj.travelletv.bean.my.BackMoneyBean; import com.jzbwlkj.travelletv.bean.my.BackStateBean; import com.jzbwlkj.travelletv.bean.my.MyWalletBean; import com.jzbwlkj.travelletv.bean.my.UnionBean; import com.jzbwlkj.travelletv.bean.my.WxBean; import java.util.List; import java.util.Map; import okhttp3.MultipartBody; import okhttp3.RequestBody; import okhttp3.ResponseBody; import retrofit2.http.Field; import retrofit2.http.FieldMap; import retrofit2.http.FormUrlEncoded; import retrofit2.http.GET; import retrofit2.http.Multipart; import retrofit2.http.POST; import retrofit2.http.Part; import retrofit2.http.Streaming; import retrofit2.http.Url; import rx.Observable; /** * Created by dn on 2017/2/19. */ public interface RetrofitInterface { @FormUrlEncoded @POST Observable<ResponseBody> post(@Url String url, @FieldMap Map<String, String> maps, @Field("token") String token); @Multipart @POST Observable<ResponseBody> postSingleImg(@Url String url, @Part MultipartBody.Part body, @Part("token") RequestBody tokenBody); @Multipart @POST Observable<ResponseBody> postMultiImg(@Url String url, @Part List<MultipartBody.Part> partList); @Streaming @GET Observable<ResponseBody> downloadFile(@Url String url); @FormUrlEncoded @POST Observable<OrderBean> getOrder(@Url String url, @FieldMap Map<String, String> maps); /** * ่Žทๅ–้’ฑๅŒ…ไฟกๆฏ **/ @FormUrlEncoded @POST("api/User/Mywallet") Observable<HttpResult<MyWalletBean>> getWalletInfo(@FieldMap Map<String, String> maps); /** * ไบค็บณไฟ่ฏ้‡‘ **/ @FormUrlEncoded @POST("api/User/cashBond") Observable<CommonBean> cashBond(@FieldMap Map<String, String> maps); /** * ่Žทๅ–ไฟ่ฏ้‡‘้‡‘้ข **/ @FormUrlEncoded @POST("api/User/getBond") Observable<CashBondBean> getBond(@FieldMap Map<String, String> maps); /** * ้€€่ฟ˜ไฟ่ฏ้‡‘ **/ @FormUrlEncoded @POST("api/User/returnBond") Observable<HttpResult<BackMoneyBean>> backMoney(@FieldMap Map<String, String> maps); /** * ้€€่ฟ˜ไฟ่ฏ้‡‘็š„็Šถๆ€ **/ @FormUrlEncoded @POST("api/User/returnBondstatus") Observable<BackStateBean> backState(@FieldMap Map<String, String> maps); /** * ้€€่ฟ˜ไฟ่ฏ้‡‘็š„็Šถๆ€ **/ @FormUrlEncoded @POST("api/Wechat/wechpay") Observable<HttpResult<WxBean>> wxpay(@FieldMap Map<String, String> maps); /** * ้“ถ่”ๆ”ฏไป˜่Žทๅ–TN **/ @FormUrlEncoded @POST("api/Pay/achieveTN") Observable<UnionBean> unionPay(@FieldMap Map<String, String> maps); /** * ้“ถ่”ๆ”ฏไป˜้ชŒ็ญพ **/ @FormUrlEncoded @POST("api/Pay/VerifyAppData") Observable<UnionBean> verifyUndion(@FieldMap Map<String, String> maps); @FormUrlEncoded @POST("api/Public/getUploadsurl") Observable<HttpResult<ApkBean>> getApkUrl(@FieldMap Map<String, String> maps); }
[ "970725917@qq.com" ]
970725917@qq.com
b2c7bec0b1d38eb2aaba811713660d51cdce0b51
2285544cb08e83dbb81b792937996409243f6556
/pusher/src/test/unit/com/derbysoft/bookit/push/web/action/webservice/DswitchWebServiceTest.java
618155e3bb70420ee8664c9c552eacc9afb48ca5
[]
no_license
frogsmelody/bookit-adapter
fc8c9c000e1046ee65eed2480974df77fd7dd4f5
eebea98c4b4c4240468eb0b0674ed6ee0c9826b5
refs/heads/master
2016-09-08T01:15:18.063805
2014-08-13T03:16:07
2014-08-13T03:16:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,614
java
package com.derbysoft.bookit.push.web.action.webservice; import com.derbysoft.dswitch.dto.hotel.cds.LOSRateChangeRS; import com.derbysoft.dswitch.remote.hotel.buyer.HotelBuyerRemoteService; import com.derbysoft.dswitch.remote.hotel.dto.HotelLOSRateChangeRequest; import com.derbysoft.dswitch.remote.hotel.dto.HotelLOSRateChangeResponse; import com.derbysoft.synchronizer.remote.common.SynchronizerRemoteService; import com.derbysoft.synchronizer.remote.dto.GetChangesRequest; import com.derbysoft.synchronizer.remote.dto.GetChangesResponse; import com.derbysoft.synchronizer.remote.dto.GetKeysRequest; import com.derbysoft.synchronizer.remote.dto.GetKeysResponse; import org.easymock.EasyMock; import org.easymock.IAnswer; import org.junit.Before; import org.junit.Test; import utils.XMLTestSupport; public class DswitchWebServiceTest extends XMLTestSupport { DswitchWebService dswitchWebService = new DswitchWebService(); HotelBuyerRemoteService rateChangeWebService; SynchronizerRemoteService synchronizerRemoteService; @Before public void setUp() throws Exception { rateChangeWebService = EasyMock.createMock(HotelBuyerRemoteService.class); synchronizerRemoteService = EasyMock.createMock(SynchronizerRemoteService.class); dswitchWebService.setDswitchGetCDSKey("cdsKey"); dswitchWebService.setStandardSynchronizer("Synchronizer"); dswitchWebService.setRateChangeWebService(rateChangeWebService); dswitchWebService.setSynchronizerRemoteService(synchronizerRemoteService); } @Test public void testGetLosRateChange() { WebServiceCondition condition = new WebServiceCondition(); condition.setStart("2012-01-01"); condition.setEnd("2012-01-03"); condition.setHotelCodes("Hotel-A"); condition.setLosList("2,3,5"); condition.setRatePlans("RatePlan-A,RatePlan-B,RatePlan-C"); condition.setRoomTypes("RoomType-A,RoomType-B,RoomType-C"); EasyMock.expect(rateChangeWebService.getLOSRateChange(EasyMock.anyObject(HotelLOSRateChangeRequest.class))).andAnswer(new IAnswer<HotelLOSRateChangeResponse>() { @Override public HotelLOSRateChangeResponse answer() throws Throwable { HotelLOSRateChangeRequest request = (HotelLOSRateChangeRequest) EasyMock.getCurrentArguments()[0]; assertEquals(readFile("GetLosRateChangeRQ.json"), formatObjectToJson(request, "taskId")); HotelLOSRateChangeResponse response = new HotelLOSRateChangeResponse(); LOSRateChangeRS losRateChangeRS = new LOSRateChangeRS(); losRateChangeRS.setHotelCode("Hotel-A"); response.setLosRateChangeRS(losRateChangeRS); return response; } }); EasyMock.replay(rateChangeWebService); dswitchWebService.getLosRateChange(condition); EasyMock.verify(rateChangeWebService); } @Test public void testGetKeys() { WebServiceCondition condition = new WebServiceCondition(); condition.setHotelCodes("Hotel-A,Hotel-B,Hotel-C"); EasyMock.expect(synchronizerRemoteService.getKeys(EasyMock.anyObject(GetKeysRequest.class))).andAnswer(new IAnswer<GetKeysResponse>() { @Override public GetKeysResponse answer() throws Throwable { GetKeysRequest request = (GetKeysRequest) EasyMock.getCurrentArguments()[0]; assertEquals(readFile("GetKeyRQ.json"), formatObjectToJson(request, "taskId")); return new GetKeysResponse(); } }); EasyMock.replay(synchronizerRemoteService); dswitchWebService.getKeys(condition); EasyMock.verify(synchronizerRemoteService); } @Test public void testGetChanges() { WebServiceCondition condition = new WebServiceCondition(); condition.setHotelCodes("Hotel-A"); condition.setKeys("Key-1,Key-3,Key-5,"); EasyMock.expect(synchronizerRemoteService.getChanges(EasyMock.anyObject(GetChangesRequest.class))).andAnswer(new IAnswer<GetChangesResponse>() { @Override public GetChangesResponse answer() throws Throwable { GetChangesRequest request = (GetChangesRequest) EasyMock.getCurrentArguments()[0]; String taskId = formatObjectToJson(request, "taskId"); assertEquals(readFile("GetChangesRQ.json"), taskId); return new GetChangesResponse(); } }); EasyMock.replay(synchronizerRemoteService); dswitchWebService.getChanges(condition); EasyMock.verify(synchronizerRemoteService); } @Test(expected = IllegalArgumentException.class) public void testInvalidGetChangeRQ() { WebServiceCondition condition = new WebServiceCondition(); condition.setHotelCodes("Hotel-A"); EasyMock.expect(synchronizerRemoteService.getChanges(EasyMock.anyObject(GetChangesRequest.class))).andAnswer(new IAnswer<GetChangesResponse>() { @Override public GetChangesResponse answer() throws Throwable { GetChangesRequest request = (GetChangesRequest) EasyMock.getCurrentArguments()[0]; String taskId = formatObjectToJson(request, "taskId"); assertEquals(readFile("GetChangesRQ.json"), taskId); return new GetChangesResponse(); } }); EasyMock.replay(synchronizerRemoteService); dswitchWebService.getChanges(condition); EasyMock.verify(synchronizerRemoteService); } }
[ "frogsmelody@gmail.com" ]
frogsmelody@gmail.com
eb817676ab057c3209ac9521f4eb390db793b943
c9cb0dc507007ec0472112543d0c2c6e9ea783d4
/ConcurrentProgramming-20190511/src/test/java/com/gupao/java/AppTest.java
9c3ebc3285319011821a0072e36fa96215978334
[]
no_license
lixt1117/gupao-homework
ac9103fa876be1c18ca22b8dc6e40eb42ba9a0ac
d4a395cf37c21fa8cb8106daf849f2e55d9aba6e
refs/heads/master
2022-12-23T22:00:39.136625
2020-05-18T14:00:58
2020-05-18T14:00:58
212,139,127
1
0
null
2022-12-16T04:25:48
2019-10-01T16:00:52
Java
UTF-8
Java
false
false
286
java
package com.gupao.java; import static org.junit.Assert.assertTrue; import org.junit.Test; /** * Unit test for simple App. */ public class AppTest { /** * Rigorous Test :-) */ @Test public void shouldAnswerWithTrue() { assertTrue( true ); } }
[ "979756066@qq.com" ]
979756066@qq.com
eb5785e099957446f50603e605f56602f12e89ab
373bfdf785b639997628979d74f9b1848ccff821
/app/src/main/java/com/hackensack/umc/com/hackensack/umc/camera/CameraPreview.java
e0cea9a93f45a16ec7fe7c765c435fd8780277a7
[]
no_license
prernakatyarmal/MyAppTestHumc
566a9318e8368d3efacdd09691d8fcdb7168c5a4
0096d3c710ec37bb20d3a9a80099c4a96954b0f4
refs/heads/master
2016-09-13T14:37:58.358391
2016-05-06T12:36:29
2016-05-06T12:36:34
58,205,217
0
0
null
null
null
null
UTF-8
Java
false
false
20,578
java
package com.hackensack.umc.com.hackensack.umc.camera; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.sql.Timestamp; import java.util.List; import android.app.Activity; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.ImageFormat; import android.graphics.Matrix; import android.graphics.Rect; import android.graphics.YuvImage; import android.hardware.Camera; import android.net.Uri; import android.os.AsyncTask; import android.os.Environment; import android.provider.MediaStore; import android.util.AttributeSet; import android.util.Log; import android.util.Size; import android.view.Surface; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.widget.ImageView; import android.widget.Toast; import com.hackensack.umc.activity.ActivityCropImage; import com.hackensack.umc.cropper.BitmapCroppingWorkerTask; import com.hackensack.umc.cropper.CropImageView; import com.hackensack.umc.cropper.cropwindow.edge.Edge; import com.hackensack.umc.cropper.util.ImageViewUtil; import com.hackensack.umc.util.Base64Converter; import com.hackensack.umc.util.Constant; public class CameraPreview extends SurfaceView implements SurfaceHolder.Callback { private static final int PIC_CROP = 11; private SurfaceHolder mHolder; private Camera mCamera; private int rotation; private int cameraId = Camera.CameraInfo.CAMERA_FACING_BACK; private Context mContext; private OnGetCroppedImageCompleteListener onGetCroppedImageCompleteListener; private byte[] mBuffer; public CameraPreview(Context context, Camera camera) { super(context, null); mCamera = camera; mContext = context; onGetCroppedImageCompleteListener = (OnGetCroppedImageCompleteListener) context; // Install a SurfaceHolder.Callback so we get notified when the // underlying surface is created and destroyed. mHolder = getHolder(); mHolder.addCallback(this); // deprecated setting, but required on Android versions prior to 3.0 mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); mCamera.setPreviewCallback(new Camera.PreviewCallback() { @Override public void onPreviewFrame(byte[] data, Camera camera) { Toast toast = Toast .makeText(mContext, "onPreview", Toast.LENGTH_LONG); toast.show(); try { Camera.Parameters parameters = camera.getParameters(); Camera.Size size = parameters.getPreviewSize(); YuvImage image = new YuvImage(data, parameters.getPreviewFormat(), size.width, size.height, null); File file = new File(Environment.getExternalStorageDirectory() .getPath() + "/out.jpg"); FileOutputStream filecon = new FileOutputStream(file); image.compressToJpeg( new Rect(0, 0, image.getWidth(), image.getHeight()), 90, filecon); } catch (FileNotFoundException e) { Toast toast1 = Toast .makeText(mContext, e.getMessage(), Toast.LENGTH_LONG); toast1.show(); } } }); mCamera.setFaceDetectionListener(new Camera.FaceDetectionListener() { @Override public void onFaceDetection(Camera.Face[] faces, Camera camera) { } }); } public CameraPreview(Context context, AttributeSet attrs) { this(context, attrs, 0); mCamera = getCameraInstance(); mContext = context; // Install a SurfaceHolder.Callback so we get notified when the // underlying surface is created and destroyed. mHolder = getHolder(); mHolder.addCallback(this); // deprecated setting, but required on Android versions prior to 3.0 mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public CameraPreview(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); mCamera = getCameraInstance(); mContext = context; // Install a SurfaceHolder.Callback so we get notified when the // underlying surface is created and destroyed. mHolder = getHolder(); mHolder.addCallback(this); // deprecated setting, but required on Android versions prior to 3.0 mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); // real work here } public Camera getCameraInstance() { Camera c = null; try { c = Camera.open();// attempt to get a Camera instance } catch (Exception e) { // Camera is not available (in use or does not exist) e.printStackTrace(); } return c; // returns null if camera is unavailable } public void surfaceCreated(SurfaceHolder holder) { // The Surface has been created, now tell the camera where to draw the preview. // try { openCamera(cameraId); updateBufferSize(); /*} catch (IOException e) { Log.d("CameraView", "Error setting camera preview: " + e.getMessage()); }*/ } public void surfaceDestroyed(SurfaceHolder holder) { // empty. Take care of releasing the Camera preview in your activity. } public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { // If your preview can change or rotate, take care of those events here. // Make sure to stop the preview before resizing or reformatting it. if (mHolder.getSurface() == null) { // preview surface does not exist updateBufferSize(); return; } // stop preview before making changes try { mCamera.stopPreview(); } catch (Exception e) { // ignore: tried to stop a non-existent preview } // set preview size and make any resize, rotate or // reformatting changes here // start preview with new settings try { openCamera(cameraId); } catch (Exception e) { Log.d("CameraView", "Error starting camera preview: " + e.getMessage()); } } public void onPause() { mCamera.release(); mCamera = null; } private void setUpCamera(Camera c) { Camera.CameraInfo info = new Camera.CameraInfo(); Camera.getCameraInfo(cameraId, info); rotation = ((Activity) mContext).getWindowManager().getDefaultDisplay().getRotation(); int degree = 0; switch (rotation) { case Surface.ROTATION_0: degree = 0; break; case Surface.ROTATION_90: degree = 90; break; case Surface.ROTATION_180: degree = 180; break; case Surface.ROTATION_270: degree = 270; break; default: break; } if (info.facing == Camera.CameraInfo.CAMERA_FACING_FRONT) { // frontFacing rotation = (info.orientation + degree) % 330; rotation = (360 - rotation) % 360; } else { // Back-facing rotation = (info.orientation - degree + 360) % 360; } c.setDisplayOrientation(rotation); Camera.Parameters params = c.getParameters(); List<String> focusModes = params.getSupportedFlashModes(); if (focusModes != null) { if (focusModes .contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE)) { params.setFlashMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE); } } params.setRotation(rotation); } private boolean openCamera(int id) { boolean result = false; cameraId = id; releaseCamera(); try { mCamera = Camera.open(cameraId); } catch (Exception e) { e.printStackTrace(); } if (mCamera != null) { setUpCamera(mCamera); mCamera.setErrorCallback(new Camera.ErrorCallback() { @Override public void onError(int error, Camera camera) { } }); try { mCamera.setPreviewDisplay(mHolder); mCamera.startPreview(); // mCamera.startFaceDetection(); } catch (IOException e) { e.printStackTrace(); } result = true; } return result; } private void releaseCamera() { try { if (mCamera != null) { mCamera.setPreviewCallback(null); mCamera.setErrorCallback(null); mCamera.stopPreview(); mCamera.release(); mCamera = null; } } catch (Exception e) { e.printStackTrace(); Log.e("error", e.toString()); mCamera = null; } } public void takeImage(final DrawView dv) { mCamera.takePicture(null, null, new Camera.PictureCallback() { @Override public void onPictureTaken(byte[] data, Camera camera) { try { new CreateBitMap(data,dv).execute(); /* // convert byte array into bitmap Bitmap loadedImage = null; Bitmap rotatedBitmap = null; loadedImage = BitmapFactory.decodeByteArray(data, 0, data.length); // rotate Image Matrix rotateMatrix = new Matrix(); rotateMatrix.postRotate(rotation); rotatedBitmap = Bitmap.createBitmap(loadedImage, 0, 0, loadedImage.getWidth(), loadedImage.getHeight(), rotateMatrix, false); Matrix matrix = new Matrix(); matrix.postScale(0.5f, 0.5f); *//* Bitmap croppedBitmap = Bitmap.createBitmap(rotatedBitmap,dv.l,dv.t,200,200); saveCropedImage(croppedBitmap);*//* // saveCropedImage(getPic(dv.l,dv.t,200,200)); BitmapCroppingWorkerTask bitmapCroppingWorkerTask = new BitmapCroppingWorkerTask(CameraPreview.this, rotatedBitmap, getActualCropRect(rotatedBitmap, dv), CropImageView.CropShape.RECTANGLE); bitmapCroppingWorkerTask.execute();*/ } catch (Exception e) { e.printStackTrace(); } } }); } private class CreateBitMap extends AsyncTask<Void, Void, Bitmap> { byte[] data; DrawView dv; CreateBitMap(byte[] data,DrawView dv) { this.data = data; this.dv=dv; } @Override protected Bitmap doInBackground(Void... params) { Bitmap loadedImage = null; Bitmap rotatedBitmap = null; loadedImage = BitmapFactory.decodeByteArray(data, 0, data.length); // rotate Image Matrix rotateMatrix = new Matrix(); rotateMatrix.postRotate(rotation); rotatedBitmap = Bitmap.createBitmap(loadedImage, 0, 0, loadedImage.getWidth(), loadedImage.getHeight(), rotateMatrix, false); Matrix matrix = new Matrix(); matrix.postScale(0.5f, 0.5f); return loadedImage; } @Override protected void onPostExecute(Bitmap bitmap) { super.onPostExecute(bitmap); BitmapCroppingWorkerTask bitmapCroppingWorkerTask = new BitmapCroppingWorkerTask(CameraPreview.this, bitmap, getActualCropRect(bitmap, dv), CropImageView.CropShape.RECTANGLE); bitmapCroppingWorkerTask.execute(); } } public void onGetImageCroppingAsyncComplete(BitmapCroppingWorkerTask.Result result) { Bitmap bitmap = result.bitmap; onGetCroppedImageCompleteListener.onGetCroppedImageComplete(bitmap); } public String saveCropedImage(Bitmap rotatedBitmap) { File imageFile = null; String base64=Base64Converter.createBase64StringFromBitmap(rotatedBitmap,mContext); String state = Environment.getExternalStorageState(); File folder = null; if (state.contains(Environment.MEDIA_MOUNTED)) { folder = new File(Environment .getExternalStorageDirectory() + "/Demo"); } else { folder = new File(Environment .getExternalStorageDirectory() + "/Demo"); } boolean success = true; if (!folder.exists()) { success = folder.mkdirs(); } try { if (success) { java.util.Date date = new java.util.Date(); imageFile = new File(folder.getAbsolutePath() + File.separator + new Timestamp(date.getTime()).toString() + "Image.png"); imageFile.createNewFile(); } else { Toast.makeText(mContext, "Image Not saved", Toast.LENGTH_SHORT).show(); return null; } ByteArrayOutputStream ostream = new ByteArrayOutputStream(); // save image into gallery rotatedBitmap.compress(Bitmap.CompressFormat.PNG, 100, ostream); FileOutputStream fout = new FileOutputStream(imageFile); fout.write(ostream.toByteArray()); fout.close(); } catch (IOException e) { e.printStackTrace(); } ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis()); values.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg"); values.put(MediaStore.MediaColumns.DATA, imageFile.getAbsolutePath()); Uri uri = mContext.getContentResolver().insert( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); Intent intent = ((Activity) mContext).getIntent(); intent.setData(uri); ((Activity) mContext).setResult(Activity.RESULT_OK, intent); ((Activity) mContext).finish(); /* Intent intent = new Intent(mContext, ActivityCropImage.class); intent.setData(uri); intent.putExtra(Constant) ((Activity) mContext).startActivityForResult(intent, Constant.CROP_IMAGE_ACTIVITY);*/ // ((Activity) mContext).finish(); return base64; } public interface OnGetCroppedImageCompleteListener { /** * Called when a crop image view has completed loading image for cropping.<br> * If loading failed error parameter will contain the error. * * @param bitmap the cropped image bitmap (null if failed) */ void onGetCroppedImageComplete(Bitmap bitmap); } public Rect getActualCropRect(Bitmap mBitmap, DrawView dv) { if (mBitmap != null) { final Rect displayedImageRect = ImageViewUtil.getBitmapRect(mBitmap, ((Activity) mContext).getWindow().getDecorView(), ImageView.ScaleType.CENTER_CROP); // Get the scale factor between the actual Bitmap dimensions and the displayed dimensions for width. final float actualImageWidth = mBitmap.getWidth(); final float displayedImageWidth = displayedImageRect.width(); final float scaleFactorWidth = actualImageWidth / displayedImageWidth; // Get the scale factor between the actual Bitmap dimensions and the displayed dimensions for height. final float actualImageHeight = mBitmap.getHeight(); final float displayedImageHeight = displayedImageRect.height(); final float scaleFactorHeight = actualImageHeight / displayedImageHeight; // Get crop window position relative to the displayed image. final float displayedCropLeft = dv.l - displayedImageRect.left; final float displayedCropTop = dv.t - displayedImageRect.top / 3; final float displayedCropWidth = dv.rect.width(); final float displayedCropHeight = dv.rect.height(); // Scale the crop window position to the actual size of the Bitmap. float actualCropLeft = displayedCropLeft * scaleFactorWidth; float actualCropTop = displayedCropTop * scaleFactorHeight; float actualCropRight = actualCropLeft + displayedCropWidth * scaleFactorWidth; float actualCropBottom = (actualCropTop - displayedImageRect.top) + displayedCropHeight * scaleFactorHeight; // Correct for floating point errors. Crop rect boundaries should not exceed the source Bitmap bounds. actualCropLeft = Math.max(0f, actualCropLeft); actualCropTop = Math.max(0f, actualCropTop); actualCropRight = Math.min(mBitmap.getWidth(), actualCropRight); actualCropBottom = Math.min(mBitmap.getHeight(), actualCropBottom); return new Rect((int) actualCropLeft, (int) actualCropTop, (int) actualCropRight, (int) actualCropBottom); } else { return null; } } /** * Gets the crop window's position relative to the source Bitmap (not the image * displayed in the CropImageView) and the original rotation. * * @return a RectF instance containing cropped area boundaries of the source Bitmap */ // @SuppressWarnings("SuspiciousNameCombination") /* public Rect getActualCropRectNoRotation(Bitmap mBitmap) { if (mBitmap != null) { Rect rect = getActualCropRect(mBitmap); int rotateSide = mDegreesRotated / 90; if (rotateSide == 1) { rect.set(rect.top, mBitmap.getWidth() - rect.right, rect.bottom, mBitmap.getWidth() - rect.left); } else if (rotateSide == 2) { rect.set(mBitmap.getWidth() - rect.right, mBitmap.getHeight() - rect.bottom, mBitmap.getWidth() - rect.left, mBitmap.getHeight() - rect.top); } else if (rotateSide == 3) { rect.set(mBitmap.getHeight() - rect.bottom, rect.left, mBitmap.getHeight() - rect.top, rect.right); } rect.set(rect.left * mLoadedSampleSize, rect.top * mLoadedSampleSize, rect.right * mLoadedSampleSize, rect.bottom * mLoadedSampleSize); return rect; } else { return null; } }*/ public Bitmap getPic(int x, int y, int width, int height) { System.gc(); Bitmap b = null; Camera.Parameters mParameters = mCamera.getParameters(); Camera.Size s = mParameters.getPreviewSize(); YuvImage yuvimage = new YuvImage(mBuffer, ImageFormat.NV21, this.getWidth(), this.getHeight(), null); ByteArrayOutputStream outStream = new ByteArrayOutputStream(); yuvimage.compressToJpeg(new Rect(x, y, width, height), 100, outStream); // make JPG b = BitmapFactory.decodeByteArray(outStream.toByteArray(), 0, outStream.size()); if (b != null) { //Log.i(TAG, "getPic() WxH:" + b.getWidth() + "x" + b.getHeight()); } else { //Log.i(TAG, "getPic(): Bitmap is null.."); } yuvimage = null; outStream = null; System.gc(); return b; } private void updateBufferSize() { mBuffer = null; System.gc(); // prepare a buffer for copying preview data to int h = mCamera.getParameters().getPreviewSize().height; int w = mCamera.getParameters().getPreviewSize().width; int bitsPerPixel = ImageFormat.getBitsPerPixel(mCamera.getParameters().getPreviewFormat()); mBuffer = new byte[w * h * bitsPerPixel / 8]; //Log.i("surfaceCreated", "buffer length is " + mBuffer.length + " bytes"); } }
[ "katyarmal.prerna@gmail.com" ]
katyarmal.prerna@gmail.com
dfc50bc67496b62a1e42975a75e2261b446ca5ce
86ee6ef337545e2d9473b27ea917c1f80a66195e
/offer/src/main/java/leetCode/L10034_SearchRange.java
a211131784f8c35db6de8d7af905d606cc4875ad
[ "MIT" ]
permissive
seawindnick/javafamily
161eac4c34c64a71ebe6bc7e55bfc53897294918
d8a6cf8b185e98d6e60961e306a4bbeb4e7360dc
refs/heads/master
2022-11-06T06:55:00.822972
2022-02-25T03:05:07
2022-02-25T03:05:07
227,639,012
1
0
MIT
2022-10-12T20:38:24
2019-12-12T15:34:04
Java
UTF-8
Java
false
false
3,146
java
package leetCode;//็ป™ๅฎšไธ€ไธชๆŒ‰็…งๅ‡ๅบๆŽ’ๅˆ—็š„ๆ•ดๆ•ฐๆ•ฐ็ป„ nums๏ผŒๅ’Œไธ€ไธช็›ฎๆ ‡ๅ€ผ targetใ€‚ๆ‰พๅ‡บ็ป™ๅฎš็›ฎๆ ‡ๅ€ผๅœจๆ•ฐ็ป„ไธญ็š„ๅผ€ๅง‹ไฝ็ฝฎๅ’Œ็ป“ๆŸไฝ็ฝฎใ€‚ // // ๅฆ‚ๆžœๆ•ฐ็ป„ไธญไธๅญ˜ๅœจ็›ฎๆ ‡ๅ€ผ target๏ผŒ่ฟ”ๅ›ž [-1, -1]ใ€‚ // // ่ฟ›้˜ถ๏ผš // // // ไฝ ๅฏไปฅ่ฎพ่ฎกๅนถๅฎž็Žฐๆ—ถ้—ดๅคๆ‚ๅบฆไธบ O(log n) ็š„็ฎ—ๆณ•่งฃๅ†ณๆญค้—ฎ้ข˜ๅ—๏ผŸ // // // // // ็คบไพ‹ 1๏ผš // // //่พ“ๅ…ฅ๏ผšnums = [5,7,7,8,8,10], target = 8 //่พ“ๅ‡บ๏ผš[3,4] // // ็คบไพ‹ 2๏ผš // // //่พ“ๅ…ฅ๏ผšnums = [5,7,7,8,8,10], target = 6 //่พ“ๅ‡บ๏ผš[-1,-1] // // ็คบไพ‹ 3๏ผš // // //่พ“ๅ…ฅ๏ผšnums = [], target = 0 //่พ“ๅ‡บ๏ผš[-1,-1] // // // // ๆ็คบ๏ผš // // // 0 <= nums.length <= 105 // -109 <= nums[i] <= 109 // nums ๆ˜ฏไธ€ไธช้ž้€’ๅ‡ๆ•ฐ็ป„ // -109 <= target <= 109 // // Related Topics ๆ•ฐ็ป„ ไบŒๅˆ†ๆŸฅๆ‰พ // ๐Ÿ‘ 1137 ๐Ÿ‘Ž 0 import com.alibaba.fastjson.JSONArray; //leetcode submit region begin(Prohibit modification and deletion) public class L10034_SearchRange { public static void main(String[] args) { int[] array = new int[]{5,7,7,8,8,10}; System.out.println(JSONArray.toJSONString(searchRange(array,8))); } public static int[] searchRange(int[] nums, int target) { if (nums == null || nums.length <= 0) { return new int[]{-1, -1}; } int leftIndex = searchLeftIndex(nums, target); int rightIndex = searchRightIndex(nums, target); return new int[]{leftIndex, rightIndex}; } private static int searchRightIndex(int[] nums, int target) { int leftIndex = 0; int rightIndex = nums.length - 1; Integer index = -1; while (leftIndex <= rightIndex) { int midIndex = (leftIndex + rightIndex) / 2; if (nums[midIndex] < target) { leftIndex = midIndex + 1; continue; } if (nums[midIndex] > target) { rightIndex = midIndex - 1; continue; } if (nums[midIndex] == target) { index = midIndex; if (midIndex != nums.length - 1 && nums[midIndex] == nums[midIndex + 1]) { leftIndex = leftIndex + 1; }else { break; } } } return index; } private static int searchLeftIndex(int[] nums, int target) { int leftIndex = 0; int rightIndex = nums.length - 1; Integer index = -1; while (leftIndex <= rightIndex) { int midIndex = (leftIndex + rightIndex) / 2; if (nums[midIndex] < target) { leftIndex = midIndex + 1; continue; } if (nums[midIndex] > target) { rightIndex = midIndex - 1; continue; } if (nums[midIndex] == target) { index = midIndex; if (midIndex != 0 && nums[midIndex] == nums[midIndex - 1]) { rightIndex = midIndex - 1; }else { break; } } } return index; } }
[ "hushiye001@ke.com" ]
hushiye001@ke.com
b5022d7374b2176128a54d4aca0fbb69f9ac5c2d
2dd743accba9ac8d478e368b20a4fe6476ac6a00
/parent/application/src/test/java/org/application/SuiteTests.java
2f9e48368c8be094de41749dfcea3ed59939eccf
[]
no_license
ThiarllesMaster/integration_spring_tests
7b143fbffde15d5d13735198ccc20c8419491d50
2c0dc80bb6c128d85aa8a96675e2a73a5341838c
refs/heads/master
2020-04-01T08:12:42.846161
2018-10-14T21:43:22
2018-10-14T21:43:22
153,021,640
0
0
null
null
null
null
UTF-8
Java
false
false
375
java
package org.application; import org.junit.Test; import org.junit.runner.JUnitCore; import org.junit.runner.RunWith; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.tests.IndexTest; @RunWith(SpringJUnit4ClassRunner.class) public class SuiteTests { @Test public void testInitApplication() { JUnitCore.runClasses(IndexTest.class); } }
[ "thiarlles.a.gomes@accenture.com" ]
thiarlles.a.gomes@accenture.com
e1f11e597514fc62b8f123df6f8494b3ddc258c0
e5da59efacaf3c86e1e58e492b893d740e3498b4
/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserTextSearch.java
d97aa6f03d3120878e36a8ef614e57edbdb9d809
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
mmaravic-aurea/opencmis
205c3a06321f56e691a4baed791814c759256a62
e850dbe0d13c8ae5f46d23e06bfa57ba334343f2
refs/heads/master
2021-05-27T20:35:49.836931
2012-10-28T17:58:10
2012-10-28T17:58:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
10,019
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.chemistry.opencmis.server.support.query; import org.junit.After; import org.junit.Before; import org.junit.Test; public class TestParserTextSearch extends AbstractParserTest{ //private static final Logger log = LoggerFactory.getLogger(TestParserTextSearch.class); @Before public void setUp() { super.setUp(TextSearchLexer.class, TextSearchParser.class, null); } @Override @After public void tearDown() { super.tearDown(); } // full text search parser // OR: // << // OR // >> OK @Test public void testOR1() { testLexerOk("OR", "OR"); } // // TEXT_SEARCH_WORD_LIT: // << // abc // >> OK @Test public void testTEXT_SEARCH_WORD_LIT2() { testLexerOk("TEXT_SEARCH_WORD_LIT", "abc"); } // // << // "ab c" // >> FAIL @Test public void testTEXT_SEARCH_WORD_LIT3() { testLexerFail("TEXT_SEARCH_WORD_LIT", "\"ab c\""); } // // << // "'abc'" // >> FAIL @Test public void testTEXT_SEARCH_WORD_LIT4() { testLexerFail("TEXT_SEARCH_WORD_LIT", "\"\'abc\'\""); } // // << // "ab\'c" // >> OK @Test public void testTEXT_SEARCH_WORD_LIT5() { testLexerOk("TEXT_SEARCH_WORD_LIT", "\"ab\\'c\""); } // // << // "ab\\c" // >> OK @Test public void testTEXT_SEARCH_WORD_LIT6() { testLexerOk("TEXT_SEARCH_WORD_LIT", "\"ab\\\\c\""); } // // /* // << // ab''c // >> OK // */ /* * double quotes not supported in text search */ /* @Test public void testTEXT_SEARCH_WORD_LIT7() { testLexerOk("TEXT_SEARCH_WORD_LIT", "ab''c"); } */ // // phrase: // // << // \'abc\' // >> FAIL @Test public void testPhrase1() { testParserFail("phrase", "\\'abc\\'"); } // // << // "abc" // >> FAIL @Test public void testPhrase2() { testParserFail("phrase", "\"abc\""); } // // << // 'abc' // >> OK @Test public void testPhrase3() { testParserOk("phrase", "'abc'"); } // // << // 'abc def' // >> OK @Test public void testPhrase4() { testParserOk("phrase", "'abc def'"); } // // << // 'ab\-c' // >> OK @Test public void testPhrase5() { testParserOk("phrase", "'ab\\-c'"); } // // << // 'ab\\c' // >> OK @Test public void testPhrase6() { testParserOk("phrase", "'ab\\\\c'"); } // // << // 'ab\c' // >> FAIL @Test public void testPhrase7() { testParserFail("phrase", "'ab\\c'"); } // // << // 'ab\\\c' // >> FAIL @Test public void testPhrase8() { testParserFail("phrase", "'ab\\\\\\c'"); } // // << // 'ab\'c' // >> OK @Test public void testPhrase9() { testParserOk("phrase", "'ab\\'c'"); } // // << // 'abc def' // >> OK @Test public void testPhrase10() { testParserOk("phrase", "'abc def'"); } // // << // '\'abc\'' // >> OK @Test public void testPhrase11() { testParserOk("phrase", "'\\'abc\\''"); } // // << // 'abc AND def' // >> OK @Test public void testPhrase12() { testParserOk("phrase", "'abc AND def'"); } // // << // 'AND' // >> OK @Test public void testPhrase13() { testParserOk("phrase", "'AND'"); } // // word: // // << // abc // >> OK @Test public void testWord1() { testParserOk("word", "abc"); } // // << // 312#+!&abc // >> OK @Test public void testWord2() { testParserOk("word", "312#+!&abc"); } // // << // \'abc\' // >> OK @Test public void testWord3() { testParserOk("word", "\\'abc\\'"); } // // << // 'abc' // >> FAIL @Test public void testWord4() { testParserFail("word", "'abc'"); } // // << // ab\-c // >> OK @Test public void testWord6() { testParserOk("word", "ab\\-c"); } // // << // ab\\c // >> OK @Test public void testWord7() { testParserOk("word", "ab\\\\c"); } // // << // ab\'c // >> OK @Test public void testWord8() { testParserOk("word", "ab\\'c"); } // // << // OR // >> FAIL @Test public void testWord9() { testParserFail("word", "OR"); } // // << // AND // >> FAIL @Test public void testWord10() { testParserFail("word", "AND"); } // // // term: // // << // -abc // >> OK @Test public void testWord11() { testParserOk("term", "-abc"); } // // << // abc // >> OK @Test public void testWord12() { testParserOk("term", "abc"); } // // << // 'abc def' // >> OK @Test public void testWord13() { testParserOk("term", "'abc def'"); } // // << // -'abc def' // >> OK @Test public void testWord14() { testParserOk("term", "-'abc def'"); } // // conjunct: // // << // abc def // >> OK @Test public void testConjunct1() { testParserOk("conjunct", "abc def"); } // // << // abc AND def // >> OK @Test public void testConjunct2() { testParserOk("conjunct", "abc AND def"); } // // << // abc AND def ghi John\'s // >> OK @Test public void testConjunct3() { testParserOk("conjunct", "abc AND def ghi John\\'s"); } // // text_search_expression: // // << // cat mouse dog // >> OK @Test public void testTextSearchExpression1() { testParserOk("text_search_expression", "cat mouse dog"); } // // << // cat AND mouse AND dog // >> OK @Test public void testTextSearchExpression2() { testParserOk("text_search_expression", "cat AND mouse AND dog"); } // // << // cat OR mouse OR dog // >> OK @Test public void testTextSearchExpression3() { testParserOk("text_search_expression", "cat OR mouse OR dog"); } // // << // cat mouse OR dog // >> OK @Test public void testTextSearchExpression4() { testParserOk("text_search_expression", "cat mouse OR dog"); } // // << // cat AND mouse OR dog AND John\'s // >> OK @Test public void testTextSearchExpression5() { testParserOk("text_search_expression", "cat AND mouse OR dog AND John\\'s"); } // // << // 'cat AND mouse' // >> OK @Test public void testTextSearchExpression6() { testParserOk("text_search_expression", "'cat AND mouse'"); } // // << // 'text search expression' // >> OK @Test public void testTextSearchExpression7() { testParserOk("text_search_expression", "'text search expression'"); } // // << // 'John\'s presentation' // >> OK @Test public void testTextSearchExpression8() { testParserOk("text_search_expression", "'John\\'s presentation'"); } // // << // 'John\\'s presentation' // >> FAIL @Test public void testTextSearchExpression9() { testParserFail("text_search_expression", "'John\\\\'s presentation'"); } // // << // A\-1 // >> OK @Test public void testTextSearchExpression10() { testParserOk("text_search_expression", "A\\-1"); } // // << // 'c:\\My Documents' // >> OK @Test public void testTextSearchExpression11() { testParserOk("text_search_expression", "'c:\\\\My Documents'"); } // // << // 'c:\\\My Documents' // >> FAIL @Test public void testTextSearchExpression13() { testParserFail("text_search_expression", "'c:\\\\\\My Documents'"); } // // << // 'c:\My Documents' // >> FAIL @Test public void testTextSearchExpression14() { testParserFail("text_search_expression", "'c:\\My Documents'"); } // // << // c:\My Documents // >> FAIL @Test public void testTextSearchExpression15() { testParserFail("text_search_expression", "c:\\My Documents"); } }
[ "fritz@fritz-elfert.de" ]
fritz@fritz-elfert.de
23ef5e4a3cbb12b2baa90b9a982d30fb396d79b1
456e251a75c33d074520cadca6b9f7d6b8ca6c98
/entry/src/main/java/com/chy/demo/mvp/MyApplication.java
23e5a76202066b35cc32593c4a28d7d07020edd8
[]
no_license
chyjack/harmony-mvp
1bd564d2bdc497184d2a755c1820f071698d8d69
db1e44617bd00b291f80f59439de9d68974b923a
refs/heads/main
2023-05-07T05:53:10.204505
2021-05-29T12:24:42
2021-05-29T12:24:42
371,953,417
0
0
null
null
null
null
UTF-8
Java
false
false
207
java
package com.chy.demo.mvp; import ohos.aafwk.ability.AbilityPackage; public class MyApplication extends AbilityPackage { @Override public void onInitialize() { super.onInitialize(); } }
[ "caihuangyu@bytedance.com" ]
caihuangyu@bytedance.com
5216c99bc01d53fe9979fab8106e130a9a3494a6
3a5188dbc8af50009d2b9c30dfeb6f5d20c33b1f
/bibliotecas/TestaMath2.java
de4ab59731220cb52220be5a3a0508cf5f6084d4
[]
no_license
carloshbarreto/prog2
3b4bf3849b6f8bb5030f6a1139d9f2c59e7be3a2
fd172bd73acf99fde0fc725b08cfbb6388e33abc
refs/heads/main
2023-06-06T03:13:33.470975
2021-06-25T23:37:59
2021-06-25T23:37:59
361,025,225
0
0
null
null
null
null
UTF-8
Java
false
false
776
java
package bibliotecas; public class TestaMath2 { public static void main(String[] args) { double i = 5.0; double d = 10.0; //Math.exp System.out.println("Teste Math.exp"); System.out.println("Valor inicial: "+ d); double f = Math.exp(d); System.out.println(f); //Math.log System.out.println("Teste Math.log"); System.out.println("Valor inicial: "+d); double de = Math.log(d); System.out.println(de); //Math.pow System.out.println("Teste Math.pow"); System.out.println("Valor inicial: "+d); double p = Math.pow(i, d); System.out.println(p); //Math.sqrt System.out.println("Teste de Math.sqrt"); System.out.println("Valor inicial: "+p); double sq = Math.sqrt(p); System.out.println(sq); } }
[ "carlos_henrique47@yahoo.com.br" ]
carlos_henrique47@yahoo.com.br
f84877c996b587e35d17cc7c0e06fbd4209652e3
03adf79efc9b9e4c9efcb90666abcf0529b72ebd
/src/main/java/com/csxx/utils/NumberUtil.java
2708a9634294bf03a8f998c14692c00d535864e1
[]
no_license
CabbageUntil/im
4d0cf2e5d027ca24997dce668a9076b05a16341d
e352652413c073d894942879bce2541e9da32305
refs/heads/master
2020-03-29T19:06:12.793629
2018-11-02T07:48:56
2018-11-02T07:48:56
150,247,854
0
0
null
null
null
null
UTF-8
Java
false
false
814
java
package com.csxx.utils; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Random; /** * author:penghaijie * time:2018ๅนด8ๆœˆ29ๆ—ฅ18:01:57 * ไฝœ็”จ๏ผšID็”Ÿๆˆๅ™จ */ public class NumberUtil { public static String newNumberID() { StringBuilder sb = new StringBuilder(); Date date = new Date(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmSSS"); String timeStampStr = simpleDateFormat.format(date); sb.append(timeStampStr); for (int i=0;i<4;i++){ Random r = new Random(); int n = r.nextInt(10); sb.append(n); } return sb.toString(); } /* public static void main(String[] agrs){ System.out.println("ๆ—ถ้—ดๅญ—็ฌฆไธฒ" +newNumberID()); }*/ }
[ "1107954032@qq.com" ]
1107954032@qq.com
6ba09aa53821a04252c9942a707f23ad96de3121
63b65b1adff6ca5f221a0e30b00cc843d951b355
/RSSAggregator/app/src/main/java/com/rssaggregator/android/network/model/Item.java
84c25a815e2011ca64c44667ccc072d4f3351be6
[ "Apache-2.0" ]
permissive
iRalala/AndroidApp
8947db3695a44099060aa70fae75979041bdd96c
0d0ca62672d5fcac92da4076776fe8d638937423
refs/heads/master
2021-01-09T20:03:08.297900
2017-01-29T18:57:00
2017-01-29T18:57:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,960
java
package com.rssaggregator.android.network.model; import android.os.Parcel; import android.os.Parcelable; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.Date; /** * Object representing an article in the RSS feed. */ public class Item implements Parcelable { @SerializedName("id_item") @Expose private Integer itemId; @Expose private String title; @Expose private String description; @SerializedName("pubDate") @Expose private Date pubDate; @SerializedName("link") @Expose private String linkUrl; @SerializedName("id_feed") @Expose private Integer channelId; @Expose private boolean read; @Expose private boolean starred; /** * Additional attributes for offline database. */ private Integer categoryId; private String categoryName; private String channelName; public Integer getItemId() { return itemId; } public void setItemId(Integer itemId) { this.itemId = itemId; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Date getPubDate() { return pubDate; } public void setPubDate(Date pubDate) { this.pubDate = pubDate; } public String getLinkUrl() { return linkUrl; } public void setLinkUrl(String linkUrl) { this.linkUrl = linkUrl; } public Integer getChannelId() { return channelId; } public void setChannelId(Integer channelId) { this.channelId = channelId; } public boolean isRead() { return read; } public void setRead(boolean read) { this.read = read; } public boolean isStarred() { return starred; } public void setStarred(boolean starred) { this.starred = starred; } public Integer getCategoryId() { return categoryId; } public void setCategoryId(Integer categoryId) { this.categoryId = categoryId; } public String getCategoryName() { return categoryName; } public void setCategoryName(String categoryName) { this.categoryName = categoryName; } public String getChannelName() { return channelName; } public void setChannelName(String channelName) { this.channelName = channelName; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeValue(this.itemId); dest.writeString(this.title); dest.writeString(this.description); dest.writeLong(this.pubDate != null ? this.pubDate.getTime() : -1); dest.writeString(this.linkUrl); dest.writeValue(this.channelId); dest.writeByte(this.read ? (byte) 1 : (byte) 0); dest.writeByte(this.starred ? (byte) 1 : (byte) 0); dest.writeValue(this.categoryId); dest.writeString(this.categoryName); dest.writeString(this.channelName); } public Item() { } protected Item(Parcel in) { this.itemId = (Integer) in.readValue(Integer.class.getClassLoader()); this.title = in.readString(); this.description = in.readString(); long tmpPubDate = in.readLong(); this.pubDate = tmpPubDate == -1 ? null : new Date(tmpPubDate); this.linkUrl = in.readString(); this.channelId = (Integer) in.readValue(Integer.class.getClassLoader()); this.read = in.readByte() != 0; this.starred = in.readByte() != 0; this.categoryId = (Integer) in.readValue(Integer.class.getClassLoader()); this.categoryName = in.readString(); this.channelName = in.readString(); } public static final Creator<Item> CREATOR = new Creator<Item>() { @Override public Item createFromParcel(Parcel source) { return new Item(source); } @Override public Item[] newArray(int size) { return new Item[size]; } }; }
[ "irina.ralala@epitech.eu" ]
irina.ralala@epitech.eu
b439a753b4994aa903d854939963ba4a030b6c77
264ecdf9f9875bca79e004b4bd9d81145c720960
/Group1_PROJECT/ANDROID/app/src/main/java/com/example/bare/VaccineAdapter.java
bf24bcd58dc545eb384d85a0d28127d6c93ba5fa
[]
no_license
bontsdivina/CC107_Sat7301230Group1
56fb596f5e608f5f1dee9e50ebda752643f34893
40e2bad5b5ec09de7ce1b4d515980a08fc1dfc3b
refs/heads/main
2023-07-30T10:21:25.337633
2021-09-29T10:37:07
2021-09-29T10:37:07
340,537,959
0
0
null
null
null
null
UTF-8
Java
false
false
1,316
java
package com.example.bare; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.util.List; public class VaccineAdapter extends ArrayAdapter<Vaccined> { Context context; List<Vaccined> arrayListVaccine; public VaccineAdapter(@NonNull Context context, List<Vaccined> arrayListVaccine) { super(context, R.layout.list_feed,arrayListVaccine); this.context = context; this.arrayListVaccine = arrayListVaccine; } @NonNull @Override public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_feed,null,true); TextView tvID = view.findViewById(R.id.txt_id); TextView tvDate = view.findViewById(R.id.txt_date); TextView tvShift = view.findViewById(R.id.txtShift); tvID.setText(arrayListVaccine.get(position).getid()); tvDate.setText(arrayListVaccine.get(position).getDate()); tvShift.setText(arrayListVaccine.get(position).getName_Of_Vaccine()); return view; } }
[ "79345400+ven-ven@users.noreply.github.com" ]
79345400+ven-ven@users.noreply.github.com
1e200753e60a78d03c34b58e5f7005fa6639e5cd
89723541f3a2cc7087d49dcee592694c5c0513c3
/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/ConsentPerformerEnumFactory.java
4627f0697be7aa0b37d2559a80b8ef88462eb477
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
rkorytkowski/hapi-fhir
7207ae68ff8ef6e876f53b51bbdbd0312ae0daa7
9f45c2bcfa00349ce17e191899581f4fc6e8c0d6
refs/heads/master
2021-07-13T01:06:12.674713
2020-06-16T09:11:38
2020-06-16T09:12:23
145,406,752
0
2
Apache-2.0
2018-08-20T11:08:35
2018-08-20T11:08:35
null
UTF-8
Java
false
false
3,018
java
package org.hl7.fhir.r4.model.codesystems; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 import org.hl7.fhir.r4.model.EnumFactory; public class ConsentPerformerEnumFactory implements EnumFactory<ConsentPerformer> { public ConsentPerformer fromCode(String codeString) throws IllegalArgumentException { if (codeString == null || "".equals(codeString)) return null; if ("consenter".equals(codeString)) return ConsentPerformer.CONSENTER; if ("grantee".equals(codeString)) return ConsentPerformer.GRANTEE; if ("grantor".equals(codeString)) return ConsentPerformer.GRANTOR; if ("delegatee".equals(codeString)) return ConsentPerformer.DELEGATEE; if ("delegator".equals(codeString)) return ConsentPerformer.DELEGATOR; throw new IllegalArgumentException("Unknown ConsentPerformer code '"+codeString+"'"); } public String toCode(ConsentPerformer code) { if (code == ConsentPerformer.CONSENTER) return "consenter"; if (code == ConsentPerformer.GRANTEE) return "grantee"; if (code == ConsentPerformer.GRANTOR) return "grantor"; if (code == ConsentPerformer.DELEGATEE) return "delegatee"; if (code == ConsentPerformer.DELEGATOR) return "delegator"; return "?"; } public String toSystem(ConsentPerformer code) { return code.getSystem(); } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
fbf383e8e59ecee69b004ebba8ac24d4ff9aad9f
5f82aae041ab05a5e6c3d9ddd8319506191ab055
/Projects/JacksonDatabind/29/src/test/java/com/fasterxml/jackson/failing/ImplicitParamsForCreator806Test.java
031cc14a41610aa51f88092102c0b1acdaa6f51b
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
lingming/prapr_data
e9ddabdf971451d46f1ef2cdbee15ce342a6f9dc
be9ababc95df45fd66574c6af01122ed9df3db5d
refs/heads/master
2023-08-14T20:36:23.459190
2021-10-17T13:49:39
2021-10-17T13:49:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,829
java
package com.fasterxml.jackson.failing; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.introspect.AnnotatedMember; import com.fasterxml.jackson.databind.introspect.AnnotatedParameter; import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector; public class ImplicitParamsForCreator806Test extends BaseMapTest { @SuppressWarnings("serial") static class MyParamIntrospector extends JacksonAnnotationIntrospector { @Override public String findImplicitPropertyName(AnnotatedMember param) { if (param instanceof AnnotatedParameter) { AnnotatedParameter ap = (AnnotatedParameter) param; return "paramName"+ap.getIndex(); } return super.findImplicitPropertyName(param); } } static class XY { protected int x, y; // annotation should NOT be needed with 2.6 any more (except for single-arg case) //@com.fasterxml.jackson.annotation.JsonCreator public XY(int x, int y) { this.x = x; this.y = y; } } /* /********************************************************** /* Test methods /********************************************************** */ // for [databind#806] public void testImplicitNameWithNamingStrategy() throws Exception { ObjectMapper mapper = new ObjectMapper() .setAnnotationIntrospector(new MyParamIntrospector()) .setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES) ; XY value = mapper.readValue(aposToQuotes("{'param_name0':1,'param_name1':2}"), XY.class); assertNotNull(value); assertEquals(1, value.x); assertEquals(2, value.y); } }
[ "2890268106@qq.com" ]
2890268106@qq.com
8b309aaba55d2f6c5cd1a2f8bc4eced84d16f4a4
dd822613a844811804e11dfbde0310934925872f
/Flag/src/main/java/com/bulgogi/flag/activity/MainActivity.java
38ac238d6282e8b32eebc6fa7d203290efb68a48
[]
no_license
jungilhan/flag
831830a8dd8f132451b982e9e5d5d3f7597495ec
4e91bb3874720aa5c355de0691396e49cdf277ba
refs/heads/master
2021-01-02T08:47:10.937795
2014-01-16T09:16:38
2014-01-16T09:16:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,533
java
package com.bulgogi.flag.activity; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.support.v4.app.ActionBarDrawerToggle; import android.support.v4.app.Fragment; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import com.bulgogi.flag.R; import com.bulgogi.flag.adapter.CategoryAdapter; import com.bulgogi.flag.config.Constants; import com.bulgogi.flag.fragment.FlagFragment; import com.bulgogi.flag.model.CategoryItem; import com.hb.views.PinnedSectionListView; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class MainActivity extends TrackerActionBarActivity { private ActionBarDrawerToggle drawerToggle; private DrawerLayout drawerLayout; private int category = 1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ac_main); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); init(); if (savedInstanceState != null) { category = savedInstanceState.getInt(Constants.BUNDLE_LAST_CATEGORY); } selectCategory(category); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt(Constants.BUNDLE_LAST_CATEGORY, category); } private void init() { getSupportActionBar().setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.accent1))); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); drawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.drawable.ic_drawer, R.string.drawer_open, R.string.drawer_close ) { public void onDrawerClosed(View view) { supportInvalidateOptionsMenu(); // creates call to onPrepareOptionsMenu() } public void onDrawerOpened(View drawerView) { supportInvalidateOptionsMenu(); // creates call to onPrepareOptionsMenu() } }; // Defer code dependent on restoration of previous instance state. drawerLayout.post(new Runnable() { @Override public void run() { drawerToggle.syncState(); } }); drawerLayout.setDrawerListener(drawerToggle); setupCategory(); } private void setupCategory() { PinnedSectionListView category = (PinnedSectionListView) findViewById(R.id.category); category.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { selectCategory(position); } }); List<CategoryItem> items = new ArrayList<CategoryItem>(); items.add(CategoryItem.valueOf(getResources().getString(R.string.drawer_section_0), CategoryItem.SECTION)); List<String> names = Arrays.asList(getResources().getStringArray(R.array.national_flag_category_items)); for (String name : names) { items.add(CategoryItem.valueOf(name, CategoryItem.ITEM)); } items.add(CategoryItem.valueOf(getResources().getString(R.string.drawer_section_1), CategoryItem.SECTION)); List<String> leagues = Arrays.asList(getResources().getStringArray(R.array.football_category_items)); for (String league : leagues) { items.add(CategoryItem.valueOf(league, CategoryItem.ITEM)); } CategoryAdapter adapter = new CategoryAdapter(this, R.layout.tv_category_item, items); category.setAdapter(adapter); } @Override public boolean onOptionsItemSelected(MenuItem item) { // The action bar home/up action should open or close the drawer. // ActionBarDrawerToggle will take care of this. if (drawerToggle.onOptionsItemSelected(item)) { return true; } // 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. switch (item.getItemId()) { case R.id.action_settings: return true; } return super.onOptionsItemSelected(item); } /* Called whenever we call invalidateOptionsMenu() */ @Override public boolean onPrepareOptionsMenu(Menu menu) { return super.onPrepareOptionsMenu(menu); } @Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); // Sync the toggle state after onRestoreInstanceState has occurred. drawerToggle.syncState(); } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); // Pass any configuration change to the drawer toggls drawerToggle.onConfigurationChanged(newConfig); } private void selectCategory(int position) { category = position; Fragment fragment = null; switch (position) { case 0: // National flags header break; case 1: fragment = FlagFragment.newInstance(this, getResources().getStringArray(R.array.national_flag_category_items)[0], R.array.countries, R.array.country_thumbs, R.array.country_flags, false); break; case 2: fragment = FlagFragment.newInstance(this, getResources().getStringArray(R.array.national_flag_category_items)[1], R.array.worldcup2014_countries, R.array.worldcup2014_thumbs, R.array.worldcup2014_flags, false); break; case 3: fragment = FlagFragment.newInstance(this, getResources().getStringArray(R.array.national_flag_category_items)[2], R.array.olympic2014_countries, R.array.olympic2014_thumbs, R.array.olympic2014_flags, false); break; case 4: // Football emblems header break; case 5: fragment = FlagFragment.newInstance(this, "EPL", R.array.epl_clubs, R.array.epl_thumbs, R.array.epl_flags, true); break; case 6: fragment = FlagFragment.newInstance(this, "Serie A", R.array.seriea_clubs, R.array.seriea_thumbs, R.array.seriea_flags, true); break; case 7: fragment = FlagFragment.newInstance(this, "Primera Liga", R.array.primeraliga_clubs, R.array.primeraliga_thumbs, R.array.primeraliga_flags, true); break; case 8: fragment = FlagFragment.newInstance(this, "Bundesliga", R.array.bundesliga_clubs, R.array.bundesliga_thumbs, R.array.bundesliga_flags, true); break; } if (fragment != null) { drawerLayout.closeDrawer(GravityCompat.START); getSupportFragmentManager().beginTransaction().replace(R.id.container, fragment).commit(); } } }
[ "jungil.han@gmail.com" ]
jungil.han@gmail.com
4b40f5ab218008c0ca47db4e3411552a0cae852d
1ba3b96366fcd2e1af21c87274a39ae37c6b3589
/shoppingbackend/src/main/java/org/burkitech/shoppingbackend/daoimpl/CartLineDAOImpl.java
96a253e3dcb0d536ced64a213356a407ea215c9d
[]
no_license
sclzohaib/online-shopping
ee55e90948aa30c7132bef0c0d7250d31dcbab87
ba14df8a23c7d6774660364652b1ba34b4c87ecd
refs/heads/master
2022-12-22T20:39:12.363443
2018-04-09T10:13:40
2018-04-09T10:13:40
125,016,313
0
0
null
2022-12-16T11:04:24
2018-03-13T08:20:43
CSS
UTF-8
Java
false
false
2,511
java
package org.burkitech.shoppingbackend.daoimpl; import java.util.List; import org.burkitech.shoppingbackend.dao.CartLineDAO; import org.burkitech.shoppingbackend.dto.Cart; import org.burkitech.shoppingbackend.dto.CartLine; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; @Repository("cartLineDAO") @Transactional public class CartLineDAOImpl implements CartLineDAO { @Autowired private SessionFactory sessionFactory; @Override public CartLine get(int id) { return sessionFactory.getCurrentSession().get(CartLine.class, id); } @Override public boolean add(CartLine cartLine) { try { sessionFactory.getCurrentSession().persist(cartLine); return true; } catch (Exception ex) { ex.printStackTrace(); return false; } } @Override public boolean update(CartLine cartLine) { try { sessionFactory.getCurrentSession().update(cartLine); return true; } catch (Exception ex) { ex.printStackTrace(); return false; } } @Override public boolean delete(CartLine cartLine) { try { sessionFactory.getCurrentSession().delete(cartLine); return true; } catch (Exception ex) { ex.printStackTrace(); return false; } } @Override public List<CartLine> list(int cartId) { String query = "FROM CartLine where cartId=:cartId"; return sessionFactory.getCurrentSession().createQuery(query, CartLine.class).setParameter("cartId", cartId) .getResultList(); } @Override public List<CartLine> listAvailable(int cartId) { String query = "FROM CartLine where cartId=:cartId AND available=:available"; return sessionFactory.getCurrentSession().createQuery(query, CartLine.class).setParameter("cartId", cartId) .setParameter("available", 'Y').getResultList(); } @Override public CartLine getByCartAndProduct(int cartId, int productId) { String query = "FROM CartLine where cartId=:cartId AND product.id=:productId"; try { return sessionFactory.getCurrentSession().createQuery(query, CartLine.class).setParameter("cartId", cartId) .setParameter("productId", productId).getSingleResult(); } catch (Exception ex) { return null; } } //related to cart table @Override public boolean updateCart(Cart cart) { try { sessionFactory.getCurrentSession().update(cart); return true; } catch (Exception ex) { ex.printStackTrace(); return false; } } }
[ "sclzohaib@gmail.com" ]
sclzohaib@gmail.com
bf9bd6c6f0d310c6e7c38ea0d46f5768a2d2726f
e7411762b76a391ccbe1b960d64f8ca194209adf
/openapi-generator-utils/petstore/petstore-openapigen-jaxrs-spec-thorntail/src/gen/java/fr/jmini/openapi/openapitools/thorntail/model/Category.java
4a1c9d7a59a7c6930fa5743cd372a806e943fbd0
[ "Apache-2.0" ]
permissive
jmini/openapi-experiments
fe3e5c6a855716f9fc83f26638a3b5327183698f
941b125777977c52c1f1e7abd59f4fdf5863e5cb
refs/heads/master
2022-12-25T14:18:00.172453
2020-01-06T20:52:47
2020-01-06T20:52:47
121,434,627
1
1
Apache-2.0
2022-12-15T23:23:47
2018-02-13T20:45:45
Java
UTF-8
Java
false
false
1,843
java
package fr.jmini.openapi.openapitools.thorntail.model; import javax.validation.constraints.*; import javax.validation.Valid; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; public class Category { private @Valid Long id; private @Valid String name; /** **/ public Category id(Long id) { this.id = id; return this; } @JsonProperty("id") public Long getId() { return id; } public void setId(Long id) { this.id = id; } /** **/ public Category name(String name) { this.name = name; return this; } @JsonProperty("name") public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Category category = (Category) o; return Objects.equals(this.id, category.id) && Objects.equals(this.name, category.name); } @Override public int hashCode() { return Objects.hash(id, name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Category {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "dev@jmini.fr" ]
dev@jmini.fr
1ec4b8a91ba4b65e99fde09d73d18f59fd300f28
d8ce8bfb6c2415479625dd220108d1b74ca7c5ac
/Backup/UIConstants.java
5e98fcc2cd365ede932891823c0a9887ecf556ad
[]
no_license
Bryce-Summers/Interpolators
519a231795669edd7ee89a97beed180dcd5318c3
655b2197988320ca566926fc89f694291393a9ac
refs/heads/master
2016-09-06T14:29:55.289889
2016-01-16T20:49:52
2016-01-16T20:49:52
31,114,044
2
1
null
null
null
null
UTF-8
Java
false
false
3,250
java
package template.tool; import processing.core.PFont; public class UIConstants { static PFont buttonFont; static gui_mainControls App; final static int NO_BUTTON_SELECTED = -1; final static int BUTTON_STATE_UNSELECTED = 0; final static int BUTTON_STATE_HOVERING = 1; final static int BUTTON_STATE_PRESSING = 2; final static int BUTTON_STATE_SELECTED = 3; final static int BUTTONGROUP_SINGLE_CHOICE = 1; final static int BUTTONGROUP_MULTIPLE_CHOICE = 2; static UIButtonGroup buttonGroupA; static UIButtonGroup buttonGroupB; static UIButton generateButton; static String[] namesA = { "All", "Sigmoid", "Ogee", "Ease-In", "Ease-Out", "Penner's", "Gaussian", "Bezier", "Staircase", "Window", "Other" }; static String[] imagesA = { null, "Sigmoid.png", "Ogee.png", "Ease-In.png", "Ease-Out.png", null, "Gaussian.png", null, "Staircase.png", "Window.png", null }; static String[] namesB = { "Flip X?", "Flip Y?", "Constrain Output?", "Comment Only?", "Use New Tab?" }; static String[] imagesB = { "check_24.png", "check_24.png", "check_24.png", "check_24.png", "check_24.png" }; // -- Initialize all of the constants. public static void init(gui_mainControls App_in) { App = App_in; buttonFont = App.loadFont("Roboto-Medium-16.vlw"); buttonGroupA = new UIButtonGroup (BUTTONGROUP_SINGLE_CHOICE, namesA, imagesA, 7, 7, 130, 42, 7); int output_controls_x = 970; buttonGroupB = new UIButtonGroup (BUTTONGROUP_MULTIPLE_CHOICE, namesB, imagesB, output_controls_x, 7, 192, 42, 7); generateButton = new UIButton("GENERATE!", output_controls_x, 350, 192, 72, false, false); generateButton.bCenteredText = true; generateButton.setIsMomentary(true); buttonGroupB.buttonArray[4].buttonState = BUTTON_STATE_SELECTED; } //---------------- static void draw() { // App.background(255); //drawButtonGroupHeadings(); buttonGroupA.update(); buttonGroupA.drawButtonGroup(); buttonGroupB.update(); buttonGroupB.drawButtonGroup(); boolean bDoGenerate = generateButton.handleMouse(); generateButton.drawButton(); if (bDoGenerate){ App.export(); } // -- Handle Output Settings. UIButton[] buttons = buttonGroupB.buttonArray; App.bool_flipX = buttons[0].isSelected(); App.bool_flipY = buttons[1].isSelected(); App.bool_clamp = buttons[2].isSelected(); App.bool_comment = buttons[3].isSelected(); App.bool_newTab = buttons[4].isSelected(); } //---------------- static void mousePressed() { buttonGroupA.handleMousePressed(); buttonGroupB.handleMousePressed(); generateButton.handleMousePressed(); // -- Handle Group index setting. UIButton[] buttons = buttonGroupA.buttonArray; int len = buttons.length; for(int i = 0; i < len; i++) { if(buttonGroupA.buttonArray[i].bClickHappenedInMe) { App.function_groups[i].mouseP(); App.println("Selected " + i); } } } //---------------- static void drawButtonGroupHeadings() { App.fill(100); App.textAlign (App.LEFT); App.text ("Family: " + buttonGroupA.getSelectedButtonString(), 7, 20); App.text ("Options: " + buttonGroupB.getSelectedButtonString(), 200, 20); } }
[ "bryce@funtheemental.com" ]
bryce@funtheemental.com
f506470aa7e323040832d2378b3a8d94ccb87b33
8ab3b581022a570e89b30de843d4cc5f671609f3
/src/main/java/com/ebay/soap/eBLBaseComponents/RefundFundingSourceType.java
a3d87d9cbcbdda548c9859fede75c70507abe92e
[]
no_license
lespaul361/eBaySDK1027
745198a748e47cf2e9f26719f3a03384e8210901
6c5e0de66b89dbfb859bc34376cd7e0616724358
refs/heads/master
2021-04-26T23:54:52.208637
2018-03-10T07:27:19
2018-03-10T07:27:19
124,628,809
0
1
null
2018-08-03T00:38:05
2018-03-10T06:24:24
Java
UTF-8
Java
false
false
6,958
java
package com.ebay.soap.eBLBaseComponents; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import org.w3c.dom.Element; /** * * This type is deprecated. * * * <p>Java class for RefundFundingSourceType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="RefundFundingSourceType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="RefundingSourceType" type="{urn:ebay:apis:eBLBaseComponents}RefundingSourceTypeCodeType" minOccurs="0"/> * &lt;element name="AccountNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="RefundAmount" type="{urn:ebay:apis:eBLBaseComponents}AmountType" minOccurs="0"/> * &lt;element name="SellerExternalTransactionID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="BuyerExternalTransactionID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;any/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RefundFundingSourceType", propOrder = { "refundingSourceType", "accountNumber", "refundAmount", "sellerExternalTransactionID", "buyerExternalTransactionID", "any" }) public class RefundFundingSourceType implements Serializable { private final static long serialVersionUID = 12343L; @XmlElement(name = "RefundingSourceType") protected RefundingSourceTypeCodeType refundingSourceType; @XmlElement(name = "AccountNumber") protected String accountNumber; @XmlElement(name = "RefundAmount") protected AmountType refundAmount; @XmlElement(name = "SellerExternalTransactionID") protected String sellerExternalTransactionID; @XmlElement(name = "BuyerExternalTransactionID") protected String buyerExternalTransactionID; @XmlAnyElement(lax = true) protected List<Object> any; /** * Gets the value of the refundingSourceType property. * * @return * possible object is * {@link RefundingSourceTypeCodeType } * */ public RefundingSourceTypeCodeType getRefundingSourceType() { return refundingSourceType; } /** * Sets the value of the refundingSourceType property. * * @param value * allowed object is * {@link RefundingSourceTypeCodeType } * */ public void setRefundingSourceType(RefundingSourceTypeCodeType value) { this.refundingSourceType = value; } /** * Gets the value of the accountNumber property. * * @return * possible object is * {@link String } * */ public String getAccountNumber() { return accountNumber; } /** * Sets the value of the accountNumber property. * * @param value * allowed object is * {@link String } * */ public void setAccountNumber(String value) { this.accountNumber = value; } /** * Gets the value of the refundAmount property. * * @return * possible object is * {@link AmountType } * */ public AmountType getRefundAmount() { return refundAmount; } /** * Sets the value of the refundAmount property. * * @param value * allowed object is * {@link AmountType } * */ public void setRefundAmount(AmountType value) { this.refundAmount = value; } /** * Gets the value of the sellerExternalTransactionID property. * * @return * possible object is * {@link String } * */ public String getSellerExternalTransactionID() { return sellerExternalTransactionID; } /** * Sets the value of the sellerExternalTransactionID property. * * @param value * allowed object is * {@link String } * */ public void setSellerExternalTransactionID(String value) { this.sellerExternalTransactionID = value; } /** * Gets the value of the buyerExternalTransactionID property. * * @return * possible object is * {@link String } * */ public String getBuyerExternalTransactionID() { return buyerExternalTransactionID; } /** * Sets the value of the buyerExternalTransactionID property. * * @param value * allowed object is * {@link String } * */ public void setBuyerExternalTransactionID(String value) { this.buyerExternalTransactionID = value; } /** * * * @return * array of * {@link Element } * {@link Object } * */ public Object[] getAny() { if (this.any == null) { return new Object[ 0 ] ; } return ((Object[]) this.any.toArray(new Object[this.any.size()] )); } /** * * * @return * one of * {@link Element } * {@link Object } * */ public Object getAny(int idx) { if (this.any == null) { throw new IndexOutOfBoundsException(); } return this.any.get(idx); } public int getAnyLength() { if (this.any == null) { return 0; } return this.any.size(); } /** * * * @param values * allowed objects are * {@link Element } * {@link Object } * */ public void setAny(Object[] values) { this._getAny().clear(); int len = values.length; for (int i = 0; (i<len); i ++) { this.any.add(values[i]); } } protected List<Object> _getAny() { if (any == null) { any = new ArrayList<Object>(); } return any; } /** * * * @param value * allowed object is * {@link Element } * {@link Object } * */ public Object setAny(int idx, Object value) { return this.any.set(idx, value); } }
[ "lespaul36@gmail.com" ]
lespaul36@gmail.com
1713058c71c5f78e4d5eac4efd661b560834ab2b
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project2/src/main/java/org/gradle/test/performance2_4/Production2_315.java
913cf8b0f92c93f83765524f4508736efd5e0a2f
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
300
java
package org.gradle.test.performance2_4; public class Production2_315 extends org.gradle.test.performance1_4.Production1_315 { private final String property; public Production2_315() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
1c1cd05d210e889ec6fb1785bcf1fed1f6223c5f
afdee4355a5a884ca5c50f0ccc9fdeee25832c49
/src/java/time/temporal/ChronoUnit.java
31c030bac979c04cd715d7c811a2be7b10e793c7
[]
no_license
TheCodeYinChao/java-jdk
546b7afaec1f1761a1b4b3cf445493fe99d100d9
8908fd004c9273bd0293b7932b3a091e9a8e8fda
refs/heads/master
2021-07-23T15:34:56.731756
2021-03-31T11:43:37
2021-03-31T11:43:37
246,348,514
0
0
null
null
null
null
UTF-8
Java
false
false
10,393
java
/* * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ /* * Copyright (c) 2012, Stephen Colebourne & Michael Nascimento Santos * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * * Neither the name of JSR-310 nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package java.time.temporal; import java.time.Duration; /** * A standard set of date periods units. * <p> * This set of units provide unit-based access to manipulate a date, time or date-time. * The standard set of units can be extended by implementing {@link TemporalUnit}. * <p> * These units are intended to be applicable in multiple calendar systems. * For example, most non-ISO calendar systems define units of years, months and days, * just with slightly different rules. * The documentation of each unit explains how it operates. * * @implSpec * This is a final, immutable and threadpool-safe enum. * * @since 1.8 */ public enum ChronoUnit implements TemporalUnit { /** * Unit that represents the concept of a nanosecond, the smallest supported unit of time. * For the ISO calendar system, it is equal to the 1,000,000,000th part of the second unit. */ NANOS("Nanos", Duration.ofNanos(1)), /** * Unit that represents the concept of a microsecond. * For the ISO calendar system, it is equal to the 1,000,000th part of the second unit. */ MICROS("Micros", Duration.ofNanos(1000)), /** * Unit that represents the concept of a millisecond. * For the ISO calendar system, it is equal to the 1000th part of the second unit. */ MILLIS("Millis", Duration.ofNanos(1000_000)), /** * Unit that represents the concept of a second. * For the ISO calendar system, it is equal to the second in the SI system * of units, except around a leap-second. */ SECONDS("Seconds", Duration.ofSeconds(1)), /** * Unit that represents the concept of a minute. * For the ISO calendar system, it is equal to 60 seconds. */ MINUTES("Minutes", Duration.ofSeconds(60)), /** * Unit that represents the concept of an hour. * For the ISO calendar system, it is equal to 60 minutes. */ HOURS("Hours", Duration.ofSeconds(3600)), /** * Unit that represents the concept of half a day, as used in AM/PM. * For the ISO calendar system, it is equal to 12 hours. */ HALF_DAYS("HalfDays", Duration.ofSeconds(43200)), /** * Unit that represents the concept of a day. * For the ISO calendar system, it is the standard day from midnight to midnight. * The estimated duration of a day is {@code 24 Hours}. * <p> * When used with other calendar systems it must correspond to the day defined by * the rising and setting of the Sun on Earth. It is not required that days begin * at midnight - when converting between calendar systems, the date should be * equivalent at midday. */ DAYS("Days", Duration.ofSeconds(86400)), /** * Unit that represents the concept of a week. * For the ISO calendar system, it is equal to 7 days. * <p> * When used with other calendar systems it must correspond to an integral number of days. */ WEEKS("Weeks", Duration.ofSeconds(7 * 86400L)), /** * Unit that represents the concept of a month. * For the ISO calendar system, the length of the month varies by month-of-year. * The estimated duration of a month is one twelfth of {@code 365.2425 Days}. * <p> * When used with other calendar systems it must correspond to an integral number of days. */ MONTHS("Months", Duration.ofSeconds(31556952L / 12)), /** * Unit that represents the concept of a year. * For the ISO calendar system, it is equal to 12 months. * The estimated duration of a year is {@code 365.2425 Days}. * <p> * When used with other calendar systems it must correspond to an integral number of days * or months roughly equal to a year defined by the passage of the Earth around the Sun. */ YEARS("Years", Duration.ofSeconds(31556952L)), /** * Unit that represents the concept of a decade. * For the ISO calendar system, it is equal to 10 years. * <p> * When used with other calendar systems it must correspond to an integral number of days * and is normally an integral number of years. */ DECADES("Decades", Duration.ofSeconds(31556952L * 10L)), /** * Unit that represents the concept of a century. * For the ISO calendar system, it is equal to 100 years. * <p> * When used with other calendar systems it must correspond to an integral number of days * and is normally an integral number of years. */ CENTURIES("Centuries", Duration.ofSeconds(31556952L * 100L)), /** * Unit that represents the concept of a millennium. * For the ISO calendar system, it is equal to 1000 years. * <p> * When used with other calendar systems it must correspond to an integral number of days * and is normally an integral number of years. */ MILLENNIA("Millennia", Duration.ofSeconds(31556952L * 1000L)), /** * Unit that represents the concept of an era. * The ISO calendar system doesn't have eras thus it is impossible to add * an era to a date or date-time. * The estimated duration of the era is artificially defined as {@code 1,000,000,000 Years}. * <p> * When used with other calendar systems there are no restrictions on the unit. */ ERAS("Eras", Duration.ofSeconds(31556952L * 1000_000_000L)), /** * Artificial unit that represents the concept of forever. * This is primarily used with {@link TemporalField} to represent unbounded fields * such as the year or era. * The estimated duration of the era is artificially defined as the largest duration * supported by {@code Duration}. */ FOREVER("Forever", Duration.ofSeconds(Long.MAX_VALUE, 999_999_999)); private final String name; private final Duration duration; private ChronoUnit(String name, Duration estimatedDuration) { this.name = name; this.duration = estimatedDuration; } //----------------------------------------------------------------------- /** * Gets the estimated duration of this unit in the ISO calendar system. * <p> * All of the units in this class have an estimated duration. * Days vary due to daylight saving time, while months have different lengths. * * @return the estimated duration of this unit, not null */ @Override public Duration getDuration() { return duration; } /** * Checks if the duration of the unit is an estimate. * <p> * All time units in this class are considered to be accurate, while all date * units in this class are considered to be estimated. * <p> * This definition ignores leap seconds, but considers that Days vary due to * daylight saving time and months have different lengths. * * @return true if the duration is estimated, false if accurate */ @Override public boolean isDurationEstimated() { return this.compareTo(DAYS) >= 0; } //----------------------------------------------------------------------- /** * Checks if this unit is a date unit. * <p> * All units from days to eras inclusive are date-based. * Time-based units and {@code FOREVER} return false. * * @return true if a date unit, false if a time unit */ @Override public boolean isDateBased() { return this.compareTo(DAYS) >= 0 && this != FOREVER; } /** * Checks if this unit is a time unit. * <p> * All units from nanos to half-days inclusive are time-based. * Date-based units and {@code FOREVER} return false. * * @return true if a time unit, false if a date unit */ @Override public boolean isTimeBased() { return this.compareTo(DAYS) < 0; } //----------------------------------------------------------------------- @Override public boolean isSupportedBy(Temporal temporal) { return temporal.isSupported(this); } @SuppressWarnings("unchecked") @Override public <R extends Temporal> R addTo(R temporal, long amount) { return (R) temporal.plus(amount, this); } //----------------------------------------------------------------------- @Override public long between(Temporal temporal1Inclusive, Temporal temporal2Exclusive) { return temporal1Inclusive.until(temporal2Exclusive, this); } //----------------------------------------------------------------------- @Override public String toString() { return name; } }
[ "292306404@qq.com" ]
292306404@qq.com
6ed62231f7fac86aa1d75eee37e8f4dfc089f865
18a0ec2e1d773787b26cd3f7005626b82ce22307
/util/SuSi2Joana/src/edu/kit/joana/SuSi2Joana/LatticeBuilder.java
1815cc0ffd0ffd602b65bad94324e1d28ef0d473
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
joana-team/joana
97eac211aa4e22f63dd0a638601bae1bb3ce3a91
d49d82b5892f9331d37432d02d090f28feab56ea
refs/heads/master
2022-01-20T03:44:17.606135
2021-12-13T14:19:22
2021-12-13T14:19:22
6,942,297
69
29
null
2021-08-23T11:55:28
2012-11-30T16:47:16
Java
UTF-8
Java
false
false
1,933
java
package edu.kit.joana.SuSi2Joana; import edu.kit.joana.ifc.sdg.lattice.impl.EditableLatticeSimple; import java.util.List; import java.util.Set; import java.util.HashSet; import com.ibm.wala.util.MonitorUtil.IProgressMonitor; import com.ibm.wala.util.NullProgressMonitor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.io.PrintStream; import java.io.File; public class LatticeBuilder implements ILatticeBuilder { private static final Logger logger = LoggerFactory.getLogger(LatticeBuilder.class); private final Set<String> entries = new HashSet<String>(); private final EditableLatticeSimple<String> lattice; public LatticeBuilder() { this.lattice = new EditableLatticeSimple<String>(); this.lattice.addElement("secure"); this.lattice.addElement("insecure"); } public void extract(List<? extends SuSiFile.Entry> in) { for (final SuSiFile.Entry e : in) { if (this.entries.add(e.cathegory)) { this.lattice.addElement(e.cathegory); this.lattice.setImmediatelyGreater(e.cathegory, "secure"); this.lattice.setImmediatelyLower(e.cathegory, "insecure"); logger.debug("Added " + e.cathegory); } } } public String getSource(String cat) { return cat; } public String getSink(String cat) { return cat; } public void write(final File out) throws IOException { final PrintStream ps = new PrintStream(out); this.writeLower(ps, this.lattice.getTop()); logger.info("Written Lattice to " + out.getName()); ps.close(); } private void writeLower(final PrintStream out, String elem) { for (String lower : this.lattice.getImmediatelyLower(elem)) { out.println(lower + "<=" + elem); this.writeLower(out, lower); } } }
[ "juergen.graf@gmail.com" ]
juergen.graf@gmail.com
6ab8a2316fd67e9bd4f5177224a0e473e003e124
00b1366cd4d3296fc0d918c68ba35635708ccc30
/src/main/java/dulich/com/entity/Booking.java
0e77eb3a63e3a42c5cde0eb2b2394964188c3775
[]
no_license
Thathien/DuLich_Ver1.0
6894c93b2cefb5a5eee0049dcf249e7c775b3fd9
c8e76e327e4268ee046815cad3b062fe29519a34
refs/heads/main
2023-06-24T00:19:51.564358
2021-07-29T13:35:22
2021-07-29T13:35:22
365,265,014
0
0
null
null
null
null
UTF-8
Java
false
false
2,555
java
package dulich.com.entity; import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.validation.constraints.Min; import org.hibernate.annotations.CreationTimestamp; import org.hibernate.annotations.UpdateTimestamp; import com.fasterxml.jackson.annotation.JsonManagedReference; @Entity public class Booking implements Serializable{ /** * */ private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "BookingId") private Long bookingId; @Column(name = "DateStart", columnDefinition = "datetime") @Temporal(TemporalType.TIMESTAMP) private Date dateStart; @Column(name = "DateEnd", columnDefinition = "datetime") @Temporal(TemporalType.TIMESTAMP) private Date dateEnd; @Min(value = 1) @Column(name = "NumberAdults") private int numberAdults; @Min(value = 0) @Column(name = "NumberChildren") private int numberChildren; @Min(value = 0) @Column(name = "NumberInfant") private int numberInfant; @Column(name = "CustomerName", columnDefinition = "nvarchar(40)") private String customerName; @Column(name = "Country", columnDefinition = "nvarchar(40)") private String country; @Column(name = "IsBookForAnother", columnDefinition = "bit") private boolean isBookForAnother; @Column(name = "CustomerEmail", columnDefinition = "nvarchar(40)") private String customerEmail; @Column(name = "CustomerPerpose", columnDefinition = "nvarchar(40)") private String customerPerpose; @Column(name = "SalesCode", columnDefinition = "nvarchar(40)") private String salesCode; @Column(name = "BookingStatus", columnDefinition = "nvarchar(40)") public String bookingStatus; @Column(name = "PaymentStatus", columnDefinition = "nvarchar(40)") public String paymentStatus; @Temporal(TemporalType.TIMESTAMP) @CreationTimestamp @Column(name = "CreateDate") private Date createDate; @Temporal(TemporalType.TIMESTAMP) @UpdateTimestamp @Column(name = "UpdateDate") private Date updateDate; @JsonManagedReference @ManyToOne @JoinColumn(name = "HomeStayID", referencedColumnName = "HomeStayID") private Homestay homestay; }
[ "domino31298@gmail.com" ]
domino31298@gmail.com
72e7426dc6022aeeb19eaefc36c9ba5213f72f7d
5ed84dc14cd18dda4333e7778de1f6d7569c4d1f
/HMI/src/view/settings/EnumSettingButtonEditor.java
266daf9de67d22ea65ecd105b17fbd5c51c80bef
[]
no_license
MathiasBsrt/robot-mapper-lazarus
b3f898341c46bea79e8af857399492bd28f480eb
38095609feb5a07ca7c7cc4dad74258fcf11214f
refs/heads/main
2023-06-03T01:16:09.551352
2021-06-22T19:39:42
2021-06-22T19:39:42
373,106,426
0
0
null
null
null
null
UTF-8
Java
false
false
387
java
package view.settings; public class EnumSettingButtonEditor extends SettingButtonEditor { public EnumSettingButtonEditor(String label) { super(label); } @Override public void onClick() { } @Override public void onButtonPressed() { super.setLabel("..."); } @Override public void drawAfterAClick() { } @Override public void drawAfterButtonPressed() { } }
[ "mathias.bossaerts9581@gmail.com" ]
mathias.bossaerts9581@gmail.com
5e5d984e98166ad178a7aaeb95ee61b63d70d389
5d69894d3634a41f63c36c7b746001460d20077b
/src/main/java/org/ms/mecanica/service/CarService.java
477f691f93d0c0789ff058ac484c952fce0a0d5b
[]
no_license
thedoctor0612/mecanica
18b9c10de2f9b11ea7f5234df88f927739eca572
f473da3245e043d960f3ef36872902b829b7318f
refs/heads/master
2021-06-27T01:15:52.371736
2018-05-08T14:49:28
2018-05-08T14:49:28
132,904,594
2
1
null
2020-09-18T13:45:59
2018-05-10T13:31:24
CSS
UTF-8
Java
false
false
1,780
java
package org.ms.mecanica.service; import org.ms.mecanica.domain.Car; import org.ms.mecanica.repository.CarRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; /** * Service Implementation for managing Car. */ @Service @Transactional public class CarService { private final Logger log = LoggerFactory.getLogger(CarService.class); private final CarRepository carRepository; public CarService(CarRepository carRepository) { this.carRepository = carRepository; } /** * Save a car. * * @param car the entity to save * @return the persisted entity */ public Car save(Car car) { log.debug("Request to save Car : {}", car); return carRepository.save(car); } /** * Get all the cars. * * @param pageable the pagination information * @return the list of entities */ @Transactional(readOnly = true) public Page<Car> findAll(Pageable pageable) { log.debug("Request to get all Cars"); return carRepository.findAll(pageable); } /** * Get one car by id. * * @param id the id of the entity * @return the entity */ @Transactional(readOnly = true) public Car findOne(Long id) { log.debug("Request to get Car : {}", id); return carRepository.findOne(id); } /** * Delete the car by id. * * @param id the id of the entity */ public void delete(Long id) { log.debug("Request to delete Car : {}", id); carRepository.delete(id); } }
[ "meher.sayhi@ett.tn" ]
meher.sayhi@ett.tn
461252061878d02d505ccbe64403847b0388e723
4d97a8ec832633b154a03049d17f8b58233cbc5d
/Lang/21/Lang/evosuite-branch/9/org/apache/commons/lang3/time/DateUtilsEvoSuite_branch_Test.java
a99c05a055571b3bd4a4434055a039772ccc80c4
[]
no_license
4open-science/evosuite-defects4j
be2d172a5ce11e0de5f1272a8d00d2e1a2e5f756
ca7d316883a38177c9066e0290e6dcaa8b5ebd77
refs/heads/master
2021-06-16T18:43:29.227993
2017-06-07T10:37:26
2017-06-07T10:37:26
93,623,570
2
1
null
null
null
null
UTF-8
Java
false
false
180,872
java
/* * This file was automatically generated by EvoSuite * Thu Dec 11 17:13:18 GMT 2014 */ package org.apache.commons.lang3.time; import static org.junit.Assert.*; import org.junit.Test; import java.text.ParseException; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.Iterator; import java.util.Locale; import java.util.NoSuchElementException; import java.util.TimeZone; import org.apache.commons.lang3.time.DateUtils; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.EvoSuiteFile; import org.evosuite.runtime.System; import org.evosuite.runtime.mock.java.lang.MockArithmeticException; import org.evosuite.runtime.mock.java.lang.MockIllegalArgumentException; import org.evosuite.runtime.mock.java.util.MockDate; import org.evosuite.runtime.mock.java.util.MockGregorianCalendar; import org.junit.runner.RunWith; import sun.util.calendar.ZoneInfo; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, resetStaticState = true) public class DateUtilsEvoSuite_branch_Test extends DateUtilsEvoSuite_branch_Test_scaffolding { @Test public void test00() throws Throwable { Locale locale0 = Locale.GERMAN; assertEquals("de", locale0.toString()); assertEquals("deu", locale0.getISO3Language()); assertEquals("", locale0.getCountry()); assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getVariant()); assertEquals("", locale0.getISO3Country()); assertNotNull(locale0); MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(locale0); assertEquals("de", locale0.toString()); assertEquals("deu", locale0.getISO3Language()); assertEquals("", locale0.getCountry()); assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getVariant()); assertEquals("", locale0.getISO3Country()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); assertNotNull(mockGregorianCalendar0); DateUtils.DateIterator dateUtils_DateIterator0 = new DateUtils.DateIterator(mockGregorianCalendar0, mockGregorianCalendar0); assertEquals("de", locale0.toString()); assertEquals("deu", locale0.getISO3Language()); assertEquals("", locale0.getCountry()); assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getVariant()); assertEquals("", locale0.getISO3Country()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392322881320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=13,DAY_OF_YEAR=44,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); assertNotNull(dateUtils_DateIterator0); // Undeclared exception! try { Calendar calendar0 = dateUtils_DateIterator0.next(); fail("Expecting exception: NoSuchElementException"); } catch(NoSuchElementException e) { // // no message in exception (getMessage() returned null) // } } @Test public void test01() {} // @Test // public void test01() throws Throwable { // int int0 = 1001; // Locale locale0 = Locale.GERMAN; // assertEquals("", locale0.getCountry()); // assertEquals("deu", locale0.getISO3Language()); // assertEquals("", locale0.getISO3Country()); // assertEquals("de", locale0.toString()); // assertEquals("de", locale0.getLanguage()); // assertEquals("", locale0.getVariant()); // assertNotNull(locale0); // // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(locale0); // assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals("", locale0.getCountry()); // assertEquals("deu", locale0.getISO3Language()); // assertEquals("", locale0.getISO3Country()); // assertEquals("de", locale0.toString()); // assertEquals("de", locale0.getLanguage()); // assertEquals("", locale0.getVariant()); // assertNotNull(mockGregorianCalendar0); // // MockGregorianCalendar mockGregorianCalendar1 = new MockGregorianCalendar(int0, int0, int0, int0, int0); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1001,MONTH=1001,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1001,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1001,HOUR_OF_DAY=1001,MINUTE=1001,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertNotNull(mockGregorianCalendar1); // // DateUtils.DateIterator dateUtils_DateIterator0 = new DateUtils.DateIterator(mockGregorianCalendar1, mockGregorianCalendar0); // assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals("", locale0.getCountry()); // assertEquals("deu", locale0.getISO3Language()); // assertEquals("", locale0.getISO3Country()); // assertEquals("de", locale0.toString()); // assertEquals("de", locale0.getLanguage()); // assertEquals("", locale0.getVariant()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-27855843540000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1087,MONTH=3,WEEK_OF_YEAR=15,WEEK_OF_MONTH=2,DAY_OF_MONTH=8,DAY_OF_YEAR=98,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=2,AM_PM=0,HOUR=9,HOUR_OF_DAY=9,MINUTE=41,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertNotNull(dateUtils_DateIterator0); // // MockGregorianCalendar mockGregorianCalendar2 = (MockGregorianCalendar)dateUtils_DateIterator0.next(); // assertEquals(1, mockGregorianCalendar2.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar2.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-27855757140000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1087,MONTH=3,WEEK_OF_YEAR=15,WEEK_OF_MONTH=2,DAY_OF_MONTH=9,DAY_OF_YEAR=99,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=0,HOUR=9,HOUR_OF_DAY=9,MINUTE=41,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar2.toString()); // assertEquals(true, mockGregorianCalendar2.isLenient()); // assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals("", locale0.getCountry()); // assertEquals("deu", locale0.getISO3Language()); // assertEquals("", locale0.getISO3Country()); // assertEquals("de", locale0.toString()); // assertEquals("de", locale0.getLanguage()); // assertEquals("", locale0.getVariant()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-27855757140000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1087,MONTH=3,WEEK_OF_YEAR=15,WEEK_OF_MONTH=2,DAY_OF_MONTH=9,DAY_OF_YEAR=99,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=0,HOUR=9,HOUR_OF_DAY=9,MINUTE=41,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertNotSame(mockGregorianCalendar2, mockGregorianCalendar1); // assertNotSame(mockGregorianCalendar2, mockGregorianCalendar0); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar2); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar2); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertTrue(mockGregorianCalendar2.equals((Object)mockGregorianCalendar1)); // assertFalse(mockGregorianCalendar2.equals((Object)mockGregorianCalendar0)); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar2)); // assertTrue(mockGregorianCalendar1.equals((Object)mockGregorianCalendar2)); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertNotNull(mockGregorianCalendar2); // } @Test public void test02() throws Throwable { MockDate mockDate0 = new MockDate(); assertEquals("Fri Feb 14 20:21:21 GMT 2014", mockDate0.toString()); assertNotNull(mockDate0); int int0 = 0; boolean boolean0 = DateUtils.truncatedEquals((Date) mockDate0, (Date) mockDate0, int0); assertEquals("Fri Feb 14 20:21:21 GMT 2014", mockDate0.toString()); assertTrue(boolean0); } @Test public void test03() {} // @Test // public void test03() throws Throwable { // int int0 = 0; // MockDate mockDate0 = new MockDate(int0, int0, int0, int0, int0, int0); // assertEquals("Sun Dec 31 00:00:00 GMT 1899", mockDate0.toString()); // assertNotNull(mockDate0); // // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0, int0); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=0,MONTH=0,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=0,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotNull(mockGregorianCalendar0); // // Date date0 = mockGregorianCalendar0.getTime(); // assertEquals("Wed Dec 31 00:00:00 GMT 2", date0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62167478400000,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=0,YEAR=2,MONTH=11,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=31,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotNull(date0); // // boolean boolean0 = DateUtils.truncatedEquals((Date) mockDate0, date0, int0); // assertEquals("Wed Dec 31 00:00:00 GMT 2", date0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62167478400000,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=0,YEAR=2,MONTH=11,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=31,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("Sun Dec 31 00:00:00 GMT 1899", mockDate0.toString()); // assertFalse(boolean0); // } @Test public void test04() {} // @Test // public void test04() throws Throwable { // int int0 = 9; // int int1 = 1; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int1); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=9,MONTH=9,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=9,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=9,HOUR_OF_DAY=9,MINUTE=1,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertFalse(int1 == int0); // assertFalse(int0 == int1); // assertNotNull(mockGregorianCalendar0); // // MockGregorianCalendar mockGregorianCalendar1 = new MockGregorianCalendar(int1, int0, int0); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=9,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=9,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar1.toString()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertFalse(int1 == int0); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(int0 == int1); // assertNotNull(mockGregorianCalendar1); // // boolean boolean0 = DateUtils.truncatedEquals((Calendar) mockGregorianCalendar0, (Calendar) mockGregorianCalendar1, int0); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=9,MONTH=9,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=9,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=9,HOUR_OF_DAY=9,MINUTE=1,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=9,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=9,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar1.toString()); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertFalse(boolean0); // assertFalse(int1 == int0); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(int0 == int1); // } @Test public void test05() {} // @Test // public void test05() throws Throwable { // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // int int0 = 14; // long long0 = DateUtils.getFragmentInHours((Calendar) mockGregorianCalendar0, int0); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(0L, long0); // } @Test public void test06() throws Throwable { long long0 = (-1335L); MockDate mockDate0 = new MockDate(long0); assertEquals("Wed Dec 31 23:59:58 GMT 1969", mockDate0.toString()); assertNotNull(mockDate0); int int0 = 13; long long1 = DateUtils.getFragmentInMinutes((Date) mockDate0, int0); assertEquals("Wed Dec 31 23:59:58 GMT 1969", mockDate0.toString()); assertEquals(0L, long1); assertFalse(long1 == long0); assertFalse(long0 == long1); } @Test public void test07() throws Throwable { Locale locale0 = Locale.GERMAN; assertEquals("", locale0.getISO3Country()); assertEquals("", locale0.getVariant()); assertEquals("de", locale0.toString()); assertEquals("de", locale0.getLanguage()); assertEquals("deu", locale0.getISO3Language()); assertEquals("", locale0.getCountry()); assertNotNull(locale0); MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(locale0); assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals("", locale0.getISO3Country()); assertEquals("", locale0.getVariant()); assertEquals("de", locale0.toString()); assertEquals("de", locale0.getLanguage()); assertEquals("deu", locale0.getISO3Language()); assertEquals("", locale0.getCountry()); assertNotNull(mockGregorianCalendar0); int int0 = 12; long long0 = DateUtils.getFragmentInMinutes((Calendar) mockGregorianCalendar0, int0); assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals("", locale0.getISO3Country()); assertEquals("", locale0.getVariant()); assertEquals("de", locale0.toString()); assertEquals("de", locale0.getLanguage()); assertEquals("deu", locale0.getISO3Language()); assertEquals("", locale0.getCountry()); assertEquals(0L, long0); } @Test public void test08() {} // @Test // public void test08() throws Throwable { // int int0 = 0; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=0,MONTH=0,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=0,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // int int1 = 11; // long long0 = DateUtils.getFragmentInSeconds((Calendar) mockGregorianCalendar0, int1); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62167478400000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=0,YEAR=2,MONTH=11,WEEK_OF_YEAR=1,WEEK_OF_MONTH=5,DAY_OF_MONTH=31,DAY_OF_YEAR=365,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=5,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(0L, long0); // assertFalse(int1 == int0); // assertFalse(int0 == int1); // } @Test public void test09() throws Throwable { String string0 = ""; String[] stringArray0 = new String[8]; stringArray0[0] = string0; assertNotNull(stringArray0[0]); Date date0 = DateUtils.parseDate(string0, stringArray0); assertEquals("Thu Jan 01 00:00:00 GMT 1970", date0.toString()); assertNotNull(date0); int int0 = 10; // Undeclared exception! try { long long0 = DateUtils.getFragmentInMilliseconds(date0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The fragment 10 is not supported // } } @Test public void test10() throws Throwable { int int0 = 8; Locale locale0 = Locale.JAPAN; assertEquals("jpn", locale0.getISO3Language()); assertEquals("JPN", locale0.getISO3Country()); assertEquals("", locale0.getVariant()); assertEquals("ja_JP", locale0.toString()); assertEquals("JP", locale0.getCountry()); assertEquals("ja", locale0.getLanguage()); assertNotNull(locale0); MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(locale0); assertEquals("jpn", locale0.getISO3Language()); assertEquals("JPN", locale0.getISO3Country()); assertEquals("", locale0.getVariant()); assertEquals("ja_JP", locale0.toString()); assertEquals("JP", locale0.getCountry()); assertEquals("ja", locale0.getLanguage()); assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertNotNull(mockGregorianCalendar0); // Undeclared exception! try { long long0 = DateUtils.getFragmentInSeconds((Calendar) mockGregorianCalendar0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The fragment 8 is not supported // } } @Test public void test11() throws Throwable { int int0 = (-3703); MockDate mockDate0 = new MockDate(int0, int0, int0); assertEquals("Sun Apr 11 00:00:00 GMT 2123", mockDate0.toString()); assertNotNull(mockDate0); int int1 = 7; // Undeclared exception! try { long long0 = DateUtils.getFragmentInSeconds((Date) mockDate0, int1); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The fragment 7 is not supported // } } @Test public void test12() throws Throwable { int int0 = 2; int int1 = 6; MockDate mockDate0 = new MockDate(int0, int0, int0, int1, int1); assertEquals("Sun Mar 02 06:06:00 GMT 1902", mockDate0.toString()); assertFalse(int0 == int1); assertFalse(int1 == int0); assertNotNull(mockDate0); long long0 = DateUtils.getFragmentInMilliseconds((Date) mockDate0, int1); assertEquals("Sun Mar 02 06:06:00 GMT 1902", mockDate0.toString()); assertEquals(21960000L, long0); assertFalse(int0 == int1); assertFalse(int1 == int0); } @Test public void test13() {} // @Test // public void test13() throws Throwable { // int int0 = 0; // int int1 = 2091; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int1, int0, int1, int0); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=0,MONTH=0,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=2091,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=2091,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertFalse(int1 == int0); // assertFalse(int0 == int1); // assertNotNull(mockGregorianCalendar0); // // int int2 = mockGregorianCalendar0.getWeekYear(); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-61986690540000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=5,MONTH=8,WEEK_OF_YEAR=39,WEEK_OF_MONTH=4,DAY_OF_MONTH=22,DAY_OF_YEAR=265,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=10,HOUR_OF_DAY=10,MINUTE=51,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(5, int2); // assertFalse(int2 == int1); // assertFalse(int2 == int0); // assertFalse(int1 == int0); // assertFalse(int1 == int2); // assertFalse(int0 == int2); // assertFalse(int0 == int1); // // Date date0 = DateUtils.truncate((Object) mockGregorianCalendar0, int0); // assertEquals("Sat Jan 01 00:00:00 GMT 1", date0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-61986690540000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=5,MONTH=8,WEEK_OF_YEAR=39,WEEK_OF_MONTH=4,DAY_OF_MONTH=22,DAY_OF_YEAR=265,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=10,HOUR_OF_DAY=10,MINUTE=51,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertFalse(int1 == int0); // assertFalse(int1 == int2); // assertFalse(int0 == int2); // assertFalse(int0 == int1); // assertNotNull(date0); // // long long0 = DateUtils.getFragmentInDays(date0, int2); // assertEquals("Sat Jan 01 00:00:00 GMT 1", date0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-61986690540000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=5,MONTH=8,WEEK_OF_YEAR=39,WEEK_OF_MONTH=4,DAY_OF_MONTH=22,DAY_OF_YEAR=265,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=10,HOUR_OF_DAY=10,MINUTE=51,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(0L, long0); // assertFalse(int2 == int1); // assertFalse(int2 == int0); // assertFalse(int1 == int0); // assertFalse(int1 == int2); // assertFalse(int0 == int2); // assertFalse(int0 == int1); // } @Test public void test14() throws Throwable { int int0 = 3109; int int1 = 3; MockDate mockDate0 = new MockDate(int0, int0, int0, int1, int0, int0); assertEquals("Fri Aug 07 07:40:49 GMT 5276", mockDate0.toString()); assertFalse(int0 == int1); assertFalse(int1 == int0); assertNotNull(mockDate0); // Undeclared exception! try { long long0 = DateUtils.getFragmentInMilliseconds((Date) mockDate0, int1); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The fragment 3 is not supported // } } @Test public void test15() {} // @Test // public void test15() throws Throwable { // int int0 = 1; // int int1 = 2; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int1); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=2,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertFalse(int0 == int1); // assertFalse(int1 == int0); // assertNotNull(mockGregorianCalendar0); // // long long0 = DateUtils.getFragmentInMilliseconds((Calendar) mockGregorianCalendar0, int1); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62133087480000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1,MONTH=1,WEEK_OF_YEAR=6,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=32,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=2,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(90120000L, long0); // assertFalse(int0 == int1); // assertFalse(int1 == int0); // } @Test public void test16() throws Throwable { int int0 = 9; Object object0 = new Object(); assertNotNull(object0); // Undeclared exception! try { Iterator<?> iterator0 = DateUtils.iterator(object0, int0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // Could not iterate based on java.lang.Object@52440a49 // } } @Test public void test17() throws Throwable { int int0 = 1960; MockDate mockDate0 = new MockDate(int0, int0, int0, int0, int0, int0); assertEquals("Sat Dec 02 01:12:40 GMT 4028", mockDate0.toString()); assertNotNull(mockDate0); // Undeclared exception! try { Iterator<?> iterator0 = DateUtils.iterator((Object) mockDate0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The range style 1960 is not valid. // } } @Test public void test18() throws Throwable { Calendar calendar0 = null; int int0 = 1506; // Undeclared exception! try { Iterator<?> iterator0 = DateUtils.iterator((Object) calendar0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test19() {} // @Test // public void test19() throws Throwable { // int int0 = 3109; // int int1 = (-699); // int int2 = (-2531); // int int3 = 3; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int1, int2, int0, int0, int3); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=-699,MONTH=-2531,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=3109,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=3109,HOUR_OF_DAY=3109,MINUTE=3,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertFalse(int3 == int0); // assertFalse(int3 == int1); // assertFalse(int3 == int2); // assertFalse(int2 == int3); // assertFalse(int2 == int0); // assertFalse(int2 == int1); // assertFalse(int1 == int2); // assertFalse(int1 == int3); // assertFalse(int1 == int0); // assertFalse(int0 == int3); // assertFalse(int0 == int1); // assertFalse(int0 == int2); // assertNotNull(mockGregorianCalendar0); // // Iterator<Calendar> iterator0 = DateUtils.iterator((Calendar) mockGregorianCalendar0, int3); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-90602362620000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=0,YEAR=903,MONTH=11,WEEK_OF_YEAR=51,WEEK_OF_MONTH=3,DAY_OF_MONTH=13,DAY_OF_YEAR=347,DAY_OF_WEEK=1,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=1,HOUR_OF_DAY=13,MINUTE=3,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertFalse(int3 == int0); // assertFalse(int3 == int1); // assertFalse(int3 == int2); // assertFalse(int2 == int3); // assertFalse(int2 == int0); // assertFalse(int2 == int1); // assertFalse(int1 == int2); // assertFalse(int1 == int3); // assertFalse(int1 == int0); // assertFalse(int0 == int3); // assertFalse(int0 == int1); // assertFalse(int0 == int2); // assertNotNull(iterator0); // } @Test public void test20() throws Throwable { Locale locale0 = Locale.GERMAN; assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getCountry()); assertEquals("", locale0.getVariant()); assertEquals("de", locale0.toString()); assertEquals("deu", locale0.getISO3Language()); assertEquals("", locale0.getISO3Country()); assertNotNull(locale0); MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(locale0); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getCountry()); assertEquals("", locale0.getVariant()); assertEquals("de", locale0.toString()); assertEquals("deu", locale0.getISO3Language()); assertEquals("", locale0.getISO3Country()); assertNotNull(mockGregorianCalendar0); int int0 = 6; Iterator<Calendar> iterator0 = DateUtils.iterator((Calendar) mockGregorianCalendar0, int0); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getCountry()); assertEquals("", locale0.getVariant()); assertEquals("de", locale0.toString()); assertEquals("deu", locale0.getISO3Language()); assertEquals("", locale0.getISO3Country()); assertNotNull(iterator0); } @Test public void test21() {} // @Test // public void test21() throws Throwable { // int int0 = 3109; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=3109,MONTH=3109,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=3109,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=3109,HOUR_OF_DAY=3109,MINUTE=3109,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertNotNull(mockGregorianCalendar0); // // Date date0 = mockGregorianCalendar0.getGregorianChange(); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=3109,MONTH=3109,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=3109,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=3109,HOUR_OF_DAY=3109,MINUTE=3109,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("Fri Oct 15 00:00:00 GMT 1582", date0.toString()); // assertNotNull(date0); // // int int1 = 5; // Iterator<Calendar> iterator0 = DateUtils.iterator(date0, int1); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=3109,MONTH=3109,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=3109,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=3109,HOUR_OF_DAY=3109,MINUTE=3109,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("Fri Oct 15 00:00:00 GMT 1582", date0.toString()); // assertFalse(int1 == int0); // assertFalse(int0 == int1); // assertNotNull(iterator0); // } @Test public void test22() {} // @Test // public void test22() throws Throwable { // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertNotNull(mockGregorianCalendar0); // // int int0 = 4; // Iterator<Calendar> iterator0 = DateUtils.iterator((Calendar) mockGregorianCalendar0, int0); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertNotNull(iterator0); // } @Test public void test23() {} // @Test // public void test23() throws Throwable { // int int0 = 1; // int int1 = 2; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int1); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=2,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertFalse(int1 == int0); // assertFalse(int0 == int1); // assertNotNull(mockGregorianCalendar0); // // Iterator<?> iterator0 = DateUtils.iterator((Object) mockGregorianCalendar0, int1); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=2,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertFalse(int1 == int0); // assertFalse(int0 == int1); // assertNotNull(iterator0); // } @Test public void test24() {} // @Test // public void test24() throws Throwable { // int int0 = 719; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=719,MONTH=719,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=719,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=719,HOUR_OF_DAY=719,MINUTE=719,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertNotNull(mockGregorianCalendar0); // // int int1 = mockGregorianCalendar0.getMinimalDaysInFirstWeek(); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=719,MONTH=719,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=719,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=719,HOUR_OF_DAY=719,MINUTE=719,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, int1); // assertFalse(int1 == int0); // assertFalse(int0 == int1); // // Iterator<Calendar> iterator0 = DateUtils.iterator((Calendar) mockGregorianCalendar0, int1); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=719,MONTH=719,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=719,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=719,HOUR_OF_DAY=719,MINUTE=719,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertFalse(int1 == int0); // assertFalse(int0 == int1); // assertNotNull(iterator0); // } @Test public void test25() throws Throwable { int int0 = 8; Calendar calendar0 = null; // Undeclared exception! try { Iterator<Calendar> iterator0 = DateUtils.iterator(calendar0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test26() throws Throwable { int int0 = (-713); Date date0 = null; // Undeclared exception! try { Iterator<Calendar> iterator0 = DateUtils.iterator(date0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test27() {} // @Test // public void test27() throws Throwable { // int int0 = 0; // int int1 = 2039; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int1, int0, int1, int0); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=0,MONTH=0,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=2039,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=2039,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertFalse(int0 == int1); // assertFalse(int1 == int0); // assertNotNull(mockGregorianCalendar0); // // int int2 = 1001; // Date date0 = DateUtils.truncate((Object) mockGregorianCalendar0, int2); // assertEquals("Sat Aug 01 00:00:00 GMT 5", date0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=0,MONTH=0,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=2039,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=2039,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertFalse(int2 == int1); // assertFalse(int2 == int0); // assertFalse(int0 == int2); // assertFalse(int0 == int1); // assertFalse(int1 == int0); // assertFalse(int1 == int2); // assertNotNull(date0); // } @Test public void test28() {} // @Test // public void test28() throws Throwable { // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // int int0 = 9; // MockGregorianCalendar mockGregorianCalendar1 = (MockGregorianCalendar)DateUtils.ceiling((Calendar) mockGregorianCalendar0, int0); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392422400000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=15,DAY_OF_YEAR=46,DAY_OF_WEEK=7,DAY_OF_WEEK_IN_MONTH=3,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertNotNull(mockGregorianCalendar1); // } @Test public void test29() {} // @Test // public void test29() throws Throwable { // int int0 = 1001; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1001,MONTH=1001,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1001,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // MockGregorianCalendar mockGregorianCalendar1 = (MockGregorianCalendar)DateUtils.ceiling((Calendar) mockGregorianCalendar0, int0); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1087,MONTH=2,WEEK_OF_YEAR=6,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=32,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1001,MONTH=1001,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1001,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertNotNull(mockGregorianCalendar1); // } @Test public void test30() {} // @Test // public void test30() throws Throwable { // int int0 = 1; // int int1 = (-3255); // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int1, int0); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=-3255,SECOND=1,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertFalse(int0 == int1); // assertFalse(int1 == int0); // assertNotNull(mockGregorianCalendar0); // // MockGregorianCalendar mockGregorianCalendar1 = (MockGregorianCalendar)DateUtils.round((Calendar) mockGregorianCalendar0, int0); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62135769600000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1,MONTH=0,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=7,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=-3255,SECOND=1,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertFalse(int0 == int1); // assertFalse(int1 == int0); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertNotNull(mockGregorianCalendar1); // } @Test public void test31() throws Throwable { Locale locale0 = Locale.GERMAN; assertEquals("de", locale0.toString()); assertEquals("deu", locale0.getISO3Language()); assertEquals("", locale0.getISO3Country()); assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getCountry()); assertEquals("", locale0.getVariant()); assertNotNull(locale0); MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(locale0); assertEquals("de", locale0.toString()); assertEquals("deu", locale0.getISO3Language()); assertEquals("", locale0.getISO3Country()); assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getCountry()); assertEquals("", locale0.getVariant()); assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertNotNull(mockGregorianCalendar0); int int0 = 12; MockGregorianCalendar mockGregorianCalendar1 = (MockGregorianCalendar)DateUtils.truncate((Calendar) mockGregorianCalendar0, int0); assertEquals("de", locale0.toString()); assertEquals("deu", locale0.getISO3Language()); assertEquals("", locale0.getISO3Country()); assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getCountry()); assertEquals("", locale0.getVariant()); assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(4, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); assertEquals(2, mockGregorianCalendar1.getFirstDayOfWeek()); assertEquals(true, mockGregorianCalendar1.isLenient()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409260000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); assertNotNull(mockGregorianCalendar1); } @Test public void test32() {} // @Test // public void test32() throws Throwable { // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotNull(mockGregorianCalendar0); // // int int0 = 9; // int int1 = 2670; // mockGregorianCalendar0.set(int0, int0, int0, int1, int1, int1); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=9,MONTH=9,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=9,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=2670,MINUTE=2670,SECOND=2670,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertFalse(int0 == int1); // assertFalse(int1 == int0); // // MockGregorianCalendar mockGregorianCalendar1 = (MockGregorianCalendar)DateUtils.ceiling((Calendar) mockGregorianCalendar0, int0); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-61849224000000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=10,MONTH=0,WEEK_OF_YEAR=5,WEEK_OF_MONTH=5,DAY_OF_MONTH=30,DAY_OF_YEAR=30,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=5,AM_PM=1,HOUR=0,HOUR_OF_DAY=12,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=9,MONTH=9,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=9,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=2670,MINUTE=2670,SECOND=2670,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(int0 == int1); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertNotNull(mockGregorianCalendar1); // } @Test public void test33() throws Throwable { long long0 = (-1335L); MockDate mockDate0 = new MockDate(long0); assertEquals("Wed Dec 31 23:59:58 GMT 1969", mockDate0.toString()); assertNotNull(mockDate0); int int0 = 13; Date date0 = DateUtils.round((Date) mockDate0, int0); assertEquals("Wed Dec 31 23:59:59 GMT 1969", date0.toString()); assertEquals("Wed Dec 31 23:59:58 GMT 1969", mockDate0.toString()); assertNotNull(date0); } @Test public void test34() {} // @Test // public void test34() throws Throwable { // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotNull(mockGregorianCalendar0); // // int int0 = 14; // MockGregorianCalendar mockGregorianCalendar1 = (MockGregorianCalendar)DateUtils.round((Calendar) mockGregorianCalendar0, int0); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertTrue(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertTrue(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertNotNull(mockGregorianCalendar1); // } @Test public void test35() {} // @Test // public void test35() throws Throwable { // long long0 = 9223372036854775807L; // System.setCurrentTimeMillis(long0); // int int0 = 0; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=9223372036854775807,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=292278994,MONTH=7,WEEK_OF_YEAR=34,WEEK_OF_MONTH=4,DAY_OF_MONTH=17,DAY_OF_YEAR=229,DAY_OF_WEEK=1,DAY_OF_WEEK_IN_MONTH=3,AM_PM=0,HOUR=7,HOUR_OF_DAY=7,MINUTE=12,SECOND=55,MILLISECOND=807,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertNotNull(mockGregorianCalendar0); // // Date date0 = mockGregorianCalendar0.getTime(); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=9223372036854775807,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=292278994,MONTH=7,WEEK_OF_YEAR=34,WEEK_OF_MONTH=4,DAY_OF_MONTH=17,DAY_OF_YEAR=229,DAY_OF_WEEK=1,DAY_OF_WEEK_IN_MONTH=3,AM_PM=0,HOUR=7,HOUR_OF_DAY=7,MINUTE=12,SECOND=55,MILLISECOND=807,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("Sun Aug 17 07:12:55 GMT 292278994", date0.toString()); // assertNotNull(date0); // // // Undeclared exception! // try { // Date date1 = DateUtils.ceiling(date0, int0); // fail("Expecting exception: ArithmeticException"); // // } catch(ArithmeticException e) { // // // // Calendar value too large for accurate calculations // // // } // } @Test public void test36() throws Throwable { int int0 = 9; String string0 = "#Y"; // Undeclared exception! try { Date date0 = DateUtils.ceiling((Object) string0, int0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // Could not find ceiling of for type: class java.lang.String // } } @Test public void test37() {} // @Test // public void test37() throws Throwable { // int int0 = 1; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0, int0); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertNotNull(mockGregorianCalendar0); // // Date date0 = DateUtils.ceiling((Object) mockGregorianCalendar0, int0); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("Sun Jan 01 00:00:00 GMT 2", date0.toString()); // assertNotNull(date0); // } @Test public void test38() throws Throwable { String string0 = null; int int0 = (-4824); // Undeclared exception! try { Date date0 = DateUtils.ceiling((Object) string0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test39() throws Throwable { Calendar calendar0 = null; int int0 = 0; // Undeclared exception! try { Calendar calendar1 = DateUtils.ceiling(calendar0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test40() throws Throwable { Date date0 = null; int int0 = (-1438); // Undeclared exception! try { Date date1 = DateUtils.ceiling(date0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test41() throws Throwable { MockDate mockDate0 = new MockDate(); assertEquals("Fri Feb 14 20:21:21 GMT 2014", mockDate0.toString()); assertNotNull(mockDate0); int int0 = 0; Date date0 = DateUtils.ceiling((Object) mockDate0, int0); assertEquals("Sat Jan 01 00:00:00 GMT 1", date0.toString()); assertEquals("Fri Feb 14 20:21:21 GMT 2014", mockDate0.toString()); assertNotNull(date0); } @Test public void test42() throws Throwable { int int0 = 1662; ZoneInfo zoneInfo0 = (ZoneInfo)TimeZone.getDefault(); assertEquals("GMT", zoneInfo0.getID()); assertNotNull(zoneInfo0); // Undeclared exception! try { Date date0 = DateUtils.truncate((Object) zoneInfo0, int0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // Could not truncate sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null] // } } @Test public void test43() throws Throwable { Object object0 = null; int int0 = (-217); // Undeclared exception! try { Date date0 = DateUtils.truncate(object0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test44() {} // @Test // public void test44() throws Throwable { // int int0 = 26; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0, int0); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=26,MONTH=26,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=26,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=26,HOUR_OF_DAY=26,MINUTE=26,SECOND=26,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertNotNull(mockGregorianCalendar0); // // Calendar calendar0 = null; // // Undeclared exception! // try { // boolean boolean0 = DateUtils.truncatedEquals(calendar0, (Calendar) mockGregorianCalendar0, int0); // fail("Expecting exception: IllegalArgumentException"); // // } catch(IllegalArgumentException e) { // // // // The date must not be null // // // } // } @Test public void test45() throws Throwable { MockDate mockDate0 = new MockDate(); assertEquals("Fri Feb 14 20:21:21 GMT 2014", mockDate0.toString()); assertNotNull(mockDate0); int int0 = 0; Date date0 = DateUtils.truncate((Object) mockDate0, int0); assertEquals("Fri Feb 14 20:21:21 GMT 2014", mockDate0.toString()); assertEquals("Sat Jan 01 00:00:00 GMT 1", date0.toString()); assertNotNull(date0); } @Test public void test46() throws Throwable { String string0 = ""; int int0 = (-738); // Undeclared exception! try { Date date0 = DateUtils.round((Object) string0, int0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // Could not round // } } @Test public void test47() throws Throwable { long long0 = 190L; MockDate mockDate0 = new MockDate(long0); assertEquals("Thu Jan 01 00:00:00 GMT 1970", mockDate0.toString()); assertNotNull(mockDate0); int int0 = (-13); // Undeclared exception! try { Date date0 = DateUtils.round((Object) mockDate0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The field -13 is not supported // } } @Test public void test48() throws Throwable { int int0 = 2564; Calendar calendar0 = null; // Undeclared exception! try { Date date0 = DateUtils.round((Object) calendar0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test49() throws Throwable { Calendar calendar0 = null; int int0 = (-998); // Undeclared exception! try { Calendar calendar1 = DateUtils.round(calendar0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test50() throws Throwable { int int0 = 1001; Date date0 = null; // Undeclared exception! try { Date date1 = DateUtils.round(date0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test51() throws Throwable { String string0 = "ZZ"; String[] stringArray0 = new String[4]; String string1 = ""; assertNotSame(string1, string0); stringArray0[0] = string1; assertNotNull(stringArray0[0]); // Undeclared exception! try { Date date0 = DateUtils.parseDate(string0, stringArray0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } } @Test public void test52() throws Throwable { String string0 = "ZZ"; String[] stringArray0 = new String[4]; stringArray0[0] = string0; assertNotNull(stringArray0[0]); stringArray0[1] = string0; assertNotNull(stringArray0[1]); stringArray0[2] = string0; assertNotNull(stringArray0[2]); stringArray0[3] = string0; assertNotNull(stringArray0[3]); try { Date date0 = DateUtils.parseDate(string0, stringArray0); fail("Expecting exception: ParseException"); } catch(ParseException e) { // // Unable to parse the date: ZZ // } } @Test public void test53() throws Throwable { String string0 = null; String[] stringArray0 = new String[5]; // Undeclared exception! try { Date date0 = DateUtils.parseDate(string0, stringArray0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Date and Patterns must not be null // } } @Test public void test54() {} // @Test // public void test54() throws Throwable { // int int0 = (-217); // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=-217,MONTH=-217,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=-217,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=-217,HOUR_OF_DAY=-217,MINUTE=-217,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // int int1 = 1; // MockGregorianCalendar mockGregorianCalendar1 = (MockGregorianCalendar)DateUtils.ceiling((Calendar) mockGregorianCalendar0, int1); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=0,YEAR=236,MONTH=0,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=-217,MONTH=-217,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=-217,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=-217,HOUR_OF_DAY=-217,MINUTE=-217,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertFalse(int1 == int0); // assertFalse(int0 == int1); // assertNotNull(mockGregorianCalendar1); // // boolean boolean0 = DateUtils.isSameLocalTime((Calendar) mockGregorianCalendar1, (Calendar) mockGregorianCalendar0); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-69583363200000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=0,YEAR=236,MONTH=0,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-69605671020000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=0,YEAR=237,MONTH=3,WEEK_OF_YEAR=16,WEEK_OF_MONTH=3,DAY_OF_MONTH=17,DAY_OF_YEAR=108,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=7,HOUR_OF_DAY=19,MINUTE=23,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertFalse(boolean0); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertFalse(int1 == int0); // assertFalse(int0 == int1); // } @Test public void test55() {} // @Test // public void test55() throws Throwable { // int int0 = 1; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0, int0); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotNull(mockGregorianCalendar0); // // MockGregorianCalendar mockGregorianCalendar1 = (MockGregorianCalendar)DateUtils.round((Calendar) mockGregorianCalendar0, int0); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1,MONTH=0,WEEK_OF_YEAR=6,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=32,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertNotNull(mockGregorianCalendar1); // // boolean boolean0 = DateUtils.isSameLocalTime((Calendar) mockGregorianCalendar0, (Calendar) mockGregorianCalendar1); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62135769600000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1,MONTH=0,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=1,DAY_OF_WEEK=7,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62133087539000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1,MONTH=1,WEEK_OF_YEAR=6,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=32,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertFalse(boolean0); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // } @Test public void test56() {} // @Test // public void test56() throws Throwable { // int int0 = 1200; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1200,MONTH=1200,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1200,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertNotNull(mockGregorianCalendar0); // // ZoneInfo zoneInfo0 = (ZoneInfo)mockGregorianCalendar0.getTimeZone(); // assertEquals("GMT", zoneInfo0.getID()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1200,MONTH=1200,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1200,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertNotNull(zoneInfo0); // // Locale locale0 = Locale.CANADA; // assertEquals("en", locale0.getLanguage()); // assertEquals("CAN", locale0.getISO3Country()); // assertEquals("en_CA", locale0.toString()); // assertEquals("", locale0.getVariant()); // assertEquals("eng", locale0.getISO3Language()); // assertEquals("CA", locale0.getCountry()); // assertNotNull(locale0); // // MockGregorianCalendar mockGregorianCalendar1 = new MockGregorianCalendar((TimeZone) zoneInfo0, locale0); // assertEquals("GMT", zoneInfo0.getID()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1200,MONTH=1200,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1200,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("en", locale0.getLanguage()); // assertEquals("CAN", locale0.getISO3Country()); // assertEquals("en_CA", locale0.toString()); // assertEquals("", locale0.getVariant()); // assertEquals("eng", locale0.getISO3Language()); // assertEquals("CA", locale0.getCountry()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertNotNull(mockGregorianCalendar1); // // boolean boolean0 = DateUtils.isSameLocalTime((Calendar) mockGregorianCalendar1, (Calendar) mockGregorianCalendar0); // assertEquals("GMT", zoneInfo0.getID()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-21038918400000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1303,MONTH=3,WEEK_OF_YEAR=16,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=104,DAY_OF_WEEK=1,DAY_OF_WEEK_IN_MONTH=2,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("en", locale0.getLanguage()); // assertEquals("CAN", locale0.getISO3Country()); // assertEquals("en_CA", locale0.toString()); // assertEquals("", locale0.getVariant()); // assertEquals("eng", locale0.getISO3Language()); // assertEquals("CA", locale0.getCountry()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertFalse(boolean0); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // } @Test public void test57() {} // @Test // public void test57() throws Throwable { // int int0 = 1; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0, int0); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // boolean boolean0 = DateUtils.isSameLocalTime((Calendar) mockGregorianCalendar0, (Calendar) mockGregorianCalendar0); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62133087539000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1,MONTH=1,WEEK_OF_YEAR=6,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=32,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertTrue(boolean0); // } @Test public void test58() throws Throwable { Calendar calendar0 = null; // Undeclared exception! try { boolean boolean0 = DateUtils.isSameLocalTime(calendar0, calendar0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test59() {} // @Test // public void test59() throws Throwable { // int int0 = 1200; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1200,MONTH=1200,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1200,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // ZoneInfo zoneInfo0 = (ZoneInfo)mockGregorianCalendar0.getTimeZone(); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1200,MONTH=1200,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1200,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals("GMT", zoneInfo0.getID()); // assertNotNull(zoneInfo0); // // Locale locale0 = Locale.CANADA; // assertEquals("eng", locale0.getISO3Language()); // assertEquals("en", locale0.getLanguage()); // assertEquals("en_CA", locale0.toString()); // assertEquals("CA", locale0.getCountry()); // assertEquals("", locale0.getVariant()); // assertEquals("CAN", locale0.getISO3Country()); // assertNotNull(locale0); // // MockGregorianCalendar mockGregorianCalendar1 = new MockGregorianCalendar((TimeZone) zoneInfo0, locale0); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1200,MONTH=1200,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1200,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals("GMT", zoneInfo0.getID()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals("eng", locale0.getISO3Language()); // assertEquals("en", locale0.getLanguage()); // assertEquals("en_CA", locale0.toString()); // assertEquals("CA", locale0.getCountry()); // assertEquals("", locale0.getVariant()); // assertEquals("CAN", locale0.getISO3Country()); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertNotNull(mockGregorianCalendar1); // // boolean boolean0 = DateUtils.isSameInstant((Calendar) mockGregorianCalendar1, (Calendar) mockGregorianCalendar0); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-21038918400000,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1303,MONTH=3,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=14,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("GMT", zoneInfo0.getID()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals("eng", locale0.getISO3Language()); // assertEquals("en", locale0.getLanguage()); // assertEquals("en_CA", locale0.toString()); // assertEquals("CA", locale0.getCountry()); // assertEquals("", locale0.getVariant()); // assertEquals("CAN", locale0.getISO3Country()); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertFalse(boolean0); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // } @Test public void test60() {} // @Test // public void test60() throws Throwable { // int int0 = 719; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=719,MONTH=719,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=719,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=719,HOUR_OF_DAY=719,MINUTE=719,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // boolean boolean0 = DateUtils.isSameInstant((Calendar) mockGregorianCalendar0, (Calendar) mockGregorianCalendar0); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-37522011660000,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=780,MONTH=11,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=18,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=10,HOUR_OF_DAY=10,MINUTE=59,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertTrue(boolean0); // } @Test public void test61() throws Throwable { Calendar calendar0 = null; // Undeclared exception! try { boolean boolean0 = DateUtils.isSameInstant(calendar0, calendar0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test62() throws Throwable { long long0 = (-2442L); int int0 = 1001; Locale locale0 = Locale.GERMAN; assertEquals("", locale0.getCountry()); assertEquals("de", locale0.toString()); assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getISO3Country()); assertEquals("", locale0.getVariant()); assertEquals("deu", locale0.getISO3Language()); assertNotNull(locale0); MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(locale0); assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals("", locale0.getCountry()); assertEquals("de", locale0.toString()); assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getISO3Country()); assertEquals("", locale0.getVariant()); assertEquals("deu", locale0.getISO3Language()); assertNotNull(mockGregorianCalendar0); MockDate mockDate0 = new MockDate(long0); assertEquals("Wed Dec 31 23:59:57 GMT 1969", mockDate0.toString()); assertNotNull(mockDate0); Date date0 = DateUtils.round((Object) mockGregorianCalendar0, int0); assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals("", locale0.getCountry()); assertEquals("de", locale0.toString()); assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getISO3Country()); assertEquals("", locale0.getVariant()); assertEquals("deu", locale0.getISO3Language()); assertEquals("Sun Feb 16 00:00:00 GMT 2014", date0.toString()); assertNotNull(date0); boolean boolean0 = DateUtils.isSameInstant(date0, (Date) mockDate0); assertEquals(4, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals(2, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=2,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals("", locale0.getCountry()); assertEquals("de", locale0.toString()); assertEquals("de", locale0.getLanguage()); assertEquals("", locale0.getISO3Country()); assertEquals("", locale0.getVariant()); assertEquals("deu", locale0.getISO3Language()); assertEquals("Sun Feb 16 00:00:00 GMT 2014", date0.toString()); assertEquals("Wed Dec 31 23:59:57 GMT 1969", mockDate0.toString()); assertFalse(boolean0); } @Test public void test63() throws Throwable { int int0 = 1200; MockDate mockDate0 = new MockDate((long) int0); assertEquals("Thu Jan 01 00:00:01 GMT 1970", mockDate0.toString()); assertNotNull(mockDate0); boolean boolean0 = DateUtils.isSameInstant((Date) mockDate0, (Date) mockDate0); assertEquals("Thu Jan 01 00:00:01 GMT 1970", mockDate0.toString()); assertTrue(boolean0); } @Test public void test64() throws Throwable { Date date0 = null; // Undeclared exception! try { boolean boolean0 = DateUtils.isSameInstant(date0, date0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test65() {} // @Test // public void test65() throws Throwable { // int int0 = 1662; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1662,MONTH=1662,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1662,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // int int1 = (-1); // Date date0 = mockGregorianCalendar0.getTime(); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-5205513600000,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1805,MONTH=0,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=17,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals("Thu Jan 17 00:00:00 GMT 1805", date0.toString()); // assertFalse(int0 == int1); // assertNotNull(date0); // // Date date1 = DateUtils.addDays(date0, int1); // assertEquals("Wed Jan 16 00:00:00 GMT 1805", date1.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-5205513600000,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1805,MONTH=0,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=17,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals("Thu Jan 17 00:00:00 GMT 1805", date0.toString()); // assertNotSame(date1, date0); // assertNotSame(date0, date1); // assertFalse(date1.equals((Object)date0)); // assertFalse(int1 == int0); // assertFalse(int0 == int1); // assertFalse(date0.equals((Object)date1)); // assertNotNull(date1); // // boolean boolean0 = DateUtils.isSameDay(date1, date0); // assertEquals("Wed Jan 16 00:00:00 GMT 1805", date1.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-5205513600000,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1805,MONTH=0,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=17,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals("Thu Jan 17 00:00:00 GMT 1805", date0.toString()); // assertNotSame(date1, date0); // assertNotSame(date0, date1); // assertFalse(boolean0); // assertFalse(date1.equals((Object)date0)); // assertFalse(int1 == int0); // assertFalse(int0 == int1); // assertFalse(date0.equals((Object)date1)); // } @Test public void test66() throws Throwable { long long0 = 190L; MockDate mockDate0 = new MockDate(long0); assertEquals("Thu Jan 01 00:00:00 GMT 1970", mockDate0.toString()); assertNotNull(mockDate0); int int0 = (-13); Date date0 = DateUtils.addDays((Date) mockDate0, int0); assertEquals("Fri Dec 19 00:00:00 GMT 1969", date0.toString()); assertEquals("Thu Jan 01 00:00:00 GMT 1970", mockDate0.toString()); assertNotNull(date0); boolean boolean0 = DateUtils.isSameDay(date0, (Date) mockDate0); assertEquals("Fri Dec 19 00:00:00 GMT 1969", date0.toString()); assertEquals("Thu Jan 01 00:00:00 GMT 1970", mockDate0.toString()); assertFalse(boolean0); } @Test public void test67() {} // @Test // public void test67() throws Throwable { // int int0 = 1; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0, int0); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotNull(mockGregorianCalendar0); // // MockGregorianCalendar mockGregorianCalendar1 = (MockGregorianCalendar)DateUtils.round((Calendar) mockGregorianCalendar0, int0); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1,MONTH=0,WEEK_OF_YEAR=6,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=32,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertNotNull(mockGregorianCalendar1); // // DateUtils.DateIterator dateUtils_DateIterator0 = new DateUtils.DateIterator(mockGregorianCalendar1, mockGregorianCalendar0); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62135856000000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=0,YEAR=1,MONTH=11,WEEK_OF_YEAR=1,WEEK_OF_MONTH=5,DAY_OF_MONTH=31,DAY_OF_YEAR=366,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=5,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // assertNotNull(dateUtils_DateIterator0); // // boolean boolean0 = DateUtils.isSameDay((Calendar) mockGregorianCalendar0, (Calendar) mockGregorianCalendar1); // assertEquals(true, mockGregorianCalendar1.isLenient()); // assertEquals(1, mockGregorianCalendar1.getFirstDayOfWeek()); // assertEquals(1, mockGregorianCalendar1.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62135856000000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=0,YEAR=1,MONTH=11,WEEK_OF_YEAR=1,WEEK_OF_MONTH=5,DAY_OF_MONTH=31,DAY_OF_YEAR=366,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=5,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar1.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62133087539000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1,MONTH=1,WEEK_OF_YEAR=6,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=32,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotSame(mockGregorianCalendar1, mockGregorianCalendar0); // assertNotSame(mockGregorianCalendar0, mockGregorianCalendar1); // assertFalse(boolean0); // assertFalse(mockGregorianCalendar1.equals((Object)mockGregorianCalendar0)); // assertFalse(mockGregorianCalendar0.equals((Object)mockGregorianCalendar1)); // } @Test public void test68() {} // @Test // public void test68() throws Throwable { // int int0 = 0; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=0,MONTH=0,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=0,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // Calendar calendar0 = null; // // Undeclared exception! // try { // boolean boolean0 = DateUtils.isSameDay((Calendar) mockGregorianCalendar0, calendar0); // fail("Expecting exception: IllegalArgumentException"); // // } catch(IllegalArgumentException e) { // // // // The date must not be null // // // } // } @Test public void test69() throws Throwable { Calendar calendar0 = null; // Undeclared exception! try { boolean boolean0 = DateUtils.isSameDay(calendar0, calendar0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test70() throws Throwable { Locale locale0 = Locale.CANADA_FRENCH; assertEquals("fr_CA", locale0.toString()); assertEquals("fra", locale0.getISO3Language()); assertEquals("CAN", locale0.getISO3Country()); assertEquals("CA", locale0.getCountry()); assertEquals("", locale0.getVariant()); assertEquals("fr", locale0.getLanguage()); assertNotNull(locale0); MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(locale0); assertEquals("fr_CA", locale0.toString()); assertEquals("fra", locale0.getISO3Language()); assertEquals("CAN", locale0.getISO3Country()); assertEquals("CA", locale0.getCountry()); assertEquals("", locale0.getVariant()); assertEquals("fr", locale0.getLanguage()); assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertNotNull(mockGregorianCalendar0); Date date0 = mockGregorianCalendar0.getTime(); assertEquals("fr_CA", locale0.toString()); assertEquals("fra", locale0.getISO3Language()); assertEquals("CAN", locale0.getISO3Country()); assertEquals("CA", locale0.getCountry()); assertEquals("", locale0.getVariant()); assertEquals("fr", locale0.getLanguage()); assertEquals("Fri Feb 14 20:21:21 GMT 2014", date0.toString()); assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertNotNull(date0); boolean boolean0 = DateUtils.isSameDay(date0, date0); assertEquals("fr_CA", locale0.toString()); assertEquals("fra", locale0.getISO3Language()); assertEquals("CAN", locale0.getISO3Country()); assertEquals("CA", locale0.getCountry()); assertEquals("", locale0.getVariant()); assertEquals("fr", locale0.getLanguage()); assertEquals("Fri Feb 14 20:21:21 GMT 2014", date0.toString()); assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertTrue(boolean0); } @Test public void test71() throws Throwable { Date date0 = null; // Undeclared exception! try { boolean boolean0 = DateUtils.isSameDay(date0, date0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test72() throws Throwable { int int0 = 0; MockDate mockDate0 = new MockDate(int0, int0, int0, int0, int0, int0); assertEquals("Sun Dec 31 00:00:00 GMT 1899", mockDate0.toString()); assertNotNull(mockDate0); Date date0 = DateUtils.setMinutes((Date) mockDate0, int0); assertEquals("Sun Dec 31 00:00:00 GMT 1899", mockDate0.toString()); assertEquals("Sun Dec 31 00:00:00 GMT 1899", date0.toString()); assertNotNull(date0); } @Test public void test73() throws Throwable { int int0 = 0; MockDate mockDate0 = new MockDate(); assertEquals("Fri Feb 14 20:21:21 GMT 2014", mockDate0.toString()); assertNotNull(mockDate0); // Undeclared exception! try { long long0 = DateUtils.getFragmentInMinutes((Date) mockDate0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The fragment 0 is not supported // } } @Test public void test74() throws Throwable { int int0 = 14; MockDate mockDate0 = new MockDate(); assertEquals("Fri Feb 14 20:21:21 GMT 2014", mockDate0.toString()); assertNotNull(mockDate0); Date date0 = DateUtils.setDays((Date) mockDate0, int0); assertEquals("Fri Feb 14 20:21:21 GMT 2014", date0.toString()); assertEquals("Fri Feb 14 20:21:21 GMT 2014", mockDate0.toString()); assertNotNull(date0); } @Test public void test75() throws Throwable { int int0 = 2927; Date date0 = null; // Undeclared exception! try { Date date1 = DateUtils.addMonths(date0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test76() throws Throwable { long long0 = (-1335L); MockDate mockDate0 = new MockDate(long0); assertEquals("Wed Dec 31 23:59:58 GMT 1969", mockDate0.toString()); assertNotNull(mockDate0); int int0 = 13; Date date0 = DateUtils.addMinutes((Date) mockDate0, int0); assertEquals("Wed Dec 31 23:59:58 GMT 1969", mockDate0.toString()); assertEquals("Thu Jan 01 00:12:58 GMT 1970", date0.toString()); assertNotNull(date0); } @Test public void test77() throws Throwable { Date date0 = null; int int0 = (-375); // Undeclared exception! try { long long0 = DateUtils.getFragmentInHours(date0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test78() throws Throwable { String string0 = ""; String[] stringArray0 = new String[1]; // Undeclared exception! try { Date date0 = DateUtils.parseDateStrictly(string0, stringArray0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } } @Test public void test79() throws Throwable { long long0 = (-1335L); MockDate mockDate0 = new MockDate(long0); assertEquals("Wed Dec 31 23:59:58 GMT 1969", mockDate0.toString()); assertNotNull(mockDate0); int int0 = 13; Date date0 = DateUtils.addHours((Date) mockDate0, int0); assertEquals("Wed Dec 31 23:59:58 GMT 1969", mockDate0.toString()); assertEquals("Thu Jan 01 12:59:58 GMT 1970", date0.toString()); assertNotNull(date0); } @Test public void test80() {} // @Test // public void test80() throws Throwable { // int int0 = 1; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertNotNull(mockGregorianCalendar0); // // boolean boolean0 = DateUtils.truncatedEquals((Calendar) mockGregorianCalendar0, (Calendar) mockGregorianCalendar0, int0); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertTrue(boolean0); // } @Test public void test81() {} // @Test // public void test81() throws Throwable { // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // int int0 = 4; // // Undeclared exception! // try { // long long0 = DateUtils.getFragmentInDays((Calendar) mockGregorianCalendar0, int0); // fail("Expecting exception: IllegalArgumentException"); // // } catch(IllegalArgumentException e) { // // // // The fragment 4 is not supported // // // } // } @Test public void test82() throws Throwable { Locale locale0 = Locale.CANADA_FRENCH; assertEquals("CAN", locale0.getISO3Country()); assertEquals("fr", locale0.getLanguage()); assertEquals("", locale0.getVariant()); assertEquals("fr_CA", locale0.toString()); assertEquals("fra", locale0.getISO3Language()); assertEquals("CA", locale0.getCountry()); assertNotNull(locale0); int int0 = (-713); MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(locale0); assertEquals("CAN", locale0.getISO3Country()); assertEquals("fr", locale0.getLanguage()); assertEquals("", locale0.getVariant()); assertEquals("fr_CA", locale0.toString()); assertEquals("fra", locale0.getISO3Language()); assertEquals("CA", locale0.getCountry()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertNotNull(mockGregorianCalendar0); Date date0 = mockGregorianCalendar0.getTime(); assertEquals("CAN", locale0.getISO3Country()); assertEquals("fr", locale0.getLanguage()); assertEquals("", locale0.getVariant()); assertEquals("fr_CA", locale0.toString()); assertEquals("fra", locale0.getISO3Language()); assertEquals("CA", locale0.getCountry()); assertEquals("Fri Feb 14 20:21:21 GMT 2014", date0.toString()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertNotNull(date0); // Undeclared exception! try { Date date1 = DateUtils.setMonths(date0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // MONTH // } } @Test public void test83() throws Throwable { int int0 = (-2066); String string0 = ""; String[] stringArray0 = new String[8]; stringArray0[0] = string0; assertNotNull(stringArray0[0]); Date date0 = DateUtils.parseDate(string0, stringArray0); assertEquals("Thu Jan 01 00:00:00 GMT 1970", date0.toString()); assertNotNull(date0); Date date1 = DateUtils.addWeeks(date0, int0); assertEquals("Thu Jan 01 00:00:00 GMT 1970", date0.toString()); assertEquals("Thu May 29 00:00:00 GMT 1930", date1.toString()); assertNotSame(date0, date1); assertNotSame(date1, date0); assertFalse(date0.equals((Object)date1)); assertFalse(date1.equals((Object)date0)); assertNotNull(date1); } @Test public void test84() throws Throwable { int int0 = (-2066); String string0 = ""; String[] stringArray0 = new String[8]; stringArray0[0] = string0; assertNotNull(stringArray0[0]); Date date0 = DateUtils.parseDate(string0, stringArray0); assertEquals("Thu Jan 01 00:00:00 GMT 1970", date0.toString()); assertNotNull(date0); Date date1 = DateUtils.addSeconds(date0, int0); assertEquals("Wed Dec 31 23:25:34 GMT 1969", date1.toString()); assertEquals("Thu Jan 01 00:00:00 GMT 1970", date0.toString()); assertNotSame(date1, date0); assertNotSame(date0, date1); assertFalse(date1.equals((Object)date0)); assertFalse(date0.equals((Object)date1)); assertNotNull(date1); } @Test public void test85() throws Throwable { Calendar calendar0 = null; int int0 = 196; // Undeclared exception! try { long long0 = DateUtils.getFragmentInMinutes(calendar0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test86() {} // @Test // public void test86() throws Throwable { // int int0 = 0; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // Date date0 = DateUtils.truncate((Object) mockGregorianCalendar0, int0); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals("Sat Jan 01 00:00:00 GMT 1", date0.toString()); // assertNotNull(date0); // // Date date1 = DateUtils.addMilliseconds(date0, int0); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals("Sat Jan 01 00:00:00 GMT 1", date1.toString()); // assertEquals("Sat Jan 01 00:00:00 GMT 1", date0.toString()); // assertNotSame(date1, date0); // assertNotSame(date0, date1); // assertTrue(date1.equals((Object)date0)); // assertTrue(date0.equals((Object)date1)); // assertNotNull(date1); // } @Test public void test87() throws Throwable { Locale locale0 = Locale.PRC; assertEquals("CN", locale0.getCountry()); assertEquals("CHN", locale0.getISO3Country()); assertEquals("zh_CN", locale0.toString()); assertEquals("zho", locale0.getISO3Language()); assertEquals("", locale0.getVariant()); assertEquals("zh", locale0.getLanguage()); assertNotNull(locale0); MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(locale0); assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals("CN", locale0.getCountry()); assertEquals("CHN", locale0.getISO3Country()); assertEquals("zh_CN", locale0.toString()); assertEquals("zho", locale0.getISO3Language()); assertEquals("", locale0.getVariant()); assertEquals("zh", locale0.getLanguage()); assertNotNull(mockGregorianCalendar0); int int0 = 9; // Undeclared exception! try { long long0 = DateUtils.getFragmentInHours((Calendar) mockGregorianCalendar0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The fragment 9 is not supported // } } @Test public void test88() throws Throwable { int int0 = 2564; MockDate mockDate0 = new MockDate(int0, int0, int0); assertEquals("Sun Sep 07 00:00:00 GMT 4684", mockDate0.toString()); assertNotNull(mockDate0); Date date0 = DateUtils.setYears((Date) mockDate0, int0); assertEquals("Sun Sep 07 00:00:00 GMT 4684", mockDate0.toString()); assertEquals("Fri Sep 07 00:00:00 GMT 2564", date0.toString()); assertNotNull(date0); } @Test public void test89() throws Throwable { Locale locale0 = Locale.CANADA_FRENCH; assertEquals("CAN", locale0.getISO3Country()); assertEquals("fra", locale0.getISO3Language()); assertEquals("fr", locale0.getLanguage()); assertEquals("fr_CA", locale0.toString()); assertEquals("", locale0.getVariant()); assertEquals("CA", locale0.getCountry()); assertNotNull(locale0); int int0 = (-713); MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(locale0); assertEquals("CAN", locale0.getISO3Country()); assertEquals("fra", locale0.getISO3Language()); assertEquals("fr", locale0.getLanguage()); assertEquals("fr_CA", locale0.toString()); assertEquals("", locale0.getVariant()); assertEquals("CA", locale0.getCountry()); assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertNotNull(mockGregorianCalendar0); Date date0 = mockGregorianCalendar0.getTime(); assertEquals("CAN", locale0.getISO3Country()); assertEquals("fra", locale0.getISO3Language()); assertEquals("fr", locale0.getLanguage()); assertEquals("fr_CA", locale0.toString()); assertEquals("", locale0.getVariant()); assertEquals("CA", locale0.getCountry()); assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); assertEquals(true, mockGregorianCalendar0.isLenient()); assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); assertEquals("Fri Feb 14 20:21:21 GMT 2014", date0.toString()); assertNotNull(date0); // Undeclared exception! try { Date date1 = DateUtils.setMilliseconds(date0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // MILLISECOND // } } @Test public void test90() {} // @Test // public void test90() throws Throwable { // int int0 = 0; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // Date date0 = DateUtils.truncate((Object) mockGregorianCalendar0, int0); // assertEquals("Sat Jan 01 00:00:00 GMT 1", date0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertNotNull(date0); // // Date date1 = DateUtils.addYears(date0, int0); // assertEquals("Sat Jan 01 00:00:00 GMT 1", date1.toString()); // assertEquals("Sat Jan 01 00:00:00 GMT 1", date0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=1392409281320,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2014,MONTH=1,WEEK_OF_YEAR=7,WEEK_OF_MONTH=3,DAY_OF_MONTH=14,DAY_OF_YEAR=45,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=8,HOUR_OF_DAY=20,MINUTE=21,SECOND=21,MILLISECOND=320,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertNotSame(date1, date0); // assertNotSame(date0, date1); // assertTrue(date1.equals((Object)date0)); // assertTrue(date0.equals((Object)date1)); // assertNotNull(date1); // } @Test public void test91() throws Throwable { Date date0 = null; int int0 = 0; // Undeclared exception! try { int int1 = DateUtils.truncatedCompareTo(date0, date0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test92() throws Throwable { int int0 = 0; MockDate mockDate0 = new MockDate(int0, int0, int0, int0, int0, int0); assertEquals("Sun Dec 31 00:00:00 GMT 1899", mockDate0.toString()); assertNotNull(mockDate0); Date date0 = DateUtils.setHours((Date) mockDate0, int0); assertEquals("Sun Dec 31 00:00:00 GMT 1899", mockDate0.toString()); assertEquals("Sun Dec 31 00:00:00 GMT 1899", date0.toString()); assertNotNull(date0); } @Test public void test93() throws Throwable { Date date0 = null; int int0 = 0; // Undeclared exception! try { Date date1 = DateUtils.setSeconds(date0, int0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // The date must not be null // } } @Test public void test94() {} // @Test // public void test94() throws Throwable { // int int0 = 1; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=0,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertNotNull(mockGregorianCalendar0); // // long long0 = DateUtils.getFragmentInMilliseconds((Calendar) mockGregorianCalendar0, int0); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62133087540000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1,MONTH=1,WEEK_OF_YEAR=6,WEEK_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=32,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=0,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals(2768460000L, long0); // } @Test public void test95() throws Throwable { DateUtils dateUtils0 = new DateUtils(); assertNotNull(dateUtils0); } @Test public void test96() {} // @Test // public void test96() throws Throwable { // long long0 = (-1335L); // MockDate mockDate0 = new MockDate(long0); // assertEquals("Wed Dec 31 23:59:58 GMT 1969", mockDate0.toString()); // assertNotNull(mockDate0); // // GregorianCalendar gregorianCalendar0 = (GregorianCalendar)DateUtils.toCalendar((Date) mockDate0); // assertEquals(1, gregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, gregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, gregorianCalendar0.isLenient()); // assertEquals("java.util.GregorianCalendar[time=-1335,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1969,MONTH=11,WEEK_OF_YEAR=1,WEEK_OF_MONTH=5,DAY_OF_MONTH=31,DAY_OF_YEAR=365,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=5,AM_PM=1,HOUR=11,HOUR_OF_DAY=23,MINUTE=59,SECOND=58,MILLISECOND=665,ZONE_OFFSET=0,DST_OFFSET=0]", gregorianCalendar0.toString()); // assertEquals("Wed Dec 31 23:59:58 GMT 1969", mockDate0.toString()); // assertNotNull(gregorianCalendar0); // // DateUtils.DateIterator dateUtils_DateIterator0 = new DateUtils.DateIterator(gregorianCalendar0, gregorianCalendar0); // assertEquals(1, gregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, gregorianCalendar0.getFirstDayOfWeek()); // assertEquals("java.util.GregorianCalendar[time=-86401335,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1969,MONTH=11,WEEK_OF_YEAR=1,WEEK_OF_MONTH=5,DAY_OF_MONTH=30,DAY_OF_YEAR=364,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=5,AM_PM=1,HOUR=11,HOUR_OF_DAY=23,MINUTE=59,SECOND=58,MILLISECOND=665,ZONE_OFFSET=0,DST_OFFSET=0]", gregorianCalendar0.toString()); // assertEquals(true, gregorianCalendar0.isLenient()); // assertEquals("Wed Dec 31 23:59:58 GMT 1969", mockDate0.toString()); // assertNotNull(dateUtils_DateIterator0); // // // Undeclared exception! // try { // dateUtils_DateIterator0.remove(); // fail("Expecting exception: UnsupportedOperationException"); // // } catch(UnsupportedOperationException e) { // // // // no message in exception (getMessage() returned null) // // // } // } @Test public void test97() {} // @Test // public void test97() throws Throwable { // int int0 = 1; // MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar(int0, int0, int0, int0, int0, int0); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=1,MONTH=1,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=1,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=?,ZONE_OFFSET=?,DST_OFFSET=?]", mockGregorianCalendar0.toString()); // assertNotNull(mockGregorianCalendar0); // // DateUtils.DateIterator dateUtils_DateIterator0 = new DateUtils.DateIterator(mockGregorianCalendar0, mockGregorianCalendar0); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62133173939000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1,MONTH=0,WEEK_OF_YEAR=6,WEEK_OF_MONTH=6,DAY_OF_MONTH=31,DAY_OF_YEAR=31,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=5,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertNotNull(dateUtils_DateIterator0); // // boolean boolean0 = dateUtils_DateIterator0.hasNext(); // assertEquals(1, mockGregorianCalendar0.getMinimalDaysInFirstWeek()); // assertEquals(1, mockGregorianCalendar0.getFirstDayOfWeek()); // assertEquals("org.evosuite.runtime.mock.java.util.MockGregorianCalendar[time=-62133173939000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id=\"GMT\",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1,MONTH=0,WEEK_OF_YEAR=6,WEEK_OF_MONTH=6,DAY_OF_MONTH=31,DAY_OF_YEAR=31,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=5,AM_PM=0,HOUR=1,HOUR_OF_DAY=1,MINUTE=1,SECOND=1,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]", mockGregorianCalendar0.toString()); // assertEquals(true, mockGregorianCalendar0.isLenient()); // assertFalse(boolean0); // } }
[ "martin.monperrus@gnieh.org" ]
martin.monperrus@gnieh.org
28dc78439932272afeb5e88c3f9515805868212d
a29b7d239302b1b1041624277b9df4b959dc77c0
/src/com/gogo/domain/enums/ACTState.java
e6be1a2af561438d9c682a19d9039d7f073bc589
[]
no_license
158212075/Gogo
46264c7b442de4e72bab814d64c1f49861d229e2
db9521f10c3536ccc23c23cf8d12014cea3cc469
refs/heads/master
2020-07-14T17:48:09.731257
2014-11-04T13:20:53
2014-11-04T13:20:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
233
java
package com.gogo.domain.enums; /** * ๆดปๅŠจ็Šถๆ€ๆžšไธพ * @author allen * */ public enum ACTState { DELETE, //ๅˆ ้™ค NEW, //ๆ–ฐๅขž RELEASE, //ๅ‘ๅธƒ SUSPEND, //ๆš‚ๅœ STOP, //ๅœๆญข FINASH; //็ป“ๆŸ }
[ "zhaoyan-0312@163.com" ]
zhaoyan-0312@163.com
0576dbb90c7cd162354a231fa5e965f866eb1b99
9c7297b55c6e7c169e07ec679ed1cd4ea89088f2
/components-starter/camel-aws2-mq-starter/src/main/java/org/apache/camel/component/aws2/mq/springboot/MQ2ComponentConverter.java
3cbf734f6efd6c14a96df4a359a8543de9547df2
[ "Apache-2.0" ]
permissive
marcelloraffaele/camel-spring-boot
87d2a47c02ff0aa885107e9e5602879bf9bd4eb4
5238065b90dfdccf2baec2898ee349508c112d6b
refs/heads/master
2023-03-23T18:12:39.428912
2021-03-13T07:26:39
2021-03-13T07:26:39
339,543,544
0
2
Apache-2.0
2021-02-24T07:54:26
2021-02-16T22:04:07
null
UTF-8
Java
false
false
2,916
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.camel.component.aws2.mq.springboot; import java.util.LinkedHashSet; import java.util.Set; import javax.annotation.Generated; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.properties.ConfigurationPropertiesBinding; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.convert.converter.GenericConverter; import org.springframework.stereotype.Component; /** * Generated by camel-package-maven-plugin - do not edit this file! */ @Generated("org.apache.camel.springboot.maven.SpringBootAutoConfigurationMojo") @Configuration(proxyBeanMethods = false) @ConfigurationPropertiesBinding @Component public class MQ2ComponentConverter implements GenericConverter { @Autowired private ApplicationContext applicationContext; public Set<ConvertiblePair> getConvertibleTypes() { Set<ConvertiblePair> answer = new LinkedHashSet<>(); answer.add(new ConvertiblePair(String.class, software.amazon.awssdk.services.mq.MqClient.class)); answer.add(new ConvertiblePair(String.class, org.apache.camel.component.aws2.mq.MQ2Configuration.class)); return answer; } public Object convert( Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { if (source == null) { return null; } String ref = source.toString(); if (!ref.startsWith("#")) { return null; } ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1); switch (targetType.getName()) { case "software.amazon.awssdk.services.mq.MqClient": return applicationContext.getBean(ref, software.amazon.awssdk.services.mq.MqClient.class); case "org.apache.camel.component.aws2.mq.MQ2Configuration": return applicationContext.getBean(ref, org.apache.camel.component.aws2.mq.MQ2Configuration.class); } return null; } }
[ "claus.ibsen@gmail.com" ]
claus.ibsen@gmail.com
4fbe1f72a90fae0189c489a31591d72b62c50a5f
9fb2139bf41e2301f9ee9069d649c5afe8e7735c
/folders/GroceryListApp/app/src/main/java/com/engineersk/grocerylistapp/UI/RecyclerViewAdapter.java
128e9938c8fa6fbfb5388552139db53660204240
[]
no_license
codewithgauri/HacktoberFest
9bc23289b4d93f7832271644a2ded2a83aa22c87
8ce8f687a4fb7c3953d1e0a5b314e21e4553366e
refs/heads/master
2023-01-02T07:20:51.634263
2020-10-26T07:02:34
2020-10-26T07:02:34
307,285,210
3
0
null
null
null
null
UTF-8
Java
false
false
7,010
java
package com.engineersk.grocerylistapp.UI; import android.app.AlertDialog; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.engineersk.grocerylistapp.Activities.DetailsActivity; import com.engineersk.grocerylistapp.Data.DatabaseHandler; import com.engineersk.grocerylistapp.Model.Grocery; import com.engineersk.grocerylistapp.R; import com.google.android.material.snackbar.Snackbar; import java.util.List; public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapter.ViewHolder> { private Context context; private List<Grocery> groceryItems; private AlertDialog.Builder alertDialogBuilder; private AlertDialog alertDialog; private LayoutInflater inflater; public RecyclerViewAdapter(Context context, List<Grocery> groceryItems) { this.context = context; this.groceryItems = groceryItems; } @NonNull @Override public RecyclerViewAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view= LayoutInflater.from(parent.getContext()) .inflate(R.layout.list_row, parent, false); return new ViewHolder(view, context); } @Override public void onBindViewHolder(@NonNull ViewHolder holder, int position) { Grocery grocery=groceryItems.get(position); holder.groceryItemName.setText(grocery.getName()); holder.quantity.setText(grocery.getQuantity()); holder.dateAdded.setText(grocery.getDateItemAdded()); } @Override public int getItemCount() { return groceryItems.size(); } public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private TextView groceryItemName; private TextView quantity; private TextView dateAdded; private Button editButton; private Button deleteButton; private int id; private DatabaseHandler groceryDBHandler; public ViewHolder(@NonNull View itemView, Context ctx) { super(itemView); context = ctx; groceryItemName = itemView.findViewById(R.id.name); quantity = itemView.findViewById(R.id.quantityID); dateAdded = itemView.findViewById(R.id.date); editButton = itemView.findViewById(R.id.editButtonID); deleteButton = itemView.findViewById(R.id.deleteButtonID); editButton.setOnClickListener(this); deleteButton.setOnClickListener(this); itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { int position = getAdapterPosition(); Grocery grocery = groceryItems.get(position); Intent intent = new Intent(context, DetailsActivity.class); intent.putExtra("name", grocery.getName()); intent.putExtra("quantity", grocery.getQuantity()); intent.putExtra("date", grocery.getDateItemAdded()); intent.putExtra("id", grocery.getId()); context.startActivity(intent); } }); } @Override public void onClick(View view) { switch (view.getId()) { case R.id.editButtonID: editItem(); break; case R.id.deleteButtonID: Grocery grocery = groceryItems.get(getAdapterPosition()); deleteItem(grocery.getId()); break; } } private void deleteItem(final int id) { alertDialogBuilder = new AlertDialog.Builder(context); inflater = LayoutInflater.from(context); View view = inflater.inflate(R.layout.confirmation_dialog, null); Button noButton = view.findViewById(R.id.noButtonID); Button yesButton = view.findViewById(R.id.yesButtonID); alertDialogBuilder.setView(view); alertDialog = alertDialogBuilder.create(); alertDialog.show(); noButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { alertDialog.dismiss(); } }); yesButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { groceryDBHandler = new DatabaseHandler(context); groceryDBHandler.deleteGroceryItem(id); groceryItems.remove(getAdapterPosition()); notifyItemRemoved(getAdapterPosition()); alertDialog.dismiss(); } }); } private void editItem() { inflater = LayoutInflater.from(context); final View view = inflater.inflate(R.layout.popup, null); alertDialogBuilder = new AlertDialog.Builder(context); alertDialogBuilder.setView(view); alertDialog = alertDialogBuilder.create(); alertDialog.show(); final EditText groceryItem = view.findViewById(R.id.groceryItemID); final EditText quantity = view.findViewById(R.id.groceryQtyID); final TextView groceryTitle = view.findViewById(R.id.title); final Button saveButton = view.findViewById(R.id.save_buttonID); groceryTitle.setText("Edit Grocery"); saveButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { groceryDBHandler = new DatabaseHandler(context); Grocery grocery = groceryItems.get(getAdapterPosition()); if (!groceryItem.getText().toString().isEmpty() && !quantity.getText().toString().isEmpty()) { grocery.setName(groceryItem.getText().toString()); grocery.setQuantity(quantity.getText().toString()); groceryItems.set(getAdapterPosition(), grocery); groceryDBHandler.updateGroceryItem(grocery); notifyItemChanged(getAdapterPosition(), grocery); alertDialog.dismiss(); } else { Snackbar.make(view, "Add Grocery and Quantity", Snackbar.LENGTH_LONG).show(); } } }); } } }
[ "eskayoriade@gmail.com" ]
eskayoriade@gmail.com
e9f98f0e5ade30c25e043a63cb5cd5706d165661
13455fb316b9335d6dcfd992cc3116fff7344906
/src/main/java/com/cordio/cordio/repository/PlayerRepository.java
c876acb8a4e147ef18ae458398137b4b0857a668
[]
no_license
ihorminyaylo/server-ace
9b45e5c576a1e4581e01778eb66f94c5197cde3f
cf10feae55a6480fdd88ff0ca431d4a64c467d8e
refs/heads/master
2020-06-06T11:51:33.764486
2019-06-19T12:53:46
2019-06-19T12:53:46
192,732,655
0
0
null
null
null
null
UTF-8
Java
false
false
410
java
package com.cordio.cordio.repository; import com.cordio.cordio.model.business.Player; import com.cordio.cordio.model.security.Role; import com.cordio.cordio.model.security.User; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.Optional; @Repository public interface PlayerRepository extends JpaRepository<Player, Integer> { }
[ "573215Min" ]
573215Min
f31d9ffcb36ee690896f129d5623c3631c846c2c
1363e6783c3bddebbbdf6c64c5628637bb4ab194
/file-service/src/main/java/com/wdy/module/config/retrofit/Retrofit.java
584f8f2292c7d4b16dbe4511b6f42ca85b670cdf
[]
no_license
Kaiser-love/huielu-server-gradle
203a311d49ed0f56959999454f4daa38f4f18e62
d6e078a7c9691153ad2f93ad0156ac01a89d0934
refs/heads/master
2020-05-26T18:27:01.628563
2019-05-24T01:57:18
2019-05-24T01:57:18
188,335,019
0
0
null
null
null
null
UTF-8
Java
false
false
2,748
java
package com.wdy.module.config.retrofit; import io.reactivex.Observable; import okhttp3.ResponseBody; import org.springframework.util.CollectionUtils; import retrofit2.Call; import retrofit2.http.*; /** * @author yemao * @date 2017/4/9 * @description ๅ†™่‡ชๅทฑ็š„ไปฃ็ , ่ฎฉๅˆซไบบ่ฏดๅŽปๅง! */ public class Retrofit { private static APIFunction mAPIFunction = RetrofitFactory.build(APIFunction.class); public static APIFunction API() { return mAPIFunction; } public interface APIFunction { @Streaming @GET Observable<ResponseBody> donloadPic(@Url String picUrl); @GET Call<ResponseBody> getImgPoints(@Url String picUrl, @Query(value = "str", encoded = true) String imgUrl); } //็ฝ‘็ปœ่ฏทๆฑ‚ demo public static void main(String[] args) throws Exception { // ArrayList<String> imgList = new ArrayList<>(); // imgList.add("https://starfire.site/pic/1d32fa3e2ded5bc557aca6cc3d9a6d72?p=0"); // imgList.add("https://starfire.site/pic/78db0e060fb87cc2f326dbf6194315d5?p=0"); // imgList.add("https://starfire.site/pic/b5b4c20a10bf3643d8a7bac682d19d62?p=0"); // imgList.add("https://starfire.site/pic/ace218a59f4983f746ce1d05752922c0?p=0"); // // try { // String fileName = "tdsdt.pptx"; // System.out.println(Retrofit.API().testPdf(fileName, imgList).execute().body().toString()); // FileOutputStream fileOutputStream = new FileOutputStream(new File(fileName)); // Message<String> messageS = Retrofit.API().testGet(fileName).execute().body(); // if (messageS.getCode() == 0) { // byte[] message = Base64.getDecoder().decode(messageS.getBody()); // fileOutputStream.writ // e(message); // } else { // System.out.println("ๅ•ฅ้ƒฝๆฒกๆœ‰" + messageS.getMsg()); // } // } catch (IOException e) { // e.printStackTrace(); // } String apiResult = Retrofit.API().getImgPoints("http://123.206.73.65:8000/pic_url", "https://mybucket1-1257353650.cos.ap-guangzhou.myqcloud.com/dismps_image/dispm_0.bmp").execute().body().string(); apiResult = apiResult.replace("][", ","); System.out.println(apiResult); String[] split = apiResult.split(","); CollectionUtils.arrayToList(split).stream().forEach(a -> System.out.println(a)); // Observable<ResponseBody> observable = Retrofit.API().donloadPic("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556188395479&di=8d96b0be8d8903965a71df7008b61eb0&imgtype=0&src=http%3A%2F%2Fwww.gedc.cn%2Fimages%2Fjcdt%2F2017%2F3%2F5%2FA4912B4775714CE88B9D4B6B55FFA506.jpg"); } }
[ "sxdongyang_wu@kingdee.com" ]
sxdongyang_wu@kingdee.com
34ad95e00f460953d37df73096761f2023347f1c
688ee54f310d78c724efa9b0e5f258d6310d023b
/rb-server-master/rb-server-core/src/main/java/net/readybid/entities/agency/db/AgencyRepositoryImpl.java
8519b9a35bff8a8c5ce14e545d213af1d9b5f23c
[]
no_license
Ans123/ReadyBid
344e027839563922c338c6a3261cda5441111f81
50186b710b52048358005ce15d56ed783ed00607
refs/heads/master
2020-04-07T23:57:28.054043
2018-11-23T12:55:54
2018-11-23T12:55:54
158,831,718
0
0
null
null
null
null
UTF-8
Java
false
false
2,458
java
package net.readybid.entities.agency.db; import com.mongodb.client.AggregateIterable; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import net.readybid.entities.agency.core.Agency; import net.readybid.entities.agency.core.AgencyImpl; import net.readybid.entities.agency.logic.AgencyRepository; import net.readybid.mongodb.MongoRetry; import org.bson.Document; import org.bson.conversions.Bson; import org.bson.types.ObjectId; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import static net.readybid.mongodb.RbMongoFilters.*; /** * Created by DejanK on 1/6/2017. * */ @Service public class AgencyRepositoryImpl implements AgencyRepository { private final MongoCollection<AgencyImpl> agencyCollection; private final MongoCollection<AgencyImpl> unvalidatedAgencyCollection; @Autowired public AgencyRepositoryImpl( @Qualifier("mongoDatabaseMain") MongoDatabase mongoDatabase ) { agencyCollection = mongoDatabase.getCollection("TravelAgency", AgencyImpl.class); unvalidatedAgencyCollection = mongoDatabase.getCollection("UnvalidatedTravelAgency", AgencyImpl.class); } @Override @MongoRetry public Agency findById(String id) { return getAgency(byId(id), null).first(); } @Override @MongoRetry public void saveForValidation(Agency agency) { unvalidatedAgencyCollection.insertOne((AgencyImpl) agency); } @Override @MongoRetry public AgencyImpl findByIdIncludingUnverified(ObjectId id, String... fields) { final Document projection = fields == null ? null : include(fields); final AgencyImpl hc = getAgency(byId(id), projection).first(); return hc == null ? getUnvalidatedAgency(byId(id), projection).first() : hc; } @Override public AgencyImpl findByIdIncludingUnverified(String id, String... fields) { return findByIdIncludingUnverified(oid(id), fields); } private AggregateIterable<AgencyImpl> getAgency(Bson query, Bson projection){ return agencyCollection.aggregate(joinCreatedAndStatus(query, projection)); } private AggregateIterable<AgencyImpl> getUnvalidatedAgency(Bson query, Bson projection){ return unvalidatedAgencyCollection.aggregate(joinCreatedAndStatus(query, projection)); } }
[ "kiplnet13@konstantinfosolutions.com" ]
kiplnet13@konstantinfosolutions.com
9fbaf01ae550c47022b5c820181c3de91827a155
38f0f0562d62c449e77b8f890d33b74f2dc053eb
/PenTest-master/app/src/test/java/com/xiang/pentest/ExampleUnitTest.java
c97f95bbab00875a3079a9d07528148dfbfe918e
[ "Apache-2.0" ]
permissive
xiang-lab/JetpackLearning
17f91b451681087b81ec95cec7a4184f01f1eb1d
fb56524f7751665c3071e9b99d11b275eaab9de2
refs/heads/master
2020-05-23T12:44:13.737699
2019-05-21T03:40:53
2019-05-21T03:40:53
186,763,706
0
0
null
null
null
null
UTF-8
Java
false
false
378
java
package com.xiang.pentest; 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); } }
[ "13584838039@163.com" ]
13584838039@163.com
aae875b73deedbc9f3c738e4bc76811cb6480a1e
45e899862afb72ee52f1afa4ac8d7d3c7ea9f30a
/src/test/java/com/ddf/myapp/service/mapper/UserMapperTest.java
3948cf11a9010fe1f8138144e0ebe65e74a6ea50
[]
no_license
KoudjaDany/jhipster-sample-application
20c7bc6e1ff604b2e0f592692d42b00e4cae43b8
93741698e56831d4f076578e4a0371843a1119bf
refs/heads/master
2022-12-21T04:00:41.872910
2020-02-05T14:38:37
2020-02-05T14:38:37
238,471,752
0
0
null
2022-12-16T04:43:50
2020-02-05T14:38:22
Java
UTF-8
Java
false
false
4,311
java
package com.ddf.myapp.service.mapper; import com.ddf.myapp.domain.User; import com.ddf.myapp.service.dto.UserDTO; import org.apache.commons.lang3.RandomStringUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import static org.assertj.core.api.Assertions.assertThat; /** * Unit tests for {@link UserMapper}. */ public class UserMapperTest { private static final String DEFAULT_LOGIN = "johndoe"; private static final Long DEFAULT_ID = 1L; private UserMapper userMapper; private User user; private UserDTO userDto; @BeforeEach public void init() { userMapper = new UserMapper(); user = new User(); user.setLogin(DEFAULT_LOGIN); user.setPassword(RandomStringUtils.random(60)); user.setActivated(true); user.setEmail("johndoe@localhost"); user.setFirstName("john"); user.setLastName("doe"); user.setImageUrl("image_url"); user.setLangKey("en"); userDto = new UserDTO(user); } @Test public void usersToUserDTOsShouldMapOnlyNonNullUsers() { List<User> users = new ArrayList<>(); users.add(user); users.add(null); List<UserDTO> userDTOS = userMapper.usersToUserDTOs(users); assertThat(userDTOS).isNotEmpty(); assertThat(userDTOS).size().isEqualTo(1); } @Test public void userDTOsToUsersShouldMapOnlyNonNullUsers() { List<UserDTO> usersDto = new ArrayList<>(); usersDto.add(userDto); usersDto.add(null); List<User> users = userMapper.userDTOsToUsers(usersDto); assertThat(users).isNotEmpty(); assertThat(users).size().isEqualTo(1); } @Test public void userDTOsToUsersWithAuthoritiesStringShouldMapToUsersWithAuthoritiesDomain() { Set<String> authoritiesAsString = new HashSet<>(); authoritiesAsString.add("ADMIN"); userDto.setAuthorities(authoritiesAsString); List<UserDTO> usersDto = new ArrayList<>(); usersDto.add(userDto); List<User> users = userMapper.userDTOsToUsers(usersDto); assertThat(users).isNotEmpty(); assertThat(users).size().isEqualTo(1); assertThat(users.get(0).getAuthorities()).isNotNull(); assertThat(users.get(0).getAuthorities()).isNotEmpty(); assertThat(users.get(0).getAuthorities().iterator().next().getName()).isEqualTo("ADMIN"); } @Test public void userDTOsToUsersMapWithNullAuthoritiesStringShouldReturnUserWithEmptyAuthorities() { userDto.setAuthorities(null); List<UserDTO> usersDto = new ArrayList<>(); usersDto.add(userDto); List<User> users = userMapper.userDTOsToUsers(usersDto); assertThat(users).isNotEmpty(); assertThat(users).size().isEqualTo(1); assertThat(users.get(0).getAuthorities()).isNotNull(); assertThat(users.get(0).getAuthorities()).isEmpty(); } @Test public void userDTOToUserMapWithAuthoritiesStringShouldReturnUserWithAuthorities() { Set<String> authoritiesAsString = new HashSet<>(); authoritiesAsString.add("ADMIN"); userDto.setAuthorities(authoritiesAsString); User user = userMapper.userDTOToUser(userDto); assertThat(user).isNotNull(); assertThat(user.getAuthorities()).isNotNull(); assertThat(user.getAuthorities()).isNotEmpty(); assertThat(user.getAuthorities().iterator().next().getName()).isEqualTo("ADMIN"); } @Test public void userDTOToUserMapWithNullAuthoritiesStringShouldReturnUserWithEmptyAuthorities() { userDto.setAuthorities(null); User user = userMapper.userDTOToUser(userDto); assertThat(user).isNotNull(); assertThat(user.getAuthorities()).isNotNull(); assertThat(user.getAuthorities()).isEmpty(); } @Test public void userDTOToUserMapWithNullUserShouldReturnNull() { assertThat(userMapper.userDTOToUser(null)).isNull(); } @Test public void testUserFromId() { assertThat(userMapper.userFromId(DEFAULT_ID).getId()).isEqualTo(DEFAULT_ID); assertThat(userMapper.userFromId(null)).isNull(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
ae78b31e7eb1cdb0d88f563ee205eabe5141dea5
d6db66f467e255de69fe254db92e667cc972407a
/src/gen/java/io/swagger/api/UserApiService.java
5e547557ecfe0faeeca6f863b898d5e1157688f0
[ "Apache-2.0" ]
permissive
Clash-of-meme/ServiceDuel
0b6b5aab9e0f23065d8965433e6ab945fd540069
353ca1fce737d90a271ad83c7a7807a2d9fee453
refs/heads/master
2021-01-12T09:31:30.027035
2016-12-11T19:31:43
2016-12-11T19:31:43
76,180,622
0
0
null
2016-12-11T19:31:44
2016-12-11T14:50:36
Java
UTF-8
Java
false
false
644
java
package io.swagger.api; import io.swagger.api.*; import io.swagger.model.*; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import io.swagger.model.Duel; import java.util.List; import io.swagger.api.NotFoundException; import java.io.InputStream; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-12-11T15:09:34.277Z") public abstract class UserApiService { public abstract Response userLoginDuelGet(String login,SecurityContext securityContext) throws NotFoundException; }
[ "briand.guillaume@outlook.fr" ]
briand.guillaume@outlook.fr
fa9da22e255a2a85f727ffbf302982e2342e93dd
ad1cd7c6af1dfcaccedc57655c369844defbb60f
/POO-2017-Joao-Victor/Atividade A/src/Cap3Q4.java
a9c02592ce91141e5fc41b456a93c5404b1189fe
[]
no_license
joviSO/POO-2017-Joao-Victor
13a568d9c43550d89c8aa1b6a3d5025408796232
b2a01d081590b362789eb13b4455d5c664a6aa55
refs/heads/master
2021-08-08T06:09:39.249482
2017-11-09T18:05:09
2017-11-09T18:05:09
110,013,017
0
0
null
null
null
null
UTF-8
Java
false
false
247
java
import java.util.Scanner; public class Cap3Q4 { public static void main(String[] args){ int maximo = 10; int minimo = 1; Scanner scan = new Scanner(System.in); int numero = scan.nextInt(); System.out.println(numero); } }
[ "levelupdojoao@hotmail.com" ]
levelupdojoao@hotmail.com
52826432258e9ec1debe108b05aa6ce45a9388fe
0721305fd9b1c643a7687b6382dccc56a82a2dad
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/com/crashlytics/android/answers/C9275h.java
a907b444dddc2363539cb6e4836b7ee3fc5b1c7a
[]
no_license
a2en/Zenly_re
09c635ad886c8285f70a8292ae4f74167a4ad620
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
refs/heads/master
2020-12-13T17:07:11.442473
2020-01-17T04:32:44
2020-01-17T04:32:44
234,470,083
1
0
null
null
null
null
UTF-8
Java
false
false
1,385
java
package com.crashlytics.android.answers; import android.app.Activity; import android.os.Bundle; import p389io.fabric.sdk.android.C12149a.C12152b; /* renamed from: com.crashlytics.android.answers.h */ class C9275h extends C12152b { /* renamed from: a */ private final C9298z f24102a; /* renamed from: b */ private final BackgroundManager f24103b; public C9275h(C9298z zVar, BackgroundManager backgroundManager) { this.f24102a = zVar; this.f24103b = backgroundManager; } /* renamed from: a */ public void mo24999a(Activity activity) { } /* renamed from: a */ public void mo25000a(Activity activity, Bundle bundle) { } /* renamed from: b */ public void mo25001b(Activity activity) { this.f24102a.mo25035a(activity, C9260c.PAUSE); this.f24103b.mo24946a(); } /* renamed from: b */ public void mo25002b(Activity activity, Bundle bundle) { } /* renamed from: c */ public void mo25003c(Activity activity) { this.f24102a.mo25035a(activity, C9260c.RESUME); this.f24103b.mo24949b(); } /* renamed from: d */ public void mo25004d(Activity activity) { this.f24102a.mo25035a(activity, C9260c.START); } /* renamed from: e */ public void mo25005e(Activity activity) { this.f24102a.mo25035a(activity, C9260c.STOP); } }
[ "developer@appzoc.com" ]
developer@appzoc.com
165318857b6b690b76265f4ba689985e6bdfacf5
0ed417d3bf8562ec42da0a9847d4363ccb7099f1
/javasdk/src/main/java/com/paydock/javasdk/Models/ChargeRequestBase.java
adef03fc1887f57c0993f76bff0356a1c00cc7dc
[ "MIT" ]
permissive
prediator/paydock_java_sdk
b9c5395eabd7504743f7c5fa73f3973a57a636ed
9fcc33c747026f5447f4f4957782398c20971540
refs/heads/master
2021-09-11T23:44:31.311818
2018-04-13T07:11:53
2018-04-13T07:11:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
358
java
package com.paydock.javasdk.Models; import java.math.BigDecimal; abstract class ChargeRequestBase { public BigDecimal amount; public String currency; public String token; public String reference; public String description; public String customer_id; public String payment_source_id; public Customer customer; }
[ "markncardamis@gmail.com" ]
markncardamis@gmail.com
d30fcf2cab52abc2ea0b503b0423899f1a6760e7
1e8dd8c983651b8d2fb12f1c80f9833b7041c24a
/src/main/java/com/assignment/poc/repo/TransferSalaryRepository.java
662ba913b6bd8ede8d43f9f2877cc35a48108425
[]
no_license
Pointerasad/AssignmentProject-Employee-salary-calculation-
d44951ab6447a70efd7cf04be0d68411f71c7949
684fe9caadc50d016ae934b4bf580cc0056edcc8
refs/heads/main
2023-01-31T07:02:58.006209
2020-12-17T17:11:45
2020-12-17T17:11:45
322,359,284
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
package com.assignment.poc.repo; import com.assignment.poc.domain.TransferSalary; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; /** * Created by User on 12/16/2020. */ @Repository public interface TransferSalaryRepository extends JpaRepository<TransferSalary,Integer>{ }
[ "asadoraclebd7@gmail.com" ]
asadoraclebd7@gmail.com
f0a758ce4ff7005f61e5312d4e43514a5c1dea09
43cfdd7b41d26063b185fa74fa6565bb85efc98d
/project-springmvc2/src/main/java/com/saick/base/tag/RefererURLTag.java
599e6980e84d0ed0ab11b494b32f3db7c8941306
[]
no_license
liubao19860416/project-springmvc2
6cdd8a74cf054e3072bff04c9b082a16b0c4f2f2
e2444d0c1e1e00fe05b6e273ba3b0eeded948046
refs/heads/master
2021-01-10T08:12:11.931126
2015-10-25T04:55:55
2015-10-25T04:55:55
44,896,987
0
0
null
null
null
null
UTF-8
Java
false
false
2,436
java
๏ปฟpackage com.saick.base.tag; import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.jsp.JspException; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.SkipPageException; import javax.servlet.jsp.tagext.SimpleTagSupport; /** * ้˜ฒ็›—้“พๆŽฅ็š„่‡ชๅฎšไน‰ๆ ‡็ญพ:ๅฟ…้กป้€š่ฟ‡ๆŒ‡ๅฎš้กต้ข,ๆ‰่ƒฝ่ฎฟ้—ฎๆŒ‡ๅฎš่ต„ๆบ; site="http://localhost":่กจ็คบๅฏไปฅ่ฎฟ้—ฎ็š„็ฝ‘็ซ™ๅœฐๅ€ * page="/index.jsp":่กจ็คบไธๅฏไปฅ่ฎฟ้—ฎ็š„่ฟžๆŽฅไธป้กต * */ public class RefererURLTag extends SimpleTagSupport { private String site;// ้˜ฒ็›—้“พ่ง„ๅˆ™(ๅผ€ๅง‹็ฝ‘็ซ™ๅœฐๅ€) private String page;// ้ป˜่ฎค่ทณ่ฝฌไธป้กต public void setSite(String site) { this.site = site; } public void setPage(String page) { this.page = page; } @Override public void doTag() throws JspException, IOException { PageContext pageContext = (PageContext) getJspContext(); HttpServletRequest request = (HttpServletRequest) pageContext .getRequest(); HttpServletResponse response = (HttpServletResponse) pageContext .getResponse(); String referer = request.getHeader("Referer"); System.out.println("่ฎพ็ฝฎ็š„้˜ฒ็›—้“พ็ฝ‘ๅ€ๅผ€ๅคด[site]็š„ๆ ผๅผไธบ1:" + site); if (referer == null || !referer.startsWith(site)) { System.out.println("ๆ‚จ็š„refererๅœฐๅ€ๆ˜ฏ:[" + referer + "],ไธ่ƒฝๅคŸ็›ดๆŽฅ่ฎฟ้—ฎ!่‡ชๅŠจ่ทณ่ฝฌๅˆฐๆŒ‡ๅฎš็š„" + page + "้กต้ข"); if (page.startsWith(request.getContextPath())) { System.out.println("page็š„ๆ ผๅผไธบ1:" + page); response.sendRedirect(page); // return; } else if (page.startsWith("/")) { System.out.println("page็š„ๆ ผๅผไธบ2:" + page); response.sendRedirect(request.getContextPath() + page); // return; } else { System.out.println("page็š„ๆ ผๅผไธบ3:" + page); response.sendRedirect(request.getContextPath() + "/" + page); // return; } // System.out.println("ๆ‚จ็š„refererๅœฐๅ€ๆ˜ฏ:[" + referer // + "],็ฌฆๅˆ่ง„ๅˆ™,่‡ชๅŠจ่ทณ่ฝฌๅˆฐๆŒ‡ๅฎš่ต„ๆบ!"); throw new SkipPageException(); } } }
[ "18611478781@163.com" ]
18611478781@163.com
87761b281ae8011859a0d950a10d98369bd2ba31
b5781534ca150aacdd2f66bd970e05d8708cd1b8
/src/test/java/org/king2/log/ExceptionLogTest.java
e29c7d374017075adbae72e10dd02ef8e86c4801
[]
no_license
HelloMr-Liu/log-server
13b0cd21c5b3d2c6c0ab532c0987f64448e461f6
15b2b4605885628e104632ae182239cfd401a508
refs/heads/master
2023-04-16T05:18:35.354107
2021-04-28T11:51:23
2021-04-28T11:51:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
825
java
package org.king2.log; import org.junit.Test; import org.junit.runner.RunWith; import org.king2.log.utils.AddressUtils; import org.king2.log.utils.ApplicationUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import javax.servlet.http.HttpServletRequest; /** * ๆ่ฟฐ: ESๅฎขๆˆท็ซฏๆต‹่ฏ• * * @author ๅˆ˜ๆข“ๆฑŸ * @Date 2021/3/19 14:15 */ @SpringBootTest @RunWith(SpringRunner.class) public class ExceptionLogTest { private final Logger logger= LoggerFactory.getLogger(ExceptionLogTest.class); @Autowired private HttpServletRequest request; @Test public void logPrint() throws Exception{ } }
[ "777777777@qq.com" ]
777777777@qq.com
cf3948dda793fe4887524aa83f2d8c5be8f03050
32144d689928eee01d8c70849cd57c5fe98438d4
/project/project-db/src/main/java/com/netcracker/edu/project/repository/ParticipantRepositoryImpl.java
7a230f94346186508032fba4362dcd354d92a352
[]
no_license
freeeeeman1/online-code-editor
10bf047aaecf6dc4e014ddb8ee14236079db38a9
f67b9fd60547cf012c60a669d7110dd32f7ef795
refs/heads/master
2023-03-18T09:40:54.285573
2021-02-25T10:34:45
2021-02-25T10:34:45
342,207,127
0
0
null
null
null
null
UTF-8
Java
false
false
3,133
java
package com.netcracker.edu.project.repository; import com.netcracker.edu.auth.pool.ConnectionPool; import com.netcracker.edu.project.user.project.Participation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import static com.netcracker.edu.project.database.SqlRequests.ADD_PARTICIPANT; import static com.netcracker.edu.project.database.SqlRequests.DELETE_PARTICIPANT; import static com.netcracker.edu.project.database.SqlRequests.UPDATE_PARTICIPANT; public class ParticipantRepositoryImpl implements ParticipantRepository { static final Logger LOGGER = LoggerFactory.getLogger(ParticipantRepositoryImpl.class); private final ConnectionPool connectionPool; public ParticipantRepositoryImpl(ConnectionPool connectionPool) { this.connectionPool = connectionPool; } @Override public void addParticipant(String projectName, String username, Participation participation) { Connection connection = connectionPool.getConnection(); try (PreparedStatement preparedStatement = connection.prepareStatement(ADD_PARTICIPANT)) { preparedStatement.setString(1, projectName); preparedStatement.setString(2, username); preparedStatement.setBoolean(3, participation.isActivated()); preparedStatement.setString(4, participation.getPermission().toString()); preparedStatement.executeUpdate(); } catch (SQLException e) { LOGGER.error("Participant {} has not been added", username, e); } finally { connectionPool.releaseConnection(connection); } } @Override public void deleteParticipant(String projectName, String username) { Connection connection = connectionPool.getConnection(); try (PreparedStatement preparedStatement = connection.prepareStatement(DELETE_PARTICIPANT)) { preparedStatement.setString(1, projectName); preparedStatement.setString(2, username); preparedStatement.executeUpdate(); } catch (SQLException e) { LOGGER.error("Participant {} has not been deleted", username, e); } finally { connectionPool.releaseConnection(connection); } } @Override public void updateParticipant(String projectName, String username, Participation participation) { Connection connection = connectionPool.getConnection(); try (PreparedStatement preparedStatement = connection.prepareStatement(UPDATE_PARTICIPANT)) { preparedStatement.setBoolean(1, participation.isActivated()); preparedStatement.setString(2, participation.getPermission().toString()); preparedStatement.setString(3, projectName); preparedStatement.setString(4, username); preparedStatement.executeUpdate(); } catch (SQLException e) { LOGGER.error("Participant {} has not been updated", username, e); } finally { connectionPool.releaseConnection(connection); } } }
[ "work.smolyakov.vadim@gmail.com" ]
work.smolyakov.vadim@gmail.com
b3845a76315740476d52f2e2424a713f4c3579ff
2f33c9ef456aa2eedbde3eab924562dfdd856b8f
/src/main/java/com/jacky/register/config/EmailConfig.java
9893791d2ca95e04b78cf465d8dc80c889e48bb7
[]
no_license
Goodjooy/RegisterWeb
70740db109bb1338c779cec60e3558a9f351ad87
da50dd8c7c69e164a7f887879690338c49136f0b
refs/heads/main
2023-04-18T19:22:12.471621
2021-05-06T16:13:24
2021-05-06T16:13:24
350,277,685
0
0
null
2021-04-24T08:46:36
2021-03-22T09:11:11
Java
UTF-8
Java
false
false
1,193
java
package com.jacky.register.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.mail.javamail.JavaMailSender; import org.springframework.mail.javamail.JavaMailSenderImpl; import javax.net.ssl.SSLSocketFactory; @Configuration public class EmailConfig { @Bean public JavaMailSender getMailSender() { JavaMailSenderImpl mailSender = new JavaMailSenderImpl(); mailSender.setHost("smtp.126.com"); mailSender.setPort(465); mailSender.setUsername("imagestorage@126.com"); mailSender.setPassword("SSTQDRCILQUPBDQB"); mailSender.setDefaultEncoding("UTF-8"); var props = mailSender.getJavaMailProperties(); props.put("mail.transport.protocol", "smtps"); props.put("mail.smtp.auth", "true"); props.put("mail.smtp.starttls.enable", "true"); props.put("mail.debug", "true"); props.put("mail.smtp.socketFactory.port", 465); props.put("mail.smtp.socketFactory.class", SSLSocketFactory.class); props.put("mail.smtp.socketFactory.fallback", false); return mailSender; } }
[ "964413011@qq.com" ]
964413011@qq.com
351e13d337821affc01db8ee919308abb84ef3cc
2e92e30f7a0e49439e8e5cf7c790069278a1a5ae
/src/main/java/cc/royao/commons/weixinpay/RequestUtil.java
909bdb68f9c0066f9264aca9fed1ff4816f4f156
[]
no_license
libiao5320/wx_shop
fdaaa1fdab5dcbd08d6791fdc6225e1702e1c770
f73133b88acff814a8213283a29de091a89d14c4
refs/heads/master
2020-04-08T11:26:55.802352
2018-11-27T09:16:46
2018-11-27T09:16:46
159,306,356
0
0
null
null
null
null
UTF-8
Java
false
false
2,412
java
package cc.royao.commons.weixinpay; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import org.apache.commons.httpclient.util.HttpURLConnection; public class RequestUtil { public static String getOut(java.net.HttpURLConnection conn) throws IOException{ if (conn.getResponseCode() != HttpURLConnection.HTTP_OK) { return null; } // ่Žทๅ–ๅ“ๅบ”ๅ†…ๅฎนไฝ“ BufferedReader in = new BufferedReader(new InputStreamReader( conn.getInputStream(), "UTF-8")); String line = ""; StringBuffer strBuf = new StringBuffer(); while ((line = in.readLine()) != null) { strBuf.append(line).append("\n"); } in.close(); return strBuf.toString().trim(); } public static String SendGET(String url,String param){ String result="";//่ฎฟ้—ฎ่ฟ”ๅ›ž็ป“ๆžœ BufferedReader read=null;//่ฏปๅ–่ฎฟ้—ฎ็ป“ๆžœ try { //ๅˆ›ๅปบurl URL realurl=new URL(url+"?"+param); //ๆ‰“ๅผ€่ฟžๆŽฅ URLConnection connection=realurl.openConnection(); // ่ฎพ็ฝฎ้€š็”จ็š„่ฏทๆฑ‚ๅฑžๆ€ง connection.setRequestProperty("accept", "*/*"); connection.setRequestProperty("connection", "Keep-Alive"); connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); //ๅปบ็ซ‹่ฟžๆŽฅ connection.connect(); // ่Žทๅ–ๆ‰€ๆœ‰ๅ“ๅบ”ๅคดๅญ—ๆฎต // Map<String, List<String>> map = connection.getHeaderFields(); // ้ๅކๆ‰€ๆœ‰็š„ๅ“ๅบ”ๅคดๅญ—ๆฎต๏ผŒ่Žทๅ–ๅˆฐcookies็ญ‰ // for (String key : map.keySet()) { // System.out.println(key + "--->" + map.get(key)); // } // ๅฎšไน‰ BufferedReader่พ“ๅ…ฅๆตๆฅ่ฏปๅ–URL็š„ๅ“ๅบ” read = new BufferedReader(new InputStreamReader( connection.getInputStream(),"UTF-8")); String line;//ๅพช็Žฏ่ฏปๅ– while ((line = read.readLine()) != null) { result += line; } } catch (IOException e) { e.printStackTrace(); }finally{ if(read!=null){//ๅ…ณ้—ญๆต try { read.close(); } catch (IOException e) { e.printStackTrace(); } } } return result; } }
[ "libiao_com@aliyun.com" ]
libiao_com@aliyun.com