blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
332
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
557 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
82 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
5.41M
extension
stringclasses
11 values
content
stringlengths
7
5.41M
authors
listlengths
1
1
author
stringlengths
0
161
90fd79d68f0903fca9558a0258cff8c8168d2481
e9342d4abdc8fbe726624a4e4b12a71a6fec0e89
/src/com/h.java
c84ee62523304b9c79929425508bdb4f51a2aba8
[]
no_license
laizheli/Project01
66cbae72229eec9962f744c781c77da208ea21af
482af2885f011c5dc1f2bf3ae9bc1f8a6247971e
refs/heads/master
2022-08-05T23:07:40.978803
2020-05-29T15:07:55
2020-05-29T15:07:55
267,887,200
0
0
null
null
null
null
UTF-8
Java
false
false
33
java
package com; public class h { }
[ "goodMorning_glb@guigu.com" ]
goodMorning_glb@guigu.com
a06c24c1ac22d57339cc06e26d795829c4e4eb5a
4f116476f06a59a1528c20cf1caac0efd6508f83
/core/model/src/main/java/it/unibz/inf/ontop/model/atom/AtomFactory.java
a9e5b0731053a42d3e9dc1cad103aed3b6f33306
[ "CC-BY-4.0", "Apache-2.0" ]
permissive
fanavarro/ontop
280423c8056de8e7a34a83825dabb0b6b1b9707d
d01fbc7ebb3e8326b8eb14854359a796b07096ca
refs/heads/version3
2019-07-07T16:48:50.903730
2018-04-24T14:12:55
2018-04-24T14:13:18
87,398,333
0
0
null
2017-04-06T07:15:03
2017-04-06T07:15:03
null
UTF-8
Java
false
false
1,921
java
package it.unibz.inf.ontop.model.atom; import com.google.common.collect.ImmutableList; import it.unibz.inf.ontop.model.term.*; import it.unibz.inf.ontop.model.term.functionsymbol.Predicate; public interface AtomFactory { AtomPredicate getAtomPredicate(String name, int arity); AtomPredicate getAtomPredicate(Predicate datalogPredicate); /** * Beware: a DataAtom is immutable */ DataAtom getDataAtom(AtomPredicate predicate, ImmutableList<? extends VariableOrGroundTerm> terms); /** * Beware: a DataAtom is immutable */ DataAtom getDataAtom(AtomPredicate predicate, VariableOrGroundTerm... terms); DistinctVariableDataAtom getDistinctVariableDataAtom(AtomPredicate predicate, ImmutableList<? extends VariableOrGroundTerm> arguments); DistinctVariableDataAtom getDistinctVariableDataAtom(AtomPredicate predicate, VariableOrGroundTerm ... arguments); DistinctVariableOnlyDataAtom getDistinctVariableOnlyDataAtom(AtomPredicate predicate, ImmutableList<Variable> arguments); DistinctVariableOnlyDataAtom getDistinctVariableOnlyDataAtom(AtomPredicate predicate, Variable ... arguments); VariableOnlyDataAtom getVariableOnlyDataAtom(AtomPredicate predicate, Variable... terms); VariableOnlyDataAtom getVariableOnlyDataAtom(AtomPredicate predicate, ImmutableList<Variable> terms); Function getTripleAtom(Term subject, Term predicate, Term object); /** * TODO: create an abstraction of DataAtom (Atom) that accepts arbitrary ImmutableTerms as arguments * (not only Variable or ground terms) */ ImmutableFunctionalTerm getImmutableTripleAtom(ImmutableTerm subject, ImmutableTerm predicate, ImmutableTerm object); }
[ "benjamin.cogrel@bcgl.fr" ]
benjamin.cogrel@bcgl.fr
2034847c6c8b19c2a311007e07f72130dd579307
012e9bd5bfbc5ceca4e36af55a7ddf4fce98b403
/code/app/src/main/java/com/yzb/card/king/ui/credit/activity/PaymentChoseActivity.java
cfd790923ef8c6c975e9c82c7df0d8b5961cc1e4
[]
no_license
litliang/ms
a7152567c2f0e4d663efdda39503642edd33b4b6
d7483bc76d43e060906c47acc1bc2c3179838249
refs/heads/master
2021-09-01T23:51:50.934321
2017-12-29T07:30:49
2017-12-29T07:30:49
115,697,248
1
0
null
null
null
null
UTF-8
Java
false
false
6,215
java
package com.yzb.card.king.ui.credit.activity; import android.content.Intent; import android.support.v7.app.AlertDialog; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.RelativeLayout; import android.widget.TextView; import com.yzb.card.king.R; import com.yzb.card.king.http.HttpCallBackData; import com.yzb.card.king.http.SimpleRequest; import com.yzb.card.king.sys.CardConstant; import com.yzb.card.king.sys.ServiceDispatcher; import com.yzb.card.king.ui.appwidget.AutomaticPaymentPop; import com.yzb.card.king.ui.base.BaseActivity; import com.yzb.card.king.ui.credit.adapter.ChosePayMentAdapter; import com.yzb.card.king.ui.credit.bean.CreditCard; import org.xutils.x; import java.util.HashMap; import java.util.Map; /** * 选择还款方式 */ public class PaymentChoseActivity extends BaseActivity implements View.OnClickListener { private RelativeLayout rl_huankuanMoney; private TextView money_huank; private int defaultPos; private LinearLayout panel_back; private Button sure; private CreditCard data; private String[] list = new String[]{"全额", "最低还款金额"}; private String hkMoney; private ImageView bankLogo; private TextView bankName, peopleName, latNum; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_payment_chose); initView(); reciveData(); } /** * 设置信息 */ private void setData() { if (data != null) { if (!TextUtils.isEmpty(data.getLogo())) { x.image().bind(bankLogo, ServiceDispatcher .getImageUrl(data.getLogo())); } bankName.setText(data.getBankName()); peopleName.setText(data.getUserName()); latNum.setText("尾号" + data.getSortNo()); } } /** * 接收信用卡信息 */ private void reciveData() { Intent i = getIntent(); if (i != null) { data = (CreditCard) i.getSerializableExtra("data"); if ("1".equals(data.getAutoType())) { defaultPos = 0; money_huank.setText(list[0]); } else if ("2".equals(data.getAutoType())) { defaultPos = 1; money_huank.setText(list[1]); } setData(); } } private void initView() { rl_huankuanMoney = (RelativeLayout) findViewById(R.id.rl_huankuanMoney); rl_huankuanMoney.setOnClickListener(this); sure = (Button) findViewById(R.id.sure); bankLogo = (ImageView) findViewById(R.id.img_logo); bankName = (TextView) findViewById(R.id.bankName); peopleName = (TextView) findViewById(R.id.peopleName); latNum = (TextView) findViewById(R.id.lastNum); sure.setOnClickListener(this); panel_back = (LinearLayout) findViewById(R.id.panel_back); panel_back.setOnClickListener(this); money_huank = (TextView) findViewById(R.id.money_huank); } @Override public void onClick(View view) { switch (view.getId()) { case R.id.panel_back: finish(); break; case R.id.rl_huankuanMoney: showDialog(); break; case R.id.sure: //确定 sureSet(view); break; } } private void sureSet(final View view) { Map<String, Object> param = new HashMap<>(); if (defaultPos == 0) { hkMoney = "1"; } else if (defaultPos == 1) { hkMoney = "2"; } param.put("autoType", hkMoney); param.put("creditId", data.getId()); new SimpleRequest(CardConstant.CREDIT_UPDATE, param).sendRequest(new HttpCallBackData() { @Override public void onStart() { } @Override public void onSuccess(Object o) { data.setAutoType(hkMoney); AutomaticPaymentPop pop = new AutomaticPaymentPop(PaymentChoseActivity.this); pop.openPop(); RepaymentActivity.setData(data); CardManageActivity.setData(data); } @Override public void onFailed(Object o) { } @Override public void onCancelled(Object o) { } @Override public void onFinished() { } }); } private void showDialog() { LinearLayout linearLayoutMain = new LinearLayout(this);//自定义一个布局文件 linearLayoutMain.setLayoutParams(new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); ListView listView = new ListView(this);//this为获取当前的上下文 listView.setFadingEdgeLength(0); listView.setDivider(null); final ChosePayMentAdapter a = new ChosePayMentAdapter(this, list, defaultPos); listView.setAdapter(a); linearLayoutMain.addView(listView);//往这个布局中加入listview final AlertDialog dialog = new AlertDialog.Builder(this) .setView(linearLayoutMain)//在这里把写好的这个listview的布局加载dialog中 .create(); a.setOnItemClickListener(new ChosePayMentAdapter.OnItemClickListener() { @Override public void setOnItemClickListener(int postion) { defaultPos = postion; money_huank.setText(list[postion]); dialog.cancel(); } }); dialog.setCanceledOnTouchOutside(false);//使除了dialog以外的地方不能被点击 dialog.show(); } }
[ "864631546@qq.com" ]
864631546@qq.com
61f25e698ac7eefd2866b25b38c539a2499532be
5175eadcc515b39954612e88a4eeb2027d12f72d
/security/src/main/java/com/wonders/security/controller/AccountController.java
dd56bedbf4b90792aad4a1590f76a6ac764d40f2
[]
no_license
smilejianhua/airport
5796ffb0eb4f45a805a8a3d95724edcd5f870072
2f65b43cef742f5a6c19bb50be17fe6d06fd1ce2
refs/heads/master
2020-05-20T06:00:34.623504
2013-02-03T05:20:25
2013-02-03T05:20:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
684
java
package com.wonders.security.controller; import javax.inject.Inject; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import com.wonders.framework.controller.AbstractCrudController; import com.wonders.framework.repository.MyRepository; import com.wonders.security.entity.Account; import com.wonders.security.repository.AccountRepository; @Controller @RequestMapping("accounts") public class AccountController extends AbstractCrudController<Account, Long> { @Inject private AccountRepository accountRepository; @Override protected MyRepository<Account, Long> getRepository() { return accountRepository; } }
[ "wangqiangsuperman123@gmail.com" ]
wangqiangsuperman123@gmail.com
05de2be632bd90757c00445e9a03072c56380deb
de9f0f6ac99ce53e58a4f0b0dfdfe7c9229e9dcd
/src/main/java/com/p2psys/payment/tenpay/TenpayRequestHandler.java
7fdfe1324780e76f3e12980b635b80f70800b507
[]
no_license
learningtcc/people-to-people-loan-system
591838a40169dc1fb4a4d9860fe538fa2cf5d30f
fa56b5f0d4fcd04c8fca246abc05d4483053b02b
refs/heads/master
2021-03-16T05:07:21.612766
2014-10-13T15:08:43
2014-10-13T15:08:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,769
java
package com.p2psys.payment.tenpay; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.p2psys.util.tenpayUtil.MD5Util; import com.p2psys.util.tenpayUtil.TenpayUtil; /** * 请求处理类 * 请求处理类继承此类,重写createSign方法即可。 * */ /** 网关url地址 */ /** 密钥 */ /** 请求的参数 */ /** debug信息 */ /** * 构造函数 * @param request * @param response */ /** *初始化函数。 */ //nothing to do /** *获取入口地址,不包含参数值 */ /** *设置入口地址,不包含参数值 */ /** *获取密钥 */ /** *设置密钥 */ /** * 获取参数值 * @param parameter 参数名称 * @return String */ /** * 设置参数值 * @param parameter 参数名称 * @param parameterValue 参数值 */ /** * 返回所有的参数 * @return SortedMap */ /** *获取debug信息 */ /** * 获取带参数的请求URL * @return String * @throws UnsupportedEncodingException */ //去掉最后一个& /** * 创建md5摘要,规则是:按参数名称a-z排序,遇到空值的参数不参加签名。 */ //debug信息 /** *设置debug信息 */ /** * 请求处理类 * 请求处理类继承此类,重写createSign方法即可。 * */ /** 网关url地址 */ /** 密钥 */ /** 请求的参数 */ /** debug信息 */ /** * 构造函数 * @param request * @param response */ /** *初始化函数。 */ //nothing to do /** *获取入口地址,不包含参数值 */ /** *设置入口地址,不包含参数值 */ /** *获取密钥 */ /** *设置密钥 */ /** * 获取参数值 * @param parameter 参数名称 * @return String */ /** * 设置参数值 * @param parameter 参数名称 * @param parameterValue 参数值 */ /** * 返回所有的参数 * @return SortedMap */ /** *获取debug信息 */ /** * 获取带参数的请求URL * @return String * @throws UnsupportedEncodingException */ //去掉最后一个& /** * 创建md5摘要,规则是:按参数名称a-z排序,遇到空值的参数不参加签名。 */ //debug信息 /** *设置debug信息 */ /** * 请求处理类 请求处理类继承此类,重写createSign方法即可。 * * */ public class TenpayRequestHandler { /** 网关url地址 */ private String gateUrl; /** 密钥 */ private String key; /** 请求的参数 */ private SortedMap parameters; /** debug信息 */ private String debugInfo; private HttpServletRequest request; private HttpServletResponse response; /** * 构造函数 * * @param request * @param response */ public TenpayRequestHandler(HttpServletRequest request, HttpServletResponse response) { this.request = request; this.response = response; this.gateUrl = "https://gw.tenpay.com/gateway/pay.htm"; this.key = ""; this.parameters = new TreeMap(); this.debugInfo = ""; } /** * 初始化函数。 */ public void init() { // nothing to do } /** * 获取入口地址,不包含参数值 */ public String getGateUrl() { return gateUrl; } /** * 设置入口地址,不包含参数值 */ public void setGateUrl(String gateUrl) { this.gateUrl = gateUrl; } /** * 获取密钥 */ public String getKey() { return key; } /** * 设置密钥 */ public void setKey(String key) { this.key = key; } /** * 获取参数值 * * @param parameter * 参数名称 * @return String */ public String getParameter(String parameter) { String s = (String) this.parameters.get(parameter); return (null == s) ? "" : s; } /** * 设置参数值 * * @param parameter * 参数名称 * @param parameterValue * 参数值 */ public void setParameter(String parameter, String parameterValue) { String v = ""; if (null != parameterValue) { v = parameterValue.trim(); } this.parameters.put(parameter, v); } /** * 返回所有的参数 * * @return SortedMap */ public SortedMap getAllParameters() { return this.parameters; } /** * 获取debug信息 */ public String getDebugInfo() { return debugInfo; } /** * 获取带参数的请求URL * * @return String * @throws UnsupportedEncodingException */ public String getRequestURL() throws UnsupportedEncodingException { this.createSign(); StringBuffer sb = new StringBuffer(); String enc = TenpayUtil.getCharacterEncoding(this.request, this.response); Set es = this.parameters.entrySet(); Iterator it = es.iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); String k = (String) entry.getKey(); String v = (String) entry.getValue(); if (!"spbill_create_ip".equals(k)) { sb.append(k + "=" + URLEncoder.encode(v, enc) + "&"); } else { sb.append(k + "=" + v.replace(".", "%2E") + "&"); } } // 去掉最后一个& String reqPars = sb.substring(0, sb.lastIndexOf("&")); return this.getGateUrl() + "?" + reqPars; } public void doSend() throws UnsupportedEncodingException, IOException { this.response.sendRedirect(this.getRequestURL()); } /** * 创建md5摘要,规则是:按参数名称a-z排序,遇到空值的参数不参加签名。 */ protected void createSign() { StringBuffer sb = new StringBuffer(); Set es = this.parameters.entrySet(); Iterator it = es.iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); String k = (String) entry.getKey(); String v = (String) entry.getValue(); if (null != v && !"".equals(v) && !"sign".equals(k) && !"key".equals(k)) { sb.append(k + "=" + v + "&"); } } sb.append("key=" + this.getKey()); String enc = TenpayUtil.getCharacterEncoding(this.request, this.response); String sign = MD5Util.MD5Encode(sb.toString(), enc).toLowerCase(); this.setParameter("sign", sign); // debug信息 this.setDebugInfo(sb.toString() + " => sign:" + sign); } /** * 设置debug信息 */ protected void setDebugInfo(String debugInfo) { this.debugInfo = debugInfo; } protected HttpServletRequest getHttpServletRequest() { return this.request; } protected HttpServletResponse getHttpServletResponse() { return this.response; } }
[ "codeshareman@gmail.com@8ac4335a-5906-df81-b05e-e3fe2711c162" ]
codeshareman@gmail.com@8ac4335a-5906-df81-b05e-e3fe2711c162
ff9703b26f8cb4c7fb36303c9fe419b0d6e62fdb
b60ee49abfbefefb8f7400278ab9be46c4ab692c
/app/src/test/java/appewtc/masterung/crimeinformer/ExampleUnitTest.java
ff2c887dac3f1c053e20513710ed5b13d4ae2d35
[]
no_license
masterUNG/CrimeInformer
aa90dfb8dcc6ddca8e79477fb2da5fc93b8e2955
8084292db46887f540bca48a074556698178fd2b
refs/heads/master
2021-01-10T07:21:49.666168
2016-04-03T11:12:21
2016-04-03T11:12:21
45,095,921
0
0
null
null
null
null
UTF-8
Java
false
false
324
java
package appewtc.masterung.crimeinformer; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "phrombutr@gmail.com" ]
phrombutr@gmail.com
b18814c3c3b74ce89541125995d814b8fa9fd7f2
766bb2d4a11e65eba0e15c288c7363e94643a745
/authorbook_final/src/tests/AutorTest.java
0fe638b34359ea9e036cdd2cc5e0d1f0d60995f8
[]
no_license
mezzobian/schoolproject
9c9bf956a7febabc9307fe3a7528c3bced2cc635
92748b9377f9cf318dcf5086efb18a6d2dc32443
refs/heads/master
2020-03-19T06:42:40.692556
2018-06-24T20:36:41
2018-06-24T20:36:41
136,048,018
0
0
null
null
null
null
UTF-8
Java
false
false
1,453
java
package tests; import dao.AuthorDAO; import dao.AuthorDAOSimple; import models.Author; import java.util.Collections; import java.util.List; public class AutorTest { public static void main(String[] args) { Author a1 = new Author(100, "Meier", "Rolf", "D"); Author a2 = new Author(101, "Brigger", "Eugen A.", "CH"); Author a3 = new Author(102, "Famos", "Luisa", "CH"); Author a4 = new Author(100, "Abgottspon", "Johann", "CH"); AuthorDAO autorData = new AuthorDAOSimple(); System.out.println("Alle Autoren: " + autorData.getAll() ); autorData.insert( a1 ); autorData.insert( a2 ); autorData.insert( a3 ); System.out.println("Alle Autoren: " + autorData.getAll() ); System.out.println("L�schen von " + a1); autorData.delete(a1.getId()); System.out.println("Alle Autoren: " + autorData.getAll() ); System.out.println("�ndern von " + a2); autorData.update( new Author(101, "Brigger", "Eugen", "CH")); System.out.println("Alle Autoren: " + autorData.getAll() ); System.out.println("Hinzuf�gen von " + a4); autorData.insert( a4 ); System.out.println("Alle Autoren: " + autorData.getAll() ); List<Author> l = autorData.getAll(); Collections.sort( l, Author.NAME_CMP ); System.out.println("Alle Autoren (sortiert nach Name): " + l); } }
[ "yanick.schneider.94@gmail.com" ]
yanick.schneider.94@gmail.com
56ec502e2675fa4b9a319b85bf9934e7ce39de6e
4afaedf2bbc959c2e0d2f8e330c6ecdf060d26d7
/src/main/java/com/qianfeng/fxmall/goods/dao/IWxbGoodDAO.java
4afdcd4ae9a8abceb61e8d2573648c9e40b93dad
[]
no_license
Rzxu/demo1
e60945fa1070543d740b370fa595e226dc262847
165ef293fcffa00f4d311f4ebdb4cdfa018d8542
refs/heads/master
2020-05-03T08:12:43.889504
2019-03-30T06:48:20
2019-03-30T06:48:20
178,520,004
0
0
null
null
null
null
UTF-8
Java
false
false
345
java
package com.qianfeng.fxmall.goods.dao; import com.qianfeng.fxmall.goods.bean.WxbGood; import java.util.List; public interface IWxbGoodDAO { List<WxbGood> selectWxbGoodByPage(int Page); void insertWxbGoodAndSku(WxbGood wxbGood); void updateWxbGood(WxbGood wxbGood); void deleteGood(Integer goodId); int wxbGoodCount(); }
[ "1241108649@qq.com" ]
1241108649@qq.com
56348602cb041fdb0de3f6cef3d8973b2c2ea6d2
049de769a61967e165b947ef132978cef53f2a38
/src/main/java/co/id/spring/model/MapModel.java
300adaffffd10ee32e4752cc98e3276c783fc3b4
[]
no_license
AndryTry/Java-spring-MVC
dde0ae4f122f3413c4216f10a7ff8de0e51aed70
f5e3673d761f1d6d73e6a2e28567fc0a9e2b660c
refs/heads/master
2022-12-22T21:06:42.322698
2019-11-06T09:29:17
2019-11-06T09:29:17
219,944,939
0
0
null
2022-12-16T08:36:42
2019-11-06T08:13:12
JavaScript
UTF-8
Java
false
false
312
java
package co.id.spring.model; public class MapModel { private String id; private String title; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } }
[ "andri.tri03@gmail.com" ]
andri.tri03@gmail.com
8f6a1ded61f41a0f669459555ac299d0689dedfd
bde0db4c607b16c04bcb2924c48ee296ff545991
/src/main/java/com/github/jackieonway/util/CodeUtil.java
45b0d4511764bbb726cb31271b74d39d54db7d8d
[ "Apache-2.0" ]
permissive
jacdese/jackie-tool
9c64e1a814a16474793473f39e56bafb212b8226
5d01feb346aea3a3ad8e6e9486a27ae7f83acb0d
refs/heads/main
2023-02-21T18:20:25.966608
2021-01-28T03:20:22
2021-01-28T03:20:22
333,640,091
1
0
Apache-2.0
2021-01-28T03:59:16
2021-01-28T03:59:15
null
UTF-8
Java
false
false
1,147
java
package com.github.jackieonway.util; import com.github.jackieonway.util.security.Base64; import java.security.SecureRandom; import java.util.Random; /** * @author Jackie */ public enum CodeUtil { /** * CodeUtil 实例 */ INSTANCE; /** * 获取盐值 * @return: String */ public static String getSalt() { Random random = new SecureRandom(); byte[] salt = new byte[8]; random.nextBytes(salt); return Base64.encode(salt); } /** * 获取num位随机码 * @param num 位数 * @return: 随机数字符串 */ public static String getRandomCode(int num) { StringBuilder digitDivisor = new StringBuilder("1"); for (int i = 1; i < num; i++) { digitDivisor.append("0"); } return Integer.toString( (new SecureRandom().nextInt(9) + 1) * Integer.parseInt(digitDivisor.toString())); } /** * 获取八位随机码 第一位为大写字母,第二位为小写字母,后六位为数字 * @return 随机码 */ public static String getEightRandomCode(){ return String.valueOf((char) Math.round(Math.random() * 25 + 65)) + (char) Math.round(Math.random() * 25 + 97) + getRandomCode(6); } }
[ "1254825871@qq.com" ]
1254825871@qq.com
33015bdbc415f46657cb8fae8578c962f88484f7
d2322c928738e6a52deafa36aa4fb8737eeaed27
/src/org/expeditee/simple/SReal.java
20dc0b87ee29734cf2392a302d9898e625b3d7e6
[]
no_license
lostminty/Expeditee2014
a009dd5cc09151e67652181ff62843e9761b88f1
181bcf6416c20a6e9d806691e7f811e41d502f06
refs/heads/master
2021-01-18T06:23:06.574464
2014-05-28T00:18:19
2014-05-28T00:18:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,063
java
package org.expeditee.simple; public class SReal extends SPrimitive<Double> { public static String prefix = SVariable.prefix + "r" + SVariable.separator; public SReal() { super(); } public SReal(String name, Double value) { super(name, value); } public SReal(double value) throws Exception { super(value); } public SReal(float value) throws Exception { super((double) value); } @Override public void parse(String s) throws Exception { if (s.equals("")) value_ = 0.0; else { try { value_ = Double.parseDouble(s); } catch (NumberFormatException ne) { value_ = (double) Long.decode(s); } } } @Override public Boolean booleanValue() { return value_ > 0; } @Override public Long integerValue() { return Math.round(value_); } @Override public Double doubleValue() { return value_; } @Override public Character characterValue() { return new Character((char) Math.round(value_)); } @Override public void setValue(SPrimitive v) throws IncorrectTypeException { value_ = v.doubleValue(); } }
[ "ascent12@hotmail.com" ]
ascent12@hotmail.com
a205c4d820c9ef65dee0d63767989f015742dd31
ea91902c1b03c5431a333c1530efe60e76c04a6d
/shared_resources/src/main/java/com/thewizrd/shared_resources/controls/ForecastItemViewModel.java
aa8cc1e48ea4afc5d5a33a9c84d240bb5acde74b
[ "Apache-2.0" ]
permissive
hophongit98/SimpleWeather-Android
48b27b75ece7bf7409c6dc1870434a9871204959
61c0cb750d3a11a85154f07bbf2f3768e1c8b866
refs/heads/master
2023-01-12T18:12:34.438698
2020-11-26T05:43:50
2020-11-26T05:43:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
14,141
java
package com.thewizrd.shared_resources.controls; import android.content.Context; import android.util.Log; import androidx.core.util.ObjectsCompat; import com.thewizrd.shared_resources.R; import com.thewizrd.shared_resources.SimpleLibrary; import com.thewizrd.shared_resources.utils.ConversionMethods; import com.thewizrd.shared_resources.utils.DateTimeUtils; import com.thewizrd.shared_resources.utils.LocaleUtils; import com.thewizrd.shared_resources.utils.Logger; import com.thewizrd.shared_resources.utils.Settings; import com.thewizrd.shared_resources.utils.StringUtils; import com.thewizrd.shared_resources.utils.Units; import com.thewizrd.shared_resources.utils.WeatherUtils; import com.thewizrd.shared_resources.weatherdata.Forecast; import com.thewizrd.shared_resources.weatherdata.TextForecast; import com.thewizrd.shared_resources.weatherdata.UV; import com.thewizrd.shared_resources.weatherdata.WeatherManager; import java.text.DecimalFormat; import java.util.ArrayList; public class ForecastItemViewModel extends BaseForecastItemViewModel { private String loTemp; private String conditionLongDesc; public ForecastItemViewModel(Forecast forecast, TextForecast... txtForecasts) { final Context context = SimpleLibrary.getInstance().getAppContext(); wm = WeatherManager.getInstance(); final boolean isFahrenheit = Units.FAHRENHEIT.equals(Settings.getTemperatureUnit()); final DecimalFormat df = (DecimalFormat) DecimalFormat.getInstance(LocaleUtils.getLocale()); df.applyPattern("0.##"); detailExtras = new ArrayList<>(WeatherDetailsType.values().length); weatherIcon = forecast.getIcon(); date = forecast.getDate().format(DateTimeUtils.ofPatternForUserLocale(context.getString(R.string.forecast_date_format))); shortDate = date; condition = wm.supportsWeatherLocale() ? forecast.getCondition() : wm.getWeatherCondition(forecast.getIcon()); try { if (forecast.getHighF() != null && forecast.getHighC() != null) { int value = isFahrenheit ? Math.round(forecast.getHighF()) : Math.round(forecast.getHighC()); hiTemp = String.format(LocaleUtils.getLocale(), "%d°", value); } else { hiTemp = "--"; } } catch (NumberFormatException nFe) { hiTemp = "--"; Logger.writeLine(Log.ERROR, nFe); } try { if (forecast.getLowF() != null && forecast.getLowC() != null) { int value = isFahrenheit ? Math.round(forecast.getLowF()) : Math.round(forecast.getLowC()); loTemp = String.format(LocaleUtils.getLocale(), "%d°", value); } else { loTemp = "--"; } } catch (NumberFormatException nFe) { loTemp = "--"; Logger.writeLine(Log.ERROR, nFe); } // Extras if (forecast.getExtras() != null) { if (forecast.getExtras().getFeelslikeF() != null && (!ObjectsCompat.equals(forecast.getExtras().getFeelslikeF(), forecast.getExtras().getFeelslikeC()))) { int value = isFahrenheit ? Math.round(forecast.getExtras().getFeelslikeF()) : Math.round(forecast.getExtras().getFeelslikeC()); detailExtras.add(new DetailItemViewModel(WeatherDetailsType.FEELSLIKE, String.format(LocaleUtils.getLocale(), "%d°", value))); } if (forecast.getExtras().getPop() != null && forecast.getExtras().getPop() >= 0) detailExtras.add(new DetailItemViewModel(WeatherDetailsType.POPCHANCE, forecast.getExtras().getPop() + "%")); if (forecast.getExtras().getQpfRainIn() != null && forecast.getExtras().getQpfRainIn() >= 0) { final String unit = Settings.getPrecipitationUnit(); float precipValue; String precipUnit; switch (unit) { case Units.INCHES: default: precipValue = forecast.getExtras().getQpfRainIn(); precipUnit = context.getString(R.string.unit_in); break; case Units.MILLIMETERS: precipValue = forecast.getExtras().getQpfRainMm(); precipUnit = context.getString(R.string.unit_mm); break; } detailExtras.add(new DetailItemViewModel(WeatherDetailsType.POPRAIN, String.format(LocaleUtils.getLocale(), "%s %s", df.format(precipValue), precipUnit) ) ); } if (forecast.getExtras().getQpfSnowIn() != null && forecast.getExtras().getQpfSnowIn() >= 0) { final String unit = Settings.getPrecipitationUnit(); float precipValue; String precipUnit; switch (unit) { case Units.INCHES: default: precipValue = forecast.getExtras().getQpfSnowIn(); precipUnit = context.getString(R.string.unit_in); break; case Units.MILLIMETERS: precipValue = forecast.getExtras().getQpfSnowCm() * 10; precipUnit = context.getString(R.string.unit_mm); break; } detailExtras.add(new DetailItemViewModel(WeatherDetailsType.POPSNOW, String.format(LocaleUtils.getLocale(), "%s %s", df.format(precipValue), precipUnit) ) ); } if (forecast.getExtras().getCloudiness() != null && forecast.getExtras().getCloudiness() >= 0) detailExtras.add(new DetailItemViewModel(WeatherDetailsType.POPCLOUDINESS, forecast.getExtras().getCloudiness() + "%")); if (forecast.getExtras().getHumidity() != null) { detailExtras.add(new DetailItemViewModel(WeatherDetailsType.HUMIDITY, String.format(LocaleUtils.getLocale(), "%d%%", forecast.getExtras().getHumidity()))); } if (forecast.getExtras().getDewpointF() != null && (!ObjectsCompat.equals(forecast.getExtras().getDewpointF(), forecast.getExtras().getDewpointC()))) { detailExtras.add(new DetailItemViewModel(WeatherDetailsType.DEWPOINT, String.format(LocaleUtils.getLocale(), "%d°", isFahrenheit ? Math.round(forecast.getExtras().getDewpointF()) : Math.round(forecast.getExtras().getDewpointC()) )) ); } if (forecast.getExtras().getUvIndex() != null && forecast.getExtras().getUvIndex() >= 0) { UV uv = new UV(forecast.getExtras().getUvIndex()); detailExtras.add(new DetailItemViewModel(uv)); } if (forecast.getExtras().getPressureIn() != null && forecast.getExtras().getPressureMb() != null) { final String unit = Settings.getPressureUnit(); float pressureVal; String pressureUnit; switch (unit) { case Units.INHG: default: pressureVal = forecast.getExtras().getPressureIn(); pressureUnit = context.getString(R.string.unit_inHg); break; case Units.MILLIBAR: pressureVal = forecast.getExtras().getPressureMb(); pressureUnit = context.getString(R.string.unit_mBar); break; } detailExtras.add(new DetailItemViewModel(WeatherDetailsType.PRESSURE, String.format(LocaleUtils.getLocale(), "%s %s", df.format(pressureVal), pressureUnit))); } if (forecast.getExtras().getWindMph() != null && forecast.getExtras().getWindKph() != null && forecast.getExtras().getWindMph() >= 0 && forecast.getExtras().getWindDegrees() != null && forecast.getExtras().getWindDegrees() >= 0) { final String unit = Settings.getSpeedUnit(); int speedVal; String speedUnit; switch (unit) { case Units.MILES_PER_HOUR: default: speedVal = Math.round(forecast.getExtras().getWindMph()); speedUnit = context.getString(R.string.unit_mph); break; case Units.KILOMETERS_PER_HOUR: speedVal = Math.round(forecast.getExtras().getWindKph()); speedUnit = context.getString(R.string.unit_kph); break; case Units.METERS_PER_SECOND: speedVal = Math.round(ConversionMethods.kphToMsec(forecast.getExtras().getWindKph())); speedUnit = context.getString(R.string.unit_msec); break; } windSpeed = String.format(LocaleUtils.getLocale(), "%d %s", speedVal, speedUnit); windDirection = forecast.getExtras().getWindDegrees(); windDir = WeatherUtils.getWindDirection(windDirection); detailExtras.add(new DetailItemViewModel(WeatherDetailsType.WINDSPEED, String.format(LocaleUtils.getLocale(), "%s, %s", windSpeed, windDir), windDirection)); } if (forecast.getExtras().getWindGustMph() != null && forecast.getExtras().getWindGustKph() != null && forecast.getExtras().getWindGustMph() >= 0) { final String unit = Settings.getSpeedUnit(); int speedVal; String speedUnit; switch (unit) { case Units.MILES_PER_HOUR: default: speedVal = Math.round(forecast.getExtras().getWindGustMph()); speedUnit = context.getString(R.string.unit_mph); break; case Units.KILOMETERS_PER_HOUR: speedVal = Math.round(forecast.getExtras().getWindGustKph()); speedUnit = context.getString(R.string.unit_kph); break; case Units.METERS_PER_SECOND: speedVal = Math.round(ConversionMethods.kphToMsec(forecast.getExtras().getWindGustKph())); speedUnit = context.getString(R.string.unit_msec); break; } String windGustSpeed = String.format(LocaleUtils.getLocale(), "%d %s", speedVal, speedUnit); detailExtras.add(new DetailItemViewModel(WeatherDetailsType.WINDGUST, windGustSpeed)); } if (forecast.getExtras().getVisibilityMi() != null && forecast.getExtras().getVisibilityMi() >= 0) { final String unit = Settings.getDistanceUnit(); int visibilityVal; String visibilityUnit; switch (unit) { case Units.MILES: default: visibilityVal = Math.round(forecast.getExtras().getVisibilityMi()); visibilityUnit = context.getString(R.string.unit_miles); break; case Units.KILOMETERS: visibilityVal = Math.round(forecast.getExtras().getVisibilityKm()); visibilityUnit = context.getString(R.string.unit_kilometers); break; } detailExtras.add(new DetailItemViewModel(WeatherDetailsType.VISIBILITY, String.format(LocaleUtils.getLocale(), "%d %s", visibilityVal, visibilityUnit))); } } if (txtForecasts.length > 0) { try { boolean dayAndNt = txtForecasts.length == 2; StringBuilder sb = new StringBuilder(); TextForecast fctDay = txtForecasts[0]; sb.append(isFahrenheit ? fctDay.getFcttext() : fctDay.getFcttextMetric()); if (dayAndNt) { sb.append(StringUtils.lineSeparator()).append(StringUtils.lineSeparator()); TextForecast fctNt = txtForecasts[1]; sb.append(isFahrenheit ? fctNt.getFcttext() : fctNt.getFcttextMetric()); } conditionLongDesc = sb.toString(); } catch (Exception e) { Logger.writeLine(Log.DEBUG, e); } } } public String getLoTemp() { return loTemp; } public void setLoTemp(String loTemp) { this.loTemp = loTemp; } public String getConditionLongDesc() { return conditionLongDesc; } public void setConditionLongDesc(String conditionLongDesc) { this.conditionLongDesc = conditionLongDesc; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; ForecastItemViewModel that = (ForecastItemViewModel) o; if (getLoTemp() != null ? !getLoTemp().equals(that.getLoTemp()) : that.getLoTemp() != null) return false; return getConditionLongDesc() != null ? getConditionLongDesc().equals(that.getConditionLongDesc()) : that.getConditionLongDesc() == null; } @Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (getLoTemp() != null ? getLoTemp().hashCode() : 0); result = 31 * result + (getConditionLongDesc() != null ? getConditionLongDesc().hashCode() : 0); return result; } }
[ "bryan2894@gmail.com" ]
bryan2894@gmail.com
98b0d5ceeebd7054b6b4f0b75f3be223a40069dd
cc958ef099aac4e8739f057547d46d0bde878c23
/src/test/java/Cashier/Cashier_RegisterNewCard.java
9860852ed1d338232418714fc882fa5958784820
[]
no_license
solomonAdekunle/Love
f09ed305bd0b4f97431758826fc325f362a9a365
b521a35488e77b8dfda703c25753672c8f1c53c9
refs/heads/master
2021-01-23T03:28:28.459725
2017-03-24T15:58:40
2017-03-24T15:58:40
86,085,650
0
0
null
null
null
null
UTF-8
Java
false
false
3,559
java
package Cashier; import java.io.IOException; import java.util.Hashtable; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; import TestUtil.Constant; import TestUtil.TestDataProvider; import Base.TestBase; public class Cashier_RegisterNewCard extends TestBase { @BeforeTest public void initLogs() { initLogs(this.getClass()); } @Test(enabled=false,dataProviderClass = TestDataProvider.class, dataProvider ="CashierDataProvider") public void RegisterNewCardTest(Hashtable<String, String> table) throws IOException, InterruptedException { validateRunmodes("RegisterNewCardTest", Constant.Money_Section, table.get(Constant.RUNMODE_COL)); doDefaultLogin(table.get("Browser")); click("hpDeposit_xpath"); Thread.sleep(5000L); //wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.xpath("cashier-iframe"))); d.switchTo().frame("cashier-iframe").switchTo().frame(0); Thread.sleep(5000L); WebElement PendingMessagebox=d.findElement(By.xpath("//*[@id='UM_Buttons']")); if(PendingMessagebox.isDisplayed()){ PendingMessagebox.click(); } //click("cashier_DepositRegisterNewCard_pleaseclickMessageOK_xpath"); //Thread.sleep(500L); click("cashier_DepositRegisterNewCreditCard_xpath"); Thread.sleep(500L); input("cashier_DepositRegisterNewCard_CardType_xpath", table.get(Constant.RegNewCardCARDTYPE_COL)); Thread.sleep(300L); input("cashier_DepositRegisterNewCard_CardNumber_xpath", table.get(Constant.RegNewCardCARDNUM_COL)); Thread.sleep(300L); input("cashier_DepositRegisterNewCard_ExipireDateMonth_xpath", table.get(Constant.RegNewCardEXPIREMONTH_COL)); Thread.sleep(300L); input("cashier_DepositRegisterNewCard_ExipireDateYear_xpath", table.get(Constant.RegNewCardEIXPIREYEAR_COL)); input("cashier_DepositRegisterNewCard_Country_xpath", table.get(Constant.RegNewCardCOUNTRY_COL)); Thread.sleep(1000L); click("Cashier_RegisterNewCard_CheckBox_xpath"); click("cashier_DepositRegisterNewCard_REGISTER_xpath"); /* verify that user can register a new valid card verify that user user can not register an invalid card verify that user cannot register card with expired date */ String Text = getText("cashier_DepositRegisterNewCard_validcardNumberMessage_xpath"); if (Text.equals("Your credit card has been successfully registered with our system.")) { System.out.println(Text); } else { System.out.println(Text + "--------" + "user unable to register invalid card"); } Thread.sleep(3000L); click("cashier_DepositRegisterNewCreditCard_PopOk_id"); d.switchTo().defaultContent(); Thread.sleep(1000L); click("cashier_CloseIcon_Selector"); Thread.sleep(5000L); String Xpath_menu1 = "//*[@id='account_box']/ul[1]/li[1]/a"; // Move to // Account String Xpath_subMenu1 = "//*[@id='account_box']/ul[1]/li[7]/a";// xpath // for // signout WebElement menu1 = d.findElement(By.xpath(Xpath_menu1)); WebElement Submenu1 = d.findElement(By.xpath(Xpath_subMenu1)); // performing an action Actions lla = new Actions(d); lla.moveToElement(menu1).build().perform(); Submenu1.click(); } @AfterMethod public void close() { quit(); } } // Your credit card has been successfully registered with our system.
[ "solomon.adekunle@netplaytv.com" ]
solomon.adekunle@netplaytv.com
786026f764c4b4b978f13a20f15b4be6ed51c9ca
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-90b-1-1-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/stat/Frequency_ESTest.java
6a5b1c2bc4a5d656e4565fc6a459e3f8612d7beb
[]
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
784
java
/* * This file was automatically generated by EvoSuite * Sat Apr 04 08:54:50 UTC 2020 */ package org.apache.commons.math.stat; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.apache.commons.math.stat.Frequency; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class Frequency_ESTest extends Frequency_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { Frequency frequency0 = new Frequency(); frequency0.addValue((-1386)); // Undeclared exception! frequency0.addValue((Object) ""); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
38c7ea7f7052689c4fe9e6243686ddb38efbc71c
95ecf99f39bce5ad5c4bd69fa3edbdb1ce740bfc
/src/servlets/actions/post/throughdefaultsubject/PostDatapointsThoughDefaultSubject.java
2d0e19a1c7579e878d6173e734c955966cdc102f
[]
no_license
leoncool/healthbook
7ea8d7af7b0aa21b98a290b03711938f38bb2bc4
f840eefddca535447e61da4c52adff84441a4a60
refs/heads/master
2021-01-20T12:44:57.529852
2015-06-23T09:29:45
2015-06-23T09:29:45
5,722,487
0
0
null
null
null
null
UTF-8
Java
false
false
9,833
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package servlets.actions.post.throughdefaultsubject; import static util.JsonUtil.ServletPath; import health.database.DAO.DatastreamDAO; import health.database.DAO.SubjectDAO; import health.database.DAO.nosql.HBaseDatapointDAO; import health.database.models.Datastream; import health.database.models.DatastreamUnits; import health.database.models.Subject; import health.hbase.models.HBaseDataImport; import health.input.jsonmodels.JsonDataImport; import health.input.jsonmodels.JsonDataPointsPostResult; import health.input.util.DBtoJsonUtil; import java.io.IOException; import java.io.PrintWriter; import java.util.HashMap; import java.util.List; import javax.persistence.NonUniqueResultException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import server.exception.ErrorCodeException; import server.exception.ReturnParser; import servlets.util.ServerUtil; import util.AllConstants; import util.JsonUtil; import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonSyntaxException; import com.google.gson.stream.JsonWriter; /** * * @author Leon */ public class PostDatapointsThoughDefaultSubject 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 */ public void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("application/json"); response.setCharacterEncoding("UTF-8"); request.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); try { // UserDAO userDao = new UserDAO(); // Users user = userDao.getLogin(subject.getLoginID()); SubjectDAO subjDao = new SubjectDAO(); Subject subject = (Subject) subjDao .findSystem_Default_Subject("leoncool"); // Retreive if (subject == null) { ReturnParser .outputErrorException( response, AllConstants.ErrorDictionary.SYSTEM_ERROR_NO_DEFAULT_HEALTH_SUBJECT, null, null); return; // try { // subject = subjDao.createDefaultHealthSubject(loginID); // HealthDataStreamDAO hdsDao = new HealthDataStreamDAO(); // // hdsDao.createDefaultDatastreamsOnDefaultSubject(loginID, // subject.getId()); // } catch (Exception e) { // // TODO Auto-generated catch block // e.printStackTrace(); // ReturnParser.outputErrorException(response, // AllConstants.ErrorDictionary.Internal_Fault, null, // null); // e.printStackTrace(); // } } String streamID = ServerUtil .getDefault_Subject_StreamID(ServletPath(request)); DatastreamDAO dstreamDao = new DatastreamDAO(); DBtoJsonUtil dbtoJUtil = new DBtoJsonUtil(); Datastream datastream = null; try { datastream = dstreamDao.getDatastream(streamID, true, false); } catch (NonUniqueResultException ex) { ReturnParser.outputErrorException(response, AllConstants.ErrorDictionary.Internal_Fault, null, streamID); return; } if (datastream == null) { ReturnParser.outputErrorException(response, AllConstants.ErrorDictionary.Unknown_StreamTitle, null, streamID); return; } JsonUtil jutil = new JsonUtil(); Gson gson = new Gson(); JsonDataImport jdataImport = null; int jsonInputTotalByte = 0; try { String jsonInput = jutil.readJsonStrFromHttpRequest(request); jsonInputTotalByte = jsonInput.length(); jdataImport = gson.fromJson(jsonInput, JsonDataImport.class); } catch (JsonSyntaxException ex) { ex.printStackTrace(); ReturnParser.outputErrorException(response, AllConstants.ErrorDictionary.Input_Json_Format_Error, null, null); return; } catch (IOException ex) { ex.printStackTrace(); ReturnParser.outputErrorException(response, AllConstants.ErrorDictionary.Input_Json_Format_Error, null, null); return; } List<DatastreamUnits> unitList = datastream .getDatastreamUnitsList(); HashMap<String, String> unitIDList = new HashMap<String, String>(); for (DatastreamUnits unit : unitList) { unitIDList.put(unit.getUnitID(), unit.getUnitID()); // retrieve // all // existing // units } if (jdataImport == null) { ReturnParser.outputErrorException(response, AllConstants.ErrorDictionary.Input_Json_Format_Error, null, null); return; } if (jdataImport.getBlock_id() != null) { if (dstreamDao.getDatastreamBlock(jdataImport.getBlock_id()) == null) { ReturnParser.outputErrorException(response, AllConstants.ErrorDictionary.Invalid_Datablock_ID, AllConstants.ErrorDictionary.Invalid_Datablock_ID, jdataImport.getBlock_id()); return; } } HBaseDatapointDAO importDao = null; try { importDao = new HBaseDatapointDAO(); } catch (Exception ex) { ex.printStackTrace(); ReturnParser .outputErrorException(response, AllConstants.ErrorDictionary.Internal_Fault, null, null); return; } HBaseDataImport importData = new HBaseDataImport(); if (jdataImport.getData_points_single_list() != null && jdataImport.getData_points_single_list().size() > 0) { if (datastream.getDatastreamUnitsList().size() == 0) { ReturnParser.outputErrorException(response, AllConstants.ErrorDictionary.Unknown_StreamID, null, streamID); return; } if (datastream.getDatastreamUnitsList().size() > 1) { ReturnParser .outputErrorException( response, AllConstants.ErrorDictionary.MORE_THAN_ONE_DATASTREAM_UNIT, null, streamID); return; } if (jdataImport.getData_points_single_list().size() < 1) { ReturnParser .outputErrorException( response, AllConstants.ErrorDictionary.No_Input_Single_Datapoints, null, streamID); return; } importData.setSingle_Unit_ID(unitList.get(0).getUnitID()); importData.setData_points_single_list(jdataImport .getData_points_single_list()); importData.setDatastream_id(streamID); importData.setBlock_id(jdataImport.getBlock_id()); } else { if (jdataImport.getData_points().size() < 1) { ReturnParser.outputErrorException(response, AllConstants.ErrorDictionary.No_Input_Datapoints, null, streamID); return; } importData.setData_points(jdataImport.getData_points()); importData.setDatastream_id(streamID); importData.setBlock_id(jdataImport.getBlock_id()); } JsonDataPointsPostResult jsonResult = new JsonDataPointsPostResult(); try { jsonResult.setTotal_stored_byte(importDao .importDatapointsDatapoints(importData)); } catch (ErrorCodeException ex) { ex.printStackTrace(); ReturnParser.outputErrorException(response, ex.getErrorCode(), null, null); return; } catch (NumberFormatException ex) { ex.printStackTrace(); ReturnParser.outputErrorException(response, AllConstants.ErrorDictionary.Invalid_date_format, null, null); return; } catch (Exception ex) { ex.printStackTrace(); ReturnParser .outputErrorException(response, AllConstants.ErrorDictionary.Internal_Fault, null, null); return; } jsonResult.setTotal_points(jdataImport.getData_points().size()); jsonResult.setTotal_input_byte(jsonInputTotalByte); JsonElement je = gson.toJsonTree(jsonResult); JsonObject jo = new JsonObject(); jo.addProperty(AllConstants.ProgramConts.result, AllConstants.ProgramConts.succeed); jo.add("data_import_stat", je); JsonWriter jwriter = new JsonWriter(out); gson.toJson(jo, jwriter); } 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> }
[ "li.leon.yang@gmail.com" ]
li.leon.yang@gmail.com
bef62e11f7c3ee66a127d4065b309fad11616972
8c77f52376cda20e0952edaba57c1d1cc93a0db6
/src/main/java/frc/robot/commands/HoodSetPosition.java
141bc422a465905309c4a3a4966b4eca39758f32
[]
no_license
SeanSun6814/FRC2021Bot
acbc5a4010ded902b4028086e884ba7281633a13
41f9b25faa5afa7981d257df0dbea31549f0c307
refs/heads/main
2023-08-28T21:32:05.584573
2021-08-09T21:57:30
2021-08-09T21:57:30
386,045,179
0
0
null
null
null
null
UTF-8
Java
false
false
924
java
package frc.robot.commands; import java.util.function.Supplier; import edu.wpi.first.wpilibj2.command.CommandBase; import frc.robot.subsystems.Hood; public class HoodSetPosition extends CommandBase { private final Hood hood = Hood.getInstance(); private Supplier<Double> setpoint; public HoodSetPosition(double setpoint) { this(() -> setpoint); } public HoodSetPosition(Supplier<Double> setpoint) { addRequirements(hood); this.setpoint = setpoint; } @Override public void initialize() { System.out.println(getName() + " starting..."); } @Override public void execute() { hood.setPosition(setpoint.get()); // hood.stop(); } @Override public boolean isFinished() { return false; } @Override public void end(boolean interrupted) { System.out.println(getName() + " ending..."); } }
[ "33432158+SeanSun6814@users.noreply.github.com" ]
33432158+SeanSun6814@users.noreply.github.com
913aec892365050ae1fffc262e4ae771402a0be4
5acee129c78c3f822ba7fe397df9dd157cf3a00d
/src/main/java/enrollment/App.java
b46fea3194b958f033ca118051b8c8e9d4d50407
[]
no_license
214068730/droid
e40e1113657dd99fdf0369b273a67ce3053e37be
f6cb32696508bdcd290d9f67bbe3f30d54f19303
refs/heads/master
2020-06-22T20:01:44.100267
2017-02-13T08:57:14
2017-02-13T08:57:14
66,851,322
0
0
null
null
null
null
UTF-8
Java
false
false
924
java
package enrollment; import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; import org.springframework.stereotype.Component; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; /** * Hello world! * */ @Configuration @EnableAutoConfiguration @EnableWebMvc @ComponentScan public class App { public static void main( String[] args ) { SpringApplication.run(App.class, args); System.out.println( "Hello World!" ); } }
[ "siraajw19@gmail.com" ]
siraajw19@gmail.com
0ea4c3d7a9829bfa30fb37c91fd68f695f3da560
56db566f3c4845fec4fdf55196a4c5bcefb4f5b7
/app/src/main/java/cn/fayne/animationtest/CustomAnimation.java
2f205aa7d5319b1525be0210fce56533c5817bbe
[]
no_license
fanjinhao/AnimationTest
870a2515ae0b2170a20514ab1746a6a818fae7f3
f4b7a426d36f3da2f60082adf7e155c10033212e
refs/heads/master
2020-03-24T23:11:54.271304
2018-08-01T07:55:11
2018-08-01T07:55:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
626
java
package cn.fayne.animationtest; import android.view.animation.Animation; import android.view.animation.Transformation; public class CustomAnimation extends Animation { //偏移距离 private float mDistance; //移动速度 private float mVelocity; public CustomAnimation(float distance, float velocity) { mDistance = distance; mVelocity = velocity; } @Override protected void applyTransformation(float interpolatedTime, Transformation t) { float dis= (float) (Math.sin(interpolatedTime * mVelocity) * mDistance); t.getMatrix().setTranslate(dis, 0); } }
[ "fanjinhao@szba-mobile.com" ]
fanjinhao@szba-mobile.com
c397875ec43a680d734967b0129d912a92b8eafe
5401c53d2dcfacedcf8f651b32db27ad2c484399
/app/src/androidTest/java/abiguime/tz/com/tzyoutube/ExampleInstrumentedTest.java
a2f74070fdad239f9cc9bba090ee913ad918895f
[]
no_license
blackgerman/ytb
c1d0991b2024802158ba65eeb51a553daf0eaad9
e63443506e0a4596b5d4601d52a0fca2493415af
refs/heads/master
2020-06-14T11:29:56.938408
2016-12-15T06:12:52
2016-12-15T06:12:52
75,189,309
0
0
null
null
null
null
UTF-8
Java
false
false
754
java
package abiguime.tz.com.tzyoutube; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("abiguime.tz.com.tzyoutube", appContext.getPackageName()); } }
[ "ulrichabiguime@gmail.com" ]
ulrichabiguime@gmail.com
b07a926129be5645cb5b025f88c41e90583d99a0
b13a4983bf97a74cdf55dd5c0155a02cdadc3f13
/src/main/java/com/swapnil/sort/algo/BucketSort.java
af93df119b081158f5cd32a293e353a2eee75445
[]
no_license
swapnilrmahale/sorting-analysis
187756c381a602256d7546cac18bb2d0df5e8b0b
b923f2badd9b08c2d27f60f1f49ad8dd242f67a5
refs/heads/master
2021-01-10T03:09:31.263463
2015-10-07T14:34:34
2015-10-07T14:34:34
43,316,989
0
0
null
null
null
null
UTF-8
Java
false
false
1,041
java
package com.swapnil.sort.algo; import com.swapnil.sort.util.SortUtil; public class BucketSort extends Sortable { public static void main(String[] args) { Sortable sortable = new BucketSort(); int[] input = { 2, 0, 0, 2, 1, 4, 7, 0, 0, 4 }; System.out.println("\nBefore Sort : "); SortUtil.display(input); sortable.sort(input); // System.out.println("\nAfter Sort : "); // SortUtil.display(input); } @Override public void sort(int[] inputArray) { super.sort(inputArray); int maxValue = SortUtil.maxValue(inputArray); int [] outputArray = bucketSort(maxValue); System.out.println("\n"); SortUtil.display(outputArray); } private int[] bucketSort(int maxValue) { // Bucket Sort int[] Bucket = new int[maxValue + 1]; int[] sorted_sequence = new int[inputArray.length]; for (int i = 0; i < length; i++) Bucket[inputArray[i]]++; int outPos = 0; for (int i = 0; i < Bucket.length; i++) for (int j = 0; j < Bucket[i]; j++) sorted_sequence[outPos++] = i; return sorted_sequence; } }
[ "swapnilrmahale@gmail.com" ]
swapnilrmahale@gmail.com
a728ae7e98cdbb7f2022129829e22477b65f1442
9701e8a51e10d41de0cfbd92beffaeb88549fa57
/src/main/java/com/briup/cms/web/controller/LoginController.java
ef71ffd6a0e5d1bafe45441b3e12a88d76d91e65
[]
no_license
qiaoxy-git/cms
19c600af82d8b060fa925f04e03afa0edc8944a9
dbe188355fd040eb8394089cd02b736cb02b56f3
refs/heads/master
2020-09-16T20:47:03.967377
2019-11-28T11:10:12
2019-11-28T11:10:12
223,884,421
1
0
null
null
null
null
UTF-8
Java
false
false
344
java
package com.briup.cms.web.controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class LoginController { @PostMapping("/authentication/form") public void login(String username, String password) { } }
[ "909542849@qq.com" ]
909542849@qq.com
6b6764c8591ec650c86930cbe54d2516438e0f5d
ff4c2311bed4be63d5bd0c4c8b5a8b070087c09c
/src/main/java/com/vonchange/ognl/ASTKeyValue.java
2368c296e43c7aaeaad7576d051e88710162d264
[]
no_license
VonChange/mybati
db011f93f38c8f1cca55c71fde5fe61ca93c2048
76f2067259dd1886d5513c03da873f5de63324b3
refs/heads/master
2023-01-25T05:25:04.529396
2020-12-07T06:47:32
2020-12-07T06:47:32
270,598,657
0
0
null
2020-07-05T22:41:30
2020-06-08T08:57:41
Java
UTF-8
Java
false
false
2,537
java
//-------------------------------------------------------------------------- // Copyright (c) 1998-2004, Drew Davidson and Luke Blanshard // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // Neither the name of the Drew Davidson nor the names of its contributors // may be used to endorse or promote products derived from this software // without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED // AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. //-------------------------------------------------------------------------- package com.vonchange.ognl; /** * @author Luke Blanshard (blanshlu@netscape.net) * @author Drew Davidson (drew@ognl.org) */ class ASTKeyValue extends SimpleNode { public ASTKeyValue(int id) { super(id); } public ASTKeyValue(OgnlParser p, int id) { super(p, id); } protected Node getKey() { return _children[0]; } protected Node getValue() { return (jjtGetNumChildren() > 1) ? _children[1] : null; } /** Returns null because this is a parser construct and does not evaluate */ protected Object getValueBody( OgnlContext context, Object source ) throws OgnlException { return null; } public String toString() { return getKey() + " -> " + getValue(); } }
[ "80767699@yonghui.cn" ]
80767699@yonghui.cn
85b7111be6564975ef323a1faf263e9916235478
7696696f57c5a2613c4f5e63098159bcca06b91f
/src/bookingGoKan/mainPartOneContinue.java
ff5ca3b0c78a7cc47ab7bbf3c4dbbdbecae351cd
[]
no_license
inkanfung/API-Test
e2573345a71586e00b147d3b2564ffa7269876db
c6eb0f41af461f5d9246d9470fa9e9ae1f4bae4a
refs/heads/master
2020-09-07T14:38:22.720772
2019-11-10T20:41:31
2019-11-10T20:41:31
220,812,710
0
0
null
null
null
null
UTF-8
Java
false
false
1,093
java
package bookingGoKan; public class mainPartOneContinue { private static String daveAPI = "https://techtest.rideways.com/dave/"; private static String ericAPI = "https://techtest.rideways.com/eric/"; private static String jeffAPI = "https://techtest.rideways.com/jeff/"; private static fulfilmentSearchEngine daveEricJeff; private static objectFormatter newObject; private static locationModel pickup; private static locationModel dropoff; private static int numberOfPassenger; public mainPartOneContinue() {} public static void main(String[] args) { daveEricJeff = new fulfilmentSearchEngine(); daveEricJeff.inputSupplierAPI(daveAPI); daveEricJeff.inputSupplierAPI(jeffAPI); daveEricJeff.inputSupplierAPI(ericAPI); pickup = new locationModel(Double.parseDouble(args[0]), Double.parseDouble(args[1])); dropoff = new locationModel(Double.parseDouble(args[2]), Double.parseDouble(args[3])); numberOfPassenger = Integer.parseInt(args[4]); newObject = fulfilmentSearchEngine.userInput(pickup, dropoff, numberOfPassenger); newObject.daveEricJeffResult(); } }
[ "inkan1998@gmail.com" ]
inkan1998@gmail.com
91df5c21fa1ea293493455febc315b761b50ef52
b7fd50206119b31cebac040ba0110bf786b8e0ab
/app/src/main/java/com/hele/hardware/analyser/capture/filter/RendererFilter.java
849387917d9b6759b2013aedee76abb34552f389
[]
no_license
etlevent/camera-debug
59be00df5bff318ed3830d109c55da03a8000274
4784d6d986b618260e5d12e794c1ecb12474b2c8
refs/heads/master
2021-06-18T08:08:09.516466
2017-06-16T09:43:12
2017-06-16T09:43:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
262
java
package com.hele.hardware.analyser.capture.filter; /** * Created by Administrator on 2017/4/11. */ public interface RendererFilter { void setup(); void destroy(); void render(int textureId, float[] mtx); void updateTexture(float[] mtx); }
[ "767041809@qq.com" ]
767041809@qq.com
e3ee72950a7211735595364f5d8adb0d7d42a632
55590de584b231b4b063e622c27c0dd18d6c9dde
/src/ttps/clases/Postre.java
dafa85b6b08bd5b7cf22dd712d983588af1d50e7
[]
no_license
apvenero/Comedor-Universitario-UNLP
6fae5ec4bc0048ad4274d4c8e9c61546c2e5f566
a3a4154093a5d409cb834d48a43499f42547a8ca
refs/heads/master
2021-01-12T12:39:55.647216
2017-10-26T02:31:46
2017-10-26T02:31:46
69,897,850
0
0
null
null
null
null
UTF-8
Java
false
false
766
java
package ttps.clases; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.OneToMany; import javax.persistence.PrimaryKeyJoinColumn; @Entity @PrimaryKeyJoinColumn(name="idComponente" , referencedColumnName="idComponente") public class Postre extends Componente { @OneToMany(mappedBy="postre",cascade=CascadeType.ALL) private List<Menu> menues; /*@Override public boolean tipoPostre() { // TODO Auto-generated method stub return true; } @Override public boolean tipoEntradaPlatoPrincipal() { // TODO Auto-generated method stub return false; } @Override public boolean tipoBebida() { // TODO Auto-generated method stub return false; }*/ }
[ "ap.venero@gmail.com" ]
ap.venero@gmail.com
d6d8a0917fdca8dcb888c96f98bb69169b84c9fd
f800b206ed9d053d7b71c85a241b55fba07249be
/src/main/java/mu/mcbc/mcshares/config/DateTimeFormatConfiguration.java
d81d3563761d37701eef867601e64ad4dea6d9cc
[]
no_license
Veeresh11/McShare
4bf248f40d12340dd5021bfc24073e458f2f0544
ed89d2c16ec90072f464e95f41826627ea3cc2e0
refs/heads/main
2023-07-05T00:00:49.926631
2021-08-29T16:30:27
2021-08-29T16:30:27
401,084,204
0
0
null
null
null
null
UTF-8
Java
false
false
723
java
package mu.mcbc.mcshares.config; import org.springframework.context.annotation.Configuration; import org.springframework.format.FormatterRegistry; import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * Configure the converters to use the ISO format for dates by default. */ @Configuration public class DateTimeFormatConfiguration implements WebMvcConfigurer { @Override public void addFormatters(FormatterRegistry registry) { DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); registrar.setUseIsoFormat(true); registrar.registerFormatters(registry); } }
[ "veeram@mcb.mu" ]
veeram@mcb.mu
e0443b6cf4e11168dc3f4923c0303003bae7950f
68d348f5973a484867f8ca03f5601af2d27c4650
/api/src/main/java/com/smartchemical/api/frame/dao/region/RegionDao.java
f2054a645bfbaabde002a2e645b1ada802ad9aac
[]
no_license
jephychen/smartchemical
fa55a4b682029c162f239e87ee274bbba08da2cd
7acc698e8f5e89a54cd414f7f1063b2001f5f1b8
refs/heads/master
2021-01-12T18:26:25.570065
2016-10-19T16:41:55
2016-10-19T16:41:55
71,377,933
0
0
null
null
null
null
UTF-8
Java
false
false
1,002
java
/** * */ package com.smartchemical.api.frame.dao.region; import java.util.List; import com.smartchemical.entities.frame.region.Region; /** * @author Jephy * */ public interface RegionDao { public Region getRegionById(int regionId); public boolean insertRegion(String regionName, String regionAlias, String description); public boolean editRegion(String regionId, String regionName, String regionAlias, String description); public boolean removeRegion(int regionId); public List<Region> getAllRegions(); /** * 取得带省份和城市的区域列表。为了提高效率,区域会被缓存,如果需要从数据库获取最新信息,请调用getAllRegionsWithProvincesDirectly() */ public List<Region> getAllRegionsWithProvinces(); /** * 直接从数据库取得带省份和城市的区域列表,同时更新缓存。区域是多层结构,效率较低。 */ public List<Region> getAllRegionsWithProvincesDirectly(); }
[ "chenshijue@zhixuanhuaxue.com" ]
chenshijue@zhixuanhuaxue.com
3b8b5141bafaf54bdfc398b65d2fda6242366389
f13487e461602b45951109dae1e98a41dc90760f
/src/edu/wctc/facade/Rectangle.java
f1317c45d46fa15054881aef0c025838f6dcdf50
[]
no_license
ELigrow/Chapter13
4867fc4d225e921242b5b2a9a2f158d2b0069a34
34eaa3778ffdbd259817e37a163cb8f444a2e792
refs/heads/master
2020-04-09T14:32:57.606817
2018-12-04T04:01:44
2018-12-04T04:01:44
160,104,938
0
0
null
null
null
null
UTF-8
Java
false
false
712
java
package edu.wctc.facade; /** * Creates Rectangle objects. Implements draw from Shape * @author eplig * @version 1.0 */ public class Rectangle implements Shape { /** * Draws a Rectangle object. Uses 4 ints to set the top-right coordinate, width, and height. * @param x Int: X coordinate of top-right corner * @param y Int: Y coordinate of top-right corner * @param width Int: Width of Rectangle * @param height Int: Height of Rectangle */ @Override public void draw(int x, int y, int width, int height) { System.out.println("Rectangle with coordinate left-down point (" + x + ";" + y + "), width: " + width + ", height: " + height); } }
[ "eligrow@my.wctc.edu" ]
eligrow@my.wctc.edu
8816f6d24b10eef40d0cc88dbd2fe370ad2cf618
a9c022acee71ec7e875639b56835bee606036d69
/src/main/java/com/macro/mall/mapper/DCmsPeopleMapper.java
61b66584f276b5dd84eb1743fa1c718ac682c9ec
[]
no_license
barve616/mall-admin
04eea681b6d4c1707cac5e10ec90f4bf48ac75ce
aee39759a4a5b4aeacc2d07879a4c1bfbccb63ad
refs/heads/master
2022-12-06T22:48:12.603677
2020-08-21T01:38:09
2020-08-21T01:38:09
288,946,877
0
0
null
null
null
null
UTF-8
Java
false
false
271
java
package com.macro.mall.mapper; import com.macro.mall.model.DCmsPeople; import java.util.List; public interface DCmsPeopleMapper { void insertPeopleList(List<DCmsPeople> peopleList); void delpeopelById(String dataId); List selectPeoList(String dataId); }
[ "120108758@qq.com" ]
120108758@qq.com
1e664e9164f72356f0c2d3bfab64c6a87b511e6f
bc16d1c5605adda1ea251d925d6082cb2bd82355
/Ebay/src/main/java/regression/DragAndDropClass.java
6c69fb40032039e51d8e37b1c711a1516fd96c21
[]
no_license
ramdane1985/General_Automation_Framework
b43d76e46f8572775dfa5874f45242acf76a02e1
b4320a2bb0266ae7d1248f9067382e465b1b1dce
refs/heads/master
2022-12-11T22:00:04.753882
2020-09-03T03:51:27
2020-09-03T03:51:27
292,459,900
0
0
null
null
null
null
UTF-8
Java
false
false
1,753
java
package regression; import base.CommonAPI; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.How; import org.testng.Assert; import static regression.RegressionElements.*; public class DragAndDropClass extends CommonAPI { @FindBy(how = How.XPATH,using = bankXP) public WebElement bank; @FindBy(how = How.XPATH,using = money5000XP) public WebElement money5000; @FindBy(how = How.XPATH,using = salesXP) public WebElement sales; @FindBy(how = How.XPATH,using = debitSideAccountXP) public WebElement debitSideAccount; @FindBy(how = How.XPATH,using = debitSideAmountXP) public WebElement debitSideAmount; @FindBy(how = How.XPATH,using = creditSideAccountXP) public WebElement creditSideAccount; @FindBy(how = How.XPATH,using = creditSideAmountXP) public WebElement creditSideAmount; @FindBy(how = How.XPATH,using = dragAndDropsValidationXP) public WebElement dragAndDropsValidation; public void setDragAndDrops(){ Actions actions=new Actions(driver); actions.dragAndDrop(bank,debitSideAccount).build().perform(); sleepFor(3); actions.dragAndDrop(money5000,debitSideAmount).build().perform(); sleepFor(3); actions.dragAndDrop(sales,creditSideAccount).build().perform(); sleepFor(3); actions.dragAndDrop(money5000,creditSideAmount).build().perform(); sleepFor(3); } public void setDragAndDropsValidation(){ String actualText=dragAndDropsValidation.getText(); String expectedText="Perfect!"; Assert.assertEquals(actualText,expectedText,"text doesn't match"); } }
[ "ame.ramo1985@gmail.com" ]
ame.ramo1985@gmail.com
0e14dab5c683c209abc12cad5868d0b9d56a4605
305e00631d98976dbda1b5612a6d5b105ef346f3
/demo-javafiles/mathbuild/impl/SNAppOp.java
91b215cdb1e7f65de049de3f1a6ddc2c26d5b873
[]
no_license
panangam/oras-banchoff-geom-2018
3c15598517f21ad6558d29e222e52bdadb4769dc
acc24a8e19557e799dbe1a2d5ea639404052c778
refs/heads/master
2020-03-18T02:30:40.145772
2018-12-09T08:03:41
2018-12-09T08:03:41
134,194,053
0
0
null
null
null
null
UTF-8
Java
false
false
4,625
java
// // SNAppOp.java // Demo // // Created by David Eigen on Tue Apr 01 2003. // Copyright (c) 2003 __MyCompanyName__. All rights reserved. // package mathbuild.impl; import mathbuild.*; import mathbuild.type.Type; import mathbuild.type.TypeFunction; import mathbuild.value.Value; import mathbuild.value.ValueFunction; import mathbuild.value.ValueFunctionImpl; public class SNAppOp extends SyntaxNode { private Operator op_; private SyntaxNode[] sns_; private Type[] types_; /** * When a SNAppOp is built, an executor is created that * simply applies the operator op to the executors built * from the given argument SNs. * @param op the operator * @param argSNs the args to apply to the operator */ public SNAppOp(Operator op, SyntaxNode[] argSNs) { op_ = op; sns_ = argSNs; types_ = null; } /** * When a SNAppOp is built, an executor is created that * simply applies the operator op to the executors built * from the given argument SNs. * @param op the operator * @param argSNs the args to apply to the operator * @param argTypes the expected types of the arguments: the types are checked when building */ public SNAppOp(Operator op, SyntaxNode[] argSNs, Type[] argTypes) { op_ = op; sns_ = argSNs; types_ = argTypes; } public SyntaxNode[] children() { SyntaxNode[] n = new SyntaxNode[sns_.length]; for (int i = 0; i < n.length; ++i) n[i] = sns_[i]; return n; } public Executor build(Environment env, ExeStack funcParams, BuildArguments buildArgs) { Executor[] exes = new Executor[sns_.length]; for (int i = 0; i < exes.length; ++i) exes[i] = sns_[i].build(env, funcParams, buildArgs); if (types_ != null) { boolean isFunc = false; // to check if this should become a function ValueFunction[] subfuncs = new ValueFunction[exes.length]; for (int i = 0; i < exes.length; ++i) { Type exeType = exes[i].type(); if ( !types_[i].compatibleType(exeType) ) { if ( exeType.isType(Type.FUNCTION) ) { subfuncs[i] = ((TypeFunction) exeType).val(); isFunc = true; } else { // incompatible types throw new BuildException("Incompatible types."); } } } if (!isFunc) // if function type is null, this is not a function type return new ExeNAryOp(exes, op_); // The components contain a function, so the resulting vector should be a function SyntaxNode[] argNodes = new SyntaxNode[exes.length]; for (int i = 0; i < argNodes.length; ++i) argNodes[i] = subfuncs[i] == null ? (SyntaxNode) new SNExe(exes[i]) : subfuncs[i].isClosure() ? (SyntaxNode) new SNAppVal(subfuncs[i]) : (SyntaxNode) subfuncs[i].body(); return new ExeVal(new ValueFunctionImpl(subfuncs, new SNAppOp(op_, argNodes, types_))); } return new ExeNAryOp(exes, op_); } /** * It's an error to take the derivative of an SNAppOp, at least for now. */ public SyntaxNode derivative(ParameterID wrtvar, SyntaxNode dwrtvar, Environment env, ExeStack funcParams) { throw new BuildException("Can't take the derivative of a non-expression function."); } public SyntaxNode simplify() { SyntaxNode[] sns = new SyntaxNode[sns_.length]; for (int i = 0; i < sns_.length; ++i) sns[i] = sns_[i].simplify(); return new SNAppOp(op_, sns); } public boolean isValue() { return false; } public boolean isValue(int val) { return false; } public boolean isValue(Value value) { return false; } public String toString() { String snsStr = ""; for (int i = 0; i < sns_.length; ++i) snsStr += sns_.toString() + (i < sns_.length - 1 ? " " : ""); return "(SN-appop " + op_ + " " + snsStr + ")"; } public void findDependencies(Environment env, demo.util.Set deps, demo.util.Set ranges) { for (int i = 0; i < sns_.length; ++i) sns_[i].findDependencies(env, deps, ranges); if (op_ instanceof demo.depend.Dependable) deps.put(op_); } }
[ "panangam@gmail.com" ]
panangam@gmail.com
3334a6283feed615dc6e3700a3d91c2b6b433216
a7f458529def614304fd27722c4e66e27681869f
/cpb/src/main/java/com/efeiyi/website/entity/ProductSeries.java
1ebfdb943276dc88dd4e77b84857b02fc74f887c
[]
no_license
jijicanyu/efy
c1a8f3df43e5a055d0ed6ab73453727bf82a7e26
0cf780b0cab0742abc4e7ae87a2946efed6341a0
refs/heads/master
2021-05-14T04:37:24.277292
2016-11-17T10:33:39
2016-11-17T10:33:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,716
java
package com.efeiyi.website.entity; import java.util.List; public class ProductSeries extends Entity { private String id; private String name; private String serial; private String status; private List<ProductSeriesPropertyName> productSeriesPropertyNameList; private List<TenantProductSeries> tenantProductSeriesList; private List<Product> productList; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSerial() { return serial; } public void setSerial(String serial) { this.serial = serial; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public List<ProductSeriesPropertyName> getProductSeriesPropertyNameList() { return productSeriesPropertyNameList; } public void setProductSeriesPropertyNameList(List<ProductSeriesPropertyName> productSeriesPropertyNameList) { this.productSeriesPropertyNameList = productSeriesPropertyNameList; } public List<TenantProductSeries> getTenantProductSeriesList() { return tenantProductSeriesList; } public void setTenantProductSeriesList(List<TenantProductSeries> tenantProductSeriesList) { this.tenantProductSeriesList = tenantProductSeriesList; } public List<Product> getProductList() { return productList; } public void setProductList(List<Product> productList) { this.productList = productList; } }
[ "916648803@qq.com" ]
916648803@qq.com
47ffee721720a7bb1dd76b381824e8261deccaba
061fc84af0b9c0694888659a6bd44ce56159a3ab
/sdk/src/main/java/com/gzch/lsplat/work/mode/event/DataKey.java
5ca9cfe0cbbfbcb9e21313b869ba098fbd2f8870
[]
no_license
Donwy/Arr
ac2b8180f5b26366e31e9ddd1e004554c9f9ac0e
e21dcea1c10d01662668feaeff4246b23a72af40
refs/heads/master
2020-07-29T20:37:09.909758
2019-10-11T03:49:21
2019-10-11T03:49:21
209,951,286
0
0
null
null
null
null
UTF-8
Java
false
false
1,213
java
package com.gzch.lsplat.work.mode.event; /** * Created by lw on 2017/12/26. */ public class DataKey { /** * web请求 结果码 code值 */ private int resultCode; /** * 请求错误提示 */ private String errMsg; /** * 请求的命令 */ private int cmd; /** * 数据存放在HashMap中的Key值 */ private String KEY; public int getResultCode() { return resultCode; } public void setResultCode(int resultCode) { this.resultCode = resultCode; } public String getErrMsg() { return errMsg; } public void setErrMsg(String errMsg) { this.errMsg = errMsg; } public int getCmd() { return cmd; } public void setCmd(int cmd) { this.cmd = cmd; } public String getKEY() { return KEY; } public void setKEY(String KEY) { this.KEY = KEY; } @Override public String toString() { return "DataKey{" + "resultCode=" + resultCode + ", errMsg='" + errMsg + '\'' + ", cmd=" + cmd + ", KEY='" + KEY + '\'' + '}'; } }
[ "572419921@qq.com" ]
572419921@qq.com
acde0c55828b1eb29938d378f1167fac0a515fd3
166e43652f8148e04cbc13bcc025450ed25f7c58
/CosmicRay/src/com/jejuair/cosmicray/test/CariTest.java
41309c31c148da9d33bcbc9a9aa8258d5168682e
[]
no_license
innamgo/workspace
ca24028e44248e0f3f5a4da5d630e085b57367ea
c047a98e7dcf8d9368c6e931ed2942fcf481f52a
refs/heads/master
2016-08-03T15:59:48.623478
2014-09-04T01:37:45
2014-09-04T01:37:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
693
java
package com.jejuair.cosmicray.test; import java.io.IOException; import org.junit.Test; import com.jejuair.cosmicray.core.Cari6mController; public class CariTest { public static void main(String[] args) { // TODO Auto-generated method stub Cari6mController cariCon=new Cari6mController(); try { cariCon.doCalculating(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Test public void test() { Cari6mController cariCon=new Cari6mController(); try { cariCon.doCalculating(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "innamgo@naver.com" ]
innamgo@naver.com
7393d9db12ec5f29a814d1b2e6f60796ef8b6496
e9b92d9e49c939b0cfc3f07a8d64e68fabbb3d0c
/activemq-demo/src/main/java/com/qsqx/activemqdemo/service/UserService.java
9d1af8c3850b6c87557d4291252fd9edf7b5bd56
[]
no_license
just-gol/-activemq
ec6d12307ae09522bc9de823b0a0a7d6dd09ed5e
f04889675ad15f34c9a26356caf60395e03f5ac0
refs/heads/master
2022-04-14T10:55:28.502259
2020-04-10T10:19:16
2020-04-10T10:19:16
254,604,571
0
0
null
null
null
null
UTF-8
Java
false
false
90
java
package com.qsqx.activemqdemo.service; public interface UserService { void test(); }
[ "978905685@qq.com" ]
978905685@qq.com
32d9ce0c05c31a0e2b3bed75e081b5fcaa0fdf19
37c2048d9305afaaf06eeaae3b30b60b8af02c02
/LearnViewPager/app/src/androidTest/java/com/learn/learnviewpager/ExampleInstrumentedTest.java
6006b33485c2018cb365f05cf12ac59a39795156
[]
no_license
JUNLLLL/android_project
66b916ee38e5f4aa04c6289642f8944253d0bf62
c66731a211ac73138abf8762a8dbf443e15a3764
refs/heads/master
2023-01-13T09:00:50.313882
2020-11-16T13:05:28
2020-11-16T13:05:28
313,299,872
0
0
null
null
null
null
UTF-8
Java
false
false
764
java
package com.learn.learnviewpager; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.learn.learnviewpager", appContext.getPackageName()); } }
[ "1281025009@qq.com" ]
1281025009@qq.com
40539b68ca6263b71889119ac14d87ff1eccddf9
3468be85c9bb4c8315ab6f8e47e67c4282308ab8
/src/ejb/Teta.java
58e74fd44d2de3fd53d5da6257bbd00a47b63233
[]
no_license
tank0412/CourseWork_PIP
18f823cb11f4f6e5f83463cae683ebd224a579c2
9f890dd1a45f1b143845b4377308a788968d897c
refs/heads/master
2020-03-07T03:33:04.268385
2018-04-09T13:05:12
2018-04-09T13:05:12
127,239,481
0
0
null
null
null
null
UTF-8
Java
false
false
76
java
package ejb; import javax.ejb.Stateless; @Stateless public class Teta { }
[ "romabukhtiarov@gmail.com" ]
romabukhtiarov@gmail.com
786d68c305e033957d3fcf6c7594c9b8567f0240
64e8613aba35413cca2e7ba7f9b5a6a6a2ecbeb8
/Ejercicio10/src/Desarollo/AbmLibro.java
28deb3769ed8d2b0b78c0a61fe643f9fee51c016
[]
no_license
mtssto/ejercicio10
7c6f3228bac99b0a25df9f5ec20790d6d9d40000
3b4a8ce0c8a2c57e08ef63c07650b9903960046d
refs/heads/master
2022-04-19T18:03:37.716016
2020-04-21T15:30:39
2020-04-21T15:30:39
257,426,181
0
0
null
null
null
null
UTF-8
Java
false
false
6,318
java
package Desarollo; import Conexion.conexionbd; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.JOptionPane; import javax.swing.table.DefaultTableModel; public class AbmLibro { private String Nombre; private String Autor; private String Tipo; private int Edicion; private PreparedStatement Instruccion; private String AltaSQL = "INSERT INTO `ejercicio10`.`libro`(`NombreLibro`,`TipodeLibro`,`idAutor`,`Edicion`)VALUES(?,?,?,?);"; private String ConsultaSQL = ""; private String MuestroSQL = "Select `NombreLibro`,`TipodeLibro`,`idAutor`,`Edicion` from ejercicio10.libro;"; private String BorrarSQL = "DELETE FROM libro WHERE NombreLibro = (?)"; //Para mostrar los datos en el jtable String [][] Filas = {}; //aca van a ir los datos que tomo de la tabla libros String [] NomCol = {"Nombre del Libro" ,"Autor", "Genero", "Edicion"}; //titulos del jtable ResultSet Resultado; DefaultTableModel Table; conexionbd con = new conexionbd(); //DefaultListModel public AbmLibro(String Nombre, String Autor, String Tipo, int Edicion) { this.Nombre = Nombre; this.Autor = Autor; this.Tipo = Tipo; this.Edicion = Edicion; } public AbmLibro() { } public String getNombre() { return Nombre; } public String getAutor() { return Autor; } public String getTipo() { return Tipo; } public int getEdicion() { return Edicion; } public void setNombre(String Nombre) { this.Nombre = Nombre; } public void setAutor(String Autor) { this.Autor = Autor; } public void setTipo(String Tipo) { this.Tipo = Tipo; } public void setEdicion(int Edicion) { this.Edicion = Edicion; } //metodos public void Alta () { try { Instruccion = con.Conectado().prepareStatement(AltaSQL); Instruccion.setString(1, this.getNombre()); Instruccion.setString(2, this.getAutor()); Instruccion.setString(3, this.getTipo()); Instruccion.setString(4, String.valueOf(this.getEdicion())); int Registro = Instruccion.executeUpdate(); if (Registro > 0) { JOptionPane.showMessageDialog(null, "Se guardó el registro"); con.Conectado().close(); } } catch (SQLException e) { JOptionPane.showMessageDialog(null, "No se pudo guardar el registro" + e); } } public DefaultTableModel Titulo () //imprime los titulos sin ningun registro { Table = new DefaultTableModel (Filas, NomCol); //en el constructor van los datos y los titulos return Table; } public DefaultTableModel MuestroDatos () { try { Instruccion = con.Conectado().prepareStatement(MuestroSQL); Resultado = Instruccion.executeQuery(); while (Resultado.next()) // no se usa un dowhile porque sino te tira un loop { this.setNombre(Resultado.getString(1)); this.setTipo(Resultado.getString(2)); this.setAutor(Resultado.getString(3)); this.setEdicion(Resultado.getInt(4)); String [] VecTabla = {this.getNombre(), this.getAutor(), this.getTipo(), String.valueOf(this.getEdicion())}; //en este vector le estoy devolviendo los datos con el metodo get Table.addRow(VecTabla); //Es porque estamos retornando ese objeto, envio los datos de mis campos a mi datatable } } catch (SQLException e) { JOptionPane.showMessageDialog(null, "No puede mostrar los datos " + e); } return Table; } public boolean Buscar (String Nombre) //porque va a tener un valor verdadero o falso { String BuscarLibro = "Select `NombreLibro`,`idAutor`,`TipodeLibro`,`Edicion` from ejercicio10.libro where NombreLibro = '"+Nombre+"';";//en ese ++ voy a poner la variable del metodo buscar //JOptionPane.showMessageDialog(null, BuscarNro); boolean Encuentra = false; try { Instruccion = con.Conectado().prepareStatement(BuscarLibro); Resultado = Instruccion.executeQuery(); if ( Resultado.next()) { this.setNombre(Resultado.getString(1)); this.setTipo(Resultado.getString(2)); this.setAutor(Resultado.getString(3)); this.setEdicion(Resultado.getInt(4)); } Encuentra = true; // para que cuando me retorne esa variable tenga un valor } catch (SQLException e) { JOptionPane.showMessageDialog(null, "No se encuentra el departamento" + e); Encuentra = false; } finally //este procedemiento funciona sin importar si sale por try o catch, devuelve de todas formas. {return Encuentra;} } public void Modificar (String LibroViejo) //no devuelve nada por eso el void { String Cambia ="UPDATE libro SET NombreLibro = '" + this.getNombre()+ "', idAutor = '" + this.getAutor() + "', TipodeLibro = '" + this.getTipo() + "', Edicion = '" + this.getEdicion() + "' WHERE NombreLibro = '" + LibroViejo + "';"; try { Instruccion = con.Conectado().prepareStatement(Cambia); int Registro = Instruccion.executeUpdate(); //Ejecuta un update if (Registro > 0) { JOptionPane.showMessageDialog(null, "Registro modificado con éxito"); //Con.Conectado().close(); } else {JOptionPane.showMessageDialog(null, "No actualizó el registro");} } catch (SQLException e) { JOptionPane.showMessageDialog(null, "El registro no pudo ser guardado" + e); } } public void Baja () { try { Instruccion = con.Conectado().prepareStatement(BorrarSQL); Instruccion.setString(1,this.getNombre()); //coloco la instruccion de que es lo que voy a borrar int Registro = Instruccion.executeUpdate(); if (Registro > 0) { JOptionPane.showMessageDialog(null, "El registro ha sido borrado"); } } catch (SQLException e) { JOptionPane.showMessageDialog(null,"No puede borrar el registro" + e); } } }
[ "matiassalto94@gmail.com" ]
matiassalto94@gmail.com
26e14ef7f00096515c290b075669e99af2809cf6
aaf5b7601df9e31b6573d3807613a5c4cc1f648a
/BodySensorApplication-master/src/edu/missouri/bas/survey/question/TextQuestion.java
2f6bdbca1de57c1e562199e8e35f5d4d40f01a39
[]
no_license
RickyShi/BodySensorApp
63ae611ce64a948c496af27c9ef7b0f6383bd9b3
96d9c8eb132a5fe63d0376c5b3c8f9ce62d3559c
refs/heads/master
2021-03-12T23:50:26.147672
2014-05-15T22:38:16
2014-05-15T22:38:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,136
java
package edu.missouri.bas.survey.question; import java.util.ArrayList; import android.R; import android.content.Context; import android.text.Editable; import android.text.TextWatcher; import android.util.TypedValue; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; public class TextQuestion extends Question{ String selectedText = ""; public TextQuestion(String id){ this.questionId = id; this.questionType = QuestionType.TEXT; } public LinearLayout prepareLayout(Context c) { LinearLayout layout = new LinearLayout(c); layout.setOrientation(LinearLayout.VERTICAL); TextView questionText = new TextView(c); questionText.setText(this.getQuestion().replace("|", "\n")); //questionText.setTextAppearance(c, R.attr.textAppearanceLarge); questionText.setTextSize(TypedValue.COMPLEX_UNIT_DIP,20); questionText.setLines(4); LinearLayout.LayoutParams layoutq = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); layoutq.setMargins(10, 15, 0, 0); questionText.setLayoutParams(layoutq); EditText editText = new EditText(c); editText.addTextChangedListener(new TextWatcher(){ public void afterTextChanged(Editable arg0) { selectedText = arg0.toString(); } public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { } public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { } }); LinearLayout.LayoutParams layoutp = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); layoutp.setMargins(0, 40, 0, 0); editText.setLayoutParams(layoutp); layout.addView(questionText); layout.addView(editText); return layout; } public boolean validateSubmit() { if(selectedText.length() == 0) return false; return true; } public String getSkip() { return null; } public ArrayList<String> getSelectedAnswers(){ ArrayList<String> temp = new ArrayList<String>(); temp.add(selectedText); return temp; } }
[ "rs79c@mail.missouri.edu" ]
rs79c@mail.missouri.edu
42045549d0ea4ddc90f7bbc61d8058c518d0026a
c83afe0867078ce8b0748cb2f7d7a478bc121b55
/CEP_Flink_Rabbit/src/main/java/Flink/ComaSpliter.java
9673f29e358b084eb43d4b856ae544d7cfd72677
[]
no_license
Abir-IA/CEPFlink_EventManagement
792f01fa978bcedd36712674dec4180f8eca21d5
e2794493433bc58304c6f2a63b26d8e978b141ba
refs/heads/main
2023-06-17T21:28:17.650911
2021-07-20T12:40:38
2021-07-20T12:40:38
387,507,908
0
0
null
null
null
null
UTF-8
Java
false
false
749
java
package Flink; import org.apache.flink.api.common.functions.FlatMapFunction; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.util.Collector; /** * * @author Arthur * class to split data on a single caracter */ public final class ComaSpliter implements FlatMapFunction<String, Tuple2<String, Integer>> { public ComaSpliter() { } @Override public void flatMap(String value, Collector<Tuple2<String, Integer>> out) { // normalize and split the line String[] tokens = value.toLowerCase().split(","); // emit the pairs for (String token : tokens) { if (token.length() > 0) { out.collect(new Tuple2<>(token, 1)); } } } }
[ "abir.alaoui27@gmail.com" ]
abir.alaoui27@gmail.com
96931ce510c587381bf04938b6848a79473c160c
c1e977bd3a70d69185510b6993e06fc9c2314a56
/mall-mbg/src/main/java/top/arrietty/mall/model/SmsHomeRecommendProductExample.java
0ed0d9efd49e29811d11146248b2e1ac0a1c41bd
[]
no_license
Arriettys/spring-boot-mall
58b5101c86e92e7d2e96f222a07909de7de5f593
83fc63b63043b456db9042aea8cdf820d794807a
refs/heads/master
2022-07-06T20:58:21.187713
2019-08-22T13:45:17
2019-08-22T13:45:17
203,338,543
1
0
null
2022-06-21T01:42:15
2019-08-20T08:58:18
Java
UTF-8
Java
false
false
15,794
java
package top.arrietty.mall.model; import java.util.ArrayList; import java.util.List; public class SmsHomeRecommendProductExample { protected String orderByClause; protected boolean distinct; protected List<Criteria> oredCriteria; public SmsHomeRecommendProductExample() { oredCriteria = new ArrayList<Criteria>(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List<Criteria> getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } public boolean isValid() { return criteria.size() > 0; } public List<Criterion> getAllCriteria() { return criteria; } public List<Criterion> getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } public Criteria andIdIn(List<Long> values) { addCriterion("id in", values, "id"); return (Criteria) this; } public Criteria andIdNotIn(List<Long> values) { addCriterion("id not in", values, "id"); return (Criteria) this; } public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } public Criteria andProductIdIsNull() { addCriterion("product_id is null"); return (Criteria) this; } public Criteria andProductIdIsNotNull() { addCriterion("product_id is not null"); return (Criteria) this; } public Criteria andProductIdEqualTo(Long value) { addCriterion("product_id =", value, "productId"); return (Criteria) this; } public Criteria andProductIdNotEqualTo(Long value) { addCriterion("product_id <>", value, "productId"); return (Criteria) this; } public Criteria andProductIdGreaterThan(Long value) { addCriterion("product_id >", value, "productId"); return (Criteria) this; } public Criteria andProductIdGreaterThanOrEqualTo(Long value) { addCriterion("product_id >=", value, "productId"); return (Criteria) this; } public Criteria andProductIdLessThan(Long value) { addCriterion("product_id <", value, "productId"); return (Criteria) this; } public Criteria andProductIdLessThanOrEqualTo(Long value) { addCriterion("product_id <=", value, "productId"); return (Criteria) this; } public Criteria andProductIdIn(List<Long> values) { addCriterion("product_id in", values, "productId"); return (Criteria) this; } public Criteria andProductIdNotIn(List<Long> values) { addCriterion("product_id not in", values, "productId"); return (Criteria) this; } public Criteria andProductIdBetween(Long value1, Long value2) { addCriterion("product_id between", value1, value2, "productId"); return (Criteria) this; } public Criteria andProductIdNotBetween(Long value1, Long value2) { addCriterion("product_id not between", value1, value2, "productId"); return (Criteria) this; } public Criteria andProductNameIsNull() { addCriterion("product_name is null"); return (Criteria) this; } public Criteria andProductNameIsNotNull() { addCriterion("product_name is not null"); return (Criteria) this; } public Criteria andProductNameEqualTo(String value) { addCriterion("product_name =", value, "productName"); return (Criteria) this; } public Criteria andProductNameNotEqualTo(String value) { addCriterion("product_name <>", value, "productName"); return (Criteria) this; } public Criteria andProductNameGreaterThan(String value) { addCriterion("product_name >", value, "productName"); return (Criteria) this; } public Criteria andProductNameGreaterThanOrEqualTo(String value) { addCriterion("product_name >=", value, "productName"); return (Criteria) this; } public Criteria andProductNameLessThan(String value) { addCriterion("product_name <", value, "productName"); return (Criteria) this; } public Criteria andProductNameLessThanOrEqualTo(String value) { addCriterion("product_name <=", value, "productName"); return (Criteria) this; } public Criteria andProductNameLike(String value) { addCriterion("product_name like", value, "productName"); return (Criteria) this; } public Criteria andProductNameNotLike(String value) { addCriterion("product_name not like", value, "productName"); return (Criteria) this; } public Criteria andProductNameIn(List<String> values) { addCriterion("product_name in", values, "productName"); return (Criteria) this; } public Criteria andProductNameNotIn(List<String> values) { addCriterion("product_name not in", values, "productName"); return (Criteria) this; } public Criteria andProductNameBetween(String value1, String value2) { addCriterion("product_name between", value1, value2, "productName"); return (Criteria) this; } public Criteria andProductNameNotBetween(String value1, String value2) { addCriterion("product_name not between", value1, value2, "productName"); return (Criteria) this; } public Criteria andRecommendStatusIsNull() { addCriterion("recommend_status is null"); return (Criteria) this; } public Criteria andRecommendStatusIsNotNull() { addCriterion("recommend_status is not null"); return (Criteria) this; } public Criteria andRecommendStatusEqualTo(Integer value) { addCriterion("recommend_status =", value, "recommendStatus"); return (Criteria) this; } public Criteria andRecommendStatusNotEqualTo(Integer value) { addCriterion("recommend_status <>", value, "recommendStatus"); return (Criteria) this; } public Criteria andRecommendStatusGreaterThan(Integer value) { addCriterion("recommend_status >", value, "recommendStatus"); return (Criteria) this; } public Criteria andRecommendStatusGreaterThanOrEqualTo(Integer value) { addCriterion("recommend_status >=", value, "recommendStatus"); return (Criteria) this; } public Criteria andRecommendStatusLessThan(Integer value) { addCriterion("recommend_status <", value, "recommendStatus"); return (Criteria) this; } public Criteria andRecommendStatusLessThanOrEqualTo(Integer value) { addCriterion("recommend_status <=", value, "recommendStatus"); return (Criteria) this; } public Criteria andRecommendStatusIn(List<Integer> values) { addCriterion("recommend_status in", values, "recommendStatus"); return (Criteria) this; } public Criteria andRecommendStatusNotIn(List<Integer> values) { addCriterion("recommend_status not in", values, "recommendStatus"); return (Criteria) this; } public Criteria andRecommendStatusBetween(Integer value1, Integer value2) { addCriterion("recommend_status between", value1, value2, "recommendStatus"); return (Criteria) this; } public Criteria andRecommendStatusNotBetween(Integer value1, Integer value2) { addCriterion("recommend_status not between", value1, value2, "recommendStatus"); return (Criteria) this; } public Criteria andSortIsNull() { addCriterion("sort is null"); return (Criteria) this; } public Criteria andSortIsNotNull() { addCriterion("sort is not null"); return (Criteria) this; } public Criteria andSortEqualTo(Integer value) { addCriterion("sort =", value, "sort"); return (Criteria) this; } public Criteria andSortNotEqualTo(Integer value) { addCriterion("sort <>", value, "sort"); return (Criteria) this; } public Criteria andSortGreaterThan(Integer value) { addCriterion("sort >", value, "sort"); return (Criteria) this; } public Criteria andSortGreaterThanOrEqualTo(Integer value) { addCriterion("sort >=", value, "sort"); return (Criteria) this; } public Criteria andSortLessThan(Integer value) { addCriterion("sort <", value, "sort"); return (Criteria) this; } public Criteria andSortLessThanOrEqualTo(Integer value) { addCriterion("sort <=", value, "sort"); return (Criteria) this; } public Criteria andSortIn(List<Integer> values) { addCriterion("sort in", values, "sort"); return (Criteria) this; } public Criteria andSortNotIn(List<Integer> values) { addCriterion("sort not in", values, "sort"); return (Criteria) this; } public Criteria andSortBetween(Integer value1, Integer value2) { addCriterion("sort between", value1, value2, "sort"); return (Criteria) this; } public Criteria andSortNotBetween(Integer value1, Integer value2) { addCriterion("sort not between", value1, value2, "sort"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } }
[ "1075727481@qq.com" ]
1075727481@qq.com
687a62f1300e0a3dfd1ffc45572dec23021a6bad
6a26b6b5d79d9929c063c234e6fac5851aa75357
/launcher1/src/main/java/com/android/launcher1/BaseFragment.java
a67d128c91679d9b02607b00f7f576c2eedd531e
[ "Apache-2.0" ]
permissive
sure13/GuidePage
346d4b824a03d2d71a173a6997c421f6c0de9705
cf32b8e698e15375da351cd39aa83ab52d32d4eb
refs/heads/master
2021-07-03T06:04:22.158332
2021-03-01T07:43:39
2021-03-01T07:43:39
225,838,132
0
0
null
null
null
null
UTF-8
Java
false
false
947
java
package com.android.launcher1; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.fragment.app.Fragment; public class BaseFragment extends Fragment implements BaseInterface{ protected View rootView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { rootView = inflater.inflate(setResouce(), null); initView(); return rootView; } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); initdate(); initListener(); } @Override public int setResouce() { return 0; } @Override public void initView() { } @Override public void initdate() { } @Override public void initListener() { } }
[ "1182927134@qq.com" ]
1182927134@qq.com
b15d5174ff1d042bfe90a1f701b12ba26845009a
cf2ca24953a6003d31faa30cc647835db7058769
/hbm/job/admin/src/main/java/com/xxl/job/admin/core/util/JacksonUtil.java
59887820023488f8d78d541dd902603e5590353b
[]
no_license
18luohann/TESTHBM
6da94c2c57b269abf87f4db284e29a13e66fe767
1603cd10b2887bdcff2046cefba243618530a17b
refs/heads/master
2020-05-16T23:59:21.349969
2019-04-25T07:50:02
2019-04-25T07:50:02
183,385,236
0
0
null
null
null
null
UTF-8
Java
false
false
2,530
java
//package com.xxl.job.admin.core.util; // // //import org.codehaus.jackson.JsonGenerationException; //import org.codehaus.jackson.JsonParseException; //import org.codehaus.jackson.map.JsonMappingException; //import org.codehaus.jackson.map.ObjectMapper; //import org.codehaus.jackson.type.TypeReference; // //import java.io.IOException; //import java.util.HashMap; //import java.util.Map; // ///** // * Jackson util // * // * 1、obj need private and set/get; // * 2、do not support inner class; // * // * @author xuxueli 2015-9-25 18:02:56 // */ //public class JacksonUtil { // private final static ObjectMapper objectMapper = new ObjectMapper(); // public static ObjectMapper getInstance() { // return objectMapper; // } // // /** // * bean、array、List、Map --> json // * // * @param obj // * @return json string // * @throws Exception // */ // public static String writeValueAsString(Object obj) { // try { // return getInstance().writeValueAsString(obj); // } catch (JsonGenerationException e) { // e.printStackTrace(); // } catch (JsonMappingException e) { // e.printStackTrace(); // } catch (IOException e) { // e.printStackTrace(); // } // return null; // } // // /** // * string --> bean、Map、List(array) // * // * @param jsonStr // * @param clazz // * @return obj // * @throws Exception // */ // public static <T> T readValue(String jsonStr, Class<T> clazz) { // try { // return getInstance().readValue(jsonStr, clazz); // } catch (JsonParseException e) { // e.printStackTrace(); // } catch (JsonMappingException e) { // e.printStackTrace(); // } catch (IOException e) { // e.printStackTrace(); // } // return null; // } // public static <T> T readValueRefer(String jsonStr, Class<T> clazz) { // try { // return getInstance().readValue(jsonStr, new TypeReference<T>() { }); // } catch (JsonParseException e) { // e.printStackTrace(); // } catch (JsonMappingException e) { // e.printStackTrace(); // } catch (IOException e) { // e.printStackTrace(); // } // return null; // } // // public static void main(String[] args) { // try { // Map<String, String> map = new HashMap<String, String>(); // map.put("aaa", "111"); // map.put("bbb", "222"); // String json = writeValueAsString(map); // System.out.println(json); // System.out.println(readValue(json, Map.class)); // } catch (Exception e) { // e.printStackTrace(); // } // } //}
[ "874449766@qq.com" ]
874449766@qq.com
b008f7a572322badb2bdf7544eab42ac324da52b
502a1c7b632cdba6b260279d20a90f4a185af1e6
/src/main/java/org/sahaj/hotelautomation/models/corridors/SubCorridor.java
ff7e687c3da2611f68cd015e6948710a94f01655
[]
no_license
akjoshi123/HotelAutomation
559b344a861ba9bb2985c43513cc728d2a1b9b7c
9775c4bfa4e9b0ccfbbbd8557e6c26a677b43636
refs/heads/master
2020-03-19T23:49:19.058402
2018-06-20T05:44:53
2018-06-20T05:44:53
137,021,086
0
0
null
2018-06-20T05:28:29
2018-06-12T05:24:47
Java
UTF-8
Java
false
false
751
java
package org.sahaj.hotelautomation.models.corridors; import org.sahaj.hotelautomation.constants.CorridorType; /** * Extends the Corridor class to implement SubCorridor. * * @author akjoshi on 19/06/18 * @project HotelAutomation */ public class SubCorridor extends Corridor { public SubCorridor(int corridorNumber) { super(CorridorType.Sub); this.corridorNumber = corridorNumber; this.getLight().turnOff(); } /** * Just prints the status of Light and AC for current sub corridor * */ public void print() { System.out.print("Sub Corridor " + corridorNumber + " "); this.getLight().print(); this.getAirConditioner().print(); System.out.println(); } }
[ "joshiakshayr2020@gmail.com" ]
joshiakshayr2020@gmail.com
88b22a598ea5375774f2868e7101e2edd42578b4
4e58058466647402441dd0a06d5efd91f7e6994a
/tern-studio-project/src/main/java/org/ternlang/studio/project/maven/ManualWagonProvider.java
e109719be6150c5f1512ad1277b96310d0fee487
[]
no_license
tern-lang/tern-studio
e8b883ed0ae805407a6f904dc5301aaeb887f164
c72bab201a57186f18b04c6369e35b09074f77c8
refs/heads/master
2022-12-23T06:59:31.604387
2022-12-17T20:24:44
2022-12-17T20:24:44
169,999,175
7
0
null
2022-05-20T20:57:46
2019-02-10T16:31:20
JavaScript
UTF-8
Java
false
false
876
java
package org.ternlang.studio.project.maven; import org.apache.maven.wagon.Wagon; import org.apache.maven.wagon.providers.http.LightweightHttpWagon; import org.apache.maven.wagon.providers.http.LightweightHttpWagonAuthenticator; import org.sonatype.aether.connector.wagon.WagonProvider; public class ManualWagonProvider implements WagonProvider { private static final String SCHEME = "http"; @Override public Wagon lookup(String roleHint) throws Exception { if (SCHEME.equals(roleHint)) { LightweightHttpWagonAuthenticator authenticator = new LightweightHttpWagonAuthenticator(); LightweightHttpWagon wagon = new LightweightHttpWagon(); wagon.setAuthenticator(authenticator); return wagon; } return null; } @Override public void release(Wagon wagon) { } }
[ "theternlang@gmail.com" ]
theternlang@gmail.com
a34200524e185e3c19a08a882fb1dc49f496ec65
f6a96ecf43bdf483da408ea7dd4d1e7d7525c016
/src/main/java/cn/itcast/dao/ReadDao.java
2c2ce01d20bbff4bd01970a331eb836361ace644
[]
no_license
little-Arya/LibraryManageSystem
a033ac1443b209b0fd106f15d01c14314780c849
be19c6f650d7f3fba3aff4d8f67adcec730d0779
refs/heads/master
2022-12-26T18:41:19.000577
2020-01-05T04:40:01
2020-01-05T04:40:01
231,867,451
0
0
null
2022-12-15T23:46:05
2020-01-05T04:32:58
Java
UTF-8
Java
false
false
2,223
java
package cn.itcast.dao; import cn.itcast.domain.Read; import org.apache.ibatis.annotations.*; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface ReadDao { //判断用户是否登录 @Select("select * from tb_reader where rdName=#{rdName} and rdPwd=#{rdPwd}") Read findWithLoginAndPassword(@Param("rdName")String rdName, @Param("rdPwd")Integer rdPwd); //查询所有账户 @Select("select * from tb_reader") public List<Read> findAllRead(); //保存账户信息 @Insert("insert into tb_reader(rdName,rdSex,rdType,rdDept,rdPhone,rdEmail,rdDateReg,rdPhoto,rdStatus,rdBorrowQty,rdPwd,rdAdminRoles) " + "values(#{rdName},#{rdSex},#{rdType},#{rdDept},#{rdPhone},#{rdEmail},#{rdDateReg},#{rdPhoto},#{rdStatus},#{rdBorrowQty},#{rdPwd},#{rdAdminRoles})") public void saveRead(Read read); //模糊查找 @Select("select * from tb_reader where rdType like '%${rdType}%' and rdDept like '%${rdDept}%' and rdName like '%${rdName}%'") List<Read> getItemByTDN(Read read); /**删除指定id数据*/ @Delete("delete from tb_reader where rdID=#{rdID}") public void deleteReadById(int rdID); //根据id查询数据 //更新前的查询 @Select("select * from tb_reader where rdID=#{rdID}") Read getReadById(int rdID); // 根据参数更新数据 @Update("update tb_reader set rdName=#{rdName},rdSex=#{rdSex},rdType=#{rdType},rdDept=#{rdDept},rdPhone=#{rdPhone},rdEmail=#{rdEmail},rdDateReg=#{rdDateReg},rdPhoto=#{rdPhoto},rdStatus=#{rdStatus},rdBorrowQty=#{rdBorrowQty},rdPwd=#{rdPwd},rdAdminRoles=#{rdAdminRoles} where rdID=#{rdID}") public void updateReadById(Read read); //根据用户名查询数据 @Select("select * from tb_reader where rdName=#{rdName}") Read getReadByName(String rdName); // 根据想让借书数量加一 @Update("update tb_reader set rdName=#{rdName},rdSex=#{rdSex},rdType=#{rdType},rdDept=#{rdDept},rdPhone=#{rdPhone},rdEmail=#{rdEmail},rdDateReg=#{rdDateReg},rdPhoto=#{rdPhoto},rdStatus=#{rdStatus},rdBorrowQty=#{rdBorrowQty},rdPwd=#{rdPwd},rdAdminRoles=#{rdAdminRoles} where rdID=#{rdID}") public void addBroQty(Read read); }
[ "2576310176@qq.com" ]
2576310176@qq.com
365c9d181a746cae3a9454bf71c95b1341a8e53f
f96fe513bfdf2d1dbd582305e1cbfda14a665bec
/net.sf.smbt.nmea1083/src-model/net/sf/smbt/gps/nmea1083/impl/WCVImpl.java
47ab485e40376b2d2a5edc445ae18df466a49913
[]
no_license
lucascraft/ubq_wip
04fdb727e7b2dc384ba1d2195ad47e895068e1e4
eff577040f21be71ea2c76c187d574f1617703ce
refs/heads/master
2021-01-22T02:28:20.687330
2015-06-10T12:38:47
2015-06-10T12:38:47
37,206,324
0
0
null
null
null
null
UTF-8
Java
false
false
798
java
/** * <copyright> * </copyright> * * $Id$ */ package net.sf.smbt.gps.nmea1083.impl; import net.sf.smbt.gps.nmea1083.Nmea1083Package; import net.sf.smbt.gps.nmea1083.WCV; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>WCV</b></em>'. * <!-- end-user-doc --> * <p> * </p> * * @generated */ public class WCVImpl extends MinimalEObjectImpl.Container implements WCV { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected WCVImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return Nmea1083Package.Literals.WCV; } } //WCVImpl
[ "lucas.bigeardel@gmail.com" ]
lucas.bigeardel@gmail.com
1488b9cd24223e71d0f44d0137c33e41a2805e39
7c2acc9c1f9fbc1acf1637c14320b7d698c3bfd0
/relacionamento_objetos_enderecos/src/entity/Endereco.java
9dc29f469187d039fbc1a71d7ffd651cd404e512
[]
no_license
acacios/Projeto
17765c6dd8198b888fdd89358fa36a2ac65e7b38
c5045622a073f78bbb22e275f04dd859856f94e3
refs/heads/master
2021-01-19T08:26:23.618598
2015-05-27T01:21:52
2015-05-27T01:21:52
34,578,069
1
0
null
null
null
null
UTF-8
Java
false
false
674
java
package entity; public class Endereco { private String estado; private String cidade; private String logradouro; private int numero; public String getEstado() { return estado; } public void setEstado(String estado) { this.estado = estado; } public String getCidade() { return cidade; } public void setCidade(String cidade) { this.cidade = cidade; } public String getLogradouro() { return logradouro; } public void setLogradouro(String logradouro) { this.logradouro = logradouro; } public int getNumero() { return numero; } public void setNumero(int numero) { this.numero = numero; } }
[ "acaciosantosdesouza@gmail.com" ]
acaciosantosdesouza@gmail.com
216ccb4d52e6f5f3046a56564feeecc197cd5f91
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/drjava_cluster/11359/src_0.java
9982712b3b98a24a8f3cd9e49128276228a69f9f
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,818
java
/*BEGIN_COPYRIGHT_BLOCK * * This file is part of DrJava. Download the current version of this project: * http://sourceforge.net/projects/drjava/ or http://www.drjava.org/ * * DrJava Open Source License * * Copyright (C) 2001-2003 JavaPLT group at Rice University (javaplt@rice.edu) * All rights reserved. * * Developed by: Java Programming Languages Team * Rice University * http://www.cs.rice.edu/~javaplt/ * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal with the Software without restriction, including without * limitation the rights to use, copy, modify, merge, publish, distribute, * sublicense, and/or sell copies of the Software, and to permit persons to * whom the Software is furnished to do so, subject to the following * conditions: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimers. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimers in the * documentation and/or other materials provided with the distribution. * - Neither the names of DrJava, the JavaPLT, Rice University, nor the * names of its contributors may be used to endorse or promote products * derived from this Software without specific prior written permission. * - Products derived from this software may not be called "DrJava" nor * use the term "DrJava" as part of their names without prior written * permission from the JavaPLT group. For permission, write to * javaplt@rice.edu. * * 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 CONTRIBUTORS OR COPYRIGHT HOLDERS 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 WITH THE SOFTWARE. * END_COPYRIGHT_BLOCK*/ package edu.rice.cs.drjava.model.cache; import javax.swing.text.BadLocationException; import java.util.*; import java.io.IOException; import edu.rice.cs.util.Pair; import edu.rice.cs.drjava.model.definitions.DefinitionsDocument; import edu.rice.cs.drjava.model.definitions.NoSuchDocumentException; import edu.rice.cs.drjava.model.OpenDefinitionsDocument; import edu.rice.cs.drjava.model.FileMovedException; import edu.rice.cs.util.UnexpectedException; public class DocumentCache{ private final Hashtable<OpenDefinitionsDocument,Pair<DefinitionsDocument,DDReconstructor>> table; /** * most recent are first * least recent are last */ private final LinkedList<OpenDefinitionsDocument> lru; private int CACHE_SIZE = 24; public DocumentCache(){ lru = new LinkedList<OpenDefinitionsDocument>(); table = new Hashtable<OpenDefinitionsDocument,Pair<DefinitionsDocument,DDReconstructor>>(); } /** * adds the ODD to the cache with the given document and reconstructor as its value (a pair Open) * @param odd the ODD to use as the key to the cache * @param reconstructor a Open which can make another DefinitionsDocument for this odd if needed */ public void put(OpenDefinitionsDocument odd, DDReconstructor reconstructor){ //System.out.println("put: " + odd); Pair<DefinitionsDocument,DDReconstructor> pair = new Pair<DefinitionsDocument,DDReconstructor>(null, reconstructor); table.remove(odd); table.put(odd, pair); synchronized(lru) { lru.remove(odd); } // System.out.println(this); } /** * retrieves the definitions document for the ODD. If the dd is not available, it is reconstructed * then returned. When the dd is retrieved, it is placed at the top of the most recently used list * so that it will stay in the cache longer * @param odd the ODD to use as the key to the cache * @return a DefinitionsDocument for this odd */ public DefinitionsDocument get(OpenDefinitionsDocument odd) throws IOException, FileMovedException{ DefinitionsDocument retdoc; Pair<DefinitionsDocument,DDReconstructor> pair = table.get(odd); if(pair == null){ throw new NoSuchDocumentException("Cannot obtain the definitions document for: " + odd); } retdoc = pair.getFirst(); updatelru(odd, pair); // System.out.println(this); if(retdoc == null){ try{ // System.out.println("DocumentCache.java: 114: creating document from reconstructor for " + odd); retdoc = pair.getSecond().make(); pair = new Pair<DefinitionsDocument,DDReconstructor>(retdoc, pair.getSecond()); table.remove(odd); table.put(odd, pair); } catch(BadLocationException e){ throw new UnexpectedException(e); } } return retdoc; } /** * @param odd the open definitions document who registered the reconstructor * @return the reconstructor associated with the given odd */ public DDReconstructor getReconstructor(OpenDefinitionsDocument odd) { Pair<DefinitionsDocument,DDReconstructor> pair = table.get(odd); if(pair == null){ throw new NoSuchDocumentException("Cannot obtain the reconstructor for: " + odd); } return pair.getSecond(); } /** * updates the ODD to the cache with the given document and reconstructor as its value (a pair Open) * @param odd the ODD to use as the key to the cache * @param reconstructor a new reconstructor for this odd */ public void update(OpenDefinitionsDocument odd, DDReconstructor reconstructor){ //System.out.println("update " + odd); Pair<DefinitionsDocument,DDReconstructor> oldpair = table.get(odd); Pair<DefinitionsDocument,DDReconstructor> newpair = new Pair<DefinitionsDocument,DDReconstructor>(null, reconstructor); if(isDDocInCache(odd)){ reconstructor.saveDocInfo(oldpair.getFirst()); oldpair.getFirst().close(); } oldpair = table.remove(odd); table.put(odd, newpair); } /** * updates the lru cache to have the input document as most recently used * @param odd the document that has been used most recently */ private void updatelru(OpenDefinitionsDocument odd, Pair<DefinitionsDocument,DDReconstructor> pair){ synchronized(lru) { if (!lru.isEmpty() && lru.getFirst() == odd) { //System.out.println("updatelru: " + odd + " is first in list"); return; } lru.remove(odd); } if (!(isDDocInCache(odd) && pair.getFirst().isModifiedSinceSave())) { // System.out.println("adding " + odd + " to lru"); synchronized(lru) { lru.addFirst(odd); } } //System.out.println("Cache size is : " + lru.size()); synchronized(lru) { if (lru.size() > CACHE_SIZE) { odd = lru.removeLast(); Pair<DefinitionsDocument,DDReconstructor> removedPair = table.get(odd); // System.out.println("should i dispose of " + odd + "?"); if(isDDocInCache(odd) && removedPair.getFirst().isModifiedSinceSave()){ // System.out.println("no"); } else { // System.out.println("disposing of " + odd); update(odd, removedPair.getSecond()); } } } } /** * @return true if the DefinitionsDocument for this OpenDefinitionsDocument is in the cache * @param oddoc the key to this hash */ public boolean isDDocInCache(OpenDefinitionsDocument oddoc){ // System.out.print("checking doc in cache: " + oddoc); Pair<DefinitionsDocument,DDReconstructor> pair = table.get(oddoc); if(pair == null){ throw new NoSuchDocumentException("Cannot obtain the needed definitions document for " + oddoc); } DefinitionsDocument retdoc = pair.getFirst(); return retdoc != null; } public void removeDoc(OpenDefinitionsDocument odd){ Pair<DefinitionsDocument,DDReconstructor> pair = table.remove(odd); if(pair.getFirst() != null){ // pair.getSecond().saveDocInfo(pair.getFirst()); pair.getFirst().close(); } synchronized(lru) { lru.remove(odd); } } public void setCacheSize(int size) { if (size < 0) { throw new IllegalArgumentException("Cannot set the cache size less than 0"); } CACHE_SIZE = size; } public int getCacheSize() { return CACHE_SIZE; } public int getNumInCache(){ return lru.size(); } public synchronized String toString() { return "Document Cache: LRU: " + lru; } }
[ "375833274@qq.com" ]
375833274@qq.com
8fceb8b5cf2eb46af4209fbc6d897c297e503c08
196c7a790dc64b91d02d0d540e1d049ba1c25603
/src/com/kpc/eos/model/bill/PriceDetailModel.java
85a39adb015bf8d05c41377d3e411801c1924f8a
[]
no_license
myhope8729/Java-Spring-B2B
f657174faad9921e9a372a77821fc2e834d3921b
adbbd6c10f6b6bafc6e74ffb62fc97b5be05fda1
refs/heads/master
2020-07-12T04:07:31.451204
2019-08-27T14:16:13
2019-08-27T14:16:13
204,713,316
1
0
null
null
null
null
UTF-8
Java
false
false
2,709
java
package com.kpc.eos.model.bill; import java.lang.reflect.Field; import java.lang.reflect.Method; import org.apache.commons.lang.StringUtils; import lombok.Data; import com.kpc.eos.core.model.CommonModel; import com.kpc.eos.core.util.FileUtil; import com.kpc.eos.core.util.FormatUtil; @Data public class PriceDetailModel extends CommonModel { private static final long serialVersionUID = -754189837422039796L; private String billId; private String itemId; private String cost; private String price; private String qty; private String total; private String priceIn; private String d11; private String d12; private String d21; private String d22; private String d31; private String d32; private String d41; private String d42; private String d51; private String d52; private String note; private String c1; private String c2; private String c3; private String c4; private String c5; private String c6; private String c7; private String c8; private String c9; private String c10; private String c11; private String c12; private String c13; private String c14; private String c15; private String c16; private String c17; private String c18; private String c19; private String c20; private String itemImgPath; private String itemSmallImg; private String itemMediumImg; public String getItemImgPath() { if (StringUtils.isNotEmpty(itemImgPath) && FileUtil.checkFileExist("useritem", itemImgPath)){ return itemImgPath; }else{ return ""; } } public String getItemMediumImg() { return FileUtil.getItemImgUrl("medium", itemImgPath); } public String getItemSmallImg() { return FileUtil.getItemImgUrl("small", itemImgPath); } public PriceDetailModel() { } public void set(String paramName, String paramValue) throws Exception { Method[] methods = this.getClass().getMethods(); for (Method method : methods ) { if(method.getName().equals("set"+FormatUtil.toFirstUpperCase(paramName))) { Class<?> []ptype = method.getParameterTypes(); if(ptype.length == 1) { if (ptype[0] == String.class) { method.invoke(this, paramValue); } } } } } public String get(String paramName) throws Exception { String data = null; boolean oriAccessible = true; Field field = this.getClass().getDeclaredField(paramName); if(!field.isAccessible()){ field.setAccessible(true); oriAccessible = false; } if(field.getType().equals(String.class)){ data = (String)field.get(this); } if (!oriAccessible) { field.setAccessible(oriAccessible); } return (data != null)? data : ""; } }
[ "myhope1227@hotmail.com" ]
myhope1227@hotmail.com
d2acd3b60dd6ef0a359c4ff59cc7634ad3b5761d
335cdd16d4b4dba05cc0e31ff5426407aa04ccc6
/src/com/questingsoftware/threewishes/service/ConsultaPrecoService.java
95c48bfc9b5dbd21462789a6b6c22340ce456ecc
[]
no_license
Dancovich/android-exercicio-wishlist
8df4080d6911ec04beed0feb0197b757e063a982
98fab4ce6b34150bd6d69a9f3024a0e26902bebb
refs/heads/master
2020-05-18T12:50:36.738255
2012-11-09T18:16:59
2012-11-09T18:16:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,784
java
package com.questingsoftware.threewishes.service; import java.util.ArrayList; import android.app.IntentService; import android.app.NotificationManager; import android.content.Context; import android.content.Intent; import android.support.v4.app.NotificationCompat.Builder; import com.questingsoftware.threewishes.R; import com.questingsoftware.threewishes.model.WishItem; import com.questingsoftware.threewishes.persistence.DBOpenHelper; /** * * Consulta o preço atual de um determinado item e informa o usuário que o preço * mudou. * */ public class ConsultaPrecoService extends IntentService { private static final String THREAD_NAME = "PriceCheckThread"; public ConsultaPrecoService() { super(THREAD_NAME); } @Override protected void onHandleIntent(Intent intent) { ArrayList<WishItem> itens = DBOpenHelper.selectAll(this); if (itens != null) { for (WishItem item : itens) { if (item.getAtualizarPreco()) { // Por enquanto informa o preço atual do item mesmo. String text = String .format(this .getString(R.string.notification_price_change), item.getNome(), item.getPrecoMinimo() .doubleValue()); final NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Builder builder = new Builder(this); builder.setWhen(System.currentTimeMillis()) .setSmallIcon(R.drawable.ic_launcher) .setTicker("Olha a Faaaaca!") .setContentTitle("Mudança de Preço") .setContentText(text) .setContentInfo("Content Info") .setVibrate( new long[] { 0, 100, 100, 200, 100, 200 }) .setLights(0xff00ff00, 300, 100); notificationManager.notify(1, builder.build()); } } } } }
[ "dcviana@gmail.com" ]
dcviana@gmail.com
bf0a9e91035baecf92f7810094f0118c4b609803
a15a297617c13932e474d9842936c0c005ccd935
/src/com/ssh/jd/model/user/pojo/User.java
dd3f2d49a81ab4aae74ab9a51553d2aad938284a
[]
no_license
jiaxing924/jd
6380387a7a0a769625c4684d7731b378761f1f2f
dea0c2b1a9d59c5df300238c97e56f11d5dc6286
refs/heads/master
2021-05-14T11:29:28.757974
2016-07-25T09:08:12
2016-07-25T09:08:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,208
java
package com.ssh.jd.model.user.pojo; import java.util.Date; /** * <p>Title:User</p> * <p>Description:用户实体类,对应数据库用户表</p> * @author 刘增刚 * @date 2016年7月12日 下午12:38:29 */ public class User { private String id; private String name; private String password; private String phone; private String address; private String email; private Date regDate; // 注册日期 public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Date getRegDate() { return regDate; } public void setRegDate(Date regDate) { this.regDate = regDate; } }
[ "15764343296@163.com" ]
15764343296@163.com
13c06b0b6c73a6267a67439d917feaaa7c5b6486
f6c59e439cce046aa7875a9c8b26bbe159aafd18
/app/src/main/java/com/flybbird/hometownweather/Data/WeatherData.java
2b85fdbe0201741c288f870232f1b38eaccd1050
[]
no_license
GDGincheonAndroidStudy/GDG_Suyoung
0e4acf5d5877eef9f5737d3d1710c908740cd29e
d38c5f8e8c090f516c7ffd136e46520b87e1a68f
refs/heads/master
2021-01-10T17:30:55.998800
2016-01-29T12:14:26
2016-01-29T12:14:26
49,811,288
0
1
null
null
null
null
UTF-8
Java
false
false
1,251
java
package com.flybbird.hometownweather.Data; /** * Created by SuyoungKang on 2016. 1. 15.. */ public class WeatherData { private String cityID = null; private String cityName = null; private String weatherIconName = null; private String weatherStateDesc = null; private float weatherTempature ; public String getCityID() {return this.cityID;}; public void setCityID(String id) { this.cityID = id; } public String getCityName() { return this.cityName; } public void setCityName(String name ){ this.cityName = name; } public String getWeatherIconName(){ return this.weatherIconName; } public void setWeatherIconName(String name){ this.weatherIconName = name; } public String getWeatherStateDesc(){ return this.weatherStateDesc; } public void setWeatherStateDesc(String desc){ this.weatherStateDesc = desc; } public String getWeatherIconUrl(){ return "http://openweathermap.org/img/w/"+ this.weatherIconName+".png"; } public void setWeatherTempature(float kelvin){ weatherTempature = kelvin - 273.15f; } public float getWeatherTempature(){ return weatherTempature; } }
[ "flybbird@gmail.com" ]
flybbird@gmail.com
9cf6df0cebf801f86473bef75e60acf12d13e0eb
49a4915291c072b795f91c4af980658d057575a4
/fbsearch_android/java/io/github/huntingzhu/searchonfb/MainActivity.java
0305cc9c8a32812a051b2deb32694cc2cc4dd52b
[]
no_license
huntingzhu/facebook_search
3d11446b0d405bea4690e43d6099ba99bd9e30c5
ad7de158620c2b1db9ca0f9dc4127cedabd9e284
refs/heads/master
2021-07-12T18:33:04.892331
2017-10-14T19:39:22
2017-10-14T19:39:22
106,955,515
1
0
null
null
null
null
UTF-8
Java
false
false
9,554
java
package io.github.huntingzhu.searchonfb; import android.Manifest; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.provider.Settings; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.util.Log; import android.view.View; import android.support.design.widget.NavigationView; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import java.util.ArrayList; public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { public static final String EXTRA_KEYWORDS = "io.github.huntingzhu.searchonfb.KEYWORDS"; public static final String EXTRA_LOCATION = "io.github.huntingzhu.searchonfb.LOCATION"; // The minimum distance to change updates in meters private static final long MIN_DISTANCE_UPDATE = 100; // 100 meters // The minimum time between updates in milliseconds private static final long MIN_TIME_UPDATE = 1000 * 60 * 5; // 5 min private LocationManager locationManager; private LocationListener locationListener; private Location lastKnownLocation; private boolean GPSProviderStatus = false; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Setup toolbar Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); // Setup drawer DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); drawer.setDrawerListener(toggle); toggle.syncState(); // Setup navigation view NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view); navigationView.setNavigationItemSelectedListener(this); navigationView.setCheckedItem(R.id.nav_home); // Get location locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); locationListener = new LocationListener() { @Override public void onLocationChanged(Location location) { lastKnownLocation = location; Log.i("Main-Location", lastKnownLocation.toString()); } @Override public void onStatusChanged(String provider, int status, Bundle extras) {} @Override public void onProviderEnabled(String provider) {} @Override public void onProviderDisabled(String provider) {} }; GPSProviderStatus = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER); // Check if GPS Provider is enabled if(GPSProviderStatus) { // Check the permission status of location service for this app if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { // Ask for permission of location service; ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1); } else { // We have permission locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME_UPDATE, MIN_DISTANCE_UPDATE, locationListener); lastKnownLocation = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); Log.i("Main-Location", lastKnownLocation.toString()); } } else { showSettingsAlert(); // Ask user to enable location service; } } @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) { locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME_UPDATE, MIN_DISTANCE_UPDATE, locationListener); lastKnownLocation = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); Log.i("Main-Location", lastKnownLocation.toString()); } } } @Override public void onBackPressed() { DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); if (drawer.isDrawerOpen(GravityCompat.START)) { drawer.closeDrawer(GravityCompat.START); } else { super.onBackPressed(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } @SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { // Handle navigation view item clicks here. int id = item.getItemId(); if (id == R.id.nav_home) { // Handle the home action onBackPressed(); } else if (id == R.id.nav_favorites) { // Handle the favorites action Intent intentFavor = new Intent(this, FavoriteActivity.class); startActivity(intentFavor); } else if (id == R.id.nav_about_me) { // Handle the favorites action Intent intentAboutMe = new Intent(this, AboutMeActivity.class); startActivity(intentAboutMe); } DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; } // Search facebook results public void searchFacebook (View view) { EditText searchForm = (EditText) findViewById(R.id.searchForm); String keywords = searchForm.getText().toString().trim(); // Check if the search form is empty if(keywords.isEmpty() || keywords.length() == 0 || keywords.equals("") || keywords == null) { Toast.makeText(this, "Please enter a keyword!", Toast.LENGTH_SHORT).show(); } else { // Start Results activity Intent intentResult = new Intent(this, ResultActivity.class); // Transmit info to ResultActivity; intentResult.putExtra(EXTRA_KEYWORDS, keywords); ArrayList<String> locationStringArr = new ArrayList<>(); locationStringArr.add(String.valueOf(lastKnownLocation.getLongitude())); locationStringArr.add(String.valueOf(lastKnownLocation.getLatitude())); intentResult.putExtra(EXTRA_LOCATION, locationStringArr); startActivity(intentResult); } } // Clear Search Form public void clearSearchForm (View view) { EditText searchForm = (EditText) findViewById(R.id.searchForm); searchForm.setText(""); } /** * Function to show settings alert dialog */ public void showSettingsAlert() { AlertDialog.Builder alertDialog = new AlertDialog.Builder(MainActivity.this); //Setting Dialog Title alertDialog.setTitle(R.string.GPSAlertDialogTitle); //Setting Dialog Message alertDialog.setMessage(R.string.GPSAlertDialogMessage); //On Pressing Setting button alertDialog.setPositiveButton(R.string.GPSAlertDialogSetting, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); MainActivity.this.startActivity(intent); } }); //On pressing cancel button alertDialog.setNegativeButton(R.string.GPSAlertDialogCancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); alertDialog.show(); } }
[ "huntingzhu@gmail.com" ]
huntingzhu@gmail.com
4b57e29e9430ae60f6013d0af8f4fe5537968715
f9d388437c49d07f38863f59d5fe120a005ba154
/src/test/java/cases/KR/DamageCapturingTest.java
c903ecc63664f1f6563af497c4509484d1977ff8
[]
no_license
heybruce/SLAtest
9935b64bff3a11bf844e343f948ab255e3725170
5ecd6433468c0366d8081596cd7a179ac43e38d2
refs/heads/master
2022-12-22T10:12:19.158050
2020-01-03T09:55:10
2020-01-03T09:55:10
298,230,038
1
0
null
null
null
null
UTF-8
Java
false
false
1,953
java
package cases.KR; import cases.TestBase; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import pageobjects.processstep.DamageCapturingPO; import pageobjects.processstep.processstep.ProcessStepKRPO; import steps.Login; import utils.RedisManager; import utils.UtilitiesManager; import java.time.Instant; import static utils.webdrivers.WebDriverFactory.getDriver; public class DamageCapturingTest extends TestBase{ private ProcessStepKRPO processStepKRPO = new ProcessStepKRPO(); private DamageCapturingPO damageCapturingPO = new DamageCapturingPO(); String taskIdKey; @BeforeClass @Parameters(value = {"dataFile","vehicleElement"}) public void setup(String dataFile, String vehicleElement) { vehicleElementData = UtilitiesManager.setPropertiesFile(vehicleElement); testData = UtilitiesManager.setPropertiesFile(dataFile); } @BeforeMethod public void methodSetup() { processStepKRPO.setWebDriver(getDriver()); damageCapturingPO.setWebDriver(getDriver()); taskIdKey = testResult.get().getEnv() + "_" + testResult.get().getCountry() + "_taskId"; } @Test public void activateQapter(){ //Launch browser getDriver().get(testData.getString("test_url")); //Login Login login = new Login(); login.LoginBRE(testData.getString("ins_username"), testData.getString("password")); getDriver().get(UtilitiesManager.constructBreUrl( testData.getString("test_url"), RedisManager.getValue(taskIdKey), "BRE", "DamageCapturing")); // damageCapturingPO.clickQapterIcon(); testResult.get().setTimeStarted(Instant.now()); damageCapturingPO.switchToQapterIframe(); damageCapturingPO.navigationVehicle(); testResult.get().setTimeFinished(Instant.now()); } }
[ "bruce.liao@solera.com" ]
bruce.liao@solera.com
f6d6c283f057e6b0224df88488770113d4b54c50
af25a83a3fd9e8e39efb1884d708b6dce7729891
/38.count-and-say.java
2ac5ba2f7565ba8030038644a3353512bea49fdd
[]
no_license
junwi/leetcode
20b17f9b3d42aaffc2e3ec966de3311653625bc6
581070b1b4946fe93466bb988cbe4fc4e6670804
refs/heads/master
2023-06-22T07:28:59.823538
2023-06-19T10:27:17
2023-06-19T10:27:17
17,834,393
0
0
null
2018-09-21T05:02:02
2014-03-17T16:10:57
Java
UTF-8
Java
false
false
838
java
/* * @lc app=leetcode id=38 lang=java * * [38] Count and Say */ // @lc code=start class Solution { public String countAndSay(int n) { if (n == 1) { return "1"; } String s = countAndSay(n - 1); StringBuilder sb = new StringBuilder(); int m = 0; char last = 0; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (c == last) { m++; } else if (m == 0) { m++; last = c; } else { sb.append(m); sb.append(last); m = 1; last = c; } } if (m > 0) { sb.append(m); sb.append(last); } return sb.toString(); } } // @lc code=end
[ "wangwei07@kuaishou.com" ]
wangwei07@kuaishou.com
e6f6e1d886bff77eae1251c832d9e1885fafe10f
bd7febde5f4d21ad5acdd0784260a4df46c8a981
/Sreerag Spring MVC Demo/demo/src/main/java/com/formsubmitdemo/demo/ServletInitializer.java
937c276411d2277cc3a30d5d6dbcc842677687aa
[]
no_license
sreerages1999/MephistoGamingYT
30e775e23d383043f31fdf5a362a69046c54837b
74a6b38280f4a07e4d1cbca47b86cce69eb19a36
refs/heads/master
2023-06-10T02:37:21.806995
2021-07-05T15:15:33
2021-07-05T15:15:33
383,127,387
0
0
null
null
null
null
UTF-8
Java
false
false
411
java
package com.formsubmitdemo.demo; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; public class ServletInitializer extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(DemoApplication.class); } }
[ "sreerages277@outlook.com" ]
sreerages277@outlook.com
5d7a1a29756a4b7211746b9d928e0e1dd19e23e1
ddcdede5b660fb7803da72e7f166f1683d0d6c6b
/src/main/java/hu/paninform/startmedsol/service/dto/CsPostalCodeCriteria.java
b1c94289170c813adaf2ee9d821b025e4aabfad9
[]
no_license
pmarkotan/startmedsol-prototype
62c7cc9c151166e2489531e02f5fa0430be53074
90996b4cd308928f8e91b5d9538d648e717f9473
refs/heads/master
2022-12-16T06:22:23.798231
2020-09-18T07:47:46
2020-09-18T07:47:46
292,579,811
0
0
null
2020-09-18T07:47:47
2020-09-03T13:34:49
Java
UTF-8
Java
false
false
6,810
java
package hu.paninform.startmedsol.service.dto; import java.io.Serializable; import java.util.Objects; import io.github.jhipster.service.Criteria; import hu.paninform.startmedsol.domain.enumeration.PcRange; import io.github.jhipster.service.filter.BooleanFilter; import io.github.jhipster.service.filter.DoubleFilter; import io.github.jhipster.service.filter.Filter; import io.github.jhipster.service.filter.FloatFilter; import io.github.jhipster.service.filter.IntegerFilter; import io.github.jhipster.service.filter.LongFilter; import io.github.jhipster.service.filter.StringFilter; /** * Criteria class for the {@link hu.paninform.startmedsol.domain.CsPostalCode} entity. This class is used * in {@link hu.paninform.startmedsol.web.rest.CsPostalCodeResource} to receive all the possible filtering options from * the Http GET request parameters. * For example the following could be a valid request: * {@code /cs-postal-codes?id.greaterThan=5&attr1.contains=something&attr2.specified=false} * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use * fix type specific filters. */ public class CsPostalCodeCriteria implements Serializable, Criteria { /** * Class for filtering PcRange */ public static class PcRangeFilter extends Filter<PcRange> { public PcRangeFilter() { } public PcRangeFilter(PcRangeFilter filter) { super(filter); } @Override public PcRangeFilter copy() { return new PcRangeFilter(this); } } private static final long serialVersionUID = 1L; private LongFilter id; private StringFilter code; private StringFilter settlement; private StringFilter part; private StringFilter street; private StringFilter kind; private PcRangeFilter rangeType; private IntegerFilter rangeLo; private IntegerFilter rangeHi; private StringFilter district; private LongFilter validityId; public CsPostalCodeCriteria() { } public CsPostalCodeCriteria(CsPostalCodeCriteria other) { this.id = other.id == null ? null : other.id.copy(); this.code = other.code == null ? null : other.code.copy(); this.settlement = other.settlement == null ? null : other.settlement.copy(); this.part = other.part == null ? null : other.part.copy(); this.street = other.street == null ? null : other.street.copy(); this.kind = other.kind == null ? null : other.kind.copy(); this.rangeType = other.rangeType == null ? null : other.rangeType.copy(); this.rangeLo = other.rangeLo == null ? null : other.rangeLo.copy(); this.rangeHi = other.rangeHi == null ? null : other.rangeHi.copy(); this.district = other.district == null ? null : other.district.copy(); this.validityId = other.validityId == null ? null : other.validityId.copy(); } @Override public CsPostalCodeCriteria copy() { return new CsPostalCodeCriteria(this); } public LongFilter getId() { return id; } public void setId(LongFilter id) { this.id = id; } public StringFilter getCode() { return code; } public void setCode(StringFilter code) { this.code = code; } public StringFilter getSettlement() { return settlement; } public void setSettlement(StringFilter settlement) { this.settlement = settlement; } public StringFilter getPart() { return part; } public void setPart(StringFilter part) { this.part = part; } public StringFilter getStreet() { return street; } public void setStreet(StringFilter street) { this.street = street; } public StringFilter getKind() { return kind; } public void setKind(StringFilter kind) { this.kind = kind; } public PcRangeFilter getRangeType() { return rangeType; } public void setRangeType(PcRangeFilter rangeType) { this.rangeType = rangeType; } public IntegerFilter getRangeLo() { return rangeLo; } public void setRangeLo(IntegerFilter rangeLo) { this.rangeLo = rangeLo; } public IntegerFilter getRangeHi() { return rangeHi; } public void setRangeHi(IntegerFilter rangeHi) { this.rangeHi = rangeHi; } public StringFilter getDistrict() { return district; } public void setDistrict(StringFilter district) { this.district = district; } public LongFilter getValidityId() { return validityId; } public void setValidityId(LongFilter validityId) { this.validityId = validityId; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final CsPostalCodeCriteria that = (CsPostalCodeCriteria) o; return Objects.equals(id, that.id) && Objects.equals(code, that.code) && Objects.equals(settlement, that.settlement) && Objects.equals(part, that.part) && Objects.equals(street, that.street) && Objects.equals(kind, that.kind) && Objects.equals(rangeType, that.rangeType) && Objects.equals(rangeLo, that.rangeLo) && Objects.equals(rangeHi, that.rangeHi) && Objects.equals(district, that.district) && Objects.equals(validityId, that.validityId); } @Override public int hashCode() { return Objects.hash( id, code, settlement, part, street, kind, rangeType, rangeLo, rangeHi, district, validityId ); } // prettier-ignore @Override public String toString() { return "CsPostalCodeCriteria{" + (id != null ? "id=" + id + ", " : "") + (code != null ? "code=" + code + ", " : "") + (settlement != null ? "settlement=" + settlement + ", " : "") + (part != null ? "part=" + part + ", " : "") + (street != null ? "street=" + street + ", " : "") + (kind != null ? "kind=" + kind + ", " : "") + (rangeType != null ? "rangeType=" + rangeType + ", " : "") + (rangeLo != null ? "rangeLo=" + rangeLo + ", " : "") + (rangeHi != null ? "rangeHi=" + rangeHi + ", " : "") + (district != null ? "district=" + district + ", " : "") + (validityId != null ? "validityId=" + validityId + ", " : "") + "}"; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
4d534d9208cb6b42f9bc5b6ee9ad81ba20b8627d
9b49bf017fc1cfbdc0355c485c995c8c481496a1
/dds-bindings/src/main/java/org/openfmb/model/dds/rti/openfmb/commonmodule/EnergyProductTypeKindSeq.java
af2d644aa38f5ae9c97dcf2768f629bea1d2d15f
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
pkritpra/openfmb-dds-adapters
b7b25a010f11c99be086253cee9534a71a259358
1dc811dcde72082dde2c46420142ebbfe19a2dd3
refs/heads/master
2020-04-15T23:11:52.212964
2016-02-15T16:44:12
2016-02-15T16:44:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,302
java
/* WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY. This file was generated from .idl using "rtiddsgen". The rtiddsgen tool is part of the RTI Connext distribution. For more information, type 'rtiddsgen -help' at a command shell or consult the RTI Connext manual. */ package org.openfmb.model.dds.rti.openfmb.commonmodule; import java.util.Collection; import com.rti.dds.infrastructure.Copyable; import com.rti.dds.util.Enum; import com.rti.dds.util.Sequence; import com.rti.dds.util.LoanableSequence; /** * A sequence of EnergyProductTypeKind instances. */ public final class EnergyProductTypeKindSeq extends LoanableSequence implements Copyable { // ----------------------------------------------------------------------- // Package Fields // ----------------------------------------------------------------------- /** * When a memory loan has been taken out in the lower layers of * RTI Data Distribution Service, store a pointer to the native sequence here. * That way, when we call finish(), we can give the memory back. */ /*package*/ transient Sequence _loanedInfoSequence = null; // ----------------------------------------------------------------------- // Public Fields // ----------------------------------------------------------------------- // --- Constructors: ----------------------------------------------------- public EnergyProductTypeKindSeq() { super(EnergyProductTypeKind.class); } public EnergyProductTypeKindSeq (int initialMaximum) { super(EnergyProductTypeKind.class, initialMaximum); } public EnergyProductTypeKindSeq (Collection elements) { super(EnergyProductTypeKind.class, elements); } // --- From Copyable: ---------------------------------------------------- /** * Copy data into <code>this</code> object from another. * The result of this method is that both <code>this</code> * and <code>src</code> will be the same size and contain the * same data. * * @param src The Object which contains the data to be copied * @return <code>this</code> * @exception NullPointerException If <code>src</code> is null. * @exception ClassCastException If <code>src</code> is not a * <code>Sequence</code> OR if one of the objects contained in * the <code>Sequence</code> is not of the expected type. * @see com.rti.dds.infrastructure.Copyable#copy_from(java.lang.Object) */ public Object copy_from(Object src) { Sequence typedSrc = (Sequence) src; final int srcSize = typedSrc.size(); final int origSize = size(); // if this object's size is less than the source, ensure we have // enough room to store all of the objects if (getMaximum() < srcSize) { setMaximum(srcSize); } // trying to avoid clear() method here since it allocates memory // (an Iterator) // if the source object has fewer items than the current object, // remove from the end until the sizes are equal if (srcSize < origSize){ removeRange(srcSize, origSize); } // copy the data from source into this (into positions that already // existed) for(int i = 0; (i < origSize) && (i < srcSize); i++){ if (typedSrc.get(i) == null){ set(i, null); } else { // check to see if our entry is null, if it is, a new instance has to be allocated if (get(i) == null){ set(i, EnergyProductTypeKind.create()); } set(i, ((Copyable) get(i)).copy_from(typedSrc.get(i))); } } // copy 'new' EnergyProductTypeKind objects (beyond the original size of this object) for(int i = origSize; i < srcSize; i++){ if (typedSrc.get(i) == null) { add(null); } else { // NOTE: we need to create a new object here to hold the copy add(EnergyProductTypeKind.create()); // we need to do a set here since enums aren't truely Copyable set(i, ((Copyable) get(i)).copy_from(typedSrc.get(i))); } } return this; } }
[ "devans@greenenergycorp.com" ]
devans@greenenergycorp.com
a088b9d767e252a6c88060a5807e86d62914f7fd
a045ab28316c4a6b2fac5a4dbcce1e7c4dad00eb
/GUI/src/main/java/battleship/ui/controls/GameField.java
3697d2581c0140bc630124f32394b72eece12a47
[]
no_license
ARTI1208/Battleship
d74b6574dd31475e31cf637f4b4259d35f69a50a
02ca27ee2049a004b5a7291053a6d6c3062f06c8
refs/heads/master
2023-02-07T22:26:14.070639
2021-01-03T15:04:17
2021-01-03T15:04:17
326,433,593
0
0
null
null
null
null
UTF-8
Java
false
false
11,142
java
package battleship.ui.controls; import battleship.Ocean; import battleship.ships.EmptySea; import battleship.ships.Ship; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ObjectPropertyBase; import javafx.geometry.HPos; import javafx.geometry.VPos; import javafx.scene.control.Button; import javafx.scene.control.Control; import javafx.scene.control.Label; import javafx.scene.layout.*; import java.awt.*; import static battleship.ui.controls.VisualShip.BATTLESHIP_DATA_FORMAT; public class GameField extends GridPane { private static final double CELL_MIN_HEIGHT = 40; private static final double CELL_MIN_WIDTH = 40; public enum FieldMode { SETUP, MY_FIELD, OPPONENT_FIELD } private FieldMode mode = FieldMode.OPPONENT_FIELD; public FieldCell selectedCell; public ObjectProperty<FieldCell> selectedCellProperty = new ObjectPropertyBase<FieldCell>() { @Override public Object getBean() { return this; } @Override public String getName() { return "selectedCell"; } }; private Ocean ocean = new Ocean(false); // public ObjectProperty<Ship> selectedShipProperty public GameField() { for (int i = 0; i < Ocean.HEIGHT + 1; i++) { for (int j = 0; j < Ocean.WIDTH + 1; j++) { Control child; if (i == 0 && j == 0) child = new javafx.scene.control.Label(); else if (i == 0) child = new javafx.scene.control.Label(Integer.toString(j - 1)); else if (j == 0) child = new Label(Integer.toString(i - 1)); else child = createFieldButton(i - 1, j - 1); add(child, i, j); GridPane.setHalignment(child, HPos.CENTER); GridPane.setValignment(child, VPos.CENTER); } ColumnConstraints columnSize = new ColumnConstraints(); columnSize.setHgrow(Priority.ALWAYS); columnSize.setMinWidth(CELL_MIN_WIDTH); getColumnConstraints().add(columnSize); } for (int i = 0; i < Ocean.WIDTH + 1; i++) { RowConstraints rowSize = new RowConstraints(); rowSize.setVgrow(Priority.ALWAYS); rowSize.setMinHeight(CELL_MIN_HEIGHT); getRowConstraints().add(rowSize); } getStylesheets().add("styles.scss"); setOnDragDropped(event -> { if (event.getTarget() instanceof FieldCell) { FieldCell cell = (FieldCell) event.getTarget(); Ship s = (Ship) event.getDragboard().getContent(BATTLESHIP_DATA_FORMAT); placeShip(cell.getRow(), cell.getColumn(), true, s); event.consume(); } }); } public FieldMode getMode() { return mode; } public void setMode(FieldMode mode) { this.mode = mode; if (mode == FieldMode.MY_FIELD) { updateStyleForMyField(); } } public Ocean getOcean() { return ocean; } public void setOcean(Ocean ocean) { this.ocean = ocean; if (mode == FieldMode.MY_FIELD) updateStyleForMyField(); } private void updateStyleForMyField() { for (int i = 0; i < Ocean.HEIGHT; i++) { for (int j = 0; j < Ocean.WIDTH; j++) { FieldCell cell = getFieldButton(j, i); cell.getStyleClass().remove("field-cell-with-ship"); if (!(ocean.getShipArray()[i][j] instanceof EmptySea)) { cell.getStyleClass().add("field-cell-with-ship"); } } } } public void placeAllShipsRandomly() { ocean.placeAllShipsRandomly(); for (int i = 0; i < Ocean.HEIGHT; i++) { for (int j = 0; j < Ocean.WIDTH; j++) { FieldCell cell = getFieldButton(j, i); cell.getStyleClass().remove("field-cell-with-ship"); if (!(ocean.getShipArray()[i][j] instanceof EmptySea)) { cell.getStyleClass().add("field-cell-with-ship"); } } } } public Ship getSelectedShip() { if (selectedCell == null) { return null; } return selectedCell.getShip(); } public boolean placeShip(int row, int column, boolean horizontal, Ship s) { return placeShip(row, column, horizontal, s, false); } public boolean placeShip(int row, int column, boolean horizontal, Ship s, boolean removeSelf) { if (s.okToPlaceShipAt(row, column, horizontal, ocean, removeSelf)) { if (s.getBowRow() >= 0 && s.getBowColumn() >= 0) removeShip(s); s.checkAndPlace(row, column, horizontal, ocean, removeSelf); Rectangle shipRect = s.getShipRect(); for (int i = shipRect.y; i < shipRect.y + shipRect.height; i++) { for (int j = shipRect.x; j < shipRect.x + shipRect.width; j++) { getFieldButton(j, i).getStyleClass().add("field-cell-with-ship"); } } return true; } return false; } public void removeShip(Ship s) { Rectangle shipRect = s.getShipRect(); for (int i = shipRect.y; i < shipRect.y + shipRect.height; i++) { for (int j = shipRect.x; j < shipRect.x + shipRect.width; j++) { getFieldButton(j, i).getStyleClass().remove("field-cell-with-ship"); } } s.removeFromOcean(ocean); } /** * Gets button corresponding to cell in the ocean * * @param column column index in the ocean * @param row roq index in the ocean * @return button corresponding to cell in the ocean */ public FieldCell getFieldButton(int column, int row) { return ((FieldCell) getChildren().get((column + 1) * (Ocean.HEIGHT + 1) + (row + 1))); } /** * Selects cell at given coordinates and deselects previously selected one * * @param column index of cell column in ocean * @param row index of cell row in ocean */ private void setSelectedCell(int column, int row) { FieldCell cell = getFieldButton(column, row); if (cell == selectedCell) return; if (selectedCell != null) { selectedCell.setSelected(false); } cell.setSelected(true); selectedCell = cell; selectedCellProperty.set(cell); // rowSpinner.getValueFactory().setValue(row); // columnSpinner.getValueFactory().setValue(column); } public void validateShipSunk(int row, int column) { FieldCell cell = getFieldButton(column, row); if (!cell.getText().equals(FieldCell.BUTTON_TEXT_SUNK)) { return; } int directionX = 0; int directionY = 0; if (row > 0 && getFieldButton(column, row - 1).getText().equals(FieldCell.BUTTON_TEXT_HIT)) { directionY = -1; } if (row < Ocean.HEIGHT - 1 && getFieldButton(column, row + 1).getText().equals(FieldCell.BUTTON_TEXT_HIT)) { directionY = 1; } if (column > 0 && getFieldButton(column - 1, row).getText().equals(FieldCell.BUTTON_TEXT_HIT)) { directionX = -1; } if (column < Ocean.WIDTH - 1 && getFieldButton(column + 1, row).getText().equals(FieldCell.BUTTON_TEXT_HIT)) { directionX = 1; } if (directionX == 0 && directionY == 0) { return; } do { row += directionY; column += directionX; FieldCell targetCell = getFieldButton(column, row); if (targetCell.getText().equals(FieldCell.BUTTON_TEXT_HIT)) { targetCell.applyShootResult(FieldCell.ShootResult.SUNK); } else { break; } } while (row >= 0 && row < Ocean.HEIGHT && column >= 0 && column < Ocean.WIDTH); } public boolean shootAt(int row, int column) { FieldCell button = getFieldButton(column, row); if (ocean.isGameOver()) { button.applyShootResult(FieldCell.ShootResult.INVALID); return false; } Ship associatedShip = ocean.getShipArray()[row][column]; if (!associatedShip.isHit(row, column)) { boolean result = ocean.shootAt(row, column); if (!result) { //miss button.applyShootResult(FieldCell.ShootResult.MISS); return false; } else if (associatedShip.isSunk()) { //ship sunk Rectangle r = associatedShip.getShipRect(); for (int i = r.y; i < r.y + r.height; i++) { for (int j = r.x; j < r.x + r.width; j++) { Ship shipAtPosition = ocean.getShipArray()[i][j]; FieldCell buttonAtPosition = getFieldButton(j, i); buttonAtPosition.applyShootResult(shipAtPosition instanceof EmptySea ? FieldCell.ShootResult.MISS : FieldCell.ShootResult.SUNK); } } return true; } else { // ship hit button.applyShootResult(FieldCell.ShootResult.HIT); return true; } } else { button.applyShootResult(FieldCell.ShootResult.INVALID); return false; } } /** * Creates and setups new cell of a field * * @param column index of cell column * @param row index of cell row * @return newly created cell */ private Button createFieldButton(int column, int row) { FieldCell button = new FieldCell(); button.setRow(row); button.setColumn(column); button.setGameField(this); button.focusedProperty().addListener((observable, oldValue, newValue) -> setSelectedCell(column, row)); button.hoverProperty().addListener((observable, oldValue, newValue) -> { if (mode == FieldMode.OPPONENT_FIELD) button.requestFocus(); }); button.setOnMouseMoved(ev -> { if (mode == FieldMode.OPPONENT_FIELD) button.requestFocus(); }); button.setMinSize(CELL_MIN_WIDTH, CELL_MIN_HEIGHT); try { button.prefHeightProperty().bind(heightProperty().divide(10)); button.prefWidthProperty().bind(widthProperty().divide(10)); } catch (Exception e) { e.printStackTrace(); } button.setOnAction(event -> { if (ocean == null || mode != FieldMode.OPPONENT_FIELD) return; if (button.getText().equals(FieldCell.BUTTON_TEXT_DEFAULT)) { shootAt(row, column); } else { button.applyShootResult(FieldCell.ShootResult.INVALID); } }); return button; } }
[ "leonardo906@mail.ru" ]
leonardo906@mail.ru
927711b6b087a2c799faa8308108cecc409f4f0c
c22e314eb8b33bb7823f72653e931f82e5ac4175
/org.dbdoclet.svg/src/main/java/org/dbdoclet/svg/shape/g2d/ProcessStartArrow.java
80298f17b31820e91d91a21e8b71602e34cb6b48
[]
no_license
mfuchs23/markup
5239a0448ef07deb8df5751d1e2e9666cdf1501e
af0d1610a1be93c4f1f3bda8ee1e6d9e66cbeaa2
refs/heads/master
2023-06-24T15:50:15.997213
2023-06-07T10:45:48
2023-06-07T10:45:48
22,429,612
0
1
null
null
null
null
UTF-8
Java
false
false
1,195
java
/* * ### Copyright (C) 2008 Michael Fuchs ### * ### All Rights Reserved. ### * * Author: Michael Fuchs * E-Mail: michael.fuchs@unico-group.com * URL: http://www.michael-a-fuchs.de */ package org.dbdoclet.svg.shape.g2d; import java.awt.Graphics2D; import java.awt.Polygon; public class ProcessStartArrow extends ProcessArrow { public ProcessStartArrow(String id, int row, int col) { super(id, row, col); } public ProcessStartArrow(Graphics2D g2d, String id, int row, int col, String text) { super(g2d, id, row, col, text); } public void draw(int x, int y) { Graphics2D g2d = getGraphics2D(); int width = getWidth(); int height = getHeight(); Polygon p = new Polygon(); p.addPoint(x, y); p.addPoint(x, y + height); p.addPoint(x + width, y + height); p.addPoint(x + width + 17, y + height - (height / 2)); p.addPoint(x + width, y); g2d.setPaint(backgroundColor); g2d.fillPolygon(p); g2d.setPaint(foregroundColor); g2d.draw(p); g2d.drawString(text, x + leftPadding, y + topPadding + fontMetrics.getAscent()); } }
[ "michael.fuchs@dbdoclet.org" ]
michael.fuchs@dbdoclet.org
20d6c2530e7b113e1fefda16b2b57125a85e9dc8
d12c00cfb6f8296726b76be15929bebea4220a65
/B4A/Objects/src/org/techteam/itsyours/b4xvideo.java
1fa8bb0f9fe695dc12d8bd05d711d689028d90c7
[]
no_license
J-Daniel-S/ItsYoursFull
631ac73bffe44e4bf72c19795eff7964d7c7a7f9
745dc89e2d18ab7c78c80525248c821efd53fb99
refs/heads/master
2023-03-15T01:03:00.851793
2021-03-05T21:21:30
2021-03-05T21:21:30
344,937,130
0
0
null
null
null
null
UTF-8
Java
false
false
17,370
java
package org.techteam.itsyours; import anywheresoftware.b4a.BA; import anywheresoftware.b4a.B4AClass; import anywheresoftware.b4a.BALayout; import anywheresoftware.b4a.debug.*; public class b4xvideo extends B4AClass.ImplB4AClass implements BA.SubDelegator{ private static java.util.HashMap<String, java.lang.reflect.Method> htSubs; private void innerInitialize(BA _ba) throws Exception { if (ba == null) { ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "org.techteam.itsyours.b4xvideo"); if (htSubs == null) { ba.loadHtSubs(this.getClass()); htSubs = ba.htSubs; } } if (BA.isShellModeRuntimeCheck(ba)) this.getClass().getMethod("_class_globals", org.techteam.itsyours.b4xvideo.class).invoke(this, new Object[] {null}); else ba.raiseEvent2(null, true, "class_globals", false); } public void innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{ innerInitialize(_ba); } public Object callSub(String sub, Object sender, Object[] args) throws Exception { return BA.SubDelegator.SubNotFound; } public anywheresoftware.b4a.keywords.Common __c = null; public anywheresoftware.b4a.objects.B4XViewWrapper _root = null; public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null; public anywheresoftware.b4a.audio.AudioRecordApp.VideoRecordApp _videorecorder = null; public String _videofilename = ""; public anywheresoftware.b4a.objects.PanelWrapper _progresspanel = null; public anywheresoftware.b4a.objects.LabelWrapper _progresslabel = null; public anywheresoftware.b4a.objects.ProgressBarWrapper _progressbar1 = null; public anywheresoftware.b4a.objects.PanelWrapper _mprogresspanel = null; public anywheresoftware.b4a.objects.ProgressBarWrapper _mprogressbar = null; public anywheresoftware.b4a.objects.LabelWrapper _mprogresslabel = null; public anywheresoftware.b4a.objects.PanelWrapper _backpanel = null; public anywheresoftware.b4a.objects.ButtonWrapper _btnstart = null; public anywheresoftware.b4a.objects.PanelWrapper _recordpanel = null; public org.techteam.itsyours.main _main = null; public org.techteam.itsyours.dropbox _dropbox = null; public org.techteam.itsyours.starter _starter = null; public org.techteam.itsyours.b4xpages _b4xpages = null; public org.techteam.itsyours.b4xcollections _b4xcollections = null; public Object _initialize(org.techteam.itsyours.b4xvideo __ref,anywheresoftware.b4a.BA _ba) throws Exception{ __ref = this; innerInitialize(_ba); RDebugUtils.currentModule="b4xvideo"; if (Debug.shouldDelegate(ba, "initialize", false)) {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));} RDebugUtils.currentLine=3211264; //BA.debugLineNum = 3211264;BA.debugLine="Public Sub Initialize As Object"; RDebugUtils.currentLine=3211265; //BA.debugLineNum = 3211265;BA.debugLine="Return Me"; if (true) return this; RDebugUtils.currentLine=3211266; //BA.debugLineNum = 3211266;BA.debugLine="End Sub"; return null; } public String _setprogressbarcommon(org.techteam.itsyours.b4xvideo __ref,String _filename) throws Exception{ __ref = this; RDebugUtils.currentModule="b4xvideo"; if (Debug.shouldDelegate(ba, "setprogressbarcommon", false)) {return ((String) Debug.delegate(ba, "setprogressbarcommon", new Object[] {_filename}));} RDebugUtils.currentLine=3604480; //BA.debugLineNum = 3604480;BA.debugLine="Sub SetProgressBarCommon(filename As String)"; RDebugUtils.currentLine=3604481; //BA.debugLineNum = 3604481;BA.debugLine="If mProgressPanel.Visible = False Then"; if (__ref._mprogresspanel /*anywheresoftware.b4a.objects.PanelWrapper*/ .getVisible()==__c.False) { RDebugUtils.currentLine=3604482; //BA.debugLineNum = 3604482;BA.debugLine="mProgressPanel.Visible = True"; __ref._mprogresspanel /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.True); RDebugUtils.currentLine=3604483; //BA.debugLineNum = 3604483;BA.debugLine="mProgressPanel.BringToFront"; __ref._mprogresspanel /*anywheresoftware.b4a.objects.PanelWrapper*/ .BringToFront(); RDebugUtils.currentLine=3604484; //BA.debugLineNum = 3604484;BA.debugLine="mProgressLabel.Text = \"Uploading \" & filename.Su"; __ref._mprogresslabel /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Uploading "+_filename.substring((int) (_filename.length()-4)))); RDebugUtils.currentLine=3604485; //BA.debugLineNum = 3604485;BA.debugLine="mProgressBar.Progress = 0"; __ref._mprogressbar /*anywheresoftware.b4a.objects.ProgressBarWrapper*/ .setProgress((int) (0)); }; RDebugUtils.currentLine=3604487; //BA.debugLineNum = 3604487;BA.debugLine="End Sub"; return ""; } public String _b4xpage_created(org.techteam.itsyours.b4xvideo __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{ __ref = this; RDebugUtils.currentModule="b4xvideo"; if (Debug.shouldDelegate(ba, "b4xpage_created", false)) {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));} RDebugUtils.currentLine=3276800; //BA.debugLineNum = 3276800;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)"; RDebugUtils.currentLine=3276801; //BA.debugLineNum = 3276801;BA.debugLine="Root = Root1"; __ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ = _root1; RDebugUtils.currentLine=3276803; //BA.debugLineNum = 3276803;BA.debugLine="Root.LoadLayout(\"videorecord\")"; __ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("videorecord",ba); RDebugUtils.currentLine=3276804; //BA.debugLineNum = 3276804;BA.debugLine="DropBox.InitializeDropBox"; _dropbox._initializedropbox /*String*/ (ba); RDebugUtils.currentLine=3276805; //BA.debugLineNum = 3276805;BA.debugLine="End Sub"; return ""; } public String _backpanel_click(org.techteam.itsyours.b4xvideo __ref) throws Exception{ __ref = this; RDebugUtils.currentModule="b4xvideo"; if (Debug.shouldDelegate(ba, "backpanel_click", false)) {return ((String) Debug.delegate(ba, "backpanel_click", null));} RDebugUtils.currentLine=11075584; //BA.debugLineNum = 11075584;BA.debugLine="Private Sub backPanel_Click"; RDebugUtils.currentLine=11075585; //BA.debugLineNum = 11075585;BA.debugLine="B4XPages.ShowPage(\"MainPage\")"; _b4xpages._showpage /*String*/ (ba,"MainPage"); RDebugUtils.currentLine=11075586; //BA.debugLineNum = 11075586;BA.debugLine="End Sub"; return ""; } public String _class_globals(org.techteam.itsyours.b4xvideo __ref) throws Exception{ __ref = this; RDebugUtils.currentModule="b4xvideo"; RDebugUtils.currentLine=3145728; //BA.debugLineNum = 3145728;BA.debugLine="Sub Class_Globals"; RDebugUtils.currentLine=3145729; //BA.debugLineNum = 3145729;BA.debugLine="Private Root As B4XView 'ignore"; _root = new anywheresoftware.b4a.objects.B4XViewWrapper(); RDebugUtils.currentLine=3145730; //BA.debugLineNum = 3145730;BA.debugLine="Private xui As XUI 'ignore"; _xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI(); RDebugUtils.currentLine=3145731; //BA.debugLineNum = 3145731;BA.debugLine="Dim videoRecorder As VideoRecordApp"; _videorecorder = new anywheresoftware.b4a.audio.AudioRecordApp.VideoRecordApp(); RDebugUtils.currentLine=3145732; //BA.debugLineNum = 3145732;BA.debugLine="Dim VideoFilename As String"; _videofilename = ""; RDebugUtils.currentLine=3145733; //BA.debugLineNum = 3145733;BA.debugLine="Private progressPanel As Panel"; _progresspanel = new anywheresoftware.b4a.objects.PanelWrapper(); RDebugUtils.currentLine=3145734; //BA.debugLineNum = 3145734;BA.debugLine="Private progresslabel As Label"; _progresslabel = new anywheresoftware.b4a.objects.LabelWrapper(); RDebugUtils.currentLine=3145735; //BA.debugLineNum = 3145735;BA.debugLine="Private ProgressBar1 As ProgressBar"; _progressbar1 = new anywheresoftware.b4a.objects.ProgressBarWrapper(); RDebugUtils.currentLine=3145736; //BA.debugLineNum = 3145736;BA.debugLine="Public mProgressPanel As Panel"; _mprogresspanel = new anywheresoftware.b4a.objects.PanelWrapper(); RDebugUtils.currentLine=3145737; //BA.debugLineNum = 3145737;BA.debugLine="Public mProgressBar As ProgressBar"; _mprogressbar = new anywheresoftware.b4a.objects.ProgressBarWrapper(); RDebugUtils.currentLine=3145738; //BA.debugLineNum = 3145738;BA.debugLine="Public mProgressLabel As Label"; _mprogresslabel = new anywheresoftware.b4a.objects.LabelWrapper(); RDebugUtils.currentLine=3145739; //BA.debugLineNum = 3145739;BA.debugLine="Private backPanel As Panel"; _backpanel = new anywheresoftware.b4a.objects.PanelWrapper(); RDebugUtils.currentLine=3145740; //BA.debugLineNum = 3145740;BA.debugLine="Private btnStart As Button"; _btnstart = new anywheresoftware.b4a.objects.ButtonWrapper(); RDebugUtils.currentLine=3145741; //BA.debugLineNum = 3145741;BA.debugLine="Private recordPanel As Panel"; _recordpanel = new anywheresoftware.b4a.objects.PanelWrapper(); RDebugUtils.currentLine=3145742; //BA.debugLineNum = 3145742;BA.debugLine="End Sub"; return ""; } public String _dbxfiles_uploadfinished(org.techteam.itsyours.b4xvideo __ref,boolean _success,Object _metaobj,String _sessionid) throws Exception{ __ref = this; RDebugUtils.currentModule="b4xvideo"; if (Debug.shouldDelegate(ba, "dbxfiles_uploadfinished", false)) {return ((String) Debug.delegate(ba, "dbxfiles_uploadfinished", new Object[] {_success,_metaobj,_sessionid}));} anywheresoftware.b4a.phone.Phone.PhoneWakeState _nowake = null; RDebugUtils.currentLine=3670016; //BA.debugLineNum = 3670016;BA.debugLine="Sub dbxFiles_UploadFinished(success As Boolean, me"; RDebugUtils.currentLine=3670017; //BA.debugLineNum = 3670017;BA.debugLine="Log(sessionId)"; __c.LogImpl("53670017",_sessionid,0); RDebugUtils.currentLine=3670018; //BA.debugLineNum = 3670018;BA.debugLine="If success = True Then"; if (_success==__c.True) { RDebugUtils.currentLine=3670019; //BA.debugLineNum = 3670019;BA.debugLine="MsgboxAsync(\"File uploaded successfully\", \"Uploa"; __c.MsgboxAsync(BA.ObjectToCharSequence("File uploaded successfully"),BA.ObjectToCharSequence("Upload"),ba); }else { RDebugUtils.currentLine=3670021; //BA.debugLineNum = 3670021;BA.debugLine="MsgboxAsync(\"Error uploading file\", \"Upload\")"; __c.MsgboxAsync(BA.ObjectToCharSequence("Error uploading file"),BA.ObjectToCharSequence("Upload"),ba); }; RDebugUtils.currentLine=3670023; //BA.debugLineNum = 3670023;BA.debugLine="mProgressPanel.Visible = False"; __ref._mprogresspanel /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False); RDebugUtils.currentLine=3670024; //BA.debugLineNum = 3670024;BA.debugLine="Dim nowake As PhoneWakeState"; _nowake = new anywheresoftware.b4a.phone.Phone.PhoneWakeState(); RDebugUtils.currentLine=3670025; //BA.debugLineNum = 3670025;BA.debugLine="nowake.ReleasePartialLock"; _nowake.ReleasePartialLock(); RDebugUtils.currentLine=3670026; //BA.debugLineNum = 3670026;BA.debugLine="File.Delete(DropBox.CurrentPath, DropBox.CurrentF"; __c.File.Delete(_dropbox._currentpath /*String*/ ,_dropbox._currentfilename /*String*/ ); RDebugUtils.currentLine=3670027; //BA.debugLineNum = 3670027;BA.debugLine="End Sub"; return ""; } public String _dbxfiles_uploadprogress(org.techteam.itsyours.b4xvideo __ref,String _sessionid,String _path,String _filename,long _uploaded,long _size) throws Exception{ __ref = this; RDebugUtils.currentModule="b4xvideo"; if (Debug.shouldDelegate(ba, "dbxfiles_uploadprogress", false)) {return ((String) Debug.delegate(ba, "dbxfiles_uploadprogress", new Object[] {_sessionid,_path,_filename,_uploaded,_size}));} int _pct = 0; RDebugUtils.currentLine=3735552; //BA.debugLineNum = 3735552;BA.debugLine="Sub dbxFiles_UploadProgress(sessionId As String, p"; RDebugUtils.currentLine=3735553; //BA.debugLineNum = 3735553;BA.debugLine="Dim Pct As Int"; _pct = 0; RDebugUtils.currentLine=3735554; //BA.debugLineNum = 3735554;BA.debugLine="Log(\"Upload Progress\")"; __c.LogImpl("53735554","Upload Progress",0); RDebugUtils.currentLine=3735555; //BA.debugLineNum = 3735555;BA.debugLine="If uploaded < size Then"; if (_uploaded<_size) { RDebugUtils.currentLine=3735556; //BA.debugLineNum = 3735556;BA.debugLine="Pct = uploaded / size * 100"; _pct = (int) (_uploaded/(double)_size*100); RDebugUtils.currentLine=3735557; //BA.debugLineNum = 3735557;BA.debugLine="mProgressLabel.Text = \"Uploading \" & filename.Su"; __ref._mprogresslabel /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence("Uploading "+_filename.substring((int) (_filename.length()-4))+" "+BA.NumberToString(_pct)+"%")); RDebugUtils.currentLine=3735558; //BA.debugLineNum = 3735558;BA.debugLine="mProgressBar.Progress = Pct"; __ref._mprogressbar /*anywheresoftware.b4a.objects.ProgressBarWrapper*/ .setProgress(_pct); RDebugUtils.currentLine=3735559; //BA.debugLineNum = 3735559;BA.debugLine="Log(uploaded & \" out of \" & size)"; __c.LogImpl("53735559",BA.NumberToString(_uploaded)+" out of "+BA.NumberToString(_size),0); }; RDebugUtils.currentLine=3735561; //BA.debugLineNum = 3735561;BA.debugLine="End Sub"; return ""; } public String _recordpanel_click(org.techteam.itsyours.b4xvideo __ref) throws Exception{ __ref = this; RDebugUtils.currentModule="b4xvideo"; if (Debug.shouldDelegate(ba, "recordpanel_click", false)) {return ((String) Debug.delegate(ba, "recordpanel_click", null));} String _folder = ""; RDebugUtils.currentLine=11141120; //BA.debugLineNum = 11141120;BA.debugLine="Private Sub recordPanel_Click"; RDebugUtils.currentLine=11141121; //BA.debugLineNum = 11141121;BA.debugLine="Dim folder As String = Starter.Provider.SharedFol"; _folder = _starter._provider /*org.techteam.itsyours.fileprovider*/ ._sharedfolder /*String*/ ; RDebugUtils.currentLine=11141123; //BA.debugLineNum = 11141123;BA.debugLine="videoRecorder.Initialize(\"videoRecorder\")"; __ref._videorecorder /*anywheresoftware.b4a.audio.AudioRecordApp.VideoRecordApp*/ .Initialize("videoRecorder"); RDebugUtils.currentLine=11141124; //BA.debugLineNum = 11141124;BA.debugLine="VideoFilename = DateTime.Now & \".mp4\""; __ref._videofilename /*String*/ = BA.NumberToString(__c.DateTime.getNow())+".mp4"; RDebugUtils.currentLine=11141125; //BA.debugLineNum = 11141125;BA.debugLine="videoRecorder.Record3(folder, VideoFilename, 10 *"; __ref._videorecorder /*anywheresoftware.b4a.audio.AudioRecordApp.VideoRecordApp*/ .Record3(ba,_folder,__ref._videofilename /*String*/ ,(int) (10*60),(android.net.Uri)(_starter._provider /*org.techteam.itsyours.fileprovider*/ ._getfileuri /*Object*/ (null,__ref._videofilename /*String*/ ))); RDebugUtils.currentLine=11141126; //BA.debugLineNum = 11141126;BA.debugLine="End Sub"; return ""; } public String _setprogressbar(org.techteam.itsyours.b4xvideo __ref,String _filename) throws Exception{ __ref = this; RDebugUtils.currentModule="b4xvideo"; if (Debug.shouldDelegate(ba, "setprogressbar", false)) {return ((String) Debug.delegate(ba, "setprogressbar", new Object[] {_filename}));} RDebugUtils.currentLine=3538944; //BA.debugLineNum = 3538944;BA.debugLine="Sub SetProgressBar(filename As String)"; RDebugUtils.currentLine=3538945; //BA.debugLineNum = 3538945;BA.debugLine="mProgressBar = ProgressBar1"; __ref._mprogressbar /*anywheresoftware.b4a.objects.ProgressBarWrapper*/ = __ref._progressbar1 /*anywheresoftware.b4a.objects.ProgressBarWrapper*/ ; RDebugUtils.currentLine=3538946; //BA.debugLineNum = 3538946;BA.debugLine="mProgressPanel = progressPanel"; __ref._mprogresspanel /*anywheresoftware.b4a.objects.PanelWrapper*/ = __ref._progresspanel /*anywheresoftware.b4a.objects.PanelWrapper*/ ; RDebugUtils.currentLine=3538947; //BA.debugLineNum = 3538947;BA.debugLine="mProgressLabel = progresslabel"; __ref._mprogresslabel /*anywheresoftware.b4a.objects.LabelWrapper*/ = __ref._progresslabel /*anywheresoftware.b4a.objects.LabelWrapper*/ ; RDebugUtils.currentLine=3538948; //BA.debugLineNum = 3538948;BA.debugLine="SetProgressBarCommon(filename)"; __ref._setprogressbarcommon /*String*/ (null,_filename); RDebugUtils.currentLine=3538949; //BA.debugLineNum = 3538949;BA.debugLine="End Sub"; return ""; } public String _videorecorder_recordcomplete(org.techteam.itsyours.b4xvideo __ref,boolean _success) throws Exception{ __ref = this; RDebugUtils.currentModule="b4xvideo"; if (Debug.shouldDelegate(ba, "videorecorder_recordcomplete", false)) {return ((String) Debug.delegate(ba, "videorecorder_recordcomplete", new Object[] {_success}));} RDebugUtils.currentLine=3473408; //BA.debugLineNum = 3473408;BA.debugLine="Sub videoRecorder_RecordComplete (Success As Boole"; RDebugUtils.currentLine=3473409; //BA.debugLineNum = 3473409;BA.debugLine="Log(Success)"; __c.LogImpl("53473409",BA.ObjectToString(_success),0); RDebugUtils.currentLine=3473410; //BA.debugLineNum = 3473410;BA.debugLine="If Success Then"; if (_success) { RDebugUtils.currentLine=3473411; //BA.debugLineNum = 3473411;BA.debugLine="DropBox.UploadFile(Starter.Provider.SharedFolder"; _dropbox._uploadfile /*String*/ (ba,_starter._provider /*org.techteam.itsyours.fileprovider*/ ._sharedfolder /*String*/ ,__ref._videofilename /*String*/ ,"VideoRecording"); RDebugUtils.currentLine=3473412; //BA.debugLineNum = 3473412;BA.debugLine="SetProgressBar(VideoFilename)"; __ref._setprogressbar /*String*/ (null,__ref._videofilename /*String*/ ); }; RDebugUtils.currentLine=3473414; //BA.debugLineNum = 3473414;BA.debugLine="End Sub"; return ""; } }
[ "59487880+J-Daniel-S@users.noreply.github.com" ]
59487880+J-Daniel-S@users.noreply.github.com
8ebbbb2f09889884936b038c63568730be111fb6
114db623dbcde7b2e664a7cf15fc7b800df54173
/src/Prac3/MovableCircle.java
c58326842a844e4f8d12f36d3362b02f2a4cc0f4
[]
no_license
iliaabramkin-dev/HomeWork
e7f8a70d621b5ecf0d49d3d7eb218b5f820efc7d
02fadd2fc82f04b246c75f93fdf491068979f950
refs/heads/main
2023-01-12T05:02:41.802962
2020-11-18T13:29:37
2020-11-18T13:29:37
302,382,996
0
0
null
null
null
null
UTF-8
Java
false
false
684
java
package Prac3; public class MovableCircle implements Movable { private int Radius; private MovablePoint center; public MovableCircle (int rad, int x, int y, int xSpeed, int ySpeed) { this.Radius = rad; this.center = new MovablePoint(x, y, xSpeed, ySpeed); } @Override public String toString() { return "MovableCircle{" + "Radius=" + Radius + ", center=" + center + '}'; } @Override public void moveUp() { } @Override public void moveDown() { } @Override public void moveRight() { } @Override public void moveLeft() { } }
[ "72294531+iliaabramkin-dev@users.noreply.github.com" ]
72294531+iliaabramkin-dev@users.noreply.github.com
ab50e1611ed6b74dd11881b775626dca7ee38fd6
0dc345e5607ce5d73d2ba6d25c9a4e940eddeba0
/SessionEncrypter.java
3d17dd6a1c457092fe9566a5e78331ee642a1bd1
[]
no_license
markusew/IK2206
7970aeb9d04e34194a3d0fbb024d639656106fe9
b0094c7fcf0b059af9e337b207dfd5d11f2afacd
refs/heads/master
2020-04-17T08:56:17.004607
2019-01-18T16:16:16
2019-01-18T16:16:16
166,434,981
0
0
null
null
null
null
UTF-8
Java
false
false
1,392
java
import javax.crypto.*; import javax.crypto.spec.IvParameterSpec; import java.io.OutputStream; import java.util.Base64; import java.security.*; public class SessionEncrypter { private SessionKey sessionKey; private IvParameterSpec iv; private Cipher cipher; public SessionEncrypter(Integer keyLength)throws Exception{ sessionKey = new SessionKey(keyLength); SecureRandom secureRandom = new SecureRandom(); byte[] ivDummy = new byte[16]; secureRandom.nextBytes(ivDummy); iv = new IvParameterSpec(ivDummy); } public SessionEncrypter(byte[] key, byte[] iv){ this.sessionKey = new SessionKey(new String(key)); this.iv = new IvParameterSpec(iv); } public String encodeKey(){ return this.sessionKey.encodeKey(); } public SecretKey getKey(){ return this.sessionKey.getSecretKey(); } public String encodeIV(){ return Base64.getEncoder().encodeToString(iv.getIV()); } public byte[] byteGetIV(){ return this.iv.getIV(); } public CipherOutputStream openCipherOutputStream(OutputStream output)throws Exception{ cipher = Cipher.getInstance("AES/CTR/NoPadding"); cipher.init(Cipher.ENCRYPT_MODE, sessionKey.getSecretKey(), iv); return new CipherOutputStream(output, cipher); } }
[ "noreply@github.com" ]
noreply@github.com
292f459e238820bdfb9bbeac64309264222a80be
75c6fb7b56d5f1e99eaa065d7ea2d86e44acd4d0
/DisastAlert/app/src/androidTest/java/com/example/marcosduran/disastalert/ExampleInstrumentedTest.java
753f15f9e9ffac21f3a30f49f24b16584d953016
[]
no_license
MulliqiXheve/-DisastAlert
3d13b6f9886be1acd4f1e0c891fecb06c785ae68
a7535cdbcef5b285c92b97d4c66ced44e94ee8c1
refs/heads/master
2020-05-04T13:35:07.457597
2019-04-02T22:28:05
2019-04-02T22:28:05
179,165,445
0
0
null
null
null
null
UTF-8
Java
false
false
780
java
package com.example.marcosduran.disastalert; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.marcosduran.disastalert", appContext.getPackageName()); } }
[ "noreply@github.com" ]
noreply@github.com
f70d39cb2d77183dfc936a297195d33b2d56bd1a
a5646a529b5fcdea7c548654ba8396cab926d640
/app/src/main/java/com/example/texteditordemo/MainActivity.java
312cb8755cc6bd60f8065ede2e732db181d88a55
[]
no_license
ankit10101/Rich-Text-Editor-Demo
1f6a7864af41c88ad8db98bb8ca1964b4c8f7131
2ef2fd4bc79ea8c86d85502db2222efa573f9121
refs/heads/master
2021-03-01T05:33:18.948280
2020-03-08T05:25:46
2020-03-08T05:25:46
245,757,678
0
0
null
null
null
null
UTF-8
Java
false
false
6,286
java
package com.example.texteditordemo; import androidx.appcompat.app.AppCompatActivity; import android.graphics.Color; import android.os.Bundle; import android.view.View; import android.widget.TextView; import jp.wasabeef.richeditor.RichEditor; public class MainActivity extends AppCompatActivity { private RichEditor mEditor; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mEditor = findViewById(R.id.editor); mEditor.setEditorHeight(200); mEditor.setEditorFontSize(20); mEditor.setEditorFontColor(Color.BLACK); mEditor.setPadding(10, 10, 10, 10); findViewById(R.id.action_undo).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.undo(); } }); findViewById(R.id.action_redo).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.redo(); } }); findViewById(R.id.action_bold).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setBold(); } }); findViewById(R.id.action_italic).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setItalic(); } }); findViewById(R.id.action_subscript).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setSubscript(); } }); findViewById(R.id.action_superscript).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setSuperscript(); } }); findViewById(R.id.action_strikethrough).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setStrikeThrough(); } }); findViewById(R.id.action_underline).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setUnderline(); } }); findViewById(R.id.action_heading1).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setHeading(1); } }); findViewById(R.id.action_heading2).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setHeading(2); } }); findViewById(R.id.action_heading3).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setHeading(3); } }); findViewById(R.id.action_heading4).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setHeading(4); } }); findViewById(R.id.action_heading5).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setHeading(5); } }); findViewById(R.id.action_heading6).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setHeading(6); } }); findViewById(R.id.action_txt_color).setOnClickListener(new View.OnClickListener() { private boolean isChanged; @Override public void onClick(View v) { mEditor.setTextColor(isChanged ? Color.BLACK : Color.RED); isChanged = !isChanged; } }); findViewById(R.id.action_bg_color).setOnClickListener(new View.OnClickListener() { private boolean isChanged; @Override public void onClick(View v) { mEditor.setTextBackgroundColor(isChanged ? Color.TRANSPARENT : Color.YELLOW); isChanged = !isChanged; } }); findViewById(R.id.action_indent).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setIndent(); } }); findViewById(R.id.action_outdent).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setOutdent(); } }); findViewById(R.id.action_align_left).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setAlignLeft(); } }); findViewById(R.id.action_align_center).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setAlignCenter(); } }); findViewById(R.id.action_align_right).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setAlignRight(); } }); findViewById(R.id.action_blockquote).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setBlockquote(); } }); findViewById(R.id.action_insert_bullets).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setBullets(); } }); findViewById(R.id.action_insert_numbers).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mEditor.setNumbers(); } }); } }
[ "ankitbajaj333@gmail.com" ]
ankitbajaj333@gmail.com
6a8bb533617939dafca369dc71f44c0bb8732496
e95bd7e1ffbba4488bb22795e14dc8fed605bf97
/observer-pattern/src/main/java/com/github/hegdekar/observer/example/ObserverExample.java
e1847402d020a9efc733e784a2fd76e9ce36885f
[]
no_license
hegdekar/Design-patterns
c25aee1da668471f460855a210a93647f72b37aa
18b54d10de157063d3e93a6d9cad8864920fb90b
refs/heads/master
2020-05-02T14:24:12.514796
2019-03-27T15:35:16
2019-03-27T15:35:16
178,009,796
0
0
null
null
null
null
UTF-8
Java
false
false
884
java
package com.github.hegdekar.observer.example; import com.github.hegdekar.observer.impl.Observer; import com.github.hegdekar.observer.impl.SubjectImpl; public class ObserverExample { public static void main(String[] args){ System.out.println("***Observer Pattern Demo***\n"); Observer o1 = new Observer("O1"); Observer o2 = new Observer("o2"); SubjectImpl sub1 = new SubjectImpl(); System.out.println("Registering "+o1); sub1.register(o1); System.out.println("Registering "+o2); sub1.register(o2); System.out.println("Setting Flag = 15 "); sub1.setFlag(5); System.out.println("Setting Flag = 23 "); sub1.setFlag(25); System.out.println(o1+" Unregistering"); sub1.unregister(o1); //No notification this time to o1 .Since it is unregistered. System.out.println("Setting Flag = 50 "); sub1.setFlag(50); } }
[ "naveenkumarhegdekar93@gmail.com" ]
naveenkumarhegdekar93@gmail.com
80fe82c03dcb7ef755c46b4a57248434d2698bc6
c97fd85a30567964d7dec42ca8a486624035acd6
/src/main/java/org/hibernate/sql/ast/expression/ColumnBindingExpression.java
c45c2d0a1f9c0fd7e17fb3890d5c5101db5ad866
[]
no_license
beikov/hibernate-orm-sqm-poc
ed05393991cbc133f5400ad924bccb29f540ae1e
2e687634caec5ed11e1133dccc3c4c36b4092a3c
refs/heads/master
2020-06-28T08:30:59.322684
2016-11-21T21:47:56
2016-11-21T21:47:56
74,497,229
0
0
null
2016-11-22T17:29:39
2016-11-22T17:29:39
null
UTF-8
Java
false
false
1,253
java
/* * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ package org.hibernate.sql.ast.expression; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.sql.ast.from.ColumnBinding; import org.hibernate.sql.convert.spi.SqlTreeWalker; import org.hibernate.sql.exec.results.spi.ReturnReader; import org.hibernate.type.Type; /** * @author Steve Ebersole */ public class ColumnBindingExpression implements Expression { private final ColumnBinding columnBinding; public ColumnBindingExpression(ColumnBinding columnBinding) { this.columnBinding = columnBinding; } @Override public Type getType() { return null; } @Override public ReturnReader getReturnReader(int startPosition, boolean shallow, SessionFactoryImplementor sessionFactory) { throw new UnsupportedOperationException( "ColumnBindingExpression cannot be used in select-clause" ); } @Override public void accept(SqlTreeWalker sqlTreeWalker) { sqlTreeWalker.visitColumnBindingExpression( this ); } public ColumnBinding getColumnBinding() { return columnBinding; } }
[ "steve@hibernate.org" ]
steve@hibernate.org
5843076d7e4562d28f84444ae6f64d2d6bc0b4a0
68d675d5a4147bb3db6d72c354c4655c422cf7dc
/src/com/eastdawn/bo/impl/QiyeBOImpl.java
6910af77c1e3d8c147c4821f04de8c732c396608
[]
no_license
duoduohappy/SmartBJ
277c2aa6d6296cfe5c72d547ffb34bcf2a121fa4
026d33f99c6c303e058917cc30018282b8169e81
refs/heads/master
2021-06-25T04:39:58.090438
2017-06-07T05:58:52
2017-06-07T05:58:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
604
java
package com.eastdawn.bo.impl; import com.eastdawn.dao.QiyeDao; import com.eastdawn.bo.QiyeBO; import com.eastdawn.common.CommonBO; import com.eastdawn.po.QiyeUser; @SuppressWarnings("serial") public class QiyeBOImpl extends CommonBO implements QiyeBO { private QiyeDao qiyeDao; public Long add(QiyeUser qyUser) { qiyeDao.add(qyUser); return qyUser.getQiyeId(); } public void updateById(QiyeUser qyUser) { qiyeDao.updateById(qyUser); } public QiyeDao getQiyeDao() { return qiyeDao; } public void setQiyeDao(QiyeDao qiyeDao) { this.qiyeDao = qiyeDao; } }
[ "zhaopei1990@163.com" ]
zhaopei1990@163.com
461c4f8be575609d6a32bfbc8c9b6bb28a5dc2db
233134b2e43cbb27ace925d0ed615f4bd62404b7
/src/main/java/ru/itmo/wp/service/PostService.java
ab8c4bd7de8f7f49e74396712fb94c4544731226
[]
no_license
lexzhe/WebHW8
1c7f3681b497bf1dc7b201e5eb51543eb5f92104
4fba03e0302c4780e3128f89cf93c8cf65e39488
refs/heads/master
2021-02-08T07:01:05.318038
2020-03-01T09:34:56
2020-03-01T09:34:56
244,121,795
0
0
null
null
null
null
UTF-8
Java
false
false
841
java
package ru.itmo.wp.service; import org.springframework.stereotype.Service; import ru.itmo.wp.domain.Comment; import ru.itmo.wp.domain.Post; import ru.itmo.wp.domain.User; import ru.itmo.wp.repository.PostRepository; import java.util.List; @Service public class PostService { private final PostRepository postRepository; public PostService(PostRepository postRepository) { this.postRepository = postRepository; } public List<Post> findAll() { return postRepository.findAllByOrderByCreationTimeDesc(); } public Post findById(Long id) { return id == null ? null : postRepository.findById(id).orElse(null); } public void writeComment(Post post, Comment comment, User user){ comment.setUser(user); post.addComment(comment); postRepository.save(post); } }
[ "lexzhe@mail.ru" ]
lexzhe@mail.ru
c0a06aa0541469e99fc1b3900c724d0155dc99b6
48d4f103ea5dcc75738ffd5359d7adf31f615009
/QHJiaoYiYuan/src/main/java/com/hef/qhjiaoyiyuan/service/QHUserService.java
383937c73b83236a2eeebc0571e419aa7a738145
[]
no_license
hefrankeleyn/portal
ccb77f2293e93c55f03d6b2201cf720ace8d144d
0e38c585da277eb7dd50594376e3189e0cf68b08
refs/heads/master
2022-07-01T18:16:51.547666
2020-04-14T14:12:24
2020-04-14T14:12:24
242,527,002
0
0
null
2022-06-21T02:53:26
2020-02-23T14:00:37
Java
UTF-8
Java
false
false
328
java
package com.hef.qhjiaoyiyuan.service; import com.hef.qhjiaoyiyuan.bean.QHUser; import java.util.List; public interface QHUserService { List<QHUser> findAllQHUser(); /** * 根据登陆名查找用户 * @param loginUsername * @return */ QHUser findUserByLoginUsername(String loginUsername); }
[ "hefrankeleyn@gamil.com" ]
hefrankeleyn@gamil.com
8484e1a8be475161cbf908671d3b9425b4656c56
ec9dacd41c75346c05d836b4000a6eeadaa596e3
/eopOrder/src/main/java/net/ytoec/kernel/dao/BuildSearchStatusDaoIndexPressure.java
1140ec24bac8411eec446137888a33b80d5da888
[]
no_license
Pd1r/eop
08295a8c2543c3f96470965fc9db90fcb186335a
0c43b484de6f08e57a64b5194fc1413db0fd78f4
refs/heads/master
2020-06-07T17:31:56.208813
2018-11-28T05:57:59
2018-11-28T05:57:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
418
java
package net.ytoec.kernel.dao; import org.springframework.dao.DataAccessException; public interface BuildSearchStatusDaoIndexPressure<T> { public Boolean removeBuildSearchByLimit(Integer limit) throws DataAccessException; /** * 创建一条记录 * @param entity * @return * @throws DataAccessException */ public boolean addBuildSearchStatusDaoIndexPressure(T entity) throws DataAccessException; }
[ "caozhi_soft@163.com" ]
caozhi_soft@163.com
ebe13f79476931fd09bd39de42b65c4817db4884
c34087213659c1d0a1b56e12905aa55a7e76ce83
/android/v8-debugger/src/main/java/com/didi/hummer/core/engine/debugger/J2V8CallbackDebugger.java
37f6d2144c793474dcd34b6e031bc49518611030
[ "Apache-2.0" ]
permissive
YLBFork/Hummer
7f31376af8624ca2f31852eb6f68c7087e0b3a5e
b5e99313fd84ba8cabb76d259ab87f88c9721c63
refs/heads/master
2023-02-15T05:46:59.698004
2021-01-11T13:18:35
2021-01-11T13:18:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,625
java
package com.didi.hummer.core.engine.debugger; import com.didi.hummer.V8Thread; import com.didi.hummer.core.engine.J2V8Callback; import com.didi.hummer.core.engine.J2V8Context; import com.didi.hummer.core.engine.JSContext; import com.didi.hummer.core.engine.jsc.JSCContext; import com.eclipsesource.v8.V8Function; /** * Created by XiaoFeng on 2019-11-01. */ public class J2V8CallbackDebugger extends J2V8Callback { public static J2V8CallbackDebugger wrapper(J2V8Context context, V8Function function) { return new J2V8CallbackDebugger(context, function); } protected J2V8CallbackDebugger(J2V8Context context, V8Function function) { super(context, function); } @Override public long getIdentify() { return V8Thread.checkThread(super::getIdentify); } @Override public boolean equals(Object obj) { if (!(obj instanceof JSCContext)) { return false; } JSCContext jsCallback = (JSCContext) obj; return jsCallback.getJSContext().getIdentify() == this.getJSContext().getIdentify() && jsCallback.getIdentify() == this.getIdentify(); } @Override public JSContext getJSContext() { return context; } @Override public boolean isValid() { return context != null && function != null; } @Override public void release() { V8Thread.checkThread(() -> { super.release(); return null; }); } @Override public Object call(Object... params) { return V8Thread.checkThread(() -> super.call(params)); } }
[ "noreply@github.com" ]
noreply@github.com
b5ccbdf47b25251249b0ab07ad9b975d76f842fa
12366705086407cc335daf1b0a1096a2e58b7527
/src/main/java/me/rafeeqstephens/repository/patientInfo/PatientDiagnosisRepository.java
085b8e5369c4838e89c1e81d9c40f2ca9696acdf
[]
no_license
RafeeqSt/FinalAssignment
5ed188525a333655f0a67afb1cf536b0c66f576d
cde3382a6c7fc453449a8547987d710ac66074ab
refs/heads/master
2020-08-22T15:24:30.872372
2019-10-20T20:47:54
2019-10-20T20:47:54
216,367,220
0
0
null
null
null
null
UTF-8
Java
false
false
315
java
package me.rafeeqstephens.repository.patientInfo; import me.rafeeqstephens.domain.patientInfo.PatientDiagnosis; import me.rafeeqstephens.repository.IRepository; import java.util.Set; public interface PatientDiagnosisRepository extends IRepository<PatientDiagnosis,String> { Set<PatientDiagnosis> getAll(); }
[ "rafeeqstephens@gmail.com" ]
rafeeqstephens@gmail.com
5fce430174bba2e74eb70e246e104cbb337ad8ea
a6d3197d759ccd0ec48dd084f17d2e53d2c53dc9
/Unit17/src/Alien.java
258c7c23d224a0d4c5dc7c4ded7a0b1de29c69b4
[]
no_license
olegniko12/Labs
65683b699002087d7ad532cc88ab24b05d38b5bc
2154fd5e0d3a7c638f7c33c785a2d3fd2adc0c7f
refs/heads/master
2021-05-01T22:56:28.134386
2018-05-18T18:41:50
2018-05-18T18:42:11
120,925,723
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
1,427
java
//© A+ Computer Science - www.apluscompsci.com //Name - //Date - //Class - //Lab - import java.io.File; import java.net.URL; import java.awt.Color; import java.awt.Graphics; import java.awt.Image; import javax.imageio.ImageIO; public class Alien extends MovingThing { private int speed; private Image image; private boolean touchedRight = false; public Alien() { this(0,0,30,30,0); } public Alien(int x, int y) { this(x, y, 30, 30, 10); } public Alien(int x, int y, int s) { this(x, y, 30, 30, s); } public Alien(int x, int y, int w, int h, int s) { super(x, y, w,h); speed=s; try { image = ImageIO.read(new File("H:\\Labs\\Labs\\Unit17\\src\\alien.JPG")); } catch(Exception e) { System.out.println("Cannot find alien JPG"); } } public void setSpeed(int s) { speed = s; } public int getSpeed() { return speed; } public void move() { if(touchedRight == true){ setX(getX()-speed); } else { setX(getX()+speed); } } public void touchedSide(){ touchedRight = !touchedRight; moveDown(); } public void moveDown(){ setY(getY()+getHeight()*12/10); } public void draw( Graphics window ) { window.drawImage(image,getX(),getY(),getWidth(),getHeight(),null); } public String toString() { return ""; } @Override public void move(String direction) { // TODO Auto-generated method stub } }
[ "NikolaevO8292@sduhsd.lan" ]
NikolaevO8292@sduhsd.lan
a617fdb89bbcaf0d9b22a4e7360efd7b1b01c72d
eed0a39a09054c1b47695a94bdf97374f3ebbb7f
/fact-service2/src/main/java/fact2/controller/FactController2.java
4df59c877688a58a529bede8e5a372bf86ba0e91
[]
no_license
mayanktiwari09/bottleneck-localization
ce6b0e3e7aba8583a9c726fe55c97b66d767dd8c
6170ec9f164f487c7e50235f047618ad78cb89ee
refs/heads/main
2023-01-29T07:41:14.755110
2020-12-11T20:15:58
2020-12-11T20:15:58
306,266,588
0
1
null
null
null
null
UTF-8
Java
false
false
953
java
package fact2.controller; import fact2.service.FactService2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/api") public class FactController2 { @Autowired private FactService2 factService; @GetMapping("/fact2/{number}") public Long calculate(@PathVariable("number") int number) throws InterruptedException { System.out.println("Received fact request for :: " + number); long result = factService.calculateFactorial(number); System.out.println("Result :: " + result); return result; } @GetMapping("/health") public void health(){ System.out.println("fact is up & healthy!"); } }
[ "mayanktiwary@Mayanks-MacBook-Air.local" ]
mayanktiwary@Mayanks-MacBook-Air.local
8e251d8541707c8ccf594adba569e5261ddf4d44
79570cb10aad807590bac4ad42f00f0c03c0155d
/chapter_001/src/main/java/ru/job4j/converter/Converter.java
0dc9dab851b565ff7eafacce0b8423c31eccc803
[]
no_license
ForLearningAtJob4J/job4j
1a3fbca55ac67963abc8998685e0cf36e7c262e9
83bbc14f2c8cd9063e73848b2ffe804ab1e851d9
refs/heads/master
2021-06-05T20:12:07.633631
2021-05-24T06:41:43
2021-05-24T06:41:43
144,977,312
0
0
null
null
null
null
UTF-8
Java
false
false
643
java
package ru.job4j.converter; public class Converter { public static int rubleToEuro(int value) { int rsl = value / 70; return rsl; } public static int rubleToDollar(int value) { int rsl = value / 60; return rsl; } public static void main(String[] args) { int rubles = 140; int euros = Converter.rubleToEuro(rubles); System.out.println("140 rubles are 2 euro. Test result: " + (euros == 2)); rubles = 180; int dollars = Converter.rubleToDollar(rubles); System.out.println("180 rubles are 3 dollars. Test result: " + (dollars == 3)); } }
[ "youcanwriteme@yandex.ru" ]
youcanwriteme@yandex.ru
cb6d9805cabd5da0df39bd263ab274b28104e44a
c5ccd2f4baf62decaf606e074f4d5f976343164e
/Pro studenty/Lekce05-Ukol/32-Model_automobilu-Cast_2-Reseni/src/main/java/cz/czechitas/automobil/SpousteciTrida.java
c719c7050986361772cf8098879ba632bddc1583
[ "Apache-2.0" ]
permissive
ondrakucera/java-1
e7ded80475c273f1fcc113d4b86e7cc8c9ee54da
edaa1184c9855592bf995f88338d3905889b97a3
refs/heads/master
2021-04-27T00:19:57.348249
2020-09-16T12:57:36
2020-09-16T12:57:36
123,791,013
1
2
null
2018-03-04T13:26:49
2018-03-04T13:26:48
null
UTF-8
Java
false
false
921
java
package cz.czechitas.automobil; public class SpousteciTrida { public static void main(String[] args) { Automobil modreAuto; modreAuto = new Automobil(); System.out.println(modreAuto.toString()); modreAuto.nastartujSe(); System.out.println(modreAuto.toString()); Motor osmivalcovyMotor = new Motor(); osmivalcovyMotor.prumernaSpotreba = 5.0; PalivovaNadrz malaNadrz = new PalivovaNadrz(); malaNadrz.maxKapacita = 55.0; Automobil cerveneAuto; cerveneAuto = new Automobil(); cerveneAuto.motor = osmivalcovyMotor; cerveneAuto.nastartujSe(); System.out.println(cerveneAuto.toString()); cerveneAuto.nadrz = malaNadrz; cerveneAuto.nastartujSe(); System.out.println(cerveneAuto.toString()); cerveneAuto.vypniSe(); System.out.println(cerveneAuto.toString()); } }
[ "kamil@sevecek.net" ]
kamil@sevecek.net
4ba5fc197063a9c405d7cf3a705b98f60d835b02
394b28ac92f48bf67a3e694dfccd79626b1d286f
/library/src/main/java/com/library/utils/cache/PrefUtils.java
cec6d7967b38710b0951428ebd4d3e334918a418
[]
no_license
IaHehe/Graduation-project
8a10656dd092a7d4b1e8db8fabbae619791cca56
a9d1f60610fb08d8a2b44399c91d28caabdf0935
refs/heads/master
2021-01-25T08:18:28.540600
2017-06-19T13:01:48
2017-06-19T13:01:48
93,744,459
0
1
null
null
null
null
UTF-8
Java
false
false
3,478
java
package com.library.utils.cache; import android.content.Context; import android.content.SharedPreferences; /** * SharePreference封装 * * @author Kevin * @date 2015-10-17 */ /** * SharedPreferences的本质是基于XML文件存储key-value键值对数据, * 通常用来存储一些简单的配置信息,用Sqlite数据库来存放并不划算, * 因为数据库连接跟操作等耗时大大影响了程序的效率。 * 其存储位置在/data/data/<包名>/shared_prefs目录下。 * * 另外SharedPreferences只能保存简单类型的数据,例如,String、int等。一般会将复杂类型的数据转换成Base64编码, * 然后将转换后的数据以字符串的形式保存在 XML文件中,再用SharedPreferences保存。   使用SharedPreferences保存key-value对的步骤如下:   (1)使用Activity类的getSharedPreferences方法获得SharedPreferences对象, 其中存储key-value的文件的名称由getSharedPreferences方法的第一个参数指定, 第二个参数指定访问应用程序私有文件的权限。   (2)使用SharedPreferences接口的edit获得SharedPreferences.Editor对象。   (3)通过SharedPreferences.Editor接口的putXxx方法保存key-value对。其中Xxx表示不同的数据类型。 例如:字符串类型的value需要用putString方法。   (4)通过SharedPreferences.Editor接口的commit方法保存key-value对。 commit方法相当于数据库事务中的提交(commit)操作。 */ public class PrefUtils { private final static String CACHE_NAME = "student_config"; public static boolean getBoolean(Context ctx, String key, boolean defValue) { SharedPreferences sp = ctx.getSharedPreferences(CACHE_NAME, Context.MODE_PRIVATE); return sp.getBoolean(key, defValue); } public static void setBoolean(Context ctx, String key, boolean value) { SharedPreferences sp = ctx.getSharedPreferences(CACHE_NAME, Context.MODE_PRIVATE); sp.edit().putBoolean(key, value).commit(); } public static void setString(Context ctx, String key, String value) { SharedPreferences sp = ctx.getSharedPreferences(CACHE_NAME, Context.MODE_PRIVATE); sp.edit().putString(key, value).commit(); } public static String getString(Context ctx, String key, String defValue) { SharedPreferences sp = ctx.getSharedPreferences(CACHE_NAME, Context.MODE_PRIVATE); return sp.getString(key, defValue); } public static void setInt(Context ctx, String key, int value) { SharedPreferences sp = ctx.getSharedPreferences(CACHE_NAME, Context.MODE_PRIVATE); sp.edit().putInt(key, value).commit(); } public static int getInt(Context ctx, String key, int defValue) { SharedPreferences sp = ctx.getSharedPreferences(CACHE_NAME, Context.MODE_PRIVATE); return sp.getInt(key, defValue); } public static void remove(Context context, String key) { SharedPreferences sp = context.getSharedPreferences(CACHE_NAME, Context.MODE_PRIVATE); sp.edit().remove(key).commit(); } /** * 把之前commit后保存的所有信息全部进行清空 * @param context */ public static void clear(Context context) { SharedPreferences sp = context.getSharedPreferences(CACHE_NAME, Context.MODE_PRIVATE); sp.edit().clear().commit(); } /** * 清除指定的key */ public static void clearAppointKey(Context ctx, String[] key) { for(int i = 0; i < key.length; i ++) { remove(ctx, key[i]); } } }
[ "jundongzou@163.com" ]
jundongzou@163.com
481f7f007b98f0c0ad04a74cd907132d47e78d9b
1ab19d16b3ba1a8de44a6c733efdb376f03320fe
/api/mods/immibis/core/api/porting/SidedProxy.java
a324cff9612656cabc9b92f75e261936e41b8c20
[]
no_license
mezz/BuildcraftCompat
e36650ce341c771f4c2ae7d1a0f14bd8df369aa9
e11494e6f8b54b93080b6e3c25516e9052c970a9
refs/heads/6.5.x
2020-12-11T05:54:47.835811
2015-06-07T05:30:06
2015-06-07T05:30:06
36,623,014
1
0
null
2015-05-31T21:29:52
2015-05-31T21:29:52
Java
UTF-8
Java
false
false
1,842
java
package mods.immibis.core.api.porting; import java.io.File; import java.lang.reflect.InvocationTargetException; import com.mojang.authlib.GameProfile; import cpw.mods.fml.relauncher.FMLLaunchHandler; import cpw.mods.fml.relauncher.Side; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public abstract class SidedProxy { public static final SidedProxy instance; public abstract File getMinecraftDir(); public abstract double getPlayerReach(EntityPlayer ply); public abstract EntityPlayer getThePlayer(); public abstract int getUniqueBlockModelID(String renderClass, boolean b); public abstract boolean isOp(GameProfile player); public abstract void registerTileEntity(Class<? extends TileEntity> clazz, String id, String rclass); public abstract boolean isWorldCurrent(World w); public abstract void registerItemRenderer(Item item, String renderClassName); public abstract void registerEntityRenderer(Class<? extends Entity> entClass, String renderClassName); public abstract boolean isDedicatedServer(); public abstract Object createSidedObject(String clientClass, String serverClass); public boolean isOp(EntityPlayer var1) { return isOp(var1.getGameProfile()); } static { try { instance = Class.forName(FMLLaunchHandler.side() == Side.CLIENT ? "mods.immibis.core.porting.ClientProxy142" : "mods.immibis.core.porting.ServerProxy142").asSubclass(SidedProxy.class).getConstructor().newInstance(); } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | ClassNotFoundException e) { throw new RuntimeException(e); } } }
[ "kontakt@asie.pl" ]
kontakt@asie.pl
afa9381c8f0f091962f6a918261fd95347c518c9
b6898d38678b1573d0da541c6ba13fffa165f2e7
/src/com/selenium/test/WinHandle.java
e9cbeceff9cc58463f0709359d22d0e7090985b8
[]
no_license
bhargavbandaru/Selenium
406bea5edcd1d79b1c6d0c0f35886c60d56ecd52
79b4898f374a076fe0ae89b4c92dff14139f85f6
refs/heads/master
2020-03-17T06:12:09.649871
2018-05-15T08:35:18
2018-05-15T08:35:18
133,345,709
0
0
null
2018-05-14T10:57:30
2018-05-14T10:42:04
null
UTF-8
Java
false
false
1,880
java
package com.selenium.test; import java.io.File; import java.io.IOException; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.testng.Assert; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; public class WinHandle { public WebDriver driver; @BeforeTest public void setUp() { System.setProperty("webdriver.chrome.driver","C:\\Users\\Bhargav\\Desktop\\Course Material\\Softwares\\Jars\\chromedriver.exe"); driver = new ChromeDriver(); driver.get("https://letskodeit.teachable.com/p/practice"); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); } @Test public void tescase() throws IOException { driver.findElement(By.xpath("//a[@id='opentab']")).click(); String parentwindow = driver.getWindowHandle(); // getting parentwindow System.out.println("parent window :"+parentwindow); for(String windowshandle :driver.getWindowHandles()) { System.out.println("child wind:"+windowshandle); driver.switchTo().window(windowshandle); if(!parentwindow.contentEquals(windowshandle)) { String expectedTitle = driver.getTitle(); System.out.println(expectedTitle); if(expectedTitle.contentEquals("Let's Kode It")) { System.out.println("verified text in child window"); } } } driver.close(); driver.switchTo().window(parentwindow); System.out.println("switched to parent window"); //driver.close(); } @AfterTest public void teardown() { driver.quit(); } }
[ "Bhargav.eswar3@gmail.com" ]
Bhargav.eswar3@gmail.com
304e2722a4d477a30e46ccd82622b889c7ab77de
56f2c3c0110a1b2e1845dd8ea98e8fca8a74529f
/src/se/nackademin/objp/in3/PuzzleController.java
bccd910eab151c9019a2258f6b86d8017fc96d1c
[]
no_license
violofsson/Objp-Inlamningar
5c15a87834ae3d42d281a1350069462e4e28aa24
5a994d761018a09734f25db796c49b8127141afc
refs/heads/master
2020-08-02T06:34:59.664883
2019-10-30T19:28:22
2019-10-30T19:28:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,140
java
package se.nackademin.objp.in3; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.fxml.FXML; import javafx.scene.layout.GridPane; import javafx.scene.text.Text; import javafx.util.Pair; import java.util.Optional; public class PuzzleController { private PuzzleModel model; private int rows = 4; private int cols = 4; @FXML private GridPane board; @FXML private Text message; private EventHandler<ActionEvent> tileHandler = (actionEvent -> { if (actionEvent.getSource() instanceof Tile) { Tile t = (Tile) actionEvent.getSource(); if (model.areAdjacent(0, t.ID)) { model.swap(0, t.ID); t.move(model.getRow(t.ID), model.getColumn(t.ID)); } checkWinning(); } }); @FXML private void changeSettings() throws Exception { SettingsDialog dialog = new SettingsDialog(rows, cols); Optional<Pair<Integer, Integer>> newSettings = dialog.showAndWait(); newSettings.ifPresent(rowsAndCols -> { this.rows = rowsAndCols.getKey(); this.cols = rowsAndCols.getValue(); newGame(); }); } private void checkWinning() { if (model.isSolved()) { setMessage("Grattis! Du har vunnit!"); board.setDisable(true); } } @FXML public void initialize() { newGame(); } @FXML private void newGame() { model = new PuzzleModel(rows, cols); model.shuffle(); resetBoard(); setMessage(rows + " rader, " + cols + " kolumner"); } private void resetBoard() { board.getChildren().clear(); for (Integer i : model.boardState) { if (i == PuzzleModel.EMPTYSPACE) continue; Tile t = new Tile(i, tileHandler, model.getRow(i), model.getColumn(i)); board.getChildren().add(t); } board.setDisable(false); } private void setMessage(String msg) { message.setText(msg); } @FXML private void quit() { System.exit(0); } }
[ "victor.olofsson@yh.nackademin.se" ]
victor.olofsson@yh.nackademin.se
869e16d7c4c884f2dd952a4232374b974c624254
818414e4105f319099839419e7ed94f8029b54e2
/src/pt/globaltronic/jogltrials/OpenGLMain.java
cb018f2868eaa9840afcb397f5c738e0478fcd02
[]
no_license
Tuko305/openGL-jogl-trials
5c6fd3197c5d66b472a56cb0918ddcbe13721d11
245aa6b3dc4b771b41e4f8b7451f3cf21da70b8a
refs/heads/master
2022-11-09T02:32:38.545435
2020-06-26T17:08:46
2020-06-26T17:08:46
275,124,905
0
0
null
null
null
null
UTF-8
Java
false
false
2,208
java
package pt.globaltronic.jogltrials; import java.awt.GraphicsEnvironment; import java.awt.Rectangle; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.swing.JFrame; import com.jogamp.opengl.*; import com.jogamp.opengl.awt.GLCanvas; import com.jogamp.opengl.util.FPSAnimator; public class OpenGLMain implements GLEventListener { private static FPSAnimator animator; private static int width; private static int height; private static GL3 gl; public static Rectangle screenSize; public static JFrame frame; public static void main(String[] args) { GLProfile glprofile = GLProfile.getMaximum(true); GLCapabilities capabilities = new GLCapabilities(glprofile); GLCanvas canvas = new GLCanvas(capabilities); screenSize = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); width = (int) screenSize.getWidth(); height = (int) screenSize.getHeight(); frame = new JFrame("Frame name"); frame.setAlwaysOnTop(false); frame.setSize(width, height); frame.add(canvas); frame.setUndecorated(true); frame.setVisible(true); animator = new FPSAnimator(25); animator.add(canvas); animator.start(); canvas.addGLEventListener(new OpenGLMain()); canvas.requestFocus(); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); } public void display(GLAutoDrawable drawable) { update(); //while (animation){ // update the data with the animation; render(drawable); //render(drawable); } public void dispose(GLAutoDrawable drawable) { } public void init(GLAutoDrawable drawable) { gl = drawable.getGL().getGL3(); } public void reshape(GLAutoDrawable drawable, int arg1, int arg2, int arg3, int arg4) { } private void update() { // set stuff // launch animation } private void render(GLAutoDrawable drawable) { // Scenes.render(drawable); } }
[ "hugues.bonnaure@globaltronic.pt" ]
hugues.bonnaure@globaltronic.pt
1c4218615f51739dbcae7ea7644fda110065e06a
2996492e16ff6da89cf0e26ff8adefaebb06f7a6
/src/ExampleCodeFromClass/Grabbable.java
1572c88f632074eb1fa17718c0dbc47dba153042
[]
no_license
YavuzOrbey/corejava
9696d893ce500e584b0f0e25a27f4e5cdfaf6938
f47a5adad5ef00d682e56140ba2c7118b4df4615
refs/heads/master
2023-04-14T08:11:29.514041
2021-04-26T18:05:03
2021-04-26T18:05:03
361,846,949
0
0
null
null
null
null
UTF-8
Java
false
false
121
java
package ExampleCodeFromClass; @FunctionalInterface public interface Grabbable { int number = 1; String grab(); }
[ "yavuz.orbey@gmail.com" ]
yavuz.orbey@gmail.com
c059bf64ae0667e1bb393c4a2ab7ed9f91e32ef6
0e647fba4804e7fc123ed462dd014e51f9396d06
/WebIIEx7/src/java/com/ufpr/tads/web2/servlets/PortalServlet.java
967640ccb9ee3b2f4eae08dd73fd2f17e50a17d6
[]
no_license
itaayp/WebIIEx7
8688e51be6f3aff6e417cff84752b9dc2581a05f
8a8db2b0539882abfcabf5b4c376e999827861c0
refs/heads/master
2020-04-01T15:39:03.506655
2018-10-16T19:49:49
2018-10-16T19:49:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,681
java
package com.ufpr.tads.web2.servlets; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ import com.ufpr.tads.web2.dao.UsuarioDAO; import com.ufpr.tads.web2.beans.Usuario; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @author Amanda */ @WebServlet(name = "PortalServlet", urlPatterns = {"/PortalServlet"}) public class PortalServlet extends HttpServlet { /** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); try (PrintWriter out = response.getWriter()) { /* TODO output your page here. You may use following sample code. */ out.println("<!DOCTYPE html>"); out.println("<html>"); out.println("<head>"); out.println("<title>Servlet PortalServlet</title>"); out.println("</head>"); out.println("<body>"); out.println("<form action='CadastrarUsuarioServlet' method='POST'>"); out.println("Nome: <input type='text' name='nome' value=''/>"); out.println("Login: <input type='text' name='login' value=''/>"); out.println("Senha: <input type='password' name='senha' value=''/>"); out.println("<input type='submit' name='btnEnviar' value='Enviar'>"); out.println("</form>"); UsuarioDAO usuarioDAO = new UsuarioDAO(); ArrayList<Usuario> usuarios = usuarioDAO.selecionar(); if (usuarios.size() > 0){ out.println("<table>"); out.println("<tr>"); out.println("<th>Nome</th>"); out.println("<th>Login</th>"); out.println("<th>Senha</th>"); out.println("</tr>"); for(int i = 0; i < usuarios.size(); i++){ out.println("<tr>"); out.println("<td>" + usuarios.get(i).getNome_usuario() + "</td>"); out.println("<td>" + usuarios.get(i).getLogin_usuario() + "</td>"); out.println("<td>" + usuarios.get(i).getSenha_usuario() + "</td>"); out.println("</tr>"); } out.println("</table>"); } out.println("<br>"); out.println("<a href ='LogoutServlet'>Encerrar sessão</a>"); out.println("</body>"); out.println("</html>"); } } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
[ "tiago@lilibox.com.br" ]
tiago@lilibox.com.br
6f717965c546b1e2e1b72e4cf80badb551f78529
e2cd776fde7e8a767c36adfd35536e2e6166307a
/app/src/main/java/com/example/vietd/cinema/BookingChairActivity.java
4a23299a75bd559ac0c54d5d93ead95b8e8292bf
[]
no_license
vietpham94/Cinema
7212d43a6b543b22278bb5c7c9ac6872ffa69742
4b3da3d563d84b3257304fbd6e8746ca257864a4
refs/heads/master
2021-01-19T21:02:59.820708
2017-05-17T10:22:58
2017-05-17T10:22:58
88,598,624
0
0
null
null
null
null
UTF-8
Java
false
false
67,785
java
package com.example.vietd.cinema; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.github.nkzawa.emitter.Emitter; import com.github.nkzawa.socketio.client.Socket; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Locale; /** * Created by Optimus on 4/12/2017. */ public class BookingChairActivity extends AppCompatActivity implements View.OnClickListener { public TextView numbchair; Config config = new Config(); private int[] idbtn = {R.id.A1, R.id.A2, R.id.A3, R.id.A4, R.id.A5, R.id.A6, R.id.A7, R.id.A8, R.id.B1, R.id.B2, R.id.B3, R.id.B4, R.id.B5, R.id.B6, R.id.B7, R.id.B8, R.id.C1, R.id.C2, R.id.C3, R.id.C4, R.id.C5, R.id.C6, R.id.C7, R.id.C8, R.id.D1, R.id.D2, R.id.D3, R.id.D4, R.id.D5, R.id.D6, R.id.D7, R.id.D8, R.id.S1, R.id.S2, R.id.S3, R.id.S4, R.id.S5, R.id.S6, R.id.S7, R.id.S8}; private String[] btnArray = {"A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8", "C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8", "D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "E1", "E2", "E3", "E4", "E5", "E6", "E7", "E8"}; private Button A1, A2, A3, A4, A5, A6, A7, A8, B1, B2, B3, B4, B5, B6, B7, B8, C1, C2, C3, C4, C5, C6, C7, C8, D1, D2, D3, D4, D5, D6, D7, D8, E1, E2, E3, E4, E5, E6, E7, E8, next; private String weekDay; private ArrayList<String> seat = new ArrayList<String>(); private ArrayList<Integer> seatType = new ArrayList<Integer>(); private int numbNormal = 0, numbVip = 0, numbCouple = 0, typeOfDay; private TextView totalMoney; private Socket mSocket = config.mSocket; private int id_time; private JSONArray ticketinfoList; private MovieInfoForBooking data; private String strc = null; private ArrayList<Integer> listPrice = new ArrayList<Integer>(); //lấy giá của ghế private Emitter.Listener priceOfSeat = new Emitter.Listener() { @Override public void call(final Object... args) { runOnUiThread(new Runnable() { @Override public void run() { JSONObject data = (JSONObject) args[0]; try { int total = 0; int tg = Integer.parseInt(totalMoney.getText().toString()); JSONObject priceS = data.getJSONObject("price"); int price = priceS.getInt("price"); if (seat.contains(strc)) { switch (strc) { case "E1": total = tg + 2 * price; break; case "E2": total = tg + 2 * price; break; case "E3": total = tg + 2 * price; break; case "E4": total = tg + 2 * price; break; case "E5": total = tg + 2 * price; break; case "E6": total = tg + 2 * price; break; case "E7": total = tg + 2 * price; break; case "E8": total = tg + 2 * price; break; default: total = tg + price; break; } } else { switch (strc) { case "E1": total = tg - 2 * price; break; case "E2": total = tg - 2 * price; break; case "E3": total = tg - 2 * price; break; case "E4": total = tg - 2 * price; break; case "E5": total = tg - 2 * price; break; case "E6": total = tg - 2 * price; break; case "E7": total = tg - 2 * price; break; case "E8": total = tg - 2 * price; break; default: total = tg - price; break; } } totalMoney.setText(String.valueOf(total)); } catch (JSONException e) { return; } } }); } }; private Emitter.Listener TicketInfo = new Emitter.Listener() { @Override public void call(final Object... args) { runOnUiThread(new Runnable() { @Override public void run() { JSONObject data = (JSONObject) args[0]; try { JSONObject namechair = data.getJSONObject("namechair"); Toast.makeText(BookingChairActivity.this, namechair + "", Toast.LENGTH_SHORT).show(); } catch (JSONException e) { return; } } }); } }; private Emitter.Listener ListpriceOfSeat = new Emitter.Listener() { @Override public void call(final Object... args) { runOnUiThread(new Runnable() { @Override public void run() { JSONObject data = (JSONObject) args[0]; try { JSONObject priceS = data.getJSONObject("price"); int price = priceS.getInt("price"); listPrice.add(price); } catch (JSONException e) { return; } } }); } }; private Emitter.Listener resultOccupiedSeat = new Emitter.Listener() { @Override public void call(final Object... args) { runOnUiThread(new Runnable() { @Override public void run() { JSONObject data = (JSONObject) args[0]; try { ArrayList<String> Occupied = new ArrayList<String>(); ticketinfoList = data.getJSONArray("ticketinfoList"); String chair = ticketinfoList.getJSONObject(0).getString("namechair"); for (int i = 0; i < ticketinfoList.length(); i++) { for(int j = 0; j < btnArray.length; j++){ if(btnArray[j].contains(ticketinfoList.getJSONObject(i).getString("namechair"))){ findViewById(idbtn[j]).setEnabled(false); findViewById(idbtn[j]).setBackgroundResource(R.drawable.chairoccupied); } } } for (int j = 0; j < idbtn.length; j++){ findViewById(idbtn[j]).setOnClickListener(BookingChairActivity.this); } } catch (JSONException e) { return; } } }); } }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_ticketbooking_chairs); mSocket.connect(); mSocket.on("priceOfSeat", priceOfSeat); mSocket.on("TicketInfo", TicketInfo); totalMoney = (TextView) findViewById(R.id.totalMoney); A1 = (Button) findViewById(R.id.A1); A2 = (Button) findViewById(R.id.A2); A3 = (Button) findViewById(R.id.A3); A4 = (Button) findViewById(R.id.A4); A5 = (Button) findViewById(R.id.A5); A6 = (Button) findViewById(R.id.A6); A7 = (Button) findViewById(R.id.A7); A8 = (Button) findViewById(R.id.A8); B1 = (Button) findViewById(R.id.B1); B2 = (Button) findViewById(R.id.B2); B3 = (Button) findViewById(R.id.B3); B4 = (Button) findViewById(R.id.B4); B5 = (Button) findViewById(R.id.B5); B6 = (Button) findViewById(R.id.B6); B7 = (Button) findViewById(R.id.B7); B8 = (Button) findViewById(R.id.B8); C1 = (Button) findViewById(R.id.C1); C2 = (Button) findViewById(R.id.C2); C3 = (Button) findViewById(R.id.C3); C4 = (Button) findViewById(R.id.C4); C5 = (Button) findViewById(R.id.C5); C6 = (Button) findViewById(R.id.C6); C7 = (Button) findViewById(R.id.C7); C8 = (Button) findViewById(R.id.C8); D1 = (Button) findViewById(R.id.D1); D2 = (Button) findViewById(R.id.D2); D3 = (Button) findViewById(R.id.D3); D4 = (Button) findViewById(R.id.D4); D5 = (Button) findViewById(R.id.D5); D6 = (Button) findViewById(R.id.D6); D7 = (Button) findViewById(R.id.D7); D8 = (Button) findViewById(R.id.D8); E1 = (Button) findViewById(R.id.S1); E2 = (Button) findViewById(R.id.S2); E3 = (Button) findViewById(R.id.S3); E4 = (Button) findViewById(R.id.S4); E5 = (Button) findViewById(R.id.S5); E6 = (Button) findViewById(R.id.S6); E7 = (Button) findViewById(R.id.S7); E8 = (Button) findViewById(R.id.S8); numbchair = (TextView) findViewById(R.id.numbTicket); next = (Button) findViewById(R.id.button_next); A1.setOnClickListener(this); A2.setOnClickListener(this); A3.setOnClickListener(this); A4.setOnClickListener(this); A5.setOnClickListener(this); A6.setOnClickListener(this); A7.setOnClickListener(this); A8.setOnClickListener(this); B1.setOnClickListener(this); B2.setOnClickListener(this); B3.setOnClickListener(this); B4.setOnClickListener(this); B5.setOnClickListener(this); B6.setOnClickListener(this); B7.setOnClickListener(this); B8.setOnClickListener(this); C1.setOnClickListener(this); C2.setOnClickListener(this); C3.setOnClickListener(this); C4.setOnClickListener(this); C5.setOnClickListener(this); C6.setOnClickListener(this); C7.setOnClickListener(this); C8.setOnClickListener(this); D1.setOnClickListener(this); D2.setOnClickListener(this); D3.setOnClickListener(this); D4.setOnClickListener(this); D5.setOnClickListener(this); D6.setOnClickListener(this); D7.setOnClickListener(this); D8.setOnClickListener(this); E1.setOnClickListener(this); E2.setOnClickListener(this); E3.setOnClickListener(this); E4.setOnClickListener(this); E5.setOnClickListener(this); E6.setOnClickListener(this); E7.setOnClickListener(this); E8.setOnClickListener(this); SimpleDateFormat dayFormat = new SimpleDateFormat("EEEE", Locale.US); Calendar calendar = Calendar.getInstance(); weekDay = dayFormat.format(calendar.getTime()); switch (String.valueOf(weekDay)) { case "Tuesday": typeOfDay = 1; break; case "Monday": typeOfDay = 1; break; case "Wednesday": typeOfDay = 1; break; case "Thursday": typeOfDay = 1; break; case "Friday": typeOfDay = 1; break; case "Saturday": typeOfDay = 2; break; case "Sunday": typeOfDay = 2; break; } // Intent intent = getIntent(); data = (MovieInfoForBooking) getIntent().getExtras().getSerializable("DATA"); id_time = getIntent().getExtras().getInt("id_time"); final String date = getIntent().getExtras().getString("date"); final int room = getIntent().getExtras().getInt("room"); getNameChair(data.idmovie, id_time, date); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getListPrice(1, timeFrame, typeOfDay, data.getFormat()); getListPrice(2, timeFrame, typeOfDay, data.getFormat()); getListPrice(3, timeFrame, typeOfDay, data.getFormat()); mSocket.on("ListpriceOfSeat", ListpriceOfSeat); mSocket.emit("getOccupiedSeat", date, room, id_time); mSocket.on("resultOccupiedSeat", resultOccupiedSeat); next.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (numbCouple == 0 && numbNormal == 0 && numbVip == 0) { Toast.makeText(BookingChairActivity.this, "Bạn chưa chọn ghế nào!", Toast.LENGTH_SHORT).show(); } else { Intent i = new Intent(BookingChairActivity.this, ReceiptActivity.class); Bundle bn = new Bundle(); bn.putSerializable("data", data); bn.putInt("id_time", id_time); bn.putString("date", date); bn.putStringArrayList("seat", seat); bn.putInt("room", room); bn.putInt("typeOfDay", typeOfDay); bn.putInt("typeOfMovie", data.getFormat()); bn.putInt("numbNormal", numbNormal); bn.putInt("numbVip", numbVip); bn.putInt("numbCouple", numbCouple); bn.putIntegerArrayList("listPrice", listPrice); i.putExtra("bundle", bn); startActivity(i); }// mSocket.emit("placeOrder", data, id_time, date, room, seat); } }); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.A1: strc = "A1"; if (!seat.contains("A1")) { if (seat.size() < 8) { seat.add("A1"); numbNormal++; A1.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("A1"); numbNormal--; A1.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.A2: strc = "A2"; if (!seat.contains("A2")) { if (seat.size() < 8) { seat.add("A2"); numbNormal++; seatType.add(1); A2.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("A2"); numbNormal--; A2.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.A3: strc = "A3"; if (!seat.contains("A3")) { if (seat.size() < 8) { seat.add("A3"); numbNormal++; A3.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("A3"); numbNormal--; A3.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.A4: strc = "A4"; if (!seat.contains("A4")) { if (seat.size() < 8) { seat.add("A4"); numbNormal++; A4.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("A4"); numbNormal--; A4.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.A5: strc = "A5"; if (!seat.contains("A5")) { if (seat.size() < 8) { seat.add("A5"); numbNormal++; A5.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("A5"); numbNormal--; A5.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.A6: strc = "A6"; if (!seat.contains("A6")) { if (seat.size() < 8) { seat.add("A6"); numbNormal++; A6.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("A6"); numbNormal--; A6.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.A7: strc = "A7"; if (!seat.contains("A7")) { if (seat.size() < 8) { seat.add("A7"); A7.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("A7"); A7.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.A8: strc = "A8"; if (!seat.contains("A8")) { if (seat.size() < 8) { seat.add("A8"); numbNormal++; A8.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("A8"); numbNormal--; A8.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.B1: strc = "B1"; if (!seat.contains("B1")) { if (seat.size() < 8) { seat.add("B1"); numbNormal++; B1.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("B1"); numbNormal--; B1.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.B2: strc = "B2"; if (!seat.contains("B2")) { if (seat.size() < 8) { seat.add("B2"); numbNormal++; B2.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("B2"); numbNormal--; B2.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.B3: strc = "B3"; if (!seat.contains("B3")) { if (seat.size() < 8) { seat.add("B3"); numbNormal++; B3.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("B3"); numbNormal--; B3.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.B4: strc = "B4"; if (!seat.contains("B4")) { if (seat.size() < 8) { seat.add("B4"); numbNormal++; B4.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("B4"); numbNormal--; B4.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.B5: strc = "B5"; if (!seat.contains("B5")) { if (seat.size() < 8) { seat.add("B5"); numbNormal++; B5.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("B5"); numbNormal--; B5.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.B6: strc = "B6"; if (!seat.contains("B6")) { if (seat.size() < 8) { seat.add("B6"); numbNormal++; B6.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("B6"); numbNormal--; B6.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.B7: strc = "B7"; if (!seat.contains("B7")) { if (seat.size() < 8) { seat.add("B7"); numbNormal++; B7.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("B7"); numbNormal--; B7.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.B8: strc = "B8"; if (!seat.contains("B8")) { if (seat.size() < 8) { seat.add("B8"); numbNormal++; B8.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("B8"); numbNormal--; B8.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.C1: strc = "C1"; if (!seat.contains("C1")) { if (seat.size() < 8) { seat.add("C1"); numbNormal++; C1.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("C1"); numbNormal--; C1.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.C2: strc = "C2"; if (!seat.contains("C2")) { if (seat.size() < 8) { seat.add("C2"); numbNormal++; C2.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("C2"); numbNormal--; C2.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.C3: strc = "C3"; if (!seat.contains("C3")) { if (seat.size() < 8) { seat.add("C3"); numbVip++; C3.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("C3"); numbVip--; C3.setBackgroundResource(R.drawable.chairs); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.C4: strc = "C4"; if (!seat.contains("C4")) { if (seat.size() < 8) { seat.add("C4"); numbVip++; C4.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("C4"); numbVip--; C4.setBackgroundResource(R.drawable.chairs); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.C5: strc = "C5"; if (!seat.contains("C5")) { if (seat.size() < 8) { seat.add("C5"); numbVip++; C5.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("C5"); numbVip--; C5.setBackgroundResource(R.drawable.chairs); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.C6: strc = "C6"; if (!seat.contains("C6")) { if (seat.size() < 8) { seat.add("C6"); numbVip++; C6.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("C6"); numbVip--; C6.setBackgroundResource(R.drawable.chairs); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.C7: strc = "C7"; if (!seat.contains("C7")) { if (seat.size() < 8) { seat.add("C7"); numbNormal++; C7.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("C7"); numbNormal--; C7.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.C8: strc = "C8"; if (!seat.contains("C8")) { if (seat.size() < 8) { seat.add("C8"); numbNormal++; C8.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("C8"); numbNormal--; C8.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.D1: strc = "D1"; if (!seat.contains("D1")) { if (seat.size() < 8) { seat.add("D1"); numbNormal++; D1.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("D1"); numbNormal--; D1.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.D2: strc = "D2"; if (!seat.contains("D2")) { if (seat.size() < 8) { seat.add("D2"); numbNormal++; D2.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("D2"); numbNormal--; D2.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.D3: strc = "D3"; if (!seat.contains("D3")) { if (seat.size() < 8) { seat.add("D3"); numbVip++; D3.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("D3"); numbVip--; D3.setBackgroundResource(R.drawable.chairs); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.D4: strc = "D4"; if (!seat.contains("D4")) { if (seat.size() < 8) { seat.add("D4"); numbVip++; D4.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("D4"); numbVip--; D4.setBackgroundResource(R.drawable.chairs); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.D5: strc = "D5"; if (!seat.contains("D5")) { if (seat.size() < 8) { seat.add("D5"); numbVip++; D5.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("D5"); numbVip--; D5.setBackgroundResource(R.drawable.chairs); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.D6: strc = "D6"; if (!seat.contains("D6")) { if (seat.size() < 8) { seat.add("D6"); numbVip++; D6.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("D6"); numbVip--; D6.setBackgroundResource(R.drawable.chairs); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(2, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.D7: strc = "D7"; if (!seat.contains("D7")) { if (seat.size() < 8) { seat.add("D7"); numbNormal++; D7.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("D7"); numbNormal--; D7.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.D8: strc = "D8"; if (!seat.contains("D8")) { if (seat.size() < 7) { seat.add("D8"); numbNormal++; D8.setBackgroundResource(R.drawable.chairchoosing); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("D8"); numbNormal--; D8.setBackgroundResource(R.drawable.chairnormal); numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(1, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.S1: strc = "E1"; if (!seat.contains("E1")) { if (seat.size() < 7) { seat.add("E1"); E1.setBackgroundResource(R.drawable.chairchoosing); seat.add("E2"); E2.setBackgroundResource(R.drawable.chairchoosing); numbCouple += 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("E1"); E1.setBackgroundResource(R.drawable.chairsweet); seat.remove("E2"); E2.setBackgroundResource(R.drawable.chairsweet); numbCouple -= 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.S2: strc = "E2"; if (!seat.contains("E2")) { if (seat.size() < 7) { seat.add("E2"); E2.setBackgroundResource(R.drawable.chairchoosing); seat.add("E1"); E1.setBackgroundResource(R.drawable.chairchoosing); numbCouple += 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("E2"); E2.setBackgroundResource(R.drawable.chairsweet); seat.remove("E1"); E1.setBackgroundResource(R.drawable.chairsweet); numbCouple -= 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.S3: strc = "E3"; if (!seat.contains("E3")) { if (seat.size() < 7) { seat.add("E3"); E3.setBackgroundResource(R.drawable.chairchoosing); seat.add("E4"); E4.setBackgroundResource(R.drawable.chairchoosing); numbCouple += 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("E3"); E3.setBackgroundResource(R.drawable.chairsweet); seat.remove("E4"); E4.setBackgroundResource(R.drawable.chairsweet); numbCouple -= 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.S4: strc = "E4"; if (!seat.contains("E4")) { if (seat.size() < 7) { seat.add("E4"); E4.setBackgroundResource(R.drawable.chairchoosing); seat.add("E3"); E3.setBackgroundResource(R.drawable.chairchoosing); numbCouple += 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("E4"); E4.setBackgroundResource(R.drawable.chairsweet); seat.remove("E3"); E3.setBackgroundResource(R.drawable.chairsweet); numbCouple -= 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.S5: strc = "E5"; if (!seat.contains("E5")) { if (seat.size() < 7) { seat.add("E5"); E5.setBackgroundResource(R.drawable.chairchoosing); seat.add("E6"); E6.setBackgroundResource(R.drawable.chairchoosing); numbCouple += 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("E5"); E5.setBackgroundResource(R.drawable.chairsweet); seat.remove("E6"); E6.setBackgroundResource(R.drawable.chairsweet); numbCouple -= 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.S6: strc = "E6"; if (!seat.contains("E6")) { if (seat.size() < 7) { seat.add("E6"); E6.setBackgroundResource(R.drawable.chairchoosing); seat.add("E5"); E5.setBackgroundResource(R.drawable.chairchoosing); numbCouple += 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("E6"); E6.setBackgroundResource(R.drawable.chairsweet); seat.remove("E5"); E5.setBackgroundResource(R.drawable.chairsweet); numbCouple -= 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.S7: strc = "E7"; if (!seat.contains("E7")) { if (seat.size() < 7) { seat.add("E7"); E7.setBackgroundResource(R.drawable.chairchoosing); seat.add("E8"); E8.setBackgroundResource(R.drawable.chairchoosing); numbCouple += 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("E7"); E7.setBackgroundResource(R.drawable.chairsweet); seat.remove("E8"); E8.setBackgroundResource(R.drawable.chairsweet); numbCouple -= 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } break; case R.id.S8: strc = "E8"; if (!seat.contains("E8")) { if (seat.size() < 7) { seat.add("E8"); E8.setBackgroundResource(R.drawable.chairchoosing); seat.add("E7"); E7.setBackgroundResource(R.drawable.chairchoosing); numbCouple += 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } else { Toast.makeText(this, "Bạn chỉ được chọn tối đa 8 ghế", Toast.LENGTH_SHORT).show(); } } else { seat.remove("E8"); E8.setBackgroundResource(R.drawable.chairsweet); seat.remove("E7"); E7.setBackgroundResource(R.drawable.chairsweet); numbCouple -= 2; numbchair.setText("" + seat.size() + ""); int timeFrame = 1; if (id_time >= 4) { timeFrame = 2; } getPrice(3, timeFrame, typeOfDay, data.getFormat()); } break; default: break; } } public void getPrice(int typeOfChair, int TimeFrame, int TypeOfDay, int typeOfMovie) { mSocket.emit("getPrice", typeOfMovie, TimeFrame, TypeOfDay, typeOfChair); } public void getListPrice(int typeOfChair, int TimeFrame, int TypeOfDay, int typeOfMovie) { mSocket.emit("getListPrice", typeOfMovie, TimeFrame, TypeOfDay, typeOfChair); } public void getNameChair(int IdMovie, int TimeFrame, String date) { mSocket.emit("getOneTicketInfo", IdMovie, TimeFrame, date); } }
[ "kienctn15@gmail.com" ]
kienctn15@gmail.com
6c63ebe8f37fc145cb7b0817b66eb71d1c50ae0e
1a4ec9ccaecfff95d03157c07bfe5433e3318269
/yhp/src/wp/zenny/controller/UploadAvatar.java
6b6a4e389dc5c7b4ed461a67c18cb6b54f253c01
[]
no_license
NhuY97/web-cuoi-ky
ad7c4bb295d0127417bf260340e9e3392f16a16b
3cd31adfa21e06f99fb7d233df1ccb1eacb14200
refs/heads/master
2021-09-02T07:42:40.440422
2017-12-31T15:39:07
2017-12-31T15:47:39
115,871,475
0
0
null
null
null
null
UTF-8
Java
false
false
4,005
java
package wp.zenny.controller; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.servlet.ServletFileUpload; import wp.zenny.dao.UserDAO; import wp.zenny.model.User; @WebServlet("/uploadAvatar") public class UploadAvatar extends HttpServlet { private static final long serialVersionUID = 1L; // location to store file uploaded private static final String UPLOAD_DIRECTORY = "Images"; // upload settings private static final int MEMORY_THRESHOLD = 1024 * 1024 * 3; // 3MB private static final int MAX_FILE_SIZE = 1024 * 1024 * 40; // 40MB private static final int MAX_REQUEST_SIZE = 1024 * 1024 * 50; // 50MB public UploadAvatar() { super(); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if(request.getSession().getAttribute("username") == null){ response.sendRedirect("Welcome"); return; } String page = "error?errCode=481"; PrintWriter writer = response.getWriter(); // checks if the request actually contains upload file if (!ServletFileUpload.isMultipartContent(request)) { // if not, we stop here writer.println("Error: Form must has enctype=multipart/form-data."); writer.flush(); return; } // configures upload settings DiskFileItemFactory factory = new DiskFileItemFactory(); // sets memory threshold - beyond which files are stored in disk factory.setSizeThreshold(MEMORY_THRESHOLD); // sets temporary location to store files factory.setRepository(new File(System.getProperty("java.io.tmpdir"))); ServletFileUpload upload = new ServletFileUpload(factory); // sets maximum size of upload file upload.setFileSizeMax(MAX_FILE_SIZE); // sets maximum size of request (include file + form data) upload.setSizeMax(MAX_REQUEST_SIZE); // constructs the directory path to store upload file // this path is relative to application's directory String uploadPath = getServletContext().getRealPath("") + File.separator + UPLOAD_DIRECTORY; // creates the directory if it does not exist File uploadDir = new File(uploadPath); if (!uploadDir.exists()) { uploadDir.mkdir(); } try { // parses the request's content to extract file data @SuppressWarnings("unchecked") List<FileItem> formItems = upload.parseRequest(request); if (formItems != null && formItems.size() > 0) { // iterates over form's fields for (FileItem item : formItems) { // processes only fields that are not form fields if (!item.isFormField()) { String fileName = new File(item.getName()).getName(); String filePath = uploadPath + File.separator + fileName; File storeFile = new File(filePath); // saves the file on disk item.write(storeFile); UserDAO usDAO = new UserDAO(); User us = usDAO.mapUser.get(request.getSession().getAttribute("username").toString()); us.setAvatar(fileName); if(usDAO.UpdateUser(us)) page="UserInfo"; } } } } catch (Exception ex) { ex.printStackTrace(); } response.sendRedirect(page); } }
[ "nhuytnt1608@gmail.com" ]
nhuytnt1608@gmail.com
553302831a5cb84134be0b2e08075096a1daacf4
0caff21228e8cc9b5958670e61e98d2b8aa0ad42
/bgStock/buss_cgzdh/src/main/java/com/cgzdh/buss/domain/dto/Order.java
bab7a503ade809b23a6d2eeb136d84d7e84ffbfb
[]
no_license
zzs759861353/cgzdh
c61622cc0972f4ae4761cb94101a1383294911a1
b856bfb5884aa6b9bf2e3192587ab7a57ad3c4ae
refs/heads/master
2021-05-14T16:06:38.371840
2018-02-27T09:28:26
2018-02-27T09:28:26
116,011,746
0
0
null
null
null
null
UTF-8
Java
false
false
291
java
package com.cgzdh.buss.domain.dto; import lombok.Data; /** * @author abo */ @Data public class Order { private String tradeNo; private String goodsName; private String totalFee; private String goodsDesc; /** * 订单标题 */ private String subject; }
[ "zhouzs@neuqsoft.com" ]
zhouzs@neuqsoft.com
89fb6f998c5db4a691f5a3d2ff092a96af08f55d
c73953f95043860ece8ac2a756ce0e74916b69ac
/app/src/main/java/com/mad/dms/Admin/ViewSalesRep.java
06f9794ce3eb1ec2fd0bb4ff2069405c98b334dd
[]
no_license
pk21-praveen/DMS
28ce8a5f4bb89237d23f630cd60a926e37c1d087
56c3d85495406671dfaab298c0301ee7792d66dd
refs/heads/master
2020-03-29T04:35:17.416344
2018-10-03T07:56:59
2018-10-03T07:56:59
149,538,326
0
0
null
null
null
null
UTF-8
Java
false
false
3,143
java
package com.mad.dms.Admin; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import com.mad.dms.DataBase.UserDBHelper; import com.mad.dms.R; import com.mad.dms.Classes.User; import java.util.ArrayList; public class ViewSalesRep extends AppCompatActivity { private ListView listView; public static ArrayList<String> keysList; public ArrayList<User> authList; public static ArrayAdapter<String> adapter; public static ArrayList<String> arrayList; public static ArrayList<User> userList; private String userID; private UserDBHelper udb; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.view_sales_rep); this.setTitle("Sales Rep List"); udb = new UserDBHelper(this); FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent i = new Intent(ViewSalesRep.this, AddSalesRep.class); startActivity(i); overridePendingTransition(R.anim.left_enter, R.anim.right_out); } }); userList = udb.GetUsers(); arrayList = new ArrayList<>(); listView = findViewById(R.id.viewSRList); adapter = new ArrayAdapter<String>(ViewSalesRep.this, R.layout.sr_info, R.id.listSRDetails, arrayList); listView.setAdapter(adapter); for (int i = 0; i < userList.size(); i++) { arrayList.add("Name : " + userList.get(i).getName() + "\nEmail : " + userList.get(i).getEmail() + "\nPhone No: " + userList.get(i).getPhoneNo()); } adapter.notifyDataSetChanged(); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, final int position, long id) { ManageSalesRep.setPosition(position); Intent i = new Intent(ViewSalesRep.this, ManageSalesRep.class); i.putExtra("passEmail", userList.get(position).getEmail()); i.putExtra("passPassword", userList.get(position).getPassword()); i.putExtra("passName", userList.get(position).getName()); i.putExtra("passPhone", userList.get(position).getPhoneNo()); startActivity(i); overridePendingTransition(R.anim.left_enter, R.anim.right_out); finish(); } }); } @Override public void onBackPressed() { super.onBackPressed(); Intent i = new Intent(ViewSalesRep.this, AdminHome.class); startActivity(i); this.overridePendingTransition(R.anim.right_enter, R.anim.left_out); } }
[ "pk21.praveen@gmail.com" ]
pk21.praveen@gmail.com
84446c7ffa11dd878ad91681941979b21d041b71
dae5efd87400030023219b49de93c9f2d52406f4
/src/main/java/com/example/repository/UserRepository.java
3f0302496b88f42b9186e22e566de942d6cfaa7a
[]
no_license
Songjaewoo/spring-redis-test
3c0b88ffe00b6c03e1ea3b4b7eb5fb8f4c4136d6
7edb22e4ed1f0858befd02559973ce60f7f7abf8
refs/heads/master
2016-08-12T12:15:44.509568
2015-11-30T02:22:36
2015-11-30T02:22:36
47,090,413
0
0
null
null
null
null
UTF-8
Java
false
false
200
java
package com.example.repository; import org.springframework.data.jpa.repository.JpaRepository; import com.example.model.User; public interface UserRepository extends JpaRepository<User, Long> { }
[ "songjaewoo@petaz.co.kr" ]
songjaewoo@petaz.co.kr
ee91c4e1592f173f98324f68b643887350a4e4d2
187abc0982e2a817a03ada49cfef7666994c2883
/src/main/java/picard/sam/SamErrorMetric/BaseErrorCalculator.java
b6de815a54c9225c6bfa13082f2eb349174a6ced
[ "MIT" ]
permissive
broadinstitute/picard
9f5d49d1c2275a9e42d6af029695dbf8dcacc01c
a9194bd978a9169df451139d74f2632a2a9c3f7b
refs/heads/master
2023-08-29T10:36:09.723748
2023-08-24T15:15:40
2023-08-24T15:15:40
18,225,913
938
455
MIT
2023-09-05T22:13:22
2014-03-28T20:43:35
Java
UTF-8
Java
false
false
2,308
java
/* * The MIT License * * Copyright (c) 2018 The Broad Institute * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * 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 OR COPYRIGHT HOLDERS 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. */ package picard.sam.SamErrorMetric; import htsjdk.samtools.CigarElement; import htsjdk.samtools.reference.SamLocusAndReferenceIterator; import htsjdk.samtools.util.AbstractRecordAndOffset; import htsjdk.samtools.util.SamLocusIterator; import htsjdk.samtools.util.SequenceUtil; public abstract class BaseErrorCalculator implements BaseCalculator { long nBases; /** * the function by which new loci are "shown" to the calculator **/ @Override public void addBase(final SamLocusIterator.RecordAndOffset recordAndOffset, final SamLocusAndReferenceIterator.SAMLocusAndReference locusAndRef) { if (recordAndOffset.getAlignmentType() == AbstractRecordAndOffset.AlignmentType.Match) { if (!SequenceUtil.isNoCall(recordAndOffset.getReadBase())) { nBases++; } } else if (recordAndOffset.getAlignmentType() == AbstractRecordAndOffset.AlignmentType.Insertion) { final CigarElement cigarElement = ReadBaseStratification.getIndelElement(recordAndOffset); if (cigarElement != null) { nBases += cigarElement.getLength(); } } } }
[ "noreply@github.com" ]
noreply@github.com
6d89fa0f141759c21bd550d6d93bbae09fc77107
1a57912c9428667a03e805c7c4660fe710db326e
/ActiveMQ-master/src/main/java/com/demo/subscribe/TopicListener.java
0e5a9eb7d5f6ee60166f2369e18a3baf5c82ce67
[]
no_license
agricultureY/javalearn-master
42e70eb531f19ba98abc41ab6ee90ecd7fd6c526
64f21c73d3f6c6c764ab8fe8eabd834ae28e1814
refs/heads/master
2020-03-19T16:12:55.097538
2018-08-05T04:43:59
2018-08-05T04:43:59
136,705,726
1
0
null
null
null
null
UTF-8
Java
false
false
464
java
package com.demo.subscribe; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageListener; import javax.jms.TextMessage; /** * 消息监听-订阅者一 * @author ycn */ public class TopicListener implements MessageListener { public void onMessage(Message message) { try { System.out.println("订阅者一收到的消息 :"+((TextMessage)message).getText()); } catch (JMSException e) { e.printStackTrace(); } } }
[ "15001141049@163.com" ]
15001141049@163.com
0cfd5d80259a6e9bbcf5c0f57c85f8075ae42cde
612043f8179325e1440be57a77ec653c3a1d4436
/src/main/java/org/usfirst/frc/team1091/robot/ImageInfo.java
c84bdc331db3567fd500247a1bc90e0c4c7b7717
[]
no_license
Team1091/FRC-2017-Steamworks-Gradle
4bdb28cf3877bbe77011e9ec63ca1d7aab8a1c1e
2567f82e7e479c13ababf2c8cd38a816eeb32a01
refs/heads/master
2021-07-03T09:32:02.311529
2017-09-22T13:26:40
2017-09-22T13:26:40
103,839,617
0
0
null
2017-09-22T13:26:41
2017-09-17T15:29:04
Java
UTF-8
Java
false
false
769
java
package org.usfirst.frc.team1091.robot; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; public class ImageInfo { private float center = 0; private float distance = 0; private boolean imageSeen = false; public void update(String input) { if (input != null && !input.isEmpty()) { String[] split = input.split(","); if (split.length == 2) { center = Float.parseFloat(split[0]) - 0.1f; distance = Float.parseFloat(split[1]); imageSeen = true; SmartDashboard.putNumber("Center", this.center); SmartDashboard.putNumber("Distance", this.distance); } } } public float getCenter() { return this.center; } public float getDistance() { return this.distance; } public boolean getHasSeen() { return imageSeen; } }
[ "stewsters@gmail.com" ]
stewsters@gmail.com
f2332b80dd926271aebee7655ce8ae6181aeabf3
b8e262e55c4d499555155a4fd8c5ed8849374f48
/boot-user/src/main/java/com/example/demo/po/User.java
9725f29444a12c07c7db02121d4ea3a3198ea1ce
[]
no_license
LiuZihaowwl/springbootstart
cb666a19aa0ae9d53dd6434923a7ef0160184452
03cd0e21f75f99a6a21543942381a50ae61c6351
refs/heads/master
2022-07-06T13:29:25.019644
2020-04-07T14:37:35
2020-04-07T14:37:35
253,821,183
0
0
null
2022-06-21T03:09:45
2020-04-07T14:39:32
Java
UTF-8
Java
false
false
1,193
java
package com.example.demo.po; import javax.persistence.*; @Table(name = "user") public class User { @Id private Integer id; @Column(name = "user_name") private String userName; private String pasword; private String salt; /** * @return id */ public Integer getId() { return id; } /** * @param id */ public void setId(Integer id) { this.id = id; } /** * @return user_name */ public String getUserName() { return userName; } /** * @param userName */ public void setUserName(String userName) { this.userName = userName == null ? null : userName.trim(); } /** * @return pasword */ public String getPasword() { return pasword; } /** * @param pasword */ public void setPasword(String pasword) { this.pasword = pasword == null ? null : pasword.trim(); } /** * @return salt */ public String getSalt() { return salt; } /** * @param salt */ public void setSalt(String salt) { this.salt = salt == null ? null : salt.trim(); } }
[ "296931626@qq.com" ]
296931626@qq.com
b87b8572666560c157f01cb6884431456a4bc21c
3f0a988bbc0251d972372c664a6a2ed674a1fe59
/src/main/java/com/sevael/lgtool/dao/DashboardDao.java
87ebb2f73618fc3bf0350ad8efaa34a00cb8a544
[]
no_license
Mayandi-Java/CRM-CORE
05a78c8755320c8611e7be61a6e1e1ff9ef3608c
0e9158dd3315cee4fa0ec86f5550aa63daaae19c
refs/heads/master
2022-12-23T06:28:27.602510
2020-02-25T11:25:25
2020-02-25T11:25:25
242,982,464
0
0
null
2022-12-16T08:36:30
2020-02-25T11:22:51
Java
UTF-8
Java
false
false
769
java
package com.sevael.lgtool.dao; import java.util.List; import com.sevael.lgtool.model.DashboardDealTrendModel; import com.sevael.lgtool.model.DashboardLeadTrendModel; import com.sevael.lgtool.model.DashboardModel; import com.sevael.lgtool.model.DashboardTopServiceModel; import com.sevael.lgtool.model.DashboardTopUserModel; public interface DashboardDao { DashboardModel getDashboard(String userid); List<DashboardTopServiceModel> getTopTrainingDashboard(String userid, int type); List<DashboardTopServiceModel> getTopCertDashboard(String userid, int type); List<DashboardTopUserModel> getTopUserDashboard(String userid, int type); List<DashboardDealTrendModel> getDealTrend(String userid, int type); List<DashboardLeadTrendModel> getLeadTypeTrend(); }
[ "mayandi@sevael.com" ]
mayandi@sevael.com
e69a6e9acb29ffc4c5a303e82ea55f1500b7c7a5
3d2a3e05af140159e924e186b0bf969bc2d8ae7f
/nestoop-parent/nestoop-java-adavce/src/main/java/cn/nest/annotation/entity/EntityBean.java
35b5bbd622485b2965d9a353bb1dde0941bae859
[]
no_license
nestoop/dubbo-integration
df35db11cac1ed7b1c35a143c029ab0bb6c810a1
ca99ec349524820009c525b48b12f241a6d4bea6
refs/heads/master
2021-01-25T11:27:11.562001
2017-01-12T16:16:44
2017-01-12T16:16:44
123,395,809
0
0
null
null
null
null
UTF-8
Java
false
false
694
java
package cn.nest.annotation.entity; import cn.nest.annotation.BeanTransfer; import cn.nest.annotation.ColumTransfer; /** * Created by perk on 2016/12/16. */ @BeanTransfer(type = "JSON", desc = "Bean Transfer JSON") public class EntityBean { @ColumTransfer(value = "visa_code") private String visaCode; @ColumTransfer(value = "visa_name") private String visaName; public String getVisaCode() { return visaCode; } public void setVisaCode(String visaCode) { this.visaCode = visaCode; } public String getVisaName() { return visaName; } public void setVisaName(String visaName) { this.visaName = visaName; } }
[ "xiaobao@inspiry.cn" ]
xiaobao@inspiry.cn
9de02f25fd5aacd48ef65c6faac77968c95e16e1
a840e7bf64782cf3e55cb757b3caf07877f2badd
/src/main/java/com/wsk/movie/tool/AuthService.java
5110e0e78288d3d718f30a68d1b7f346cae8115e
[]
no_license
Geloi/movie
709a598d52233eecd8d0de2bd9c62b7fcc257e8a
fdc145fc07b42f2b281e901ec3c81aa8eb9b537f
refs/heads/master
2021-09-14T23:21:11.000142
2018-05-22T12:39:40
2018-05-22T12:39:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,118
java
package com.wsk.movie.tool; import org.json.JSONObject; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.util.List; import java.util.Map; /** * 获取token类 * * @Author : WuShukai * @Date :2018/2/12 10:04 */ public class AuthService { /** * 获取权限token * @return 返回示例: * { * "access_token": "24.460da4889caad24cccdb1fea17221975.2592000.1491995545.282335-1234567", * "expires_in": 2592000 * } */ public static String getAuth() { // 官网获取的 API Key 更新为你注册的 String clientId = "Pf23Mja679H7H1TznMqtyFQ4"; // 官网获取的 Secret Key 更新为你注册的 String clientSecret = "IDWhHAdIlhFWwOQfGwV8Ftw0keH3U80Z"; return getAuth(clientId, clientSecret); } /** * 获取API访问token * 该token有一定的有效期,需要自行管理,当失效时需重新获取. * @param ak - 百度云官网获取的 API Key * @param sk - 百度云官网获取的 Securet Key * @return assess_token 示例: * "24.460da4889caad24cccdb1fea17221975.2592000.1491995545.282335-1234567" */ private static String getAuth(String ak, String sk) { // 获取token地址 String authHost = "https://aip.baidubce.com/oauth/2.0/token?"; String getAccessTokenUrl = authHost // 1. grant_type为固定参数 + "grant_type=client_credentials" // 2. 官网获取的 API Key + "&client_id=" + ak // 3. 官网获取的 Secret Key + "&client_secret=" + sk; try { URL realUrl = new URL(getAccessTokenUrl); // 打开和URL之间的连接 HttpURLConnection connection = (HttpURLConnection) realUrl.openConnection(); connection.setRequestMethod("GET"); connection.connect(); // 获取所有响应头字段 Map<String, List<String>> map = connection.getHeaderFields(); // 遍历所有的响应头字段 for (String key : map.keySet()) { System.err.println(key + "--->" + map.get(key)); } // 定义 BufferedReader输入流来读取URL的响应 BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); StringBuilder result = new StringBuilder(); String line; while ((line = in.readLine()) != null) { result.append(line); } /** * 返回结果示例 */ System.err.println("result:" + result); JSONObject jsonObject = new JSONObject(result.toString()); return jsonObject.getString("access_token"); } catch (Exception e) { System.err.printf("获取token失败!"); e.printStackTrace(System.err); } return null; } public static void main(String[] args) { getAuth(); } }
[ "1261709167@qq.com" ]
1261709167@qq.com
7201155f116c45592fa8ef6689d00197eae45a9d
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.5.1/sources/com/iqoption/charttools/model/indicator/constructor/d.java
a312599930db872374a32df83756ea9b439ec42d
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
8,374
java
package com.iqoption.charttools.model.indicator.constructor; import com.iqoption.charttools.model.indicator.constructor.InputItem.Type; import com.iqoption.core.f; import com.iqoption.dto.ChartTimeInterval; import java.util.ArrayList; import java.util.List; import kotlin.i; import kotlin.jvm.internal.h; @i(aXC = {1, 1, 11}, aXD = {"\u0000J\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\b\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u0002\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010\u0006\n\u0002\b\u0006\n\u0002\u0010\u0011\n\u0002\b\n\n\u0002\u0010\u0015\n\u0000\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J \u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u00162\b\b\u0002\u0010\u0018\u001a\u00020\u0019J \u0010\u001a\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u00192\b\b\u0002\u0010\u0018\u001a\u00020\u0019J \u0010\u001b\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u00162\b\b\u0002\u0010\u0018\u001a\u00020\u0019JI\u0010\u001c\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u001d2\n\b\u0002\u0010\u001e\u001a\u0004\u0018\u00010\u001d2\n\b\u0002\u0010\u001f\u001a\u0004\u0018\u00010\u001d2\n\b\u0002\u0010 \u001a\u0004\u0018\u00010\u001d2\b\b\u0002\u0010\u0018\u001a\u00020\u0019¢\u0006\u0002\u0010!J3\u0010\"\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u00162\f\u0010#\u001a\b\u0012\u0004\u0012\u00020\u001d0$2\b\b\u0002\u0010\u0018\u001a\u00020\u0019¢\u0006\u0002\u0010%J\"\u0010&\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00162\b\b\u0002\u0010\u0017\u001a\u00020\u00162\b\b\u0002\u0010\u0018\u001a\u00020\u0019JI\u0010'\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u00162\n\b\u0002\u0010\u001e\u001a\u0004\u0018\u00010\u00162\n\b\u0002\u0010\u001f\u001a\u0004\u0018\u00010\u00162\n\b\u0002\u0010 \u001a\u0004\u0018\u00010\u00162\b\b\u0002\u0010\u0018\u001a\u00020\u0019¢\u0006\u0002\u0010(J3\u0010)\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u00162\f\u0010#\u001a\b\u0012\u0004\u0012\u00020\u00160$2\b\b\u0002\u0010\u0018\u001a\u00020\u0019¢\u0006\u0002\u0010*J\"\u0010+\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00162\b\b\u0002\u0010\u0017\u001a\u00020\u00162\b\b\u0002\u0010\u0018\u001a\u00020\u0019J \u0010,\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u00042\b\b\u0002\u0010\u0018\u001a\u00020\u0019J3\u0010-\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u00162\f\u0010#\u001a\b\u0012\u0004\u0012\u00020\u00040$2\b\b\u0002\u0010\u0018\u001a\u00020\u0019¢\u0006\u0002\u0010.J(\u0010-\u001a\u00020\u00152\u0006\u0010\u0011\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u00162\u0006\u0010#\u001a\u00020/2\b\b\u0002\u0010\u0018\u001a\u00020\u0019R\u001c\u0010\u0003\u001a\u0004\u0018\u00010\u0004X†\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0005\u0010\u0006\"\u0004\b\u0007\u0010\bR\u001c\u0010\t\u001a\u0004\u0018\u00010\u0004X†\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\n\u0010\u0006\"\u0004\b\u000b\u0010\bR\u0017\u0010\f\u001a\b\u0012\u0004\u0012\u00020\u000e0\r¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010R\u001a\u0010\u0011\u001a\u00020\u0004X†\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0012\u0010\u0006\"\u0004\b\u0013\u0010\b¨\u00060"}, aXE = {"Lcom/iqoption/charttools/model/indicator/constructor/InputGroupBuilder;", "", "()V", "description", "", "getDescription", "()Ljava/lang/String;", "setDescription", "(Ljava/lang/String;)V", "iconUrl", "getIconUrl", "setIconUrl", "inputs", "", "Lcom/iqoption/charttools/model/indicator/constructor/InputItem;", "getInputs", "()Ljava/util/List;", "name", "getName", "setName", "activeInput", "", "", "value", "hidden", "", "booleanInput", "colorInput", "doubleInput", "", "min", "max", "step", "(IDLjava/lang/Double;Ljava/lang/Double;Ljava/lang/Double;Z)V", "doubleSelectionInput", "options", "", "(II[Ljava/lang/Double;Z)V", "hostInput", "intInput", "(IILjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Z)V", "intSelectionInput", "(II[Ljava/lang/Integer;Z)V", "lineWidthInput", "stringInput", "stringSelectionInput", "(II[Ljava/lang/String;Z)V", "", "techtools_release"}) /* compiled from: InputBuilder.kt */ public final class d { private final List<InputItem> ayV = new ArrayList(); private String description; private String iconUrl; private String name = ""; public final String getName() { return this.name; } public final void setName(String str) { h.e(str, "<set-?>"); this.name = str; } public final String getDescription() { return this.description; } public final void setDescription(String str) { this.description = str; } public final void fD(String str) { this.iconUrl = str; } public final String getIconUrl() { return this.iconUrl; } public final List<InputItem> Mt() { return this.ayV; } public final void a(int i, int i2, Integer num, Integer num2, Integer num3, boolean z) { List list = this.ayV; Type type = Type.INT; String string = i != 0 ? f.getString(i) : ""; String valueOf = String.valueOf(i2); Double d = null; Double valueOf2 = num != null ? Double.valueOf((double) num.intValue()) : null; Double valueOf3 = num2 != null ? Double.valueOf((double) num2.intValue()) : null; if (num3 != null) { d = Double.valueOf((double) num3.intValue()); } list.add(new InputItem(type, string, valueOf, valueOf2, valueOf3, d, null, z, 64, null)); } public final void a(int i, double d, Double d2, Double d3, Double d4, boolean z) { this.ayV.add(new InputItem(Type.DOUBLE, i != 0 ? f.getString(i) : "", String.valueOf(d), d2, d3, d4, null, z, 64, null)); } public final void a(int i, boolean z, boolean z2) { this.ayV.add(new InputItem(Type.BOOL, i != 0 ? f.getString(i) : "", String.valueOf(z), null, null, null, null, z2, ChartTimeInterval.CANDLE_2m, null)); } public final void a(int i, int i2, int[] iArr, boolean z) { h.e(iArr, "options"); String[] strArr = new String[iArr.length]; int length = strArr.length; for (int i3 = 0; i3 < length; i3++) { strArr[i3] = f.getString(iArr[i3]); } a(i, i2, strArr, z); } public final void a(int i, int i2, String[] strArr, boolean z) { Object obj = strArr; h.e(obj, "options"); this.ayV.add(new InputItem(Type.STRING_SELECTION, i != 0 ? f.getString(i) : "", String.valueOf(i2), null, null, null, obj, z, 56, null)); } public final void c(int i, int i2, boolean z) { this.ayV.add(new InputItem(Type.ACTIVE, i != 0 ? f.getString(i) : "", String.valueOf(i2), null, null, null, null, z, ChartTimeInterval.CANDLE_2m, null)); } public final void d(int i, int i2, boolean z) { this.ayV.add(new InputItem(Type.COLOR, i != 0 ? f.getString(i) : "", String.valueOf(i2), null, null, null, null, z, ChartTimeInterval.CANDLE_2m, null)); } public static /* synthetic */ void b(d dVar, int i, int i2, boolean z, int i3, Object obj) { if ((i3 & 2) != 0) { i2 = 1; } if ((i3 & 4) != 0) { z = false; } dVar.e(i, i2, z); } public final void e(int i, int i2, boolean z) { this.ayV.add(new InputItem(Type.LINE_WIDTH, i != 0 ? f.getString(i) : "", String.valueOf(i2), null, null, null, null, z, ChartTimeInterval.CANDLE_2m, null)); } public static /* synthetic */ void c(d dVar, int i, int i2, boolean z, int i3, Object obj) { if ((i3 & 2) != 0) { i2 = -1; } if ((i3 & 4) != 0) { z = false; } dVar.f(i, i2, z); } public final void f(int i, int i2, boolean z) { this.ayV.add(new InputItem(Type.HOST, i != 0 ? f.getString(i) : "", String.valueOf(i2), null, null, null, null, z, ChartTimeInterval.CANDLE_2m, null)); } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
fa833057d6f98426f2bc0f1bd9ae038fb047872a
2cccdc7a87a02c00f55b4d96904c4bf606a0a02c
/userservices/src/main/java/com/assignment/user/bo/UserBo.java
4d673fd9965605603f9d9b1e8248e5b551a954e1
[ "MIT" ]
permissive
sandeepjalu/UserParentMaven
f757ca4a8fad43f256410d9e5a4f2852a37e53b0
7c2644aebba311088b4baea6c47e46d2ca9cdecc
refs/heads/master
2020-03-27T02:51:06.147218
2018-08-23T08:19:02
2018-08-23T08:19:02
145,822,172
0
0
null
null
null
null
UTF-8
Java
false
false
192
java
package com.assignment.user.bo; import com.assignment.user.dao.UserDao; import com.assignment.user.dto.User; public interface UserBo { void create(User user); User read(int id); }
[ "sandeep.jaluthariya@walmartlabs.com" ]
sandeep.jaluthariya@walmartlabs.com
93e823c4d48855480039d77b917df7df033afdcd
aa9ef5eac77c6092efb53e9db223a2f3ae8196b5
/core/src/com/mygdx/game/FlappyGameClass.java
3b4bbd632faa74ad109ec5d59be9d7184555f767
[]
no_license
SofiaCardosoMartins/FlappyBird-LibGDX
f6797ce3d7867151fe62f2eba52910b34e19a9cd
89e294bc3b9dd29ac7dfb57d07f686cf95c2c1fa
refs/heads/master
2020-03-12T12:06:52.157483
2018-06-03T13:39:22
2018-06-03T13:39:22
130,610,877
0
0
null
null
null
null
UTF-8
Java
false
false
1,338
java
package com.mygdx.game; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.mygdx.game.states.GameStateManager; import com.mygdx.game.states.MenuState; public class FlappyGameClass extends ApplicationAdapter { /*** INITIAL CONFIGURATIONS ***/ public static final int WIDTH = 480; public static final int HEIGHT = 800; public static final String TITLE = "Flappy Bird"; private Music music; /*** MANAGE GAME***/ private GameStateManager gsm; private SpriteBatch batch; //there should only be one instance of a SpriteBatch per game @Override public void create () { Gdx.gl.glClearColor(1, 0, 0, 1); gsm = new GameStateManager(); batch = new SpriteBatch(); music = Gdx.audio.newMusic(Gdx.files.internal("music.mp3")); music.setLooping(true); music.setVolume(0.1f); music.play(); MenuState ms = new MenuState(gsm); gsm.push(ms); } @Override public void render () { Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); //wipes out the screen so that the SpriteBatch can redraw everything gsm.update(Gdx.graphics.getDeltaTime()); gsm.render(batch); } @Override public void dispose () { super.dispose(); batch.dispose(); music.dispose(); } }
[ "up201606033@g.uporto.pt" ]
up201606033@g.uporto.pt