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
8531b3dedf035b28197030347f6b07b61cdea59b
9c3ea1b85f90a83af7275eb4ad194513098fdd00
/stu_entity/src/main/java/com/qf/entity/StuEntity.java
77f82446e8592398d8525dea9203fc8c32f366bf
[]
no_license
OneProbie/sbd_student
7e554092bec931c3861bba4fe2b2e3f6d32fa9e9
83d2a06ef523658020508902d0046eb55e00938b
refs/heads/master
2020-09-22T00:19:33.105884
2019-12-01T10:12:59
2019-12-01T10:12:59
224,984,213
2
0
null
null
null
null
UTF-8
Java
false
false
758
java
package com.qf.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; @Data @AllArgsConstructor @NoArgsConstructor @Accessors(chain = true) @TableName("t_student") public class StuEntity implements Serializable { @TableId(type = IdType.AUTO) private Integer sid; private String sname; private String spwd; private Integer sage; private Integer cid; @TableField(exist = false) private ClassEntity cla; }
[ "904708861@qq.com" ]
904708861@qq.com
b99b69855610776ba86da72fb70ec9b12e555133
ee598ead01a0cafba788dd0455c5dd5008f53451
/FreightHelper-dirver/FreightHelper-driver/cldOlsHuoyun/src/main/java/com/yunbaba/ols/api/CldKCallNaviAPI.java
f4b6914e8a0bd83babb80ad6b71a9b754ae450c9
[]
no_license
zhaoqingyue/FreightHelper-dirver
4316a0128f6285563587cad9c2c41003ba62dbf2
783cc566ada72e2247f9959b01e4878d3df26224
refs/heads/master
2020-04-04T10:58:02.203109
2018-11-07T13:47:46
2018-11-07T13:47:46
155,873,975
1
2
null
null
null
null
UTF-8
Java
false
false
8,780
java
/* * @Title CldKCallNaviAPI.java * @Copyright Copyright 2010-2014 Careland Software Co,.Ltd All Rights Reserved. * @Description * @author Zhouls * @date 2015-1-6 9:03:57 * @version 1.0 */ package com.yunbaba.ols.api; import java.util.List; import com.yunbaba.ols.api.CldOlsInit.ICldOlsInitListener; import com.yunbaba.ols.bll.CldKCallNavi; import com.yunbaba.ols.bll.CldKMessage; import com.yunbaba.ols.dal.CldDalKCallNavi; import com.yunbaba.ols.sap.bean.CldSapKMParm.ShareAKeyCallParm; import com.yunbaba.ols.tools.CldSapReturn; /** * 一键通相关模块,提供一键通相关功能 * * @author Zhouls * @date 2015-3-5 下午3:18:44 */ public class CldKCallNaviAPI { /** 一键通回调监听,初始化时设置一次 */ private ICldKCallNaviListener listener; private static CldKCallNaviAPI cldKCallNaviAPI; private CldKCallNaviAPI() { } public static CldKCallNaviAPI getInstance() { if (null == cldKCallNaviAPI) { cldKCallNaviAPI = new CldKCallNaviAPI(); } return cldKCallNaviAPI; } /** * 初始化密钥 * * @param listener * @return void * @author Zhouls * @date 2015-2-12 下午6:05:49 */ public void initKey(final ICldOlsInitListener listener) { new Thread(new Runnable() { @Override public void run() { CldKCallNavi.getInstance().initKey(); if (null != listener) { listener.onInitReslut(); } } }).start(); } /** * 一键通初始化(登陆后调用) * * @return void * @author Zhouls * @date 2015-3-5 下午3:19:06 */ public void init() { new Thread(new Runnable() { @Override public void run() { CldKCallNavi.getInstance().getBindMobile(); } }).start(); } /** * 反初始化 * * @return void * @author Zhouls * @date 2015-3-5 下午3:19:19 */ public void uninit() { } /** * 设置一键通回调监听 * * @param listener * 一键通回调 * @return (0 设置成功,-1已有设置失败) * @return int * @author Zhouls * @date 2015-3-5 下午3:19:30 */ public int setCldKCallNaviListener(ICldKCallNaviListener listener) { if (null == this.listener) { this.listener = listener; return 0; } else { return -1; } } /** * 获取绑定手机号码 * * @return void * @author Zhouls * @date 2015-3-5 下午3:19:45 */ public void getBindMobile() { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKCallNavi.getInstance() .getBindMobile(); if (null != listener) { listener.onGetBindMobileResult(errRes.errCode); } } }).start(); } /** * 获取一键通手机验证码 * * @param mobile * 手机号 * @return void * @author Zhouls * @date 2015-3-5 下午3:19:54 */ public void getIdentifycode(final String mobile) { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKCallNavi.getInstance() .getIdentifycode(mobile); if (null != listener) { listener.onGetIdentifycodeResult(errRes.errCode); } } }).start(); } /** * 绑定其他手机号接口 * * @param identifycode * 验证码 * @param mobile * 手机号码 * @param replacemobile * 需要替换掉的旧号码 ,不为空则替换相应号码;为空则增加mobile * @return void * @author Zhouls * @date 2015-3-5 下午3:20:07 */ public void bindToMobile(final String identifycode, final String mobile, final String replacemobile) { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKCallNavi.getInstance().bindToMobile( identifycode, mobile, replacemobile); if (null != listener) { listener.onBindToMobileResult(errRes.errCode); } } }).start(); } /** * 上报位置 * * @param mobile * 手机号,如为空,则按kuid绑定的所有手机号都上报位置 * @param longitude * WGS84 经度,单位:度 * @param latitude * WGS84 纬度,单位:度 * @return void * @author Zhouls * @date 2015-3-5 下午3:20:23 */ public void upLocation(final String mobile, final double longitude, final double latitude) { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKMessage.getInstance().upLocation( mobile, longitude, latitude); if (null != listener) { listener.onUpLocationResult(errRes.errCode); } } }).start(); } /** * 获取一键通消息 * * @param mobile * 手机号,如果传了手机号,则只会查询指定的手机号,否则轮循所有手机号 * @param longitude * WGS84 经度,单位:度 * @param latitude * WGS84 纬度,单位:度 * @param isLoop * 是否轮询多个手机号 * @return void * @author Zhouls * @date 2015-3-5 下午3:20:39 */ public void recPptMsg(final String mobile, final double longitude, final double latitude, final boolean isLoop) { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKMessage.getInstance().recPptMsg( mobile, longitude, latitude, isLoop); if (null != listener) { listener.onRecPptMsgResult(errRes.errCode, CldDalKCallNavi .getInstance().getMsgList()); } } }).start(); } /** * 注册一键通帐号 * * @return void * @author Zhouls * @date 2015-3-5 下午3:20:53 */ public void registerByKuid() { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKCallNavi.getInstance() .registerByKuid(); if (null != listener) { listener.onRegisterResult(errRes.errCode); } } }).start(); } /** * 删除绑定手机号 * * @param mobile * 手机号码 * @return void * @author Zhouls * @date 2015-3-5 下午3:21:03 */ public void delBindMobile(final String mobile) { new Thread(new Runnable() { @Override public void run() { CldSapReturn errRes = CldKCallNavi.getInstance().delBindMobile( mobile); if (null != listener) { listener.onDelMobileResult(errRes.errCode); } } }).start(); } /** * 获取绑定的手机号 * * @return * @return String 之前调用过获取绑定手机号码则返回之前的号码,否则返回null 再调用获取绑定手机号接口 * @author Zhouls * @date 2015-3-5 下午3:21:17 */ public String getPptMobile() { if (CldDalKCallNavi.getInstance().getMobiles().size() > 0) { return CldDalKCallNavi.getInstance().getMobiles().get(0); } else { return null; } } /** * 获取绑定的手机号列表 * * @return * @return List<String> * @author Zhouls * @date 2015-3-5 下午3:21:37 */ public List<String> getPptMobileList() { return CldDalKCallNavi.getInstance().getMobiles(); } /** * 更新绑定的手机号 * * @param mobiles * 更新的手机号 * @return void * @author Zhouls * @date 2015-3-5 下午3:21:49 */ public void updateBindMobile(List<String> mobiles) { CldDalKCallNavi.getInstance().setMobiles(mobiles); } /** * 一键通回调监听 * * @author Zhouls * @date 2015-3-5 下午3:22:04 */ public static interface ICldKCallNaviListener { /** * 注册一键通回调 * * @param errCode * @return void * @author Zhouls * @date 2015-3-5 下午3:22:16 */ public void onRegisterResult(int errCode); /** * 获取绑定手机号码回调 * * @param errCode * @return void * @author Zhouls * @date 2015-3-5 下午3:22:29 */ public void onGetBindMobileResult(int errCode); /** * 获取一键通手机验证码回调 * * @param errCode * @return void * @author Zhouls * @date 2015-3-5 下午3:22:38 */ public void onGetIdentifycodeResult(int errCode); /** * 绑定其他手机号回调 * * @param errCode * 0成功 405验证码错误 * @return void * @author Zhouls * @date 2015-3-5 下午3:22:47 */ public void onBindToMobileResult(int errCode); /** * 删除手机号回调 * * @param errCode * @return void * @author Zhouls * @date 2015-3-5 下午3:23:10 */ public void onDelMobileResult(int errCode); /** * 上报位置回调 * * @param errCode * @return void * @author Zhouls * @date 2015-3-5 下午3:23:19 */ public void onUpLocationResult(int errCode); /** * 接收一键通消息回调 * * @param errCode * @param list * @return void * @author Zhouls * @date 2015-3-5 下午3:23:29 */ public void onRecPptMsgResult(int errCode, List<ShareAKeyCallParm> list); } }
[ "1023755730@qq.com" ]
1023755730@qq.com
d8fd6fbc4f780f4df45e580de5d22a577943a6b0
521a50c633d6f7f24a825069e2e174ed716a87d8
/hibernate-assistant/src/test/java/idv/hsiehpinghan/hibernateassistant/assistant/SelectBeforeUpdateTest.java
b3e79e3274a1b36ef7fa3967041c56e66b537fd0
[]
no_license
ak826843/assistant
5e0bbf3951a117a1e1434026cc2e0d24da1c0564
536320faeb7ed2dff8ae84aebfead7a7b01468b8
refs/heads/master
2021-01-23T03:53:07.636722
2016-03-09T06:22:54
2016-03-09T06:22:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,729
java
package idv.hsiehpinghan.hibernateassistant.assistant; import idv.hsiehpinghan.hibernateassistant.entity.SelectBeforeUpdateEntity; import idv.hsiehpinghan.hibernateassistant.service.SelectBeforeUpdateService; import idv.hsiehpinghan.hibernateassistant.suit.TestngSuitSetting; import org.hibernate.stat.Statistics; import org.springframework.context.ApplicationContext; import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; public class SelectBeforeUpdateTest { private final Integer INTEGER = Integer.valueOf(0); private final String STRING = "string"; private SelectBeforeUpdateService service; private SelectBeforeUpdateEntity entity; @BeforeClass public void beforeClass() { ApplicationContext applicationContext = TestngSuitSetting .getApplicationContext(); service = applicationContext.getBean(SelectBeforeUpdateService.class); entity = generateSelectBeforeUpdateEntity(); service.save(entity); } @Test public void selectBeforeUpdateNoChange() { service.selectBeforeUpdateNoChange(entity); Assert.assertEquals(service.getStatistics().getEntityUpdateCount(), 0); } @Test(dependsOnMethods = { "selectBeforeUpdateNoChange" }) public void selectBeforeUpdateWithChange() { entity.setString("selectBeforeUpdateWithChange"); service.selectBeforeUpdateWithChange(entity); Statistics statistics = service.getStatistics(); Assert.assertEquals(statistics.getEntityUpdateCount(), 1); } private SelectBeforeUpdateEntity generateSelectBeforeUpdateEntity() { SelectBeforeUpdateEntity entity = new SelectBeforeUpdateEntity(); entity.setId(System.nanoTime()); entity.setInteger(INTEGER); entity.setString(STRING); return entity; } }
[ "thank.hsiehpinghan@gmail.com" ]
thank.hsiehpinghan@gmail.com
55678801728e3cc063ac5df71575352ae703a0f2
4a3731a2599ec93af6df11a0fe0b94a737f9dc32
/src/main/java/jp/vmi/selenium/selenese/command/ClickAt.java
6e0f01e92b30bdc3b768cd9ab8b3d9979620bf94
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
vmi/selenese-runner-java
0f0ba5174d19c75ee291aedad76d65d42c7dfd26
6544987e64389201f8fce64e7a7c38227c3f0215
refs/heads/master
2023-06-23T05:09:36.197770
2023-03-23T02:59:18
2023-03-23T02:59:18
5,065,618
121
90
NOASSERTION
2023-06-14T22:51:26
2012-07-16T09:53:49
Java
UTF-8
Java
false
false
1,334
java
package jp.vmi.selenium.selenese.command; import org.openqa.selenium.Point; import jp.vmi.selenium.selenese.Context; import jp.vmi.selenium.selenese.result.Result; import jp.vmi.selenium.selenese.utils.MouseUtils; import static jp.vmi.selenium.selenese.command.ArgumentType.*; import static jp.vmi.selenium.selenese.result.Success.*; /** * Command "clickAt". */ public class ClickAt extends AbstractCommand { private static final int ARG_LOCATOR = 0; private static final int ARG_COORD = 1; ClickAt(int index, String name, String... args) { super(index, name, args, LOCATOR, VALUE); } private static Point coordToPoint(String coordString) { if (coordString.isEmpty()) return new Point(0, 0); String[] pair = coordString.trim().split("\\s*,\\s*"); int x = (int) Double.parseDouble(pair[0]); int y = (int) Double.parseDouble(pair[1]); return new Point(x, y); } @Override protected Result executeImpl(Context context, String... curArgs) { String locator = curArgs[ARG_LOCATOR]; Point coord = coordToPoint(curArgs[ARG_COORD]); return ClickHandler.handleClick(context, locator, element -> { MouseUtils.moveTo(context, element, coord).click().perform(); return SUCCESS; }); } }
[ "vmi@nifty.com" ]
vmi@nifty.com
702e189115c2f2168af07ae2e4ad2ecb2e3f4fa5
cb6d7d40375decc687ba1203ae645269faa5fcb4
/Tutorial/app/src/main/java/backend/Registration.java
0d1025dd7dd8cfd5f10e566e60e2539419e58dc0
[]
no_license
Emr03/TravisCITutorial
bcf842f315c38039ea26380045f2c48713336bb3
2c5c991bc3ba25fe95ea068bb36c45cf12b182f2
refs/heads/master
2021-04-29T21:20:08.356907
2018-02-15T09:57:26
2018-02-15T09:57:26
121,611,997
0
0
null
null
null
null
UTF-8
Java
false
false
2,257
java
package backend; /** * Created by lucien on 2018-02-05. */ public class Registration { private String password; private String email; private String name; public boolean check_password(String password) { this.password = password; boolean password_checked = false; boolean hasLowerCase = false; boolean hasUpperCase = false; boolean hasDigit = false; boolean hasSpecialCharacter = false; if(password.length() >= 8) { for(int i = 0 ; i < password.length() ; i++) { char x = password.charAt(i); if(Character.isUpperCase(x)) { hasUpperCase = true; } if(Character.isLowerCase(x)) { hasLowerCase = true; } if(Character.isDigit(x)) { hasDigit = true; } if((x >= '!' && x <= '/') || (x >= ':' && x <= '@') || (x >= '[' && x <= '`') || (x >= '{' && x<= '~')) { hasSpecialCharacter = true; } if(hasDigit && hasLowerCase && hasUpperCase && hasLowerCase && hasSpecialCharacter) { password_checked = true; break; } } } return password_checked; } public boolean check_email(String email) { this.email = email; boolean email_checked = false; String[] parsed = email.split("@"); if(parsed.length == 2) { System.out.println(parsed[1]); String[] splitted = parsed[1].split("\\."); if(splitted.length == 2){ email_checked = true; } } return email_checked; } public boolean check_name (String name) { this.name = name; boolean name_checked = false; String[] parsed = name.split(" "); if(parsed.length >= 2) { for (int i = 0 ; i < name.length() ; i++) { char x = name.charAt(i); if(Character.isDigit(x)) { return name_checked; } } name_checked = true; } return name_checked; } }
[ "elsa.riachi@mail.mcgill.ca" ]
elsa.riachi@mail.mcgill.ca
fc54098a8841cea67c6180fedaf8a6f791907ddd
1132ff9487273fe8efef69c385d2ce74c105234d
/src/main/java/PageObject/MyOrder.java
9ed3a9211dc95b4348976408c6e1b9e5f1a1ecd3
[]
no_license
bshivchandra/SWassignment
6b09d98acca2096519b30d073deec830dbfe3a5a
911c0856324a1ea8ea8a029152508d94e041055d
refs/heads/main
2023-07-05T20:24:33.950281
2021-07-29T09:06:20
2021-07-29T09:06:20
390,610,921
0
0
null
2021-07-29T08:58:48
2021-07-29T05:29:24
null
UTF-8
Java
false
false
460
java
package PageObject; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; public class MyOrder { WebDriver driver; public MyOrder(WebDriver driver) { this.driver=driver; } public void myOrder() throws Exception { Thread.sleep(3000); driver.navigate().refresh(); driver.findElement(By.xpath("(//i[@class='headerSlotHeroDesktop_more_arrow__sYqcy'])[7]")).click(); driver.findElement(By.linkText("My Account")).click(); } }
[ "bshivchandra" ]
bshivchandra
b9d515e12024f16809d949cf48f98d37614622a3
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/127/522/CWE134_Uncontrolled_Format_String__PropertiesFile_format_73b.java
93694876332428037c28d2709e9bbf58539720c0
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
1,767
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE134_Uncontrolled_Format_String__PropertiesFile_format_73b.java Label Definition File: CWE134_Uncontrolled_Format_String.label.xml Template File: sources-sinks-73b.tmpl.java */ /* * @description * CWE: 134 Uncontrolled Format String * BadSource: PropertiesFile Read data from a .properties file (in property named data) * GoodSource: A hardcoded string * Sinks: format * GoodSink: dynamic formatted stdout with string defined * BadSink : dynamic formatted stdout without validation * Flow Variant: 73 Data flow: data passed in a LinkedList from one method to another in different source files in the same package * * */ import java.util.LinkedList; public class CWE134_Uncontrolled_Format_String__PropertiesFile_format_73b { public void badSink(LinkedList<String> dataLinkedList ) throws Throwable { String data = dataLinkedList.remove(2); if (data != null) { /* POTENTIAL FLAW: uncontrolled string formatting */ System.out.format(data); } } /* goodG2B() - use GoodSource and BadSink */ public void goodG2BSink(LinkedList<String> dataLinkedList ) throws Throwable { String data = dataLinkedList.remove(2); if (data != null) { /* POTENTIAL FLAW: uncontrolled string formatting */ System.out.format(data); } } /* goodB2G() - use BadSource and GoodSink */ public void goodB2GSink(LinkedList<String> dataLinkedList ) throws Throwable { String data = dataLinkedList.remove(2); if (data != null) { /* FIX: explicitly defined string formatting */ System.out.format("%s%n", data); } } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
ca6169ea79ec5d0d53566918bc2164a44f5636da
02fffee7d0c92e44b16fe847acbf697036017de8
/AutomationPracticeFramework/src/main/java/com/test/AutomationPractise/Pages/AT_Authentication.java
fca6521b62048c5d7ffaad5da46d4fb702c2c749
[]
no_license
HyundaiTeam/Automationlockdownpractise
e1aea86ab0e768cd2c4db44f85d1082ef24bc3a8
bc4535031a9e202c64879905b3f75950abc09df4
refs/heads/master
2023-04-15T11:04:35.505944
2020-09-14T14:25:46
2020-09-14T14:25:46
268,686,847
0
0
null
2021-04-26T20:36:36
2020-06-02T02:56:53
HTML
UTF-8
Java
false
false
5,211
java
package com.test.AutomationPractise.Pages; import java.awt.AWTException; import java.io.IOException; import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import org.openqa.selenium.support.ui.Select; import com.test.AutomationPratice.Base.AutomationPractise_Base; import com.test.AutomationPratice.Base.AutomationPractise_CommonComponents; public class AT_Authentication extends AutomationPractise_Base { /******************* RegistrationPage *******************/ @FindBy(xpath = "//a[contains(text(),'Sign in')]") WebElement Index_Signin; @FindBy(xpath = "//input[@id='email_create']") WebElement Reg_email; @FindBy(xpath = "//button[@id='SubmitCreate']") WebElement Reg_create; @FindBy(xpath = "//input[@id='customer_firstname']") WebElement Reg_firstname; @FindBy(xpath = "//input[@id='customer_lastname']") WebElement Reg_lastname; @FindBy(xpath = "//input[@id='passwd']") WebElement Reg_passwrd; @FindBy(xpath = "//select[@id='days']") WebElement Reg_dobday; @FindBy(xpath = "//select[@id='months']") WebElement Reg_months; @FindBy(xpath = "//select[@id='years']") WebElement Reg_years; @FindBy(xpath = "//input[@id='company']") WebElement Reg_company; @FindBy(xpath = "//input[@id='address1']") WebElement Reg_address1; @FindBy(xpath = "//input[@id='address2']") WebElement Reg_address2; @FindBy(xpath = "//input[@id='city']") WebElement Reg_city; @FindBy(xpath = "//select[@id='id_state']") WebElement Reg_state; @FindBy(xpath = "//input[@id='postcode']") WebElement Reg_postcode; @FindBy(xpath = "//input[@id='phone']") WebElement Reg_landphone; @FindBy(xpath = "//input[@id='phone_mobile']") WebElement Reg_mobile; @FindBy(xpath = "//input[@id='alias']") WebElement Reg_alias; @FindBy(xpath = "//textarea[@id='other']") WebElement Reg_others; @FindBy(xpath = "//button[@id='submitAccount']") WebElement Reg_sumbit; /*********************** LoginPage ***********************************/ @FindBy(xpath = "//input[@id='email']") WebElement login_email; @FindBy(xpath = "//input[@id='passwd']") WebElement login_passsword; @FindBy(xpath = "//button[@id='SubmitLogin']") WebElement login_signin; @FindBy(xpath = "//a[contains(text(),'Forgot your password?')]") WebElement login_forgotpasswd; @FindBy(xpath="//div[@class='alert alert-danger']") WebElement login_errortext; /************************* ForgotPassword Page ********************************/ @FindBy(xpath = "//button[@type='submit' and @class='btn btn-default button button-medium']") WebElement for_submit; @FindBy(xpath = "//input[@id='email']") WebElement for_email; @FindBy(xpath = "//a[contains(@title,'Back to Login')]") WebElement for_backhome; public AT_Authentication() throws AWTException, IOException { PageFactory.initElements(driver, this); } public AT_MyAccount registration(String emailId, String firstName, String lastName, String password, String company, String address1, String address2, String city, String postCode, String landPhone, String mobile, String alias, String others) throws AWTException, IOException { Index_Signin.click(); Reg_email.sendKeys(emailId); Reg_create.click(); driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); Reg_firstname.sendKeys(firstName); Reg_lastname.sendKeys(lastName); Reg_passwrd.sendKeys(password); Select selecdrop = new Select(Reg_dobday); selecdrop.selectByValue("5"); Select selecdropA = new Select(Reg_months); selecdropA.selectByValue("5"); Select selecdropB = new Select(Reg_years); selecdropB.selectByValue("1996"); Reg_company.sendKeys(company); Reg_address1.sendKeys(address1); Reg_address2.sendKeys(address2); Reg_city.sendKeys(city); Select selectdropC = new Select(Reg_state); selectdropC.selectByValue("8"); Reg_postcode.sendKeys(postCode); Reg_landphone.sendKeys(landPhone); Reg_mobile.sendKeys(mobile); Reg_alias.sendKeys(alias); Reg_others.sendKeys(others); Reg_sumbit.click(); return new AT_MyAccount(); } public AT_MyAccount login(String email, String password) throws AWTException, IOException { login_email.sendKeys(email); login_passsword.sendKeys(password); login_signin.click(); return new AT_MyAccount(); } public String RegistrationPagetitle() { return returnTitle(); } public boolean Checkbuttonenabled() { boolean value=login_signin.isEnabled(); return value; } public String errorValidation(String email) { login_email.sendKeys(email); login_passsword.clear(); login_signin.click(); String errortext = login_errortext.getText(); return errortext; } public void forgotPassword(String email) { login_forgotpasswd.click(); for_email.sendKeys(email); for_submit.click(); for_backhome.click(); } //How to Validate error meesage scenario . //Why we are return Objects // }
[ "User@DESKTOP-AUC81LG" ]
User@DESKTOP-AUC81LG
c10da5ac36164210eb31237a0440669d5c648e58
df762604621e9932d55f0f638aa5f54b7449145a
/app/src/main/java/com/tusdwi/virsidas/Profil.java
45d2575643ccfd170db40989f8dff9d4f337aab8
[]
no_license
s00tus/e-servise_VIRSIDAS
2213de0d5fe79c41482bd34ae235705f63f06de1
b85645d753496338560f1e177aea20eecdc916aa
refs/heads/master
2023-01-10T05:38:14.959327
2020-11-25T15:03:19
2020-11-25T15:03:19
316,132,076
0
0
null
2020-11-26T05:34:04
2020-11-26T05:30:38
null
UTF-8
Java
false
false
5,256
java
package com.tusdwi.virsidas; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.google.android.gms.tasks.OnSuccessListener; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseUser; import com.google.firebase.firestore.DocumentReference; import com.google.firebase.firestore.DocumentSnapshot; import com.google.firebase.firestore.EventListener; import com.google.firebase.firestore.FirebaseFirestore; import com.google.firebase.firestore.FirebaseFirestoreException; import com.google.firebase.storage.FirebaseStorage; import com.google.firebase.storage.StorageReference; import com.squareup.picasso.Picasso; import javax.annotation.Nullable; public class Profil extends AppCompatActivity { TextView NamaLengkap, NoIndukPegawai, email, alamat, tanggalLahir, noHandphone; FirebaseAuth fAuth; FirebaseFirestore fStore; FirebaseUser user; StorageReference storageReference; String userId; ImageView photoProfil; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_profil); NamaLengkap = findViewById(R.id.profilNama); NoIndukPegawai = findViewById(R.id.noIndukP); email = findViewById(R.id.profilEmail); tanggalLahir = findViewById(R.id.tanggalLahir); alamat = findViewById(R.id.Alamat); noHandphone = findViewById(R.id.noHandpone); photoProfil = findViewById(R.id.PhotoProfil); //toolbar Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true); toolbar.setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); fAuth = FirebaseAuth.getInstance(); fStore = FirebaseFirestore.getInstance(); storageReference = FirebaseStorage.getInstance().getReference(); userId = fAuth.getCurrentUser().getUid(); user = fAuth.getCurrentUser(); StorageReference profileRef = storageReference.child("Users/" + fAuth.getCurrentUser().getUid() + "/profile.jpg"); profileRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() { @Override public void onSuccess(Uri uri) { Picasso.get().load(uri).into(photoProfil); } }); DocumentReference documentReference = fStore.collection("Users").document(userId); documentReference.addSnapshotListener(this, new EventListener<DocumentSnapshot>() { @Override public void onEvent(@javax.annotation.Nullable DocumentSnapshot documentSnapshot, @Nullable FirebaseFirestoreException e) { if (documentSnapshot.exists()) { NamaLengkap.setText(documentSnapshot.getString("NamaLengkap")); NoIndukPegawai.setText(documentSnapshot.getString("NIP")); email.setText(documentSnapshot.getString("Email")); tanggalLahir.setText(documentSnapshot.getString("TanggalLahir")); noHandphone.setText(documentSnapshot.getString("NoHandphone")); } else { Log.d("tag", "onEvent: Document do not exists"); } } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.menu_dawer_setting, menu); //getMenuInflater().inflate(R.menu.menu_main, menu); return true; } public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId()==R.id.pengaturan){ //Edit Profil Intent intent = new Intent(Profil.this, UpdateProfil.class); intent.putExtra("NamaLengkap", NamaLengkap.getText().toString()); intent.putExtra("NIP", NoIndukPegawai.getText().toString()); intent.putExtra("Email", email.getText().toString()); intent.putExtra("TanggalLahir", tanggalLahir.getText().toString()); intent.putExtra("Alamat", alamat.getText().toString()); intent.putExtra("NoHandphone", noHandphone.getText().toString()); startActivity(intent); } else if (item.getItemId() == R.id.gantipassword) { //Ganti Password } return true; } @Override public void onBackPressed(){ super.onBackPressed(); this.finish(); } @Override public boolean onSupportNavigateUp() { onBackPressed(); return true; } }
[ "dwiamlx@gmail.com" ]
dwiamlx@gmail.com
b30ece5f8e60a7a2ba63fdbc95da5cef046bc935
7a77b3ce101055e1f6f2b304db4e708f36cbe46d
/android_Demo/src/com/android/demo/TestPanels.java
a7cbc1af8453a8d2df7e0a053ab96f78415f0f2f
[]
no_license
suntengfei/curriculum_schedule
6a09abc401cecda661ad2aa1b3cc2ce887fad492
b8094062a50b8d9e1d3ffb4f1cfa361923a2a713
refs/heads/master
2016-09-06T04:34:15.925195
2012-06-02T15:09:00
2012-06-02T15:09:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,063
java
package com.android.demo; //import java.util.ArrayList; //import java.util.Calendar; import java.util.List; import android.app.Activity; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.widget.AdapterView; import android.widget.AdapterView.OnItemLongClickListener; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListView; import com.android.demo.dao.LessonDAO; import com.android.demo.interpolator.BackInterpolator; import com.android.demo.interpolator.BounceInterpolator; import com.android.demo.interpolator.EasingType; import com.android.demo.interpolator.ElasticInterpolator; import com.android.demo.interpolator.ExpoInterpolator; import com.android.demo.model.Lesson; import com.android.demo.widget.Panel; import com.android.demo.widget.Panel.OnPanelListener; public class TestPanels extends Activity implements OnPanelListener { LessonDAO lesdao = new LessonDAO(this); private Panel bottomPanel; private Panel topPanel; List<Lesson> ltt1; List<Lesson> ltt2; List<Lesson> ltt3; List<Lesson> ltt4; List<Lesson> ltt5; ListView lv1; ListView lv2; ListView lv3; ListView lv4; ListView lv5; @Override protected void onRestart() { // TODO Auto-generated method stub super.onRestart(); loadData(); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.panel_main); Panel panel; lv1 = (ListView)findViewById(R.id.list1); lv2 = (ListView)findViewById(R.id.list2); lv3 = (ListView)findViewById(R.id.list3); lv4 = (ListView)findViewById(R.id.list4); lv5 = (ListView)findViewById(R.id.list5); Panel[] pl = {(Panel) findViewById(R.id.leftPanel),(Panel) findViewById(R.id.leftPanel2),(Panel) findViewById(R.id.rightPanel),(Panel) findViewById(R.id.rightPanel2),(Panel) findViewById(R.id.rightPanel3)}; topPanel = panel = (Panel) findViewById(R.id.topPanel); panel.setOnPanelListener(this); panel.setInterpolator(new BounceInterpolator(EasingType.INOUT)); panel = (Panel) findViewById(R.id.leftPanel); panel.setOnPanelListener(this); panel.setInterpolator(new ExpoInterpolator(EasingType.OUT)); panel = (Panel) findViewById(R.id.rightPanel); panel.setOnPanelListener(this); panel.setInterpolator(new ExpoInterpolator(EasingType.OUT)); bottomPanel = panel = (Panel) findViewById(R.id.bottomPanel); panel.setOnPanelListener(this); panel.setInterpolator(new ElasticInterpolator(EasingType.OUT, 1.0f, 0.3f)); loadData(); Button btn = (Button)findViewById(R.id.addlessonbtn); /* //设置dialog LayoutInflater inflater = getLayoutInflater(); View layout = inflater.inflate(R.layout.alertdialog, (ViewGroup) findViewById(R.id.aldialog)); final Dialog dialog = new AlertDialog.Builder(this).setTitle("自定义布局").setView(layout) .setPositiveButton("确定", null) .setNegativeButton("取消", null).create();*/ OnClickListener l = new OnClickListener(){ public void onClick(View v) { // TODO Auto-generated method stub /* dialog.show(); //填充spinner Spinner sp = (Spinner)findViewById(R.id.spinner1); //将可选内容与ArrayAdapter连接 ArrayAdapter<String> adapter=new ArrayAdapter<String>(TestPanels.this,android.R.layout.simple_spinner_item,days); //设置下拉列表风格 adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //将adapter添加到spinner中 sp.setAdapter(adapter); sp.setOnItemSelectedListener(new Spinner.OnItemSelectedListener(){ public void onItemSelected(AdapterView<?> arg0, View arg1,int arg2, long arg3) { // TODO Auto-generated method stub //设置显示当前选择的项 arg0.setVisibility(View.VISIBLE); } public void onNothingSelected(AdapterView<?> arg0) { // TODO Auto-generated method stub } }); */ Intent intent = new Intent(); intent.setClass(TestPanels.this, AddLesns.class); startActivity(intent); } }; btn.setOnClickListener(l); lv1.setOnItemLongClickListener(itemlistener); lv2.setOnItemLongClickListener(itemlistener); lv3.setOnItemLongClickListener(itemlistener); lv4.setOnItemLongClickListener(itemlistener); lv5.setOnItemLongClickListener(itemlistener); // Calendar c = Calendar.getInstance(); // mY = c.get(Calendar.YEAR); // mM = c.get(Calendar.MONTH)+1; // mD = c.get(Calendar.DAY_OF_MONTH); // wk = (mD+2*mM+3*(mM+1)/5+mY+mY/4-mY/100+mY/400)%7; // if(wk>=0&&wk<5) // { // // pl[wk].setOpen(!pl[wk].isOpen(), false); // Log.i("aaaaaa",String.valueOf(wk)); // Log.i("aaaaaa",String.valueOf(mY)); // Log.i("aaaaaa",String.valueOf(mM)); // Log.i("aaaaaa",String.valueOf(mD)); // } } private OnItemLongClickListener itemlistener = new OnItemLongClickListener(){ public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { dialog(parent,view,position,id); // TODO Auto-generated method stub return false; } }; protected void dialog(final AdapterView<?> parent,final View view,final int position, long id) { AlertDialog.Builder builder = new Builder(TestPanels.this); builder.setMessage("确认要删除出吗?"); builder.setTitle("提示"); builder.setPositiveButton("确认", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { if(parent.getId()==lv1.getId()) { lesdao.delete(ltt1.get(position).getLid()); ltt1.remove(position); //lv1.removeView(view); lv1.setAdapter(new ArrayAdapter<Lesson>(TestPanels.this, R.layout.list_item, ltt1)); } else if(parent.getId()==lv2.getId()) { lesdao.delete(ltt2.get(position).getLid()); ltt2.remove(position); lv2.setAdapter(new ArrayAdapter<Lesson>(TestPanels.this, R.layout.list_item, ltt2)); } else if(parent.getId()==lv3.getId()) { lesdao.delete(ltt3.get(position).getLid()); ltt3.remove(position); lv3.setAdapter(new ArrayAdapter<Lesson>(TestPanels.this, R.layout.list_item, ltt3)); } else if(parent.getId()==lv4.getId()) { lesdao.delete(ltt4.get(position).getLid()); ltt4.remove(position); lv4.setAdapter(new ArrayAdapter<Lesson>(TestPanels.this, R.layout.list_item, ltt4)); } else if(parent.getId()==lv5.getId()) { lesdao.delete(ltt5.get(position).getLid()); ltt5.remove(position); lv5.setAdapter(new ArrayAdapter<Lesson>(TestPanels.this, R.layout.list_item, ltt5)); } dialog.dismiss(); } }); builder.setNegativeButton("取消", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); builder.create().show(); } // @Override // public boolean onKeyDown(int keyCode, KeyEvent event) { // if (keyCode == KeyEvent.KEYCODE_T) { // topPanel.setOpen(!topPanel.isOpen(), false); // return false; // } // if (keyCode == KeyEvent.KEYCODE_B) { // bottomPanel.setOpen(!bottomPanel.isOpen(), true); // return false; // } // return super.onKeyDown(keyCode, event); // } public void onPanelClosed(Panel panel) { String panelName = getResources().getResourceEntryName(panel.getId()); Log.d("TestPanels", "Panel [" + panelName + "] closed"); } public void onPanelOpened(Panel panel) { String panelName = getResources().getResourceEntryName(panel.getId()); Log.d("TestPanels", "Panel [" + panelName + "] opened"); } public void loadData() { LessonDAO ld = new LessonDAO(this); ltt1 = ld.getData(1); ListView lv = (ListView)findViewById(R.id.list1); lv.setAdapter(new ArrayAdapter<Lesson>(this, R.layout.list_item, ltt1)); ltt2 = ld.getData(2); lv = (ListView)findViewById(R.id.list2); lv.setAdapter(new ArrayAdapter<Lesson>(this, R.layout.list_item, ltt2)); ltt3 = ld.getData(3); lv = (ListView)findViewById(R.id.list3); lv.setAdapter(new ArrayAdapter<Lesson>(this, R.layout.list_item, ltt3)); ltt4 = ld.getData(4); lv = (ListView)findViewById(R.id.list4); lv.setAdapter(new ArrayAdapter<Lesson>(this, R.layout.list_item, ltt4)); ltt5 = ld.getData(5); lv = (ListView)findViewById(R.id.list5); lv.setAdapter(new ArrayAdapter<Lesson>(this, R.layout.list_item, ltt5)); } }
[ "suntengfei110@gmail.com" ]
suntengfei110@gmail.com
c3a456220253feaecebd0f53ff84a5042e124bb0
aca9bfd690b55b682475e6710ab361af9ac2709d
/recipes/src/main/java/ru/taskurotta/recipes/wait/decider/WaitDeciderClient.java
12bcbe831ffc4f761b18e51e3700469435fb3a52
[ "MIT" ]
permissive
JLLeitschuh/taskurotta
fd838aa23a8f9afdef9bb2e9185579f58a8565db
0e1f1eda2f93a723c6d77f3842e732c6c886c109
refs/heads/master
2021-01-02T21:12:32.682367
2020-01-16T08:24:28
2020-01-16T08:24:28
239,803,397
0
0
null
2020-11-17T18:51:04
2020-02-11T15:59:45
null
UTF-8
Java
false
false
299
java
package ru.taskurotta.recipes.wait.decider; import ru.taskurotta.annotation.DeciderClient; import ru.taskurotta.annotation.Execute; /** * Created by void 27.03.13 17:04 */ @DeciderClient(decider = WaitDecider.class) public interface WaitDeciderClient { @Execute public void start(); }
[ "jedy@fccland.ru" ]
jedy@fccland.ru
bf7b8e76eca94f300c4c6f816f447661a14fb886
9ff153875921311054a27dd48ec46695e5a1893a
/net/minecraft/client/particle/EntityParticleEmitter.java
c8ab6d9d1ed4c29a45f14c2eda7e04aec882d6a6
[]
no_license
Nitrofyyy/SeaClientSourcev2.1
4d8f3151cdefcf49f10ddc6a4e861feff2e1df91
be0940967447fc3b9192e886a2b04dbb8636c03a
refs/heads/main
2023-08-31T13:01:54.044693
2021-10-22T08:23:35
2021-10-22T08:23:35
420,016,521
1
0
null
null
null
null
UTF-8
Java
false
false
2,177
java
// // Decompiled by Procyon v0.5.36 // package net.minecraft.client.particle; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.world.World; import net.minecraft.util.EnumParticleTypes; import net.minecraft.entity.Entity; public class EntityParticleEmitter extends EntityFX { private Entity attachedEntity; private int age; private int lifetime; private EnumParticleTypes particleTypes; public EntityParticleEmitter(final World worldIn, final Entity p_i46279_2_, final EnumParticleTypes particleTypesIn) { super(worldIn, p_i46279_2_.posX, p_i46279_2_.getEntityBoundingBox().minY + p_i46279_2_.height / 2.0f, p_i46279_2_.posZ, p_i46279_2_.motionX, p_i46279_2_.motionY, p_i46279_2_.motionZ); this.attachedEntity = p_i46279_2_; this.lifetime = 3; this.particleTypes = particleTypesIn; this.onUpdate(); } @Override public void renderParticle(final WorldRenderer worldRendererIn, final Entity entityIn, final float partialTicks, final float rotationX, final float rotationZ, final float rotationYZ, final float rotationXY, final float rotationXZ) { } @Override public void onUpdate() { for (int i = 0; i < 16; ++i) { final double d0 = this.rand.nextFloat() * 2.0f - 1.0f; final double d2 = this.rand.nextFloat() * 2.0f - 1.0f; final double d3 = this.rand.nextFloat() * 2.0f - 1.0f; if (d0 * d0 + d2 * d2 + d3 * d3 <= 1.0) { final double d4 = this.attachedEntity.posX + d0 * this.attachedEntity.width / 4.0; final double d5 = this.attachedEntity.getEntityBoundingBox().minY + this.attachedEntity.height / 2.0f + d2 * this.attachedEntity.height / 4.0; final double d6 = this.attachedEntity.posZ + d3 * this.attachedEntity.width / 4.0; this.worldObj.spawnParticle(this.particleTypes, false, d4, d5, d6, d0, d2 + 0.2, d3, new int[0]); } } ++this.age; if (this.age >= this.lifetime) { this.setDead(); } } @Override public int getFXLayer() { return 3; } }
[ "84819367+Nitrofyyy@users.noreply.github.com" ]
84819367+Nitrofyyy@users.noreply.github.com
6855f92ef1b51682a67fd75597f636bba28212c4
8b96417ea286f9b2d3ec7d448e1a31c0ba8d57cb
/portal/portal-util/util/src/java/org/sakaiproject/portal/util/URLUtils.java
ddae2b4b33013e28c7be0f6f536c4bb9c80e7187
[ "ECL-2.0" ]
permissive
deemsys/Deemsys_Learnguild
d5b11c5d1ad514888f14369b9947582836749883
606efcb2cdc2bc6093f914f78befc65ab79d32be
refs/heads/master
2021-01-15T16:16:12.036004
2013-08-13T12:13:45
2013-08-13T12:13:45
12,083,202
0
1
null
null
null
null
UTF-8
Java
false
false
2,130
java
/********************************************************************************** * $URL: https://source.sakaiproject.org/svn/portal/tags/portal-base-2.9.2/portal-util/util/src/java/org/sakaiproject/portal/util/URLUtils.java $ * $Id: URLUtils.java 110562 2012-07-19 23:00:20Z ottenhoff@longsight.com $ *********************************************************************************** * * Copyright (c) 2006, 2007, 2008 The Sakai 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/ECL-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.sakaiproject.portal.util; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; /** * @author ieb * @since Sakai 2.4 * @version $Rev: 110562 $ */ public class URLUtils { public static String addParameter(String URL, String name, String value) { int qpos = URL.indexOf('?'); int hpos = URL.indexOf('#'); char sep = qpos == -1 ? '?' : '&'; String seg = sep + encodeUrl(name) + '=' + encodeUrl(value); return hpos == -1 ? URL + seg : URL.substring(0, hpos) + seg + URL.substring(hpos); } /** * The same behaviour as Web.escapeUrl, only without the "funky encoding" of * the characters ? and ; (uses JDK URLEncoder directly). * * @param toencode * The string to encode. * @return <code>toencode</code> fully escaped using URL rules. */ public static String encodeUrl(String url) { try { return URLEncoder.encode(url, "UTF-8"); } catch (UnsupportedEncodingException uee) { throw new IllegalArgumentException(uee); } } }
[ "sangee1229@gmail.com" ]
sangee1229@gmail.com
ec00d831ce38a73d5e7ec964060ab2f483416073
058539dc679c29082f71985ed61f95cd88baeaee
/app/src/main/java/utfpr/calcnum/utils/SimpleArrayAdapter.java
3215e65ea2b79b1598281f5ece7b66c492f1eeed
[]
no_license
rsegecin/CalcNum
16771fcec7d9df9819a33a2ad5cbe0fcdb01a108
144a5f0ba97b272a05b10cc2381a53032ec4be03
refs/heads/master
2021-01-18T20:08:26.571738
2016-06-22T03:07:49
2016-06-22T03:07:49
61,684,891
0
0
null
null
null
null
UTF-8
Java
false
false
2,908
java
package utfpr.calcnum.utils; import android.content.Context; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.LinearLayout; import android.widget.TextView; import java.util.ArrayList; /** * Created by Rinaldi on 28/10/2015. */ public class SimpleArrayAdapter extends ArrayAdapter<String> { public enum eTextAlign { right, left, center } Context context; int layoutResourceId; String [] dataList = null; eTextAlign textAlign; private static class ItemViewHolder { TextView txtItem; } public SimpleArrayAdapter(Context context, int layoutResourceId, String[] dataParam, eTextAlign textAlignParam) { super(context, layoutResourceId, dataParam); this.layoutResourceId = layoutResourceId; this.context = context; this.dataList = dataParam; textAlign = textAlignParam; } public SimpleArrayAdapter(Context context, int layoutResourceId, ArrayList<String> dataParam, eTextAlign textAlignParam) { super(context, layoutResourceId, dataParam); this.layoutResourceId = layoutResourceId; this.context = context; this.dataList = dataParam.toArray(new String[dataParam.size()]); textAlign = textAlignParam; } @Override public View getDropDownView(int position, View cnvtView, ViewGroup prnt) { return getCustomView(position, cnvtView, prnt); } @Override public View getView(int pos, View cnvtView, ViewGroup prnt) { return getCustomView(pos, cnvtView, prnt); } public View getCustomView(int position, View convertView, ViewGroup parent) { LinearLayout view = (LinearLayout) convertView; ItemViewHolder vh = new ItemViewHolder(); if (view == null) { LayoutInflater vi = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); //LayoutInflater vi = ((Activity) context).getLayoutInflater(); view = (LinearLayout) vi.inflate(layoutResourceId, null); } switch (textAlign) { case center: view.setGravity(Gravity.CENTER_VERTICAL + Gravity.CENTER); break; case left: view.setGravity(Gravity.CENTER_VERTICAL + Gravity.LEFT); break; case right: view.setGravity(Gravity.CENTER_VERTICAL + Gravity.RIGHT); break; default: view.setGravity(Gravity.CENTER_VERTICAL + Gravity.LEFT); break; } vh.txtItem = (TextView) view.getChildAt(0); view.setTag(vh); vh.txtItem.setText(dataList[position]); //vh.btnSend.setOnClickListener(new OnBtnSendClick(position)); return view; } }
[ "rsegecin@hotmail.com" ]
rsegecin@hotmail.com
827b22782d0caec7b7e0270f62dc94748eda86e1
e8abc4aadcfa7a022ed0ebc8096577d7adf9a6ea
/src/java/servlet/RegistroDetalleMovimiento.java
344d80dbafb31245ec0add03a83658fa54c008a4
[]
no_license
effective-record/git_effective
6fd9b93c0f8c2880e24f9a0033a292e19972e8d8
591b7a73a903ae865cd0b16582a8e2194377e37a
refs/heads/master
2023-04-10T23:28:43.670381
2021-04-16T15:38:14
2021-04-16T15:38:14
356,370,273
0
0
null
null
null
null
UTF-8
Java
false
false
5,346
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 servlet; import controlador.DETALLE_MOVIMIENTO_DAO; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import modelo.DETALLE_MOVIMIENTO; /** * * @author AndresSaenz */ @WebServlet(name = "RegistroDetalleMovimiento", urlPatterns = {"/RegistroDetalleMovimiento"}) public class RegistroDetalleMovimiento extends HttpServlet { /** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); String Cantidad = request.getParameter("cantidad"); String Precio_productos = request.getParameter("precio_productos"); String Iva_productos = request.getParameter("iva_productos"); String Total_productos = request.getParameter("total_productos"); String PRODUCTOS_id_producto = request.getParameter("PRODUCTOS_id_producto"); String MOVIMIENTO_id_movimiento = request.getParameter("MOVIMIENTO_id_movimiento"); String BanderaEstado = request.getParameter("banderaRegistro"); int cantidad = Integer.parseInt(Cantidad); double precio_productos = Integer.parseInt(Precio_productos); double iva_productos = Integer.parseInt(Iva_productos); double total_productos = Integer.parseInt(Total_productos); int id_producto = Integer.parseInt(PRODUCTOS_id_producto); int id_movimiento = Integer.parseInt(MOVIMIENTO_id_movimiento); DETALLE_MOVIMIENTO_DAO detalleMovimientoDao = new DETALLE_MOVIMIENTO_DAO(); DETALLE_MOVIMIENTO mi_detalle_movimiento = new DETALLE_MOVIMIENTO(); mi_detalle_movimiento.setCantidad(cantidad); mi_detalle_movimiento.setPrecio_productos(precio_productos); mi_detalle_movimiento.setIva_productos(iva_productos); mi_detalle_movimiento.setTotal_productos(total_productos); mi_detalle_movimiento.setPRODUCTOS_id_producto(id_producto); mi_detalle_movimiento.setMOVIMIENTO_id_movimiento(id_movimiento); System.out.println("El valor es " + BanderaEstado); if (BanderaEstado.equals("Correcto")) { String respuestaRegistrada = detalleMovimientoDao.AdicionarDetalle_movimiento(mi_detalle_movimiento); System.out.println("Res " + respuestaRegistrada); System.out.println("Res " + respuestaRegistrada.length()); if (respuestaRegistrada.length() == 0) { out.println("<script type=\"text/javascript\">"); out.println("alert('" + "Detalle movimiento Registrado con éxito." + "');"); out.println("window.location.href = '/Effective/menu.jsp';"); out.println("</script>"); } else { out.println("<script type=\"text/javascript\">"); //out.println("alert('" + respuestaRegistrada + "');"); out.println("alert('" + "Error encontrado: " + respuestaRegistrada.replace("'", "") + "');"); out.println("window.history.back();"); out.println("</script>"); } } else { System.out.println("El valor no es correcto " + BanderaEstado); } } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
[ "asaenzsalazar415@gmail.com" ]
asaenzsalazar415@gmail.com
fe98a91fa806719b29c3c13802164a8927c78402
b0db2975d728dfbd2093b1e91f7e4ad457b22c9e
/src/com/lsp/suc/entity/Housecomment.java
7dfa79bbac72427bd1c1844636ee6ea24859a994
[]
no_license
YunJianguest/XmSc
a2befc9ab2d711b359e8da48dec65e20a9673aaa
d040a637e6d7f2b3f1ceebec7046b91707c9bc71
refs/heads/master
2020-03-21T06:45:18.717835
2018-08-07T04:55:00
2018-08-07T04:55:00
138,240,130
0
0
null
null
null
null
UTF-8
Java
false
false
1,656
java
package com.lsp.suc.entity; import java.util.Date; import com.mongodb.ReflectionDBObject; /** * @author lsp * */ public class Housecomment extends ReflectionDBObject{ private String toUser; private Long parentid; /** * 评论内容 */ private String content; /** * 评论用户头像 */ private String headimg; /** * 评论用户昵称 */ private String name; private Date createdate; private Long sort; private int praise; private String fromUserid; public String getToUser() { return toUser; } public void setToUser(String toUser) { this.toUser = toUser; } public Long getParentid() { return parentid; } public void setParentid(Long parentid) { this.parentid = parentid; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getHeadimg() { return headimg; } public void setHeadimg(String headimg) { this.headimg = headimg; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Date getCreatedate() { return createdate; } public void setCreatedate(Date createdate) { this.createdate = createdate; } public Long getSort() { return sort; } public void setSort(Long sort) { this.sort = sort; } public int getPraise() { return praise; } public void setPraise(int praise) { this.praise = praise; } public String getFromUserid() { return fromUserid; } public void setFromUserid(String fromUserid) { this.fromUserid = fromUserid; } }
[ "Administrator@chongzi" ]
Administrator@chongzi
4b160edc0d5d107d16e5b35e36d3169cc1a73515
d72a963875f859720f493dbf1fbecb40e1644e84
/struts2_0300_Action/src/com/juan/struts/action/ActionIndex1.java
f4df2c7588e3b4741864d0bf2437c2a92049a4ca
[]
no_license
duanzongjuan/struts2
b908a14a089a43161289c4fe439eebec0763d442
7d7ef8acd91fc351b3c62561bf3a3a778a164f78
refs/heads/master
2020-03-13T14:37:31.822702
2018-05-01T07:10:30
2018-05-01T07:10:30
131,162,054
0
0
null
null
null
null
UTF-8
Java
false
false
113
java
package com.juan.struts.action; public class ActionIndex1 { public String execute() { return "success"; } }
[ "2736914964@qq.com" ]
2736914964@qq.com
39776b45c41296d4ca2b97f2e333cb47fa409128
e59df6938646b3638603c11fc8566fb0e3f593bc
/BottleRecycler/src/com/titanicapps/bottlerecycler/DataManager.java
11459773163e06752b1b00048a90c64ba42b1bd4
[]
no_license
sugarcode2014/AndrewBarrett_Hackathon
5a2388ab7dca8ec057f387c1d366c695ca3acc46
8183a2808100ef86336b96b3da132ae1d44f2884
refs/heads/master
2021-01-10T03:08:42.845604
2014-10-19T20:25:04
2014-10-19T20:25:04
47,066,718
0
0
null
null
null
null
UTF-8
Java
false
false
2,298
java
package com.titanicapps.bottlerecycler; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import android.app.Activity; import android.content.Context; public class DataManager { private static final String BOTTLE_COUNT_FILE_NAME = "bottle_count_data"; private static final String RECYCLE_HISTORY_FILE_NAME = "recycle_history_data"; private BottleCountData bottleCountData= new BottleCountData(); private RecycleHistoryListData recycleHistoryListData = new RecycleHistoryListData(); public BottleCountData getBottleCountData(){ return bottleCountData; } public RecycleHistoryListData getRecycleHistoryListData(){ return recycleHistoryListData; } public void load(Activity context){ try { FileInputStream fIBottleCount = context.openFileInput(BOTTLE_COUNT_FILE_NAME); ObjectInputStream oIsBottleCount = new ObjectInputStream(fIBottleCount); bottleCountData = (BottleCountData) oIsBottleCount.readObject(); fIBottleCount.close(); FileInputStream fInputStream = context.openFileInput(RECYCLE_HISTORY_FILE_NAME); ObjectInputStream oIsHistory = new ObjectInputStream(fInputStream); recycleHistoryListData = (RecycleHistoryListData) oIsHistory.readObject(); fInputStream.close(); } catch(FileNotFoundException e) {} catch (ClassNotFoundException e) {} catch(IOException e) {} } public void save(Activity context){ int mode = Context.MODE_PRIVATE; try { FileOutputStream fosBottle; ObjectOutputStream OosBottle; fosBottle = context.openFileOutput(BOTTLE_COUNT_FILE_NAME, mode); OosBottle = new ObjectOutputStream(fosBottle); OosBottle.writeObject(bottleCountData); OosBottle.close(); FileOutputStream fosHistory; ObjectOutputStream OosHistory; fosHistory = context.openFileOutput(RECYCLE_HISTORY_FILE_NAME, mode); OosHistory = new ObjectOutputStream(fosHistory); OosHistory.writeObject(recycleHistoryListData); OosHistory.close(); } catch(IOException e) {} } }
[ "sugarcod2014@gmail.com" ]
sugarcod2014@gmail.com
96b515bfcb7c30d579f530d22f342f8648a21401
bfd0d86b6896fdf3b1238988745c0675e4e44663
/app/src/main/java/com/example/catcare/Activity/Menu/MenuAdmin.java
d81d1ce3d122044bb07b069df3bdf2a7f784ebf2
[]
no_license
hafizhbd/CATCARE
36239577dccaa7e99e0facd6b7810d40e23e10f7
6ae3e3fc372491f24bf7daf236fadbe84e943229
refs/heads/master
2020-06-27T06:50:48.941570
2019-08-01T08:16:54
2019-08-01T08:16:54
199,126,513
0
0
null
null
null
null
UTF-8
Java
false
false
2,612
java
package com.example.catcare.Activity.Menu; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.Button; import com.example.catcare.Model.SharedPrefManager; import com.example.catcare.R; import com.google.firebase.auth.FirebaseAuth; /* AKB 2 10116060 Muhammad Hafizh Budiman Changelog versi 0.0.1 14 Juli 2019 1. Membuat Splash Screen 2. Membuat Menu Utama versi 0.0.2 16 Juli 2019 1. Membuat Fragment 2. Membuat Tampilan Video melalui ArrayList Versi 0.0.3 17 Juli 2019 1. Mengkoneksikan App dengan Firebase 2. Menampilkan Gambar secara Manual versi 0.0.4 19 Juli 2019 1. Menampilkan Gambar melalui Firebase versi 0.0.5 23 Juli 2019 1. Membuat Adapter 2. Menampilkan Data Artikel versi 0.0.6 29 Juli 2019 1. Membuat Add Data Pada menu Artikel versi 0.0.7 31 Juli 2019 1. Mempercantik UI. */ public class MenuAdmin extends AppCompatActivity { Button btnLogOut, btnartikel, btnkmbl; Intent PilihanArtikelActivity, kembali; SharedPrefManager sharedPrefManager; @Override protected void onCreate(Bundle savedInstanceState) { this.requestWindowFeature(Window.FEATURE_NO_TITLE); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); super.onCreate(savedInstanceState); setContentView(R.layout.activity_menu_admin); btnLogOut = (Button) findViewById(R.id.sign_out); btnartikel = (Button) findViewById(R.id.button3); btnkmbl =(Button) findViewById(R.id.button5); PilihanArtikelActivity = new Intent(this,PilihanArtikelActivity.class); kembali = new Intent(this, MainActivity.class); sharedPrefManager = new SharedPrefManager(this); btnLogOut.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { sharedPrefManager.saveSPBoolean(SharedPrefManager.SP_SUDAH_LOGIN, false); FirebaseAuth.getInstance().signOut(); Intent I = new Intent(MenuAdmin.this, LoginActivity.class); startActivity(I); } }); btnartikel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { startActivity(PilihanArtikelActivity); } }); btnkmbl.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { startActivity(kembali); } }); } }
[ "hafizhbudiman15@gmail.com" ]
hafizhbudiman15@gmail.com
b95d285301b9243fe38a999b0741ba47f2ed7402
9dc2eff55aea55758477f84904423cc640d33d69
/src/main/java/com/mcmiddleearth/entities/protocol/packets/AbstractPacket.java
e494ce4bb54799295f3f5a4a23f9dd2018c6f9f7
[]
no_license
EriolEandur/MCME-NPCs
e45980163654bf6ce9411c75bb7b7021ec95b021
0a96fd5626ab99361da45e5217052d5e6e87aca1
refs/heads/master
2023-04-16T03:36:04.403648
2021-04-20T22:43:33
2021-04-20T22:43:33
354,993,614
0
0
null
null
null
null
UTF-8
Java
false
false
1,199
java
package com.mcmiddleearth.entities.protocol.packets; import com.comphenix.protocol.ProtocolLibrary; import com.comphenix.protocol.ProtocolManager; import com.comphenix.protocol.events.PacketContainer; import com.mcmiddleearth.entities.EntitiesPlugin; import org.bukkit.entity.Player; import java.lang.reflect.InvocationTargetException; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; public abstract class AbstractPacket { protected ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager(); protected void send(PacketContainer packet, Set<Player> recipients) { recipients.forEach(player -> send(packet, player)); } protected void send(PacketContainer packet, Player recipient) { try { protocolManager.sendServerPacket(recipient, packet); } catch (InvocationTargetException e) { Logger.getLogger(EntitiesPlugin.class.getSimpleName()).log(Level.WARNING,"Error while sending Packet!",e); } } public void send(Set<Player> recipients) { recipients.forEach(this::send); } public abstract void send(Player recipient); public void update() {} }
[ "Eriol_Eandur@gmx.de" ]
Eriol_Eandur@gmx.de
0fac5e68fac5aba4590ffc1e094be34adca8addb
1fd530faf97477ca5bccc798c594de71074ae352
/src/main/java/com/terrence/loyalty/forumapi/domain/message/MessageService.java
3a890cbc94b91682700ce99f58083b132c425484
[]
no_license
tjfleung/loyalty-forum-api
9128a3040a68cf50005651856075aec29e841646
6354d5ec2f1047a3516d300bc5f7341b971fb225
refs/heads/master
2020-11-30T06:06:05.802373
2020-01-09T02:32:07
2020-01-09T02:32:07
230,327,028
0
0
null
2020-01-06T01:54:16
2019-12-26T20:55:43
Java
UTF-8
Java
false
false
3,968
java
package com.terrence.loyalty.forumapi.domain.message; import com.terrence.loyalty.forumapi.domain.location.Location; import com.terrence.loyalty.forumapi.domain.location.LocationService; import com.terrence.loyalty.forumapi.exception.ForumException; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.*; import org.springframework.stereotype.Service; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @Service @Slf4j public class MessageService { @Autowired private final MessageRepository messageRepository; @Autowired private MessageAdapter messageAdapter; @Autowired private LocationService locationService; public MessageService(MessageRepository messageRepository, MessageAdapter messageAdapter, LocationService locationService) { this.messageRepository = messageRepository; this.messageAdapter = messageAdapter; this.locationService = locationService; } public List<MessageDto> getAllMessages() { List<MessageDto> parentMessageDtos = new ArrayList<>(); parentMessageDtos.addAll( messageRepository.findAllByParentIdEqualsOrderByPostedDateDesc(0) .stream() .map(message -> messageAdapter.adapt(message)) .collect(Collectors.toList()) ); for (MessageDto parent : parentMessageDtos) { parent.addChildMessages(findChildMessages(parent.getId())); } return parentMessageDtos; } public MessageDto save(MessageDto messageDto) throws ForumException { if (messageDto.getUsername() == null || messageDto.getUsername().isEmpty()) { throw new ForumException(HttpStatus.BAD_REQUEST, "No username provided"); } if (messageDto.getComment() == null || messageDto.getComment().isEmpty()) { throw new ForumException(HttpStatus.BAD_REQUEST, "No comment to post"); } Location location = new Location(); if (messageDto.getLocation() != null) { location = locationService.getLocation(messageDto.getLocation().getLocation()); } Message savedMessage = messageRepository.save(new Message(messageDto.getUsername(), LocalDateTime.now(), messageDto.getComment(), location, messageDto.getParentId())); log.info("Saved new message: {}, From: {}", savedMessage.getComment(), savedMessage.getUsername()); return messageAdapter.adapt(savedMessage); } public List<MessageDto> getMessagesByUsername(String username) { return messageRepository.findAllByUsernameOrderByPostedDateDesc(username) .stream() .map(message -> messageAdapter.adapt(message)) .collect(Collectors.toList()); } public MessageDto saveReply(MessageDto messageDto, long parentId) { if (parentId <= 0) { throw new ForumException(HttpStatus.BAD_REQUEST, "Invalid comment to reply"); } messageDto.setParentId(parentId); MessageDto reply = save(messageDto); log.info("Saved new reply: {}, from {}, replying to Message {}", reply.getComment(), reply.getUsername(), reply.getParentId()); return reply; } private List<MessageDto> findChildMessages(long parentId) { List<Message> childMessages = messageRepository.findAllByParentIdEqualsOrderByPostedDateDesc(parentId); if (childMessages == null) { return null; } List<MessageDto> childDtos = childMessages .stream() .map(message -> messageAdapter.adapt(message)) .collect(Collectors.toList()); for (MessageDto parent : childDtos) { parent.addChildMessages(findChildMessages(parent.getId())); } return childDtos; } }
[ "tjfleung@live.ca" ]
tjfleung@live.ca
034dcd87ab6491cb93eacf43d118ee5ed9c8e30e
3c5649b7e830c2f97d76677e6474a830f2c9e4f5
/src/com/facebook/buck/rules/modern/config/HybridLocalBuildStrategyConfig.java
a8a82d4bdaf283abe604f5e832d4b6549e0b8e0d
[ "Apache-2.0" ]
permissive
MalkeshDalia/buck
067a9342f9d03f91b9f9f6562b7ac8801cbaa992
2c26b1133002125ef3d43706918799bddca0f2da
refs/heads/master
2023-04-15T18:17:43.136919
2019-05-01T03:29:02
2019-05-01T04:34:46
184,374,733
1
0
Apache-2.0
2023-04-03T23:11:10
2019-05-01T05:49:53
Java
UTF-8
Java
false
false
1,318
java
/* * Copyright 2018-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.facebook.buck.rules.modern.config; /** Configuration for the "hybrid_local" build strategy. */ public class HybridLocalBuildStrategyConfig { private final int localJobs; private final int delegateJobs; private final ModernBuildRuleStrategyConfig delegate; public HybridLocalBuildStrategyConfig( int localJobs, int delegateJobs, ModernBuildRuleStrategyConfig delegate) { this.localJobs = localJobs; this.delegateJobs = delegateJobs; this.delegate = delegate; } public ModernBuildRuleStrategyConfig getDelegateConfig() { return delegate; } public int getLocalJobs() { return localJobs; } public int getDelegateJobs() { return delegateJobs; } }
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
514ee5f3e236d443d60931f4ac698a585b97cb8f
5ee8c2891ad48c1d7dfc45d19a8f8ad7f6761ad3
/dConnectDevicePlugin/dConnectDeviceTest/app/src/main/java/org/deviceconnect/android/deviceplugin/test/profile/unique/package-info.java
f502a7fe127f78b87f71e9e93ca51cb33dad99ec
[ "MIT" ]
permissive
DeviceConnect/DeviceConnect-Android
48657c6a495e7a7a90d445c4c85d76dd146cdcfc
bebe333a5c8b8f246116c696f2b55c69f169a0ec
refs/heads/main
2023-03-16T09:27:59.261255
2023-03-14T01:16:29
2023-03-14T01:16:29
29,235,999
57
34
MIT
2023-03-14T01:16:30
2015-01-14T09:05:06
Java
UTF-8
Java
false
false
309
java
/* org.deviceconnect.android.deviceplugin.test Copyright (c) 2014 NTT DOCOMO,INC. Released under the MIT license http://opensource.org/licenses/mit-license.php */ /** * Device ConnectManagerのテスト用独自プロファイル. */ package org.deviceconnect.android.deviceplugin.test.profile.unique;
[ "hoshi@gclue.jp" ]
hoshi@gclue.jp
052d9ae923fd80bdc2d0d35d3e3fcc4377e0cfe4
64fdcf72658b47aadb78e194800a98b1467fc306
/app/src/main/java/com/kevin/demo/module/handler/HandlerActivity.java
42a38dd5286bfefbdbba911f862f118302ddbd95
[]
no_license
tuchuantao/AndroidDemo
70c484c3d90de4dc3bf4ca96ca6de07ee3b75414
82b619bbad59257eab7e79faaab248a7d58f7a7e
refs/heads/master
2023-01-12T22:51:23.412561
2022-12-25T07:13:11
2022-12-25T07:13:11
189,379,544
0
0
null
null
null
null
UTF-8
Java
false
false
4,398
java
package com.kevin.demo.module.handler; import android.app.Activity; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.os.MessageQueue; import android.util.Log; import android.widget.TextView; import androidx.annotation.RequiresApi; import com.kevin.demo.R; import java.lang.reflect.Field; /** * Created by tuchuantao on 2021/7/21 * Desc: */ public class HandlerActivity extends Activity { private TextView mContentView; private MyView mCustomView; private Handler mHandler = new Handler(); @RequiresApi(api = Build.VERSION_CODES.M) @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_handler); mContentView = findViewById(R.id.content); mCustomView = findViewById(R.id.my_view); MessageQueue queue = mHandler.getLooper().getQueue(); try { Field field = MessageQueue.class.getDeclaredField("mMessages"); field.setAccessible(true); Message blocked = (Message) field.get(queue); Log.v("Kevin", "111111blocked=" + blocked + " hashCode=" + blocked.hashCode()); } catch (NoSuchFieldException | IllegalAccessException e) { e.printStackTrace(); Log.v("Kevin", "Exception=" + e); } mHandler.post(() -> { Log.v("Kevin", "onCreate() post width=" + mContentView.getWidth() + " height=" + mContentView.getHeight()); Log.v("Kevin", "onCreate() post mCustomView width=" + mCustomView.getWidth() + " height=" + mCustomView.getHeight()); }); try { Field field = MessageQueue.class.getDeclaredField("mMessages"); field.setAccessible(true); Message blocked = (Message) field.get(queue); // boolean blocked = field.getBoolean(queue); Log.v("Kevin", "blocked=" + blocked + " hashCode=" + blocked.hashCode()); } catch (NoSuchFieldException | IllegalAccessException e) { e.printStackTrace(); Log.v("Kevin", "Exception=" + e); } } @RequiresApi(api = Build.VERSION_CODES.M) @Override protected void onResume() { super.onResume(); Log.v("Kevin", "onResume() width=" + mContentView.getWidth() + " height=" + mContentView.getHeight()); Log.v("Kevin", "onResume() mCustomView width=" + mCustomView.getWidth() + " height=" + mCustomView.getHeight()); MessageQueue queue = mHandler.getLooper().getQueue(); try { Field field = MessageQueue.class.getDeclaredField("mMessages"); field.setAccessible(true); Message blocked = (Message) field.get(queue); // boolean blocked = field.getBoolean(queue); Log.v("Kevin", "22222blocked=" + blocked + " hashCode=" + blocked.hashCode()); } catch (NoSuchFieldException | IllegalAccessException e) { e.printStackTrace(); Log.v("Kevin", "Exception=" + e); } mHandler.post(() -> { try { Field field = MessageQueue.class.getDeclaredField("mMessages"); field.setAccessible(true); Message blocked = (Message) field.get(queue); // boolean blocked = field.getBoolean(queue); Log.v("Kevin", "44444blocked=" + blocked + " hashCode=" + blocked.hashCode()); } catch (NoSuchFieldException | IllegalAccessException e) { e.printStackTrace(); Log.v("Kevin", "Exception=" + e); } Log.v("Kevin", "post width=" + mContentView.getWidth() + " height=" + mContentView.getHeight()); Log.v("Kevin", "post mCustomView width=" + mCustomView.getWidth() + " height=" + mCustomView.getHeight()); }); try { Field field = MessageQueue.class.getDeclaredField("mMessages"); field.setAccessible(true); Message blocked = (Message) field.get(queue); // boolean blocked = field.getBoolean(queue); Log.v("Kevin", "3333333blocked=" + blocked + " hashCode=" + blocked.hashCode()); } catch (NoSuchFieldException | IllegalAccessException e) { e.printStackTrace(); Log.v("Kevin", "Exception=" + e); } } }
[ "tuchuantao@kuaishou.com" ]
tuchuantao@kuaishou.com
dd6b473421c58759a0cfa31d17b52bda64584b2e
5429a86bd90bb25d94747314f5281112681d484d
/app/src/main/java/com/boucaud/stephane/androidrattrapage/Activities/TVDetailsActivity.java
a2412ce76e504e604000e204f717f058a6e68563
[]
no_license
NguyenBAYLATRY/AndroidFinalProjectRattrapage
23056b1f21a780ac6e5b7308cd6ae38103d80b2d
5c163fbca8fc882719df7bf936cd0dfe5b07305d
refs/heads/master
2020-05-28T00:39:10.751936
2019-05-19T15:43:46
2019-05-19T15:43:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,356
java
package com.boucaud.stephane.androidrattrapage.Activities; import android.content.Intent; import android.content.SharedPreferences; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.widget.ImageView; import android.widget.TextView; import com.boucaud.stephane.androidrattrapage.Controllers.Controller; import com.boucaud.stephane.androidrattrapage.Models.TVShow; import com.boucaud.stephane.androidrattrapage.Models.TVShowDetails; import com.boucaud.stephane.androidrattrapage.R; import com.boucaud.stephane.androidrattrapage.RecyclerViewsClasses.HorizontalCreatorsAdapter; import com.bumptech.glide.Glide; import com.google.gson.Gson; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; public class TVDetailsActivity extends AppCompatActivity { // General parameters private String language = "fr"; private String api_key = "8e894528fa9c319948a48ce050f28657"; private Controller controller; // View Objects private TextView textview_name; private TextView textview_status; private TextView textview_first_air_date; private TextView textview_last_air_date; private TextView textview_vote_average; private TextView textview_vote_count; private TextView textview_popularity; private TextView textview_overview; private TextView textview_genres; private TextView textview_production_companies; private ImageView thumbnail; // Recycler View private RecyclerView.LayoutManager layoutManager; private RecyclerView ListRecyclerView; private RecyclerView.Adapter mAdapter; // Runtime parameters private int tv_id; // Shared preferences SharedPreferences savedTV; String SHARED_PREFS_FILE = "SAVED_TV"; /** * Function to save the movies into Shared preferences * @param key * @param value */ private void SavePreferences(String key, String value){ SharedPreferences.Editor editor = savedTV.edit(); editor.putString(key, value); editor.apply(); } private String LoadPreferences(String key, String default_value){ return savedTV.getString(key, default_value) ; } /** * Function to load data from API to describe movie details */ private void load_tv_data(){ controller.queryTVShowDetails(tv_id, api_key, language ,new Callback<TVShowDetails>() { public void onResponse(Call<TVShowDetails> call, Response<TVShowDetails> response) { if (response.isSuccessful()) { //IF SUCCESSFULL API CALL TVShowDetails TVDetails = response.body(); textview_name.setText(TVDetails.getName()); textview_status.setText("Status:\n" + TVDetails.getStatus()); textview_first_air_date.setText("First Air date:\n" + TVDetails.getFirst_air_date()); textview_last_air_date.setText("Last Air date:\n" + TVDetails.getLast_air_date()); textview_vote_average.setText("Votes average:\n" + Float.toString(TVDetails.getVote_average())); textview_vote_count.setText("Votes count:\n" + Integer.toString(TVDetails.getVote_count())); textview_popularity.setText("Popularity:\n" + Float.toString(TVDetails.getVote_count())); textview_overview.setText("Overview:\n" + TVDetails.getOverview()); textview_genres.setText("Genres:\n" + TVDetails.getGenresStringList()); textview_production_companies.setText("Prod companies:\n" + TVDetails.getProductionCompaniesStringList()); mAdapter = new HorizontalCreatorsAdapter(TVDetails.getCreated_by(), api_key); ListRecyclerView.setAdapter(mAdapter); Glide.with(getApplicationContext()).load(TVDetails.getPosterFullPath()).into(thumbnail); // IF DATA LOADED SUCESSFULLY TVShow[] current_saved_tvs; TVShow[] tmp_current_saved_tvs; String current_saved_tvs_json; TVShow current_tv; Gson gson = new Gson(); current_tv = new TVShow(TVDetails); // Decode already saved movies current_saved_tvs_json = LoadPreferences("current_saved_tvs", "[]"); current_saved_tvs = gson.fromJson(current_saved_tvs_json, TVShow[].class); // Copy old data and free space for new one if (current_saved_tvs.length <= 0) { current_saved_tvs = new TVShow[1]; } else { tmp_current_saved_tvs = new TVShow[current_saved_tvs.length + 1]; System.arraycopy(current_saved_tvs,0,tmp_current_saved_tvs,0,current_saved_tvs.length); current_saved_tvs = tmp_current_saved_tvs; } // Add current movie and encode in JSON current_saved_tvs[current_saved_tvs.length-1] = current_tv; String json = gson.toJson(current_saved_tvs); // Save new visited movie to Shared Preferences SavePreferences("current_saved_tvs", json); } else { System.out.println(response.errorBody()); } } public void onFailure(Call call, Throwable t) { t.printStackTrace(); } }); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_tvdetails); // Get Intent data Intent intent = getIntent(); if (intent != null) { tv_id = intent.getIntExtra("tv_id", 0); api_key = intent.getStringExtra("api_key"); } // Prepare Shared Preferences to save viewed movies savedTV = getSharedPreferences(SHARED_PREFS_FILE, getApplicationContext().MODE_PRIVATE); // Load View Objects textview_name = findViewById(R.id.name); textview_status = findViewById(R.id.status); textview_first_air_date = findViewById(R.id.first_air_date); textview_last_air_date = findViewById(R.id.last_air_date); textview_vote_average = findViewById(R.id.vote_average); textview_vote_count = findViewById(R.id.vote_count); textview_popularity = findViewById(R.id.popularity); textview_overview = findViewById(R.id.overview); textview_genres = findViewById(R.id.genres); textview_production_companies = findViewById(R.id.production_companies); thumbnail = findViewById(R.id.thumbnail); ListRecyclerView = (RecyclerView) findViewById(R.id.creatorsList); // Load DATA controller = new Controller(api_key, language); //Prepare recycler view for creators layoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false); ListRecyclerView.setLayoutManager(layoutManager); load_tv_data(); } }
[ "stephane.boucaud@outlook.fr" ]
stephane.boucaud@outlook.fr
6924e06293b5b8d0b6efd4a2aa44779a45ce4b2a
6a17ccfa5750b333ca36ab687eae456114dfff17
/apis/api-core/api-core-common/src/main/java/org/hoteia/qalingo/core/domain/RetailerCustomerComment.java
cff0296ba71ed42e7950886a1295993b1ca56d16
[ "Apache-2.0" ]
permissive
bikashdora/qalingo-engine
4d5434c7035ff4399a3a419508083d65871cbc21
4f54fcbf4caee81b384600c67b774158b412225c
refs/heads/master
2021-01-18T06:07:15.097754
2014-11-23T17:35:15
2014-11-23T17:35:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,864
java
/** * Most of the code in the Qalingo project is copyrighted Hoteia and licensed * under the Apache License Version 2.0 (release version 0.8.0) * http://www.apache.org/licenses/LICENSE-2.0 * * Copyright (c) Hoteia, 2012-2014 * http://www.hoteia.com - http://twitter.com/hoteia - contact@hoteia.com * */ package org.hoteia.qalingo.core.domain; import java.util.Date; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; @Entity @Table(name="TECO_RETAILER_CUSTOMER_COMMENT") public class RetailerCustomerComment extends AbstractAddress { /** * Generated UID */ private static final long serialVersionUID = 1424510557043858148L; @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name="ID", nullable=false) private Long id; @Column(name="COMMENT") private String comment; @Column(name="RETAILER_CUSTOMER_COMMENT_ID") private Long retailerCustomerCommentId; @OneToOne(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.DETACH}) @JoinColumn(name="CUSTOMER_ID") private Customer customer; @Column(name="RETAILER_ID") private Long retailerId; @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinColumn(name="RETAILER_CUSTOMER_COMMENT_ID") private Set<RetailerCustomerComment> customerComments = new HashSet<RetailerCustomerComment>(); @Temporal(TemporalType.TIMESTAMP) @Column(name="DATE_CREATE") private Date dateCreate; @Temporal(TemporalType.TIMESTAMP) @Column(name="DATE_UPDATE") private Date dateUpdate; public RetailerCustomerComment() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getComment() { return comment; } public void setComment(String comment) { this.comment = comment; } public Long getRetailerCustomerCommentId() { return retailerCustomerCommentId; } public void setRetailerCustomerCommentId(Long retailerCustomerCommentId) { this.retailerCustomerCommentId = retailerCustomerCommentId; } public Customer getCustomer() { return customer; } public void setCustomer(Customer customer) { this.customer = customer; } public Long getRetailerId() { return retailerId; } public void setRetailerId(Long retailerId) { this.retailerId = retailerId; } public Set<RetailerCustomerComment> getCustomerComments() { return customerComments; } public void setCustomerComments(Set<RetailerCustomerComment> customerComments) { this.customerComments = customerComments; } public Date getDateCreate() { return dateCreate; } public void setDateCreate(Date dateCreate) { this.dateCreate = dateCreate; } public Date getDateUpdate() { return dateUpdate; } public void setDateUpdate(Date dateUpdate) { this.dateUpdate = dateUpdate; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((dateCreate == null) ? 0 : dateCreate.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((retailerId == null) ? 0 : retailerId.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; RetailerCustomerComment other = (RetailerCustomerComment) obj; if (dateCreate == null) { if (other.dateCreate != null) return false; } else if (!dateCreate.equals(other.dateCreate)) return false; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (retailerId == null) { if (other.retailerId != null) return false; } else if (!retailerId.equals(other.retailerId)) return false; return true; } @Override public String toString() { return "RetailerCustomerComment [id=" + id + ", comment=" + comment + ", retailerCustomerCommentId=" + retailerCustomerCommentId + ", retailerId=" + retailerId + ", dateCreate=" + dateCreate + ", dateUpdate=" + dateUpdate + "]"; } }
[ "denis@Hoteia-Laptop.home" ]
denis@Hoteia-Laptop.home
faf136db3cd9046c31c47bf9c7417a063bcfc4ab
8e2af8445f7af4d42f9e0470f90e043766556bc0
/app/src/main/java/edu/cascadia/mobas/gybitg/viewmodel/GalleryViewModel.java
684e9c47e463be0f6ed13d606aadd9bef8ab8f02
[]
no_license
MobileApps-Cascadia/gybitg-android
ff86e698d0566735130254954ea83b0d192d72f6
3f5b55f16b9b04338939b003895c5fbbfca54508
refs/heads/master
2020-04-03T18:14:38.848369
2019-03-20T00:47:36
2019-03-20T00:47:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,795
java
package edu.cascadia.mobas.gybitg.viewmodel; import android.arch.lifecycle.AndroidViewModel; import java.util.List; import edu.cascadia.mobas.gybitg.VideoUpload; //Class will handle logic of data if a repository is not available //Has a Constructor that will take in an application //Will insert the VideoUpload passed in //Will return all the VideoUploads in the list //Will delete all of the VideoUploads in the list //Will add all values to the list from a list //package edu.cascadia.mobas.gybitg.ViewModel; import android.app.Application; import android.arch.lifecycle.AndroidViewModel; import android.arch.lifecycle.MutableLiveData; import android.arch.lifecycle.ViewModel; import android.support.annotation.NonNull; import java.util.ArrayList; import java.util.List; import java.util.Objects; import edu.cascadia.mobas.gybitg.VideoUpload; public class GalleryViewModel extends AndroidViewModel { public List<VideoUpload> mVideoUpload = new ArrayList<>(); //for mutableLiveData //public MutableLiveData<List<VideoUpload>> mVideoUpload = new MutableLiveData(); //Purpose: Constructor that will take in an application //Precondtion: The application passed in is not null //Postcondtion: Will construct an instance of the GalleryViewModel public GalleryViewModel(@NonNull Application application) { super(application); //if using LiveData // mVideoUpload.setValue(new ArrayList<VideoUpload>()); } //Purpose: will insert the VideoUpload passed in //Precondition: the videoUpload passed in is not null //Postcondition: the VideoUpload will be inserted to the list public void insertVideoUpload(VideoUpload videoUpload){ if(videoUpload != null) { mVideoUpload.add(videoUpload); //if using LiveData // Objects.requireNonNull(mVideoUpload.getValue()).add(videoUpload); } } //Purpose: to return all the VideoUploads in the MutableLiveData list //Preconditon: none //Postcondition: the list of videos will be returned public List<VideoUpload> getAllVideoUploads(){ //if using LiveData //public MutableLiveData<List<VideoUpload>> getAllVideoUploads(){ return mVideoUpload; } //Purpose: to delete all of the VideoUploads in the list //Precondition: none //Postcondition: the list will be emptied public void deleteVideoUploads() { mVideoUpload.clear(); //if using liveData // Objects.requireNonNull(mVideoUpload.getValue()).clear(); } //Purpose: to delete the videoUpload with the title that is passed in //Precondtion: the title passed is not null and the list contains the Video //Postconditon: the video with the title is deleted public void deleteVideoUpload(String title){ if(title != null) { for (VideoUpload t : mVideoUpload) { if (t.GetTitle().equals(title)) { mVideoUpload.remove(t); } } } //if using liveData /*if(title != null) { for (VideoUpload t : Objects.requireNonNull(mVideoUpload.getValue())) { if (t.GetTitle().equals(title)) { mVideoUpload.getValue().remove(t); } } }*/ } //Purpose: To add all values to the list from a list //Precondition: The List is not null //Postcondition: the list passed in will be added to the list //if using LiveData use: public void addAll(List<VideoUpload> videoUpload){ public void addAll(List<VideoUpload> videoUpload){ if(videoUpload != null) { mVideoUpload.addAll(videoUpload); //if using liveData // mVideoUpload.getValue().addAll(videoUpload); } } }
[ "35508373+Juanitaag1@users.noreply.github.com" ]
35508373+Juanitaag1@users.noreply.github.com
f5d5988cc7d4512c87027eca35813e781069225e
c876a50c56c058d8a137bacf9cdc5208d1aca5a0
/GenericsAndCollections/src/ru/sstu/GenericBox.java
96568172cdfac7a3d2ec71d4c081f0c9b5ac0cb6
[]
no_license
MyWayToJavaJunior/JAVA_EE
0167a709ac974bf034f3c3c59bf9a246ca039876
5a97a8836c554efe70e1bb1b0039e2949336b533
refs/heads/master
2021-06-11T06:51:22.422211
2017-01-23T14:54:23
2017-01-23T14:54:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package ru.sstu; /** * Created by Shvarts on 19.10.2016. */ public class GenericBox<T>{ public T content = null; }
[ "accp15@mail.ru" ]
accp15@mail.ru
d15e227bc295e7df9b2f7bdeb036e871f166c601
4ad1f73d1530d624fd73914f55fe5949899f4fb9
/app/src/test/java/com/example/ben/splitpay/LinkItemsTest.java
d29bbf1397b7602989e4b79081440f6911773f14
[]
no_license
arbiben/splitPay
b7c2773c411ae446539457c75e898bdfe1893b49
a0fe22955bbbd2c613b9ad43fce0922235c88f7c
refs/heads/master
2020-03-23T08:33:12.862503
2018-08-20T16:26:44
2018-08-20T16:26:44
141,333,609
0
0
null
null
null
null
UTF-8
Java
false
false
1,650
java
package com.example.ben.splitpay; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.lang.reflect.Array; import java.util.ArrayList; import static org.junit.Assert.*; public class LinkItemsTest { LinkItems linkItems; @Before public void setUp() throws Exception { linkItems = new LinkItems(); } @Test public void linkItems() { // person id and item id are linked linkItems.linkItems(1, 5); linkItems.linkItems(1, 1); linkItems.linkItems(1, 7); linkItems.linkItems(2, 3); linkItems.linkItems(2, 12); linkItems.linkItems(3, 6); linkItems.linkItems(4, 4); int personID = linkItems.getPersonLinkedToBillingItem(12); assertEquals(personID, 2); personID = linkItems.getPersonLinkedToBillingItem(6); assertEquals(personID, 3); personID = linkItems.getPersonLinkedToBillingItem(4); assertEquals(personID, 4); personID = linkItems.getPersonLinkedToBillingItem(1); assertEquals(personID, 1); Integer j = linkItems.getPersonLinkedToBillingItem(34); assertEquals(j, null); ArrayList<Integer> person1 = linkItems.getBillinItemsLinkedToPerson(1); ArrayList<Integer> person2 = linkItems.getBillinItemsLinkedToPerson(2); ArrayList<Integer> person3 = linkItems.getBillinItemsLinkedToPerson(3); ArrayList<Integer> person4 = linkItems.getBillinItemsLinkedToPerson(4); System.out.println(person1); System.out.println(person2); System.out.println(person3); System.out.println(person4); } }
[ "ba2490@columbia.edu" ]
ba2490@columbia.edu
8b7bf39e758a840a6a4b9eaf543e17c0556a6dca
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
/sources/com/google/android/gms/internal/ads/zzaoz.java
a3ece845157724ff942fa5f93bb63a721b79562f
[]
no_license
sengeiou/KnowAndGo-android-thunkable
65ac6882af9b52aac4f5a4999e095eaae4da3c7f
39e809d0bbbe9a743253bed99b8209679ad449c9
refs/heads/master
2023-01-01T02:20:01.680570
2020-10-22T04:35:27
2020-10-22T04:35:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
779
java
package com.google.android.gms.internal.ads; import android.os.Parcel; import android.os.RemoteException; public abstract class zzaoz extends zzfn implements zzaoy { public zzaoz() { super("com.google.android.gms.ads.internal.mediation.client.rtb.ISignalsCallback"); } /* access modifiers changed from: protected */ public final boolean dispatchTransaction(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException { switch (i) { case 1: zzdc(parcel.readString()); break; case 2: onFailure(parcel.readString()); break; default: return false; } parcel2.writeNoException(); return true; } }
[ "joshuahj.tsao@gmail.com" ]
joshuahj.tsao@gmail.com
a84e755951b6bc5680ff93ecd261d7687e78ea88
9ad12ef576079d82efd3941e1645b8bae9d73d7e
/src/CTCI/p4/p4_8_first_common_ancestor.java
e82411474b4081a18f5ef6436344d7026fef17c3
[]
no_license
taewookim03/Algorithms
b598573e32bbb0d1b2731bb5605067c149054bf9
de60532bd8e58ea9a3dda43b27bbd0aa0a58f475
refs/heads/master
2021-01-11T14:40:01.679492
2017-08-06T00:54:07
2017-08-06T00:54:07
80,192,068
0
0
null
null
null
null
UTF-8
Java
false
false
2,483
java
package CTCI.p4; class p4_8_first_common_ancestor { private static class Node{ int val; Node left, right; Node(int val){ this.val = val; } } //find first common ancestor in a binary tree (not BST) //solution differs depending on if parent pointer available //if parent available, start from one node and traverse upward, checking if its sibling "covers" the other //if not available, check until the two nodes are not on the same side of the tree as you go down the root to the //side that contains these nodes static Node commonAncestor(Node root, Node a, Node b){ if (!covers(root, a) || !covers(root, b)) return null; if (covers(a, b)) return a; if (covers(b, a)) return b; boolean aLeft = covers(root.left, a); boolean bLeft = covers(root.left, b); if (aLeft != bLeft) return root;//on different sides Node containsAB = aLeft ? root.left : root.right; return commonAncestor(containsAB, a, b); } static boolean covers(Node root, Node node){ if (root == null) return false; if (root == node) return true; return (covers(root.left, node) || covers(root.right, node)); } //optimized version - need to check if both vertices exist in the tree static Node commonAncestorWrapper(Node root, Node a, Node b){ if (!covers(root, a) || !covers(root, b)) return null; return commonAncestorOpt(root, a, b); } static Node commonAncestorOpt(Node root, Node a, Node b){ if (root == null) return null; if (root == a || root == b) return root; Node left = commonAncestorOpt(root.left, a, b); Node right = commonAncestorOpt(root.right, a, b); if (left != null){ if (right != null) return root;//found first common ancestor else return left;//pass either common ancestor or a or b } else return right; } public static void main(String[] args){ Node root = new Node(1); root.left = new Node(2); root.left.left = new Node(3); root.left.right = new Node(4); root.left.right.left = new Node(9); root.right = new Node(5); root.right.left = new Node(6); root.right.right = new Node(7); root.right.right.right = new Node(8); System.out.println(commonAncestorWrapper(root, root.left.left, root.left.right.left).val); } }
[ "taewookim03@gmail.com" ]
taewookim03@gmail.com
aa0803fbfde119ecb749404bf04cd5708b99f1dc
62a5c8d3ea75a624064e78fc484a9230c342e294
/src/main/java/nom/tam/fits/header/extra/CXCExt.java
85b0b5016afca387e0d9f5f8a8600580fc4a2f28
[]
no_license
stargaser/nom-tam-fits
c96499e1913be89edc1ee5cb9c5c1a370d362428
7885275caf7af42d6c2af44548ea51268a8b9f2d
refs/heads/master
2021-01-17T21:37:19.605427
2015-02-21T07:05:52
2015-02-21T07:05:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,738
java
package nom.tam.fits.header.extra; /* * #%L * nom.tam FITS library * %% * Copyright (C) 1996 - 2015 nom-tam-fits * %% * This is free and unencumbered software released into the public domain. * * Anyone is free to copy, modify, publish, use, compile, sell, or * distribute this software, either in source code form or as a compiled * binary, for any purpose, commercial or non-commercial, and by any * means. * * In jurisdictions that recognize copyright laws, the author or authors * of this software dedicate any and all copyright interest in the * software to the public domain. We make this dedication for the benefit * of the public at large and to the detriment of our heirs and * successors. We intend this dedication to be an overt act of * relinquishment in perpetuity of all present and future rights to this * software under copyright law. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * #L% */ import nom.tam.fits.header.FitsHeaderImpl; import nom.tam.fits.header.IFitsHeader; /** * This is the file content.txt that presents a comprehensive compilation of all * classes of data products in the Chandra Data Archive for the "flight" * dataset. This file is the definitive authority on the values of various FITS * header keywords. * <p> * All files are identified by the CONTENT value of their principal HDUs. * </p> * * <pre> * http://cxc.harvard.edu/contrib/arots/fits/content.txt * </pre> * * @author Richard van Nieuwenhoven */ public enum CXCExt implements IFitsHeader { /** * ASC-DS processing system revision (release) */ ASCDSVER("ASC-DS processing system revision (release)"), /** * Correction applied to Basic Time rate (s) */ BTIMCORR("Correction applied to Basic Time rate (s)"), /** * Basic Time clock drift (s / VCDUcount^2) */ BTIMDRFT("Basic Time clock drift (s / VCDUcount^2)"), /** * Basic Time offset (s) */ BTIMNULL("Basic Time offset (s)"), /** * Basic Time clock rate (s / VCDUcount) */ BTIMRATE("Basic Time clock rate (s / VCDUcount)"), /** * Data product identification '########' */ CONTENT("Data product identification"), /** * ??? */ CONVERS("??"), /** * Data class '########' */ DATACLAS("Data class"), /** * Dead time correction */ DTCOR("Dead time correction"), /** * Assumed focal length, mm; Level 1 and up */ FOC_LEN("Assumed focal length, mm; Level 1 and up"), /** * ICD reference */ HDUSPEC("ICD reference"), /** * The OGIP long string convention may be used. */ LONGSTRN("The OGIP long string convention may be used."), /** * Mission is AXAF */ MISSION("Mission is AXAF"), /** * Processing version of data */ REVISION("Processing version of data"), /** * Nominal roll angle, deg */ ROLL_NOM("Nominal roll angle, deg"), /** * Sequence number */ SEQ_NUM("Sequence number"), /** * SIM focus pos (mm) */ SIM_X("SIM focus pos (mm)"), /** * SIM orthogonal axis pos (mm) */ SIM_Y("SIM orthogonal axis pos (mm)"), /** * SIM translation stage pos (mm) */ SIM_Z("SIM translation stage pos (mm)"), /** * Major frame count at start */ STARTMJF("Major frame count at start"), /** * Minor frame count at start */ STARTMNF("Minor frame count at start"), /** * On-Board MET close to STARTMJF and STARTMNF */ STARTOBT("On-Board MET close to STARTMJF and STARTMNF"), /** * Major frame count at stop */ STOPMJF("Major frame count at stop"), /** * Minor frame count at stop */ STOPMNF("Minor frame count at stop"), /** * Absolute precision of clock correction */ TIERABSO("Absolute precision of clock correction"), /** * Short-term clock stability */ TIERRELA("Short-term clock stability"), /** * Time stamp reference as bin fraction */ TIMEPIXR("Time stamp reference as bin fraction"), /** * Telemetry revision number (IP&CL) */ TLMVER("Telemetry revision number (IP&CL)"), /** * As in the "TIME" column: raw space craft clock; */ TSTART("As in the \"TIME\" column: raw space craft clock;"), /** * add TIMEZERO and MJDREF for absolute TT */ TSTOP("add TIMEZERO and MJDREF for absolute TT"); private IFitsHeader key; private CXCExt(String comment) { key = new FitsHeaderImpl(name(), IFitsHeader.SOURCE.CXC, HDU.ANY, VALUE.STRING, comment); } private CXCExt(String key, String comment) { this.key = new FitsHeaderImpl(name(), IFitsHeader.SOURCE.CXC, HDU.ANY, VALUE.STRING, comment); } @Override public String comment() { return key.comment(); } @Override public HDU hdu() { return key.hdu(); } @Override public String key() { return key.key(); } @Override public IFitsHeader n(int... number) { return key.n(number); } @Override public SOURCE status() { return key.status(); } @Override public VALUE valueType() { return key.valueType(); } }
[ "ritchie@gmx.at" ]
ritchie@gmx.at
8b6fef7078ef3da1a7381250df5ae31de592a5c4
124c730fcbc03dae8e5f3fb70679c1c4e2e0dfc9
/java-plus-lambda/src/main/java/com/java/plus/lambda/ComparatorsPlus.java
0cd30e45a28e840ea3ee90029580ead58842105e
[]
no_license
jianjunyue/java-plus
fe54703fa2c196a79f20c76a1ca93e85d9f2fd8e
12d41d6989f15eef60f08aa73e2cc14772cd3c0d
refs/heads/master
2023-03-23T17:08:02.913043
2021-03-16T08:04:08
2021-03-16T08:04:08
286,040,500
0
1
null
null
null
null
UTF-8
Java
false
false
1,061
java
package com.java.plus.lambda; import java.util.List; import java.util.Set; import java.util.function.BiConsumer; import java.util.function.BinaryOperator; import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Collector; import java.util.stream.Collectors; /** * 自定义 Collectors.toList() * */ public class ComparatorsPlus<T> implements Collector<T,List<T>,List<T>> { public static void main(String[] args) { Collectors.toList(); } @Override public Supplier<List<T>> supplier() { // TODO Auto-generated method stub return null; } @Override public BiConsumer<List<T>, T> accumulator() { // TODO Auto-generated method stub return null; } @Override public BinaryOperator<List<T>> combiner() { // TODO Auto-generated method stub return null; } @Override public Function<List<T>, List<T>> finisher() { // TODO Auto-generated method stub return null; } @Override public Set<Characteristics> characteristics() { // TODO Auto-generated method stub return null; } }
[ "apple@apples-MacBook-Pro.local" ]
apple@apples-MacBook-Pro.local
7c2dfe93a8d387e60729f8757c4b2454f4dd8c7b
e8e25da265299af2b885b4ccb092e2d6298de7ec
/src/main/java/springframework_core_technology/study/part11_validationAbstract/EventValidator.java
007ce47215608a8edee56188851861afee1f49eb
[]
no_license
uelfqk/Spring-Core-Technology-Study
54c63eef55ef1069326bb73f44a60b5e45a5fbb0
a0e76e734dec98f276ec427665ec621ea12478f9
refs/heads/main
2023-02-05T17:39:30.866172
2020-12-28T14:16:02
2020-12-28T14:16:02
324,557,174
0
0
null
null
null
null
UTF-8
Java
false
false
571
java
package springframework_core_technology.study.part11_validationAbstract; import org.springframework.validation.Errors; import org.springframework.validation.ValidationUtils; import org.springframework.validation.Validator; public class EventValidator implements Validator { @Override public boolean supports(Class<?> aClass) { return Event.class.equals(aClass); } @Override public void validate(Object o, Errors errors) { ValidationUtils.rejectIfEmptyOrWhitespace(errors, "title", "notEmpty", "Empty title is now allowed"); } }
[ "shhzg_zz@naver.com" ]
shhzg_zz@naver.com
761ce12a780b50554b53f61339401d8df470755c
806f76edfe3b16b437be3eb81639d1a7b1ced0de
/src/com/huawei/wallet/logic/install/PackageInstallHelper.java
623e364f75a45ef4fe0c4a703668f03db3ad41b8
[]
no_license
magic-coder/huawei-wear-re
1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01
935ad32f5348c3d8c8d294ed55a5a2830987da73
refs/heads/master
2021-04-15T18:30:54.036851
2018-03-22T07:16:50
2018-03-22T07:16:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,334
java
package com.huawei.wallet.logic.install; import android.content.Context; import android.content.Intent; import android.content.pm.IPackageInstallObserver; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Handler; import android.text.TextUtils; import com.huawei.wallet.utils.log.LogC; import java.io.File; import java.lang.reflect.InvocationTargetException; import net.sqlcipher.database.SQLiteDatabase; public class PackageInstallHelper { public boolean m28057a(Context context) { if (context == null) { LogC.m28534d("isAppHasInstallPermission context null", false); return false; } int checkPermission = context.getPackageManager().checkPermission("android.permission.INSTALL_PACKAGES", context.getPackageName()); LogC.m28530b("permisstionGranted is 0 ?:" + checkPermission, false); if (checkPermission == 0) { return true; } return false; } public boolean m28058a(Context context, Handler handler, String str, String str2) { if (context == null) { LogC.m28530b("install error, context is null.", false); return false; } else if (TextUtils.isEmpty(str)) { LogC.m28530b("install error, install path is valid.", false); return false; } else if (TextUtils.isEmpty(str2)) { LogC.m28530b("install error, package name is null.", false); return false; } else if (m28057a(context)) { return m28060b(context, handler, str, str2); } else { return m28059a(context, str); } } public boolean m28059a(Context context, String str) { if (context == null) { LogC.m28530b("install error, context is null.", false); return false; } else if (TextUtils.isEmpty(str)) { LogC.m28530b("install error, install path is valid.", false); return false; } else { Intent intent = new Intent("android.intent.action.VIEW"); File file = new File(str); if (!file.exists() || !file.isFile() || file.length() <= 0) { return false; } LogC.m28530b("execute installNormal. ", false); intent.setDataAndType(Uri.parse("file://" + str), "application/vnd.android.package-archive"); intent.addFlags(SQLiteDatabase.CREATE_IF_NECESSARY); context.startActivity(intent); return true; } } public boolean m28060b(Context context, Handler handler, String str, String str2) { if (context == null) { LogC.m28530b("install error, context is null.", false); return false; } else if (TextUtils.isEmpty(str)) { LogC.m28530b("install error, install file path is valid.", false); return false; } else if (TextUtils.isEmpty(str2)) { LogC.m28530b("install error, package name is null.", false); return false; } else { Uri fromFile = Uri.fromFile(new File(str)); PackageManager packageManager = context.getPackageManager(); PackageInstallObserver packageInstallObserver = new PackageInstallObserver(handler, str2); try { PackageManager.class.getMethod("installPackage", new Class[]{Uri.class, IPackageInstallObserver.class, Integer.TYPE, String.class}).invoke(packageManager, new Object[]{fromFile, packageInstallObserver, Integer.valueOf(2), str2}); LogC.m28530b("start install.", false); return true; } catch (NoSuchMethodException e) { LogC.m28534d("installSilent, occur no such method exception.", false); handler.sendEmptyMessage(-2001); return false; } catch (InvocationTargetException e2) { LogC.m28534d("installSilent, occur invocation target exception.", false); handler.sendEmptyMessage(-2001); return false; } catch (IllegalAccessException e3) { LogC.m28534d("installSilent, occur illegal access exception.", false); handler.sendEmptyMessage(-2001); return false; } } } }
[ "lebedev1537@gmail.com" ]
lebedev1537@gmail.com
9998db0bf539bf04117251441b30e53100d56f2c
afda04bc1b13f87275869fed69d8d4346d8930c8
/src/test/java/istc/bigdawg/islands/relational/SQLJSONPlaceholderParserTest.java
b12ca068576715f2b2e178ea2fc390dbb616b1f2
[ "BSD-3-Clause" ]
permissive
yanmendes/bigdawg
6f294f33ec03a993972eb8f05d37b25395108129
79d8f770d18ca2acd3f5195760262c62fbf303d0
refs/heads/master
2022-11-28T00:37:24.372937
2020-08-02T15:14:11
2020-08-02T15:18:31
197,306,137
0
0
BSD-3-Clause
2020-07-19T20:30:24
2019-07-17T03:12:00
TSQL
UTF-8
Java
false
false
4,529
java
package istc.bigdawg.islands.relational; import istc.bigdawg.exceptions.QueryParsingException; import org.junit.Test; import static org.junit.Assert.*; public class SQLJSONPlaceholderParserTest { @Test public void testContainsPlaceholder() { assertFalse(SQLJSONPlaceholderParser.containsPlaceholder("")); assertFalse(SQLJSONPlaceholderParser.containsPlaceholder("asdf")); assertFalse(SQLJSONPlaceholderParser.containsPlaceholder("select * from something")); assertFalse(SQLJSONPlaceholderParser.containsPlaceholder("select result from something")); assertTrue(SQLJSONPlaceholderParser.containsPlaceholder("select BIGDAWG_PLACEHOLDER from something")); } @Test public void testPossiblyContainsOperator() { assertTrue(SQLJSONPlaceholderParser.possiblyContainsOperator("select result -> 'asdf' from something")); assertTrue(SQLJSONPlaceholderParser.possiblyContainsOperator("select result ->> 'asdf' from something")); assertTrue(SQLJSONPlaceholderParser.possiblyContainsOperator("select a::json#>'{c,d}' from from something")); assertTrue(SQLJSONPlaceholderParser.possiblyContainsOperator("select a::json#>>'{c,d}' from from something")); } @Test public void testTransformJSONQuery() { try { SQLJSONPlaceholderParser.resetIndex(); String result = SQLJSONPlaceholderParser.transformJSONQuery("select result -> 'asdf' from something"); assertEquals("not equal", "select 'BIGDAWG_PLACEHOLDER1' from something", result); assertTrue(SQLJSONPlaceholderParser.containsPlaceholder(result)); SQLJSONPlaceholderParser.resetIndex(); result = SQLJSONPlaceholderParser.transformJSONQuery("select result -> 'asdf' -> 'asdf' from something"); assertEquals("not equal", "select 'BIGDAWG_PLACEHOLDER2' from something", result); assertTrue(SQLJSONPlaceholderParser.containsPlaceholder(result)); SQLJSONPlaceholderParser.resetIndex(); result = SQLJSONPlaceholderParser.transformJSONQuery("select (result -> 'asdf') -> 'asdf' from something"); assertEquals("not equal", "select 'BIGDAWG_PLACEHOLDER2' from something", result); SQLJSONPlaceholderParser.resetIndex(); result = SQLJSONPlaceholderParser.transformJSONQuery("select (result -> 'asdf') ->> 'asdf' from something"); assertEquals("not equal", "select 'BIGDAWG_PLACEHOLDER2' from something", result); SQLJSONPlaceholderParser.resetIndex(); result = SQLJSONPlaceholderParser.transformJSONQuery("select count(visibility), coord ->> 'lon' from tab4 group by coord ->> 'lon'"); assertEquals("not equal", "select count( visibility ) , 'BIGDAWG_PLACEHOLDER1' from tab4 group by 'BIGDAWG_PLACEHOLDER2'", result); } catch (QueryParsingException e) { fail(e.getMessage()); } } @Test public void testSubstitutePlaceholders() { try { SQLJSONPlaceholderParser.resetIndex(); String sql = "select result -> 'asdf' from something"; String result = SQLJSONPlaceholderParser.transformJSONQuery(sql); assertEquals("not equal", sql, SQLJSONPlaceholderParser.substitutePlaceholders(result)); SQLJSONPlaceholderParser.resetIndex(); sql = "select result -> 'asdf' -> 'asdf' from something"; result = SQLJSONPlaceholderParser.transformJSONQuery(sql); assertEquals("not equal", sql, SQLJSONPlaceholderParser.substitutePlaceholders(result)); SQLJSONPlaceholderParser.resetIndex(); sql = "select (result -> 'asdf') -> 'asdf' from something"; String expectedResult = "select ( result -> 'asdf' ) -> 'asdf' from something"; result = SQLJSONPlaceholderParser.transformJSONQuery(sql); assertEquals("not equal", expectedResult, SQLJSONPlaceholderParser.substitutePlaceholders(result)); SQLJSONPlaceholderParser.resetIndex(); sql = "select (result -> 'asdf') ->> 'asdf' from something"; expectedResult = "select ( result -> 'asdf' ) ->> 'asdf' from something"; result = SQLJSONPlaceholderParser.transformJSONQuery(sql); assertEquals("not equal", expectedResult, SQLJSONPlaceholderParser.substitutePlaceholders(result)); } catch (QueryParsingException e) { fail(e.getMessage()); } } }
[ "mmucklo@gmail.com" ]
mmucklo@gmail.com
c9926b537564f283a8aa5898b4b748e50657d432
1762cc5ff343ced4397589819d82eb2b5e127b7e
/JavaBasicEnhance/src/main/java/com/reflection/assginfrom/AssignFromDemo.java
1561505e45654fe565593994e0a2927127efdeb7
[]
no_license
worldluoji/JavaLearning
c7468e653b3bf8bf7c7bdfa48015772c43397e12
0be74f537a04dbaef074832a361038d9cefa5bbc
refs/heads/master
2023-06-24T14:49:05.373721
2022-06-15T08:41:59
2022-06-15T08:41:59
237,379,932
0
0
null
2023-06-14T22:43:21
2020-01-31T07:20:26
Java
UTF-8
Java
false
false
591
java
package com.reflection.assginfrom; public class AssignFromDemo { public static void main(String[] args) { System.out.println("Strategy assign from A : " + Strategy.class.isAssignableFrom(ConcreteStrategyA.class)); System.out.println("Strategy assign from B : " + Strategy.class.isAssignableFrom(ConcreteStrategyB.class)); System.out.println("ParentClass assign from B : " + ParentClass.class.isAssignableFrom(ConcreteStrategyB.class)); System.out.println("A assign from B : " + ConcreteStrategyA.class.isAssignableFrom(ConcreteStrategyB.class)); } }
[ "qq1132416@outlook.com" ]
qq1132416@outlook.com
f02beceb2e17d72efcee1c78425b54b0ba880056
294a02a7c013663e86b864f3f35e6bd83630f2ab
/src/main/java/io/medalytics/elearning_platform/model/BaseModel.java
393521d7ced75cb72485b359d56ea1fd60233c7c
[]
no_license
Ahmedsaka/elearning_platform
a063de984376853a20f751f7ef234f90dc3a3ac2
e42779bab5b279d4e1ce2171acf09ae86a254722
refs/heads/master
2022-12-24T18:21:48.551108
2020-10-06T02:02:05
2020-10-06T02:02:05
301,581,769
0
0
null
null
null
null
UTF-8
Java
false
false
387
java
package io.medalytics.elearning_platform.model; import lombok.Getter; import lombok.Setter; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import java.io.Serializable; @Getter @Setter public class BaseModel implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; }
[ "ahmedsaka91@gmail.com" ]
ahmedsaka91@gmail.com
3e5472c95dab57c1856aacb9ae4934c6728ac88c
336f3126e59c25ce7b2d3ef8e06856b4a647620c
/backend/src/main/java/edu/netcracker/backend/dao/annotations/Table.java
2850c56b70e17ef5d316a8838a389ce7ebdfb63d
[]
no_license
roman-bessmertnyi/startreker-netcracker
ebf302795f30cecbeb16f75f50e5326a7a59f2b6
bc80f2dccee86d6f0d4050e85f537cdf2565f866
refs/heads/master
2020-04-22T16:36:48.920998
2019-11-04T09:23:54
2019-11-04T09:23:54
170,513,945
0
0
null
2019-02-15T15:38:34
2019-02-13T13:37:04
Java
UTF-8
Java
false
false
321
java
package edu.netcracker.backend.dao.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface Table { String value(); }
[ "lirrow@gmail.com" ]
lirrow@gmail.com
f3ad3f2eca02da97b21657290066475f37371169
61f4bce6d63d39c03247c35cfc67e03c56e0b496
/src/dyno/swing/designer/beans/toolkit/BeanInfoToggleButton.java
9ceda0aa9fcaaa00e90899578da584f227f5d76a
[]
no_license
phalex/swing_designer
570cff4a29304d52707c4fa373c9483bbdaa33b9
3e184408bcd0aab6dd5b4ba8ae2aaa3f846963ff
refs/heads/master
2021-01-01T20:38:49.845289
2012-12-17T06:50:11
2012-12-17T06:50:11
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
723
java
/* * BeanInfoToggleButton.java * * Created on 2007Äê8ÔÂ10ÈÕ, ÉÏÎç12:26 * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package dyno.swing.designer.beans.toolkit; import java.beans.BeanInfo; import javax.swing.JToggleButton; /** * * @author William Chen */ public class BeanInfoToggleButton extends JToggleButton { private BeanInfo beanInfo; /** Creates a new instance of BeanInfoToggleButton */ public BeanInfoToggleButton(BeanInfo info) { beanInfo = info; } public BeanInfo getBeanInfo() { return beanInfo; } public void setBeanInfo(BeanInfo beanInfo) { this.beanInfo = beanInfo; } }
[ "584874132@qq.com" ]
584874132@qq.com
a54c1fab932cb2950685275b8343cc268c82dc80
ae017cf6c9e653508ef25c0fcf22160093c657d9
/src/main/java/com/github/goto1134/simpr/win32/ExtendedWindowStyle.java
bf79df2ebf9fcbf862e100da10092046fcb85bd7
[ "MIT" ]
permissive
goto1134/simpr-java-client
cae06db653ae505076093d0a9564d2447417c2f9
ece3259c0ab9d7f4b9b9992e60c53602f261de5e
refs/heads/master
2021-03-16T09:42:42.238807
2017-10-24T20:13:36
2017-10-24T20:13:36
105,741,792
0
0
null
null
null
null
UTF-8
Java
false
false
1,235
java
package com.github.goto1134.simpr.win32; import jnr.ffi.util.EnumMapper.IntegerEnum; /** * Extended Window Styles */ public enum ExtendedWindowStyle implements IntegerEnum { DLG_MODAL_FRAME(0x00000001), NO_PARENT_NOTIFY(0x00000004), TOPMOST(0x00000008), ACCEPT_FILES(0x00000010), TRANSPARENT(0x00000020), MDI_CHILD(0x00000040), TOOL_WINDOW(0x00000080), WINDOW_EDGE(0x00000100), CLIENT_EDGE(0x00000200), CONTEXT_HELP(0x00000400), RIGHT(0x00001000), LEFT(0x00000000), RTL_READING(0x00002000), LTR_READING(0x00000000), LEFT_SCROLLBAR(0x00004000), RIGHT_SCROLLBAR(0x00000000), CONTROL_PARENT(0x00010000), STATIC_EDGE(0x00020000), APP_WINDOW(0x00040000), OVERLAPPED_WINDOW(WINDOW_EDGE.value | CLIENT_EDGE.value), PALETTE_WINDOW(WINDOW_EDGE.value | TOOL_WINDOW.value | TOPMOST.value), LAYERED(0x00080000), NO_INHERIT_LAYOUT(0x00100000), NO_REDIRECTION_BITMAP(0x00200000), LAYOUT_RTL(0x00400000), COMPOSITED(0x02000000), NO_ACTIVATE(0x08000000); private final int value; ExtendedWindowStyle(int value) { this.value = value; } @Override public int intValue() { return value; } }
[ "1134togo@gmail.com" ]
1134togo@gmail.com
8180cd22e81dd1429044d8f4798dff0b502741f5
82866738c28b7e6954832aaa77b09a18bcad9b0f
/Client-Server-Application-Development/Threading/Lab_14/Transaction.java
3d43172d21b253a0b6e227d7e43bf271cf10e779
[]
no_license
MRohit/Core-Java-Excercises
1450af2c46ce6487705ff9936e20fb7ab4840ec3
c2735cc65fcba09e2dc9f48002c9f0b390ea731d
refs/heads/master
2020-12-14T09:53:25.913944
2017-11-03T17:23:23
2017-11-03T17:23:23
95,474,081
1
0
null
null
null
null
UTF-8
Java
false
false
1,866
java
package Lab_14; public class Transaction extends Thread{ Account account; public Transaction() { // TODO Auto-generated constructor stub } Transaction(Account account,String name){ super(name); this.account=account; } @Override public void run() { // TODO Auto-generated method stub int i=0; while(i<2){ try{ if(Thread.currentThread().getName().equals("One")){ withdraw(1000); Thread.sleep(3000); } if(Thread.currentThread().getName().equals("Two")){ deposit(2000); Thread.sleep(1000); } } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } i++; } } private void withdraw(int amount) { // TODO Auto-generated method stub try{ account.lock.lock(); double balamt=account.getBalance(); System.out.println("Withdrawl:"+amount); double bal=balamt-amount; account.setBalance(bal); balamt=account.getBalance(); System.out.println("\t"+balamt); System.out.println(); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } finally{ account.lock.unlock(); } } private void deposit(int amount) { // TODO Auto-generated method stub try{ account.lock.lock(); double balamt=account.getBalance(); System.out.println("Deposit Amount:"+amount); double bal=balamt+amount; account.setBalance(bal); balamt=account.getBalance(); System.out.println("\t"+balamt); System.out.println(); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } finally{ account.lock.unlock(); } } public static void main(String[] args) { int initial=5000; System.out.println("Original Balance:"+initial); Account account=new Account(initial); Thread t1=new Transaction(account, "One"); Thread t2=new Transaction(account, "Two"); t1.start(); t2.start(); } }
[ "mourya.rohit32@gmail.com" ]
mourya.rohit32@gmail.com
3f714db4a5bc6525832acdf7546203b87923af95
eb3baa4c9e1f8ea988e88361dbc20c080db5eebd
/src/com/bookstore/dao/UserDao.java
dba58e1260552a932e515c8d3ba7cd31562ba988
[]
no_license
blueEyec/bookstore_manager
e9fc910a9e904f29f1ff6ac10dd0ad295616baf8
baf76469f021e24bc458862fccec1a7b52d28eda
refs/heads/master
2020-03-15T03:20:10.106602
2018-05-03T04:01:05
2018-05-03T04:01:05
131,939,920
0
0
null
null
null
null
UTF-8
Java
false
false
503
java
package com.bookstore.dao; import com.bookstore.entity.User; import java.util.List; public interface UserDao { /* * 用户登陆 */ public List<User> login(String username,String password,int permission); /* * 判断用户是否存在 */ public boolean isUserExist(String username); /* * 添加用户 */ public void save(User user); /* * 通过id查找用户 */ public List<User> findUserById(int id); /* * 更新数据 */ public void updateUser(User user); }
[ "824143077@qq.com" ]
824143077@qq.com
0e6f20e6ef352915f38d712099eededf4f922383
4d6d864f9fecc1a7afcf722e393fa40622ef35de
/src/gamecrush/Ventas.java
259859b73ca7af2fb9a50a510a013d30c730f7c3
[]
no_license
DanMoCa/WoloCrush
bcd3a7fa7a707236c6939468219c1b6fd0c5dac5
2236fdef51c1ed5d0d502e59b2587216aca999ed
refs/heads/master
2020-05-16T23:17:43.666983
2014-05-22T15:06:59
2014-05-22T15:06:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
18,809
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 gamecrush; import java.awt.HeadlessException; import java.net.URL; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.ImageIcon; import javax.swing.JOptionPane; import javax.swing.table.DefaultTableModel; /** * * @author DanDesktop */ public class Ventas extends javax.swing.JFrame { /** * Creates new form Ventas */ public Ventas() { initComponents(); URL resource = Administrador.class.getResource("/img/Icono.png"); ImageIcon img = new ImageIcon(resource); this.setIconImage(img.getImage()); this.setTitle("Ventas"); cargarProductos(); } public ResultSet pro, venta, lastId; int Cant; String columnsProd[] = {"idProducto", "Nombre", "Tipo", "Precio", "Proveedor", "Cantidad"}; public DefaultTableModel tmProd = new DefaultTableModel(null, columnsProd) { @Override public boolean isCellEditable(int rowIndex, int colIndex) { return false; } }; public String[] columnsPed = {"id", "Producto", "Cantidad", "Precio"}; public DefaultTableModel tmVent = new DefaultTableModel(null, columnsPed) { @Override public boolean isCellEditable(int rowIndex, int colIndex) { return 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. */ public void cargarProductos() { try { String sql = "SELECT * FROM productos"; Connection conn = Conexion.GetConnection(); PreparedStatement ps = conn.prepareStatement(sql); pro = ps.executeQuery(); while (pro.next()) { String[] row = {pro.getString(1), pro.getString(2), pro.getString(3), pro.getString(4), pro.getString(5), pro.getString(6)}; tmProd.addRow(row); } jTableProductos.setModel(tmProd); } catch (SQLException e) { JOptionPane.showMessageDialog(this, e.getErrorCode() + ": " + e.getMessage()); } } public void clearVenta(){ for (int row = tmVent.getRowCount() - 1; row >= 0; row--) { tmVent.removeRow(row); } } public void cancelVenta(){ for(int row = tmProd.getRowCount() -1; row >= 0; row--){ tmProd.removeRow(row); } clearVenta(); cargarProductos(); jButton1.setEnabled(false); jButton2.setEnabled(false); } @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); jTableProductos = new javax.swing.JTable(); jScrollPane2 = new javax.swing.JScrollPane(); jTableVentas = new javax.swing.JTable(); jLabel1 = new javax.swing.JLabel(); jLblPrecio = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767)); jButton2 = new javax.swing.JButton(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); jMenuItem2 = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jTableProductos.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "idProducto", "Nombre", "Tipo", "Proveedor", "Cantidad" } )); jTableProductos.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent evt) { jTableProductosMousePressed(evt); } }); jScrollPane1.setViewportView(jTableProductos); jTableVentas.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "idProducto", "Producto", "Cantidad", "Precio" } )); jScrollPane2.setViewportView(jTableVentas); jLabel1.setText("Precio Total"); jButton1.setText("Aceptar"); jButton1.setEnabled(false); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setText("Cancelar"); jButton2.setEnabled(false); jMenu1.setText("Menu"); jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.CTRL_MASK)); jMenuItem1.setText("Login"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu1.add(jMenuItem1); jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK)); jMenuItem2.setText("Salir"); jMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem2ActionPerformed(evt); } }); jMenu1.add(jMenuItem2); jMenuBar1.add(jMenu1); setJMenuBar(jMenuBar1); 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(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 413, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLblPrecio, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(46, 46, 46) .addComponent(jButton2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton1)) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 592, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 491, Short.MAX_VALUE) .addComponent(jScrollPane1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLblPrecio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2))) .addComponent(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))) ); pack(); setLocationRelativeTo(null); }// </editor-fold>//GEN-END:initComponents private void jTableProductosMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableProductosMousePressed // TODO add your handling code here: try { jButton1.setEnabled(true); jButton2.setEnabled(true); Cant = Integer.parseInt(JOptionPane.showInputDialog("Cantidad")); String idProd, nombreProd, newcant; int rows, index = 0; Double precio, total = 0.0; boolean flag = false; rows = jTableVentas.getRowCount(); String compare = (String) tmProd.getValueAt(jTableProductos.getSelectedRow(), 0); String compare2 = ""; int i = 1; if (rows == 0) { idProd = (String) tmProd.getValueAt(jTableProductos.getSelectedRow(), 0); nombreProd = (String) tmProd.getValueAt(jTableProductos.getSelectedRow(), 1); precio = (Double.parseDouble((String) tmProd.getValueAt(jTableProductos.getSelectedRow(), 3))) * Cant; tmVent.addRow(new Object[]{idProd, nombreProd, Cant, precio}); jTableVentas.setModel(tmVent); } else { int x = 0; z: while (i <= rows) { try { compare2 = (String) tmVent.getValueAt(x, 0); } catch (Exception e) { } if (compare.equals(compare2)) { flag = true; index = i; break z; } else { flag = false; } ++i; ++x; ++index; } if (flag) { if (index - 1 < rows) { index--; flag = false; int updatecant = (int) tmVent.getValueAt(index, 2) + Cant; precio = (Double.parseDouble((String) tmProd.getValueAt(jTableProductos.getSelectedRow(), 3))) * updatecant; tmVent.setValueAt(updatecant, index, 2); tmVent.setValueAt(precio, index, 3); } } else { idProd = (String) tmProd.getValueAt(jTableProductos.getSelectedRow(), 0); nombreProd = (String) tmProd.getValueAt(jTableProductos.getSelectedRow(), 1); precio = (Double.parseDouble((String) tmProd.getValueAt(jTableProductos.getSelectedRow(), 3))) * Cant; tmVent.addRow(new Object[]{idProd, nombreProd, Cant, precio}); } } int rows2 = jTableVentas.getRowCount(); for (int j = 0; j < rows2; j++) { total += (Double.parseDouble(tmVent.getValueAt(j, 3).toString())); } newcant = Integer.toString(Integer.parseInt((String) tmProd.getValueAt(jTableProductos.getSelectedRow(), 5)) - Cant); tmProd.setValueAt(newcant, jTableProductos.getSelectedRow(), 5); jLblPrecio.setText(total.toString()); } catch (HeadlessException | NumberFormatException e) { JOptionPane.showMessageDialog(this, e); } }//GEN-LAST:event_jTableProductosMousePressed private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: try { String empleado = JOptionPane.showInputDialog("Confirmar"); String sql = "INSERT INTO ventas(Empleados_idEmpleados, precio_total) VALUES( ?, ? )"; String sql1 = "INSERT INTO productos_has_ventas(productos_idproductos, ventas_idventas, cantidad_venta) VALUES(?, ?, ?) "; String sql3 = "UPDATE productos " + "SET cantidad = cantidad - ? " + "WHERE idproductos = ? "; String sql4 = "SELECT idempleados FROM empleados WHERE idempleados = ?"; Connection conn = Conexion.GetConnection(); conn.setAutoCommit(false); PreparedStatement ps = conn.prepareStatement(sql); PreparedStatement ps1 = conn.prepareStatement(sql1); PreparedStatement ps3 = conn.prepareStatement(sql3); PreparedStatement ps4 = conn.prepareStatement(sql4); ps4.setString(1, empleado); ResultSet rs = ps4.executeQuery(); if (rs.next()) { ps.setString(1, empleado); ps.setString(2, jLblPrecio.getText()); ps.execute(); conn.commit(); String sqlLast = "SELECT `AUTO_INCREMENT` - 1 " + " FROM INFORMATION_SCHEMA.TABLES " + " WHERE TABLE_SCHEMA = 'gamecrush' " + " AND TABLE_NAME = 'ventas' "; Connection connLast = Conexion.GetConnection(); PreparedStatement psLast = connLast.prepareStatement(sqlLast); lastId = psLast.executeQuery(); lastId.next(); String lastIdPed = lastId.getString(1); System.out.println(lastIdPed); int rows2 = jTableVentas.getRowCount(); for (int j = 0; j < rows2; j++) { ps3.setInt(1, (int) tmVent.getValueAt(j, 2)); ps3.setString(2, (String) tmVent.getValueAt(j, 0)); ps3.executeUpdate(); conn.commit(); } for (int j = 0; j < rows2; j++) { ps1.setString(1, (String) tmVent.getValueAt(j, 0)); ps1.setString(2, lastIdPed); ps1.setInt(3, (int) tmVent.getValueAt(j, 2)); ps1.execute(); conn.commit(); } cancelVenta(); clearVenta(); } else { JOptionPane.showMessageDialog(this, "Empleado no valido"); } ps.setString(1, sql); } catch (SQLException e) { System.out.println(e.getMessage()); } }//GEN-LAST:event_jButton1ActionPerformed private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed // TODO add your handling code here: Login log = new Login(); log.setVisible(true); this.dispose(); }//GEN-LAST:event_jMenuItem1ActionPerformed private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed // TODO add your handling code here: System.exit(0); }//GEN-LAST:event_jMenuItem2ActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Ventas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Ventas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Ventas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Ventas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Ventas().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.Box.Filler filler1; private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLblPrecio; private javax.swing.JMenu jMenu1; private javax.swing.JMenuBar jMenuBar1; private javax.swing.JMenuItem jMenuItem1; private javax.swing.JMenuItem jMenuItem2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JTable jTableProductos; private javax.swing.JTable jTableVentas; // End of variables declaration//GEN-END:variables }
[ "Pankexillo.lerolero@gmail.com" ]
Pankexillo.lerolero@gmail.com
26f2bf9e72acb0e3c63a5b64f4355c3292265aac
c5b3b4ed9162a92553df7143f074164d0045a01a
/src/org/fife/ui/rsyntaxtextarea/modes/RubyTokenMaker.java
71a4f8c5c60b9c22114522cda358c155b7f1dd4d
[]
no_license
TiBoebot/BoeBotExtension
6f091a8b2c1c6dcb24fa66939f0900266c2c275e
828dc5e47b79b4f4132f885f76ab3fde03412267
refs/heads/master
2021-01-10T15:17:54.205224
2015-12-07T17:13:44
2015-12-07T17:13:44
44,911,990
2
0
null
null
null
null
UTF-8
Java
false
true
62,816
java
/* The following code was generated by JFlex 1.4.1 on 1/20/09 10:04 AM */ /* * 09/11/2008 * * RubyTokenMaker.java - Scanner for Ruby * * This library is distributed under a modified BSD license. See the included * RSyntaxTextArea.License.txt file for details. */ package org.fife.ui.rsyntaxtextarea.modes; import java.io.*; import javax.swing.text.Segment; import org.fife.ui.rsyntaxtextarea.*; /** * Scanner for Ruby.<p> * * This implementation was created using * <a href="http://www.jflex.de/">JFlex</a> 1.4.1; however, the generated file * was modified for performance. Memory allocation needs to be almost * completely removed to be competitive with the handwritten lexers (subclasses * of <code>AbstractTokenMaker</code>, so this class has been modified so that * Strings are never allocated (via yytext()), and the scanner never has to * worry about refilling its buffer (needlessly copying chars around). * We can achieve this because RText always scans exactly 1 line of tokens at a * time, and hands the scanner this line as an array of characters (a Segment * really). Since tokens contain pointers to char arrays instead of Strings * holding their contents, there is no need for allocating new memory for * Strings.<p> * * The actual algorithm generated for scanning has, of course, not been * modified.<p> * * If you wish to regenerate this file yourself, keep in mind the following: * <ul> * <li>The generated RubyTokenMaker.java</code> file will contain two * definitions of both <code>zzRefill</code> and <code>yyreset</code>. * You should hand-delete the second of each definition (the ones * generated by the lexer), as these generated methods modify the input * buffer, which we'll never have to do.</li> * <li>You should also change the declaration/definition of zzBuffer to NOT * be initialized. This is a needless memory allocation for us since we * will be pointing the array somewhere else anyway.</li> * <li>You should NOT call <code>yylex()</code> on the generated scanner * directly; rather, you should use <code>getTokenList</code> as you would * with any other <code>TokenMaker</code> instance.</li> * </ul> * * @author Robert Futrell * @version 0.5 * */ public class RubyTokenMaker extends AbstractJFlexTokenMaker { /** This character denotes the end of file */ public static final int YYEOF = -1; /** lexical states */ public static final int HEREDOC_EOF_SINGLE_QUOTED = 11; public static final int DOCCOMMENT = 14; public static final int HEREDOC_EOT_SINGLE_QUOTED = 13; public static final int HEREDOC_EOT_UNQUOTED = 12; public static final int STRING_Q_SLASH = 5; public static final int STRING_Q_BANG = 2; public static final int STRING_Q_LT = 7; public static final int STRING = 1; public static final int BACKTICKS = 9; public static final int YYINITIAL = 0; public static final int HEREDOC_EOF_UNQUOTED = 10; public static final int STRING_Q_CURLY_BRACE = 3; public static final int STRING_Q_PAREN = 4; public static final int HEREDOC_EOF_DOUBLE_QUOTED = 11; public static final int CHAR_LITERAL = 8; public static final int HEREDOC_EOT_DOUBLE_QUOTED = 13; public static final int STRING_Q_SQUARE_BRACKET = 6; /** * Translates characters to character classes */ private static final String ZZ_CMAP_PACKED = "\11\0\1\24\1\23\1\0\1\24\1\7\22\0\1\24\1\44\1\105"+ "\1\10\1\55\1\47\1\52\1\106\1\110\1\35\1\43\1\43\1\57"+ "\1\42\1\37\1\46\1\3\1\4\6\6\2\2\1\36\1\57\1\50"+ "\1\25\1\51\1\103\1\56\1\66\1\61\1\5\1\60\1\34\1\63"+ "\1\62\1\1\1\64\2\1\1\1\1\1\1\65\1\67\1\1\1\107"+ "\1\1\1\72\1\70\1\1\1\1\1\107\3\1\1\40\1\11\1\41"+ "\1\54\1\12\1\112\1\20\1\26\1\75\1\32\1\16\1\17\1\27"+ "\1\101\1\30\1\1\1\74\1\21\1\76\1\31\1\71\1\100\1\104"+ "\1\14\1\22\1\13\1\15\1\73\1\102\1\33\1\77\1\1\1\111"+ "\1\53\1\113\1\45\uff81\0"; /** * Translates characters to character classes */ private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); /** * Translates DFA states to action switch labels. */ private static final int [] ZZ_ACTION = zzUnpackAction(); private static final String ZZ_ACTION_PACKED_0 = "\17\0\1\1\1\2\2\3\1\2\1\4\10\2\1\5"+ "\1\6\1\7\6\2\1\10\1\2\11\7\2\1\11\2"+ "\1\11\1\2\1\12\1\13\1\14\1\15\1\16\1\17"+ "\1\20\1\15\1\21\1\15\1\22\1\15\1\23\1\15"+ "\1\24\1\15\1\25\1\15\1\26\1\15\1\27\1\30"+ "\1\31\1\15\1\32\1\33\1\15\1\34\1\15\1\35"+ "\1\36\1\15\1\37\1\15\1\40\1\15\1\1\1\41"+ "\1\3\4\1\30\2\1\0\7\2\1\42\5\2\1\43"+ "\1\7\1\0\1\44\1\45\1\46\1\47\1\50\1\51"+ "\2\7\3\52\1\0\1\1\4\2\1\7\12\2\1\16"+ "\1\27\2\15\1\0\1\41\2\3\1\53\24\2\1\42"+ "\7\2\1\11\6\2\1\0\10\2\1\42\5\0\20\2"+ "\1\54\1\0\4\1\1\55\1\2\1\11\16\2\1\11"+ "\5\2\1\0\3\2\4\0\11\2\1\56\12\2\1\0"+ "\2\2\1\57\1\60\3\0\2\2\1\11\5\2\1\61"+ "\1\2\6\0\4\2\1\62\1\63\1\11\7\2"; private static int [] zzUnpackAction() { int [] result = new int[344]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; } private static int zzUnpackAction(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } /** * Translates a state to a row index in the transition table */ private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = "\0\0\0\114\0\230\0\344\0\u0130\0\u017c\0\u01c8\0\u0214"+ "\0\u0260\0\u02ac\0\u02f8\0\u0344\0\u0390\0\u03dc\0\u0428\0\u0474"+ "\0\u04c0\0\u050c\0\u0558\0\u05a4\0\u05f0\0\u063c\0\u0688\0\u06d4"+ "\0\u0720\0\u076c\0\u07b8\0\u0804\0\u0850\0\u05a4\0\u089c\0\u08e8"+ "\0\u0934\0\u0980\0\u09cc\0\u0a18\0\u0a64\0\u0ab0\0\u05a4\0\u0afc"+ "\0\u0b48\0\u05a4\0\u0b94\0\u0be0\0\u0c2c\0\u0c78\0\u0cc4\0\u0d10"+ "\0\u0d5c\0\u0da8\0\u0df4\0\u0e40\0\u0e8c\0\u0ed8\0\u0f24\0\u0f70"+ "\0\u0fbc\0\u1008\0\u1054\0\u10a0\0\u10ec\0\u1138\0\u05a4\0\u05a4"+ "\0\u05a4\0\u1184\0\u11d0\0\u05a4\0\u05a4\0\u121c\0\u05a4\0\u1268"+ "\0\u05a4\0\u12b4\0\u05a4\0\u1300\0\u05a4\0\u134c\0\u05a4\0\u1398"+ "\0\u05a4\0\u13e4\0\u1430\0\u05a4\0\u05a4\0\u147c\0\u05a4\0\u05a4"+ "\0\u14c8\0\u05a4\0\u1514\0\u05a4\0\u05a4\0\u1560\0\u05a4\0\u15ac"+ "\0\u05a4\0\u15f8\0\u1644\0\u1690\0\u16dc\0\u16dc\0\u1728\0\u1774"+ "\0\u17c0\0\u180c\0\u1858\0\u18a4\0\u18f0\0\u193c\0\u1988\0\u19d4"+ "\0\u1a20\0\u1a6c\0\u1ab8\0\u1b04\0\u1b50\0\u1b9c\0\u1be8\0\u1c34"+ "\0\u1c80\0\u1ccc\0\u1d18\0\u1d64\0\u1db0\0\u1dfc\0\u1e48\0\u1e94"+ "\0\u1ee0\0\u1f2c\0\u1f78\0\u1fc4\0\u2010\0\u205c\0\u20a8\0\u20f4"+ "\0\u2140\0\u04c0\0\u218c\0\u21d8\0\u2224\0\u2270\0\u22bc\0\u2308"+ "\0\u2354\0\u23a0\0\u05a4\0\u05a4\0\u05a4\0\u05a4\0\u05a4\0\u05a4"+ "\0\u23ec\0\u2438\0\u2484\0\u0474\0\u05a4\0\u24d0\0\u251c\0\u2568"+ "\0\u25b4\0\u2600\0\u264c\0\u04c0\0\u2698\0\u26e4\0\u2730\0\u277c"+ "\0\u27c8\0\u2814\0\u2860\0\u28ac\0\u28f8\0\u2944\0\u05a4\0\u05a4"+ "\0\u2990\0\u29dc\0\u2a28\0\u2a74\0\u2ac0\0\u2b0c\0\u2b58\0\u2ba4"+ "\0\u2bf0\0\u2c3c\0\u2c88\0\u2cd4\0\u2d20\0\u2d6c\0\u2db8\0\u2e04"+ "\0\u2e50\0\u2e9c\0\u2ee8\0\u2f34\0\u2f80\0\u2fcc\0\u3018\0\u3064"+ "\0\u30b0\0\u30fc\0\u3148\0\u3194\0\u31e0\0\u322c\0\u3278\0\u32c4"+ "\0\u3310\0\u335c\0\u33a8\0\u33f4\0\u3440\0\u348c\0\u34d8\0\u3524"+ "\0\u3570\0\u35bc\0\u3608\0\u3654\0\u36a0\0\u36ec\0\u3738\0\u3784"+ "\0\u37d0\0\u381c\0\u3868\0\u38b4\0\u3900\0\u394c\0\u3998\0\u39e4"+ "\0\u3a30\0\u3a7c\0\u3ac8\0\u3b14\0\u3b60\0\u3bac\0\u3bf8\0\u3c44"+ "\0\u3c90\0\u3cdc\0\u3d28\0\u3d74\0\u3dc0\0\u3e0c\0\u3e58\0\u3ea4"+ "\0\u3ef0\0\u14c8\0\u3f3c\0\u2a74\0\u2ac0\0\u2b0c\0\u2b58\0\u04c0"+ "\0\u3f88\0\u04c0\0\u3fd4\0\u4020\0\u406c\0\u40b8\0\u4104\0\u4150"+ "\0\u419c\0\u41e8\0\u4234\0\u4280\0\u42cc\0\u4318\0\u4364\0\u43b0"+ "\0\u05a4\0\u43fc\0\u4448\0\u4494\0\u44e0\0\u452c\0\u4578\0\u45c4"+ "\0\u4610\0\u465c\0\u46a8\0\u46f4\0\u4740\0\u478c\0\u47d8\0\u4824"+ "\0\u4870\0\u48bc\0\u4908\0\u4954\0\u49a0\0\u49ec\0\u4a38\0\u05a4"+ "\0\u4a84\0\u4ad0\0\u4b1c\0\u4b68\0\u4bb4\0\u4c00\0\u4c4c\0\u4c98"+ "\0\u4ce4\0\u4d30\0\u4d7c\0\u4dc8\0\u4e14\0\u05a4\0\u05a4\0\u4e60"+ "\0\u4eac\0\u4ef8\0\u4f44\0\u4f90\0\u4fdc\0\u5028\0\u5074\0\u50c0"+ "\0\u510c\0\u4fdc\0\u05a4\0\u5158\0\u51a4\0\u51f0\0\u523c\0\u5288"+ "\0\u52d4\0\u5320\0\u536c\0\u53b8\0\u5404\0\u5450\0\u05a4\0\u05a4"+ "\0\u3738\0\u549c\0\u54e8\0\u5534\0\u5580\0\u55cc\0\u5618\0\u5664"; private static int [] zzUnpackRowMap() { int [] result = new int[344]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; } private static int zzUnpackRowMap(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int high = packed.charAt(i++) << 16; result[j++] = high | packed.charAt(i++); } return j; } /** * The transition table of the DFA */ private static final int [] ZZ_TRANS = zzUnpackTrans(); private static final String ZZ_TRANS_PACKED_0 = "\1\20\1\21\1\22\1\23\1\22\1\21\1\22\1\24"+ "\1\25\1\20\1\21\1\26\1\27\1\30\1\31\1\32"+ "\1\33\1\34\1\35\1\36\1\37\1\40\1\41\1\42"+ "\1\43\1\44\1\45\1\21\1\46\1\47\1\50\1\51"+ "\2\52\2\53\1\54\1\52\1\53\1\55\1\56\1\57"+ "\1\60\1\61\1\52\1\62\1\63\1\24\1\21\1\64"+ "\1\21\1\65\1\66\1\21\1\67\2\21\1\70\1\71"+ "\2\21\1\72\1\73\1\74\1\75\1\21\1\76\1\24"+ "\1\21\1\77\1\100\1\21\2\47\1\101\1\47\11\102"+ "\1\103\11\102\1\104\61\102\1\105\6\102\11\106\1\103"+ "\11\106\1\107\20\106\1\105\47\106\11\110\1\103\11\110"+ "\1\111\67\110\1\105\11\112\1\103\11\112\1\113\11\112"+ "\1\105\56\112\11\114\1\103\11\114\1\115\22\114\1\105"+ "\45\114\11\116\1\103\11\116\1\117\15\116\1\105\52\116"+ "\11\120\1\103\11\120\1\121\25\120\1\105\42\120\11\122"+ "\1\123\11\122\1\124\62\122\1\125\5\122\11\126\1\103"+ "\11\126\1\127\66\126\1\130\1\126\11\131\1\103\11\131"+ "\1\132\10\131\1\133\70\131\1\103\11\131\1\134\10\131"+ "\1\133\70\131\1\103\11\131\1\135\10\131\1\136\70\131"+ "\1\103\11\131\1\137\10\131\1\136\57\131\23\140\1\141"+ "\1\140\1\142\66\140\7\20\1\0\13\20\3\0\7\20"+ "\20\0\2\20\1\0\23\20\1\0\1\20\2\0\1\20"+ "\4\0\1\20\6\21\1\0\2\20\11\21\3\0\7\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\2\20\3\22\1\20\1\22\1\0\2\20\1\143"+ "\3\20\1\144\4\20\3\0\6\20\1\144\20\0\2\20"+ "\1\0\23\20\1\0\1\20\2\0\1\20\4\0\3\20"+ "\2\145\1\20\1\145\1\0\2\20\1\146\10\20\3\0"+ "\1\147\3\20\1\150\1\151\1\20\20\0\2\20\1\0"+ "\23\20\1\0\1\20\2\0\1\20\120\0\23\25\1\0"+ "\70\25\1\20\6\21\1\0\2\20\2\21\1\152\1\21"+ "\1\153\4\21\3\0\7\21\20\0\2\20\1\0\21\21"+ "\1\154\1\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\4\21\1\155\1\21\1\156\2\21"+ "\3\0\7\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\11\21"+ "\3\0\3\21\1\157\3\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\7\21\1\160\1\21\3\0\3\21\1\161\1\21"+ "\1\162\1\21\20\0\2\20\1\0\13\21\1\163\7\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\6\21\1\164\2\21\3\0\7\21\20\0\2\20"+ "\1\0\11\21\1\165\11\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\1\21\1\166\1\21"+ "\1\167\3\21\1\170\1\21\3\0\3\21\1\171\3\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\6\21\1\172\2\21"+ "\3\0\7\21\20\0\2\20\1\0\11\21\1\173\11\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\2\21\1\174\1\175\1\176\2\21\1\177\1\21"+ "\3\0\7\21\20\0\2\20\1\0\17\21\1\200\1\201"+ "\2\21\1\0\1\21\2\0\1\21\30\0\1\37\114\0"+ "\1\53\1\202\16\0\1\52\46\0\1\20\6\21\1\0"+ "\2\20\2\21\1\203\1\21\1\204\4\21\3\0\2\21"+ "\1\205\4\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\4\21"+ "\1\206\2\21\1\207\1\210\3\0\7\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\1\21\1\211\3\21\1\212\3\21"+ "\3\0\3\21\1\212\3\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\4\21\1\213\4\21\3\0\2\21\1\214\4\21"+ "\20\0\2\20\1\0\11\21\1\215\11\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\4\21"+ "\1\216\4\21\3\0\7\21\20\0\2\20\1\0\11\21"+ "\1\212\11\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\11\21\3\0\7\21\20\0\2\20"+ "\1\0\5\21\1\217\15\21\1\0\1\21\2\0\1\21"+ "\5\0\1\220\3\0\1\220\4\0\11\220\3\0\7\220"+ "\1\0\1\52\21\0\23\220\1\0\1\220\2\0\1\220"+ "\43\0\1\221\101\0\1\52\113\0\1\52\17\0\1\52"+ "\73\0\1\52\5\0\1\222\4\0\1\223\3\0\1\224"+ "\1\0\1\225\1\0\1\226\31\0\1\222\1\0\1\222"+ "\2\0\1\222\1\227\1\230\27\0\1\231\22\0\1\232"+ "\70\0\1\52\23\0\1\52\114\0\1\52\114\0\1\52"+ "\40\0\1\20\1\233\3\234\1\233\1\234\1\0\2\20"+ "\11\233\2\0\1\235\7\233\1\0\2\235\2\0\1\236"+ "\4\235\1\0\3\235\2\0\2\234\1\235\23\233\1\235"+ "\1\233\2\235\1\233\2\0\1\235\1\0\1\20\1\233"+ "\3\20\1\233\1\20\1\0\2\20\11\233\3\0\7\233"+ "\20\0\1\20\1\237\1\0\23\233\1\0\1\233\2\0"+ "\1\233\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\6\21\1\240\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\7\21"+ "\1\241\1\21\3\0\7\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\11\21\3\0\3\21\1\242\3\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\2\21\1\243\6\21\3\0\7\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\2\21\1\244\6\21"+ "\3\0\7\21\20\0\2\20\1\0\20\21\1\245\2\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\1\21\1\246\7\21\3\0\7\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\6\21\1\247\1\250\1\21\3\0"+ "\7\21\20\0\2\20\1\0\21\21\1\251\1\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\7\21\20\0\2\20\1\0\11\21\1\252"+ "\11\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\11\21\3\0\2\21\1\253\4\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\2\21\1\254\1\255\5\21"+ "\3\0\7\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\11\21"+ "\3\0\7\21\20\0\2\20\1\0\21\21\1\256\1\21"+ "\1\0\1\21\2\0\1\21\4\0\11\102\1\0\11\102"+ "\1\0\61\102\1\0\6\102\23\257\1\0\70\257\11\106"+ "\1\0\11\106\1\0\20\106\1\0\47\106\11\110\1\0"+ "\11\110\1\0\67\110\1\0\11\112\1\0\11\112\1\0"+ "\11\112\1\0\56\112\11\114\1\0\11\114\1\0\22\114"+ "\1\0\45\114\11\116\1\0\11\116\1\0\15\116\1\0"+ "\52\116\11\120\1\0\11\120\1\0\25\120\1\0\42\120"+ "\11\122\1\0\11\122\1\0\62\122\1\0\5\122\23\260"+ "\1\0\70\260\11\126\1\0\11\126\1\0\66\126\1\0"+ "\1\126\11\131\1\0\11\131\1\0\101\131\1\0\11\131"+ "\1\0\43\131\1\261\35\131\1\0\11\131\1\0\43\131"+ "\1\262\24\131\23\140\1\0\1\140\1\0\66\140\16\0"+ "\1\263\75\0\2\20\3\22\1\20\1\22\1\0\2\20"+ "\1\143\10\20\3\0\7\20\20\0\2\20\1\0\23\20"+ "\1\0\1\20\2\0\1\20\4\0\2\20\3\264\1\20"+ "\1\264\1\0\13\20\3\0\7\20\20\0\2\20\1\0"+ "\23\20\1\0\1\20\2\0\1\20\4\0\3\20\2\145"+ "\1\20\1\145\1\0\2\20\1\146\10\20\3\0\7\20"+ "\20\0\2\20\1\0\23\20\1\0\1\20\2\0\1\20"+ "\4\0\3\20\2\265\2\20\1\0\13\20\3\0\7\20"+ "\20\0\2\20\1\0\23\20\1\0\1\20\2\0\1\20"+ "\4\0\2\20\3\266\1\20\1\266\1\0\13\20\3\0"+ "\7\20\20\0\2\20\1\0\23\20\1\0\1\20\2\0"+ "\1\20\4\0\2\20\5\267\1\0\6\20\3\267\2\20"+ "\3\0\1\267\3\20\1\267\1\20\1\267\20\0\2\20"+ "\1\0\2\267\1\20\1\267\2\20\1\267\6\20\1\267"+ "\5\20\1\0\1\20\2\0\1\20\4\0\1\20\6\21"+ "\1\0\2\20\3\21\1\270\2\21\1\271\2\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\10\21\1\272"+ "\3\0\7\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\4\21"+ "\1\273\4\21\3\0\7\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\1\21\1\274\4\21\1\275\1\21\1\276\3\0"+ "\4\21\1\277\2\21\20\0\2\20\1\0\23\21\1\0"+ "\1\300\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\2\21\1\301\1\302\3\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\1\21\1\303\5\21\1\304\1\21"+ "\3\0\4\21\1\305\2\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\10\21\1\306\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\10\21\1\307\3\0\4\21\1\212\2\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\4\21\1\310\4\21"+ "\3\0\2\21\1\311\4\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\6\21\1\312\2\21\3\0\7\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\7\21\1\313\1\21\3\0\2\21"+ "\1\312\4\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\2\21"+ "\1\314\6\21\3\0\7\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\1\315\10\21\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\1\21\1\316\7\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\11\21\3\0\2\21\1\317"+ "\4\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\4\21\1\244\2\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\7\21\20\0\2\20\1\0\16\21\1\320"+ "\4\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\6\21\1\302\2\21\3\0\7\21\20\0"+ "\2\20\1\0\11\21\1\321\3\21\1\322\5\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\6\21\1\323\2\21\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\11\21\3\0\1\324\6\21\20\0\2\20"+ "\1\0\20\21\1\325\2\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\7\21\1\326\1\21"+ "\3\0\7\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\4\21"+ "\1\327\4\21\3\0\7\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\10\21\1\330\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\2\21\1\331\4\21\1\332\1\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\22\0\1\333\75\0\1\20\6\21\1\0\2\20"+ "\4\21\1\334\4\21\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\11\21\3\0\1\21\1\335\5\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\11\21\3\0\3\21\1\336"+ "\3\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\1\21\1\337"+ "\7\21\3\0\7\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\7\21\20\0\2\20\1\0\11\21\1\340"+ "\11\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\3\21\1\341\5\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\4\21\1\342\4\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\5\21\1\343\1\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\7\21\1\212\1\21\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\1\21\1\244\7\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\5\21\1\344\3\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\7\21\20\0\2\20\1\0\1\212\22\21\1\0\1\21"+ "\2\0\1\21\5\0\6\220\3\0\11\220\3\0\7\220"+ "\23\0\23\220\1\0\1\220\2\0\1\220\43\0\1\52"+ "\114\0\1\223\3\0\1\224\1\0\1\225\1\0\1\226"+ "\37\0\1\227\1\230\53\0\1\52\66\0\1\345\7\0"+ "\1\346\50\0\1\347\1\350\3\0\1\351\1\0\1\20"+ "\6\233\1\0\2\20\11\233\3\0\7\233\20\0\2\20"+ "\1\0\23\233\1\0\1\233\2\0\1\233\7\0\1\235"+ "\14\0\2\235\6\0\1\235\1\0\1\235\30\0\2\235"+ "\6\0\1\235\4\0\1\235\1\0\1\235\11\0\1\20"+ "\1\233\3\20\1\233\1\20\1\0\2\20\11\233\3\0"+ "\7\233\20\0\2\20\1\0\23\233\1\0\1\233\2\0"+ "\1\233\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\7\21\20\0\2\20\1\0\2\21\1\352\20\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\7\21\20\0\2\20\1\0\11\21\1\353"+ "\11\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\1\21\1\354\7\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\2\21\1\355\6\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\4\21\1\356"+ "\4\21\3\0\7\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\2\21\1\357\6\21\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\1\21\1\360\5\21\1\361\1\362\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\6\21\1\363"+ "\2\21\3\0\7\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\7\21\20\0\2\20\1\0\11\21\1\364"+ "\11\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\11\21\3\0\4\21\1\365\2\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\4\21\1\366\4\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\2\21\1\367\4\21\20\0\2\20\1\0\11\21\1\310"+ "\11\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\1\21\1\370\7\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\4\21\1\273\4\21\3\0"+ "\2\21\1\371\4\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\11\131\1\0\11\131\1\0"+ "\37\131\1\372\41\131\1\0\11\131\1\0\44\131\1\372"+ "\23\131\31\0\1\373\62\0\2\20\3\264\1\20\1\264"+ "\1\0\2\20\1\374\10\20\3\0\7\20\20\0\2\20"+ "\1\0\23\20\1\0\1\20\2\0\1\20\4\0\3\20"+ "\2\265\2\20\1\0\2\20\1\375\10\20\3\0\7\20"+ "\20\0\2\20\1\0\23\20\1\0\1\20\2\0\1\20"+ "\4\0\2\20\3\266\1\20\1\266\1\0\2\20\1\376"+ "\10\20\3\0\7\20\20\0\2\20\1\0\23\20\1\0"+ "\1\20\2\0\1\20\4\0\1\20\1\377\5\267\1\0"+ "\2\20\4\377\3\267\2\377\3\0\1\267\3\377\1\267"+ "\1\377\1\267\20\0\2\20\1\0\2\267\1\377\1\267"+ "\2\377\1\267\6\377\1\267\5\377\1\0\1\377\2\0"+ "\1\377\4\0\1\20\6\21\1\0\2\20\4\21\1\u0100"+ "\4\21\3\0\7\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\7\21\20\0\2\20\1\0\15\21\1\u0101"+ "\2\21\1\u0102\2\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\1\21\1\u0102\7\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\3\21\1\212\3\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\2\21\1\u0103\1\u0104\5\21\3\0\7\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\11\21\3\0\4\21\1\u0105\2\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\11\21\3\0\7\21"+ "\20\0\2\20\1\0\15\21\1\u0106\5\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\11\21"+ "\3\0\7\21\20\0\2\20\1\0\11\21\1\212\11\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\3\21\1\u0107\5\21\3\0\7\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\10\21\1\u0108\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\11\21\3\0\4\21\1\u0102"+ "\2\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\2\21\1\u0109"+ "\6\21\3\0\2\21\1\214\4\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\4\21\1\363\4\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\4\21\1\u010a\4\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\4\21\1\212"+ "\4\21\3\0\2\21\1\u010a\4\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\3\21\1\u010b\5\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\11\21\3\0\7\21\20\0"+ "\2\20\1\0\15\21\1\u0102\5\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\1\21\1\324"+ "\7\21\3\0\7\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\7\21\1\u0102\1\21\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\10\21\1\270\3\0\7\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\11\21\3\0\7\21\20\0\2\20"+ "\1\0\14\21\1\u0102\1\21\1\353\4\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\4\21"+ "\1\u010c\4\21\3\0\7\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\11\21\3\0\7\21\20\0\2\20\1\0\11\21"+ "\1\u010d\11\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\6\21\1\u010e\2\21\3\0\7\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\11\21\3\0\1\u010f"+ "\6\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\7\21\20\0\2\20\1\0\20\21\1\u0102\2\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\6\21\1\u0110\2\21\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\11\21\3\0\3\21\1\302\3\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\11\21\3\0\7\21\7\0"+ "\1\u0111\10\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\4\21\1\u0112"+ "\4\21\3\0\7\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\4\21\1\u0113\1\212\3\21\3\0\7\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\4\21\1\321\4\21\3\0\7\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\1\21\1\u0114\7\21"+ "\3\0\7\21\20\0\2\20\1\0\15\21\1\u0115\5\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\11\21\3\0\2\21\1\u0116\4\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\11\21\3\0\2\21\1\272\4\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\33\0\1\u0117\64\0\1\20\6\21\1\0\2\20\6\21"+ "\1\u0118\2\21\3\0\7\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\11\21\3\0\2\21\1\273\4\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\11\21\3\0\4\21\1\357\2\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\10\21\1\u0102\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\1\322\6\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\11\21"+ "\3\0\1\324\6\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\2\21\1\u0119\6\21\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\1\21\1\212\7\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\11\21\3\0\2\21\1\u011a"+ "\4\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\30\0\1\345\60\0\1\347\1\350\3\0\1\351"+ "\70\0\1\u011b\60\0\1\u011c\113\0\1\u011d\113\0\1\u011e"+ "\57\0\1\20\6\21\1\0\2\20\11\21\3\0\7\21"+ "\20\0\2\20\1\0\4\21\1\u011f\16\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\6\21"+ "\1\272\2\21\3\0\7\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\4\21\1\u0120\4\21\3\0\7\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\6\21\1\u0121\2\21\3\0\7\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\11\21\3\0\3\21"+ "\1\u0102\3\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\11\21"+ "\3\0\2\21\1\u0122\4\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\11\21\3\0\7\21\20\0\2\20\1\0\15\21"+ "\1\u0123\5\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\7\21\1\u0124\1\21\3\0\7\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\4\21\1\212\4\21"+ "\3\0\7\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\10\21"+ "\1\u010e\3\0\7\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\7\21\20\0\2\20\1\0\16\21\1\u0125"+ "\1\21\1\324\2\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\3\21\1\371\5\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\7\21\1\u0126"+ "\1\21\3\0\7\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\3\21\1\u0127\3\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\10\21\1\u0102\3\0\7\21\20\0\2\20"+ "\1\0\15\21\1\u0102\5\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\7\21\1\362\1\21"+ "\3\0\7\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\36\0\1\u0128\61\0\1\20\6\21\1\0"+ "\2\20\4\21\1\u0129\4\21\3\0\7\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\11\21\3\0\7\21\20\0\2\20"+ "\1\0\17\21\1\212\3\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\2\21\1\273\6\21"+ "\3\0\7\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\7\21"+ "\1\u012a\1\21\3\0\7\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\3\21\1\362\5\21\3\0\7\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\11\21\3\0\2\21\1\u012b\4\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\4\21\1\u0102\4\21"+ "\3\0\7\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\6\21"+ "\1\u012c\2\21\3\0\7\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\5\21\1\212\3\21\3\0\7\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\2\21\1\362\6\21\3\0\7\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\11\21\3\0\5\21"+ "\1\332\1\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\7\21"+ "\1\u012d\1\21\3\0\7\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\10\21\1\212\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\11\21\3\0\4\21\1\u012e\2\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\7\21\1\u012f\1\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\2\21\1\212"+ "\6\21\3\0\7\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\7\21\20\0\2\20\1\0\15\21\1\272"+ "\5\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\4\21\1\u0130\4\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\6\21\1\u0131\2\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\3\21\1\u0132\3\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\34\0\1\u0133\63\0\1\20\6\21"+ "\1\0\2\20\11\21\3\0\7\21\20\0\2\20\1\0"+ "\14\21\1\212\6\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\6\21\1\u0134\2\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\3\21\1\u0135\3\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\67\0\1\u0136\4\0\1\u0137\112\0"+ "\1\u0138\113\0\1\u0139\113\0\1\u013a\24\0\1\20\6\21"+ "\1\0\2\20\11\21\3\0\7\21\20\0\2\20\1\0"+ "\5\21\1\212\15\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\11\21\3\0\1\21\1\u0124"+ "\5\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\7\21\20\0\2\20\1\0\17\21\1\u0102\3\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\3\21\1\u013b\3\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\11\21\3\0\7\21\20\0\2\20\1\0"+ "\21\21\1\u0102\1\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\4\21\1\u013c\4\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\7\21\20\0\2\20\1\0\20\21\1\324\2\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\4\21\1\212\2\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\1\21\1\u013d\7\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\1\u013e\10\21\3\0\7\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\11\21\3\0\2\21"+ "\1\u013f\4\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\2\21"+ "\1\u0108\6\21\3\0\7\21\20\0\2\20\1\0\23\21"+ "\1\0\1\21\2\0\1\21\4\0\1\20\6\21\1\0"+ "\2\20\11\21\3\0\7\21\20\0\2\20\1\0\15\21"+ "\1\u0101\5\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\11\21\3\0\7\21\20\0\2\20"+ "\1\0\11\21\1\u0140\11\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\6\21\1\u0102\2\21"+ "\3\0\7\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0\1\20\6\21\1\0\2\20\1\u0141"+ "\10\21\3\0\7\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\7\21\20\0\2\20\1\0\16\21\1\u0102"+ "\4\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\7\21\1\312\1\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\1\21\1\u0142\7\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\35\0\1\u0143\62\0\1\20\6\21\1\0\2\20"+ "\1\21\1\u0144\7\21\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\4\21\1\u0126\4\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\67\0"+ "\1\u0145\4\0\1\u0146\106\0\1\u0147\4\0\1\u0148\106\0"+ "\1\u0149\4\0\1\u014a\23\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\1\21\1\u0102\5\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\2\21\1\u0102\6\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\5\21\1\u0102\3\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\7\21\20\0\2\20\1\0\13\21\1\u014b\7\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\11\21\3\0\3\21\1\u014c\3\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\6\21\1\302\2\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\11\21\3\0\7\21\20\0"+ "\2\20\1\0\13\21\1\u014d\7\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\7\21\20\0\2\20\1\0\11\21\1\u014e\11\21\1\0"+ "\1\21\2\0\1\21\111\0\1\u0136\113\0\1\u0137\114\0"+ "\1\u014f\113\0\1\u0150\117\0\1\u0136\113\0\1\u0137\1\0"+ "\1\20\6\21\1\0\2\20\6\21\1\u013c\2\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\4\21\1\u0151"+ "\4\21\3\0\7\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\6\21\1\u0152\2\21\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\2\21\1\u0153\6\21\3\0\7\21\20\0"+ "\2\20\1\0\23\21\1\0\1\21\2\0\1\21\4\0"+ "\1\20\6\21\1\0\2\20\2\21\1\u0154\6\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\0\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\7\21\20\0\2\20\1\0\23\21\1\u0111\1\21\2\0"+ "\1\21\4\0\1\20\6\21\1\0\2\20\11\21\3\0"+ "\2\21\1\u0155\4\21\20\0\2\20\1\0\23\21\1\0"+ "\1\21\2\0\1\21\4\0\1\20\6\21\1\0\2\20"+ "\6\21\1\u0156\2\21\3\0\7\21\20\0\2\20\1\0"+ "\23\21\1\0\1\21\2\0\1\21\4\0\1\20\6\21"+ "\1\0\2\20\11\21\3\0\1\u0157\6\21\20\0\2\20"+ "\1\0\23\21\1\0\1\21\2\0\1\21\4\0\1\20"+ "\6\21\1\0\2\20\7\21\1\u0158\1\21\3\0\7\21"+ "\20\0\2\20\1\0\23\21\1\0\1\21\2\0\1\21"+ "\4\0\1\20\6\21\1\0\2\20\4\21\1\337\4\21"+ "\3\0\7\21\20\0\2\20\1\0\23\21\1\0\1\21"+ "\2\0\1\21\4\0"; private static int [] zzUnpackTrans() { int [] result = new int[22192]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; } private static int zzUnpackTrans(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); value--; do result[j++] = value; while (--count > 0); } return j; } /* error codes */ private static final int ZZ_UNKNOWN_ERROR = 0; private static final int ZZ_NO_MATCH = 1; private static final int ZZ_PUSHBACK_2BIG = 2; /* error messages for the codes above */ private static final String ZZ_ERROR_MSG[] = { "Unkown internal scanner error", "Error: could not match input", "Error: pushback value was too large" }; /** * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code> */ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = "\17\0\4\1\1\11\11\1\1\11\10\1\1\11\2\1"+ "\1\11\24\1\3\11\2\1\2\11\1\1\1\11\1\1"+ "\1\11\1\1\1\11\1\1\1\11\1\1\1\11\1\1"+ "\1\11\2\1\2\11\1\1\2\11\1\1\1\11\1\1"+ "\2\11\1\1\1\11\1\1\1\11\40\1\1\0\17\1"+ "\1\0\6\11\4\1\1\11\1\0\20\1\2\11\2\1"+ "\1\0\47\1\1\0\11\1\5\0\21\1\1\0\25\1"+ "\1\11\5\1\1\0\3\1\4\0\11\1\1\11\12\1"+ "\1\0\2\1\2\11\3\0\10\1\1\11\1\1\6\0"+ "\4\1\2\11\10\1"; private static int [] zzUnpackAttribute() { int [] result = new int[344]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; } private static int zzUnpackAttribute(String packed, int offset, int [] result) { int i = 0; /* index in packed string */ int j = offset; /* index in unpacked array */ int l = packed.length(); while (i < l) { int count = packed.charAt(i++); int value = packed.charAt(i++); do result[j++] = value; while (--count > 0); } return j; } /** the input device */ private java.io.Reader zzReader; /** the current state of the DFA */ private int zzState; /** the current lexical state */ private int zzLexicalState = YYINITIAL; /** this buffer contains the current text to be matched and is the source of the yytext() string */ private char zzBuffer[]; /** the textposition at the last accepting state */ private int zzMarkedPos; /** the current text position in the buffer */ private int zzCurrentPos; /** startRead marks the beginning of the yytext() string in the buffer */ private int zzStartRead; /** endRead marks the last character in the buffer, that has been read from input */ private int zzEndRead; /** zzAtEOF == true <=> the scanner is at the EOF */ private boolean zzAtEOF; /* user code: */ /** * Token type specific to RubyTokenMaker; this signals that we are inside * an unquoted/double quoted/backtick EOF heredoc. */ public static final int INTERNAL_HEREDOC_EOF_UNQUOTED = -1; /** * Token type specific to RubyTokenMaker; this signals that we are inside * an single quoted EOF heredoc. */ public static final int INTERNAL_HEREDOC_EOF_SINGLE_QUOTED = -2; /** * Token type specific to RubyTokenMaker; this signals that we are inside * an double quoted EOF heredoc. */ public static final int INTERNAL_HEREDOC_EOF_DOUBLE_QUOTED = -3; /** * Token type specific to RubyTokenMaker; this signals that we are inside * an unquoted/double quoted/backtick EOT heredoc. */ public static final int INTERNAL_HEREDOC_EOT_UNQUOTED = -4; /** * Token type specific to RubyTokenMaker; this signals that we are inside * an single quoted EOT heredoc. */ public static final int INTERNAL_HEREDOC_EOT_SINGLE_QUOTED = -5; /** * Token type specific to RubyTokenMaker; this signals that we are inside * an double quoted EOT heredoc. */ public static final int INTERNAL_HEREDOC_EOT_DOUBLE_QUOTED = -6; /** * Token type specific to RubyTokenMaker; this signals that we are inside * a %Q!...! style double quoted string. */ public static final int INTERNAL_STRING_Q_BANG = -7; /** * Token type specific to RubyTokenMaker; this signals that we are inside * a %Q{...} style double quoted string. */ public static final int INTERNAL_STRING_Q_CURLY_BRACE = -8; /** * Token type specific to RubyTokenMaker; this signals that we are inside * a %Q&lt;...&gt; style double quoted string. */ public static final int INTERNAL_STRING_Q_LT = -9; /** * Token type specific to RubyTokenMaker; this signals that we are inside * a %Q(...) style double quoted string. */ public static final int INTERNAL_STRING_Q_PAREN = -10; /** * Token type specific to RubyTokenMaker; this signals that we are inside * a %Q/.../ style double quoted string. */ public static final int INTERNAL_STRING_Q_SLASH = -11; /** * Token type specific to RubyTokenMaker; this signals that we are inside * a %Q[...] style double quoted string. */ public static final int INTERNAL_STRING_Q_SQUARE_BRACKET = -12; /** * Constructor. This must be here because JFlex does not generate a * no-parameter constructor. */ public RubyTokenMaker() { } /** * Adds the token specified to the current linked list of tokens as an * "end token;" that is, at <code>zzMarkedPos</code>. * * @param tokenType The token's type. */ private void addEndToken(int tokenType) { addToken(zzMarkedPos,zzMarkedPos, tokenType); } /** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. */ private void addToken(int tokenType) { addToken(zzStartRead, zzMarkedPos-1, tokenType); } /** * Adds the token specified to the current linked list of tokens. * * @param tokenType The token's type. */ private void addToken(int start, int end, int tokenType) { int so = start + offsetShift; addToken(zzBuffer, start,end, tokenType, so); } /** * Adds the token specified to the current linked list of tokens. * * @param array The character array. * @param start The starting offset in the array. * @param end The ending offset in the array. * @param tokenType The token's type. * @param startOffset The offset in the document at which this token * occurs. */ @Override public void addToken(char[] array, int start, int end, int tokenType, int startOffset) { super.addToken(array, start,end, tokenType, startOffset); zzStartRead = zzMarkedPos; } /** * {@inheritDoc} */ @Override public String[] getLineCommentStartAndEnd(int languageIndex) { return new String[] { "#", null }; } /** * Returns whether tokens of the specified type should have "mark * occurrences" enabled for the current programming language. * * @param type The token type. * @return Whether tokens of this type should have "mark occurrences" * enabled. */ @Override public boolean getMarkOccurrencesOfTokenType(int type) { return type==Token.IDENTIFIER || type==Token.VARIABLE; } /** * Returns the first token in the linked list of tokens generated * from <code>text</code>. This method must be implemented by * subclasses so they can correctly implement syntax highlighting. * * @param text The text from which to get tokens. * @param initialTokenType The token type we should start with. * @param startOffset The offset into the document at which * <code>text</code> starts. * @return The first <code>Token</code> in a linked list representing * the syntax highlighted text. */ public Token getTokenList(Segment text, int initialTokenType, int startOffset) { resetTokenList(); this.offsetShift = -text.offset + startOffset; // Start off in the proper state. int state = Token.NULL; switch (initialTokenType) { case Token.COMMENT_DOCUMENTATION: state = DOCCOMMENT; start = text.offset; break; case Token.LITERAL_STRING_DOUBLE_QUOTE: state = STRING; start = text.offset; break; case Token.LITERAL_CHAR: state = CHAR_LITERAL; start = text.offset; break; case Token.LITERAL_BACKQUOTE: state = BACKTICKS; start = text.offset; break; case INTERNAL_HEREDOC_EOF_UNQUOTED: state = HEREDOC_EOF_UNQUOTED; start = text.offset; break; case INTERNAL_HEREDOC_EOF_SINGLE_QUOTED: state = HEREDOC_EOF_SINGLE_QUOTED; start = text.offset; break; case INTERNAL_HEREDOC_EOF_DOUBLE_QUOTED: state = HEREDOC_EOF_DOUBLE_QUOTED; start = text.offset; break; case INTERNAL_HEREDOC_EOT_UNQUOTED: state = HEREDOC_EOT_UNQUOTED; start = text.offset; break; case INTERNAL_HEREDOC_EOT_SINGLE_QUOTED: state = HEREDOC_EOT_SINGLE_QUOTED; start = text.offset; break; case INTERNAL_HEREDOC_EOT_DOUBLE_QUOTED: state = HEREDOC_EOT_DOUBLE_QUOTED; start = text.offset; break; case INTERNAL_STRING_Q_BANG: state = STRING_Q_BANG; start = text.offset; break; case INTERNAL_STRING_Q_CURLY_BRACE: state = STRING_Q_CURLY_BRACE; start = text.offset; break; case INTERNAL_STRING_Q_LT: state = STRING_Q_LT; start = text.offset; break; case INTERNAL_STRING_Q_PAREN: state = STRING_Q_PAREN; start = text.offset; break; case INTERNAL_STRING_Q_SLASH: state = STRING_Q_SLASH; start = text.offset; break; case INTERNAL_STRING_Q_SQUARE_BRACKET: state = STRING_Q_SQUARE_BRACKET; start = text.offset; break; default: state = Token.NULL; } s = text; try { yyreset(zzReader); yybegin(state); return yylex(); } catch (IOException ioe) { ioe.printStackTrace(); return new TokenImpl(); } } /** * Refills the input buffer. * * @return <code>true</code> if EOF was reached, otherwise * <code>false</code>. * @exception IOException if any I/O-Error occurs. */ private boolean zzRefill() throws java.io.IOException { return zzCurrentPos>=s.offset+s.count; } /** * Resets the scanner to read from a new input stream. * Does not close the old reader. * * All internal variables are reset, the old input stream * <b>cannot</b> be reused (internal buffer is discarded and lost). * Lexical state is set to <tt>YY_INITIAL</tt>. * * @param reader the new input stream */ public final void yyreset(java.io.Reader reader) throws java.io.IOException { // 's' has been updated. zzBuffer = s.array; /* * We replaced the line below with the two below it because zzRefill * no longer "refills" the buffer (since the way we do it, it's always * "full" the first time through, since it points to the segment's * array). So, we assign zzEndRead here. */ //zzStartRead = zzEndRead = s.offset; zzStartRead = s.offset; zzEndRead = zzStartRead + s.count - 1; zzCurrentPos = zzMarkedPos = s.offset; zzLexicalState = YYINITIAL; zzReader = reader; zzAtEOF = false; } /** * Creates a new scanner * There is also a java.io.InputStream version of this constructor. * * @param in the java.io.Reader to read input from. */ public RubyTokenMaker(java.io.Reader in) { this.zzReader = in; } /** * Creates a new scanner. * There is also java.io.Reader version of this constructor. * * @param in the java.io.Inputstream to read input from. */ public RubyTokenMaker(java.io.InputStream in) { this(new java.io.InputStreamReader(in)); } /** * Unpacks the compressed character translation table. * * @param packed the packed character translation table * @return the unpacked character translation table */ private static char [] zzUnpackCMap(String packed) { char [] map = new char[0x10000]; int i = 0; /* index in packed string */ int j = 0; /* index in unpacked array */ while (i < 188) { int count = packed.charAt(i++); char value = packed.charAt(i++); do map[j++] = value; while (--count > 0); } return map; } /** * Returns the current lexical state. */ public final int yystate() { return zzLexicalState; } /** * Enters a new lexical state * * @param newState the new lexical state */ @Override public final void yybegin(int newState) { zzLexicalState = newState; } /** * Returns the text matched by the current regular expression. */ public final String yytext() { return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead ); } /** * Returns the character at position <tt>pos</tt> from the * matched text. * * It is equivalent to yytext().charAt(pos), but faster * * @param pos the position of the character to fetch. * A value from 0 to yylength()-1. * * @return the character at position pos */ public final char yycharat(int pos) { return zzBuffer[zzStartRead+pos]; } /** * Returns the length of the matched text region. */ public final int yylength() { return zzMarkedPos-zzStartRead; } /** * Reports an error that occured while scanning. * * In a wellformed scanner (no or only correct usage of * yypushback(int) and a match-all fallback rule) this method * will only be called with things that "Can't Possibly Happen". * If this method is called, something is seriously wrong * (e.g. a JFlex bug producing a faulty scanner etc.). * * Usual syntax/scanner level error handling should be done * in error fallback rules. * * @param errorCode the code of the errormessage to display */ private void zzScanError(int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); } /** * Pushes the specified amount of characters back into the input stream. * * They will be read again by then next call of the scanning method * * @param number the number of characters to be read again. * This number must not be greater than yylength()! */ public void yypushback(int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; } /** * Resumes scanning until the next regular expression is matched, * the end of input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs */ public org.fife.ui.rsyntaxtextarea.Token yylex() throws java.io.IOException { int zzInput; int zzAction; // cached fields: int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; char [] zzBufferL = zzBuffer; char [] zzCMapL = ZZ_CMAP; int [] zzTransL = ZZ_TRANS; int [] zzRowMapL = ZZ_ROWMAP; int [] zzAttrL = ZZ_ATTRIBUTE; while (true) { zzMarkedPosL = zzMarkedPos; zzAction = -1; zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; zzState = zzLexicalState; zzForAction: { while (true) { if (zzCurrentPosL < zzEndReadL) zzInput = zzBufferL[zzCurrentPosL++]; else if (zzAtEOF) { zzInput = YYEOF; break zzForAction; } else { // store back cached positions zzCurrentPos = zzCurrentPosL; zzMarkedPos = zzMarkedPosL; boolean eof = zzRefill(); // get translated positions and possibly new buffer zzCurrentPosL = zzCurrentPos; zzMarkedPosL = zzMarkedPos; zzBufferL = zzBuffer; zzEndReadL = zzEndRead; if (eof) { zzInput = YYEOF; break zzForAction; } else { zzInput = zzBufferL[zzCurrentPosL++]; } } int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; if (zzNext == -1) break zzForAction; zzState = zzNext; int zzAttributes = zzAttrL[zzState]; if ( (zzAttributes & 1) == 1 ) { zzAction = zzState; zzMarkedPosL = zzCurrentPosL; if ( (zzAttributes & 8) == 8 ) break zzForAction; } } } // store back cached position zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { case 39: { start = zzMarkedPos-yylength(); yybegin(STRING_Q_LT); } case 52: break; case 2: { addToken(Token.IDENTIFIER); } case 53: break; case 45: { addToken(Token.LITERAL_BOOLEAN); } case 54: break; case 32: { addToken(start,zzStartRead-1, Token.COMMENT_DOCUMENTATION); return firstToken; } case 55: break; case 19: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addEndToken(INTERNAL_STRING_Q_PAREN); return firstToken; } case 56: break; case 18: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addEndToken(INTERNAL_STRING_Q_CURLY_BRACE); return firstToken; } case 57: break; case 20: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addEndToken(INTERNAL_STRING_Q_SLASH); return firstToken; } case 58: break; case 46: { yybegin(YYINITIAL); addToken(start,zzStartRead+3, Token.COMMENT_DOCUMENTATION); } case 59: break; case 10: { start = zzMarkedPos-1; yybegin(STRING); } case 60: break; case 44: { if (start==zzStartRead) { addToken(Token.PREPROCESSOR); addNullToken(); return firstToken; } } case 61: break; case 9: { addToken(Token.FUNCTION); } case 62: break; case 22: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addEndToken(INTERNAL_STRING_Q_LT); return firstToken; } case 63: break; case 42: { addToken(Token.VARIABLE); } case 64: break; case 1: { addToken(Token.ERROR_IDENTIFIER); } case 65: break; case 31: { addToken(start,zzStartRead-1, Token.PREPROCESSOR); addEndToken(INTERNAL_HEREDOC_EOT_SINGLE_QUOTED); return firstToken; } case 66: break; case 4: { addToken(Token.COMMENT_EOL); addNullToken(); return firstToken; } case 67: break; case 41: { start = zzMarkedPos-yylength(); yybegin(STRING_Q_CURLY_BRACE); } case 68: break; case 50: { start = zzStartRead; yybegin(HEREDOC_EOF_SINGLE_QUOTED); } case 69: break; case 51: { start = zzStartRead; yybegin(HEREDOC_EOT_SINGLE_QUOTED); } case 70: break; case 47: { start = zzStartRead; yybegin(HEREDOC_EOF_UNQUOTED); } case 71: break; case 14: { /* Skip escaped chars. */ } case 72: break; case 25: { yybegin(YYINITIAL); addToken(start,zzStartRead, Token.LITERAL_CHAR); } case 73: break; case 43: { addToken(Token.LITERAL_NUMBER_HEXADECIMAL); } case 74: break; case 28: { addToken(start,zzStartRead-1, Token.PREPROCESSOR); addEndToken(INTERNAL_HEREDOC_EOF_UNQUOTED); return firstToken; } case 75: break; case 6: { addToken(Token.WHITESPACE); } case 76: break; case 17: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addEndToken(INTERNAL_STRING_Q_BANG); return firstToken; } case 77: break; case 35: { addToken(Token.PREPROCESSOR); } case 78: break; case 11: { start = zzMarkedPos-1; yybegin(CHAR_LITERAL); } case 79: break; case 3: { addToken(Token.LITERAL_NUMBER_DECIMAL_INT); } case 80: break; case 38: { start = zzMarkedPos-yylength(); yybegin(STRING_Q_SLASH); } case 81: break; case 27: { yybegin(YYINITIAL); addToken(start,zzStartRead, Token.LITERAL_BACKQUOTE); } case 82: break; case 16: { yybegin(YYINITIAL); addToken(start,zzStartRead, Token.LITERAL_STRING_DOUBLE_QUOTE); } case 83: break; case 37: { start = zzMarkedPos-yylength(); yybegin(STRING_Q_BANG); } case 84: break; case 23: { /* Skip escaped single quotes only, but this should still work. */ } case 85: break; case 30: { addToken(start,zzStartRead-1, Token.PREPROCESSOR); addEndToken(INTERNAL_HEREDOC_EOT_UNQUOTED); return firstToken; } case 86: break; case 49: { start = zzMarkedPos-6; yybegin(DOCCOMMENT); } case 87: break; case 34: { addToken(Token.RESERVED_WORD); } case 88: break; case 26: { addToken(start,zzStartRead-1, Token.LITERAL_BACKQUOTE); return firstToken; } case 89: break; case 36: { start = zzMarkedPos-yylength(); yybegin(STRING_Q_SQUARE_BRACKET); } case 90: break; case 8: { addToken(Token.SEPARATOR); } case 91: break; case 5: { addNullToken(); return firstToken; } case 92: break; case 21: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addEndToken(INTERNAL_STRING_Q_SQUARE_BRACKET); return firstToken; } case 93: break; case 40: { start = zzMarkedPos-yylength(); yybegin(STRING_Q_PAREN); } case 94: break; case 7: { addToken(Token.OPERATOR); } case 95: break; case 24: { addToken(start,zzStartRead-1, Token.LITERAL_CHAR); return firstToken; } case 96: break; case 33: { addToken(Token.LITERAL_NUMBER_FLOAT); } case 97: break; case 48: { start = zzStartRead; yybegin(HEREDOC_EOT_UNQUOTED); } case 98: break; case 12: { start = zzMarkedPos-1; yybegin(BACKTICKS); } case 99: break; case 13: { } case 100: break; case 15: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); return firstToken; } case 101: break; case 29: { addToken(start,zzStartRead-1, Token.PREPROCESSOR); addEndToken(INTERNAL_HEREDOC_EOF_SINGLE_QUOTED); return firstToken; } case 102: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; switch (zzLexicalState) { case HEREDOC_EOF_SINGLE_QUOTED: { addToken(start,zzStartRead-1, Token.PREPROCESSOR); addEndToken(INTERNAL_HEREDOC_EOF_SINGLE_QUOTED); return firstToken; } case 345: break; case DOCCOMMENT: { yybegin(YYINITIAL); addToken(start,zzEndRead, Token.COMMENT_DOCUMENTATION); return firstToken; } case 346: break; case HEREDOC_EOT_SINGLE_QUOTED: { addToken(start,zzStartRead-1, Token.PREPROCESSOR); addEndToken(INTERNAL_HEREDOC_EOT_SINGLE_QUOTED); return firstToken; } case 347: break; case HEREDOC_EOT_UNQUOTED: { addToken(start,zzStartRead-1, Token.PREPROCESSOR); addEndToken(INTERNAL_HEREDOC_EOT_UNQUOTED); return firstToken; } case 348: break; case STRING_Q_SLASH: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addEndToken(INTERNAL_STRING_Q_SLASH); return firstToken; } case 349: break; case STRING_Q_BANG: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addEndToken(INTERNAL_STRING_Q_BANG); return firstToken; } case 350: break; case STRING_Q_LT: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addEndToken(INTERNAL_STRING_Q_LT); return firstToken; } case 351: break; case STRING: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); return firstToken; } case 352: break; case BACKTICKS: { addToken(start,zzStartRead-1, Token.LITERAL_BACKQUOTE); return firstToken; } case 353: break; case YYINITIAL: { addNullToken(); return firstToken; } case 354: break; case HEREDOC_EOF_UNQUOTED: { addToken(start,zzStartRead-1, Token.PREPROCESSOR); addEndToken(INTERNAL_HEREDOC_EOF_UNQUOTED); return firstToken; } case 355: break; case STRING_Q_CURLY_BRACE: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addEndToken(INTERNAL_STRING_Q_CURLY_BRACE); return firstToken; } case 356: break; case STRING_Q_PAREN: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addEndToken(INTERNAL_STRING_Q_PAREN); return firstToken; } case 357: break; case CHAR_LITERAL: { addToken(start,zzStartRead-1, Token.LITERAL_CHAR); return firstToken; } case 358: break; case STRING_Q_SQUARE_BRACKET: { addToken(start,zzStartRead-1, Token.LITERAL_STRING_DOUBLE_QUOTE); addEndToken(INTERNAL_STRING_Q_SQUARE_BRACKET); return firstToken; } case 359: break; default: return null; } } else { zzScanError(ZZ_NO_MATCH); } } } } }
[ "borfje@gmail.com" ]
borfje@gmail.com
4d2d7520778a84685a919289b47fbf3441e17652
b192ff05f041fe24abf0cc49dcd7ea3a76334f46
/src/main/java/rocks/ninjachen/leet_code_contest/_168/MaxCandies.java
c430cd751090887ae9b2fb0d370ae55793e4e1f7
[]
no_license
ninjachen/leetcode-solutions
5423f4046eb65b9cb9fcbdf4a9b68bc9a05bb731
b911988a0a8b73ee0325dc34bbc3d43107d562d3
refs/heads/master
2022-04-20T03:20:20.356366
2020-02-23T03:01:03
2020-02-23T03:01:03
53,998,333
0
0
null
null
null
null
UTF-8
Java
false
false
1,441
java
package rocks.ninjachen.leet_code_contest._168; import java.util.HashSet; import java.util.Set; public class MaxCandies { public int maxCandies(int[] status, int[] candies, int[][] keys, int[][] containedBoxes, int[] initialBoxes) { int candiesNum = 0; Set<Integer> ownedBoxes = new HashSet<>(); Set<Integer> ownedKeys = new HashSet<>(); Set<Integer> boxesToOpen = new HashSet<>(); for (int i : initialBoxes) { boxesToOpen.add(i); } while (!boxesToOpen.isEmpty()) { for (int i : boxesToOpen) { if (status[i] == 0) { ownedBoxes.add(i); } else { candiesNum += candies[i]; // int[] keysInside = keys[i]; for (int key : keysInside) ownedKeys.add(key); int[] containedBox = containedBoxes[i]; for (int box : containedBox) { ownedBoxes.add(box); } } } boxesToOpen.clear(); for (int i : ownedBoxes) { if (status[i] == 1 || ownedKeys.contains(i)) { ownedKeys.remove(i); boxesToOpen.add(i); } } ownedBoxes.removeAll(boxesToOpen); } return candiesNum; } }
[ "jiachenning@gmail.com" ]
jiachenning@gmail.com
a68c8a545ecd60ff59f9d5deae478814eea3942c
3fdc4a74f9e20bc98d9866506a977660a295d793
/src/main/java/com/lkq/controller/backstage/Backstage_Config_Controller.java
00458e80184f40f8a8bfe4d73fc3b20846198789
[]
no_license
lekjong/LMS
e8e9f0fb313143a8a53d836782243a08cf8c3148
e608e43c8fb10077490bec93c70879f4e2eb330e
refs/heads/master
2020-04-25T19:37:57.196219
2019-03-03T07:24:29
2019-03-03T07:24:29
173,027,248
0
0
null
null
null
null
UTF-8
Java
false
false
1,270
java
package com.lkq.controller.backstage; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; import com.lkq.entity.Config; import com.lkq.service.ConfigService; @Controller @RequestMapping("/backstage/config") public class Backstage_Config_Controller { private ConfigService configService; @RequestMapping("/manage") public ModelAndView manage() throws Exception { ModelAndView mav = new ModelAndView(); mav.setViewName("/admin/page/config/config_manage"); return mav; } @RequestMapping("/edit") public ModelAndView edit(@RequestParam(value = "id", required = false) String id, HttpServletResponse response, HttpServletRequest request) throws Exception { ModelAndView mav = new ModelAndView(); Config config = configService.findById(Integer.parseInt(id)); mav.addObject("config", config); mav.addObject("btn_text", "修改"); mav.addObject("save_url", "/admin/config/update?id=" + id); mav.setViewName("/admin/page/config/add_or_update"); return mav; } }
[ "1414467540@qq.com" ]
1414467540@qq.com
f277642ebc48a5be0539707e44ab7415ede4d339
ec95ec759f3d3270967aa4e59dffddfec9f4a80f
/I_Amazon_OA2_Top_9/src/A_Data_Structure.java
f7debc8eb859e6cf334057626a556bfd51f6efcf
[]
no_license
guccio618/myLeetcode
3ccf037f0b917c13967e2bbbee7d04ff8dba68bc
a51c874144964435fca7752b83dcbcc52db37a4b
refs/heads/master
2021-01-13T14:59:31.182538
2017-01-26T04:47:40
2017-01-26T04:47:40
76,620,835
2
1
null
null
null
null
UTF-8
Java
false
false
526
java
public class A_Data_Structure { } class RandomListNode { int label; RandomListNode next, random; RandomListNode(int x) { this.label = x; } }; class TreeNode { int value; TreeNode left, right; public TreeNode (int value) { this.value = value; left = right = null; } } class Connection{ String city1; String city2; int cost; public Connection(String c1, String c2, int c){ city1 = c1; city2 = c2; cost = c; } @Override public String toString() { return city1 + " " + city2 + " " + cost; } }
[ "jackiechan618@hotmail.com" ]
jackiechan618@hotmail.com
9aa324f5578700e48e5a832e5b5cb35d4ce9e83e
9f778150c6b980a2ad09d6dc251f696fe0b5eb22
/aos projects/3_phase_commit/3PC/src/com/aos/me/listener/ServerListener.java
dca55e1d133a37584416e4b06a682c89478edfb7
[]
no_license
vncShrn/java
8579c502295720993ee46fb8c91305db5900ce3d
02c4ba628004e32d4f57b8c9aadc5ec54bdfbde7
refs/heads/master
2021-05-14T03:54:18.286041
2018-01-08T04:27:56
2018-01-08T04:27:56
116,628,479
0
0
null
null
null
null
UTF-8
Java
false
false
2,281
java
package com.aos.me.listener; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.text.SimpleDateFormat; import java.util.Locale; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import com.aos.me.other.Definitions; import com.aos.me.process.MeNode; /** * * @author Vincy Shrine * */ public class ServerListener implements Runnable { private ExecutorService executor = Executors.newFixedThreadPool(Definitions.MAX_PROCESS + 5); private int portNo; SimpleDateFormat df = new SimpleDateFormat("hh:mm:ss.SSS", Locale.US); private static ServerListener server = null; public static synchronized ServerListener getInstance() { if (server == null) { server = new ServerListener(); } return server; } private ServerListener() { } public void setPortNo(int portNo) { this.portNo = portNo; } public ExecutorService getExecutor() { return executor; } @Override public void run() { MeNode process = MeNode.getInstance(); // String logPrefix = " Process " + process.getId() + ": -TCP LISTENER- // "; String logPrefix = " Process " + process.getId() + ": "; ServerSocket serverSocket = null; try { serverSocket = new ServerSocket(portNo); serverSocket.setReuseAddress(true); } catch (IOException e) { System.out.println( logPrefix + "Error: Create socket: " + e.getMessage() + portNo); } System.out.println( logPrefix + "Waiting for incoming connections at: " + portNo); try { while (true) { // Listens for a connection and accepts it // The method blocks until a connection is made Socket incomingSocket = serverSocket.accept(); // String hostName = // incomingSocket.getInetAddress().getCanonicalHostName(); // process.addToSocketWriteMap(hostName, incomingSocket); // System.out.println(df.format(new Date())+logPrefix + // "Received packet from: " + // hostName); executor.execute(new ClientHandler(incomingSocket)); } } catch (IOException e) { System.out.println( logPrefix + "Error: " + e.getMessage() + portNo); System.exit(1); } finally { if (serverSocket != null) { try { serverSocket.close(); } catch (IOException e) { e.printStackTrace(); } } } } }
[ "vincy.shrine@gmail.com" ]
vincy.shrine@gmail.com
06214260830e73e89ab6f960bddb92ebfe0080d0
434cd3dfa6393678a20daf4a72ccf0b0f2d8c754
/app/src/main/java/arslanali/ru/moneytracker/adapters/ItemsAdapter.java
de2962c7788694f3f9ebea986c3caf5e10d315fc
[]
no_license
ArslanaliDag/MoneyTracker
b48ecb69d6aa8121dedb22f36fc281e697aa4154
8320e524e3cedcbcf8412e96f6034b5999b8c5bd
refs/heads/master
2020-04-05T13:09:18.111056
2017-07-14T14:28:44
2017-07-14T14:28:44
95,128,846
1
0
null
2017-07-16T16:18:21
2017-06-22T15:17:17
Java
UTF-8
Java
false
false
3,498
java
package arslanali.ru.moneytracker.adapters; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.util.SparseBooleanArray; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import android.widget.Toast; import java.util.ArrayList; import java.util.List; import arslanali.ru.moneytracker.pojo.Item; import arslanali.ru.moneytracker.R; public class ItemsAdapter extends RecyclerView.Adapter<ItemsAdapter.ItemViewHolder> { private final List<Item> items = new ArrayList<>(); // Simplified version HachMap in Java, optimized for android SparseBooleanArray selectedItems = new SparseBooleanArray(); // add data in RW - HardCode // public ItemsAdapter() { // getItems.add(new Item("Молоко", 35, Item.TYPE_EXPENSE)); // getItems.add(new Item("Зубная щетка", 150, Item.TYPE_EXPENSE)); // getItems.add(new Item("Сковородка Tefal с антипригарный покрытием", 500, Item.TYPE_EXPENSE)); // } @Override public ItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { return new ItemViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item, null)); } @Override public void onBindViewHolder(ItemViewHolder holder, int position) { // Insert data in variable. Cashed data final Item item = items.get(position); holder.name.setText(item.getName()); holder.price.setText(String.valueOf(item.getPrice())); // We say that item our active holder.container.setActivated(selectedItems.get(position, false)); } @Override public int getItemCount() { return items.size(); } public void clear() { items.clear(); } public void addAll(List<Item> data) { items.addAll(data); notifyDataSetChanged(); } // Dedicated or not allocated items public void toggleSelection(int position) { if (selectedItems.get(position, false)) { selectedItems.delete(position); } else { selectedItems.put(position, true); } // We inform RecyclerView that the elements have changed notifyItemChanged(position); } // selected items public int getSelectedItemCount() { return selectedItems.size(); } // unselect from items, finish the actionMode public void clearSelections() { selectedItems.clear(); notifyDataSetChanged(); } // selected items, return the selected items public List<Integer> getSelectedItems() { List<Integer> items = new ArrayList<>(selectedItems.size()); for (int i = 0; i < selectedItems.size(); i++) { items.add(selectedItems.keyAt(i)); } return items; } // Inner class. Speed scrolling class ItemViewHolder extends RecyclerView.ViewHolder { private final TextView name, price; private final View container; // RelativeLayout view container - item ItemViewHolder(View itemView) { super(itemView); // Without itemView.findViewById this parameter gives an error java.lang.NullPointerException container = itemView.findViewById(R.id.item_container); name = (TextView) itemView.findViewById(R.id.nameItem); price = (TextView) itemView.findViewById(R.id.priceItem); } } }
[ "arsenumek@gmail.com" ]
arsenumek@gmail.com
d0c49f4c3e08bdb12d6268b0244a39539dda8ac8
91c6df6cf0cb77ebd54608807bd6521f388bf19f
/java/437.路径总和-iii.java
c288d83adcc29a54f584d80338a4e1a555253878
[]
no_license
yeung66/leetcode-everyday
3ed8069fd413217dd2c586981b2009a5ddd996e7
b7a3f226932c1dc78a541a8256b7b6b290e2e791
refs/heads/master
2023-05-25T22:08:43.394860
2023-05-21T09:47:42
2023-05-21T09:47:42
203,556,752
0
0
null
null
null
null
UTF-8
Java
false
false
1,972
java
/* * @lc app=leetcode.cn id=437 lang=java * * [437] 路径总和 III * * https://leetcode-cn.com/problems/path-sum-iii/description/ * * algorithms * Medium (56.66%) * Likes: 1045 * Dislikes: 0 * Total Accepted: 109.3K * Total Submissions: 191.5K * Testcase Example: '[10,5,-3,3,2,null,11,3,-2,null,1]\n8' * * 给定一个二叉树的根节点 root ,和一个整数 targetSum ,求该二叉树里节点值之和等于 targetSum 的 路径 的数目。 * * 路径 不需要从根节点开始,也不需要在叶子节点结束,但是路径方向必须是向下的(只能从父节点到子节点)。 * * * * 示例 1: * * * * * 输入:root = [10,5,-3,3,2,null,11,3,-2,null,1], targetSum = 8 * 输出:3 * 解释:和等于 8 的路径有 3 条,如图所示。 * * * 示例 2: * * * 输入:root = [5,4,8,11,null,13,4,7,2,null,null,5,1], targetSum = 22 * 输出:3 * * * * * 提示: * * * 二叉树的节点个数的范围是 [0,1000] * -10^9   * -1000   * * */ // @lc code=start /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode() {} * TreeNode(int val) { this.val = val; } * TreeNode(int val, TreeNode left, TreeNode right) { * this.val = val; * this.left = left; * this.right = right; * } * } */ class Solution { public int pathSum(TreeNode root, int targetSum) { if (root == null) return 0; return pathSum(root.left, targetSum) + pathSum(root.right, targetSum) + rootPathLen(root, targetSum); } private int rootPathLen(TreeNode node, int target) { if (node == null) return 0; return (node.val == target ? 1 : 0) + rootPathLen(node.left, target - node.val) + rootPathLen(node.right, target - node.val); } } // @lc code=end
[ "yeungyeah@qq.com" ]
yeungyeah@qq.com
d8272145de7dbcc08be2951cc7adc836d891b43b
dc2e0ea8eb6733519286e20dfb6e31d6ac384912
/app/src/main/java/com/hr/tvprojectdemo/entiy/ImgDatas.java
f77bca0231ed9cf9084f3bde541111ca6ee8c868
[]
no_license
lv1107748200/TVProjectDemo
d084594525031a5dcf22efe026a127b253ccaaa2
d69c4b00aee1cb47145070f7415bb5f49e604df3
refs/heads/master
2021-04-05T23:59:34.312825
2018-03-12T01:38:05
2018-03-12T01:38:05
124,817,991
0
0
null
null
null
null
UTF-8
Java
false
false
3,797
java
package com.hr.tvprojectdemo.entiy; import java.util.Random; /** * Created by owen on 2017/6/22. */ public class ImgDatas { private static Random random = new Random(); private static String[] imgs = new String[]{ "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1593562162,3482681368&fm=26&gp=0.jpg", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3855200416,2996194334&fm=26&gp=0.jpg", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=48836561,143957997&fm=26&gp=0.jpg", "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1609296539,2850822101&fm=26&gp=0.jpg", "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1986284928,3256102483&fm=26&gp=0.jpg", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=4287595239,3274223937&fm=26&gp=0.jpg", "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2654863652,1103343725&fm=26&gp=0.jpg", "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2124196475,574921376&fm=26&gp=0.jpg", "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3880404509,3700563026&fm=26&gp=0.jpg", "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2158228131,1002407053&fm=26&gp=0.jpg", "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2942413784,938350867&fm=11&gp=0.jpg", "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3013600352,2077937082&fm=26&gp=0.jpg" }; public static String getUrl() { return imgs[random.nextInt(imgs.length)]; } private static String[] movieImgs = new String[]{ "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=4116929131,507038119&fm=26&gp=0.jpg", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2778645995,2482914601&fm=26&gp=0.jpg", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=471731589,4180970475&fm=26&gp=0.jpg", "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3838971077,4151306981&fm=26&gp=0.jpg", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=524852470,2918555158&fm=26&gp=0.jpg", "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1954849729,4021317348&fm=26&gp=0.jpg", "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1603461606,3565424705&fm=11&gp=0.jpg", "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3946902641,1203417546&fm=26&gp=0.jpg", "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3940629958,3916474893&fm=26&gp=0.jpg", "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=177212210,3066778892&fm=26&gp=0.jpg", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=838139577,1861058471&fm=26&gp=0.jpg", "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3800968064,203324487&fm=26&gp=0.jpg", "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=955228025,2469569596&fm=26&gp=0.jpg", "https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3483986471,1443536788&fm=26&gp=0.jpg", "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1889706933,2434657849&fm=26&gp=0.jpg", "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3346934314,259707941&fm=26&gp=0.jpg", "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1069765571,2669917239&fm=26&gp=0.jpg", "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3179642771,1751426616&fm=26&gp=0.jpg" }; public static String getMovieUrl() { return movieImgs[random.nextInt(movieImgs.length)]; } }
[ "1107748200@qq.com" ]
1107748200@qq.com
7d075367169c27e5fe5f8d7c41fb7a559cf8ad4e
b17e74b9f0aa49586a8e4230d02cbf22ef1ebc16
/src/main/java/com/automarket/persistence/repository/CommodityCirculationJpaRepository.java
10ef0bb37bcec67721dca967f50be7fb13b5f635
[]
no_license
yuremboo/automarket
10f745bc04c168a5d82ca29b17830a19e0cec494
72f0a46ebe070784929b2b57db6b1e2329e3f17d
refs/heads/master
2021-01-18T20:20:29.003572
2017-05-26T11:36:38
2017-05-26T11:36:38
17,472,576
1
0
null
2018-03-14T17:51:53
2014-03-06T09:29:11
Java
UTF-8
Java
false
false
557
java
package com.automarket.persistence.repository; import com.automarket.entity.CommodityCirculation; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.Date; import java.util.List; @Repository public interface CommodityCirculationJpaRepository extends JpaRepository<CommodityCirculation, Long> { List<CommodityCirculation> findAllByDateBetween(Date startDate, Date endDateTime); List<CommodityCirculation> findAllByDateBetweenAndSale(Date time, Date time1, boolean isSale); }
[ "ymykhale@cisco.com" ]
ymykhale@cisco.com
a0c612f6eb47268d000787859c4db02150758ccd
83d50ec6747332ca0b8b575af221c597d059fa62
/Fuentes/SimsonsCitaAndroid/app/src/main/java/cl/inacap/simpsonscita/MainActivity.java
492d1e2013427bcd8273830f194f615c08289a6c
[]
no_license
Delvector21/SimpsonsCitaAndroid
e2dd1a1bd3c1cbbea6ebc5d997da4005c194e1f6
e94aab9cfd6a4bd6e85109fb55a7b2580a6f3753
refs/heads/main
2023-01-25T01:52:42.730231
2020-12-03T01:51:41
2020-12-03T01:51:41
315,764,302
0
1
null
null
null
null
UTF-8
Java
false
false
3,865
java
package cl.inacap.simpsonscita; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListView; import android.widget.Spinner; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; import com.google.gson.Gson; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import cl.inacap.simpsonscita.adapters.PersonajesAdapater; import cl.inacap.simpsonscita.dto.Personaje; public class MainActivity extends AppCompatActivity { private ListView personajesLv; private List<Personaje> personajes = new ArrayList<>(); private PersonajesAdapater adapter; private Spinner spin; private Button buton; private RequestQueue queue; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); this.setSupportActionBar(findViewById(R.id.toolbar)); this.spin = findViewById(R.id.spinner); this.buton = findViewById(R.id.cita_btn); this.personajesLv = findViewById(R.id.list); queue = Volley.newRequestQueue(this); Integer[] frases = new Integer[10]; for (int i=0;i<10;++i){ frases[i]=i+1; } ArrayAdapter<Integer> adapterS = new ArrayAdapter<Integer>(this, android.R.layout.simple_spinner_item, frases); adapterS.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spin.setAdapter(adapterS); this.adapter = new PersonajesAdapater(this,R.layout.personaje_list,this.personajes); this.personajesLv.setAdapter(this.adapter); this.buton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { int frases = (int) spin.getSelectedItem(); String url = "https://thesimpsonsquoteapi.glitch.me/quotes?count=" + frases; StringRequest reque = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() { @Override public void onResponse(String response) { try { personajes.clear(); Personaje[] arreglo = new Gson() .fromJson(response ,Personaje[].class); personajes.addAll(Arrays.asList(arreglo)); }catch(Exception ex){ personajes.clear(); Log.e("Personajes","Error de peticion"); }finally { adapter.notifyDataSetChanged(); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { personajes.clear(); Log.e("Personajes","Error de peticion 2"); adapter.notifyDataSetChanged(); } }); queue.add(reque); } }); } @Override protected void onResume() { super.onResume(); } }
[ "delvector@hotmail.com" ]
delvector@hotmail.com
fadcc89ca6d98a23435e657b35d05e0b030b2e91
374e71e5dbada1f988a0b45fab07f225bbd4ff06
/src/main/java/com/seasun/data/simple_report/collect/ComRead.java
e6844b3e24f6bd46b23a778dec4d9b7412a6539d
[]
no_license
xy7/simple-report
a8f626887814b5fddaa3413211a270e4d841efa9
4f5ca46e35001c8975cea8334a93c4ff10bb3325
refs/heads/master
2020-05-22T01:14:50.112827
2017-01-13T07:39:49
2017-01-13T07:39:49
58,793,528
0
0
null
null
null
null
UTF-8
Java
false
false
7,611
java
package com.seasun.data.simple_report.collect; import gnu.io.CommPortIdentifier; import gnu.io.PortInUseException; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListener; import gnu.io.UnsupportedCommOperationException; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.SocketException; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; import java.util.Enumeration; import java.util.TooManyListenersException; import java.util.concurrent.ArrayBlockingQueue; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONException; import com.alibaba.fastjson.JSONObject; @Component public class ComRead implements SerialPortEventListener, Runnable { private static final Log log = LogFactory.getLog(ComRead.class); @Autowired(required=true) @Qualifier("dataCollectApp") private EventHandle eventHandle; boolean bindSucess =false; @SuppressWarnings({"rawtypes"}) private Enumeration portList; private CommPortIdentifier portId; private InputStream inputStream; private BufferedReader reader; private long diffSecondsAvg = Long.MAX_VALUE; public void start() throws TooManyListenersException, IOException, UnsupportedCommOperationException { Thread daemon = null; while (!bindSucess){ portList = CommPortIdentifier.getPortIdentifiers(); // 得到当前连接上的端口 while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {// 判断如果端口类型是串口 log.info(portId.getName()); if (portId.getName().equals("COM4") || portId.getName().equals("COM3")) { log.info("bind " + portId.getName()); try { SerialPort serialPort = (SerialPort) portId.open("SerialReader", 2000); int rate = 256000; //波特率 int dataBits = SerialPort.DATABITS_8;//数据位 int stopBits = SerialPort.STOPBITS_1;//停止位 int parity = SerialPort.PARITY_NONE;//检验 无 serialPort.setSerialPortParams( rate, dataBits, stopBits, parity ); inputStream = serialPort.getInputStream(); reader = new BufferedReader(new InputStreamReader(inputStream), 32); daemon = startProcessThread(); new Thread(this).start(); } catch (PortInUseException e) { e.printStackTrace(); log.error("port in use"); } bindSucess = true; break; } } } try { Thread.sleep(1000); } catch (InterruptedException e) { log.error(e); } } while(true){ log.info("daemon state: " + daemon.getState()); try { Thread.sleep(1000*20); } catch (InterruptedException e) { log.error(e); } } } @Override public void serialEvent(SerialPortEvent event) { switch (event.getEventType()) { case SerialPortEvent.BI: // 10 case SerialPortEvent.OE: // 7 case SerialPortEvent.FE: // 9 case SerialPortEvent.PE: // 8 case SerialPortEvent.CD: // 6 case SerialPortEvent.CTS: // 3 case SerialPortEvent.DSR: // 4 case SerialPortEvent.RI: // 5 case SerialPortEvent.OUTPUT_BUFFER_EMPTY: // 2 break; case SerialPortEvent.DATA_AVAILABLE: // 1 readAndProcessData(); break; } } private void parsePacket(LocalDateTime time, JSONObject data) { boolean haveValidData = false; String deviceId = data.getString("deviceId"); deviceId = deviceId.substring(0, deviceId.length()<20?deviceId.length():20); if (data.containsKey("rawEeg")) { haveValidData = true; JSONArray ja = data.getJSONArray("rawEeg"); int index = 0; for(Object o:ja){ LocalDateTime timeIndex = time.plusNanos((long)index * 1000000000/512); eventHandle.rawEegEvent(timeIndex, Integer.parseInt(o.toString()), index, deviceId); index++; } } if (data.containsKey("blinkStrength")) { haveValidData = true; eventHandle.blinkEvent(time, data.getIntValue("blinkStrength"), deviceId); } if (data.containsKey("eSense")) { haveValidData = true; JSONObject esense = data.getJSONObject("eSense"); eventHandle.esenseEvent(time, esense.getIntValue("attention"), esense.getIntValue("meditation"), deviceId); } if (data.containsKey("eegPower")) { haveValidData = true; JSONObject eegPower = data.getJSONObject("eegPower"); eventHandle.eegPowerEvent(time , eegPower.getIntValue("delta"), eegPower.getIntValue("theta") , eegPower.getIntValue("lowAlpha"), eegPower.getIntValue("highAlpha") , eegPower.getIntValue("lowBeta"), eegPower.getIntValue("highBeta") , eegPower.getIntValue("lowGamma"), eegPower.getIntValue("highGamma"), deviceId); } if (data.containsKey("poorSignalLevel")) { haveValidData = true; eventHandle.poorSignalEvent(time, data.getIntValue("poorSignalLevel"), deviceId); } if (!haveValidData) { log.debug(time + " validData: " + data); } } public void monitorDelay(LocalDateTime time, JSONObject data) { //单片机接收时间 LocalDateTime scmTime = LocalDateTime.parse(data.getString("timestamp").replace(" ", "T")); if(diffSecondsAvg == Long.MAX_VALUE){ log.info("init scm time: " + scmTime + " receive time: " + time); } //单片机时钟和server时钟的差,用于监控延时变化情况 long absDiffSeconds = Math.abs(scmTime.until(time, ChronoUnit.SECONDS)); //log.info(diffSecondsAvg + "-" + absDiffSeconds); if( absDiffSeconds < diffSecondsAvg){ diffSecondsAvg = absDiffSeconds; } else if(absDiffSeconds - diffSecondsAvg > 5){ log.error("diff seconds turned more than 5 seconds, scm time: " + scmTime + " receive time: " + time); } } private ArrayBlockingQueue<JSONObject> jsonQueue = new ArrayBlockingQueue<>(4096); @Override public void run() { while(true) readAndProcessData(); } public Thread startProcessThread(){ Thread d = new Thread( new Runnable(){ @Override public void run() { log.debug("process start:"); while(true){ if(jsonQueue.size() > 0){ try { JSONObject obj = jsonQueue.take(); log.debug("process: " + obj); LocalDateTime ldt = LocalDateTime.parse( obj.getString("receive_time") ); parsePacket(ldt, obj); } catch (InterruptedException e) { log.error(e); } } } }} ); d.setDaemon(true); d.start(); return d; } public void readAndProcessData() { try { String userInput; while ((userInput = reader.readLine()) != null) { LocalDateTime ldt = LocalDateTime.now(); //log.info(ldt + " : " + userInput); if (userInput.indexOf("{") > -1) { JSONObject obj = JSON.parseObject(userInput); monitorDelay(ldt, obj); //parsePacket(ldt, obj); obj.put("receive_time", ldt.toString()); try { jsonQueue.put(obj); log.debug("put sucess: " + jsonQueue.size()); } catch (InterruptedException e) { log.error(e); } } } } catch (SocketException e) { log.error(e.toString()); } catch (IOException e) { //log.error(e.toString()); } catch (JSONException e) { log.error(e.toString()); } } }
[ "wangxiaoyang@kingsoft.com" ]
wangxiaoyang@kingsoft.com
04d673dc3d4e798601dba7a5ede07d2562372deb
2b6a23ddfb315b3bec916f04a648b0569a3a4ffa
/src/main/java/com/rafo/mjagent/mapper/agency/MenuMapper.java
2c6ed3f64f05458e27914f1c22bf05c4ac644d7d
[]
no_license
SingleLa/MjAgent_hubei
4169e42f00f7f9120bae2842aa41aed9776492d6
80d9064d50435f556b0cf42b38f198f611f1cd24
refs/heads/master
2021-01-23T19:33:59.602129
2017-09-18T10:02:01
2017-09-18T10:02:05
102,828,852
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package com.rafo.mjagent.mapper.agency; import com.rafo.mjagent.model.agency.Menu; import java.util.List; public interface MenuMapper { int deleteByPrimaryKey(Integer id); int insert(Menu record); int insertSelective(Menu record); Menu selectByPrimaryKey(Integer id); int updateByPrimaryKeySelective(Menu record); int updateByPrimaryKey(Menu record); List<Menu> selectByLevel(int level); List<Menu> selectByMene(Menu menu); }
[ "394950814@qq.com" ]
394950814@qq.com
1af9ddc79023fb7264ef61239ea34bc93cd5dbae
9233f80351870616e1b7254e0f47b638594a2449
/src/main/java/com/management/ASSIGNMENT/Repository/StudentRepository.java
755966ba047a431d6efb5097542425085768b934
[]
no_license
smartinternz02/SI-GuidedProject-5264-1628152865
1123034b437c08de6b3a7e07f36737004c29ab70
25eb864169256dbc4412d400fcdda40e191bbfd6
refs/heads/master
2023-07-12T01:50:40.405712
2021-08-11T07:12:33
2021-08-11T07:12:33
392,968,605
0
0
null
null
null
null
UTF-8
Java
false
false
300
java
package com.management.ASSIGNMENT.Repository; import org.springframework.data.jpa.repository.JpaRepository; import com.management.ASSIGNMENT.Entity.Student; public interface StudentRepository extends JpaRepository<Student, Long>{ Student findByEmail(String email); Student findById(long id); }
[ "austin.jerry2001@gmail.com" ]
austin.jerry2001@gmail.com
c2083ac7083b7f5c28abc63d5a87d944d951bc30
c3fc32403e52a1b629bced343c750dfaa983ce70
/src/main/java/io/reactiverse/sqlclient/impl/SqlClientBase.java
91888f7b1fa3d5654fea52f5d2a54bcf7259ba51
[ "Apache-2.0" ]
permissive
xp13910818313/reactive-pg-client
4ca3349a006e70f2009024e0edc6a3f2a11b8c0f
851cdaef0f59c956d699fb2c37ae420c14167958
refs/heads/master
2020-05-18T22:00:58.896691
2019-05-02T06:47:32
2019-05-02T06:47:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,306
java
/* * Copyright (C) 2017 Julien Viet * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package io.reactiverse.sqlclient.impl; import io.reactiverse.sqlclient.impl.command.CommandScheduler; import io.reactiverse.sqlclient.impl.command.ExtendedBatchQueryCommand; import io.reactiverse.sqlclient.impl.command.ExtendedQueryCommand; import io.reactiverse.sqlclient.impl.command.PrepareStatementCommand; import io.reactiverse.sqlclient.impl.command.SimpleQueryCommand; import io.reactiverse.sqlclient.SqlResult; import io.reactiverse.sqlclient.RowSet; import io.reactiverse.sqlclient.Row; import io.reactiverse.sqlclient.SqlClient; import io.reactiverse.sqlclient.Tuple; import io.vertx.core.AsyncResult; import io.vertx.core.Future; import io.vertx.core.Handler; import java.util.List; import java.util.function.Function; import java.util.stream.Collector; public abstract class SqlClientBase<C extends SqlClient> implements SqlClient, CommandScheduler { @Override public C query(String sql, Handler<AsyncResult<RowSet>> handler) { return query(sql, false, RowSetImpl.FACTORY, RowSetImpl.COLLECTOR, handler); } @Override public <R> C query(String sql, Collector<Row, ?, R> collector, Handler<AsyncResult<SqlResult<R>>> handler) { return query(sql, true, SqlResultImpl::new, collector, handler); } private <R1, R2 extends SqlResultBase<R1, R2>, R3 extends SqlResult<R1>> C query( String sql, boolean singleton, Function<R1, R2> factory, Collector<Row, ?, R1> collector, Handler<AsyncResult<R3>> handler) { SqlResultBuilder<R1, R2, R3> b = new SqlResultBuilder<>(factory, handler); schedule(new SimpleQueryCommand<>(sql, singleton, collector, b), b); return (C) this; } @Override public C preparedQuery(String sql, Tuple arguments, Handler<AsyncResult<RowSet>> handler) { return preparedQuery(sql, arguments, false, RowSetImpl.FACTORY, RowSetImpl.COLLECTOR, handler); } @Override public <R> C preparedQuery(String sql, Tuple arguments, Collector<Row, ?, R> collector, Handler<AsyncResult<SqlResult<R>>> handler) { return preparedQuery(sql, arguments, true, SqlResultImpl::new, collector, handler); } private <R1, R2 extends SqlResultBase<R1, R2>, R3 extends SqlResult<R1>> C preparedQuery( String sql, Tuple arguments, boolean singleton, Function<R1, R2> factory, Collector<Row, ?, R1> collector, Handler<AsyncResult<R3>> handler) { schedule(new PrepareStatementCommand(sql), cr -> { if (cr.succeeded()) { PreparedStatement ps = cr.result(); String msg = ps.prepare((List<Object>) arguments); if (msg != null) { handler.handle(Future.failedFuture(msg)); } else { SqlResultBuilder<R1, R2, R3> b = new SqlResultBuilder<>(factory, handler); cr.scheduler.schedule(new ExtendedQueryCommand<>(ps, arguments, singleton, collector, b), b); } } else { handler.handle(Future.failedFuture(cr.cause())); } }); return (C) this; } @Override public C preparedQuery(String sql, Handler<AsyncResult<RowSet>> handler) { return preparedQuery(sql, ArrayTuple.EMPTY, handler); } @Override public <R> C preparedQuery(String sql, Collector<Row, ?, R> collector, Handler<AsyncResult<SqlResult<R>>> handler) { return preparedQuery(sql, ArrayTuple.EMPTY, collector, handler); } @Override public C preparedBatch(String sql, List<Tuple> batch, Handler<AsyncResult<RowSet>> handler) { return preparedBatch(sql, batch, false, RowSetImpl.FACTORY, RowSetImpl.COLLECTOR, handler); } @Override public <R> C preparedBatch(String sql, List<Tuple> batch, Collector<Row, ?, R> collector, Handler<AsyncResult<SqlResult<R>>> handler) { return preparedBatch(sql, batch, true, SqlResultImpl::new, collector, handler); } private <R1, R2 extends SqlResultBase<R1, R2>, R3 extends SqlResult<R1>> C preparedBatch( String sql, List<Tuple> batch, boolean singleton, Function<R1, R2> factory, Collector<Row, ?, R1> collector, Handler<AsyncResult<R3>> handler) { schedule(new PrepareStatementCommand(sql), cr -> { if (cr.succeeded()) { PreparedStatement ps = cr.result(); for (Tuple args : batch) { String msg = ps.prepare((List<Object>) args); if (msg != null) { handler.handle(Future.failedFuture(msg)); return; } } SqlResultBuilder<R1, R2, R3> b = new SqlResultBuilder<>(factory, handler); cr.scheduler.schedule(new ExtendedBatchQueryCommand<>( ps, batch, singleton, collector, b), b); } else { handler.handle(Future.failedFuture(cr.cause())); } }); return (C) this; } }
[ "julien@julienviet.com" ]
julien@julienviet.com
476f3f2de0e327665e5419636718f8aec425a2ce
6cd4bc0cc0152339ddb62673ba2ef265d49b87f3
/src/it/algos/albergo/conto/addebitofisso/AddebitoFisso.java
9f7ea5b0a89d87e490f13d6f7f9501cb3f21bd43
[]
no_license
algos-soft/cinquestelle
aa45513dc881e1f416d9a9478aa7b84e16862ffb
ae73ac4e925ae0fea5d975c875c885b35fa3ad6d
refs/heads/master
2023-06-08T12:44:33.534035
2021-07-01T16:58:34
2021-07-01T16:58:34
382,099,945
0
0
null
null
null
null
UTF-8
Java
false
false
8,529
java
/** * Copyright(c): 2006 * Company: Algos s.r.l. * Author: gac * Date: 21 apr 2006 */ package it.algos.albergo.conto.addebitofisso; import it.algos.base.errore.Errore; import it.algos.base.interfaccia.Generale; import it.algos.base.libreria.Lib; import it.algos.base.wrapper.Campi; import it.algos.base.wrapper.Estratti; import it.algos.base.wrapper.EstrattoBase; /** * Interfaccia Pensione. * </p> * Questa interfaccia: <ul> * <li> Implementa il <i>design pattern</i> <b>Facade</b> </li> * <li> Fornisce un interfaccia unificata per un insieme di * interfacce presenti nel package</li> * <li> Mantiene la codifica del nome-chiave interno del modulo (usato nel Modello) </li> * <li> Mantiene la codifica della tavola di archivio collegata (usato nel Modello) </li> * <li> Mantiene la codifica del titolo della finestra (usato nel Navigatore) </li> * <li> Mantiene la codifica del nome del modulo come appare nel Menu Moduli * (usato nel Navigatore) </li> * <li> Mantiene la codifica delle viste (per la lista) </li> * <li> Mantiene la codifica dei set di campi (per la scheda) </li> * <li> Mantiene la codifica dei campi (per il modello e per la scheda) </li> * <li> Mantiene la codifica dei moduli (per gli altri package) </li> * <li> Mantiene altre costanti utilizzate in tutto il package </li> * <li> Dichiara (astratti) i metodi utilizzati nel package che devono * essere visti all'esterno </li> * <ul/> * * @author Guido Andrea Ceresa, Alessandro Valbonesi * @author gac * @version 1.0 / 21 apr 2006 */ public interface AddebitoFisso extends Generale { /** * Codifica del nome-chiave interno del modulo * (usato nel Modulo) */ public static final String NOME_MODULO = "AddebitoFisso"; /** * Codifica della tavola di archivio collegata * (usato nel Modello) */ public static final String NOME_TAVOLA = "addebitofisso"; /** * Codifica del titolo della finestra * (usato nel Navigatore) */ public static final String TITOLO_FINESTRA = "Addebiti giornalieri"; /** * Codifica del titolo del modulo come appare nel Menu Moduli * (usato nel Navigatore) */ public static final String TITOLO_MENU = "Addebiti giornalieri"; /** * Codifica del titolo della tabella come appare nella altre Liste * (usato nel Modello) */ public static final String TITOLO_TABELLA = NOME_TAVOLA; /** * Codifica dei navigatori aggiuntivi */ public static final String NAVIGATORE_CONTO = "navcontofisso"; /** * Classe interna Enumerazione. * <p/> * Codifica dei nomi dei campi (per il modello e per la scheda) <br> * * @see it.algos.base.wrapper.Campi */ public enum Cam implements Campi { dataInizioValidita("datainiziovalidita", "dal", "dal", "", false), dataFineValidita("datafinevalidita", "al", "al", "", false), // dataFineAddebito("datafineaddebito", "al", "al", "", false), dataSincro("datasincro", "ultimo", "ultimo", "ultimo addebito", false),; /** * nome interno del campo usato nel database. * <p/> * default il nome della Enumeration <br> */ private String nome; /** * titolo della colonna della lista. * <p/> * default il nome del campo <br> */ private String titoloColonna; /** * titolo della etichetta in scheda. * <p/> * default il nome del campo <br> */ private String etichettaScheda; /** * legenda del campo nella scheda. * <p/> * nessun default <br> */ private String legenda; /** * flag per la visibilità nella lista. * <p/> * nessun default <br> */ private boolean visibileLista; /** * Costruttore completo con parametri. * * @param nome interno del campo usato nel database * @param titoloColonna della lista * @param etichettaScheda visibile * @param legenda del campo nella scheda * @param visibileLista flag per la visibilità nella lista */ Cam(String nome, String titoloColonna, String etichettaScheda, String legenda, boolean visibileLista) { try { // prova ad eseguire il codice /* regola le variabili di istanza coi parametri */ this.setNome(nome); this.setTitoloColonna(titoloColonna); this.setEtichettaScheda(etichettaScheda); this.setLegenda(legenda); this.setVisibileLista(visibileLista); /* controllo automatico che ci sia il nome interno */ if (Lib.Testo.isVuota(nome)) { this.setNome(this.toString()); }// fine del blocco if } catch (Exception unErrore) { // intercetta l'errore Errore.crea(unErrore); }// fine del blocco try-catch } /** * Costruttore completo con parametri. * <p/> * Crea un elemento da un elemento di un'altra Enumerazione * * @param unCampo oggetto di un'altra Enum Campi */ Cam(Campi unCampo) { this(unCampo.get(), unCampo.getTitoloColonna(), unCampo.getEtichettaScheda(), unCampo.getLegenda(), unCampo.isVisibileLista()); } public String get() { return nome; } public String getNomeCompleto() { return NOME_MODULO + "." + nome; } public String getNome() { return nome; } private void setNome(String nome) { this.nome = nome; } public String getTitoloColonna() { return titoloColonna; } private void setTitoloColonna(String titoloColonna) { this.titoloColonna = titoloColonna; } public String getEtichettaScheda() { return etichettaScheda; } private void setEtichettaScheda(String etichettaScheda) { this.etichettaScheda = etichettaScheda; } public String getLegenda() { return legenda; } private void setLegenda(String legenda) { this.legenda = legenda; } public boolean isVisibileLista() { return visibileLista; } private void setVisibileLista(boolean visibileLista) { this.visibileLista = visibileLista; } }// fine della classe /** * Codifica delle Viste del modulo. */ public enum Vis { vistaConto(); public String get() { return toString(); } }// fine della classe /** * Classe interna Enumerazione. * <p/> * Codifica degli estratti pubblici disponibili all'esterno del modulo * (ATTENZIONE - gli oggetti sono di classe Estratto) * * @see it.algos.base.wrapper.EstrattoBase * @see it.algos.base.wrapper.EstrattoBase.Tipo * @see it.algos.base.wrapper.Estratti */ public enum Estratto implements Estratti { descrizione(EstrattoBase.Tipo.stringa), sigla(EstrattoBase.Tipo.stringa); /** * tipo di estratto utilizzato */ private EstrattoBase.Tipo tipoEstratto; /** * modulo di riferimento */ private static String nomeModulo = NOME_MODULO; /** * Costruttore completo con parametri. * * @param tipoEstratto utilizzato */ Estratto(EstrattoBase.Tipo tipoEstratto) { try { // prova ad eseguire il codice /* regola le variabili di istanza coi parametri */ this.setTipo(tipoEstratto); } catch (Exception unErrore) { // intercetta l'errore Errore.crea(unErrore); }// fine del blocco try-catch } public EstrattoBase.Tipo getTipo() { return tipoEstratto; } private void setTipo(EstrattoBase.Tipo tipoEstratto) { this.tipoEstratto = tipoEstratto; } public String getNomeModulo() { return nomeModulo; } }// fine della classe } // fine della classe
[ "algos12" ]
algos12
3f47bec5669cca528d159a8e59b0d7ba04cd5d1e
5b1aa171fa6c027bb3dd83ade8a77d1006f52eec
/ecommerce-springboot-rest/src/main/java/kr/ac/hansung/cse/ecommercespringrest/service/ProductService.java
131f98e3cbdcdbab42fbd8788b20bf99bd301a71
[ "MIT" ]
permissive
reader-wh94/Web-framework
f7e8aa92acc4e244b25e4b2f35da417d6f3a2e97
d2d83c56a61857e7433f1afb4d6c0a295e56f9fd
refs/heads/master
2023-06-27T17:27:09.686076
2021-08-01T12:22:57
2021-08-01T12:22:57
348,761,090
0
0
null
null
null
null
UTF-8
Java
false
false
2,211
java
package kr.ac.hansung.cse.ecommercespringrest.service; import kr.ac.hansung.cse.ecommercespringrest.entity.Category; import kr.ac.hansung.cse.ecommercespringrest.entity.Product; import java.util.List; import java.util.Optional; public interface ProductService { /** * Gets all products present in the system. * The result is paginated. * * @return the paginated results */ List<Product> getAllProducts(); /** * Gets a specific product by looking for its id. * * @param id the id of the product to look for * @return the product (if any) */ Optional<Product> getProductById(Long id); /** * Creates a product. * If the currency is not 'EUR' then a Currency Exchange * will be performed. * * @param name the name of the product * @param price the price of the product * @return the new product */ Product createProduct(String name, double price); /** * Updates an existing product. * If the currency is not 'EUR' then a Currency Exchange * will be performed. * * @param product the product to update * @param name the new product name * @param price the new product price */ void updateProduct(Product product, String name, double price); /** * Deletes a product in the system. * * @param product the product to delete */ void deleteProduct(Product product); /** * Checks whether the product has a given category. * * @param product the product to check * @param category the category to check * @return true if the product is associated to the category */ boolean hasCategory(Product product, Category category); /** * Adds a category to the product. * * @param product the product to add the category to * @param category the category to add */ void addCategory(Product product, Category category); /** * Removes a category from the product. * * @param product the product to remove the category from * @param category the category to remove */ void removeCategory(Product product, Category category); }
[ "sstt9884@gmail.com" ]
sstt9884@gmail.com
830a69222c7727ca64882c5d0e0760da34fa099d
60de4bdcbaa55dfa0312b2cdb3e52c6067b8e575
/src/conexiondb/ConexionODBC.java
1e78831a81ec712967c03333c53d570b1450a3cc
[]
no_license
6regorio/Conexion-db
72caa4b023949d2fafa295c91fc0229ac11151b8
d1a818aab82d26c17bfb248725fd4bd6c09e64c4
refs/heads/master
2023-04-26T14:31:28.590659
2019-01-18T21:04:35
2019-01-18T21:04:35
278,465,577
0
1
null
2022-04-02T05:11:49
2020-07-09T20:36:21
null
UTF-8
Java
false
false
186
java
package conexiondb; public class ConexionODBC extends ConexionDB { public ConexionODBC() { super("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:MYSQL_ODBC"); } }
[ "30374642+DiscoDurodeRoer@users.noreply.github.com" ]
30374642+DiscoDurodeRoer@users.noreply.github.com
b3c01e41d848d57c1ee9f70f5bf867a574c14e58
6f5a4d2f99a3ac8081c1afd54a2558bc1ff880fe
/codesignal/src/main/java/Arcade/Intro/The_Journey_Begins/AddClass.java
0cc00bfefd76be9430c5d871c0af34ce614c38b3
[]
no_license
tvttavares/competitive-programming
19a43154813db7a28c4701413e06f7ab16b841c5
6fc6033832a1e725a901fadae765439ec30eac30
refs/heads/master
2022-06-30T03:00:16.359238
2022-05-26T01:18:10
2022-05-26T01:18:10
209,412,704
0
0
null
null
null
null
UTF-8
Java
false
false
162
java
package Arcade.Intro.The_Journey_Begins; public class AddClass { public static int add(int param1, int param2) { return param1 + param2; } }
[ "tvttavares@gmail.com" ]
tvttavares@gmail.com
61a565da7cba691fdc97e83ae2378da879d4a350
9f83ff7e601a3947a539a1feaadf6fdfc43083d0
/MiniTikTok/app/src/main/java/com/example/minitiktok/MainActivity.java
c4fe47d5c5c8bd1f304fa320f1b62f9b1f8c7f83
[]
no_license
longxiang-ai/MiniTikTok
6f06c60dd2144853259e2a78e3179d273146f35c
d8b0718d9c712646f63189b0a4b0047620720af3
refs/heads/master
2023-06-25T20:40:05.853048
2021-07-21T07:26:39
2021-07-21T07:26:39
387,481,199
0
0
null
null
null
null
UTF-8
Java
false
false
6,636
java
package com.example.minitiktok; import androidx.annotation.RequiresApi; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.DefaultItemAnimator; import androidx.recyclerview.widget.DividerItemDecoration; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.util.Log; import android.view.View; import android.widget.ImageButton; import android.widget.Toast; import com.example.minitiktok.ui.data.CoverData; import com.example.minitiktok.ui.data.CoverDataSet; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.StandardCharsets; import static com.example.minitiktok.Constants.BASE_URL; public class MainActivity extends AppCompatActivity implements MyAdapter.IOnItemClickListener{ protected ImageButton btn_post; protected ImageButton btn_search; private static final String TAG = "MainActivity"; private RecyclerView recyclerView; private MyAdapter mAdapter; private RecyclerView.LayoutManager layoutManager; private GridLayoutManager gridLayoutManager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initView(); } private void initView() { initButtons(); //获取实例 recyclerView = findViewById(R.id.recycler); //更改数据时不会变更宽高 recyclerView.setHasFixedSize(true); //创建线性布局管理器 layoutManager = new LinearLayoutManager(this); //创建格网布局管理器 gridLayoutManager = new GridLayoutManager(this, 2); //设置布局管理器 recyclerView.setLayoutManager(layoutManager); //创建Adapter mAdapter = new MyAdapter(CoverDataSet.getData()); //设置Adapter每个item的点击事件 mAdapter.setOnItemClickListener(this); //设置Adapter recyclerView.setAdapter(mAdapter); //分割线 // LinearItemDecoration itemDecoration = new LinearItemDecoration(Color.BLUE); // recyclerView.addItemDecoration(itemDecoration); recyclerView.addItemDecoration(new DividerItemDecoration(this, LinearLayoutManager.VERTICAL)); //动画 DefaultItemAnimator animator = new DefaultItemAnimator(); animator.setAddDuration(3000); recyclerView.setItemAnimator(animator); // ----------------------------拉取信息------------------- getData(null); } private void initButtons() { btn_post = findViewById(R.id.btn_post); btn_post.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(MainActivity.this,PostActivity.class); Log.d(TAG,"跳转至PostActivity"); startActivity(intent); } }); btn_search = findViewById(R.id.btn_search); btn_search.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(MainActivity.this,SearchActivity.class); Log.d(TAG,"跳转至SearchActivity"); startActivity(intent); } }); } @Override public void onItemCLick(int position, CoverData data) { Toast.makeText(MainActivity.this, "点击了第" + position + "条", Toast.LENGTH_SHORT).show(); // mAdapter.addData(position + 1, new CoverData("新增头条", "0w")); } @Override public void onItemLongCLick(int position, CoverData data) { Toast.makeText(MainActivity.this, "长按了第" + position + "条", Toast.LENGTH_SHORT).show(); // mAdapter.removeData(position); } private void getData(String studentId){ Log.i("getData","尝试获取Data1"); new Thread(new Runnable() { @Override public void run() { Log.i("getData","尝试获取Data2"); final VideoListResponse response = getDataFromInternet(studentId); if(response != null) { new Handler(getMainLooper()).post(new Runnable() { @Override public void run() { mAdapter.setData(response.feeds); } }); } } }).start(); } // TODO 用HttpUrlConnection获取数据 private VideoListResponse getDataFromInternet(String studentId) { Log.i("getDataFromInternet","尝试获取Internet Data,StudentID="+studentId); String urlStr; if (studentId != null) { urlStr = BASE_URL+"/video"+"?student_id="+studentId; } else { urlStr = BASE_URL+"/video"; } VideoListResponse result = null; try { URL url = new URL(urlStr); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setConnectTimeout(5000); conn.setRequestMethod("GET"); conn.setRequestProperty("accept",Constants.token); if (conn.getResponseCode() == 200) { InputStream in = conn.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8)); result = new Gson().fromJson(reader, new TypeToken<VideoListResponse>(){}.getType()); reader.close(); in.close(); } else { Exception exception = new Exception("网络未知错误"); conn.disconnect(); throw exception; } conn.disconnect(); } catch (Exception e) { e.printStackTrace(); runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(MainActivity.this, "网络异常" + e.toString(), Toast.LENGTH_SHORT).show(); } }); } return result; } }
[ "1425507157@qq.com" ]
1425507157@qq.com
40d7bb436108e2bbd711e4b7eb965100a47e4002
88f38489333aa2288962f488a6b0ba83151ec932
/Server/src/main/java/pong/contact/PaddleBallPair.java
2480f4cdbfb6a2fb6ea798d6ac6a2d9f0abe4229
[]
no_license
Pong-The-Moba/Pong-Server
00447378b0be3dcbb4b8387f9b130de99d8d3d0e
09f6b4d40a1d2d26218733da117f09b28d3179bf
refs/heads/master
2016-09-06T21:51:57.671257
2014-08-03T19:26:07
2014-08-03T19:26:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,419
java
package pong.contact; import org.jbox2d.callbacks.ContactImpulse; import org.jbox2d.collision.Manifold; import org.jbox2d.dynamics.contacts.Contact; import pong.Pong; import shapes.PongShape; import sounds.BounceSound; import utils.Debugger; /** * Created by sihrc on 7/9/14. */ public class PaddleBallPair extends ContactPair { /** * Debbie * */ Debugger debbie = new Debugger(PaddleBallPair.class.getSimpleName()); /** * Super Constructor * * @param shapeA - Contact Shape A * @param shapeB - Contact SHape B * @param pong* */ public PaddleBallPair(PongShape shapeA, PongShape shapeB, Pong pong) { super(shapeA, shapeB, pong); } @Override public void beginContactI(Contact contact) { debbie.d("Begin Contact 1"); } @Override public void preSolveII(Contact contact, Manifold oldManifold) { debbie.d("Presolve 2"); } @Override public void postSolveIII(Contact contact, ContactImpulse impulse) { debbie.d("postSolve 3"); float impulse0 = impulse.normalImpulses[0]; float impulse1 = impulse.normalImpulses[1]; float imp = impulse0 > impulse1 ? impulse0 : impulse1; imp = imp > 1 ? 1 : imp; pong.addNonPersistent(new BounceSound(imp)); } @Override public void endContactIV(Contact contact) { debbie.d("endContact IV"); } }
[ "sihrc.c.lee@gmail.com" ]
sihrc.c.lee@gmail.com
75b0f06ce40ddda739a5b4454e02517a7109ed08
088e574f7ae722cc884bc390b443bff316a603fd
/app/src/main/java/gemini/griocodechallenge/comparator/GithubRepoListComparator.java
da4a1618f8628dfd85165f10340d1f14360ab886
[]
no_license
geminihsu/GrioCodeChallenge
657c4782f43d217a624845f8b55b7fad3b833b82
74f443ff4b7358429375fbf395c25d2c2e2c425c
refs/heads/master
2021-01-22T15:59:04.186210
2017-09-06T06:46:03
2017-09-06T06:46:03
102,383,959
0
0
null
null
null
null
UTF-8
Java
false
false
409
java
package gemini.griocodechallenge.comparator; import java.util.Comparator; import gemini.griocodechallenge.model.GithubRepoList; /** * Created by geminihsu on 05/09/2017. */ public class GithubRepoListComparator implements Comparator<GithubRepoList> { public int compare(GithubRepoList chair1, GithubRepoList chair2) { return chair2.getStargazers_count() - chair1.getStargazers_count(); } }
[ "gemini612gemini@gmail.com" ]
gemini612gemini@gmail.com
ed0f167ad00ffdfb2d25b9ad3b64af195b14f932
45cf72bd0ad1664a7ecede8c3c4856e850fe105f
/codeSamples/TestAppSample/app/src/androidTest/java/testappsample/curso/com/testappsample/MainActivityTest.java
b897ad95d1e0e174455e570d6dd45a7740678f88
[]
no_license
wjab/android
e3552bb9c1de2e8bef2eb64ba412f8fdfa1f6818
eff86f2ffc3f1fec300ea6c70851196c5d562ee6
refs/heads/master
2021-08-31T09:12:13.480741
2017-12-20T21:37:39
2017-12-20T21:37:39
108,690,179
0
3
null
2017-11-15T16:48:08
2017-10-28T22:59:09
Java
UTF-8
Java
false
false
1,331
java
package testappsample.curso.com.testappsample; import android.support.test.rule.ActivityTestRule; import android.view.View; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import static org.junit.Assert.*; /** * Created by Administrador on 6/12/2017. */ public class MainActivityTest { @Rule public ActivityTestRule<MainActivity> activityActivityTestRule = new ActivityTestRule<MainActivity>(MainActivity.class); private MainActivity mainActivity = null; @Before public void setUp() throws Exception { mainActivity = activityActivityTestRule.getActivity(); } @Test public void testLaunch() { boolean result = false; View view = mainActivity.findViewById(R.id.user); assertNotNull(view); assertFalse(activityActivityTestRule.getActivity().CheckLogin("user1", "pass1")); assertTrue(activityActivityTestRule.getActivity().CheckLogin("walter", "admin")); } @Test public void LoginFail() { String[] array = new String[]{"walter", "admin"}; View user = mainActivity.findViewById(R.id.user); View password = mainActivity.findViewById(R.id.password); } @After public void tearDown() throws Exception { mainActivity = null; } }
[ "walter@centaurosolutions.com" ]
walter@centaurosolutions.com
53406fca70a8c8cd2f0cfb7c90b14f9c5a08a797
20dab15afc141def8f64a097a99f9a8a8a1f865b
/back/src/main/java/com/wedding/mapper/Date_applyMapper.java
cdb9c4e11ca06ab378b834d4255676a49bebddc4
[]
no_license
161250114/wedding-ceremony
c689cceb880ebe125e4e4a431397af4a08040553
29c3ef22c03000a5d22766f63eafceab1109b9fd
refs/heads/master
2022-07-03T11:05:19.789820
2020-06-16T03:14:24
2020-06-16T03:14:24
251,213,528
1
2
null
2022-06-21T03:09:44
2020-03-30T05:49:40
Java
UTF-8
Java
false
false
506
java
package com.wedding.mapper; import com.wedding.model.po.Date_apply; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface Date_applyMapper { int deleteByPrimaryKey(Integer id); int insert(Date_apply record); Date_apply selectByPrimaryKey(Integer id); List<Date_apply> selectAll(); int updateByPrimaryKey(Date_apply record); List<Date_apply> selectByUserid1(int userid1); List<Date_apply> selectByUserid2(int userid2); }
[ "1422145612@qq.com" ]
1422145612@qq.com
d1e1becefee3fb4880bf1be91c6534ea977394b9
36025757f89553bb264f8031a554561bb89161e2
/Garageproject/src/Garage_service/customer_homepage.java
9c6905dbb47d9aa3b3205af1257c705df39ad673
[]
no_license
ratibmahid/Garage-Service-Management
08531229bb6a98287bdc2c02bc792c4fe7ce293f
3cbf21a54bb3ce2b7e0b828df4f5a21ee5df7a7f
refs/heads/main
2023-01-28T15:46:41.478796
2020-12-12T16:37:57
2020-12-12T16:37:57
320,330,168
0
0
null
null
null
null
UTF-8
Java
false
false
8,038
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 Garage_service; /** * * @author Hp */ public class customer_homepage extends javax.swing.JFrame { /** * Creates new form customer_homepage */ public customer_homepage() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { SERVICEBUTTON = new javax.swing.JButton(); VIEWBUTTON = new javax.swing.JButton(); UPDATEBUTTON = new javax.swing.JButton(); EXITBUTTON = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); SERVICEBUTTON.setText("1. SERVICE"); VIEWBUTTON.setText(" 2. VIEW INFORMATION"); VIEWBUTTON.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { VIEWBUTTONActionPerformed(evt); } }); UPDATEBUTTON.setText("3. UPDATE INFORMATION"); EXITBUTTON.setText("EXIT"); jLabel1.setText(" WELCOME"); jLabel2.setText(" TO"); jLabel3.setText("CLIENT HOME PAGE"); jLabel4.setText("GARAGE SERVICE MANAGEMENT"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(27, 27, 27) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(UPDATEBUTTON, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(VIEWBUTTON, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(SERVICEBUTTON, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addGap(145, 145, 145) .addComponent(EXITBUTTON, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(133, 133, 133) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(0, 37, Short.MAX_VALUE))) .addContainerGap(98, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel3) .addGap(23, 23, 23) .addComponent(jLabel4) .addGap(40, 40, 40) .addComponent(SERVICEBUTTON) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(VIEWBUTTON) .addGap(18, 18, 18) .addComponent(UPDATEBUTTON) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 38, Short.MAX_VALUE) .addComponent(EXITBUTTON) .addGap(29, 29, 29)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void VIEWBUTTONActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_VIEWBUTTONActionPerformed // TODO add your handling code here: }//GEN-LAST:event_VIEWBUTTONActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(customer_homepage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(customer_homepage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(customer_homepage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(customer_homepage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new customer_homepage().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton EXITBUTTON; private javax.swing.JButton SERVICEBUTTON; private javax.swing.JButton UPDATEBUTTON; private javax.swing.JButton VIEWBUTTON; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; // End of variables declaration//GEN-END:variables }
[ "ratib.mahid1997@gmail.com" ]
ratib.mahid1997@gmail.com
668790851dc535383cb6b85d739f3c672d514694
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/4.0.0/management-agent/management-tsa-impl/src/main/java/com/terracotta/management/resource/services/LogsResourceServiceImpl.java
9499a284363049d4e83a77d938b4dd97036f3c1d
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
2,192
java
/* * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. */ package com.terracotta.management.resource.services; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.terracotta.management.ServiceExecutionException; import org.terracotta.management.ServiceLocator; import org.terracotta.management.resource.exceptions.ResourceRuntimeException; import org.terracotta.management.resource.services.validator.RequestValidator; import com.terracotta.management.resource.LogEntity; import com.terracotta.management.resource.services.validator.TSARequestValidator; import com.terracotta.management.service.LogsService; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.Set; import javax.ws.rs.Path; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; /** * @author Ludovic Orban */ @Path("/agents/logs") public class LogsResourceServiceImpl implements LogsResourceService { private static final Logger LOG = LoggerFactory.getLogger(LogsResourceServiceImpl.class); private final LogsService logsService; private final RequestValidator requestValidator; public LogsResourceServiceImpl() { this.logsService = ServiceLocator.locate(LogsService.class); this.requestValidator = ServiceLocator.locate(TSARequestValidator.class); } @Override public Collection<LogEntity> getLogs(UriInfo info) { LOG.debug(String.format("Invoking LogsResourceServiceImpl.getLogs: %s", info.getRequestUri())); requestValidator.validateSafe(info); try { String names = info.getPathSegments().get(1).getMatrixParameters().getFirst("names"); Set<String> serverNames = names == null ? null : new HashSet<String>(Arrays.asList(names.split(","))); MultivaluedMap<String, String> qParams = info.getQueryParameters(); String sinceWhen = qParams.getFirst(ATTR_QUERY_KEY); return logsService.getLogs(serverNames, sinceWhen); } catch (ServiceExecutionException see) { throw new ResourceRuntimeException("Failed to get TSA logs", see, Response.Status.BAD_REQUEST.getStatusCode()); } } }
[ "cruise@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
cruise@7fc7bbf3-cf45-46d4-be06-341739edd864
49d295a4147e3b545a4f0f5e1ed90b753e582350
e6ed8dd86a0c37eea1cd748ddc68d90881b0cb36
/kodilla-hibernate/src/main/java/com/kodilla/hibernate/task/Task.java
3edfb344697fc2918313890fa23b49676d91a821
[]
no_license
aleksandramaria/aleksandra-ksiazek-kodilla-java
c2e8f4be105537be2061e85945c1d3794046ee78
8113e8b48cfcdc4b8e128fb60340fda9a951d789
refs/heads/master
2021-07-08T23:08:46.944440
2018-03-29T15:21:42
2018-03-29T15:21:42
96,104,179
0
1
null
null
null
null
UTF-8
Java
false
false
2,639
java
package com.kodilla.hibernate.task; import com.kodilla.hibernate.tasklist.TaskList; import javax.persistence.*; import javax.validation.constraints.NotNull; import java.util.Date; @NamedQueries ({ @NamedQuery( name = "Task.retrieveLongTasks", query = "FROM Task WHERE duration > 10" ), @NamedQuery( name = "Task.retrieveShortTasks", query = "FROM Task WHERE duration <= 10" ), @NamedQuery( name = "Task.retrieveTasksWithDurationLongerThan", query = "FROM Task WHERE duration > :DURATION" ) }) @NamedNativeQuery( name = "Task.retrieveTasksWithEnoughTime", query = "SELECT * FROM TASKS WHERE DATEDIFF(DATE_ADD(CREATED, INTERVAL DURATION DAY), NOW()) > 5", resultClass = Task.class ) @Entity @Table(name = "TASKS") public final class Task { private int id; private String description; private Date created; private int duration; private TaskFinancialDetails taskFinancialDetails; private TaskList taskList; public Task() { } public Task(String description, int duration) { this.description = description; this.created = new Date(); this.duration = duration; } @Id @GeneratedValue @NotNull @Column(name = "ID", unique = true) public int getId() { return id; } @Column(name = "DESCRIPTION") public String getDescription() { return description; } @NotNull @Column(name="CREATED") public Date getCreated() { return created; } @Column(name="DURATION") public int getDuration() { return duration; } @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn(name = "TASKS_FINANCIALS_ID") public TaskFinancialDetails getTaskFinancialDetails() { return taskFinancialDetails; } @ManyToOne @JoinColumn(name = "TASKLIST_ID") public TaskList getTaskList() { return taskList; } public void setTaskList(TaskList taskList) { this.taskList = taskList; } private void setId(int id) { this.id = id; } private void setDescription(String description) { this.description = description; } private void setCreated(Date created) { this.created = created; } private void setDuration(int duration) { this.duration = duration; } public void setTaskFinancialDetails(TaskFinancialDetails taskFinancialDetails) { this.taskFinancialDetails = taskFinancialDetails; } }
[ "ola.ksi@gmail.com" ]
ola.ksi@gmail.com
1c4d685b58dbeb457303470115470e9a58c8f032
573b9c497f644aeefd5c05def17315f497bd9536
/src/main/java/com/alipay/api/domain/MEquityValidInfo.java
2ed70aeef730ba631c0ec1daa831227408d85943
[ "Apache-2.0" ]
permissive
zzzyw-work/alipay-sdk-java-all
44d72874f95cd70ca42083b927a31a277694b672
294cc314cd40f5446a0f7f10acbb5e9740c9cce4
refs/heads/master
2022-04-15T21:17:33.204840
2020-04-14T12:17:20
2020-04-14T12:17:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,569
java
package com.alipay.api.domain; import java.util.Date; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 权益有效期信息对象 * * @author auto create * @since 1.0, 2019-01-08 09:38:56 */ public class MEquityValidInfo extends AlipayObject { private static final long serialVersionUID = 3868898774637475696L; /** * 延迟生效时间(单位分钟);延迟生效时间取值范围1~99999的整数,注意:仅当effect_type=DELAY时,该值起作用 */ @ApiField("delay_minutes") private Long delayMinutes; /** * 券生效方式,当券有效期为绝对时间(FIXED)时,只能设置IMMEDIATELY,枚举取值:立即生效:IMMEDIATELY,延迟生效:DELAY */ @ApiField("effect_type") private String effectType; /** * 权益结束时间,有效期类型valid_type为FIXED绝对方式时必填且仅当FIXED类型,该值可用,格式:yyyy-MM-dd HH:mm:ss */ @ApiField("end_date") private Date endDate; /** * 描述了券相对领取后多少分钟有效,取值必须1~99999的整数,有效期类型valid_type为RELATIVE时必填且仅当RELATIVE值时该值起作用 */ @ApiField("relative_minutes") private Long relativeMinutes; /** * 权益开始时间,有效期类型valid_type为FIXED绝对方式时必填且仅当FIXED类型,该值可用,格式:yyyy-MM-dd HH:mm:ss */ @ApiField("start_date") private Date startDate; /** * 有效期类型,支持枚举值:绝对方式:FIXED、相对方式:RELATIVE */ @ApiField("valid_type") private String validType; public Long getDelayMinutes() { return this.delayMinutes; } public void setDelayMinutes(Long delayMinutes) { this.delayMinutes = delayMinutes; } public String getEffectType() { return this.effectType; } public void setEffectType(String effectType) { this.effectType = effectType; } public Date getEndDate() { return this.endDate; } public void setEndDate(Date endDate) { this.endDate = endDate; } public Long getRelativeMinutes() { return this.relativeMinutes; } public void setRelativeMinutes(Long relativeMinutes) { this.relativeMinutes = relativeMinutes; } public Date getStartDate() { return this.startDate; } public void setStartDate(Date startDate) { this.startDate = startDate; } public String getValidType() { return this.validType; } public void setValidType(String validType) { this.validType = validType; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
6c51c4f606d717484a225209bc055d23e553b985
f85043140c2b23ac5119765c33679dd409d41a9d
/Java/src/programlist/StringReverseWord.java
94e9b6f8d091f6ad6e68b1c7c4ed4b0fbc44b4cf
[]
no_license
susanjoshy/TestingCode
666e74f8616943c37d073831f2bbe63fcda9fbb8
5000d37beb67d5faa1c4e414431d340143a0a986
refs/heads/master
2020-04-06T07:01:54.423457
2016-08-18T18:51:23
2016-08-18T18:51:23
44,630,997
0
0
null
null
null
null
UTF-8
Java
false
false
509
java
// Write a program to reverse each individual word in a sentence. package programlist; public class StringReverseWord { public static void main(String[] args) { String s="hello world maria"; System.out.println("the orginal string is: "+s); String reverse=""; String arr1[]=s.split(" "); for(int i=0;i<arr1.length;i++) System.out.println(arr1[i]); for(int i=arr1.length-1;i>=0;i--){ reverse.concat(" "); reverse=reverse+arr1[i]; } System.out.println("reversed words :"+reverse); } }
[ "susanjoshy@hotmail.com" ]
susanjoshy@hotmail.com
5260b4008ca99c8fa49e3b6703cec61a015c5ea8
2afacf8b618292b05de382aba0f39d62525ec89d
/MyApplication/src/ControlFluxIf.java
0d2ac28e3e31e622447ba0fe6274210ccbb59315
[]
no_license
TREQA/NegoescuVlad
e33d96ba1df1dfaf53130a36b59ffb8d7f43e33b
7b40d7edeeedaab292a2593a49d52281bb7279aa
refs/heads/master
2021-08-26T08:36:51.344541
2017-11-22T15:41:52
2017-11-22T15:41:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
204
java
package com.company; public class ControlFluxIf { public static void main(String[] args){ int x=0; if (x>0){ System.out.println(x); x=3; } } }
[ "vlad.negoescu@tremend.com" ]
vlad.negoescu@tremend.com
5f5f9e114ec9a057511bb22b028443645289084f
2f5431aa126774936d18a4bd7cf5bb9cf0eb0856
/animations/src/main/java/com/guigarage/animations/transitions/DurationBasedTransition.java
8f1a69119c819bdfbf245bbfb9e9c8d1b840fd62
[]
no_license
omatei01/javafx-collection
5d9313294993be09dee917333f882d9d1a59fb13
124fd5672653d41bad91b0d2f68288f5f39a15c0
refs/heads/master
2021-01-23T09:35:32.452053
2015-07-09T08:55:58
2015-07-09T08:55:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
282
java
package com.guigarage.animations.transitions; import javafx.animation.Transition; import javafx.util.Duration; public abstract class DurationBasedTransition extends Transition { public DurationBasedTransition(Duration duration) { setCycleDuration(duration); } }
[ "hendrik.ebbers@web.de" ]
hendrik.ebbers@web.de
0559d8fc09192f9c5d16bc76ba8b46eb752fa895
a8728dd2e44735e8779e759a7e68cba2e0dbae3b
/JAVA/24_Thread/src/thread/step4/test/InputThreadTest1.java
98391bdc558b60a4a11f386a2783e057264e87ae
[]
no_license
qkqwof/encore
8a90705cb037d48302f07154a2dd80757f35db82
7a8833cbae714ca2dbce0e30fde663b829e61149
refs/heads/master
2023-04-28T21:01:40.619872
2021-05-22T12:06:04
2021-05-22T12:06:04
350,820,827
0
0
null
null
null
null
UHC
Java
false
false
816
java
package thread.step4.test; import javax.swing.JOptionPane; /* * 메인쓰레드만 가동되는 로직을 작성 * 동시작업(병렬적인 작업)처리가 안된다. * * 로또번호를 입력받는 작업 * + * 카운팅을 하는 작업 * --> 10초 안에 최종적으로 로또번호를 입력!!! */ public class InputThreadTest1 { public static void main(String[] args) { //1.데이터 입력...작업..GUI String input = JOptionPane.showInputDialog("최종 로또 번호 마지막자리 숫자를 입력하세요.."); System.out.println("입력한 숫자는 " + input + "입니다."); //2.일종의 카운팅 작업...10,9,8,7,6,...,1 for(int i=10;i>=1;i--) { try { Thread.sleep(1000); }catch(InterruptedException e) { } System.out.println(i); } } }
[ "qkqwof@yonsei.ac.kr" ]
qkqwof@yonsei.ac.kr
3bee89f4e4156402ee0b6210212cb7701a67229a
82fc2ae6d7930076180612e2bdea26bbf8f4dda9
/src/at/mikemitterer/nasdaq100/view/about/AboutFragment.java
67631dfd31d3522ed272d5f77cc234edef013011
[ "Apache-2.0" ]
permissive
MikeMitterer/Nasdaq100
6127834cd1f07bdac35c0b9047c8ebf77cc04854
d5135dc0348e46b1f0cc9290cd896e91778869fb
refs/heads/master
2016-09-05T13:21:18.676195
2013-01-31T16:55:07
2013-01-31T16:55:07
6,440,815
2
1
null
null
null
null
UTF-8
Java
false
false
2,396
java
package at.mikemitterer.nasdaq100.view.about; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import roboguice.inject.InjectView; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.os.Bundle; import android.view.View; import android.widget.TextView; import at.mikemitterer.nasdaq100.R; import com.github.rtyley.android.sherlock.roboguice.fragment.RoboSherlockDialogFragment; import com.google.inject.Inject; /** * @see <a href="http://mobile.tutsplus.com/tutorials/android/android-sdk_working-with-dialogs/">Working With Dialogs</a> * @author mikemitterer * */ public class AboutFragment extends RoboSherlockDialogFragment { private static Logger logger = LoggerFactory.getLogger(AboutFragment.class.getSimpleName()); @InjectView(R.id.version) protected TextView version; @Inject protected Activity activity; // @Override // public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) { // view = inflater.inflate(R.layout.about_fragment, container, false); // //final Dialog dialog = getDialog(); // // //dialog.setTitle(R.string.about_title); // // final String versionFromManifest = getArguments().getString("version"); // version.setText(versionFromManifest); // // return view; // } @Override public Dialog onCreateDialog(final Bundle savedInstanceState) { final AlertDialog.Builder builder = new AlertDialog.Builder(activity); // Very important if you want to set the icon - otherwise the whole thing crashes final View view = activity.getLayoutInflater().inflate(R.layout.about_fragment, null); final Dialog dialog = builder .setView(view) .setTitle(R.string.about_title) .setIcon(R.drawable.icon) .setPositiveButton(R.string.about_close, new DialogInterface.OnClickListener() { @Override public void onClick(final DialogInterface dialog, final int which) { //AboutFragment.this.dismiss(); logger.debug("DialogFragment closed..."); } }) .create(); return dialog; } @Override public void onViewCreated(final View view, final Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); final String versionFromManifest = getArguments().getString("version"); version.setText(versionFromManifest); } }
[ "office@mikemitterer.at" ]
office@mikemitterer.at
a443b2e07206322daf1dce4de4f181ad085789ae
d0eb99dffd77941c611df48605448b835ad11a67
/src/main/java/ar/gob/ambiente/sacvefor/controlverificacion/cgl/client/GuiaLocalClient.java
cce678b1364f57fac71651a72f0a244be1ba58a8
[]
no_license
rizoma-forestal/scvf-ccv
6c3146f3c7dcfbb8a3c4a5bed321397bd02208f7
207c43b6f66c6016ba7ff1edd536324bb97a31b7
refs/heads/master
2021-07-24T02:13:30.013921
2018-07-31T17:53:35
2018-07-31T17:53:35
100,499,990
0
0
null
null
null
null
UTF-8
Java
false
false
13,585
java
package ar.gob.ambiente.sacvefor.controlverificacion.cgl.client; import javax.ws.rs.ClientErrorException; import javax.ws.rs.client.Client; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.Response; /** * Cliente REST Jersey generado para el recurso GuiaFacadeREST de la API de Gestión Local [guias]<br> * USAGE: * <pre> * GuiaLocalClient client = new GuiaLocalClient(); * Object response = client.XXX(...); * // do whatever with response * client.close(); * </pre> * Cliente para la entidad Guía del API REST del Componente de Gestión Local (CGL) que corresponda * @author rincostante */ public class GuiaLocalClient { /** * Variable privada: WebTarget path de acceso a la API específica de Centros poblados */ private WebTarget webTarget; /** * Variable privada: Client cliente a setear a partir de webTarget */ private Client client; /** * Variable privada: String url general de acceso al servicio según el componente local al cual se consulta. */ private String base_uri; /** * Constructor que instancia el cliente y el webTarget. * @param baseUri String url de acceso a la API del componente local que corresponda */ public GuiaLocalClient(String baseUri) { base_uri = baseUri; client = javax.ws.rs.client.ClientBuilder.newClient(); webTarget = client.target(base_uri).path("guias"); } public String countREST() throws ClientErrorException { WebTarget resource = webTarget; resource = resource.path("count"); return resource.request(javax.ws.rs.core.MediaType.TEXT_PLAIN).get(String.class); } /** * Método para editar una Guía de un Componente local según su id en formato XML * PUT /guias/:id * @param requestEntity ar.gob.ambiente.sacvefor.servicios.cgl.Guia Entidad Guía para encapsular los datos de la Guía que se quiere editar * @param id String id de la Guía que se quier editar * @param token String token recibido previamente al validar el usuario en la API. Irá en el header. * @return javax.ws.rs.core.Response con el resultado de la operación * @throws ClientErrorException Excepcion a ejecutar */ public Response edit_XML(Object requestEntity, String id, String token) throws ClientErrorException { return webTarget.path(java.text.MessageFormat.format("{0}", new Object[]{id})) .request(javax.ws.rs.core.MediaType.APPLICATION_XML) .header(HttpHeaders.AUTHORIZATION, token) .put(javax.ws.rs.client.Entity.entity(requestEntity, javax.ws.rs.core.MediaType.APPLICATION_XML), Response.class); } /** * Método para editar una Guía de un Componente local según su id en formato JSON * PUT /guias/:id * @param requestEntity ar.gob.ambiente.sacvefor.servicios.cgl.Guia Entidad Guía para encapsular los datos de la Guía que se quiere editar * @param id String id de la Guía que se quier editar * @param token String token recibido previamente al validar el usuario en la API. Irá en el header. * @return javax.ws.rs.core.Response con el resultado de la operación * @throws ClientErrorException Excepcion a ejecutar */ public Response edit_JSON(Object requestEntity, String id, String token) throws ClientErrorException { return webTarget.path(java.text.MessageFormat.format("{0}", new Object[]{id})) .request(javax.ws.rs.core.MediaType.APPLICATION_JSON) .header(HttpHeaders.AUTHORIZATION, token) .put(javax.ws.rs.client.Entity.entity(requestEntity, javax.ws.rs.core.MediaType.APPLICATION_JSON), Response.class); } /** * Método para obtener una Guía local según un parámetro que podrá ser el código, * la matrícula del transporte o el destino. Solo se podrá pasar el valor de un parámetro, los restantes deberán ser nulos. * En formato XML * GET /guias/query?codigo=:codigo * GET /guias/query?matricula=:matricula * GET /guias/query?destino=:destino * @param <T> Tipo genérico * @param responseType Tipo que en el que se setearán los datos serializados obtenidos, en este caso será Guia * @param codigo String Código único de la Guía * @param matricula String Matrícula del vehículo de transporte de la Guía (si corresponde) * @param destino String cuit del destinatario de la Guía (si corresponde) * @param token String token recibido previamente al validar el usuario en la API. Irá en el header. * @return Guia Guía o guías obtenida/s según los parámetros enviados * @throws ClientErrorException Excepcion a ejecutar */ public <T> T findByQuery_XML(Class<T> responseType, String codigo, String matricula, String destino, String token) throws ClientErrorException { WebTarget resource = webTarget; if (codigo != null) { resource = resource.queryParam("codigo", codigo); } if (matricula != null) { resource = resource.queryParam("matricula", matricula); } if (destino != null) { resource = resource.queryParam("destino", destino); } resource = resource.path("query"); return resource.request(javax.ws.rs.core.MediaType.APPLICATION_XML) .header(HttpHeaders.AUTHORIZATION, token) .get(responseType); } /** * Método para obtener una Guía según un parámetro que podrá ser el código, * la matrícula del transporte o el destino. Solo se podrá pasar el valor de un parámetro, los restantes deberán ser nulos. * En formato JSON * GET /guias/query?codigo=:codigo * GET /guias/query?matricula=:matricula * GET /guias/query?destino=:destino * @param <T> Tipo genérico * @param responseType Tipo que en el que se setearán los datos serializados obtenidos, en este caso será Guia * @param codigo String Código único de la Guía * @param matricula String Matrícula del vehículo de transporte de la Guía (si corresponde) * @param destino String cuit del destinatario de la Guía (si corresponde) * @param token String token recibido previamente al validar el usuario en la API. Irá en el header. * @return Guia Guía o guías obtenida/s según los parámetros enviados * @throws ClientErrorException Excepcion a ejecutar */ public <T> T findByQuery_JSON(Class<T> responseType, String codigo, String matricula, String destino, String token) throws ClientErrorException { WebTarget resource = webTarget; if (codigo != null) { resource = resource.queryParam("codigo", codigo); } if (matricula != null) { resource = resource.queryParam("matricula", matricula); } if (destino != null) { resource = resource.queryParam("destino", destino); } resource = resource.path("query"); return resource.request(javax.ws.rs.core.MediaType.APPLICATION_JSON) .header(HttpHeaders.AUTHORIZATION, token) .get(responseType); } /** * Método que obtiene una Guía registrada habilitada según su id en formato XML * GET /guias/:id * @param <T> Tipo genérico * @param responseType Tipo en el que se setearán los datos serializados obtenidos, en este caso será Guía * @param id String id de la Guia a obtener * @param token String token recibido previamente al validar el usuario en la API. Irá en el header. * @return <T> Guia guía obtenida según el id remitido * @throws ClientErrorException Excepcion a ejecutar */ public <T> T find_XML(Class<T> responseType, String id, String token) throws ClientErrorException { WebTarget resource = webTarget; resource = resource.path(java.text.MessageFormat.format("{0}", new Object[]{id})); return resource.request(javax.ws.rs.core.MediaType.APPLICATION_XML) .header(HttpHeaders.AUTHORIZATION, token) .get(responseType); } /** * Método que obtiene una Guía registrada habilitada según su id en formato JSON * GET /guias/:id * @param <T> Tipo genérico * @param responseType Tipo en el que se setearán los datos serializados obtenidos, en este caso será Guía * @param id String id de la Guia a obtener * @param token String token recibido previamente al validar el usuario en la API. Irá en el header. * @return <T> Guia guía obtenida según el id remitido * @throws ClientErrorException Excepcion a ejecutar */ public <T> T find_JSON(Class<T> responseType, String id, String token) throws ClientErrorException { WebTarget resource = webTarget; resource = resource.path(java.text.MessageFormat.format("{0}", new Object[]{id})); return resource.request(javax.ws.rs.core.MediaType.APPLICATION_JSON).get(responseType); } public <T> T findRange_XML(Class<T> responseType, String from, String to) throws ClientErrorException { WebTarget resource = webTarget; resource = resource.path(java.text.MessageFormat.format("{0}/{1}", new Object[]{from, to})); return resource.request(javax.ws.rs.core.MediaType.APPLICATION_XML).get(responseType); } public <T> T findRange_JSON(Class<T> responseType, String from, String to) throws ClientErrorException { WebTarget resource = webTarget; resource = resource.path(java.text.MessageFormat.format("{0}/{1}", new Object[]{from, to})); return resource.request(javax.ws.rs.core.MediaType.APPLICATION_JSON).get(responseType); } /** * Método que obtiene todas las guías registradas habilitadas en formato XML * GET /guias * @param <T> Tipo genérico * @param responseType javax.ws.rs.core.Response * @param token String token recibido previamente al validar el usuario en la API. Irá en el header. * @return javax.ws.rs.core.Response resultados de la consulta * @throws ClientErrorException Excepcion a ejecutar */ public <T> T findAll_XML(Class<T> responseType, String token) throws ClientErrorException { WebTarget resource = webTarget; return resource.request(javax.ws.rs.core.MediaType.APPLICATION_XML) .header(HttpHeaders.AUTHORIZATION, token) .get(responseType); } /** * Método que obtiene todas las guías registradas habilitadas en formato JSON * GET /guias * @param <T> Tipo genérico * @param responseType javax.ws.rs.core.Response * @param token String token recibido previamente al validar el usuario en la API. Irá en el header. * @return javax.ws.rs.core.Response resultados de la consulta * @throws ClientErrorException Excepcion a ejecutar */ public <T> T findAll_JSON(Class<T> responseType, String token) throws ClientErrorException { WebTarget resource = webTarget; return resource.request(javax.ws.rs.core.MediaType.APPLICATION_JSON) .header(HttpHeaders.AUTHORIZATION, token) .get(responseType); } /** * Método para obtener los Items de una Guía según el id de la misma. Formato XML * Cada ítem se compone del Producto, su cantidad y la unidad de medida * @param <T> Tipo genérico * @param responseType javax.ws.rs.core.Response * @param id String * @param token String token recibido previamente al validar el usuario en la API. Irá en el header. * @return javax.ws.rs.core.Response resultados de la consulta * @throws ClientErrorException */ public <T> T findItemsByGuia_XML(Class<T> responseType, String id, String token) throws ClientErrorException { WebTarget resource = webTarget; resource = resource.path(java.text.MessageFormat.format("{0}/items", new Object[]{id})); return resource.request(javax.ws.rs.core.MediaType.APPLICATION_XML) .header(HttpHeaders.AUTHORIZATION, token) .get(responseType); } /** * Método para obtener los Items de una Guía según el id de la misma. Formato JSON * Cada ítem se compone del Producto, su cantidad y la unidad de medida * @param <T> Tipo genérico * @param responseType javax.ws.rs.core.Response * @param id String * @param token String token recibido previamente al validar el usuario en la API. Irá en el header. * @return javax.ws.rs.core.Response resultados de la consulta * @throws ClientErrorException */ public <T> T findItemsByGuia_JSON(Class<T> responseType, String id, String token) throws ClientErrorException { WebTarget resource = webTarget; resource = resource.path(java.text.MessageFormat.format("{0}/items", new Object[]{id})); return resource.request(javax.ws.rs.core.MediaType.APPLICATION_JSON) .header(HttpHeaders.AUTHORIZATION, token) .get(responseType); } /** * Método para cerrar el cliente */ public void close() { client.close(); } }
[ "rincostante@ambiente.gob.ar" ]
rincostante@ambiente.gob.ar
1ad3be631a9435b037097fe46701440dc9c2ded8
436a240757dd04554993355b6726e960ca85a7db
/src/java/servlets/CGUS.java
25e67e0220afe70beddf83aa82e548e55c16dd70
[]
no_license
stc074/potager
8cf13a44e4fa44cbed63de4882d8b140d5ebf56f
4921578192e1ff70e2ae5093d1710950bef338cc
refs/heads/master
2020-12-03T21:32:51.261539
2016-09-11T20:43:15
2016-09-11T20:43:15
67,953,287
0
0
null
null
null
null
UTF-8
Java
false
false
3,116
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package servlets; import classes.CGU; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @author pj */ public class CGUS extends HttpServlet { /** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8"); response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { CGU cgu=new CGU(); cgu.init(); request.setAttribute("cgu", cgu); RequestDispatcher dispatch = request.getRequestDispatcher("./scripts/cgus.jsp"); dispatch.forward(request, response); /* TODO output your page here out.println("<html>"); out.println("<head>"); out.println("<title>Servlet CGUS</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>Servlet CGUS at " + request.getContextPath () + "</h1>"); out.println("</body>"); out.println("</html>"); */ } finally { out.close(); } } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP <code>POST</code> method. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
[ "hardibopj@yahoo.fr" ]
hardibopj@yahoo.fr
e9bd10d072887cc8d47e892f904dd2ee38bd32e7
f7009d3e7a60df66f3fcb03394ad669c39c2a983
/src/test/java/context/healthinformatics/writer/ReadWriteAnalyseFilterTest.java
7c9f50d5c0670188296573f1c89d15a56081b363
[]
no_license
rpjproost/Context-project-Health-informatics-2
7d230948603481e597107bbe4f764e06d1b25ad5
a7275f05989585b04ec7c7b74bd2b154c8986a8a
refs/heads/master
2021-01-15T13:23:09.134675
2015-07-10T10:32:44
2015-07-10T10:32:44
34,570,861
3
1
null
2015-06-27T18:19:37
2015-04-25T14:09:39
Java
UTF-8
Java
false
false
570
java
package context.healthinformatics.writer; import static org.junit.Assert.assertEquals; import java.io.IOException; import org.junit.Test; /** * Class to test the ReadWriteAnalyseFilter. */ public class ReadWriteAnalyseFilterTest { /** * Test the read function. */ @Test public void testReadFilter() { ReadWriteAnalyseFilter rwaf = new ReadWriteAnalyseFilter( "src/test/data/savedFilters/(default).txt"); try { assertEquals(rwaf.readFilter().size(), 1); } catch (IOException e) { e.printStackTrace(); } } }
[ "wim.spaargaren@lastmason.com" ]
wim.spaargaren@lastmason.com
f48011e497d68390d5c2b902246c676da76699fc
689cdf772da9f871beee7099ab21cd244005bfb2
/classes/com/c/b/n.java
722cda03f9de1f13250da8802e9459d1ab18593e
[]
no_license
waterwitness/dazhihui
9353fd5e22821cb5026921ce22d02ca53af381dc
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
refs/heads/master
2020-05-29T08:54:50.751842
2016-10-08T08:09:46
2016-10-08T08:09:46
70,314,359
2
4
null
null
null
null
UTF-8
Java
false
false
2,831
java
package com.c.b; import com.c.b.a.a.a; public class n { private final float a; private final float b; public n(float paramFloat1, float paramFloat2) { this.a = paramFloat1; this.b = paramFloat2; } public static float a(n paramn1, n paramn2) { return a.a(paramn1.a, paramn1.b, paramn2.a, paramn2.b); } private static float a(n paramn1, n paramn2, n paramn3) { float f1 = paramn2.a; float f2 = paramn2.b; float f3 = paramn3.a; float f4 = paramn1.b; float f5 = paramn3.b; return (f3 - f1) * (f4 - f2) - (paramn1.a - f1) * (f5 - f2); } public static void a(n[] paramArrayOfn) { float f1 = a(paramArrayOfn[0], paramArrayOfn[1]); float f2 = a(paramArrayOfn[1], paramArrayOfn[2]); float f3 = a(paramArrayOfn[0], paramArrayOfn[2]); n localn; Object localObject2; Object localObject1; if ((f2 >= f1) && (f2 >= f3)) { localn = paramArrayOfn[0]; localObject2 = paramArrayOfn[1]; localObject1 = paramArrayOfn[2]; if (a((n)localObject2, localn, (n)localObject1) >= 0.0F) { break label135; } } for (;;) { paramArrayOfn[0] = localObject1; paramArrayOfn[1] = localn; paramArrayOfn[2] = localObject2; return; if ((f3 >= f2) && (f3 >= f1)) { localn = paramArrayOfn[1]; localObject2 = paramArrayOfn[0]; localObject1 = paramArrayOfn[2]; break; } localn = paramArrayOfn[2]; localObject2 = paramArrayOfn[0]; localObject1 = paramArrayOfn[1]; break; label135: Object localObject3 = localObject1; localObject1 = localObject2; localObject2 = localObject3; } } public final float a() { return this.a; } public final float b() { return this.b; } public final boolean equals(Object paramObject) { boolean bool2 = false; boolean bool1 = bool2; if ((paramObject instanceof n)) { paramObject = (n)paramObject; bool1 = bool2; if (this.a == ((n)paramObject).a) { bool1 = bool2; if (this.b == ((n)paramObject).b) { bool1 = true; } } } return bool1; } public final int hashCode() { return Float.floatToIntBits(this.a) * 31 + Float.floatToIntBits(this.b); } public final String toString() { StringBuilder localStringBuilder = new StringBuilder(25); localStringBuilder.append('('); localStringBuilder.append(this.a); localStringBuilder.append(','); localStringBuilder.append(this.b); localStringBuilder.append(')'); return localStringBuilder.toString(); } } /* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\c\b\n.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
97d1d6bf2555445668dea9def7a35d31b9573cc7
03393a75b3c439f88a3db3486c202f3e0781ea2a
/src/Collection/MainRetailor.java
6f6d589f5831f65de7dc243d3dae07751ff2b98f
[]
no_license
diogoti2005/Store
f1583a8e3e7eb9e2aaaced39964d49f00be1bf76
21bcc6b0b5e21a8058b9aef9cae65c04e096fc4c
refs/heads/master
2022-07-25T23:03:34.479544
2020-05-20T07:57:43
2020-05-20T07:57:43
263,255,783
0
0
null
null
null
null
UTF-8
Java
false
false
3,794
java
package Collection; import java.util.*; public class MainRetailor { public static void main(String[] args) { //Start System.out.println("Hello to create new oder: 1) enter user name 2) indecat type 3) enter item name" ); // New user registration User user1 = new User(); Scanner myNewUserObj = new Scanner(System.in); // Create a Scanner object System.out.println("Hello please create new User"); String user = myNewUserObj.nextLine(); // Enter username and press Enter /* create dynamic var System.out.println("Username is: " + user); // Create Adress Scanner enterFullAddress1 = new Scanner(System.in); // Create a Scanner object System.out.println("Enter Country, City and street:"); String newAddressCountry1 = enterFullAddress1.nextLine(); String newAddressCity1 = enterFullAddress1.nextLine(); String newAddressStreet1 = enterFullAddress1.nextLine();// Enter username and press Enter /* create dynamic var //System.out.println("Username is: " + user); //getFullAddress method for Address class Address address1 = new Address(newAddressCountry1, newAddressCity1, newAddressStreet1); String fullAddress = Address.getFullAddress(); System.out.println(fullAddress); // String newAddressCountry1 = "Moldova"; // String newAddressCity1 = "Chishinau"; // String newAddressStreet1 = "Negruta 19"; String newAddressCountry2 = "Moldova"; String newAddressCity2 = "Chishinau"; String newAddressStreet2 = "Nunta 19"; Address address2 = new Address(newAddressCountry2, newAddressCity2, newAddressStreet2); String newAddressCountry3 = "Moldova"; String newAddressCity3 = "Orhey"; String newAddressStreet3 = "Doga 19"; Address address3 = new Address(newAddressCountry3, newAddressCity3, newAddressStreet3); Map<String, Address> addresses = new HashMap<String, Address>(); //Adding elements to map addresses.put("Home", address1); addresses.put("Work", address2); addresses.put("Home", address3); for (Map.Entry m : addresses.entrySet()) { // System.out.println(m.getKey() + " " + m.getValue()); } /// create list of items Item mytoy = new Item(1, "lego", Type.TOY); Item mytoy2 = new Item(2, "legoGo", Type.TOY); Item mytoy3 = new Item(3, "legoUP", Type.TOY); List<Item> listToys = new LinkedList<Item>(); listToys.add(mytoy); listToys.add(mytoy2); listToys.add(mytoy3); String[] arrToys = new String[listToys.size()]; // ArrayList to Array Conversion for (int i =0; i < listToys.size(); i++) { arrToys[i] = String.valueOf(listToys.get(i)); } for (String x : arrToys) System.out.print( "item list:" + x + " "); UserOrder order1 = new UserOrder(); order1.registrationUser(user1); System.out.print( "item list:" + order1 + " "); Scanner myNewOrderObj = new Scanner(System.in); // Create a Scanner object System.out.println("Hello please create new Order. Select item from the list "+ arrToys ); //String orderCreated = mytoy.toString(); order1.addItem(mytoy); System.out.println("You order is: " + order1); order1.addItem(mytoy2); order1.addItem(mytoy3); // order1.addItem(mytoy2); /// List<Item> clothes = order1.getitemBytype(Type.TOY) //Order newOrder = new Order("date"); System.out.println(order1.items); System.out.println(order1.date); System.out.println(order1.user + " " + order1); } }
[ "andrei.diogoti@endava.com" ]
andrei.diogoti@endava.com
06047136a9ef4bad094a4b800992e0f03647e75f
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/CHART-13b-4-25-PESA_II-WeightedSum:TestLen:CallDiversity/org/jfree/chart/block/BorderArrangement_ESTest_scaffolding.java
fce6938b7df822bd89b22a67839f0b556318d88a
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
449
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Jan 19 16:21:51 GMT+00:00 2020 */ package org.jfree.chart.block; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class BorderArrangement_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
d6b0826013d756905a097a916e1a01b9e49cd47f
4ca72c9a9277dfc9bac041bd3689a479dbb3d202
/app/src/main/java/com/example/virtualwallets/walletComponent/view/AdapterMainRecyclerView.java
3adb5a681da935502ba0840ba81cccc2ea35ced1
[]
no_license
Rosember/virtualWallet
ceefec0f63293a0e7b35516e40dd5ebbca4d3a19
b08a3058ae0b42eabdc11858b8e50806b9603017
refs/heads/master
2020-09-07T18:40:41.064409
2019-11-16T16:01:24
2019-11-16T16:01:24
220,880,627
0
0
null
2019-11-14T23:45:48
2019-11-11T01:57:17
Java
UTF-8
Java
false
false
2,682
java
package com.example.virtualwallets.walletComponent.view; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.example.virtualwallets.transferComponent.model.Wallets; import com.example.virtualwallets.R; import com.example.virtualwallets.utils.OnItemRecyclerViewClickListener; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; /** * @autor Ing. Carlos G. Cruz Andia * Creado el 2019-11-11 */ public class AdapterMainRecyclerView extends RecyclerView.Adapter<AdapterMainRecyclerView.RecyclerViewMain> { private final String TAG = getClass().getSimpleName(); public OnItemRecyclerViewClickListener listener; List<Wallets> list; public AdapterMainRecyclerView(List<Wallets> walletsList, OnItemRecyclerViewClickListener listener){ this.listener = listener; this.list = walletsList; Log.d(TAG, "AdapterMainRecyclerView: "); } @NonNull @Override public RecyclerViewMain onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { return new RecyclerViewMain(LayoutInflater.from(parent.getContext()),parent,this.listener); } @Override public void onBindViewHolder(@NonNull RecyclerViewMain holder, int position) { holder.bind(list.get(position)); } @Override public int getItemCount() { return list.size(); } public class RecyclerViewMain extends RecyclerView.ViewHolder implements View.OnClickListener{ private OnItemRecyclerViewClickListener listener; @BindView(R.id.tv_item_nro_cuenta_billetera) public TextView walletId; @BindView(R.id.tv_item_saldo_billetera) public TextView walletSaldo; private Wallets wallets; public RecyclerViewMain(LayoutInflater inflater, ViewGroup parent,OnItemRecyclerViewClickListener listener) { super(inflater.inflate(R.layout.item_wallet, parent, false)); itemView.setOnClickListener(this); ButterKnife.bind(this, itemView); this.listener = listener; } public void bind(Wallets wallets){ this.wallets = wallets; walletId.setText("Wallet Nro "+wallets.getNombre()); walletSaldo.setText("Balance "+wallets.getSaldo() +" $us"); } @Override public void onClick(View v) { Log.d("RecyclerViewAdapter", "onClick: "); this.listener.itemClick(this.wallets,getPosition()); } } }
[ "cgcruz@gruposion.bo" ]
cgcruz@gruposion.bo
ff85170e9b1398dc0d8f46036ef5a17d2d0da8b2
90a8fc2ff95f8bd463150553340d21b679c229ce
/fishbot/src/com/liner/ragebot/bot/ServerChecker.java
e6ab954be18657915b4eb4b742645874a0db4bdb
[]
no_license
LinerSRT/SMOTRA_RAGE_SOFT
e64de2cafa4713571c44ae4a7ea7624759fbce5c
a3a2c869dda9ab9b06a2d90a6bafc5939d33e432
refs/heads/main
2023-08-23T17:53:21.988678
2021-10-03T14:41:06
2021-10-03T14:41:06
413,103,574
0
0
null
null
null
null
UTF-8
Java
false
false
2,870
java
package com.liner.ragebot.bot; import com.liner.ragebot.jna.HardwareInfo; import com.liner.ragebot.server.Server; import com.liner.ragebot.server.models.LicenceKey; import com.liner.ragebot.server.models.Notification; import com.liner.ragebot.server.models.User; import com.liner.ragebot.utils.Worker; import java.util.concurrent.TimeUnit; public class ServerChecker extends Worker { private BotContext botContext; private ServerCheckerCallback callback; public ServerChecker(BotContext botContext, ServerCheckerCallback callback) { this.botContext = botContext; this.callback = callback; } @Override public void execute() { Server.getUser(botContext.getSettings().getUserName(), new Server.UserCallback() { @Override public void onReceive(User user) { if (user.getBanned()) { callback.onUserBanned(user); } else { Server.getLicence(botContext.getSettings().getLicenceKey(), new Server.LicenceCallback() { @Override public void onReceive(LicenceKey licenceKey) { HardwareInfo hardwareInfo = HardwareInfo.getHardware(); if (licenceKey.isActivated && hardwareInfo.equals(licenceKey.getHardwareInfo())) { if (!licenceKey.isExpired) { for (Notification notification : user.getNotificationMessages()) { if (!notification.isRead()) { callback.onNewUserMessage(user); return; } } callback.onSuccess(user, licenceKey); } else { callback.onKeyExpired(licenceKey); } } else if (licenceKey.isActivated && !hardwareInfo.equals(licenceKey.getHardwareInfo())) { callback.onKeyHardwareMismatch(licenceKey); } else if (!licenceKey.isActivated) { callback.onKeyNotActivated(licenceKey); } } @Override public void onFailed(String reason) { callback.onError(); } }); } } @Override public void onFailed(String reason) { callback.onError(); } }); } @Override public long delay() { return TimeUnit.SECONDS.toMillis(30); } }
[ "SeriniTY320@gmail.com" ]
SeriniTY320@gmail.com
039a538d3c38ee7b5867ba7034d0eae19f64c1e9
2e53b1e78ceb2014acb99dfbdd4e5af671da7971
/app/src/main/java/com/meiku/dev/ui/morefun/LocalActivityManagerFragment.java
d7f40854b2996fa6d73c49133d0a6538f0768dd2
[]
no_license
hs5240leihuang/MrrckApplication
7960cb2278a1a8098c5bc908b3c5d7b241869c5d
aef126d4876e3e45b0984c1b829c38aa326ba598
refs/heads/master
2021-01-12T02:47:13.236711
2017-01-05T11:13:11
2017-01-05T11:14:05
78,102,342
0
0
null
null
null
null
UTF-8
Java
false
false
1,844
java
package com.meiku.dev.ui.morefun; import android.app.LocalActivityManager; import android.os.Bundle; import com.meiku.dev.ui.fragments.BaseFragment; public class LocalActivityManagerFragment extends BaseFragment { private static final String KEY_STATE_BUNDLE = "localActivityManagerState"; private LocalActivityManager mLocalActivityManager; protected LocalActivityManager getLocalActivityManager() { return mLocalActivityManager; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle state = null; if(savedInstanceState != null) { state = savedInstanceState.getBundle(KEY_STATE_BUNDLE); } mLocalActivityManager = new LocalActivityManager(getActivity(), true); mLocalActivityManager.dispatchCreate(state); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putBundle(KEY_STATE_BUNDLE, mLocalActivityManager.saveInstanceState()); } @Override public void onResume() { super.onResume(); mLocalActivityManager.dispatchResume(); } @Override public void onPause() { super.onPause(); mLocalActivityManager.dispatchPause(getActivity().isFinishing()); } @Override public void onStop() { super.onStop(); mLocalActivityManager.dispatchStop(); } @Override public void onDestroy() { super.onDestroy(); mLocalActivityManager.dispatchDestroy(getActivity().isFinishing()); } @Override public void initValue() { } @Override public <T> void onSuccess(int requestCode, T arg0) { } @Override public <T> void onFailed(int requestCode, T arg0) { } }
[ "837851174@qq.com" ]
837851174@qq.com
2a6731ac18fe2ecf59be66df6cb4f80f023f1f66
78c97dc1612d0cb8b0a115a594b35707c3db5296
/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/autoconfigure/DefaultGlobalContext.java
85f73af66e72b7c9067e119be68e74fb06a61042
[ "Apache-2.0" ]
permissive
leangen/graphql-spqr-spring-boot-starter
50272273e80352a75171211a163412c24408af97
87517776b7d3e18da1d3cfbb3a8957a0f55b6afb
refs/heads/master
2023-08-28T19:35:40.411391
2023-08-10T15:04:31
2023-08-10T15:04:31
129,529,718
277
69
Apache-2.0
2023-07-03T15:18:06
2018-04-14T15:29:57
Java
UTF-8
Java
false
false
734
java
package io.leangen.graphql.spqr.spring.autoconfigure; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; public class DefaultGlobalContext<R> { private final R nativeRequest; private final Map<Object, Object> extensions; public DefaultGlobalContext(R request) { this.nativeRequest = request; this.extensions = new ConcurrentHashMap<>(); } public R getNativeRequest() { return nativeRequest; } @SuppressWarnings("unchecked") public <T> T getExtension(Object key) { return (T) extensions.get(key); } @SuppressWarnings("unchecked") public <T> T setExtension(Object key, T value) { return (T) extensions.put(key, value); } }
[ "veggen@gmail.com" ]
veggen@gmail.com
14ada307955d1dd40bca1265cd9c3050172f37a2
8d2b665aec119f924e5aef68afda9e4df2b55555
/app/src/main/java/com/example/mymoequest/module/meizitu/MeiziTuFragment.java
b3e4188184ac1573e30f9185e8417013bb810c3b
[]
no_license
zwx191044354/MyMoeQuest
0b4b548568a22ba1d2f1bb707ebb02343b35baa3
7378fc04ade7cf07dbfdec9b38759e85b0f7332d
refs/heads/master
2021-01-24T08:34:22.111289
2016-09-23T11:21:01
2016-09-23T11:21:01
69,018,334
1
0
null
null
null
null
UTF-8
Java
false
false
2,410
java
package com.example.mymoequest.module.meizitu; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import com.example.mymoequest.R; import com.example.mymoequest.base.RxBaseFragment; import com.example.mymoequest.utils.ConstantUtil; import com.flyco.tablayout.SlidingTabLayout; import java.util.Arrays; import java.util.List; import butterknife.Bind; /** * Created by hcc on 16/7/19 20:39 * 100332338@qq.com * <p/> * 妹子图 */ public class MeiziTuFragment extends RxBaseFragment { @Bind(R.id.sliding_tabs) SlidingTabLayout mSlidingTabLayout; @Bind(R.id.view_pager) ViewPager mViewPager; private List<String> titles = Arrays.asList("自拍", "热门", "推荐", "清纯", "台湾", "日本", "性感"); private List<String> types = Arrays.asList( ConstantUtil.ZIPAI_MEIZI, ConstantUtil.HOT_MEIZI, ConstantUtil.TUIJIAN_MEIZI, ConstantUtil.QINGCHUN_MEIZI, ConstantUtil.TAIWAN_MEIZI, ConstantUtil.JAPAN_MEIZI, ConstantUtil.XINGGAN_MEIZI); public static MeiziTuFragment newInstance() { return new MeiziTuFragment(); } @Override public int getLayoutId() { return R.layout.fragment_meizitu; } @Override public void initViews() { initFragments(); } private void initFragments() { mViewPager.setAdapter(new MeiziTuPageAdapter(getChildFragmentManager())); mViewPager.setOffscreenPageLimit(1); mSlidingTabLayout.setViewPager(mViewPager); } private class MeiziTuPageAdapter extends FragmentStatePagerAdapter { public MeiziTuPageAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int position) { if (position == 0) return ZiPaiMeiziFragment.newInstance(types.get(0)); else return MeiziTuSimpleFragment.newInstance(types.get(position)); } @Override public CharSequence getPageTitle(int position) { return titles.get(position); } @Override public int getCount() { return titles.size(); } } }
[ "15681237025@163.com" ]
15681237025@163.com
b17686da7a80d3321ec445b536bbc63b74e47666
6895c69c127ccc4140b5733403233004ed199b90
/app/src/main/java/edu/umsl/quizlet/GroupListing/GroupHolder.java
b25c330ae6dd9eddf7d7f56e84fe5023d7721690
[]
no_license
krystaknight/Group-Quiz
f17aad59d8c0e060c3e939564795c8ed3e1a2f9e
0fef632a4d840616ddda581e8d48d61227b63ac0
refs/heads/master
2020-03-07T10:16:24.175464
2018-03-30T12:49:39
2018-03-30T12:49:39
127,427,587
0
0
null
null
null
null
UTF-8
Java
false
false
1,665
java
package edu.umsl.quizlet.GroupListing; import android.content.Context; import android.graphics.Color; import android.support.v4.content.ContextCompat; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import android.widget.TextView; import edu.umsl.quizlet.R; import edu.umsl.quizlet.dataClasses.GroupUser; /** * Created by klkni on 5/4/2017. */ public class GroupHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private TextView mGroupMember; private GroupPageModel mModel; private int mPosition; public GroupHolder(View itemView) { super(itemView); mGroupMember = (TextView) itemView.findViewById(R.id.group_member_text_view); itemView.setOnClickListener(this); } public void bindGroup(GroupUser g) { if (g.getSingleQuizStatus().equals("complete")) { mGroupMember.setBackgroundResource(R.color.colorAccent); } else { mGroupMember.setBackgroundColor(Color.GRAY); } if (g.getLeader()) { mGroupMember.setTextColor(Color.YELLOW); mGroupMember.setText(g.getFirst() + " " + g.getLast() + " - Leader"); } else { mGroupMember.setText(g.getFirst() + " " + g.getLast()); } } public void onClick(View v) { Context context = v.getContext(); if (mModel == null) { mModel = new GroupPageModel(context); } Log.e("COURSE LIST", "Clicked: " + this + " at position: " + getAdapterPosition()); } public void setmPosition(int mPosition) { this.mPosition = mPosition; } }
[ "klknight23@gmail.com" ]
klknight23@gmail.com
63ccd28bdaa401d3a470041532b267bc3f5341eb
11d0dca11671ed3b5fd3fa0b1da81e843a921b7f
/app/src/main/java/com/example/chungonion/restaurantgenerator/MainActivity.java
095be9988df9f1ff3c519c64dd0bd292bb4da854
[]
no_license
chungonion/what-to-eat-for-lunch
8a79e67e1bee7d604a8512803582ae8bbb3e54cf
cb6bb749cce0f358d8233fe90119d7e34f8cb487
refs/heads/master
2020-06-10T13:13:12.358775
2017-02-28T12:34:22
2017-02-28T12:34:22
75,958,228
0
0
null
null
null
null
UTF-8
Java
false
false
5,057
java
package com.example.chungonion.restaurantgenerator; import android.content.Intent; import android.os.Environment; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; public class MainActivity extends AppCompatActivity { private Button generateButton; private Button manageButton; private Button clearResultButton; private Button webLinkButton; private TextView resultText; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); generateButton = (Button) findViewById(R.id.generateButton); manageButton = (Button) findViewById(R.id.manageButton); clearResultButton = (Button) findViewById(R.id.clearResultButton); resultText = (TextView) findViewById(R.id.resultText); webLinkButton = (Button) findViewById(R.id.webLinkButton); generateButton.setOnClickListener(listener); manageButton.setOnClickListener(listener); clearResultButton.setOnClickListener(listener); webLinkButton.setOnClickListener(listener); } private View.OnClickListener listener = new View.OnClickListener() { @Override public void onClick(View v) { Intent intent; switch (v.getId()) { case (R.id.generateButton): generateFunction(); break; case (R.id.manageButton): intent = new Intent(); intent.setClass(MainActivity.this, ManageListActivity.class); startActivity(intent); break; case (R.id.clearResultButton): resultText.setText(""); break; case (R.id.webLinkButton): intent = new Intent(); intent.setClass(MainActivity.this, WebDemoActivity.class); startActivity(intent); } } }; private void generateFunction() { String json = loadJSON(); JSONObject obj; JSONArray jsonArray = null; try { try { jsonArray = new JSONArray(json); int length = jsonArray.length(); List<String> listContents = new ArrayList<String>(length); for (int i = 0; i < length; i++) { listContents.add(jsonArray.getString(i)); } String[] temp = new String[listContents.size()]; listContents.toArray(temp); int randomInt = (int) (Math.random() * temp.length); try { String restaurantString = temp[randomInt]; resultText.setText(restaurantString); } catch (ArrayIndexOutOfBoundsException e) { resultText.setText("No Restaurant :\\"); } }catch (RuntimeException e) { resultText.setText("No Restaurant :\\"); } } catch (JSONException e) { e.printStackTrace(); resultText.setText("No Restaurant :\\"); } } public String loadJSON() { String json = null; try { InputStream in = new FileInputStream(Environment.getExternalStorageDirectory().getAbsolutePath()+"/restaurantList.json"); int size = in.available(); byte[] buffer = new byte[size]; in.read(buffer); in.close(); json = new String(buffer, "UTF-8"); } catch (IOException ex) { try { InputStream in = getAssets().open("restaurantList.json"); OutputStream out = new FileOutputStream(Environment.getExternalStorageDirectory().getAbsolutePath()+"/restaurantList.json"); byte[] buffer = new byte[1024]; int read; while ((read = in.read(buffer)) != -1) { out.write(buffer, 0, read); } int size = in.available(); buffer = new byte[size]; in.close(); json = new String(buffer, "UTF-8"); in = null; // write the output file (You have now copied the file) out.flush(); out.close(); out = null; } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } return json; } }
[ "chungonion20@yahoo.com.hk" ]
chungonion20@yahoo.com.hk
efe7e07488800c950569e6211f08699f64e7e556
212d6fe36010483fe0ad6ccf139996226e19bc7f
/MockMain/src/sheepdog/modules/KrakenReparse.java
8450dbe4aec8452143601885b5282395b6c9f9b4
[]
no_license
BioLockJ-Dev-Team/sheepdog_testing_suite
b6626107f8d749ac84a57d8fbebf97af1fd448a0
af7c85968ed9af7cf0ee3143ba1460767d23e892
refs/heads/main
2022-06-20T16:09:01.350664
2022-06-14T16:12:56
2022-06-14T16:14:06
190,078,043
2
5
null
2021-06-07T03:07:29
2019-06-03T20:32:14
HTML
UTF-8
Java
false
false
2,052
java
package sheepdog.modules; import java.io.File; import java.util.Collection; import java.util.List; import biolockj.Constants; import biolockj.Log; import biolockj.module.BioModuleImpl; import biolockj.util.BioLockJUtil; import sheepdog.modules.util.KrakenExpectedUnclassified; public class KrakenReparse extends BioModuleImpl { @Override public void checkDependencies() throws Exception { Log.info( getClass(), "IN stub for checkDependencies()"); } @Override public void executeTask() throws Exception { Log.info( getClass(), "IN stub for executeTask()"); Collection<File> pipelineInput = BioLockJUtil.getPipelineInputFiles(); List<File> inputFiles = getInputFiles(); for(File f : pipelineInput) { File matching = findMatching(f, inputFiles); Log.info( getClass(), "Compare " + f.getAbsolutePath() + " " + matching.getAbsolutePath()); KrakenExpectedUnclassified.assertEquals(f, matching); Log.info( getClass(), "Pass " + f.getAbsolutePath() + " " + matching.getAbsolutePath()); } Log.info( getClass(), "Exit stub for executeTask() with global pass"); } private static File findMatching(File pipelineFile, List<File> inputFiles) throws Exception { String sampleId = pipelineFile.getName(); sampleId = sampleId.substring(sampleId.lastIndexOf("/")+1, sampleId.length()); sampleId = sampleId.replace("_reported.tsv", ""); File returnFile = null; for( File f : inputFiles) { if( f.getName().indexOf(sampleId) != -1 ) { if( returnFile != null) throw new Exception("Duplicate for " + sampleId); returnFile = f; } } if( returnFile == null) throw new Exception("Could not find match for " + pipelineFile.getAbsolutePath()); return returnFile; } @Override public String getDockerImageName() { return Constants.MAIN_DOCKER_IMAGE; } @Override public String getDockerImageOwner() { return Constants.MAIN_DOCKER_OWNER; } }
[ "IvoryEC@gmail.com" ]
IvoryEC@gmail.com
8f6b6f09fc9b2639fcb73d6747a6d2b51a21132a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/25/25_fb5062020e499f75c9a5971b842af62fe76c0f01/IconClickLogic/25_fb5062020e499f75c9a5971b842af62fe76c0f01_IconClickLogic_t.java
35a44a57f2eccca229cbb2a5a8bcc6630bb36faa
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,204
java
package net.sourceforge.pinemup.logic; import java.awt.event.*; import net.sourceforge.pinemup.menus.*; import javax.swing.*; public class IconClickLogic extends MouseAdapter implements ActionListener { private CategoryList categories; private UserSettings settings; private TrayMenu menu; public void actionPerformed(ActionEvent arg0) { Category defCat = categories.getDefaultCategory(); if (defCat != null) { Note newNote = new Note("",settings,categories); defCat.getNotes().add(newNote); newNote.showIfNotHidden(); newNote.jumpInto(); } } public IconClickLogic(CategoryList c, UserSettings s) { categories = c; settings = s; menu = new TrayMenu(categories,settings); menu.setInvoker(null); } public void mouseReleased(MouseEvent event) { if (event.isPopupTrigger() || event.getButton() == MouseEvent.BUTTON2 || event.getButton() == MouseEvent.BUTTON3) { menu.setLocation(event.getX(), event.getY()); menu.setVisible(true); SwingUtilities.windowForComponent(menu).setAlwaysOnTop(true); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
0a491021d5c8be94da74ab3addba19fa97d16047
7c28d9a2d8af5c8e5c985b969878ce428a2d7278
/Exercises/Week9/streamssamples/StreamsSamples/src/streamssamples/FirstSample.java
ca87e93a303fcbaaccb9d615a51fe32133a1287f
[]
no_license
Velyana/Java
7f14025aee9df3d8895ef3b189cfe151dbef18fb
01235c23e2e2f98b084291e8e583d460b4d33ed5
refs/heads/master
2020-08-27T05:07:21.260771
2015-03-17T12:30:36
2015-03-17T12:30:36
32,391,503
1
0
null
null
null
null
UTF-8
Java
false
false
823
java
package streamssamples; import java.util.List; import java.util.stream.Collectors; /** * * @author richard */ public class FirstSample extends MusicSample { public List<String> getNamesOfArtists_Lambda() { return artists.stream() .map(artist -> artist.getName()) .collect(Collectors.toList()); } public List<String> getNamesOfArtists_MethodReference() { return artists.stream() .map(Artist::getName) .collect(Collectors.toList()); } public List<Artist> artistsLivingInLondon() { return artists.stream() .filter(artist -> "London".equals(artist.getNationality())) .collect(Collectors.toList()); } }
[ "velyana93@abv.bg" ]
velyana93@abv.bg
411389c395ed951d3c1a352e6512afca4a6069db
fad9baa6dac5b485a1178ef9aebd42991c404499
/BankAppication/src/main/java/com/bank/entity/User.java
22a35a49bc696c6dd2a8842b402c6aba046e9189
[]
no_license
saumendrabehura/BankRepository
c35d1087b51a3c239437b64283bab3388b9fe019
8a047287124f522a9ee6fddf94bb86171e766043
refs/heads/master
2021-03-17T05:26:54.364206
2020-03-13T09:30:43
2020-03-13T09:30:43
246,965,341
0
0
null
null
null
null
UTF-8
Java
false
false
3,632
java
package com.bank.entity; import java.util.HashSet; import java.util.List; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import com.bank.security.UserRole; import com.fasterxml.jackson.annotation.JsonIgnore; public class User { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "userId", nullable = false, updatable = false) private Long userId; private String username; private String password; private String firstName; private String lastName; @Column(name = "email", nullable = false, unique = true) private String email; private String phone; private boolean enabled=true; @OneToOne private PrimaryAccount primaryAccount; @OneToOne private SavingsAccount savingAccount; @OneToMany(mappedBy = "user",cascade = CascadeType.ALL,fetch = FetchType.LAZY) @JsonIgnore private List <Appointment> appointmentlist; @OneToMany(mappedBy = "user",cascade = CascadeType.ALL,fetch = FetchType.LAZY) private List<RecipientAccount> receiptentList; @OneToMany(mappedBy = "user",cascade = CascadeType.ALL,fetch = FetchType.LAZY) @JsonIgnore private Set<UserRole> userRoles=new HashSet<>(); public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } public PrimaryAccount getPrimaryAccount() { return primaryAccount; } public void setPrimaryAccount(PrimaryAccount primaryAccount) { this.primaryAccount = primaryAccount; } public SavingsAccount getSavingAccount() { return savingAccount; } public void setSavingAccount(SavingsAccount savingAccount) { this.savingAccount = savingAccount; } public List<Appointment> getAppointmentlist() { return appointmentlist; } public void setAppointmentlist(List<Appointment> appointmentlist) { this.appointmentlist = appointmentlist; } public List<RecipientAccount> getReceiptentList() { return receiptentList; } public void setReceiptentList(List<RecipientAccount> receiptentList) { this.receiptentList = receiptentList; } public Set<UserRole> getUserRoles() { return userRoles; } public void setUserRoles(Set<UserRole> userRoles) { this.userRoles = userRoles; } }
[ "saumendra08@gmail.com" ]
saumendra08@gmail.com
9ad0f940f7fa2ce523ae74f3e2da67256ddf20d8
cbd90d25744c7c8de015d65f943396a74912b8c2
/modules/core/src/main/java/cgl/iotcloud/core/SensorCatalog.java
6af67faec5263d769757481321adbc9708308b42
[]
no_license
supunkamburugamuve/IoTCloud
46093fc36b4238ba287b1c79f22e6e8b8c1896d5
6441698aacb801a39367cc45b50c5c9035243e63
refs/heads/master
2021-01-17T21:33:32.569110
2012-03-03T19:16:26
2012-03-03T19:16:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,566
java
package cgl.iotcloud.core; import cgl.iotcloud.core.broker.Connections; import cgl.iotcloud.core.sensor.SCSensor; import cgl.iotcloud.core.sensor.Sensor; import java.util.ArrayList; import java.util.List; /** * Store for sensors. This store should be populated from the configuration * as well as dynamically. */ public class SensorCatalog { private List<SCSensor> sensors = new ArrayList<SCSensor>(); private Endpoint updateListenerEndpoint; public SensorCatalog(Connections connections) { } public List<SCSensor> getSensors() { return sensors; } public SCSensor getSensor(String id) { for (SCSensor s : sensors) { if (s.getId().equals(id)) { return s; } } return null; } public void addSensor(SCSensor sensor) { if (sensor.getId() == null) { throw new IllegalArgumentException("The sensor should have an ID"); } // topicManager.createTopic(sensor.getId()); sensors.add(sensor); } public boolean removeSensor(SCSensor sensor) { return sensors.remove(sensor); } public boolean removeSensor(String id) { for (Sensor s : sensors) { if (s.getId().equals(id)) { return sensors.remove(s); } } return false; } public boolean hasSensor(String id) { for (Sensor s : sensors) { if (s.getId().endsWith(id)) { return true; } } return false; } }
[ "iotcloud@googlegroups.com" ]
iotcloud@googlegroups.com
78b19b073f56fb2bafe7a3ba572e2c010bbe651e
9b0e3c11f69414f35530d87d47194f17901a0689
/silentphone2/src/main/java/com/silentcircle/silentphone2/list/SpeedDialFragment.java
3dbdd7b444be2e902073d7ff0b4f3bbededada5d
[]
no_license
xr00x/silent-phone-android
04b199af191bea806dc18195c5f65ae15aacfc81
a44434e85d332be33e50028174332baafa9c146a
refs/heads/master
2021-05-29T07:56:35.836105
2015-08-07T18:21:59
2015-08-07T18:21:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
16,948
java
/* * Copyright (C) 2013 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.silentcircle.silentphone2.list; import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.app.Activity; import android.app.Fragment; import android.app.LoaderManager; import android.content.CursorLoader; import android.content.Loader; import android.database.Cursor; import android.graphics.Rect; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.view.animation.AnimationUtils; import android.view.animation.LayoutAnimationController; import android.widget.AbsListView; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ImageView; import android.widget.ListView; import android.widget.RelativeLayout.LayoutParams; import com.silentcircle.common.list.ContactTileView; import com.silentcircle.common.list.OnPhoneNumberPickerActionListener; import com.silentcircle.common.util.DialerUtils; import com.silentcircle.contacts.ContactPhotoManagerNew; import com.silentcircle.contacts.ContactTileLoaderFactory; import com.silentcircle.silentphone2.R; import java.util.ArrayList; import java.util.HashMap; /** * This fragment displays the user's favorite/frequent contacts in a grid. */ public class SpeedDialFragment extends Fragment implements OnItemClickListener, PhoneFavoritesTileAdapter.OnDataSetChangedForAnimationListener { /** * By default, the animation code assumes that all items in a list view are of the same height * when animating new list items into view (e.g. from the bottom of the screen into view). * This can cause incorrect translation offsets when a item that is larger or smaller than * other list item is removed from the list. This key is used to provide the actual height * of the removed object so that the actual translation appears correct to the user. */ private static final long KEY_REMOVED_ITEM_HEIGHT = Long.MAX_VALUE; private static final String TAG = SpeedDialFragment.class.getSimpleName(); private static final boolean DEBUG = false; private int mAnimationDuration; /** * Used with LoaderManager. */ private static int LOADER_ID_CONTACT_TILE = 1; public interface HostInterface { void setDragDropController(DragDropController controller); } private class ContactTileLoaderListener implements LoaderManager.LoaderCallbacks<Cursor> { @Override public CursorLoader onCreateLoader(int id, Bundle args) { if (DEBUG) Log.d(TAG, "ContactTileLoaderListener#onCreateLoader."); return ContactTileLoaderFactory.createStrequentPhoneOnlyLoader(getActivity()); } @Override public void onLoadFinished(Loader<Cursor> loader, Cursor data) { if (DEBUG) Log.d(TAG, "ContactTileLoaderListener#onLoadFinished, count: " + data.getCount()); mContactTileAdapter.setContactCursor(data); setEmptyViewVisibility(mContactTileAdapter.getCount() == 0); } @Override public void onLoaderReset(Loader<Cursor> loader) { if (DEBUG) Log.d(TAG, "ContactTileLoaderListener#onLoaderReset. "); } } private class ContactTileAdapterListener implements ContactTileView.Listener { @Override public void onContactSelected(Uri contactUri, Rect targetRect) { if (mPhoneNumberPickerActionListener != null) { mPhoneNumberPickerActionListener.onPickPhoneNumberAction(contactUri); } } @Override public void onCallNumberDirectly(String phoneNumber) { if (mPhoneNumberPickerActionListener != null) { mPhoneNumberPickerActionListener.onCallNumberDirectly(phoneNumber); } } @Override public int getApproximateTileWidth() { final View view = getView(); if (view != null) return view.getWidth(); return 0; } } private class ScrollListener implements ListView.OnScrollListener { @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { if (mActivityScrollListener != null) { mActivityScrollListener.onListFragmentScroll(firstVisibleItem, visibleItemCount, totalItemCount); } } @Override public void onScrollStateChanged(AbsListView view, int scrollState) { mActivityScrollListener.onListFragmentScrollStateChange(scrollState); } } private OnPhoneNumberPickerActionListener mPhoneNumberPickerActionListener; private OnListFragmentScrolledListener mActivityScrollListener; private PhoneFavoritesTileAdapter mContactTileAdapter; private PhoneFavoriteListView mListView; private View mContactTileFrame; // private TileInteractionTeaserView mTileInteractionTeaserView; private final HashMap<Long, Integer> mItemIdTopMap = new HashMap<>(); private final HashMap<Long, Integer> mItemIdLeftMap = new HashMap<>(); /** * Layout used when there are no favorites. */ private View mEmptyView; private final ContactTileView.Listener mContactTileAdapterListener = new ContactTileAdapterListener(); private final LoaderManager.LoaderCallbacks<Cursor> mContactTileLoaderListener = new ContactTileLoaderListener(); private final ScrollListener mScrollListener = new ScrollListener(); @Override public void onAttach(Activity activity) { super.onAttach(activity); // Construct two base adapters which will become part of PhoneFavoriteMergedAdapter. // We don't construct the resultant adapter at this moment since it requires LayoutInflater // that will be available on onCreateView(). mContactTileAdapter = new PhoneFavoritesTileAdapter(activity, mContactTileAdapterListener, this); mContactTileAdapter.setPhotoLoader(ContactPhotoManagerNew.getInstance(activity)); } @Override public void onCreate(Bundle savedState) { super.onCreate(savedState); mAnimationDuration = getResources().getInteger(R.integer.fade_duration); } @Override public void onResume() { super.onResume(); getLoaderManager().getLoader(LOADER_ID_CONTACT_TILE).forceLoad(); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View parentView = inflater.inflate(R.layout.speed_dial_fragment, container, false); mListView = (PhoneFavoriteListView) parentView.findViewById(R.id.contact_tile_list); mListView.setOnItemClickListener(this); mListView.setVerticalScrollBarEnabled(false); mListView.setVerticalScrollbarPosition(View.SCROLLBAR_POSITION_RIGHT); mListView.setScrollBarStyle(ListView.SCROLLBARS_OUTSIDE_OVERLAY); mListView.getDragDropController().addOnDragDropListener(mContactTileAdapter); final ImageView dragShadowOverlay = (ImageView) getActivity().findViewById(R.id.contact_tile_drag_shadow_overlay); if (dragShadowOverlay != null) mListView.setDragShadowOverlay(dragShadowOverlay); else Log.wtf(TAG, "dragShadowOverly is null!!"); mEmptyView = parentView.findViewById(R.id.empty_list_view); DialerUtils.configureEmptyListView( mEmptyView, R.drawable.empty_speed_dial, R.string.speed_dial_empty, getResources()); mContactTileFrame = parentView.findViewById(R.id.contact_tile_frame); // mTileInteractionTeaserView = (TileInteractionTeaserView) inflater.inflate( // R.layout.tile_interactions_teaser_view, mListView, false); final LayoutAnimationController controller = new LayoutAnimationController( AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_in)); controller.setDelay(0); mListView.setLayoutAnimation(controller); mListView.setAdapter(mContactTileAdapter); mListView.setOnScrollListener(mScrollListener); mListView.setFastScrollEnabled(false); mListView.setFastScrollAlwaysVisible(false); return parentView; } @SuppressWarnings("unused") public boolean hasFrequents() { return mContactTileAdapter != null && mContactTileAdapter.getNumFrequents() > 0; } void setEmptyViewVisibility(final boolean visible) { final int previousVisibility = mEmptyView.getVisibility(); final int newVisibility = visible ? View.VISIBLE : View.GONE; if (previousVisibility != newVisibility) { final LayoutParams params = (LayoutParams) mContactTileFrame .getLayoutParams(); params.height = visible ? LayoutParams.WRAP_CONTENT : LayoutParams.MATCH_PARENT; mContactTileFrame.setLayoutParams(params); mEmptyView.setVisibility(newVisibility); } } @Override public void onStart() { super.onStart(); final Activity activity = getActivity(); try { mActivityScrollListener = (OnListFragmentScrolledListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnListFragmentScrolledListener"); } try { OnDragDropListener listener = (OnDragDropListener) activity; mListView.getDragDropController().addOnDragDropListener(listener); ((HostInterface) activity).setDragDropController(mListView.getDragDropController()); } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnDragDropListener and HostInterface"); } try { mPhoneNumberPickerActionListener = (OnPhoneNumberPickerActionListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement PhoneFavoritesFragment.listener"); } // Use initLoader() instead of restartLoader() to refraining unnecessary reload. // This method call implicitly assures ContactTileLoaderListener's onLoadFinished() will // be called, on which we'll check if "all" contacts should be reloaded again or not. getLoaderManager().initLoader(LOADER_ID_CONTACT_TILE, null, mContactTileLoaderListener); } /** * {@inheritDoc} * * This is only effective for elements provided by {@link #mContactTileAdapter}. * {@link #mContactTileAdapter} has its own logic for click events. */ @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { final int contactTileAdapterCount = mContactTileAdapter.getCount(); if (position <= contactTileAdapterCount) { Log.e(TAG, "onItemClick() event for unexpected position. " + "The position " + position + " is before \"all\" section. Ignored."); } } /** * Cache the current view offsets into memory. Once a relayout of views in the ListView * has happened due to a dataset change, the cached offsets are used to create animations * that slide views from their previous positions to their new ones, to give the appearance * that the views are sliding into their new positions. */ private void saveOffsets(int removedItemHeight) { final int firstVisiblePosition = mListView.getFirstVisiblePosition(); if (DEBUG) { Log.d(TAG, "Child count : " + mListView.getChildCount()); } for (int i = 0; i < mListView.getChildCount(); i++) { final View child = mListView.getChildAt(i); final int position = firstVisiblePosition + i; final long itemId = mContactTileAdapter.getItemId(position); if (DEBUG) { Log.d(TAG, "Saving itemId: " + itemId + " for list view child " + i + " Top: " + child.getTop()); } mItemIdTopMap.put(itemId, child.getTop()); mItemIdLeftMap.put(itemId, child.getLeft()); } mItemIdTopMap.put(KEY_REMOVED_ITEM_HEIGHT, removedItemHeight); } /* * Performs animations for the gridView */ private void animateGridView(final long... idsInPlace) { if (mItemIdTopMap.isEmpty()) { // Don't do animations if the database is being queried for the first time and // the previous item offsets have not been cached, or the user hasn't done anything // (dragging, swiping etc) that requires an animation. return; } final ViewTreeObserver observer = mListView.getViewTreeObserver(); observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() { @SuppressWarnings("unchecked") @Override public boolean onPreDraw() { observer.removeOnPreDrawListener(this); final int firstVisiblePosition = mListView.getFirstVisiblePosition(); final AnimatorSet animSet = new AnimatorSet(); final ArrayList<Animator> animators = new ArrayList<>(); for (int i = 0; i < mListView.getChildCount(); i++) { final View child = mListView.getChildAt(i); int position = firstVisiblePosition + i; final long itemId = mContactTileAdapter.getItemId(position); if (containsId(idsInPlace, itemId)) { animators.add(ObjectAnimator.ofFloat( child, "alpha", 0.0f, 1.0f)); break; } else { Integer startTop = mItemIdTopMap.get(itemId); Integer startLeft = mItemIdLeftMap.get(itemId); final int top = child.getTop(); final int left = child.getLeft(); int deltaX; int deltaY; if (startLeft != null) { if (startLeft != left) { deltaX = startLeft - left; animators.add(ObjectAnimator.ofFloat(child, "translationX", deltaX, 0.0f)); } } if (startTop != null) { if (startTop != top) { deltaY = startTop - top; animators.add(ObjectAnimator.ofFloat(child, "translationY", deltaY, 0.0f)); } } if (DEBUG) { Log.d(TAG, "Found itemId: " + itemId + " for list view child " + i + " Top: " + top + " Delta: " + deltaY); } } } if (animators.size() > 0) { animSet.setDuration(mAnimationDuration).playTogether(animators); animSet.start(); } mItemIdTopMap.clear(); mItemIdLeftMap.clear(); return true; } }); } private boolean containsId(long[] ids, long target) { // Linear search on array is fine because this is typically only 0-1 elements long for (long id : ids) { if (id == target) { return true; } } return false; } @Override public void onDataSetChangedForAnimation(long... idsInPlace) { animateGridView(idsInPlace); } @Override public void cacheOffsetsForDatasetChange() { saveOffsets(0); } public AbsListView getListView() { return mListView; } }
[ "rkrueger@silentcircle.com" ]
rkrueger@silentcircle.com
0788954beab45c477e7ed036701b6c7d99f2dcb9
a5f44c8b36a997284e8bfe9296772d96f827da47
/src/main/java/SRI/SRI/repository/PersonaRepo.java
c7ad7f94fb3199569065aadae242614bc66ef93a
[]
no_license
david17893578951/sri
20c30fd5bc1f6765e8446151d2668d5aab91d5ce
1bc0306c27f161350d94d359fb7df36d772aff10
refs/heads/master
2020-12-13T10:20:09.179125
2020-01-16T18:51:59
2020-01-16T18:51:59
234,388,607
0
0
null
null
null
null
UTF-8
Java
false
false
550
java
package SRI.SRI.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import SRI.SRI.model.FdiPersona; public interface PersonaRepo extends JpaRepository<FdiPersona, Integer> { @Modifying @Query("SELECT f FROM FdiPersona f where f.prsCedula=:nroId") public List<FdiPersona> getPersonabyCedula(@Param("nroId") String nroId); }
[ "jdfloresl@utn.edu.ec" ]
jdfloresl@utn.edu.ec
2fb2ee23570d161fe4f94f2e67f72454da280ec8
dc67b3b3321f0fb89cc2aababb6228b9dc8799e5
/jwsur_code/chapter2/awsClient3/Collections.java
ff91233511a952b41b824a7f9a3e021a4a2706c8
[]
no_license
gitrepo7777/jwsurcode
9316043d684c86e968a83d2a2649a5073ee873a8
0e4c25eb50179eb66732fc42f458c11f6f043aea
refs/heads/master
2020-07-03T12:17:26.193848
2014-06-12T15:00:29
2014-06-12T15:00:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
20,188
java
package awsClient3; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <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="Collection" maxOccurs="unbounded" minOccurs="0"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="CollectionSummary" minOccurs="0"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="LowestListPrice" type="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Price" minOccurs="0"/> * &lt;element name="HighestListPrice" type="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Price" minOccurs="0"/> * &lt;element name="LowestSalePrice" type="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Price" minOccurs="0"/> * &lt;element name="HighestSalePrice" type="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Price" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;element name="CollectionParent" minOccurs="0"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;element name="CollectionItem" maxOccurs="unbounded" minOccurs="0"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "collection" }) @XmlRootElement(name = "Collections") public class Collections { @XmlElement(name = "Collection") protected List<Collections.Collection> collection; /** * Gets the value of the collection 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 collection property. * * <p> * For example, to add a new item, do as follows: * <pre> * getCollection().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Collections.Collection } * * */ public List<Collections.Collection> getCollection() { if (collection == null) { collection = new ArrayList<Collections.Collection>(); } return this.collection; } /** * <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="CollectionSummary" minOccurs="0"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="LowestListPrice" type="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Price" minOccurs="0"/> * &lt;element name="HighestListPrice" type="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Price" minOccurs="0"/> * &lt;element name="LowestSalePrice" type="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Price" minOccurs="0"/> * &lt;element name="HighestSalePrice" type="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Price" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;element name="CollectionParent" minOccurs="0"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;element name="CollectionItem" maxOccurs="unbounded" minOccurs="0"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "collectionSummary", "collectionParent", "collectionItem" }) public static class Collection { @XmlElement(name = "CollectionSummary") protected Collections.Collection.CollectionSummary collectionSummary; @XmlElement(name = "CollectionParent") protected Collections.Collection.CollectionParent collectionParent; @XmlElement(name = "CollectionItem") protected List<Collections.Collection.CollectionItem> collectionItem; /** * Gets the value of the collectionSummary property. * * @return * possible object is * {@link Collections.Collection.CollectionSummary } * */ public Collections.Collection.CollectionSummary getCollectionSummary() { return collectionSummary; } /** * Sets the value of the collectionSummary property. * * @param value * allowed object is * {@link Collections.Collection.CollectionSummary } * */ public void setCollectionSummary(Collections.Collection.CollectionSummary value) { this.collectionSummary = value; } /** * Gets the value of the collectionParent property. * * @return * possible object is * {@link Collections.Collection.CollectionParent } * */ public Collections.Collection.CollectionParent getCollectionParent() { return collectionParent; } /** * Sets the value of the collectionParent property. * * @param value * allowed object is * {@link Collections.Collection.CollectionParent } * */ public void setCollectionParent(Collections.Collection.CollectionParent value) { this.collectionParent = value; } /** * Gets the value of the collectionItem 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 collectionItem property. * * <p> * For example, to add a new item, do as follows: * <pre> * getCollectionItem().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Collections.Collection.CollectionItem } * * */ public List<Collections.Collection.CollectionItem> getCollectionItem() { if (collectionItem == null) { collectionItem = new ArrayList<Collections.Collection.CollectionItem>(); } return this.collectionItem; } /** * <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="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "asin", "title" }) public static class CollectionItem { @XmlElement(name = "ASIN") protected String asin; @XmlElement(name = "Title") protected String title; /** * Gets the value of the asin property. * * @return * possible object is * {@link String } * */ public String getASIN() { return asin; } /** * Sets the value of the asin property. * * @param value * allowed object is * {@link String } * */ public void setASIN(String value) { this.asin = value; } /** * Gets the value of the title property. * * @return * possible object is * {@link String } * */ public String getTitle() { return title; } /** * Sets the value of the title property. * * @param value * allowed object is * {@link String } * */ public void setTitle(String value) { this.title = value; } } /** * <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="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "asin", "title" }) public static class CollectionParent { @XmlElement(name = "ASIN") protected String asin; @XmlElement(name = "Title") protected String title; /** * Gets the value of the asin property. * * @return * possible object is * {@link String } * */ public String getASIN() { return asin; } /** * Sets the value of the asin property. * * @param value * allowed object is * {@link String } * */ public void setASIN(String value) { this.asin = value; } /** * Gets the value of the title property. * * @return * possible object is * {@link String } * */ public String getTitle() { return title; } /** * Sets the value of the title property. * * @param value * allowed object is * {@link String } * */ public void setTitle(String value) { this.title = value; } } /** * <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="LowestListPrice" type="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Price" minOccurs="0"/> * &lt;element name="HighestListPrice" type="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Price" minOccurs="0"/> * &lt;element name="LowestSalePrice" type="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Price" minOccurs="0"/> * &lt;element name="HighestSalePrice" type="{http://webservices.amazon.com/AWSECommerceService/2008-10-06}Price" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "lowestListPrice", "highestListPrice", "lowestSalePrice", "highestSalePrice" }) public static class CollectionSummary { @XmlElement(name = "LowestListPrice") protected Price lowestListPrice; @XmlElement(name = "HighestListPrice") protected Price highestListPrice; @XmlElement(name = "LowestSalePrice") protected Price lowestSalePrice; @XmlElement(name = "HighestSalePrice") protected Price highestSalePrice; /** * Gets the value of the lowestListPrice property. * * @return * possible object is * {@link Price } * */ public Price getLowestListPrice() { return lowestListPrice; } /** * Sets the value of the lowestListPrice property. * * @param value * allowed object is * {@link Price } * */ public void setLowestListPrice(Price value) { this.lowestListPrice = value; } /** * Gets the value of the highestListPrice property. * * @return * possible object is * {@link Price } * */ public Price getHighestListPrice() { return highestListPrice; } /** * Sets the value of the highestListPrice property. * * @param value * allowed object is * {@link Price } * */ public void setHighestListPrice(Price value) { this.highestListPrice = value; } /** * Gets the value of the lowestSalePrice property. * * @return * possible object is * {@link Price } * */ public Price getLowestSalePrice() { return lowestSalePrice; } /** * Sets the value of the lowestSalePrice property. * * @param value * allowed object is * {@link Price } * */ public void setLowestSalePrice(Price value) { this.lowestSalePrice = value; } /** * Gets the value of the highestSalePrice property. * * @return * possible object is * {@link Price } * */ public Price getHighestSalePrice() { return highestSalePrice; } /** * Sets the value of the highestSalePrice property. * * @param value * allowed object is * {@link Price } * */ public void setHighestSalePrice(Price value) { this.highestSalePrice = value; } } } }
[ "ntend7777@gmail.com" ]
ntend7777@gmail.com
c068267e97d32c5f86fa5b5ff5456c16409d9172
97156abd527ae3782601350aaee2fab17f79bb2a
/myjpa/src/main/java/com/cos/myjpa/handler/GlobalExceptionHandler.java
15a393a832bdb4225256765be8a8320933d1003e
[]
no_license
LeeBG/Review_StringBoot
395eb1326f2f21b4012eb4a5ef97e5793b2f0ecf
bed39949216c58cc828d0b6c99c7ccce18539a9b
refs/heads/master
2023-06-27T18:41:40.118817
2021-07-24T05:22:09
2021-07-24T05:22:09
362,350,882
0
0
null
null
null
null
UTF-8
Java
false
false
1,410
java
package com.cos.myjpa.handler; import org.springframework.dao.DataIntegrityViolationException; import org.springframework.dao.EmptyResultDataAccessException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestController; import com.cos.myjpa.handler.ex.MyAuthenticationException; import com.cos.myjpa.web.dto.CommonRespDto; @RestController //데이터를 리턴할 수 있음. @ControllerAdvice //모든 Exception을 낚아챔 public class GlobalExceptionHandler { //그 중 IllegalArgumentException 이 발생하면 해당 함수 실행됨. @ExceptionHandler(value=DataIntegrityViolationException.class) public CommonRespDto<?> dataIntegrityViolation(Exception e){ return new CommonRespDto<>(-1,e.getMessage(),null); } @ExceptionHandler(value=IllegalArgumentException.class) public CommonRespDto<?> illegalArgument(Exception e){ return new CommonRespDto<>(-1,e.getMessage(),null); } @ExceptionHandler(value=EmptyResultDataAccessException.class) public CommonRespDto<?> emptyResultDataAccess(Exception e){ return new CommonRespDto<>(-1,e.getMessage(),null); } @ExceptionHandler(value=MyAuthenticationException.class) public CommonRespDto<?> MyAuthenticationE(Exception e){ return new CommonRespDto<>(-1,"로그인 후 사용해주세요",null); } }
[ "donny1848@gmail.com" ]
donny1848@gmail.com
a5d3024d58d86a375001df9c652b558b95c22cae
7dd889e2c8132eb6d37202f4351768c28865213e
/src/main/java/com/colegiows/rest/controllers/EstudianteController.java
db6327e4ca7da412b8c83f1ab7f1a2a9a65dda98
[]
no_license
danieldelgadomora/colegioWS
a2690034fc73cc96e1b467c9ece07d771a0d568d
8503de3328ee6a8cd6656cdc46c09d33e6778d27
refs/heads/master
2023-05-06T05:42:16.425519
2021-06-01T21:11:05
2021-06-01T21:11:05
359,955,490
0
0
null
null
null
null
UTF-8
Java
false
false
1,847
java
package com.colegiows.rest.controllers; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.colegiows.rest.models.EstudianteModel; import com.colegiows.rest.services.EstudianteService; import com.fasterxml.jackson.databind.util.JSONPObject; @RestController @CrossOrigin(origins = "http://localhost:4200") @RequestMapping("/estudiante") public class EstudianteController { @Autowired EstudianteService estudianteService; @GetMapping() public ArrayList<EstudianteModel> getEstudiantes(){ return estudianteService.getEstudiantes(); } @GetMapping(path = "/estcol/{col}") public List<Map<String,Object>> getEstCol(@PathVariable("col") int col){ return estudianteService.getEstCol(col); } @PostMapping(path = "/addestudiante") public EstudianteModel addEstudiante(@RequestBody EstudianteModel estudiante) { return this.estudianteService.addEstudiante(estudiante); } @PostMapping(path = "/addmatricula/{asig}") public void addMatriculaNuevoEst(@RequestBody EstudianteModel estudiante, @PathVariable("asig") int asig) { estudianteService.addMatriculaNuevoEst(estudiante,asig ); } @PostMapping(path = "/addmatriculaant/{asig}/{est}") public void addMatriculaAntiguoEst(@PathVariable("asig") int asig, @PathVariable("est") int est) { estudianteService.addMatriculaAntiguoEst(asig,est ); } }
[ "daaldemo@gmail.com" ]
daaldemo@gmail.com
035f4a063d5f57b8bfcce12be505c97fb6bbbabe
b41b553a285bfea105ad4b68943eb1c29f976ca2
/core/src/main/java/io/github/thanktoken/core/api/attribute/AttributeReadValue.java
fb751470a6a14f3f1bda31e9befc5475e8c78401
[ "Apache-2.0" ]
permissive
thanktoken/thanks4java
c12f32f5b778a843cfefc577e664e8768ab4aef7
9ccc2aca2375247c168e8b64c0241de78408367f
refs/heads/master
2021-04-09T16:00:43.851308
2020-03-25T11:28:20
2020-03-25T11:28:20
125,636,409
2
0
null
null
null
null
UTF-8
Java
false
false
1,648
java
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ package io.github.thanktoken.core.api.attribute; import java.time.Instant; import io.github.thanktoken.core.api.currency.ThankCurrency; import io.github.thanktoken.core.api.data.ThankDataObject; import io.github.thanktoken.core.api.token.ThankToken; import io.github.thanktoken.core.api.value.ThankValue; /** * Interface to {@link #getValue() read} the {@link ThankValue}. */ public interface AttributeReadValue extends ThankDataObject { /** * @return the current value of this object in the actual * {@link io.github.thanktoken.core.api.token.header.ThankTokenHeader#getCurrency() currency}. The value is determined * from the original {@link io.github.thanktoken.core.api.token.header.ThankTokenHeader#getAmount() amount} and changes * over the time {@link ThankCurrency#getValue(ThankToken, Instant) according} to its * {@link io.github.thanktoken.core.api.token.header.ThankTokenHeader#getCurrency() currency}. * @see #getValue(Instant) * @see io.github.thanktoken.core.api.token.ThankToken#getValue() */ default ThankValue getValue() { return getValue(Instant.now()); } /** * @param timestamp is the point in time for which the value shall be calculated. Should not be before the * {@link io.github.thanktoken.core.api.token.header.ThankTokenHeader#getTimestamp() creation timestamp}. * @return the value of this object at the given {@link Instant}. * @see #getValue() */ ThankValue getValue(Instant timestamp); }
[ "hohwille@users.sourceforge.net" ]
hohwille@users.sourceforge.net